skysight-inc/HackerNews huggingface dataset:
"Personally, I find that ternary example you posted to be terrible code."

It's not about the line count, it's about expressing the main idea clearly and succinctly, which this code does.

My nitpick would be with the language constructs themselves. The ternary operator is simply a crutch for lack of an if-then expression returning a value.

if a < b then -1 elsif a > b then 1 else 0

Or can add some white space to make the structure a little more clear:

if a < b then
-1
elsif a > b then
1
else
0
end

Expressions like the ternary operator micro-optimize by replacing tokens recognizable as natural language words with arbitrary punctuation. But that's a language level complaint, which you generally don't have any control over once you've started the project or when editing existing code.
the cookie permission popup is impossible to close
Part of the reason I want to see massive populated orbitals and an economy develop in space is because I want to see this planet do better. We need a hope that isn't delineated by having a global government that enforces the number of children people have and having somewhere else to go is one of the long term solutions that could avoid this.

We could also bet on everyone becoming socially responsible, but while people are waiting for that to occur, I suggest we get really good at asteroid mining.
That didn't seem to happen after the 2008 financial crash - the rich were bailed out by Quantative Easing while the poor lost their homes and had to suffer the taxes and austerity to bail out the rich.
Having done time in state and federal prisons, I chuckle at this. A prisoner who befriended me when I first went to federal prison told me, "The only guys who get hurt in prison are the ones who deserve it."

It boils down to a simple set of rules for surviving prison:

1. Be very respectful of everyone. You don't have to be friends, but you need to be courteous when it is required and practice avoidance when that is required, also.

2. Don't associate with the wrong crowd. In the federal pen, a new convict started hanging out with the AB's (a white supremacist gang). About 7 months later, someone in the law library stumbled across the new guy's case during some research. The new guy was in for running a child prostitution ring. The AB's murdered the new guy. They really didn't have a choice in the matter, as they would be seen as weak to the other gangs if they didn't.

3. Take care of your own problems. If someone disrespects you, you sometimes have to man up (after trying to resolve the issue with the gang bosses) and fight the guy. Typically in this situation it is a fist fight. Even if you get your ass beat, the whole population will respect you better because you don't take crap.

4. Don't ever, ever, ever (did I emphasize this enough?) go into debt to any other convict. Not for drugs. Not for alcohol. Not for cigarettes. Not for anything. This always ends bad, with either a knife in your kidney or you exposing your family on the outside to extortion. It is hard to get out of debt on prison income, and very easy to borrow from a friendly loan shark.

5. Get your routine and stick to it. It makes the time go faster. It helps you stay clear of the chaotic elements of prison population.

6. Hear nothing, see nothing. Don't spread rumors. If you get pegged as a "rat"/"snitch", you will never shake it, and your life will become pure hell during your entire prison stay.

Those are the main ones for avoiding 97% of trouble in prison.
Agreed. And you are right. I made these numbers up; and I ca n imagine a scenario that would allow MOST of the planet to go green and we can stop the damage. But in my scenario, what if that 20% are countries like China and Russia; that produce and consume alot of energy. Just a thought experiment. My point is, we have to have the whole world be on the same page to solve the real issues that would cause us to continue to ruin our environment; even when we KNOW we are doing it (aka govt, military, corps know the truth and still continue on). This is a psychological problem. Do you agree?
An asset is just anything that has value that can be bought and sold. Those are all depreciating assets, but they're assets nonetheless. Are you thinking of securities?
This is my solution for my home line:

https://imgur.com/eLFvavS

Note the ANI check. There are a couple extremely aggressive callers that I’ve had to blacklist their exchange to keep them from leaving weekly voicemail. The most recent is a company who calls monthly insisting I won a car, that this is their final attempt to reach me, that they aren’t a telemarketer, and that they are aware of the Do Not Call list.

For my cell, Google Voice seems to be working well enough for now. I do wish iOS had a voip app that was worth a damn, and that iOS would let you choose a custom app for outbound dialing. The Google Voice iOS app frankly stinks.
Very common in my experience. In 16 years and 4 different companies, I've only worked on 2 projects (of dozons) that had a well established test process. The 2 projects in question were also, coincidentally, the only greenfield projects I've worked on. Almost everything else has been legacy enterprise stuff.

Most places have had some kind of review process, but not all. My current job has no tests, no reviews, and no restrictions on committing to trunk/master.

The funny thing is, I haven't noticed that big of a difference in software quality, but the places with no tests/reviews are way more productive.

Your milage, of course, may very.
Desktop Analyst Product and Development Team – SME Telehealth Project
For the purpose it was intended (i.e. mathematical analysis of the notion of "computation") it's not worse. It is, in fact, far superior to almost any other system like that.

