4 ms·
Ask HN: Good performant language for handwritten code?
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?
- 082349872349872 3y agoThe 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)
- amberss 3y ago[flagged]
- gus_massa 3y agoPython with numba and @jit is quite fast https://numba.readthedocs.io/en/stable/user/jit.html 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/box-plot-summary-charts.html 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.
- turboat 3y agoWell, 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.
- gus_massa 3y agoTry 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/ https://xkcd.com/859/
- enduku 3y agoI find myself using J [0] for such type of ideation/programming exercises. Klong/K/APL also lend to similar productivity. [0] https://www.hillelwayne.com/handwriting-j/ https://www.hillelwayne.com/handwriting-j/