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•12m ago
This works great, been playing with it through s-search and it works way better than w3m. =)

ZX Spectrum graphics magic

https://zxonline.net/zx-spectrum-graphics-magic-the-basics-every-spectrum-fan-should-know/
30•ibobev•1d ago•0 comments

What happens when clergy take psilocybin

https://nautil.us/clergy-blown-away-by-psilocybin-1217112/
82•bookofjoe•6h ago•85 comments

Generative AI coding tools and agents do not work for me

https://blog.miguelgrinberg.com/post/why-generative-ai-coding-tools-and-agents-do-not-work-for-me
94•nomdep•3h ago•76 comments

Show HN: Canine – A Heroku alternative built on Kubernetes

https://github.com/czhu12/canine
171•czhu12•9h ago•80 comments

Benzene at 200

https://www.chemistryworld.com/opinion/benzene-at-200/4021504.article
186•Brajeshwar•12h ago•95 comments

Snorting the AGI with Claude Code

https://kadekillary.work/blog/#2025-06-16-snorting-the-agi-with-claude-code
230•beigebrucewayne•16h ago•142 comments

Show HN: Chawan TUI web browser

https://chawan.net/news/chawan-0-2-0.html
185•shiomiru•6h ago•24 comments

Show HN: Nexus.js - Fabric.js for 3D

https://punk.cam/lab/nexus
49•ges•7h ago•18 comments

Battle to eradicate invasive pythons in Florida achieves milestone

https://phys.org/news/2025-06-eradicate-invasive-pythons-florida-stunning.html
28•wglb•5h ago•22 comments

WhatsApp introduces ads in its app

https://www.nytimes.com/2025/06/16/technology/whatsapp-ads.html
256•greenburger•14h ago•347 comments

Ask HN: How to Deal with a Bad Manager?

46•finik_throwaway•2h ago•37 comments

Selfish reasons for building accessible UIs

https://nolanlawson.com/2025/06/16/selfish-reasons-for-building-accessible-uis/
12•feross•2h ago•3 comments

How Frogger 2’s source code was recovered from a destroyed tape [video]

https://www.youtube.com/watch?v=lvEO4IaEJlw
17•perching_aix•1d ago•0 comments

Dull Men’s Club

https://www.theguardian.com/society/2025/jun/09/meet-the-members-of-the-dull-mens-club-some-of-them-would-bore-the-ears-off-you
84•herbertl•9h ago•47 comments

Open-Source RISC-V: Energy Efficiency of Superscalar, Out-of-Order Execution

https://arxiv.org/abs/2505.24363
66•PaulHoule•10h ago•17 comments

Privacy implications of browsers’ (mis)implementations of Widevine EME (2023)

https://hal.science/hal-04179324v1/document
86•exceptione•5h ago•48 comments

OpenAI wins $200M U.S. defense contract

https://www.cnbc.com/2025/06/16/openai-wins-200-million-us-defense-contract.html
100•erikrit•5h ago•55 comments

Show HN: Zeekstd – Rust Implementation of the ZSTD Seekable Format

https://github.com/rorosen/zeekstd
180•rorosen•1d ago•40 comments

Blaze (YC S24) Is Hiring

https://www.ycombinator.com/companies/blaze-2/jobs/dzNmNuw-junior-software-engineer
1•faiyamrahman•6h ago

Retrobootstrapping Rust for some reason

https://graydon2.dreamwidth.org/317484.html
106•romac•7h ago•35 comments

OpenTelemetry for Go: Measuring overhead costs

https://coroot.com/blog/opentelemetry-for-go-measuring-the-overhead/
101•openWrangler•12h ago•36 comments

What I talk about when I talk about IRs

https://bernsteinbear.com/blog/irs/
11•surprisetalk•3d ago•12 comments

Working on databases from prison

https://turso.tech/blog/working-on-databases-from-prison
722•dvektor•15h ago•465 comments

Nanonets-OCR-s – OCR model that transforms documents into structured markdown

https://huggingface.co/nanonets/Nanonets-OCR-s
288•PixelPanda•21h ago•67 comments

Breaking Quadratic Barriers: A Non-Attention LLM for Ultra-Long Context Horizons

https://arxiv.org/abs/2506.01963
46•PaulHoule•8h ago•19 comments

Finland warms up the world's largest sand battery, the economics look appealing

https://techcrunch.com/2025/06/16/finland-warms-up-the-worlds-largest-sand-battery-and-the-economics-look-appealing/
37•pseudolus•1h ago•2 comments

Is gravity just entropy rising? Long-shot idea gets another look

https://www.quantamagazine.org/is-gravity-just-entropy-rising-long-shot-idea-gets-another-look-20250613/
270•pseudolus•1d ago•231 comments

Adding public transport data to Transitous

https://www.volkerkrause.eu/2025/06/14/transitous-adding-data.html
51•todsacerdoti•2d ago•0 comments

Show HN: dk – A script runner and cross-compiler, written in OCaml

https://diskuv.com/dk/help/latest/
56•beckford•12h ago•7 comments

Identity Assertion Authorization Grant

https://www.ietf.org/archive/id/draft-parecki-oauth-identity-assertion-authz-grant-03.html
11•mooreds•4d ago•3 comments