skysight-inc/HackerNews huggingface dataset:
> Space shuttle style is meant to ensure that every branch and condition is considered and accounted for

I thought this was what you were supposed to do. Not that I do it every time, because I'm lazy, but Zed Shaw used to say every `if` conditional should have a corresponding `else` (which can also take the form of guard clauses). In Ruby, this is really easy to do because every method has to return something, so you build "returning nil or some String" as a concept into your program. There's a whole discussion around whether _that_ is a good idea, but I digress...going through the motions of enumerating every possible condition for a given piece of logic is not a bad exercise, and can result in very robust code at the expense of the code looking a bit more confusing than necessary.

We have a very similarly-written piece of code to this in our eCommerce platform. This code, written in Ruby, is used to calculate prices of discounts with regards to discount compatibility. There's a big warning atop the method stating something like "Please don't decorate/override this unless you ABSOLUTELY need to, the consequences could be very difficult to debug!". Not the easiest piece of code to look at, but it gets the job done in an efficient way without having to rely on C extensions for performance. We were also focused on correctness here, because calculating the wrong discount group could result in zero or even negative order totals, which our clients would _not_ be happy about. So the code is very verbosely written, isn't optimized for legibility, and strictly specifies both if and else sides of each conditional.
Ask HN: What elements of websites annoy you the most?
What elements of websites annoy you the most? I'm thinking of 'accept cookies' prompts, etc. Especially interested in specific examples, but also general patterns. Working on something simple to block them all.
Interesting, seems like the core tech of smartlook / hotjar
Nearly all modern programming languages being created have adopted functional features.

Swift, rust, c#, reason
I really liked this explanation of functional programming, and why it might be useful in certain contexts.
A Rusty Advent of Code
Ok, I got it now :)
Late reply - my point still stands, I've never seen anyone sniff chicken in a supermarket. Whether you do or not, doesn't mean everyone else does. Practically, no one does.
Just noticed this one, too: https://bgpstream.com/event/170070

Does it mean an Iranian telecom hijacked some of AT&T's traffic?
Not sure what your definition of cheap is. You can get a used Nissan Leaf for under $5k. Expect 40 - 50 miles of range on a worn battery.

https://www.autotrader.com/cars-for-sale/vehicledetails.xhtm...
Blockchain and Healthcare: Use Cases Today and Opportunities for the Future
Over Eating
According to this site, average health insurance cost for family coverage is almost $20K/y - http://www.ncsl.org/research/health/health-insurance-premium...
So it really depends on whether your employees are all single.
Also I think you're not counting other things that are normally counted in overheard: cost for space, recruiting, etc: http://web.mit.edu/e-club/hadzima/how-much-does-an-employee-...
Very nice article, so many useful things.
One of my favorite features of Haskell is that I can use where to write the auxiliary function definitions after the code that use them, but keep them scoped inside of a single function.

A relatively bad example here: https://wiki.haskell.org/Worker_wrapper#Hiding_the_worker
Hacker News Books for 2018
Isn't that a case of "shit crayons"? People can and do make great things with terrible tools, but that doesn't make those tools any less terrible.
I played with the examples and I am extremely impressed. I couldn't tell at all that I was being recorded; I figured the examples would just be videos of people interacting with those pages. The speed-up feature is very neat too.

Very good work. I am actually a little surprised something like this is open source.
I don't see why IQ would necessarily correlate with knowledge about meteor strike safety best practices.

On the other hand, if innate curiosity about environmental phenomena is at all correlated with IQ, it could result in a lowering of the average IQ instead.
https://www.bollymeditube.com/2018/12/how-to-cure-fissure-pe...
There's probably a lot of people who think drugs ought to be legal, and that they're only avoiding an unreasonable law when they sell you drugs.

There's probably a lot fewer people who think that about the hitman business.
Yes, benefit for family plans are probably worth $12k+ per year, but that’s if your employer offers it.

https://www.bls.gov/opub/ted/2018/mobile/employee-and-employ...

I suspect that there are 3 classes of people when talking about employee benefit costs (in a employee vs contractor discussion):

