The Null Device

Posts matching tags 'javascript'

2007/4/11

Someone has written a JavaScript-based 6502 assembler and emulator. The system compiles 6502 assembly language into JavaScript, includes a (low-resolution) emulated video display, and is powerful enough to play simple games like Pong (included in the examples).

In other 6502-related news, here is a commented disassembly and detailed analysis of Rob Hubbard's music playing code, as seen in numerous Commodore 64 games of the 1980s (and later ripped off by crackers and demo scenesters). If there was a museum of feats of 8-bit computing, this routine would be sitting in a prominently placed glass case in one of its wings.

(via jwz, c64music) 6502 retrocomputing tech c64 javascript emulation hack value assembly language music chiptunes 8-bit [2 comments]

2007/2/28

JavaScript 1.7, the version used in Firefox 2.0, has a raft of Python-inspired features, including generators and list comprehensions. So now, you can do things like:

function fib() {
  var i = 0, j = 1;
  while (true) {
    yield i;
    [i, j] = [j, i + j];
  }
}
and
var evens = [i for (i in range(0, 21)) if (i % 2 == 0)];
And, indeed, bulk assignments, like:
[a, b] = [b, a];
That is, as long as you're not concerned about your code working on non-Mozilla web browsers. (I wonder whether Microsoft, who still have well over 80% of the browser market, will adopt these new features.)

functional programming javascript python tech web [no comments]

2005/6/26

Firefox extension of the day: NoScript, which allows you to enable JavaScript selectively only for specific trusted sites, disabling it for everyone else. Which, in the age of sneaky phishing attacks (not to mention sites which obnoxiously maximise their windows, disable the right mouse button or do similarly annoying things), it could be quite useful.

firefox javascript security tech [2 comments]

2005/6/16

JS/UIX; a complete virtual UNIX machine that runs entirely in JavaScript using DHTML. Well, not entirely complete; the realistic-looking executable files in /bin, upon closer inspection, have sizes of 'n/a', and are basically façades for JavaScript pixie dust that does what they are meant to; also, the shell doesn't actually support any scripting commands. However, you can create and access files, and it even has a mostly usable implementation of vi.

(via /.) javascript nifty unix web web toys [no comments]

2005/5/27

TiddlyWiki, a rather nifty-looking JavaScript/DHTML-based wiki running entirely in the browser. It doesn't actually have a back-end, so it's read-only unless opened from a local file in Firefox. As used in Charlie Stross' slightly facetious guide to the Singularity.

Update: And here is a properly AJAX version of TiddlyWiki, which uses a PHP back-end to store entries.

ajax dhtml javascript software tech wiki [no comments]

2005/2/9

A fairly informative dissection and analysis of Google Maps and how it does its magic. It's pretty interesting; unlike GMail (the other example of an impressive DHTML-based interface from Google), Maps doesn't use XMLRPC, but instead just fetches tiles in JavaScript and uses a hidden frame to communicate with the server, and the browser's inbuilt XSLT engine to parse the result. Which all makes for some very impressive hack value.

ajax google google maps javascript programming tech web web 2.0 [no comments]

2004/9/20

Annoying web interface of the day: Loot.

This is a UK-based classified advertising site, offering listings of real estate, items for sale, personals and so on. Which is all very well, except that some genius had the brilliant idea of not using ordinary web links for ads, but instead doing it all in Javascript. When you click on an ad, it executes a piece of javascript which changes the current window's location for you. This means that it is impossible to open an ad in a separate window or tab; you can only view Loot in one window at a time, linearly going from ad to ad and backtracking as need be.

I have no idea why anybody could have thought that sort of user-hostile web design is a good idea. It's not to encourage people to pay (paid users get the same interface), it doesn't give the site a slick, Gmail-like interface (it's just a normal web site, except that you can't easily view more than one thing at a time), or otherwise contribute to the user experience (unless, perhaps, the user is a submissive masochist), it doesn't even seem to aim for the holy grail of Protecting Valuable Intellectual Property. The only possibilities I can think of are: (a) that they were betting that, by slowing down user browsing of their site, they could eke more time-limited ad-viewing tokens out of their users, and that no competing website would steal their customers by offering a less annoying experience, or (b) that whoever designed it just wanted to show off their web kung fu ("Look mum, Javascript!")

annoyances javascript loot usability web [2 comments]

2004/5/18

I'm Wayne Kerr, and if there's one thing I hate... it's web sites which use Javascript to disable the right-button menu. It's the web equivalent of copy-protected CDs; it doesn't stop people from downloading their images/content or stealing their HTML design secrets (if your browser can download it, you can grab it), but does prevent honest users from opening a link in another window/tab, should they so desire.

annoyances javascript wayne kerr [3 comments]

2003/8/16

Lemmings in DHTML/Javascript; a faithful reconstruction of the classic Amiga game, with no Flash/Java involved. Still a work in progress, but impressive as fuck. See it before it's Slashdotted. (via MeFi)

dhtml javascript lemmings nifty web web 2.0 [1 comment]

2002/8/15

I'm Wayne Kerr, and if there's one thing I hate... it's web sites which disable your browser's right mouse button, just to show that it can be done/to assert control over your web browsing. Like this one. If I want to open a link in a Mozilla tab, instead of the menu I get a pop-up message saying "function disabled". Oooh, I stand in awe of your godlike JavaScript skills. Wanker.

annoyances javascript wayne kerr web [4 comments]

2001/10/31

Sick of pop-up ads and other nastiness? Well, if you use Mozilla, here's how to switch off JavaScript "features" on a site-by-site basis. This is not in the UI yet, either because they haven't gotten around to doing it, or because they've snuck it in under AOL's nose.

javascript security web [no comments]

2001/1/4

I'm Wayne Kerr, and if there's one thing I hate... it's that stupid JavaScript scroller gimmick. You know, the one that some pages have, scrolling a flickery message (typically something droolingly inane like "Hi! Welcome to my web page!") through your browser's status bar. You can't stop it (as you can GIF animations), you can't see any links you put the cursor over, and it's irritating as hell. And no, it's not cool, or clever, and it makes the designer of the web page (or the pointy-haired management type who signed off on it) look like a cretin. Unfortunately, the Ausway street directory home page has succumbed to this particular lapse of taste.

annoyances javascript wayne kerr web [no comments]

2000/10/26

A somewhat psychoceramic religious extremist group has seemingly not been too happy with the heathens poking fun at them, and has decided to fight back. The source of this page on the evils of teen pop bands contains this interesting JavaScript fragment:

var redirectto = "http://abortiontv.com/AbortionPictures1.htm";
var refusedfrom = "http://www.landoverbaptist.org/news0200/backstreet.html"; // required prev. page
if (document.referrer.indexOf(refusedfrom) != -1) {
alert("Access ot this page is forbidden from Landover Baptist");
window.location=redirectto;
}

That really says a lot about fundamentalist psychology; in particular their favour of psychological impact and manipulation over reason.

abortion javascript landover baptist religiots [no comments]

2000/9/29

I'm Wayne Kerr, and if there's one thing I hate... it's web sites which require JavaScript to work, for no reason other than custom pop-up windows looking cool. Sadly to say, the Fringe Festival site is one example.

annoyances javascript wayne kerr web [no comments]