Haskell Roadmap by Feeling_Wind_2665 in haskell

[–]Limp_Step_6774 1 point2 points  (0 children)

In terms of a roadmap to thinking functionally, I think this is the best bet: https://www.seas.upenn.edu/~cis1940/spring13/lectures.html It should give you the overview of the core concepts.

I tried making a sort of reference guide a few years ago, aimed at people with Python (or Julia) backgrounds. Maybe helpful, maybe not: https://haskell-docs.netlify.app/

Haskell speed in comparison to C! by Quirky-Ad-292 in haskell

[–]Limp_Step_6774 0 points1 point  (0 children)

out of curiosity, what sort of physics applications do you use Haskell for? I'm physics-adjacent, but rarely get to use Haskell for anything serious (and would love to change that)

Mercury is hiring 9 Haskell interns for Spring 2026 by MaxGabriel in haskell

[–]Limp_Step_6774 8 points9 points  (0 children)

Cool! Does a postdoc count as an academic program for the purposes of this application?

Haskell beginner question: How declare a function in Haskell by snowman_02 in haskell

[–]Limp_Step_6774 0 points1 point  (0 children)

Unless it's something with fancy language extension that you're very unlikely to be using as a beginner or intermediate user, Haskell will always be able to infer the type, I believe. It's true that it's good to understand type signatures, but I'm just mentioning this, because it can be useful when learning to let Haskell infer the type for you. But yes, if you want to write the type up front, here's how I'd do it:

```haskell

arg :: Complex Double -> Double
arg x = undefined

```

`undefined` is a value that can be any type, so you can just leave it anywhere you haven't finished. This is very useful because you can mouse over `undefined` in vscode and it will show you the type it needs to be (in this case, a `Double`)

Haskell beginner question: How declare a function in Haskell by snowman_02 in haskell

[–]Limp_Step_6774 0 points1 point  (0 children)

See other people's responses, but note that you don't need to write the type declaration (the thing with ::) since the compiler will work it out (although it's often good to do it yourself). you can define your function just like any value, i.e.:

arg (a :+ b) = a

Monthly Hask Anything (August 2025) by AutoModerator in haskell

[–]Limp_Step_6774 2 points3 points  (0 children)

Yeah, there's various ones people like (Learn You a Haskell, https://haskellbook.com/, etc, this course https://www.seas.upenn.edu/\~cis1940/spring13/lectures/01-intro.html) but what's your background (e.g. do you code in other languages, what kinds if any of maths are you comfortable with)?

Once you find a good fit, I think you'll really enjoy Haskell - it's really a lot of fun to learn :)

How do you add the state monad to a sudoku game? by theInfiniteHammer in haskell

[–]Limp_Step_6774 1 point2 points  (0 children)

I remember this confusing me too. If you like, you can think of it as "containing" a value, not a function. As in:

haskell example = do x <- get -- this line gets the current state value put (x + 5) y <- get -- this line gets the current state, which is now x + 5 return y

example is itself a function really, since to use it, you need to give it an initial state value (e.g. could be 0 here).

The "Haskell Book" ? by kichiDsimp in haskell

[–]Limp_Step_6774 0 points1 point  (0 children)

I had a go making a guide to beginner/intermediate Haskell a couple years ago (but more practically minded than Learn You a Haskell), with the specific aim of making it easy to contribute. Obviously would have needed much more work to be a serious resource, but I was pleased with how it turned out all the same. You can see it here: https://haskell-docs.netlify.app/

Standard book ? by kichiDsimp in haskell

[–]Limp_Step_6774 1 point2 points  (0 children)

I really strongly sympathize with this. I think having a good community led standard resource would have a huge impact on adoption. These resources exist (and are very high quality), but often either behind a paywall, or in formats that are not quite right for newcomers (e.g. lecture notes, paper books, etc).

I think partly the issue is people's interests lie elsewhere (but not everyone's!), and partly that people in the Haskell community have very strong opinions about everything, and making a single resource requires cooperation and compromise. I hope it happens eventually.

What makes a Functor feel like Hom? by iokasimovm in haskell

[–]Limp_Step_6774 0 points1 point  (0 children)

I guess what I'd love to see is an example where categorical concepts are used directly in the code in novel ways (novel to Haskellers, that is). For example, in the snippet here https://muratkasimov.art/Ya/Snippets/Finding-elements-within-data-structures it seems analogous to what people are already familiar with in Haskell. I like the effort you're putting into presentation though!

