skysight-inc/HackerNews huggingface dataset:
It doesn't fix everything, but judicious use of private data constructors and custom types can go a long way towards reducing the need for asserts. They can bubble up potential violations of preconditions and force handler code to be written.

Some Scala examples, but they're hopefully quite language agnostic:

https://m.youtube.com/watch?v=Csj3lzsr0_I
https://m.youtube.com/watch?v=keTId618iOs
Great list; I would only add which kinda goes with (3), don't set your expectations too high - go with an open and exploratory mind, you might even discover new unexpected experiences.

At times we plan a trip based on what we've read or seen and have this picturesque and dreamlike state concocted in our mind and then when reality doesn't meet expectations we spiral down ward and see everything else negatively.

Go with an open mind, don't let minor things upset you, and try to make the best of everything.
Why You Should Tell Your Co-Workers How Much Money You Make
Ever moved a large pile of sand that's been stored outside? Once you get a foot or so into it, there's going to be some moisture. It's not going to be much by weight, but it's there. Of course, it's going to vary depending upon environmental factors (humidity, temperature how recently it rained, etc). That contributes partially to the liquefaction.
How often do you travel to another country compared to how often you phone someone in another country? Local timezones do indeed make a lot of sense for travelling in person, but global time is much better for scheduling conference calls etc., and these days that's the more common case.
Dementia populations are about to skyrocket globally
We usually moderate pages that are just lists of things, because they're rarely as interesting as the best single item on the list. But I made an exception because this one seemed unusual.
Of course they are. The first is about picking the correct case (this being one of the few words where English has cases) and the second is picking the right number (you being a special case since the second person is always plural in English).

If this isn't grammar, what is?
Because the API is stupid and not intuitive. It's for memory buffers where the string is either NULL terminated or it is the length of the memory buffer. This saves an extra byte. yay?
Commiefornia
Viking Line installed similar 80-foot rotor sail on a LNG powered Cruise Ferry on the route between Helsinki-Stockholm. It reduces power usage roughly 20 percent (900 tonnes CO2 annually). Compared to tankers ferries don't carry significant amount of weight even when they are full. They are basically full of air and 60-100 cars or trucks.

Together with using LNG, periodically cleaning the bottom of the ship, slower speed and connecting to electric grid while in harbor the CO2 emissions are down significantly.

The best way to reduce energy consumption for a ship is to reduce the speed and make thinner ships. This is the new trend in shipbuilding. New cargo ships optimized for slow speed don't have the bulbous bow because it does not increase efficiency in lower speeds.
I was curious how much sense this actually made so I did the math, sources at the bottom. I suspect my sources aren't perfect, but they're probably close enough to get an idea of things.

Our hypothetical container ship is roughly 400m x 59m, or 23600 m^2, and solar panels generate ~4.5 kWh/m^2 after inefficiencies, giving a total energy generated of 106.2 megawatt hours per day for a ship, if you had a big solar array above all the containers. Assuming an 85% efficient hydrogen fuel cell, that gives you losses both in storing and reclaiming electricity from that storage process. Assuming 1/3 of your energy can be used while generating it and the other 2/3 has to be stored as Hydrogen and then spent to power the energy, losing energy both ways, that leaves you an effective ~81 MWh/day.

Meanwhile the existing engines on that same container ship can currently run at about 90 MW, which means it can output more energy burning bunker fuel in one hour than our solar panels gave us in the entire day.

Container ship size: https://en.wikipedia.org/wiki/Container_ship#Size_categories
Energy per day: https://www.quora.com/How-much-solar-energy-is-generated-per...
Fuel cell efficiency: https://en.wikipedia.org/wiki/Fuel_cell
Container ship energy usage: https://newatlas.com/shipping-pollution/11526/
Wait, I'm confused: do you think there are only ~700 trans people identifying as female in the world, or do you think there are only 7 of them in the UK?
There's been progress since the 80s when I typed in Basic code for this from a magazine -- it was quite a bit harder to follow.
That's a really interesting results. Those are the kind of thought you may have but knowing that it actually worked on a production app that's massively used is a really valuable thing.

