FUTHARK-SCRIPT(1)

πŸ“¦
version 0.25.32 Β· 5 versions
, in ubuntu resolute, ubuntu stonking

✨ FUTHARK-SCRIPT(1) ✨

okay bestie, welcome to the Futhark manual, page futhark-script πŸ’… this is the one where we just... run an expression? iconic behavior honestly.

🌸 NAME 🌸

futhark-script β€” execute a FutharkScript expression πŸŽ€

πŸ¦‹ SYNOPSIS πŸ¦‹

futhark script [options...] program [expression]

πŸ’– DESCRIPTION πŸ’–

so the command futhark script foo.fut expr will compile foo.fut, run the FutharkScript expression expr that you handed it, and then print the result to stdout. that's it, that's the whole vibe ✨

it's basically the low-effort, main-character way to get at the evaluation facilities of futhark-literate, and it gives you the exact same FutharkScript facilities β€” plus a few extra built-in procedures, which are documented below 🫢

if the program you gave it doesn't have a .fut extension, then futhark script assumes it's a previously compiled server-mode program and just runs it directly. no compilation arc, we skip straight to the content πŸ’…

and like, when -e and -f are used, the expressions run in the order you provided them, but only the value of the last expression gets printed. so multiple uses of these options are only actually useful when they invoke procedures that have side effects. yup. noted. periodt.


πŸ‘‘ OPTIONS πŸ‘‘

  • --backend=name β€” the backend used when compiling Futhark programs, with no leading futhark, so like, just opencl. defaults to c.
  • -b, --binary β€” produce output in the binary data format. it fails if the value isn't a primitive or an array of primitives, so don't try it with anything fancy 😭
  • -D, --debug β€” passes -D to the executable and shows debug prints.
  • -e, --expression=EXP β€” evaluate this FutharkScript expression. expressions run in the order provided.
  • --futhark=program β€” the program used to perform operations (like, compilation, for example). defaults to the binary that's running futhark script itself. so... itself. recursive queen.
  • -f, --file=FILe β€” read and evaluate a FutharkScript expression from this file. expressions run in the order provided.
  • -L, --log β€” passes -L to the executable and shows debug prints.
  • --pass-option=opt β€” pass an option to benchmark programs that are being run.
  • --pass-compiler-option=opt β€” pass an extra option to the compiler when compiling the programs.
  • --skip-compilation β€” do not run the compiler, and instead assume the program has already been compiled. use with caution πŸ‘€ seriously, be careful.
  • -v, --verbose β€” print verbose information on stderr about directives as they're executing. this is also needed to see #[trace] output, so if your trace prints are ghosting you, this is why πŸ’€

🧚 ADDITIONAL BUILTINS 🧚

  • $store "file" v β€” store the value v (which must be a primitive or an array) as a binary value in the given file.

πŸ’€ BUGS πŸ’€

FutharkScript expressions can only refer to names defined in the file passed to futhark script β€” not any names in imported files. sorry babe, the imports don't get a say πŸ™ˆ

and if the result of the expression doesn't have an external representation (like, say, it's an array of tuples), then the value that gets printed is misleading and somewhat nonsensical. so like... read it at your own risk, bestie.

🌈 SEE ALSO 🌈

futhark-test, futhark-bench, futhark-literate


Copyright β€” 2013-2020, DIKU, University of Copenhagen πŸŽ€

k that's the whole page, mwah πŸ’‹ this was version 0.25.32, dated Mar 11, 2026 β€” go compile something gorgeous, bestie β­πŸ‘‘

πŸ“¦ where this page comes from