Tech · futhark-lang.org
Futhark by Example
Compiled by KHAO Editorial — aggregated from 1 source + 1 reference discovered via search. See llms.txt for citation guidance.
◌ Single Source
Literate Futhark allows direct use of gnuplot.
Key facts
- Ray Tracing in One Weekend in Futhark and Ray Tracing: the Next Week in Futhark are implementations based on Peter Shirley's book series
- For a conventional introduction to the language, Parallel Programming in Futhark may be a better choice
- Diving Beet is a falling sand game, which is a kind of simple particle simulator toy
- Neptune is an implementation of the Poseidon hash function tuned for Filecoin, where the GPU parts have been implemented in Futhark
Summary
The following is a hands-on introduction to Futhark through a collection of commented programs, listed in roughly increasing order of complexity. For a conventional introduction to the language, Parallel Programming in Futhark may be a better choice. Some of the example programs use directives for plotting or rendering graphics. The following examples are ported from Dex, a dependently typed functional array language that uses a somewhat different approach to describing loop processing. Most written Futhark code is probably still Futhark’s own test and benchmark suites. Diving Beet is a falling sand game, which is a kind of simple particle simulator toy.