Noughtmare

joined 6 months ago
6
submitted 8 hours ago by Noughtmare to c/haskell
 

I stumbled over Bart de Goede’s article on building a full-text search engine in 150 lines of Python, and was reminded of my quest to show how useful Haskell is for solving real-world problems. Python is an eminently practical language, so nobody is surprised this can be done in Python. But Haskell? The Python code spends a lot of time updating mutable dictionaries. Surely we cannot easily port this code over to Haskell.

Let’s find out.

[–] Noughtmare 2 points 2 weeks ago* (last edited 2 weeks ago)

I'm confused. It does go straight to the discourse post when I click it.

8
GHC 9.6.7 is now available (discourse.haskell.org)
submitted 2 weeks ago by Noughtmare to c/haskell
5
[ANN] GHCup 0.1.50.0 released (discourse.haskell.org)
submitted 2 weeks ago by Noughtmare to c/haskell
3
submitted 3 weeks ago by Noughtmare to c/haskell
5
GHC 9.12.2 is now available (discourse.haskell.org)
submitted 3 weeks ago by Noughtmare to c/haskell
[–] Noughtmare 5 points 1 month ago

You can choose a custom donation and make most of your money go to the EFF. Then the top tier is just like a €24 donation to the EFF and you only really "pay" €10.30 for the actual books.

[–] Noughtmare 3 points 1 month ago

Een belangrijke overweging van mij is dat de partij groot genoeg is om echt het verschil te maken. Daarom ben ik recent lid geworden van Groenlinks. Ik denk dat Groenlinks-PvdA de enige fractie is die groot genoeg en ook duidelijk pro-europa is.

[–] Noughtmare 1 points 1 month ago

Or anywhere in the EU. And I don't think the USA is more lenient on piracy. But perhaps they are if a big company is the one doing it.

[–] Noughtmare 17 points 1 month ago (2 children)
[–] Noughtmare 2 points 4 months ago

Why? They immediately explain that the difference in performance would not be significant on such a small problem and I see no other reason to prefer arrays over maps.

[–] Noughtmare 1 points 5 months ago

Thanks, I did look at the Wikipedia page, but the Applications section is pretty difficult to read. The applications it lists are themselves quite abstract problems.

[–] Noughtmare 1 points 5 months ago

Also, I think the 'find' operation could be replaced by an operation that checks if two elements are in the same set. That way you don't have to come up with a "name".

[–] Noughtmare 1 points 5 months ago (2 children)

One thing I'm missing is which problems this technique can solve. I believe one important use case is in type inference. Are there many other problems that can be solved by union-find?

view more: next ›