skysight-inc/HackerNews huggingface dataset:
What part of WebGL gives a programmer unrestricted access to the host's memory?

Ever had a video driver bug crash an application or bluescreen Windows?

Your web browser could have a buffer overflow in it's HTML parsing engine, yet I don't hear you speaking out against HTML

It's a fair point. Security is about trade-offs. I am indeed concerned about HTML and do most browsing in a VM. But to me WebGL is farther out on the risk/benefit spectrum than HTML. I would not accept it for ads or ordinary page content. I would consider enabling it selectively for an app that I carefully decided to trust.

* Admittedly I have not tried, but I suspect it's going to be very difficult to get it to work well from within a VM.

* HTML parsers and renderers have indeed had plenty of vulnerabilities. They have taken years to get as secure as they are today and we may not have seen the last of the exploitable bugs in them.

* HTML parsers have been implemented from the beginning to accept untrusted data from the internet. 3D graphics drivers, on the other hand, are designed primarily for performance in a scenario where they are run by a single-user game on the local machine, often with Admin privs already.

* We saw how many years it took Microsoft (the company that could reportedly turn on a dime) to 'get' security to the point that they could ship a secure browser. I don't see much evidence that graphics vendors are even thinking about it yet.

* Apple knows that WebGL bugs will result in jailbroken iPhones. Guess how many years their OpenGL support level is behind the PC...on the very same GPU hardware? Last I checked, someone reported getting OpenGL 3.2 working on a Mac. I've had usable OpenGL 3.3 on a freaking Linux laptop for a couple of years now. More powerful GPUs are up at 4.2.

* A buffer overflow in HTML does not automatically amount to a kernel level compromise, (some recent font handling bugs in Windows notwithstanding :-). In fact, the latest generation of sandboxed browsers are building defense in depth mitigations. Any buffer mismanagement between the GPU, driver, GL, and WebGL seems very likely to result in complete pwnage. The GPU can access host memory directly with no access permissions.

Don't get me wrong - I love the idea of WebGL and want it to succeed. I just would hate to see it end up like Flash, struggling for years to retrofit security onto something that wasn't originally spec'd for it and a bunch of its users getting pwned in the process.
Self modifying Code - Malbolge
Heh. That was one of the more entertaining ones I stumbled upon.
people think emacs users use emacs for it's sheer power but i think that is the wrong perception to have (and promote).

the sheer power is in it's key bindings. it lets you literally take full control of texts with pin-point precisions just like a surgeon does with his tools. the speed and efficiency of it is just un-matched by any text editors out there. i've seen some power vi/vim users get close to speed but still can not rival against a power emacs users. long live emacs.
For me it was definitely find. I went through a ton of contortions to replicate its behavior several times before somebody knowledgeable clued me in.

Also, `` and $(). Find combined with one of these is great. One of my favorite one-liners (I even figured it out myself :)) is:

cat `find . --name *.java` | wc -l
Standard PHP rant. Though I stopped reading after the line about PHP's creators being idiots.
I've been very deliberately lowering my profile just to get some peace.

Which means nuking most of the content on my LinkedIn account. Seems to have slowed the tide modestly.
Awk. Actually a full programming language but i usually use it for quick one liners: http://gregable.com/2010/09/why-you-should-know-just-little-...
The ethics of private property aren't based on profit, they're based on the self-evident fact that one owns his own will and is responsible for his own actions, and consequently the fruits of his labor.

Social responsibility isn't a dirty word, it's a completely meaningless and dangerous word used by ideologues of all types to serve their personal vision of the world. It means something different to everyone you ask.

I don't have responsibilities to obligations I never made.
Interesting read! Very cool to see how your ideas evolved and morphed with time. I'd like to get in touch with you. Whats your email address?
It is not just Google. Anyone that can get a fake certificate issued by a trusted CA for ajax.googleapis.com can MITM it and do the backdoor.
I wouldn't say that the problem is "maximizing profits" per se. The problem is the focus on "maximizing profits in the short term".

Which brings us to another problem: that predicting the effects of a business decision on profits in the short term is easy enough, while predicting it in the long term is much more difficult (even impossible, depending on how you define "predicting").

