Tiny Core Linux

General TC => General TC Talk => Topic started by: danielibarnes on May 24, 2011, 07:31:57 PM

Title: Micro Core ported to Javascript
Post by: danielibarnes on May 24, 2011, 07:31:57 PM
Using the Javascript PC Emulator (http://bellard.org/jslinux/tech.html), I was able to run Micro Core 3.6 in Firefox 4. I was surprised at how simple it was. A few notes:

Screenshots (must be logged in to view):
screen1.png: booting to a command prompt
screen2.png: top
screen3.png: TERM=xterm-color vifm
screen4.png: lynx accessing copy of Tiny Core home page served via lighttpd-nodeps

[ Edit ] Added fourth screen shot and clarified notes
Title: Re: Micro Core ported to Javascript
Post by: hiro on May 24, 2011, 08:03:27 PM
I'm still laughing :D
Title: Re: Micro Core ported to Javascript
Post by: danielibarnes on May 24, 2011, 11:04:57 PM
I'm still laughing :D

If it had a virtual network adapter, I could run a web server within my browser ... :)
Title: Re: Micro Core ported to Javascript
Post by: tinypoodle on May 24, 2011, 11:07:10 PM
I'm still laughing :D

If it had a virtual network adapter, I could run a web server within my browser ... :)

I've never much cared about, but isn't "Opera Unite" a ready made webserver in a browser?
Title: Re: Micro Core ported to Javascript
Post by: danielibarnes on May 24, 2011, 11:27:11 PM
I've never much cared about, but isn't "Opera Unite" a ready made webserver in a browser?

To quote, "Opera Unite is not designed to replace professional Web servers (http://unite.opera.com/develop/faq/#php) ..." I was able to run lynx, and I considered installing busybox-httpd or my lighttpd-nodeps extension. I couldn't think of anything cool to do with it aside from having a web server serve web pages to a web browser within a web browser.
Title: Re: Micro Core ported to Javascript
Post by: hiro on May 25, 2011, 05:57:57 AM
If it had a virtual network adapter, I could run a web server within my browser ... :)

Then we've been laughing about exactly the same thing :D
Title: Re: Micro Core ported to Javascript
Post by: curaga on May 25, 2011, 10:27:31 AM
I still can't see why do that (the emulator). Hey all, let's run a heavy-as-is emulator on top of an interpreted language, on top of an already-heavy app, lol. :D
Title: Re: Micro Core ported to Javascript
Post by: danielibarnes on May 25, 2011, 10:40:28 AM
Quote
I still can't see why do that

Read the page I linked in my original post, at the very bottom:

Quote
What's the use ?

I did it for fun, just because newer Javascript Engines are fast enough to do complicated things. Real use could be:
Benchmarking of Javascript engines (how much time takes your Javascript engine to boot Linux ?). For this particular application, efficient handling of 32 bit signed and unsigned integers and of typed arrays is important.
  • Learning to use command line Unix tools without leaving the browser.
  • Client side processing using an x86 library, for example for cryptographic purposes. For such application, the x86 emulator can be modified to provide an API to load x86 dynamic libraries and to provide a js-ctypes like API to call the C/C++ functions from javascript.
  • A more advanced version would allow to use old DOS PC software such as games.
Title: Re: Micro Core ported to Javascript
Post by: tinypoodle on May 25, 2011, 04:29:23 PM
I still can't see why do that (the emulator). Hey all, let's run a heavy-as-is emulator on top of an interpreted language, on top of an already-heavy app, lol. :D

Proof of concept of maximizing overhead?  ;)
Title: Re: Micro Core ported to Javascript
Post by: Rich on May 25, 2011, 06:59:39 PM
Sometimes we try things just to see if they can be done or as a learning experience, regardless of
how useful they may or may not be. I once made a bootable floppy with a 2.6.28 kernel, uclibc and
busybox. I used a 1.4Mb floppy formated to 1.722Mb and had 180Kb to spare. Did it serve a useful
purpose? Not really, but I got the satisfaction of knowing I could do it and learned a lot along the way.
Title: Re: Micro Core ported to Javascript
Post by: curaga on May 26, 2011, 01:49:36 AM
I'm just as guilty in doing things like that too ;) Guess the part I don't get is making it a public project, my crazies tend to stay inside.
Title: Re: Micro Core ported to Javascript
Post by: Guy on May 26, 2011, 01:54:27 AM
You learn a lot by experimenting.

I have tried a lot of things which worked, and a lot of things which did not work.

I have learnt during the process.
Title: Re: Micro Core ported to Javascript
Post by: vinnie on May 26, 2011, 07:24:10 AM
I suggested to my friend who was skeptical, now that I'll show him this page he'll be knocked  ;D