skysight-inc/HackerNews huggingface dataset:
I saw this talk at FCRC/PLDI. It's both very impressive and very well-presented. What follows is what I gathered from the talk; I haven't read the paper but it's on my reading list. The basic idea is that the old notion of a polymorphic inline cache can be nicely generalized to erase away metaprogramming like method_missing or descriptors.

PIC is a way to speed up method dispatch. Normally, if you call a method foo in your program, but you don't know the class of the object you're calling foo on, you need to go look up the appropriate code to run in a virtual table or similar data structure. This is slow, because you might do this lookup very often. PIC means caching this lookup in the code that calls foo—basically adding an instruction like

if (obj.class == CACHED_CLASS) CACHED_CODE()

The reason this helps is that we can do the test quickly, and the branch predictor will predict it very well; then our JIT can inline CACHED_CODE, perhaps optimize it against the other code nearby, and now we have nearly-optimal machine code. After "warm-up", in other words, we've dynamically inferred the type of obj and have optimized our machine code to take that into account.

Now on to meta-programming. Suppose instead of calling a method on an object we are instead instantiating a class object which is dynamically determined. PIC isn't exactly applicable, because it's not like the type of the class object is in question (the class object's class is probably Class or something). Instead, this paper proposes caching the identity of the class object, and the caching the initialization code and optimizing around it. You could do the same for things that override method_missing and similar, to cache all the decisions those overrides are making and then allowing the JIT to inline the code.

Their evaluation suggests that this method works really well, almost eliminating all of the overhead from meta-programming. This isn't too surprising: we know that even dynamic features are usually used in very "static" ways, that JITs are really good at finding these ways, and that after warming up JITs can usually optimize away all that dynamism to get very fast code.

I am kicking myself for never having thought of this, despite having read several of the PIC papers. I am not a big believer in meta-programming, but this work is simple, extremely useful in practice, and also deepens our understanding of a technique both theoretically and practically.
Ah, thanks for explaining.

Now it makes sense.
Yeah, that hope from them is baseless. Truth is, you're competing with candidates who have practiced a lot. They know it, and candidates know it too.

I'll re-iterate: Technical interviews are a competition. You cannot go unprepared. Testing your "raw" skill is stupid and a myth. It's as stupid as saying you want to see Usain Bolt (and everyone else) compete without practice. Those days are gone.
How bizarre, ultra-manly photos help Putin stay in power
Same old story then; incompetent buyers wasting tax payer funds. A well-known anti-pattern....
What I see is idiotic intruders to an Open Source project, bringing their political agenda and wanting to blacklist a person because of what he believes.

I don't give a fuck if a project member is a gay communist atheist or a religious KKK member as long as he doesn't try to advertise that from within the project code, forums etc.

But I do take offense of people coming out of nowhere and saying about a contributor "he has opinions we don't like, we want you to throw them out of the project". Those people should be shown the door. They could start their own project and dictate terms there.

Wanting everyone regardless of their beliefs is inclusive. Wanting only people with certain beliefs is exlusive. Guess which hurts participation more?
> O(length of string) per step

The big win here is not that it's as fast as the optimal algorithm (it's not), but that it's nearly as fast and vastly simpler.

You're technically right that the given code is O(n^2), but the optimization discussed later in the article can easily be applied to turn that into O(nk). Further, for the lucene problem, k=2. That's small and effectively constant, making it "basically O(n)". That's still theoretically worse that optimal, but in practice it just doesn't matter. Even with the slightly slower algorithm, Lucene's cost of searching should be dominated by repeatedly _using_ the DFA and not by _building_ it.

What's really important is that the O(nk) construction algorithm is much simpler than the optimal version. I don't know what the Lucene guys were originally trying to do, but if they had figured out this method instead, they could have avoided the super complicated implementation of the true O(n) algorithm.

> you can also implement the dynamic programming approach for a pair of strings in O(nk) time

