skysight-inc/HackerNews huggingface dataset:
There are several candidate translations. Which you might choose depends on those constraints on the actual problem (instead of this pretend one) that make "f x = 0" not an eminently better solution.

The one that probably most closely matches the semantics of the pseudo-code would be:

let f0 x = unsafePerformIO $ do
iRef <- newIORef 17
whileM_ (fmap (>0) $ readIORef iRef) $ do
modifyIORef iRef (\ i -> i - 1)

readIORef iRef

Better would be to let Haskell help check that the mutation is local and no references escape:

let f1 x = runST $ do
iRef <- newSTRef 17
whileM_ (fmap (>0) $ readSTRef iRef) $ do
modifySTRef iRef (\ i -> i - 1)

readSTRef iRef

There's the more idiomatic translation, where for something this simple we wouldn't bother with State:

let f2 x = go 17
where
go i | i > 0 = go (i - 1)
| otherwise = i

The literal translation using State is:

let f3 x = execState countdown 17
where
countdown = whileM_ (>0) $ modify (\ i -> i - 1)

In all cases, the function as a whole is referentially transparent.

In your function, "while i > 0 { i := i - 1 }" is clearly not referentially transparent. Attempting to transliterate in a way that preserves this expression, it is unsurprising that we wind up with expressions that depend on state. The State monad is one way of encapsulating this. Note that f3 and f2 are actually very similar. The execState function doesn't do any deep voodoo - a value of type "State s a" is a thin wrapper around a function of type "s -> (a, s)"; execState simply extracts this function, applies it to a value, and returns the second part of the output.

The actual definitions are equivalent to these (albeit slightly more complicated to keep things DRY w/ transformers):

newtype State s a = State (s -> (a, s))

