frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

OpenCiv3: Open-source, cross-platform reimagining of Civilization III

https://openciv3.org/
411•klaussilveira•5h ago•93 comments

The Waymo World Model

https://waymo.com/blog/2026/02/the-waymo-world-model-a-new-frontier-for-autonomous-driving-simula...
765•xnx•10h ago•464 comments

Why I Joined OpenAI

https://www.brendangregg.com/blog/2026-02-07/why-i-joined-openai.html
29•SerCe•1h ago•24 comments

Show HN: Look Ma, No Linux: Shell, App Installer, Vi, Cc on ESP32-S3 / BreezyBox

https://github.com/valdanylchuk/breezydemo
136•isitcontent•5h ago•14 comments

Monty: A minimal, secure Python interpreter written in Rust for use by AI

https://github.com/pydantic/monty
128•dmpetrov•6h ago•53 comments

Dark Alley Mathematics

https://blog.szczepan.org/blog/three-points/
35•quibono•4d ago•2 comments

Show HN: I spent 4 years building a UI design tool with only the features I use

https://vecti.com
240•vecti•7h ago•114 comments

A century of hair samples proves leaded gas ban worked

https://arstechnica.com/science/2026/02/a-century-of-hair-samples-proves-leaded-gas-ban-worked/
61•jnord•3d ago•4 comments

Microsoft open-sources LiteBox, a security-focused library OS

https://github.com/microsoft/litebox
307•aktau•12h ago•152 comments

Sheldon Brown's Bicycle Technical Info

https://www.sheldonbrown.com/
308•ostacke•11h ago•84 comments

Show HN: If you lose your memory, how to regain access to your computer?

https://eljojo.github.io/rememory/
167•eljojo•8h ago•123 comments

Hackers (1995) Animated Experience

https://hackers-1995.vercel.app/
384•todsacerdoti•13h ago•217 comments

An Update on Heroku

https://www.heroku.com/blog/an-update-on-heroku/
313•lstoll•11h ago•230 comments

Show HN: R3forth, a ColorForth-inspired language with a tiny VM

https://github.com/phreda4/r3
47•phreda4•5h ago•8 comments

I spent 5 years in DevOps – Solutions engineering gave me what I was missing

https://infisical.com/blog/devops-to-solutions-engineering
103•vmatsiiako•10h ago•34 comments

How to effectively write quality code with AI

https://heidenstedt.org/posts/2026/how-to-effectively-write-quality-code-with-ai/
177•i5heu•8h ago•128 comments

Introducing the Developer Knowledge API and MCP Server

https://developers.googleblog.com/introducing-the-developer-knowledge-api-and-mcp-server/
13•gfortaine•3h ago•0 comments

Understanding Neural Network, Visually

https://visualrambling.space/neural-network/
231•surprisetalk•3d ago•30 comments

I now assume that all ads on Apple news are scams

https://kirkville.com/i-now-assume-that-all-ads-on-apple-news-are-scams/
968•cdrnsf•15h ago•414 comments

Learning from context is harder than we thought

https://hy.tencent.com/research/100025?langVersion=en
139•limoce•3d ago•79 comments

FORTH? Really!?

https://rescrv.net/w/2026/02/06/associative
39•rescrv•13h ago•17 comments

Evaluating and mitigating the growing risk of LLM-discovered 0-days

https://red.anthropic.com/2026/zero-days/
34•lebovic•1d ago•11 comments

PC Floppy Copy Protection: Vault Prolok

https://martypc.blogspot.com/2024/09/pc-floppy-copy-protection-vault-prolok.html
7•kmm•4d ago•0 comments

Show HN: Smooth CLI – Token-efficient browser for AI agents

https://docs.smooth.sh/cli/overview
76•antves•1d ago•56 comments

I'm going to cure my girlfriend's brain tumor

https://andrewjrod.substack.com/p/im-going-to-cure-my-girlfriends-brain
34•ray__•2h ago•10 comments

The Oklahoma Architect Who Turned Kitsch into Art

https://www.bloomberg.com/news/features/2026-01-31/oklahoma-architect-bruce-goff-s-wild-home-desi...
17•MarlonPro•3d ago•3 comments

Show HN: Slack CLI for Agents

