skysight-inc/HackerNews huggingface dataset:
This is an especially interesting comparison because while it does clearly exhibit the sort of elegance only achievable through the elimination of special cases, it's also a good demonstration of the tradeoffs one sometimes has to make for this purpose.

The second is significantly 'cleaner,' but with pretty bad readability [0]. The first version has excellent readability.

In practice, the way I'd evaluate the two is by looking at how much other code depends on (or at some point may depend on) the piece under consideration. If nothing else or only very little depends on the code, I'll opt for readability; if it's likely to be somewhat foundational and other stuff is going to grow on it, I'll opt for the more abstract, cleaner version, and document thoroughly.

[0] I'm guessing the readability isn't nearly as bad if the first example is using a common C idiom; I don't use C enough to know. My main criterion for judging readability is: how much does the structure of the code match the conception of the algorithm you're starting with. The conception here has to do with navigating links; the pointer stuff is incidental complexity.
Further in the article

> “We’ll say, ‘Listen, we’ve had stuff in the area. Would you mind giving us consent to take your DNA, so we can rule you out for committing any crimes?’”

The way they're phrasing this makes it even worse. They're clearly not explaining what this actually means, they're pretending like this is to help the suspect, and the suspect probably has no idea that this is being compared to a large database of crime samples.
Although that's funny, NISC is already a thing:

https://en.wikipedia.org/wiki/No_instruction_set_computing
Does it _harm_ security?
Wait a minute. Oracle acquired Sun. And Google acquired Android. Oracle trys to lock down API of Java. Google locked down their services and PlayStore by Google account. Oracle sued Google for Java API usage. Am I missing something? :)
Visualizing the Speed of Light
Please contact me privately. I don't think HN takes kindly to advertising... even for a good purpose like this.
The waste company has people that go through the recycling and pull out all the salvageable bottles and get the deposit themselves, so you can consider it a "donation" to SF Recology or wherever you live.
> Mr. Harran called this criticism “total nonsense.” His officers do not target particular groups for DNA collection, he said: “You have nothing to fear if you’re not going to be a criminal.”

This is the exact same argument made against the right to privacy.
Information wars endanger civilization, say 'Doomsday' experts
> Just because Marzipan/UIKit today doesn't have good MacOS affordances doesn't mean it won't in the future, especially since it's not even being offered to developers right now. I don't see why it's difficult to see where the puck is going here.

It's not difficult to see where it's going. I just think people are believing it's going where they'd like to see it, where they think it's best for it to go; whereas Apple has their own ideas and always has. What we think is better for the ecosystem, they mightn't see it that way; what we see as the natural course of things, they might see as a passing fad.

Plus, we look at Microsoft's attempts at this very task with Windows 8 through 10. Seems to be a bit rough going. Apple famously accused Redmond of starting their photocopiers; I'm not sure Cupertino's Xeroxes are even close to warming up on this front.

Plus, it reads just a little too optimistic for me. We are already seeing that sharing user interface code between desktop and mobile results either in crippled experiences on both or each platform requiring its own platform-specific user interface code anyway. Instead of one amazing app on two platform, you get two crappy apps that feel like they belong on the other. In my mind, the poster child for this is Discord - it works well enough until you want to do some basic management, then the desktop version is pretty much mandatory.

If you're right about Marzipan having different UX affordances, I think Apple made a huge cock-up by demonstrating apps like Home. On a Mac, Home is an awful mess; the most basic operations are made unnecessarily difficult, what would be a long press or force touch now becomes an irritating secondary click (which is most annoying because I have a Force Touch trackpad not doing anything useful). Even the App Store is missing so many macOS features by virtue of being a Marzipan app.

I'm __hoping__ these are just examples of Apple eating their own dogfood, knowing it tastes terrible. But I'm just having terrible flashbacks to when Finder was a Carbon app and performed like a dog --- oh, that's where the dogfood analogy comes in, I guess!

