skysight-inc/HackerNews huggingface dataset:
> Sure, but "the same as Rust's enums" including a mention of pattern matching, is a really big expenditure on the novelty budget from the point of view of Go.

Following the addition of type sets for generics I think go actually has all the pieces for union types already and it’s a matter of putting them all together at the compiler level:

- allow type sets as types (currently they’re only valid for constraints), probably excluding those using “underlying types”

- implement match completeness for type switches over type sets

And there you go, you’ve got unions from which you can easily implement sums via type declarations:

type Foo int
type Bar struct {}
type FooOrBar interface { Foo | Bar }
func Thing(v FooOrBar) {
switch vv := v.(type) {
case Foo:
// you have a foo
case Bar:
// you have a bar
// a default case is required if the cases are not exhaustive, forbidden if they are
}
}

Is this perfect? Not even remotely, this suffers from the usual Go issues of zero values, unenforceable constructors, and nil interfaces.

But these are issues of the language, they should be fixed in the language in a hypothetical Go 2, I don’t think there is a good reason to try and work around them here.

Also completeness requirements could probably be extended to all “trivial” switches (types or values, not generalised expressions) via a go.mod stricture, similar to the new loop semantics.
Really nice write up and amazing skillset!
> - A literal supermajority of software developers

_American_ software developers. Many in Europe don't fall for this way of thinking.
This is like watching some preschoolers argue whether the rainbow has 4 or 5 or 7 colors. The arguments do not make sense at all because they are actually some form of opinion.
Have you ever tested something in mobile browsers?
You see, Jim is an economist. Jim is a dismal character.
What country/state are you from, what country state is your client from and how much money are we talking about? In the US there is a fairly straightforward process to sue someone in small claims court without a lawyer and with fairly small fees. But small claims courts are limited to small awards.

I have not worked as a freelance programmer nor hired any, but a friend really likes to hire freelancers for various projects and often asks me for advice and tells me about his travails. I think practically speaking, it is not that hard for a freelancer to get paid because software always needs upkeep for bugfixes or updates to work with other software or to add new features. And it is far far far more expensive to have a second freelancer look at the first freelancers code and do the updates.

Some people say it takes more time to read code than to write it. I am not sure if that is true but very often if you ask a second freelancer to do minor updates on another freelancers code, the second guy will just say that the code is so awful the whole thing has to be rewritten from scratch. So you have a big advantage just by having written the stuff and having the code in your head and written in your style. You are the best man to fix it and update it by far.

My friend always pays his bills but he is a very tough negotiator, and often gets comparatively good bargains for freelance work. However, all the benefits of his bargains disappear when he needs the software to be changed a bit in six months or so. Then the freelancer is in the drivers seat and my friend completely drops his tough negotiator stance and becomes super nice and friendly towards the freelancer.

So if you do not want to pay for lawyers and small claims court is not suitable for some reason, you may just send a demand letter saying that you are charging a 20% penalty for non-payment and interest will accrue in the future, and just wait for your client to need some update and then you demand that all previous invoices be satisfied before discussion for new work even begins.

IANAL, this is not legal advice. If the sum is a large amount, it would probably be best to consult a lawyer.
Good tip! Yeah, the `sort -rh` is what makes it sing, it's such a cool feature of coreutils that `sort` knows how to sort human-readable output from `du` or `df`
This hits hard. I just got my “pay rise”, that is below inflation, with no real comment. “Was it my performance?” “No, your performance was great”. “Can I look at other advancement?” “We will look next year”.

So yet again, I feel the pressure to look for a new company. I am so so tired.
Good answer and better question: Do civil law can enforce itself without bilateral agreements initiaing a claim to a foreign court? I don't think so. Even criminal couts can't without agreement.
Love the build. I think the printer you used was genius in terms of how it gives a super retro look to the label.

When I saw how you had to cut the edges I thought I would share that When printing my own custom labels or stickers, I use a local print shop that has a vinyl printer+cutter. Im not sure what media they would use to make this cool retro look, as I order the durable vinyl for my applications so far. (such as custom bottle labels for a friends birthday). No glue is needed and I have saved a fair amount of cash by using their printer instead of buying one.

Home versions of these printer+cutters start at around 300-400 bucks. Thanks for posting your build, I have found it very inspirational.
Ask HN: Opinions on serverless compute for ML training
Dear HN,

I'm evaluating serverless compute options for ML training, most notably Azure's serverless compute (since I have free Azure credits): https://learn.microsoft.com/en-us/azure/machine-learning/how-to-use-serverless-compute?view=azureml-api-2