Yes, but that's for every pair of strings you want to test. A DFA costs exactly as much to build as solving a single problem with DP, but when a large number of pairs all have one string in common (the query string), a pre-built DFA can be used repeatedly in only O(n+k) each time. Of course, whether that's enough to make a practical difference depends on the problem at hand.
Read before even thinking about a Bitcoin startup. p2p money market walkthrough
Apart from being extremely interesting from space perspective, this matrix seems like a great instrument to help manage a project of this complexity and uncertainty. I wonder what other things software industry can learn from NASA about this stuff.
If I understand correctly he's storing X items in a buffer of size X, but using an invalid value in the head pointer to indicate that the buffer is full.

It's easier to understand without the decrementing. Initialize head and tail to 0, keep incrementing and cycling through the end as usual. When removing an element check if head and tail are equal before removing. When adding an element check if head and tail are equal after adding, and set the head to a sentinel value, say MAX_INT. Now you can check for the sentinel before attempting to add an element.

Neat trick!
I agree it seems superficial. The deeper and more interesting side to this however is that it is exactly the sort of thing to keep an eye on if you are looking for events that are social catalysts. The Mayor of London telling a London cab driver to fuck off and die while arguing about Uber, is not just a story about a swearing politician.
In negotiating it's always about BNA. Best Negotiable Alternative. Get a competing offer from 2 more lawyers, pick the best one.
Ask HN: How did you find your cofounder?
As a technical person ... i find it increasingly difficult to find a suitable, reliable cofounder to work on one of my ideas, or one of theirs.

If you can please explain how you met your cofounder? Were you out looking for one, or was it a thought in the back of your head? Explain.

