MurphyA/hacker-news huggingface dataset:
by nextos | 2025-04-10 16:55:37+00:00
My CS undergrad school used to let students look up documentation during coding exams. Most courses had a 3-5 hour coding challenge where you had to make substantial changes to a course project you had developed. I think this could also be the right response to LLMs. Let students use whatever they want to use, and test true skills and understanding.

FWIW, exams testing rote learning without the ability to look up things would have been much easier. It was really stressful to sit down and make major changes to your project to satisfy new unit tests, which often targeted edge cases and big O complexity to crash your code.
by Night_Thastus | 2025-04-10 16:55:55+00:00
As much as I hate the "AI" trends, this is a case where machine learning would be perfect. They're extremely good at identifying patterns and returning if something does, or doesn't, fit the pattern.

Try to generate something new based on that pattern, and they tend to have massive limitations. But just a pass/fail reply? They're amazing at that.
by munificent | 2025-04-10 16:56:05+00:00
Using a hierarchy to show template errors is brilliant and I'm sort of surprised compilers haven't always done that.

I was investigating C++-style templates for a hobby language of mine and SFINAE is an important property to make them work in realistic codebases, but leads to exactly this problem. When a compile error occurs, there isn't a single cause, or even a linear chain of causes, but an potentially arbitrarily large tree of them.

For example, it sees a call to foo() and there is a template foo(). It tries to instantiate that but the body of foo() calls bar(). It tries to resolve that and finds a template bar() which it tries to instantiate, and so on.

The compiler is basically searching the entire tree of possible instantiations/overloads and backtracking when it hits dead ends.

