frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Start all of your commands with a comma

https://rhodesmill.org/brandon/2009/commands-with-comma/
102•theblazehen•2d ago•23 comments

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

https://openciv3.org/
654•klaussilveira•13h ago•190 comments

The Waymo World Model

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

How we made geo joins 400× faster with H3 indexes

https://floedb.ai/blog/how-we-made-geo-joins-400-faster-with-h3-indexes
119•matheusalmeida•2d ago•29 comments

What Is Ruliology?

https://writings.stephenwolfram.com/2026/01/what-is-ruliology/
38•helloplanets•4d ago•38 comments

Unseen Footage of Atari Battlezone Arcade Cabinet Production

https://arcadeblogger.com/2026/02/02/unseen-footage-of-atari-battlezone-cabinet-production/
48•videotopia•4d ago•1 comments

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

https://github.com/valdanylchuk/breezydemo
228•isitcontent•14h ago•25 comments

Jeffrey Snover: "Welcome to the Room"

https://www.jsnover.com/blog/2026/02/01/welcome-to-the-room/
14•kaonwarb•3d ago•18 comments

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

https://github.com/pydantic/monty
219•dmpetrov•14h ago•114 comments

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

https://vecti.com
329•vecti•16h ago•143 comments

Sheldon Brown's Bicycle Technical Info

https://www.sheldonbrown.com/
378•ostacke•19h ago•94 comments

Hackers (1995) Animated Experience

https://hackers-1995.vercel.app/
487•todsacerdoti•21h ago•241 comments

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

https://github.com/microsoft/litebox
359•aktau•20h ago•181 comments

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

https://eljojo.github.io/rememory/
286•eljojo•16h ago•167 comments

An Update on Heroku

https://www.heroku.com/blog/an-update-on-heroku/
409•lstoll•20h ago•276 comments

Vocal Guide – belt sing without killing yourself

https://jesperordrup.github.io/vocal-guide/
21•jesperordrup•4h ago•12 comments

Dark Alley Mathematics

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

PC Floppy Copy Protection: Vault Prolok

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

Where did all the starships go?

https://www.datawrapper.de/blog/science-fiction-decline
4•speckx•3d ago•2 comments

Delimited Continuations vs. Lwt for Threads

https://mirageos.org/blog/delimcc-vs-lwt
31•romes•4d ago•3 comments

How to effectively write quality code with AI

https://heidenstedt.org/posts/2026/how-to-effectively-write-quality-code-with-ai/
251•i5heu•16h ago•194 comments

Was Benoit Mandelbrot a hedgehog or a fox?

https://arxiv.org/abs/2602.01122
15•bikenaga•3d ago•3 comments

Introducing the Developer Knowledge API and MCP Server

https://developers.googleblog.com/introducing-the-developer-knowledge-api-and-mcp-server/
56•gfortaine•11h ago•23 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/
1062•cdrnsf•23h ago•444 comments

Why I Joined OpenAI

https://www.brendangregg.com/blog/2026-02-07/why-i-joined-openai.html
144•SerCe•9h ago•133 comments

Learning from context is harder than we thought

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

Understanding Neural Network, Visually

https://visualrambling.space/neural-network/
287•surprisetalk•3d ago•41 comments

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

https://infisical.com/blog/devops-to-solutions-engineering
147•vmatsiiako•18h ago•67 comments

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

https://github.com/phreda4/r3
72•phreda4•13h ago•14 comments

Female Asian Elephant Calf Born at the Smithsonian National Zoo

https://www.si.edu/newsdesk/releases/female-asian-elephant-calf-born-smithsonians-national-zoo-an...
29•gmays•9h ago•12 comments
Open in hackernews

Show HN: Header-only GIF decoder in pure C – no malloc, easy to use

47•FerkiHN•6mo ago
I built a lightweight GIF decoder in pure C, ideal for embedded or performance-critical environments. It’s header-only, zero dynamic memory allocations, and fully platform-independent. Supports both static and animated GIFs, with turbo and safe decoding modes. Works great on microcontrollers, IoT devices, and anything with a framebuffer. Would love feedback or ideas where this could be useful.

Github: https://github.com/Ferki-git-creator/TurboStitchGIF-HeaderOn...

Comments

FerkiHN•6mo ago
Please share your thoughts.
zoo56•6mo ago
It looks good, but I wanted to see a demo to see how it would all look in practice.
FerkiHN•6mo ago
Okay, I'll do it soon.
90s_dev•6mo ago
How much was AI used to help create this?
0xEF•6mo ago
Right for the throat. Brutal.
90s_dev•6mo ago
The readme just looks like it was written by AI, and the initial commit is the entire code. It just seems like AI was used at least somewhat. Just curious how much, if at all.

I submitted a link to a project[0] with similar characteristics a few days ago, before I realized it was probably entirely made by AI. That's what got me wondering this in the first place.

