Ask HN: Have you created programs for only your personal use?
To me this question reads like, &quot;Have you made a personal phone call?  I&#x27;m curious to know if anyone has called someone else on the phone that they personally know,&quot; or &quot;Has anyone else ever spent money on something they wanted?&quot;  Clearly whoever wrote it lives on a different planet than I do.  A better one, maybe, or maybe worse, but at least very different.<p>My main user interface is bash, so every time I want to view a PDF file, launch a web browser, list the files in a directory, or compile a program, I write a program to do it in bash and then hit &quot;enter&quot; to execute it.  For example:<p><pre><code>    arm-linux-gnueabi-gcc-10 -mcpu=cortex-m4 -c -Wa,-adhlns=armpapel.lst -g -Wall -Os mpapel.c
</code></pre>
Or:<p><pre><code>    ls &#x2F;media&#x2F;compu&#x2F;E8D3-C6AF&#x2F;
</code></pre>
Or:<p><pre><code>    firefox &amp;
</code></pre>
Or:<p><pre><code>    bg
</code></pre>
In this way I estimate I create about 32 new programs a day for only my own personal use.  But in many cases I only use each one once.  ^R makes it easy to use them again a few times, but in other cases I save them into a shell script to make them easier to distribute to other machines, parameterize, and maintain.  The one I most often use is probably a user interface for YouTube via youtube-dl or yt-dlp that consists of a few such shell scripts.<p>My main editor is Emacs.  If I want to do the same thing repeatedly (e.g., delete a line containing the string .LVL) I create a keyboard macro with F3 and F4 (or C-x ( and C-x )) when I do it once, then run it repeatedly with C-x e.  I probably write about 4 programs a day in this way.<p>Emacs has a M-: command to evaluate Lisp expressions, which are programs.  Recent programs I have written in this way include (&#x2F; 43.2 1.7), (* 9.3 1.2), and (+ 8 3 2.50 3.50 3 7 3.50 3 1.50 4.50 6 5.50 6.50 6 3 2.50 2.50).  Probably I write about 1 program a day in this way but I only use each one once.  Longer Lisp programs like this can be written in *scratch* and executed with C-j or in .emacs (or .emacs.d&#x2F;init.el) and executed with C-x C-e.  For example, (global-set-key [f5] &#x27;recompile).  I use my .emacs file constantly every day but probably only add something to it about once a month.  An outdated version is at <a href="https:&#x2F;&#x2F;github.com&#x2F;kragen&#x2F;kragen-.emacs.d&#x2F;blob&#x2F;master&#x2F;init.el" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;kragen&#x2F;kragen-.emacs.d&#x2F;blob&#x2F;master&#x2F;init.e...</a>.<p>Sometimes I write bigger programs for my own personal use too.<p>A few years ago I wrote <a href="https:&#x2F;&#x2F;github.com&#x2F;kragen&#x2F;pytebeat" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;kragen&#x2F;pytebeat</a> for a livecoding performance of bytebeat in a bar.  I finished writing it in the train on the way to the bar.<p>In <a href="https:&#x2F;&#x2F;github.com&#x2F;kragen&#x2F;laserboot" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;kragen&#x2F;laserboot</a> I wrote a simple parametric 2-D CAD system for laser cutters in PostScript.<p>For Dercuano <a href="http:&#x2F;&#x2F;canonical.org&#x2F;~kragen&#x2F;dercuano" rel="nofollow">http:&#x2F;&#x2F;canonical.org&#x2F;~kragen&#x2F;dercuano</a> I wrote a kind of shitty HTML rendering engine that generates a PDF file, as well as a simple CMS for generating a tree of HTML files from a directory of Markdown.<p>The other night I wrote a bytecode interpreter with a graphical display in C as a sort of mockup for the operating system of a small computer I recently got the parts for; it&#x27;s in <a href="http:&#x2F;&#x2F;canonical.org&#x2F;~kragen&#x2F;sw&#x2F;erika.git" rel="nofollow">http:&#x2F;&#x2F;canonical.org&#x2F;~kragen&#x2F;sw&#x2F;erika.git</a>.<p>I&#x27;ve also written compilers, interpreters, ray tracers, database engines, parser generators, graphics libraries, logic circuit optimizers, 2-D game engines, etc., for my own use.<p>Some of the recent ones are in <a href="http:&#x2F;&#x2F;canonical.org&#x2F;~kragen&#x2F;sw&#x2F;dev3" rel="nofollow">http:&#x2F;&#x2F;canonical.org&#x2F;~kragen&#x2F;sw&#x2F;dev3</a>.  Over the last 9 years, according to a shell script I just wrote, it has accumulated 170 C programs, 254 Python programs, 60 HTML files (mostly JS with a thin shell of JS), 43 Jupyter notebooks, 28 files in assembly language (though some of these are compiler output), 23 programs in OCaml, 17 programs in Golang, 15 programs in Rust, 14 programs in OpenSCAD, 11 standalone JS files, 9 programs in PostScript, 6 programs in Perl, 9 programs in C++, 7 programs in Scheme, 5 programs in Meta5ix, 5 programs in Java, 5 programs in Lua, 5 programs in Forth, a program in Prolog, and a lot of etc.  That&#x27;s 688 programs in all, according to a program I just wrote in the browser console, which is 69 per year or one every 5.3 days.  However, there&#x27;s probably some double-counting there, or counting of things I started but didn&#x27;t finish, or things like the copy of D3 I checked in there, and the real number might be more like one every two weeks.<p>Some of the larger ones are <a href="https:&#x2F;&#x2F;nbviewer.org&#x2F;url&#x2F;canonical.org&#x2F;~kragen&#x2F;sw&#x2F;dev3&#x2F;fir-vocoder.ipynb" rel="nofollow">https:&#x2F;&#x2F;nbviewer.org&#x2F;url&#x2F;canonical.org&#x2F;~kragen&#x2F;sw&#x2F;dev3&#x2F;fir-v...</a>, which is a vocoder; <a href="http:&#x2F;&#x2F;canonical.org&#x2F;~kragen&#x2F;sw&#x2F;dev3&#x2F;ritmo.c" rel="nofollow">http:&#x2F;&#x2F;canonical.org&#x2F;~kragen&#x2F;sw&#x2F;dev3&#x2F;ritmo.c</a>, a stochastic wavetable synth for an Arduino; and <a href="http:&#x2F;&#x2F;canonical.org&#x2F;~kragen&#x2F;sw&#x2F;dev3&#x2F;qfitzah.s" rel="nofollow">http:&#x2F;&#x2F;canonical.org&#x2F;~kragen&#x2F;sw&#x2F;dev3&#x2F;qfitzah.s</a>, an interpreter for a higher-order programming language with pattern matching, flexible parametrically-polymorphic data containers, and dynamically dispatched method calls with multiple dispatch, that assembles to an executable under 1K.  Some other random ones are <a href="http:&#x2F;&#x2F;canonical.org&#x2F;~kragen&#x2F;sw&#x2F;dev3&#x2F;dnsscan.py" rel="nofollow">http:&#x2F;&#x2F;canonical.org&#x2F;~kragen&#x2F;sw&#x2F;dev3&#x2F;dnsscan.py</a>, which scans random IP addresses for open DNS servers; <a href="http:&#x2F;&#x2F;canonical.org&#x2F;~kragen&#x2F;sw&#x2F;dev3&#x2F;andnot.go" rel="nofollow">http:&#x2F;&#x2F;canonical.org&#x2F;~kragen&#x2F;sw&#x2F;dev3&#x2F;andnot.go</a>, which tests the behavior of the Golang &amp;^ operator;  <a href="http:&#x2F;&#x2F;canonical.org&#x2F;~kragen&#x2F;sw&#x2F;dev3&#x2F;weemenumain.cc" rel="nofollow">http:&#x2F;&#x2F;canonical.org&#x2F;~kragen&#x2F;sw&#x2F;dev3&#x2F;weemenumain.cc</a>, which is a test program for a C++ library for an imgui-style menu system I wrote for microcontrollers that only uses a few bytes of RAM; and <a href="http:&#x2F;&#x2F;canonical.org&#x2F;~kragen&#x2F;sw&#x2F;dev3&#x2F;rpncalc.c" rel="nofollow">http:&#x2F;&#x2F;canonical.org&#x2F;~kragen&#x2F;sw&#x2F;dev3&#x2F;rpncalc.c</a>, a four-function RPN calculator program.<p>But, like I said, there&#x27;s nearly 700 of these, and more in <a href="http:&#x2F;&#x2F;canonical.org&#x2F;~kragen&#x2F;sw&#x2F;aspmisc" rel="nofollow">http:&#x2F;&#x2F;canonical.org&#x2F;~kragen&#x2F;sw&#x2F;aspmisc</a>, <a href="http:&#x2F;&#x2F;canonical.org&#x2F;~kragen&#x2F;sw&#x2F;inexorable-misc" rel="nofollow">http:&#x2F;&#x2F;canonical.org&#x2F;~kragen&#x2F;sw&#x2F;inexorable-misc</a>, <a href="http:&#x2F;&#x2F;canonical.org&#x2F;~kragen&#x2F;sw&#x2F;netbook-misc-devel" rel="nofollow">http:&#x2F;&#x2F;canonical.org&#x2F;~kragen&#x2F;sw&#x2F;netbook-misc-devel</a>, and the kragen-hacks archives, so I&#x27;m not going to try to describe them all here.  They&#x27;re all git cloneable except kragen-hacks.