I have had the pleasure of teaching
a few people with and about SDL2 C Hour 2: The hour that is not but
recently, particularly using emacs could be named unhygienic
orgmode. Much to my shock as I had tangle-time macro expansion
been planning a hard pivot into ECL
common lisp, SDL2 C has worked so If you show someone orgmode noweb
well there is not really a place for tangles and they don't already know
lisp (which would also jostle emacs it, they don't know it after being
and orgmode in my opinion). shown either. But imagine this as
that sort of Greek tragedy - here is
You can look at two hour-intended the end, now here's the beginning -
orgmode docs, though I need to and it has worked well. Get the
explain the battle plan which has student to start doing their
gone very well. The printing themed creative main method spaghetti, then
fork of the second doc is unused. help them move their code into named
blocks and replace it with the noweb
Hour 1: Learning to refer to the reference. noweb hopefully clicks
SDL2 wiki here. Using unhygenic variable
capture, we have reuseability and
The secret emphasis is on getting stateful
them using some high-reward emacs pseudo-function-functionality.
key-chords. The SDL2 wiki (like most
wikis, not a wiki) has a few random I have got the feedback that they
whole cloth examples and more more can blithely try any idea because I
meagre examples. What has worked for can tap a few key chords to restore
me is getting people to discover order no matter what as a safety
that they can copypasta the code blanket, and somewhat cheatingly
from the SDL_RenderClear wiki page whatever they want is guaranteed to
for example, and on the back of this succeed quickly and succinctly for
triumph find and largely borrow some similar reasons. The latter would be
other function examples like a problem, but I have found myself
SDL_RenderDrawLine. This backfired basically unnecessary so far. I have
on me in the sense that no one has had some success getting them to
really cared about the obvious pull themselves out of the swamp by
mistakes in the SDL2_RenderClear their own hair through nascent emacs
example source. I did find people wizardry.
going from
not-application-programmers to low
level graphical C application
programmers quite satisfying.
In this context it is interesting to
weigh emacs + C + orgmode against
common lisp for myself. Common lisp
has everything the other three do
inside it already which goes,
debatably, for common lisp I think.
If you want to use lisp, use lisp,
if you want to use C, use emacs,
orgmode, C... And that's just the
beginning of the list. On the other
hand the only way to go as fast as C
in lisp is to realize C as a
dangerously unlispy domain specific
language in lisp. Common lisp has
pretty printing, file io, reader
macros, introspection, is extensible
using lisp, has fine grained reader
macro/macroexpansion time macro
control similar to emacs/orgmode.