execState (State f) s = let (_, s') = f s in s'

What I don't see, in any of this, is a problem (conceptual or practical) involving "destructors". Is your objection to the need to call execState (or its friends)?
The AMD FX scheduling hotfixes tested (2012)
Today's ruling should be a lesson for future NSA/CIA/DOD/FBI/etc. leakers: get your hands on those original documents. Telling reporters about illegal activity, without those documents, isn't enough.

We've known about the NSA's illegal domestic surveillance of Americans' phone records via leaks for almost a decade. USA Today disclosed it in May 2006, and there were congressional hearings, etc. (I wrote about it for CNET at the time as well): http://yahoo.usatoday.com/news/washington/2006-05-10-nsa_x.h...

But it wasn't until Edward Snowden leaked the actual secret court orders -- which the executive branch was forced to acknowledge were legitimate -- that the lawsuits could be filed, which resulted in today's ruling that the domestic surveillance is illegal. (The court held that NSA's phone "metadata program exceeds the scope of what Congress has authorized and therefore violates §215.")

Three other thoughts:

* What's been made public about the Patriot Act 215 metadata program refers only to metadata collection of Americans' phone calls. There's no reason to think that 215 domestic surveillance is limited to phone calls -- phone companies including VZ, AT&T, etc. rolled over for the Feds on phone metadata. Why wouldn't they turn over email metadata as well? (DOJ previously confirmed that 215 "has been used to obtain driver's license records, hotel records, car rental records, apartment leasing records, credit card records, and the like.") http://www.justice.gov/nsd/justice-news-0

* DNI James Clapper lied to Congress about the existence of NSA's 215 phone metadata vacuum. I wonder how things would have turned out differently if he had told the truth? (On the other hand, he never got fired for it and still has his job.)

* Now that an appeals court has ruled that NSA illegally used Patriot Act 215 to vacuum up Americans' phone metadata, I guess we don't need to worry about renewing it?
Oakland police is severely understaffed, by about a half of what a city of this size would require.
No it doesn't. Many of the people I follow on Twitter don't have Facebook accounts and for some that do have Facebook accounts I don't really want to be their friend -- just listen to what they say. I don't think you really understand how Twitter works. Twitter != Facebook. They are not even close.
I'd love for Google to buy them so I could trust them.

Pro-tip: if you have a credibility problem so severe that you need to put up notices saying that your site does not bias reviews, you probably should stop sorting and filtering reviews based on criteria so opaque that it is indistinguishable from bias.
Thank you for the insight will correct the grammar and spelling mistakes.
I have a partner that does my graphic design, part time. I'm the only person working full time.
why not allow 36 hours per day of 'heroku run' or 'heroku web'?
True, but I can always multiple 25 or 30 to reach the nearest number to my destination, and it is only a single operation. :)

If awake I can subdivide the problem up, my earlier reply was early in the day. Now that it is later, yup, the math is easy!

When driving down the freeway, easy may not be easy enough, 25 goes into 300 12 times. Done!

(Of course the math is the same. Just realize one can multiple up instead of having to divide, I don't do math before 10am or after 10pm!)
Infographic: Why Use Magento? Facts and Key Features
Just as you say, we're using "sales data to train machine learning algorithms" - and then we display these estimates for your app categories.

Some larger shops instead use App Theta with their private data. That's our basic business model - use it for free, or pay to keep your sales out of the public training data, while still using the system.

Also, please check out this FAQ: http://apptheta.com/faq/ - we'd love to have comments on how we talk about the service.
Officially he's not supposed to know and that was the unofficial excuse they gave him before he started asking too many questions. And then he gave you the information he wasn't even supposed to have, facing unemployment and disciplinary actions. How naive can you be?
A Breakdown of Selected Government Surveillance Programs (2013) [pdf]
Some people, when confronted with a command line problem, think "I know, I'll use my mouse." Now they have two problems.

I'm joking, and this looks neat, but the optimal solution is almost certainly to keep your hands on the keyboard while in the shell.
Hire a Lead Dev before you hire engineers/programmers. You'll save SO much time and headaches.

I summarize here what I expect from Lead Devs:

- A lead knows how to architect solutions. Not just code them.

- A lead talks higher level than programmers/engineers. You don't want to hear code, you want to hear solutions/implications + pros/cons.

- A lead is interested in the interconnections with other systems, and doesn't overlook them.

- A lead has experienced a range of advanced problems (optimization, weirdest bugs, scale)

- A lead is able to recognise and be interested in the problems he hasn't come across yet, and has the will to tackle them asap if they are a priority for business.

- A lead has a quite deep understanding about the full range of solutions available to solve a problem on his platform. And he spends time on this daily, ideally because he's passionate about it (never seen it other way)

- When you ask a lead how to solve a fairly open engineering problem he'll come up with 1) A good range of approaches 2) Pros/Cons for each of them 3) For each pro/con advise based on his experience.

- A lead has confidence when taking a decision on architecture, he investigates the impacts beforehand. If he's wrong he recognises it.

- Ultimately a lead should be able to come up with a plan to help you refactor any mess with the lowest impact possible in the product. Ideally building the new on new refactored structure, and re-factoring the old by bits when maintenance is needed on those sections (low-budget approach..)

A lead will help you spot other good devs, including other platforms leads. From there, hire engineers who follow the Lead!
Only if its a supersonic projectile AND its still supersonic when it passes the mic. Assuming a 115gr 9mm +P (.167 BC) that leaves the muzzle at 1275fps, the bullet slows to subsonic velocities between 50 and 75 yards. Assuming standard day at sea level.

Likely they’re looking for the muzzle blast. Also, rifles generally aren’t used to commit crimes, so looking for the shockwave exclusively will be next to pointless.
I don't think Yelp selling to another company with an ad business is going to increase trust.
Could you theoretically wait to commit database transactions until after the client has sent acknowledgement of the response?
I meant silkworm-silk. I wonder if silkworms can be made to make regular silk that's augmented with nanotubes for a similar (relative) increase in strength, with similar easy process (shower silk-worms and their food with water with nanotubes etc).
> I'm not trying to be hard on the author of this piece, but I do think it's important for people to know that engineers in SF even in dual income families struggle with housing and child care payments, not with luxury cars, expensive vacation, lovely luxuries.

Choosing to work in a locale where a median home price is a million dollars is a luxury. Engineers could pick from other metro areas, and get fairly close to $100K/year with much lower costs of living (Austin, Dallas, Durham come to mind, there are many more).
That's not a limitation of the Event Log system itself, as you can easily write freeform text in the message rather than building it up with localised strings and structured data, e.g. https://msdn.microsoft.com/en-us/library/6w20x90k(v=vs.110)....
Google Removing Domain Names from Search Results Increases User Vulnerability
Rendering iPython Notebooks on GitHub
- On how long it takes to save up enough money that you don't need to work: depends on your assumptions, but yes it takes some years of work. There are lots of people who write on this, I especially like: http://www.mrmoneymustache.com/

- I don't personally have enough money to pay for my current living expenses for the 70-odd years I hope to remain alive. It was an important shift for me when I stopped thinking this was necessary. I have enough money to glide for several years, and I'm confident that either some money will come my way during those years (and I believe it's a little easier to make money when you're not worried so much about it), or I will at least have enough time to notice I'm running out and adjust course. I'm not too worried about the "hole in my resume". If you do interesting stuff with your life, you'll always have a good story to tell. Maybe your story isn't optimized for going up a certain career ladder, but who cares?

- I don't think luxuries are bad, and I think you spending money on a piano could be an awesome use of your time on earth. I just think we don't realize quite how many choices we have. I know lots of poor musicians find ways to get access to pianos, and owning a house out here in 29 Palms is certainly not too costly. But that doesn't mean you have to do it that way!

- I also spent more money while I was working long hours in part to "de-stress". While I don't think it was strictly necessary, I don't think it's crazy. It's just useful to remember that those "de-stressing" costs disappear when you leave the stressful situation.
Did your apps have viral, organic growth or was it mostly from your own marketing efforts?
Sulfur compounds are one kind of air pollution. No one is saying that sulfur doesn't count, they are saying that other things count too.
It's something of a controversy about whether the Census should count prisoners as living in the place where they are imprisoned or in the place where they formerly lived. The policy of counting them as living in the place where they are imprisoned diverts federal and state monies away from the places that they came from.
What Metrics Are You Tracking on Your Website?
Yes and no. Yes, Uber partners with existing licensed black cars services (or their drivers, not sure of the exact mechanics), yes, X is controversial in its own regard (and Pop even more so) - but: some of the controversy is around how Uber makes black cars behave more like cabs - as in, you can almost-hail them on the street, rather than properly pre-booking them. I think I read that in Germany, black cars have to return to their base between each fare, specifically to avoid this (I also recall reading that Uber complies with this, don't know how that works).
The Mystical Universe of Magic: The Gathering
I have had good experiences running several low traffic web apps (written in Clojure + Compojure + Clojurescript) on one Digital Ocean instance. Right now I am running a ton of stuff on one small Azure instance, getting perhaps just a few hundred thousand HTTP requests per day. But, a $5/month Digital Ocean VPS would probably handle all of your hobby sites.

I am looking to migrate a few of my hobby projects to the Heroku $7/month tier and try that for a few months as a test.

I am happy with their new pricing scheme - seems fair all around.
If you work in an agency, you have to deal with the fact that (for example), every separate Intranet web service was built by a separate low bidder.

So I log into one insane and poor system to do travel, a different one for purchases, a different one for HR forms, etc. etc. and they're all ugly, hideous and broken (and let's not get started on the 20 passwords with different complexity rules and change schedules).

Regardless of politics, there are people working for the government doing approved-of things who need better organizational support from the top.
It'll definitely be a combination of product and pr. I've done lots of things over the years with varying levels of success, but so far my success has been mostly through product and App Store Optimization.

The new App Store Analytics Apple just released will be a big help though. I have a lot of new ideas that I'll write about once I've given them a try.
Thank you for making the mouse a thing in a keyboard driven world. As someone who grew up with gaming and learned IT as a result I never was able to fully give up on the mouse during my daily workflows. I admire people who can use VIM etc only by keyboard, but my muscle memory just says: mouse.

Thanks for establishing something that embraces this.
As long as the comment is useful and contributes, I think it's fair game. This definitely qualifies. That said, if it's not free, I personally would prefer that be mentioned, (and at the same time a link to a free sample chapter or equivalent if it exists would be useful).
Ruby – A Look Back at the Last 8 Years
Decent three page summary from Brennan Center for Justice at New York University School of Law.

Are They Allowed to Do That? A Breakdown of Selected Government Surveillance Programs (2013)
Fair enough, but I have seen the effects of people and kids in living conditions where all basic necessities are provided and they're quiet often completely unmotivated and stagnate.

It might be great to let the robots do everything though.
> A lot of Americans have a taste for freedom that doesn't seem apparent in much of the rest of the world; well, aside from all those who try to move here. I wonder why...?

If you believe that, you need to get out more.
Women live longer than men.

I wonder how of the divergences not explained by prisons are explained by the age of the population.
Why? Last I heard, Chrome is going long on their JIT and trying to get it to automatically squeeze the same performance out of asm.js code as the others, without special shortcuts. These "real" optimizations can then seamlessly be applied outside of asm.js code.

Isn't that something that benefits us all? I'm happy they're trying, at least.
The best part about this is it's an 8,624 word guide - the submission here doesn't allude to the fact that this really is a pretty exhaustive guide. (Actually, I added 200-300 more words based on feedback from reddit, so consider it closer to 9,000 words now.)
Note: you can't say you have no experience, because you demonstrably have some!

One thing to decide is if you want to continue down the technical path. In that case, you might want to hire a CTO (I agree with those that say you should move to "founder") who has as one of his explicit missions helping you to gain more experience. As part of finding such a person, you might ask for book recommendations in interviews.

But as others have noted, you'll have to check your ego at the door; back in 1971 Jerry Weinberg formulated the concept in his still excellent The Psychology of Computer Programming. If you can't do that, or completely turn it over to the technical people you hire, your venture is in serious jeopardy.

That said, you do need to find someone who doesn't gratuitously insult you or your work.
Ops Are from Mars, Devs Are from Venus: LXC – Containers Before It Was Cool
Ask HN: How loud do you listen to your music with headphones?
How loud do you listen to your music with headphones?

My MacBook Pro has 16 volume levels. I am down around 2-3 when people are around, so they can't hear it and I raise to 6+ if I am alone or in a coding zone.....
I remember having the same thought with that book. Elements of the book seemed to be there for the benefit of spin-off video games, much like you'll sometimes find a character in a movie probably exists for merchandizing.

Maybe I gave him too little credit in this case. Either he was familiar with prototype tech that we aren't aware of yet, or he was actually a decent near-future sci-fi writer.
Sometime in the last year I started to find myself exclusively using the reviews and filtering within Google Maps to search for restaurants, bars and other businesses. I can't say I've really touched Yelp at all in months.

It definitely seems like Google has devoted a lot of effort to improving these features as I remember a time when their review sections were a veritable ghost town. I won't be surprised if Google ends up buying them.
To be fair to google they are supporting asm.js, just with a different implementation design. Native Client is orthogonal.
Yeah, I think living in SF is a luxury -- although I know that's painful to say to someone who really has roots there. I lived there for four years, and it's an amazing town. Living there also puts you in the middle of a network of bright creative people, so it probably makes you more productive. I'm not saying it's easy, just that we have choices.
> so I'd see a lot of (new) engineers select the text with their mouse

What did the more experienced engineers do differently?
The childbirth might not be unexpected, but the need to take time off would be. The op can credibly claim he did not intend to take anytime off at all and it is only because wife needs him and this was unexpected.
Sure, but its a small step in the right direction. Outright parallel construction is evidently illegal, and if is caught would be a major embarrassment. The other problems are age old and not specific to internet surveillance.
There is a great deal of evidence that slavery was related to cotton, sugar, and rice plantations (as well as some other crops to a lesser extent). One could also make a very convincing, if not definitive argument that imperialism enabled slavery (at the intercontinental scale), and that mercantilism supported it. Politics, as played by wealthy landowners and slave-traders also perpetuated slavery, as can most easily be seen from the (abominable) actions of the American House of Burgesses.[1]

There is very little evidence for the argument that capitalism or free trade was responsible for slavery. Economics was called "the dismal science" precisely because its critics thought the proponents of free markets were not taking a (racist) vision of 'social justice' seriously.[2] Later on in the American South, the bus and streetcar companies tried to segregate busses on the basis of smoking and non-smoking sections, but politicians and racist groups forced them to segregate based on race. In South Africa during the aparteid, businesses were taken to task for not discriminating strongly enough against the Africans, and many groups such as socialists and unions held racist policies as a tentpole of their platforms. There are innumberable cases of the market acting against slavery, and even Smith described markets as notable for their lack of nationalism or discrimination.[3]

[1] http://en.wikipedia.org/wiki/Slave_codes

[2] http://en.wikipedia.org/wiki/The_dismal_science

[3] http://en.wikipedia.org/wiki/The_Wealth_of_Nations
I'm confused by the argument made here. An economic system fairly different from the modern world, which was not called capitalism at the time ("capitalism" is mainly an 1880's+ idea), used slaves. Slavery was abolished and later that system evolved into capitalism.

I'm not sure what the conclusion is. The author seems to think someone forgot about slavery, though it's unclear who.

As a counterpoint to the mood affiliation, I'll just remind everyone here that the term "dismal science" was coined by Thomas Carlyle, who favored slavery rather than "find[ing] the secret of this Universe in 'supply and demand,' and reducing the duty of human governors to that of letting men alone". https://en.wikipedia.org/wiki/The_dismal_science
That's not the ambiguity. The ambiguity is whether the Radar found them by their heartbeats, or whether they were trapped by their heartbeats.
In 2007, researchers published a seminal paper which shows that the more meritocratic you think your company is, the more biased you are:(http://www.socialjudgments.com/docs/Uhlmann%20and%20Cohen%20...).

While that is also human to do, and company cultures obviously develop flavors over time, when it comes to technical hiring, we sorely need an effort to first prove and then to reduce biases, based on data. This is a great effort.

At http://InterviewKickstart.com, we're trying to do this indirectly in a small way. The better you are at solving problems, the less the biases affect you.
> That, in fact, is what sparked the American Revolution, when the British attempted to seize or destroy gunpowder, cannon, etc. (they did manage to damage 3 cannon).

This is a pretty absurd over-simplification of the causes of the American Revolution. Lexington and Concord certainly involved a British march on militia supplies including weapons/ammunition, but those weapons/ammunition were being gathered not for their own sake, but because of decades of tension over taxation, quartering, limitations on public gatherings, things like the Boston Massacre, etc. leading up to war. The Massachusetts militia weren't just a bunch of gun collectors who got pissed about gun control.

> it is my impression, such bad areas are much more compressed

I'm not sure ghettoization should be pointed to as a success story.
> compilers, language design, machine learning, databases with strong ACID guarantees, etc.

Compiler design isn't that hard. A perfect optimizing compiler is damn nearly impossible, but good enough is easy. LLVM makes good enough compilers pretty easy, see the number of new languages that get posted to HN every month!

Machine Learning is hard to do right for non-trivial cases, but the only risk is you waste your investor's money and your customer's time, you don't risk identity theft (unless you are using machine learning to write crypto code maybe? :) )

Databases, yeah, everyone screws those up.

The real key is how many people are trying to break your system though. Crypto is exposed, your DB layer can have protections put on it to sanitize your data and rate limit how fast stuff comes in. You can clean up the data that goes into your machine learning algorithm (or use one that is resilient to x% of malicious data).

None of those defenses depend upon defending attacks of context switch timing in the CPU leaking data from a CPU that was releases 2 years after your code shipped through QA!

(and yes new CPU designs can cause problems in any code! But Intel and AMD work hard to avoid the major cases!)
Where did you see any plans of his to publish g-code in hard-copy?