Javascript in kernal

now that multiple c to j.asm compilers exist, and of course any language really can do this. why not just move a javascript interpreter into the kernel and forget native code entirely

it's the most popular language with the most powerful modern oop opensource codebase.

portability would be solved forever and we can really do what we've been flirting with for years now, this is obviously what we need

browsers are the portal to 90% of average users programs, this can finally end this and make the computing world make sense.

Other urls found in this thread:

hacks.mozilla.org/2013/12/gap-between-asm-js-and-native-performance-gets-even-narrower-with-float32-optimizations/
github.com/Microsoft/vscode/issues/22900
gelbooru.com/index.php?page=post&s=view&id=2954543
twitter.com/SFWRedditImages

>"Mozilla's benchmark from December 2013 showed significant improvements: "Firefox with float32 optimizations can run all those benchmarks at around 1.5× slower than native, or better."[7] Mozilla points out that the performance of natively compiled code is not a single measure but rather a range, with different native compilers (in this case Clang and GCC) delivering code of differing performance. "In fact, on some benchmarks, like Box2D, FASTA and copy, asm.js is as close or closer to Clang than Clang is to GCC. In one case, asm.js even beats Clang by a slight amount on Box2D."[7]"

> In one case, asm.js even beats Clang by a slight amount on Box2D.

rly makes u think

Because then nothing would be fast.
>Your media player, system libraries, display server, graphics libraries, etc, all written in Javascript
No thanks.

they could be written in C and compiled into javascript baaka

you could keep using the same software you use now if its opensource, infact it might even be faster thanks to software vs hardware based memory privacy

>70% cpu during idle

Can't wait

>written in C and compiled into javascript
How the fuck does that solve anything you retard? It would still be fucking slow because of javascript interpreter. And it doesn't even solve the portability problem.

I'd tell you to kill yourself, but then you'd stop posting Marie.

you're retarded, if you had read my posts you would have noticed that I addressed the speed issue. Yes C compiled into asm.js can actually be faster than 'normal' C.

I even posted a specific example where it was faster already, and that isn't even taking into account the many improvements that would be made once we start trying (that I also mentioned btw)

>they could be written in C and compiled into javascript baaka

You don't have a clue how things work at low level right?

another baaka idiot who thinks he can outsmart marie rose lol

not even going to bother replying to you

Because Python is better.

>not even going to bother replying to you
And yet you did anyway.
Well done.

javascript is by far the most popular programming language, this brings a myriad of advantages in itself

we would suddenly have all the greatest programming minds on the planet coming to develop opensource software for everyones os at the same time!

>Yes C compiled into asm.js can actually be faster than 'normal' C.
Except that's literally not possible.
An interpreter cannot be faster than bare hardware, especially when it's the same language and code being compiled onto the two execution platforms.

Whatever fake article you're citing is full of lies and retardation.

>greatest minds on the planet
>because a language is popular
Wew lad. What about all the people who listen to pop music, must be the greatest minds in music.

you're a retarded idiot
>Except that's literally not possible.
HAHAHAAH

you are the worst type of person, you think you are smarter than everyone else when in reality you are an uneducated braindead MORON

>they could be written in C and compiled into javascript baaka
Why? Thats just utterly retarded baaka

>this brings a myriad of advantages in itself
Such as?

At this point I realized this is just bait

please educate yourself before posting on Sup Forums

hacks.mozilla.org/2013/12/gap-between-asm-js-and-native-performance-gets-even-narrower-with-float32-optimizations/

Explain to me how it's possible, assuming both compilers are equally optimizing, that C compiled to JS can be faster than the same C compiled to machine code.
It's retarded nonsense.

The interpreter would ALWAYS have more overhead than the compiled version.

are you incapable of reading?
get the heck out of my thread if you are just going to continually embarrass yourself in impotent autistic rage just because an ANIME CHARACTER on Sup Forums is more intelligent than you

>the current performance numbers – 1.5x slower than native
Yup, it is slower than native. So why go extra step to slow it down?

Some random SJWzilla article says it's possible therefore it's possible?
If I wrote an article claiming that water burns you to the touch, would you believe it? because it seems you would.

>just because an ANIME CHARACTER on Sup Forums is more intelligent than you
But I'm also an anime character. Pic related is me right now while reading this thread and your posts.

READ CANT YOU READ WHY DO I HAVE TO SPOON FEED YOU MOOROOONSSS

there are ALREDY examples of asm.js programs running faster than native in box2d; its 100% possible and barely any work has been done on it

No there are not. There has been no development in 4 years. Shitty idea had its death long ago

>
Discarded.

>its not possible
to
>lol fake news

hmmmmm

stop posting her

Seriously are we looking at the same graph? Compiled C is vastly superior

>Hur dur one example that beat a shitty compiler
>Meanwhile ignoring literally all the other benchmarks on that chart.
On average slower. No thanks.

disregard this faggot, continue posting her

woah its the sound of goalpost moving at hypersonic speed

lewd

>stop posting her
No.

>lower is better
>only one case where firefox-f32 was slightly better than clang
>still shit compared to gcc

>As the graph shows, Firefox with float32 optimizations can run all those benchmarks at around 1.5x slower than native, or better.
>1.5x slower

you can download the tests on github, which i've done

woah its the sound of ur rectum expanding at hypersonic speed when u take huge dicks in your ass

