HNHacker News
TopNewBestAskShowJobs

chancho

961 karma · joined March 12, 2009

submissionscomments
chancho··on Canada beats the U.S.A., and Twitter beats the New York Times
A minute later, at 2:54 p.m., the news was in the Breaking News Twitter feed. Two minutes later, at 2:56 p.m., the New York Times had the news in its Twitter feed, and word of the result buzzed into my phone via the Breaking News app. Three minutes after that, at exactly 2:59 p.m., the NYTimes.com news alert showed up in my email inbox

All of this happened in a span of time shorter than the interval at which most email clients check for new mail. I think the case against NYT here is overstated. And this news was about the outcome of a sporting event which is exactly one bit of information which becomes available at a predictable time. Basically it comes down to who can hit the button faster. When real news happens (a natural disaster, an assassination) it will take at least those few minutes to figure out WTF happened and write it up.

chancho··on Mathematical functions in our environment
> f(x) = 1/3(x^3 + y^3) = 6xy

Pesky algebraic geometry. Get out of my graph!

chancho··on Ask HN: Is it me or does NBC simply not get the whole online thing?
Oh they get it alright: it's a threat. If you're watching it online you're not watching ads run by your local NBC affiliate. The network affiliate business model is a dying model, but it's not going down without a fight.
chancho··on Why has the actor model not succeeded? (1997)
Not sure I would call it "trivial." You just trade your segfault (or NullPointerException) for a pattern match error.

Although that little bit of static typing would probably have dealt with the vast majority of expensive null-pointer bugs.

