Re:Simon Peyton Jones – Haskell is useless [video]
by daxfohl on Sunday February 18, 2024 @05:31PM
(#39424161)
I still wonder why Haskell sans IO isn't a thing. Seems like it would be a really great way to define/implement rules for a rules engine that supported it. I guess you'd still have to worry about OOM or CPU thrashing, but in general it seems like it would be a very expressive language offering a secure sandbox and guaranteeing functional purity for such tasks.
[ Parent
| on HN ]
Re:Simon Peyton Jones – Haskell is useless [video]
by wubrr on Sunday February 18, 2024 @09:32PM
(#39425664)
> I still wonder why Haskell sans IO isn't a thing
Isn't that just Haskell without the use of IO... ? Which is already a thing...
Re:Simon Peyton Jones – Haskell is useless [video]
by nextos on Sunday February 18, 2024 @08:46PM
(#39425415)
Simple Haskell could be a thing, there have been some efforts in the community but none really crystalized. Frankly, I don't think the problem is so much difficult I/O, but rather too many language extensions, competing toolchains, and some missing libraries.
Re:Simon Peyton Jones – Haskell is useless [video]
by actionfromafar on Sunday February 18, 2024 @05:58PM
(#39424395)
At some point you would need to see the results of the rules applied, thus, you'd need IO.
Re:Simon Peyton Jones – Haskell is useless [video]
by curryhoward on Sunday February 18, 2024 @08:22PM
(#39425270)
The suggestion is to use pure Haskell for the rules DSL only. The surrounding system that applies any side effects would presumably not be written in that language.
It's a good idea, and Facebook actually does something like this for their spam filtering rules: https://engineering.fb.com/2015/06/26/security/fighting-spam...
Re:Simon Peyton Jones – Haskell is useless [video]
by daxfohl on Sunday February 18, 2024 @09:46PM
(#39425752)
Looks like it has become abandonware, or at least the component they open sourced. Oh well, such is life in the Haskell ecosystem. https://github.com/facebook/Haxl
Re:Simon Peyton Jones – Haskell is useless [video]
by HackerThemAll on Monday February 19, 2024 @04:34AM
(#39427729)
> great way to define/implement rules for a rules engine
There are more ways to implement rule engines and rules than to learn Haskell. One of them could be to use Prolog.
Re:Simon Peyton Jones – Haskell is useless [video]
by daxfohl on Tuesday February 20, 2024 @12:31PM
(#39444105)
Haha, that's exactly what I'm trying to avoid. We're looking at adopting openpolicyagent. Which frankly, a modern JSON-oriented datalog may be ideal. But this whole time I keep thinking, this would be so much easier in Haskell. Granted, the rest of my team would probably find it equally confusing. Maybe even moreso? IDK, it'd be an interesting experiment. If such a thing as Haskell-based policy agent existed.