JavaScript- (Not Python-) Defined Neutral Networks? Deno 1.8 Supports WebGPU (infoq.com) 51
InfoQ reports:
Deno 1.8 recently shipped with plenty of new features, including WebGPU support, internationalization APIs, stabilized import maps, support for fetching private modules, and more. The Deno permissions API is now stable. Deno 1.8 additionally ships with TypeScript 4.2.
The release note explained the motivation behind the support for the WebGPU APIs as follows:
These days, most neural networks are defined in Python with the computation offloaded to GPUs. We believe JavaScript, instead of Python, could act as an ideal language for expressing mathematical ideas if the proper infrastructure existed. Providing WebGPU support out-of-the-box in Deno is a step in this direction. Our goal is to run Tensorflow.js on Deno, with GPU acceleration. We expect this to be achieved in the coming weeks or months.
WebGPU is an API originally proposed by Apple that exposes the GPU computation functionality available on many devices. WebGPU may provide better performance than WebGL in tasks that benefit from parallel processing — as often occurs in scientific computing, machine learning, graphics and games development...
Deno users can upgrade by running deno upgrade in a terminal.
The release note explained the motivation behind the support for the WebGPU APIs as follows:
These days, most neural networks are defined in Python with the computation offloaded to GPUs. We believe JavaScript, instead of Python, could act as an ideal language for expressing mathematical ideas if the proper infrastructure existed. Providing WebGPU support out-of-the-box in Deno is a step in this direction. Our goal is to run Tensorflow.js on Deno, with GPU acceleration. We expect this to be achieved in the coming weeks or months.
WebGPU is an API originally proposed by Apple that exposes the GPU computation functionality available on many devices. WebGPU may provide better performance than WebGL in tasks that benefit from parallel processing — as often occurs in scientific computing, machine learning, graphics and games development...
Deno users can upgrade by running deno upgrade in a terminal.
Neutral Networks? (Score:5, Funny)
really putting the "Editor" in "EditorDavid". Do these people even know what an editor does?
Re: (Score:2)
Neutral network? I gess the editor never read this AI koan: [catb.org]
In the days when Sussman was a novice, Minsky once came to him as he sat hacking at the PDP-6.
“What are you doing?”, asked Minsky.
“I am training a randomly wired neural net to play Tic-Tac-Toe” Sussman replied.
“Why is the net wired randomly?”, asked Minsky.
“I do not want it to have any preconceptions of how to play”, Sussman said.
Minsky then shut his eyes.
“Why do you close your eyes?”, Sussman asked his teacher.
“So that the room will be empty.”
At that moment, Sussman was enlightened.
Re: (Score:2)
He is basically a moron.
Neural or neutral (Score:2)
Net neutrally?
Re: Neural or neutral (Score:4, Funny)
Somebody needs to be neutered...
Re:Neural or neutral (Score:4, Funny)
It was edited by an AI trained using Javascript.
But are they webNeuralNetworks? (Score:1)
Unacceptable!
It should be written in webJavaScript!
So I can run it in my webChrome, on my webLinux [copy.sh]!
I've got a fever! And the only prescription ... is more web!
Re: (Score:2)
I've got a fever! And the only prescription ... is more web!
+1 funny for reference to best SNL skit ever.
Ideal language (Score:5, Insightful)
We believe JavaScript, instead of Python, could act as an ideal language for expressing mathematical ideas if the proper infrastructure existed.
They don't give any justification or even reasons why they believe this. To begin with, it would be helpful if NumPy and Pandas were also ported. Secondly Javascript might be an adequate language for "expressing mathematical ideas" (I would argue APL is better, which discounts Javascript from being 'ideal'), but certainly saying Javascript is the ideal language lacks imagination.
Any time someone says they've found the ideal language for something, give them a lollipop.
Re: (Score:1)
Because their reasons can't possibly be rational. Javascript is propelled by hype and a desire to achieve total language monoculture.
Re: (Score:2)
Re: (Score:1)
Re: (Score:2)
They don't give any justification or even reasons why they believe this.
They already sorta know javascript, and learning a second language is too hard.
Re: (Score:2)
Re: (Score:2)
A neural network is some super simple math, so pretty much any language that can handle a matrix multiply is going to be okay. Even if the matrix multiply is clunky, you're very quickly going to wrap it up in a few layers of abstraction anyway.
Why would you want to define one in Javascript? Don't know. It's the same as the FastAI guy who suddenly decided Swift was the ideal language. My guess is that whoever is behind this project learned some JavaScript at some point and when you know one language it's nat
Re:Ideal language (Score:4, Insightful)
Re: Ideal language (Score:3)
This. Whatever the âoerightâ language for pretty much anything is, python is not it. The language sucks, the engine sucks, the package infrastructure sucks. The fact that itâ(TM)s the de-facto standard for data-science is an accident that needs to be fixed.
WAT? (Score:4, Insightful)
We believe JavaScript, instead of Python, could act as an ideal language for expressing mathematical ideas
Javascript is a hateful, spiteful language. The only thing it is ideal for is a demonstration on how not to do things.
Re:WAT? (Score:4, Funny)
It's still better than Perl. I swear that language was created by wizards and warlocks, the code looks like incantations.
Re: (Score:1)
Re: (Score:2)
It's still better than Perl. I swear that language was created by wizards and warlocks, the code looks like incantations.
That's the fault of the coder, not of the language itself. Well-written and well-commented perl should be easy to read and follow.
Well, I suppose you can blame the language for making that sort of code *possible*, although most languages have that issue. It's just that some perl coders seem to see writing indecipherable code as being some bizarre badge of honor.
Re: (Score:2)
Well-written and well-commented perl should be easy to read and follow.
Well written code is commented with explanations "why are you doing this in this way", e.g. why does the loop start at 1 and not 0, or why does it go to length - 1 and not length.
Perl code needs comments that explain "what is that supposed to do", pretty bad "comments" according to my standard of not commenting anything but having self explaining code by using proper naming.
I can read my 20 year old C++ code. No way I can read my old Per
Re: (Score:2)
Trying to read some PERL I wrote years ago gave me PTSD and brain cancer.
Re: (Score:2)
They had a priest or monk or Paladin, too.
You can "bless" objects in Perl ...
Development (Score:2, Troll)
JavaScript 1: Hey look, you can make dynamic menus in your web page!
JavaScript 11: Hey look, you can build your enterprise client, middleware, and backend all in the same language!
I can't see how 10 revisions of a language is possibly enough to go from the first feature set to the last.
Re: WAT? (Score:2)
And python is what?
Re: (Score:2)
One nice thing about JavaScript is that it seems to have the most transpilers for a scripting language and perhaps is only second to C among all programming languages in transpiler count. After all, few want to actually write in JavaScript.
I wish Python had as many. I use Coconut lang, there is Hy, but there could be a lot more.
Re: (Score:2)
That's not likely. Besides, you'd be hard pressed to replace it with something better.
I'll give you a minute to think of reasons why JS works so well with the web, and why your pet language would feel a bit awkward.
Re: Please God NO (Score:2)
Javascript didn't get to where it is by merit. It got there by existing momentum.
Brendan Eich had ten days. It was a miraculous work. But it was extended beyond its utility and the world is worse for it.
How to move beyond JS? (Score:2)
So what's the way forward in your opinion? In comments here and on the maroon site, I've generally read about three options:
A. Replace JS with other languages that compile to WebAssembly, leaving JS solely as a shim between WebAssembly and the DOM.
B. Come up with some other standardized GUI protocol that somehow does not repeat the mistakes of JS and the HTML DOM, the details of which are left as an exercise for the reader, and somehow get Apple to allow publication of a client therefor on the App Store.
C.
Re: (Score:2)
Late to reply, but I think this was thoughtful enough to warrant it.
I think that A is a way forward as a proving ground, but it has limited use. Having to include a standard runtime/library is no small impediment to building good websites/applications. A language designed around compiling to Javascript instead of WebAssembly can avoid this issue to a useful degree, and will have better DOM support.
That's just a stepping stone to D, which is browsers supporting a new language outright as a first-class alte
Re: (Score:2)
That's rewriting history a bit. Javascript was far from the only game in town.
There were competitors early on. VBScript, Java, Shockwave, etc. All failed to bring interactivity to the web for various reasons.
As far as the languages design, the "warts" come from the requirement that the language look more like java. That's where we get the ugly 'new' keyword. I suspect the hate stems from people trying to use JS like they were using Java and getting frustrated. The languages are not the same. They're
I Have Long Believed So.. (Score:3)
JavaScript is in every way a vastly better language. It's syntax has far fewer quirky aspects and is faster write in, uses far less system resources, and executes much faster.
Node.js, however, is not ideal. Node.js adds a lot of unnecessary complexity by means of forcing extreme asynchrony. While certainly I believe in asynchrony, forcing such extreme design constraints on others is never good, and in this case, add a very large degree of unnecessary complexity. Here's one better way of doing asychrony in an advanced form of JavaScript:
x = fork( function(){ .. }, timeout ); .. }, timeout); // sharing parent's scope
y fork( () => {
The x would be an object described below. The function is what executes on a separate process and the timeout is after when to fail, if not response.
x.started // date/time asychronous function began // any data returned by the asynchronous function // date/time finished else boolean false until then. // boolean true else error message // the timeout given to it
x.returned
x.finished
x.success
x.timeout
The primary maintainer of Node.js fails to understand the beauty of the concepts of prototype object-orientation and loose data types. Furthermore, Node.js has really created a mess with the npm package system. A strongly believe a new server-side JavaScript should be written, likely also based on the V8 engine.
Another thing I'd do:
when( condition ) { .. }
In the above, each variable within the condition would be marked as part of a "when". Any modification of a value and the "when" is re-evaluated. However, the "when" statements would be restricted to scope. If abused, this could be very consumptuous of computation resources but when used well, it could greatly simplify a lot of complexity and also greatly reduce the potential for bugs.
--Matthew C. Tedder
Re: (Score:2)
Re: (Score:2)
Well, what's wrong with it?
The only think I ever hear people complain about is dynamic typing. Occasionally, you'll see someone complain that they don't understand the scoping rules.
I'm not saying that it's perfect, just that the hate seems to come exclusively from people repeating a meme and people who really just don't understand the basics of the language.
Re: (Score:2)
Re: I Have Long Believed So.. (Score:2)
Yes, the reasons behind a language being unnecessarily hard to learn do indeed validate complaints.
Javascript is a mess. Typescript helps. But it is still ultimately salvaging a mess.
Re: (Score:2)
Re: I Have Long Believed So.. (Score:2)
Or... just use Promoses and a sync/await like everyone else...
Re: (Score:2)
x.started
x.returned
x.finished
x.success
x.timeout
Seriously, if you would write bullshit like this in a shop I worked you would not be fired, but fired at.
What the heck is WebGPU? (Score:2)
That aside, when is someone going take designing an open source GPU seriously? I mean I know there are various abandoned attempts .. but we need a RISC V of GPUs .. it isn't cool that there's basically only nVidia and AMD making GPUs. (ARM Mali architecture doesn't count .. it's only for mobile phones).
Re: (Score:2)
Intel makes GPUs. Apple does now too. And whatever that thing Apple used in MacBooks before M1. There are a lot of GPU manufacturers. There are two that compete at the high end, because making cutting edge GPUs is pretty difficult.
Re: (Score:2)
WebGPU allows access to compute resources of your GPU from web pages. It would seem specifically to allow injection of cryptominers through malware. The same goes with WebASM.
Re: (Score:1)
Re: (Score:2)