skysight-inc/HackerNews huggingface dataset:
Using #[from] in a thiserror enum is an antipattern, IMO. I kind of wish it wasn't included at all because it leads people to this design pattern where errors are just propagated upwards without any type differentiation or additional context.

You can absolutely have two different enum variants from the same source type. It would look something like:

#[derive(Debug, Error)]
pub(crate) enum MyErrorType {
#[error("failed to create staging directory at {}", path.display())]
CreateStagingDirectory{
source: std::io::Error,
path: std::path::PathBuf,
},

#[error("failed to copy files to staging directory")]
CopyFiles{
source: std::io::Error,
}
}

This does mean that you need to manually specify which error variant you are returning rather than just using ?:

create_dir(path).map_err(|err| MyErrorType::CreateStagingDirectory {
source: err, path: path.clone()
})?;

but I would argue that that is the entire point of defining a specific error type. If you don't care about the context and only that an io::Error occurred, then just return that directly or use a type-erased error.
> You're not liable for fraud

No, but you're still paying for it.

Let's say you're a small EU-based merchant accepting payment for international orders via Stripe. An incoming iDEAL payment costs €0.30 / transaction. An incoming credit card payment? €0.25 / transaction, plus 2.5% of the transaction value. On top of that, you as merchant are charged €20 for every chargeback! And those additional costs are of course passed on to the customers because they will raise all prices by 2.5% to make up for it.

There is no free lunch. You are implicitly buying fraud insurance on every order and paying 2.5% for it.
Here's how to do it with ffmpeg and ImageMagick:

ffmpeg -i input.mp4 -vf "scale=1:ih" frames_%04d.png

magick montage -mode concatenate -tile x1 frames_*.png "output.png"
I think "single HTML file" sets up a certain expectation that a five-thousand-line long HTML file with ~3500 lines of embedded JS doesn't really live up to. I mean, hey, everything can be a single HTML file if you embed the bundle inline in your HTML!

Cool project, though - don't mean to take away anything from it.
I think this title might be just a little on the pretentious side.
Yes. The overwhelming majority of gun violence are suicides, so real data is a great proxy for things that are harder to track.
I think the converse(?) to this though is that the words public static are inconsequential.

Sure, if you are incapable of learning what a couple adjectives mean you won't go far, but that holds for much more than software.

Rather it's not important that the ball is big and blue so much as that you can kick it across the field - learning what the ball means can come later, but it's just unimportant noise (to start).

Java is pretty bad at this, though, insisting on specifying unimportant details up front rather than allowing for qualification. This is OK for a large monolithic application with complex requirements and a litany of edge cases, but inappropriate for many smaller use cases.
The problem isn't that we fail to apply the same rules for software development in safety-critical and non-safety-critical contexts. The problem is that we do apply the same software in both contexts.

Gatekeeping the entire industry isn't the answer unless you want to cripple it... but if someone wanted to issue regulations along the lines of "Don't steer your nuclear-powered aircraft carrier with a Windows app," I wouldn't object to that.
Lightweight Safety Classification Using Pruned Language Models
Layer Enhanced Classification (LEC) is a novel technique that outperforms current industry leaders like GPT-4o, LlamaGuards 1 and 8B, and deBERTa v3 Prompt Injection v2 for content safety and prompt injection tasks.

We prove that the intermediate hidden layers in transformers are robust feature extractors for text classification.

On content safety, LEC models achieved a 0.96 F1 score vs GPT-4o's 0.82 and Llama Guard 8B's 0.71.The LEC models were able to outperform the other models with only 15 training examples for binary classification and 50 examples for multi-class classification across 66 categories.

On prompt injection,LEC models achieved a 0.98 F1 score vs GPT-4o's 0.92 and deBERTa v3 Prompt Injection v2's 0.73. LEC models were able to outperform deBERTa with only 5 training examples and GPT-4o with only 55 training examples.

Read the full paper and our approach here: https://arxiv.org/abs/2412.13435
Yeah, this is why I picked Dvorak: it seems there are better layouts but Dvorak picks up the greater part of available improvement, and it's more generally available.
Looks great, thanks for training this!

