1,097 karma · joined December 16, 2010
... but I'd also submitted the JS fragment to Chrome, of course. They ended up flagging it as a high security bug and, not surprisingly, beat me to a fix.
So I never got as far as making a patch, which I guess is why I still don't have a successful compiler career.
I did get a $1k security bounty from Google, though, so that was cool.
Let me see if I can google the bug report. This is it: https://bugs.chromium.org/p/chromium/issues/detail?id=282736
Ah, report reminds me that at that point, the app was all knockout.js. We ported it to a knockout/React hybrid later.
- each precinct got a PIN to report their results
- the PINs were printed on the paper result worksheets sent to precinct captains
- multiple precincts and participants posted pictures of their worksheets to Twitter, with the PINS clearly visible
- hence multiple PINs were compromised
I'm really surprised that all it takes to be declared qualified is the signature of someone else who's qualified. That leaves lots of room for slippage and social pressure, like the dip you mention. It also leaves no one specifically responsible for the crew's level of qualification. A cynic might say that was the point of the system: we know this is going to fail, so make sure no one is directly in the line of fire when the shit cannon goes off.
Sad news.
(Disclaimer: I'm a bike advocate, so I may have a different perspective on some of this than most.)
Our car-based transportation system is far and away the most dangerous thing any of us accept doing on a daily basis. 40,000 die a year.
But when cases come to court, everyone on the jury has in the back of their mind "that could have been me if I lost concentration at the wrong moment, or made one bad judgement, etc etc."
So penalties are comparatively light for traffic fatalities. Big punishments are only meted out if the case is so egregious -- repeated drug use, flagrantly reckless behavior -- that the jury can be convinced that the driver is different from them.
In other words, drivers don't get punished for doing something dangerous, because everybody on the road is doing something dangerous. They get punished for doing something more dangerous than the norm.
In this case, there's no question that the "driver" is different than the jury -- it's a computer. Now the symmetry that made jurors compare themselves to the accused is broken.
The result, and what self-driving car advocates don't get, is that self-driving cars don't just have to be safer than human drivers to be free of liability, they need to be safe period. In a trial, they don't benefit from the default "could have been me" defense.
That's a HUGE requirement. In fact, it's probably impossible with our current road system. It won't just take better self-driving cars, but better roads and a major cultural change in our attitudes about driving.
As a bike advocate, I welcome this shift, but I also see how deluded many of the current self-driving projects are. Software moves fast, but asphalt and mentalities move slow. We're not years away from a self-driving transportation system, we're decades.
And this trial is just the beginning of that long story.
Still, I have to love the fun some Perl coders feel in their language.
As a result, Surplus is the fastest framework in Stefan Krauss's latest js-framework-benchmark (http://www.stefankrause.net/wp/?p=431).
DSLs are powerful, compiler support can make them fast.
> I would love to see some data backing it up.
In Stefan Krause' js-framework-benchmark, the vue implementation starts in 55ms vs 89-113ms for the various react implementations. See the 'startup time' row here: https://rawgit.com/krausest/js-framework-benchmark/master/we...
I haven't profiled vue and react on this particular benchmark, but I have done so for some of the other implementations. Baring anything exotic during startup, the 'startup time' benchmark comes down to package size. It takes time to fetch, parse, compile and load javascript. React is just a bigger package.
All disclaimers about benchmarks, microbenchmarks, n=1, YMMV, etc apply.
var foos1 = [] as Foo[],
foos2 = [] as (Foo | undefined)[];
// ... later
var foo1 = foos1[i],
foo2 = foos2[i];
foo1.bar(); // types fine, TS assumes non-undefined
foo2.bar(); // TS type error, as you haven't checked undef
if (foo2) foo2.bar(); // types fine, undef excluded* - [edit: found the source] "We'd really like to hit features that have either a ~0% chance of making it into ES7+ (e.g. type annotations), or have a ~100% chance of making it in with easily-defined semantics (e.g. where fat arrow was two years ago). New operators are likely to fall in the awkward middle." [https://github.com/Microsoft/TypeScript/issues/16]
Paint and composite are usually fast, but calculate styles, layout and hit test may not be. It totally depends on the complexity of the DOM and CSS, of course, but as an extreme example, the js-framework-benchmark tasks are often 90+% time in render. That's why the results converge on 1.00: 0.95 of that is time spent in the browser rendering the DOM, and the time spent in javascript between a framework at 1.00 and one at 1.05 may be 2x difference (0.05 vs 0.10).
The `a(e,"id","bar")` format is what other frameworks produce. It sounds like in Glimmer it would be `[1,"id","bar"]`. So that's only a single char savings.
There's really not much noise in that expression, just the "(,,)", so maybe 4 chars that an opcode could save.
As for 3), is that really possible? If you profile most modern frameworks, they're already fast enough that most of the time is spent in rendering, not in javascript DOM manipulation. So even if you cut short your js before 16ms (60fps), you have no idea how long the browser is going to take to render your changes. Plus, the browser will be doing extra work, since it needs to render all the frames in which you've only done part of your updates.
You sure about that? In the alioth benchmarks, v8 wipes the floor with lua: http://benchmarksgame.alioth.debian.org/u64q/compare.php?lan...
There's also the infrastructure to consider. If your bike fails in NL, you curse and coast to a stop on the bikeway. If it fails in the US, you may be in the middle of trying to cross a 6 lane road with no bike infrastructure whatsoever, putting your life in danger. I rode a crappy bike in NL (3 month stay in Rotterdam), but I wouldn't want to ride that same bike here in the US.