[0] https://news.ycombinator.com/item?id=44642557

actionfromafar•6mo ago
I'm laughing so much right now, we live in truly hilarious (but also terrifying) times!
horseradish7k•6mo ago
check op's post history you'll understand
FerkiHN•6mo ago
Yes, I used ChatGPT to help refine the README and occasionally get suggestions for cleaner or more efficient code patterns.

But the core logic, turbo decoding modes, and embedded optimization — that’s all written, tested, and understood by me.

I see AI as a tool, not an author — it helps speed things up, but I still do the thinking.

lnkl•6mo ago
How is this a header-only? It contains non-static, non-inline functions in the .h file...
kccqzy•6mo ago
It's header-only in the sense that you cut everything that normally goes in the .c file and pasted it in the .h file.

Don't you get linker errors when a project includes this header twice in different translation units? If not, please explain how.

lmz•6mo ago
"ifdef GIF_IMPLEMENTATION"
furyofantares•6mo ago
Looks like you are required to #define GIF_IMPLEMENTATION before #include "gif.h" in exactly one of your translation units.
magicalhippo•6mo ago
At that point, what does header-only gain you in C (ie not C++)?

I've included many single .h/.c pair libraries before in my projects and given the of simplicity that was never a pain point.

snickerbockers•6mo ago
people who have to support windows do this sometimes because MS has gone for almost forty years now without ever specifying a default directory where libraries go. This is in spite of the fact that being the creator of the OS, the most-popular compiler, and the SDK should in theory give them enormous leverage to dictate where dependencies get saved.

There's this bizarre cultural difference you see between people who learned to program on windows compared to people who learned to program on unix wherein the Windows crowd don't see the value of having an easily reproducible build system because. Usually this results in some combination of needlessly-complicated scripts and checking binary builds of dependencies into version-control.

Requiring you to include a header-file while also defining a specific constant in only one place that turns the header file into a c-file is actually one of the more benign workarounds you see.

pjmlp•6mo ago
Outside FOSS UNIX clones, most OSes, including commercial OSes, tend to have a more diversified ecosystem in compilers, and which directories those compilers take their libraries from.

Naturally people love to complain about Windows.

Also nowadays there is vcpkg and conan.

magicalhippo•6mo ago
Been a good while since I worked with C/C++, but when I did it was on Windows.

As I recall I just added the files to the project, possibly configured a define or five, and then compiled.

Tedious when it's tons of directories, but a breeze with just a pair of files.

That said, I get that this buys you a bit of flexibility in build management.

pjmlp•6mo ago
Not learning about how compilers, linkers and library managers actually work.

Even C++, and considering templates, if you want to use external templates optimization you need implementation files, and then there are modules (already working in clang/VC++).

jonhohle•6mo ago
So you get a header only implementation by forcing all users to do something unexpected instead of having a single C file. Seems silly and not really the point of a header only implementation.
furyofantares•6mo ago
It's not that weird, and it's explained first thing in the header and shown in the example of how to use it. You do need to read how to use the thing, and this is a simpler detail than any of the function signatures you'll have to look at.

Personally I would probably add a gif.c to my project which does nothing but include the header with the define set, at least if I'm going to need a gif decoder in more than one place. Probably many (most?) projects only need this library in one file anyway, in which case I'd just include it from that file and be done.

dn3500•6mo ago
You're supposed to #define GIF_IMPLEMENTATION in only one of your .c files to prevent linker collisions. But yeah I don't get the point. How is this any better than the standard method of putting macros and data definitions in the .h and code in the .c? This is just going to confuse anyone who comes along later and wants to work on the code that uses this thing.
FerkiHN•6mo ago
Totally fair — this pattern can be confusing at first glance. The main motivation is ease of integration: no need to manage extra .c files, no build system tweaks, just drop in one file and go. It’s especially useful for embedded systems, scripts, and small projects where build friction matters. That said, I agree that for larger teams or long-term projects, the classic .h + .c split can be clearer — that’s why the implementation can easily be separated if needed. Appreciate the feedback!
csmantle•6mo ago
Probably it's better to mark every functions as static in a header-only library, not just those internal ones. But I think code bloat would still be an issue if we don't use LTO or other optims across compilation units.

edit: Yeah, defining *_IMPLEMENTATION appropriately would address these issues.

FerkiHN•6mo ago
Great question! It works the same way as stb-style libs: you only #define GIF_IMPLEMENTATION in one .c file (one translation unit). In all other files, you just #include "gif.h" without the define. The header uses #ifdef GIF_IMPLEMENTATION to include implementation code only once. So no linker errors — everything compiles cleanly as long as that rule is followed. I’ll make this clearer in the README too, thanks!
rixed•6mo ago
Why would you want another gif decoder, in C, in 2025? What's the point of cramming everything in a single file?
taminka•6mo ago
easier to build, easier to navigate, easier to integrate

