HNHacker News
TopNewBestAskShowJobs

csl

833 karma · joined July 19, 2008

submissionscomments
csl··on (x / 2) or (x >> 1)?
Thanks for this. It's not the 90s anymore, that's for sure.

I just tried my age-old adage of doing bit shifts and adds instead of multiplications. Turns out that's slower on an i7!

The cool thing is that llvm-g++ actually recognizes my bad hand-optimization on -O3 and fixes it.

Code at https://gist.github.com/2896137

csl··on Combinator birds in Clojure
A relevant read is To Dissect a Mockingbird: A Graphical Notation for the Lambda Calculus with Animated Reduction at http://dkeenan.com/Lambda/index.htm
csl··on Thoughts on R7RS
That would be the case. Some people were unhappy with R6RS not keeping Scheme a minimal language anymore.

Now they're making one "small" Scheme and one "big" Scheme. That's a good thing because they can actively decide what to put in the big version (full numeric tower, e.g.) and what to put in the small language (e.g. a standardized module system).

csl··on Why is C faster than Java: git vs JGit
Any decent textbook on databases would cover most of this, with the possible exception of parsing SQL. It will likely have an in-depth discussion of data structures to reduce disk access.

I strongly recommend you read one such book more or less end-to-end.

HN: As with other areas of computer science, there is often a "canonical" book, like TAOCP or CLRS on algorithms. Is there any such book for databases?

csl··on How Chicken Scheme compiles to C
Most of this sounds like a _very_ big bag of hefty tricks. Closure conversion, lambda lifting, escape analysis and allocating on the stack, partial evaluation, etc.

Maybe there are more clues over at https://engineering.purdue.edu/~qobi/papers.html

csl··on How Chicken Scheme compiles to C
To be completely honest, I'm reading Queinnec's book at the moment, and don't know the others first hand. They're just on my reading list.

Lisp in small pieces is a fantastic book for Lisp implementers. It starts off with a simple eval and then increases in scope and complexity. It's very complete. You can see the contents in PDF here: http://assets.cambridge.org/97805215/45662/toc/9780521545662...

Allen's book is considered a definite classic, though, and has a sizeable (and perhaps, aging?) fan base.

csl··on How Chicken Scheme compiles to C
Nice writeup on their use of the Cheney Trampoline. As is always the case in such discussions, I'll mention these three fine books for Scheme implementers:

* Lisp in small pieces, by Christian Queinnec

* Compiling with continuations, by Andrew Appel

* Anatomy of Lisp, by John Allen

csl··on Hacker News Needs Honeypots
PG, what about coding up the thing, marking a few articles in the archive as "honeypot articles", then rerender the site (locally) and see how it performs?
csl··on Run old games in DOSBox in the browser
So, Native Client allows you to run out-of-process, sandboxed, _native_ code in Chrome.

Does that mean that the server needs to serve precompiled executables to visitors with different operating systems?

csl··on Spotify launches in the US
Here are some invites:

  czkDabFHu7D2F75Z
  e9urZw7CX6hq788t
  cef8MEp9YmUq5YdB
  epq4ATHmW4LMDRH7
  dfxBMdYsnLXeYtVk
  fDLkq2PU6qwFaZSR
  bNF5Ryq7xBddVr7a
  axpxx3axYK3D4M2R
  eMxWZYLNFfMsDTWT
  bFzczHM7bLe2xE7e
  c3DFEP6uL6n5Z4zA
  bZrG7LcUnbGeuFgy
  cMe2tK5ycNnSDqJx
  ehR9LrHPVV4HTwPH
  e4Zar8gffdVKwegE
  bMBz5nNRr5BZW8h4
  aug8Faukh7VVRmEM
  bZkqpWZ8hgFkfVXZ
  e56H5X8bDD7dEWME
  awURKwJDCPLDkncd
  fC3KV4npMre6Thwq
  daCc2AfVzaXxp9V4
  fmN6XSRSByu26n96
  bMmcxU2sW27MaEGB
  fzLXB4yM4gEm4aNK
  dWgYdbMRkw6XJBGb
  bZsYepMNTByHgrzU
  chPwyJHwMuD78P6r
  eyEwweJ72dMff6gE
  dZRU6TkaMK8Y3S6z
  aVRC52a3DR3b3G2z
  bmDdpBWAy4pJRRU2
Says they should work in the US as well.

Edit: Wow, that was quick. 24 invites used already! :)

csl··on How long does it take to install and try Quicklisp? (a gif screencast)
Off-topic; how did you make the screencast?
csl··on Amb in JavaScript
Here is a nice paper on how to prune the execution tree when using amb: Non-deterministic lisp with dependency-directed backtracking; http://www.aaai.org/Papers/AAAI/1987/AAAI87-011.pdf

I've not played much with amb or Prolog, but it would be cool to try out some alternative strategies for exhausting the search tree, perhaps simulated annealing or something like that.

csl··on Google, Facebook take France to court over privacy
Is this specific to France, or a case of the EU data retention directive? (Which basically requires storing all calls you make, your position, your surfing history and email headers)

More info: http://en.wikipedia.org/wiki/Telecommunications_data_retenti...

