HNHacker News
TopNewBestAskShowJobs

etanol

141 karma · joined August 23, 2011

submissionscomments
etanol··on Letter to John Carmack
Just like with C++. That language is a horrible mostruosity, yet projects keep migrating to it, e.g., Id's game engines, GCC, etc.
etanol··on Letter to John Carmack
> Right-Click -> View Source is what made the web so successful and it's awesome that we now have this for 3D graphics as well.

That can't be serious. I bet he didn't try it on GMail.

etanol··on PHP: The Right Way
The comments about namespace are somehow ironic: is it very common to find developers that know what classes are but not namespaces? The namespace concept is much simpler than class. Which makes me wonder: who is the target audience?
etanol··on Got 15 minutes and want to learn Git?
I use them both and I can say that Mercurial is way easier to learn and use than Git. Obviously, Mercurial has less features but, is there currently any DVCS system that has more features than Git?

The funny thing about Mercurial and Git is that they build on top of the same core concepts:

http://mercurial.selenic.com/wiki/GitConcepts

etanol··on SQLite3 Injection Cheat Sheet
Probably most of the readers already know it. But it is worth remarking that these tips only work when there is an injection vulnerability in the application.

If you prepare SQL queries as all manuals recommend nowadays, you're 99,9% safe (the other 0.01% beign the probability that your database driver is doing it wrong).

I just thought the title might raise some unnecessary alarms.

etanol··on Note on Unix Philosophy
The NASA pen story, is it real or just a myth? In an attempt to answer myself, I found this:

http://history.nasa.gov/spacepen.html

etanol··on Google's Python style guide
Sorry, but I fail to see where the "env" command spawns a shell:

http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/env....

Could you please explain what am I missing?

etanol··on Syntax Matters...?
Brilliant
etanol··on Chinese websites defaced by Anonymous
I wonder what economical consequences would have that kind of social crisis in China.
etanol··on Why I Still Use Emacs
Well, considering that Emacs is supposed to integrate smoothly with external processes, it looks that asynchronous IO support it will be a better solution. Multithreading is generally a tricky business for interpreters and virtual machines.

So to reduce editor interface freezing, looks like a dead-end: either you expose asynchronous IO (like AJAX), or you add the complexity to have a multithreaded interpreter (like JVM) or implement a sane concurrency model (like the actor model in the BEAM machine). Or else avoid Emacs modes that are known to freeze.

However, I recently discovered that VIM uses threads:

  $ ps -eLf | grep vim
  UID        PID  PPID   LWP  C NLWP STIME TTY          TIME CMD
  etanol   15073 15023 15073  0    2 22:23 pts/2    00:00:00 vim
  etanol   15073 15023 15074  0    2 22:23 pts/2    00:00:00 vim
I wonder what for :-S
etanol··on Spain threatened with trade blacklist for not passing SOPA style law
«They are basically coercing everyone to do what they want or else.»

To be more precise, they are coercing everyone with a fragile economy like Spain is suffering right now.

China has much less respect for intellectual property than Spain does, yet USA doesn't dare to threaten and pressure them in such an arrogant way.

etanol··on Ivo – a reimagined Unix terminal system
I find the article a bit confusing. Given this statement:

In addition, the keyboard is often more effective than the mouse for our work, since instead of floundering around in nested menus we can just type what we want. However, it’s worth noting that we don’t avoid the mouse because it is slow — if one wants to move the cursor to an arbitrary location elsewhere on the screen, one can often do so faster with a mouse than a keyboard. The problem is the transition from the keyboard to the mouse. It’s an expensive context switch, which should not be done lightly.

I don't really understand the following:

We then add syntax highlighting and hyperlinks, so you can easily navigate between man pages, or click on a grep result to visit that line in a file. Clicking on a hyperlinked directory in a file listing would reveal the contents of that directory in a nested list, slightly indented; clicking on a file would open it in a new tab.

Too much clicking for my taste.

etanol··on Spark
Already done, and someone even did a better fix:

https://github.com/holman/spark/pull/8

etanol··on Spark
The script is not a proper POSIX bourne shell script, as it uses arrays.

For starters, it won't work in dash (Debian and Ubuntu /bin/sh implementation). So the shebang line should be changed to #!/bin/bash (not sure if it would work in Zsh either).

etanol··on The Art and Science of Great Code
Actually, many open source projects explicitly forbid vertical alignment as it becomes an obstacle for patch review.

I'm quite disappointed the article doesn't mention that.

etanol··on The Volkswagen Group is using IE6 as standard for displaying web pages
Is it april 1st already?
etanol··on It’s Not China; It’s Efficiency That Is Killing Our Jobs
I would like to point out some counter-examples:

«Think of journalists. Many are losing their jobs. Newspapers are barely surviving. In the old days, for every news event, there were probably hundreds of journalists writing about the same story for their own local newspapers. Now, because of the efficiency of the Internet and search engines, a few journalists writing about it would suffice for the whole country. People would be able to find them. There is no reason why hundreds of newspapers should write and publish their own versions of the same story.»

And yet, you can still find incompetent people. I've read so many inaccuracies, grammar and typographic mistakes from information professionals (apparently) that makes me wonder if the price to pay for such efficiency is too high. And I'm talking as a consumer, information consumer.

«Corporations are increasingly getting bigger (in terms of market caps), more global, and more powerful, yet they are getting smaller and smaller in terms of the number of people they employ, because they have mastered the art of efficiency.»

Okay, take IKEA for example. IKEA sells furniture and other home accessories world wide, and everywhere you can find the same model. However, how many people do they employ on each store? A hundred? I don't know but I'm under the impression that is not a shrinking number. And IKEA is a particularly good example because it's expansion model is not based on a franchise like fast food restaurants.

Of course, I might not understood the intention of the author.

etanol··on From C to C++: A quick reference for aging programmers
«And another thing you always desired: the struct keyword is not needed in the declaration»

Someone doesn't understand the value of the "struct" keyword:

https://github.com/torvalds/linux/blob/master/Documentation/...

etanol··on Rob Pike on regular expressions in lexing and parsing
I'm a bit confused, aren't lexers implemented using similar techniques as regular expressions? (i.e: NFA to DFA conversion and DFA minimization).

Or maybe I'm also confusing lexers with lexer generators.

← PreviousPage 2 of 2