Helix: Rust and Ruby, Without the Glue
51–60 of 69 posts
Re: Helix: Rust and Ruby, Without the Glue
#52Rust has no its ecosystem, just pyramid selling. Swift will beat it!
Re: Helix: Rust and Ruby, Without the Glue
#53Anyway I think the same could be applied to Ruby Core as well. As I have been calling a Rusted Ruby for a long time.
Though I am not sure if this is a good thing for other Ruby implementation like JRuby.
Re: Helix: Rust and Ruby, Without the Glue
#54Earlier quoted context omitted.
String is just a typedef for Vec with some extra convenience functions for working with UTF-8. There's nothing stopping anyone from just using Vec to handle non-UTF-8 data in their native format, nor stopping anyone from writing convenience types like String for other encodings.
Yeah right so Ruby effectively has just made a bunch of these (and done the hard work for you of defining how to convert between them and work with them all in similar ways), and the higher-level class which includes UTF8 and a whole bunch of others is called 'String'. Its really what you want from a high-level language - to just work with different encodings out of the box, but not have to convert to a standard inte…
On the other hand, if you just track the encoding in your string type, then you don't have to pay a conversion cost at the boundary, but each encoding will have different memory-usage and performance characteristics.
Re: Helix: Rust and Ruby, Without the Glue
#55So it is Rusted Rails? XD Anyway I think the same could be applied to Ruby Core as well. As I have been calling a Rusted Ruby for a long time. Though I am not sure if this is a good thing for other Ruby implementation like JRuby.
Rust as far I know (not at all, honestly) doesn't interface with Java that well, so for JVM projects, it's nice to have a familiar language like Ruby that can tie in and make prototyping way easier.
I think people misunderstand how awesome Jruby is, because Ruby has never performed that well and Jruby has performed very well. Performance is not the only reason to both implementing a language. There's also the issue of mindshare, where a large group of people might already know Ruby, and it'd be easier in those scenarios to just give them Jruby and let them go to town than try and drag them through learning Java.
Rusty Ruby will do the same thing for Rust, I think. Rust is a very intricate, well-thought-out language, and I think it would benefit a lot from playing off the shared knowledge of thousands of Ruby users.
Re: Helix: Rust and Ruby, Without the Glue
#56Hmm. Kind of makes you wonder why you're using Ruby at all, which is slow as hell. It appears that once they port all Rails libraries to Rust, it may not take that much effort to create Rust on Rails and get rid of Ruby.
Re: Helix: Rust and Ruby, Without the Glue
#57Very excited to see the development of the Ruby/Rust space. The two languages together would seem a joy of a workflow from concept through to maintenance, and the wealth of important Ruby personalities currently involved in Rust (as well as others) encourages that that this will be a well trodden and well documented workflow sooner rather than later. I think this could help Ruby regain some of its early excitement, a…
There's a _lot_ of stuff in this space: mrusty, ruru, Helix. It's exciting stuff.
I would pay a decent chunk of money for a cleanly integrated MRI implementation inside of Rust, but I also will not be holding my breath for it.
Re: Helix: Rust and Ruby, Without the Glue
#58Earlier quoted context omitted.
Akira Matsuda actually suggested at RailsConf that maybe Rails handling non-UTF-8 encodings was not necessary, and maybe phasing it out was a good idea. I wasn't present for the talk, just saw his slides.
Akira was talking about a specific context - view rendering. Which makes sense, who the hell ever renders a view in anything other than UTF-8? Checking input, however, is a whole 'nother ballgame.
so these days, the non-UTF-8 usage in Rails apps should be pretty tiny, I would think? It'd be stuff coming from outside of forms.Re: Helix: Rust and Ruby, Without the Glue
#59Earlier quoted context omitted.
Why hit the network/a central resource when you could just do it locally?
It's a webapp, they're likely already querying all the meal information from a mysql or postgresql db. Chances are they could have made a change to their db models and written some sql to handle food requirements checking instead of handling it after the query. But that could've been premature optimization ultimately, and to speed it up now, it's probably easier to optimize the slow ruby code with some rust instead.
For example if we have a few tables we can determine which menu items a user could eat:
users
user_ingredient_exclusions
ingredients
menu_ingredients
menu
-- items a user can eat based on not having any items in the excluded list
select distinct m.*
from menu m
inner join menu_ingredients mi on m.id = mi.menu_id
left join user_ingredient_exclusions e on e.ingredient_id = mi.ingredient_id
inner join user u on u.id = e.user_id
where e.id is null
and u.id = @id