HNHacker News
TopNewBestAskShowJobs

calvins

104 karma · joined May 31, 2008

submissionscomments
calvins··on Ask HN: Best Linux/dev laptop as of October 2015?
I've been using a Samsung Series 9 (http://www.amazon.com/gp/product/B0082PZ1JU) with Linux for about three years and I've been very happy with the laptop.

All the special function keys work, battery life is good, sleep works, etc. The only imperfection is that after I close the lid and it goes to sleep, when I reopen it, it forgets that I've disabled the trackpad, so I have to press the function button that disables the trackpad each time it comes back from sleep (I use an external mouse).

calvins··on Why there is something rather than nothing – The finite, infinite and eternal [pdf]
A third option: existence is not a concept that can be used with the spatio-temporal totality that is the universe. Just as there are syntactically correct but meaningless sentences such as "colourless green ideas sleep furiously", there are ideas such as "the universe came into existence" and "the universe always existed" that are "syntactically correct" (according to some unspecified syntax that governs concept formation) but don't pick out meaningful concepts.
calvins··on Ask HN: What is your Linux distro of choice?
CentOS for servers, and Ubuntu for desktop.
calvins··on Tea with strangers
This sounded interesting to me when I first loaded the page and imagined it was talking about virtual tea: me sipping tea at home while typing/conversing live with a random person halfway around the world.

Is there such a thing? Turns out there are quite a few, as I just discovered with a quick search. Any HN readers have good experiences with any of them?

I just tried one briefly, and had a string of disconnects after just 'hello', and then one that didn't want to reveal the country they currently live in, after which I gave up.

calvins··on Circuit: A Minimal Distributed Programmatic OS written in Go
I operate systems myself, but that doesn't make me an operating system.
calvins··on StackOverflow Considered Harmful?
"Considered harmful" considered harmful ;-)
calvins··on I have no idea what I'm doing
Interesting, and reminiscent of what Douglas Hofstadter has called Sphexishness <http://www.personalityresearch.org/evolutionary/sphexishness...
calvins··on Show HN: PyScribe – A Python library to make print debugging more efficient
I noticed a couple of minor issues and thought I'd post them here rather than making issues on github since the author is reading.

First, desugaring doesn't treat the shebang line of a file properly for executable python scripts on Linux. If the first line is, for example, '#!/usr/bin/env python', then the desugared file has three imports at the top of the file and the shebang line after those imports. It would be nice to preserve the shebang line as the first line (and maybe also to make the desugared file executable if the input file was executable).

Second, the desugaring doesn't ignore commented out lines, as I discovered on commenting out a line like

    #ps.p("my test: " + foo)
before noticing the optional label parameter. Trying to run a file with that line or desugar it results in an IndexError.
calvins··on C++ Filesystem Technical Specification approved by ISO
That's not about path manipulation. It's about resizing the hash table that is required for keeping track of hard links when copying hundreds of millions of files using cp. The path manipulation that cp does would still be inconsequential in that example.
calvins··on Magnus Carlsen – “I am chaotic and lazy” (2010)
Yes, I agree with dmurray that it shouldn't happen consistently. I haven't seen it, and I've found the ratings system to work really well in practice. I'm roughly an intermediate level player, so can't speak to lower levels in particular, but I've never heard anybody complain about not being able to find competitive games against others with comparable ratings.

The only times that happens as far as I know are when the rating really doesn't reflect the current skill, which can happen over the board with juniors that are improving so quickly that their rating hasn't caught up yet, or people who haven't yet played enough games for the rating to be accurate (e.g., a brand new account on a site that starts with a rating of 1200, which is solved by not playing people who haven't played enough games yet).

calvins··on Magnus Carlsen – “I am chaotic and lazy” (2010)
The ratings system in chess is what makes it easy to get a competitive game.

You just have to play a handful of games in order to get a rating (whether in real-life tournaments or online), and then you know that playing somebody with a rating within 100 points of your own rating will usually result in a good game where both sides have chances to win and neither will consistently steamroll the other.

calvins··on We’re All Nerds Now
Obama was elected despite being an intellectual. And I did think of Obama and carefully phrase my statement to account for him. The point stands that intellectual is a dirty word in politics, just like nerd, which wouldn't be the case if we were all becoming nerds.
calvins··on We’re All Nerds Now
Being perceived as an intellectual of any type (nerd or otherwise) still mostly excludes one from public office above a certain level (in the USA, at least). Until that changes, it's difficult to take the idea seriously.
calvins··on My experience with using cp to copy 432 million files (39 TB)
I wasn't suggesting to blindly use a tar pipe for as many files as the OP was trying to address. My main point was that the tar pipe (locally or over ssh) is superior to cp/scp for the sorts of things that many of us do regularly (as discussed elsewhere in this thread), such as copying tens of thousands to low millions of mostly smallish files locally or remotely and wanting to preserve the structure of links and file metadata, and that pax looks like a simpler alternative to the tar pipe that accomplishes the same thing in a single command, although it does still use a hash table internally.

I wonder if using something other than a hash table would be worthwhile for cases like the OP though, or if there is a tool that has that option -- the memory overhead of empty buckets and resizing seem like serious downsides when you're trying to handle as many files as the OP.

