frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Show HN: Chawan TUI web browser

https://chawan.net/news/chawan-0-2-0.html
185•shiomiru•6h ago
A terminal-based web browser in Nim.[1] Has acceptable (YMMV) CSS rendering, some JS support, and inline images (sixel/kitty). It can also use various protocols other than http(s) such as (s)ftp, gopher, gemini, ...

Chawan started out as a w3m clone, and the UI still resembles it. However, the architecture has turned out quite different, with pages loaded in separate processes, and protocol/file type handling separated out into external binaries. An interesting result is that you can even register decoders for custom inline image formats, although practical use cases of this are rather minimal.

There is a gallery showcasing some websites being rendered here: https://chawan.net/gallery/index.html

[1]: https://nim-lang.org

Comments

hecanjog•6h ago
I love this browser, thank you for building it!
shiomiru•6h ago
Glad you like it :)
marcodiego•6h ago
GPM support?
shiomiru•5h ago
No GPM yet, but it does recognize XTerm's mouse protocol.
etaioinshrdlu•6h ago
I rabbit-holed a little and apparently Chrome and Safari no longer even fully pass Acid2 and Acid3?
ataylor32•5h ago
Here is a relevant discussion: https://news.ycombinator.com/item?id=15256890
ijustlovemath•5h ago
My jaw dropped when HN loaded first try from Termux! Nice work!
shiomiru•5h ago
Thanks :)

If you're interested, I posted a user style for HN here: https://lists.sr.ht/~bptato/chawan-devel/%3CD9S40OS2QWHL.PXQ...

Mainly just to fix the vote arrows, because for now background-image only renders placeholders.

corv•5h ago
Awesome and in Nim!
agumonkey•4h ago
as a tiny web fan, it's lovely to see projects like these, *claps*
greenspam•4h ago
Finally a good tool to view HN in terminal. Thank you! Where can I find the keyboard shortcuts? I can move with vim key binding, but can go back.
shiomiru•4h ago
cha-config(5) or about:chawan. The former also has an online version: https://chawan.net/doc/cha/config.html#pager-actions

For navigation in particular you'd use capital D to discard the current buffer and return to the previous page. There's also , (comma, back) and . (period, forward), which non-destructively cycle through the stack.