That said, I still don't think Marzipan will be a convergence. I believe it's a stopgap. macOS is still the truck compared to iOS devices' cars; you just can't drive a truck using a car engine.
You need objective metrics of two kinds: absolute and relative.

Relative metrics will show if you really are better than most other people. Absolute ones will show whether or not you can, in fact, do X to some standard.

I do not suffer from Imposter Syndrome. That's why. I find measures that show me what I can do, and to heck with all the sturm and drang from most people.
The checks are indeed an added cost, and that’s why I said “almost certainly less efficient” the first time rather than “less efficient”. (But subsequent times I did drop it.)

But what you call “the O(1) operation of adding two items to an array” is simply not true:

① While appending to arrays is normally O(1) in the cases that there is still spare capacity in the array and the entire thing doesn’t need to be reallocated, prepending is O(n) as it has to move all of the subsequent values along.

② What’s happening is not just adding two items to an array, but rather allocating an entire new array and copying all the values into it; this will be roughly O(n), but with a high constant overhead: allocating memory is expensive.

I can’t speak of any Ruby interpreter’s performance on the matter, and I’m fairly confident that the conditionals will be much more expensive there than they would be in Rust (where I have no doubt at all that the conditional version would smoke the allocating version in all cases), but allocating memory is a pretty expensive business.

> Finally, the author doesn’t claim that the special cases are gone

I quote: “The special cases are gone”. Further, I do not grant your response that the processing is blind to them—the inside of the loop is, but the special cases were moved to the boundary conditions of the loop. They’re still there.
It’s frustrating because while your point of view is helpful and feelings are valid it’s entirely misdirected since you don’t reference at all the issues being discussed.
Appending to an array is O(1). Prepending is going to be O(n).
> In 2015, Australian immigration minister Peter Dutton quipped about the fate of the Pacific Islands in the face of climate change, prompting laughter from then-prime minister Tony Abbott.

> "Time doesn't mean anything when you're about to be… you know, have water lapping at your door," Mr Dutton said.

> Mr Morrison, then the social services minister, pointed out to both men that a microphone was above them."

Last week Morrison visited Fiji as Australian PM and, presumably alluding to the above exchange, the Fijian PM said to him:

> "Here in Fiji, climate change is no laughing matter. From where we are sitting, we cannot imagine how the interests of any single industry can be placed above the welfare of Pacific peoples — vulnerable people in the world over."

- From https://www.abc.net.au/news/2019-01-18/climate-change-is-no-...

Hopefully now that aussies are feeling the heat, they'll elect someone who actually cares about climate change. Australia is the worlds largest exporter of coal, and all those chickens are coming home to roost.
> Rejiggering an algorithm so as not to have special cases just puts cognitive load on whoever reads the code to suss out what the original algorithm was.

Sometimes that's how it goes, but other times the special cases were a result of just not knowing the original problem well enough to think of a clean solution that really captures its essence, and the special cases are evidence of a sort of resultant duct taping.

Agreed though, what you're describing definitely happens and I'm not a fan.
Let's say the array is 1m elements...

the "ifs" inside the loop will be correctly predicted for cases 2..999,999

the processing is not "blind" to the new special case: "the array is padded", the loop is 1..size-1, which I think it's an error. Shouldn't be 1..size-2?
Food for thought:

Say Oracle wins. Now android comes with a price tag.

Doesn't that mean, some open source alternatives like FirefoxOS or PostMarketOS will get more mindshare?

A cursory look at all the open source alternatives, shows that they are all based on Linux. So interoperability could be achievable.

It could be whole new world!
Lists like this implicitly assume some baseline good health, an assumption that really is baseless. My health issues are a huge factor in my lack of financial success and public recognition. I'm very good at some things, but my health issues take a lot of my time. It's a huge barrier to accomplishing things, compounded by the poverty it fosters and other factors.
Indeed, in the first example the special cases should really be moved out of the loop too, so you have the code looking like this:

