News for hackers. Stuff that matters.

julian37

Exactly, reaching for a tool is what they're trained for. When I ask the model the square root of rand() I sure hope it tries to find bc or some other calculator to work it out.

Now, if the instructions were more explicit in forbidding (generic) tool use then perhaps we'd have something to talk about. I'm not surprised a handwavy "we're trying to evaluate you" isn't enough to stop it from trying to make up for its own shortcomings.

Re:Claude Code is locking people out for hours on Tuesday April 07, 2026 @01:21PM (#47678543)
Use planning+execution rather than one-shotting, it'll let you push back on stuff like this. I recommend brainstorming everything with https://github.com/obra/superpowers, at least to start with.

Then work on making sure the LLM has all the info it needs. In this example it sounds like perhaps your hypothetical data model would need to be better typed and/or documented.

But yeah as of today it won't pick up on smells as you do, at least not without extra skills/prompting. You'll find that comforting or annoying depending on where you stand...

Re:Show HN: A playable game of Tetris inside a PDF on Friday January 10, 2025 @11:52AM (#42657355)
Works fine here (134.0 on macOS)
kdrag0n's first post about this on HN, afaict: https://news.ycombinator.com/item?id=34100779

Amazing how far they've got since, in just two years. As others have pointed out, it's already "boring" software in that it just works. And that's no small feat because this kind of tool requires all kinds of low-level hackery to make work, and make work fast. Hats off!

(Happy user here if you couldn't tell.)

Re:Docker Performance Evaluation Across Operating Systems on Tuesday August 27, 2024 @04:22PM (#41372542)
You mean what Docker for Desktop can't do? It does have a few unique features (for example automatic HTTPS for containers) but that's not the point. The point is that it's much faster, the fan runs quieter, the battery drains less, memory gets hogged less, it crashes less, the UI is smoother, the updates actually work, and it keeps improving at a steady pace. The fundamentals just work a lot better.
Re:Docker Performance Evaluation Across Operating Systems on Tuesday August 27, 2024 @04:08PM (#41372377)
OrbStack is where it's at on macOS these days. It's so much better than Docker Desktop, it's not even funny. It's in a whole different league.

I'd take this article with a grain of salt when it doesn't even mention it, or any of the other alternatives.

Re:Why, after 6 years, I'm over GraphQL on Thursday May 30, 2024 @06:25AM (#40522073)
Re:What if an SQL statement returned a database? on Monday December 11, 2023 @06:11PM (#38606774)
Right, but fetching rows along with a bunch of related rows from other tables isn't niche, it's literally the _raison d'etre_ of GraphQL (simplifying a bit because GraphQL types don't necessarily map onto db tables.)

It's something lots of apps need all the time.

Re:Minify and Gzip (2022) on Monday July 17, 2023 @07:01AM (#36756475)
Closure Compiler follows the same line of thinking:

https://github.com/google/closure-compiler/wiki/FAQ#closure-...

Reminds me of Hand Cheese (Handkäse), a regional specialty popular around the Frankfurt area. It's delicious, quite pungent but with a deep flavor. It gets its name because it was traditionally formed by hand (from Quark, a harmless dairy product similar to cottage cheese). Around these parts one can expect clean hands as well, so there really is nothing untoward about the final product -- except perhaps for its name. Give it a try if you happen to be passing through!
Re:1Password to Add Telemetry on Monday April 24, 2023 @05:17PM (#35693400)
Surely the UI code is what responds to clicking "reveal" and therefore, if compromised, could fetch the secret even without a click?
Re:Pg_jsonschema – JSON Schema Support for Postgres on Wednesday March 22, 2023 @09:29AM (#35260702)
I've found that this PL/pgSQL implementation also works well when you don't need maximum performance:

https://github.com/gavinwahl/postgres-json-schema

Re:AI Found a Bug in My Code on Thursday November 17, 2022 @07:46AM (#33638138)
That's hardly a convincing example. All of these points can be solved elegantly with a stream abstraction, which can be cheap or free given a sufficiently advanced language and compiler.

As for legal or policy reasons, those still aren't reasons to write boilerplate code. Your reimplementation can be tight and reuse other abstractions or include their own.

Re:Overzealous Destructuring on Friday October 07, 2022 @11:17PM (#33129507)
All of the examples show a single use but the value of destructuring becomes more obvious when you look at an example with multiple uses. Take this variant of one example:

const Component = (props) => { funcA(props.a.deeply.nested.variable); funcB(); funcC(props.a.deeply.nested.variable); };

Depending on what the functions are doing, neither the VM nor tsc might be able to infer that variable's value stays the same or that props, props.a, props.a.deeply, or props.a.deeply.nested will stay the same for that matter.

The VM will likely have to generate code to dereference the chain all over for the second use, and the compiler might lose narrowing information. Both of these can easily be avoided with destructuring.

(You could use "const variable = props.a.deeply.nested.variable", but then you have many of the same issues the article complains about.)

Re:Coping with Copilot on Saturday August 20, 2022 @08:08PM (#32536246)
Agreed about saturation and the choice of variable name, but the code would trigger a division by zero and not result in NaN: https://go.dev/play/p/vYm4tSNEJ7M

(Also, in--say--Ruby and JavaScript 1.0/0.0 is Infinity and not NaN.)

Re:Coping with Copilot on Saturday August 20, 2022 @04:31PM (#32534956)
This is a good example of why I dread Copilot: even if Go specifically couldn't express this any more concisely, there is a language that can and Copilot's very existence makes it less likely for that other language to be used as much as it deserves.

Besides, the generated example seems to be missing code to gracefully handle the case where len(filtered) is zero. Maybe there's a precondition that prevents that from happening or maybe a division by zero is exactly what you'd want, but at face value it looks like the bot did a rush job.

Reminds me of Cargolifter, they tried something less ambitious and failed... but that was 20 years ago, at the very height of the dot com boom. Better luck to the Pathfinder 3 team! It would be amazing to see airships revived.

https://en.wikipedia.org/wiki/Cargolifter

Re:Advanced techniques for reducing Emacs startup time on Monday May 16, 2022 @04:17AM (#31394633)
Came here to say this. I'm starting Emacs only after a reboot, who cares if it takes 3s or 30s to launch (mine around 5 or so.)

Use emacsclient if you want to use it as $EDITOR.

https://emacsredux.com/blog/2014/12/23/uptime/

You work with crypto according to your profile. I hope that when you see a random generator return a series of a hundred 6s, you go and check what's wrong with it instead of assuming you just got lucky this time ;-)
If you follow the link, it says Americans spend that amount of time daily with "major media", and no mention of news only. So that would presumably include reading/watching fiction, listening to music etc.?

> included are digital (online on desktop and laptop computers, mobile nonvoice and other connected devices), TV, radio, print (offline reading only), newspapers, magazines, radio, and television

Pretty big blunder in an article about media trustworthiness if you ask me.

Re:What Was the Ted Talk? on Monday February 07, 2022 @05:04AM (#30242615)
It can be both: that the teacher helped a _gifted_ boy grow into the author we know now, and the boy wouldn't have become the author we know now without them.

Just because their other pupils didn't turn out to be legendary doesn't invalidate the teacher's contribution, which is to say, doesn't mean the joke was in good taste.

I came here wondering the same thing.

A random google search turned up this: https://www.birdwatchingdaily.com/news/science/five-bird-spe...

> Researchers have learned that digestive tracts of long-distance migrants work overtime prior to migration. Food intake is increased, and the food is metabolized and stored as fat, which serves as the birds’ flight fuel. Bar-tailed Godwits store fat until it makes up about one half their weight. Then the digestive system shuts down so metabolic energy can be maximized for muscle use.

Astounding.

Re:Bonhoeffer on Stupidity on Saturday October 16, 2021 @02:15PM (#28890036)
Brecht had a whimsical take on this. There's a German saying that goes "wer A sagt, muss auch B sagen": he who says A, has to say B, meaning of course you should always try and follow through.

Brecht wrote "Wer a sagt, der muß nicht b sagen. Er kann auch erkennen, daß a falsch war": he who says A, doesn't have to say B. He can also realize that A was wrong.

https://beruhmte-zitate.de/zitate/126572-bertolt-brecht-wer-...

Re:Freqfs: In-memory filesystem cache for Rust on Friday October 01, 2021 @05:35PM (#28723643)
You can do mmap on Windows, eg. https://github.com/danburkert/memmap-rs
Fantastic news. Does anyone know if there is a UI for it? I know this was discussed in the Dec 2019 thread but that's a while ago now.
You can have a global package cache today with Berry (Yarn 2/3) although there are still a few tools (say, serverless package) that break without node_modules where they expect it to be. It's gotten a lot better though over the last few months.
Re:Zero-downtime schema migrations in Postgres using views on Wednesday June 16, 2021 @05:02PM (#27533434)
This might work to some extent for renaming things but doesn't for any other kind of migration I can think of:

- Dropping a column doesn't work (assuming the point of dropping it is actual deletion, rather than just hiding it)

- Adding a column doesn't work either

- Changing a column's nullability, default value, or data type doesn't work

- Doesn't help with adding or changing constraints or indexes

Re:The history of UTF-8 as told by Rob Pike (2003) on Thursday April 08, 2021 @06:41AM (#26737189)
UTF-8 is just... so well designed.

One little feature I like in particular is that if you're looking for an ASCII-7 character in a UTF-8 stream -- say, a LF or comma -- you don't have to decode the stream first because all bytes in the encoding of non-ASCII-7 characters have the high bit set. Or as Wikipedia puts it:

> Since ASCII bytes do not occur when encoding non-ASCII code points into UTF-8, UTF-8 is safe to use within most programming and document languages that interpret certain ASCII characters in a special way, such as / (slash) in filenames, \ (backslash) in escape sequences, and % in printf.

It's amazing to hear they put it together in one night at a diner! :-D

Re:Why Is Esbuild Fast? on Tuesday February 16, 2021 @02:22PM (#26157676)
> Every time you run your bundler, the JavaScript VM is seeing your bundler's code for the first time without any optimization hints.

Not necessarily so: https://v8.dev/blog/code-caching

Older »