Simplifying, for the long term you need vision, leadership and entrepreneurs. For the short term you need formulas, management and MBAs. Quite often the two needs clash with each other.

A century ago there was a lack of management skills and applying them brought big results. Now we are probably (well) past the point of diminishing returns - even negative returns in the long run, and what is missing is vision, both at the corporate AND at the political level.
Never thought to use ``. I always used xargs:

find . -name *.java | xargs cat | wc -l
Startup Weekend Project: SocialQs - social stock recommendations
Foreign hackers hit public water system
lsof comes in handy to match pid to socket and thus things like apache proc to running MySQL process.
Gil Zilberfeld interviews Uncle Bob Martin
>To reach users, I need a good GUI.

I scoff. http://prgmr.com/xen

bad design is my brand.

Now, I'm making rather less than five million in revenue; but I think I have a reasonable chance; I'll eat my hat if Linode isn't twice that. (I'm not saying I'm as good as linode yet, just that I have a chance.) I mean, my horrible UI in billing /is/ holding me back, but I think the places where I've gone ahead and used a command-line interface where some of the competition has used pretty GUIs? I think some of that has helped me.

I mean, like everything else, it depends on your target market, but me? I think it doesn't matter if your brand is ugly, as long as it is consistent.

You need to know two things. Your product, and your target market. Everything else is peripheral. It's obvious that you need to know the product, but I think it's also key to find a target market that you can relate to. When I go to silicon valley functions, social or professional, I wear my 'prgmr.com' T shirt (and yeah, it's about as ugly as the website) and it's fairly rare that I don't run into someone that tells me they are a customer. Part of this is that I use my network, but part of this is that I'm selling to "my people" - the sort of people I'd meet at professional or social events anyhow.

I mean, almost none of my sales are done in-person, but I know the culture of my customer very well, and this makes marketing immensely easier.
Steve Jobs brainstorming at NeXT; Absolute must-see
m-x find-function butterfly

(defun butterfly ()
"Use butterflies to flip the desired bit on the drive platter.
Open hands and let the delicate wings flap once. The disturbance
ripples outward, changing the flow of the eddy currents in the
upper atmosphere. These cause momentary pockets of higher-pressure
air to form, which act as lenses that deflect incoming cosmic rays,
focusing them to strike the drive platter and flip the desired bit.
You can type `M-x butterfly C-M-c' to run it. This is a permuted
variation of `C-x M-c M-butterfly' from url `http://xkcd.com/378/'."
(interactive)
(if (yes-or-no-p "Do you really want to unleash the powers of the butterfly? ")
(progn
(switch-to-buffer (get-buffer-create "*butterfly*"))
(erase-buffer)
(sit-for 0)
(animate-string "Amazing physics going on..."
(/ (window-height) 2) (- (/ (window-width) 2) 12))
(sit-for (* 5 (/ (abs (random)) (float most-positive-fixnum))))
(message "Successfully flipped one bit!"))
(message "Well, then go to xkcd.com!")
(browse-url "http://xkcd.com/378/")))
Attending college right after high school is generally a bad idea
New Arrival PRS Santana Electric Guitar Yellow
Price: $370.42. Save $20 off Black Friday Sale. Free Shipping Worldwide. I like to play guitar, jam out, play the blues, go watch movies. I love movies.
Dane Cook
Your approach works better than backtick expansion, since it won't run into 'command line too long' issues; but it will still break on "weird" file names (e.g., file names with spaces in them). The correct way to do this is

find . -name *.java -print0 | xargs -0 cat | wc -l
The problem is that you have to keep that snippet forever if you ever use the hashbangs. That's why I'm saying it's not a future-proof solution. Not that few bytes matters, though.
Also remember find's -print0 and xargs -0 so that you can deal with all filenames.
For find, you need to use single quotes so your shell doesn't automatically expand the .java glob into the names of all the files. Also, find uses one dash for parameters, and can take an exec parameter:
find . -name .java -exec wc -l {} \;

The {} means "replace with filename" and the semicolon (escaped so your shell doesn't eat it). This will run wc -l <filename> for every file that matches.

The -regex flag lets you do the same thing as -name with regular expressions.

The problem with this is we run n different wc's, as opposed to just one with all the parameters. We can use xargs to fix this:
find . -name .java | xargs wc -l

This even gives you a total!

The really* simple solution (which is probably best) is to just use shell globbing:
wc -l *.java

While find and xargs are definitely useful, the easy solution here works better
Most of those commands are not specific to GNU/Linux and will work with *BSD, OS X, etc.
Without xargs:

find . -iname '*.java' -exec cat {} + |wc -l

But if you do that, why not just:

find . -iname '*.java' -exec wc -l {} +

Which will also print out output of wc -l for each files along with total lines.
You'll want to quote .java so the shell doesn't interpret it as a glob, and find doesn't use GNU style flags. You can also pass wc the filenames directly like this:

wc -l $(find . -name '*.java')
Fun! It would be nice if the source of the image was given, so credit can be given to the author, if possible.
You can reach me at derek [at] liquid [dot] io
You can skip xargs altogether with the plus sign instead of semicolon.

-exec utility [argument ...] {} +
Same as -exec, except that ``{}'' is replaced with as many path-
names as possible for each invocation of utility. This behaviour
is similar to that of xargs(1).

The problem with just wc -l *.java is that it don't recursive directory.
There’s this fantastic loophole in the system where if you start a business...
Pinmark behappy50
Primark home page with links to hot products, ethical trading, jobs and store locator. New BMW cars, Approved Used BMW, or fleet BMW. Build your BMW with EfficientDynamics using our online car configurator. http://www.primark.co.uk
The [Deifenbunker](http://www.diefenbunker.ca/) near Ottawa, Canada is a similar declassified setup that’s well worth exploring.

Looking around the C&C rooms that had “X millions of casualties” on maps of blast epicentres really makes you think about what living during the Cold War must have felt like.
Don't you see how noisy and unreadable and clojure's code is? =)
The BWT is also rather interesting https://en.wikipedia.org/wiki/Burrows%E2%80%93Wheeler_transf... . An efficient implementation is fairly simple, but not at all intuitive.
Chalmers Scientists Create Light From Vaccuum
That has different semantics (it prints one line per file) and can have line length limitations. This has the same semantics as the parent's version, but without line length issues.

find . -name \*.java -exec cat {} + | wc -l
uptime. I had a phone screening itw with Google and it was the answer to one question. I answered sar, which is much more powerful, and top, but caller wasn't tech and I probably missed a checkbox.
Clojure is NOT a Lisp at all. It lacks one of the most essential abilities of original Lisp - recursive function definition.

Stop repeating things you don't know.^_^
Yeah, the flags always get me. For some reason, I've never had issues with the *. It's good to know about passing files to wc directly.

I just use M-x find-dired and friends these days for most things, admittedly.
Programr, the world's social lab for learning programming
With bash-4 or zsh

wc -l **/*.java
Agree with "find", especially finding files with recent changes, e.g. in last 5 minutes:

find . -mmin -5 -print
"Android is a huge step forward from feature phones"

And it was a shitty smartphone in the first iteration.

"ChromeOS is a huge step backwards from real PCs"

Which is a different category then what ChromeOS is in.
Not only that, if we've become advanced enough to finally decide we should genuinely spend our efforts on exploring space, by then perhaps a humanistic consciousness could have emerged rendering war irrelevant.
Disclaimer: I am a Google employee.

> Google doesn't have a marketing team on the ground. Selling to enterprise requires face time. Lots of it.

Perhaps I'm biased as a Google employee in NYC, but there are hundreds of sales and marketing employees in my building and across the street in Chelsea market. Google is very serious about expanding into the enterprise, and yes, that includes sales and marketing efforts. Why do you think that is not the case?

> Second, Google doesn't offer good support. The best you can get is email support.

The first result for the query [google phone support] on Google is http://www.google.com/support/a/bin/static.py?page=contactin..., which gives both US and international numbers for 24/7 phone support for Google Apps Business and Education editions. AdWords also has phone support. I do not know details about Chromebooks, but it is simply untrue that google only has email support.
slabtop
I think its because the workflow is broken - what is the tool that you use to typeset to get beautiful ebooks in EPUB, MOBI and AZW ?

I dont know - and neither does reddit/selfpublish . How does an author go from writing to generating books without encountering specialized (and expensive) typesetters?

The first piece of advice that self-published Kindle authors will give you is to have a beautiful cover - how do you design one and integrate it into your ebook generation workflow to get one nice little package ?
Can I say that the publishers are fleecing us, when probably they are having to pay extra to make sure their ebooks look good on Kindle, Nook, Sony, etc. ?

The toolchain doesnt exist - and it is time for disruption.
Would you really group Python in with Java? I find it reasonably compact. True, there is an unfortunate tendency to drag java-style thinking into Python.

I write python with vim; so do most of my co-workers.

(But then I also write Java with vim (when I have to write Java))
I think the inevitable trend for the desktop OS has been moving toward fully web/browser based for many years now. 99% of the time I use my desktop, I'm in the browser. The first thing I click when I boot-up is the browser.

ChromeOS makes a lot of sense, but there are a few hurdles that will naturally work themselves out over the next 3 years. Things like Internet speeds, connectivity issues, offline/online data sync, the user's hesitations, the current state of web technologies to replace native apps etc.
First decide the type of products that you would love to build. Then work backwwards from there, and code in whatever language it takes to get those products rolled out.

I believe you have to enjoy the product more at the end of the day, more than the technology.
Can you share what would make it unique?

I think that your hunch that what's out there can be improved upon is correct, but it would have to have some really unique value proposition that set it apart from posterous, tumblr, and the like. Posterous and tumblr succeed, IMHO, because Wordpress is difficult for someone who's not tech savvy to learn.
They'd sell fine if they weren't the same price as a real laptop.
Sure, if your worry is elbow room. But when people say we don't want to "put all our eggs in one basket" they're typically including things like nuclear war, killer asteroids, and gamma ray bursts.
Tod am Strand
Free shipping on YaYa Clothing collection at The Garden Gates
If you read Adam Smith, his argument is that pursuit of individual gain produces social good. "By pursuing his own interest he frequently promotes that of the society more effectually than when he really intends to promote it." The rhetoric we use today "a rising tide lifts all boats" and the like is thoroughly rooted in that thinking.

The fact of that matter is that we know this premise to be false. That knowledge is indeed irrelevant if you conceive of the profit-maximizing principle as being entirely rooted in an "every man is an island" hyper-libertarian conceptualization, but that is a relatively modern phenomenon and a wholly inaccurate description of the underpinnings of modern American ethics.

As a practical matter, only a few crazies actually believe that people have no social obligations. A large majority have some social conscience, but because they fully buy in to Smith's normative principle, they believe that their business decisions need not be guided by considerations other than profit. To the extent that this principle is invalid, their behavior is inconsistent with fostering desirable outcomes.
Frozen - flexible data processing daemon
Win a Blackberry Curve 8520
The first derivative is important here. Look at the chart labeled "growth rate of world population".
That reddit thread is delightful, because it is full of wonderful commands that I didn't know, or rarely use, or had forgotten.

But it's also terrifying, because it exposes how many people will post questions before using man.
Hi, I work at the WMF. I'll address your points here.

> Why can’t we have Stypi recording all changes made to Wikipedia articles?

Because Stypi didn't exist until a few months ago?

Ok, more seriously: I and my colleagues have talked to everybody else that ever did collaborative editing tools. We know the Wave guys, the Etherpad guys, and others, over the past year. I myself did a little analysis of Stypi a little while ago to try to learn some things from them.

We are working on this problem. I think you will be pleasantly surprised with the results shortly. The new editing "surface" is making progress by leaps and bounds lately.

See http://www.mediawiki.org/wiki/Future and others.

There are reasons why we can't just grab anything off the shelf like Etherpad, Wave, Etherpad-lite, or Stypi. MediaWiki already has a huge infrastructure of tools behind it and the entire community model is organized around chronologically ordered single-user discrete taggable edits of a very specialized format. Wikipedia wouldn't work well without all the bots and scripts that our community has written, and then we'd have to rewrite all of them too.

Etherpad has plain text with bold and italic. Stypi has even less, as far as I know. It is possible to use these editors to create a collaborative way to edit wikitext (I did an experiment this summer to do just that). But that doesn't get us any closer to a GUI editor, which most people think is a sine qua non.

Given the resources we have devoted to this -- basically some of the time of four or five engineers since March or so -- progress has actually been pretty good. Anyway, that's a slice of life at the WMF. Just so you know, in my corner of the world at least, we really are trying to make things awesome and it isn't costing the world a whole lot.

> Why can’t we create more engaging Wikipedia articles using
> something like Popcorn.js for videos?

Again it comes down to the wikitext format. We do not have the liberty of banging out a new JS library and content model and then slowly adding features.

Because the Foundation is adamant about never deploying any technology that's not 100% open source, we missed the whole wave of Flash-based video. Only in the past few years has it become possible to seriously do open source video in the browser. Michael Dale from Kaltura has written some great HTML5 video libraries for MediaWiki; watch for them on Wikipedia in the near future. In the meantime we're also upgrading our APIs and storage infrastructure to support uploading longer format videos and so on.

This brings us into parity with maybe Youtube circa 2007 or so, with some more advanced editing and annotating tools due to the wiki-nature of everything we do. But better late than never.
"!ssh" to run the most recent ssh command without having to type out the long list of arguments I use and the host name.
sed -i does the same thing as perl -pi. Though I've not encountered a system that doesn't have both.
Why did classical music and art deteriorate?
http://en.wikipedia.org/wiki/Classical_music

Who are the current world recognized composers of classical music? What is the current style of classical music? Why do European governments not provide massive financial support to composers and artists?
If a device has the same form factor and approximately the same price I'd say it's in the same category by most standards. If part of Google's plan is to get ChromeBooks down to $99 or maybe $199 then it might be successful.
Work From Home & Make Money Blogging
Pearl of the Orient
This is a tiny island situated in the Indian Ocean. It is best described as an island of paradise. It is the navigational hub of the Orient in the ancient world
It helps to put your most frequent entries in ~/.ssh/config

Host somewhere
HostName somewhere.example.com
User username
IdentityFile ~/.ssh/somewhere_key.pub
You don't have to lead players along by the nose - open-world games are surprisingly attractive even to kids (maybe especially to kids, who haven't yet been conditioned that everything needs to be structured with explicit step-by-step goals).

When I was in high school I did a lot of volunteering at the local science-museum where we had terminals set up with the Incredible Machine. They were always occupied.

Kids have an innate love for exploring, moreso than adults. We beat it out of them later, but in the mean time open world, unstructured games are some of the best ways to teach things to people. Look at SimCity, Incredible Machine, etc etc.
Two Easy Ways to Make Your Own 3D Glasses
Why do you complain about people in welfare?

(I think it's a good thing that a country provides welfare to its people like Norway does.)
I try to convert everyone I know to some of the topics found here, it's indeed very useful mainly in times like these where a job is something not available for everyone. I really like seeing all these different people reading HN.
For me the major flaw is the lack of use of vector graphics in some cases. I have a number of technical Kindle books which attempt to use fixed-sized images for equations and they become so pixelated that they are completely unreadable.
> Use delegate as the replacement

Actually, use the new `#on` as replacement: it can handle the job of `#bind` and `#delegate` (and `#live` of course), so I'd fully expect it to be the only one remaining in the fullness of time.

Warning: the first two arguments are reversed compared to `#delegate`:

$(document).delegate("#foo", "click", function() { });

becomes

$(document).on("click", "#foo", function() { });
This is useful for finding and killing a process.

ps -A | grep some text in program name

upon getting the pid

kill -9 pid
> so if your reason for porting is mobile latency, Zepto's a good bet.

Unless you want to be compatible with WP7's IE9/IE10 or mobile Opera browsers of course, since Zepto is webkit only (for a phonegap app it probably does not matter).