- code for left edge
- code for body
- code for right edge

Now, both you and the machine don't have to keep thinking about the edge cases every time through the loop body. It's a win-win situation.
> but it seems pretty reasonable to me that

It seems pretty reasonable to me that everyone should just give me all their money and I should get a pony. But nobody really cares about my opinion there because I am just making shit up, completely devoid of any factual basis.

> but I don't see any details that preclude that possibility

You are literally working off the linked article that says what charges the prosecutors decided they could probably make stick. Literally, faced with an expert opinion by someone with all the relevant facts, whose job it is to distinguish between these things, you are saying "I don't care because I have my own legal opinions based on my hopes and dreams".

This doesn't strike me as materially different from climate change denial or anti-vaxxing.
Well said. There is a lot of hard-work that goes in defining the right API.

Question for you since you sound knowledgeable: If Oracle wins- can Linux in some way enforce this on Microsoft given Microsoft's work on WSL? Or is that applicable only where there is a taxonomy as you pointed out? My understanding from fosspatents is that it doesn't specifically have to be a taxonomy and even a flat API can be copyrighted (which I agree with since there is work that goes in it...)

Answering it from cwyer's comment on this page- doesn't apply to fair use so WSL is fine.

I would urge people who are looking to get the other side of this argument (pro-Oracle) to also read fosspatents.com. That is a sensationalist blog but the facts presented are very true.
> Friends, reporters, fam: It’s time we journalists all considered disengaging from the daily rhythms of Twitter

Fam? Maybe quality journalism is declining because you’re not spelling words completely. Why?

The author advocates for less use of twitter more “lurking” then I read this...

> [Farhad Manjoo will answer your questions about this column on, yes, Twitter on Thursday at 2:30 p.m. Eastern: @fmanjoo.]
I’m surprised I made it that far down the article.

Thanks, but no thanks NYT.
I'd take cold over hot any day of the week, but when we are talking about extreme cold or extreme hot I'm not sure which is worse?

I guess you could survive longer in extreme heat?
Isn't the "better" code wrong in the first example?

instead of "result = (1...padded.size-1).map do |i|"
shouldn't be "result = (1...padded.size-2).map do |i|"?
Yoi Carrera – Mas Alante Vive Gente
For python we've been using poetry[1] at work.
Dep resolution is a bit slow but otherwise it works well enough, definitely a saner choice than pulling in a completely different stack just for one tool.

[1]: https://poetry.eustace.io/
There are other aspects to Office 365 that are quite valuable to people, like a huge increase in the size of their OneDrive storage quotas, the ability to install Office on multiple devices rather than just one (which is pretty common; people install Office apps connected to their 365 accounts on their mobiles, tablets, etc.), Skype airtime, technical support beyond the first 60 days of purchase, and with certain plans you can share these benefits with a certain number of people.