So far, I've always managed my own instances. Upside of that approach is no hidden abstraction layers and excellent pricing as I can use spot instances and pricing on VMs in general is very competitive and easy to understand. Downside is that it's somewhat inflexible/manual when it comes to firing up different instance types or groups of instances, and I often forget to shut down the instances which ofc is quite expensive.

I'm having a hard time understanding which of the offerings are worth using, and which ones I'd be wasting my time with. What do you recommend?
> New York where unions are not really a thing.

I live in NY, and I can tell you that unions are very much a “thing,” hereabouts.
Just outside the embassy is another pole, but with lots of cameras and radio gear looking into the embassy.

Clearly the days of spycraft aren't over.
Isn’t that the first thing you would do if you add a new variant?
What metrics were these VPs optimizing by doing random layoffs?
> So why did the stipple go away? I’m not terribly certain to be honest [...]

I always assumed that the reason was that it was time when cheap (and low-quality) LCD displays with VGA-only inputs started to appear en-masse. And on most such monitors the stipple pattern often either was displayed incorrectly (smeared) or even prevented the monitor from reliably synchronizing to the signal.
This is true but only explains business apps.
> 204/214 are no longer built I think.

They are now being built again, because it's the only design that wasn't built with the assumption that Western providers (of avionics, specialised parts, engines) will be available and therefore it's the easiest one to manufacture with an entirely Russian supply chain. Still painful because most of that supply chain is decades old and very rusty, but theoretically possible.
I guess they were sponsored by their hardware manufacturers, on the condition that they mentioned their name once for every trillionth digit of pi they computed.

I can understand that they have to mention them, but I think they’re overdoing it.
>If you look at where the good salaries are, you will not find them in France, Germany, Italy where the unions are strong, but the Bay Area, London, New York where unions are not really a thing.

True, but those "good salaries" are only but a fraction of the total salaries in the countries you mention. Methinks a country should prioritize the welfare and well being of the entire country's people and the average worker instead of focusing on the top 1% SW devs while letting everyone else sink.

Maybe keeping public services running for the bottom half of society is more important for society than creating the top SW companies in the world. After all you can't eat software, but we do need garbage men, doctors, pilots, sailors, nurses, handymen, architects, oil & gas and construction workers, farmers, car mechanics, barbers etc. a lot more to survive and run a modern society, than we need web devs to write yet another food delivery, ride sharing or crypto trading app designed just to skirt the laws and scam VCs and clueless investors while the interest rates are low.

If your toilets breaks, you still need an actual plumber to show up in person to fix it since he can't push an OTA fix remotely from home, otherwise you'll be rooting in your own shit no matter how advanced your knowledge of K8s and ML-Ops is. Who cares if you're a well paid SW dev in London, NYC or San Fran but you can't walk alone at night because you're surrounded by poor minimum wage struggling and homeless people on substances or mental illness from wealth inequality, lack of welfare/social care and societal collapse due to decades of poor political and financial policies designed only to favor the wealthy?

This is just my biased opinion, don't treat it as gospel ground truth.
That’s what negative prompt is for. Stable diffusion also isn’t like llms. LLMs certainly understand negation.
This is absolutely not true. Whatever else you many think of what's happening, this is just a distortion of reality.

Hamas is an organized paramilitary of a semi-autonomous regino, that has spent twenty years digging a vast tunnel network and hiding weapons and ammunition in civilian homes. It is engaged in daily attacks against the IDF in Gaza, as they themselves show by posting videos of their firefights and attacks against the IDF. Hundreds of Israeli soldiers have died in these battles.

That is, by any measure, a war.
I live in a country where US-style layoffs are illegal. Huge weight off my shoulders as a sole breadwinner with young children.
> One version of the question we looked at was: how low a pace rate can you pick for an ABR algorithm, without reducing video QoE?

that is certainly an interesting economical optimization problem to reason about, though imho somewhat beyond technical merit, as simply letting the client choose quality and sending the data full speed works well enough.

addition:

i totally agree that things have to look economical in order to work and that there are technical edge-cases that need to be handled for good ux, but i dont't quite see how client-side buffer occupancy in the seconds range is in the users interest.
Their optimizing for stock price growth which go up when random layoffs happen.
I went in once. They had an open-day demonstrating the skills of north Korean artists. The artwork was decent, and the experience a good one overall.

Every room had a picture of Kim, obviously.
It's not just that. If ALL that was in the header was the function prototype, that adds basically nothing to the compile time. The problem is when you have significant codegen and parsing in headers, like you do with templates and class definitions and stuff like that.

Like, most C projects import enormous headers with gazillions of function prototypes without having a particularly measurable impact on compile times (compile times in C is quite good, in fact!)
That makes sense, since it separates out green from yellow, which is where we have two cones close together in the spectrum (nominally green and red cones) and the most response and discrimination (humans are good at seeing greens).

