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 9y ago · link · parent

Yeah - that's a really great trick! You can also get this somewhat "for free" by batching updates on `requestAnimationFrame`, which never fires when unfocused.

https://www.npmjs.com/package/visibility is a nice little package that encapsulates some of the browser compat issues, if you have out-of-date clients.

comment 9y ago · link · parent

It depends on what you're doing. If you split up tasks and interleaves them (such as: process a few items, stop, set another timer, process a few more), actual CPU% throttling would be better. It would be easier to have certain timers take priority, such as heartbeat responses or notifications.

comment 9y ago · link · parent

To whoever downvoted this: I am the author of the post above, and in response I've removed the JS-centric layout.

comment 9y ago · link · parent

It's different because it can't just slow down a running task.

Say you use up 150ms of CPU time. Chrome isn't going to let another timer fire for 15s. Then, you're late on a whole bunch of work that needs to get done, so the next timer takes 500ms. Chrome then throttles the next timer by 50s. And so on and so forth...

comment 9y ago · link · parent

Oh, it's awful, I agree. This is the nicest layout but the JS is terrible.

I've reverted to a plain-HTML layout.

186.

Chrome 56 Will Aggressively Throttle Background Tabs(blog.strml.net ↗)

2 points · by STRML · 9y ago · discuss

comment 9y ago · link · parent

Clearly; yet it is encouraging that CREST finally ended up online.

comment 9y ago · link · parent

That's pretty sad, especially for an agency that must have a certain amount of technical competence for their day-to-day.

This could be easily solved by releasing all documents and a list of their hashes simultaneously.

comment 9y ago · link · parent

That hit me pretty acutely today when upgrading. Restarting slack took 15 seconds and pegged all 4 (8 logical!) cores. Why should a chat app ever do that?

I get that a billion dollars doesn't buy what it used to, but it really ought to buy native apps on at least all the major platforms.

comment 9y ago · link · parent

That's assuming a 1.5s reaction time. Surely that's quite slow and accounts for the bulk of the difference.

comment 9y ago · link · parent

That's not necessarily true. I work on BitMEX, and we offer quarterly futures contracts that don't have holding fees. Today, with the price movement, they've been even trading at a discount to spot.

comment 9y ago · link · parent

> Somewhere have to start the transition

By removing every single legacy port long before there's anywhere near ubiquitous USB-C? Even USB-C cables themselves are more commonly sold as USB-A to USB-C. I love having usable DisplayPort/Thunderbolt, HDMI, and USB-A on my 2013 rMBP - I never need a dongle. If I went to a 2016, I'd need at least 3, every day.

> Prioritising thinness and weight over everything else

Battery life is certainly not the same, and the lack of a 16GB option or a faster processor is a well-missed loss.

comment 9y ago · link · parent

How useful is that, really, considering you couldn't possibly use a Yubikey to configure disk encryption? Unless you actually put the unlock key on the Yubikey somehow (I've never heard of someone attempting or succeeding at that), anyone with physical access - which is what this is intended to protect against - could still wreak all kinds of havoc with disk access.

It's certainly easier and may even be safer (in the case of a malfunction, which has happened on OSX) to just use a longer password.

comment 10y ago · link · parent

Seems pretty nice. A few things I'd like to see:

1. We should be able to configure this for a few/all branches (including PRs) and have conditional build tasks based on branch.

2. We need be able to access resources inside a VPC.

3. Turnkey chat integrations would be nice, but it's not a big deal to just curl.

4. We need a way to execute actions on failure.

comment 10y ago · link · parent

And it doesn't look good for any of those.

t2 instances notoriously throttle way down to 10% if your workload is too consistent. The full performance is quite good from the 2.40 GHz E2676 v3, but at 10% it's worse than a Raspberry Pi. And this will always hit you at the worst time (when under load).

As for the SSDs, they're just GP2 storage, which is an order of magnitude slower than DO and nearly 2 orders of magnitude slower than Joyent Triton.

