Skip Navigation
InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)AB
AbstProcDo @alien.top
BOT
Posts 3
Comments 3
It's symbols not strings are fundamental data type, an insight from read.
  • I assume the read function initially reads the input as a symbol type, and subsequently, during the evaluation process, converts it into the corresponding data type. This two-step process involves reading the input as a symbol and then evaluating it to obtain the appropriate type.

  • It's symbols not strings are fundamental data type, an insight from read.

    In elisp, symbols serve as fundamental data structures that are more foundational compared to strings. This distinction often caused confusion for me until my encounter with the read function.

    ~ $ (type-of (read)) symbol

    The fact that the read function yields symbols instead of strings from user-input was a delightful revelation. This discovery convinces me that the fundamental nature of symbols in elisp when compared to strings.

    4

    Exploring a little bit of the Intricacies and Elegance of Loop Macros

    While a for-loop is a straightforward construct in other programming languages, the loop macro, despite its power, can present challenges due to its intricacy. I find myself frustrated by its complexity.

    However, its conceptual abstractions are intriguing. Take, for example, the following code snippet:

    (loop for i below 10 sum i)

    The utilization of the term "below" in this context is particularly striking. Contrastingly, in languages like JavaScript, I typically read "i < 10" as "i less than 10," pronouncing the two words "less than" in order to read the "<" symbol.

    The act of reading "<" as "less than" momentarily interrupts my cognitive flow between the two words. The loop macro condenses it as a single word, "below," allowing me to pronounce "i < 10" more succinctly and smoothly, without interruption. Another viable alternative could be "under."

    Moreover, the expression \1 < i < 10\ can be read as "from 1 to 10."

    (loop for i from 1 to 10 sum i)

    It enhance code readability mentally and streamline cognitive processing.

    4

    nil or 'nil once worried me

    Once I saw nil or 'nil from some (setq ..), it usually worried me.

    The barely nil appears to be a variable name no more than \foo bar zoo\ and there shoud be a value it points to.The quoted 'nil seems to be a data or a value in data mode and there might exist a name it is given.it looks no difference with symbols as 'nilll 'nilllllll or 'nillllllllll as data.

    Every time see them, I find myself hesitating, uncertain and disturbing.

    This picture tells they are identical and comfort me to get an insight that lisp is much more pragmatic in evovling by patching up.

    As a result, I stop worring its theoretical consistency and confidently proceed with using \nil\.

    4 disguises of nil

    The wizard book SICP states it as:

    >Lisp was not the product of a concerted design effort. Instead, it evolved informally in an experimental manner in response to users' needs and to pragmatic implementation considerations.

    4