News for hackers. Stuff that matters.
Re:Ask HN: What are you working on? (November 2026) by silvajoao on Monday November 09, 2026 @06:27AM (#50424134)
I've been building a web browser in C from scratch, without any libraries and without AI.

This is finally approaching a usable state: navigates and renders Wikipedia, supports TLS, builds on Windows, macOS and Linux, loads PNGs and JPEGs, etc.

I'm going to opensource this once it supports most of CSS 2.2 layout and renders HN too (HN is totally blank right now, because it's a giant <table> which is still a TODO :-) )

I still don't know what to do with this. It's been a huge passion project and I'm very happy about it. I planned to create a book or video course about C programming, starting from printf("Hello world!\n") and ending up with a working browser; but the advent of AI coding agents in the past 2 years changed a lot the market for such a course.

I'm still finishing this due to stubbornness and some sunken cost fallacy effect :-)

Would love to hear feedback and ideas about such a project.

Re:Ask HN: What are you working on? (November 2026) by pipe01 on Monday November 09, 2026 @07:17AM (#50424572)
That's impressive, how long have you been working on it?
Re:Ask HN: What are you working on? (November 2026) by silvajoao on Monday November 09, 2026 @07:44AM (#50424821)
The first commit of v1 was in Oct 2022, so it's been about four years.

Just looked at a few more metrics:

v1 was 148 commits over about a year; gave up when it came to TTF font parsing and rendering.

v2 was 1075 commits over 3 months and in C++, gave up after doing sockets but realizing that TLS and crypto was going to be required. I also strongly disliked the C++ codebase :-)

The current repo is v3 and back in C, started in Oct 2024 (2 years), and it's 4822 commits. About 600 .c and .h files, about 68k lines of code (14k blank, 7k comments).

I had a lot of previous experience with networking and systems programming, but not with rendering.

A huge inspiration was https://guide.handmadehero.org/ and Bob Nystrom's https://www.craftinginterpreters.com. I wanted to create a similar book and video series, but by building a browser.

Re:Ask HN: What are you working on? (November 2026) by cbrpnk on Monday November 09, 2026 @07:33AM (#50424730)
Where can I follow development?
Re:Ask HN: What are you working on? (November 2026) by silvajoao on Monday November 09, 2026 @07:51AM (#50424895)
I haven't been building in the open, because I wasn't sure I would ever finish this! :-)

I'm currently planning to opensource early next year and I will definitely post to HN.

(The original name for this project was "Hacker's Browser", as in, an HN browser :-) But then I figured that Wikipedia worked pretty well and grew in scope from there...)

I'll also be looking for early testers soon, to verify that this thing builds on various platforms before the public release. If you're open to try this early on then see my profile to get in contact.

Re:Ask HN: What are you working on? (November 2026) by silvajoao on Monday November 09, 2026 @11:10AM (#50427489)
I've just set up https://buttondown.com/browser-journey if you'd like to be notified once it's opensourced.
Re:Ask HN: What are you working on? (November 2026) by MrMetric on Monday November 09, 2026 @08:12AM (#50425133)
Knowing how to work without AI is valuable (what a surreal sentence to type). The first step of that is knowing it's possible. Years and years ago, when I got started programming, seeing projects like this taught me I can make anything I want, and I can always learn how to do it. There's no far-off wizard tower that must be relied upon to make everything for you.

What I'm saying is, I think this kind of thing will help the young'uns realize they can do it too. That fact is, unfortunately, far from obvious. One of the worst anecdotes I have from elementary school was of asking the librarian (who also oversaw the computer lab) who made OpenOffice, because I wanted to learn about how software works and figured that'd be a good start, and hearing her immediately dismiss the question by saying "People a lot smarter than us!" in front of the whole class. I can only hope nobody internalized that.

Also, out of curiosity from this topic being heavily on my brain lately, might I ask how you load images? Are you using libraries, or did you write any decoders yourself? Back in the day, my far less experienced self tried writing a BMP decoder, then learned about fuzzing and broke it instantly. Now that was a fun learning experience.

I recently did some playing around with having AIs test PNG decoders and it was as much of a mess as I expected. Broke a few in under an hour from casual prompting, and found weird bugs and oversights in every single one over a few days of not-so-casual prompting. (If you want to check reliability yourself, I found it eye-opening to run against a test corpus made from combining every major project's own corpus, and checking the pixel output, not just whether or not it crashed or ate all your RAM.)

Re:Ask HN: What are you working on? (November 2026) by silvajoao on Monday November 09, 2026 @08:28AM (#50425317)
Thanks for sharing the school story. I totally get behind that sentiment -- knowing how to build things yourself is very satisfying and you should believe that you can do it too. The earlier you get that lesson in life, the better!

I love how John Carmack put it: [1]

  You can't know everything, but you should convince yourself that you can know anything.
The Handmade Hero series [2] channels this feeling really well, and I wanted to convey it again by building a browser from scratch but with a limited scope (Wikipedia, HN; no Javascript, but also no libraries and no AI).

I also loved tutorials in the 90s like "build your own OS", "build your own bootloader", "build your own C compiler", etc; build your own printf(), your own malloc, etc. Learned a lot this way!

  might I ask how you load images? Are you using libraries, or did you write any decoders yourself?
No libraries means no libraries! :-) The decoders are written by hand, following the specs. They don't support every single configuration (e.g. JPEG has TONS of variants), but good enough for the media in Wikipedia.

This browser is a learning experience and it's definitely NOT secure (e.g. TLS "works" but it doesn't verify server certificates at all...). The decoders use a set of shared utilities for decoding big-endian/little-endian, 16 bits, 32 bits, etc and checking for overflows (using setjmp/longjmp for convenience). I think it's pretty good, and I also bet that Claude would find many problems. I'm prioritizing (1) code that works, then (2) code that's performant, and then (3) code that's clear.

I'm ambivalent about throwing AI at this codebase. It would definitely find issues and improve it, but I also want to keep the spirit of "Do It Yourself" and the feeling of "We built this and it works".

[1] Searched the quote from memory, Google found it here: https://transcript.baribarilab.com/video/HOv_dWDgIRM/

[2] https://guide.handmadehero.org/

Re:Ask HN: What are you working on? (November 2026) by MrMetric on Monday November 09, 2026 @09:17AM (#50425994)
Now, when you say no libraries, exactly how far does that go? I unfortunately, a couple years ago, suffered through insisting I wanted to use C++ without the standard libraries, not even crt0, and finding documentation on how anything works was a huge pain in the ass.

Actually, what sold me on bothering with LLMs was asking one, last year, how to call a kernel syscall with GCC's inline assembly syntax, and seeing the answer be exactly what I needed... after I had already cobbled everything together myself! (I do not consider random mailing list archives to be documentation!)

I didn't mean to say you should have an AI inspect your code, though. (I've personally found value in that technique, because current frontier models can recognize problems way better than their lackluster ability to avoid writing those same problems repeatedly into their own disgusting code. I can still just write the code myself, with another eye on it.)

I just really like fuzzing and really like differential analysis. For example, one of the images in my test suite decodes to one set of pixels with FFmpeg, libpng, stb_image, among others, and decodes to a different set of pixels with libspng, lodepng, Java's ImageIO, and other others (as far as I can tell, the reason is ambiguous 2nd-ed spec wording that isn't obviously ambiguous when you read it). You can, by hand, quite easily fuzz one implementation against another, running them in parallel against the same inputs, and make a mismatch crash the test runner so the fuzzer flags an error.

Incidentally, asking Claude Fable 5 to do that usually triggers a cybersecurity block for me. Another point in favor of knowing things by hand...

Not that I'm saying you should drop everything and do this. I just like talking about it. Learning-experience projects get easily spoiled by trying too hard, which I did learn the hard way. Then again, I did hella enjoy practicing being aware of code coverage when I wrote a few prototype compilers. Researching online when I was making my first one is how I learned about Jonathan Blow and Casey Muratori, by the way. I don't follow Handmade Hero, but I do wholeheartedly approve of its existence.

> I also loved tutorials in the 90s like "build your own OS", "build your own bootloader", "build your own C compiler", etc; build your own printf(), your own malloc, etc. Learned a lot this way!

You must be older than me! I was born in the 90s, and the usual reaction I expect to saying I built my own memory allocator is incredulity because "why make something that already exists?" or "ew, you should've used Rust".

I haven't run across that Carmack quote before, but I've told plenty of people the same thing in my own words. I think one of the most important parts of it that I've learned is this: You can't learn something without screwing up. I don't mean that making mistakes is a goal to target. I mean that you can't learn without the errors along the way. If you always get everything right, that's just luck, and you haven't learned yet.

And I must say, I miss the days when "grok" was a weird word some programmers use, not an AI brand.

Anyway, I'd be quite curious to see your project if you ever put it up in public. I wouldn't worry about polishing it, really. In high school, I still didn't know people normally write rough drafts of stories and draw sketches long before making the finished piece. Never saw any of that, so I thought my inability to "oneshot" these things with the results of a high-skill artist meant inherent lack of talent. If all you ever see is finished refined products, how can you possibly know better?

Re:Ask HN: What are you working on? (November 2026) by silvajoao on Monday November 09, 2026 @09:51AM (#50426436)

  Now, when you say no libraries, exactly how far does that go?
No libraries at all like stb_image, openssl, libcurl, etc. But it does use the platform APIs to create a window, get keyboard and mouse events, create TCP sockets, etc. It uses some libc calls like printf and malloc, but then it has its own memory allocators and arenas for DOM objects, CSS rules, and other common objects.

On Windows it just targets Win32.

On macOS it uses a bit of Objective-C to create an NSWindow and for the main message loop.

On Linux it uses libxcb to connect to X11. I planned on using Xlib originally, but libxcb is closer to the protocol and IMO cleaner. After using it I also got a sense that the X11 protocol is pretty straightforward, so I might just replace libxcb with a custom implementation.

For example, I need to query DBus for things like the desktop theme preference (dark/light) but didn't want to link build the DBus protocol messages from XML in the build, so it just queries libdbus directly and parses all the messaging. Maybe it should have a custom DBus client too...

(Linux doesn't have a "native" UI, so I made this exception on that platform to be able to make windows, etc as in the other platforms)

---

There are lots of reasons to "do it yourself" (and lots of good reasons NOT to do it too -- I wouldn't do this professionally!)

My goal here was to make a presentable and polished product, so I spent some time on code quality, correctness, performance, etc. and in presenting a nice browser that feels familiar. Here's a screenshot: https://imgur.com/a/ojWvciR

More than anything, I really like being in the flow and feeling the joy of programming -- building something step by step and seeing the results incrementally. A browser is quite a nice project for that, since you have the whole web to interact with and lots to implement.

Re:Ask HN: What are you working on? (November 2026) by bjornsing on Monday November 09, 2026 @08:32AM (#50425364)
> This is finally approaching a usable state: navigates and renders Wikipedia, supports TLS, builds on Windows, macOS and Linux, loads PNGs and JPEGs, etc.

So you’re implementing TLS (including RSA, elliptic curve, etc), JPEG decoding and PNG decoding from scratch? :)

Re:Ask HN: What are you working on? (November 2026) by silvajoao on Monday November 09, 2026 @08:49AM (#50425559)
Correct! :-) It's been a lot of fun!

TLS is always version 1.2, and only the mandatory cypher suites are supported: TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 and TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256.

This requires SHA256, AES and two elliptic curves (x25519 and secp256r1).

AES is used in GCM mode, so that's implemented too.

However, the browser doesn't verify the server signature over its certificate. So ECDSA and RSA are not implemented :-)

Getting TLS to work was indeed one of the more frustrating parts. The cryptographic functions are very well documented and there are lots of good test vectors, so that wasn't too hard (just a lot of work). But getting TLS working was very frustrating -- the handshake would complete, I'd switch to encrypting mode, and... the server would just disconnect my client instantly, with no further feedback or a stacktrace or anything.

I ended up debugging that by building openssl with LOTS of printfs all over the place and fixed nonces, talking to a local HTTPS server, and tried to make my client emit exactly the same bytes until I found the issue -- memory corruption, of course :-)

I built on amazing tutorials available online. For example, elliptic curve cryptography and x25519 in particular are SUPER well explained at [1].

JPEG was fun too. Tutorials like [2] gave a great overview of how it works, and the spec [3] is super clear (but includes TONS of optional stuff that can be skipped)

PNG was the easiest, the RFC is very straightforward [4].

(I actually did the PNG decoder before doing fonts, because the TTF format is so crazy that I always decided to using bitmaps fonts loaded via PNGs instead)

It's super satisfying to build ~300 sources in ~2 seconds from scratch using just MSVC, Xcode or Make, and then launching Wikipedia -- no libraries, and it works :-)

[1] https://www.cl.cam.ac.uk/teaching/2122/Crypto/curve25519.pdf

[2] https://www.youtube.com/watch?v=0me3guauqOU

[3] https://www.w3.org/Graphics/JPEG/itu-t81.pdf

[4] https://www.rfc-editor.org/info/rfc2083/

Re:Ask HN: What are you working on? (November 2026) by silvajoao on Monday November 09, 2026 @08:59AM (#50425707)
Let me also list some of the big things that are NOT included:

No Javascript :-) React sites are completely blank, like instagram.com.

No GL/DirectX/Vulkan. It's all software rendered and it just blits a pixel array to screen on every frame. Highly portable though!

Font rendering is antialiased but it's not hinted, and small glyphs at low DPI look start looking blurry.

No Wayland support, only X11 because it's the most widely available. I might do a Wayland port later.

All in one process, one thread per tab. No process isolation (also something to do later)

Only HTTP/1.1 and TLS 1.2, no HTTP2 or later. No IPv6, only IPv4.

No SVG, no <canvas>, no form controls (buttons, etc.), no cookies support (for now...)

The CSS support however is bigger than CSS 2.2: there's var(), --custom-properties, @media queries, etc. and I'm planning to do flex and grid layout too (because Wikipedia uses that a lot).

Re:Ask HN: What are you working on? (November 2026) by bjornsing on Monday November 09, 2026 @11:32AM (#50427863)
Super impressive. :) How do you finance this work?
Re:Ask HN: What are you working on? (November 2026) by silvajoao on Monday November 09, 2026 @12:10PM (#50428386)
The correct and direct answer is, I worked at Google for 14 years :-)

I left the job 2 years ago to focus on many personal pursuits, including this one.

I still don't know whether to continue after opensourcing, it will depend a lot on reception and whether there's any funding or support. We'll see!

Re:Ask HN: What are you working on? (November 2026) by bjornsing on Monday November 09, 2026 @01:51PM (#50429824)
> I worked at Google for 14 years :-)

Congrats! Hope funding and support works out.

Re:Ask HN: What are you working on? (November 2026) by crediblejhj on Monday November 09, 2026 @08:33AM (#50425372)
You are working on an incredible project! I hope I can see your project soon :)
Re:Ask HN: What are you working on? (November 2026) by silvajoao on Monday November 09, 2026 @08:52AM (#50425611)
Thank you!

It's very encouraging to see that there was a positive reception on HN, this is the first time that I talk about it publicly. Really enjoying the extra motivation to getting this released now :-)

Re:Ask HN: What are you working on? (November 2026) by Emjayen on Tuesday November 10, 2026 @04:49AM (#50438079)
Very cool - writing a browser has been on my own project todo list for going on 10 years now; like you I also write everything myself with few exceptions.

The problems I when would muse about it were (very broadly):

- Text rendering, but really layout/shaping, especially for complex scripts like Arabic.

- JavaScript, which unfortunately seems like a necessity for the modern age.

- The very relaxed parsing of HTML/CSS. It's surprising just what browsers will tolerate in terms of malformed syntax yet still get a functional website out of it.

My goal was always going to be to get Wikipedia working also.

The affirmed absence of 'AI' usage certainly adds to this project's respectable status among this post aswell.

Re:Ask HN: What are you working on? (November 2026) by silvajoao on Tuesday November 10, 2026 @11:41AM (#50442787)

  Very cool - writing a browser has been on my own project todo list for going on 10 years now; like you I also write everything myself with few exceptions.
Maybe you'd like to follow a book building a browser? :-)

One of the ideas is to allow readers to build along in their own programming language, or using AI. The main material is more about the building blocks and what needs to be done; the C coding can be skipped.

  Text rendering, but really layout/shaping, especially for complex scripts like Arabic.
There are lots of problems involved: parsing TTF, rasterizing the glyph shapes, line layout in CSS, avoiding floats, multiple styles (line-height, vertical-align, decorations, etc), just to make something quite simple.

I'm not doing text shaping, so Arabic will look strange. Also no RTL like Arabic and Hebrew, and no support for CJK scripts yet (that should be easier, using the Google Noto font. Needs a huge builtin map from codepoints to which fonts have those glyphs; each TTF file has at most just 2^16 glyphs, which isn't enough.)

  JavaScript, which unfortunately seems like a necessity for the modern age.
Indeed, it's a pity that React sites won't work at all without Javascript. Doing a Javascript interpreter is very doable; I strongly recommend Crafting Interpreters as an excellent book that builds an interpreter for a language that is very similar to Javacript.

But the bigger piece is doing all the DOM bindings and web APIs.

The HN <script> payload is very easy to handle though: https://news.ycombinator.com/hn.js?FmJw8tvF5GVURtPJ592v

  The very relaxed parsing of HTML/CSS. It's surprising just what browsers will tolerate in terms of malformed syntax yet still get a functional website out of it.
You'd be surprised! The HTML5 spec is actually very comprehensive about how to handle errors cases as well. Take a look:

https://html.spec.whatwg.org/multipage/parsing.html#parsing-...

I'm not handling all of the edge cases, only the standard <!DOCTYPE html> stuff i.e. I don't handle quirks in any special way. I guess most of those quirks are meant to handle older web pages and the way they rendered in IE back then.

  My goal was always going to be to get Wikipedia working also.
That's a great goal, and it helps a lot to scope down what needs to be built.

Here's a screenshot of Wikipedia so far: https://imgur.com/a/vG0U3in

(small hack in that screenshot: the flex and grid layouts are getting replaced with blocks instead)

I'm thinking of doing an Advent of Code series for next year, to build a very minimal browser just for Wikipedia but with lots of shortcuts :-) For example, using a local HTTP proxy to avoid having to handle TLS, which is quite a big of work to get working.

Re:Ask HN: What are you working on? (November 2026) by chiroyce on Tuesday November 10, 2026 @10:54AM (#50442138)
woah, TIL that all pages on HN are a <table>!
Re:Ask HN: What are you working on? (November 2026) by silvajoao on Tuesday November 10, 2026 @11:28AM (#50442636)
Another fun detail: the [Y] icon on the top-left is an SVG.

After having a PNG decoder, and a BMP and ICO decoder to support favicons in tabs, only then did I find out that this resource is an SVG :-) An SVG renderer is quite a piece of work...

Yet another interesting detail: the Javascript is quite simpler, it seems to be mostly about submitting votes and collapsing comments. A small Javascript interpreter and just a few DOM hooks would be enough to support comment collapse toggling. Maybe that will come later :-)

Re:Ask HN: What are you working on? (November 2026) by MuGlobe on Friday November 20, 2026 @10:38AM (#50576324)
There could be a lot of use for this in resource constrained embedded space like PIC processors. Have you looked into that>