Ask HN: Good performant language for handwritten code?

2 points by turboat ↗ HN
I'm planning a project where I want to write my code with pencil and paper.

However, the goal is to create working, robust software. It needs to actually run on computers, so I'll periodically transcribe to digital form. The deploy target is servers. Let's say one of the common VM types available on AWS.

Therefore, I'm trying to identify languages that are fast but fairly concise. For example, Ruby or Python would be good handwriting options, but they have slower execution speed. Rust and Java are fast, but verbose to write.

I'm thinking JS, Clojure, or Crystal might be the most practical choices. Any other suggestions?

6 comments

[ 34.9 ms ] story [ 390 ms ] thread
Python with numba and @jit is quite fast https://numba.readthedocs.io/en/stable/user/jit.html but you need to know how to use it. (I don't know, but one of my coworkers does.)

There is a nice comparison of languages speed and sizes in https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

I like Racket, but editing it without the help of a editor to match the parenthesis is imposible.

Well, the parentheses don't necessarily have to be perfect on the paper :) I can fix them once it's on a computer.

That said, some manual tricks that could help: my former colleague had a simple trick of counting up with his fingers for open-parens, and then back down for close-parens.

I could also imagine using more line breaks and indentation to help keep the parens straight. It might be ugly, but on paper that formatting is only to support my thinking, it does not also need to cater to the committed source code.

Try numba and @jit first.

(Warning: After starting writing code in Racket (or Scheme/Lisp/Clojure...) you will start to obsess about matched parenthesis, even in paper https://xkcd.com/859/

The APLs are tough to beat for high latency input mechanisms.

(Fun fact: Peter Landin originally introduced the "offside rule" because it would be suitable for handwritten as well as digital input)