skysight-inc/HackerNews huggingface dataset:
HN's hug of death. Please try this https://web.archive.org/web/20190404100502/https://uxenginee...
This is just returning the error upwards, as far as I can tell.

This is the pattern I usually see in actual Go codebases:

infp, err := os.Open(infile)
if err != nil {
return err
}
defer infp.Close()
outfp, err := os.Create(outfile)
if err != nil {
return err
}
defer outfp.Close()
// ... do some stuff ...
return outfp.Close()

Note that double-close is explicitly OK, this pattern just avoids losing the error.
It also seems we are headed towards coupled offerings of content AND connection.

Certain content available via certain ISPs only.
"And I've long thought it was a mistake to abandon strong typing... I know most people disagree"

How do you know that?
I don’t get why those cops are pepper spraying the students. Are the cops, bored of patrolling all day without any of the action they saw in COPS while growing up, decidedly choosing to go pepper spray some kids?
Absolutely wonderful description. (This comment was more interesting than the blog post). I've been trying to figure out how to justify to PMs/etc that we should spend time to make delightful software, and "emotional design" seems like just the thing. I really enjoyed The Design of Everyday Things; I'll have to give Emotional Design a read!
> safe to assume

Assuming that because something is popular it must be good is an example of assuming that things are as they should be, or deriving ought from is[1]. Assuming that because something is unpopular, it must be "wrong" is worse.

Do you make all your technical decisions based on what is most popular? Do you always assume that whatever has not become popular must be "wrong"?

[1]: https://en.wikipedia.org/wiki/Is%E2%80%93ought_problem
I don't think this article is really fair or complete enough, because we in the western world started a lot of the practice that meat is what wealthy people get, and we sure eat a lot of meat here, and did a lot of the industrial planning to make mass production possible.

I love a burger myself, but for the health of the planet all societies should be eating less meat, reducing its use.
Seattle has homeless, so does Vancouver BC. Meaningless term I think. In the separate comments about 43 degrees north, far north Seattle has moderate weather of course. Cute term but doesn't work.
> Each Pwnagotchi is also an end-to-end encrypted messaging device.
Salmon spawn in a river and head out to sea for a while to mature before returning to their river and reproducing and dieing. So... probably not and what purpose would that serve?
Worrying from a group that writes UI for a living.

Someone needs to get over themselves and start thinking about their users.
Creative UI's are way riskier, but the pay-off is a unique experience that the user will remember...

Without creativity, sites become bland unmemorable clones of each other...
The US music industry doesn't have the MPAA.
You don’t wrap every error in a unique string, only in places where there is additional context. Developers I work with do this.
I don’t know, you said American, and even with the monthly premium, there are less than 400 million potential customers, right?
Sampling and Measuring Generators: Tutorial
What town is that? Is there a daily news blog or something?
It's Time to Trash Your Nest
Some of these platforms aren't shoving ads in your face... giant net win if you ask me.
Go is much better! Let's just return an error, and hope someone looks at it.

Oh, and if that hope was wrong in Java? Thread does, nice call stack in logs. In Go? Well, the program will go on with some default - value struct, most likely.
> Disney doesn't really own a lot.

The scene has changed in the past decade.

They're one of the largest US media conglomerates now.
34,586 unread emails are too many to click on so I just created a second email for family and friends only and quit checking my primary.
Except I'm not assuming it's wrong because it's unpopular. Read the original comment, I clearly stated why it's wrong. My last comment was giving you a possible explanation as to why the witnessed behavior has occurred.

Also, please show me one successful software package (and by successful, I mean largely consumed by consumers and a product leader) that does not use looping techniques.

Like all technical decisions, they are made by using the most correct and appropriate choice. Which is why the industry has been using pre and post condition loops since the beginning. This "don't use loops" attitude is equivalent to trying to reinvent the wheel.
I think in the end it's a (lack of) scale problem. Once you're big enough, you don't really care about fraud.

