Better HN
topnewbestaskshowjobs
Log inSign up

coder543

6,699 karma · joined Jul 18, 2012 (14y ago) · 1,967 submissions

My email is at gmail using my username.

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

Submissions

comment 6y ago · link · parent

Threads existed long before multi-CPU computers or multi-core CPUs were common, so no... they don’t exist for that reason.

Parallelism and concurrency are orthogonal concerns. Multiple threads can run on the same core, while concurrent awaits can run on separate cores (depending on the language). Or the opposite!

Threads definitely solve wasted time waiting on I/O, but OS-level threads are a very limited resource in many environments, which can cause problems more quickly in programs with unbounded concurrency, and they tend to have a lot of startup cost, so they have to be created judiciously to avoid hurting performance.

Languages like Go and Elixir give the programmer access to unlimited lightweight “threads”, and that works great for concurrency, without requiring developers to re-color their functions.

One additional note is that some OSes (including Linux) have struggled to support true nonblocking File I/O for many years, so you literally have had to use multiple OS threads for I/O concurrency... one for each file operation in progress. Otherwise you would block the async executor! Languages often handle this implementation detail for the programmer, so you just don’t realize you’re using a thread-per-await sometimes.

(io_uring seems to finally solve this in a meaningful way on Linux)

comment 6y ago · link · parent

My opinion on the topic isn't definitive by any means, but I think a lot of projects would do just fine without allowing arbitrary hyperlinks to be added by non-admins.

I think being able to link to related issues and link into the code is still important, for example.

It's certainly a trade off, but spammers want it to be rendered as a link.

comment 6y ago · link · parent

I still think an even better path to success is to allow entirely disabling linking for non-admins.

Google no longer treats "nofollow" as strongly as it used to: https://webmasters.googleblog.com/2019/09/evolving-nofollow-...

comment 6y ago · link · parent

People measuring RPS (requests per second) are rarely measuring CPS (connections per second), so the TLS setup overhead would be amortized across numerous requests.

A single webpage will often load a number of asset files over the same underlying connection, so it's not like CPS is the single, entirely accurate measure and RPS is just bad or something... they're both valid, interesting numbers.

Even then, TLS setup isn't that expensive, in my opinion. Someone else here mentioned 35% overhead from TLS on a Raspberry Pi, which seems high to me... but it would still be orders of magnitude better performance than what the original article on this thread was claiming.

comment 6y ago · link · parent

Maybe GitLab needs an option to disable external linking, and filter any comment that contains an external link automatically

comment 6y ago · link · parent

I'm not associated with the project in any way, but your well researched comment did miss at least one important factoid.

This comment:

> The closest to any discussion of these numbers that I saw was a mention that it may take up to 20s on mobile; for comparison, the much-hated image CAPTCHA takes about 6-12s on average for native English speakers, and 7-14s for non-native speakers.

Missed this quote from the website:

> As soon as the user starts filling the form it starts getting solved

> By the time the user is ready to submit, the puzzle is probably already solved.

The time spent solving reCAPTCHA is active user involvement. The time being spent on Friendly Captcha is passive and can overlap with time being spent filling out a form.

"up to 20 seconds" was also seemingly presented as a worst-case scenario. Most users' devices would presumably be faster than that, but I don't know how the author researched that conclusion on how performance scales. Friendly Captcha does report back some information on how long it is taking users to solve the captcha, and it looks like website owners could use that to adjust the difficulty based on the needs of their specific audience and how tolerant they are of untargeted spam.

The stuff you point out about Blake2b seems entirely legitimate, and I wonder if an Argon variant would be more appropriate to avoid specialized hardware being quite so problematic.

Personally, I really like the idea of Friendly Captcha. Certainly, there are problems with any captcha implementation. People can rant for many, many paragraphs about websites that use reCAPTCHA... I'm not surprised to see someone ripping apart a different captcha system. The ideal solution would be for spammers to just stop being so obnoxious... but good luck with that plan.

comment 6y ago · link · parent

