6,699 karma · joined Jul 18, 2012 (14y ago) · 1,967 submissions
Backend-focused full-stack engineer with 8+ years of experience, mostly focused on Go, Rust, and TypeScript, but open to other options.
Resume: https://drive.google.com/file/d/1VNC272B3n7ZEfppMHkm2wGgaINwYl4Av/view
comment 6y ago · link · parent
Lawsuits against Apple's App Store policy enforcement are already in progress, but Apple has the best lawyers money can buy, and rulings are years away.
If a substantial part of your business risked being terminated at the click of a button by some unelected person that you have never met, with no proper way to appeal such an unjust decision, you'd probably think twice about doing something that could be misconstrued as intentionally violating App Store Guidelines too.
I blame Apple for the lack of clarity both in their rules and their enforcement. I don't blame ProtonMail for trying to adhere to Apple's arbitrary rules that often make little sense.
comment 6y ago · link · parent
Native apps can schedule background tasks, among other things that would impact your battery life and privacy.
So... disagree entirely. Please provide concrete examples of how a native app is less capable of invading your privacy than a web app that has been added to your home screen.
(Please keep in mind that home screen PWAs don't even have the same level of access to your Safari sessions that random websites have, which is why you have to log into PWAs a second time, even if you are already logged in using Safari.)
comment 6y ago · link · parent
It's absolutely not a privacy or security issue.
comment 6y ago · link · parent
-- Apple, surprised pikachu face, probably
It has been over 5 years since Chrome for Android added support for push notifications.
Apple needs to stop dragging their heels here, since they are clearly using every excuse in the book not to let users receive notification from apps outside the app store purely because it benefits them financially to do this, in a manner that is very anti-consumer and anti-developer.
Users don't have to be assaulted with drive-by notification requests. Safari can require that PWAs only be given the chance to receive push notification permission after being added to the home screen. It's not rocket science. SpaceX landed a rocket booster almost 5 years ago, and they've gone through the certification process to send astronauts to the space station, and they're well on their way to making their next-gen Starship platform orbital. But Apple can't figure out a way to support APNS for PWAs. It's just too hard! Apparently.
If PWAs supported APNS, Apple would have a significantly more defensible anti-trust position, but Apple has shown that they just have no interest in making things easier for themselves -- let alone their users or developers.
Apple also supports PWAs so poorly that the new App Library feature doesn't even properly support them. PWAs have no option to be removed from the home screen and left in the App Library, unlike all other apps, and iOS 14 is the first time that there has been any distinction between PWAs and regular apps as far as the home screen is concerned. This is without even discussing the lack of widget support for PWAs, which would legitimately be challenging for Apple to support well, unlike APNS.
I say all of this as someone who really likes iPhone, and is frustrated that Apple seems to be doing everything possible this year to push me back to Android.
Just add APNS support to PWAs that have been added to the home screen, Apple! And please don't wait another 5 years to do it.
comment 6y ago · link · parent
Apple has not spelled out clearly that this is okay for them to do, which means that it is a risk.
The user would be receiving a literal iOS notification from this app that talks about upgrades available outside the app.
comment 6y ago · link · parent
The reality is that the conversion cost to just `map` one Vec to another is extremely low on anything but maybe a microcontroller —- and even then, maybe not.
If you benchmark things and can’t find a safe way to do things, there are unsafe methods, but I am highly skeptical that they would be needed.
It’s also extremely possible to fork such a library, change a few lines to use the dimensionally correct type, and be done with the issue.
If all of your heavy lifting is being done by this external library anyways, and that library just uses raw floats... why bother with the ceremony of using a dimensionally safe float in your own code if the performance cost of mapping between types is too high?
The real benefit of dimensional safety is when you’re actually doing computations, not some external library you pulled in.
Rust allows for these zero cost wrapper types that will do exactly the correct computations as if they were done with hand written code... but you have to actually have computations that you want to do. The type system intentionally doesn’t want you to treat these typed floats as regular floats. That’s the point.
But there are ways to transmute certain types for no performance penalty, they’re just footguns you should avoid except as an option of last resort.
comment 6y ago · link · parent
But, yes, you probably could transmute it... if you really have to.
comment 6y ago · link · parent
Sounds like a win-win for AMD. Either they sell to customers that demand the best absolute performance, or they sell to customers that demand the best value. Since they offer products to meet both demands, they don't really care which type of customer you are.
Zen 2 is still a fantastic processor, and it will certainly be more affordable than Zen 3 for the immediate future.
comment 6y ago · link · parent
I did an experiment with units of measure years ago in Rust: https://github.com/coder543/metric
To me, it felt ergonomic, and it was absolutely compile-time type safe to the extent you would expect. It worked just fine. I know of quite a few other libraries that do the same thing with their own unique approaches, so there are many flavors of this that all work on stable Rust.
If you're asking for something like this to be built into the standard library... that's very unlikely to happen in the foreseeable future.
comment 6y ago · link · parent
If you disagree, then refute that... but an anecdote about how playing RDR2 causes the console to get hot isn't a response to anything they said. You could have a very early PS4 Pro without the improved cooling system.
(To be clear, I don't know whether the PS4 Pro's cooling system was revised in a later edition, I'm just explaining why your response doesn't fit with the comment you're replying to.)
comment 6y ago · link · parent
If they had something fancy they wanted to do on battery power, they would stick in a Li-ion battery, which they didn't.
comment 6y ago · link · parent
You're saying that if Intel had used their leading edge semiconductor fabs to make ARM CPUs that were exceptionally good, they would not have stood a chance in mobile? I disagree. Qualcomm would have faced serious challenges keeping up with these hypothetical Intel ARM processors back in the early 2010s. They still might, but Intel hasn't even tried.
Intel was just too proud to do something like that. They wanted x86 to become the smartphone standard, which it obviously didn't... and now they're suffering defeat on all fronts.
comment 6y ago · link · parent
There's very little reason for good tools to exist right now, when notifications don't, and this seems intentional on Apple's part. Great tooling could definitely exist for HTML5 mobile apps to make it a good experience to build great apps that way... except for the lack of notification support on iOS. Historically, the Google Play Store is so lax about things that there's no reason not to just submit apps there. You don't even have to give Google a 30% cut on a lot of things, if you provide your own payment mechanisms. So, making HTML5 mobile apps for an Android audience has never been that appealing. But, that might be changing soon. On iOS, there have always been a lot of motivating reasons for companies to release apps as HTML5 Mobile Apps, but the lack of notifications just completely stops the idea flat.
For HTML5 mobile websites, a hamburger menu is often an unfortunate reality, but I think having the most frequently used links always clickable at the top of the page is better than stuffing absolutely everything into the hamburger menu. HN does a great job with this.
comment 6y ago · link · parent
I think WebRTC is supported on iOS? Maybe it's missing some important features? I'm not personally familiar with what's going on there.
Web Bluetooth doesn't seem to be going anywhere fast, for better or worse.
comment 6y ago · link · parent
So, I disagree entirely: iOS can easily support fantastic HTML5 mobile apps... if push notifications ever become available.
From what I remember, Google started switching to bottom tab bars a couple of years ago, even on Android. But, when you have a bunch of features, it's much easier on the developer (not the end user) to just stuff them in a hamburger menu and say "eh, good enough..."
Link that seems relevant, but I've really only skimmed it: https://uxplanet.org/tab-bars-are-the-new-hamburger-menus-91...
comment 6y ago · link · parent
At least on iOS, this only works from the left edge of the screen. You can't "swipe the entire page right", only the left edge. But perhaps I'm misunderstanding what you meant there.
Safari on iOS uses swiping from the left edge to let you swipe back to the previous page, so websites couldn't reliably implement that feature this way.
I wonder if any of the popular Android browsers also use the left edge to let you swipe to previous pages?
Websites could certainly let you swipe left to right over any part of the page to pull out the menu, which is what I thought you were talking about, but that's not what mobile apps commonly do.
comment 6y ago · link · parent
> - I can't swipe left/right between the tabs
> - I can't pull the menu out from the left by swiping the entire page right
Most native apps don't do either of those two things either... at least on iOS. I can't speak to how Android apps behave these days.
Maybe these are your favorite interaction modes, but it really has nothing to do with whether X is "up to par with native apps."
I'm certain these things could be implemented. Clearly they weren't considered desirable by the authors of Shoelace.
What really holds HTML5 apps back is the fact that Apple consistently drags their heels on adopting push notifications for web. It only has to be available for apps that have been added to the home screen, so all the users who complain about getting nagged for notifications as they browse the web would still be perfectly happy not to be getting nagged. Without notification support, the number of companies who seriously invest in HTML5 apps (instead of native apps) is nearly zero, which really hinders investment in HTML5 frameworks targeting mobile app development (not frameworks just targeting mobile website development).
Clearly, Apple benefits from pushing app developers into the App Store where they can require those developers to give them a cut of the profits.
comment 6y ago · link · parent
Benchmarks don't entirely agree: https://www.cnx-software.com/2016/03/01/64-bit-arm-aarch64-i...
If the difference between AArch64 and AArch32 were simply larger pointers, I would probably agree, but AArch64 includes a number of instructions that can do more work, so 64-bit programs can actually run faster than their 32-bit equivalents, even if you're not using much RAM.
comment 6y ago · link · parent
If the goal is to compare to NodeJS and Deno, which are largely used to write long-lived servers, then I disagree entirely.
Even if the main use case for Elsa were to build Lambda-esque services, I would again disagree. Services like that gain significant benefit from reusing a single instance of the program, rather than creating it from scratch over and over again. Even without a JIT, parsing the program over and over is a waste of time, and reusing an instance allows you to amortize that cost (and the cost of JIT) across a number of uses, rather than paying that price every time.
The benchmarks provided are extremely short, such as the one-liner benchmark I mentioned before, so for all we know, QuickJS is slower at parsing JavaScript than V8 is, and it would be slower at running "real" programs than V8, even though V8 has a JIT to deal with. This is without mentioning that V8 has a JIT-less mode, which the benchmarks aren't comparing against, even though it might be more comparable.
The only use case for an 8 millisecond benchmark with startup penalty every time is interactive CLI tools, as you alluded to, and this is far from the expected use case I see described in the project.
But even then... the benchmarks showed that the startup time and total performance for V8 were comparable on the human scale. The difference between 8 milliseconds and 36 milliseconds is completely irrelevant to humans. It isn't like V8 is taking 10 seconds to initialize or something. V8 is just running slower for a short period of time as it learns about what it is executing. If the CLI tool were doing more than a non-trivial amount of work, the V8 JIT would begin to accelerate past QuickJS.
So, the benchmarks are irrelevant for the CLI use case, and irrelevant for seemingly every use case that has been presented. If the benchmarks were showing that V8 could not complete these tasks in a reasonable amount of time, then they might be showing something useful.
These benchmarks are measuring the use case of interactive CLI tools that are written in a single line of JavaScript... which is a very specific use case that I don't believe is intended to be the target market of the project.
I appreciate your anecdote, but this isn't my first time thinking about benchmarks, and these benchmarks seem pretty seriously flawed to me. This is why I made my first comment, and your comment has done nothing to negate any of the reasoning that went into my first comment.
comment 6y ago · link · parent
My guess is that these benchmarks were chosen because the startup time for QuickJS is probably less than the startup time for V8, but I struggle to imagine that V8 is slower once the code has warmed up.
Any meaningful benchmark with JIT runtimes should take several seconds, at a minimum, in my opinion. 8 milliseconds is not enough.
From what I can tell, the benchmark is including the startup time, and it isn't keeping the interpreter warm -- it starts a fresh instance for each iteration of the benchmark.
This is one of the benchmarks: https://github.com/elsaland/elsa/blob/master/testing/bench_s...
Literally a single line of JavaScript.
comment 6y ago · link · parent
comment 6y ago · link · parent
They could let people choose what kind of certificate they want issued to them, and the default could be whichever is most widely supported or whatever.
comment 6y ago · link · parent
I'm not so sure about that.
https://en.wikipedia.org/wiki/Curve25519#History
"Also in 2018, RFC 8446 was published as the new Transport Layer Security v1.3 standard. It requires mandatory support for X25519, Ed25519, X448, and Ed448 algorithms.[24]"
I haven't confirmed this myself, but it seems like anything that supports TLS 1.3 (a lot of things, relatively speaking) supports both curve25519 and curve448.
> Another thing I don't understand is what the threat model looks like for applying hypothetically backdoored curves.
Maybe this article can provide some insight into what people are concerned about: https://en.wikipedia.org/wiki/Dual_EC_DRBG
Obviously, no one has proof that the NIST curves are backdoored, so who knows what kind of backdoor they would have? No one really wants to find out the hard way, though.
comment 6y ago · link · parent
And it isn't just DJB speaking against the NIST curves. There's a relevant quote from Bruce Schneier here: https://en.wikipedia.org/wiki/Curve25519#History
The only real advantage I know of with the NIST curves is that they might be more widely supported, which you mentioned, and which is all the more reason why it would be good for an organization like Let's Encrypt to push the industry forward with regards to curve448 support.
I wouldn't mind if they offered options for what kind of certificate you would like them to issue, so people who favor NIST curves could get a certificate signed that way, and people who prefer curve25519 or curve448 could get a certificate signed that way, but I also realize that more maintenance burden is never fun.
But, those are just my thoughts on the issue... maybe I'm completely wrong.
comment 6y ago · link · parent
I'm not sure how it could be lighter weight than what Go has implemented natively at the machine level, instead of in what amounts to a bytecode interpreter. If you have any links, I would be very interested to read more.
> I've worked a bunch in both, and Go really doesn't compare
I respect your experience, so it is probably a failure of imagination on my part that I simply can't imagine how the BEAM tools could be that much better. I haven't had a problem with a rogue task (or really anything else) in production with Go where I was unable to figure out what was going on extremely quickly. The tooling has been amazing for me, unlike basically every other language I've worked seriously with. The YouTube talk certainly didn't do the BEAM tools justice if they are that much better.
With Go, I actually get really nice GUIs to look around the running Go process and analyze the situation, instead of just an interactive CLI session where I have to craft my own commands to find the top tasks and such. The Go pprof tools also work as an interactive shell (but for analysis, not for remote arbitrary code execution), but I would rather just have the flamegraph in front of me 99% of the time. I fully admit that I've never had a chance to use Erlang/Elixir/BEAM in any meaningful way, but I have tried to understand what they offer, and I haven't seen the compelling magic that some people talk about.
Now, if someone is running a Go service without the HTTP pprof server running on some port that they can access, then yes... it wouldn't even come close to comparing to what BEAM offers when you have the option to connect to a running BEAM instance.