Live data from Hacker News

You can read my blog posts using curl

mahdi.blog

51–60 of 73 posts

Re: You can read my blog posts using curl

#51

> To make this easily readable on small screens and terminals, I used vim’s text-width setting to make sure my lines do not exceed 80 characters: I never understand comments like these. Now if my terminal is 78 characters it is a mess or if it is 100 characters it is wasting space. If you just don't wrap the lines my terminal does it at the right width. Hard wrapping doesn't work well. You need to know the target wid…

For me the reasoning is being able to distinguish between what needs to be wrapped, and what I would prefer not to be wrapped. In this case, code samples would preferrably not be wrapped. If I can wrap normal text manually, and keep code samples unwrapped, the client can disable wrapping entirely and see the code lines untouched. This is possible with HTML and CSS, but not in plaintext. I think wasted space is someth…

This is the exact reason the Linux kernel developers require plain text emails to be pre-wrapped. You cannot leave it to the reader, because readers will always/never wrap both text+code — they cannot distinguish, and text and code have very different wrapping requirements.

Re: You can read my blog posts using curl

#52

> To make this easily readable on small screens and terminals, I used vim’s text-width setting to make sure my lines do not exceed 80 characters: I never understand comments like these. Now if my terminal is 78 characters it is a mess or if it is 100 characters it is wasting space. If you just don't wrap the lines my terminal does it at the right width. Hard wrapping doesn't work well. You need to know the target wid…

I will never understand this obsession with 80 characters as if we still use MS-DOS.

It is still useful though, when you open like 3 files next to each other on a screen. And if screens become bigger then 4 or 5 or ... Screens are wider than high, so putting things next to each other is often better than on top of another

Re: You can read my blog posts using curl

#54

Earlier quoted context omitted.

I will never understand this obsession with 80 characters as if we still use MS-DOS.

It is still useful though, when you open like 3 files next to each other on a screen. And if screens become bigger then 4 or 5 or ... Screens are wider than high, so putting things next to each other is often better than on top of another

My editor (Vim) can soft-wrap lines at word boundaries. I routinely have 3 or 4 files open next to each other and on my monitor that does not give 80 columns per file. Inserting hard-breaks at 80 columns would make it look horrible, while long lines get wrapped nicely.

Re: You can read my blog posts using curl

#55

> To make this easily readable on small screens and terminals, I used vim’s text-width setting to make sure my lines do not exceed 80 characters: I never understand comments like these. Now if my terminal is 78 characters it is a mess or if it is 100 characters it is wasting space. If you just don't wrap the lines my terminal does it at the right width. Hard wrapping doesn't work well. You need to know the target wid…

Now if my terminal is 78 characters it is a mess or if it is 100 characters it is wasting space. If you just don't wrap the lines my terminal does it at the right width.

Just tried it on a vintage early-80's 40-column terminal, and works better than I expected. I thought that a lot of words would be cut off on the right side, but the wrapping was about 90% correct. Perhaps it's just a coincidence, but this is what happened just now.

Re: You can read my blog posts using curl

#56
post #45
post #30

Earlier quoted context omitted.

The “less” program understands the standard cursor keys just fine; there is no need to use vi-style keys.

You can even use the scroll wheel (so can vim, accursedly)

No, I'm pretty sure that’s your terminal emulator capturing the scroll wheel events and translating them to cursor key events.

Re: You can read my blog posts using curl

#57
post #18

Pretty cool. Short step from here to publish the blog via Gemini. That protocol uses Gemtext as the core hypertext, and it’s basically markdown. https://gemini.circumlunar.space/software/

then use kineto[1] or similar to cross-host your gemtext content as html over https, with your own css. 1: https://sr.ht/~sircmpwn/kineto/ (i do this for my blog, anachronauts.club/~voidstar. i kind of hate gemini-the-protocol, but love gemtext-as-default and love having a space where text-forward content reigns.)

But is there "Gemini over HTTP"? You can serve text/gemini files also HTTP(S), and also local files too. (On my computer I have it set up that it is capable of loading files of this format (locally and remotely), although most other programs are not capable of understanding this format)

Re: You can read my blog posts using curl

#58

Earlier quoted context omitted.

It is still useful though, when you open like 3 files next to each other on a screen. And if screens become bigger then 4 or 5 or ... Screens are wider than high, so putting things next to each other is often better than on top of another

My editor (Vim) can soft-wrap lines at word boundaries. I routinely have 3 or 4 files open next to each other and on my monitor that does not give 80 columns per file. Inserting hard-breaks at 80 columns would make it look horrible, while long lines get wrapped nicely.

I also use vim. I prefer to keep wrapping off and line length go to 80 or so chars.

I find it easier to read this way rather than have wrapping turned on. Wrapping isn't nearly as good for my comprehension as a line break after 80 chars.

Different people have different preferences

Re: You can read my blog posts using curl

#59
post #50

Two months ago I hacked something like that for my blog: curl https://fuse.pl/beton/10print.html # with code highlighting curl https://fuse.pl/beton/cegla.html # just prose

Looks fantastic! I can't read the post, but I think you can simplify the 10 print Python code to while True: print(choice("\\/"), end="") (the `format` call doesn't seem needed and `choice` works on any iterable, including strings of characters). Al Sweigart has a repository of "scroll art" similar to 10 print that might interest you: https://github.com/asweigart/scrollart

I wanted to be explicit with my iterables for people who might not know that string is a list of chars. The format() call, I can't tell what I was thinking, probably nothing good.

Thanks!

Re: You can read my blog posts using curl

#60
post #53
post #3

Or use: lynx -dump elinks -dump (not the same thing of course, but it doesn't require anything from the server other than reasonable HTML)

Yeah, why not just have a version that renders right in lynx/links?

Or even better integrate a site-search engine with Gopher

https://en.wikipedia.org/wiki/Gopher_(protocol)

Post reply on HN