- Can I fine tune it with SentenceTransformers?
- I see ColBERT in the benchmarks, is there an answerai-colbert-small-v2 coming soon?
Indexing Code at Scale with Glean
> The vast majority of Americans deserve more money.

This is pedantic but I strongly dislike when people say anyone deserves anything.

I support an equitable system that allows citizens to move up in economic class (which we don't currently have) but I don't subscribe to the idea that everyone inherently deserves anything.
Progress indicator spins forever. Console:

webgpu-sponza-demo/:1 No available adapters.
index-BeB41sTJ.js:2288 Uncaught (in promise) TypeError:
Cannot read properties of null (reading 'requestDevice')
at yn.initialize (index-BeB41sTJ.js:2288:13559)
at async index-BeB41sTJ.js:2288:13792

Newest Chrome on Win11.
”Society” does not treat financial ”services” in any particular way.

The owner class just treats their hackers of the financial system just as bad as they treat any other workers.
Even better, rats actually enjoy driving tiny cars (https://www.livescience.com/health/neuroscience/neuroscienti...).
Correct according to the mechanism our constitution defines for resolving disputes about the interpretation of law: the judgement of the court system. A judgement which they were not allowed to make under Cheveron, because they were limited to evaluating the reasonableness of the agency's own personal interpretation.
>Can you think of any other languages?

Yes. E.g. every language where you can pass pointers can do this. Reference are a construct around pointers.

>Of the ones I listed, I use all of, and am continuously frustrated by this limitation.

Why? This is only a limitation for a few basic types. All the language you mention allow you to modify objects passed to a function.

If it ever were any issue though you can always return the modified object and overwrite the original.

a = modify(a)

works even if you can only pass a value.

In practice this should never be a limitation, certainly I have never encountered it as one.
WebGPU still isn't enabled in Firefox by default (it's behind the dom.webgpu.enabled flag)
If we can get fully autonomous public transit by driving slower, but it eliminates traffic, I think that is an absolute win.
Protecting yourselves from what?
Cool but WebGPU is taking a long time to get to several platforms.
Hey! Nice writeup,
Just something is missing, some MPEG formats can encode this kind of video in OMAF specification.

Edit: I'll certainly read the rest of the articles!
> "Lines of Code are Not a Measure of Productivity in an Isolated, Toy Example"

Calling this phenomenon a toy example is a bit out of touch. I've seen this every single day of my 25 year career. Value is produced by solving problems, not writing code. The solution with fewer lines of code, fewer new abstractions, lower complexity (yes, complexity IS objective and quantifiable) is invariably the best solution. Solutions that involve no code at all are the gold standard.

Adding/subtracting the right code produces value. But adding the wrong code decreases value. The logic of "productivity as code" contains a fatal flaw - it ignores this and assumes all code is right. Reality: everything hinges on the right vs wrong distinction which is inherently subjective. Code is too often a net liability - you must account for the risk!

By contrast, the "productivity as solving problems" approach is entirely objective. You can observe the problem, test hypotheses about the cause, and measure the situation after the intervention. A well stated problem has no ambiguity.

I don't see any support whatsover for the "productivity as code" idea. It's empirically false and lacks logical consistency.
Canada is not making any sort of progress towards becoming a tech hub. Canadian engineers' dream is to work for a US company. Canadian investment landscape is just sad, but that's a different conversation all together.
Searching HN comments is probably easiest done through Algolia:

https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...
This is pretty naive, tbh. Interoception varies between people, as does availability of food, vulnerability to addiction, education, etc.

It's like telling people with depression to not feel sad. There exist chemical, hormonal, and biological drives that vary wildly between humans.
Elixir 1.18 Released
> today as well

To be fair it’s hard to reconcile with them being paid relatively high wages due to manpower shortages (since they are generally reluctant to send conscripts into Ukraine).
I just want to say that your analysis is great. I reference it whenever the discussion comes up about the technicalities of Apples solution.
If the retail division of Amazon barely makes any money, why hasn't it been cut or spun off so that the company can concentrate on the things that it is really good at and are more profitable?
Just get a panking pole already!
> We heard this same argument about automation in food service.

Have you been to a fast food joint lately? Even at peak traffic they have maybe three people working when they used to have 7-10. Now you walk in and you have to order from the kiosk, which is literally the iPhone app on a vertical touch screen. You don't even talk to a human until they hand you the food.
I saw Russians depicted as drinking brake fluid in Beast of War and couldn't believe it. A few searches proved it true!

Here's an excerpt from "Inside the Soviet Army in Afghanistan" by Alexander Alexiev (US Army document):

You cannot imagine what they drink. They will drink shaving lotions and cologne. That's good stuff. Then they will drink toothpaste. The best one is the Bulgarian Pomorin brand. They will simply squeeze four or five tubes in a jar, dilute it with water and drink it. They also drank truck antifreeze, glue, and brake fluid. The brake fluid they used to heat up and put some nails in it for some reason. I don't know why. They will also take shoe polish and smear it on a piece of bread and leave it in the sun until the alcohol separates from the shoe polish. Then you eat the bread and get drunk.
I would say that consequences are exactly the modification of weights and biases when models make a mistake.

How many of us take a Machiavellian approach to calculate the combined chance of getting caught and the punishment if we are, instead of just going with gut feelings based on our internalised model from a lifetime of experience? Some, but not most of us.

What we get from natural selection is instinct, which I think includes what smiles look like, but that's just a fast way to get feedback.
Like, it IS higher or it SHOULD be higher?
During COVID, farmers were killing pigs with steam. Imagine being steamed alive. Animal industry is cruel beyond most people's imagination. Anything to lessen that cruelty is good, very good.

We aren't gonna reduce our meat consumption, the least we could do is lessen their suffering

https://www.humanesociety.org/blog/factory-farms-are-baking-...

From the article above

In an even more extreme form, referred to as VSD-plus, heat, steam and/or gas are injected into the building, baking the animals alive
Lazy self-installing Python scripts with uv
you can 3-D print parts of a gun but the important parts are still metal which you need to machine. I’m not sure how much easier you just made it … if someone’s making a gun in their basement are you really concerned whether it takes 20 hours or 10?
What you should be really concerned about is when the cost of milling machines comes down, which is happening, quick, make them illegal
Well, for one thing, it's either that or die. Sure, you can travel overseas and get healthcare at much lower cost, but if you can afford that you probably don't care much about the cost anyway. It's a total seller's market.
How do we know he wasn't a plant put in place by the Consphereacy?
> The 'hard part' isn't the engineering

Depends on the problem. But I don't find a lot of companies that are all marketing and a bare cupboard of an engineering department. They exist, but they are not a universal.Also, most companies that are in this state today have shifted to it from one where product development with the engineering, was actually at least competent.

If you find marketing the hardest part, and most here probably will, you are likely an engineer foremost.

You need a good enough product, and you need it in front of the right buyers. Both aspects can be a significant obstacle to create a business.
I'm satisfied with Ansible for this use case
In that lens, there seems to be two obvious paths: expand to new planets or climb the Kardashev scale and use your limitless energy to recycle every atom.

As long as you can get to one of those stages before you run out of the required industrial capacity you should be fine.

If we absolutely had to, I think the human species could moonshot our way to either fusion or asteroid mining inside a couple decades. At least with our present resources, maybe not in a century from now.
That's fine. Part time jobs can pay a living wage/hr instead.
You know, the way people used Google and looked things up say a whopping 3 years ago?

> Why do laptop chargers have data wires?

I know, it's crazy to think people would like, research topics, be curious about what PD is, maybe skim the wikipedia for a whole 45 seconds, etc.

But no, apparently just spamming basic questions to reddit and HN is the way we're headed because everyone is used to have these AI-regurgitated crap spoon-fed to them. Or want someone to spell it all out for them because intellectual curiosity is a dying rare thing.

But hey, we're talking about a person who was reading unspecified communities that were apparently promoting cutting open wires to remove data lines, undoubtledly for "freedom" or "privacy", all seemingly without any context or clue about what they were doing.
These sorts of things happen every few years.

https://en.m.wikipedia.org/wiki/Brownlow_Committee

https://en.m.wikipedia.org/wiki/Hoover_Commission

https://en.m.wikipedia.org/wiki/National_Partnership_for_Rei...
> I also don't see how developers have any link with contract negotiations with warehouse workers?

Developers obviously have no direct impact on labor conditions of the warehouse workers. However, all the time-tracking, logistical optimizations, employee monitoring systems, etc. that enable Amazon to squeeze every bit of efficacy and profit out of these warehouse workers had to come from somewhere/someone.

I believe by contributing to companies that are as highly unethical as Amazon, developers are supporting entities that enforce and perpetuate such awful labor practices conditions. I am not assigning personal blame to any developer directly, but I do believe that as developers we need to be more considerate of the downstream ethical impacts that our work may have on others.
So If you meet a couple and don’t know if they’re married or dating, you just decide to call them fiance/fiancee?

That’s like thinking “I can just replace null with 0 or empty string. Means the same thing”
There is no one over 40 playing in the NBA. Is that due to age discrimination as well?
Followup coverage on the anti-flatearth subreddit (the antarctic trip is 'TFE', The Final Experiment)
https://old.reddit.com/r/flatearth/
I would argue that it’s not really a tech lead if they haven’t setup their pipeline to include linting. It takes such a small amount of time, much less than posting comments about it on multiple tickets. Like who on earth cares about these things in 2024? You shouldn’t be capable or even reaching a point on a pull request without adhering to whatever standards are set in place by the tech lead.

There isn’t really a “right” answer. I tend to include the team in the decisions. Then once you’ve chosen a set of rules all you have to do is enforce them.
My understanding of tetrachromacy is that it's duplicates the red cones, and shifts their sensitivity a very tiny amount - the suspicion is that it doesn't meaningfully change subjective color perception at all, and at best makes tetrachromats very slightly better at distinguishing shades of red that would appear identical to us regular trichromats.

It would be very exciting if some humans had a mutation that let them be sensitive to something further than our standard three!
It absolutely is. Some embedded mallocs do this under the hood against a predefined linker table. Genuinely helps even with the restrictions it imposes.
Well, technically you do. But the late left-wing government decided that sanctioning people (usually decreasing their payments) for not fulfilling their obligations is "socially cold", so they ended all sanctions. Meaning that you can ignore that obligation and still get the full amount of money.
Because extending trust usually works retrospectively?

Or

which battle tested applications exist today using crypto+, that illustrate it's a better choice than what sofar held up under libsodium (which is a lot)?
missed opportunity to call it ERNIE
Yes. The ratchain.
Seems like it. They even have example training scripts available. https://github.com/AnswerDotAI/ModernBERT/blob/main/examples...

Check out their documentation page linked on the bottom of the article.
https://huggingface.co/docs/transformers/main/en/model_doc/m...
I’m not casting shade on anyone, but “highly reputable engineer” is not how I would describe Wei Dai. “Early thinker in this field, respected for his opinions” might be more accurate.

Especially if you are directly comparing against libsodium and Daniel Bernstein who is a widely respected engineer whose work is widely used and heavily reviewed.
Can you point to some forums? I'm considering a GLP-1 agonist because I have an impaired ability to feel fullness, and as a consequence I eat all the time (mostly healthy stuff, plants). Want to hear more about others experiences and maybe make some connections with people who aren't going to moralize over "you are wired differently and are therefore a bad person"
The end user might not care, but as the developer I very much care about having a line-accurate backtrace.
A few interviews in this video

https://youtu.be/g1wSj9X2igA?feature=shared
That's an interesting idea. I wonder how well the film iris/barcodes could be used to figure out which movies make the best 'palette' to recreate a given scene.

I spent some time earlier this year on creating mosaics of movie posters using other posters as tiles: https://joshmosier.com/posts/movie-posters/full-res.jpg (warning: 20mb file)
Using this on each frame of a scene gave some good results with a fine enough grid even with no repeating tiles: https://youtu.be/GVHPi-FrDY4
Gen Z also views alcohol very differently, apparently. Without looking at collected data it's hard to say which generation is leading this charge (I suspect Gen Z and Gen Alpha), but I feel like an *alcohol* sober lifestyle is much more common these days.

I'm not on TikTok and generally try to avoid a lot of social media, so the uptick in gym rat lifestyle is not something I've been aware of. Certainly a good thing though and it's nice to see a whole generation not submitting themselves to permanently being on weightloss hormones or chronically obese. I'm in my mid-30s and folks in my social circle are either fit with quality fitness interlaced into their weeks or above average in weight. There's rarely an outlier from those two groups.
> Let's say you are given the declaration but not the implementation of a function with the following prototype:

> const char * AskTheLLM(const char prompt);

> Putting this function in charge of anything, unless a restricted interface is provided so that it can't do much damage, is simply terrible engineering and not at all how anything is done.

Yes, but that's exactly how people* use any system that has an air of authority, unless they're being very careful to apply critical thinking and skepticism. It's why confidence scams and advertising work.

This is also at the heart of current "alignment" practices. The goal isn't so much to have a model that can't automate harm as it is to have one that won't provide authoritative-sounding but "bad" answers to people who might believe them. "Bad," of course, covers everything from dangerously incorrect to reputational embarrassments.
Are you implying that it is unsafe? Or that it is unrelated to safety properties?
That puts you at odds with the tradition of natural rights. The Declaration of Independence says everyone deserves life, liberty, and the pursuit of happiness.
> and it has the exact same license as the Linux kernel

Also, I neglected to touch on this point more, perhaps license is not the right word, as much as distribution - I don't know if you have ever tried building the JDK (not simple), or worked with the official JDK vs the open one (not the same functionality), or tried to access old versions of the SDK on the official websites, or had to deal with their installers, etc.

Giant headache and all around.

Not to mention, even if your pacman command works, this is still simply not comparable, the example I used was for installing a jq binary because JRE simply doesn't include this functionality by default...

And now you need the overweight pom/gradle mess to interface with the Java libraries because <insert technical debt reasons here>
Impressive work! Of course you can access external RAM, but it comes with some compromises re: speed and usability. Other ARM microcontrollers have a full SDRAM controller on board in its normal address space with very little overhead compared to the internal memory. I'd imagine the SPI RAM here is an order of magnitude slower than the internal RAM, if not two?

edit - that is one WILD codebase... it has both pi pico support but also (remnants of)... Mac OS 9 support!? `#ifdef __MWERKS__`??
See also: Marzullo, Rantze, and Gage. Stock Market Behavior Predicted by Rat Neurons. Annals of Improbable Research. Vol 12, No 4. July-August 2006.
https://improbable.com/airchives/paperair/volume12/v12i4/rat...
No. But I will take a bit of schadenfreude reminding people of all the times they said that something should be "left to the states" because that was the correct unit of decision-making.
> I am not assigning personal blame to any developer directly

Actually you did exactly that in your post that got deleted by moderation.
12 Days of OpenAI: Day 11 – A new way to work with ChatGPT [video]
Maybe this would be a good topic for you to hide and move on.
> an H-1B holder is legally bound to the hiring company and can't seek work elsewhere

That's not really the case. An H-1B visa holder is not strictly bound to their employer, and is allowed to transfer to a new employer. Unlike visas such as the L-1, which are employer-tied, the H-1B allows for this flexibility. Transferring does require the new employer to file a new H-1B petition, but that process is straightforward and any big tech company will gladly complete that as part of the hiring process.

The main exception arises only when the H-1B holder has just started pursuing a green card. The first step of the green card process, known as PERM, typically takes 1–2 years to complete. During this time, the worker may feel more committed to their current employer because switching jobs would restart the PERM process, potentially delaying their green card timeline.
Most of the time it's not the same price, and most of the items are not in local stores. I know because I comparison shop, and 90% of the time I end up ordering from Amazon, because it's still the quickest and cheapest way to get things.