Live data from Hacker News

Coroutines in C (2000)

chiark.greenend.org.uk

21–30 of 61 posts

Re: Coroutines in C (2000)

#21

That page uses very simple HTML. Just paragraphs of text divided into sections with headings. Some code examples laid out side-by-side with a table. Tiny stylesheet. No JS. Loads quickly, easy to read. Warms the cockles of my heart.

> easy to read.

Not on 27" with browser in full screen.

Re: Coroutines in C (2000)

#22
post #21

That page uses very simple HTML. Just paragraphs of text divided into sections with headings. Some code examples laid out side-by-side with a table. Tiny stylesheet. No JS. Loads quickly, easy to read. Warms the cockles of my heart.

> easy to read. Not on 27" with browser in full screen.

You probably shouldn't have your browser in full screen mode on a 27" screen

Re: Coroutines in C (2000)

#23
post #21

That page uses very simple HTML. Just paragraphs of text divided into sections with headings. Some code examples laid out side-by-side with a table. Tiny stylesheet. No JS. Loads quickly, easy to read. Warms the cockles of my heart.

> easy to read. Not on 27" with browser in full screen.

CTRL and + to zoom in on Windows/Linux

CMD and + to zoom in on Mac

or CTRL/CMD and scroll wheel to zoom in/out depending on direction scrolled.

Or are you using an ancient browser without zoom?

Re: Coroutines in C (2000)

#25

That page uses very simple HTML. Just paragraphs of text divided into sections with headings. Some code examples laid out side-by-side with a table. Tiny stylesheet. No JS. Loads quickly, easy to read. Warms the cockles of my heart.

This page is written by the creator of PuTTY. They could probably release this as a straight TXT file and still get the readership they deserve. Simon Tatham know's what he's doing!

Re: Coroutines in C (2000)

#26

That page uses very simple HTML. Just paragraphs of text divided into sections with headings. Some code examples laid out side-by-side with a table. Tiny stylesheet. No JS. Loads quickly, easy to read. Warms the cockles of my heart.

The only issue of these websites is the width: using the full width of the screen is just too much for reading.

If you add {max-width: 60em; margin: auto;} to the body tag it looks much better.

Re: Coroutines in C (2000)

#27
I guess one of the applications of Coroutines could be WebAssembly. When you run WebAssembly on a website which needs 100% of the CPU for more than a few ms, you have to use the "setTimeout(fn, 0)" trick to prevent the "this website stopped responding" message. That means you have to store the current state at some point and continue in the function fn (after waiting 0 ms). Languages which support coroutines out of the box would help a lot here.

Re: Coroutines in C (2000)

#28
Has anyone used these to write interrupt service routines? Seems like there's an opportunity here. You can take your existing synchronous code and not have to rewrite it into something like continuation-passing style. This is a source of a lot of bugs.

Re: Coroutines in C (2000)

#30
post #26

That page uses very simple HTML. Just paragraphs of text divided into sections with headings. Some code examples laid out side-by-side with a table. Tiny stylesheet. No JS. Loads quickly, easy to read. Warms the cockles of my heart.

The only issue of these websites is the width: using the full width of the screen is just too much for reading. If you add {max-width: 60em; margin: auto;} to the body tag it looks much better.

Back in the day, we had multiple windows on the screen at one time, so this wasn't a problem. I think it was Windows which defaulted to full-screen, and led to the plague of sites assuming that the browser would be full-width on a landscape screen, but I could be wrong.

Although I love using a tiling window manager now, I kinda miss my old System 8 Macintosh setup, with Netscape open in one window & Think C (or was it CodeWarrior?) open in another.

Post reply on HN