News for hackers. Stuff that matters.
Re:Microsoft makes Zork open-source by matheusmoreira on Friday November 21, 2025 @07:20AM (#46003824)
The first step is to overcome the syntax. It's useful to think in terms of Python syntax at first.

  f(x)
  (f x)
  ["f", "x"]

  (print (< 10 20))
  ["print", ["<", 10, 20]]
Lisp code is just list data which gets evaluated by an interpreter function. Like this:

  code = ["print", ["<", 10, 20]]

  def eval(code):
    # magic

  eval(code)  # True
Filling out that eval function is a great way to learn. I only truly understood lisp when I implemented my own.

These articles are very good and accessible:

https://www.norvig.com/lispy.html

https://norvig.com/lispy2.html

Re:Microsoft makes Zork open-source by jasomill on Friday November 21, 2025 @01:17PM (#46007103)
Funny you mention this, as I've written quite a bit of Python code that works just like this, typically in the form of an evaluator for some random proprietary language I've parsed into an AST in the form of a Python list or tuple.