I was somewhat disappointed not to have a followup to what work-related reasons there might be. Note also that the About page says "work at Facebook".
Rust as a gateway drug to Haskell
91–100 of 218 posts
Re: Rust as a gateway drug to Haskell
#92The article references using trait objects for dynamic dispatch. FWIW, I found them extremely limited: you can't use generics, can't return Self... I wonder how often people use them.
What do you mean you can't return self? I'm just starting out with learning rust, but from what I've gathered you can use objects in a myriad of ways that will allow you do what you need. Instead of returning self, you could just pass a reference - you need to mutate self then just pass a mutable reference. Did I miss something here?
Returning a trait object instead of plain Self would work though.
Re: Rust as a gateway drug to Haskell
#93Earlier quoted context omitted.
Languages without HKT are horribly impractical for large codebases.
Yet there are not many large codebases in languages with HKT, and even those which are there (mainly big Scala projects) do not use HKT
Re: Rust as a gateway drug to Haskell
#94The similarities are striking. Both have a problem with undocumented or experimental modules for everyday tasks, both use compiler plugins to make sure that every package is using its own superset of the language (although in Rust this only applies to nightly), both tout lofty goals while rarely producing production grade systems. Rust is the first toe dip into the world of blog posts heralding the"coming of the age…
https://www.rust-lang.org/en-US/friends.html has been growing at a pretty hefty pace lately!
Re: Rust as a gateway drug to Haskell
#95Earlier quoted context omitted.
Haskell's laziness is an issue for you? Then how do strictness annotations (and/or module flags) not solve this problem? Haskell also has inline-C FFI support for "type safe" performance escape hatches (in the sense that you can manually bring C constructs into Haskell's type system): https://github.com/fpco/inline-c The only way that Haskell inescapably suffers from performance hits (that I'm aware of) is not in its…
It is also possible to avoid GC pauses causing problems in your application with a load balancer. Basically shifting load between haskell processes when a big GC is imminent. Read about that technique from Simon Marlow of Facebook's Haskell team. Of course it would be awesome to not have to worry about that.
Re: Rust as a gateway drug to Haskell
#96Something that I found about going from Haskell to Rust was that Rust provides many powerful abstractions without compromising on performance. It was very frustrating to try reasoning about performance in Haskell due to its laziness. Every language has quirks about how to write performant code, but Haskell is notorious in my mind for being quite easy to write obscenely slow code in.
Wasn't the selling point of laziness performance? "It only does what is needed!" I didn't use Haskell but Nix and at least there it seemed reasonable to "not do" everything.
I enjoy writing Haskell for small hobby projects, but I doubt I would choose it for real work now that F# and Rust exist.
Re: Rust as a gateway drug to Haskell
#97Haskell/GHC will soon have an extension for linear types, which will bring the languages much closer: http://blog.tweag.io/posts/2017-03-13-linear-types.html
Yeah right. If only the standard library (the base package) could immediately be converted to use linear types and we can all benefit from that! (Hint: it won't. Even the fairly no-brainer AMP and BBP took an absurdly long time. This is extremely slow by Rust standards. The Haskell community might, but the stewards of the standard libraries don't have the move-fast-and-break-things attitude.)
This is because, believe it or not, Haskell is actually used in the real world and people care about their code not becoming broken.
Re: Rust as a gateway drug to Haskell
#98Something that I found about going from Haskell to Rust was that Rust provides many powerful abstractions without compromising on performance. It was very frustrating to try reasoning about performance in Haskell due to its laziness. Every language has quirks about how to write performant code, but Haskell is notorious in my mind for being quite easy to write obscenely slow code in.
Re: Rust as a gateway drug to Haskell
#99Earlier quoted context omitted.
Swift works reasonably well on Linux. You can even run Swift on Windows 10 through Windows Subsystem for Linux.
I tried under Arch a few months ago and found swathes of the standard library didn't appear to work, is this something which has been fixed?
Re: Rust as a gateway drug to Haskell
#100Something that I found about going from Haskell to Rust was that Rust provides many powerful abstractions without compromising on performance. It was very frustrating to try reasoning about performance in Haskell due to its laziness. Every language has quirks about how to write performant code, but Haskell is notorious in my mind for being quite easy to write obscenely slow code in.
Comparing it against Rust doesn't really seem fair. If I wasn't using Haskell, I'd be writing Erlang, and last I checked GHC is much faster than Erlang/OTP. Certainly faster than CPython, Ruby, and most Node.js. Trying to compete with Rust or C++ performance in Haskell is certainly frustrating to reason about :)