https://github.com/stablyai/agent-slack
38•nwparker•1d ago•8 comments

Claude Composer

https://www.josh.ing/blog/claude-composer
101•coloneltcb•2d ago•69 comments

How virtual textures work

https://www.shlom.dev/articles/how-virtual-textures-really-work/
25•betamark•12h ago•23 comments

The Beauty of Slag

https://mag.uchicago.edu/science-medicine/beauty-slag
31•sohkamyung•3d ago•3 comments
Open in hackernews

Kefir: Solo-developed full C17/C23 compiler with extensive validation

https://kefir.protopopov.lv/posts/announce0.html
64•jprotopopov•5mo ago

Comments

renehsz•4mo ago
Wow, hats off to you! This is one of the most impressive solo projects I've seen in a while!

Making a toy C compiler isn't rocket science, but developing one that's complete and production-ready is whole nother story. AFAICT, Kefir fits into the latter category:

- C17/C23 compliance

- x86_64 codegen

- debug info gen

- SSA-based optimization passes (the most important ones)

- has a widely-compatible cc cli

- is extensively tested/fuzzed

Some advantages compared to the big three (GCC, Clang, MSVC):

- It's fairly small and simple

- That means it's understandable and predictable - no surprises in terms of what it can and cannot do (regarding optimizations in particular)

- Compilation is probably very fast (although I haven't done any benchmarking)

- It could be modified or extended fairly easily

There might be real interest in this compiler from people/companies who

- value predictability and stability very highly

- want to be in control of their entire software supply chain (including the build tools)

- simply want a faster compiler for their debug builds

Think security/high assurance people, even the suckless or handmade community might be interested.

So it's time to market this thing! Get some momentum going! It would be too sad to see this project fade away in silence. Announce it in lots of places, maybe get it on Compiler Explorer, etc. (I'm not saying that you have to do this, of course. But some people could genuinely benefit from Kefir.)

P.S. Seems like JKU has earned its reputation as one of the best CS schools in Austria ;-)