This part is surely an error, though:

> So there’s no such thing as “red with a little green”—there’s just a less intense red.

This would mean that a monitor can't display orange (red with a little green).
We need more timebomb licenses. The company owns your code for X years, to which they can gain market advantage and make their money. After X years, it goes MIT/GPL.

It benefits the coder, it benefits society, and the company gets that sweet temporary window of profitability over their competitors as they always have since time immemorial.
There are two linters that add those checks: https://github.com/nishanths/exhaustive for values and https://github.com/alecthomas/go-check-sumtype for types. Both are integrated into golangci-lint. I use both a lot and have only a positive experience.

Having support from the language would be nice, though.
>The tech ain't any more complicated. The software you're imagining has a waaaay more complicated UI then what you did in the 90s

It was (it still is) SHIT (there are technically valid reasons), but being shit from moment 1 it was absolutely necessary to create a builder for that.

While simple UI in HTML5/js/css is wonderful to make, any user-contribution system (drag and drop builders, editors and what-have-you) is hell to manage and develop, breaks a lot more than you may think, has bold performance issues. The stack is shareware as a service, it's crazy, it's laughable thinking that probably the multi-billion system required for A-grade GPTs is more cost-efficient than living like we are accustomed to in big web development.
> The toolkits, the apparently billions of dependencies, the vastly complicated build processes... Except instead of a 50 line experiment, it’s a gazillion lines of God knows what 87 levels removed from whatever code I actually wrote.

Instead start with pure HTML, SVG, CSS and JavaScript. Use MDN for documentation. Pick one browser to develop on (any one will do).

Why? Most importantly you are learning how the low level browser code works, and you are building your own taste about using the core languages. Just like learning machine code helps with your C++ development.

You don't need build processes unless you are developing commercially. The frameworks provide opinionated APIs, but they are often too abstract and are providing complex enterprisey features.

There is not that much difference between browsers now. And jQuery is bollocks (it was mostly golden for adding code to HTML pages that were served from a back end).

If you want to get a webdev job then maybe do some thinking on what framework and tools you want on your resume, and learn that framework/tooling after you have mastered non-framework browser development. But my guess is that webdev is likely not a good fit if you like engineering your software.

My experience is now outdated, but I wrote my own framework which morphed over time as we supported other browsers and newer versions of browsers. I started my career on embedded software, so perhaps I am more cynical than most! My framework was far better engineered than most (for the reliability we needed). Other frameworks delivered on other goals that were not aligned with our needs.

It is a very frustrating road writing pages for browsers because everything feels arbitrary and you have very little control over the engineering and you are at the mercy of browser quirks: you are often forced to come up with shitty expedient solutions that work if you are dong commercial work, and I very rarely felt clean. There is no beauty to web development: it is dirty work that I would try and do the best I could to achieve the outcomes we needed. Compromising constantly...
The Flynn effect does not mean that people today are smarter than people in previous generations.
The sonic boom made Concorde's economics harder, but they'd have been hard anyway. It confined it to largely only being useful for that transatlantic route, and that was borderline economically viable for airlines. However, as there was really only one route where it was useful, there were not many Concordes flying and the fixed costs were considerable. Eventually Airbus pulled the plug, and ended maintenance, and that was the end of that. It was probably spurred on by a high-profile disaster, but even without that, the writing was on the wall; if you were an airline Concorde looked economically viable, but without subsidy by the state or by Airbus or both, it never had been.

In a world where there had been many viable Concorde routes, this could all have worked out a lot differently, Concorde B might have happened (which would have allowed a Pacific crossing), and maybe we'd still see supersonic airliners.
Entitled people exist in all areas, that's a fact.

But you are being too weird in your generalization that usually the table is tilted in favor of the employees. For 22 years of career I've never once seen it.

If you make yourself a niche consultant and can command insane fees then nice, but for everybody else they are just cogs that can and are replaced on a whim.
So they do insider trading then. Not surprised.
> Black is included as a money-saver

Since when were printer manufacturers concerned about saving the end user money? lol.

Black is included because if you mix typical dye based inks you do not get a black, you get this greenish looking thing that is clearly not quite black. A few here are old enough to remember when early color inkjets could only hold either the tricolor cartridge or the black cartridge (ex HP 500C).
So, now that this is released are we no longer going to have pendant people complaining that this "isn't real open source"?

Here is your model, complainers.

I'm not really sure why you'd be so insistent on that, as opposed to just fine tuning the "totally not open source, but instead just open weights" models.

But go ahead, I guess.

