HNHacker News
TopNewBestAskShowJobs

singron

2,697 karma · joined March 2, 2013

Opinions are my own.

Send hate mail and memes to eculperic@gmail.com

submissionscomments
singron··on AI can't stop making up software dependencies and sabotaging everything
I don't think it's a bad idea, but currently packages aren't written with adversarial packages in mind. E.g. requests in Python should have network access, but probably not if it's called from a sandboxed package, but you might be able to trick certain packages into calling functions for you without having your package in the call stack (e.g. asyncio event loop or Thread). I think any serious attempt would get pushback from library authors.

Also it's hard to argue against hard process isolation. Specter et al are much easier to defend against at process boundaries. It's probably higher value to make it easier to put sub modules into their own sandboxed processes.

singron··on Owning my own data, part 1: Integrating a self-hosted calendar solution
Does this always happen or only sometimes? In Google calendar, if the event is modified through the API, there is an option to suppress change notifications, and this can prevent non-google calendars from getting invites.

Also did you create a Google account using your fastmail address? I haven't tested it, but it's possible this causes a hairpin route where Google supresses the outbound email since it thinks it can directly modify the calendar.

singron··on How much do you think it costs to make a pair of Nike shoes in Asia?
Just to say the obvious, they are also going to sell fewer/cheaper shoes according to the demand elasticity since the consumer price is 32% higher. Despite Nike making slightly more on a per-shoe basis, they are probably going to make less overall.
singron··on How much do you think it costs to make a pair of Nike shoes in Asia?
I've used shoe goo to get more life out of shoes. It's marketed as an adhesive, but you can apply it to the bottom of the sole to rebuild thickness to the tread. A single tube could be used for dozens of repairs. After that for me, usually the textiles in the upper fray from the inside out, and I just ignore it until it becomes externally visible or uncomfortable.

I don't think more extensive repairs are economical, and you are better off wearing shoes you like until they disintegrate. There is a bit of mythology about buying expensive boots and repairing them in the hope that it's more economical, but it's really not: https://mastodon.social/@danluu/111068432320682422

singron··on 20 years of Git
Ironically hg now has better rebasing than git e.g. the evolve extension
singron··on Don’t let an LLM make decisions or execute business logic
We definitely learned the exact same lesson. Especially if your LLM responses need to be fast and cheap, then you need short prompts and small non-reasoning models. A lot of information out there assumes you are willing to wait 30 seconds for huge models to burn cash, but if you are building an interactive product at a reasonable price-point, you are going to use less capable models.

I think the unfortunate next conclusion is that this isn't a great primary UI for a lot of applications. Users don't like typing full sentences and guessing the capabilities of a product when they can just click a button instead, and the LLM no longer has an opportunity to add value besides translating. You are probably better served by a traditional UI that constructs the underlying request, and then optionally you can also add on an LLM input that can construct requests or fill in the UI.

singron··on Good-bye core types; Hello Go as we know and love it
This is a good write-up of the issue. To see where this craziness could have led, see the C++ overload resolution logic, which isn't the exact same problem but does smell the same: https://en.cppreference.com/w/cpp/language/overload_resoluti...
singron··on The Gang of Four is wrong and you don't understand delegation (2012)
Trivial Builders are often used in java due to lack of named parameters or object literals. Trivial Visitors are sometimes used due to the anemic switch/enum support, although it's gotten a little better with switch expressions and switch patterns. Singletons and factories are used since java metaprogramming usually requires an instance of an class and can't use the class itself. E.g. you can only call interface methods on an instance, unlike e.g. a rust trait where you can call a trait method on a type without an instance of that type.

In non-trivial cases, these are still useful patterns though in many languages. E.g. traversing a complex AST is often an ideal case for a Visitor. Builders are useful e.g. you want to validate relationships between objects, so you keep a hashmap while building so you can do O(1) validation while building and provide targeted error messages, but then throw away the hashmap after building. Builders are especially useful if you avoid mutable state since you can often contain the mutable parts to the Builder and make the built object entirely immutable.

A lot of the patterns are useful, but you would unknowingly "use" them when appropriate without ever having explicitly learned them. E.g. the Adapter pattern is an obvious solution to a particular problem. I think the only contribution the book has for these patterns is giving these names.

