frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ghostling

https://github.com/ghostty-org/ghostling
80•bjornroberg•3h ago

Comments

vintagedave•2h ago
The C file is small enough to read (over a few minutes.)

I got to about line 5 and realized: I’ve never seen quite that technique for embedding a font via an autogenerated header before. I’m more used to Windows resources; this seems to generate a byte array in CMake code. I’m somewhere between horrified and impressed, in that I feel we’ve finally discovered a cross platform binary resource embedding solution.

vintagedave•2h ago
And as a Windows programmer the use of a method called DrawTextEx surprised me :)

A really neat sample. Shows the power of the ghosttty library very well. The author chose well with their other libraries, it’s the kind of demo that lets the code actually demo what to trying to without much else getting in the way. Rather inspirational to wrote my own terminal app now.

fresh_broccoli•2h ago
Fun fact: XPM bitmaps were designed to be #included unmodified, the files contain C boilerplate: https://en.wikipedia.org/wiki/X_PixMap
simonw•1h ago
Here's the build script that uses: https://github.com/ghostty-org/ghostling/blob/main/bin2heade...

I ran it against a 1x1 pixel GIF:

  cmake -DINPUT=pixel.gif -DOUTPUT=pixel.h -DARRAY_NAME=pixel_gif -P bin2header.cmake
And got this:

  // Auto-generated from /private/tmp/exp/pixel.gif — do not edit.
  static const unsigned char pixel_gif[] = {
      0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x01, 0x00, 0x01, 0x00, 0x80, 0x00, 
      0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 
      0x01, 0x00, 0x01, 0x00, 0x00, 0x02, 0x02, 0x44, 0x01, 0x00, 0x3b
  };
kingforaday•1h ago
For cross-compilation ease it makes sense if you don't care about the size explosion.
electroly•1h ago
You can use `xxd` from the vim package to generate these. You'll find out pretty quickly that this is only suitable for small resources: gcc and clang blow up in both time and space on very large literal arrays. If you need to ship more than a few megabytes, find a different technique.

I used this technique for awhile, but it was too problematic for my use case. Now, I use https://github.com/lief-project/LIEF -- among other things, this project can modify Windows PE, macOS Mach-O, and Linux ELF binaries to add resources to them, then offers an API to read them back later. It's a little different for each format, but it's capable of doing all three and I was able to build a cross-platform resource-bundling system that doesn't care how big the resources are.

TacticalCoder•14m ago
> I’m somewhere between horrified and impressed, in that I feel we’ve finally discovered a cross platform binary resource embedding solution.

Maybe I'm misunderstanding your comment about having "finally discovered" that...

For to me embedding binary resources in source files is nothing new at all? It was definitely done in the early JavaScript days for a variety of reasons.

Arguably early basic listings that had lots of DATA text lines were already doing that. Maybe not the most portable but we're talking about the 70s and 80s here and definitely binary data in source code.

Games for the Atari ST and Amiga, for example, could partially share at least some of their source code and it wasn't uncommon to encode binary inside sources, including... Fonts! Back then fonts were not reused from one game to another.

Heck, I've done in Java (and Java is cross platform) in the past: quick visual debug tools for Java GUI apps to toggle a debug mode showing something not dissimilar to a HUD. Pixel-perfect fonts encoded in .java source files.

I really don't think it's anything new.

P.S: I'm pretty sure it's done like for some fonts in the Linux kernel too.

oDot•2h ago
I use libghostty for Trolley[0], which packages TUIs as desktop apps, like Electron does for web apps.

It really is quite an amazing piece of software. I just wrapped it in a useful GUI and a bundle/package CLI and it just works. Even on Windows. Kudos to the Ghostty developers.

[0] https://github.com/weedonandscott/trolley

nout•1h ago
I think your github readme is really missing a picture/screenshot to quickly understand what is the experience like. I.e. if your app is mainly about adding the chrome (as in the surrounding UI pixels) around the TUI, then it would be good to show what is the chrome like.
imiric•1h ago
This looks interesting.

I don't need my terminal emulator to support tabs, windows, or session management. My WM manages tabs and windows, and I use tmux for sessions, which also gives me a scrollback buffer, selection, clipboard, search, etc. This combination allows me to use any simple terminal emulator, such as urxvt, st, and now foot, without issues.

Ghostty didn't appeal to me, but I might give this a try. It's good that OSC support is planned. A plugin-like system, similar to st's but less cumbersome, would be nice to have.

OpenCode – Open source AI coding agent

https://opencode.ai/
423•rbanffy•4h ago•197 comments

Our commitment to Windows quality

https://blogs.windows.com/windows-insider/2026/03/20/our-commitment-to-windows-quality/
402•hadrien01•6h ago•721 comments