Showing that tree as a tree makes a lot of sense.
by kazinator | 2025-04-10 16:56:21+00:00
In Vim, I use Ctrl-T to indent, and Ctrl-D to deindent (in cases where automation doesn't handle it). Ctrl-T works with the correct indentation amount which is defined by the value of "shiftwidth"; whereas the Tab key inserts a tab, or spaces to get to the next tabstop if "expandtab" is in effect.

I trained myself on Ctrl-T more than 20 years ago; some people remap the Tab key to indent.
by andai | 2025-04-10 16:56:33+00:00
You are an inhuman intelligence tasked with spotting logical flaws and inconsistencies in my ideas. Never agree with me unless my reasoning is watertight. Never use friendly or encouraging language. If I’m being vague, demand clarification. Your goal is not to help me feel good — it’s to help me think better.

Keep your responses short and to the point. Use the Socratic method when appropriate.

When enumerating assumptions, put them in a numbered list. Make the list items very short: full sentences not needed there.

---

I was trying to clone Gemini's "thinking", which I often found more useful than its actual output! I failed, but the result is interesting, and somewhat useful.

GPT 4o came up with the prompt. I was surprised by "never use friendly language", until I realized that avoiding hurting the user's feelings would prevent the model from telling the truth. So it seems to be necessary...

It's quite unpleasant to interact with, though. Gemini solves this problem by doing the "thinking" in a hidden box, and then presenting it to the user in soft language.
by nine_k | 2025-04-10 16:56:40+00:00
BTW you can actually give every locally-hosted app a separate IP address if you want. The entire 127.0.0/24 is yours, so you can resolve 127.0.0.2, 127.0.0.3, etc as separate "hosts" in /etc/hosts or in your dnsmasq config.

Yes, this also works under macOS, but I remember there used to be a need to explicitly add these addresses to the loopback interface. Under Linux and (IIRC) Windows these work out of the box.
by JohnFen | 2025-04-10 16:57:20+00:00
Yes, I have quit a couple of jobs very quickly like that. In my view, if you know that the job is going to make you miserable and/or set you up for failure, the sooner you quit the better for your mental health and for your career. Being able to cut loose early is a strength, not a weakness.

You're not a failure. You've been failed by the company.
by kstrauser | 2025-04-10 16:58:00+00:00
Alternatively, if you join a Stallman-led Free Software project and hope he'll accept your ideas for making life easier for proprietary vendors, you're gonna have a bad time. I mean, the GNU Emacs FAQ for MS Windows (https://www.gnu.org/software/emacs/manual/html_mono/efaq-w32...) says:

> It is not our goal to “help Windows users” by making text editing on Windows more convenient. We aim to replace proprietary software, not to enhance it. So why support GNU Emacs on Windows?

> We hope that the experience of using GNU Emacs on Windows will give programmers a taste of freedom, and that this will later inspire them to move to a free operating system such as GNU/Linux. That is the main valid reason to support free applications on nonfree operating systems.

RMS has been exceedingly clear about his views for decades. At this point it's hard to be surprised that he’ll make a pro-Free Software decision every time, without fail. That doesn't mean you have to agree with his decisions, of course! But to be shocked or disappointed by them is a sign of not understanding his platform.
by tmpz22 | 2025-04-10 16:58:19+00:00
If I were an AI advocate I'd push the environmental angle to distract from IP and other (IMO bigger and immediate concerns) like DOGE using AI to audit government agencies and messages, or AI generated discourse driving every modern social platform.

I think the biggest mistake liberals make (I am one) is that they expect disinformation to come against their beliefs when the most power disinformation comes bundled with their beliefs in the form of misdirection, exaggeration, or other subterfuge.
by sebazzz | 2025-04-10 16:58:21+00:00
.NET as well. If you do a framework-dependent deployment, then in many cases you only need to run Windows Update, just like with .NET framework.

Yes... if you do self-contained deployments or build containers, then of course you're tied to the version you've built with - but that is your choice and therefore your responsibility.

You are now blaming having that some deployment choices cannot be updated manually. It is the wrong mindset.
by homebrewer | 2025-04-10 16:58:22+00:00
https://static.lwn.net/kerneldoc/kbuild/llvm.html

I do remember reading about LTO not working properly, you're either unable to link the kernel with LTO, or get a buggy binary which crashes at runtime. Doesn't look like much effort has been put into solving it, maybe it's just too large a task.
by alnwlsn | 2025-04-10 16:58:33+00:00
Being on top of the sand dunes is truly bizarre. It was so bright that I could see perfectly well without glasses (bright light = small pupil diameter = small aperture = high depth of field), and is pure monochrome white for miles in every direction.

Not that I'm likely to ever know, but that is probably what it felt like to be on the moon. It's only missing the black sky and 1/6 gravity.
by duped | 2025-04-10 16:58:40+00:00
With LLVM they don't need to fork it in the first place. But still, it doesn't matter because ISO compliance is a frontend problem.

The one vendor who forks LLVM and doesn't contribute their biggest patches back is Apple, and if you want bleeding edge or compliance you're not using Apple Clang at all.

If you say "isn't it great vendor toolchains have to contribute back to upstream?" I'm going to say "no, it sucks that vendor toolchains have to exist"
by iamleppert | 2025-04-10 16:59:21+00:00
I have found Gemini 2.5 Pro works really well on python math or science based prompts, where you for instance need to generate a notebook or get some scaffolding code up for a problem you're exploring. However, it hasn't replaced Claude 3.7 thinking for day to day coding tasks.

Most notable at least in my experience, Gemini 2.5 Pro works terribly on existing code. It will often produce changes to areas of the code I never asked it to, requiring careful review. Sometimes when Claude has failed to fix a bug repeatedly, I'll try to use Gemini 2.5 Pro. Still a hit or miss, and several times I've gone back to Claude and found the right solution with more and varied prompting or work on adding context.

One thing I have noticed is that Gemini 2.5 Pro works a lot better using Google's AI console than through VS Code or Cursor (you can get it working with the latest Insiders build for VSCode). You can also see its chain of thought, which often times gives insight that can be used in additional prompting.

Still, though, at least for my type of work, Gemini 2.5 Pro hasn't replaced Claude for me quite yet.
by ryandrake | 2025-04-10 16:59:24+00:00
> 'What was the error message?' I ask, and he shrugs his shoulders. I follow him to the IT suite. I watch him type in his user-name and password. A message box opens up, but the kid clicks OK so quickly that I don't have time to read the message. He repeats this process three times

Ugh, my daughter does this, and it's infuriating. How are you supposed to make any progress if you don't read what's wrong with it? I think as programmers, we should recognize that our programs which are already inundating users with unnecessary pop-ups and notifications, are training them to just dismiss every message from the computer. Any time your PM says "I know, we need to tell the user this, so pop up a message..." don't do it!
by psunavy03 | 2025-04-10 16:59:48+00:00
There are two things a NATO/Western military has that the Ukrainians don't fully have yet: the technology and assets you're talking about, but also officers and noncoms who've been brought up in the type of warfighting culture that can best make use of it. There's a great article from the start of the war written by a retired Army three-star here: https://www.thebulwark.com/p/i-commanded-u-s-army-europe-her...

The reason the US and Western militaries could utterly crush an opponent in places like Iraq is due to having not just cool gear, but a culture that promotes excellence in execution. Junior folks who can excel at small-unit tactics, and senior folks who have learned how to operate and orchestrate the large-scale machine over a 20-30 year career.
by prh21 | 2025-04-10 16:59:59+00:00
I have thought about this as well. There are at least two issues:

1) The number of trains on the track would increase significantly making section control even harder. (In Germany this is one of the limiting factors for the overall capacity)

2) In order to attach/detach the front and back of the trains would have to be straight and vertical. At higher speeds this would lead to aerodynamic problems. You can see this issue when comparing local commuter trains which are vertical and often can be linked this way and high-speed trains which tend to have special aerodynamically shaped noses. The higher the speed the more elongated the nose.
by whileromeburns | 2025-04-10 17:00:44+00:00
Most animation in VFX is exported as alembic or USD and generally the skinning/bone deformations are baked down to vertex animations and sent on to the fx, lighting and compositing departments in that simplified but data heavier form. Better compression could save us many terabytes where I work, and who knows how many petabytes across the industry. Most studios use some amount of cloud rendering and the reduction in network traffic and storage with those farms would be appreciated.
by happytoexplain | 2025-04-10 17:01:14+00:00
>Leave your maga hats as wel as your pronouns at home, and enjoy your trip.