Anyone else had similar experience ?
> The fact that the FBI couldn't get into an iPhone

You sure about that?

1. FBI unlocks iPhone without Apple's help

2. Snowden documents show 100% success rate against iPhones

3. Graykey device to break into iPhones

[1] https://www.npr.org/sections/thetwo-way/2016/03/28/472192080...

[2] https://www.forbes.com/sites/erikkain/2013/12/30/the-nsa-rep...

[3] https://blog.malwarebytes.com/security-world/2018/03/graykey...
Why would you think you’re stupid? If the docs you’re reading aren’t giving you what you need to know, you’re either using the wrong docs (in which case just try another one) or the docs have failed at their purpose and it’s a bug.
If pull requests are auto accepted sure? But that shouldn't normally be the case.
That'd be neat. Like docker hub supports and f-droid requires(IIRC)!
> I also frequently work with languages either without exception handling or with exception handling disabled for certain targets.

In those cases, you definitely cannot use exceptions but I'm still not sure I'd use something like assertAndContinue. If an assertion has failed, something has gone terribly wrong and I can't imagine just continuing.

> it's a bit silly and heavyweight if you just need to short circuit a single conditional, loop, or function. Why throw when you can break or return?

You throw because it's an error condition, you break or return because that's a potential the normal flow of operation. It's not heavyweight because it's for a state that should potentially never happen.

> And when you do use nonfatal-but-logged exceptions, what do you put in the exception handler and what makes it different from assertAndContinue besides minor errata like being specialized for exceptions?

All exceptions are "fatal" to the current operation, however you define it. It could be fatal to the entire application, bringing it down completely. Or it could just be fatal to a single function, request, or even UI button click. In comparison, assertAndContinue() would continue the current operation in, by definition, an invalid state.
Can you regulate who sees what? For example, I want the FB capability of sharing stuff with friends only in addition to having some public.
This is a good question, and almost pure sail power may become a thing in the future. It looks like Maersk is trying to get ahead of the switch to cleaner fuel coming in 2020, which will increase their fuel costs by about 60%. This idea of putting sails on a large ship was at best only marginally cost-effective before now.

Some practical considerations come into play - while saving money is good, being able to reach your destination when you say you will is also worth something. With pure wind you lose that control. Deck size is not infinite, so there is a limit to how many sail towers are useful. Tower height also has practical limits before it destabilizes the ship. Handling bad weather is much easier with the on-demand power that comes from engines.
Why there is no drug for Alzheimer's disease
Rotor ships predate the turbosail.
(IFA 2018) Ears-on: How Sony’s new WH-1000xM3 headphones raise the bar … again
Hi, I'm a Redux maintainer.

While it's certainly _possible_ to keep literally all your app's state in Redux, that's usually not the best choice. I can understand why some people choose to do so, but to me that's usually overly dogmatic and not sufficiently flexible. See the Redux FAQ entry on deciding what values to actually keep in Redux: https://redux.js.org/faq/organizingstate#do-i-have-to-put-al... .
Glad to hear that, if you need any help, feel free to reach out to community@gitlab.com.
Reducing operating costs often leads to higher overall demand.
I'll add that it's really handy for that specific situation as it also avoids leaking uninitialized bytes.
In 2014-2015, I've spent great amount of energy to get out of Russia. Since I left Russia in 2015, the situation with internet freedom became much worse. Especially this year when Russia blocked millions and millions of IP-addresses in unsuccessful attempts to block Telegram.

My prediction for near future is that Russia become as restrictive as China or even worse.

I don't think VPN is viable long-term solution. Look, where are VPN servers might be hosted? Amazon or Digital Ocean? Well, this year Russia just showed that they can block 20 million IP-addresses on a whim.

And I see no signs of massive public demand for free internet. Why? Because if it's popular site in Russia, then it might be unblocked in the case of accidental blocking. If it's just random site in English, it will never be unblocked. And vast majority of Russians don't speak or read English at all.

