News for hackers. Stuff that matters.
Re:Rustgo: Calling Rust from Go with near-zero overhead (2017) by hu3 on Saturday August 03, 2019 @11:18AM (#20600795)
> I'll be upfront: I don't know Rust, and don't feel compelled to do my day-to-day programming in it.

I wonder if this changed. A quick glance over the blog hints me towards a no.

Re:Rustgo: Calling Rust from Go with near-zero overhead (2017) by parentheses on Saturday August 03, 2019 @12:49PM (#20601342)
It's a statement that is ~ 2 years old. I recently started learning it and like many things about it. I also haven't learned enough, so any borrow checker annoyance is likely a symptom of not knowing enough.

So far, I like:

- traits (similar to typeclasses)

- support for functional programming

- borrow checker keeping you aware of memory scoping

- it's (apparently) fast and relatively lightweight

Re:Rustgo: Calling Rust from Go with near-zero overhead (2017) by hu3 on Saturday August 03, 2019 @12:59PM (#20601402)
Rust is great. It's nice to have an efficient way to call Rust code from Go for when you need that extra speed and security.

I was just curious if Filippo's stance changed about the language since he works with cryptography and security at Google. I'm not seeing Rust in his GitHub repo's https://github.com/FiloSottile

Re:Rustgo: Calling Rust from Go with near-zero overhead (2017) by galangalalgol on Saturday August 03, 2019 @01:58PM (#20601701)
I've been considering using Julia and rust in this way. anyone tried that?
Re:Rustgo: Calling Rust from Go with near-zero overhead (2017) by blindseer on Saturday August 03, 2019 @02:42PM (#20601912)
I've used it. Julia's ccall is so nice to work with once you have wrapped it in other functions. The hardest part was creating, finding, downloading and using the right library with it's dependencies during Julia's build step for a package.
Re:Rustgo: Calling Rust from Go with near-zero overhead (2017) by superdimwit on Saturday August 03, 2019 @03:13PM (#20602060)
Out of curiosity, what sort of code aren't you able to write in Julia that you can in Rust?
Re:Rustgo: Calling Rust from Go with near-zero overhead (2017) by galangalalgol on Saturday August 03, 2019 @04:27PM (#20602477)
the idea was more to get that extra bit of speed for profiled bottlenecks. not a need, more a want. benchmark game currently puts Julia on par with go, not rust. also it seems to forgo simd except for obvious cases with large arrays.
Re:Rustgo: Calling Rust from Go with near-zero overhead (2017) by superdimwit on Saturday August 03, 2019 @05:00PM (#20602648)
Yeah. I think the benchmark game entries for Julia are unfortunately poor / stylised - IIRC there was a fork that delivered actually fast implementations (at the cost of some prettiness), but I don't think it ever got merged in.

I do agree that there a few cases where Julia in theory could do what you wanted, but it's a bit awkward to get the guarantee from the compiler that it will do so (e.g. SIMD this thing, constexpr this thing..). I do hope this situation improves.

Re:Rustgo: Calling Rust from Go with near-zero overhead (2017) by dnautics on Saturday August 03, 2019 @05:55PM (#20602920)
It's really quite easy to guarantee the compiler uses SIMD in Julia, it just takes a bit of reading the docs and understand the Zen of Julia.
Re:Rustgo: Calling Rust from Go with near-zero overhead (2017) by galangalalgol on Saturday August 03, 2019 @05:24PM (#20602767)
I would like someone good at Julia to tighten up those programs. benchmark game still takes submission right?
Re:Rustgo: Calling Rust from Go with near-zero overhead (2017) by dnautics on Saturday August 03, 2019 @05:37PM (#20602823)
I updated the Julia n body problem to use simd. It's actually really easy to read and I'm pretty confident it's very performant, but the problem is that for the number of iterations done, the VM boot time dominates. If you were doing a problem IRL, you would expect run times in the hours, and a 5 second vm load and program compile penalty would be peanuts.
Re:Rustgo: Calling Rust from Go with near-zero overhead (2017) by galangalalgol on Sunday August 04, 2019 @09:38AM (#20606442)
which implementation is that? 2 is the fastest but it doesn't use any .* or the like, an 3 which does and has "vectorised" in the comments is actually half the speed of 2
Re:Rustgo: Calling Rust from Go with near-zero overhead (2017) by jaChEWAg on Saturday August 03, 2019 @12:04PM (#20601061)
That line pretty much sums up the experience a lot of devs feel towards Rust
Re:Rustgo: Calling Rust from Go with near-zero overhead (2017) by hombre_fatal on Saturday August 03, 2019 @03:30PM (#20602173)
This is how most devs feel about any language they don't already use. There are even HNers who regularly brag about having never taken Javascript, one of the most ubiquitous languages, seriously enough to build a nontrivial project or to appreciate its upsides.

So it's not as damning as you seem to suggest.

Re:Rustgo: Calling Rust from Go with near-zero overhead (2017) by throwaway8879 on Saturday August 03, 2019 @04:03PM (#20602353)
For web dev, the ecosystem isn't quite there yet. I've written a few utilities and toy APIs, but don't feel like the web ecosystem is was rich as it needs to be for a serious project. Actix comes close. A few others like Warp ND Gotham are interesting. I'm waiting for rocket to compile in stable, and pick up async.

But yes, rust is definitely pretty cool, and I'm annoyed that I finally "understand" the language on my nth attempt at learning it, and still haven't found a good use case for it.

Re:Rustgo: Calling Rust from Go with near-zero overhead (2017) by disinclination on Saturday August 03, 2019 @12:22PM (#20601159)
I’ve been thinking recently about how the symbol “C” in “C programming language” literally stands for “3”.

We out here like, “I’ve been getting really into this new language, 12,447. I think it might finally be the thing to replace 3 for me.”

Re:Rustgo: Calling Rust from Go with near-zero overhead (2017) by kbenson on Saturday August 03, 2019 @01:22PM (#20601514)
Except it wasn't the third. It was like something between the 50's and low 100's. There were lots of languages then, most being unpopular.

C was just intended to be third in that very specific lineage, and I wouldn't be surprised to find it wasn't really third and just making the claim with its name.

Re:Rustgo: Calling Rust from Go with near-zero overhead (2017) by coldtea on Saturday August 03, 2019 @03:03PM (#20602008)
>There were lots of languages then, most being unpopular.

Not to mention several more advanced than C, Go, or even Rust... (Lisp, for one, Smalltalk for another)

Re:Rustgo: Calling Rust from Go with near-zero overhead (2017) by kbenson on Saturday August 03, 2019 @04:52PM (#20602603)
Well, it depends on what you mean by advanced, and if you're just considering the language or language plus compiler/runtime, but I take your point, and mostly agree with it.
Re:Rustgo: Calling Rust from Go with near-zero overhead (2017) by ludamad on Saturday August 03, 2019 @12:15PM (#20601121)
General purpose languages are a tough sell these days. Rust is tailored towards a niche and that's OK
Re:Rustgo: Calling Rust from Go with near-zero overhead (2017) by hombre_fatal on Saturday August 03, 2019 @03:28PM (#20602151)
> Rust is tailored towards a niche and that's OK

I encourage people to try writing run of the mill blocking code with Rust instead of diving immediately into futures and thread pools and streams just as if you were writing run of the mill Python.

It's generally 1:1 equivalent to the code I would've written in another language.

It's a general purpose programming language where most of the learning curve is in more advanced topics like concurrency, streams, and how to multiplex over thread pools. You can ignore them at the start, just like you can in Python.

Re:Rustgo: Calling Rust from Go with near-zero overhead (2017) by Refefer on Saturday August 03, 2019 @01:48PM (#20601654)
Systems Languages are considered niche these days?
Re:Rustgo: Calling Rust from Go with near-zero overhead (2017) by ludamad on Sunday August 04, 2019 @09:29PM (#20610306)
But it's not the first systems language, so it does need to carve a niche in that space
Re:Rustgo: Calling Rust from Go with near-zero overhead (2017) by smt88 on Saturday August 03, 2019 @03:08PM (#20602032)
What is Rust's niche? What excites me about it is that it is becoming a general purpose ecosystem. A few libs are missing, but that's changing rapidly.
Re:Rustgo: Calling Rust from Go with near-zero overhead (2017) by rapsey on Saturday August 03, 2019 @12:06PM (#20601072)
Of course generally the ones who “don’t know it”. But then that probably holds true for all languages one does not know.
Re:Rustgo: Calling Rust from Go with near-zero overhead (2017) by Animats on Saturday August 03, 2019 @02:44PM (#20601925)
I was a big fan of Rust at first. Then they went off into a weirdo approach to functional programming. That sent Rust to the niche in which Haskell lives.
Re:Rustgo: Calling Rust from Go with near-zero overhead (2017) by simias on Saturday August 03, 2019 @02:51PM (#20601961)
You'll have to be a bit more specific, I've been using the language for quite a long time now and I don't understand what you're referring to. I haven't noticed any obvious paradigm shift since 1.0.