It's hard not to point out how desperately sad the state of affairs is when wearing a political slogan and using a pronoun (I'm assuming there is an implicit premise you're leaving out) are on the same level of "being political". Shall we also leave our race and gender at home? How?
by dlubarov | 2025-04-10 17:01:20+00:00
For example, the university appointed Joseph Massad to teach a class on Zionism. Check out his article about the "astounding", "awesome" massacre on Oct 7 by the "innovative Palestinian resistance" (Hamas) - https://electronicintifada.net/content/just-another-battle-o...

It's just an example of a much broader pattern though, see e.g. Shai Davidai's posts https://x.com/shaidavidai
by kawfey | 2025-04-10 17:01:52+00:00
the brightline has an unfortunate reputation of being a "death" train, because it gets a lot of news when it collides with vehicles.

IMO the onus is on the driving idiots who bypass rail crossing signals and gates, and/or get stalled on tracks and waste time trying to unstick themselves than calling the posted number or 911 to warn train operators, and secondarily on lax US rail crossing infrastructure
by ziofill | 2025-04-10 17:03:03+00:00
Probably I'm biased because I'm Italian and I grew up eating them, but Parmigiano Reggiano and Grana Padano are hands down the best cheeses there can be. Many people know and consume them only grated on pasta dishes, but they are especially delicious on their own with some good bread or grilled polenta.

