104 comments

[ 3.4 ms ] story [ 165 ms ] thread
Clever, you could use branches to add sessions.
apologies, my seriously unoptimized rendering routine is choking under the load. I'm restarting every few seconds to clear the screen...

edit: renders PNG instead of GIF (no more fancy blinking animation) to lighten the load a little. This thing is running on a $5 digitalocean droplet and performing admirably!

With so many people entering characters right now, it’s only a matter of time til we get some Shakespeare
I suppose this is an ode to the famous "enough monkeys will write Hamlet?"[1] :p

[1] https://en.wikipedia.org/wiki/Infinite_monkey_theorem

(comment deleted)
(comment deleted)
There's a section in the linked Wikipedia article that describes Jorge Luis Borges tracing the origin of the concept back to Aristotle's Metaphysics.

That's the best thing I've read today. I've often heard the monkeys-on-typewriters imagery, but never related it to an idea of a "total library" which contains everything that can ever be written, probably even itself. I suppose the digits of Pi may be considered such a "library".

"Strictly speaking, one immortal monkey would suffice."

The "total" library (which is mathematically paradoxical) can't contain itself because it has higher cardinality than any of its contents.
When I wrote that a total library would contain "probably even itself", I had a nagging feeling that may lead to a contradiction.

Here is the essay "Total Library" by Borges:

https://www.gwern.net/docs/borges/1939-borges-thetotallibrar... (PDF)

It mentions "abnormal transfinite numbers (whose parts are no smaller than the whole)". This seems to be a reference to Russell's Paradox:

https://en.wikipedia.org/wiki/Russell's_paradox

> Let us call a set "normal" if it is not a member of itself, and "abnormal" if it is a member of itself.

> Now we consider the set of all normal sets, R, and try to determine whether R is normal or abnormal. If R were normal, it would be contained in the set of all normal sets (itself), and therefore be abnormal; on the other hand if R were abnormal, it would not be contained in the set of all normal sets (itself), and therefore be normal.

> This leads to the conclusion that R is neither normal nor abnormal: Russell's paradox.

That proves your point, that it's a mathematical impossibility.

Borges calls it "the vast, contradictory Library", so clearly he was aware of this fact.

Borges's library can't contain itself because it is of a strictly finite size: the books are only 410 pages, or whatever, and so while astronomically large, the total number of sequences is finite. His point was that for any sub-book-sized claim, there would be another book contradicting it, if only through prefixing "it is not true that" or something.

His Book of Sand would, however, appear to be vulnerable to diagonalization.

Unfortunately the distribution of entry of characters by humans is not likely to be uniformly random, hence this will not occur even if all of humanity were to stumble across this readme.
But letters in Shakespeare aren’t uniformly distributed either, so maybe it’s even more re likely.
SVG?
Its not an svg. However that might be an idea for OP - rendering an svg is probably easier on the server, and you can have a blinking cursor with SMIL animations (full interactivity of course does not work when included as an <img> tag)
(comment deleted)
SVG also has hyperlinking although I've never actually tried it in the browser but if it worked then you could do a very strange but functional imagemap vector implementation.
Hyperlinks don't work in <img> tags though, they only work if you are allowed to embed the svg elements directly in the page.

Basically if you include an svg as an image (via <img>, or via css, etc) it can only be an animated image but you can't do anything interactive.

Ah interesting. It's probably a pretty clean implementation then. No immediate workarounds come to mind.

There's ways you can obscure things, such as using an object tag, leaving it up to the browser to decide via a mime type header which you specify then as svg, buuut that won't work here.

Things are fairly locked down these days. Maybe there's something I'm not thinking of using a similar pattern (confuse the browser, tell it the answer and then have it generate the restricted type) ... Maybe something dealing with lang or codepages... There's still plenty of shenanigans there.

Back in the day I used to upload full-blown servers I wrote in postscript as my "profile image" and then they were blindly executed when trying to "convert" the file - imagemagick locked that down about 10 years ago though. Even back then usually some max execution timer would kill it after a minute or so. But it was fun.

Also check out my GitHub webring! Building the markdown widget for it [0] inspired this project.

https://octo-ring.com/

[0] https://github.com/veggiedefender

I love the style of the site. It doesn't look prehistoric but also doesn't have that modern corporate feel to it. Just balanced! Lovely illustrations, did you make them yourself?
You might want to reword the "delete your account" section -- it sounds like, to remove yourself, you must delete your github account!
Just added this to my profile https://github.com/andy1729

As I was clicking on next to go to next profile, I came across a profile that didn't have the widget, so I wasn't able to move forward! Perhaps you can add logic to move only to those profiles which have widget showing!

Thank you very much for building this, gives a community like feel!

I absolutely love the drawings. They're just so cute..
Oh wow, this is quite clever. This is hacking in its pure, positive form. I love it.