Now we can get back to talking about capabilities, usage, and results, as opposed to arguing about the definition of words.
go:generate is mostly just a marketing failure. If they'd called it 'procedural macros', everyone here would think it was the bee's knees.
Green and nimby bullshit as usual.
I lived at a summer home in 80s which was near a (soviet) air force base for many summers, and listened to sonic booms daily. In no way it was even disturbing.
> If you're a good employee then employers won't want to lose you.

That's very generously assuming somebody above you actually has a clue who's valuable and who is not, which I have to tell you that I have witnessed, yes, but rarely.
Yes, the solution has nothing to do with Python.

I'm not sure if the problem had anything to do with Python. The article is a bit silent on the specific issue with randomness. If detouring urandom() fixed it, it was probably the randomized hash tables.

It cannot have been third party modules calling random.seed() since that would not have been fixed by the hack (meant positively).

You can say that randomized hash tables by default are a mistake, same as the crippled arbitrary precision arithmetic.

If you write a web service, just set the proper defaults at the start of your program.
So the entire West Coast, south west, and north east? The most desirable and populated areas where the majority of the population live?
TL;DR it is a job
>The new challenge is phones. Mobile browsers do not support the File System Access API.

Phones are an old challenge for now. Their OS is made upfront to coerce the user in having their data dealt by someone or something else out of the phone, somewhere through an Internet connection.
If someone is offered a particular posting but chooses not to accept it without good reason then I expect they won’t be offered anything better (more important, prestigious or more enjoyable).

(Saying that, I remember reading once that high-flying UK diplomats might be offered something less desirable as a ‘test of nerve’ - to see whether they had enough confidence and self belief to hold out for something better. It’s a never-ending test of character and ability to know which way the wind is blowing, I suppose)
A CPU ahead of its time: The Pentium Pro [video]
(I'm just poking fun at some of the parent comments who talk about their children like pet commodities)
Hi, former employer here who valued employees over profitability.

It's true for all employers. Your job as a business owner is not to provide jobs to your employees, it's to keep the business afloat and maintain your income. There are limits to how much of a good person you can be, those limits are set by the economic system we exist in. Ignoring these limits will cause your business to fail.

It's a sad view and it's not entirely accurate but it has better predictive power than the rose-tinted glasses you and possibly your employer may be wearing. Profitability is the baseline requirement, all else comes after. That's how a market economy works. If you remain at a stable net-zero that's great as long as nothing ever changes but it means you're extremely vulnerable to any disruption.

To be clear: I'm not even talking about shareholders. This is true for private businesses too, maybe even more so. Profit means reserves, reserves mean being able to survive dips and downturns. But when the market changes you need to adjust and adjustment means the value of an employee can change drastically and it may be better to replace someone who was a great fit for the old market with someone who's a better fit for the new market. Sentimentality is a competitive disadvantage.

You can balk at the morality and decency of this and I'd agree with you but you shouldn't be upset about the persons, you should be upset about the system that is requiring those persons to act this way in order to stay afloat.
No, they're pandering to please their bosses aka the shareholders.
This I agree with. There were not enough viable routes. Same thing happened with TU-144 - no destinations.
I always point people who are thinking of doing freelancing at this classic video from Mike Monteiro:

Fuck you, pay me (2012).

https://youtu.be/jVkLVRt6c1U?si=a6qzrzrLOjv8T-LK
> The error is often not in the layoff. It's in over-hiring in the first place. And that changes the "how evil are these people?" equation rather drastically IMO.

Starting any topic with kind/evil dichotomy is never a way to bring a rational perspective on the table, indeed.

Over-hiring can happen through different situation. One is bad luck: market evolution removed the the ground under the feet of a sound projection assuming a reasonably stable context.

An other possibility is incompetence: acting in reckless attitude with the business strategy as if it was a past time board game without considering it will have concrete impact on real people that will engage in its progression.

Yet an other one is draining all skills in the market to gain dominance on its segment. Thus endowed, it will be easy to kill any possibility of fair concurrence. Then later, drop the monopolized workforce out of the train, that was known to be superfluous to achieve production goals. Of course, this drop should occur only once there is no credible chance these employees could find a decent job in this sector anymore. That is after they contributed to the hegemonic position of the organization.

In short, over-hiring is not necessarily an error.
The overarching lesson of my career has been that people are fallible and processes that rely on humans to not make mistakes are bound to fail. Recently I've also been thinking about the importance of being able to reason "locally" about code, it might be the single most important property of a software system. "locally" typically means a function, class, or module, but I think it can also be applied to "horizontal" cases like this. For example, if you add an enum variant the compiler should guide you to reason about each place where the enum is no longer exhaustively matched.
It’s interesting how much effort, and money is put into combating unions instead of developing a healthy relationship.