1) Private sector, high pay professional - I would agree benefits could be around 40%, but this also only applies to maybe top 20% of non government employee population.

2) Government employees, maybe even more than 40% considering their post employment benefits.

3) The bottom 80% of non government employees, who I doubt approach anywhere close to a benefit value equal to 40% of their pay.
I agree.

In Philosophy of Software Design, J. Ousterhout says that this TDD practice encourages "tactical programming", i.e. trying to solve the current open ticket with minimum amount of work, instead of solving the problem correctly. Personally I'd go further. To me, this approach encourages replacing your brain with a dumb gradient descent process. Instead of thinking about the problem and solution, you just keep writing an ever larger monster whose sole purpose is to interpolate between test cases.

Tests themselves are useful. Following a process that makes meaning implicit instead of explicit? Not so much.
Reviews and escrows are a thing in the drug world. Generally speaking everything with drugs is easier:

-It's easier to manufacture your own drugs than commit murder

-It's easier to go unnoticed by law enforcement manufacturing, selling or buying drugs than going unnoticed with murder

-Enforcement authorities around the world are much more willing to cooperate with each other when it comes to solving murder rather than busting someone's MDMA lab

-The market for drug consumption is much larger than the market for hitmen (fortunately!) and it's easier to reach out for the former audience rather than the latter

-There are much more third parties willing to act as escrow for drug trade rather than hitmen services

-There's a moral case to be had about leaving drug use alone (victimless crime and all that), as opposed to murderers or murder instigators which are universally reviled; there are much fewer people willing to engage in a hypothetical hitman market than there are with a drug market

-A review system can actually work with drugs because of the large demand and relatively risk-free aspect for buyers; a good seller can quickly build a reputation, while a bad seller will get buried by bad reviews. Can you imagine a hitman customer writing an Amazon-style review over the person he had murdered?

>And to be clear, I'm not saying murder for hire on the Internet is a thing; I'm just mildly surprised nobody seems to have done it yet, especially now that cryptocurrencies have pretty much solved the largest problem of how to get paid.

There just isn't enough demand for it to be worth the risk and hassle. As I said, any hitman stupid enough to set up a front store is begging to be busted by undercover cops posing as "customers".
Back before internet access was widespread I saw a lot of people online who foresaw a future where an internet connection provided access to the sum of all human knowledge, and forums to participate in the marketplace of ideas. Between human curiosity, good will and people's natural desire to not be wrong, everyone will learn and reason their way to the truth (incidentally ending up agreeing with me).

Surely once everyone can access the equivalent of several university educations online, the masses will come to realise that sodomy should be legal for libertarian reasons; transparency and access to information will mean voters will demand and get honest officials; that employers will realise it's not rational to discriminate against a sysadmin for not wearing a dress shirt; and it'll be the year of Linux on the Desktop.

In the subsequent decades, people have re-evaluated some of those predictions for understandable reasons.
The Skeptic’s Checklist
Reverse Engineering Guide for Beginners: Methodology and tools
It wasn't the first time a mutiny happened and the astronauts paid the cost. See Wally Schirra and the Apollo 7 crew.

https://en.m.wikipedia.org/wiki/Apollo_7
This is awesome. Any other such simulations for economic phenomenons?
Sure you can. We're still ethical reasoning humans at the end of the day.
Cool, I'll put that on my website!
In general, a side impact is a very bad scenario for the party being hit. There's not much room for crumple zones at all, and cars are often not rigid enough, leading to an intrusion by the other vehicle. But this is true for larger vehicles as well, e.g. older Ford F150s were famous for basically folding in half from the slightest side hit (say, a telephone pole at low speeds after losing control). In this situation, a rigid battery pack might actually make the car a lot safer. But yes, I wouldn't want to be in a tiny car getting hit from the side by a larger one.
You're describing an unstructured single function.

There's a middle ground - sectioned code, esp. with code folding or similar commented sections. Good IDEs support such a feature so you can hide the code you think you understand to not look at it every time.

You will have to read this code at least once or trust the documentation and name. I found that in "mature" code the latter is a recipe for disaster and days of debugging.
> (...) until we stop pushing floats as the standard solution for dealing with decimals.

I'm curious, in that sentence, who is "we"? I cannot imagine a scenario where someone would be so technically involved to be aware of the difference between a floating-point and fixed-point decimal, but still decide to use floating-point in an accounting environment.

Are you talking about project managers? Architects?
> It's the "jazz music" of software development.

If Anthony Braxton wrote software...
AeOS – An iOS Renamed and Privacy SMTP Mobile Configuration Servers for Everyone
Good News Stories You Probably Didn’t Hear About in 2018
Previously discussed:
https://news.ycombinator.com/item?id=10962026
Invoke gauge theory to set the floor from which we measure, so that the tautology always holds.
The only and critical reason - skipping the check will net you tons of debugging all the time because hidden assumptions are often not documented. (or otherwise visible)
I was assuming that in this scenario, the employer is deciding whether to add an employee versus a contractor, and they already have other employees, then those other overhead costs are there anyway.
You can affect this as a foreign power. Pay some think tank to produce material for (so called) media outlets.
Show HN: Apathy – Analyzing web server call paths from access logs
Best of 2018: OutSystems Engineering Blog
Tesla names two independent directors as part of SEC deal
Did you seriously just ask how people who buy crypto can fall for obvious scams?
Supports what?
Hi, hackers, the author here.

Since I've seen some people are talking about the open source idea and comparing rrweb to some commercial products, I'd like to share a blog post about the vision of rrweb.

http://www.myriptide.com/rrweb-introduction/

Also, you will know about how rrweb works in this post.
What Is User Experience UX? And What's the Noise About?
For schools, getting on the Shixin list (the only national "list" there is), you are barred from sending your kids to private school. So if you live in a good district with a good school (your example for bad credit in USA), your kid can still go there! (被执行人为自然人的，被采取限制消费措施后，不得有以下高消费及非生活和工作必需的消费行为：...(七）子女就读高收费私立学校)
For transportation, nothing bars you from taking the train/plane/boat, you're just not allowed to buy anything in first or second class (so probably just economy for planes, and the most normal seats on trains). Can you point me to anything that says you can't take trains at all? From the Shixin list, it says "被执行人为自然人的，被采取限制消费措施后，不得有以下高消费及非生活和工作必需的消费行为：（一）乘坐交通工具时，选择飞机、列车软卧、轮船二等以上舱位", and "（九）乘坐G字头动车组列车全部座位、其他动车组列车一等以上座位等其他非生活和工作必需的消费行为" (Can't take the G trains aka the high speed rail or any slight-lower-speed train's first class).

[0] http://zxgk.court.gov.cn/shixin/
I don't really want to read dictionary cover to cover to learn english.
The platforms may themselves be unwilling listeners.
That does sound a bit worrisome if it indeed were to become an OS that runs on every platform including desktops. If they ever close source it, then I will be really worried.
NCC: a new x86_64 C compiler for BSD/64
'Baby talk' could be vital to child development
> Kubernetes exists to solve problems that people using better languages don't generally have

This statement doesn't make sense, and the arrogant tone just stinks of ignorance.

Kubernetes isn't perfect, but if there's better provider-agnostic language-agnostic way to dynamically scale an application written in heterogeneous languages across a cluster or on a competitive choice of cloud platforms with dynamic provisioning, I'd like you to tell us, and explain why it's better than Kubernetes.

Language agnosticism isn't something to discard lightly. Different languages have different strengths and weaknesses.
Biography Best
20 Controversial Observations About Security Tokens in 2019: Part II
Full Stack Ethereum Engineer Job
The fluids were often polychlorinated biphenyls, which are nasty in their own right, and produce even worse things when thermally degraded, such as dioxins.
This looks awesome! Does anyone have recommendations for a tool that can do this but also let me save the video? Preferably, below 100MB per 5sec recording...

I mean, come on, how smooth is this library?
I don't remember details but there was also an Apollo flight where the crew was so cranky that none of them was allowed to ever fly again.
God. That story rankles me, the new Jeep, a lifestyle product and environmentally terrible choice, being driven very poorly and causing massive damage and potential serious injury at only 15 mph. These large cars need to be taxed, they are not good for our planet or other drivers
Ocaml has a GIL. I've worked with people trying to build a distributed system in a language with a GIL and do not recommend it.
Google Data Studio in 10 Minutes: Step-By-Step Guide
It seems the pushes against freedom of speech ideals in the US greatly increased after the 2016 election, coming mostly from those who share the ideology of the losing party targeting the speech of the winning ideology/party.
Nasa probe will make the most distant fly-by of any solar system object
You also need to remove the Facebook tracking pixels they have embedded in it.
Facebook should add a privacy setting that allows you to disable @mentions completely, or limit them to people you have added as a friend. I would not be surprised if this is already a feature.
The problem of rising card prices in Magic: The Gathering, especially for cards on the reserve list[1] has lead to increasingly good reproductions of these cards[2]. Some are so good that, in protective sleeves that are commonly used, you wouldn't notice from across the table, and in some cases, you wouldn't notice without a light test or jeweler's loupe.

So the solution to WoTC refusing to reprint these cards is for people to do it for them.

[1] https://mtg.gamepedia.com/Reserved_List, despite the fact that WoTC claims they don't consider the secondary market

[2] Calling them reproductions is being charitable. At best, they're replacements when people use them in decks and are honest about them, and at worst, they're counterfeit when people try to pass them off to others as legitimate for a profit.
@yotapan they all sync, so it doesn't matter which one you are on (if I'm not mistaken that's the beauty of it)
I certainly am one of them :)
Well as you know tomatoes don't grow naturally in the Netherlands.

The whole thing about Dutch farming is efficiency. Produce vast quantities with minimal manpower or land use. Feeding the world>taste.
Has anyone successfully used this beyond eBay themselves?
Apologies, I think I assumed too much about Racklog's implementation.

However, what I say above is still true when it comes to most Prologs. The comparisons to SQL always seem to miss the point that, though Prolog terms are stored in a database, Prolog is not a database language.
At some point I'd like to do a write-up. If you are interested, I wouldn't mind going into detail via email. Feel free to reach out, my email is in my profile.
Try F# on WebAssembly
What You Can Learn from How Warren Buffett's Investment Process Evolved
Facebook does not own every public space. Facebook is not, itself, a public space. If one had to guess at it, I would describe it as perhaps a publically-accessible but privately owned space. Even if one decided to host something that would be allowed in public streets (for example a protest rally) the landowner of the space can still kick you out at any time from their property.

On the internet, if one wants to express hate speech, there are still websites to do so that may not be Facebook.
> deploying a distributed monolith

This is not what Kubernetes is for.

Take a step back and understand what you're criticising. You just look uninformed.
And then language C(++) just skips unnecessary monads which are syntactic salt and uses exceptions, while providing the optional type for where you really, really want this behavior. Tradeoffs of course, but these were considered.

The main problem here with this "solution" is that any monad looks like every other monad. You can easily lose context and have to rely on naming conventions, which is quite terrible. You cannot spot what the code is doing at a glance.

And if you mess up, the type system and compiler will spout some completely unhelpful message because it parses everything the same.

Code that does very different things should look different, not identical. (Unlike what Lisp and FP people think.) Just think on why we do not use textual buttons everywhere in UI.
It's a major reason fewer people accept Lisp than could...
Social Media will be used to narrow the Overton Window and pull even more rights away and drive society into even further consumerist passivity. They're a private governmet, just like most large corporations now.

https://press.princeton.edu/titles/10938.html
This made me curious - are there any SQL databases being actively developed in Rust? I found one on GitHub (LlamaDB) that does not appear to be maintained.
Here’s a PSA for you: https://m.youtube.com/watch?v=Bt9zSfinwFA
No, the commander of the space station is management. He's the one who has ultimate authority to decide what his crew does, and is directed to act in the interest of their safety (which means mental as well as physical health) in order to ensure mission success. This is an inheritance of the role of a captain on a ship. If the commander/captain decides it is in the best interest of the crew to stop work, it is neither a mutiny nor a strike.
Designing a great user onboarding experience
Also consider an e-Ink alternative like reMarkable. Less features, but closer to real paper.
Social worker left surprise $11M to children’s charities
> I just wish closures were a more first class part of the language like they were in Smalltalk.

