skysight-inc/HackerNews huggingface dataset:
[1,2,3,4,5].reduce(:+)
Or in case of a range ...
(1...6).reduce(:+)

I'm sorry i couldn't fight the urge to FIFY :( ...
Microsoft's LInQ2Entities offers this. In 3.5 it was on by default, but EF3.5 was the buggiest mess ever. They rushed it out when they realized that LInQ2SQL was unmaintainable, and then made an even worse mess.

It offered a manual "Load" operation that manually initiated the lazy load for a given FK relation, providing a worst-of-both-worlds option.

The thing I could never figure out in LinQ was how to make an explicit load of related objects fetch more aggressively. Like, say I have object Foo. I find out I need Foo->Bar, but realistically I'm also going to need Bar->Baz and Bar->Quux to make Bar useful. I could make a stand-alone query to pull down Bar, Bar->Baz and Bar->Quux in a single query, but then Bar wouldn't be loaded attached to Foo, and if I attached it to Foo it would confuse the object context. I could use the Foo->Bar to load Bar, and then Bar->Baz and Bar->Quux to load Baz and Quux... but that would be too many hits to the DB. I could never figure out how to put those things together, and fetching Foo->Bar->[Baz|Quux] proactively every time I wanted a Foo wasn't preformant.

Of course, this was back when I was obsessed with normalization and was using UUIDs for all my primary keys, so I might be missing the point.
Wouldn't such an app be hosed on almost any platform due to massive memory waste?
Silk Road Dealers Are Getting Arrested All Around The World
Is there a case where you can do something with a named pipe that you couldn't also do with a regular text file?
> It is harder than it was.

Indeed. I remember the happy 1990s. 13-14 year old kids could earn more money than their parents writing websites for companies, and other kids were working as consults for tech companies.

Now days, things like that doesn't seem to happen anymore. It really is harder now.
Disney invents touchscreen that lets you feel textures
Immortals? Not quite yet there, but with combining the digital revolution we may live forever.
Confirmed. https://lh6.googleusercontent.com/-6emYmxfdYQI/UlSXCljXjTI/A...
I think you missed the point...

First of all, Google Hangouts replaces Skype, WebRTC eventually will too, and Google Docs or MS Office 365 are both perfectly good Office suites.

Second, the idea is simplicity. Anyone can maintain an up to date Chrome OS system. Anyone's grandmother could have an up to date, virus-free Chrome OS laptop.

Native apps? Chrome has Native Client. It's up to developers to make use of it. Not to mention technologies like Emscripten - again, up to developers. Anyone, what's out there on the web already is enough for most people.

If it's not enough, you can turn on developer mode, and run regular Linux apps (install with Portage), or install Ubuntu with Crouton.

Anyhow, Chrome OS solves 80% of use cases out of the box, and the rest with a little effort.
Here is a clip from a radio talk show where a caller happens to have TWO smoke detectors chirping in the background because of low battery: http://www.youtube.com/watch?v=phKAYe9T08A

Google 'Loveline Smoke Detector' and you will get about 40 to 60 unique calls of just these two radio hosts getting calls where the caller happens to have a low battery chirping in the background.
What's the difference between a brainteaser and a problem you've already solved?
The headline would have been much more impressive if they just looked one day earlier. It went from 0.03 (9/30/13) to 0.27 (10/8/13). Being that the 0.03 number was much more the norm before the shutdown October 1st, it paints a better picture. What that picture means... I haven't a clue.
Use localStorage for Google Analytics tracking when available
you can run

diff <(ls /path/to/dir/1) <(ls /path/to/dir/2)

in bash/zsh - im not sure if its a per executable thing or actually built into the shell?
My $30 detectors purchased last year have this feature. Not the magic hand-waving part, but if you press the button, it becomes less sensitive for 30 minutes.
Good; websockets are a feature not a company.
I'm specifically talking about WebSockets. Do you really want to run one process for every client to connected to your WebSocket server? The answer is no. Even one (OS) thread per connection can get unwieldy.

And I think lots of people would disagree that async stacks are still "exotic" or "not written very well".
"It's a shame the government didn't work with Levison to either allow Levison to add the requested intercept himself (which, yes, would have required Uncle Sam to trust him) or to allow a third-party (or even a third party requested from both sides) to audit the proposed interception code."

No - it is a plan that the government doesn't work with service provider and instead demands data and intercepts that "just happen" to let them spy on an entire network.

Indeed, everything Edward Snowden has revealed points this being the plan, the modus operandi of the state everywhere. It has an official right a few reasonable seeming things and executes that right in a way that gives it the potential for anything and everything.

And it can all just look like a "shame", a mistake, "an example of how the government doesn't understand the Internet", etc.
You'd be surprised that ignorant deadmen once consider the same issues and felt an adversarial system was the best solution at the time. Today with the aid of the internet we know better. We should simple censure and imprison dissent and not bother with it at all.
Is there something you can do with named pipes that you couldn't also do with a regular text file?
Futures markets typically have value outside of speculation. Do you see any such value in a hash rate futures market?
By "proxy" I didn't necessarily mean "web proxy". If at any point an IP address is visible it is feasible to exclude transactions that involve US IP addresses. This is, of course, trivial to circumvent - which was my point.
He did not. Fractal Flam3's are the chaos game.

to quote:

1 start at any point. call it p
2 pick one of the three vertices at random
3 find the point halfway between p and that vertex
4 call that point p and draw it
5 goto 2

He goes into great depth about this strategy.
Yep ... That's exactly what I meant (not that 14 year-olds were more vicious these days). Your teaching moment will come when he's on the receiving end and will consist of two messages; 1) I'm sorry your feelings were hurt and the people on the other end were so mean. 2) Remember that when you're commenting on someone else, they have feelings too.
This only adds (Bayesian) evidence to an abstract frame of knowledge that doesn't matter to anyone in real decision making processes: a frame in which the observer uniformly samples all startups.