(Well, it's really a tree, but the UI mostly treats it as a stack.)

greenspam•3h ago
Thank you so much!
mikeponders•4h ago
Gotta love Nim
elcritch•4h ago
I recommend perusing the code. Since it’s in Nim it’s pretty approachable (and performant). There’s still lots of gnarly bits like implementing HTML DOM and web specs, but it doesn’t take you days to grasp the basic setup.
isaacvando•4h ago
This is super cool! Bravo. Awesome to see it written in Nim too.

When I do `cha example.com` I can't figure out how to use any of the commands (hjkl, etc). The only keys I've found that have any effect are typing numbers which show up in the bottom left. Haven't figured out how to do anything with those. Am I missing something obvious about how to use this or could this be a bug?

I built from source on MacOS Sequoia 15.5 Apple Silicon using Nim 2.24. Pages load correctly, I just can't get the commands to work. Thanks!

isaacvando•3h ago
I tried it in Ghostty, iTerm2, and Terminal.app and they all behaved the same.
shiomiru•3h ago
It's a bug, thanks for reporting. I've created a ticket: https://todo.sr.ht/~bptato/chawan/63

Could you please pull the macos-input branch from https://git.sr.ht/~bptato/chawan and report back on what the `a` file includes after opening a site and typing some commands? (Should be created in the current working directory.)

isaacvando•2h ago
Here's the contents of a. Let me know if there are any other commands you'd like me to type.

``` handleCommandInput 1, buffer "" c 'j' handleCommandInput 2, buffer "" c 'j' after handleCommandInput, buffer 0x104c5b780"j" c 'j' handleCommandInput 1, buffer "" c 'k' handleCommandInput 2, buffer "" c 'k' after handleCommandInput, buffer 0x104ca8b70"k" c 'k' handleCommandInput 1, buffer "" c 'l' handleCommandInput 2, buffer "" c 'l' after handleCommandInput, buffer 0x104c5bab0"l" c 'l' handleCommandInput 1, buffer "" c 'k' handleCommandInput 2, buffer "" c 'k' after handleCommandInput, buffer 0x104ca8d20"k" c 'k' handleCommandInput 1, buffer "" c 'j' handleCommandInput 2, buffer "" c 'j' after handleCommandInput, buffer 0x104c5b480"j" c 'j' handleCommandInput 1, buffer "" c 'h' handleCommandInput 2, buffer "" c 'h' after handleCommandInput, buffer 0x104ca89c0"h" c 'h' handleCommandInput 1, buffer "" c 'g' handleCommandInput 2, buffer "" c 'g' after handleCommandInput, buffer 0x104cae780"g" c 'g' handleCommandInput 1, buffer "" c '1' after handleCommandInput, buffer "" c '1' handleCommandInput 1, buffer "" c '2' after handleCommandInput, buffer "" c '2' handleCommandInput 1, buffer "" c '3' after handleCommandInput, buffer "" c '3' handleCommandInput 1, buffer "" c '1' after handleCommandInput, buffer "" c '1' handleCommandInput 1, buffer "" c '2' after handleCommandInput, buffer "" c '2' handleCommandInput 1, buffer "" c '2' after handleCommandInput, buffer "" c '2' handleCommandInput 1, buffer "" c '3' after handleCommandInput, buffer "" c '3' handleCommandInput 1, buffer "" c '\3' handleCommandInput 2, buffer "" c '\3' after handleCommandInput, buffer 0x104cae690"\3" c '\3' handleCommandInput 1, buffer "" c '\3' handleCommandInput 2, buffer "" c '\3' after handleCommandInput, buffer 0x104adaed0"\3" c '\3' handleCommandInput 1, buffer "" c '\3' handleCommandInput 2, buffer "" c '\3' after handleCommandInput, buffer 0x104ca8720"\3" c '\3' handleCommandInput 1, buffer "" c '\4' handleCommandInput 2, buffer "" c '\4' after handleCommandInput, buffer 0x104bf8d80"\4" c '\4' handleCommandInput 1, buffer "" c '\3' handleCommandInput 2, buffer "" c '\3' after handleCommandInput, buffer 0x104caaa80"\3" c '\3' handleCommandInput 1, buffer "" c '\4' handleCommandInput 2, buffer "" c '\4' after handleCommandInput, buffer 0x104ca8e40"\4" c '\4' ```

shiomiru•1h ago
Strange, so it sees your input but still doesn't evaluate the commands...

OK, let's try something else. On master, is anything written to the status line if you press `p` when started with

    cha -o'page.p="pager.alert(config.page.j)"' -V
lucideer•3h ago
Absolutely incredible. And it even supports gopher.
silasdb•2h ago
Wonderful! Thanks!

I see you don't use termcap/ncurses anymore. Do you perform terminal handling yourself directly?

Thanks again!

shiomiru•1h ago
Chawan never really used ncurses, only termcap. (ncurses just happens to implement termcap too.)

I started with termcap because I was already familiar with it through w3m. But termcap is an obsolete interface, and cannot describe the only useful attribute for modern terminals (true color). Its only benefit was "maybe it accidentally works on a hardware terminal from the 80s", which is cool but not really worth the extra failure mode.

So instead of migrating to terminfo, I ditched it completely in favor of terminal queries (which were already necessary for other reasons). There is still a built-in terminal database, to detect known TERM values with XTerm incompatibilities. But a terminal that correctly responds to queries will work out of the box, even if its TERM value is unknown.

zquestz•13m ago
This works great, been playing with it through s-search and it works way better than w3m. =)

Dungeon Rampage code rescued from a child's laptop and is relaunching on Steam

https://www.pcgamer.com/games/action/dungeon-rampage-interview/
2•chris_overseas•4m ago•0 comments

Social media overtakes TV as Americans' top news source

https://www.niemanlab.org/2025/06/for-the-first-time-social-media-overtakes-tv-as-americans-top-news-source/
1•thm•11m ago•0 comments

Paper ECG: An open-source application for digitizing ECG image scans

https://github.com/Tereshchenkolab/paper-ecg
1•teleforce•12m ago•0 comments

Missiles That Destroyed Air Defenses from Inside Iran Were Remotely Operated

https://www.twz.com/news-features/spike-missiles-that-destroyed-air-defenses-from-inside-iran-were-remotely-operated
1•nradov•15m ago•0 comments

Show HN: Wheretowatch.stream – See where movies/shows are streaming globally

