skysight-inc/HackerNews huggingface dataset:
I’ve been conflicted about using verbose names or symbols for mathematical expressions in code, and I don’t think there’s an easy answer for when to use them. For simple arithmetic expressions, it seems like verbose names are superior because it’s easier to derive their meaning and we already understand the operators at play. When translating complex expressions, however, we usually a priori understand the meaning of the expression with our algebraic mental model and it makes sense to use that nomenclature. At the same time though, someone who is unfamiliar with the particular source of the algebra used would find such code quite opaque. For something like the Box-Cox transform I think it makes sense to use the symbols widely employed by the mathematical nomenclature.

This certainly also depends on the language you are using and the ability to define arbitrary in/postfix operations.

It’s also rather annoying to type them, but that’s also probably because I just haven’t developed a workflow for it.
Following links in your 1), I liked https://www.cs.hmc.edu/~oneill/papers/Sieve-JFP.pdf 'The Genuine Sieve of Eratosthenes' by Melissa E. O’Neill. Somewhat damning and to your point.

Are there any theoretical barriers to writing algorithms in a pure and lazy language with the same space/time complexity as a side-effectful and strict language? I suppose quicksort (also mentioned) is an obvious candidate for study in this regard.
> It is hard to convey how “sustainable” this feels to me. For the first time, humans have gone into orbit in a spacecraft that was designed from the ground up to be a commercial venture.

I understand your sentiment, but I’m also profoundly unsettled by the idea that commerce and capitalism are reaching beyond the clutches of our planet. Today is definitely a threshold, but what that threshold means, in a broader sense, is not clear to me.

As liberals we celebrate the entrepreneurial slam-dunk and as technologists we admire the elegant engineering.

But maybe I’m jaded, but I fear the profit motive is going too far. We live in a truly extraordinary moment socioeconomically. Never before in the history of mankind had so much activity been predicated upon commercial viability — and never before had so much gone undone simply because it is unprofitable.

Spacefaring nations’ governments have not abdicated spaceflight, and indeed they’re likely to militarise their approach ever more. But now we have private enterprise ferrying people up there too.

“Sustainable”... what a funny word. When have commercial ventures ever been “sustainable”? A sustainable commercial venture tends to be one that externalises most of its costs (look at the sustainability of bulwarks of 20th century commercial ventures, such as the automotive industry and its bedfellow oil & gas).

I will say I’m glad that manned spaceflight is no longer the prerogative of a couple of extraordinarily well-heeled superpowers. But...
Another approach you might try is to start with a rotator, then mask off the leading or trailing bits for right or left shifts. (Rotate right by X is the same as rotate left by N-X.)
Josh, Gerben!

Have you tried a sorting network, instead of the bubble sort?
Disclaimer: I'm not a lawyer and this is not legal advice.

I've added a clarification separately, please take a look there first: https://news.ycombinator.com/item?id=23365469

> The point is that when a non-Googler contributes code, it’s non-proprietary since the non-Googler is by definition a non-Googler.

I think we are using different definitions of "proprietary". I'm using it to mean "non-open-source" [1], and you're using it to mean "employed by a specific company" (or something else); can you please clarify what you mean or rephrase what you're trying to say?

> What the CLA does not prohibit is proprietary use—- your lengthy answer. The OP makes the point that Google will find a way to use public contributions for Google’s own profit.

That's not the purpose of a CLA; that's the purpose of a project's license. That was the point of my post. Anyone can take a project with an Apache/BSD/MIT license (whether or not the project has a CLA, it's orthogonal), make a proprietary product from it, distribute it, sell it, etc. and they would be just fine doing it, without also sharing any of the source.

To put it another way, a CLA cannot restrict proprietary or commercial use of a patch or contribution, if the underlying project license is Apache/BSD/MIT, because all those licenses already allow commercial use, incorporating software into proprietary / closed-source products, etc. Such a CLA would be incompatible with the project's license.

