PLACE
spec
solutions
Julia

RPN Calculator in Julia

for s in eachline(stdin)
  tks = split(s)
  if length(tks) == 0 continue end
  args = []
  try
    for tk in tks
      push!(args, if match(r"^[-+*/]$",tk) !== nothing
                    y, x = pop!(args), pop!(args)
                    eval(Expr(:call,Symbol(tk),x,y))
                  else
                    parse(Float64,tk)
                  end)
    end
    @assert length(args)==1
    println(args[1])
  catch
    println("error")
  end
end

boykobbatgmaildotcom