Hello, 2026!

neo @neo@hackers.pub

新年首推,自制编程语言。

def look_up(name, expr)
  if distance = @locals[expr]
    @environ.get_at(distance, name)
  else
    @globals[name]
  end
end

def truthy?(object)
  return false if object.nil?
  return false if object.is_a?(FalseClass)
  true
end

def interpret(statements)
1

1 comment

If you have a fediverse account, you can comment on this article from your own instance. Search https://hackers.pub/ap/articles/019b7942-9a89-76f6-861e-c7227d88b511 on your instance and reply to it.

0