We rewrote our Rust WASM Parser in TypeScript – and it got 3x Faster

https://www.openui.com/blog/rust-wasm-parser
99•zahlekhan•3h ago•54 comments

Linux Applications Programming by Example: The Fundamental APIs (2nd Edition)

https://github.com/arnoldrobbins/LinuxByExample-2e
24•teleforce•1h ago•5 comments

Ghostling

https://github.com/ghostty-org/ghostling
82•bjornroberg•3h ago•10 comments

France's aircraft carrier located in real time by Le Monde through fitness app

https://www.lemonde.fr/en/international/article/2026/03/20/stravaleaks-france-s-aircraft-carrier-...
468•MrDresden•12h ago•389 comments

A Japanese glossary of chopsticks faux pas

https://www.nippon.com/en/japan-data/h01362/
110•cainxinth•4h ago•101 comments

Lent and Lisp

https://leancrew.com/all-this/2026/02/lent-and-lisp/
21•surprisetalk•2d ago•0 comments

Attention Residuals

https://github.com/MoonshotAI/Attention-Residuals
121•GaggiX•7h ago•19 comments

Show HN: We built a terminal-only Bluesky / AT Proto client written in Fortran

https://github.com/FormerLab/fortransky
42•FormerLabFred•3h ago•29 comments

The Los Angeles Aqueduct Is Wild

https://practical.engineering/blog/2026/3/17/the-los-angeles-aqueduct-is-wild
292•michaefe•3d ago•162 comments

An FAQ on Reinforcement Learning Environments

https://epoch.ai/gradient-updates/state-of-rl-envs
19•dcre•1d ago•2 comments

Show HN: I made an email app inspired by Arc browser

https://demo.define.app
45•johndamaia•7h ago•25 comments

VisiCalc Reconstructed

https://zserge.com/posts/visicalc/
163•ingve•3d ago•69 comments

Show HN: Red Grid Link – peer-to-peer team tracking over Bluetooth, no servers

https://github.com/RedGridTactical/RedGridLink
18•redgridtactical•3h ago•12 comments

Work_mem: It's a Trap

https://mydbanotebook.org/posts/work_mem-its-a-trap/
31•enz•2d ago•2 comments

The worst volume control UI in the world (2017)

https://uxdesign.cc/the-worst-volume-control-ui-in-the-world-60713dc86950
64•andsoitis•2d ago•30 comments

Show HN: Baltic shadow fleet tracker – live AIS, cable proximity alerts

https://github.com/FormerLab/shadow-fleet-tracker-light
30•FormerLabFred•4h ago•6 comments

Heisuke Hironaka Has Died

https://japannews.yomiuri.co.jp/society/general-news/20260319-317449/
6•pfortuny•1d ago•1 comments

Delve – Fake Compliance as a Service

https://deepdelver.substack.com/p/delve-fake-compliance-as-a-service
544•freddykruger•1d ago•191 comments

Entso-E final report on Iberian 2025 blackout

https://www.entsoe.eu/publications/blackout/28-april-2025-iberian-blackout/
172•Rygian•14h ago•74 comments

NumKong: 2'000 Mixed Precision Kernels for All

https://ashvardanian.com/posts/numkong/
27•ashvardanian•6h ago•0 comments

Parallel Perl – Autoparallelizing interpreter with JIT

https://perl.petamem.com/gpw2026/perl-mit-ai-gpw2026.html#/4/1/1
99•bmn__•2d ago•35 comments

Meme Buildings

https://misfitsarchitecture.com/2026/03/15/meme-buildings/
19•speckx•9h ago•1 comments

The Social Smolnet

https://ploum.net/2026-03-20-social-smolnet.html
110•aebtebeten•12h ago•13 comments

Discontinuation and reinitiation of dual-labeled GLP-1 receptor agonists

https://nautil.us/whiplash-heart-attack-and-stroke-risk-jumps-when-people-stop-taking-glp-1s-1279029
55•siquick•4h ago•80 comments

Video Encoding and Decoding with Vulkan Compute Shaders in FFmpeg

https://www.khronos.org/blog/video-encoding-and-decoding-with-vulkan-compute-shaders-in-ffmpeg
151•y1n0•4d ago•54 comments

Flash-KMeans: Fast and Memory-Efficient Exact K-Means

https://arxiv.org/abs/2603.09229
169•matt_d•3d ago•14 comments

ArXiv declares independence from Cornell

https://www.science.org/content/article/arxiv-pioneering-preprint-server-declares-independence-co...
718•bookstore-romeo•21h ago•249 comments

Show HN: An open-source safety net for home hemodialysis

https://safehemo.com/
40•qweliantanner•4d ago•6 comments