1,505 karma · joined November 20, 2012
Even if you found some way to get some other language into the browser without translating to javascript; (and this has been done before. remember vbscript?)... the new guest language has to co-exist with any javascript that might also run on the page, share the same memory, share the same dom objects, share the same GC, and avoid all the multiple potential nasty browser crashing bugs that could result from trying to do that. And you have to ship the runtime for that language along with the browser, or as sigh another plugin. And guess what, no backwards compatibility.
Given that, you then have to cope with the fact that javascript's GC might not totally make sense for your language, and do all the workarounds that requires.
Compiling to ASM.js gets around this by essentially giving you a low level VM whose bytecode just happens to look like javascript, and whose behavior when interpreted as javascript happens to be correct. When run in firefox, the code is short circuited and ahead-of-time compiled. It doesn't have to deal with the javascript GC since it allocates a heap for the guest program ahead of time as well.
This is really cool if you think about it. You get javascript's more or less secure sandboxing, you get access to all the apis, you can interact just fine with existing javascript libraries, with about the lowest amount of overhead you can get just short of the NaCl approach (which is basically just a revisit of activeX)
The only downside to all this:
it's not the web.
This is not web. It runs in a web browser, but it's downloading a blob up front, ahead of time compiling, and playing a raw executable inside a browser host.
There's considerable advantages to zero-install programs and games. But you know, exchanging one kind of opaque inaccessible blob in a webpage for a different kind that just happens to not need plugins is not that great.
Accessibility is a good thing, and we shouldn't be too eager to throw it away for the shiny.
it was going just fine until apple disabled it in iOS7
but despite that setback, google continues to bank its entire business on offline web apps.
It's the increasingly complicated DOM, and CSS3 layout model.
Web Apps go slow, and this gets blamed on javascript because that's the language you happen to be writing in. (or wronging in). But the slowness you get usually comes from the constant triggering and retriggering of giant byzantine relayout and compositing algorithms from what you might think is reasonably written code.
it's THAT problem that facebook's react library is aimed at... fixing? no, reducing. Write reasonable JS, and let the library optimise DOM interactions.
Every new feature of HTML5 and CSS adds some weight to those enormous piles of sand the browser has to shift around.
Binary formats would not fix that. Bytecodes wouldn't fix that. Different languages wouldn't fix that. Javascript is fine. it's the DOM and CSS that need to be fixed.
1. a prewritten engine, and
2. some hypothetical language
each where you write commander keen with 3k loc. Where the hypothetical language has all the same stuff as the engine, it's just locked away behind a level of abstraction.
if you could write commander keen in 3k of javascript (with the aid of all the stuff that's in a browser) How is that different from writing 3k of C with nothing but this entire commander keen engine already written and ready to go?
What's are we calling an "advance", exactly?
Nowadays you see, it's wasteful to write an engine from scratch for a game like this. It was needed then, but it's a solved problem now. If you wrote 33k for a commander keen clone I'd wonder what you were doing.
The idea I had was extending ansi codes to contain specific instructions for NES graphics hardware, along with a special NES rom that could decode them from say, some audio signal via the microphone port, or controller port 2 keys, or whatever input is most convenient.
Such an ansi protocol extension would include things like sprite graphics, tile graphics, sprite positions, in addition to the normal character mode telnet stuff that maps naturally to the NES's tile based background graphics.
That would be pretty neat.
It would let you put a modem attachment on an NES and dial into a server to play games remotely. Such games could even be multiplayer by nature, with a centralised server infrastructure kind of thing.
You can steal it now if you want. I'm not likely to act on it any time soon.
fixed.
You must go via the actual sqlite process.
On the other hand maildir, composed of multiple ascii compatible text files, can be read by any email client- provided it follows the protocol for reading and writing of files in the maildir spec.
My somewhat ignorant inclination is to suggest that maildir fits this description.
and how do you deal with the somewhat more complicated NES games where "sprites" are often constructed of multiple conjoined hardware sprites? there's no "draw sprite" method there, it's just manipulating x,y registers in obj ram!
It sounds cheap to say this, I'll admit. But if you want a better world you've got to make the tools that make that better world really easy to make, which is what sfxr is or was. Maybe we address this by making a tool that makes better sounds than sfxr. On the other hand, maybe we address this by making a tool that makes it really easy for game devs to work with sound designers.
then the clones started
the mac clone cfxr [2]
the flash clone, you linked to.
the fork of that, called bfxr [3]
the ios port [4]
the (much better, in my opinion than OP), js port [5]
sfxr.js [6]
sfmaker [7]
and I'm sure there's a handful of others. I think I'm missing one js clone- along with a number of game engine libraries designed to accept the source parameters for a sfxr sound or bfxr sound and generate them in real time in the game as opposed to storing a wav.
The opportunities for this genre of program are opening up now that the webaudio api is just starting to mature (though it has a fair way to go).
SFXR gives you a very very basic array of synthesis techniques. There's a lot more that is possible here- Plus the whole field of FM synthesis techniques (think genesis/megadrive era sound effects), game engine libraries are yet to be addressed in the browser, as the tech making that possible is still just around the corner in the next browser releases.
[1]: http://www.drpetter.se/project_sfxr.html
[2]: http://thirdcog.eu/apps/cfxr
[3]: http://www.bfxr.net
[4]: https://itunes.apple.com/au/app/sfxr/id349840825?mt=8
[5]: http://github.grumdrig.com/jsfxr/
[6]: http://humphd.github.io/sfxr.js/
[7]: http://www.html5gamedevs.com/topic/757-sfmaker-html5-sound-e...
What I find in practice with these (quite popular) lists of logical fallacies, is that they are usually written with the assumption that the reader is already familiar with the fundaments of logic and is able to correctly apply them.
This work is no different. While I do enjoy the style of the illustrations, we already have a glut of these things skipping to the juicy parts. What we don't have is approachable, accessible works, free of unexplained jargon, that explain for instance, what exactly a "premise" is. How to decide whether a piece of writing or speech contains an argument. How to correctly identify the conclusion of an argument, and connect it with its premises. And so on, for all the list of things that are usually misunderstood about these lists of "fallacies" by people who are… reallly.. genuinely new to logic.
with animations.
it does.
I misunderstood nothing.
behold:
- works inside an <img> tag
- works in background: url()
- supports both smil animation and css animation
- supported back to IE10 (with css animations)
- plays automatically in a loop with no play controls
- can embed jpegs, pngs, videos as videostrips or diff images
- can apply alpha transparency via a mask operation
- flexible enough to apply a wide variety of compression techniques including multiple update regions (where gif only supports one rect per frame)
- Controllable via javascript (as long as you trade off putting it in an img tag and use an object tag instead)
previous comments here: https://news.ycombinator.com/item?id=8038838
all that's missing is widely available software to author SVG animations.