skysight-inc/HackerNews huggingface dataset:
I think I know enough Haskell to explain.

Old version:

foldr (flip (buf_append bufOps)) (buf_empty bufOps) strs

foldr is a combination map/reduce in one. It takes a value (the accumulator), runs a function on the rightmost value in a list called str (that's why it's 'foldr'), and combines the two together into a new accumulator value.

Let's say we have a list of numbers, the addition operator, and an accumulator of 0.

foldr op acc list
foldr + 0 [1, 2, 3, 4]
a = 0, list = [1, 2, 3, 4]
a = 0 + 4, list = [1, 2, 3]
a = 4 + 3, list = [1, 2]
a = 7 + 1, list = [1]
a = 8, list = []
Result is 8

One thing to note is that this walks the list 'backward', and in Haskell it's a singly linked list. That means that each time it has to walk the full list. I believe this is why it's O(n^2).

It looks like the accumulator starts with (buf_empty bufOps), which from context I assume is an empty buffer structure. The operator is (flip (but_append bufOps)), which looks like it adds values onto the bufOps structure when called. Each time it goes through this process, it appends one element.

Because they're using foldr and the list is walked 'backward', this has the natural side effect that the order of the items in strs is reversed as it's added to bufOps.

New version:

buf_concat bufOps $ reverse strs

The $ is a way of controlling precedence in Haskell, you can replace it with parenthesis. So we get:

buf_concat bufOps ( reverse strs )

So reverse just reverses the order of a list, getting things in the order the code wants them. Then it calls buf_concat with the current structure and the items it wants added. So instead of taking one existing list and adding 6 new elements at the end one at a time, it takes one existing list and adds a list of 6 elements to the end once.

It seems like a relatively simple change. I wonder if using foldl or foldl' to avoid having to rewalk the list every time would have performance similar to the new line.

I find the new line simpler and cleaner either way, but was the choice of a right-fold the cause of the performance problem?
Cap and trade basically hacks price signals by enforcing the notion that there's a finite supply of the environment's ability to absorb pollutants. Without the notion of price signals, cap and trade is not the type of thing you'd think to use, and the distinction I was making was that later Austrians, like Rothbard, never contributed anything of the like.

You can make whatever distinctions you want--this digression has gotten tiresome and I regret ever responding to you in the first place.
> 1. All billing metrics are stored in us-east-1 even for usages in other regions.

...what? Is this true? If so, can someone explain the logic behind this?
Agreed. I should have made that point in my own answer. Yes, I'd use, in the course of building my startup. But I wouldn't do it for some generic salaried job.
Making - forcing - BI to work will end up with the same basic consequences. BI is supposed to be enough to live on - defined upwards as those with vested interests and ulterior motives fight to increase that amount (ex.: US poverty line is 20x world median income, deeming 87% of all "poor"). Such a large change to an economy will cause - go figure - a large change on the economy; supply-and-demand will render BI to low and require increase, an inflationary spiral. Price controls will be imposed to counteract these shocking consequences, with the same results history has seen many times. All this will lead to some form of ever-tightening authoritarianism, as polypragmatons compel, by threat of violence, others to submit to their "I know better" self-righteousness.

Encourage charity for the truly needy; everyone else is a competent capable adult and can provide his own needs.
Sudan (SD) and South Sudan (SS) are distinct entities now. If you funded someone from SS, I'll be super interested in meeting them/figuring out which project it is (presumably one of the non-profits). Regular Sudan is a lot more normal.
But people act differently when a camera is running and it won't represent the true moment they are trying to capture. I think it is a fun idea for a new type of interactive content though. If the person you watch is a slow typer that would be a quick viewing.
I know of three factors that will mitigate the blockchain size issues:

1) Developer's are working on software to prune the transaction tree so miners only have to store the addresses that have nonzero balances.

2) Miners can increase their minimum transaction fees to cut down on transaction volume.

3) Moore's law (and similar) conspire to keep an ever-growing blockchain storable and manageable.
I recently discovered that many of the (active and quite long-standing) blogs and commenters in this online community are fraudulent.

