Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
fuhsnn
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
1.
▲
by
fuhsnn
2mo ago
These look more like configure snapshots for Zig's bundled Clang than full ports of build system. The HAVE_/WITH_ defines are supposed to be dynamically probed to adapt to different toolchain environments, setting them manually li
2.
▲
by
fuhsnn
4mo ago
It did take many hours, but I learnt a lot in the process, found some bugs to report, and watched plenty of series concurrently. Overall it's a nice and worthwhile hobby!
3.
▲
by
fuhsnn
4mo ago
For those who are making indie C compilers that don't pretend to be __GNUC__ but want to compile real world projects, slimcc's test script[1] and platform header hacks[2] might save you some time. [1] https://github.com
4.
▲
by
fuhsnn
4mo ago
> IMHO this "schism" was completely unnecessary and only happened because of ignorance and hubris Having attempted to implement it correctly in slimcc, there are indeed some edge cases[1][2] that justify not adapting it fully.
5.
▲
by
fuhsnn
4mo ago
> The sad vicious cycle of compilers not exercising the hardware There could theoretically be instruction selection passes that are biased toward rare instructions, specialized for fuzzing hardware, I'm surprised Intel doesn't
6.
▲
by
fuhsnn
4mo ago
The page says "aims to provide 70%" though, funny how words spread.
7.
▲
by
fuhsnn
4mo ago
There is a library conversion fork: https://github.com/sgraham/sqbe . IMO when the intended usage is AOT with an external assembler, which is another subprocess, text-based IO is actually the more natural approach.
8.
▲
by
fuhsnn
4mo ago
Some of us do spend hours on godbolt.org tweaking code like it was game character build.
9.
▲
by
fuhsnn
5mo ago
That read like a supply-chain attack gold mine if you ask me.
10.
▲
by
fuhsnn
5mo ago
rcc[1] is another real-JIT C compiler. antcc[2] and xcc[3] are worth mentioning for being fast-enough to run C like scripting. [1] https://github.com/dstogov/rcc [2] https://codeberg.org/lsof/antcc
11.
▲
by
fuhsnn
5mo ago
Looking at the repo, the author seemed a little fed up [1] with the nature of lower level language and quitted. [1] https://github.com/asibahi/paella/blob/main/writeup/c19.md#u...
12.
▲
by
fuhsnn
5mo ago
Yeah, to get arcane macro tricks right I probably spent more than a full month total fighting with linked lists, never want to touch that part again.
13.
▲
by
fuhsnn
5mo ago
Can't speak for kefir; slimcc has been `make unittest`ing Neovim v0.10.4 with no source modification in a Debian VM (so it's pretty portable, thanks!) On tcc, the most common dealbreaker is no thread local support, having independ
14.
▲
by
fuhsnn
5mo ago
c-testsuite itself was curated from simple-cc and tinycc's test files, the latter originated from picoc.
15.
▲
by
fuhsnn
5mo ago
I have found portability bugs in many projects with slimcc just because it exposed different preprocessor defines, some gate critical __attribute__ behind __GNUC__ check, some have buggy fallback to __builtin functions or VLA that nobody no
16.
▲
by
fuhsnn
5mo ago
Congrats for the new optimizing pipeline, and thanks for the acknowledgment! It's nice to have company in the non-__GNUC__ camp.
17.
▲
by
fuhsnn
5mo ago
TinyCC's mob branch on repo.or.cz just got trolled with AI commits today. Nowhere is safe it seems.
18.
▲
by
fuhsnn
5mo ago
I don't fully grasp it either, the most appropriate analogy I can think of is like how OpenMP turns #pragma annotated loops into multi-threading, this work turns bytecode interpreting loops into JIT VM.
19.
▲
by
fuhsnn
5mo ago
Took me a while to figure out whether it's interpreters for C programs or if there's a particular class of interpreters called "C". Turns out it's about interpreters implemented in C that they use modified LLVM to d
20.
▲
by
fuhsnn
5mo ago
The website you linked says mallocng?
21.
▲
by
fuhsnn
5mo ago
Don't get mimalloc and mallocng mixed up though, completely different animals.
22.
▲
by
fuhsnn
6mo ago
Thanks, that actually look like a very solid baseline to start things with. Are you aware of onramp[1]? They use a custom VM to base compiler and shell on, it's extra steps, but could be more flexible long term. [1] https://
23.
▲
by
fuhsnn
6mo ago
Well, I happen to have been recreationally maintaining a hobbyist C compiler for three years, adding tests is part of the fun.
24.
▲
by
fuhsnn
6mo ago
> It does make it a little hard to understand Or much easier to backdoor...
25.
▲
by
fuhsnn
6mo ago
Don't understand why you were downvoted. An untested C compiler is simply worthless.
26.
▲
by
fuhsnn
6mo ago
> This feels like it should have been mentioned in the article. With an entire section complaining how many lines of code existing implementations are, looks like they did found a good simple implementation to clone in Rust then delibera
27.
▲
by
fuhsnn
7mo ago
Didn't expect my nitpicking of "CCC" to result in some maintenance commits in csmith, thanks for the author.
28.
▲
by
fuhsnn
7mo ago
It's one of the most commonly adopted feature among C successor languages (D, Zig, Odin, C3, Hare, Jai); given how opinionated some of them are on these topics, I think it's safe to say it's generally well regarded in PL comm
29.
▲
by
fuhsnn
7mo ago
The fact that pointer types can't be used with this pattern without typedef still seems kinda primitive to me.
30.
▲
by
fuhsnn
7mo ago
Structural diff tools like difftastic[1] is a good middle ground and still underexplored IMO. [1] https://github.com/Wilfred/difftastic
More ›