skysight-inc/HackerNews huggingface dataset:
It's not so obvious what the take-home lesson should be from this example. The code was obviously designed to test the loop speed. Surely in reality it would not be worth sorting the array just to optimize the branches in the loop. The branchless version somebody posted is effective, but it's hard to read and brittle. The Intel compiler seemed like the optimal solution if you have it.

I've found architecture effects fairly hard to predict in real situations, with my level of knowledge. I think it's hard to reduce these to straightforward lessons. It's useful to know that things like branch mispredictions and cache misses are important, but you should probably not try to optimize for them until you've timed the loop and built up a good case for what's occurring. Most of the time, when I think I can make something faster that way, I rewrite the code and it's no faster.

One case where something did get faster was in a case where I had two large arrays, one containing indexes into the other, which contained data, and I needed to permute the data by the indexes and write it out to a file. Initially, the indexes were arranged so that the output was sequential, but the array accesses were random. I switched out the array of indexes with its inverse, which would access the data sequentially, but produce output in random order, which I captured in a new array before writing out. The second version was measurably faster. The lesson seems to be that loads benefit more from locality than stores. In the end, though, it only saved a fraction of a second, even with 100 million elements in the array. Unoptimized, it was already pretty fast, taking slightly over a second. It was nice, but I'm glad I didn't spend too much time on it.

I think this kind of optimization is somewhat like saving money by doing your own plumbing. It's usually not worth it unless you know what you're doing, or you can afford to spend lots of time.

Edit: Reading more of the comments, I found something useful that I didn't know. The ternary ?: operator generates a conditional move rather than a branch. So that's a viable solution, although it came out a little slower than the predictable branch.
If you re-arrange the terms, you can find that that series equals tau/4.
90% of users (including me) don't bother reading the even first two.
I'm not sure that's it -- ruby also has a heavy evidence on classes, but encourages entirely different sorts of solutions. Sometimes for better, occasionally for worse, but rather than argue about that, my point is just _different_ -- if emphasis on classes was what led to designs like Java, ruby would lead to em too, but it doens't, so it much be something else.

I do like the way jfb suggests using the concept of 'affordances' with languages/environments, to analyze what sorts of code they encourage. But to really do that, we'd have to actually identify these specific affordances, which i'm not sure how to either.

(And as far as your particular line of argument -- does anything in a processor know what an 'actor' is either? If not, I believe you that you find 'actor' a better abstraction than 'class', but it must not have anything to with either one being something the lower-level computer architectural abstractions 'know about')
The info wars will not have a winner, any more than warfare with black powder, warfare with motorized artillery, or warfare with airplanes produced clear winners. The best possible outcome is to survive until the next kind of war makes the current one obsolete.
Likewise, very informative.
I personally think that's worse. The original declaration is easier to read and immediately recognisable as to what it is, I can see clearly that it's a namespace and a class. The second version would require me to think.
Interestingly, when written in C, gcc compiles the inner loop to (comments mine):

.L11:
movl	(%r12,%rdx,4), %eax ; load value of data[c] in eax
leal	(%rsi,%rax), %ecx ; (sum is in rsi)
; add data[c] to sum, store in ecx
; yes, this is (ab)using the
; "load effective address" instruction as an
; "add a to b and store in c" instruction
cmpl	$128, %eax ; compare data[c] to 128
cmovge	%ecx, %esi ; if above comparison was true,
; set rsi (sum) to ecx, computed above
addq	$1, %rdx ; c = c+1
.L9:
cmpq	$134217727, %rdx ; this is the for end clause
jbe	.L11
jmp	.L12

In effect, it's adding data[c] to sum, storing it in a register and storing the result back in sum if data[c] was larger than 128, all with no jumps except for the loop itself and that jump is mispredicted exactly once. I don't see why java's JIT can't do the same.
I think everyone should find a workflow that works for them, and I've found that what works for me is working almost exclusively from a terminal.