chancho··on Technological Progress Happens via Simulated Annealing
Except for progress in metallurgy and materials science. That's real annealing.
chancho··on Building a text editor (Part 1): a wxHaskell tutorial
None of them are very satisfying. I've used Gtk2Hs a fair amount, and it is solid. Conceptually it's very similar to the wxHaskell bindings (directly inspired by, if I'm not mistaken.) Of the three major cross-platform toolkits, Gtk+ is the most compatible with Haskell on account of it's C roots. Gtk can be used in a very procedural, not very OO kind of way. Since subclassing in C is such a bitch, Gtk+ is fairly easy to use without doing so: create some widgets, set their callbacks and go. Works fine from the IO monad, and using lambdas for the callbacks makes it actually quite enjoyable to use compared to C or C++ (as I imagine it is from OCaml, Lisp or any other such language.)

Qt on the other hand is very OO. You define the behavior of your widgets by subclassing. There are signals and slots, which are basically callbacks and thus very FP-friendly, but there are many things for which Qt doesn't use them (e.g., input) instead relying on C++ virtual methods. I'm looking over the qtHaskell docs now (which is just a wall-o-type-signatures) and it appears to have some kind of setHandler function for these virtual functions. I have no idea how this is supposed to work. AFAIK qtHaskell is just a one-man project, so it's understandably less mature than Gtk2Hs, considering the huge impedance mismatch between functional/imperative Haskell and OO C++.

As for wxWidgets, I have not used it, but as I understand it's mostly history. The Gtk2Hs team is large, active and contains many luminaries of the Haskell community, so that is where the action is at. Unfortunately though, it's Gtk+, so your "real world" better not have any Windows or Mac users in it.

chancho··on Getting rid of bad teachers
But you do own GM. (I'm assuming you're a US taxpayer.)
chancho··on Is Tenure a Matter of Life or Death?
Could they not find even one STEM professor to comment? A highly biased opinion from this bunch:

"...it is not surprising that the tenure decision is freighted with anxiety. It takes anywhere from 10 to 20 years from entrance into graduate school for the tenure decision to be made. By that point, in their single-minded pursuit of their personal holy grail, most academics have purged themselves of skills that might be useful for the private sector."

Didn't Bishop have a reasonably successful business on the side? Something to do with automating petri dishes and culturing? I can't help but think all these english, history and sociology professors ascribe so much anxiety to tenure because their fields are so poorly valued by the private sector. But in many fields, such as Bishop's, there are plenty of opportunities for PhDs who can't or don't want to go for tenure. If nothing else, you're probably a pretty good coder after completing a STEM PhD. (Hey maybe it's matlab or fortran, but that's a good start.)

chancho··on The R type system
http://1.bp.blogspot.com/_Ut2djuT8OYk/S4VFQBDlAnI/AAAAAAAAOi...
chancho··on Smoking fast Haskell code using GHC's new LLVM codegen
> that can outperform equivalent C

Isn't that a bit like saying that it "can outperform equivalent assembly"?

And why can you not prove the equivalent C correct? After all, you're doing that proof by hand either way. A Haskell compiler will only help you prove that your program is well-typed. If you're mutating buffers then you're in a monad like IO or ST and the the compiler will throw it's hands up and tell you that correctness is entirely your problem.

chancho··on Vook, Maker of Multimedia E-Books, Raises $2.5 Million
Just say it in your head with a Mexican accent.
chancho··on Is America ungovernable?
This sounds like a reasonable explanation for why filibustering is more common, but I don't know that the old way is better. The willingness of our representatives to stay out on the floor past their bedtime and let their voices get hoarse shouldn't really be a qualification for governing. Why not make a filibuster require doing continuous jumping-jacks, or saying you can only filibuster as long as you don't leave the floor to take a leak? It's just silly.
chancho··on At an Academic Pressure Cooker, a Setback Turns Deadly
"Dumbly applying the nearest pop-psych explanation..."

If describing this tragedy as "someone going postal" isn't dumbly applying pop-psych, then I don't know what is.

chancho··on Have you ever tried to sell a diamond?
Girls don't "need" anything except food, water and shelter, but a man who gives her only that won't last very long. A blanket statement like "I would never buy you a diamond" implies "I will vet all your purchases." It's the most un-romantic thing one could possibly say. It sets the tone of the relationship, something like "What you want has to make sense to me before I give it to you."

It sounds quaint and old-fashioned, but a man should give everything to a woman he hopes to marry, and demand nothing in return, without worrying about whether or not it's sensible. It doesn't make sense until you realize that she only wants to do the same for you. She will commit to unconditional satisfaction of your wants, but you have to commit to hers as well, and saying "I would never buy you a diamond" sets up some major conditions.

It's not about the diamond. You can debate the diamond specifically (and btw, the showing-it-off part is where most of the worth lies) and you might win. It's about the debate, about having to discuss her wants in order to decide if they make sense. That is unromance.

chancho··on Average faces are not more attractive. Their skin is just smoother
Mode faces: http://dkpresents.files.wordpress.com/2009/07/2ur9h61.jpg
chancho··on Buy Now, Pay Later (Maybe With Your Allowance)
This is really a great way to keep parents out of the loop, which is great for the kid players and the game, because if I found out my son was spending $3/week on virtual dog food I'd turn off our internet.
chancho··on Did you know Flash doesn't work on 64-bit browsers?
64-bit flash was bumpy at first on Firefox/Linux but it's been stable for at least a year now. I gather it's still in beta? Either way, "apt-get install flashplugin-nonfree" works as you'd expect.
chancho··on MIT PhD student uses MS Paint to showcase CV
Yes this is a great way to weed out all those stodgy kids-movie-and-video-game animation studios.
chancho··on Freenode sucks
> If you value the superficial affectation of politeness over the essential point of what someone is saying, you can shove it.

Surely, in situations like these, even you can understand the value of politeness. You engineered politeness into the bittorrent protocol (tit for tat.) It's the same thing. The admin wasn't being useless and patronizing, he was choking you because you were acting like a bad peer.

chancho··on BBC News - Sceptics stage homeopathy 'overdose' to discredit drugs
Reposting awesome comment from Astro Zombie on the Metafilter thread about this:

"This experiment was already attempted by the daughter of Billy Joel and Christie Brinkley, who downed a handful of sleeping pills in a suicide attempt in December. However, the pills were homoepathic, so not only did she not manage to kill herself, but she didn't even manage to get a good night's sleep."

http://www.metafilter.com/88593/Dont-drink-the-extremely-dil...

chancho··on BBC News - Sceptics stage homeopathy 'overdose' to discredit drugs
And it's getting better.

http://www.wired.com/medtech/drugs/magazine/17-09/ff_placebo...

chancho··on MIT develops algorithms to "solve" non-linear systems as sum of squares
I know this post is about Parrilo but I would just like to point out that Jesus De Loera (co-author of linked paper) is awesome.

Favorite paper: minimal tetrahedralization of a convex polyhedron is NP-hard. http://arxiv.org/PS_cache/math/pdf/0012/0012177v1.pdf

http://www.math.ucdavis.edu/~deloera/RECENT_WORK/recent.html

chancho··on Installing Firefox 3.6: One more reason Linux isn't ready for prime time
Poor Linux distros. They try so hard. Nobody ever makes installers for Linux software (they don't even provide binaries unless it costs $1000+.) So the distros do their best to compile, test and maintain neat, orderly package repositories that won't vomit all over your filesystem and don't have tons of bugs and backdoors. And for this they are chastised, because it takes time to prepare a release. Meanwhile, Apple can take their sweet time with App Store approval, reject anything they want, not even give you the _option_ of installing things the hard way, and for this they are applauded. Clearly what Linux needs is more shiny buttons and less freedom.
chancho··on Installing Firefox 3.6: One more reason Linux isn't ready for prime time
Waste of bits. The article, the comments, all of it. You owe me $0.003 of electricity, ilamont.
chancho··on Why Can’t the I.R.S. Help Fill in the Blanks?
But this is just for things like W2s and 1099s. When the party providing you income (employer, bank, etc.) sends one to the IRS they also send a copy to you. Only idiots try to cheat the IRS by lying about what these forms say. This isn't to say it doesn't work some of them time (I forgot to report the redemption of a bond once and never heard about it, but I'm poor.) But I have a hard time believing this makes up a significant fraction of the total revenue lost to tax fraud. If people get away with it that's probably because the IRS have bigger fish to fry among all the money changing hands that isn't reported on such forms.

Anyway, this is not how law and order is supposed to work in a civilized society. You don't bait morons into breaking the law by fooling them into thinking they won't get caught. For every potential cheat who looks at this info and says "Aha! They don't know about the dividends from my Acme shares! Cha-ching!" there are probably more who will be dissuaded from cheating because they'll realize that, oh yeah, my bank sent a copy to the IRS as well. Or better yet, people will be prevented from _accidentally_ omitting income and having to go through an audit, which is a net win. (I sure as hell would have reported that bond.)

chancho··on The coming U.S. population boom will bring new economic vitality
Although I mostly agree with you, what are some examples of economies that suffered as a result of overpopulation? China and India seem to be doing fine. I mean, it seems obvious that the wave has to break but I just don't think we've seen it happen yet so it's hard to predict. (Not a history buff so maybe I'm missing something obvious.)
chancho··on Amplifying C
I've not debugged Lua but I am familiar with it's integration into C. I imagine debugging Lua+C is no harder than debugging Matlab+C. You load up the REPL in GDB and set your C breakpoints in GDB and your Lua breakpoints in Lua. After control leaves your C function and goes back into the REPL's guts just hit 'continue' to return to the REPL command line. It's more laborious but still straightforward. The only thing you really can't do is step from the high level language to the low one but you can set the proper breakpoint in GDB right before the call so it's more or less the same.

-----

Edit: sorry not sure if you were talking about Lua or a C-based Scheme, though I imagine it's the same.

chancho··on Debunking Dvorak vs QWERTY myths
> Dvorak favours the right hand by 14% (QWERTY favours left by 15%). Dvorak has more uniform finger usage and makes greater use of the pinky (18% vs QWERTY's 10%).

I find that writing code, my right pinky is by far the most overworked finger, on account of the ; ' " [ ] { } - _ = and + characters, and especially the return key which you hit all the time in code but only once per paragraph in prose. So now I can shake off this nagging feeling that I should look into Dvorak. Thanks.

chancho··on Love for LuaJIT
> Lua gives you raw C numeric types

Standard Lua (the one from PUC-Rio) doesn't really, it uses boxed numeric values, as I imagine ruby (and almost every other dynamic language) does as well. "Boxed" meaning that each number is stored on the heap with some kind of tag, and when you pass such a value to a function you're really passing a pointer to it and that indirection costs cycles and puts pressure on the cache. LuaJIT's most significant (IMO) feature is that it stores numeric values directly, like C does, so when you call a function the actual bits representing it go right on the stack, not the address of where the bits can be found, and it uses some cool tricks of floating point representation to prevent the garbage collector from trying to follow these stack values as if they were pointers. This (combined with the trace optimization) is why when you write a numeric for-loop in LuaJIT it runs (nearly?) as fast a C.

chancho··on Love for LuaJIT
...well, almost everything.
← PreviousPage 5 of 11Next →