So AWS is providing a seriously inferior product here, but it's under the AWS umbrella and peers with the rest of their services. The question is: will the target market care about any of AWS's other services enough to make the inferior $/perf worthwhile, and will they integrate easily enough for the average developer to use them?

comment 10y ago · link · parent

It doesn't appear that Lightsail actually allows hooking up data volumes. This is a surprising regression considering AWS basically invented it, and a major downside compared to DO.

So network-attached storage for Lightsail is upside for AWS, but all downside for the customer.

comment 10y ago · link · parent

It's just an artifact of network-attached storage.

Many competitors just use local storage, which comes with its own serious downsides for the company and customer. DigitalOcean just recently launched its Volumes service, but it's very limited compared to EBS, and not nearly as fast as its local SSDs.

EBS is generally fine but I would really enjoy the option to have ~40GB local SSDs for caching (but I suppose you can always grab an r3/r4 and cache in memory if that's your bag).

The best cloud I/O perf I've seen, bar none, comes from Joyent's Triton containers. Beats even DO by 3-4x. Beyond that you need to go bare-metal.

comment 10y ago · link · parent

Re: VPC peering, the blog gets into more detail. I tried it out, worked great. Simple egress. https://aws.amazon.com/blogs/aws/amazon-lightsail-the-power-...

comment 10y ago · link · parent

A compelling product. The dashboard looks great. They even replaced the confusing term "user data" with "launch script", but they fall back into it later. SSH in-browser is great too and can be bookmarked/opened in a fullscreen tab. Uploading (instead of pasting) your SSH pubkey is a bit annoying.

The docs appear to say you can add these to a VPC but I don't see how to do it.

They don't say the SSD storage is local, so I'm sure it's not.

A few runs with `fio` confirms this is EBS GP2 or slower:

The bench: "fio --name=randrw --ioengine=libaio --direct=1 --bs=4k --iodepth=64 --size=4G --rw=randrw --rwmixread=75 --gtod_reduce=1"

Lightsail $5:

  read : io=3071.7MB, bw=9199.7KB/s, iops=2299, runt=341902msec
  write: io=1024.4MB, bw=3067.1KB/s, iops=766, runt=341902msec
DigitalOcean $5:

  read : io=3071.7MB, bw=242700KB/s, iops=60674, runt= 12960msec
  write: io=1024.4MB, bw=80935KB/s, iops=20233, runt= 12960msec
More than an order of magnitude difference in the storage subsystems.

These appear to just be t2.nano instances (CPU perf is good, E5-2676 v3 @ 2.40 GHz, http://browser.primatelabs.com/geekbench3/8164581).

For advanced users, there isn't much compelling here to make up for the administration overhead. It's a little cheaper than a similar-spec t2.nano (roughly $4.75 on-demand + $3 for a 30GB SSD). The real win is egress cost; you can transfer EC2->Lightsail for free. 1TB of egress would be nearly $90 on EC2, but is only $5 on Lightsail.

In other news, EC2 egress pricing is obviously ridiculous.

comment 10y ago · link · parent

Yet, this is the same cost on EC2 for the first 10TB, except you don't get 1TB for free with EC2.

So essentially you're getting $90 worth of egress traffic for $5. It's even more obvious now that EC2 egress pricing is ridiculous.

comment 10y ago · link · parent

Practically, what good is Google certification, if a majority of the devices in the wild are months or even years behind on security updates?

comment 10y ago · link · parent

Which is precisely the idea of covariant getters / contravariant setters in some sounder languages.

comment 10y ago · link · parent

Built https://securesha.re/ a few years back, it is:

Secure (browser-encrypted) dumb file storage with self-destruct. By default, it self-destructs on first access. The server can't read your files and it will delete them anyway after a week (or less, if you like).

It's a good way to quickly send a file to someone else and to know if it's been accessed in the interim.

It was really just our own attempt to build something that can do very simple secure file sharing that anyone can use, as an alternative to so many broken practices (such as clearnet emailing sensitive docs).

It's turned into something pretty cool for a few reasons:

1. We get emails all the time from people who love how simple it is

2. It's a great testbed for new web technologies; I rebuilt it once using Polymer and intend to rebuild using Elm when I have the time

3. It's a great testbed for web crypto & webworkers.

comment 10y ago · link · parent

Really interesting what high import taxes will do.

Craziest of all - Tectoy ported Street Fighter 2 for the 8-bit Master System... in 1997. It's predictably terrible but really, it's amazing it happened at all.

comment 10y ago · link · parent

Surprised not to see much comparison to Joyent Triton on here.

We evaluated Triton, and while we encountered a depressing number of show-stopping bugs doing really basic things in the first week (like any container that installs `curl` failing due to a utf-8 character in the default ca set), it was pretty cool to use the native docker CLI to provision nodes. Local == remote on Triton.

Triton runs on top of SmartOS inside Zones. To me, this is the only setup I'd actually trust for production. The security story is a whole lot of hand-waving on Linux. What does Hyper run on top of?

Unfortunately for Triton, it does take as long as a minute to provision and the cost is 2x Hyper's for equivalent hardware. I haven't done CPU benchmarks on Hyper yet but the CPUs were anemic on Triton. The I/O perf was unbelievable, though, due to local SSDs and no virtualization layer.

Will keep an eye on this at least for dev and CI. Good luck!

comment 10y ago · link · parent

The linked Don Hodges article about Level 256 is particularly fun to read, complete with a few proposed patches & a way to make the startup checksum still pass:

http://donhodges.com/how_high_can_you_get2.htm

A fun quote - it certainly seems better to have an ending, even if it is not intended:

> "It is probably a good thing that Pac Man has this bug in its program. If it didn’t, expert players could conceivably be able to play the game indefinitely, because whenever they get tired they can just park Pac Man in the hiding places and leave the game to go eat, sleep, or whatever, and then return to the game and continue playing. The only limiting factor would have been the length of time that the game could run without a power outage or suffering from some other hardware failure. Experts would have been able to play the game for weeks, months, even years, or more."

comment 10y ago · link · parent

Nice work. But perhaps you meant to link to https://github.com/mbasso/react-decoration/tree/master/docs instead? The releases page only shows a single release and two decorators.

It is also worth noting that the decorator syntax is still not final, and using it with Babel 6 requires https://github.com/loganfsmyth/babel-plugin-transform-decora.... More details on the decorator deprecation is in that repo.

comment 10y ago · link · parent

I agree that segment is demanding, but there's really only one box we want to tick:

1. I want to legally run OSX on top-of-the-line hardware.

I don't want a fancy design that's unnecessarily difficult to rack-mount or store anywhere, I don't want to try out new ports while abandoning common ones, and I certainly don't want to be 3 years behind.

A matte black rectangle would be a lot better than this. Why the need to be so fancy, to the detriment of your actual users?

comment 10y ago · link · parent

This is why we badly need an alternative to input's `type` attribute, as the type attribute encapsulates many different things:

1. Validation

2. Autofill hints

3. Native helper widgets (date calendar, number input spinner)

4. Mobile keyboard layouts

And, confusingly, while most `type`s are text inputs with differing values of the above, others are very, very different (radio, checkbox, select, file, etc). Still others use completely different tags (like <textarea>) and you even have to switch on `value` or `checked` for checkboxes.

Many people use `type="tel"` or `type="number"` just for the mobile layouts, and spend a long amount of time working around all the awful bugs in number inputs. Our own `<NumberInput>` React component works around multiple browser bugs and took weeks to get right. The incidental complexity even creates very hairy React bugs (https://github.com/facebook/react/issues/7253).

Even if you get around all the bizarre failures in differing implementations, you still have ridiculous spec bugs like the (intended) lack of selectionEnd/selectionStart on number inputs (https://www.w3.org/Bugs/Public/show_bug.cgi?id=24796) and the like.

I don't know if anyone is championing splitting these concerns into separate attributes, but the web really needs it.

1
678
21