In other words, Russia has absolutely no future as a country with free internet. RIP.

My advice to fellow Russians with brains: get out of Russia, run away as fast as possible from this goddamn place.
Abolish the reference check
I quoted that line exactly from TFA. (the friendly article)
Ask HN: Have you used semantic web at your company?
I'm curious to know if you have used of the semantic web technologies in a real business scenario and how it turned out.
Ross Barkan is running as a Democrat, but he is not a Machine candidate; he is an independent who needs to edge out the person preferred by party leadership [so that he can take on the Republican incumbent without splitting the vote]. Hillary Clinton, on the other hand, is a corporatist through and through. Suppose we had Elizabeth Warren as a candidate instead?

Bernie Sanders is also a Democrat, but look at the kind of games party leadership played against him to make sure their preferred candidate got the nomination. Don't pretend you don't understand the difference between running under a party and being part of party leadership.

I happen to have a productized campaign contributions and expenditures database at my fingertips, so maybe I'll take you up on the offer to check. What state are you in?

EDIT: Your donations are probably to candidates in California, and we don't have that normalized and loaded yet.
> Seems to me the sun is highest several hours after noon and midnight is closer to sunset than sunrise.

The definition of noon is when the sun is at its highest point. Yes, due to timezones real noon may be half an hour from clock noon — but that's all (modulo places which are on a neighbouring timezone for reasons; regardless, being more than 1½ hours from real time is political stupidity).

Are you in China? I understand the PRC believes that all Chinese should be on Beijing time — c.f. above, under political stupidity.
Oh god this just gave me the dystopian vision of companies offering streets as a service, where you pay for every cobblestone as you drive over it.
Then let the record note I subscribe to no such opinion, lest readers over-infer ill will.

Just saw a “why” and thought I’d contribute.
Unfortunately C doesn't have a widely accepted dependency/build manager either.
I think his point is that you train all your life for all of that and it's closer to normal activities. Plowing and other physical exertions or programming and other very demanding intellectual activities are waaay off from what the human body is meant to do 80 hours per week, long term.
Lucy McHugh murder suspect jailed for not revealing Facebook password
You can use GitLab WebIDE as well. Here you can read more about it https://docs.gitlab.com/ee/user/project/web_ide/.
Easiest way to find shared interest between two peoples in GitHub
UN Peacekeeping and the Demand for Sex Trafficking
This will have 0 effect on baseball, unless you count slightly changing the way baseball video games are produced.

It's still a crazy of copyright maximalism at work. It's hard to get worked up about with so many more pressing issues up for grabs today, but even copyright maximalism is a symptom of a larger problem of the neoliberal world order having an unstoppable drive to monetize and marketize everything. This is new, unsettled law because tattoos were always a fringe weirdo outsider thing that would never ever land in a court. Now that tattoos have become mainstream and rich people (LeBron James in this case) have them, we have to fit it into this crazy framework we've invented to let multinational corporations make money on mouse cartoons. If we don't, there may be dire consequences like setting a precedent that not every cultural practice can be owned and charged for, and that property rights are possibly not the most fundamental rights in a free society.
Yes, much to the pain of Apple
Comrades and Barons: Solitaire of Bloody 1919
> So they're supposed to put LeBron in the game with no tattoos or fake different tattoos?

I assume the company claiming copyright ownership just wants $$
There was no referendum, it was just an Internet consultation. As representative as a so-called poll on any newspaper website...

Oh, and the EU server broke when I tried to validate my answer...
A Universal Scripting Framework (1996) [ps]
> Fuel makes up approximately 60% of our total cost and this technology has a significant potential to cut fuel consumption by 7% to 10% on the ships that it will be installed."

Jesus, I'm surprised we haven't seen all sorts of crazy ideas coming out of Maersk to reduce this overhead given that it's the bulk of their cost. Wind pillar things seem kinda tame compared to the shit I'd try to pull to save that level of money... Across all vessels no less!!
In case of a grain liquefaction emergency, you can simply toss in a few tribbles, and its consistency will quickly change from granular to fuzzy.

Also, the rock eating monsters of Janus VI work well against bauxite liquefaction, and M-113 salt vampire creatures are highly effective against salt liquefaction (but unfortunately there is only one surviving creature).
The prices will stay hard to know because middlemen don’t like to be cut out.
I wanted a more pseudo-anonymous form of this, which is why the message board I built is invite only (still pretty new). I think if you prune bad inviters, you can build a really high quality user base that is still mostly anonymous (depending on their username).

Still very early stages, https://filigree.app if you'd like to check it out. Invite code kris-75c23bae7837 if you want to register.

Edit: quite a few people registered, so I'm deactivating that invite code.
> Humans already don't plan their day strictly around sunlight.

For maximum health & energy efficiency, though, we probably ought to (just like we probably ought to build our houses so that air conditioning is optional & heating is efficient).
In terms of recurring income (retainers) or access to "upsides", corporate employment does not do any better than the gig economy. You can charge $250/hour for a gig, but I doubt that corporations would agree to pay that out as a monthly salary. You can get 25% of the shares and therefore the profits in a startup but good luck trying to get any share in the profits of a corporation.

Furthermore, in the gig economy you don't get a payslip. You invoice. That allows you to extensively use jurisdiction shopping to minimize tax bills. In Europe, that can spare you from handing over 70% of your revenue to the tax collector. Good luck trying to do that in corporate employment.
It's easier to hear in modern country music because the vocals are still trying to sound natural. Male singers are more obvious.
strcpy_s, anyone?
I wasn't even going to get in to the whole IST thing. I usually just say BST when pressed. Was that a result of not wanting "standard" to be the same as Britain's standard?
Should browsers still allow users to disable JavaScript?
Serious question about this line:

"Reusing code via inheritance is fragile. Inheritance also couples interfaces to implementations, which makes reuse more difficult. This is its own topic, but even OO programmers will tell you to prefer “composition over inheritance”."

Isn't the goal to have implementations of interfaces so that you can inject implementations around in order to reduce tight coupling? Implementing an interface is not the same thing as inheritance. It's adhering an implementation to a contract. Are interfaces in ObjC different than what I'm used to from Java, C#, and others?

I mean this with sincerity, what am I missing? Is this a short-coming of my knowledge because I come from a strict OOP background? I've always used implementations of multiple interfaces to achieve composition.
Can we make user interfaces that are both powerful and user friendly?
I'd say the greeks used techniques (limits, for example) that would later be used in calculus, but the didn't systematize them.
You right click to copy/paste? And you complain that trackpads with gestures are unacceptable and inefficient.

I don’t know if I can process that.
If it's a FAANG-type company, the stock has done well in the past 10 years so it's been a pretty good bet to make. Public tech companies have done well overall.

Sign-on bonuses don't have a vesting period. That's why they're called "sign-on" - you get them when you sign on. You might have to give them back, pro-rated, if you leave the company within a certain time period (typically a year).

> Cash is king.

I'm not disagreeing here. I'm just pointing out that the fixed $125k number in your mind is inaccurate in reality. The total value of the stock+sign-on+bonus may not be $75k (that might be the ideal case) but it's not $0 either. The total comp is a lot of money for any new grad in any city in the world (again, outside of finance and law at the top end).
The block chain has fundamentally reinvented the way startups fleece investors.
Pretty sure they won't be changing tome zones differently from the rest of Europe. Or maybe I'm wrong and that's one of the freedoms Farage holds so dear.

Putting the Republic of Ireland and Northern Ireland in different time zones would be.. annoying, at the least.

Then again you said Britain, not the UK, but I can imagine the DUP protesting pretty loudly if NI were in a different timezone to GB.

Nomenclature is fun.
You're investing way more into the hypothetical than exists.

I wasn't asking what imagined scenarios would force me to sell polish. If you want that, then aliens for all I care.

The entire point is to ask what happens when the results of my actions are nil. Rationally, if two courses of action have the same result, I should take the course that costs me the least.

