I see you don't use termcap/ncurses anymore. Do you perform terminal handling yourself directly?
Thanks again!
isaacvando 3 hours 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 2 hours ago [-]
I tried it in Ghostty, iTerm2, and Terminal.app and they all behaved the same.
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 1 hours 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 12 minutes 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
greenspam 3 hours 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.
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 2 hours ago [-]
Thank you so much!
hecanjog 5 hours ago [-]
I love this browser, thank you for building it!
shiomiru 5 hours ago [-]
Glad you like it :)
ijustlovemath 4 hours ago [-]
My jaw dropped when HN loaded first try from Termux! Nice work!
Mainly just to fix the vote arrows, because for now background-image
only renders placeholders.
elcritch 3 hours 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.
lucideer 2 hours ago [-]
Absolutely incredible. And it even supports gopher.
mikeponders 3 hours ago [-]
Gotta love Nim
corv 4 hours ago [-]
Awesome and in Nim!
etaioinshrdlu 4 hours ago [-]
I rabbit-holed a little and apparently Chrome and Safari no longer even fully pass Acid2 and Acid3?
I see you don't use termcap/ncurses anymore. Do you perform terminal handling yourself directly?
Thanks again!
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!
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.)
``` 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' ```
OK, let's try something else. On master, is anything written to the status line if you press `p` when started with
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.)
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.