The point of lambda calculus isn't to be able to program servers or whatever. The point is to be able to express ideas like beta-reduction and Y-combinators in a succint way, and a way that's easy to manipulate with a pencil (or chalk). "Notation as a tool of thought", and all that. Turing machines are similar: they're excellent for modeling computation, but you wouldn't want to use it for actual programming. It's not made for that.

As someone else said: the fact that it is so remarkably close to several actual programming languages is pretty astonishing, and shows that there really is some deep brilliance to Church's original formulation. Turing is more famous for his machines, but it's interesting to note that while no programming language resembles a "raw" Turing machine, MANY languages resemble lambda calculus.

EDIT: to answer your actual question: it's worse than Lisp or JavaScript in any number of ways. There's no state, there's no "I/O" as such, no loops, no function names (well, sortof), no strings, etc, etc. And oh, btw: no numbers. All numbers in lambda calculus is defined in terms of functions, htere's no such thing as a "numeric literal".

As I said: it's not made for actual programming. Doing actual programming in lambda calculus is like trying to use the Peano axioms to calculate how much money you need to pay in the supermarket.
Apple braces for EU investigation after Spotify complaint
Hopefully we survive a lot longer than centuries! That's not very long. We should be pushing for space exportation of the human race if we're actually to survive at cosmic scales.

> It will get gorier and nastier, but we will stay alive at all costs.

By nearly every metric, humans are better off today than they ever have been in the past. Why do you think this trend will not only stop but reverse itself? Technology is a great boon to humanity and it keeps getting better.

I think the welfare of non-domesticated mammals is an entirely different conversation to this one. I will say that evolution is always going to happen and there have been numerous mass extinction events in the past. Whether through astrological, geological or biological means, there will be black swans that greatly impact life on earth. Human culture is certainly among those.
From what I understand psilocybin is sort of like melatonin in that you get no added benefit from taking more than the dose that has the intended effect. You won't die from taking too much of either. It's easier to OD and die on water than either of those substances, and at that point, isn't the definition of abuse becoming a bit too broad?
what is the solution to deal with all of the inorganic/e-waste that are in most people's bodies these days (pacemakers, artificial hips, etc.)
Maybe phones should have a whitelist feature.

Only allow my contacts to call me and anyone else hears a message saying they must text me first to be added to the whitelist.
The “Two-Income Trap” stuff is clearly incorrect
Ah the backpacking in India, so much Type II. The horrible smell of the cities in the heat, pushy cab drivers, hard negotiations with shop owners, the noise, the constant sweat. Basically full time continuous attack on all senses. Travelling in fetal position on tiny bus seats for 12 hours with 1 short break. Or on rooftop for many hours, seeing burned buses and cars on the side of the road. The list is endless.

How did I survive that? When can I come back to it?
Writing code compatible with Python 2 and 3 has been possible for over 5 years.

Dropbox migrated to Python 3.[1] So did Instagram.

[1] https://blogs.dropbox.com/tech/2019/02/incrementally-migrati...
I'm fairly sure that we as a community can come up with an objective measure for the phrase "clever code". Something like: Exploits implicit and/or hidden details to correctly function.

However, I've never seen a convincing and objective description of clear code.

Sometimes people mean that clear code is verbose code.

Sometimes people mean that clear code is uniformly formatted code. [For best results we should manually format the code the same. This builds character. Automatically formatting will not be considered.]

Similarly, sometimes people mean code smells are unfamiliar code. Or that code smells are patterns that they misused once and it bit them.

Objective methods of describing the ability for people to comprehend code when all else is equal do not exist as far as I have been able to see. The best we have is cyclomatic complexity, but there's some reason to believe that line count may be a better indicator (which can't be good). And cyclomatic complexity completely misses the effect of mutable or immutable state, the presence of bad APIs, poor variable naming, etc.
This is pretty cool for teaching Arduino, but most fighting robot builders on a budget use HobbyKing/Turnigy remote control systems. These are purpose built for this kind of thing, quite reliable, and cheap, especially if you wait for a sale.
True, but that is not the general use case.

Even with hard drugs such as cocaine the vast majority of people take it recreationally without falling into an addiction.

I don't have a good link to share right now except for these Joe Rogan shows with Dr. Carl Hart:

https://www.youtube.com/watch?v=T5jMC8j7ElI

https://www.youtube.com/watch?v=SMsquUcea-E
I hope bcachefs is ready soon as another alternative.
I enjoyed Benjamin Pierce's book Types and Programming Languages:

https://www.cis.upenn.edu/~bcpierce/tapl/