Thanks
I would agree with you, except there's no way to fit type erasure into that sentiment. Type erasure is a complex solution to an easy problem, done purely out of laziness and a broken sense of what "backwards compatible" should mean. The moment you try to do anything "interesting" with generics, you realize the sham that they are and start passing around `Class<T>`, which is exactly what you would have done before generics anyway.
Well, I guess you might be right with the chemist example, if it's an aquihire type of situation. With something like Google though, I have a feeling these kind of talks wouldn't scale well (in general any time you say the word "hopefully", that's a sign you might be relying too much on luck). Maybe whiteboards for entry level positions, and a combination of whiteboards and fireside chats for senior positions?
Broadly, yes. It's even on my twitter profile. https://twitter.com/zachaysan

I think that some people have a childish view of libertarianism, so I shy away from straight out calling myself a libertarian these days. I recognize the need for expediency in things like food labelling and even immigration and healthcare; but I don't view healthcare as an innate "right" I view it as something that is necessary to keep the economy efficient and something that almost everyone would want if something bad happened to them. I'm very against wars of aggression, but I'm not so libertarian as to deny the need for things like nuclear weapons or a realist influenced foreign policy (even if my international relations view is much more strongly influenced by liberalism). I don't think most libertarians are correct on the environment, since they aren't practical enough to admit that pollution is currently unavoidable, and strong treaties are needed to keep the oceans clean and full of biodiversity.

I call myself a geolibertarian, but I clarify it because I don't want people thinking I want to tear everything down. I just want to tear down some things, like grants for the arts, corporate welfare, militarism, and complex bureaucracies.
Very nice blog post Mortada! I used Concorde to build an optimal tour where the geodesic distances are scaled to meters (rather than kilometers), using the TSPLIB GEOM norm. Here is a Google Map drawing http://www.math.uwaterloo.ca/tsp/tours/tesla/tesla196_tour.h... If you zoom in, you will see that it does not have the crossings that are mentioned in the comments. The data set can be found at http://www.math.uwaterloo.ca/tsp/tours/tesla/tesla196.tsp The Concorde run time on my Mac Mini was 0.88 seconds.
If there is a way that does not require superuser access at any point in the process, I'm curious. Please tell.
Value is always relative to supply and demand. Case in point: elementary school teachers are far more valuable, but they are still paid peanuts because there are so many of them.

Engineers who can work on large scale systems in the backend and frontend are not that many. And hence they are valued higher. (I'm not talking about commoditized skills like making webpages and configuring systems, which are indeed vast majority of software jobs).

How many hours you spend is a very good question, but it's a separate question from supply and demand (aka value) of core engineers.
Terms that are true only for a Programmer
It really depends on the position and the problem. For entry development positions we will give simple tasks that can be 'aced' with any meaningful understanding of (web) development. Oftentimes more complex whiteboard exercises aren't even completed(they could take a long time, but used similarly to ensure problems are approached in an experienced manner.
FPGAs could change that equation :P
There is a PG paper explaining that the best place is at school.
> Perhaps one of javascript's derivative languages could come up with some syntax to make using this more intuitive

You might want to checkout purescript, which I'm pretty sure uses Monads to make stream interaction intuitive. No time for an example, but I believe there is one somewhere in the Purescript book[0].

0: https://leanpub.com/purescript/read
>I'm not a marketer and I really resent how in academia to have any chance you have to "sell sell sell".

You have to do this everywhere. There are limited resources. You are competing for them with others. You need to convince a gatekeeper that you deserve those resources. In academia, you are competing for grant money, lab space, etc. on the basis that your work is of more import than that of someone else. In enterprise software sales, you are attempting to convince a customer that your product is a better solution to their business problem than of some competitor's. In an interview, you need to demonstrate that you can accomplish a function better than one of your peers who is also vying for the job, and probably has an almost identical skills profile to you.
Whenever I encounter people arguing about Python3 I am reminded that I still miss Python1.
It will be a long while before launch costs are brought down. They aren't all that different than what they were a few decades ago.
Completely agreed - I do think the fasting studies suggest you should find some way to integrate that into your diet, and the easiest way is likely intermittently, trying to space out and decrease your eating in reasonable ways, e.g. taking consistent 12-20 hour breaks between large meals, spending a few days a month on a 1/3 normal caloric intake, etc.

You don't need to keep yourself in a low-calorie state, but it's important to enter that state to some degree, on some number of occasions, to get your body to kick off the internal processes of autophagy and renewal that result in a variety of benefits, to healthspan even moreso than lifespan.
14 Posts on Programming and Quality Assurance
For Uber Drivers, Maybe Becoming Employees Is Worse
Some other examples not in the OP:

- A Dark Room http://blog.doublespeakgames.com/news/a-dark-room-goes-open-...

- Spelunky http://www.spelunkyworld.com/original.html

- MechCommander 2 (shared source, via Microsoft) http://www.neowin.net/news/microsoft-mechcommander-2-shared-...

- Asteroids (and many other Atari games) http://www.atarimuseum.com/videogames/consoles/7800/games/

- Cart Life http://www.spelunkyworld.com/original.html (perhaps not as commercially successful as the others...but won a huge indie game prize, and is a great work overall)
Explanation for nightmare computer-generated picture haunting Reddit
Really!?! That seems pretty low. Is there a different rate if you live in your house? Even though I don't like property taxes I think that without fewer individuals would own their house in the US since corporate ownership of houses would have a lower cost.
For a look at a commercial game currently in development that has released it's (evolving) source code, there's Space Engineers by Keen Software House: https://github.com/KeenSoftwareHouse/SpaceEngineers
"I don't think children need us as their friends - they have plenty of these all over the place."

It's not a binary choice: friend or parent. Parenting is situational. Sometimes kids need you to empathize as a friend would. Sometimes they need you to "lay down the law". For example, kids often have a hard time recognizing when they're over-tired. In that situation, you need to just put them to bed with no drawn out reasoning. The next morning they feel better and don't begrudge that you took away their choice.

"friendship and authority don't mix"

In a mature relationship, they certainly can. I'm in that situation with both my boss and my martial arts instructor. I'm friends with both. But, inside the office and studio respectively, I respect that they have responsibilities beyond just me. So, I don't let a disagreement get to the point in which they need to remind me of their authority. If I ever let it get to that point, I'm not being a particularly good friend.

"The way I see that kids need us to be their guides and that's quite a bit different."

Being a guide is certainly part of parenting. Parenting is probably the most multi-faceted relationship you'll ever have.
Well, yes. Otherwise the same stories from when Jobs died would still be on the front page.
I didn't realize that Scheme had become bloated. I haven't looked at it in years, and thought it was still the basic language described in SICP.
Yes, in the sense that prior to the use of coal, forests were being used unsustainably and, frequently, exhausted.

At the time of the American Revolution, England relied on its American colonies for lumber, fuelwood, turpentine (derived from pine pitch), and other forestry products. It wasn't able to provision its own ships let alone fuel supplies, absent these.

Forests have recovered in Europe over the past 100-150 years, but that's almost entirely due to offloading fuel supplies to coal, oil, and gas.

Among the problems prompted by Greece's credit crisis is a renewal of woodburning, creating both air quality problems and deforestation:

http://www.cbsnews.com/news/greece-financial-crisis-high-fue...

In the US, quality lumber is becoming difficult to find:

https://www.reddit.com/r/Construction/comments/389q25/lumber...
IIRC R6RS was deemed too modular for not much reason while abandoning backwards compatibility. Thus, R7RS was split into small/large specs, and largely builds on R5RS.
As I understand it in the Haskell community right now.

1. Pipes | Conduit

2. io-streams (perhaps not in 1 only because of a lack of popularity and it is new)

3. Iteratees (have some issue Pipes/Conduit do not which I can't recall)

Not sure where Machines comes in here.
For what it's worth, I think whiteboard coding exercises can be quite useful, if they are done right. And a complete waste of time if not.

Here "done right" means something like: used as a way to explore problem solving and logic with the candidate.

So in this light, I wouldn't expect anyone to "ace" a problem, but I would expect them to be able to say sensible things about whatever they try and to understand and discuss how to correct issues or alternatives if they are pointed out.
It's interesting to look at India's Mangalyaan Mars probe, which cost $74M, or about a tenth of the NASA orbiter sent at the same launch window. This was largely because Mangalyaan was made out of completely standard parts; it was a tech demo for ISRO's satellite bus. (And it only carried 15kg of instruments.) It also only took 15 months to build.

So it's certainly _possible_ to build cheap spacecraft using mass production. You won't get anything specialised, so they're unlikely to work beyond the inner solar system, but you'll get cheap, simple and tested probes.

Whether this is _worthwhile_ is a very difficult question. Spacecraft cost money to run, and you're going to have to do very careful cost-benefit analysis as to what's the most efficient use of your money long-term. Plus, standard parts only work in standard environments; Jupiter's radiation belts would most likely kill Mangalyaan stone dead, even if had enough delta-V to get there, even if there was enough sunlight to run it.

But it's certainly worth considering designing a standardised long distance spacecraft bus, especially for missions to the outer solar system. Maybe someone's already done that...

(Mangalyaan is still in orbit, still collecting science data, still has years' worth of propellant, and AFAICT from the internets, has been an utterly textbook mission. They're sending another one at the next transfer window.)
I put in the values for my area and found that a landlord would have to pay me $9,503 a month to come out ahead ( over 30 years )
I would think that since okTurtles is more about encrypted communication and distributed authentication (e.g. NameCoin) than crypto-currencies, it makes a lot more sense to talk about the blockchain mechanism in general than to talk about Bitcoin. The technology might be largely the same, but the use case is very different.
Interview with Garry Tan: “Never Fear Failure”
The amount of energy required to evaporate water means you need a lot of sunlight (area) to evaporate a relatively small amount of salt water.

You can save a lot of energy by getting some water out of sea water, leaving extra-salty brine, rather than trying to get all the water out, leaving dry salt.
Thank you. I had not realized that this was already submitted.
"384 comments"
Oddly enough with people being slightly overweight seems to increase lifespan at least when looking at actuary tables.

There are a lot of possible factors that may be involved. From changing behaviors, lifestyle, lack of disease, larger buffer before weight loss becomes an issue etc.

Edit: It should be noted that this still a fairly low BMI compared to most middle aged Americans.
A Brief History of Tinder
We re-branded. The Libertarians and drug dealers soiled the old brand. It's the same platform though, there's no difference.
Many of us abide in disbelief of NASA's inability to leverage economies of scale. But like SpaceX and other private agencies have taught us, maybe this inability is a governmental-culture issue, not some sort of weird space-related issue.
Sorry, this is nonsense.

Nobody is saying reasonable laws and regulations are not important. This is your idea. Not that of a moderate Libertarian.

You are just making shit up. Which is great, but it doesn't change the reality that government is screwing you and me left and right.

They are not protecting the little guy through the sanctity of labor law. They are trying to figure out any way possible to destroy Uber. Why? To protect the unions that feed them money and votes. Are you that blind?

Taxi companies buy monopolies through "medallions" and other machinations and you are here actually implying that the government is protecting us through this degree of interference with the market? They don't give a shit about you, me or the little guy. All they care about is furthering their political goals. It's that simple.
Except Chromium as a framework is in an interesting position... and I think the threat is not even in how this could be used with malicious intent, but rather how easy it allows for indiscriminate passive logging on a grand scale.

Chrome is a very widely-distributed piece of trusted, self-updating software. It's also (for most users) directly connected to your google account--which is in many ways an intimate mirror to your identity.

You're absolutely right that this issue is not unique to Chrome, and can (and does) arise in any piece of software from native OSes & apps to 3rd party binaries.

I also think Chrome specifically warrants added concern for its ubiquity and de-facto link to your identity.

Anyone can use these techniques to target an individual, network, or system, but Chrome is one of the most widely distributed pieces of software designed with analytics in mind, from a company known for designing algorithms to improve contextual awareness.

What that means is, it's uniquely trivial to add in a few vectors of phonemes to recognize certain words/phrases, flip on an analytics pixel, and instantly have 100's of millions of devices running chrome associate their linked google accounts with this word/phrase.
Gosh, all that to save one byte? ;-)
In Haskell, there are language pragmas that enable extra features for a given module, but sometimes can also remove them (completely forbidding unsafe functions, disabling record syntax, and the like).
IRC formatting codes (not standard, but popularized by mIRC and thus implemented by most clients) are also toggles instead of begin-end pairs, so they allow this. If I remember correctly, old text processors like WordStar also implemented formatting as toggles.
Same kind of stuff but with robots: https://www.youtube.com/watch?v=-Rv3vckAlO0
Redis re-implemented in Rust
> rich companies to shift more and more of their expenses on working class employees

Have you ever started and run a non-trivial business? No, publishing an app in the app store doesn't count. Ten, twenty or thirty employees "brick and mortar". Anyone who has done so looks at your statement as what it is: ridiculous.

Did you even bother to fire up a spreadsheet and figure out Uber's cost structure and how it relates to what they charge and what drivers make in relation to their costs. Of course not. That much is obvious.
On Planet in Distress, a Papal Call to Action
Interestingly, the same does not hold for overweight people who are diabetic: http://www.nejm.org/doi/full/10.1056/NEJMoa1304501
Why isn't UPS popular around here?
If it can't be independently verified, it can't be called science, no matter how promising the study is when they run it.
I also recommend looking elsewhere since the OP is an example of terrible science. Due to the proprietary nature of the diet this study is impossible for an unbiased researcher to replicate.
Show HN: New,Rising and Top YouTube videos from all channels