The obvious follow-up question is how IPv6 impacts this, because I think it's supposed to be easy for someone to get their hands on a decent chunk of IPv6 addresses.

Maybe the difficulty could scale as a property of how similar the IP address is to previously seen addresses... so the addresses in the same /64 block would be very closely related, for example. (I think that's how IPv6 works... but definitely something I haven't researched lately, so I could just sound very confused)

comment 6y ago · link · parent

Related but semi-random: it slightly annoys me that force-with-lease goes through the entire effort of force pushing if it thinks the remote is identical to the local. It’s not going to change anything either way, and it could save me the second or two of waiting on it to do nothing. If local is already identical to the last known state of the remote, and I’m trying to force push, the actual error is that I didn’t edit the local branch in the way I thought I had when I decided it was time to force push.

(I realize there is a possible error message case if the remote has changed... but I don’t feel like this command is the best one to use to discover whether the remote has changed, if you have no changes you actually intend to force push.)

comment 6y ago · link · parent

I disagree with the many/most. Many/most are probably using uBlock Origin, which doesn’t try to prevent things like blocking pasting (to my knowledge). I’m sure some are using NoScript-like features... but that’s not the same as specifically preventing websites from preventing paste. It’s just a sledgehammer. I can’t name an extension to do that one task (and/or similar tasks) off the top of my head, and I’m reasonably familiar with discussions in these parts. uBlock Origin is known to be very popular, unlike an obscure “allow paste” extension. But, that’s just like, my opinion... as they say.

The point I was making is that copying and pasting seems like more effort than just typing the repo name. Do you commonly encounter long, inscrutable repo names? Do you delete repos frequently enough to have built up the habit of copying and pasting the repo name into the delete box?

If it is common enough, disabling paste would actually benefit the user based on the premise of the article.

comment 6y ago · link · parent

If you really think that’s an issue, pasting could be disabled for that input field. Would that make you happier?

It hasn’t been an issue for me, since repo names aren’t usually super long and onerous to type.

comment 6y ago · link · parent

What’s the comparison between a-Shell and iSH? I’ve somehow never heard of the former, but I have repeatedly heard about the latter and used it.

comment 6y ago · link · parent

CircleCI offers build caching that works well enough, for example. It's not the super advanced stuff that Bazel can do, but you don't need Bazel to do build caching.

When the Linux kernel (~27 million LoC) can be compiled from scratch in under a minute on modern machines (30 seconds on some of the beefier machines)... there's clearly a lot of low-hanging fruit in that "hours long" compilation that has nothing to do with build caching.

Whether you can get stakeholders to buy into paying down technical debt or not is an unrelated discussion. Sometimes it's easier to sell fancier build systems as the solution instead of better code organization and simplifying overly generic code.

C++ code doesn't have to be super slow to compile: https://www.zverovich.net/2017/12/09/improving-compile-times...

comment 6y ago · link · parent

Cargo works well for building C dependencies, in my experience. I haven't really needed (from Rust) to depend on anything written in Java or some other random language, so my experience there is mostly non-existent.

Advanced "infrastructure features" you're describing just aren't important for most companies that aren't Google-scale. Compile time on CI is plenty fast without that, in my experience using Rust professionally.

Your mileage may vary, of course.

comment 6y ago · link · parent

> Internally at Google the vendor all source code and make it build using bazel.

It sounds like that is done for consistency, to make it easier for Googlers to move between projects written in different languages, and to lower the cost of setting up new projects into their existing tooling and infrastructure?

I don't think that's really a comment on whether Cargo is good or bad, so much as a language agnostic approach to managing code that Google finds works well for them.

If you're not Google, you're probably better off using Cargo.

comment 6y ago · link · parent

Which is not recommended, because it could silently truncate if _ is a smaller type, or later becomes one as the code is edited over time.

Much better to use ::from() or into() for numeric type conversions, which are only implemented for types that are guaranteed to fit the value, unless you know that truncation is perfectly fine behavior in a particular instance... which it rarely actually is.

comment 6y ago · link · parent

