XIO

xWire

Posts from every feed QUEST has found across the web — blogs, news, podcasts, channels and more.

Haskell Community - Latest posts

Latest posts

How to refactor this code combining IO and Either?

stevechy: If a library exports a transformer (including mtl) interface then you have to use that, if it exports an effect system interface then you have to use that. … If you are a library developer and you want a lot of people to be able to pick up and use your library quickly the best external interface for code with side effects is plain IO even if you use an effect system internally. Agreed. For code that needs an API key or something and might fail, that’s usually AnyRequiredContext ->…

Controversy surrounding Anduril Industries

Even when I was on the board, there was discussion about whether to take money from defense companies like Anduril. I will state that since I’m not with the HF anymore, I support the decision. The problem with the HF was never the influence of the companies on our technical position - defense companies can be quite good at offering real world industrial expereince reports and advice in terms of direction, as long as the board is taking them with a grain of salt and has a sufficiently mature…

Controversy surrounding Anduril Industries

Two notes on this: Board members represent themselves and the whole community, not their employers. Payward (my employer) is no more represented by the Haskell Foundation than any other business; No current Board member is employed by Anduril, although at least one Board member used to be employed there. Anduril is a touchy topic, so the HF Board has been careful in the past about including someone directly employed at Anduril. When Travis applied, he let us know his tenure had closed.

How to refactor this code combining IO and Either?

Ah yes, that’s true. StateT and ExceptT “are their own interpretation”, in a sense, so they don’t suffer any performance consequences, rather the problem is that the interpretation is fixed. On the other hand, some other transformers like FreeT/Stream/Conduit do need to be interpreted and then you have a very similar “bind not statically known” problem.

Haskell app for building DJ sets/playlists and providing "next track" recommendation

harryprayiv: partygoers can select tracks and vote on selected tracks Right, didn’t think about it but yep, the idea could also apply to other general “playlist related” stuff (not necessarily DJs) - online radios etc. harryprayiv: (perhaps vetoing tracks that are annoying). Yep, that’s something I was thinking about bud forgot to implement Like you could be playing track A and realize that going from that to track B is really horrible, Then you could assign a very high cost to “A → B” so…

What’s needed to bootstrap GHC with hugs?

(Oh the joys of working in a language lacking a formal definition of its semantics, and with destructive update and side-effects! It turns out different gcc’s had different opinions of that patch. Thank you again to Andrea for patching the patch.) So I now have my version of Hugs supporting Pattern Guards. H2010 compliant yay! AntC2: the error context will be difficult for the human reader to relate back to source lines. Indeed the error reporting is a little less friendly than Hugs’ usual. The…

Haskell Interlude 88: Tom Schrijvers

In this Haskell Interlude, we sat down with Tom Schrijvers, the head of the Functional Programming team at KU Leuven. He has been a prolific contributor to the foundations of Haskell, with many papers pushing the boundaries of the Haskell type system, programming with effects, and applications of functional programming. Our conversation was a whirlwind tour through Tom’s long and wide publication history, with lots of tangents and ideas about functional programming, logic programming,…

STG case compilation

In my implementation of the STG, I handled this by pushing the free-variable references required for the caseAlt onto the stack, and keeping track of the current continuation stack depth at compile time. The continuation closures holding the free-variable references are appended on the stack, rather than being popped into local registers/memory each time a continuation is entered. When a tail-call (without a continuation) or a return is compiled, the stack is first popped by the tracked static…

Totality-checking for Haskell?

Ahh it might well be! I haven’t yet tried reaching for it, as my understanding is that it’s more focused on refinement types and formal verification, and it requires an external SMT solver and supports only one GHC version at a time. I guess I had in mind something lighter and focused just on totality checking? I will take a closer look either way, at the very least to get a better understanding of how intertwined their termination checking is with their approach to refinement types, thanks.

Totality-checking for Haskell?

Is anyone working on (or interested in) opt-in totality checking for Haskell? I’d love to be able to mark a function or module and have GHC guarantee it never hits bottom: no partial matches, no error/undefined, and no non-termination (perhaps with some notion of productivity for lazy/infinite data?). It feels like a natural extension of the purity philosophy, treating partiality as an effect to be tracked rather than something always implicitly allowed? I’ve enjoyed Idris’ totality checking,…

A Haskell processor running on an FPGA

Thanks for asking. You are definitely right that I should talk about Reduceron and Heron, especially when Heron is also developed in HAFLANG We can ignore the difference in source language (Haskell vs. Flite; Ouros supports Haskell through piggybacking MicroHs). There are some subtle differences in graph reduction: Reduceron & Heron use template instantiation, when applying a function, they tend to create the whole function body in one go; Ouros is combinator-based, this process is lazier, the…

A Haskell processor running on an FPGA

Hi all, I’ve been working on a specialised processor for Haskell called Ouros as part of my PhD study (see the HAFLANG project). Recently, I got it running on an FPGA, with a Haskell program communicating with the outside world through UART. Ouros is a graph reduction processor with automatic fine-grained threading and garbage collection implemented in hardware. For this demo, I added a simple IO interface based on AXI4-Lite, so Haskell programs can perform IO directly without a software…

Haskell app for building DJ sets/playlists and providing "next track" recommendation

I’m currently iterating on a nix provisioned replacement for my Moode player which ran on a Pi5 and this is just what I was looking for. I’m beginning the process of building a party mode where partygoers can select tracks and vote on selected tracks (perhaps vetoing tracks that are annoying). This might be a cool addition to the stack to enable suggestions that maintain the flow of the playlist. Very cool! Thanks for sharing. Right now, my web front end runs on Purescript but I’ve gotten…

Stepping into arbitrary monads from a REPL

GHCi always runs statements in IO. I wanted to step into StateT, ReaderT or an app monad, work there for a while, and step back out. So I made a small proof of concept. https://raw.githubusercontent.com/bglgwyng/haskell-playground/refs/heads/repl/assets/demo.mp4 :e runner takes any runner :: n () -> m (), infers n with a typed hole, and opens a nested REPL inside n. :q steps back out. Code: haskell-playground/exe/playground.hs at repl · bglgwyng/haskell-playground · GitHub Related: GHC #9966…

Does writing in a "beautiful" programming language still matter in the age of AI?

Liamzy: The core point, however, is that as long as you have humans in the loop, you need artifacts that humans can inspect, read, and understand, and Haskell is reasonably good for this niche. Yes, I believe that’s the only way to market Haskell right now. Not by competing with languages that have the fastest AI loop, the most training data or are much lower level. I also think that the future for the growing no-reviews camp (which is growing) are safe low level languages. More low-level and…

How to refactor this code combining IO and Either?

Since the discussion is ongoing I’d like to add my take. Unfortunately it will be a half reply/half brain dump since I can’t think of a better way to format it. I think that generally a Haskell programmer has to eventually learn how all the major styles work to navigate the ecosystem. EDIT: Removed unhelpful sentence here that had a bad tone. If a library exports a transformer (including mtl) interface then you have to use that, if it exports an effect system interface then you have to use…

How to refactor this code combining IO and Either?

tomjaguarpaw: This is what transformers are, [..] One problem with this approach is that it is slow. Alexis King explained why in Effects for Less. Transformers are not the right example. Alexis King’s talk is about when the monadic bind function is not statically known (or more precisely when it builds a tree of constructors or closures). Many transformers like your ExceptT and StateT examples do not do that. The problematic thing is using MTL-style polymorphism (e.g., MonadFoo m => m ()), or…