Earlier quoted context omitted.
Right, so how do you get from Ruby strings (various encodings) to a Rust string? The sample code just calls std::str::from_utf8_unchecked(s) which is obviously not dealing with Ruby encodings.
Yeah, that's a clear bug. I was not aware that Ruby strings had encodings.
Helix: Rust and Ruby, Without the Glue
61–69 of 69 posts
Re: Helix: Rust and Ruby, Without the Glue
#62Helix is the name Perforce is using to rebrand their set of tools. Just an FYI, I'm not saying that means this should not be called Helix.
Besides that I really don't get why perforce are renaming their version control system yo Helix. Perforce is a well-known name, it seems weird to just drop a strong brand.
Re: Helix: Rust and Ruby, Without the Glue
#63Earlier quoted context omitted.
There's a _lot_ of stuff in this space: mrusty, ruru, Helix. It's exciting stuff.
mrusty is super cool . My only beefs with it are around the difficulties of mruby (package availability, 1.9.3 limitations, generally being "off the beaten path"), not of mrusty itself, but it's such a fantastic way to quickly build a scripting layer that I fell in love with it almost immediately. I would pay a decent chunk of money for a cleanly integrated MRI implementation inside of Rust, but I also will not be ho…
Not to start a flame war, but according to my experience, Ruby 1.9 is already quite good, later versions of Ruby only introduce minor syntax & semantic changes, which is trivial to work around. This is nothing like the big differences between 1.8 and 1.9
I agree with package availability problem of mruby, tho.
Re: Helix: Rust and Ruby, Without the Glue
#64Earlier quoted context omitted.
I find a great answer in this area is Crystal. I consider it 'go in ruby clothing'. Like go, Crystal is a typed language and outputs binary executables. They kept the beautiful ruby syntax and made better internals. http://crystal-lang.org/
I believe it is weakly typed, so type-checked on compile time.
It's their own words.
Re: Helix: Rust and Ruby, Without the Glue
#65Re: Helix: Rust and Ruby, Without the Glue
#66Earlier quoted context omitted.
Yeah, that's a clear bug. I was not aware that Ruby strings had encodings.
All strings have encodings. It is not possible to represent a string which is a series of bytes except with encodings. I guess you probably mean default encoding or no encoding support... which implies ASCII, better known as US-ASCII.
Encoding is purely an artifact of I/O if your language has a character type that can represent all possible characters you might want read or write.
Rust's strings are almost this; if there were no way to get a string's raw representation, nor perform bytewise slices, then how the string was stored in RAM would be an implementation detail rather than part of the public API. Rust, being a systems language, probably does need to specify this so that it doesn't incur encode/decode overhead when dealing with foreign code that can understand utf-8.
Re: Helix: Rust and Ruby, Without the Glue
#67Earlier quoted context omitted.
mrusty is super cool . My only beefs with it are around the difficulties of mruby (package availability, 1.9.3 limitations, generally being "off the beaten path"), not of mrusty itself, but it's such a fantastic way to quickly build a scripting layer that I fell in love with it almost immediately. I would pay a decent chunk of money for a cleanly integrated MRI implementation inside of Rust, but I also will not be ho…
Just out of curiosity: what limitations of Ruby 1.9.3 is critical in your case? Not to start a flame war, but according to my experience, Ruby 1.9 is already quite good, later versions of Ruby only introduce minor syntax & semantic changes, which is trivial to work around. This is nothing like the big differences between 1.8 and 1.9 I agree with package availability problem of mruby, tho.
Re: Helix: Rust and Ruby, Without the Glue
#68Re: Helix: Rust and Ruby, Without the Glue
#69What are the dependencies for installing the gem? I assume the machine will need rustc/cargo to compile the gem.