He provides theory and code that starts from untyped lambda calculus and progresses to typed lambda calculus, system F, and higher-order system. Note, the article above was written by Barendregt who summarized high-order systems in terms of the "lambda cube". The Pierce book provides enough theory and context to understand why that's important by the time he gets to it in chapter 30.
I am sorry to hear this. I really do not understand why schools and parents don't support this kind of stuff. It teaches them so much more than just robotics. 20 kids seems like a lot. I try to keep my clubs small in order to keep it manageable.
'Denial of service' attack caused grid cyber disruption: DOE
Dropbox migrated their desktop client code to Python 3.
This argument doesn't work if you believe that not everything has to be type 1 fun- that is, we don't always need to be doing things that are pleasurable in the moment in order to be "happy".

For example, learning a skill to an advanced degree. Moment by moment it's not type 1 fun, but as you progress and look back, you realize that you've grown and improved. It -does- make me happy to see how far I've progressed in the hobbies/studying that I've invested a lot of time in. Conversely, seeing how much time I wasted doing "type 1" things all the time a few years ago makes me somewhat sad.

Consistently playing the slots [highly engineered products designed to be addictive] has to do with addiction and dopamine rushes when you get a hit. I wouldn't categorize that as the same as doing things like hiking or whatnot.
> China and Russia

Well, that's already over 20% of the world population!
One of the best low budget cult/ sci fi movies ever made:

https://en.wikipedia.org/wiki/The_Endless_(film)
Bodies could be put into cold storage if a delay for burial were needed.
> Spring was a much better framework than Java EE

You can't compare these frameworks. They're in entirely different spaces, with different requirements and constraints.
For reference: https://news.ycombinator.com/item?id=19839665

Users can flag articles, with enough flags it get killed. You can vouch the article, enough vouches can unkill it.

If vouching is not enough, you can email the mods hn@ycombinator.com , they usually reply soon. (Remember to send a link to the dead thread, and a short explanation like the one you posted here. (But avoid the part "presumably without reading the article"))
It's not really my suggestion though, it's just what Rust does (inherited from Haskell, interestingly enough OCaml does not do that) and I figured I'd post "proper" rust code rather than a bastardisation.
Thanks! It would be good to get this as part of the official doc.

I can follow along with almost any language if there is enough examples I can piece together. I didn't think about scrolling through a bunch of GitHub pages. It isn't as convenient, but probably a better example of how to put together a full program as well as style.
They're not quite contradictory: notice that Amazon doesn't claim that they actively look for offenders; just that once they become aware of them, they'll take action. Though I'd argue that their "Safety is important" language is indeed bullshit.

I've been shifting my buying away from Amazon toward smaller niche retailers that actually manage their own inventory. When I do opt for a free-for-all marketplace, I've found eBay to have a much more trustworthy reputation system.
What language? Those are different types.
thanks for roughly pointing me in the right direction, but at http://super-memory.com/help/fi.htm it states:

>It is difficult to determine exactly what forgetting index brings the highest acquisition rate. Simulation experiments have consistently pointed to the value of 25-30%. You can even plot speed-vs.-forgetting graph using your own actual learning material in SuperMemo 98 or later using Tools : Statistics : Simulation. You will probably also arrive at similar results

How can simulation provide us with actual real world data?

How do we know that the forgetting index sweet spot is independent of the number or even history of recall attempts? If I write R to denote remembered and F as forgotten, then I can imagine RRF, RFR, FRR (variable ordering of failures for a constant recall rate), and RRF, RFF, FFF (variable retention rate for different factoids), and R, RR, RRR (number of recall attempts) to influence the sweet spot level.

Does Anki support plotting plotting such a user's graph? If it does I might consider rewriting the code such that it can generate multiple plots (to find sweet spot at N-th recall attempt, N-th recall attempt with M succesful out of N-1 previous recall attempts, ...)

in the above "simulation experiments" links to http://super-memory.com/articles/theory.htm#maximum%20speed

which doesn't describe any simulation, but just shows a plot, presumably generated by supermemo statistics for an individual?

If someone has a large homogenous set of Anki cards, I'd like to experiment myself. Perhaps vocabulary of a foreign language? If I'm going to use a vocabulary dataset, I'd need a dataset where the responses are sense disambiguated though (i.e. the sense in parentheses), otherwise I am cramming wrong associations.
Very disappointing, clearly they used the wrong deck back, it was all about that palm tree with the sun that had the easter egg smiley face. ;-)
Not sure how that proves "meat is unhealthy - period." This study specifically calls out red meat and processed meat. It says nothing about poultry or fish. Did you read the entire abstract?

> The association has not always been noted with red meat, and it has been absent with white meat.

So white meat is fine. Furthermore, the protein need is so great that for those over 70, restrictive recommendations should not be applied:

> Restrictive recommendations should not be applied to subjects above about 70 years of age, as the studies quoted herein did not examine this age group, and the inclusion of sufficient protein supply (e. g. in the form of meat) is particularly important in the elderly.

So, pretty obviously shown from your own source that "meat is unhealthy - period" is a false claim.
People who were old enough to remember the 60s are older than you think. People getting into senior levels now would be closer to Generation X than Baby Boomers.
Marcus Aurelius Meditations: A New Translation by Gregory Hays.

