j6 (think “jsix”, a hybrid of
javascript and
un*x)
is like an operating system, but written entirely in javascript
and usable as a bookmarklet/favelet/Minitool. it includes a handy
javascript shell, too. it is still in the very early stages, so
feel free to report any bugs or shortcomings
to bsittler@gmail.com.
j6.js can be run inside the spidermonkey,
rhino, or kjscmd javascript
shells, using osascript with the JavaScript OSA,
and using WSH (csript or wscript);
with the extension of j6.html changed to .hta, it works as a
Windows application
loader
the loader is usable from bookmarklets/favelets/minitools
and by script inclusion on a regular web page.
terminal
think teletype + color + iso 2022 + unicode. no cursor
positioning yet, likewise no sixel, regis or other graphics
support. have not implemented iso 2022 for input, only for
output, so basically only latin-1 characters will work in an
iso 2022-compliant way. you can switch the terminal to utf-8
mode with echo '\x1b%G' or equivalent, but be
aware that the shell and other apps will not adapt correctly
(no locale stuff is implemented yet.)
shell
there is a minimal shell with a hybrid javascript/sh
syntax. shell scripts and #! do work, and in fact that is how
most of the stuff in /bin is written. there are no pipes,
redirection, conditional or looping constructs yet. only a
single command can be written per line, although a single
javascript command can do a lot (and include multiple
expressions.) it has very crude command-line editing
(backspace key) and history (use up and down arrow keys.)
file system
the file system is really only a placeholder at
present. the whole thing is temporary (memory-backed) and not
block-based. individual files can be
cookie/globalStorage-backed, but by default only .sh_history
in your home directory is.
scheduler
the minimal and primitive scheduler works. the "timer
interrupt" fires every 200ms, and zero or more tasks are run
until at least 100ms has elapsed or there are no more runnable
tasks. each time a task runs it can request a preference to be
run again during the same quantum, but the default is to run
each task at most once per quantum.
j2s
(Java2Script) seems to be an Eclipse plug-in for
translating Java classes into JavaScript, and it includes a
large Swing-like widget toolkit to aid in porting GUI
applications
EyeOS is a nice free
software (GPL'ed) GUI that runs inside a web browser.
shell history and other BackedFile data is
stored either using cookies or using globalStorage. in either
case, the data contained therein is visible to web sites and
any other bookmarklets you choose to run. it is not encrypted
or obfuscated in any way.
passwords are ignored, and any username is allowed except
for a few built-in usernames such as halt which
have special meaning