This is excellent! I was playing around with a lisp (hy) recently, and hadn't really used macros before then. It's amazing how much you can reengineer lisp from within to meet your needs, even if they're as small as "I don't want to use F".
I haven't seen any non-lisp languages that give you that kind of power, for better or worse.
I think that's cheating. 70 is just F with a different hat on.
Re:I Hate the Letter F
by reikonomusha on Saturday October 19, 2024 @02:37PM
(#41889665)
Would it be better for you if we took the Nth symbol in alphabetical order from the list of 978 standard symbols? You could do that.
How about searching for all symbols with the letters DEMACRO that are 8 letters long? We could do that too.
The technique works so long as you can uniquely determine the symbol through some combination of standard Lisp functions that don't contain F. Lisp has a big library, so it's not tough.
"70" isn't a number that is associated to F in any common person's understanding, and the pronunciation of the number "70" in English has no objectionable F sounds, so I don't agree it's cheating. :)
We'd make a small preamble to define new names for things like DEFUN, Lisp's operator to define new functions. No F's needed to do that either. We can do this by taking advantage of read-time evaluation.
First we get references to the symbols DEFMACRO and DEFUN.
This technique can be used to access any symbol in Common Lisp that may have an F in it.Now, to make life-without-F easy, we define new names for DEFMACRO (mac) and DEFUN (proc) without actually lexically referring to the F-infected symbols:
Now we can define functions with PROC instead of DEFUN. Here's the Fibonacci function, with the F censored out. Note that we don't need IF since Lisp has the superior COND: Test it: