~bptato

Trackers

~bptato/chawan

Last active 8 days ago

#20 Network stuff 3 days ago

Comment by ~bptato on ~bptato/chawan

newhttp is now the default HTTP(s) client on master. Goodbye curl :P

(The old client remains available in bonus/ as make install-curlhttp.)

Next step: do something about persistent connections. I'm thinking a new protocol would be ideal, since neither SCGI nor FastCGI can implement some zero-copy semantics that our CGI currently has (mainly for image decoding).

This could also be a subset of the current protocol between buffers and the loader. Then it could be further developed into an RPC scheme, where CGI can send messages using POST to built-in URLs, or just call into other CGI scripts.

#20 Network stuff 4 days ago

Comment by ~bptato on ~bptato/chawan

Update: I've dropped brotli support, as I'm not convinced it's worth it after all. This means you no longer have to modify default-headers to use newhttp; only gzip and deflate are sent in Content-Encoding. It also means that newhttp no longer requires any new dependencies.

Another improvement since the previous post: Content-Length is now respected, so if the server sends more bytes than promised, we ignore those. (Unless chunked transfer encoding is used; in fact, we're just reusing the chunk size indicator...)

Overall, newhttp seems to be working quite well, so if things go according to plan it will switch places with the libcurl client soon. (I'll keep the libcurl client in bonus/ so that building with curl-impersonate remains an option.)

#15 Prev / Next buffer without discard. 8 days ago

Comment by ~bptato on ~bptato/chawan

(Kind of) superseded by https://todo.sr.ht/~bptato/chawan/57.

REPORTED RESOLVED CLOSED

#57 Tabbed browsing 8 days ago

Ticket created by ~bptato on ~bptato/chawan

Lately I'm thinking:

  • remove the buffer tree, buffers become a linked list like in w3m
  • add tabs
  • add a "select buffer" menu that selects inside tabs

Why? Well the ideas I initially had for the buffer tree never materialized, and the UI still treats buffers as a linked list with extra steps. These extra steps in turn make it very hard to do any improvements to the UI (e.g. buffer selection).

Thinking of it, my gripes with w3m's tab system are also quite easy to solve:

  • I dislike how it takes up a bunch of space on the top, even shifting the page when opening a tab. Solution: put the tab bar on the side ("vertical tabs"). Ideally on the right so it doesn't shift the screen. Maybe even as a pop up menu, so that it normally doesn't take up space.

  • With w3m's tabs you can't browse other pages while one page is loading. This won't be a problem in Chawan because it has an asynchronous event loop.

#56 Error reading mailcap 13 days ago

Comment by ~bptato on ~bptato/chawan

On Fri Apr 4, 2025 at 5:48 PM CEST, ~bptato wrote:

For some mysterious reason, the mailcap parser rejected non-ASCII characters. Let me know if the warning is gone with the latest commit.

Yes, I can confirm.

Thanks for confirming.

Thank you very much. I've been a long time user of lynx, w3m and eww (in Emacs) and I find chawan to be super fascinating. Thanks for that, too.

Glad to hear that :)

REPORTED RESOLVED CLOSED

#56 Error reading mailcap 13 days ago

on ~bptato/chawan

On Fri Apr 4, 2025 at 5:48 PM CEST, ~bptato wrote:

For some mysterious reason, the mailcap parser rejected non-ASCII characters. Let me know if the warning is gone with the latest commit.

Yes, I can confirm.

Thanks for confirming.

Thank you very much. I've been a long time user of lynx, w3m and eww (in Emacs) and I find chawan to be super fascinating. Thanks for that, too.

Glad to hear that :)

#56 Error reading mailcap 13 days ago

on ~bptato/chawan

On Fri Apr 4, 2025 at 5:48 PM CEST, ~bptato wrote:

For some mysterious reason, the mailcap parser rejected non-ASCII characters. Let me know if the warning is gone with the latest commit.

Yes, I can confirm. Thank you very much. I've been a long time user of lynx, w3m and eww (in Emacs) and I find chawan to be super fascinating. Thanks for that, too.

Cheers Alex

#47 Add stylesheet-inline to [[siteconf]] 16 days ago

Comment by ~bptato on ~bptato/chawan

Done in 55e2189a04. New syntax:

[buffer]
user-style = '''
@import 'user.css'; /* external sheet, path relative to config dir */

/* internal sheet */
a[href] { text-decoration: none !important }
a[href]:hover { text-decoration: underline !important }
'''

[[siteconf]]
host = 'example'
# works the same way as in siteconf
user-style = '''
@import 'site-example.css';

:root { background: red }
/* ... */
'''

ETA: fix semicolons...

REPORTED RESOLVED CLOSED

#20 Network stuff 20 days ago

Comment by ~bptato on ~bptato/chawan

I've restored the old UA string because of Anubis.

I'm also testing newhttp and have seen better results than with the libcurl client. So I'll probably make it the default sooner than planned. If anybody is reading this, I'd appreciate some help:

  • (from the repository root) cd bonus && make install-newhttp
  • Check your favorite websites that worked with the libcurl client and report back whether they work with newhttp.

#54 Sixel issue maybe? 24 days ago

Comment by ~bptato on ~bptato/chawan

Glad to hear it works :)

one thing on elpais.com most images show but not others I get the [img] anything I can do about that?

That's because the site is using CSS background-image, which is not implemented yet. It still shows placeholders so that you can at least click on buttons that only consist of background-image.

(In fact, just displaying background-image wouldn't be that hard. The difficulty comes from having to place the image behind the text - right now, neither text nor image have a concept of Z ordering by the time they are drawn on the screen, and the renderer will need some work to allow this.

It also doesn't help that Kitty and Sixel have conflicting models of text mixed with images...)

REPORTED RESOLVED CLOSED