The Discourses of Epictetus
Phone is bundled malware that came with my handheld computing device that is not easily removed. I am not really sure what it is for.
Highly naive picture of germanys pragmatic situation - basically nobody is registered much less unionized and trafficking is everywhere.
I don’t believe in a soul in the classical sense. I believe consciousness (which many people attribute as being part of the soul) is just a complicated loop of observe-interpret-act-reflect, which I suppose is programmed by our experiences during our life.

Intelligence in the sense that you’re describing it is basically the increasing complication of a system that adapts to its environment.

So I would say cells by that definition do have intelligence, but it’s not complex.

I do think an emergent property of complexity is consciousness, but the “soul” as many people think of it is more than just consciousness. The idea of the soul as something detached from the body and non-transient is just wishful thinking.
There is not an additional sin tax on it, is what I believe they were saying
But pretending that we have no impact or control of any kind in the process of evolution on Earth is just an attempt wash our hands of responsibility.

Intelligence can be humanity's evolutionary advantage. But that does not mean humanity is the final arbiter of evolution, even of its own, at least at this stage of development. To think that humanity exists outside evolution, or that humanity's intelligence is not the result of evolution, is hubris, instead of being subject to evolution's "successes" and "failures". It's just as likely that our "intelligence" ends up being an evolutionary disadvantage if we end up making ourselves extinct, as being an evolutionary advantage. Yes, we'd have to take responsibility for that, but then I guess we pay the ultimate price,
It is really hard on maintainers. I think a lot of it is that old adage "It takes 10 positive things to counteract one negative one." And, for some reason, people on the Internet can choose to have any alternate persona they want, and what do they choose? The shittiest person imaginable.

There was a really good Keynote by Brett Cannon last year at PyCon about how hard, emotionally, maintaining OSS is: https://youtu.be/tzFWz5fiVKU?t=3259 -- Unfortunately the official post is buried after 50 minutes of lightning talks. He gets very emotional on stage. I was sitting with him before he gave this talk, it was a very hard talk for him to give, and so very important.

My own story like this: I took over maintenance of a module that had been abandoned, but after the better part of a decade I ran into a time in my life where I have little time for it. It had been languishing, but someone finally offered to help out on the maintenance. Great! I added them to the github project, they started triaging issues, and within a day this guy started spitting vitriol at the new maintainer.

I called this guy out, but he doubled down. I just locked the issue and moved on with my life. But this guy tracked me down and sent me an e-mail to my personal e-mail full of expletives. Followed quickly by an apology:

"I'm sorry, I didn't mean to send that e-mail from my work e-mail address, please don't get me fired."

Literally: No apology for being a jerk, just begging me not to share that exchange with their employer. All of the github comments he had made were removed or severely edited.

And... That person who offered to maintain that module? That was the last time they touched it.
From Dead Code to Company: The FullCalendar JavaScript Lib Turns 10
How is this relevant? This was mostly an economic war, and number on addictions and suffering are unavailable, unreliable, or in a very different society.

And I'm not expecting China to invade the US if the US legalized opium.
I find it interesting to see so much emphasis on small syntax nit-picking while totally forgetting the large scale question.

Although I've used a ternary operator or 'if' statement from time to time, in general I would like to model the boundrary conditions themselves and separate condition and action (reduces coupling and enhances the possibility of reporting what is going on).

In your case, the a < b statement is most likely part of the natural ordering of the type of whatever variable a and b are. So we should be much more interested in describing the natural ordering of this type, so we can say things like:

intList.sort(IntOrdering.reverse())

to sort a list of ints in reverse order, or

intStringList.sort(IntOrdering.compose(StringOrdering))

to sort a list of tuples of ints and strings in natural ordering.

So, creating this natural ordering needs to be done only once, over all the possible programs that can be expressed with ints. Maybe that one, single, time you'd be writing the actual expression you wrote above. But this lower-level logic will be well hidden by the abstractions used to reason at a higher level about correctness when placed orthogonally with other low-level code.

In other words, every time I write ternary expressions or long if-then-else expressions, I am either writing something low-level, or I need to abstract away.
Ask HN: How are large recurring payments handled on websites?
I am making a SAAS product where businesses will be charged $1,000/month and possibly a higher amount. Should I put a stripe button on there where you fill in your credit card info in? What other options are there? Do companies typically pay by credit card for that large of a payment?
New Measures Announced to Protect UK Elections from Foreign Interference
> It's not about the line count, it's about expressing the main idea clearly and succinctly

I disagree. I find no clarity in using nested ternaries, but I understand it's a matter of opinion.
I used to specialize in 2 - 10 rack build outs, but its been nearly a decade since those gigs evaporated. I wonder if k8s creates a new niche for it.