Combining vim and tmux with the basix Unix command line and a few other tools like ack, tig, etc., gives me an environment that I can't really replicate with desktop applications, at least not on OS X, which lacks a true tiling window manager (i.e., one which, unlike slate, spectacle, etc., tiles the windows for you automatically). I've considered a switch to Linux for xmonad, but I still love OS X overall and am more than happy with my terminal workflow.

I work with two 27-inch monitors, and I like to dedicate one entire monitor to a single full-screen terminal with tmux as the window manager.

Admittedly, this has its downsides. For instance, I feel hopeless trying to do serious coding on Windows.
nknighthb,
I am just wondering. Did you downvote me because you think one part of my explanation was not specific enough?

First, you are correct that I specifically mentioned the logIf function when I discuss the specific example.But that does not take away from my thorough explanation of the main reason for the problem. In fact, everything I said about the logIt function applies to the doSomethingWithStr function, since they are both closures, so my explanation stands as is.

If you read my explanation again, you will see that I clearly explained that closures still have access to the outer function's scope, so both the logIt and the doSomethingWithStr functions have access to the outer function's scope chain even after the outer function or any of the other closures returns.

It is not until both all closures are destroyed or returns that the outer function's scope activation object is destroyed.
HiddenToolbox - Make Private Computer Files Invisible to Prying Eyes
When I said I haven't looked for a free host in a decade, and don't know what kind of competition has appeared since then, that wasn't advice to pursue a business. The debate was whether or not a service like neocities has a purpose in current times. I suggested there was still a market, but whether or not a solution exists, I haven't checked.
Que Hacer Cuanto Tu Pareja Te Deja -- Consejos
Very interesting, very ambitious. As someone with adhd, the best advice I could give is to find someone who doesn't have adhd to help out, or manage the project.

I'd like to help but my coding skills are a few orders of magnitude too low for this kind of a project (and I'd probably forget about it in a week anyway).

If you need beta testers or any feedback, I'd be happy to help.

FYI, that rebellious streak is probably Odd (oppositional defiant disorder), which just about everyone with adhd also has.
Well, yes and no. I make no claims as to the validity of your arguments, but having spent the last two weeks writing a static bytecode verifier for the JVM, I'm prepared to say that it is, at minimum, more complex than I'd like it to be.

Paradoxically, this assignment has given me a great deal of respect for the idiots who conceived of the damned thing in the first place.
But GNOME isn't doing it the hard way.
Oh don't worry there's plenty of Seinfeld and PBR after 8pm too ;)
Would it be helpful if that was rolled up in the official docs?
I think software as a discipline (design, implementation, analysis) has a lot to learn from more traditional areas of UI research -- by which I mean design in the Donald Norman sense. Living off in the universe of Platonic forms of e.g. patterns for organizing patterns for organizing data is fascinating, but eventually we have to pause our theorizing and start inspecting the way humans come to grips with theory.

There's a saying that one can write COBOL in any language, but nobody is born itching to POST INCREMENT C BY ONE. A given technology has a spirit; that spirit guides the usage of the technology; and people who use that technology, and share a sufficiency of that spirit, will find a welcoming home. That spirit is intrinsic to the technology; changing Java to not rely on Simula style classes for code namespacing would destroy Java -- it'd be something very different, and the usage of this new language would mean entirely new styles of conceptual organization.

I'm not taking a stance in this post on the aesthetics of the various ways to organize programs; but I do think that the forensic exercise of determining the -- I dunno, zeitgeist? -- of a technology is an interesting, rich one.
The 'comments' app has now been deprecated and will be finally removed from contrib in 1.8
Apparently a "database administrator" is a kind of registry of spectrum and location, keeping track of what devices are using which frequencies in which places, and so ensuring no overlaps? Based on this description of the proposal they submitted: http://googlepublicpolicy.blogspot.com/2010/01/our-proposal-... and this FCC page: http://www.fcc.gov/topic/white-space