I've never seen an Apache/BSD/MIT project where the CLA (and only the CLA) prohibits commercial / proprietary / closed-source or any other use cases — if you have an example or two, could you please point them out? I'm very curious to see how this would work in practice, because this seems like a strong contradiction, so I would be interested to see how this plays out in practice.

[1] https://en.wikipedia.org/wiki/Proprietary_software
This post is already about unrelated cleanup, so I'm not sure what other escape hatch you imagine people taking. Do you have a suggestion?

You can tell that it's unrelated cleanup because if it were related, then the cost of freeing wouldn't be noteworthy. It would be cache hot because you would be visiting it for the second time. In which case we'd be talking about why you are scanning a giant object on an event loop in the first place. That's not what's at issue. What's at issue is that you've been handed this great bomb of uncached data from someone else and now you're stuck doing the janitorial work.

Freeing an object of arbitrary size is effectively an unbounded operation. Cache invalidation has a very high cost, sure, but it's still bounded.

Putting a limit on the amount of work you do, you could stop before purging the entire cache. You could use a smaller limit on doing work for someone else and control invalidation there, too.
Nice... I had this one kicking around in my head

https://www.youtube.com/watch?v=N7DZcRFbSSQ
The list of 'what' to learn is the list itself, with the exception of the unknown unknowns which will become known unknowns when encountered. This to me IS learning. Still reads like a rant after being faced with more learning than hoped.

- How do I install it?
- Which editor? IDE? Vim plugin?
- How do I.. read a file? parse JSON? environment variables?

How do I do any of the things that aren’t part of the core syntax/semantics but are super common problems people face every day? I’m going to have to memorize another 100 functions and their parameters, aren’t I?

- What are the language quirks that will cost me an hour to discover?
- How is the help organized?
- I hit problem X.
- How do I debug?
- Testing.
- How do I build? package? manage environment?
- Package management.
- So… the language community.

Is it worth it? For most languages the answer will be "No", for others unless you've already really gotten into several very different ones you won't know.
Concatenate it into an amalgamated unit at build time, then. This only adds a style requirement in that you can't use linking to enforce namespacing.
I was in choirs growing up, and the one thing any singing teacher will start you with is: learning how to breathe from your diaphragm.

If you need a place to get started, you might just look for a few YouTube videos or tutorials about that. It gives you extra volumes of breath, so you can belt out the notes and hold them longer. Everything else follows from that.
MSDN Library on CD anyone?
They didn't scale up the factory (or more likely the warehouse) because they knew the price would never be allowed to rise enough to pay off the investment. You have to charge extra for dipping into reserve capacity if you're going to compete with the leanest vendors who have none.
Monopolies aren’t illegal; it’s the use of monopoly power in corrupt ways that’s illegal.

I suspect if you don’t want to deal with Apple or Google directly, you can create web apps.
It appears San Jose took a strong stance at least at one point:

https://www.mercurynews.com/2020/03/18/coronavirus-san-jose-...

Not sure the current status, but I'm sure a lot of lawsuits happened.
The Ethernet cable scissor test success made me laugh :D.
We agree on the general weak suitability of http codes to convey application layer status, but I kind of disagree on the 503 because it implies an overload and an internal error, which is not the case. Also I really believe the resource not a available is as accurate as it gets.
In the end I agree with you we may be splitting hairs with a very unsuitable status report and should just send 200 with the error. I have done this before actually, but it tickles my neck a lot to see an OK, then error.
SpaceX Sends Astronauts into Orbit
In college a teacher asked us if programming was an art. There is the element of creation, copying and some may say beauty. The artist or programmer in this case use their knowledge, creativity and experience to create something new intangible and subjective appreciation but results can be life changing or solve a really complex problem. In terms of boredom this is subjective sometimes I find it really fun try to solve a problem or fix a bug
We simply need capable egomaniacs to move society forward via exploration. The type of people that shrug at loss of life and say "That's the cost of exploration. Next?" and then somehow motivate a whole slew of people to dedicate their lives to trying again. Not sure he'd do this if life was lost but he does ask for the type of efforts/sacrifices few are willing to give that most view as unspeakable. I say this knowing people at both SpaceX and Tesla.
I can't imagine the thought process that feels that the IP being owned by a private company who answers to no one and has no accountability to anyone is 'more sustainable' than it being owned by the public through a non-military organization (NASA)...
Only if it is dynamically linked
So many cheeky touches! It's such a different vibe than the NASA launches of old. It's old news but I still was caught off guard by announcers flatly referring to "Of Course I Still Love You"