Merchants don't care about fraud itself. They care about liability. So they'll do whatever silly wiggle dance (like 3DSecure) is required to avoid penalty fees or declines, but in the end, whatever fraud they deal with is going to be typically crushed down to a line item or two on a spreadsheet. And that line is far smaller than "losses due to checkout abandonment."

The banks seem to have decided it's easier to yell "zero liability" and bury the costs somewhere. I've had what should have been very traceable compromises on my cards (used at an ATM with camera, used online with shipped goods) and they were far less interested in prosecution than if you had enterred a branch with a pistol and a note and made off with $250. They'd rather eat that fraud than run the risk you'll use an "easier" card.

Only consumers care because it ISN'T at scale for them. They usually have individual, or small-scale burst fraud experiences, so they're not going to have the infrastructure or resources to shrug it off, and the amounts of money are significant at their scale.

I wonder if a more legitimate alternative to the "identity theft protection" industry could have some viability. An all-in-one service for consumers-- you forward them any bogus transaction with a single click through the bank's site/app, and they front you the funds until the dispute is resolved and spend the time arguing over getting the charges reversed, no questions asked. Not that it would be right from a moral standpoint, but it would at least let us be able to worry as little about fraud as the merchants do.
Quality control is a common good in retail markets. In a healthy market, consumers don't care about top quality from medium quality. They might even go for low quality if it's marketed well. Only the "pro" consumers or hobbyists care about these differences.

So there is profit to be made in price and quality race to the bottom. When the quality drops across the board those uncaring customers just leave the market. This has caused crises in other industries before. They don't care until they're gone, with the passionate hobbyist canaries leaving early.
Self-taught musician here; I love this!
1. The article describes different types of loops. If you buy that, then "looping" can mean several similar but distinct things. To me, the big distinction is whether or not we "know" how long the input is. Or more broadly, whether or not we can assert that the input terminates.

If we can assert that that the input terminates then we can use "for i; while i < input.length" logic. If we can't assert input termination then we have to use "while input.next != EOF" logic and we might wind up calling "input.next" forever (but the system will probably crash first).

2. If the second form of looping -- calling input.next -- is like what you mean by "loopless" then debugging corner cases means something like looking at crash logs. But debugging any crash means looking at crash logs.

Or sometimes it means just restarting the system. Which is what a lot of debugging looks like at the interesting scale of widely distributed significantly concurrent computation.

3. For problems of interesting size, assumptions about the data can be made based on statistical analysis of the input. Then corner cases become statistical anomalies that may or may not be worth engineering against. Systems crashing are as inevitable as off by one errors.
At the very least, the ones linked in the article's text:

https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5658328/

https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5592309/

https://www.ncbi.nlm.nih.gov/pubmed/23528282

https://jamanetwork.com/journals/jamapsychiatry/fullarticle/...

https://www.ncbi.nlm.nih.gov/pubmed/29145752

https://www.sciencedirect.com/science/article/pii/S002839080...
The Butterfly keyboard failures are a myth
Software blitting to a bitmap was too slow to be viable on most of the supported machines. Bitmap mode was only used for a very few games on the 8-bit versions of these due to how slow it was. On some of these you'd have to fake bitmap mode with custom character sets. E.g. the VIC-20 can at most give you around 160x160 pixels using redefined character sets. Conversely on the Amiga you have no other choice but to use bitmaps.

So just trying to blit in anything remotely portable manner would be a problem in itself. E.g. on the Amiga you can place things anywhere you want. On the C64 you'd place things on character boundaries (or take seconds to draw images, like a few adventure games that used bitmap mode did), and if you needed smoother movements you'd either smooth-scroll the entire screen or have two different versions of graphics, or use hardware sprites (even sometimes for background features).

If you want a common lowest denominator you pretty much end up with a mostly text-display (~22x23 characters unless you ditch the VIC-20), monochrome, unless you ditch the PETs, only beeps for sound, unless you ditch the PETs, 4-5KB total for code and assets (unless you ditch the VIC-20 and some of the PETs) and so on.

It might be a "fun" exercise for the sake of it to see what the best you could do in a portable manner, but it would really boil down to what the best you could do on one of the most memory-limited PETs is, I suspect.

I mean you certainly could do Infocom style text adventures... Small ones anyway.

If you cut it down to the NES, C64 and Amiga (and maybe Plust4), then you'd be able to start doing something somewhat more interesting, but the architectures are still so wildly different that you'd end up something unable to stretch the capabilities of any one of them. For slow-ish moving strategy dominated games it might work.

E.g. Sid Meier's Pirates! was partly written in BASIC on the C64, and while the Amiga port is an upgrade it's a small-ish upgrade (more colours, higher resolution mainly). That kind of game would be feasible to do portably if you exclude the VIC20's and PET's, and stick to C64-level graphics. Games like Defender of the Crown, likewise, though they'd lose the graphics quality on the Amiga that was 90% of the appeal of the Cinemaware titles on the Amiga (though ironically, Defender of the Crown is often considered better on the C64 (and some other platforms) - they fixed various parts of the strategy elements of the game).
Threading as well. It means porting requires significant work.
I'm missing the pitch too. (Edit: ah you're supposed to connect it to a MIDI device, but who owns that/how does that cater to mobile users). What good is it knowing the note is C5 without knowing what C5 sounds like, in other words I'd be able to identify the notes but I wouldn't know what the song sounds like...
https://outline.com/BXdFKX
Yes, this one was funded by the "Alliance for Potato Research & Education." Here's one article that explicitly mentions that: https://www.timeslive.co.za/sunday-times/lifestyle/2019-10-1...
Get some outside time. Pets (dogs, cows, etc) are good for this as they force you to attend to them.
The stack traces tend to be useful when there is a programming error in your program, and less useful when there is any other type of error. In Go, programming errors usually panic which will print a stack trace by default.

But I’ll see Java programs that give me stack traces just because I’ve misconfigured them, or the server is down, or I have a bad network connection, or a file is missing. This is awful UX. Worse, the stack trace might not tell me WHICH file is missing, or WHICH server is down.

You only get good UX for errors by manually annotating context in the places in your code where the context is known.

(My personal experience is that FAR too many actual Java programs in the wild will give me a stack trace when they should give a short error message.)
Fascist Thor Halvorssen Mendoza?
thank you for a fantastic and interesting narrative!
Airbnb’s losses doubled year over year in the first quarter to $306M
I mean you could, but also Iceland’s financial institutions hard-fucked a lot of people, the government didn’t back them up ... it seems right that Iceland loses its risky financial license for a while
Heh... Skeevy
Never heard this word, and now it's a new favorite in my lexicon.
Namedtuple in Python
Use AWS for Free
Qantas tests world's longest commercial flight from New York to Sydney
Also, before it was a full TV show, the characters were used in small scenes on ‘The Tracy Ullman Show’.
React Native Facebook Login – Android Platform
The House at Poo Corner: SF's “Poop Patrol”
I would never take the pill if I had been born female. Any drug is going to alter how your brain functions and you can even observe the effect of low quality food on your mood. Abortion is a better solution than the pill. It must be incredibly difficult being in the United States as a woman right now with the anti-abortion still going on strong.
As a transgender woman, I can assure you that hormone levels (estradiol in particular) do affect mood. If I forget to take my medication I will get a migraine, for instance, and this is a pattern also observed in cisgender women.

But what levels are ideal, what is good and bad, etc, is not the least bit clear cut for anybody.
In Wikipedia: https://en.wikipedia.org/wiki/Metaphone
I have a copper chain but it is by no means as safe as you think it is. My gyn no longer provides it because after 120 procedures he had one that went wrong: at first, everything seemed ok but two weeks later the woman had to go to the hospital because the chain ended up outside of the uterus - it had to be surgically removed. It almost punctured her intestines. He was very experienced with the procedure. He told me he talked to colleagues about that and that they were all shocked, but not about the fact that this happened - they where shocked that it only happened after 120 procedures and not sooner, like they experienced it. The main problem is that it is shot into the fundus, which can go terribly wrong.

I definitely do not recommend to take it lightly. I don't think it is a good idea to do it as a tourist since the gyns at home are not trained to handle the chain.

An alternative might be the copper ball though.
Compiling most languages for 6502 boils down to either adding lots of constraints, or conceding the compiled code will end up being awfully slow. E.g. allowing 16 bit types => slow in most cases; passing things on the stack => slow or horribly restricted (because the hardware stack is tiny, so you end up emulating one at high cost if you want to be able to have more than 256 bytes on the stack).

The problem is you really wouldn't write code for these machines the same way you write code for a bigger machine. Not least because most of them had so little memory that keeping track of an assembly program that size was not really a big deal. A lot of C64 demos were written in machine code monitors with no labels, no macros, no variable declarations, that just assembled/disassembled line by line, and saved by just saving the memory regions to disk - no separate source-code. It was a revelation to get a proper assembler...

But that meant self-modifying code (often seen used for 16 bit loops...) and effectively global variables all over the place (= data in fixed memory locations...) was extremely common as well. Trying to shoehorn that into a language like Pascal means basically writing everything in the main block and not call any functions, and even then you're unable to use most of the dirtier tricks..
What does this thing actually achieve? (If nothing, that's fine too. It's cute, impressive, etc.) But if it can't actually get you onto wifi networks, it seems like a weird project to spend so much time on. How often does it snag a useable handshake?
"May I..." sounds like I am asking my elementary school teacher if I'm allowed to go to the bathroom to my American ears; or pointlessly formal.
Grayscale Now Manages over $2.2 Bn in Crypto Assets on Behalf of Its Clients
I think the author is trying to say is that feature creep and cramped designs are bad. Definitely! A minimalist design (like google's) is definitely a creative design. Think of Apple, their most creative and successful designs were rooted in minimalist ideas.
That was their itch to scratch. Please tell me about your language which has every single feature you need built into the standard library?
Show HN: A new simple GitOps deployment method
The C++ <algorithm> library has a huge limitation: algorithms return a single iterator that cannot be further consumed by other algorithms. This makes it impossible to chain algorithms in a manner like LINQ. The ranges library will make a dramatic difference for this programming style.
If you use a the right representation of the board in Haskell then you don't have to write a function to calculate the next generation at all, you can just use Comanadic extend, as Chris Penner does here: https://github.com/ChrisPenner/conway/blob/master/src/Conway...
It’d be just about right in a TR6 or a GT6 though. If your MG body is solid you might be able to get away with it but if it’s rusty, that torque could be bad.

There’s plenty of room under the hood of a spitfire for a bigger engine but I’d heard you have to upgrade the half shafts if you do as they’re the weak point. That and maybe weld some plates into the hourglass section of the frame. But they were around 100hp already.

The monobody on the MG might be okay if it’s not full of holes...
Indeed! In my opinion, Dave Cheney's error package is a better design than the Go 1.13 built-in mechanism, because it's more explicit. It's easy to forget a %w after being so used to %v, but errors.Wrap(err, ...) is pretty darn clear, as is errors.Unwrap.
The hate for Go here is so amusing. It's a simple, stable, performant language that keeps getting better over time.
> And you have gone full circle, back to writing Javascript but with parentheses.

Clojurescript offers much more than just a concise syntax.

Immutability by default alone has huge benefits.

There's "true" REPL. No, Javascript does not have a REPL, at best it has an "interactive environment". REPL is much more than a thing where you type a command into it and it spits out some statements.

There's consistency. In Javascript, because you don't have a standard library - there's none. Instead, you have Lodash, Rambda, Immutable.js, folktale, crocks, fantasyland, etc. etc. In Clojurescript for example, if you need to get the size of a set, vector, list, hash-map - there's a single function. In JS you have to know - sometimes it's .length, sometimes it is .size and there are many examples like that.

In Javascript, there's a precedence table with over 20 something items in it. Clojurescript doesn't even need one.
There are like seven different things that can be "falsy" in JS, in Clojurescript only two - false and nil.
These may seem to be like small things, but they add up.

Add to that, an enormous churn from libraries and tooling, Webpack alone (even though it is really good) may frustrate you for hours and days.

And like front-end wasn't enough, Javascript today is in the back-end too and although it is the same language, there are many inconsistencies you have to deal with, while Clojure and Clojurescript feel very much the same language, even though they are hosted on completely different platforms. You can actually can share code, the promise that has never gotten fulfilled for me with Nodejs.

And by the way, Javascript has way more parentheses and also commas, semicolons and curly braces. In Clojurescript parentheses give you structure and consistency, you stop noticing them after a while. In Javascript there's no consistency - arrow function with multiple params requires parens, with a single param - parens can be omitted, but with no params - parens are still required. Before Prettier you'd never even sure how to structure js code. Prettier simplifies things, but it still has so many options that vary from team to team, from a codebase to codebase. Single misplaced comma can make you feel like smashing your laptop. Write enough JSX and you get to a point where excitement from JSX turns into incurable frustration. In Clojurescript you don't even think about those problems.

So please stop treating Clojurescript developers like some kind of Lisp fanatics who hate Javascript for some made-up, bullshit reasons. We don't hate it. Most of us have consciously made our choice because it brings value and allows us to build things without mental overhead.
They also burn oil and gas. Burning plastic waste for energy isn't too bad in the grand scheme of things. Sure, not having pumped up the oil and not having turned it into plastic would have been best. And recycling that plastic into something useful would have been better. But burning it as fuel is still pretty good.
On mobile youtube app i have to wait for 2 ads to finish. I have to wait for both ads to finish to continue watching. I can skip only one ad. And this is happening for kids videos eg peppa pig, littlebabybum videos.
I, for one, disagree that most people disagree. Strong typing effectively enforces variants, and the stronger and more powerful the type system, the more it can do, with the trade off of added complexity (though not necessarily verbosity, at least not linearly with complexity.) Strongly typed enums are a great example of a big value add. Not to mention the improvements types add for developer experience and the added implicit documentation they provide!
You could use privacy.com to limit each service as you sign up and then forget about it.
Just as a matter of safety, UV tanning is a great way to get melanomas. That's why they've been banned (commercially) in Australia.
Its not just oral contraceptives, Its anything that increases progesterone will do the same thing.(as thats the hormone being discussed)

There is the injection, [https://www.nhs.uk/conditions/contraception/contraceptive-in...] and the implant [https://www.nhs.uk/conditions/contraception/contraceptive-im...]

both of those work roughly in the same way. Infact they cause much higher levels, so the effects may be more pronounced.

For my wife, it causes a perma-period, which is a great contraceptive, but not in the way it was planned.

In terms of mental side effects: loss of humour. She wouldn't watch comedy, as its not funny. I knew when it was wearing off because she'd start making jokes again.
Actually, I do think there is a market for that.

Like the "catalog" section of the old rental places, it surely would be interesting to watch an "old" movie sometimes (which by today's measure could be something like >3yrs)
Ask HN: Any suggestion on how to test CLI applications?
Hello HN!

I've been looking at alternatives on how to test command line applications, specifically, for example, exit codes, output messages and whatnot. I've seen "bats" https://github.com/sstephenson/bats and Bazel for testing but I'm curious as what other tools people use in a day to day basis. UI testing is nice with tools like Cypress.io and maybe there's something out there that isn't as popular but it's useful.

Thoughts?
Most people in the country disagree. And you politicians know this, which is why no politician would ever suggest removing Medicare.
This one called the November 14, 2018 crash before it happened: https://cryptonaire.com/wp-content/uploads/2018/11/stability...
neat project, but awful landing page. dont force technical users to immediately click about to get a remote clue what it's really about
Yeah, seems to be a problem with Phaser in Safari when playing a sound: https://github.com/xojoc/games2d/issues/10