Skip to content

Instantly share code, notes, and snippets.

@workturnedplay
Last active April 28, 2026 02:50
Show Gist options
  • Select an option

  • Save workturnedplay/5706613539c583ee18397a5a5fd3af5e to your computer and use it in GitHub Desktop.

Select an option

Save workturnedplay/5706613539c583ee18397a5a5fd3af5e to your computer and use it in GitHub Desktop.
why not X lang

https://github.com/pizlonator/fil-c/

Why not Fil-C lang?

  • is 108k commits behind LLVM from which it is forked, and 2.3k commits ahead (ie. own commits)
    • can't replay its 2.3k commits on top of latest LLVM
    • i'd need/want wtw LLVM fixed in terms of bugs in those 100k commits
    • looks like there's a rebase commit from Aug 2025 saying it was rebased on llvm 20.1.8 (likely the tag not the branch of it) so it's not as bad as I thought!
  • as per Gemini(I didn't check/tested tho) each stack frame is heap allocated, if so, push/pop in asm would break things
    • so ffmpeg,mpv,vlc shouldn't work since they've asm code (presumably doing push/pop too)
    • saw a vid on yt from 1 year ago saying inline(was it?) asm isn't allowed at all because it would be like 'unsafe' code in Rust.
  • works only on Linux for now
  • inline asm → unconditional trap at runtime! never at compile time (fil-c 0.678 clang version 20.1.8) no flag to warn/error at compile time - this is absolutely unacceptable.
    • Vlang compilation takes ~30mins, crashes at runtime, coulda saved time if it errored out at compile time!

Why yes Fil-C lang?

  • has specific memory safety that I like
  • is 1.5-4x (maybe? Gemini said) slower than C/C++
  • doesn't need to change the C/C++ code, just recompile it.

Why not Go lang?

Why yes Go lang?

  • very fast dev time, good for quick drafts and polishing later on.
  • very fast comilation times - this does matter for fast dev time!
  • no code execution at build time (go generate is for that, not go build)
  • has race detector

Why not Rust lang?

  • (iirc) implicit Copy trait is a major footgun
    • u change a type(that had implicit Copy trait) into an actual/another type(that doesn't have Copy trait) and bam code doesn't compile anymore because it was "wrong" in the first place.
  • slow compile times
    • likely need to compile Rust lang itself(which takes 42+ minutes, iirc) to add/change things I need in it to make tests and runtime/exit work as I want, such as to detect when tests failed and which failed (unless that got fixed in the past 2+ years already)
  • slow dev time
  • code execution at build time:
    • runs build.rs of any deps including self! (runs as a separate process before compilation)
      • this means I've to ensure that code is safe somehow and when updated check it again(ideally see the diff, somehow?)
    • runs code for proc-macros of any deps! Procedural Macros (run inside the compiler process during compilation).
      • If a crate has proc-macro = true in its manifest(Cargo.toml), it can run arbitrary code when you use its macros (like #[derive(Serialize)]).
  • when errors happen (like file not found or ssl trying to https connect to a HTTP point) it will not tell you which file name wasn't found or that you tried to connected via SSL to an HTTP point (tho the latter is kinda openssl's fault), but this is idiomatic Rust code not including the filename in the error, which maybe using anyhow or thiserror mitigates (i haven't checked if so!)

Why yes Rust lang?

  • got some safety features and the compiler catches lots of things
  • no shifting stacks
  • no GC
  • can use Verus for more safety of code!

Why not V lang? https://github.com/vlang/v

  • uses tcc binary it downloads from a repo
    • but you can use gcc by passing -gcc to makev.bat (unsure if on Linux can do that like make -gcc)
  • the bot that commits/pushes to the vc repo where v.c lives could be taken over to push malicious v.c (or v_win.c)
    • so, building V (eg. via makev.bat) does get the v.c from that repo and builds it via tcc or gcc!
  • the vc repo can get behind for more than 10 mins so main v repo is ahead of it
    • sometimes v.c fails to compile unless you wait for it to be in sync with main v repo (commit-wise).

Why yes V lang?

  • simple
  • fast
  • can transpile to C

Why not Zig lang?

  • had some old bugs about undefined (eg. ziglang/zig#63 ) which were acting as if they were against their Zen, unsure if fixed
  • code execution at build time (of deps too, as per Gemini, didn't check this)
    • build.zig is the zig code that's run to build the project
    • I'm likely better using Rust then: "most build.rs files are very small and just link to a .lib file. They are much easier to audit than a complex, imperative build.zig that might be doing 1,000 lines of logic."
  • repo is hosted on codeberg and wtw is left on github is readonly/locked(issues) so hard to track unless getting codeberg account.

Why yes Zig lang?

  • simple(r) language
  • no GC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment