skysight-inc/HackerNews huggingface dataset:
I think the misunderstanding goes like this -

"Okay...so you return either Maybe (value), or Nothing. But what if they return Maybe (Nothing/null)?"
"Can't happen."
"What do you mean it can't happen?"
"It literally can not happen. The compiler's type checking enforces that when a function returns Maybe A, it really is of type A, which can not be null or nothing.".

And that's where both sides sometimes break down; Pythonistas can, yes, have a hard time understanding that the compiler can enforce that, and Java people can have a hard time getting past the idea of null being a possibility everywhere.

I find it easier to explain coming from the other direction.

"When does a value get assigned null?"
"Umm..."
"Either you have a variable that has never been given a value, if the language lets you, so is defaulted to null, or you assign the variable to null."
"Ok."
"Now, you can only assign the variable to null if either you do that explicitly (a = null), or, you are calling out to another function that returns null (a = func()). But then, that function can only return null in the same cases; either the author explicitly assigns null, or he calls another function that returns null."
"Right..."
"So eventually, to have a null bubble up, someone had to assign or return a null. So your two cases, really, are either you left something uninitialized, or someone assigned/returned a value of null"
"Gotcha."
"So what if our language prevents you from leaving variables uninitialized, -and- there is no null value?"
"You can't have an NPE. But what if there is no valid value? Do you just throw an exception or something?"
"You -could-, but that's not ideal. What we do instead, is we change the function signature. That's where the Maybe comes in. Rather than just returning (type), we return Maybe (Type), where the actual values when run are either Just (value), or Nothing. Nothing, in this case, is the equivalent of null, but the caller of the function knows to check for it, and the compiler can be told to MAKE them check for it. And because we have no uninitialized values anywhere, we can't unexpectedly come across a null, and because there are no nulls to assign, anywhere that might be a null is itself a Maybe, and it's handled as such everywhere."
ISIS is an offshoot of Al Qaeda. They will be able to attack us in a similar manner as the Boston Marathon attack. If a 9/11 style infiltration of this country were to happen, they would easily affect us in that manner.

I'd rather not discuss how I'd attack the US. But needless to say, we are quite vulnerable to a smaller-scale 9/11 style attack, where foreigners invade us and plant bombs at mundane locations. There are plenty of festivals, infrastructure, and gatherings that are vulnerable in the US to another "Boston Marathon" massacre.

And unlike Boston, the majority of places in the US don't have simultaneous access to six world-class hospitals + highly-educated medical population to care for the wounded. Keep that in mind, the casualties number was low because Boston hospitals were so close and world-class in their care abilities.

In most cities, random dudes on the street wouldn't know to pinch specific arteries to save your life. Boston was a unique place with medical know-how and lots of highly-trained medical response at the ready.

http://www.vosizneias.com/128409/2013/04/16/unlikely-hero-in...

If such an attack happened anywhere else, I guarantee you that more people would have died / been injured.
> not wildly original.

Can you (or anyone) find similar A's in the wild? Doesn't have to be a logo - just part of a font would by fine.
Stellar is the "IP layer for credit" while Bitcoin is the "IP layer for money".

Stellar doesn't actually transfer funds (like Bitcoin), it only transfers IOUs, the settlement (actual value transfer) occurs outside the Stellar network.

Stellar and Bitcoin achieve two different goals.
Yep, speaking as part of the team, we're committed to making it cross platform where it works with GCC, Clang and MSVC. It works on Linux, Mac OSX, Windows, Android and iOS.
That's a good point, and one I hadn't thought of. I wonder what it would take to wrap Unix.fork into a threading library to make threads more convenient?
Thanks for the feedback. Firstly, Amy is very awesome indeed.

And as for the recommendation accept payment for the S3 service, it's something we've considered – likely a choose your own dollar amount thing. In the meantime, feel free to send any money you want to nate@picturelife.com :)

