Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror

Comment Re: Accomplishment (Score 2) 136

Maybe you should read about the technology of AlphaGo first before you make such a claim. It uses not just computing power but also a combination of fancy algorithms such as neural networks. Neural networks are motivated by our brain. And you have to admit that our brain is some physical device - it can be simulated to some point by a "searching and processing data" device.

Comment Re:Turtles all the way down (Score 1) 177

Thank you very much. It was a year of constant effort to come so far. There is so much to say about the speed the emulator. The biggest issue is, that the rules are changing every few weeks when new browser version are released. Firefox 22 gave me 30 MIPS with the standard core. Firefox 23 reduced it to 10 MIPS for some reason. Instead the Chrome browser increased from 10 to 30 MIPS. It is crazy. The emulator runs at the edge of what is possible with current JIT compilers.
The nice part is, that the asm.js part seems to run stable and fast. Yes, it is hand written. And I think it is faster than compiled code. The reason is in my opinion the goto handling of the emscripten compiler. Javascript doesn't have a goto command. On trick here is to use the switch/case statement to somehow reproduce a goto, which works, but slow.
I have looked at all of the emulators I could find so far, also jsbochs. I think that if I would emulate Bochs inside my emulator it would also have a speed of 0.04 MIPS ;)
There are so many small details which could reduce the speed - Flags, 64 Bit and so on. And just by recompiling you will not get that big speed improvement. OpenRISC is a nice architecture which is well suited for such an emulator.

Comment Re:is javascript faster than java? (Score 1) 177

I have in my wiki a site describing the speed problems and how I solved them. https://github.com/s-macke/jor1k/wiki/Technical-details
I am not doing any memory allocation during the emulation.Everything is done at the beginning.
Debugging is a real issue. I used mainly console.log. But Firefox and Chome provide some debugging features.

Comment Re:LOL (Score 1) 177

I don't know what you mean by real OS. But if you mean Windows. Windows 95-Windows2000 should be possible to emulate. The newer Windwows version might work as well in future. It depends on the amount of memory the web browsers provides you and of the bandwidth of your network connection. Download 500MB before you see the Desktop? But you can't put them online as this will violate copyright law.

Comment Re:Turtles all the way down (Score 1) 177

I know. But to build an OpenRISC (1000-2000 lines for the core) emulation is much more easy than to build an x86 emulation (10000-20000 lines for the core). And I would not use the closed source emulator by Fabrice Bellard. Try this new emulator from: http://copy.sh/v24/ This seems to be a much better base for development.
I have also made a list of online emulators currently available. https://github.com/s-macke/jor1k/wiki/Similar-emulators-written-in-Javascript
Emscripten is boring. It uses no emulation. ;)

Comment Re:So...? (Score 5, Interesting) 177

A year ago, when I started the project it was simply interest in learning Javascript. I was fascinated by the emulator from Fabrice Bellard http://www.bellard.org/jslinux/
I am a programmer focused on simulations/emulations and performance. I was also interested in learning the internals of how a computer nowadays works. The x86 CPU is way to compilcated. You lose the clear sight for stupid details like the A20 gate. The OpenRISC project is perfect. It is a CPU with a very easy and clear CPU. Nothing historic. It has even some similarities with byte code, which makes it very fast if you emulate it properly. I optimized especially for running Linux violating the specification a bit.
The whole CPU with MMU fits in around 1000 lines of code. During that day I never expected to get that far. Now with all three cores and devices it needs around 7000 lines of code.

I have a list of useful things you can do with it:
1. Use it as an education system of the Linux system or other tools. For example you could write a git tutorial with live examples.
2. This emulator provides an alternative way to port old software to run on modern systems. In direct comparison to the project Emscripten it is slow, but the porting could be much easier. For terminal applications probably no porting is neccessary at all (e. g. Frotz).
3. The emulated OpenRISC CPU is very easy and contains around 1000 lines of code. So it is the perfect example to learn how emulation works.
4. With network support it allows you to access other computers within the Web Browser providing ready to use tools. (Even an encrypted chat is possible if you run the sshd daemon)
5. Use it as a speedtest for Javascript engines.
6. It is an advertisement for the OpenRISC project.

You can also read the motivation of Ben Burns in his Blog: http://www.benjamincburns.com/2013/11/10/jor1k-ethmac-support.html
And I have to admit that I did the wayland support last time only to get some news. :)

Slashdot Top Deals

Shortest distance between two jokes = A straight line

Working...