Repository navigation
Conversation
Goose (https://github.com/aardappel/goose) programs for every problem but http-server, built through the generated C with clang and PLB's C flags.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goose is a systems language that compiles to C: data lives
on bump-allocated data stacks freed by scope, arrays nest inline, and links can be 4-byte
relative references, with lifetimes and bounds checked statically where they can be and at run
time where they can't.
This adds Goose programs for every problem except
http-server(Goose has no networking yet):30 programs for 17 problems, a single-threaded one for each and a
-mone where the fastprograms of other languages are multithreaded.
Build.
goose -O2 --standalone -o app.c app.goosewrites the program and the runtime as one Cfile, which
clang @app.rspcompiles with the C entries' flags (-O3 -fomit-frame-pointer -march=broadwell). Goose'ssimd fns, which otherwise also build AVX-512 versions and pick one atrun time, are capped at AVX2 (
-DGS_SIMD=1) to match-march=broadwell..github/goose.shinstalls a Goose release, as
odin.shdoes Odin's.Notes on the programs
function returns, as the C and C++ programs use memory pools. merkletrees forbids arenas, so
there every node is allocated and freed on its own, from a pool with a freelist.
D, Python) build: a lazy filter stage per prime, each pulling values from the stage before it.
library; json-serde uses Goose's standard
jsonmodule and carries its own MD5.1.c does, knucleotide/2 with the standard library's dictionary.
out for vector registers (spectral-norm/2 sums four columns' fractions over one division, as
C's 6-im does).
Testing. With the tool,
--task build --langs goosebuilds all 30 programs and--task testpasses all 58 unit tests (Ubuntu 24.04, clang 18). The same programs also build and pass with
Ubuntu 22.04's clang 14, and with clang 20.