Better HN
topnewbestaskshowjobs
Log inSign up

STRML

3,275 karma · joined Sep 2, 2012 (14y ago) · 602 submissions

Hey, I'm Sam. I'm a frequent contributor to open source, including a number of React projects and Babel core.

strml.net github.com/STRML bitmex.com securesha.re

[ my public key: https://keybase.io/strml; my proof: https://keybase.io/strml/sigs/Rr2YKiZGMMOgxiMMcgqAy5aykMgj0OxJamVQAZkQ0iE ]

Submissions

comment 6y ago · link · parent

Absolutely fascinating, high-quality, deeply technical article with a healthy dose of nostalgia. I'd love to see more of this (even though we often have quite a bit!) on HN.

Does anyone know if this technique was ever used again on the N64?

comment 6y ago · link · parent

Jitsi's P2P nature is great for 1:1 or small group conversations if everyone has solid connections. From experience it starts to break down with larger groups, and becomes pretty useless overall if one or two participants have spotty connections.

comment 6y ago · link · parent

Which isn't really enough, considering SNI and subdomains.

comment 6y ago · link · parent

Assuming that you can access them diagonally -- not 100% if this is so - that layout should work.

comment 6y ago · link · parent

Yeah, Cert Spotter does this (https://sslmate.com/certspotter/). It's a huge help both to be able to monitor cert issuance for a domain and all of its subs, and to be reminded when a cert is expiring.

comment 6y ago · link · parent

Why is obvious marketing material allowed here?

comment 7y ago · link · parent

This is quite dramatic, in that I can actually feel my Macbook not heating up as much, nor can I hear the fans anymore.

We do quite a lot of work on a trading website that has heavy use of Canvas and CSS animations, and the latter really kills performance. Two runs on our production website from Intel Power Gadget, pre and post upgrade, show decreased temperature, a lot fewer power spikes, less DRAM wattage, lower GFX clocks, and about 40% less power overall:

Before: https://i.imgur.com/WkdWaHx.jpg

After: https://i.imgur.com/3ojMyjT.jpg

comment 7y ago · link · parent

It's legacy. This dates back to April 2015 when there were still some reasons to use prefixed properties. Rather than list all of them in css - which would have been ugly - I choose the one useful to your browser.

comment 7y ago · link · parent

They don't have any actual inside information about the Taycan, so they switch to talking about the ZF transmission.

comment 7y ago · link · parent

This is only true on the Model 3. Indeed, on the S, the dual-motor variants were more efficient due to different gearing. It is still unclear the community why the 3 dual motor variants are as much as 10% less efficient. It is not totally accounted for by weight, and the extra induction motor should be capable of torque sleep.

comment 7y ago · link · parent

And in fact, something called "money.js" - or the successor to money.js - ought to be able to properly round decimals such that floating point error never becomes the developer's concern.

comment 7y ago · link · parent

JS, like Java, now has implementations that will also store strings as Latin1 when the implementation believes it is safe to do so. This results in significant memory savings [1] in most programs.

1. https://blog.mozilla.org/javascript/2014/07/21/slimmer-and-f...

comment 7y ago · link · parent

As in the MDN article:

    All major engines have also implemented corresponding trimLeft and trimRight functions - without any standard specification. 
So ES2019 implements trimStart() and trimEnd(), which are symmetrical to padStart() and padEnd(), but trimLeft() and trimRight() aliases are maintained as not to break working code.

comment 7y ago · link · parent

It's a lot more verbose than _.mapValues() is, but it's nice to have a relatively simple solution without using a library.

comment 7y ago · link · parent

Re: Haptic feedback on the touch bar, see https://github.com/niw/HapticKey, which is surprisingly good despite being a massive hack.

comment 7y ago · link · parent

That's what WebKit's devtools look like, across all branded browsers. Blink stayed with the old layout and iterated on it.

I don't really care which one I use, but change for changes' sake is frustrating. I'm used to Blink/old Webkit and I don't see any reason to learn a new layout.

77.

WordPress Hosting Performance Benchmarks (2019)(reviewsignal.com ↗)

7 points · by STRML · 7y ago · discuss

comment 7y ago · link · parent

Incredible pitch, I wish you luck. This would be an amazing alternative to batteries in areas where there would otherwise be renewable over-capacity. While it appears less efficient, it is transportable and easy to store.

Please keep us all updated on how it goes, I'm sure you will see a lot of excitement about what you are doing.

comment 7y ago · link · parent

It was very successful. Complicated projects require complicated build config. Parcel does fine for simple projects, but lacks the raw power & configurability of webpack.

Webpack now does simple config as well with the 'mode: "production"' and 'mode: "development"' presets.

comment 8y ago · link · parent

Scoping dependencies to their author by default would help (not eliminate) this problem.

For example, if this had been @dominictarr/event-stream the entire time, and he chose a new maintainer, that would then by definition change the name of the package to @right9ctrl/event-stream, requiring all users to intentionally change their dependency.

Yes, it's painful. But it prevents getting caught out by a malicious patch release.

That said, the whole github/npm relationship is broken to begin with. No simple mechanism exists that I'm aware of to verify that a tag as pushed to GitHub is exactly the same as what is published to npm. And due to various prepublish hooks, it can be very difficult to actually prove this. One solution would be GitHub support for building & publishing packages, with a Travis-like build log, so users can be assured that the package as it sits on npm actually was built from expected source.

@right9ctrl could have just avoided committing this entirely, and just published a malicious patch release. If he had done that for a few days then published another that removes the injection, it might have gone unnoticed for months.

comment 8y ago · link · parent

> It is unclear what he means by "If your system clock jumps from one time to another...". If this is talking about NTP, it's probably accurate.

I don't know what he's talking about either. Most popular NTP clients (ntpd, chrony) will try very hard to make sure this never happens by simply slowing down or speeding up time. You don't know what will break if you just gap time like that.

82.

Tell HN: Amazon now owns 3.0.0.0/8

565 points · by STRML · 8y ago · 313 comments

comment 8y ago · link · parent

FWIW, this is something U2F somewhat solves. There is still the following exhaustive list of problems:

1. Education for and purchase of U2F keys 2. Key loss recovery mechanism 3. Key stolen defense (you can't just rely on the U2F key alone, there must be a pw or other type of second factor) 4. Widespread browser & device support (without it, a user/pass is required as a backstop)

Nevertheless, it is progress.

comment 8y ago · link · parent

There's nothing about <keygen> specifically that requires a central signing authority. You could just as well generate a public/private pair, feed the website your public key, and sign challenges with the privkey to log in.

comment 8y ago · link · parent

In a certain sense this existed with the `<keygen>` element (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ke...) which is unfortunately deprecated. But you still have all the same issues of moving and safeguarding key material.

These days with browser/mobile sync, maybe it's actually possible. But like a synced password manager, it makes a primary account breach that much more devastating.

comment 8y ago · link · parent

This was written in 2014, when Crankshaft was still the JIT in V8. Turbofan was shipped in late 2016 and made primary in 2017. It's a much better JIT - it is tolerant to many more code patterns, including ES6 features - but IRHydra2 no longer works with Turbofan, so this type of introspection is more difficult to do.

A few years ago I hand-tuned some kdb+/q interop code on Crankshaft using IRHydra2 and d8. The results were impressive: about 10x by just shuffling code around to be friendlier to the JIT. It was fun, but more than a little mysterious.

Tuning on Crankshaft was all about avoiding bailout (https://github.com/vhf/v8-bailout-reasons/blob/master/README...). Tuning for Turbofan is less about "gotchas" and more about making sure your functions don't go megamorphic. Using TypeScript or Flow helps you do this just to get your code to typecheck anyway so it's a good habit.

As mentioned in this comment (https://news.ycombinator.com/item?id=15067462) there is still some minor analysis of the IR possible in IRHydra2 on TurboFan.

comment 8y ago · link · parent

Anecdotally, the 2018 key travel feels better than the 2017. But I can't stand the touch bar even after a year with it.
12345
21