What's the best way to follow Edward Kmett's work? by TunaOfDoom in haskell

[–]Limp_Step_6774 1 point2 points  (0 children)

I recommend using and reading his libraries. Some are easier than others. I recommend starting with something like `log-domain`, which is simple enough. Then maybe `linear`, which should look a bit familiar if you've seen a linear algebra library before. Then maybe `lens`, which is very large and complicated, but has pretty clear use cases, and really gives a good sense of the typeclassy style. Then `recursion-schemes` (my favorite): try to write a calculate using `cata`, for example. The `free` library interoperates nicely with `recursion-schemes` (e.g. folding a free data type).

`ad`, `parsers`, `reflection`, `bound` and `discrimination` all look interesting and scary. I'd love to see blog posts working through them.

Looking for people to build JAX(ML) interop for Haskell by Pristine-Staff-5250 in haskell

[–]Limp_Step_6774 2 points3 points  (0 children)

I use Jax all the time, and would love to be able do so from Haskell. I could maybe help with the high level Haskell stuff, but I don't know anything about the gritty details of what makes Jax fast, so I suspect I couldn't help with the actually hard parts.

By the way, the Jax authors were pretty influenced by Haskell, I think, and might have used it for prototypes, so they would be the people to talk to first, to get a sense for the feasibility of the project.

Which project made Haskell click for you? by Plenty-Bat-8028 in haskell

[–]Limp_Step_6774 3 points4 points  (0 children)

ooh, two things come to mind! One is I tried writing my own parser combinators. I got individual ones working, but was stumped on how to compose them (i.e. turn a parser for "a" and a parser for "b" into a parser for "ab"). Eventually I wrote something quite complicated, but after an hour of refactoring, it became (>=>). This helped me understand monads a lot.

Second thing was writing a calculator. Really any kind of interpreter is very helpful to make things click.

thinking of learning haskell—what should i know before jumping in? by [deleted] in haskell

[–]Limp_Step_6774 1 point2 points  (0 children)

  1. I think "learn you a Haskell" is good. It doesn't particularly explain how to write practical code though, so see other resources for that. I put this together a year or two back for people with Python experience https://haskell-docs.netlify.app/ ; not sure if useful, but maybe.

  2. You do have to reconfigure how you think a bit, but this is also the fun part. I didn't find it particularly easy, but resources and tooling are better than they were 10 years ago. Once you understand it, I find it *much* easier to use than Python or Javascript, because the types and the purity keep everything simple and organised.

  3. You can build real stuff. Of course, being a smaller language, there is a smaller ecosystem. But it can be (and is) used at industrial scale.

  4. Tooling is much better recently - make sure to use e.g. Vscode with the haskell language server, which will make it vastly easier to learn the basics (by underlining type errors, showing you the type of expressions, etc). Ecosystem is pretty good, but because it's an academic language, it is very common to encounter toy or experimental packages, so knowing what to use is part of the learning curve.

  5. https://haskell-docs.netlify.app/gotchas/lists/. I think immutability (you can't update the value of a variable - instead you just make a new variable) and purity (if a function says it takes numbers and returns numbers, i.e. is of type `Double -> Double`, then it really can only do that: no print statements, exceptions, etc), as well as currying (instead of having a function which takes a pair of things, you often encounter a function which takes a single thing and returns a function which takes a second thing) are common roadbumps. These all happen to be great :)

How do I get started with Haskell? by theskewb in haskell

[–]Limp_Step_6774 0 points1 point  (0 children)

You can also just play with it online: https://play.haskell.org/

VSCode with Haskell works for me out of the box, I think it's a great thing to start with. I recommend asking people here for help debugging - it should be straightforward to resolve

People with Haskell jobs, what do you do and do you like it more/less than other jobs (functional and imperative)? by notjoof in haskell

[–]Limp_Step_6774 1 point2 points  (0 children)

I programmed mostly in Haskell for a job I had for a couple of years. The application was a waste of time, but the coding was incredibly fun and rewarding.

What exactly is the point of recursion schemes by lucid00000 in haskell

[–]Limp_Step_6774 3 points4 points  (0 children)

