7 ms·
Calling Purgatory from Heaven: Binding to Rust in Haskell
- fithisux 4y agoThe best title ever in HN.
- bradwood 4y agoYeah. But which one is heaven?!
- worrycue 4y agoClearly Haskell since you are binding to Rust in Haskell.
- carlmr 4y agoCalling Rust purgatory on HN and getting away with it. What a time to be alive. Although i guess that makes C++ hell, which is appropriate.
- bradwood 4y agoI'll take Rust over Haskell all day long. Even though Haskell does rock.
- 1attice 4y agoThis is because you keep state. You are fallen.
- danielheath 4y ago“Church vs state”, an century-old conflict.
- eurasiantiger 4y agoStart hopping on rails, enjoy life and see everything going by for the circus it is
- codetrotter 4y ago> Start hopping on rails, enjoy life and see everything going by for the circus it is I thought this might be a quote from the movie Trainspotting (1996). Seems to have a similar spirit to some of the things from that movie.
- deleted 4y ago[deleted]
- ARandomerDude 4y agoI made a lot of money off of Rails but finally switched to Clojure because of the gem pain. So many gems are C or system wrappers and require very specific versions of Ruby and whatever underlying libraries are called. That's fine on brand new dev projects, but it leads to a lot of unexpected web searches when it's time to ship code or return to a project you haven't touched in 6 months. Pinning your gems helps with some of this but every time it popped up I thought ugh...here we go again. Eventually that pain made me look for a better way. One of the oft-undersold features of Clojure is the culture is more careful with breaking changes.
- cultofmetatron 4y agojump to elixir. enjoy life and get great runtime perf too!
- ekidd 4y ago> This is because you keep state. You are fallen. The Rust philosophy is that there is nothing wrong with mutating state, as long as nobody can ever see you do it. :-)
- Gordonjcp 4y agoI don't really get what's so good about Haskell.
- ParetoOptimal 4y agolocal reasoning everywhere via lazy evaluation. Principled abstractions enabling unparalleled composition. Usable effects libraries like effectful. Easy concurrency and parallelism. Fearless refactoring. stm.
- kreetx 4y agoI wouldn't plug effectful here - MTL and few others are usable as well, or not using an effect library at all.
- ParetoOptimal 4y agoI'm unconvinced that suboptimal versions of Haskell such as mtl with it's n+1 instances or very strict interpretations of simple Haskell have the ability to meaningfully move the popularity needle of Haskell forward. With that view it makes since to highlight either "Haskell v2", my ideal flavor of Haskell without reservation, or some mix of the two. There's a time I wouldn't have mentioned effectul for exactly the reasons you allude to, but... I suppose I along with reasons cited, I no longer care that much in a way.
- kreetx 4y agoAlready ADTs do it for me when comparing to other popular languages :)
- didroe 4y ago> local reasoning everywhere via lazy evaluation Doesn't lazy evaluation mean memory/complexity issues could manifest far away from the problematic code?
- 4y ago
- swexbe 4y agoAs always, depends on what you're writing :)
- Ygg2 4y agoWhat is assembly then?
- baq 4y agoThat’s what both heaven and hell are actually written in by a dude in pajamas.
- biomcgary 4y agoObligatory XKCD: https://xkcd.com/378/ https://xkcd.com/378/
- 1attice 4y ago"The Earth was without form and void and darkness was upon the face of the deep"
- actionfromafar 4y ago"The Earth was without form and void and darkness was upon the face of the heep"
- 1attice 4y agoI'm torn between appreciating your wit and lamenting my own missed opportunity :P Beautifully done.
- lionkor 4y agoBased
- codetrotter 4y agoBased in facts? Based in fiction? No, just based.
- quickthrower2 4y ago
- Yoric 4y agoWell, given that this is clearly intended as a followup to https://dl.acm.org/doi/pdf/10.1145/317765.317790 https://dl.acm.org/doi/pdf/10.1145/317765.317790, It'd be surprising if Heaven didn't mean Haskell.
- davidgl 4y agoHaskell and COM, hilarious
- pyrale 4y ago> In this blog post, we will consider how to call functions written in Rust instead: not quite hell, but not quite heaven either.
- platz 4y agoIs it just me or was the high-water mark for interest in Haskell & FP in general around 2016-2017 ? There was lots of discussion & debate around static vs dynamic, clojure vs haskell, oop vs fp, new languages vs established languages, conferences devoted to FP ideas, etc... The whole debate ecosystem seems to have subsided around when rust really started taking mindshare. Now, I'm not implying here rust absolves these issues at all. It's just a co-occuring event on the timeline imho. Although, I think it's probably obvious that devs who have free time use their attention on whats trendy. Rust probably took some wind out of the sails of haskell, but I'm not sure what trendy is moving to these days, maybe AI, but do devs really program against large AI models or just play around with chatgpt; if not, what are they interested in with regards to tools that materially affect their career? What happened to all the debate about langs? What happened to interest (measured in frequency of online discussion) in FP? Is Rust still trendy in dev mindshare? Are these debates over/resolved?
- argiopetech 4y agoDo trends matter? At the end of the day, software is interesting for it's own sake, but not useful. If the goal is to create useful tools (i.e, a custom hammer for your particular nail), does it matter what language is used in their creation? I was writing Haskell in 2011. I'm writing Haskell now. I'll keep writing Haskell until I find something I like better. I also write C++, Python, R, and a dozen other languages when the mood or the need strikes. Some of my favorite bits of software are written in Delphi or poorly hacked together C. They're closer to rocks than Estwings, but they do the job (and have done since the '90s). There will always be trends. There will always be floods. Floods can take you interesting places, but having a well-sheltered hole or a firm grip on something solid is probably the better long-term solution if survivability is the goal. In the end, COBOL devs are worth more than ever.
- entropicdrifter 4y agoTrends are the tides of culture, and I'd argue that culture matters overall. If you're using a lang/toolset that's widely out of fashion and also isn't widely used by slower moving institutions, you're the cultural equivalent of a monk in a mountainside monastery copying down texts for future generations: your work may hold cultural influence down the line, but for your lifetime, you're gonna be largely isolated and unappreciated unless you happen to get extremely lucky.
- otikik 4y agoTo me Haskell looks more like “The Good Place” (season 1) If this was calling Rust from Lisp, on the other hand…
- qbrass 4y agoLisp has already walked the 8th circle of hell to write the first Malbolge program. Calling a C stub written in Rust using Lisp's C FFI is just your average Tuesday in comparison.
- JonChesterfield 4y agoImplementing scheme or lisp in rust is probably a path to zero cost data movement between the two. Write the garbage collector in the abstractions rust understands, use roughly the same data types on both sides. That might be worth having. edit: and there are lots, already, where for each one it is difficult to tell where it lies on the spectrum from vapourware to production
- cultofmetatron 4y agoa common lisp implementation in rust wold have potential to be quite the contender to sbcl
- remexre 4y agoWhy? I don't think of SBCL's problems as being particularly related to the language it's implemented in, but a lot more related to the complexity of making an optimizing non-JIT compiler for a language as complex as CL.
- cultofmetatron 4y agothe codebase is old and in c. a rust version gives new rust devs a chance to cut their teeth on building a lisp and learning about lisp as well. plus we could get a interop with crates. imagine if cl code could call rust crates for instance.
- 4y ago