libraries/system.nv

rules

exit the program with an error
ruby
exit 1
get the current time
lua
f('result', {os.clock()})
  
ruby
f 'result', [Time.now.to_f]
start benchmark timer
start time
Time
ruby
time = Time.now
end benchmark timer
start time
Time
ruby
puts Time.now - time
print text String
lua
print(String)
print fact
lua
local fact = popFact('')
       print(table.concat(fact.tokens, ' '))
  
ruby
fact = popFact '', -1
        puts fact[:tokens].join(' ')
  
js
const fact = popFact('');
      console.log(fact.tokens.join(' '));
print stack Stack
lua
print(Stack ..':')
       if stacks[Stack] then
         local facts = stacks[Stack]
         for i = #facts, 1, -1 do
           print('  - '.. table.concat(facts[i].tokens, ' '))
         end
       end
  
ruby
puts "#{stack}:"
        if $stacks[stack]
          $stacks[stack].reverse_each do |fact|
            puts "  - #{fact[:tokens].join(' ')}"
          end
        end
print stacks
lua
for stack, facts in pairs(stacks) do
         print(stack ..':')
         for i = #facts, 1, -1 do
           print('  - '.. table.concat(facts[i].tokens, ' '))
         end
       end
  
ruby
$stacks.each do |stack, facts|
          puts "#{stack}:"
          facts.reverse_each do |fact|
            puts "  - #{fact[:tokens].join(' ')}"
          end
        end
  
js
for (const [stack, facts] of Object.entries(stacks)) {
        console.log(stack + ':');
        for (let i = facts.length - 1; i >= 0; i--) {
          console.log('  - ' + facts[i].tokens.join(' '));
        }
      }
print Value
ruby
puts value