As for using other storage options – at this point we don't feel like we can provide as high quality a service using other storage systems. S3 works well because our architecture is oriented around it, and housed within the same network, allowing us to process, serve, and analyze photos efficiently. Using Dropbox, for instance, would introduce huge amounts of latency and instability in this process.
As I understand it, this article misrepresents the purpose and nature of the Null Object Pattern ("NOP").

The author cites a comment that describes (very) vaguely a "hotel booking" example, expressing the idea that "None" is the null object. But "None" is not an instance of the NOP. None has no interface. You can't tell None to do something.

In contrast, an acutal implementation of the NOP might be in a travel reservation service which allows you to reserve both a hotel and a rental car at the same time. Somewhere in the guts of that service there might be a Trip object.

class Trip
{
Car car;
Hotel hotel;

public void Reserve()
{
this.car.Reserve();
this.hotel.Reserve();
}
. . .
}

A Trip can be constructed with a NullCar when the user doesn't want to reserve a car on this trip. When NullCar::Reserve is invoked, it doesn't do anything, but Trip doesn't care, and the implementor of Trip doesn't need to remember to check its car to see if it's null before invoking it.

I've encountered this misconception frequently, and it typically stems from the common understanding of object oriented programming as programming in terms of entities which represent physical objects in the real world. I deduce that the author uses this definition from the sentence "It is also interesting to note that appearances of null objects are virtually non-existent in real life."

Objects aren't necessarily representations of physical entities. Objects are simply things other objects (or procedural code) can use to accomplish something without having to know how to accomplish that thing.

I've found the distinction that Alan Kay has (repeatedly) made useful in helping people understand this idea: Property accessors aren't for objects, they're for Data Structures.

So, when the author says that, "the basic idea of the null object pattern is exactly the same as for practices like 'use zero instead of null'", my reply is, "No, it's not called the 'Null Data Structure Pattern'." Use zero instead of null is (flawed) advice about how to write data structures, not how objects should be constructed. The NOP is not used to build objects that represent data, it is used to build objects that represent action. The author's repeated use of the GetCustomer example is inappropriate for the NOP. It's much more likely that a database record is represented using a data structure than an object.

Pragmatically, if you feel the desire to ask an object if it is the NullObject, you are not writing object-oriented code, you are writing procedural code. Instead of asking if the object is the NullObject, move the branch that would be invoked if the object were the null object into a method present in the interface that the NullObject implements. Perhaps you find that you don't actually have a NullObject, after all.
> Israel is a nuclear state

They've never confirm this, only that it is believe that Israel possess nuclear weapons.

> Culturally and historically, the state of Israel was established by the Allies post WW2. So there is a moral obligation as well for the Allies (US, France, UK, etc. etc.) to watch out for what Israel does today.

There shouldn't be any morale obligation at all when they, the Jewish people chose the spot to become Israel. We, USA, didn't assign it for them. US, historically, didn't even care about Israel when they were attacked, the British were the only one that really back them up. US ties between Israel are more powerful later on, so this statement is false in term of morality.

> Ultimately, Israel is a bastion for Western values in the middle east.

And yet they are condemn by the majority in the UN except for USA veto.

> Do you think ISIS will be more concerned with Israel (who have a military within marching distance), or with Europeans / Americans that they've sworn to destroy half-way around the world? Who will they attack first?

Total fantasy. This fantasy is also fear mongering, in term of "what ifs". Even if this fantasy come true, you don't think Nato or those US carriers that are station nearby isn't going to bomb them like Korsovo?

And how smart are they to operate nuclear weapons? How long will it take them to learn how to use it?

> Besides, if Israel falls, their nuclear stockpile will cause some major issues.

Once again fear mongering.

Let's look at it this way, they got nuclear weapon, so they got a free pass for their horrible behavior against USA? The President and John Kerry?
No, in Haskell and Scala Maybe and Option are sum types. There also happen to be monad operations defined on those types, but you don't have to use them.
Previous discussions:

https://news.ycombinator.com/item?id=6330598

https://news.ycombinator.com/item?id=3237478
Similar discussion: "Ask HN: How to split equity?" https://news.ycombinator.com/item?id=8078356 (81 points, 10 days ago, 50 comments)

I think that the technical term you are looking for is "vesting". Read the linked discussion.

I don't understand the 40%+40%+20% split. It means 40%+40%+0%+0%+0%+(maybe 20% later)?
> This is probably the one thing I wish the C-haters understood better. Reality has a very anti-GC, pro-pointer bias. These are not arbitrary decisions. Some part of the system needs to work this way.

I don't know how many of the "C-haters" actually hate C-the-language because it's too low level, or if they hate the fact that C is used in many cases where a higher level language would be appropriate. It's definitely not reasonable to assert that C is too low level for writing an OS kernel, but when people argue that software like rhythmbox, for example, ought to be written in something a bit higher level, there's some merit. A lot of projects use C just because it's an OK choice that a lot of people are familiar with and few people will have strong objections to.
C99 implementation: http://git.zx2c4.com/spark/

git clone git://git.zx2c4.com/spark
cd spark
make
curl -s http://earthquake.usgs.gov/earthquakes/catalogs/eqs1day-M1.txt | cut -d, -f9 | ./spark
I appreciate your serious response.

Let's look at it this way, they got nuclear weapon, so they got a free pass for their horrible behavior against USA? The President and John Kerry?

It isn't horrible behavior. It is standard behavior that has been going on since the dawn of Israel. We catch their spies all the time, and they catch our spies all the time.

US / Israel relations are funny like that. We don't really trust each other, but we both need each other.
Messenger Bag Process: From Sketch to Finished Product
Surprisingly, Google's visually similar image lookup is absolutely useless here. Tried searching[0] new Airbnb symbol shape, after converting it to monochrome, and nothing even remotely alike came up.

[0] https://www.google.com/search?num=30&tbs=simg:CAESZRpjCxCo1N...
I don't see why it can't be accidental. I wont say it is not original, but it even doesn't have a high number of details that you can use to make it unique. Similar ideas will bring similar results.
Improving Freecycle with SMS alerts
Typesetting your CSS Objects
Negative Zero may or may not be equal to Positive Zero
Google sells one of its mystery barges in Portland, Maine
Design is the Experience
Confusingly, though, German does render Latin æ, œ as ä, ö
(ästhetisch, ökonomisch)
>Eg length-prefix strings would avoid the slow strlens for concatenation.

But this would be suboptimal in other ways. Besides taking more RAM, it would get in the way of useful tricks like "temporarily shorten string by setting a particular byte in it to \0", or even more useful, "obtain right-terminal substring by simply increasing pointer value".

Different string implementations are more efficient in different scenarios. I love how C gives us standard libraries for a particular string implementation (NULL-terminated) but at the same time allows the flexibility to use whatever implementation we like, by not abstracting all the details out of our control.
Magic Leap got $50M first round funding to do just that:

http://www.nytimes.com/2014/07/15/science/taking-real-life-s...
> My credit card is a useless piece of plastic the moment I get to a phone and have it disabled.

Let's hope street robbers don't start kidnapping people and milking the balance out of their accounts over a few days rather than just robbing cards.

http://www.theargus.co.uk/news/2382134.print/

http://www.dailymail.co.uk/news/article-400032/Teenager-kidn...

http://www.chesterchronicle.co.uk/news/armed-gang-kidnapped-...
Hukkster, The Winklevoss-Backed Online Shopping Tool, Has Shut Down
> what other languages have an OO system so massively flexible that you can easily build stuff like this on top of it?

Lisp

...sorry I couldn't help myself
If you're learning martial arts for self-defense in 21'st century you're wasting your time. Your karate skills won't help vs someone with a led pipe, crowbar or a knife.

Just get a gun and get it over with.
same problem in dublin; my student card and travel card both interfvere with each other
I'm not convinced that copper foam is a good idea for a heat sink, but this article doesn't give enough detail to convince me that it's a bad idea either.

The radiative emissivity might be a bit of a red herring, since heat sinks typically rely more on conduction and convection than on radiation for cooling. So then it comes down to some hand waving about boundary layers.
I fear that this article misses out on one of the most important aspects of cheap FPGA boards, which is the software stack. Do not be fooled. There is no freeware, open-source, GNU, LLVM etc software in the FPGA world. You will need to use the manufacturers very own, proprietary, place & route (and often synthesis too) software.

