HNHacker News
TopNewBestAskShowJobs

TheZenPsycho

1,505 karma · joined November 20, 2012

I know a lot about JavaScript. Some might say, TOO much. I used to have another account ZenPsycho which I lost access to. I've made some interesting things for various large public cultural organisations in Australia. I enjoy pixels.
submissionscomments
TheZenPsycho··on Mozilla Advances JPEG Encoding with Mozjpeg 2.0
To review, it would seem that while you have a blog post from ian hickson making a passive reference to deprecating smil. Indeed he followed up by removing the feature from the ACID3 test. But the damage was already done:

evidence of actual standards activity and implementations from as recently as June 2014 show instead an active merging of css animation with svg animation into a single consistent model called "web animation" [1]

the implementation of this merging effort in chrome's blink rendering engine [2], and a rationalisation for this webanimation effort that promotes not a removal of the svg animation features (which are already implemented in everything but IE), but an expansion of their powers, being advocated by both google and mozilla [3]

Just because IE is lagging behind doesn't mean this feature is cut. Just because Ian Hickson says the feature is deprecated doesn't mean that it is, or that browser devs will follow whatever he says.

What it does mean though, is they are attempting to cut the feature's dependence on "SMIL", while retaining the currently implemented features. so I think that whatever works in browsers now, you can more or less rely on that working in future browsers as well. So yes, my suggestion is still useful and it's still awesome. And if you use css animations inside the svg (which totally works) instead of svg-smil animations, you can even get it working in IE10

[1]: http://dev.w3.org/fxtf/web-animations/

[2]: http://updates.html5rocks.com/2013/12/New-Web-Animations-eng...

[3]:http://people.mozilla.org/~bbirtles/web-animations/presentat...

TheZenPsycho··on Mozilla Advances JPEG Encoding with Mozjpeg 2.0
and yet in spite of this http://caniuse.com/#search=smil

Where have you heard or read that it is on the chopping block?

TheZenPsycho··on Mozilla Advances JPEG Encoding with Mozjpeg 2.0
yes declarative animation. That is a specific test in acid 3 and you need declarative animation in svg to pass 100 on that test.

script animation is actually not supported when svg is used from an img tag. only declarative.

TheZenPsycho··on Mozilla Advances JPEG Encoding with Mozjpeg 2.0
Thanks to the ACID3 test, all modern browsers support animation in SVG and svg in an img tag. Which means you can do extremely small vector based animations, or write an encoder that embeds jpegs and animates them like a film strip. You can have alpha transparency using a mask image via SVG filters. You can get really fancy and animate with deltas. The efficiency you lose by the base64 encoding is regained by gzipping.
TheZenPsycho··on File system that stores location of file in Pi
... and that's the joke.
TheZenPsycho··on Rob Pike's Rules of Programming
I think the take away is not "do not optimise at all ever" it's about not just optimising your code, but optimise the time you spend optimising it. Do not spend 2 weeks micro-optimising a loop that, in reality, has no effect on the end user's experience, and ultimately makes the code base just much more difficult to maintain.

What you want to do is try to get most of your FINITE and EXPENSIVE development time on optimising things that actually matter to user experience.

TheZenPsycho··on Moving Atom to React
so when you're trying to do something else is the time to be making these decisions?
TheZenPsycho··on Moving Atom to React
I think it just shows that you do computers wrong.

Okay sorry that sounds snarky and unproductive- What I mean is, as a model for how human evolved navigation works- a persistant work space with effectively no need to "save" work is more like reality. If you scribble something on a napkin, and leave it on your desk, the desk doesn't demand you name the napkin when you try to leave the house. At the exact moment you need to leave to go to work, is the exact moment you are least prepared to think of a name and location to find something later.

But with a persistent workspace, you can just shut the program instantly, without being spammed by 15 "save, discard, cancel" dialogues. Pressing the power button on the computer, and having the computer just.. turn off… and then turn back on having not forgotten anything by accident or otherwise. You can name and save stuff AT YOUR LEISURE.

that. is. the. future.

…. of 1996. It's 2014 now and we've just now gotten round to adding it… to one program. a text editor. now we just need to get the rest of the developers in the world on board with this really obviously correct thing to do.

TheZenPsycho··on The HTML5 appcache is the New Bootloader
what if the manifest.appcache is content addressable ? e.g. manifest-[version-number].appcache the appcache semantics are convoluted enough that I must admit I don't know what would happen. Would you visit index.html and it loads the old version of index.html linking to the old version of the cache manifest-- forever?

Perhaps the old version of the manifest gets a comment incremented to force the browser to update index.html? or some tricky javascript forces it? Either way it seems, naively like you could link an index.html version to a manifest version via the manifest's filename.

TheZenPsycho··on Tesla Model S JSON API
It costs nothing to switch those GETs to POSTs (or fucking whatever method best describes the kind of side effect you're doing). why are we making excuses for doing the obviously wrong thing?

I get what you're saying about the API… but if you're going over HTTP why not play by HTTPs rules. Presumably it's an app that is the primary consumer of the API so they could use any sort of protocol. Why decide to use HTTP but not conform to the standard in a way that ruins any benefit you might have got out of using HTTP instead of say:: OSC or.. basically anything OTHER than http would be better.

If we're talking about using HTTP to bust through a firewall, then that stuff is DEFINITELY going to break unless you use HTTP in as dull and ordinary a way as possible, and GET requests will always be cached by god knows how many different machines between you and the car.

If it's not an app, then we've decided to put a webserver on the car so that we can serve a website with some javascript that does XHR calls to make things happen. I would not put it past google to make a future version of chrome that prefetches JSON api requests. But regardless, yes, XHR calls do go via the browser cache. and the proxy cache. and the firewall. and any other machine that makes basic assumptions about what those methods mean.

TheZenPsycho··on Tesla Model S JSON API
Some of this is pedantic. But mostly, it's calling out, without much grace, that this API is a failure of a design. Not because it's not [insert buzzword] but because:

1. what happens if you visit a control panel page in chrome? Does chrome spider ahead, eagerly caching the links on the page assuming that visiting a page has no side effects? Have fun silencing your horn and windshield wipers from simply visiting your control page.

2. what happens if chrome then has that "get" url very strongly cached? After spending 10 minutes trying to silence your car from your first visit to the page, the "honk horn" button now does nothing but load the word "true" from the browser cache.

3. what if any of the above happens while you are on the road ? what if some wise guy down the line decides that a car should be designed API first, and your dashboard, pedals and wheel are just one of many potential API clients? Can you really now tolerate using the GET method in ways that it is explicitly documented to not be used?

This isn't just philosophical or quibbling over definitions. Getting this wrong means things actually break in the real world.

TheZenPsycho··on The HTML5 appcache is the New Bootloader
What he means is, instead of having a file you name

    myscript.js
you name it

    myscript-[sha1 hash of contents].js
and you set its cache header to expire at some improbably point in the far far future. If you should happen to update the contents of your script file- the sha1 hash will change, and thus its name and its cache entry will also change, in lockstep with its contents. The only fiddly part of this approach is you must also update all references to the new version of the file. If you're clever you can automate this with templates and build systems.

What this guarantees is that if your index.html and app cache manifest refer to myscript-[some specific sha1], you're guaranteed that the contents of the script are consistent with what that index.html file expects there.

TheZenPsycho··on The HTML5 appcache is the New Bootloader
The whole point is to enable the browser to be a full proper app platform- that includes enabling web apps to work OFFLINE. The behaviour of a browser without app cache is to fail to display content even if it is cached if your connection happens to be offline. the html5 app cache addresses that- and is the "standardised" alternative to google gears' local "offline" web server.
TheZenPsycho··on Runtime.JS – Operating system kernel built on V8
but coffeescript IS exactly javascript with a bad syntax translator. It' not a "considerably better language" it's the same language.
TheZenPsycho··on A framework for making 2D DOS games in Lua
There are gaps in my knowledge, but my understanding is that to address 32-bits of memory requires the use of a "DOS extender". The reason being that DOS is barely an operating system at all- It never provided any 32-bit support but support was possible by monkey patching over part of the operating system in memory. This was possible because DOS had no security measures preventing such horrifying endeavours.

Anyway, I see no reference to a dos extender here so I don't know how it could be anything other than a 16-bit program.

If the author of this framework is looking for a dos extender, I think HX seems like a good choice: http://www.japheth.de/HX.html

unlike other DOS extenders, that provide idiosyncratic apis for allocating 32-bit memory, HX imitates as much as possible standard windows apis, and is able to run some windows applications in plain DOS- including, strangely enough, DOSBox.

(I have nothing to do with HX by the way.)

TheZenPsycho··on Twitter's GIF hack
the format permits frames with 0ms delays. the problem is that there has never ever been a browser that respects the 0ms delay. On the whole, the status quo is that any delay under 10ms gets upgraded to 10ms.

Newer (current) browsers have lowered that to 6ms, and in chrome, 3ms. As yet, there has been no browser that respects the 0ms delay (as in, supposed to display instantaneously, so 2 frames with 0ms delay is supposed to look like 1 frame).

The justification for this is backwards compatibility with incorrectly authored gifs. So .. there you go.

TheZenPsycho··on A first-person engine in 265 lines of JS
straight lines are straight in a photograph because of precision manufactured optics shaped specifically to achieve that effect, to reduce "chromatic aberrations" and "barrel distortion".
TheZenPsycho··on A first-person engine in 265 lines of JS
this is the perspective projection that we have with our eyes: spherical projection. detail here: http://www.treeshark.com/treeblog/?p=301

At any given moment we're only looking at a very small slice of that larger spherical panorama. Our brains are constantly constructing a coherent 3d model, with the help of various schematic constraints, such as expectations about straight lines being straight.

We perceive straight lines. but that's not what we see. But the curvature is usually so slight that it is very difficult to see.

TheZenPsycho··on APL – a Glimpse of Heaven (2006)
Yeah, doesn't always have to be you teaching others that your way of programming is the "right" way.
TheZenPsycho··on APL – a Glimpse of Heaven (2006)
Man, I hope when I have grandchildren, they won't want to throw a bundle of my life's work in the trash.

Maybe github instead?

TheZenPsycho··on Stop Leaning In. Put Down Your IPhone. And HELP ME.
Yeah I'm a bit confused by that part. She got the guy's attention but didn't really say what happened with him after that.
TheZenPsycho··on Stop Leaning In. Put Down Your IPhone. And HELP ME.
this is a well known phenomenon called the "bystander effect"

wikipedia entry here:

http://en.wikipedia.org/wiki/Bystander_effect

long story short, what's going on in people's minds when they don't help is that, probably someone else will step in, and playing hero will probably just get in the way.

which, isn't that helpful if 100% of the bystanders are thinking that. It's somebody else's problem.

there's a simple remedy- Don't scream "help! anyone! help!" scream "Hey you, burly looking dude. Help! yes you!" ' This is what psychologists say. until the evidence comes in, I'm skeptical that it would work. but it's better than repeating these stories again and again.

TheZenPsycho··on The desktop and the developer
brew install bash

… really.

TheZenPsycho··on Asm.js performance improvements in the latest version of Firefox
There are constraints to asm.js that are restrictively difficult for a human to maintain. If your code doesn't pass the validator it runs as normal JS.
TheZenPsycho··on Mozilla Is Moving Ahead With Sponsored Tiles On Firefox’s New-Tab Page
The analogy was about ease of use and well known-ness. To suggest casually that people would en masse switch to ice weasel points to a kind of tone deafness.
TheZenPsycho··on Mozilla Is Moving Ahead With Sponsored Tiles On Firefox’s New-Tab Page
that was not my point.
TheZenPsycho··on How the Father of Claymation Lost His Company
No, it changed the name to Laika.
TheZenPsycho··on How the Father of Claymation Lost His Company
"But if the same artists had worked on the same Coraline with someone else's capital, would the outcome have been any different? Probably not. Did it matter if the money was branded Knight or someone else's?"

this section of the article says yes, it would have been different:

"'Max,' an animator who’d been laid off from Vinton Studios, later became a freelancer and found himself back at Laika to work on Coraline. “It was a wonderful project to be involved in,” he says, “but I’ve had better experiences.” He’d been excited to work with Sellick, one of his heroes, but found that animators were treated poorly by management. 'There was a ‘Just Do It’ attitude. It was a beautiful experience, but rough for a lot of people.'"

TheZenPsycho··on Mozilla Is Moving Ahead With Sponsored Tiles On Firefox’s New-Tab Page
Just as people could install ubuntu and "just use wine" if they want to run windows programs without paying for windows.
TheZenPsycho··on Fix HackerNews Issue #11, which is driving us all crazy: Unknown or expired link
It is hard to convince someone to fix what you see as a bug, when the author of the software is really so proud of this "feature" he's filed a patent on it: http://www.reddit.com/r/programming/comments/67iza/patent_on...
← PreviousPage 2 of 22Next →