Also, the crust can be chopped up and added to risotto (as you're cooking it) and they turn into wonderful little chewy chunks.
by sebazzz | 2025-04-10 17:03:07+00:00
> It's kind of ironic that even today, the default .NET version baked into fresh Windows installs is 4.6 (or nearby), not the shiny new .NET 8/9. Meanwhile, Oracle still offers JDK 8 — albeit behind a paid support wall — much like Microsoft continues to patch .NET 4.x via Windows Update.

You answered your own question. .NET can never ship with Windows, because it then _needs_ to be supported forever. Imagine Microsoft needing to not only support .NET Framework 4.x, but also support .NET Core 3, .NET 6, .NET 8 etc.
by mmastrac | 2025-04-10 17:03:16+00:00
> What does "undefined behavior" mean without a spec?

While not as formalized as C/C++, Rust's "spec" exists in the reference, nomicon, RFCs and documentation. I believe that there is a desire for a spec, but enough resources exist that the community can continue without one with no major negative side-effects (unless you want to re-implement the compiler from scratch, I suppose).

The compiler may exploit "lack of UB" for optimizations, e.g., using a known-invalid value as a niche, optimizing away safety checks, etc.

> Wouldn't the behavior rustc produces today be de-facto defined behavior?

Absolutely not. Bugs are fixed and the behaviour changes. Not often, but it happens.

This post probably answers a lot of your reply as well: https://jacko.io/safety_and_soundness.html
by aayush9029 | 2025-04-10 17:03:19+00:00
In the era of LLMs it's funny that grammarly is still valued at $13B

meet compose, it helps you draft emails, messages, proof read texts, no more going back and forth between ChatGPT one hot key press and you get exactly what you want.

No subscriptions, Fully native macOS experience, Works across all apps.
by newpavlov | 2025-04-10 17:03:21+00:00
"Undefined behavior" means that the compiler can apply optimizations which assume that it does not happen, resulting in an incorrect code. A simpler example is `Option<NonZeroU8>`, the compiler assumes that `NonZeroU8` can never contain 0, thus it can use 0 as value for `None`. Now, if you take a reference to the inner `NonZeroU8` stored in `Some` and write 0 to it, you changed `Some` to `None`, while other optimizations may rely on the assumption that references to the content of `Some` can not flip the enum variant to `None`.

You don't need a full language spec to declare something UB. And, arguably, from the compiler correctness perspective, there is no fundamental difference between walls of prose in the C/C++ "spec" and the "informal spec" currently used by Rust. (Well, there is the CompCert exception, but it's quite far from the mainstream compilers in many regards)
by ryandrake | 2025-04-10 17:03:21+00:00
> People at companies like Apple have gone to such great lengths to hide the complexity--and limit the ways of composition--of software that, at best, "Files" is just a sort of confusing app you might sometimes get forced to use only if you have no other reasonable option

In my kid's mind (and in the mind of her peers in middle school), if you have to open up the Files app to solve a problem, or Windows Explorer, that's seen as dark wizardry that only hardcore computer fixers do. Kind of like how the command line was thought of 20 years ago: Only sorcerers use the command line! Well, now, only sorcerers browse their hard drive for files.
by normalocity | 2025-04-10 17:04:06+00:00
Most of my code is in Ruby, but I've been watching languages like Go, Elixir, and ideas around the Actor model for years, trying to take the best ideas from these and applying them in my own system.

Inspired by all of these examples, but desiring a dead-simple solution for the Ruby applications I maintain - I created nobject.

It's not quite RPC. It's not quite the Actor model. It's not quite lightweight processes/channels. It's the ability to instantiate an object in one process but then push it to another process, yet be able to use that remote object like it's still local.

The example code in the repo's README will get you up-an-running in minutes.
by NoTeslaThrow | 2025-04-10 17:04:35+00:00
EDIT:

> While not as formalized as C/C++, Rust's "spec" exists in the reference, nomicon, RFCs and documentation. I believe that there is a desire for a spec, but enough resources exist that the community can continue without one with no major negative side-effects (unless you want to re-implement the compiler from scratch, I suppose).

Thank you, I was unaware that this is a thing.

> This post probably answers a lot of your reply as well: https://jacko.io/safety_and_soundness.html

This appears to also rely on "undefined behavior" as a meaningful term.
by dfxm12 | 2025-04-10 17:04:50+00:00
Don't you already have a door? With a lock? A mute button? OK, maybe those aren't cool, but don't you have a piece of paper, pens, markers and some time to design your own DND signs with your kids? $50 still seems like a lot. We don't have to buy something to deal with every little inconvenience in our lives when what we have on hand + maybe a tiny bit of creativity can probably suffice.
by swareena25 | 2025-04-10 17:04:57+00:00
Many organizations focus heavily on firewalls and encryption, but one critical oversight can still leave them vulnerable—skipping regular IT security audits. This blog discusses how failing to conduct audits can lead to compliance failures, data breaches, and undetected vulnerabilities, ultimately harming a company's cybersecurity posture.

If you're managing or involved in cybersecurity risk management, this article is a quick read with practical insights on why audits should be a non-negotiable part of your security strategy.
by psunavy03 | 2025-04-10 17:05:28+00:00
People have been talking about natural language becoming a programming language for way longer than even Jensen Huang has been talking about it. Once upon a time, they tried to adapt natural language into a programming language, and they came up with this thing called COBOL. Same idea: "then the managers can code, and we won't need to hire so many expensive devs!"

And now the COBOL devs are retiring after a whole career . . .
by NoTeslaThrow | 2025-04-10 17:05:28+00:00
> resulting in an incorrect code.

