Squeezing a sokoban game into 10 lines of Haskell

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • cant

    A programming argot

  • > figure out a way to do upward movement that doesn’t require annoying special casing. If you figure it out, don’t tell me since it means I’ll have to make more levels.

    Don't read this, then: https://github.com/darius/cant/blob/master/examples/games/20...

    As long as I'm commenting, here are some links to other console Sokobans I thought were fun (listed in the source code to mine). The sed one is nuts -- I had no idea it could do that: https://github.com/darius/cant/blob/master/examples/games/20...

  • tiny-games-hs

    Haskell Tiny Game Jam

  • I don't personally know of one. It's not that I particularly intended this to be obfuscated, either, I just wanted it to be short. OK, I did rearrange it to spell out a rick roll but the impact to readability on that point was probably minimal. I guess what I'm saying is that the obfuscation is a side effect of the minification (side effects, in Haskell??).

    The best I know of are some tools people developed for the tiny game jam to help you minify your code, which you can find here https://github.com/haskell-game/tiny-games-hs#minifying.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • jellylanguage

    Jelly is a recreational programming language inspired by J.

  • At least on the Code Golf Stack Exchange, I see a lot of people using esolangs for golfing (two random examples: Jelly [1] and O5AB1E [2]). I expect that it could be a line or two shorter at least with a change of language. As I recall some of the golfing langs also have pretty sophisticated compression techniques for strings, although they might be optimized for dictionary words. Careful distinction: they are all optimizing for bytes used, not characters used.

    I don't want to neglect your shameless plug, but I struggle enough to find a solution to some of the puzzles I wrote (hence the undo), so finding the shortest path is a little daunting.

    [1] https://github.com/DennisMitchell/jellylanguage

    [2] https://github.com/Adriandmen/05AB1E

  • 05AB1E

    A concise stack-based golfing language

  • At least on the Code Golf Stack Exchange, I see a lot of people using esolangs for golfing (two random examples: Jelly [1] and O5AB1E [2]). I expect that it could be a line or two shorter at least with a change of language. As I recall some of the golfing langs also have pretty sophisticated compression techniques for strings, although they might be optimized for dictionary words. Careful distinction: they are all optimizing for bytes used, not characters used.

    I don't want to neglect your shameless plug, but I struggle enough to find a solution to some of the puzzles I wrote (hence the undo), so finding the shortest path is a little daunting.

    [1] https://github.com/DennisMitchell/jellylanguage

    [2] https://github.com/Adriandmen/05AB1E

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts