Internet learned to speak gibberish that doesn’t always coincide with literary text. But it can be converted back to that. Here’s my experiment along these lines.

  • tal@lemmy.today
    link
    fedilink
    English
    arrow-up
    4
    ·
    14 days ago

    But Lisp is case-insensitive

    looks bemused

    I don’t do that much Lisp, mostly use it for emacs, but I’m pretty sure that it’s not.

    opens emacs

    (setq foo 1)                                                                                                                                                    
    (print foo)                                                                                                                                                     
    
    1
    

    OK. So far so good.

    (setq foo 1)                                                                                                                                                    
    (print FOO)                                                                                                                                                     
    
    Debugger entered--Lisp error: (void-variable FOO)
      (print FOO)
      (progn (print FOO))
      eval((progn (print FOO)) t)
      elisp--eval-last-sexp(nil)
      #f(compiled-function () #<bytecode 0xf6febdfec01a>)()
      eval-last-sexp(nil)
      funcall-interactively(eval-last-sexp nil)
          command-execute(eval-last-sexp)
    

    Elisp sure doesn’t look to be case-insensitive. Maybe he meant some specific variant? Common Lisp?

    $ sudo apt install sbcl
    

    Apparently sbcl’s REPL doesn’t support readline.

    $ sudo apt install rlwrap
    $ rlwrap sbcl
    

    Huh. Looks like with readline, I also get cursor flashing to do paren matching, kinda like emacs can do. I had no idea that readline could do that. Apparently Common Lisp doesn’t do setq either.

    more experimentation

    * (let ((foo 1)) (print FOO))
    
    1 
    1
    

    Huh. So, yeah, I guess that Common Lisp is case-insensitive. That is a bit wild. I guess I do remember vaguely seeing old Lisp stuff with keywords in all-caps.

    Is Scheme?

    $ sudo apt install guile-3.0
    

    Apparently the guile REPL doesn’t support readline either. God.

    $ rlwrap guile
    

    And it looks like “print” is “display” in Scheme-land.

    scheme@(guile-user)> (let ((foo 1)) (display foo))
    1
    

    Okay, so that’s the syntax. Case-insensitive?

    scheme@(guile-user)> (let ((foo 1)) (display FOO))
    ;;; <stdin>:2:24: warning: possibly unbound variable `FOO'
    ice-9/boot-9.scm:1676:22: In procedure raise-exception:
    Unbound variable: FOO
    

    Nope.

    I kinda feel like there are Lisps that the author could have used if they wanted Lisp and case-sensitivity, if that was the major irritation.