You are the one using sophistry, if anyone is using it. You are completely (and willfully!) ignoring how vulnerable passwords are in any threat model that invalidates a FIDO2 implementation of Face ID. No threat model invalidates the security of Face ID for the Web without similarly invalidating passwords. At least, you have chosen not to present such a threat model, which would help my (apparent) failure of imagination.

You cannot protect your passwords from someone who would physically take your iPhone before you can lock it and who would have a life-size reconstruction of your face ready and waiting. Such a person could shoulder surf your passwords with far less effort, or compromise one of the dozens of websites the average user re-uses their passwords on. At a certain point, the person in this threat model will just pull out a wrench and beat you with it until you help them get into your account. https://xkcd.com/538/

If you can show how some random person on the other side of the internet having your fingerprint helps them get into a website using your account... that would be interesting discussion. As it is, they must have physical access to your device. Your biometrics are useless without physical access and rapid action, since the biometrics quickly become useless as the device falls into a state that requires the user's passcode.

You're completely ignoring everything I actually said in my comments, so I'm done here.

comment 6y ago · link · parent

It is not sophistry, and sophistry is not a word I've ever seen used in a genuine conversation, so I immediately doubt your sincerity in this conversation.

If someone wants to fake biometrics on an iPhone, they have a very limited window of time to do so, and the user can lock out the biometrics in less than 3 seconds just by "squeezing" the phone. (power button + either volume key, 2 seconds later the biometrics are locked out.)

It's much harder to fake the biometrics in that very brief window of time (maximum 48 hours) than it is to shoulder surf a password.

Unless your threat model includes State Level Actors, biometric bypass is a very remote concern.

If your threat model includes State Level Actors, you're probably screwed either way, since they can easily afford to shoulder surf you.

For everyone else, the main concern is that someone not physically present will manage to acquire your password and log into your services. Passwords suck at this threat model. FIDO2 makes this scenario impossible without that remote person managing to execute a Secure Enclave 0day on your personal device... and even then, it's still way harder than acquiring your password. Not even the website you're authenticating against receives your FIDO2 key... websites always receive your password, which is awful for security.

Some related info here: https://news.ycombinator.com/item?id=24830642

comment 6y ago · link · parent

You don't seem to be aware of what is under discussion here. You just raised a huge strawman.

Websites are not receiving your biometrics in this context, and your biometrics would be meaningless to the website if captured and somehow provided.

Your biometric signature is stored solely inside the Secure Enclave in the Apple device.

If and only if the Secure Enclave recognizes you via your biometrics will the Enclave uses a non-transferrable key stored only in the Enclave to attest to the website that you are the user "JoeAltmaier".

- The key is secret.

- The key is kept in only one place.

- The key can easily be discarded and a new one made.

- The key is never given to anything outside of the Enclave, so... I'm not sure how it could be traced to you, besides the whole fact that it is being used to authenticate you, which is necessary.

Sounds pretty acceptable to me as a password. The usability issue here is that a website needs to be able to accept a different password from each device you own, since the password is non-transferrable, and you might accidentally drop your iPhone to the bottom of the ocean.

Good news: FIDO2 is an entire standard built around this concept, originally intended for use on YubiKeys and similar FIDO2-compliant USB sticks.

Apple is building an implementation of FIDO2 that uses the iPhone that's already in the person's hand.

If the Secure Enclave is compromised (which does happen sometimes), then Bad Things could happen... but that's also what happens when a password manager tool is compromised.

comment 6y ago · link · parent

> is it going to magically run faster?

Faster than what? The previous Compute Module 3+? Absolutely.

comment 6y ago · link · parent

The embedded market isn't anything like the direct to consumer market. D2C allows for fine tuning like that in a way the embedded market simply doesn't.

If they change the product at all, downstream companies may have to get their products entirely re-certified, which can be an expensive and time consuming process. Those companies rely on having a stable supply of exactly the compute module that they designed their product around. Every detail matters.

These SKUs are fixed in stone. If they discontinue or modify them at all before the specified 7 year date, that would substantially damage their relationship with downstream companies. They have upheld their previous commitments, so I don't expect them to start breaking commitments now.

