Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Deadfish interpreter written in Ruby (
#!/usr/bin/env ruby
n = 0
while true
print '>> '
gets.chomp.each_char do |c|
n = 0 if [-1, 256].include?(n)
case c
when 'd' then n -= 1
when 'i' then n += 1
when 'o' then puts n
when 's' then n *= n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.