singron··on Improving recommendation systems and search in the age of LLMs
This is a hard problem. We had similar issues evaluating success with real users. In the literature, there is "abandonment" (i.e. I couldn't find what I wanted and gave up) and "positive abandonment" (I got what I wanted from the SERP and didn't click on anything). A flurry of requests might be a series of positive abandonment, a natural fruitful process of refining the request, or rage querying where the user repeatedly fails to correct a model that is incapable of understanding the query. It's especially devious if they rage query for a while before switching to an easier task and succeeding (e.g. clicking a result) since you might count that whole interaction as positive when it was really quite negative.
singron··on Locks, leases, fencing tokens, FizzBee
If you can model your mutation as a database transaction, then that's probably the best. In the past, we've wanted these kinds of solutions when performing actions that weren't in a transactional database. E.g. third party APIs, multiple databases, non-transactional databases, work assignments, rolling restarts and other risky control plane changes. Also a lot of databases can degrade performance when transactions are held open (e.g. in postgres, an open transaction will prevent the cleanup of dead tuples across all tables, which can cause pathological slowdowns in certain workloads), so you might want to move long-held locks out of your database.
singron··on Locks, leases, fencing tokens, FizzBee
You can fix this scenario by incrementing the next_token when you commit the critical section instead of when you enter (if that's possible for your domain). This essentially makes it an optimistic lock instead of a pessimistic lock. Two threads can get the same fence token, but only one will be able to commit.

You can often rephrase and algorithm without a commit step into one that has one, although sometimes it can feel more complicated. E.g. instead of doing A and B in a critical section, commit an intent to do A and B, and then let an idempotent process execute that intent.

singron··on The Burnout Machine
I'd like to see unions negotiate better equity deals. For pre-IPO companies, it's typical that the equity is worth nothing, and employees can actually lose money on their equity by buying it during early exercise or when they leave. For a typical employee, equity is too risky and too detached from their individual activity to be part of compensation, and it makes more sense to have different incentives. E.g. SAFEs or convertible notes where you can get paid at the next funding round instead of the IPO between 10 years and never. Alternatively, a union would have leverage and scale to arrange tender offers that individuals wouldn't. Also, during an acquisition, the union can negotiate to waive liquidation preference, since an acquirer doesn't want to buy a company where the employees don't get paid and strike on the first day.
singron··on The Frontend Treadmill
You would probably be decent at frontend if you did it at least 20% of the time. Obviously you can't be an expert at everything, but there is enormous value in being able to work on most things end to end instead of having to handoff every time.
singron··on Zero-Downtime Kubernetes Deployments on AWS with EKS
The server in http is limited in its ability to initiate connection closures. Remember that when you close a connection in TCP, that sends a FIN packet, and the other end of the connection doesn't know that that's happened yet and might still be sending data packets. In http, the server can request that the client stop using a connection and close it with the "connection: close" header. If the server closes the connection abruptly, there could be requests in flight on the network. With http pipelining, the server may even receive requests on the same connection after sending "connection: close" since they could have been sent by the client before that header was received. With pipelining, the client needs to close the TCP connection to achieve a graceful shutdown.
singron··on Zero-Downtime Kubernetes Deployments on AWS with EKS
Most http frameworks don't do this right. They typically wait until all known in-flight requests complete and then exit. That's usually too fast for a load balancer that's still sending new requests. Instead you should just wait 30 seconds or so while still accepting new requests and replying not ready to load balancer health checks, and then if you want to wait additional time for long running requests, you can. You can also send clients "connection: close" to convince them to reopen connections against different backends.
singron··on Mako: Fast, production-grade web bundler
I believe the developers are Chinese, so it might just be awkward English from a non native speaker.
singron··on Github scam investigation: Thousands of “mods” and “cracks” stealing data
If you use PayPal for your business, you might want the emails to go to a list for redundancy.
singron··on Software development topics I've changed my mind on
I'm immediately reminded of Apple's "goto fail" bug, which was in part overlooked because of poor formatting and/or style: https://dwheeler.com/essays/apple-goto-fail.html
singron··on The young, inexperienced engineers aiding DOGE
The supreme court sure did take power away from the executive in Sacket v EPA, Ohio v EPA, and Biden v Nebraska, but it's likely that reasoning only applies to liberal presidents for the 6-3 conservative federalist society majority.
singron··on Why do War Thunder players leak classified information? [video]
Youtube used to add mid-roll ads to videos that were at least 10 minutes, so your video would basically make twice as much if you stretched it that long. I think the threshold is 8 minutes nowadays.

Short form is hard to monetize (if you are Google 8 years ago) since you need to split ad revenue and attribution among the several videos you watch between ads. This goes against a ton of prior trends in the ad industry where last touch attribution is still king and ad fraud is hard to combat. If course tiktok did it late with creator rewards.

singron··on Apple files emergency motion to become defendant in US vs. Google [pdf]
2018 wasn't a presidential race, which consistently have higher spending. 2020 and 2024 were each over $15B, and there is a steady upward trend in real dollars.

https://www.opensecrets.org/news/2024/10/total-2024-election...

The current supreme court also has a tendency to strike down campaign finance regulations. Everyone knows citizens United, but more recently e.g. AFP v Bonta (2021) struck down reporting requirements in California, which paves the way for unlimited anonymous spending, and Snyder (2022), which reclassifies anything except the most obvious bribes as "gratuities". We'll probably have more 5-4 or 6-3 decisions in the next four years that increase money in politics.

singron··on TikTok says it is restoring service for U.S. users
That's actually one of the reasons the president has a veto. If the president doesn't want the law to pass, then there isn't much point in passing it unless Congress makes a show of force with the 2/3rds majority, which is also the majority needed to remove him from office.

Similarly, one of the reasons the president has a pardon power is because he doesn't have to enforce those federal offenses. E.g. imagine that a president without pardon power instead offers "plea deals"/settlements for a $1 fine or concocts vacuously lenient house arrest enforcement.

The original constitution basically accepts that there is very little you can make a president do, and it instead formalizes what would otherwise be a gray area (it does have plenty about what he can't do). Some of this has changed over time especially as the judicial branch has granted itself more power.

singron··on The Toyota Prius transformed the auto industry
Ours with snow tires does great. Most people probably don't have snow tires though, and they may have tires that perform worse-than-normal like LRR tires or full summer tires.

Snow tires are great on all FWD and are probably way cheaper than buying a new AWD car.

singron··on 'Passive house' survives fire in California
Moderately well sealed houses still exchange quite a lot of air, but if it wouldn't be satisfactory, they often have a fresh air vent usually with a heat exchanger to maintain heating and cooling efficiency. The HRVs and ERVs mentioned in the article are these kinds of devices.
singron··on GPT-4o with scheduled tasks (jawbone) is available in beta
The original cron was programmed this way, but it has to examine every job every tick to check if it should run, which doesn't scale well. Instead, you predict when the next run for a job will be and insert that into an indexed schedule. Then each tick it checks the front of the schedule in ascending order of timestamps until the remaining jobs are in the future.

This is also a bad case in terms of queueing theory. Looking at Kingmans equation, the arrival variance is very high (a ton of jobs will run at 00:00 and much fewer at 00:01), and the service time also has pretty high variance. That combo will either require high queue delay variance, low utilization (i.e. over-provosioning), or a sophisticated auto-scaler that aggressively starts and stops instances to anticipate the schedule. Most of the time it's ok to let jobs queue since most use cases don't care if a daily or weekly job is 5 minutes late.

singron··on I had to take down my course-swapping site or be expelled
A lot of campuses have actual police. In some ways campuses are similar to a municipality and have many of the services that entails (fire, trash, water, power, snow removal, parks, and security/law enforcement).

You could similarly ask why a town of 50,000 people needs a police department.

singron··on Zildjian, a 400-year-old cymbal-making company in Massachusetts
The "How it's Made" for cymbals is a Zildjian factory. By the time this was made, there were already many competitors, so I doubt anything in the video wasn't already replicated by Sabian, Paiste, etc., but it's still interesting.

https://www.youtube.com/watch?v=DYGRcbKOt4U

singron··on Show HN: I send myself automated emails to practice Dutch
It's ordinary javascript. It interacts with many google services including gmail without having to actually maintain servers or setup authentication. It's perfect for small little glue tasks like sending yourself emails or anything that interacts with Sheets. You wouldn't use it if you weren't trying to use a Google service.
singron··on Show HN: I send myself automated emails to practice Dutch
This is a great fit for Google AppScript.
singron··on Why OpenAI's Structure Must Evolve to Advance Our Mission
You can't own a non-profit. It doesn't have shares or shareholders. The article says they want the non-profit to own shares of the PBC.
← PreviousPage 7 of 27Next →