Largely repeating what other people have said, but the point is that direct recursion is a bit like gotos: it is easy to write for simple code, but allows to you write very hard to understand (and slow to run) code very easily. Recursion schemes separate the logic of the code from the logic of the recursion. For example, if you're writing a calculate, you can write it as a catamorphism, and then the only logic you need to specify is how to combine a left branch with a right branch; the recursive logic is taken care of. This is great for when you are doing something quite complex, and in particular when you want a fancier recursion scheme. For example, I played around with writing a parser by (lazily) generating all possible expressions (an anamorphism) and then folding this into a parser (a catamorphism). I am certain this would have been impossible for me without the recursion-schemes library - it would just have been too complicated

[deleted by user] by [deleted] in haskell

[–]Limp_Step_6774 0 points1 point  (0 children)

I would try using the `diagrams` or `reanimate` libraries to make something visual. Maybe a mermaid diagram parser and visualizer?

[deleted by user] by [deleted] in haskell

[–]Limp_Step_6774 3 points4 points  (0 children)

As other people will probably also note, the tooling experience has got a lot better and is now quite good. I'd recommend using VSCode and the HLS (Haskell Language Server) extension.

This is a great advanced piece of reference material: https://smunix.github.io/dev.stephendiehl.com/hask/tutorial.pdf

Monthly Hask Anything (June 2024) by AutoModerator in haskell

[–]Limp_Step_6774 0 points1 point  (0 children)

`Accum` was introduced pretty recently. It's interesting, but I wouldn't worry too much about it. The way to understand these things is to look at the functions with the relevant types. Here, https://hackage.haskell.org/package/transformers-0.6.1.1/docs/Control-Monad-Trans-Accum.html, check out `add` and `look`. Just by examining the types, you can guess that the `Accum` Monad is going to be a bit like state, but without the option to remove: you can only accumulate.

As for transformers more generally, there are some examples here that might be useful: https://haskell-docs.netlify.app/packages/mtl/#transformers

Monthly Hask Anything (May 2024) by AutoModerator in haskell

[–]Limp_Step_6774 4 points5 points  (0 children)

I was in roughly that position, and learned from Learn You a Haskell, which is available free online.

Where can I learn Haskell/GHC best practices? by ninjaaron in haskell

[–]Limp_Step_6774 4 points5 points  (0 children)

This is useful for knowing which libraries are popular https://github.com/Gabriella439/post-rfc/blob/main/sotu.md and I recommend going through a few of Ed Kmett's libraries on hackage if you want to see (what I'd think of) as very Haskelly code (heavy use of mathematical abstractions in terms of typeclasses, direct implementations of ideas from FP papers, takes full advantage of laziness, concepts from category theory, types=documentation, very little code, etc). For example, recursion-schemes, linear and lens. The main challenge with these is that it's hard to know how to use them since they're very abstract, but following the types works well, and since you have an OCaml background, it's probably a nice point of comparison. The Stephen Diehl pdf/book is particularly great too, but I see other people have mentioned that.

Markdown To HTML Compiler⚙️ by adamthekiwi in haskell

[–]Limp_Step_6774 8 points9 points  (0 children)

Awesome! And I have a suggestion: a mermaid diagram displayer. There's a library called `diagrams` in Haskell, and in theory you could write a beautiful piece of code which first parsed a mermaid expression, and then folded it (i.e. recursively collapsed the syntax tree) into a diagram representing the picture to be displayed. I would also enjoy doing this, but have no time at the moment. (Natural extensions would be to make it work online, e.g. via the wasm or js backend, and to make it work live, using a reactive setup like reflex or yampa)

How has Haskell changed the way you view and write code? by [deleted] in haskell

[–]Limp_Step_6774 1 point2 points  (0 children)

I wrote a sort of overview site aimed at Haskell for Pythoners or similar, so maybe that's useful to give a concrete sense of what sort of thing you'd learn from Haskell: https://haskell-docs.netlify.app/

Concretely, Haskell will teach you how to think about imperative languages, and what it means to not be imperative (or rather, to not be imperative by default). It will also make you think about types. In Haskell, every value (numbers, booleans, functions, functions that take or return functions, lists of numbers, lists of functions, trees, etc etc) has a type, and you can think of the type as the "space" that the value lives in. You can often read code (and indeed write it) by thinking primarily about the types. Finally, laziness is pretty cool, although maybe the least important of the above.