For this reason, go with Xilinx or Altera who both offer free versions of their development kits. Also, make sure that the particular part you have is supported by the free kit. Often only the smallest and simplest parts are supported.

Form a quick scan of the website, it seems that Lattice-Semi still does not offer free licenses of development tools. Years ago I bought a cheap ($99) Lattice-Semi PCIe/1G FPGA board, this board is still useless as I can't get the software without a $1000 license for the software kits. Although the board was cheap, it's nothing without the software.
If we're talking very rich, there shouldn't be too many of them. I mean, how many people know the mayor? This isn't even a class.

Still doesn't add up to me.
FYI, you can find it at the bottom of the page.
I am currently developing a software solution for this called Webcam Blocker Pro. It's ideal for parents who wish to prevent their children from using the webcam and microphone without their supervision. Once the program is locked, it essentially prevents anyone from using any webcam or microphone attached to the computer, including malware or hackers, unless they have the password.
Check http://www.amazon.com/Israel-Lobby-U-S-Foreign-Policy/dp/037...
More on the book: https://en.wikipedia.org/wiki/The_Israel_Lobby_and_U.S._Fore...
Is this really relevant to Hacker News?
So as others noted; this code will compile, but with a warning. Turn on warnings for incomplete patterns (-fwarn-incomplete-patterns), allow warnings to break compilation (-Werror), and you've got compile time safety.

https://www.haskell.org/ghc/docs/7.0.4/html/users_guide/opti... lists out what the flags do.
Cultural history captured in 5-minute film
You don't need each other. All what Israel does is alienate the US and protects Israel's horrific acts and occupation of the Palestinian people.
Ask HN: Any help to decrypt fitbit?
I use voice control for one thing: to send text messages while driving. It's a lot safer to say "text bob i will be there in fifteen minutes" then "send" than to try to type while driving. It's also (understandably) illegal to type the messages while driving in many areas!
I tried using a static blog for a while, but I found I was spending so much time fighting with the generators out there that it made far more sense to just use WordPress. Plus (I and probably nearly everyone else), hardly get any traffic, so costs aren't an issue (and if it were, there are tons of ways to cache WordPress pages, so you effectively get a static site on top of the WordPress CMS; I'm not sure what else you could ask for).
Not certain diet anecdotes of a hard core, super light cyclist are relevant to most people (who maybe walk a couple times a month). Maybe to other people who exercise hours a day? I don't think the article is written very well since it really tries to claim otherwise, but then his problem with a lot of the diets is just that they don't give him enough energy for sports.
3 KIDS │ 30,000 MILES │ 4 CONTINENTS │ 1 TRUCK │ 1 YEAR
I wouldn't be surprised if somebody wrote malware to record peoples laptop cameras, detect large amounts of skin, record their facebook details and then threaten to post the information unless they pay up.

We already have ransom-where, why not blackmail-ware?
I must be a psychopath then.

It isn't hard really. It is like acting or playing D&D. You make some quick character stats and use that persona for awhile.

In the past 24 hours I've been accused of being a racist and a psychopath on HN. I know that wasn't your intent but that is the outcome.
The DE1-SoC is definitely worth it for the ARM HPS. A hard processor which can run Linux attached to an FPGA is a very powerful combination. Check out http://zhehaomao.com/project/2014/01/02/fpga-series.html for examples of stuff you can do with it.
Red Hat is made to use Red Hat repos. You may have to enable epel or epel-testing for packages that are newer or have software that Red Hat isn't interested in maintaining.

Red Hat also isn't meant to be bleeding edge, it's a very safe, stable server distribution. If you want a desktop use Fedora.
Delivery drone with marijuana and phones crashed outside a S.C. prison
Free though. And lots of features.
Of course, and that's how ad impressions are counted. But that doesn't help me as a user, and advertisers pay much less for "impressions" than for an ad that is interacted with in some way. So that's worse for everyone than an ad that you click to dismiss.
Transmission is in EPEL. So it's just

