HNHacker News
TopNewBestAskShowJobs

alxv

332 karma · joined November 11, 2007

submissionscomments
alxv··on The Maturation of Mark Zuckerberg
Managing a company is not that different from coding: instead of instructing machines what to do, you instruct people.
alxv··on Roy — small functional language that compiles to JavaScript
Well, there is a Cont monad in Haskell (Control.Monad.Cont). I am not too familiar with it though I know there is a good chapter about it in the Haskell Wikibook (http://en.wikibooks.org/wiki/Haskell/Continuation_passing_st...).
alxv··on Why Gmail's new design is unsuitable for heavy use
Internationalization issues could explain the change from a word based navigational to an icon based one. Long words from languages other than English might not fit well in the new layout.
alxv··on RSS Rant
There is an official Chrome extension for RSS:

https://chrome.google.com/webstore/detail/nlbjncdgjeocebhnmk...

I have no idea why it is not part of the default install though.

alxv··on Gerald Sussman: "We Really Don't Know How To Compute"
I have got the same feeling. It is this idea of moving away from the pencil-and-paper operating system for modeling complex systems. Victor is more about making computing explorable and accessible to the masses, whereas Sussman is more about figuring out new ways to compute things. However, both are basically arguing that our current abstractions are not enough anymore. That is, we need to revisit some of the assumptions that were made 40 years ago about how programs should be structured.
alxv··on Surprises from numerical linear algebra (2010)
Yes, Golub/van Loan is the bible. But Walkins's "Fundamentals of Matrix Computations" (http://www.amazon.com/o/asin/0470528338/) is much more accessible to self-learners.

For those who are just starting on this subject, I highly recommend that you rework the proofs for the bounds between the various matrix norms [1]. These bounds are the building blocks for most interesting analyses in matrix computations. And understanding these analyses are essential if you want to know which algorithm will work best for your problems.

[1]: http://en.wikipedia.org/wiki/Matrix_norm#Examples_of_norm_eq...

alxv··on Facebook privacy, Chrome extension for 2-clicks "like" button
The Disconnect extension for Chrome is pretty good for that:

https://chrome.google.com/webstore/detail/jeoacafpbcihiomhla...

alxv··on Motion Induced Blindness
It seems a variation of this well-known illusion: http://kids.niehs.nih.gov/images/illusions/pinkdots.gif
alxv··on Workers Leaving the Googleplex
I don't think he is a Google employee. He is a Google aficionado perhaps, but likely not an employee.
alxv··on Joel Spolsky: Lunch
Even Eric Schmidt would go on and on about how "literal" Googlers take everything, how stereotypically engineer-minded they are, basically implying they were incapable of being creative or having vision or social skills.

Do you realize the hypocrisy of what you are saying? You criticizes that taking things literally is bad by taking Schmidt's comments literally.

alxv··on Microsoft confirms IE10 won't run on Vista, millions of IE9 users shrug
The name "Konqueror" is a reference to the two primary competitors at the time of the browser's first release: "first comes the Navigator, then Explorer, and then the Konqueror"

-- From Wikipedia, http://en.wikipedia.org/wiki/Konqueror

alxv··on Here's the Email That Could Cost Mark Zuckerberg Half of Facebook
Uh, what!?
alxv··on Non-blocking IO isn't necessarily faster (at least in Java) [pdf]
What it means to be "faster"? Is it having a higher I/O throughput? Or, is it having a lower latency on the 95th or 98th percentile?

Also, the slides give little information about scalability of the two models. From what I know, the performance of non-blocking I/O should degrades more gracefully in presence of high concurrency. I would have liked to see some numbers about that.

alxv··on Facebook makes HipHop for PHP open source
According to the Unladen Swallow's team [1], LLVM's "just-in-time infrastructure was relatively untested and buggy" when they started working with it. So, I think not using LLVM was a pragmatic decision. In addition, debugging C++ code is much easier than dealing with intricacies of dynamically generated machine code.

[1]: http://www.python.org/dev/peps/pep-3146/#performance-retrosp...

alxv··on Evolution of a Python programmer
Functional programmer:

    import operator
    def factorial(n):
        return reduce(operator.mul, xrange(1, n+1), 1)
    print factorial(6)
Cutting-edge programmer:

   import math
   print(math.factorial(6))
alxv··on Using WIP branches to save every edit
A custom daemon would be great, but meanwhile you could use inotify-tools from the shell:

  while inotifywait -r -e modify .
  do
    git wip save "automatic save"
  done
alxv··on Please review beewulf.com
Not useful for me. I would prefer to use the command-line over your service, if I wanted to know the server running a site.

    beewulf() { curl -s -I $1 | grep Server: }
alxv··on Cliff Click checking in
Indeed!

http://blogs.azulsystems.com/cliff/2008/11/a-brief-conversat...

alxv··on Python 2.7 alpha 1
The dictionary implementation of Python is a hash table using open addressing with quadratic probing. Deletion is essentially a lookup to replace the key with a tombstone. And, the table is never resized after a deletion.

So yes, the whole operation is O(1) on average.

alxv··on Python 2.7 alpha 1
I am not sure why you think deletion has to be O(log n), but can assure you that it is O(1). Of course, this is assuming you consider a hash table lookup to take constant time. If that can help, this is implementation of deletion for the OrderedDict collection:

     def __delitem__(self, key):
         'od.__delitem__(y) <==> del od[y]'
         # Deleting an existing item uses self.__map to find the link which is
         # then removed by updating the links in the predecessor and successor nodes.
         dict.__delitem__(self, key)
         link = self.__map.pop(key)
         link.prev.next = link.next
         link.next.prev = link.prev
alxv··on Joe Armstrong: "In my opinion Erlang is brilliant at handling text"
The cited benchmark is completely bogus.

The benchmark compares the different implementations based a single trivial regular expression: /indecipherable|undecipherable/. You simply cannot claim a regex engine is faster than another with such a poor experiment. It is evident that Boyer–Moore string search algorithm will outshine any engine on that regular expression.

alxv··on Joe Armstrong: "In my opinion Erlang is brilliant at handling text"
But that tells us nothing about the quality of Erlang's Unicode support. Is it easy in Erlang to encode a string to its UTF-8 or Latin-1 representation and vice-versa? Are there utilities in Erlang to check whether a character is a punctuation symbol, a letter or a digit? Are there utilities to normalize Unicode strings? This one is important if you need to compare two strings.

Sorry if I sound a bit pedantic, but there is a lot more to good Unicode support than using wide characters.

alxv··on Perl Cannot Be Parsed: A Formal Proof
Conversely, automatic indentation requires syntactic analysis.
alxv··on Bizarre theory suggests time may be running out (2007)
But to an observer, a "longer" meter is sill a meter.
alxv··on Ask HN: Independent Math Study
> I would also suggest picking up a Number Theory or Combinatorics text; they're practically useless

Useless? I dear to say that number theory is currently the most lucrative field of mathematics. Without number theory, modern day cryptography would not exist and thus everything that depends on secure communication of information would not exist. So forget about commerce over the Internet, bank wire transfers, credit cards, administrating computers remotely and, most importantly, hiding your huge porn collection from your wife.

And, combinatorics is useful for the study of algorithms. It is pretty much the foundation of computer science.

alxv··on Generating pseudo random text with Markov chains using Python
In "The Practice of Programming", Brian Kernighan and Rob Pike use the Markov Chain Algorithm to illustrate a number of lessons about software design and implementation. I used it as my "Hello world" program when learning a new programming language.

In Python, the implementation is surprisingly succinct:

    import sys
    import random
    import collections

    MAXGEN = 10000
    NONWORD = ""
    suffixchain = collections.defaultdict(list)

    w1 = w2 = NONWORD
    for line in sys.stdin:
        for word in line.split():
            suffixchain[(w1, w2)].append(word)
            w1, w2 = w2, word
    suffixchain[(w1, w2)].append(NONWORD)

    w1 = w2 = NONWORD
    for i in range(MAXGEN):
        suffixes = suffixchain[(w1, w2)]
        next = random.choice(suffixes)
        if next is NONWORD:
            break
        print next,
        w1, w2 = w2, next
To use it, just run:

  $ python markov.py < english_corpus.txt
alxv··on Python-Daemon - Library to implement a well-behaved Unix daemon process.
Richard Stevens's "Advanced Programming in the UNIX Environment" has a chapter dedicated to how to write well-behaved daemons. The book is a great investment if you are doing any kind of UNIX programming; I highly recommend it.
alxv··on Facebook founder finds a way to profit from its members' private data
This is futile, since they can keep previous versions of your data. In fact, this is stated explicitly in Facebook's privacy policy:

"When you update information, we usually keep a backup copy of the prior version for a reasonable period of time to enable reversion to the prior version of that information."

alxv··on Haskell logo redesign
Perhaps you are right that for most people the logo is meaningless. However, I find it looks like a fusion of >>= (Haskell's binding operator) and λ (the symbol of functional programming).
alxv··on Stress impairs cognitive functions - The loss of those functions can explain why programming is hard
See? I read that both forms are translated to * (c + n), which explains the equivalence. Weird, no?

Well, that surely is evil, yet perfectly valid C code. But personally, I don't find it surprising. Of course, you need to grok what A[n] really is -- i.e., syntactic sugar for *(A + n), as you just explained.

← PreviousPage 2 of 3Next →