The Virtual Card Read-Punch – punch, read, execute punch cards online

This is meant as a fun page which lets you punch, download, share, upload and execute code on virtual punch cards (PNG images). Supported runtimes comprise a few modern languages for the moment (Python, Perl, JavaScript), but I’d like to add FORTRAN and COBOL as well.
(All image and code processing is done in the browser, no uploads are involved.)

Here’s the official preview image:

3 Likes

Something I learned in the meantime:

While my (virtual) punch cards use some steganography in order to preserve case for modern languages (in fact a hidden row 13 or Z as an additional zone punch), there are more traditional ways to encode lower-case characters on punch cards.

Carl (yes, the Carl seen in CuriousMarc/Marc Verdiell YouTube videos) brought the following enlightenment:

There is indeed Hollerith code (and EBCDIC) for lower case letters - although no keypunch keys to encode them and no print matrix to list them.

lower case letters are x’81’-x’89’, x’91’-x’99’, and x’a2’-x’a9’

For Hollerith code, the letters a-i are 12-0-x where x is 1 to 9, letters j-r are 12-11-x where x is 1 to 9, and letters s-z are 11-0-x where x is 2 to 9.

So, the first ones are EBCDIC, which isn’t applicable in our case (as we’re using plain EBCD), but the Hollerith codes were new to me.


P.S.: In order to see how a zone punch of 12-0, 12-11, or 11-0 fits into the encoding scheme, see the diagram at the bottom of the page in question.

1 Like

BTW I can imagine - but not design - an improved ergonomics for your offering. Having got a rendered image in the page of the first bit, I’d like to drag that image to the second bit. As it stands, that would be nice for a single card but might need some changes to support a small card deck. But I’d prefer to avoid the download/upload dance.

I did at least manage to run a one-liner, on about the third or fourth try. I do not suggest your site implements a one-day turnaround…

In the old days, when people did actually look into the source code, some may have detected a quite obvious construct at the very top of the main (UI) script, resulting in the reader-output becoming editable, if there’s a URL-parameter “hack” or “hackable” with some truthy value, like “1” or “on” or “true”. :slight_smile:

Short answer: append “?hack=1” to the URL and you may edit the reader output (you’ve to feed a dummy card first) and have your convenient edit-run cycle. Once satisfied, copy the code to the punch section for the final product.

However, mind that this is not in the true spirit of punch card programming. (Which is, why this option is default off. I actually thought that someone may find and share the option rather soon. Also, I liked the idea of a highly functional power user Easter Egg. But this may be just a bit too retro.)

1 Like

P.S.: Rather disappointed by today’s hackers. :-/

So …deeply disappointed by today’s hackers, I added a small edit icon below the output-pane in order to make it editable… :wink:

(However, this is visible only, if you miss the URL-hack. And it requires you to confirm a dialog.)