Realizing the potential awkwardness of this request from a stranger considering your message, is there anything publicly published about this particular situation?
The only people who understand why I'm still 100% healthy after being a heroin addict for 7 years, is my doctor at my Suboxone clinic. Provided you actually follow proper harm minimisation opiates are very safe. The problems arise with addiction, the illegality of the drug, and how society handles it. My parents still blame any cold I get on my past addiction.
His point about the curated product list, some friends of mine did this 5 years ago. They lost interest due to not having enough time (the affiliate commissions from amazon weren't big enough). http://kallow.com/ was the site
It's worth noting, though, that immutability doesn't always mean less copying. Immutable arrays, where the entire array must be copied with the change of one element, are an example of that. And by extension, hash tables, etc. Of course there are lots of tricks that can be employed to get around this, to a degree.
Great reply. I'm reminded of a recent New Yorker article about the poverty bureaucracy in NYC. Can't remember the exact details, but one of the recipients talks about how much they could do with the amount the city spends on them per month to put their family in some gov't run hell-hole.

I'll add that many free-market economists are strong supporters of the basic income, especially vs. a minimum wage (Milton Friedman supported a negative income tax). The advantage of the basic income is that it's very simple and there are no mathematical gymnastics needed to neither discourage work or produce a very high marginal income tax rate as you leave the NIT. Lastly, the basic income makes it easier to abandon the income tax entirely and move to consumption based taxation.
As problems get more difficult, I think there will be less and less proof-of-work, and people will see less and less of an incentive to keep miners online. Doesn't this mean that security begins to break down as people give up on mining?
People feel poorer now than 30 years ago because of rising income inequality. People's viewpoints are relative, like all human thinking. By nearly any measure, people's ability to afford consumption is higher now than it was 30 years ago.
Each time strings[i] is added to acc, it may require reallocating entire acc to new memory location with more memory for the concatenated string.
Yeah, it would have been another day at least before I checked amazon again.
I'm partial to sparkfun.com, makershed.com is also good (less of a focus on embedded electronics than the former).
There's no "Moore's Law" for storage yet, that I know of. We've been at 1-3TB disks for, what, 6 years now?
Acunote founders are Ukrainian, not Russian.
That's only indirectly related to Bitcoin's use of proof of work, though. While Bitcoin's overall design has advantages and disadvantages w.r.t. security, I don't know why an irreversible version of the current system wouldn't similarly be able to reduce fees without needing to "waste" CPU power computing hashes.
Even if the buffers were vanilla Strings, and there were no pre-allocation, the patch would still have fixed the quadratic-runtime problem. Consider that, for vanilla Strings, the buffer ops are implemented like so:

buf_append bufOps = (++)
buf_concat bufOps = concat

Since (++) has a running time that's linear in the length of its left argument, you want to treat it as a right-associative operator to prevent quadratic runtime when joining a bunch of strings.

But, going back to the patch in question, the original code was effectively this:

foldr (flip (++)) [] strs

Since flip had been applied to (++), the resulting operator you now want to treat as left associative to avoid quadratic blow-up. The code, however, uses the right-associative fold, foldr, to join the list of strings str.

The patch fixes this problem by replacing the code with the equivalent code

concat (reverse strs)

And how is concat defined in the libraries? Looking at the source [1], it's

concat = foldr (++) []

Thus the fix is basically

foldr (++) [] (reverse strs).

This version reverses strs, at linear-time cost, to be able to apply the normal, unflipped (++) with a right-associative fold and thus avoid the dreaded quadratic blow-up.

[1] http://hackage.haskell.org/package/base-4.6.0.1/docs/src/GHC...

EDITED TO ADD: Also, if you knew the buffers were vanilla Strings, you could even eliminate the reverse overhead since

foldr op z xs == foldl (flip op) z (reverse xs)

for all finite lists xs. Thus you could flip (++) and use foldl instead of foldr to get an efficient implementation like this:

foldl (flip (++)) [] strs
I dont know why this getting so much hate. This is WAY more creative than most things that get released through HackerNews/YCombinator.
A friend of mine had a heart attack from lifting weights while abusing methamphetamine (intravenous, and a lot of it).
Is there an argument here?
That is definitely not a Model X. It's a sketch of something Tesla-like. Of the two current Tesla vehicles the public knows of, it looks close to a Model X. For all I know, it may be an early sketch of a Model X. But it's not a Model E and it's not a Model X.

The beltline is a mess, especially the upward kink at the A-pillar. Something unpleasant has happened to the rear, as if the rear lights arc downward into the bumper. It's hard to tell, but the hatchback seems to flatten moreso than the Model X, giving it a Malibu Maxx flair.

If it's an early sketch of Model X from a while back, I am glad Model X has improved dramatically since then.

To reiterate: articles like this should not show a sketch without a proper caption (worse yet, the filename is tesla-model-e.jpg). That's all.
I for one prefer the (appropriately) unthinking anti-intellectualism.

Hacker News.
Watching these "interview with officials" I always remember Manufacturing Consent by Edward Herman and Chomsky. It just explains so well the attitude, the approach, the type of questions asked, how they answered and how the presentation is done.

As a contrast, then there is a interview with Assange from a while back. It was immediately confrontational. He didn't have a chance to present his views or what the organization stands for, talk about "global persistent boogeymen", none of that. Reporter zoomed in on the rape (please, true or false?). And that's that. Due to the constraints and rules these agencies operate under and comparing the two approaches it is funny how similar the external effects to that of a state run propaganda agency. It is like having RT report on Putin pretty much.

John Miller might as well be a thawed out frozen sea bass and this piece might as well be a "released by NSA" PR piece. I would laugh normally as it is pretty funny, but this stopped being funny a while back, now it is just scary.
You'd have to find a way to negotiate the volume password electronically if you didn't do it in person, which in turn would basically just be asymmetric crypto, which would probably lead you to PGP.
s/mostly-automated/eliminated the need for/

If you're in a world where you don't _have_to_ work for a living; you can take your time meeting your basic sustenance needs with real food. Fast food is actually a bad deal, and most of the people eating it are doing so because they are under time-pressure of one sort or another.
Protein folding unfortunately isn't a good candidate, because verifying the work takes exactly as much effort as doing the work.

http://en.wikipedia.org/wiki/Proof-of-work_system
Basic income means nobody is in a position where they will do menial work which nobody else will. Paying more for those jobs means competing with like-paying jobs of a far more desirable character. You ready for custodial labor to cost several times more? suddenly employers can't spend nearly as much for more advanced work because basic sanitation (and other menial but needed work) is suddenly far more costly.
But strings.length is O(n), and you have to run it n times.
> That still doesn't account for the fact that having a mathematical model for inflation is hugely advantageous for a currency.

This is hugely important and obvious to anybody who has taken Econ 101.

Everybody knows this.

So why would you invent a currency that was deflationary in nature due to an artificial cap? Well, once you realize that the guy(s) who invented it are holding 10% of it, you'll have your answer.

Bitcoin is in a huge bubble at the moment. My only hope is that this bubble bursts before the inventors can cash out. Oh, sweet justice.

After the collapse, there is every reason to believe that Bitcoin will become something genuinely useful or at the very least, inspire something that will be useful.
Posting a link to Free Republic and attacking somebody for being ignorant in the same comment is an interesting contradiction.
An interesting idea with almost no appeal to readers or writers.

I sort of like the idea of a photo of the blogger, but animated moving background? Seeing the hems and haws?

No thanks.
Interesting concept. It will definitely help with readership loyalty as readers will be more emotionally engaged with the author.

As people have noted, it would make a great feature, rather than a whole new platform.

Please create this for Wordpress! :) I am happy to donate some money to help build this.
Miners are paid in two ways - from creating new bitcoins and from transaction fees. The transaction fees are small but add up to enough to make it worth mining.
Google "collective action problem" and "free rider problem."

To use an example, in my parents home country of Bangladesh there is no social welfare. The capital city is full of beggars, homeless children, people with missing limbs hassling you for a few taka. Social welfare is a non-excludable public good. That is to say, if you clean per sol this up, you couldn't limit the benefits just to those who paid, as you can with most goods. Therefore, people would have a strong incentive to avoid paying, because they would count on someone else paying and free-rising on that.

Collective action problems are real, they're important, and they are a major impetus for the existence of government. In a sense, welfare programs are voluntary. Generations of Americans have voted in majorities to continue to support these programs. It's not right to reject the voluntary nature of programs that exist by the majoritarian consensus.
The OP is pointing a finger at the Saudis. However, there are many unexplained discrepancies in the official account of 9/11 that suggests a deeper conspiracy.
What annoyed me is that, as with anything, the devil is in the details. And the questions failed to clarify on details.

A few examples (all quotes paraphrased):

1. "we only listen to conversations of non americans"

-----Ok, so what happens when an American has a conversation with a non American? Do you tap it at all? Do you get both sides of conversation? Only one side?

2. "you can only look at a protected phone number if you have access"

----Awesome, but this is sort of a non-answer. How many people have access? How long does it take to get access? How easy is it to request access? Do you need access per phone number or if you get access for one protected number do you now get access to all of them?

3. "PRISM only lets us target US persons with probable cause under court order"

-----What is a US person? US Citizen? Person living in the US? This also contradicts so much of what I thought I knew about PRISM that I'm baffled that no clarification was asked for.
This is fun idea. It's like this

http://paulgraham.com/stypi.html

plus a blurred head on the background.
> Credit card companies do no have the luxury to create new money, so of course they will charge higher fees.

Credit card companies? No. Banks? Yup. http://en.wikipedia.org/wiki/Fractional-reserve_banking#Mone...
Another good habit to be in is never checking any kind of credentials into source control; even if it's some private personal project, just don't be tempted to check in your credentials to source control, because at some point you may find some portion of that that's useful that you import into a public project, accidentally preserving full history.

Sorry to the OP, hope that Amazon reverses those charges once you tell them what happened.
> how does it handle the race to the bottom after everyone realizes work sucks? Where does wealth come from if nobody works?

Work still needs to be done. BI means that you can get rid of the minimum wage and labor becomes worth what it takes to get someone to do it knowing that their life and the lives of their families doesn't depend on it.

Maybe that shitty job at McDonalds now takes $20 an hour to fill? Maybe that increases automation, making the economy more efficient. It might also increase the cost of crappy food, pushing more people to just prepare their own food; but now they have the time to do it, so no big deal.

We don't have a problem in this country with laziness. We don't have enough jobs for everyone who wants to work to work. We've set a requirement of 40-hours a week just to live, and then we don't actually have that much work available. We need to find a way to remove that 40-hour requirement. The economy is just too efficient.
Sorry, but only a craphound would expect a complaint made on "Boing Boing" to be taken seriously.
Depends on the circumstances.

Many people, like me, are well aware of the cost of leasing space. I'm far more positively impressed by a company that compensates its staff well than one that rents top-end space; shows its owners are savvy or too busy to worry about trifles.

If it's a business that caters to dullards (we all have a pretty good idea of what industries employ dullard decision-makers), then that may have less benefit.
Taking a wider view... it seems the politicians have not yet figured out that the Internet is a total game changer in terms of their ability to manage the political and social agenda, spin the "truth" and the events of the day in their favor, etc. Going on 60 Minutes to give your side of the story is so last century, lol. This was from a pre-Internet playbook and it won't work (except maybe on the older folks who still get their news and analysis from ABC/NBC/CBS but their numbers are dwindling as even that generation is going online now) but its all they know.

Here is a link to one of the best explanations that I have read about how the Internet has changed the social, political and power structures of our time. We are living in the greatest political and social revolution since the invention of the printing press. The entrenched powers can no longer use the press like 60 Minutes or the NY Times to maintain their control. Nobody knows how this will end.

http://www.shirky.com/weblog/2009/03/newspapers-and-thinking...
> "Basic income" will suffer the same problem. There are things which must get done, and which nobody will do short of earning money doing it.

Basic income doesn't stop people from earning money doing things.

In fact, if it replaces minimum wage (which it is usually, though not always, proposed to do), it reduces the minimum value a task has to have to be worth paying someone to do it.

> Give people that money outright, and nobody will do those jobs for it.

Giving people some basic level of income outright doesn't prevent them from wanting more money, and doing whatever work they are qualified to do to get it.
Wouldn't an average, reasonable person in today's age consider an email or digital file to be a modern version of a "paper" or a cell phone to be a modern "effect"?
If you specifically choose definitions of words that don't agree with the typical usage and act like those were the definitions that were used when you were asked a question, you are, in fact, a big fat liar.
Meh. What would you expect an NBC show to say about a CBS show?

In terms of performances, it's not like they have anything to brag about. SNL is averaging less than one funny skit per year across multiple full-cast rotations.

Aside from the Moderately humorous skit every once-in-a-blue-moon (such as The Insane Clown Posse parody for their Miracles video), SNL has been borderline unwatchable for well over a decade.
And/or they'll be automated (or at least sufficiently automated).
I am too—excited, that is. I am excited to see actual renderings of a Model E because it's most likely the next car I will purchase.

(I'm not sure: the sketch may be an early sketch of the Model X, but it also may be a sketch an auto-enthusiast site commissioned. The half-baked details and the filename made me think it was something they commissioned.)
Is the history stored as a text file somewhere that you can just edit? I sometimes wish git were a bit more transparent and less of a black box.
It would probably work better if it only played a replay of the video captured while they were actually writing their post.

The only way I would find this interesting is for authors who blog on mobile devices — seeing them blog as they move through the world would be kind of unique (and then probably get boring once the novelty wore off).
Haha, I was writing some flowery philosophical disagreement about Curtis' post, but this was way better. Note: I like a great many things he's written, but this just falls flat on its face.

Makes me think of Paranoid Android. Fitter, Happier, more productive.
Yes. The right data structure for the right job.

If your array only has one future---ie there are no references to the unchanged array around---you can re-use the old array. That means you get to mutate in place but still pretend you have immutability.
I'm currently looking for a web developer for freelance work. E-mail me <username>@gmail.com -- going to bed soon, but I'll get back to you tomorrow!
>Immutable arrays, where the entire array must be copied with the change of one element, are an example of that

That is not how modern persistent data structures are implemented. Please do not talk about immutability as if it necessarily means having a naive implementation like this.
> Basic income means nobody is in a position where they will do menial work which nobody else will.

This unsubstantiated assumption is the problem with your argument.
What you described is not wealth as the question was posed. They are all lifestyle choices that wealth enables.