csl··on Interesting photos from Google Street View
The man behind the montage has written an interesting essay about it, providing background information on the project. The images seem to be real.

http://www.artfagcity.com/2009/08/12/img-mgmt-the-nine-eyes-...

csl··on Take the Autism Quotient Test
Background information: https://secure.wikimedia.org/wikipedia/en/wiki/Autism_Spectr...
csl··on Which programming book you just couldn’t stop reading from start to end?
Two programming books that I actually did read cover to cover was:

- Skiena's Algorithm Design Manual. Lively presentation of standard algorithms, with some very fun war stories thrown in. I found it a lighter read than CLRS and TAOCP (those are books you study).

- Segaran's Programming collective intelligence. Quick paced introduction to data mining in Python. The code in the book is very informal but easy to understand.

I read The Little Schemer in three or four sit-downs. (I think the author advises not to read it in one sitting.)

csl··on Study: Traffic lights should respond to cars, not the other way around
Those metal detectors 6 feet from the light post? This system seems to ensure that entire columns of cars can flow nicely through several intersections.
csl··on Books that will Substitute for a Computer Science Degree
The Turing Omnibus leisurely covers a broad range of important and often forgotten topics. It's a great book. It will give you a good overview of CS, and then you can go deep at your choosing with other books.

I loved the first chapters in Bentley, but then I thought the novelty wore down. Maybe I'll take a new look at it too.

csl··on Books that will Substitute for a Computer Science Degree
Agreed. I think you could substitute a degree if you work through most books required for it.

After dropping out of mathematics, CS and physics studies (big mistake there), I've been working as a programmer for 10 years. But I routinely check out the curriculum at Universities to update my bookshelf. The problem is that while I will gladly work my way through SICP or CLRS, stuff like math books are different.

I often intend to work through math books (meaning: solving the exercises and working through the proofs), but this is a lot more motivational when you know you need to pass an exam in the end.

csl··on College Grads, Here’s How to Become Millionaires
I can understand this if I invest in something like an index fund, which is updated regularly to reflect a particular stock market. But it doesn't help if I invest in companies X, Y and Z. They might go bankrupt, in which I will lose my money completely.
csl··on Google acquires Metaweb (Freebase)
It's even more -- you can do really cool queries with the data. E.g., ask for all people linked less than three degrees of separation from PG and whose ages are between 20 and 40 (as a rather lame example).

I do hope Google will do something cool with this acquisition.

csl··on Apple’s Antenna Design and Test Labs
This will happen: http://media.giantbomb.com/uploads/1/17166/757587-yowch1_sup... (for some reason, I immediately thought about Prince of Persia)
csl··on Show HN: HackerNewsers,com, find other hackers near you
Guess it's ok as long as you need to be registered. Great site, by the way!
csl··on Show HN: HackerNewsers,com, find other hackers near you
If you need to know this in the future, check out BuiltWith: http://builtwith.com/hackernewsers.com
csl··on Show HN: HackerNewsers,com, find other hackers near you
Suggestion: Can you please require (re)CAPTCHA or similar when sending mail to people?
csl··on The Feynman Algorithm
You're lucky! I'll never get the same innate ability for problem solving, but what I'm hoping is that it's actually possible to train my brain towards such spontaneity.

E.g., by spending time to solve a lot of challenging puzzles over a long period of time. It's like when you try to remember a shopping list by visualizing the items. After repeating the items enough times, you don't visualize the list anymore; you just know it.

csl··on My Google Interview
I think ITA's job screening process is quite nice: Post an interesting puzzle and ask anyone to submit answers. Spend as much time on it as you wish.

Their puzzle archive: http://www.itasoftware.com/careers/puzzle_archive.html?catid...

csl··on HN yellow pages (Google docs)
> and find IRC a little cold.

Are there any HN IRC channels? It'd be great to actually get to know some HN people.

csl··on Ask HN: How many people here use iPad?
Bought one about a month ago in France. Use it for browsing everywhere a laptop isn't comfortable (while eating breakfast, while cooking, in bed, etc). I absolutely love it!

It dawned on me that in the near future, people won't buy laptops and ordinary computers. They'll buy devices like the iPad. Only developers will use PCs.

Also, don't underestimate the "future factor" when using an iPad. It might sound a bit funny, but when I use the iPad I feel like I'm actually in the future that I imagined when I was a kid. I mean, it was only a few years ago that I saw THE INCREDIBLES and the hero got an iPad like mail -- I thought that looked awesome. Now I've got one in my hands.

I'd absolutely buy an iPad again. In fact, when it's released in Norway, I might get an additional 3G version.

csl··on My Job Interview at Google
Ok, just to limit my embarrassment, I've implemented an alternative solution -- though not as good as the others.

First convert rand5() to rand2(). The LSB from rand5() has a uniform distribution for the integers 0--3:

    int rand2()
    {
        int n = rand5();
        return n!=4 ? n & 1 : rand2();
    }
Now we simply build a three bit number:

    int rand7()
    {
        int n = rand2();
        n |= rand2() << 1;
        n |= rand2() << 2;
        return n;
    }
This gives the proper distribution as well, but it's not branch free, so really nothing new here.
← PreviousPage 5 of 6Next →