Better HN
topnewbestaskshowjobs
Log inSign up

bkettle

463 karma · joined Sep 18, 2022 (4y ago) · 72 submissions

benkettle.xyz
Submissions

1.

Making Semgrep rip: How Ripgrep inspired us to shave hours off (some) scans(semgrep.dev ↗)

7 points · by bkettle · 5mo ago · discuss

2.

Fibonacci in the NYT Pips(benkettle.xyz ↗)

2 points · by bkettle · 10mo ago · discuss

comment 10mo ago · link · parent

Are you based in Alaska? I’d love to hear more if so; I have contact info on my website. (I grew up there).

comment 11mo ago · link · parent

Yeah fair enough. I can definitely see the value of property-based verification like this and agree that useful properties could be easy to express and that LLMs could feasibly verify them. I think full verification that an implementation implements an entire spec and nothing else seems much less practical even with AI, but of course that is just one flavor of verification.

comment 11mo ago · link · parent

The whole point I think, though, is that it doesn’t matter. If an LLM hallucinates a proof that passes the proof checker, it’s not a hallucination. Writing and inspecting the spec is unsolved, but for the actual proof checking hallucinations don’t matter at all.

comment 11mo ago · link · parent

I think formal verification shines in areas where implementation is much more complex than the spec, like when you’re writing incomprehensible bit-level optimizations in a cryptography implementation or compiler optimization phases. I’m not sure that most of us, day-to-day, write code (or have AI write code) that would benefit from formal verification, since to me it seems like high-level programming languages are already close to a specification language. I’m not sure how much easier to read a specification format that didn’t concern itself with implementation could be, especially when we currently use all kinds of frameworks and libraries that already abstract away implementation details.

Sure, formal verification might give stronger guarantees about various levels of the stack, but I don’t think most of us care about having such strong guarantees now and I don’t think AI really introduces a need for new guarantees at that level.

comment 1y ago · link · parent

> there's a section of road near where I live that's dangerous, and we all know it's dangerous

Clearly not enough people know it’s dangerous or how dangerous it is, or one of them would do something about it

comment 1y ago · link · parent

Semgrep has supported uv for months now (I added it).

comment 1y ago · link · parent

This free tradition in software is I think one of the things that I love so much, but I don't see how it can continue with LLMs due to the extremely high training costs and the powerful hardware required for inference. It just seems like writing software will necessarily require paying rent to the LLM hosts to keep up. I guess it's possible that we'll figure out a way to do local inference in a way that is accessible to everyone in the way that most other modern software tools are, but the high training costs make that seem unlikely to me.

I also worry that as we rely on LLMs more and more, we will stop producing the kind of tutorials and other content aimed at beginners that makes it so easy to pick up programming the manual way.

comment 1y ago · link · parent

Do you mean 500Wh rather than 500kWh? 500 kWh would be around 10 EVs worth, and looks like it costs around 700k [0], but 500Wh seems to be a common size for portable power stations [1]

[0] https://www.backupbatterypower.com/products/516-kwh-industri...

[1] https://www.ankersolix.com/products/535?variant=497024349310...

comment 1y ago · link · parent

I think they mean backwards-compatible syntax-wise, rather than actually allowing this feature to be used on existing code. If I’m understanding correctly they would prefer for the Python grammar to stay the same (hence the comment about updating parsers and IDEs).

But I don’t think I really agree, the extensible annotation syntaxes they mention always feel clunky and awkward to me. For a first-party language feature (especially used as often as this will be), I think dedicated syntax seems right.

comment 1y ago · link · parent

I found out yesterday that it is now the law that federal employees are guaranteed back pay after a shutdown, thanks to the Government Employee Fair Treatment Act of 2019 passed after the 2019 shutdown.

https://www.congress.gov/bill/116th-congress/senate-bill/24

comment 1y ago · link · parent

I actually think that Cloudflare has made publishing on the internet _more_ accessible for many individuals. I’ve helped a few people get personal websites running on Cloudflare pages and run my own there—it’s free and extremely easy. They could obviously pull the plug at any point, but with static sites it’s easy to avoid lock-in. If it weren’t for Cloudflare and other services that give free, easy hosting, I suspect there would be even fewer of the non-commercial small-internet sites that you value.

comment 1y ago · link · parent

Hm. To me it is indeed the big bad tech companies at fault for implementing _obviously_ user-hostile functionality (mandatory suggested posts, for example) that exploit human nature to keep people engaged, even if people prefer not to. The existence and widespread use of screen time limits on phones seems like strong evidence that tech companies have built something nefarious here. And to me, it’s clear that they have done so intentionally to drive profit.

comment 1y ago · link · parent

Is it possible that the current form of social media is actually contributing to the erosion of your liberties because it is so widely used in society and is likely contributing to polarization and antisocial behavior?

I see this (and, honestly, most problems) as much more than a personal responsibility issue. To me, it’s an issue of misaligned incentives and unpriced downside costs. It’s clear that market forces push companies to build an addictive service that produces long term misery. It’s also clear that social media has a cost on its users (producing long term misery, reducing acute productivity) But this cost is not paid by the social media company.

I’d argue that widespread use of the social media that today’s market incentives create is bad for society as a whole, not only for any one individual. Correcting market incentives that don’t align with social good is, in my opinion, one of the most essential purposes of legislation.

comment 1y ago · link · parent

I think modern social media is a huge problem but don’t see we can fix it without regulation. It’s clear that all the current incentives point companies towards engagement and rage bait and away from anything actually “social”, and I think it’s unlikely that any new social network that tries to fix these issues would achieve widespread usage.

