Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

koi-vm

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koi-vm

  • 0.0.4
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

= KoiVM

KoiVM is an extremely simple prototype Virtual Machine written in Ruby. It was created with learning in mind and is written so that it is easy to understand and play with.

=== Examples

The standard 'Hello world!', KoiVM style:

require 'koi' include KoiVM

VM.new.run [ PUSH_STRING, "Hello World!\n", PRINT ]

#=> Hello world!

And an old-school 'Blast off' example:

require 'koi' include KoiVM

VM.new.run [ PUSH_INT, 11, PUSH_INT, 1, SUBTRACT, DUP, TO_STRING, PRINT, PUSH_STRING, ", ", PRINT, DUP, PUSH_INT, 0, EQUAL, JUMP_UNLESS, -13, PUSH_STRING, "Blast Off!\n", PRINT ]

#=> 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, Blast off!

=== Author & Credits

Author:: {Aaron Gough}[mailto:aaron@aarongough.com]

Copyright (c) 2010 {Aaron Gough}[http://thingsaaronmade.com/] ({thingsaaronmade.com}[http://thingsaaronmade.com/]), released under the MIT license

FAQs

Package last updated on 27 Aug 2010

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc