Hacker News new | past | comments | ask | show | jobs | submit login
JS/UIX - a unix-like OS written in javascript (masswerk.at)
69 points by j_baker on Feb 1, 2010 | hide | past | favorite | 23 comments



It's not an operating system, because it cannot operate the system (your system being the Computer) :) Sorry for the obvious fact, but that is.

For example Linux, Mac OS X, Windows do control your System by taking over all resources, interrupts, almost anything.

At best this is a Browser Operation System (BOS), and even then it's not - because it does not have control over the Browser.

It's an illusion.


>It's not an operating system, because it cannot operate the system (your system being the Computer)

Be that as it may (I haven't fully checked out the source to this thing, so I can't say if it could "operate the system" or not), there's nothing preventing anybody from writing an operating system in (mostly) Javascript. You'd just have to have a JS interpreter built into your kernel. Now, why you'd want to do that other than for pure hack value, I cannot say. Nonetheless, it can be done.

Edit: You could also (theoretically) have a specially microcoded system that can directly run some form of Javascript bytecode, as was done with the old Lisp machines.


Nintendo actually started a component based operating system using mostly ECMAScript. It's now being developed by Google.

It's also open source:

http://code.google.com/p/es-operating-system/


The system it's operating is a virtual machine. At least that's what I inferred from the description.


No, it's not an operating system, but for someone who only has access to a computer via their public library and wants to learn *nix/vim/emacs/etc., something like this could be a perfect first step.


I hesitate to call something like this an operating system but it's pretty cool.


>I hesitate to call something like this an operating ....

<humor> Why not? If Microsoft can call Windows versions before Win 95 an operating system, I think this qualifies. ;-) </humor>

In all seriousness, if there's no task scheduler or multitasking capabilities in this software (and I must admit I haven't poked at it enough to determine whether there is or not), it's not much of an operating system. It kind of reminds me of when I was 12 and thought I'd make an "operating system" using QBasic. (What I ended up with was little more than a glorified text-based, menu-driven program launcher. But, hey, I was 12.)


You'd be surprised what people will build with a host environment-bound language and then call an operating system. Brings back memories of VB6 on PlanetSourceCode.

Nifty, unix-like command-line interface in Javascript.


Amazing work. Relatedly, I would love to see an Emacs in the browser, ala Bespin. Is there such a thing yet?

Why do we need a browser-based Emacs?

1. All the benefits of the cloud: access anywhere, always available, always backed-up.

2. The collaborative aspects are perhaps the most compelling. Think peer-programming/debugging. (see also http://jsfiddle.net/).

3. Because of 1&2, it seems inevitable to me that we will be programming in browsers 5 years from now. So I want my favorite editor to be around, too.


shellinaboxd -t -s /:AUTH:HOME:'/usr/bin/emacs'

It's fast and usable, even supports the meta key. It's emacs in a browser.

http://code.google.com/p/shellinabox/

"Shell In A Box implements a web server that can export arbitrary command line tools to a web based terminal emulator. This emulator is accessible to any JavaScript and CSS enabled web browser and does not require any additional browser plugins. Most typically, login shells would be exported this way"


Wouldn't it be easier to implement a browser in Emacs?



Somebody posted an early version of one. I don't recall what it was called though.


You're looking for this:

http://www.ymacs.org/


It would be neat to be able to develop a website by building an 'image' through a VM like this.

You could describe the fundamental concepts on a two-page doc. You could easily copy images around. This could be a low-entry-barrier platform.

Changes it would need: a free software license, some system call documentation, a means of maintaining a library of static images, /var/cgi-bin. Nice to haves: system calls for talking to a database on the backend; library import mechanism; ometa.


If it's a VM (as it's claimed), where are the binaries?

  [guest@www.masswerk.at:2]$ cat pager
  #!/dev/js/commandMore
              
  [guest@www.masswerk.at:2]$ cat ls
  #!/dev/js/commandLs


This is how I'm going to get vi onto an iPad, jailbreak or no.

Happy now (in a sick kind of way :)

(Give me awk and sed and I'd be in hog heaven.)


What utility, if any, does something like this provide? Or is this more of just a fun toy?


By itself it's a fun toy.

As part of a larger system abstracting configuration and administration tasks it might actually be useful. I could imagine mapping a RESTful system around a filesystem path and embedding it in this 'os' to leverage shell concepts to web resources. Environments like CouchDB, Riak or Node.js that are partially javascript under the hood to begin with could see even deeper associations.

Hell you could probably add an abstraction layer underneath the 'vm' and multiplex it to arbitrarily many actual systems, think administering a large set of memcachedb instances with a single command line. And of course you have javascript as a first-level primitive for scripting tasks that you'd use perl for on a real UNIX.

Something to think about anyway.


It's a fun toy


A very sophisticated fun toy that looks great on a resume and as a demonstration of Javascript skills.

Cheers.


Wow! There's a lot of stuff here. I tried ls, touch, cat, even vi, it all worked...


Every time I hit backspace I get sent back to this page or ones before it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: