Yeah “atom?” doesn’t appear in r7rs. You could probably get away with (not (pair? x)) [[ unless '() isn’t an atom - its been a while! ]]
Hopefully there wouldn’t be too many of those. 🤷♂️
Yeah “atom?” doesn’t appear in r7rs. You could probably get away with (not (pair? x)) [[ unless '() isn’t an atom - its been a while! ]]
Hopefully there wouldn’t be too many of those. 🤷♂️
I was a “lab assistant” one semester so I got to see first hand people learning Scheme. Some people really get messed up by all the parenthesis which I’m sure detracted from their experience. Therefore if you go this route, I would suggest first spending some time with him learning how to setup and use a smart code editor with parenthesis matching, sexp indentation, sexp motion commands, etc. These are of course useful for any language but critical for Scheme programming. It probably didn’t help that (at the time at least) most scheme implementations had suboptimal error messages (for example, they don’t have line/column numbers).
I use M-x shell for most shell commands. This provides “infinite” scrollback, easy to grab output into the kill ring, etc. It’s kind of like a temporary notebook (though easy enough to save). When I need a full terminal such as gdb -tui, I use a more traditional terminal emulator like gnome terminal.
Quick feedback: you could show before and after for a small snippet in your README, maybe describe the algorithm being used, and mention what options are available to tweak the formatting (line length being the most interesting and overriding how certain “keywords” format probably being the next most useful).
I also accidentally started writing a scheme interpreter when I was writing a debugger for a vm for an IR language. I stopped before getting too far along though (I did some of the fun stuff including a tail recursive interpreter using musttail clang annotation but a full library is quite a bit of work). I plan to just use chibi-scheme instead when I get back to that project.
My previous employer did not allow non public source code on a laptop. My solution was to run emacs inside of a screen session (with screen’s C-a mapped to C-t a trick I learned from a colleague since C-t twiddle character isn’t very useful in emacs). This worked well even using terrible cellular wifi and was much better than remote desktop since the amount of data sent per keystroke will typically be quite small.
Without screen this almost works but emacs could hang sometimes when the connection got dropped which screen solves.
If (not (eq? '() #f)) then it may make sense to treat '() as non-atomic. “atomic?” would then be a cheap version of “list?”.