People who actually care about these odds (in the sense of betting on them) are founders and investors. Neither, in their decision making process, gets to (or wants to!) uniformly sample all companies.

PG's numbers are thus much more useful to anyone actually trying to make a decision about a pool of investments: assuming the distribution of YC startups is fixed over time, and you are someone like Start Fund who will bet on the pool (i.e. equivalent to a repeated uniform sampling in expected value), the 0.5% is actionable information and the 0.00006% is not.
In bash, that's referred to as process substitution[1]; the syntax is only slightly different:

<(command)

Edit to add: both ksh and zsh support process substitution, too:

ksh: <(command)
zsh: either =(command) -- uses a temporary file
or <(command) -- uses a named pipe

[1]: http://tldp.org/LDP/abs/html/process-sub.html
Writing a Spotify Client in Emacs in 16 Minutes
the absolute interest rate is still very miniscule
Can you point me to some research that indicates caloric restriction leading to a higher life expectancy in humans (compared to normal nutrition, not obesity of course)?
DHH nails it again. What a champ!
On page 100 of the actual documents [1], the refusal was not based on chain-of-evidence concerns, but that by using the solution proposed by Levison, the FBI would not have real-time access to the data:

The e-mail again confirmed that Lavabit is capable of providing the means for the FBI to
install the pen-trap device and obtain the requested information in an unencrypted form.
AUSA[censored] replied to Mr. Levison's e-mail that same day, explaining that the
proposal was inadequate because, among other things, it did not provide for real-time
transmission of results...

---

[1]: http://cryptome.org/2013/10/lavabit-orders.pdf
What you've got there is a truth table for the XOR bitwise operation.

HV | O
---+---
11 | 0
00 | 0
10 | 1
01 | 1

You can do it very similarly with the coordinates of the pixels on the screen[1]. It's really interesting how often that shape comes out of places. Which is why I think that this page got started.

[1] http://www.stilldreamer.com/mathematics/sierpinskis_triangle...
So you're saying you have an actual number that indicates "average team quality?" Is this another way of saying "culture fit?"
>> It would indicate that "the market" believes there may be some technical non payment scenario over the short term

