Live data from Hacker News

You can read my blog posts using curl

mahdi.blog

61–70 of 73 posts

Re: You can read my blog posts using curl

#61

Earlier quoted context omitted.

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)

but www browsers don't render gemtext and gemini browsers don't fetch http(s) resources.

ideally we'll tweak our gemini-to-http proxy to look at the client's "Accept:" header (as suggested in other comments on the op) to decide whether to reply with raw gemtext or converted html-with-css. then a www browser receives light formatting, curl receives raw gemtext, and gemini browsers format however they like.

Re: You can read my blog posts using curl

#62
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?

Axtually Im forgettong things. This is like John Carmack’s .plan :)

Re: You can read my blog posts using curl

#63

Earlier quoted context omitted.

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)

but www browsers don't render gemtext and gemini browsers don't fetch http(s) resources. ideally we'll tweak our gemini-to-http proxy to look at the client's "Accept:" header (as suggested in other comments on the op) to decide whether to reply with raw gemtext or converted html-with-css. then a www browser receives light formatting, curl receives raw gemtext, and gemini browsers format however they like.

Some browsers might accept both. My computer accepts both (although not the Gemini protocol, but it does have Gemini file format, and can read this over HTTP(S) and local files (including inside of ZIP archives, so gempub files can be displayed)). (Also, curl does not have Gemini (although I think that it should).)

There are some problems with using Accept header (although you can use it as a start; if you can implement it, then you might do so). Even if it is mentioned in the Accept header, servers will not necessarily understand it, and if a lot of file formats are implemented then it can make the Accept header very long, knowing properly the preference, trying to explicitly download the raw file or a specific other format (regardless of the Accept header), and other problems, etc.

(My idea is a Interpreter response header, although this requires that web browsers will implement it.)

Re: You can read my blog posts using curl

#64
post #56
post #45

Earlier quoted context omitted.

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.

  LESS(1)
[...]

       --mouse
              Enables mouse input: scrolling the mouse wheel down moves
              forward in the file, scrolling the mouse wheel up moves
              backwards in the file, and clicking the mouse sets the "#"
              mark to the line where the mouse is clicked.  The number
              of lines to scroll when the wheel is moved can be set by
              the --wheel-lines option.  Mouse input works only on
              terminals which support X11 mouse reporting, and on the
              Windows version of less.
----

  5. Using the mouse                                      *mouse-using*
[...]

  Don't forget to enable the mouse with this command: >
          :set mouse=a
  Otherwise Vim won't recognize the mouse in all modes (See 'mouse').

  Currently the mouse is supported for Unix in an xterm window, in a *BSD
  console with |sysmouse|, in a Linux console (with GPM |gpm-mouse|), for
  MS-DOS and in a Windows console.
[...]

                                                          *xterm-mouse-wheel*

  To use the mouse wheel in a new xterm you only have to make the scroll wheel
  work in your Xserver, as mentioned above.

Re: You can read my blog posts using curl

#65

> 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.

Makes coding on a phone way easier.

Re: You can read my blog posts using curl

#66
post #36

Earlier quoted context omitted.

Why do you feel that way?

That's literally what the header means according to the rfc.

plus regardless of the official meaning, how _else_ would you interpret a header that's saying "I'll accept anything". Like the only reasonable response is "cool, here's what i felt like giving you since you gave me no guidance whatsoever and said you could handle anything"

Re: You can read my blog posts using curl

#68
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.)

For similar but not gemini-the-protocol you can do similar with markdown and caddy2.

Here’s how to make it pretty-ish: https://github.com/dbohdan/caddy-markdown-site

Serving just the markdown as plaintext to e.g. Lynx is straightforward.

Discussion here:

https://caddy.community/t/markdown-support-in-v2/6984/12

Re: You can read my blog posts using curl

#69

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 get that you can softwrap. Usually that means though, that when some code is indented, the content of a line that gets wrapped starts at the beginning of the next line (not indented). That just looks bad. I guess one could get used to it. If you can change that and make it continue at same indentation, then you need some additional marker, to distinguish softwrapping from an actual line break. Probably all possible in editors like VIM and Emacs. Just a question of configuration. I would claim though, that softwrapped lines are a bit more difficult to read, when it comes to code, than having short lines, all properly indented.
Post reply on HN