It turns out that I live in one of the largest "black" areas on their map of channel availability, Los Angeles. The other large black spots are Salt Lake City and New York. There are also a couple odd black spots in New Mexico that must be regulatory rather than physical, since they don't have any "gradient" of decreasing channel availability around them. https://www.google.org/spectrum/whitespace/channel/ (looks like it's US-only).

ETA: It looks like the NM rectangular black spot is the "Very Large Array" of radio-telescopes (http://en.wikipedia.org/wiki/Very_Large_Array)
If I had to pin down Java's problem on one thing, I would say that its problem is really C.

Or more accurately, the problem is that Java was a new language shoehorned into being "like" a language that was never meant to hold the concepts that Java demands. In some cases this manifests itself in more syntactical ways; C's pragmatic but unsophisticated approach typing works well for C, but starts to become a real burden when you start adding more sophisticated concepts onto the language. (Were generics really a concept that were ever appropriate for something like C? Generics deserve a more considered treatment; a language with structure and syntax designed with them in mind.) In other cases the impact is more clear but inexplicable; "In Java Everything is an Object"(tm)... except for the things that are not.

The end result is a language that is ugly and clumsy to work with without some pretty advanced tooling, all for reasons that really have no business being real problems. Shameful (primarily cosmetic) flaws forced upon Java by the business decision: "make it reminiscent of C".

I have the same complaint about C++. Had Java and C++ not burdened themselves with the design requirement of looking like C, they would be much better languages. Languages that stray further from the mold, like Scala or Go (I am thinking particularly of their abandonment of C inspired defines, in favor of a more Pascal approach), are more pleasant to work with for it. Perhaps this damages adoption.. but that is another matter I think.
While I happen to agree with you, I suspect that many Americans don't see anything wrong with using information like that.

Any time the foreigner angle comes up in some form, there are always several prolific HNers who point out that the US govt is not obligated to treat fairly or generously with other countries. Its sole goal is to ensure that whatever is in the best interest of America comes about.

(It is of course arguable whether the approach is in US's interest in the long run; but I dont think the above is an uncommon view)
And another thing is that if Snowden had been studiously careful not to overstate the situation, or allow Greenwald to overstate the situation, there would probably be a lot more uproar by the semi-interested citizenry.

PRISM was advertised as being a $20 million backdoor into people's email and social media that would allow any ol' NSA analyst who felt bored to literally watch peoples' thoughts form in their minds.

It turned out to be a $20 million program to automate an existing manual process, with at least some measure of oversight controls (including non-governmental oversight).

Google, Facebook, and other companies were forced by Snowden's or Greenwald's lie to push back hard. WaPo revised their claim slightly to adjust, which caused the media to focus on the claim being 'walked back'.

Clearing up that issue, in the process muddied up the whole issue, and at the same time Snowden's credibility was taking shots about his salary, releasing hacking details to China, etc.

Snowden has done a lot right from the P.R. aspect but by damaging his credibility right from the get-go, he's allowed it to turn into the geopolitical equivalent of a he-said/she-said... which is not something most people have the gumption to care to try to resolve on their own. Especially in politics, where we essentially expect all sides to lie anyways.

Another thing that probably didn't help was all the involvement from Russia, Hong Kong, and China, but especially WikiLeaks and Ecuador (who are only one step up from Venezuela nowadays). It is very hard to try to line yourself up as a concerned American citizen when you're sitting in a Russian airport, being coached by Assange, and trying to flee to 'Chavez's little brother'. To the extent that any change must necessarily be driven by the will of the people, that whole thing was a mistake.
Why would this be unreadable for anyone?
If your explanation were all there was to it, then 'str' would not be destroyed when logIt alone were present. But it is.

logIt alone -> str is garbage collected

logIt + doSomethingWithStr -> str is not garbage collected

Your explanation could explain the latter behavior, but it does not explain the former.

Edit: To put it another way, you are addressing only one of the scenarios presented in the article, and you are assuming that scenario results in a behavior the article specifically says does not occur in empirical testing. This is a key point in the article, and your "explanations" are ignoring it.
But how much cleaner is using tau, beyond grade-school geometry? Euler's equation is arguably the most beautiful relationship in mathematics: e^(ipi)= -1. I'm afraid tau would dirty it up.

Edit: OK, e^(itau)=1, which is quite nice. :-/
Alta Vista did do enterprise search for a while. I remember in 2003-5 we had a large company choosing between Alta Vista and a Google appliance, the two players at the time. We were pushing them to go Google but they went Alta Vista. Worked decently well though, good search and decent API, the Google appliance was more black box at the time and Alta Vista was kinda flexible/customizable. So they had that.

Also Alta Vista Babel Fish was one of the first good translation services.
I'm very confused by this whole thread.

Is it that, only one closure is created for variables defined in the function run, and variables needed in any inner-function are added to run's closed context? That seems like a bug fixable without impacting the language.
Do you have a different take on a topic?
Often times, we see a good post, but have our own views on the topic. The problem with today's blogs is that they really are not made for equal opportunity in terms of sharing our views on the topic - that is, we are limited to posting a comment.

At ShareCred, we recognized this limitation - and in the true spirit of an open dialogue, we now support 'different takes' on a post!

This feature is completely explained at our blog - http://sharecred.com/blog/2013/06/28/have-a-different-take/.

Would really appreciate some feedback. We believe that it will enable a more equal footing for extending the dialogue.

Let us know what you think.

Also, BTW, if you have not visited ShareCred (http://sharecred.com) in a while - please do. We have totally revamped the UI and UX. We are hopeful that it is more purposeful and easier and beautiful.
Note: You will have to login to see the changes.
Yahoo kills Altavista forever
How to find app ideas for hackathons
I got this update last night and immediately turned everything off. Call me callous but I really don't want to be woken up at 3am because a kid was abducted on the other side of the state. Also, from my friend's experience the weather alerts can be inaccurate; he once got a "blizzard warning" when the weather was absolutely fine (a blizzard in this area would be a nearly apocalyptic event)
Great piece, but...

One thing bothered me. He said it took a double click and cmd+c to copy? That's not true at all. Single click auto selects. I think the hiding the of the URL is kinda lame because the URL _was the design element_ for "clone" for so long. I see the URL and I know I can click it to select, CMD+C, paste it into my terminal.

Ian certainly has some valid points, but in the end, I think he's not appreciating the full-range of use cases that everyone has. Github has a lot of different kinds of users. Enterprise development flows are a bit different than the open source ones. And those are the flows that bring in the money.

Though, I'm sure they use Github enterprise, so maybe he does appreciate that use case as well.
> And closures for things like callbacks for AJAX etc. -- these are generally fine, because once the AJAX returns and the callback function finishes executing, then once the AJAX object gets garbage-collected, the callback will too, and its closure.

I'm not sure that this is as fine as you think it is. Those callbacks may invoke other callbacks, which may access any variable that's in its lexical scope, and as the Meteor bug shows, you may be inadvertently holding on to not the callback itself, but the environment it lives in.

I think this may be exacerbated in promise-oriented Node.js code since it is so easy to take a promise and stash it in a list or object (which we do in my current project[0], and indeed this code has been the source of memory leaks in the past and may still be leaking).

[0] https://github.com/rstudio/shiny-server/blob/master/lib/sche...
The End is Neigh.
AuraJS – event-driven architecture for developing scalable applications
Ask HN: Review my startup,shre.io
Been working on this for a while now, Its a more social way to share files eliminating all the negativity crap.
It's interesting that in the 80s when home computers were new, you essentially started your computer at the command line and could code in something like Basic right away. A lot of non-technical people learned at least some programming, because of this. When GUIs came this faded out.

A similar parallel in the 90s with the internet is that people learned HTML, because in many ways tools were limited and it was relatively easy to create a page that was respectable enough. Now that so many web pages are "covered" in CSS and/or created with higher level tools, it will be interesting to see if many non-technical people will be attracted to creating their own web pages. I hope so.
Tekmote still carries them: http://www.tekmote.nl/ Please refer to Freedom Included as well in case they have refurbished ones: http://freedomincluded.com/
shre.io
Startup Plans Constellation of Tiny Monitoring Satellites
I hope this spurs Snowden to take a step back from having Assange and WikiLeaks do his PR. I always thought this was a terrible idea.

PR efforts from Assange/WikiLeaks need to be 100% focused on Bradley Manning. They owe it to him to give him their undivided attention.

However, if Snowden wants to continue giving interviews and have media reps, he's in a tough spot. His other main media contact, Glen Greenwald, struggles with being perceived as a journalist because of his past history as an activist. Greenwald wouldn't want to jeopardize his recently gained journalistic integrity by doing something 'activist-y' like team up with Snowden to plan media strategy (which is what Snowden really needs).

I think the best outcome in this scenario would be for a media-savvy activist internet lawyer come out of an organization like EFF of Harvard and rep Snowden.
I'd actually be quite happy if there was a permanent oversight committee containing members of either or both of the EFF/ACLU, with the exception that they're not allowed to leak programs, but are allowed to call for an independent Special Prosecutor to investigate abuses at any time. In fact I think the government could do a better job in general with liaising with non-profit NGOs.
"""-delimited text is not actually a comment. Its a multiline string literal

x = """aaa
bbb"""

And you can also use single quotes if you want.

x = '''aaa'''

The reason this might have been confused with a comment is because triple-quoted strings are often used for documentation strings, a Python feature that gives special meaning to string literals that occur as the first statement in a function or class. Those strings get associated to the function as its documentation and can even be inspected at runtime:

def foo():
"my documentation string"
return 17

print help(foo)
Clicky linky thing...

http://sharecred.com/blog/2013/06/28/have-a-different-take/
Is there a way to get similar introduction to meditation without spending 10 days on it in a wild and listening to all that chanting? Some kind of good old western rational approach to it.
Just make sure to jot down every thought and elaboration of those thoughts as they come to you, no matter what time of day they come. Save post-8pm for going back and hashing them out into a full-on blog post.
When last were weddings sacred, in the sense of not open to public comment? In Edith Wharton's The Age of Innocence the mother of the bride is horrified at the notion that reporters might take a picture of her daughter and put it in the newspapers; and surely they would have. There is the folk tradition of the "shivaree".

Second, "Our wedding was the antithesis of the technology-infested world we live in; a world that I have played a role in creating." No, not really, any more than Marie Antoinette was a milkmaid. In a world insufficiently infested with technology, rich people don't get married in the woods. In fact, apart from the men going there to hunt, they don't spend much time in the woods.
This is great - very simple. I have a few suggestions though:

* I hit your landing page, and froze, because I had no idea what to type in or what it really does. My thought process was roughly "Oh, do I need a soundcloud account? Maybe I'll just close this..."

* I didn't know how to easily make it go. Add a "just play some music" button that fills in one of the fields with a username and takes me straight to the music and plays a random one, to give me an idea of what this thing does.

* The suggestion of keyboard shortcuts at bottom left was really subtle and easy to miss

* Would be nice to have a volume control

* Would be nice to have a link on the song that goes to the SoundCloud page for an item.
Prediksi Skor Gresik United vs PSPS 29 Juni 2013
Prediksi Gresik United vs PSPS 29 Juni 2013. Prediksi pertandingan Kali ini akan memprediksikan pertandingan Gresik United vs PSPS. Siapakah yang menjadi pemenang di pertandingan kali ini.
The FBI and the Attorney General have no jurisdiction in international affairs and neither does their definition of WMD.
It's not an important distinction, but I still appreciate the clarification.