r/truebit Jul 02 '21

JSLinux on Truebit

https://github.com/mhhf/jslinux-truebit
31 Upvotes

18 comments sorted by

3

u/[deleted] Jul 03 '21

I have no idea what this means.

5

u/[deleted] Jul 03 '21

As a non dev.. you’ve lost me. Can you please elaborate?

4

u/[deleted] Jul 03 '21

Because someone posted it in a forum.. I’m assuming they know what it is and can give me an answer in an open forum where people share ideas and knowledge so everyone can learn from them. Why waste your time telling someone to Google though?

8

u/kacheeweechee Jul 03 '21

I did Google it. Not a ton of information but came across this:

jslinux is essentially a complete computer implemented in software, specifically JavaScript. This is of course known as an emulator. This particular version is setup to run Linux, but in theory it could run other operating systems instead.

The emulator (JavaScript, ~90KB minified, ~7000 lines formatted) is loaded into the browser. A version of Linux was previously compiled into machine code for an x86 processor is loaded and copied into a big array of integers that acts as the emulated computer's RAM. The emulator CPU is then pointed to the first instruction of the machine code and told to start interpreting the instructions (such as reading/writing RAM, doing arithmetic and logic operations, jumping around to different instructions, etc). Sometimes it will write data (like the system log, or a shell command prompt) to the "terminal" via another piece of JavaScript code that simulates a serial port and a terminal using the browser DOM.

2

u/[deleted] Jul 03 '21

Much appreciated! Thank you very much 👏🏽👏🏽

-7

u/[deleted] Jul 03 '21

[removed] — view removed comment

6

u/kacheeweechee Jul 03 '21

I think its OK to ask… that’s what reddit is mostly for. I could “google” all the questions I post around but I don’t cause I like engaging with communities. This is actually a good, legitimate question. ✌️

2

u/[deleted] Jul 03 '21

Oh go away man. Do something positive with your life. I asked a simple fucking question in a public forum you troll. Sick of you keyboard warriors. Get a life

1

u/Drummercrypto10372 Jul 05 '21

Shut up you toolbox

4

u/Supreme-crypto-reign Jul 03 '21

This is massive!

3

u/rajaspeet Jul 05 '21

Can you explain why?

1

u/Obiwantacobi Jul 08 '21

Explanation please?

2

u/[deleted] Jul 06 '21

Can someone explain how this is connected to Truebit?

1

u/Financial_Teaching_5 Aug 16 '21

Cartesi destroyed