Functions are first class types and values in Swift. Both named functions and anonymous functions can be used as values and can capture values from outer scopes. What’s not first class?

> If language written in 1980 could use closures/lambdas all the way down even for things like if/else, and keep the deception pretty complete, I don’t understand why swift can’t do similiar.

Smalltalk’s approach of using higher order functions for all control structures is more uniform in some ways but is not inherently superior. Swift has statements that perform non-local control transfer (break, continue, return) and designing those to work with closures (presumably only non-escaping closures) would be tricky. Also Swift ‘if’ and ‘switch’ statements can perform pattern matching and bind variables in various complex ways, so again it’s not clear if completely unifying all this with anonymous closure syntax would produce something that is simpler overall than just special casing conditionals and loops in the statement syntax.
It depends on how you define risk. I find it crazy risky to tailor your resume in a way that results in people who are not "#2s" end up being your boss. In my experience, the only thing worse than a bad employee is a bad boss. I recommend letting hiring managers see the good, bad, and ugly of your experience. Let someone who can see through it all to recognize your value be your boss. And let everyone else walk away.
That's the biggest engine ever put in a Vespa. For a long time (until the 1990s) they were legally limited to 1.5 Hp in Italy.

That Vespa also costs nearly as much as this car.
Shuttle's missing a space after the comment symbol

//checkVolumeSatisfyClaim checks if the volume requested by the claim satisfies the requirements of the claim
Apollo 7 -- the first crewed Apollo mission.

https://en.wikipedia.org/wiki/Apollo_7#Crew_honors
There’s so much we don’t know about high voltages. I never understood why we don’t research it more. I guess too dangerous.

Even a phenomenon like this. Could we use it for lighting a whole City for less power than streetlamps?
I second the answer about having them before var-block: In python I always follow the style of having nested functions directly after the outer function header, and only going one layer deep. This way the only thing in their scope is their parameters as well as the parameters of the outer function. Using this restriction I find them very useful and concise - much better than having one-off helper functions in the outer module scope.
What type of data would that be? I once did this when I did my own primitive version of a geospatial database in the 90s.
I would just shut down in these hard to govern, hard to monetize regions/countries. I know it's a bit step from "connecting the world" mantra, but it solves the problem.
What is the difference between netbeans.org and netbeans.apache.org?
For what it is worth, priming isn't really K's work. System 1 and System 2 isn't even unique to him.
See also, httpp://www.decisionsciencenews.com/2012/10/05/kahneman-on-the-storm-of-doubts-surrounding-social-priming-research/
Federal laws are also suppressing the industry. If employees are drug tested and sanctioned according to federal workers compensation laws the market will always be paltry.
Woozle Effect
Yes, I could show you a simple example:

Let's create our own 78 digits long string type:

(def hex-digit (set "0123456789"))

(defn hex-digit? [x] (contains? hex-digit x))

(defn hex-str? [s] (every? hex-digit? (seq s)))

(s/def ::hash (s/and hex-str? #(= (count %) 78)))

::hash is now registered, now we go to the REPL:

(s/valid? ::hash "23179372")

;;=> false

(s/valid? ::hash "nope93721907914920047210715459933122004671648400678953445710500236944435987060")

;;=> false

(s/valid? ::hash "231793721907914920047210715459933122004671648400678953445710500236944435987060")

;;=> true

That's cool, but we want to generate too:

(defn hex-str-gen [n]
(let [digit (g/elements hex-digit)]
(g/fmap clojure.string/join (g/vector digit n))))

(s/def ::hash (s/with-gen (s/and hex-str? #(= (count %) 78)) #(hex-str-gen 78)))

We extended our ::hash spec with a generator function, so we can do this now:

(g/generate (s/gen ::hash))

;;=> "310584715385467847758653938894742415543975445356609397864862925839413265904779"

(+ Pro tip: you could spec functions too)

Learn more about spec here: https://clojure.org/guides/spec