comment 6y ago · link · parent

> If they still make all 32 flavours a year from now, I'll be supprised.

They guarantee 7 years of availability for Compute Modules, including this one, so... prepare to be surprised.

They had plenty of time over the last 16 months since the launch of Pi 4 to decide how many SKUs to make for the Compute Module. This certainly wasn't done on a whim by some inexperienced team, which is what your post seems to imply. They've been doing this for years, and they realize the commitment they're making.

comment 6y ago · link · parent

> Google decided that wasn't to their liking and disabled the Google account attached to the phone.

Did you decide to go for Round 2 in small claims court and get the account un-disabled?

comment 6y ago · link · parent

This isn't as generally true as you seem to think it is. There are absolutely a few situations where a mirrorless / DSLR camera is going to run circles around a smartphone camera, but fewer than you might think.

A mirrorless camera may have a wider dynamic range by default, but modern iPhones have incredible Smart HDR capabilities that actually work really well. With a mirrorless, they can do an auto HDR effect using several photos, but it's a much simpler effect, and you can't get RAW photos when using that. The new iPhone 12 will capture RAW photos even when applying Deep Fusion and other advanced techniques, from what they mentioned on stage today.

I'm fairly sure no common mirrorless camera is going to be able to do HDR video at the level that the iPhone 12 will do it.

If Apple or Google would make a mirrorless camera that combined their intelligent camera software with a larger sensor, that would be epic. Right now, there are always trade-offs, no matter which camera you pick.

I've thought about getting a mirrorless camera to have that massive sensor for night photography, and to have the variety of lenses, but it's a lot of money for something substantial to have to carry around, and the difference just isn't what it used to be.

Even if you're printing these photos, an iPhone 12 is going to be able to take a lot of really crisp, excellent photos. With the help of LiDAR, I think the 12 Pro will be able to create a really compelling portrait mode effect that's less glitchy than the current techniques that don't have an accurate depth map instantly available.

Computational photography is a real thing, and it's impressive how much they have made up for the lack of physical space that would be required for a giant sensor.

If you scroll back on this twitter feed, you can see some nice examples of pictures shot on iPhone by various people: https://twitter.com/halidecamera

They're not "nice for a smartphone" pictures. They're just good pictures.

comment 6y ago · link · parent

Apple's NFC antenna is usually along the top edge of the phone

comment 6y ago · link · parent

5Ge is a marketing term AT&T invented as a rebrand of 4G LTE. It isn't 5G, but it's probably faster than real 5G for now.

https://arstechnica.com/information-technology/2020/09/atts-...

comment 6y ago · link · parent

No. This article also discusses Verizon, not just AT&T: https://arstechnica.com/information-technology/2020/09/atts-...

comment 6y ago · link · parent

Cloudflare famously charges $0/GB, with some arbitrary restrictions on the way you use their service, and I’ve heard rumors of soft limits on the total amount of bandwidth you can use before they email you to upgrade to a higher plan.

I’ve never used BunnyCDN, but they charge a flat $0.01/GB for North American traffic, and I’ve heard some good things about them.

DigitalOcean, Vultr, Linode, and some other cloud providers charge $0.01/GB without a CDN, just using their regular servers, but obviously a CDN is more than just a way to save money — it’s a way to lower latency and improve user experience.

The mega clouds (AWS, Azure, and GCP) seem to significantly over-charge for egress bandwidth as a nice profit mechanism, just because they can.

My unpopular opinion is that mega clouds are overrated. They’re fine, but they have a lot of weird gotchas that most people have just accepted as “how the cloud works.”

comment 6y ago · link · parent

> Yeah, that’s the perfect web app, and we already have these in iPhone.

> [...]

> What I wouldn’t like for battery and privacy is if a web app could have _background_ activity — sending data to its servers, having access to mic/camera/sensors, running JavaScript spaghetti non-stop when I am not having the thing in the foreground.