I mean, here I am describing a situation and you're saying "Yeah, but what if the situation were different". Then the situation would be different and not the one I'm describing.

It's ok not to have an answer to any of the scenarios. To not know. I don't either. I don't know if there is a good answer to a "fair and rational distribution of wealth". The point is to make you question your own perception of the situation and realize that the answers you believe you have may have issues of their own.
Chicago is the second-biggest Lithuanian city
The Bitter Truth About Starbucks Coffee
Is Lua not good enough for C++?
Thank you for you tip.
My plan is that you settle and then pay their licensing fee. At which point you've got the right to show the tattoos so you use that right. Create a new basketball player called LeBron Jame's Solid Oak Sketches LLC tattoos. It's just LeBron Jame's tattoos on an invisible person. It's the worst player and gets constant heckling from the audience.

LeBron doesn't seem to like where the whole thing is going, so that means he's also likely to play ball if you bring him some more interesting ideas. Create a LeBron James with a different set of tattoos by a tattoo artist you explicitly hire for this purpose. Advertise this artist a lot. Make sure the new artist has the staff to be able to completely consume all of Solid Oak Sketches LLC business.

Make a campaign mode where LeBron James has all of his tattoos stolen by a wizard. You have to win a bunch of games to get them back, but they come back slightly altered such that they are no longer legally Solid Oak Sketches LLC IP.
Agreed. As much as I like coding and generative art too, there's nothing like the effort of keeping the smaller gear inside the larger one and going fast. Much harder on the outside! I just picked up a $8 Spirograph in tin case for my three year old.
I understand, and understood, but, knowing that the EU didn’t historically require that (starting date was uniform from 1981 on, but the ending date was different between continental Europe and (the UK and Ireland) until 1995), wanted to indicate I don’t think this will become a free for all (if one hour is beneficial, wouldn’t moving 10 minutes each month, or 2-ish minutes each Sunday, be more natural? :-) )
> It is a shame there is not a BNF equivalent, sometimes.

Yeah, something like instaparse [1], but more widespread.

[1] https://github.com/Engelberg/instaparse
What you need to know about the OpenStack Rocky release
The vast majority of systems can ignore leap seconds, though.
A story from India
Please don't post unsubstantive rants to HN. The idea here is: if you have a substantive point to make, to make it thoughtfully; and if you don't, then not to comment until you do.
The idea proposed: use protocols and value types. This avoids the problems with subclasses and with mutability (concurrent modification). Enums are also used as a controllable way to have different kinds of related objects and use a switch statement to distinguish them.

It is fun to see how the benefits of immutability, typeclasses, and (sort of) ADTs / pattern matching are being discovered independently.
Indeed, and I do. Unfortunately my frustration is with gently telling people that if they set a meeting at 6 PM UTC it's at 7 PM for me, and that's not ideal, and them wondering why I'm telling them they did something wrong.
The ACLU link is literally a timeline of events. Care to refute those instead of just making an ad hominem?
One caveat: the relative level of definition of work has a huge effect on the work. For example, well trodden engineering implementations can have rational top and bottom end estimates. A UX design or Eng implementation of a "never been done before" or strategically-shifting problem is far far harder to estimate.
iOS 8 MAC address randomization
Unbrittle Events
Trends isn't the best for this as it's search results not occurrences so really all this will show is the number of people confused by the term for weird contractions like this. "AFAIUI" could theoretically just be completely understood by the community using it.
I have a first generation one of these. I find the 'halo keyboard' very difficult to type on (then again, I find touchscreen keyboards very difficult to type on).

You can manage a few words touch-typing but then things start drifting because there's no tactile feedback. And unlike an on-screen keyboard, you're not looking directly at it; that's the point of having a separate keyboard. I end up making mistakes even hunting-and-pecking.

I used the pen digitiser for a few minutes then concluded that it has no practical use. The included drawing app was useless for anything but doodling. It was fun to use it as a pointing device in Android, but only fun, not useful.

So I just use it as a tablet with a kick-stand, which is handy but doesn't play to the USP.

But let's face it, a second epaper screen is cool.