Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
  • Announcements

    • Lizzy Trickster

      Latest Stable OpenComputers Version   11/26/16

      The latest released version of OpenComputers is version 1.7.1 for MC 1.7.10, 1.10.2, 1.11.2 & 1.12.1. See more information here! Beta/Dev builds can be found at the Jenkins Build Server (ci.cil.li)
mrmakeit

Javascript for Open Computers

Recommended Posts

EDIT 2: I've opened a Patreon at https://patreon.com/mrmakeit where I'll post updates.  I'll try and cross reference those updates here as well, but I do suggest checking it out as I'll have other stuff there as well.

 

The Open Computers JavaScript arch!

 

No longer are you tied to using a single language for your comps.  Dominate others with the Power of JAVASCRIPT!

 

Download / Source / Wiki / Emulator

Features:

  • Program in JavaScript
  • Default EEPROM.  Drop an init.js on a floppy and go.
  • That's it!

ToDo:

  • Still no memory or cpu management, so definently not server safe.
  • Needs an OS.
  • No built in code.  You'll need to program an eeprom yourself.  This is no longer the case.  New alpha will have an usable eeprom now.

Share this post


Link to post
Share on other sites

Documentation now in the post.  Checkout the wiki.

Good point.  Unfortunately, the lack of documentation extends from the lack of implementation.  http://ocdoc.cil.li/tutorial:custom_oses should be a good place to start, since that provides the grounds for OS creation, but otherwise, the only real difference from, say Node.js, is the inclusion of the components object, and the computer object.  I'll be sure to post a link to better documentation when I get around to making it. 

Share this post


Link to post
Share on other sites

Someone was talking about this on the IRC about the JS architect.  It has captured my interest.

 

Could you clarify more on the no memory/ cpu management?  Without it, server and client can't sync together properly?

Share this post


Link to post
Share on other sites

Could you clarify more on the no memory/ cpu management?  Without it, server and client can't sync together properly?

The OP probably meant that the in-game computer can use unlimited amounts of CPU power and RAM. With the normal Lua architecture, the execution speed and RAM depend on the tier of the CPU and the total size of the RAM modules.

Share this post


Link to post
Share on other sites

Yes, that is correct.  I haven't done much work to make any ram/cpu limitations.  I wanted to have a working OS first, but life has gotten in the way.  I should have more time to work on this around December.

Share this post


Link to post
Share on other sites

I started my long journey of learning to code by learning JavaScript, and I haven't really done much with it since - just coded some (badly written, I'm sure) browser toys.

So it'll be nice to play with this, and have some fond memories of my horrible hackish code :)

I'll definitely be keeping an eye on this, and I can't wait to see it finished! There are just not enough Arch addons for this mod!

Share this post


Link to post
Share on other sites

I've started back up on working on this in my spare time.  Should have another, better working, alpha soon.  I'll update the first post with more information.

Share this post


Link to post
Share on other sites

Just released version 0.5.  Now with Callbacks!

Turns out Rhino's continuations cause quite a few things to be broken, so now computer.invoke is handled with callbacks and an event loop.  Check out the wiki for more info.

Share this post


Link to post
Share on other sites

This is looking really cool!!! Great work. I couldn't tell which version of the ECMAScript/Javascript language is embedded here? ES4, ES5..???

Share this post


Link to post
Share on other sites

I've launched an emulator for working on OS/Programs at the link in the first post.  While the UI is a work-in-progress, with this "working" I should be able to start on a proper OS to use with the architecture.  If anyone ends up using it, let me know how it turned out.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×