Aside from that, many businesses with specific Office 365 packages get a number of licences (sometimes unlimited) to assign to staff; so people don't have to buy Office, they get it "free" from work and can install it on something like five or ten devices. Same goes for educational institutions; I'm a teacher, so all the staff AND the students get free access to Office 365, and all the complicated businessy things like Active Directory profiles, SharePoint, Teams (MS' answer to Slack), and so on is included with the same account that I use to install Office on my home Mac, iPhone, and iPad.

So for plenty of people, benefitting from the subscription service in this way, Office is free - no need to buy a perpetual licence.

It's not ridiculous. It might be for your use case, but you can't make a blanket statement that covers everybody.
It really did. It struggled with MobileMe photo streams; in the modern days of iCloud (being free) and Photo Library, iPhoto would have to be renamed to Beachball Simulator.
This is one of those ones I’ll stop and read every time it gets posted.

Bit of trivia: in the novel, “Jurassic Park”, the park’s supercomputer is a Cray, but Spielberg picked a Connection Machine for the movie because he thought it looked cooler.

Also, the artist Karl Sims did some outstanding work using the Connection Machine that was mind blowing for the time, and still pretty darn cool today. The computer itself was part of the art installation:

https://www.karlsims.com/genetic-images.html
I'm fine with doing away with arbitration in most cases, but I'd rather just do that directly.

My point is that it's hard to enforce neutrality, because there is always an implicit incentive for arbitrators to find in favor of big companies. Even if those companies aren't directly choosing a specific arbitrator, big companies in the aggregate are the ones primarily driving the business.
Man, I can imagine the militaries the world over are rubbing their hands in anticipation when watching this. Imagine a perfectly orchestrated swarm of UAVs dealing damage like this (potentially to another swarm).
> Tools for producing things, like free software, CAD software, CNC machines, etc, make it more and more possible for small firms to accomplish great things, while raising the bar for what we consider great things.

I don't think that's true in any practical sense. For example, even with CAD, the cost of designing an airplane continues to skyrocket (even in inflation-adjusted dollars).
200 years of blink stalker meta... Overcoming the local minimum trap is still a thing.
Arrays are not special cases. They have a beginning and an end.

Trying to expand the Array by prepending and appending to it shows lack of knowledge of memory, performance, and maintainability. If loop is refactored away from 'padded', all hell breaks loose 3 months down the line.
Ha-Joong Chang might disagree[0], but okay I’ll dodge the No True Scotsman accusation.

What’s your definition of free market, then?

[0] https://www.independent.co.uk/news/business/comment/ha-joon-...
Funnily enough, that Rust code is actually buggy, because i is a usize and if i == 0 then i-1 will panic due to underflow. You'd have to write

input.get(i.wrapping_sub(1)).unwrap_or(0) + input.get(i+1).unwrap_or(0)

This also technically won't work right if the slice has usize::MAX elements, but that's rather unlikely.

This is one area where Swift's choice of using signed Int for most things actually works quite well. The equivalent Swift code would be something like

(input[safe: i-1] ?? 0) + (input[safe: i+1] ?? 0)

though unfortunately Swift doesn't ship with Array.subscript(safe:) so you have to write that yourself.
The deadweight loss is the net loss to the combined system (producers, consumers, and oracle leech). So if the total surplus of the system was X, and the deadweight loss was (F×Q_e - F×Q_f)/2, the total surplus of the system with oracle is (X - ((F×Q_e - F×Q_f)/2)). This is less than X.

The producers/consumers combined would lose both the oracle tax and the deadweight loss (lack of opportunities that otherwise would have occured).
My biggest takeaway from the article:

"Most people are primarily externally driven; they do what they do because they want to impress other people. This is bad for many reasons, but here are two important ones.

First, you will work on consensus ideas and on consensus career tracks. You will care a lot—much more than you realize—if other people think you’re doing the right thing. This will probably prevent you from doing truly interesting work, and even if you do, someone else would have done it anyway."
I never understood the desire to work on games. Is it because many people get their introduction to software via games (legitimate question)? I remember many of my classmates in my college days were really about entering the gaming industry, and I just never understood why.
Lots of FUD here. Please see cwyers's answer on this page to see that a ruling in favor of Oracle will change little in terms of where software stands today. Almost all the use cases we see are fair use- except Google's where they deliberately harmed the Java ecosystem, the way Microsoft tried in 1998 (PS: Their JIT actually beat Sun's so in that particular case better technology lost because it was illegal)
Ah, I was getting my data from the same site but I forgot to toggle mobile browsers. Wonder why that's not the default option? That's silly.
Why are you throwing NPR into that mix? NPR remains one of the few news sources that goes out of its way to try and get unbiased reporting in the US.

People are people of course, so it’s impossible to be completely unbiased.
Not sure why people sign contracts like that; never sign non competes or this kind of thing. Never did never will. But then again, I am not in the US, maybe it is that different.
Yes! Have you seen the Leica M10-D? Oh man I’d like that.

http://en.leica-camera.com/Photography/Leica-M/Leica-M10-D

No screen. It has a wind lever! (I asked in the shop, it just functions as a thumb-stop. Shame it doesn’t have a true Leica fabric shutter...)
If you're saying the creative value is in the original curation of classes, methods, and interfaces, and that Google could've permissibly rewritten everything with alternative names, that still seems to copy the "soul" of the creative work.

Personally I'm with the perspective that API which has informally become an industry standard should weaken copyright protection.
Here’s the question I have. Will it consistently beat the top player over and over?

I see so much brittleness in AI such as this. Humans are much less prone to “bugs”. In an evolutionary adversarial environment, the human brain invariably comes out on top.
the climate's always changing .. if not nice clean Aus coal exports then S.African brown .. sky is falling in lol .. it's snowing here what global warming lol .. what about Al Gore .. it hasn't warmed since 1996 .. what about the promised ice age .. (etc).

Just thought we should get those out of the way.
Each time you file a motion or a brief, the other side has to review that brief and file a counter-motion or brief. And research has to go into those things and you might spend days trying to come up with the information being requested.

Every request you make from the other side, causes the other side more work and thus more expense.

Imagine I asked you to find a receipt for every restaurant you've eaten at in the last year, along with a list of who was there and what was discussed. How much work is that for you? Would answering that question be a significant amount of work?
My uncle is a perpetual slacker and alcoholic. Last winter he got frost bite on his feet so bad that they ended up amputating both of them. He couldn't be bothered to get up and stoke the fire.

Some people are defective. It's just the truth.
American Tobacco was aggressively and successfully conspiring with other companies to maintain high prices. It's precisely such conspiracies to restrain trade that are specifically prohibited by the Sherman Act.

How is Facebook conspiring to restrain trade? With whom? Would breaking Facebook up result in lower prices for using social media services? The services are already free. Should people expect to get paid for posting selfies?

Breaking up Facebook for its behavior would be like breaking up IBM for age discrimination. It doesn't matter whether it's wrong nor even whether it's illegal. It's neither the function nor intent of anti-trust law to break up companies under such pretenses.
This is the main reason I use DuckDuckGo now. I was something of a Google power user and they kept sending me on endless captcha safaris.

Bye Google.
I automatically prefer the App Store one because:
- I know it will be updated automatically
- Sandboxing prevents many dark patterns that apps use to sell advertisers data
The current fed government is such a laughing stock at this point, it's all but inevitable that the next one will be at least some improvement.
Ask HN: What's the next big challenge in software?
I think we are reaching a maturity stage where we are hitting the limitations of the current wave of "AI". The hype is dying down and reality is setting in that we aren't anywhere near building the singularity. Blockchain and crypto is also facing reality and stabilizing and starting to face real scrutiny over it's utility. What do you think the next big trend will be for the upcoming decade?
In imperfect information games (like SC2) the outcome prediction implicitly takes into account the unknown.
Given what it has observed and what it has not observed, it is essentially comparing the present state to similar situations from the past.

You can see this in the replay-- at seemingly random times, its outcome prediction jumps up, even when it hasn't had any interaction with its opponent.
But that's precisely why it's going up-- it notices that its opponent has not executed a faster rush or cheese that it's unprepared for, hasn't expanded early, and the scout has not been destroyed.

Similarly, after having won a fight, the worst thing that could happen is that a bigger force emerge from your opponents base, destroying your army and giving them a chance to rebuild.
When that does not happen, you know that your opponent probably doesn't have such an army (because otherwise they are falling behind in resources due to being bottled up).
Either way, after a certain point it's worthwhile to press on to cause more damage, because you're now far enough ahead in resources that you will win regardless if they manage to repel that particular attack.
This one is totally worth bringing up once a year forever.

In general I’m a huge fan of the Long Now organization. What they do really is worth your time and attention. Go through the archives. You’ll find so much of what you wish TED could be.