ppl who ask qustions like this must have not worked much on codebases w/ nightmarish build setups, libraries like this are so refreshing/easier to work w/

rixed•6mo ago
I've worked with many projects and many dependencies and never felt a need for that. In the worse case, if a dependency was too badly packaged, or its built system too awful, I had to redo it. As I'm always working with pretty standard and portable Unix built tools and debian packages, is never been such a pain. Actually, one of the things I miss from C when I'm using any other environment is how it is simple to build, to package and to debug.
cornstalks•6mo ago
There are multiple comments remarking on the header-only implementation, confused regarding linker errors and why this is desirable. Look into stb lib, which in my opinion popularized this idea: https://github.com/nothings/stb?tab=readme-ov-file#how-do-i-...
legobmw99•6mo ago
In particular, you can define the implementation flag and include the header in a .c file with no other contents to recover the more “traditional” build set up where you have a separate TU dedicated to the library.

I quite like the flexibility it provides in terms of making “unity builds” very easy, and scaling down quite well to small, single-TU projects with minimal build set ups.

FerkiHN•6mo ago
Exactly! That flexibility was one of my goals. Making integration smooth for both small embedded projects and larger codebases with unity builds — glad to hear it resonates.
legobmw99•6mo ago
I first encountered the idea relatively recently with Clay [1] and I have been a fan since. Once you get past the “huh, weird” stage it has a lot of benefits!

1: https://github.com/nicbarker/clay

FerkiHN•6mo ago
Thanks! Yes, stb-style header-only libs were definitely an inspiration. I know some devs find the approach confusing, especially with linker errors if *_IMPLEMENTATION isn't handled correctly. I tried to keep it simple and clearly documented, but feedback like this helps improve it.
Const-me•6mo ago
I once did it for a closed-source CAM/CAE software. We wanted to generate high resolution and decent quality GIFs visualizing a progress of a numerical optimization in a few hundred animation frames. I wasn’t able to find a library which would deliver both reasonable size and good quality, so I made my own.

The trickiest part wasn’t the encoder; it’s computing the palette from RGB images. To minimize the output file size, I wanted a single palette shared by all frames.

The key piece of research was in that sample code from early 90-s https://www.ece.mcmaster.ca/~xwu/cq.c However, I had to rework it heavily because global variables and C language are too old school, also because FP32 precision is insufficient for the count of input pixels in my use case. 200 FullHD frames contain approximately 400M pixels, FP32 numbers don’t have the precision to accumulate that many of them. And the number is dangerously close to int32 limit, I have also upgraded the integer counters to int64.

triknomeister•6mo ago
This is very interesting that you did the visualization using a GIF. I have only generated mp4 videos for vidoes till now using ffmpeg and png images or through something equivalent. Was there any advantage of GIF that you found? Like may be it was easier to do on the fly or was just simple enough?
Const-me•6mo ago
I believe the reason why management specifically asked for animated GIFs was compatibility. The GIF format is ancient and supported by everything, makes it trivial to share or embed these animation files.

Ignoring the compatibility, modern video codecs like h264 or h265 are substantially better than animated GIFs, in terms of both size and quality.

BTW I supported them as well. The only target platform of that software is modern versions of Windows. It only took couple pages of straightforward C++ because the OS includes a functional equivalent of libavcodec and libavformat libraries. Moreover, GPU drivers install and register the components to leverage the codecs implemented by hardware of these GPUs. The high-level API to encode compressed video files from a sequence of frames is MFCreateSinkWriterFromURL function.

triknomeister•6mo ago
Very cool Thanks!
johnisgood•6mo ago
I wonder if the README.md of this project has been generated by an LLM, or if LLMs output such READMEs mainly because of their training data and thus mistakenly gets identified as LLM-generated README. The two are not mutually exclusive I suppose.

I checked the code, it gives me "LLM vibes", too. FWIW, I am not against it. Perhaps the developer was using it here and there. Personally I do not care.

triknomeister•6mo ago
It is a formally written README which is very usual in formal circle of communication, think proposal writing or papers etc. Outside, it is usual for people to do this when their primary exposure to English is through such channels or when they are not comfortable with having their personal style of talking be viewed by the public.

LLM is also similar in that sense, so it produces the same writing. It resists personal touch without being explicitly asked.

johnisgood•6mo ago
Whenever I tell an LLM to generate README.md for a project, it comes up with READMEs like this one, full of emojis (easy to generate README.md without them though).
mort96•6mo ago
The use of the AI emoji ("Sparkles"), plus the "Example Projects" section containing no example projects, certainly doesn't help it beat the AI allegations.
ck45•6mo ago
No allocations, reminds me of WUFFS, which also comes with a GIF decoder: https://github.com/google/wuffs/blob/main/std/gif/decode_gif...
alexvitkov•6mo ago
Statistically so far 100% of header only C libraries that require you to define XXX_IMPLEMENTATION are fantastic, so this is probably a good library.