News for hackers. Stuff that matters.
Re:Lisp.py by timonoko on Wednesday July 20, 2022 @08:07AM (#32164562)
I played with python-lisp for some time and decided that python-array is not a LIST but CONS. And if the python-array has more than two pieces, it can be pretty-printed as an ARRAY. Haters will hate, but this is the Ultimate Solution.

    > '[1, 2, 3]
    [1, 2, 3]
    > '(1 2 3)
    (1 2 3)
    > '[1, 2]
    (1  .  2 )
    > '[1,(2 3)]
    (1 2 3)
https://github.com/timonoko/nokolis.py
Re:Lisp.py by lioeters on Wednesday July 20, 2022 @04:21PM (#32171729)
> Nokolisp had no strings, but I invented new practise: a flat list of numbers with first number as 34, is prettyprinted as string in the editor. Then you can edit the numberlist normally and the editor shows range(32,256) as chracters alongsside.

Interesting solution! I wasn't sure if you were joking, but I see this syntax/convention is actually used.

   (print-nice (34 100 101 102 113 40 39))
Is there a way to escape the first number if there's a need to create a list with a literal 34?
Re:Lisp.py by timonoko on Wednesday July 20, 2022 @05:23PM (#32172530)
Not much need for that. But I would now change the rule so that the number-list must have 34 at both ends. It is little illogical and ugly that there is only one 34 but two quotation marks is prettyprinted.

    > '(34 72 101 108 108 111)
    "Hello"