https://www.wheretowatch.stream
2•ericrenan•15m ago•0 comments

Why Trump is abandoning US hegemony – and that's probably good [audio]

https://80000hours.org/podcast/episodes/hugh-white-hard-new-world-end-of-us-global-order/
3•michaelhoney•21m ago•1 comments

Enabling enhanced security for your app

https://developer.apple.com/documentation/Xcode/enabling-enhanced-security-for-your-app
1•transpute•28m ago•0 comments

Atproto OS – Web Desktops on the AT Protocol

https://github.com/atproto-os
2•dxlliv•32m ago•1 comments

GPT-4.5 preview in the OpenAI API will be shut down on July 14, 2025

https://platform.openai.com/docs/deprecations#2025-04-14-gpt-4-5-preview
1•peterdavehello•33m ago•0 comments

Waymo recalls more than 1,200 automated vehicles after minor crashes

https://www.latimes.com/business/story/2025-05-14/waymo-recalls-more-than-1-200-automated-vehicles-after-minor-crashes
3•andsoitis•36m ago•2 comments

Cross-social networks

https://yeldar.org/blog/cross-social-networks/
1•yeldar•40m ago•0 comments

Sound Static Data Race Verification for C [pdf]

https://patricklam.ca/papers/25.toplas.data-race-empirical.pdf
1•luu•41m ago•0 comments

Show HN: Kabit – A habit tracker

https://apps.apple.com/us/app/habit-tracker-kabit/id6511250768
2•iamrahulrao•41m ago•0 comments

Is embracing AI intellectual or anti-intellectual?

https://hollisrobbinsanecdotal.substack.com/p/is-embracing-ai-intellectual-or-anti
2•HR01•42m ago•0 comments

ECG-Image-Kit: A toolkit for analysis, synthesis, and digitization of ECG images

https://github.com/alphanumericslab/ecg-image-kit
1•teleforce•44m ago•0 comments

Rules, Not Renewables, Might Explain the Iberian Blackout

https://spectrum.ieee.org/spain-grid-failure
3•pseudolus•44m ago•0 comments

Mind Donation

https://blog.ayjay.org/brain-donation/
1•blueridge•48m ago•1 comments

California bill targets masked officers

https://www.msn.com/en-us/news/us/officers-who-cover-their-faces-could-be-charged-with-a-misdemeanor-under-california-proposal/ar-AA1GPMyt
1•eligrid•50m ago•0 comments

Law as Rhetoric, Rhetoric as Law: The Arts of Cultural and Communal Life (1985) [pdf]

https://www.lwionline.org/sites/default/files/2016-09/v5%20White.pdf
1•akkartik•50m ago•0 comments

Development of the trilogy & IV

https://web.archive.org/web/20231122204504/https://insiderockstarnorth.blogspot.com/
2•ibobev•53m ago•0 comments

Costco tests the waters with a stand-alone gas station for members

https://www.msn.com/en-us/money/companies/costco-tests-the-waters-with-a-stand-alone-gas-station-for-members/ar-AA1GPMXM
1•eligrid•55m ago•0 comments

Enrichment Data Testing Guide

https://blog.peopledatalabs.com/post/enrichment-data-testing-guide
1•mooreds•1h ago•0 comments

I Have Embraced Absurdism

https://feld.com/archives/2025/06/i-have-embraced-absurdism/
1•mooreds•1h ago•0 comments

MultiTerminalCodeViz

https://github.com/gkamradt/MultiTerminalCodeViz
1•handfuloflight•1h ago•0 comments

It's Not a Race

https://mintlify.com/blog/its-not-a-race
1•mooreds•1h ago•0 comments

The Science of Word Recognition (2022)

https://learn.microsoft.com/en-us/typography/develop/word-recognition
2•ripe•1h ago•1 comments

Hard-to-recycle thermoset waste plastics reborn as hydrogen

https://techxplore.com/news/2025-06-hard-recycle-thermoset-plastics-reborn.html
1•PaulHoule•1h ago•0 comments

University of New Mexico bayoneting incident

https://en.wikipedia.org/wiki/University_of_New_Mexico_bayoneting_incident
2•burnt-resistor•1h ago•0 comments

Ask HN: Why are PDFs so hard to edit?

3•superconduct123•1h ago•4 comments

'flight simulator' for seed startup investing

https://pitchine.com/
5•ssunboyy•1h ago•0 comments