su -c 'rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm'
su -c 'yum install transmission'

(The first line is just copied and pasted from the EPEL instructions, you don't need to memorise it)
Is there an opposite version? I've found that many of the best submissions have a high points-to-comments ratio.
Most heat sinks rely on conduction and convection because they use fans. A passively cooled setup is dominated by radiation.
It's actually a very little function I wrote, based on `tee` Unix shell command: http://unixhelp.ed.ac.uk/CGI/man-cgi?tee

It looks like this:

tee = (func, val) --> func(val); val

which could be equivalently written as:

tee = (func) -> (val) -> func(val); val

In other words it's an identity function which additionally executes some other function for side-effects. In the shell the `tee` command always writes to the file, while my version can execute any side-effect, but I think my version is just a generalization of the standard Unix command and so I named it like this.

I'm sure this function has its own, formal name, with the word "monad" or "combinator" (maybe K combinator?) in it, but I wasn't patient enough to research it :)

`thenResolve` is a standard method on a promise object implemented by the Q library (https://github.com/kriskowal/q/wiki/API-Reference#promisethe...) I used, it's equivalent to

.then () -> accum

In other words, `thenResolve` appends a success callback which discards previous value and always returns another value.

Once again, take a look at the full source at http://klibert.pl/walkfiles.html - I'm going to update it with a full explanation of what's going on, but even right now it's only 90 lines with including comments, and should be a good example of main LS strengths. I'm probably going to write another example which makes use of even more (and more advanced) LS features when I'm done with explaining this one.
It is true that Git can be used in a fairly simple way, although it is still significantly more complex than RCS.

What's the point? RCS is not fit for distributed workflows/projects. Once you start to work in such a fashion, you want multiple remotes, tracking branches, rebasing (if only to make submitted patches as clean as possible), security/consistency per SHA hashes, etc. This simply implies more complexity and commands.

Sure, git could be simpler, some argue that Mercurial is easier. But RCS is definitely not the program you want to compare git with.
Someone else surprised that computer arithmetic is an inaccurate model of theoretical and mathematical arithmetic.

Computer arithmetic is implemented to be convenient, not to be an accurate reflection of mathematical arithmetic. Thus it's the source of many, many "gotchas."

The usual reference to this sort of thing:

What Every Computer Scientist Should Know
About Floating-Point Arithmetic[0][1]

Not really limited to computer scientists - actually more relevant to programmers.

[0] https://news.ycombinator.com/item?id=4815399

[1] http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.ht...
WebRTC Security – An overview, including a MiTM example
I guess it might work for a static block, but it is a huge amount of stuff to put on top of the blog and it seems entirely unnecessary - after all any computer should be able to fullfil any static request such that it is limited only by the bandwidth.
About 3 days assuming you have the display off when it is not in use. About a day if you like to leave the screen on.
I didn't get this at first, but the author was saying that CentOS is not a suitable substitute to emulate Amazon Linux in development environments. It's very reasonable to use CentOS as both development and production environments on EC2.
Strict immigration quality laws (as in, three strikes and you pay for your one way ticket home).
Fix police funding and then demand performance from them.
If there's a problematic area, put enough cops there so they pluck everybody undesirable one by one until the rest is benign and/or got the hint.
Control unemployment (we don't just want low numbers, rather evenly distributed), discourage walled settlements, try to mix people together.
Instead of providing welfare checks, make policemen/teacher jobs. Still can't find work? Try hard or get booted (if you're some kind of immigrant, of course).

The main take off is - it works until you break it. If you have a broken socity, stop complaining and fix it, it's absolutely doable.
`yum install qbittorent` is as easy as it gets. I have no problems installing Oracle Java with the official RPM binaries as well.

You like using Ubuntu. That's fine and all. But please stop spreading FUD about Red Hat based distros.
Thinklab – Building a startup team to reinvent science and government
Totally subjective opinion, but yet to see something beat Consolas.