Have any countries proposed legislation to help reign it in? What would that legislation look like? My main idea is to simply outlaw ML-based recommendation algorithms, but obviously that is not as simple as it sounds and is mostly based on looking fondly on the earlier days of social media, when I felt like it was making my life better instead of worse.

comment 1y ago · link · parent

> it works for human drivers

Sure, for some definition of "works"...

https://www.iihs.org/research-areas/fatality-statistics/deta...

comment 1y ago · link · parent

Why are the socio-political stars aligned in tens of countries across Europe and Asia but not in the US, if such alignment is so rare?

I might argue that the bay area focuses on transportation technology that is flashy and gets around existing regulations because it is new, with hardly any regard at all for how it scales.

comment 1y ago · link · parent

Note that Caltrans only maintains state roads; looks like from that document that they distribute some money to localities but as far as I can tell we can't see what fraction of local road maintenance that covers. Of course localities also have parking fees, traffic tickets, etc that can help cover road maintenance.

comment 1y ago · link · parent

There are also a variety of ways that "efficiency" can be defined; your comment considers monetary efficiency, but both modes of transport have costs on society that are not considered in the numerical operating costs (pollution, opportunity cost of land use, healthcare costs due to accidents...)

comment 1y ago · link · parent

Do we have the crypto to build an asymmetric variant? The way that I’d immediately think to do it is have the authenticator create a signature over the current time (chunked into 30-second windows) and the service verify that signature, but obviously those signature texts are way too long to manually enter as a one-time code. (Symmetric) TOTP solves this length problem by just truncating the output of a hash function, which both the authenticator and the service can produce because they have a shared secret. But in the signature case the service would need the entire signature to validate it; any truncation would make it useless.

It’s been a while since I did any crypto. But it feels like the shortness of the one-time-code probably makes it impossible to do asymmetrically. If this is indeed the case there is probably an elegant proof or some better way of thinking about why it’s impossible. I would be interested in reading that.

comment 1y ago · link · parent

It depends on the phone, but for many phones the security story remains very good even when lost, unless someone knows your passcode. So it’s still “something you know” protecting the password and the TOTP code, but it’s different things that you know and strict rate-limiting on the phone side that wouldn’t be possible on an internet-exposed authentication system makes it extremely difficult to guess the phone passcode.

comment 1y ago · link · parent

Wow, great article. I love the cable car photo https://upload.wikimedia.org/wikipedia/commons/e/e0/Strip_ph...

Must be somewhat interesting deciding on the background content, too.

comment 1y ago · link · parent

That’s the tough part; it’s self-reinforcing :) both are causes and both are effects, and we’ve got to break the cycle somewhere.

But no, all of them. Low usage causes service cuts, which cause low usage because you can’t rely on transit, causes delays because there isn’t enough service to make up for failures and there isn’t enough investment for grade separation and maintenance, etc

comment 1y ago · link · parent

I agree that for in-town trips the only thing that reduces the convenience of driving is when you can't drive fast and park directly at your destination for free. But these things (traffic, parking scarcity, etc) are really common, and are often the direct result of the fact that you are trying to go somewhere interesting. They are rarely artificial costs that could be removed.

I do think anecdotes are effective here, so: from my old SF apartment I could bike or ride Muni to the office. I generally chose to bike, but both options were more convenient than driving. The speed of driving and biking were both limited mostly by traffic and traffic lights, so biking was just as fast as driving. Both the traffic and the traffic lights are necessary because other people also want to live and work in a similar place as I do. But since my office was downtown in an urban, popular area where land value is high enough that parking is not a good use of land, if I drove I would have had to park a few blocks away (for a high price) and walk. Since bike parking is so much more space efficient than car parking, I could easily park my bike in my office. Taking the train was faster than either option; if it rained I would simply take the train.

I think you are not correct that a car is a strictly better option for all tasks. I think the convenience of not having to deal with all the things that make driving difficult is extremely valuable, and I think the things that make driving difficult are unavoidable because driving scales extremely poorly.

comment 1y ago · link · parent

I think you're probably right that eventually, most people will own a car. But I think the time in your life where you decide to buy one matters substantially, and is modulated quite a lot by city design.

I'm pretty young now, and I could afford a car. I expect that I will probably buy one at some point in the future. But I can easily live my life without one for now, so I have decided to save that money instead. If I lived in Houston, I don't think that would be the case.

None of my friends that I know in NYC own cars. All of my friends that live in my hometown own cars.

comment 1y ago · link · parent

I think it's an unfortunate reality that people don't necessarily get to have exactly what they want. I don't get to live in a place where I have access to world-class high speed rail, as much as I necessarily want that.

I also think the evidence is extremely compelling that car-centric society is a problem, that driving has real external costs that we have ignored (deaths, injuries, pollution, noise, inefficient land use, high infrastructure costs) and further that our reliance on cars has been the result of subsidies that themselves tipped market forces (by government hand!).

I agree that there is a hurdle to overcome when discussing this stuff because driving is such an essential piece of many people's lives. I think there are a lot of arguments that can help convince people that there are gradual improvements that we should make that would make their lives better---I'd recommend the Strong Towns book as a good option for market-oriented people.

comment 1y ago · link · parent

No, that isn't "okay". A key part of walking- and biking-friendly infrastructure is ensuring that there are places to go (in many places it is flat out illegal to build places to go near housing!). This definitely means changing zoning and land use regulations to make distributed commerce legal, but likely means adjusting development incentives to incorporate the external costs of, e.g., people driving to a big-box store vs visiting a neighborhood grocery store.

comment 1y ago · link · parent

It'd be fairly easy to argue that all of these are due to transit being treated as second-class transportation for poor people.
123