Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts

Sunday, June 29, 2008

Release 2008.06.29

This is a minor update with the updated word class handling (so you can try code from my previous posts) and a few minor fixes and improvements to the source. I've also updated the online interpreter to use both the latest Ngaro.js and image.

Saturday, May 10, 2008

Release 2008.05.10

This is a pretty small release. I've been very busy (and a bit sick), so haven't had time to do much.
  • The video refresh port is now set properly after outputting a character
  • Ngaro JS now supports the video refresh port
  • Ngaro JS now stores the video output apart from the form output textarea
  • Strings are now rendered after all characters are drawn to the video buffer rather than character by character
  • update (enable/disable screen redraws) was added
  • redraw (redraw the screen if update is on) is now in the dictionary
  • Graphics module now does video updates after drawing shapes
  • Removed the FFI from Toka.
As shown, most of my time has been spent in enabling proper use of the video refresh support provided by Ngaro. This allows a noticeable performance increase in bits that are text heavy (try words) by delaying renders until the output is finished. It's also helpful with graphics, allowing filled shapes to be rendered more quickly.

I also removed the FFI functionality from Toka for this release. The FFI words are not used by the cross-compiler, and serves only to slow down the build of Toka and increase the number of dependencies. (This only affects the copy of Toka included in the Retro package; the full Toka still has FFI).

Sunday, May 4, 2008

Retro on Mobile Devices

I have scaled down the UI elements in Ngaro JS and am now able to run Retro on some mobile devices.

I have confirmation that it works properly on (platform, browser):
  • Windows Mobile 5 (Minimo)
  • Apple iPhone (Mobile Safari)
You can check out Retro Mobile online, or download the files to copy to your device for offline use.

Links:

Monday, April 28, 2008

Current Work

A few minor updates:
  • The image builder now builds an image.js for use with the Ngaro JS
  • Ngaro JS now has a Clear Display button which may be of some use
I've rewritten the build script for Retro. It's now got a number of internal functions, which have allowed some minor cleanups and the addition of a few new features, including basic help (pass --help to the script to see a list of all flags provided now). This will be included in the 2008.05.03 release.

Thursday, April 24, 2008

Ngaro JS performance improvements

The Ngaro in JavaScript (jsvm) is now fast enough to actually be useable. It's still slower than the Java and C implementations, but I'm now comfortable with the performance.

Now to apply some CSS to improve the look and feel a bit....

For those who are curious about what I did, all it took was:
  • Put in a loop to call vm_process() more than once per 10ms interval
I also experimented a bit with loop unrolling, but didn't notice enough of a payoff for the code duplication it brought.

Monday, April 21, 2008

New Implementations of Ngaro

I've been planning to write implementations of Ngaro in other languages for a while now. Over the last few days, I have (with input from erider in the #keow channel on irc.freenode.net) written two new Ngaro implementations.


JavaScript

The first implementation was done in JavaScript. It presents a form-based interface that allows for a crude approximation of the tty console I/O model. Though brutally slow and memory hungry, it does work and seems quite reliable.


Java

While far from my favorite language, I recognize that Java is fairly widespread, so yesterday I wrote a quick and dirty implementation in Java. This is running as a Java applet, and still has some bugs in the I/O device emulation, but does work. It does have an advantage over the JavaScript: this one is very fast.


Future

I'll be cleaning up and working on merging the source for these into the main Retro codebase. Beyond this, I hope to eventually get the JavaScript implementation to run at an acceptable speed. The Java version is fast enough, and will hopefully have its bugs ironed out soon.

Eventually I'd like to have a couple of variations on the Java implementation. It would be nice to run Retro on a Java-capable cell phone or pda, and having an offline version would be useful as well. Given enough time, it's possible that the full graphical console I/O devices could be emulated.

Looking out even further, I am currently doing some research on .NET; an implementation of Ngaro for .NET could also be a big help in improving platform support.


References