btw in the end when javascript reaches the eventual parity with c compiler on majority of programs, it will immedietly be 20 - 30% faster anyway thanks to software based memory protection instead of hardware based interrupts and traps

even with a 10-20% vm overhead this is still faster in the end

I want to touch Marie's no no zone!!

No goalposts have moved.
Remember when I said
>assuming both compilers are equally optimizing
Take a look at the gcc bar, it thoroughly btfo's everything else. Clang is not mature yet and when it does get mature, it will be on the same level as gcc, btfo'ing firefox.
JS will never objectively be faster than compiled code. Sorry.

All it proves is that Clang doesn't optimize well enough.

the only mathematical advantage you have is vm overhead which I already btfo hhere: please leave this thread if you are too uneducated to keep up with the discussion

Do you have loli 3d models?

>btw in the end when javascript reaches the eventual parity with c compiler on majority of programs
Will never happen for as long as javascript is interpreted.

>thanks to software based memory protection instead of hardware based interrupts and traps
That will make it slower retard.
>Checking memory accesses EVERY TIME in software
Not to mention that your CPU will ALSO be doing the same thing, since you can't turn it off, so that's even more added overhead.

How are you going to do software based memory protection on hardware? Are you trying to browse the webs with software running on imaginary hardware?

>That will make it slower retard.

wrong, microsoft study says 20-30% speed improvements using software

the same way your browser 'protects' one tab from another, there will be no memory protection done on chip

So you are saying there will be software based memory protection but no memory protection? Good luck shitposting with your imagination

So basically you're forbidding any and all native code from running on the system besides the kernel?
That's fucking retarded.

Also, that would open up the system to a fuck ton of security problems since the interpreter would be running in fucking kernel mode.
Any exploit found in the interpreter and your system is fubar.

That's the most retarded thing I have read in years.

how often javascript escapes sandbox today? you are inventing problems to justify your outdated viewpoints on software

read the thread and if you still think you have a point reply again and ill btfo you like everyone else

Only person getting btfo'd here is you. I'm laughing at your stupidity/trolling

haha nice argument dood you really proved to everyone you;re smarter than a barely pubescent anime girl
NOT

>thread turned from marieposting to autism
Classic Sup Forums

>how often javascript escapes sandbox today?
All the time.

The more major something is, the more attention it gets.
Many people are definitely going to dedicate their time to finding exploits in the interpreter, and they WILL find those exploits.
And once they do, they can wreak absolute chaos on everyones systems.

Didn't say i was smart

Did I fucking tell you to stop posting Marie?!

obviously more work will be given to fixing exploits once its used, example CURL in C is written in one of the most unsafe languages in the world but its constantly and forever probed for issues and avoids any major security holes

javascript is the biggest codebase and the most programmers in the world to be dedicated to this problem

not to mention javascript interpreter can be freaking tiny


okay im sorry

*libcurl

why do you work so hard for male attention on Sup Forums user?

im here to discuss intellectual topics of technology

Sup Forums is 100% male.
Anyone trying to claim they are female is just a retarded trap.

uhhh im a girl sorry if that intimidates you

>you will never pipe your compiled JS into maries kernal

:lewd:

>just a retarded trap

I've actually thought of implementing a Lua interface for drivers in my kernel.
Just as a fun experiment, not anything serious.
I don't even know if I'd be able to compile the lua interpreter to run in kernel mode without an stdlib.

that's a cool protect user, goodluck

give me a blowjob

>tfw marie isn't free and open-source

It doesn't intimidate so much as explain the retardedness of what you're saying

get away from me creep

ok bye

>marie will never give you a 5 hour debugging session

>baaka
>faster thanks to software vs hardware BASED memory privacy

this is an intellectual girls thread only

then why are you still here?

because im an intellectual girl

you're a slutty girl

github.com/Microsoft/vscode/issues/22900
>CPU usage even when idle (due to cursor rendering)

wtf how do i delete someones post in my thread

well I can keep quiet if you do something for me

MODS! im being sexually harrassed

>sexually harrassed
where?

they arent here to save you *unzips*

You're certainly a cute girl, but I wouldn't call you an intellectual girl.

op is a SLUT
proof: gelbooru.com/index.php?page=post&s=view&id=2954543

just came here to say marie rose is the best girl, now I'll return to never browsing this board

>kernal

How does being mentally challenged feels like?

var redux-scheduler = require('redux-scheduler');

just imagine the painfully slow performance.

What do you get out of having an interpreter in the kernel that you can't just get from having a standalone interpreter?

>MUH SYNTHETIC BENCHMARKS!

Spend some time on code competition sites and pay attention to algorithm execution times (obviously with samples from people who took the same approach to the problem). In order from fast to slow:
C
C++
C#/VB.NET
JavaScript
Java (yes, Java is fucking slow)
Shit like Haskell and Scala

C and C++ are typically close. C#/VB.NET are typically decent but several times worse than C/C++. JavaScript is slower again by a few times. Java is absolute shit, and only meme languages like Haskell are worse.

Python is either shit or surprisingly decent. When it's decent, it's actually faster than JS.

So I don't want to hear about your synthetic (and likely 'fine tuned') benchmark bullshit. Java fags will claim they're just as fast as C to. In reality Java is one to two orders of magnitude slower than C. Sometimes even worse.

thanks for the marie pics

...