skysight-inc/HackerNews huggingface dataset:
I've been watching those mesmerizing YouTube videos visualizing sorting algorithms lately. The header of this article uses a screen cap from one of them.

Them: So what shows do you watch?

Me: ... It's complicated.

There are a lot of different sorting algorithms. Like, a lot, a lot.

As I watch them, I try to figure out what they were optimizing for. Some only scan in one direction. Some only use the swap operation. Some seem to do the minimum number of writes. Some are incremental performance improvements over others.

When I see an algorithm like this, I don't assume the person who wrote it was an idiot. I assume they were optimizing for something that's not obvious to me. Its only modifying operation is swap, so maybe that operation is faster than an arbitrary insert for whatever system or data structure they're using. There are no temporary variables besides loop counters, so maybe they're on a memory-constrained environment. There's barely any code here, so maybe this is for a microcontroller with precious little ROM. Or maybe they're applying this as a binary patch and they have a strict ceiling to the number of ops they can fit in.

Or maybe it's just the first sorting algorithm they could think of in an environment that doesn't ship with one and the performance is adequate for their needs. In that case, it's optimized for developer time and productivity. And honestly, it's a far more elegant algorithm than my "naive" version would be.

These are all valid reasons to use a "naive" sorting algorithm.
I'm one of only two known MikeWarot's in the world (I'm sure there are more, not yet known to me)

What an interesting point, though.... the line noise I entered first to avoid actually making an account proved that's a bad idea in this game. ;-)

--Mike-- did ok, though.
My husband is my hero because I rarely changed an overnight diaper that first year. Had to get up to feed/pump, sure. But when the crying wasn't due to hunger...

In fact, we ended up with me being in charge of "input" and him being in charge of "output". As in, I make the overall nutrition decisions, and when he became really worried about the chemical smell of disposable diapers, I did a little shopping to find ones we both could live with (he rejected the idea of cloth diapers), since I agreed the chemical smell probably indicated the presence of stuff our kid was better off not having in contact with his body 24/7, but wasn't as wound up about it as he was. He's also taking the lead on potty training, while I'm the one who's handling most of the execution of that because I'm the one on a part-time work schedule.

In that vein, when one parent cares about something VERY much, and the other kind of cares but not deeply, we've found it best to let the one who cares more have their way... as long as they're willing to do the extra work.

It also really, really helped that he was able to take a month off after our baby was born, and then the first month I was back at work after a year of maternity leave and our kid was starting daycare. This is available to all regular employees in Germany - 14 months of parental leave per child, to be split with at least 2 months to each parent, overlap allowed.

If you can at all swing it, time off that first month is critical if there's not a close relative or friend who will be living with you.
Warning: extremely nasty back button hijack.
I remember QNX floppy blowing my mind even back in the 90's. This was when Linux could load the kernel and the root fs at least with two floppies.
It also quite depends on environment. When you try to think about something, the observer may think that you are just being lazy and doing nothing. I can't count how many times I've been told by parents or other people that used to be close that I should do some work rather than just sit and stare at the wall.
And I would have some really great ideas of how to make something or how to solve something.
Then those people would say - you are just stupid, you can't do this and that. I can imagine many people will try to shun such thoughts and associate it with something unpleasant. As I did for many years.
This may sound brutal, but only when I cut contact with every single person that was negatively affecting my creativity in the past and present I stopped being depressed (not completely, sometimes it's coming back), but also started getting successes at work and eventually I was able to start doing things on my own.
Some people don't realise how toxic they are and there isn't even point talking to them about that, because you are going to get ridiculed and attacked.
It doesn't. Your unit is tiny. A few thousand users doesn't even break the threshold of "death by Hacker News".

Uber's 93 million in 80 countries means that (very roughly) in each country they have three orders of magnitude more users than you: 93 mln/80 countries = 1+ mln in each country = 1000 times more than you = 3 orders of magnitude.

As I said, just dealing with payments in each country is often a full-time job for a dedicated tema even if you process payments through a third party like Adyen.

Are Uber operating at 100% efficiency? Hell no. Will you have several orders of magnitudes fewer people than Uber when you grow to Uber's size? I very highly doubt it.

Of course, there are exceptions like WhatsApp, but WhatsApp in itself is a very simple product (that is very hard to scale), and was (and still is) very slow in rolling out features.
“ Not that it matters much, since you can just bypass the security control entirely, but == is not the correct way to compare hash function outputs.”

I read an excellent whitepaper on brute forcing this over the internet in ~2012 but I cannot find it. Anyone happen to know the paper I’m referring to, or if it’s still relevant with modern cpu and compiler optimisations?
The distinction between sync vs async messaging isn’t as easy to figure out these days as it was when snail mail vs phone call were the primary options.
> Setting up environments becomes a massive PITA when working directly with VMs.

I guess I've just never found this to be true.

My main goal when engineering a solution is always, "Keep It Super Simple (KISS), so that a junior engineer can maintain and evolve it."

Working directly with operating systems, VMs, networking, etc. (purely in Cloud - never on-prem... come on it's 2022!) is the simplest form of engineering and is much easier than most claim.
as a young father.
your piece elegantly summarizes what im hoping to be to my child. i wish you two many years of curiosity!
Sorry, but your comment is misinformed and just wrong and the sources are intentionally misleading.

In H1 2022 >50% of German energy consumption was from renewables [1] and Germany has currently significantly lower spot-market prices than France, which went full-on nuclear [2].

The sharp rise in energy costs has nothing to do with nuclear (at least not now - if the society 20-30 years ago had invested more in nuclear, things could've turned out differently. Now, nuclear is neither feasible nor economically viable..) and everything to do with gas prices, which dominate energy costs due to the merit order. Coal is currently actually still used below capacity while gas plants are running at record utilization, thanks to profit-maximizing utility companies exploiting this.

Unfortunately, Germany had a government for the last 16 years that cared a lot for preserving the status quo for incumbents (cheap gas!) and neither companies nor consumers were willing to pay a premium for energy security/resilience. We're now paying the bill for that.

[1] https://mobile.twitter.com/energy_charts_d/status/1542804890...
[2] https://mobile.twitter.com/energy_charts_d/status/1543915767...
Yes but it requires effort to create an account and remember a password, etc. and there's no incentive to do that without an about page or some other information about the game.
I don’t believe schizophrenic thinking is random either. Unproductive maybe, but schizophrenic creative minds are not uncommon either, so cannot really define one against the other. In the process of being offended sometimes we indicate our biases.
> Conclusion was that W95 ran on 4MB, but slowly

Yeah, I clearly remember today that HDD light never going off if you ran Win95 with 4MB RAM. One of the reasons I had to upgrade my PC.
> My rough estimates are that 45-50% of React apps use Redux, whereas Mobx and XState are around 10-15%

Curious how you arrive at these estimates? I would have thought fewer than 30% of React apps started in the last year or so use Redux, but of course, many still do, perhaps a higher percentage of apps that were built >2 years ago do (you could argue these are more mature, so they've "grown into" redux, though you could also say they're legacy and preceded newer React capabilities and tooling)

I don't have a strong inclination one way or the other, and have been toying with introducing Redux (or some other kind of state management) for the app I work with, but my understanding from the general sentiment of the threads/projects I follow is that market share of Redux has fallen in the last year or 2.
As a former driver, I ain't surprised. Cheers, y'all.
What do you think is the most useful crypto project?
> if you admit you're going to lay people off, then your best performers will leave

You are not simply entitled to your best performers. You are in a relationship where they provide their services for money. Staff are not property.

Restricting information to influence their decision making is poisoning that relationship.
As an Apple user, I see it more cynically now - their whole idea of "privacy" has morphed into a strategy to prevent their competitors access to the personal data of the users, while ensuring they have more invasive access to it. This idea is offensive to me. Preventing data collection is the first step to user privacy. Once BigTech has your data, they can do anything with it in the future (despite what they say today) because of the lack of appropriate law and regulation to prevent this. I see us heading to a dystopian future where BigTech evolve into data brokers.
SQL doesn't sit in a category that's similar to "other" languages. You often need to know how to construct SQL queries in addition to working in another language.

Honestly, learning a language to "improve" yourself is probably a waste of time. Learning a kind of language is more valuable. Not SQL, but declarative. Not Haskell but functional. Not Java but object oriented.

Additionally, it'll be more useful to understand programming concepts, like SOLID, flow control, data structures, etc.

As a developer for ~15 years, I don't generally fear projects using languages I'm not familiar with anymore. I know I'll pick up the basics to start contributing, and I'll grow into mastery over the ensuing months.

Which brings me to my real advice; learn how to be productive while learning. If you can do that, you'll have a long and successful career as a developer.
How to work like elite athletes train?
There is a reason in principle that you can't build a Set Monad that works that way: it violates the functor laws.

In order to be a functor, you need `fmap (f . g) == fmap f . fmap g`.

The problem is that some functions (for instance, Data.Set.showTree) can produce different results for two values that compare equal.

For instance, imagine we have a set containing (only) the lists `[1,2]` and `[2,1]`; let's call it s. How many elements are in `fmap (Data.Set.showTree . Data.Set.fromList) s`? Two, because the result of fromList winds up being order dependent in the structure of the internal tree, even though both Sets represent the same set of values. On the other hand, how many elements in `fmap showTree . fmap fromList`? Just one, because the Set has a chance to "see" the output of fromList and notice that they are equal according to Eq.

Does this violation of the functor laws matter? Maybe; likely not; it depends on your use case.

But mathematically it means that the thing we are working with is not a functor, and so the thing we are working with is also not a monad (as all monads are functors).
I have an intuition that there's a reasoning problem in this comment but I can't point out what exactly this time.

Verbal clues and facial expressions are also pieces of information, so the fact that HN is a text-based medium does not set it apart from other communication mediums only because it conveys information.

People going to HN to ask for help probably do this because they are familiar with this community, not necessarily because it is text-based and probably haven't rationalized this aspect that much.

Anyway, good luck to OP. I don't have any insight on this matter.
If you can't run your software locally without Docker, I'd be worried.

But to answer the question, VMs have been a thing on the desktop for a very long time.
We had weekly planning and "triage" meetings too. This was on top of the normal stuff. It wasn't all heads down either. If you finished your tickets before the next planning meeting you could relax, edit the wiki, look for stuff to write new tickets for etc.
They are not the most criminal demographic in the U.S.

They are the most criminally profiled demographic in the U.S.

https://www.britannica.com/topic/police/Police-and-minoritie...

There is absolutely no justification for the recent extrajudicial murder of an unarmed black motorist by cops who shot him 60 times.

There is absolutely no justification for the murder of Tamir Rice.

Black people in America are overpoliced. When presented with the same crime, Black people are routinely charged more often, charged more intensely (the number and severity of the charges are higher), and convicted more often.

Your ignorance on this matter is showing.
https://archive.ph/OftCI
Programmable Real-Time Unit Subsystem and Industrial Communication Subsystem (PRUICSS).

Documentation: Pages 198-521 out of this 5118 page PDF:

https://www.ti.com/lit/ug/spruh73q/spruh73q.pdf
I didn't read it as bashing, but as a joke
The negative consequences of making the wrong choice are both extremely low and extremely loud, so I urge you to just take a guess, with a strong bias for every technology platform being async.
That's impressive. I was suspicious until I saw the quad-byte DMA ringbuffer with the super small PIO program. He's overclocking to 200 MHz (!!!) and the framing protocol does have bugs (see comments), but impressive all the same. Also the message buffer is pretty small but now I'm just being picky: streaming to UART while sampling wouldn't be possible without giving up some channels and slowing down the sample rate.
We should, send me an email (my HN username @gmail.com)
I find it's easier to use Ansible/Salt/Puppet Bolt and Packer to bake an AMI every night, update the launch template in a DB (which Terraform pulls the value from, thus there is no drift), and auto the ASG. Then you just force a drain.

Now you've got automatic, constantly updating VMs every night if you want them. And a new deployment is just commiting code to master and pushing and that whole pipeline triggers for you.

People like to overcomplicate things, Mirceal. You're on the right path :-)
Polygeist: MLIR Front end for C or C++
They did say it was dystopian…
A word that describes a group whose beliefs you oppose does not become a slur by virtue of you using it in opposition. If some people view the Tories or any association with them or their paltform in a very negative light, that doesn't mean that calling Theresa May "a tory" is using a slur about her. Just like calling France's Jean-Luc Melanchon "a socialist" is not a slur against him, even if spoken by someone who despises socialism. This remains true even if they prefer slightly different terms.

At worst, calling someone by a label that doesn't correctly define them, and that you mean pejoratively, may be considered an insult, but not a slur - say, calling Barack Obama a socialist, or calling Tony Blair a tory.
I am not an American, but it is my impression that most American gun owners, if they carry their gun at all, have mostly defense against common crime in mind, and that the loud minority screaming slogans about the tree of liberty watered by blood of patriots and scoundrels is pretty tiny, much like most loud minorities online.
If it's E2EE, why not send the message with a timestamp at which the server should approximately process the message? If it's well encapsulated/encrypted, it shouldn't matter that the message is on the server for a while.
Cambridge for embedded stuff
Your view is your view, so I don't get why you try to disguise it as some objective revelation. The whole world present & past generally happens to oppose your view. Anecdotal exceptions don't disprove rules, rather are a common trait of such. That NG article is meaningless, just full of speculation and a single isolated example of something that proves nothing.

> It's something that's taught or picked up from the society you grew up in, e.g. traditional view that boys play with toy cars and girls play with dolls or men are the bread winner and women are at home cleaning, cooking and looking after the kids.

Oh, very baseless claims + wrong assumptions here. Assuming that you are actually willing to broaden your perspective, I would highly recommend to you this talk on the human brain: https://www.youtube.com/watch?v=PjE_yaJjXE8 - You will love it if you love studies, which you seem to!

Your last two sentences are in direct contradiction to each other. If you agree that you may have been raised and taught in a way opposite to your hard-coded nature then that doesn't counter, but rather supports (!), the fact that there is such hard-coded nature.

Since you seemingly like anecdotes a lot and rely on them for all of your argument (while at the same time attacking my view for alleged lack of empirical evidence), let me ask: Are you a stay-at-home husband as well?
Show HN: ASort – Python Utility For Sorting __all__ lists
I got tired of having to keep my __all__ lists sorted in python by hand as it helps keep them more readable so I made this to do it for me. If you aren't familiar with __all__ lists, here is a good post explaining them https://stackoverflow.com/questions/44834/what-does-all-mean...

Has support for pre-commit along with cli and python api usage. Shoutout to the isort project which was this inspiration for asort's api and name. It works with black automatically.
Yes, the article makes that assertion on behalf of both React and Cocoa and explores the different way they address that problem. It uses "scroll position" as an example: scroll position is typically not tracked in the React state, so how does it work?

In Cocoa, scroll position is part of the view's state, a mere property of the view. This is simple because the UI itself is stateful.

In React, scroll position is typically not part of the state from which we project the view. Instead this state is attached to the projection itself (e.g. a HTML node) and we are dependent on the "Memoization Map" to preserve it. So this memoization is now required for the correct functioning of the app. The "pure function" abstraction is leaking.
Because if you are on duty for production issues you may not be able to put your entire smartphone in do not disturb yet you don't want to be woken up at 3 am because some coworker send you something non critical.

Having separate devices for personnal and professional stuff helps. I can't speak about iOS, I used it way too long ago but both Android and most messaging platforms do not provide ways to have flexible do not disturb policies depending on multiple parameters such as sender/timeframe/app/format of message. It is usually a mix of the global do not disturb function for the OS, the global notification parameters per app and possibly some mute options on a contact/channel basis but that is not time range capable and only works on a blacklist instead of whitelist model.
> I’m sorry you live in one of the worst countries in the world to be disabled in.

The US is such a bad country by almost any fundamental metric... I think it's just a matter of time before its economic privilege implodes.
iOS lacks support for multiple instances of nearly everything. It's the OS of "form over function."
Syncing clocks is surprisingly difficult. On top of that you have to get the message to all the devices that there even is a timer, this might be delivered after the timer expires. I don't think you could do this in a way where people could rely on it. You already have caldav which can sync your agenda, I think that's probably the closest you'll get.

There's a sibling comment that mentions HomeKit timers. I'd bet those are living on some remote machine and you're only able to check them but they behave very differently from local timers.
Tangentially related, this showed up in my news feed today:

It's RAID. With Floppy Drives.

https://hackaday.com/2022/06/30/its-raid-with-floppy-drives/
Firstly, IMO, email is by no way amazing. It is useful and essentially a standard way of communicating by now, but I have never once thought of the communication protocol as being amazing.

Second, there is nothing toxic about scheduling a text. My father is one of the people who never silences his phone, so when he gets a text or call at night he always wakes up. He gets annoyed if it's not urgent, so a scheduled text message in the morning would make him much happier. Scheduling a text message is all about convenience for the recipient of the message and comes out of a desire to be respectful of the other person's time.
> But hey, put 'Raspberry' or 'Arduino' label on it and suddenly it's so new and innovative it makes me sick.

I get why you feel that way. I think that's the nature of the huge internet and younger folk learning every day. I totally get pissy every time I see someone repost a "discovery" that is 20~30 years old and I've seen many times, just to farm clicks, karma, or whatever internet points their platform rewards. But I think that's just life now: everything is "look at me!" tiktok-ified, even engineering.

But the dude really is pushing the limits of the PICO here, always nice to see someone doing something other than blinking LEDs and jizzing about it on reddit, right?
Not really. In the late '50s, when I was a teenager, I lived in a rural area. I had my own rifle, and so did my friends. I also bought a 22 revolver and carried it around the country in the early '60s and never thought twice about doing that.

In the '60s, high school students carried rifles on the NYC subway while going to target practice. Try doing that today.

So, I'd say there has been a lot of pressure to move the window on gun regulation to more restrictive over the last fifty years. I don't think it's done any good at all relative to reducing crime committed with guns. Law abiding gun owners have always had low incidence of gun infractions compared to, say, the police.

The real problem is not enforcing the gun laws we have had for years. Chicago is a prime example: very restrictive laws, but very few convictions for gun offenses, which are frequent. Why is that?
I hadn't heard of spiped, and I was very happy to discover it through this blog post. It's elegant, simple, and solves a problem I was over-engineering my own solution for. So thanks, Colin!
TTN – IoT ecosystem that creates networks, devices and solutions using LoRaWAN