The Next Browser Scripting Language Is — C?
mad.frog writes to tell us that in a recent talk by Adobe's Scott Petersen he demonstrated a new toolchain that he has been working on (and soon to be open-sourced) that allows C code to be run by the Tamarin virtual machine. "The toolchain includes lots of other details, such as a custom POSIX system call API and a C multimedia library that provides access to Flash. And there's some things that Petersen had to add to Tamarin, such as a native byte array that maps directly to RAM, thereby allowing the VM's "emulation" of memory to have only a minor overhead over the real thing. The end result is the ability to run a wide variety of existing C code in Flash at acceptable speeds. Petersen demonstrated a version of Quake running in a Flash app, as well as a C-based Nintendo emulator running Zelda; both were eminently playable, and included sound effects and music."
Now we can finally get this "web operating system" thing I've heard so much about...
Same as the old boss.
We can write PHP! And then browser security will be top notch.
Is it just me but isn't music also sound effects?
You mean my preferred language has just become cool?
Ok, this is either great news or the world is about to end.
I think I'll go stand in a doorway for an hour or two, just to be on the safe side.
A learning experience is one of those things that say, 'You know that thing you just did? Don't do that.' - D. Adams
There used to be a project, many years ago, which was I believe called itself something like "Internet-C". It used gcc with a pseudo-code backend to produce portable binaries which could then be ran from a plugin or through an emulator. Since gcc was tuned for register based archectures and 68k was already an existing backend, I think the pseudo-machine code he used was based at least loosely on the 68k one.
You realise that all the OS layers, networking layers, web browsers, scripting languages are primarily to try to get away from C?
Deleted
Adobe just invented CGI! Good work, guys.
in other news, the amount of spyware-infected computers increased by 500%
Is that a pirate copy? Just curious...
I can't believe it.. An idea for a web programming environment that would make me hate web programming slightly less.
Everything's being constantly reinvented but no actual progress is being made. Oh look, the 100th toolkit to do exactly the same thing! Oh look, a new way of layering something old on something old on something old to give something new! Oh look, another silver bullet framework!
Can anyone here remember the web of 10 years ago, for example? Content = text for reading + graphics for illustration. No bullcrap, just Google/Wikipedia style web sites to give me a simple navbar + content.
If the "byte array mapped to RAM" installed in Tamarin allows the code to store anywhere in the interpreter's space, that's a huge security hole. It can do anything the user process can do. If you're going to allow that, you may as well just load executable machine code directly, as with Active-X.
Anyway, the article is a blog post that rehashes an interview from last year. The info in that article is better.
... is definitely going to be browser-FORTRAN.
sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
And highly exploitable as well.
Web2.0: I love when people Flickr my cuil and digg my boingboing until my google is reddit and I start to yahoo
...that this is our doom?
This is an interesting hack but it does not do anything for improving either computational theory or improving web application development. Combine C arrays that can be coded within a page like Javascript with a web-browser's security model and you get yourself what exactly? Is this going to improve the speed of development, the security of a thin client, the stability of a browser, the ease of memory usage, the consistency of interfaces or reusability of code? Certainly there will be more features available to a browser client but will there be enough abstraction between the machine and the code to avoid having major security/consistency problems?
It is just not clear to me right now whethere there is a purpose to this beyond satisfaction of an interesting hack.
You can't handle the truth.
So Flash can simulating computing as it was back in 1998? Super....
This is the NFL, which stands for "Not For Long" if you keep making those bulls*** calls.
All that and a free dozen eggs every 10 secs. What will they think of next?
The more you run away from it, the closer you get to it. So now things are as inevitable as Death, Taxes and C.
A frightful three-some indeed.
MMO Quests are like orgasms:
You may solo them, I prefer them in a group.
So the language for ''real men'' will not die out! All those kids playing with their scripting or byte-code should watch out!
Seriously, I like Perl and Python. But some things, expecially real-time stuff like audio and video are not for scripting.
Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
The last time I checked, Adobe Systems is about as hostile to open source as possible. They are the seldom acknowledged masters of the "first hit on the crack pipe is free" scheme.
http://labs.adobe.com/technologies/eula/air.html
Multiple helper libraries licensed under the MPL doesn't change the fact they are promoting another information silo.
http://www.maxineudall.com/2010/02/should-economists-be-sued-for-malpractice.html
I heard that COBOL is next on the TODO list.
Don't laugh too hard. All those COBOL guys are retiring now and there's still a shit load of stuff out on COBOL - including NEW software. COBOL guys aren't hurting, that's for sure.
I get it! So, now we have interpreted C, and it's (relatively) strongly typed! Wow, so because of that, we can deduce a lot of runtime information at compile time. Thus, potentially, the interpreter could optimize. And for the ultimate speed gain, they will find a way to turn that interpreted C into native machine language. And then it'll run really fast. Yeah.
There's very little if any C code that can't be written basically the same for Perl to interpret it basically the same way. The exception is direct memory access, but there are ways. And besides, I'd rather access memory through an API that really manages it, like making it hard to unexpectedly overflow buffers or grant access to unauthorized other users.
I'd love a Perl interpreter embedded in my browser. I'd love to have a Perl API directly to the browser app and the browser documents' DOM. I'd love to have a "Perl commandline" that returns text like usual, or that works on remote data by URL, or that returns icons or other data displayable in the browser.
Javascript is a pain in the ass. I'd rather have a Perl engine, and all the Perl modules and scripts, to run against my browser the way I usually run against my terminal window.
--
make install -not war
Nope. SFX is generally event driven (hit a key, hear the sword swing) where music is not (enter an area and music plays continuously in the background).
SFX requires timing, latency, and speed to be accurate. Music requires bandwidth and a minimum level of continuous CPU cycles.
Both have different needs so you can have one without the other (when you are talking emulation).
In Parappa the Rapper, Beatmania, Guitar Freaks, Drummania, Keyboard Mania, Frequency, Amplitude, Taiko Drum Master, Donkey Konga, Guitar Hero, Rock Band, and even scenes in the Mario Party and WarioWare series, the player triggers sound effects at specific times, and these sound effects represent music that the player is performing. If the background music becomes desynchronized from the sound effects that represent music, the emulated environment becomes unusable. Even games that aren't directly about performing music, such as Rez, Lumines, and some scenes in Super Mario RPG, indicate the timing of various game world events using the music.
Trying to retrofit C into Tamarin seems bizarre. Why not use an on-the-fly sandboxing native C compiler? Tiny C (tcc) would seem like a good start.
http://bellard.org/tcc/
Being able to run Python or Quake inside a Flash VM sounds useful at first blush, but it seems you'd lose most of what makes webapps nice for both developers and users. In particular, C based apps are not designed to be streamed, whereas Flash or AJAX apps usually are (to some extent). Nobody wants to browse to a "web app" and then spend 5 minutes twiddling their thumbs whilst 20 megabyte of Python runtime or Quake is pulled down over the wire. Web apps just have a different DNA to desktop apps.
I can see this being used to accelerate computation-heavy subelements of a regular Flash app though. I wonder how much of this is being driven by a desire to run a Photoshop subset inside Flash?
... with a slot for each url.
old geek
oh my jesus christ monkey balls
I thought the "new" web was trying to get away from Flash?
I predict 20 years from now that there will be 10+ layers of virtualization to "safely" run "web applications" and plenty of viruses running around causing trouble.
Uh... that's not browser scripting, that's plugin scripting.
You can do anything with the right plugin...
... can it run Linux?
The potential security implications of this kind of make me queasy.
> You realise that all the OS layers, networking layers, web browsers,
> scripting languages are primarily to try to get away from C?
So? You are missing the bigger point. All of those layers and scripting languages you speak of are written in C. So C working in Flash means all of that other stuff can be brought over. Perl + Flash? Python + Flash? Ruby? The mind boggles at the possibilities.
Of course since nobody will want to stuff all of Perl + half of CPAN down the pipe every time an applet loads we will end up with predownloaded versions cached for use. Let the package war begin, will flash binary packages be maintained with .deb or .rpm... I can see Windows users fighting Package Kit or Synaptic to manage the cruft needed so that "web apps" can work. We could end up with an entire GNU/Flash[1] distribution lurking on every Windows PC.
[1] I object to the GNU/Linux misnaming abomination but this time it really will be a "GNU" distribution since Linux won't be involved. At least until we get a formal 'distribution' being shipped by Adobe.
Democrat delenda est
What a boon to malware writers everywhere, totally portable RAM access to your machine.
Hear! Hear! The best websites have nothing but text. Your comments are excellent, never mind the slashdot moderation/censorship system - I know how to get around it, found your comment, read it and appreciated it greatly. You are not the only one who thinks this way.
Hooray! Now C programmers can join the fun of writing sluggish applications that eat up huge amounts of CPU even when they're doing nothing!
Deceptive headline, too, as this is just about compiling C to the bytecode that the Flash player interprets. Or even worse, now that I RTFA: "The LLVM instructions are converted into opcodes for a custom Virtual Machine that runs in ActionScript, a variant of ECMAScript and sibling of JavaScript." So your C is compiled to bytecode, that is interpreted by an interpreter that is, itself, a stream of the Flash player's bytecode.
Moore's Law notwithstanding, this is a pretty insane use of processor cycles, guaranteed to make your program run a couple orders of magnitude slower than it would if you actually compiled it, or rewrote it in Actionscript!
egypt urnash minimal art.
I also remember waiting 5 minutes for a picture to download...
I don't mind having nice looking sites because it takes just as long for one of them to load as it does for a plain text site anymore.
However, people have shifted more toward flashiness than content which I don't particularly like.
You're nothing; like me.
I wrote my first CGI programs in C, using the cgi-c library. In fact, it is still online for download!
I know, this is not the same, but that's what I thought when I read the headline.
-- The Internet is a too slow way of doing things, you'd never do without it.
does it run Linux ?
chrome://browser/content/browser.xul
Firefox inside Firefox inside Firefox...
Let me know when they get full Visual Basic up and running. Then I'm interested.
.NET version.
And I don't mean that C in VB Sheep's Clothing
"It's the height of ridiculousness to say for those 9 lines you get hundreds of millions."
Progress has slowed a little, but only because of the patents thing.
Its just so hard at the moment to push new technology without people popping out of the woodwork and asking for their cut, even though they've done shit all except hoard bits of paper.
Also, some of what is touted as new technology is really just something built to avoid some other buggers IP/patent trap.
I'm sure it'll blow over. If it doesn't then dust will blow over the bleached carcass of the present IT world as the new guys (read India and China) take over the market.
Aside from that depressing thought, progress is still being made, it's just hard to spot some days.
A learning experience is one of those things that say, 'You know that thing you just did? Don't do that.' - D. Adams
Back in the old days(and still now) is that most compilers compiled to a intermediate language-often C.
So what this really means is that (sometime soon)we'll be able to write in any language that can be compiled down to C...so Lisp, C++, Objective-C, welcome to the browser!
Of course, tamarin (the adobe mozilla pet project that will be used to take over mozilla and screw the web) is written using C, isn't it? Or, is this a C++ bloat doomed to trash mozilla spidermonkey, the C coded webscript interpreter? Really I wonder, really...
don't forget, whatever you decide to do next, IBM did it on a mainframe 40 years ago, and it wasn't cool, even then
Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind. - Dr. Seus
For example, does it support buffer overruns? Double free's?
"Long run is a misleading guide to current affairs. In the long run we are all dead." (John Maynard Keynes)
I though this was attempted way back with the http://sourceforge.net/projects/ivm/
Looks like that project needs to be necroed
I'm confused. Is it VM-executed-compiled C or C-like code interpreted on the fly?
If it's compiled C, what platform is the VM emulating? Operating system matters!
If it's interpreted... I just want to know: In what world is interpreted C a good thing?
Life would be easier if I had the source code.
My programming languages class was treated to a talk by a guy who worked some on .Net from a theoretical standpoint. He gave a demonstration of a form-manipulation script running in IE. "What language is this written in? COBOL dot net, the language of the future!"
I don't know what one needs to do to make it work, but scripting the browser (IE, anyway) is presumably already possible.
Ceci n'est pas une signature.
It reminds me to tntnet, C++ webserver by Tommi MÃkitalo.
See http://www.tntnet.org/
In your web browser, you can click on a link and read something, listen to something, watch something, play something.. that someone published on the web, with a few clicks of their mouse. And neither your nor they had to install or update anything. Most of the time, neither you nor they really need to worry about any breach in your or their security. The server only lets you see what it intends. Your browser only lets the server see what it intends; whatever the server serves up runs in a sandboxed environment within your browser. The more a browser can do, while maintaining and improving all that, the less people will want to bother with installing and updating software, and the less programmers will want to bother with targeting anything but the web.
Computers are tools. They exist to be used. It's desirable to maximize what they can do and minimize the amount of effort involved in using them to do it. I agree, the Net is a horrible messy hodgepodge. We should replace the browser. We should replace HTML and CSS and JavaScript, etc, with something much, much better. But the reality is, reaching toward perfection is an evolutionary process, and having various competing browsers and such has been a very good thing - because of that healthy competition, the typical browser of today is far better than the ones we had 5 or 10 years back.
well I've always written my CGI executables in C so "web scripting" in C isn't anything new
I don't know if its just me but rippng off the C syntax for an interpereted language is ridiculous. Please leave this to perl and flash.
Communism, its a party!
I was working in a 8088 emulator (aka XT emulator) in JavaScript... Long Live to x86 assembler!!! will be nice to run CP/M over javascript and a web browser.... but i think C code is just to much
At the now defunct start-up I last worked at, we had the usual LAMP stack driving our product. For amusement (and because I think there is an awful lot of bloat in LAMP), I did a simple front-end to our product based on an approximately 1000-line web server I wrote, and web pages with C embedded in comments. The makefile ran the web pages through a munger that transformed them into C, then built them and linked them into the server. If you didn't want the tiny web server, it could have just as easily built them as an apache module. The downside was that web developers using such a system would have had to "modify, compile, reload in browser" as opposed to their usual "modify, reload in browser" cycle. IMHO, this alone would have killed it since web devs like fast turnaround on changes. Nevermind that the web devs would have had to learn C, and that it wouldn't have been sandboxed or been able to run code client-side. I still like the idea though, and I'm glad to see others not only think in a similar way; but do so using a platform that would resolve some of the aforementioned issues.
My toy front-end was never put into production of course; but when I wanted to debug my code without pestering the web devs, and I needed something more than text, it was quite useful.
For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
But concerning standards on different browsers to avoid various problems, quirks and hacks, would be easier to adopt Brainfuck... :-)
Content = text for reading + graphics for illustration.
Hmm illustrated porn. I wonder if it had helpful arrows and thought bubbles.
meep
You guys are confused by the way he said it, but he is right...
A well designed web app form first does a client side javascript form validation on the data because this is instant feedback to the user.
If this passes, you do a hard server side error check to make sure there in nothing sneaky being submitted.
AJAX lets you skip that step. That's all he was trying to say.
AssemblyScript
This thing sounds like stepping backward for me. Python sounds good but not C. Dynamic Typing language is more suited for browser than the procedural one or static type one. If we were going to change the way web scripting works, it should be redesigning javascript by removing all weird stuff.
Douglas Crockford gave a good overview on what's good and what bad in javascript
http://video.yahoo.com/watch/630959/2974197
OK, I admit I learned Lua programming Warcraft addons, but I've found Lua to be a really friendly language for the hobby-programmer that I am, and now I'm using it for other projects. If a brower could run Lua I'd be tempted to take my web pages beyond HTML and CSS.
I’m old enough to remember 16K of memory being described as “whopping”
Everything's being constantly reinvented but no actual progress is being made. Oh look, the 100th toolkit to do exactly the same thing! Oh look, a new way of layering something old on something old on something old to give something new! Oh look, another silver bullet framework!
Can anyone here remember the web of 10 years ago, for example? Content = text for reading + graphics for illustration. No bullcrap, just Google/Wikipedia style web sites to give me a simple navbar + content.
(Clicks reply to this, has text-box open up, clicks quote parent, has parent's comment show up, types comment)
Yeah we all really desperately want to go to the web of 10 years ago.. Are you really saying the web is stagnating?
It's the most quickly developing platform out there, and now more than ever. And thanks to open source it's more open than ever and browser wars are finally about being true to standards and not about breaking them.
(Clicks preview, has comment show up, clicks submit, has comment displayed, continues reading from the comment directly beneath)
// MD_Update(&m,buf,j);
The problem is that software industry (FOSS or otherwise) is full of lightweights with no real understanding of computers or programming. The proof of this statement is in the pudding (i.e. the general low quality of software worldwide).
Because computers are deterministic, one could in fact write software that is 100% reliable and bug free. It would just take a monstrous amount of time, and adding more people to the project will not make it go any faster (see Brook's Law).
The market currently demands software at a rate many orders of magnitude more then it can be delivered. So the market compromises, as the market does, and tolerates substandard software. This practically guarantees that software will get progressively worse as time goes on.
Franky, I think programmers should be educated much like doctors: After all, if just anyone could pick up a scalpel and call themselves a surgeon, people would be dropping dead left, right and center. The same strictures should apply to the software development industry. The market can crash and burn for all I care.
By the way, just in case you're wondering, the Slashdot community is no exception.
If it runs Quake, then I'm all for it. How can that be a bad thing?
Does this mean that I can finally run Quake on my Cray?
thin clients or thick clients for that matter.
Of course I didn't RTFA... why would I do that? You really are new here aren't you? Don't let my UID fool you.
"Petersen showed us the C-compiled versions of Lua, Ruby, Perl, and Python all running on the web in secure Flash sandboxes."
that is an lie with secure Flash sandboxes
http://blogs.adobe.com/psirt/2008/05/potential_flash_player_issue.html
is like saying secure ActiveX...
developer http://flamerobin.org
Do you also want us to get off your lawn?
Then I guess the exceptions are selling exceptionally well, wouldn't you think?
You mistranslated:
I'm so in love with my own opinion that, even though my argument has been successfully countered, I'll through a complete non sequitur into the mix whilst misrepresenting the previous poster's sentiment.
I'll suggest an alternate translation for you to consider: "If you design and market a video gaming platform without capabilities that allow the use of music as sound effects, you lose sales of games in a few lucrative genres to platforms that do."
Do you get it now, dickhead?
Why do you use such harsh language?
And let's not forget C++!!!!
And boost!!!!
Now that would be cool!!! a massive download just to run a few lines of C++ code...
It's not like we rely on RSS and server databases. cough slashdot cough.
"Petersen showed us the C-compiled versions of Lua, Ruby, Perl, and Python all running on the web in secure Flash sandboxes."
Well there you have it ...
-- "As a human being I claim the right to be widely inconsistent", John Peel
Writing a C binding to work in a Flash virtual machine is like writing an abacus emulator on Fortran to improve Fortran mathematical capabilities.
The history has already evolved quite backwards.