frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Indian Culture

https://indianculture.gov.in/
1•saikatsg•2m ago•0 comments

Show HN: Maravel-Framework 10.61 prevents circular dependency

https://marius-ciclistu.medium.com/maravel-framework-10-61-0-prevents-circular-dependency-cdb5d25...
1•marius-ciclistu•2m ago•0 comments

The age of a treacherous, falling dollar

https://www.economist.com/leaders/2026/02/05/the-age-of-a-treacherous-falling-dollar
2•stopbulying•2m ago•0 comments

Ask HN: AI Generated Diagrams

1•voidhorse•5m ago•0 comments

Microsoft Account bugs locked me out of Notepad – are Thin Clients ruining PCs?

https://www.windowscentral.com/microsoft/windows-11/windows-locked-me-out-of-notepad-is-the-thin-...
2•josephcsible•5m ago•0 comments

Show HN: A delightful Mac app to vibe code beautiful iOS apps

https://milq.ai/hacker-news
2•jdjuwadi•8m ago•2 comments

Show HN: Gemini Station – A local Chrome extension to organize AI chats

https://github.com/rajeshkumarblr/gemini_station
1•rajeshkumar_dev•8m ago•0 comments

Welfare states build financial markets through social policy design

https://theloop.ecpr.eu/its-not-finance-its-your-pensions/
2•kome•12m ago•0 comments

Market orientation and national homicide rates

https://onlinelibrary.wiley.com/doi/10.1111/1745-9125.70023
3•PaulHoule•12m ago•0 comments

California urges people avoid wild mushrooms after 4 deaths, 3 liver transplants

https://www.cbsnews.com/news/california-death-cap-mushrooms-poisonings-liver-transplants/
1•rolph•13m ago•0 comments

Matthew Shulman, co-creator of Intellisense, died 2019 March 22

https://www.capenews.net/falmouth/obituaries/matthew-a-shulman/article_33af6330-4f52-5f69-a9ff-58...
3•canucker2016•14m ago•1 comments

Show HN: SuperLocalMemory – AI memory that stays on your machine, forever free

https://github.com/varun369/SuperLocalMemoryV2
1•varunpratap369•15m ago•0 comments

Show HN: Pyrig – One command to set up a production-ready Python project

https://github.com/Winipedia/pyrig
1•Winipedia•17m ago•0 comments

Fast Response or Silence: Conversation Persistence in an AI-Agent Social Network [pdf]

https://github.com/AysajanE/moltbook-persistence/blob/main/paper/main.pdf
1•EagleEdge•17m ago•0 comments

C and C++ dependencies: don't dream it, be it

https://nibblestew.blogspot.com/2026/02/c-and-c-dependencies-dont-dream-it-be-it.html
1•ingve•18m ago•0 comments

Show HN: Vbuckets – Infinite virtual S3 buckets

https://github.com/danthegoodman1/vbuckets
1•dangoodmanUT•18m ago•0 comments

Open Molten Claw: Post-Eval as a Service

https://idiallo.com/blog/open-molten-claw
1•watchful_moose•18m ago•0 comments

New York Budget Bill Mandates File Scans for 3D Printers

https://reclaimthenet.org/new-york-3d-printer-law-mandates-firearm-file-blocking
2•bilsbie•19m ago•1 comments

The End of Software as a Business?

https://www.thatwastheweek.com/p/ai-is-growing-up-its-ceos-arent
1•kteare•20m ago•0 comments

Exploring 1,400 reusable skills for AI coding tools

https://ai-devkit.com/skills/
1•hoangnnguyen•21m ago•0 comments

Show HN: A unique twist on Tetris and block puzzle

https://playdropstack.com/
1•lastodyssey•24m ago•1 comments

The logs I never read

https://pydantic.dev/articles/the-logs-i-never-read
1•nojito•26m ago•0 comments

How to use AI with expressive writing without generating AI slop

https://idratherbewriting.com/blog/bakhtin-collapse-ai-expressive-writing
1•cnunciato•27m ago•0 comments

Show HN: LinkScope – Real-Time UART Analyzer Using ESP32-S3 and PC GUI

https://github.com/choihimchan/linkscope-bpu-uart-analyzer
1•octablock•27m ago•0 comments

Cppsp v1.4.5–custom pattern-driven, nested, namespace-scoped templates

https://github.com/user19870/cppsp
1•user19870•28m ago•1 comments

The next frontier in weight-loss drugs: one-time gene therapy

https://www.washingtonpost.com/health/2026/01/24/fractyl-glp1-gene-therapy/
2•bookofjoe•31m ago•1 comments

At Age 25, Wikipedia Refuses to Evolve

https://spectrum.ieee.org/wikipedia-at-25
2•asdefghyk•34m ago•4 comments

Show HN: ReviewReact – AI review responses inside Google Maps ($19/mo)

https://reviewreact.com
2•sara_builds•34m ago•1 comments

Why AlphaTensor Failed at 3x3 Matrix Multiplication: The Anchor Barrier

https://zenodo.org/records/18514533
1•DarenWatson•35m ago•0 comments

Ask HN: How much of your token use is fixing the bugs Claude Code causes?

1•laurex•39m ago•0 comments
Open in hackernews

Learn x86-64 assembly by writing a GUI from scratch (2023)

https://gaultier.github.io/blog/x11_x64.html
263•ibobev•4mo ago

Comments

userbinator•4mo ago
This is more like "by communicating with the X server", which is not exactly the level of "from scratch" I was expecting, but then again, it's more involved than the equivalent in Win32 that's not much more than filling in some structures and invoking a few functions.
signa11•4mo ago
seesh ! what would `from scratch` mean for you ? invent the whole universe ?
userbinator•4mo ago
I was expecting something closer to direct framebuffer writes, as is often done in the various write-an-OS articles that get posted here semi-regularly.
signa11•4mo ago
i on the other hand, just loved the article.

