Hacker News new | comments | show | ask | jobs | submit login
Show HN: A Lisp-based in-browser toy operating system (github.com)
156 points by alnis 1940 days ago | hide | past | web | 19 comments | favorite



I don't really know what to say, except I love you, and this is awesome!


Outing an in-browser lisp OS on April 1st is what I call timing.


It is awesome... When I read operating system I immediately started looking for processes and, lo and behold, there are processes [1]. And they work very intuitively too...

[1] https://github.com/AlexNisnevich/ECMAchine#processes


Very timely considering this just hit the front page

http://news.ycombinator.com/item?id=3783021


Very very fun indeed. The examples are a really nice introduction too!


Two additions would be really cool (I'm thinking about adding them myself):

1) Expose the environment as virtual folders (like /proc in linux). So that an object in memory coincides with a file in a directory, that in turn would work like a package. For example "ls" would live under /env/fs/ls (and /env/ls would be in "path" for symbol evaluation).

2) Expose the dom, always as files (/env/dom). Make it a plugin. Add a lisp repl to every webpage.


These are both great ideas. Unfortunately I don't have time to work on this myself, but I'd love to see them implemented (especialy #2). I encourage you to submit them as issues on github so that they're not forgotten.


This looks really cool but I can't get the REPL to accept keyboard input in Firefox.


Hmm, you're right - I should have done more cross-browser testing. It does work fine in the latest Chrome, Opera, Safari, and IE 8+.

Unfortunately, I haven't worked with Firefox enough to be able to figure out what the problem is. I'll keep looking into it, but if anybody can figure this out, I will be much indebted to them.


This is cool! But the command line is pretty inoperative in FF (11.0 mac). I tried to take a look at it but it's not throwing any useful errors. I did notice that you are using jquery-terminal version 0.4.7 and there is a more recent 0.4.11 so you could try that? If that doesn't fix it, I will try and get it running on my local box to add some debugging and investigate asap.


Update: Ok, looks like I fixed it. Firefox wasn't liking $('body').css('display', 'none'), as it turns out.


yea! Why does it not work in firefox?


/sigh.

If it runs in the browser, it's not an operating system. Nice April 1 joke.


Does this imply Linux is not an operating system?

Because it runs in the browser. See, for instance:

http://bellard.org/jslinux/

or my own

http://www.ubercomp.com/jslm32/src/


>If it runs in the browser, it's not an operating system.

http://en.wikipedia.org/wiki/Church%E2%80%93Turing_thesis

How so?


I fail to pick up the relation. The Church Turing thesis is an unproveable statement arguing that a turing machine can compute every computable function. It also notes the equivalent ability in mu recursive functions and the lambda calculus.


Now correct me if I'm wrong. But "Every computable function" includes another Turing machine. If browser developers are insistent on turning the web browser into a sort of web virtual machine; then it stands to reason that a "operating system" running in the browser is just as legitimate as one in virtualbox or similar software.

Is the concept ridiculous? Probably. But time transforms all things. Many things that were once ridiculous are no longer so. I'm eager to see how things on this line of thought turn out.


I am saying that the church turing thesis is not a fact or theorem. It is an unprovable hypothesis, a belief whose inclusion in a deduction does not add any more to it unless the receiving party also agrees with it.

The other part is that the notion of an operating system is not typically tied to a turing machine. An operating system is essentially a set of libraries for any language with appropriate bindings. The language being an abstraction of the underlying machine. To show an equivalence between an OS and browser you list the properties of and operations on a browser and that of an operating system and show there is an isomorphism from one to the other.

Anyways I agree with your conclusion, just not with your argument route. As browsers increase in power they will be indistinguishable from the OS in terms of functionality they expose to the consuming language. The current OSs approach from the other end.


I think you're missing Unimpressive's point that if something can be run virtualized we don't cease to refer to it as an operating system. If Linux had been (perversely, ahistorically) developed as jslinux first before the bare-metal interfaces were implemented would it now be considered not-an-OS? Conversely would the act of porting it have blessed its status as an OS without regard to the presence of the same semantics and facilities in the browser version? I think if you're making this argument you're running against the tide of common _and_ academic usage, plenty of research OS projects have been tested on hardware simulators. Perhaps the easiest way to simplify this is to ask whether you can present any rule other than "browsers don't count" to distinguish the virtualized Linux case from the jslinux case.

The point being made is not that a browser is an OS, but that something using the facilities of a browser to implement all the operations and environment of an OS is... an OS. This seems almost like the duck typing versus strong typing approach - one view is that it's the behaviors that define the identity of something, the other is that it's the inheritance & implementation[].

[] Alternatively since it's April Fools, I'll argue that you're interrogating this from the wrong angle and presenting an essentialist view of OS-hood.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: