skysight-inc/HackerNews huggingface dataset:
Errors and exceptions are really fairly different things, and I personally appreciate languages like Erlang that have both.

"Errors" are an instance of a (perhaps-implicit) returned sum-type of a given function. Calling a function that returns a sum-type, and then not having a branch for each instantiation of that sum-type, is almost always a logic error in your code, no matter what the sum-type is.

A pretty good generic solution to "error-handling" is the Either monad, as seen in its literal form in Haskell, in Javascript as a convention for async callbacks, and in Erlang as the conventional sum-type of {ok, Val} | {error, Desc}. The Either monad is nice because you can't really "lower" monadic code by ignoring the monad and just "getting at" the result; instead, you have to "lift" your code into the realm of the monad, which requires you to specify how you'll handle each of its potential cases. (Even if your specification is simply "I expect this; if it isn't this, crash"; or "I expect this; early-return anything else to my own caller.")

"Exceptions", on the other hand, are things that by default no component of your system knows how to handle, and which usually—other than some infrastructure-level components like HTTP error handlers and "telemetry" service libraries—code just allows to bubble up until it hits the runtime and becomes a process abort. These include "runtime errors"—for example, failures of memory allocation; and "programmer logic errors"—for example, dividing by zero.

In either of these cases, the "correct" thing to do is "nothing at all", because the system itself has no idea how to handle these at runtime. The only time when these problems could have been handled was at development time, by writing more or different logic such that these exceptional circumstances would never arise in the first place. Now that you're in such a situation, though, you pretty much just want to note down what happened (so the log can be sent to a developer, who can use it to understand what the novel exceptional situation was, and then plan a change that will prevent the exceptional situation in the future) and then die quickly, before your now-invalid runtime state can do harm to things like durable stored state.

Or, to put that another way:

• an error says "I failed to do that."

• an exception says "I have noticed, while trying to do that, that no valid system-state can result, even one of failure."
If it's for employees and not potential customers/partners then you can go full functional!

Mouse pads, pens, notepads, letterhead. Coffee mugs, beer glasses, or water bottles depending on which beverage is on your perk list.
Because if you are a top-notch C# dev, F# is just like you normally code but with less brackets and null reference exceptions.

Also, you haven't experienced implicit typing until you have used F#'s ridiculously powerful approach to it (relative to C# anyway).
I reached out to Fastmail support, who referred me to this post they wrote: https://fastmail.blog/2018/09/10/access-and-assistance-bill/
Need? Probably not. But often you don't know what metrics you care about until something goes wrong - so you over-engineer it and log all the things.
China arrests former Canadian diplomat in retaliation for Huawei arrest
"I really dislike the firefox omnibar and that I can't set it to just be an address bar."

Me too. I've hated that thing since it was first introduced.
Silver is Ag ;-)
The war ended in 1974. That was 44 years ago. You're either talking about people who are of retirement age, or have no adult ties to the country.

This is callous and gross. It's going to ruin lives. People are going to commit suicide rather than leave.
Flagged. Article title is complete clickbait.

That said, this is a hard problem. These people are not technically citizens of the US, but of course Vietnam doesn't want them back. Trump seems to be following the letter of the law, but maybe not the spirit (I don't have enough context here). The article isn't in-depth about the breakdown of the demographic, nor does it really cite any valuable sources. The reader is left to their own biases, mostly, to draw a conclusion.
A Harvard Professor Made $400M in Moderna’s Biotech IPO
sort of. I doubt it covers GPUs, but it covers hardware performance in a way that you would be abble to understand how to utilize GPUs.
Also https://news.ycombinator.com/item?id=6220049, and part 2 at https://news.ycombinator.com/item?id=4455225.
I reached out to Fastmail, who referred me to https://fastmail.blog/2018/09/10/access-and-assistance-bill/
The war ended in 1975, 43 years ago. So if you fled the war then and were an adult you're quite old now. If you're still of working age (like the people you reference here) that means you were likely a child when you left the country. I'm not sure that being forced to go back to a place you have been to in over four decades is a great deal for you. This move by the White House makes no sense and seems like it's intended to stick it to immigrants for no reason at all.
I can attest to those two books being fantastic resources on UI/UX design. They're the only two books I've read on the matter and I'm consistently praised as one of the more user experience focused engineers in any team I work on.

Although, I can't walk through half the doors in the world it seems without going "why the hell does this pull door have a push handle!!", so there is that side effect.
Ha, so Microsoft stole Haskell?
How Native American tribes are bringing back the bison from brink of extinction
Highest paid YouTube stars for 2018
Oh, wait, did he actually use C++ with exceptions enabled? Who th does that?
I'm going to offer a contrarian contrarian viewpoint. I certainly agree that engineers should not be shut out of the process, by default. There are some engineers who are good at UI design, like you and me, and their deep technical knowledge helps them invent unique solutions. However most engineers aren't and I wouldn't expect them to be either. I went out of my way to learn UI design and psychology, but most engineers don't do that which makes it tough for them to provide useful feedback, insights, etc. So I understand why some people don't want engineers involved.

Just last week, I had the very first design meeting for a new project and a veteran engineer was invited. He didn't even let the presenter finish before talking about how the backend should be built and how much time it would take. That wasn't helpful.

I think engineers who are good at design are immensely valuable, but most engineers suck at it.
I mean it's not like it's a scarce resource
Zig doesn't really support RAII.
Well maintained C++ codebases have a style guide limiting programmers to a restricted subset of the language. Not allowing exceptions at all is often a good idea.
Forcing someone to do a job without paying them is slavery. Don't conflate things just to suit a narrative. This kind of law is problematic for legitimate reasons, not made up BS like "it's slavery."
This always raises an interesting question about the concept of charging someone for a service that they did not have an opportunity to ask for or consent to until after the fact.

On one hand, you have doctors wanting to save or improve someone's life. On the other hand, especially when death is the result despite attempts to safe the patient's life, the person/estate has now incurred a cost that was potentially undesired.
I have the same experience from implementing an interpreter [0] in C++ and later rewriting from scratch in straight C. The popular advice to use C with classes and skip the rest doesn't hold, for me it always turns into a constant loosing struggle to keep the code clean of fancy abstractions. And like the author mentioned, fixing performance problems suddenly means replacing STL features, which is a lot more work than simply writing what you need. Assuming you can figure out which knob needs turning in the first place, that is.

I first came across Turbo C++ back in 1995; it was the third language I learned, several years before I started my C journey. But I've gradually come to the point where I consider C++ to be a bad compromise, period. For low level fundamentals, C works better; and for higher level code there are plenty of more convenient options.

[0] https://gitlab.com/sifoo/snigl
I'd claim assigning a probability to the existence of God is problematic in itself. Could you assign a probability to the inconsistency of mathematics?
> In set associative caches, one or more of the "ways" in each index could be optimised for these relatively common small numbers, with fewer bits given to it, capable of only storing numbers of the small form.

But these aren't caches of 64bit numbers where that optimization would apply. These are caches of 4kb pages of bytes. And since this is x86 I don't think it's even guaranteed that pointers are 64bit aligned. Maybe for the TLB cache an optimization like that would be useful?
I'd agree that it's totally reasonable to 'hack together' a quick prototype with 'duct-tape and cardboard' solutions -- not just for startups, but even in full-scale engineering projects as the first pass, assuming you intend to throw it all away and rewrite once your proof-of-concept does its job.

The problem is that these hacky unstable unreliable solutions sometimes never get thrown out, and sometimes even end up more reliable (via the testing and incremental improvement methods you mention) than a complete rewrite would be -- not only because writing reliable software is hard and takes time (beware the sunken costs fallacy here!), but because sometimes even the bugs become relied upon by other libraries/applications (in which case you have painted yourself into a REALLY bad corner).

It's a balance, of course. You can't always have engineering perfection top-to-bottom (though I would argue that for platform code, it has to be pretty close, depending on how many people depend on your platform); if you shoot too high, you may never get anything done. But if you shoot too low, you may never be able to stop drowning from bugs, crashes, instability, and general customer unhappiness no matter how many problem-solver contractors you may try to hire to fix your dumpster fire of code.

So again: Yes, it's a balance. But I tend to think our industry needs movement in the "more reliability" direction, not vice versa.
C++ also has a fair number of built in STL smart-pointer types that do approximately the same thing as the "move/borrow" semantics which everyone gets excited about in Rust.

These alone are a worthwhile "dialect" on top of C, the use of which results in a far safer C; and—as far as I know—these smart-pointer types and their compile-time semantics would be impossible to implement without C++'s additional layered-on "C with classes" type system.

(It's clear that these smart-pointer types are a valuable addition to C, because they were independently implemented as part of all sorts of other C macro libraries in the early 90s. I think there were at least four C smart-pointer implementations that existed as part of various parts of Windows, for example.)
I'd love a real world example as I've been using the STL for 14 years, and only thing I've worked around was std::map, which I implemented much like boost flat_map.

Yes, you need to be aware of object lifetimes in c++, but so do you in C. C++ makes it far easier to manage, though.
Before we try fuzzy robots, let’s solve elderly loneliness with people
This hadn't dawned on me until I was two years in at my former company. To actually save the work that was outside of my workflow.
The big headache was the tiles. They were tough to install, kept falling off, and were brittle. That was known early, and Buran did it differently.
A basic income would solve this kind if problem without putting the burden on individual businesses...
Debugging your Vim Config
Eating Single: Can Social Media Unravel Nutritional Balance?
The first time I saw an ad that was targeted to me on Facebook based on browsing I had done elsewhere, I deleted Facebook within a month and never used it again.
I think the copy protection on the original Xbox, the 360, and probably most modern consoles worked like this: executables must be signed, executables must list what types of media they can be run from, the system supports a special type of disk that CD burners and regular disk pressers can't produce, and all game executables specify they can only be run from the special type of disk.

With the 360, you can do a firmware hack to the system's disk drive to make it report every disk is the special type of disk to allow you to play games from burned disks. There are some known utility/demo disks containing executables signed to be executable from burned disks, so they can be copied (and have resources modified if the executable doesn't verify the signatures of everything it loads).
adblock, ublock, zap every fucking ad
You're missing the point that people are making when they say "they have a choice". They're not saying their lives are not rife with hardship and very difficult choices. They're saying that their lives are not being made worse by some employer somewhere offering them a bad job. You can't place the burden of providing them with a living income on the first person who hires them. It's just an immature way of assigning blame and responsibility, that resorts to first association thinking. It's not rational/correct.

It's also economically wrong thinking. It's almost tantamount to thinking vaccines are a conspiracy by Big Gov/Pharma, in rejecting standard economics as some kind of conspiracy by the establishment to keep The Man down. Prohibiting bad jobs does not cause good jobs to appear to substitute them. It eliminates bad jobs and replaces them with nothing. You're not doing anyone any favors by reducing their employment options.

Finally, it hurts industry, and encourages outsourcing, which hurts workers in the country. It also reduces the performance of those industries that can't be outsourced, because the micro-economic incentives to perform are eradicated.

An advanced economy is an extremely complex system, and it only works as well as it does due to bottom-up order created through a vast interplay of self-interested action, motivating individuals to generate value. To think that it will work just as well with collections of workers attaining monopolistic control over their company's hiring decisions is being blinded to reality by idealistic/emotional thinking. The casualty of this kind of economically unsound and ideologically motivitated thinking is the worker, who sees their wage growth stagnate, because the industries their wages depend on stagnate or contract.
I got a bunch of the same response, so I guess I didn't ask the question clearly.

I'm well aware of how a short works. I was asking what parent poster had in mind when they said "if you think the market's going down, short it". Short what? Specific stocks? That's not the same thing as shorting "the market". When people say "buy the market" or whatever they're usually talking index funds or etc.

So did he mean some kind of leveraged inverse VFINX? Or a baroquely complex derivates ETF that's just a ticking time bomb like those inverse VIX funds from earlier this year?

Anyway, sorry for the late reply.
We're working on a chrome extension that blocks the existing ads on a page, and replaces them with privacy-safe ads that reward you with our crypto token for each ad you see.

Chrome Extension: https://chrome.google.com/webstore/detail/clearcoin-the-ad-b...

Code: https://github.com/clearcoin/extension
Our Digital Lives Are a Mess. But What Are We Supposed to Do About It?
My experience with writing long and complicated sentences is that I don't have the skill to write good ones, and neither do most people. Instead, I follow the rule of thumb that my college writing instructor taught: aim for an average of about 20 words, vary your sentence length, and try to say what needs to be said and no more.
AI is a pretty tractable workload for GPUs/TPUs/FPGAs. Inference is moving to many more places, the days of Nvidia being the solution for AI are over. It will still be the goto for research, but as things mature, the nets will literally run anywhere there is a MAC (multiply accumulate).
What really burns people is making irreversible changes and finding out you chose wrong.

Some people avoid this by trying not to make any decisions at all, and that’s more than enough fuel for long a journey into overengineering. Someone (possibly Michael Feathers or Uncle Bob) called these people cowards and I tend to agree.

These days I’m very aware that smart and fool aren’t at opposite ends of the same ruler. I’m much more concerned with being wise instead of clever. Clever requires too much busywork for everybody, and it’s not conducive to teamwork.
Construction company rolls out more gender-neutral signs
Wow,

a rate of drop-out like that would certainly make me doubtful of the results of the study. It seems reasonably likely that people dropped-out in a fashion that would be weighted in one way or another.
Want a Site Like VK and FACEBOOK TOGETHER? DMCA NON COMPLIANT
The (IMO poorly written) article implies that not only are Vietnamese origin criminals who got here before 1995 eligible for deportation, but ALL Vietnamese immigrants who got here before 1995 are as well.

Other sources like https://qz.com/1493761/trump-is-preparing-to-deport-thousand... indicate that the stated reasoning seems to allow that, but Trump's administration hasn't made itself available to confirm.

If this isn't a simple misunderstanding of what Trump is saying, then this is going to be a huge issue. There are a lot of people affected.
I run zunzun.com on GCE and have never had a support experience like this.
Didn't see a mention of the fact it can compile to and interop with JS via Fable https://fable.io/ which is pretty handy
Ants really do provide a peek into the diversity of evolution and often how little we know about the world around us. I buried the dream of becoming a myrmecologist myself, but there is so much fascinating stuff to share.

Ants can dive [0] and swim [1], and in mangrove forests adapted to survive extended periods with low O2 during flooding [2].

Some species have established ritual fights to solve territorial conflict [3] and while they are known to be fiercely territorial, there are species who defy the rule and fuse nests after intense fighting [4], or form mega colonies without hostility to strangers across globes - one of these mega colonies being located along the coast of California [5].

0: https://en.wikipedia.org/wiki/Camponotus_schmitzi

1: https://www.youtube.com/watch?v=JJw5hBB8-Os

2: https://onlinelibrary.wiley.com/doi/abs/10.1046/j.1440-6055....

3: https://myrmecos.wordpress.com/2008/10/12/question-ritualize...

4: https://phys.org/news/2016-03-mortal-enemies-allies-ants.htm...

5: http://news.bbc.co.uk/earth/hi/earth_news/newsid_8127000/812...
Dylan Thomas was always good for a few of these.

“Years and years ago, when I was a boy, when there were wolves in Wales, and birds the color of red-flannel petticoats whisked past the harp-shaped hills, when we sang and wallowed all night and day in caves that smelt like Sunday afternoons in damp front farmhouse parlors, and we chased, with the jawbones of deacons, the English and the bears, before the motor car, before the wheel, before the duchess-faced horse, when we rode the daft and happy hills bareback, it snowed and it snowed.” - A Child’s Christmas in Wales
I don't think this alleged distinction between exceptions and errors is as clear-cut as you imply. I think this distinction is purely a convenience; a line we draw to make our lives easier because we don't really want to accept that extremely rare error cases do exist and should be reasoned about despite their rarity.

For example, you listed as some examples of exceptions that are not error: Divide by zero, failures of memory allocation.

Let's say you write a calculator GUI and I try to divide by zero in it. Exception or error?

If I applied your advise, I would have to deem this an exception, and just "just note down what happened" or "die quickly" (your words)! That is quite obviously wrong, in this example.

The correct answer would be to feed some kind of error code to the calculator's output data path, which would eventually be displayed on the screen.

Sure, I'm sure you'll come back and say now "well it depends then, and whether you consider it an exception or an error depends on the application". If you say that, you are ceding my point, because that is precisely what an 'error' (not an exception) is: a condition that may in some cases be fatal to the application, and in some cases be a part of ordinary runtime behavior.
That seems a great book. But this was more about database design, and statistics. Covering maybe 17th-18th centuries, and focusing on Western Europe. I recall France and Germany, in particular.
I've been writing C++ for ten years and I can count the number of try/catch blocks I've written on one hand. The only exception I occasionally want to catch is std::bad_alloc. Other exceptions are basically the equivalent of an assert or a segfault. They will never be thrown unless there is an error in my program.
After the fourth or fifth tine I’m now realizing that great fonts are the most work-life enhancing thing I’ve interacted with on Hacker News.
Baby gene edits could affect a range of traits
They will be a huge database of people pictures. Facebook/Google/Alibaba/Snap/WeChat that will be forced to provide these together with necessary metadata. Images can be stored in object storage AWS S3 or something like Riak S2 or more custom solutions like Facebook Haystack.

A batch job that processes images and creates a feature map of the face. Where face feature map is points needed to uniquely recognize the face. Some kind of queue Kafka/ZeroMQ/RabbitMQ and image processing using in OpenCV/TensorFlow/PyTorch. Each time models are tweaked batch job will process images to create more accurate "Face ID".

There will be a database that is optimized for search. This can be RDMS like PostgreSQL sharded by face feature. Everything can be heavily cached since feature maps do not change very often. Since the problem is well defined you can risk creating a custom database just for this purpose using something like RocksDB/LevelDB.

You still need a platform that aggregates all these video streams from cameras and process images in real time. You probably want to favour speed over accuracy. Maybe OpenCV and small data centres that are spread across the country to reduce latency and cost.

A large number of human operators will be needed because the system will be a too dumb search for specific cases. They will probably create an analytic platform that also tracks your mobile phone geolocation, read your email, messages to know that you lazy bum that read HN instead of working.
>>Unions form to prevent a race to the bottom.

There is no such thing as a race to the bottom.. This is a common trope from people who don't understand economics. Union benefits are zero sum rent extraction, and in the long run, inhibit economic growth and with it broad-based wage growth.
My mother has always suggested being "busy", with as little specificity as possible. "I'm sorry, I'm afraid I'm not available." The nice thing about this excuse is that it doesn't wear out: one can always be "too busy".