EDIT this is not a criticism, I really like it. Maybe "cheeky" is the wrong term, I'm bad with Anglicisms
Since the larger case was using QuickSort, it seems.
Correctness means adherence to the spec, not some contrived absolute truth.
Do I need to read a book of over 220 pages to solve a simple logic problem? This is the problem:

1. Constitution gives a right: "Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof"

2. A law restricts the right

3. A law cannot disobey the Constitution.

4. Everyone thinks this is fine, including SCOTUS.

You don't have to be Vulcan to see logic is broken.
Apparently not here in the US. :(
If you define

inline bool swap_if(
bool c, int& a, int& b)
{
int ta = a, tb = b;
a = c ? tb : ta;
b = c ? ta : tb;
return c;
}

and then use it in partition's inner loop like

right += swap_if(
*left < pivot,
*left, *right);

..., compiled with Clang (which generates `cmov` instructions), a simplest-possible quicksort is more than twice as fast as `std::sort`. Then you can doctor up the endgame with heapsort, insertion sort, even bubble sort if you like, and get an incremental improvement.

But using AVX machinery to implement an optimal sorting network for small arrays is faster, if you are sorting scalars. See <https://arxiv.org/abs/1704.08579>

A fully general swap_if,

template <typename T>
bool swap_if(
bool c, T& a, T& b)
{
T v[2] = { a, b };
b = v[c], a = v[1-c];
return c;
}

could and should be peephole-optimized to use a pair of `cmov` instructions, but is not in Clang, Gcc, Icc, or MSVC. But even without such an optimization, it makes Quicksort much faster than std::sort. It is slower than the cmov version probably because it costs more L1-bus traffic.

(Gcc, incidentally, is very, very sensitive to details of this version. Change the order of assigning a and b, or use `[!c]` in place of `[1-c]`, and it gets much slower, on Intel, for very non-(to me-)obvious reasons. Gcc also will never, ever produce two `cmov` instructions in a basic block. I have filed a bug.)

Another formulation is

template <>
bool swap_if(
bool c, int& a, int& b)
{
int ta = a, tb = b;
a = -c&tb | c-1&ta;
b = c-1&ta | -c&tb;
return c;
}

which Clang also optimizes to a pair of `cmov` instructions. Gcc (like Icc and MSVC) emits the literal and/and/or instructions, which is also faster than std::sort, but less so than the array version.

If `swap_if` were in the Standard Library, it would probably be implemented optimally on all compilers, and almost half of the Standard algorithms could use it to get, often, ~2x performance improvement.

A partition using AVX machinery is potentially much faster, although not as much faster as one might hope. See

<https://bits.houmus.org/2020-02-02/this-goes-to-eleven-pt5>

That took much of a year to implement. AVX512 instructions enable even better optimizations, but AVX512 might not come out in AMD until Zen-4. (We are at Zen-2 now.)
> There is nothing wrong with this function. Really. It does exactly what it should do with the least amount of code. In fact, this is probably what I want to deploy in production as well. But, it is inflexible.

It does one well-defined thing, and does it well! That's the good kind of 'inflexible'.

> A skillful programmer looks at the problem and says, hey, why don't we build an abstraction layer to make it more flexible?

In this example, the additional complexity just doesn't seem justified. You ain't gonna need it. [0] Unnecessary abstractions cause bugs, bloat, and baggage. The article then goes on to acknowledge this, but I really question the chosen example.

> Just having these few abstractions opens up a lot of possibilities. Why? Let’s suppose that you have 3 different kinds of fetchers and 3 kinds of notifiers. Now, you can easily compose 3 x 3 = 9 different kinds of health checks.

You've just introduced an exponential explosion into your testing burden. The pay-off: additional functionality that might be useful later.

edit On reflection I suppose it's not a 'exponential explosion', it's merely a 'multiplicative explosion'.

> Enjoy your programming life. It's a fun art!

The article doesn't go into detail on what it means here, but the more serious the software work, the less the artistic mindset applies. [1]

I think the most sensible approach to software engineering is to draw satisfaction from solving a challenging problem well. Things like 'programmer freedom' strike me as false idols.

That said, I'm a sucker for elegance (a famously subjective commodity), so maybe I'm a hypocrite.

[0] https://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it

[1] https://www.fastcompany.com/28121/they-write-right-stuff
You're not converting a historic date though, you're converting a future date. And that's an inherently uncertain process. It is literally impossible to know what UTC time 2021-07-29T15:35:00 IST refers to until it happens. The Indian government is free to redefine IST as they wish, and could choose to do that at 15:34:59.
"Middle of the afternoon" .. for who?
The problem arises because the government is not supposed to judge the merit, efficacy, or importance/value of a otherwise lawful religious practice.

The government needs a neutral independent reason that withstands strict scrutiny to regulate religion. For example, building fire codes can apply to religious buildings. But many zoning ordinances have to exempt religious buildings.

Here the government is saying some commercial activities, like grocery stores are more important than going to church.

The SCOTUS order is side-stepping the issue by trying to categorize religious practice as similar to going to see a movie.

It would be interesting to see how the court would have ruled on an appeal of a fully developed case. Here, since they are evaluating an emergency stay order, rather than a fully developed case, I think they were comfortable cutting some corners.
Stop working for Palantir (and other surveillance capitalists like Google and the like), but particularly Palantir, they work with police departments the US [0] [1].

Use your software skills to help activists instead and do not work for the enemy.

[0] https://boingboing.net/2019/07/12/leaked-palantir-gotham.htm...

[1] https://www.vice.com/en_us/article/9kx4z8/revealed-this-is-p...
I quoted the text already a few times; it is broad enough to include free practice. Do you disagree?
New app allowing uninsured people to get urgent care
The cost would not increase linearly for 8 people. Dragon 2 was originally designed for 7, NASA requested it be configured for 4. If they wanted to go to 7, my guess is it would be a pretty marginal increase in cost.

The shuttle didn't have any real abort capabilities (other than very late in the flight, when they were already in space, just not in the correct orbit). It had some crazy schemes for earlier stages of flight, but they were never tested, and no one actually thought they would work.
Yeah I noticed that trend too. :( It’s a shame because we had both and the van is just so much easier for hauling 6 people than any SUV out there.
Is it any quieter than gas engines? Last time I flew in a Cessna, the propeller was bone-jarringly loud.
Good Clojure and Ruby code, in that order, is the closest to art. Structure and Interpretation of Computer Programs (SICP) also deals with abstraction so elegantly you could consider it art.
Could you be more specific on this point? From my perspective, it’s always all the mainstream languages that are copying things from Haskell.
Americans even lack the capacity to be humiliated about the facts: free market unpreparedness, and slow to react; government unpreparedness, slow to react and frequently in denial; the death toll itself. Are Americans just overwhelmed with the obvious extent of the incompetency? Or is it cognitive dissonance?

While Italy was at it's peak, Americans seemed to be "won't happen here, we're just better at this." At every turn there's goal post shifting. Oh well, they're just old people. Oh well, they just have pre-existing conditions. Oh well, whataboutism traffic accidents. Oh well, the economy matters more.

Of all the things America seems to have lost, it's honesty. It can't even self-assess, let alone self-correct. For anything.
Maybe intercontinental travel?

I was watching the launch live stream and at one point, they said, "if they abort in this zone, the crew will land just off the coast of Ireland". That was like 9 minutes after liftoff!

So if I understand that correctly, if you go to space, you can travel from Florida to Ireland in ~20 minutes?
I wrote a beginners guide to Kubernetes
It's the Tesla approach, form > function.
> brown-nosing speech towards the end of broadcast

Was there any truth to the claims made that Trump has been exceptional in space support?
An ultra-thin clamshell mobile smartphone device with a fully tactile keyboard
> I also enjoy nonfiction podcasts, and talks which I play at 1.5x speed while doing things like bike riding, or cleaning.

Listening to a podcast or audio book while doing monotonous tasks is both life changing and addictive.
So you're saying even in space we can't escape Electron?
I have followed all the news about Dragon's development for a while but having just watched the live tour of the internal area of the capsule... that was just crazy. It currently has a 4 seat layout (despite supporting up to 7 IIRC) and one of the guys performed a "backflip" in the free space. It's really ridiculous.
I purchased a subscription to CR. I trust their reviews, but they’re very limited. I want a new lawn mower, but their top rated mower isn’t available any more.
Aren't physical buttons that you can feel with your touch safer than touch screens?
They wanted to stay fully open, not curbside delivery.
This is such a brilliant comment: "so you don't develop bad habits."

I went to Japan as an exchange student when I was 16. I had never studied Japanese at all. The thing that surprised me the most was how hard it was for foreign students to unlearn the bad things they learned inside their American classrooms by listening to their friends.

Most of them picked up bad pronunciations, bad grammar practices. Even if they were diligent (which is being generous for the high students they sent over with me), they would hear other students speaking in ways that made sense to them from their perspective of how English works. They would hear and repeat Japanese words in the bad pronunciation style their friends in class did, and those ways make sense. But, none of those practices were what Japanese people did.

I often remark on how fortunate I felt to have only learned Japanese in a setting where I only heard correct pronunciation and heard statements made by natives. In three months I was ahead of others who had studied back in the US for two or three years or more.

I would really love to see if anyone has studied this effect inside the world of software engineering. We pride ourselves in the hacker culture where self-directed learners are glamorized, but I wonder whether having good teachers and getting good feedback early on would make a large or small difference long term. This could be a startling alternative to the "naturally brilliant prodigy" stories we always hear.
I am not looking for a solution for a problem that is not mine. I am looking to understand how people see the Constitution is ignored (not sure what is the right term) and feel fine about that. My line of thought is that everything in the Constitution can be ignored in the same way, so it is completely worthless and no right does really exist because it can be revoked by a law or government statute at any point. People loosing rights is a matter of principle, I could not care less about churches in California, I am not affected in any way.
The story I heard (link below) is that a Japanese fashion businessman wanted to fly his entourage around the moon and back.
https://apnews.com/ef359e63b98b4263b4ac0eea28988538/SpaceX's...
I find football/baseball games to be incredibly boring. I posit that successful ball players must be highly resistant to boredom.
The droneship landings always cut out. The rocket interferes with the radio link transmitting the video feed.
I don't know much about the intricacies of asteroid mining, but human beings are very capable entities. As great as machines like the Mars rovers are, there's no comparison. A human astronaut could probably accomplish as much in a week as a Mars rover can in a year. When I was reading the daily diaries of one of the rover drivers, it was incredible how much effort and thought went into the most trivial activities. A simple sounding task like "go look at that rock 20 meters away and take a picture of it" would be a multi-day effort, whereas it would only take an astronaut a few minutes
I'd tried Octant but found it rather slow for general use and went back to kubectl. With k9s however I use it extensively as it's so much quicker to get stuff done.

I do have it aliased to k9s --readonly by default to protect me from myself.
Toward Rethinking Self-Defense in a Racist Culture
The people deserves to know the externalities of such practices of the animals agriculture business.

Why is it that main stream news is so afraid of exposing stuff like this ?
Yes, but this was after the internet.