jprotopopov•4mo ago
(I thought that the announcement has completely faded, so haven't even checked the replies).

I'll immediately reveal some issues with the project. On the compilation speed, it is unfortunately atrocious. There are multiple reasons for that:

1. Initially the compiler was much less ambitious, and was basically generating stack-based threaded code, so everything was much simpler. I have managed to make it more reasonable in terms of code generation (now it has real code generator, optimization pipeline), but there is still huge legacy in the code base. There is a whole layer of stack-based IR which is translated from the AST, and then transformed into equivalent SSA-based IR. Removing that means rewriting the whole translator part, for which I am not ready.

2. You've outlined some appealing points (standard compliance, debug info, optimization passes), but again -- this came at the expense of being over-engineered and bloated inside. Whenever, I have to implement some new feature, I hedge and over-abstract to keep it manageable/avoid hitting unanticipated problems in the future. This has served quite well in terms of development velocity and extending the scope (many parts have not seen complete refactoring since the initial implementation in 2020/2021, I just build up), but efficiency of the compiler itself suffered.

3. I have not particularly prioritized this issue. Basically, I start optimizing the compiler itself only when something gets too unreasonable (either, in terms of run time, or memory). There are all kinds of inefficiencies, O(n^2) algorithms and such simply because I knew that I would be able to swap that part out should that be necessary, but never actually did. I think the compiler efficiency has been the most de-prioritized concern for me.

Basically, if one is concerned with compilation speed, it is literally better to pick gcc, not even talking about something like tcc. Kefir is abysmal in that respect. I terms, of code base size, it is 144k (sans tests, 260k in total) which is again not exactly small. It's manageable for me, but not hacker-friendly.

With respect to marketing, I am kind of torn. I cannot work on this thing full time, unless somebody is ready to provide sufficient full-time funding for myself and also other expenses (machines for tests, etc). Otherwise, I'll just increase the workload on myself and reduce the amount of time I can spend actually working on the code, so it'll probably be net loss for the project. Either way, for now I treat it closer to an art project than a production tool.

As for compiled code performance, I have addressed it here https://lobste.rs/s/fxyvwf -- it's better than, say, tcc, but nowhere near well-established compilers. I think this is reasonable to expect, and the exact ways to improve that a bit are also clear to me, it's only question of development effort

P.S. JKU is a great school, although by the time I enrolled there the project has already been on the verge of bootstrapping itself.

EDIT: formatting

renehsz•4mo ago
Well, sometimes things aren't as amazing as they look on the surface. And it's totally understandable if you don't want to spend the time and effort to solve the problems you mentioned.

Some people/communities might be interested in this compiler regardless. It doesn't hurt to spread the word. We need more compiler diversity, research, and development.

Also, don't sell yourself short - completing a project of this magnitude and complexity as a solo dev is something few people are able to do. If I worked in HR, I would try to hire you instantly ;-)

Hope to see more awesome software from you in the future!

oguz-ismail•4mo ago
Cool project. Unlike tcc and cproc though kefir doesn't seem very good at handling big arrays. This

    $ kefir -c - <<x
    int a[] = {
    $(seq 10000000 | tr '\n' ,)
    };
    x
allocates gigabytes of memory and eventually crashes WSL on my machine.
jprotopopov•4mo ago
I have addressed compiler inefficiency in the sibling comment. This is indeed a problem. Empty arrays of such size should be compile-able (there is sparse representation for arrays). However, I would say that this use case is not particularly practical, at least in none of the projects from my test suite this has been an issue.
oguz-ismail•4mo ago
Good work either way. Congrats!
Western0•4mo ago
I need only one small things.

package system like rust. I need normal C library but easy download and using. Nothing more. I like C. I can produce nice code but library is still problem.

jprotopopov•4mo ago
I am going to hijack this comment for a little rant about libc and independent compilers. Existing libc implementations have varying levels of hostility towards non-gcc/clang compilers. Glibc is probably the worst offender here, musl is the most compliant (but even there are some assumptions).

I am in no way accusing any of libc developers, they got much higher priority things to do than supporting obscure compilers, and this is my problem as a compiler developer, but nevertheless. For instance, glibc may simply override __attribute__ keyword with an empty macro, or omit packed attributes for non GNU C compilers (breaking epoll ABI along the way). Of course, strictly standard-compliant compiler may not have attributes at all, but in my opinion #warning/#error directive would have been more appropriate than silently producing ABI breakage.

Although, I have not engaged with glibc developers on these topics, and mostly documented encountered challenges as patches in my own test suite.

1718627440•4mo ago
The libc is part of the C implementation, i.e. part of the compiler. It's not a bunch of helpful utils like in other languages. The compiler is allowed to optimize based on ever behaviour it knows its libc has. It's nice that you sometimes can swap out the libc, but its a hack.
jprotopopov•4mo ago
Yes, indeed, libc behavior (at minimum) is defined by the standard itself, and the compiler has to ensure that the library is functional. I have explicitly acknowledged it in my comment above ("this is my problem as a compiler developer").

Here I am not speaking about the compiler optimizing based on known libc behavior, but libc "specializing" based on assumed compiler behavior. Which is, again, absolutely reasonable -- both compiler and libc typically go hand in hand. However, as my compiler "parasites" on the existing libc implementations, I would have preferred that such assumptions would be validated to the extent it is possible at compile time, preferably with some graceful failure.

Glibc provides quite profound libc part even to non-GNU C-compatible compilers, but in some places it might fail silently and disruptively.

I am deeply thankful to all developers of libc implementations for Linux and BSD systems, and I am in no way accusing anyone or demanding anything. In the project's README I explicitly note, that any standard library function not being usable will be treated as a bug in Kefir itself. In the above rant, I just expressed a mere wish that some things could be a bit smoother.

1718627440•4mo ago
Fair enough.

Thanks for your work, more diversity will always improve the C language and your work is truly impressive.

> <!-- Nothing to see here. Better go read the compiler source. -->

Nice clean HTML5 website there, I wish more would be like this. There are however some errors in the <a> tags (lines 120-133), you seem to generate? an open instead of a close tag there.

jprotopopov•4mo ago
Thank you. On that subdomain, nothing was generated -- I just sat down and typed it in the editor for no particular reason. Should have validated it, at least

Edit: The external source archive page was. Although, with a very simple bash script, but nevertheless

1718627440•4mo ago
Is there a way to do an out-of-tree build? I don't see it documented. Does it support DESTDIR?

The parallel build doesn't seem to work for me, not sure why.

throwaway192454•4mo ago
(using throwaway account, as I don't have any access to my main one from this machine)

For out-of-tree build, use KEFIR_BIN_DIR make parameter. I use it quite extensively in https://git.sr.ht/~jprotopopov/kefir/tree/master/item/script... so this should work.

DESTDIR is supported as a parameter of make install: https://git.sr.ht/~jprotopopov/kefir/tree/master/item/instal...

As for the parallel build issues, contact me over the email please

jprotopopov•4mo ago
(I'll address the parallel build part in addition to what has been said, but please respond to my email address/sourcehut mailing list for any further communication on these issues).

I should have communicated this more clearly in README. Kefir requires relatively recent GNU Make versions (see dist/Dockerfile for full and complete set of dependencies), as it basically uses make for all project lifecycle tasks. I remember there were some parallel build issues with older GNU Make versions. This could be an issue.

1718627440•4mo ago
It seems to install a library. Does that mean it can be included in another program, to have runtime code generation? Or what is that library for?
throwaway192454•4mo ago
Yes, you can use it as a library. I do not guarantee stable API, however
1718627440•4mo ago
Kefir doesn't seem to work out of the box on my machine. I have glibc (libc6) version 2.31-13+deb11u6 installed. The linker is missing the symbol dl_iterate_phdr. Do I need to set some special flags for it to work?

    ld: /usr/lib/gcc/x86_64-linux-gnu/10//libgcc_eh.a(unwind-dw2-fde-dip.o): in function `_Unwind_Find_FDE':
    (.text+0x203d): undefined reference to `dl_iterate_phdr'
The linker invocation is:

    ld -o a.out -no-pie /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu//crt1.o /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu//crti.o /usr/lib/gcc/x86_64-linux-gnu/10//crtbegin.o --dynamic-linker /lib64/ld-linux-x86-64.so.2 /tmp/kefir-155672-5mB4xo/object-file.0.UGboRo -l c -L /usr/lib/gcc/x86_64-linux-gnu/10/ -L /usr/lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/lib/x86_64-linux-gnu/10/ -L /usr/lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/lib/x86_64-linux-gnu/ -L /usr/lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/lib/../lib/ -L /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/10/ -L /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/ -L /usr/lib/gcc/x86_64-linux-gnu/10/../../../../lib/ -L /lib/x86_64-linux-gnu/10/ -L /lib/x86_64-linux-gnu/ -L /lib/../lib/ -L /usr/lib/x86_64-linux-gnu/10/ -L /usr/lib/x86_64-linux-gnu/ -L /usr/lib/../lib/ -L /usr/lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/lib/ -L /usr/lib/gcc/x86_64-linux-gnu/10/../../../ -L /lib/ -L /usr/lib/ -lc -lm --push-state --as-needed -latomic --no-as-needed --pop-state -ldl -lgcc -lgcc_eh /usr/lib/gcc/x86_64-linux-gnu/10//crtend.o /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu//crtn.o
1718627440•4mo ago
Upon researching that, I got some questions.

Why does kefir use the shell to invoke itself?

Why does it look for its library under /usr/local/bin/../lib/tls/x86_64/x86_64/libkefir.so ? Shouldn't it know where its supposed to be from the build configuration? Is it intended, that it access a file after trying to unlink it?

    unlink("/tmp/kefir-154946-hu9HGw")      = -1 EISDIR (Is a directory)
    rmdir("/tmp/kefir-154946-hu9HGw")       = 0
    access("/tmp/kefir-154946-hu9HGw/object-file.0.ivTxnw", F_OK) = -1 ENOENT (No such file or directory)
throwaway192454•4mo ago
Kefir build artifact is fully portable and agnostic to installation location. DESTDIR, prefix, etc are simply interpolated into launch script (template is here: https://git.sr.ht/~jprotopopov/kefir/tree/master/item/script...). So, no kefir binary itself does not know or care where it is installed, it gathers the information the environment variables provided by launch script.

The reason is that kefir supports portable builds which could be unpacked anywhere, so these path might even be relative.

throwaway192454•4mo ago
Can you provide me with more details of your system configuration? Dockerfile, ideally. Please send me an email.