what it does

ekitai is a simple fluid simulator based on the command line. it takes in a text file and runs a fluid simulation.

how it was build

it's written in haskell. the library used to render it onto the terminal is called haskell-brick.

challenges

at first, i attempted to use the haskell package manager stack, but there were many issues with dependencies clashing with my local installed haskell libs. in the end, i settled using the libraries my distro provides. compiling the project so that it static links also took a bit of time.

also, doing a project like this in a functional language was quite new to me, and i had to adjust my understanding of things like physics steps and i/o.

learned

haskell is a pretty cool language

what's next

due to the hurdle of learning haskell, i went with a very basic algorithm for simulating fluids. the obvious next step would be implement a more sophisticated method, like the one here. one other feature that i haven't implemented was the option to read from stdin instead of just providing the file as a command line arg. this way, you can do some fun things like piping the output of figlet into ekitai and running the simulation.

trying it out

ekitai is a linux command line tool, so you need to either be running linux or wsl or something of that sort. packages are available for deb based distros (deb, ubuntu, mint etc) as well as arch based distros (arch, manjaro, artix etc). following the instructions on the github page for specifics.

Built With

  • haskell
  • haskell-brick
Share this project:

Updates