This doesn’t make any sense. It’s just fear mongering at this point. It’s not “the perfect web app” that doesn’t do these things. Apple rigidly enforces privacy on web apps.

First, Apple allows you to control which sensors a web app has access to exactly the same as any app. They don’t just get to steal camera access for fun. This is the same privacy-first approach that applies to native apps.

Second, Apple doesn’t allow these web apps to run in the background period. They run when you have them open, and that’s it.

If Apple allowed PWAs to run in the background, you would certainly be given options to control that behavior. The way Apple does things, any background behaviors would likely be severely restricted in how much CPU time they get to avoid impacting battery life. But for now, the impact is zero, unlike native apps.

> native apps are reviewed by an authority I trust, upon every app update

It has been shown repeatedly over the years that native apps will often get App Store guideline violations past review by simply feature flagging such unapproved behaviors until after review. Apple seemingly can’t catch every example of this, especially among smaller apps, as they simply don’t have the resources.

Safari is built around a model of extreme distrust, since you’re browsing websites that haven’t ever been reviewed, and PWAs are isolated to another level. Native apps are built on a trust model that is slowly being reclaimed for minimal trust, which just means they’re slowly catching up to PWAs. Safari isn’t leaning on some human app review process to determine how trustworthy code is.

PWAs are more private than native apps. That’s just the reality of it, but Apple has nothing to gain financially from emphasizing that to their customers.

> native apps are also mostly native code, so they are easier on the battery without sacrificing responsiveness.

Swift and Objective C are surprisingly slow languages in most benchmarks, and mainstream JavaScript interpreters are mind-blowingly good. I disagree with your point here, this is really just a coin toss. Developers can write bad code for either platform, period, and a JIT language like JavaScript can often figure out which code is performing poorly as it is running and optimize it into better code. If people were commonly writing their iOS apps in Rust, I would probably find this to be a more compelling point.

In summary, I don’t think you provided any concrete examples of things that currently make PWAs worse than native apps. You’re just afraid of how bad things could be if Apple decided to stop caring and remove privacy and behavioral restrictions from web apps entirely, which is something they have shown no interest in doing.

No one is asking for web apps to just run amok. Apple should give the user the option to let web apps added to the Home Screen send notifications, exactly the same as any native app. I think it would be great if Apple could devise a limited background permission that PWAs could request, instead of zero background ability. Native apps have lots of legitimate excuses to run in the background far more than you might expect, and it annoys me how even turning off Background App Refresh doesn’t stop native apps from running in the background. Native apps that choose to violate App Store guidelines can run without limit in the background, and you’re expecting Apple to find and discover every violation by hand.

Also, HN isn’t a PWA. It’s just a Safari bookmark on the home screen, if you add it there. I don’t know if Grafana offers a proper PWA experience or not. Twitter offers a real PWA, as an example.

comment 6y ago · link · parent

> It would be really silly for Apple to ask the provider to censor their user's inbox and hide a particular email they received.

I agree completely. If Apple agrees, they should spell this out clearly in their terms.

As it is, Apple gets to selectively enforce this whenever they want, which is unfair to both app developers and users.

One likely danger of spelling this out from Apple's point of view is that someone might say the same thing about other messaging services besides email. Take Facebook Messenger, for example. Imagine that Facebook started offering a paid upgrade to Messenger. Why should Facebook Messenger care on which platform you're receiving an internally-generated call to action to upgrade to some hypothetical paid plan? It's not like they were intentionally targeting Apple users in this hypothetical scenario, and it should be their right to not have to censor messages they decide to send to their users just based on the platform being used. It's (hypothetically) just a regular Facebook Messenger message, after all, generated by some marketing system completely disconnected from both the app and the messaging platform!

One thing that confounds the issue for ProtonMail specifically is that the app only works with ProtonMail, and ProtonMail is operating both the frontend and the backend. It's not like the Gmail app that also lets you use other email accounts with it as a general purpose email client. This is why I chose Facebook Messenger as an example -- it is a messaging platform, but both the frontend and backend are operated by Facebook.

1
535455
66