It is currently Sun Nov 15, 2026 8:06 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: A very impressive feat (Linux created in Javascript)
PostPosted: Tue May 17, 2011 3:19 pm  (#1) 
Offline
GimpChat Member
User avatar

Joined: Apr 27, 2010
Posts: 1510
Location: Sweden
Check this out - an emulated x86 computer running Linux - created in Javascript! I'm not kidding.

http://bellard.org/jslinux/

You need Firefox4 or Chrome11 to run it properly. It has emacs and VI, and you can use tcc to compile C-programs. Damndest thing I've seen.
.
Griatch

_________________


Last edited by Griatch on Tue May 17, 2011 5:23 pm, edited 1 time in total.

Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: A very impressive feat
PostPosted: Tue May 17, 2011 4:46 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: Oct 06, 2010
Posts: 4050
I managed to view it in Chrome. I've been playing with Emacs, but not versed enough to write home about. I would love to see a video of it in action to give me a feel of how it looks outside the terminal.

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: A very impressive feat
PostPosted: Tue May 17, 2011 5:20 pm  (#3) 
Offline
GimpChat Member
User avatar

Joined: Apr 27, 2010
Posts: 1510
Location: Sweden
@mahvin

There is no "outside the terminal" ;) It's a frigging full running computer hardware emulation with a fully installed Linux distro, written in Javascript! - I'd say that's impressive enough, also without an X-server.

I keep on reloading the page just for the thrill of seeing Linux rebooting in my browser cache. :)
.
Griatch

_________________


Top
 Post subject: Re: A very impressive feat (Linux created in Javascript)
PostPosted: Tue May 17, 2011 5:52 pm  (#4) 
Offline
GimpChat Member

Joined: Apr 11, 2010
Posts: 545
Location: In the mini-chat, saying silly things
Ha ha . Have fun. All I managed to do was type in emacs and then some random text.

At first I said hi, but it didn't say hi back. Linux is a bit anti social. ;)

_________________
Image


Top
 Post subject: Re: A very impressive feat (Linux created in Javascript)
PostPosted: Tue May 17, 2011 7:12 pm  (#5) 
Offline
GimpChat Member
User avatar

Joined: Oct 06, 2010
Posts: 4050
I was impressed, Griatch. I was saying my emacs knowledge was limited (nothing to write home about). It would be cool to learn how to take advantage of tcc for compiling C.

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: A very impressive feat (Linux created in Javascript)
PostPosted: Tue May 17, 2011 9:59 pm  (#6) 
Offline
Former Member
User avatar

Joined: Nov 17, 2010
Posts: 618
Location: Rockford, IL
This is a really good find!!! How'd you find it???


Top
 Post subject: Re: A very impressive feat (Linux created in Javascript)
PostPosted: Wed May 18, 2011 12:16 am  (#7) 
Offline
GimpChat Member
User avatar

Joined: Apr 27, 2010
Posts: 1510
Location: Sweden
@mahvin

Aha, you wanted more info about emacs? I misunderstood you. I use emacs a lot for all my development; it is (together with VI) probably the mother of all editors.

Guided tours (not videos):
http://www.go4expert.com/forums/showthread.php?t=20234
http://www.gnu.org/software/emacs/tour/

You can also enter "emacs" in Youtube and get plenty of demos of it in use.

In the JLinux terminal, you can write "tcc hello.c" to compile the example Hello-world C-program. This will produce an output file "a.out" that you can execute with "./a.out".


@mikethedj4

As usual with things like this, I got the link over IRC from someone else. Not sure how they found it.
.
Griatch

_________________


Top
 Post subject: Re: A very impressive feat (Linux created in Javascript)
PostPosted: Wed May 18, 2011 8:54 am  (#8) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
mikethedj4 wrote:
This is a really good find!!! How'd you find it???


It turned up on Slashdot yesterday: http://linux.slashdot.org/story/11/05/1 ... ur-Browser

and on The Register today: http://www.theregister.co.uk/2011/05/18 ... _emulator/

Just to see if I could, I used vi to edit the hello.c file:
/* This C source can be compiled with:                                         
   tcc -o hello hello.c                                                         
*/                                                                             
#include <tcclib.h>                                                             
                                                                               
int main(int argc, char **argv)                                                 
{                                                                               
    int i;                                                                     
    for (i=0; i<10; i++)                                                       
    {                                                                           
      printf("Hello World\n");                                                 
    }                                                                           
    return 0;         


I then compiled it: tcc hello.c
It made a.out
I ran a.out: ./a.out
it produced:
Hello World                                                                     
Hello World                                                                     
Hello World                                                                     
Hello World                                                                     
Hello World                                                                     
Hello World                                                                     
Hello World                                                                     
Hello World                                                                     
Hello World                                                                     
Hello World                                                                     
~ #                                                                             


Kevin


Top
 Post subject: Re: A very impressive feat (Linux created in Javascript)
PostPosted: Mon Jun 22, 2020 12:00 am  (#9) 
Offline
GimpChat Member
User avatar

Joined: Oct 06, 2010
Posts: 4050
It's still up and running, too! Imagine that! LOL

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group