I wonder what the README will say once the firehose of Hacker News slows down.

Any stats for which keys are pressed the most frequently?
I'm not currently saving logged output, but that's a good idea!
How does this work?
Each button is a separate image that links to my website, which records the letter, and then redirects you back to GitHub. The top part of the screen is dynamically generated, and you can view it directly here: https://kbd.jse.li/screen.gif
Doesn't GitHub cache fetched images? Any tricks required to get GitHub to refresh the image?
OP: You might want to add some basic rate limiting in the range of 3+ clicks per second. Currently you can flood the http endpoints to spam a single action (like backspace). Given GitHub's TTFB of 700ms for this page, I don't see how a regular person could type anything quicker than that, unless they had multiple tabs open.
It's alright! If I see worse backspace abuse I'll disable it, but scripting is part of the fun :)
I am curious how many requests are you receiving at the moment. I can't even see the text because it seems to be moving too fast.
About 20 button presses per second, which honestly is not that bad.
It's a script pressing the buttons cause the text has a pattern. Humans cannot use this demo at this moment.
Right now it seems to be exploited to spam support for... a particular candidate.
Its not working on my chrome mobile version. It just takes me back to the top of the screen, when I click on the letters.
Interesting that it's implemented via a table with all the image keys and individual links.

Seems like a better implementation for this would be an image map, although I'm not sure how well those are supported in modern browsers, or if you could implement them in a github readme.

That would definitely be better, but GitHub has an extremely aggressive allowlist of tags and attributes which preclude styles, image maps, and regular buttons
You can do some very basic styling.
Crashed my browser (on Android, have the GitHub app)
If you're having problems, kbd.jse.li is currently blocked by OpenDNS seemingly.
Aaaand we got the n word, didn't take long.
it's what finally got me to implement IP-based rate limiting, but it appears to be a coordinated effort. At least we made it to two full hours before running into this :((
on a related topic of interactive READMEs, I decided to recreate the Endorsements feature of LinkedIn on the new Github Profile feature: https://github.com/sw-yx#skills--endorsements

uses github actions and octokit to map issue reactions to Readme output - many people dont know you can set github actions on a cronjob

Question. From my experience, GitHub uses the `github-amo` bot to fetch the data when the page is rendered. How did you prevent it from cacheing on GitHub's servers?
I was wondering the same. Seems like returning a no-cache value for the Cache-Control header prevents the Camo service from caching the image [0].

My browser did however cache the latest image (which is why I thought the system was not working for a second), and I'm not sure how to get around that.

[0] https://docs.github.com/en/github/authenticating-to-github/a...

EDIT: I see. The no-cache causes the Camo service to refetch the image every time it is requested, but it still applies a 4 hour cache time to the response to the browser so it is anyway cached on the client side.

This is extremely clever. Many kudos.
I love this. I think there's something beautiful about making software just because it's a fun to do; not trying to change the world, but just thinking it would be funny to have a publicly interactive readme.

You have my respect!

Way back when forums were a thing and all the kids had obnoxious photoshop "signatures" with their favorite anime characters and video games, I made a dynamic forum signature image that let people type messages.

I used to use variations of that "interactive" signature theme. Random redirects that showed different anime images. IP addresses. (Which was later a service that someone built and provided to everyone.)

I remember using this on Warp Pipe, the GameCube online tunnelling software forums.

https://web.archive.org/web/20041231055055/http://www.warppi...

https://web.archive.org/web/20060204011647/http://forums.war...

Remember these things?

I then made a Nintendo DS match making service for friend codes and advertised it on Mario Kart DS by setting it as my username (I chose the domain "DSmeet.com" to be juuust short enough to fit), then raced backwards the entire game so people would see me. (And it worked!)

https://web.archive.org/web/20060208013613/http://dsmeet.com...

https://web.archive.org/web/20060216171807/http://dsmeet.com...

I was so happy with myself because I wrote the forum software by hand. (Of course I had to do everything hard-mode back then...)

Here are some examples of the "signatures" I'm talking about, if you've never seen one before:

https://web.archive.org/web/20060418010950/http://dsmeet.com...

https://web.archive.org/web/20060429153550/http://dsmeet.com...

Those were some fun times...

Really neat interactive project. You sent me on a trip down memory lane. :)

Ahhh, I used to love those signatures! I remember when everyone used to post their computer specs on their signatures. And I loved your DSmeet project! Did you happen to get into any of the communities that popped up for Animal Crossing New Horizons? They brought me back to the olden days of finding a community on a forum and making friends that way.
If you play with this and script it; be careful that you don't follow redirects or reload github.com too much; you'll trigger github's rate limiter.

Oops. Sorry Github.

Coulden't get my full message out, but got a few "japh"s there :)

is this like twitch plays pokemon?