It may seem ludicrous to an outsider, but it makes sense that if the market believes that the odds of the 1 month being delayed are significant, but the odds of the 3 month being delayed are insignificant, the 1 month would see a yield increase.

If anybody has 10 billion dollars lying around this is an excellent arbitrage opportunity ;)
Yeah I remember those ! In fact I did some bit shift melody stuff myself in supercollider based on those and some other code.

One of the sc people released an iPhone app that let's you write bitshift based melodies.

The early stuff that supercolliders creator James McCartney did really set the style for short, mathematically elegant music. It's really a great language for it. You can do operations on arrays, and do interesting multichannel expansion.
Leaked video from Mt. Gox employee alleges they'll be closed within months
In regard to conclusion 2, there is another approach here - when you're finished with an old segment, posix_fadvise(..., POSIX_FADV_DONTNEED) can be used to drop it from the page cache.
Well, we knew the US government didn't mind seizing whatever under some circumstances.

What we know specifically now is that the government is inclined to "err" on the side of taking everything to the point that it would take your private SSL keys if it happen to get a warrant for your shopping list. The state has generally arrogated itself similar powers in physical searches so the news is that it just gets worse with data searches.
In this discussion† from yesterday, the task of finding the longest path below a directory came up. You can see both a clumsy solution, using a named pipe and iterative Python, and an elegant one-liner (in a reply), using an anonymous pipe and functional Python.

This is not to say named pipes do not have their uses. Just that you should think before reaching for them first.

†https://news.ycombinator.com/item?id=6510640
Modern waste management facilities can actually sort out cans and bottles from the other trash. For the cans they use electromagnet while the trash is on the belt that makes the cans jump farther than the garbage. For the bottles, something about the speed of the belt and an air pump. At any rate, better to get these people the help they need and out of the trash.

Source: modern marvels episode on wastemanagement and actually got to take a field trip in college and when I saw the cans jumping I was pumped to have see that episode of mm.
That a default will technically happen, but will happen in such a way that the market won't care all that much in the long term.
I used to live a block and a half away, and I still live 4 blocks away. I agree, it's not the most desirable thing to have in a neighborhood.

However, the amount of NIMBYism and mental gymnastics that goes on in SF is infuriating. The same citizens who support a government that spends $200m a year on homelessness are up in arms when services for the poor appear in their neighborhoods? The hypocrisy in SF is incredible.
I love the idea, but I don't think people should be allowed to have unlimited up or down votes. That would encourage whimsical opinions, and would make the site reflect the opinions of the most active and opinionated users instead of the average person. I think there needs to be a way to limit the voice of each user so each person has the same amount of influence.

One idea I like is to give each user 100 points to distribute among topics. Once the user has assigned a certain number of points for or against a position, they could then distribute those points amongst the comments that best represent their position. So if a user votes 20 points for gun control, gun control would get 20 points, and the user would have to choose which comments best support their position--5 points to this comment, 7 points for this comment, etc.

I think this would solve two problems: it would encourage thoughtful opinions to rise to the top, and it would give voice to the minority of voters that care passionately about a topic that the majority disagrees with or doesn't care about.
Super premium treasuries to solve debt limit
Checks and balances are passe. They are the antiquated notions of dead men. With computers and the internet ensuring the proper administration of justice via self-appointed and self-reviewed secret committees, we can finally live in peace and security.
If such donations really cause problems at borders, then it will be a sign that the place is FUBAR and you (and everyone else) should avoid traveling there.
Hi,

thanks for your comment. I was by no means speaking about an escape - I would probably go to Myanmar or the Falkslands to achieve that - but to get better exposure to technologically oriented entrepreneurs. Although I must say that probably you are right about the impending culture shock, or whatever you might mean by 'rude surprise'.
Ask HN: The single most inspirational moment in your life?
What was it; what did it lead you to?
List your files and count them, too:

ls -l|tee >(wc -l)

Works in bash, but not sh.
So it's tracking the arity of functions and turning anything which has been applied to fewer than ARITY arguments to a partial application?

I suppose that comes at the cost of (+ 1 2 3 4)?
It's also free here[0], though maybe in less convenient a form (PDF or postscript). :)

On the other hand, if you'd prefer a physical copy, I used Lulu.com to print a book for just $22.42 including shipping. I used the PDF and instructions here[1], since it has missing diagrams and has the cover available. It turned out really well.

[0] http://www.paulgraham.com/onlisptext.html

[1] http://www.lurklurk.org/onlisp/onlisp.html
I don't think named pipes work particuarly well in shell scripts. A program writing to a pipe will not terminate until the output is consumed. However, consuming the output will not happen until the program finishes and the script arrives that the program that reads from the pipe. Similarly, a program reading from the pipe will not terminate until the program writing to it does. If you start reading before you start writing, then you simply wait. Anonymous pipes solves this problem by launching all of the programs at the same time. You could work around this by telling the shell to run the command in the background (append & in bash).

Having said that, I have had occasion to use named pipes in a shell script. Basically, I had two programs and I wanted to determine which lines were in one, but not both, of their outputs. Using named pipes, I was able to do something like:

mkfifo foo
./prog1 > foo &
./prog2 > foo &
cat foo | sort | uniq -u

Effectively, this provides a way to combine the output of multiple commands. I took it as a matter of faith that doing this won't interleave lines. I assume that as long as both programs flush only at line breaks then there is not any problem.
"There are decades when nothing happens and there are weeks when decades happen" -Vladimir Lenin

Crises come quickly because nobody likes to dump until they absolutely have to. That is, when everyone else is dumping. Markets thus exhibit self-organising criticality.

Endogeneity doesn't help, either. Wall Street doesn't react because it assumes Congress isn't insane. Congress doesn't believe it's insane because "the Dow is down barely a point from a month ago!"
yeah, man. fuck those snooty bike riding assholes.
http://en.wikipedia.org/wiki/Time_value_of_money

Imagine we enter an agreement - you'll lend me $100 for a year, and I'll pay you $10 after a year. The banks will pay you $5 to borrow your $100, so you think this is a good deal.

After a year, I pay you back the $100, but I don't have my $10 for interest. I'll pay you back as soon as I can, I swear, seeing myself to the exit. Five years later, true to my word, I give you the $10. So you get your money eventually - is this a good deal?

Well, no, of course not. It may be better than the
bank still, but it's not as good as the deal initially made it appear. You could have taken my $10, given it to a bank for the next five years and - assuming you didn't reinvest interest payments out of a noble desire to make math easier for yours truly - made $0.50 each year, for a total of $2.50. What's more, I could have done that, effectively reducing my debt to you by 25%.

Of course, this isn't on that scale, but that is the risk of delayed payment.
I just saw some lines from GAE for PHP and saw very inconsistent and not quite code.

All modules use require_once... well, well...

And other many issues...

But looks as massive code. Maybe translated automatic.
Janet Yellen to be named Fed chair on Wednesday: White House
How would you build a team?
From the ground up. The whole team. How would you go about it?
You mean like this one?

http://www.weeklystandard.com/articles/small-bill