calvins··on My experience with using cp to copy 432 million files (39 TB)
I would usually use the tarpipe mentioned already by others for this sort of thing (although I probably wouldn't do 432 million files in one shot):

  (cd $SOURCE && tar cf - .) | (mkdir -p $DEST && cd $DEST && tar xf -)
Another option which I just learned about through reading some links from this thread is pax (http://en.wikipedia.org/wiki/Pax_%28Unix%29), which can do it with just a single process:

  (mkdir -p $DEST && cd $SOURCE && pax -rw . $DEST)
Both will handle hard links fine, but pax may have some advantages in terms of resource usage when processing huge numbers of files and tons of hard links.
calvins··on The Matasano Crypto Challenges
I emailed twice in the last year (many months apart) and got no response either.
calvins··on Emacs and Vim
Agreed. I don't know how anybody could use vi with escape unmapped. It's also very useful outside vi though, since esc is the default 'cancel' key in many cases. For example, most browser dialogs (and keyboard-navigable menus) can be closed with esc, and it works for many desktop dialogs too (at least on Linux).
calvins··on What I mean when I say "I think VR is bad news"
The more things change, the more they stay the same. In the early nineties, there was A Rape in Cyberspace http://www.juliandibbell.com/texts/bungle_vv.html
calvins··on File system that stores location of file in Pi
Even if pi isn't normal, there are plenty of normal numbers to choose from (almost all of the reals are normal, in fact), including some really simple and predictable ones like Champernowne's constant (in base 10: 0.1234567891011121314...) that would support simpler index calculations than pi.
calvins··on File system that stores location of file in Pi
Nah, e is obviously the best transcendental number.

I hope the author's pending patent is limited to pi though, so I can work on ef^H^H. Hmm, I see why maybe the author preferred pi over e.

calvins··on Anti-Patterns in Python Programming
I think only the second is truly bug-free. The first only does what the user expects if they pass in a non-empty list:

  my_list = []
  append_one(my_list)
  # my_list didn't get anything appended to it
This shows up another subtle trap related to the "truthiness" (or falsiness in this case) of things like the empty list.
calvins··on Objects, Identity, and Concept-formation (2008)
"Valid concepts are arrived at by induction."

If the point is to argue that OOP is not a valid concept, the author should show first that 'programming' is a valid concept (using the same definitions) and that there are some related concepts (e.g., 'functional programming') that are valid, because if the same argument can be applied to most or all other '* programming' concepts too (not to mention concepts like 'validity' and 'concept'), then the point is not specific to OOP at all.

Incidentally, http://en.wikipedia.org/wiki/Prototype_theory seems a much better starting point for thinking about concepts in general, and '* programming' in particular.

calvins··on People hate to register, some follow-up thoughts
"Listen to fellow developers" can be very dangerous too. It's how you end up with programs that have menus nested 4 levels deep and thousands of options that will only be used by the developer who recommended/implemented it and a few other people (at huge cost to the other 99% of users).
calvins··on The Heartbleed Bug
It's been patched since, and is no longer vulnerable.
calvins··on The Heartbleed Bug
heartbleed.com itself is still using a vulnerable OpenSSL, according to http://filippo.io/Heartbleed/#heartbleed.com
calvins··on The Book of Graham
Many of the things we all find contentedness through can be purchased with cash. I for one would love to take a multi-year round-the-world trip with my partner, or own a house and a grand piano I could use without having to worry about neighbors. Does that make me a materialistic hedonist?
calvins··on Great books about mathematics
You might enjoy one of the many books that exist for undergraduates to ease the transition into higher math classes, where there is a shift from the strong calculation-focus and rote-learning of most math teaching through calculus, to the more proof-centric and understanding-based approach that one finds in classes like abstract algebra, real and complex analysis, and other post-calculus math courses.

Here are some examples of the kinds of books I mean, and you can find others by following Amazon recommendations from those:

http://www.amazon.com/Nuts-Bolts-Proofs-Fourth-Edition/dp/01... http://www.amazon.com/Mathematical-Proofs-Transition-Advance...

With math textbooks especially, it pays to look for a previous edition, as the current edition can be ridiculously expensive, and the previous edition might be only 20% of the price, with no significant differences between the two.

Also, don't get them for the Kindle, as Amazon doesn't seem capable of publishing a math book with lots of notation that doesn't also have tons of errors where symbols get incorrectly imported. I've bought at least 20 and yet have to see one that didn't have lots of incorrect symbols.

calvins··on Great books about mathematics
This is a wonderful book. A word of caution though: don't get the Kindle version from Amazon. I thought I'd get it for the Kindle, because the print version is huge and I sometimes like to read in bed and don't want to lug the dead tree version I own around, but I had to return it because of the standard problems with garbled notation (some symbols appearing as a square box or some other incorrect symbol) that affects every math book I've ever purchased on Amazon for the Kindle.

There error rate was much lower than in any other math book I've tried, but still much too high.

calvins··on Ask HN: Have you remapped the Caps Lock key? [Poll]
Me too.

I also map Escape to Caps Lock, for the very rare occasion that Caps Lock is actually needed (one a year, maybe). Escape is actually really useful for things other than switching modes in Vim, as it's often the default 'cancel that' binding that closes windows and cancels something you've started.

calvins··on This is what your customers think of asking for their email password
You're saying that it is difficult to educate people, so it doesn't matter if they are taught to do incredibly dangerous things without a second thought. The fact that it is difficult to educate people makes it that much more important that companies like Yelp not do stupid things like this.
← PreviousPage 2 of 3Next →