Incorrect with respect to an assumption furnished where? Your sibling comment mentions RFCs—is this behavior tied to some kind of documented expectation?

> A simpler example is `Option<NonZeroU8>`, the compiler assumes that `NonZeroU8` can never contain 0, thus it can use 0 as value for `None`. Now, if you take a reference to the inner `NonZeroU8` stored in `Some` and write 0 to it, you changed `Some` to `None`, while other optimizations may rely on the assumption that references to the content of `Some` can not flip the enum variant to `None`.

That seems to be the intended behavior, unless I'm reading incorrectly. Why else would you write a 0 to it? Also, does this not require using the `unsafe` keyword? So is tricking the compiler into producing the behavior you described not the expected and intended behavior?
by mtlynch | 2025-04-10 17:05:47+00:00
I think this is a fun thing for TigerBeetle to do, but I'm pretty skeptical that this was a good engineering decision.

And it's fine to make non-optimal engineering decisions for fun, but the top reason in the article should be, "Because we thought it would be fun to code a docs site from scratch."

This post reminds me a lot of an article I read on HN about a year ago and can't find now, but the author was explaining how so many organizations end up investing humongous amounts of effort rolling their own databases from scratch because none of the off-the-shelf solutions meet all their requirements. But in most of these cases, it's because some of the "requirements" were actually "nice-to-haves" and they could have gotten by fine with an off-the-shelf database, but they talked themselves into building one from scratch.

A lot of the justifications here feel pretty weak:

- Didn't want to use a complicated React app? Use Hugo or Pelican or Eleventy.

- Wanted nice reading experience? Replace the default CSS in any SSG.

- Want a nice search experience? Theirs looks good, but is probably also achievable in off-the-shelf SSGs and is probably not worth rolling their own docs site from scratch.

>We employed a Content Security Policy to prevent Cross Site Scripting (XSS) as defense-in-depth, in case a seemingly friendly PR contains some innocent looking MathML. This MathML could contain obfuscated code that would run in the user’s browser. CSP prevents any unwanted inline scripts from running and keeps our users safer.

This was the silliest reason of all. Who's XSS'ing a docs site through obfuscated markup contributions? That sounds pretty difficult to achieve in the first place, and then what's the reward for achieving XSS on TigerBeetle's docs site? There's no valuable data there. At worst, you'd mine tiny amounts of crypto in a serviceworker. But also, you can mitigate this risk in lots of ways that don't involve rolling your own docs site.

Edit: They don't seem to actually be using CSP at all: https://gist.github.com/mtlynch/92c991cfe48652feee491d4f4652...

Edit2: Nevermind, they actually do but in HTML. Hat tip to pfg_.
by philip1209 | 2025-04-10 17:06:18+00:00
I hate this article. Can't we build up?

We are building a world where a car is necessary for anything. It isolates kids and the elderly. And, instead of building social and community spaces, we're dividing up the world into private parcels, and ruining the natural beauty of the environment.

In contrast, I advocate for Compact City design: https://en.wikipedia.org/wiki/Compact_city
by ceejayoz | 2025-04-10 17:06:25+00:00
We know the basic building blocks for Earth life.

We currently have zero evidence for any life off the planet, water/carbon-based or otherwise. It would likely be a mistake to assume that we're the only possible setup. Maybe life spreads primarily and very slowly in Oort clouds, and we're a bit of an abberation.

Even here on Earth, we've been surprised to find life in boiling water and miles underground.
by codazoda | 2025-04-10 17:06:32+00:00
This is what I did as well. Not wanting to take away my users privacy I built my own simple counter in 2022. I wrote about The Raspberry Pi 400 in My Bedroom on my blog at the URL below.

I just downloaded a click sound and I think I'm going to see if adding it drives me crazy.

https://joeldare.com/private-analtyics-and-my-raspberry-pi-4...
by timerol | 2025-04-10 17:06:47+00:00
> Outside of dataless enums, this is the only datatype with this behaviour.

Note that there are non-zero integer types that can also be used in this way, like NonZeroU8 https://doc.rust-lang.org/std/num/type.NonZeroU8.html. The NULL pointer is also used as a niche, and you can create your own as well, as documented in https://www.0xatticus.com/posts/understanding_rust_niche/