Yup a one page bill was submitted and shot down. Just because the media didn't tell you that alternate plans were being submitted doesn't mean they didn't happen.
Sort a file in "parallel" (note quotes!) in a multicore machine (note I'm showing 2 cores but this could be generalized to more):

mkfifo split_aa
mkfifo split_ab
mkfifo sorted_aa
mkfifo sorted_ab
split -n2 input_file split_ &
sort split_aa >> sorted_aa &
sort split_ab >> sorted_ab &
sort -m sorted_aa sorted_bb > final_sorted

It's left as an exercise for the reader to determine if this actually saves any time, and if this technique could be used to implement a truly parallel sort.
ah, so you can! brilliant. thanks for that!
It's entirely possible it's an inaccurate account of events. I haven't read all of the primary documents, just secondary sources.

In your linked documents,Exhibit 1 is the original June 10th order. Attachment A of it(page 4 of the PDF) details what he was order to hand over. It does not mention SSL keys at all. Instead it asks for a bunch of meta-data. In fact, it explicitly doesn't even cover communication contents. It also doesn't specify how Lavabit has to execute the order, just that it must provide the data.

This was the order Lavabit apparently initially refused.

Can you point to the first point they demanded the SSL keys? The stuff on page 100 looks like it pertains to the July 16th order. Which is, again, considerably after the June 10th order that originally asked for the data and after Lavabit refused that order. Also, totally inline with narrative of events as I presented it.

Regardin pen-registers: a pen-register can be done in software and is typically done by the service provider, not the government. The term is an anacranism dating back to telgraphs. It doesn't necessarly mean government hardware or software[0]. Hence the discussion page 99 of the pdf about "implementing the pen-trap device" in section d. So that's not blanket access

[0]http://en.wikipedia.org/wiki/Pen_register
No, in fact I don't spend any time at all on twitter.
When it comes to public safety, the American people stand ready for intrusions of all kinds, it is truly for our own good. Government agents are privy to secret information unknown to the public, therefore we have no choice but to submit.
The Problem With Companies That Don't Generate Profits
I am sure those companies are technically sophisticated. I don't think I said that all existing companies are lacking software excellence, or that all startups have it (!).

I think that like artillery in warfare software will give an unfair advantage to whichever side uses it, and there are plenty of companies out there who do not have artillery.

Yes there are a lot of fine well run world leading companies out there - I expect they will do well. There are also a lot of badly run companies who really really do not get even the basics.

Schumpter will be calling is all I am saying.
Obvious sarcasm but this is basically what they are doing with macroeconomics, see http://delong.typepad.com/sdj/2013/10/whiskey-tango-foxtrot-...
Power problems at the NSA's Utah facility
In all seriousness, I've long thought of what I do as moving electrons around, getting pits onto CDs in the right place, things like that. Whatever I do in, say, C++-land, is a means to those ends. An intermediate step. I arrived at that way of thinking after trying to define 'work', and deciding that it always consists of moving matter around (transporting it, putting it into a desired configuration).
Is this just purely a source of mutually-verifiable entropy for pure-entertainment bets, or is there something people can use these numbers for / something people can use this as a hedge against / &c. ?
I think you indirectly show how hard this kind of research is given that it be persuasively argued that the supposed "benefits" of "calorie restriction" are an artifact of studying mice and other animals who sit around doing nothing and/or are given a rather unhealthy died[1].

Indeed, we have some idea of the causes and cures for cancer. We don't know with much exactness the mechanisms of aging.

[1] http://en.wikipedia.org/wiki/Calorie_restriction#Effects_of_...
You're right, a smoke detector is detecting smoke... but some smoke is expected (like cooking) and some smoke isn't. The product addresses the problem of context. When we expect the smoke, it is a false positive, when we don't...it's positive. Many of us have made the mistake of ripping out the battery in frustration and leaving the smoke detector disabled despite the risk of living without a smoke detector.

As for your proposed solution. Drilling holes in the walls and ceilings, re-patching the the old installation point and doing this over and over to try and find a balance point of safe and convenient seems to fail the cost-benefit analysis compared to this product for me. I'd much rather buy the damn thing, leave it installed where it is as opposed to shifting it around.

My analogy of the mine detector was more about false positives in general usage, I guess if I were to correct it further, it would be a mine detector that couldn't detect an inactive/benign mine vs a malicious one.
I believe that teaching and research should be treated as two different career paths - they require different skill sets and motivation, and it would be great if people could choose to proceed in one or another or both if they want. The only thing that would have to change is how the universities make their job offers; make two distinct positions and recruit for both.
The main benefit is that it avoids needing to write to the disk (which can also be avoided by making the file on a ramdrive). In general, it behaves the same way that a normal file behaves, in the sense that you read what was written, in the order it was written.

The only difference in behavior I can think of is timing. Generally, when you read a text file, you see what is written at that moment in time (barring race conditions). With named pipes, you read what has been written, and then wait until the program writing closes the pipe. If anything gets written in the meantime, you still see it. This lets you use them for message passing in a way that normal files do not.
Incorrect. See: http://support.nest.com/article/What-types-of-alarms-can-I-s...