was a bit confused about the segfault stuff mentioned towards the beginning of the article. but got quite quickly disabused of that notion with gdb etc.

chickenzzzzu•4mo ago
KMSDRM is soooo much more fun than X. Truly the way programs were meant to be.
sim7c00•4mo ago
and then once it works u can slap it to ur own OS and avoid the rest of linux too! yay! :')
chickenzzzzu•4mo ago
that is correct, id rather attempt to understand the hdmi protocol before i understand 50 million lines of linux ^.^
sim7c00•4mo ago
no u just grab the framebuffer addr somewhere (lot of places u can dig that up) and ram in the right type of pixels. :'). this article demoes exactly 0 GUI functionality...
theamk•4mo ago
Talk to hardware directly

Most "from scratch" would be some sort of microcontroller - write directly to hardware, program registers directly. It's the best feeling when you know every single instructions on the CPU is under your control, there is no 20 million lines of kernel code that do something.

But the MCU needs special hardware (MCU itself, display, programmer) so it is not a good starting project. This brings us to good old MS-DOS. Sure, you need to call BIOS to set up graphics (mode 13h, "320x200x256 colors" is the best for beginners), but after that, you are talking directly to hardware.

vidarh•4mo ago
It's not even that much more involved, just tedious. The serialization/deserialization of X requests and responses is fairly straight-forward (it could be more straightforward - it's not a very nice protocol, but it's also not difficult), as the article also shows, and it can be made more compact than that with a couple of helpers.

The biggest pain in doing "raw" X is the async nature of the protocol - to write a robust X client you really want an event-loop driven approach that embraces that like XCB does, instead of trying to paper over it (like Xlib did).

jcranmer•4mo ago
This reminds me of the time I was a young, naïve idiot, and decided I would learn GTK by writing some basic app in GTK. In x86 (not x86-64) assembly. Like all of my other project ideas from that era, never went anywhere, and I horribly underappreciated just how complicated things were.

Kudos for actually getting somewhere in their attempt to do this, a further state than I ever managed.

iberator•4mo ago
I currently re-learn ASM by writing my own virtual machine with my own cpu architecture and instruction set. Its FUN :)

I never expected to write programs in pure machine code before, but here I am. Writing my own assembler now :)

Way easier than C++ LOL

I highly recommend it.

mettamage•4mo ago
How so? I know some of both but not enough to know why C++ is that much more complex.
bitexploder•4mo ago
C++ is an advanced programming language with a couple decades of features. Assembly is very simple in terms of syntax, requiring an hour to understand the basics. Assembly is simple if you know the processor you are writing against. It can take some time to learn instructions and figure out how to implement familiar programming constructs like loop and logic conditions. The simplicity of assembly comes with a cost: it takes many more lines of assembly to do simple things compared even to C. The lack of abstraction and language features make assembly very simple, but not easy for large programs.
esafak•4mo ago
When you don't know what you don't know...

In my youth, kids learned assembly to crack games.

serpenskisidiot•4mo ago
Hehe, when I was a teen, I wrote a gameboy emulator. Was not fun
farhanhubble•4mo ago
I learned X86 ASM by sinking my teeth into the Intel 8085 manual, then lighting up LEDs on a hardware emulator and later on a 8085 simulator that me and my brother built.

What certainly helped was that I had did some digital design and instruction set architecture, etc.

Later on, I did some real-world assembly programming for the PIC microcontrollers and some inlined assembly in C, which I did not find daunting at all because of my previous experience.

I guess the best prerequisite for this material is having done some low-level C, the kind where you know about text/data sections and being comfortable with calling conventions, the run time and the linking process.

tomhow•4mo ago
Previously:

Learn x86-64 assembly by writing a GUI from scratch - https://news.ycombinator.com/item?id=36153237 - June 2023 (146 comments)

DeathArrow•4mo ago
Using X11 isn't exactly from scratch.
actionfromafar•4mo ago
Perhaps unintuitively, the recipe for writing a GUI from scratch is almost exactly the same as making an apple pie from scratch, save some minor details at the very end.
bitwize•4mo ago
First, invent the universe (left as an exercise)
pjc50•4mo ago
Corresponding Windows article: https://bitcodersblog.wordpress.com/2017/05/10/win32-in-nasm...

(but yes, I also would have expected a bit more "from scratch". Is there an annotated disassembly of, say, AmigaOS around?)

thedumbname•4mo ago
XQuartz does not support high resolution displays, that is not what macOS users looking for.
praptak•4mo ago
I was curious about the rep movsb, so I tried to compare this with how a compiler would copy a known small size chunk of memory. It seems pretty complicated. I didn't manage to make a compiler generate the `rep movsb` idiom but I managed to find out some interesting stuff:

- small, known size moves are stitched from a fixed number of mov instructions, sometimes overlapped. For example 21 bytes is qword (8 bytes) + xmmword (16 bytes), overlapped.

- char-copying loops like "a++ = b++ c times" with c not known at compile time are either realized as simple increase, compare, conditional jump, or, at higher optimization, a monster that has like 10 branches to use anything from xmmword to byte depending on the amount of data

- big, known size moves (> 256 bytes) just generate a call to memcpy

rfl890•4mo ago
(on Linux/X11, which should have been mentioned in the title)
hamburglar•4mo ago
I have to say, writing a GUI is one of the last places I’d ever find it appropriate to use assembly language. Man, those click handlers are going to be fast.
kristianp•4mo ago
Does anyone know of a C version of this, communicating with the X server without libraries?