HNHacker News
TopNewBestAskShowJobs

it

715 karma · joined August 9, 2009

http://github.com/ijt
submissionscomments
it··on Rich Hickey: Deconstructing the Database
If you want to be conservative about your data, it looks like Datomic is an excellent choice. It preserves the entire history of your data instead of allowing it to be modified in place.
it··on What's with this anti-directory structure movement?
It's not so much that folders are counter-intuitive. The problem with them is that they impose a single, arbitrary structure on files that could be organized in many different ways. For example, you could have folders like AllMyImages/ or AllMyCatImages/ or CatImagesJuly2012/ but there's no way to anticipate what will be the most useful directory structure for all future situations. It would be more flexible and useful to have indexes over the files that let you dynamically organize your content according to attributes such as contains-cats, date, is-image, author, etc.
it··on Zsh 5.0 released
Yes, I was using oh-my-zsh. I'd like to try it again if it's easy to make it non-slow.
it··on Fay -- A proper subset of Haskell that compiles to Javascript
This is great. Now Haskellers can not only develop in a single language on the browser and server, but it looks like this could make it possible to leverage existing Node.js code on the server side. chrisdone, is there anything more that needs to be done to support using Node modules?
it··on Fay -- A proper subset of Haskell that compiles to Javascript
Not everyone agrees on what it means for a programming language to be proper, and that's unlikely to change.
it··on Zsh 5.0 released
I liked zsh a lot until I found that it would take a long time to cd into certain directories, I think they were ones with large git repositories. Maybe there's some way to shut that off but I went back to bash where I could be sure things would be responsive.
it··on No, that's not why OO sucks
I bash it not because I don't know how to use it but because I see if being used so often for jobs that would be better done using other techniques.
it··on Joe Armstrong: Why OO Sucks
If you try to do your entire program as pure FP then I guess that is true, but it's often possible and beneficial to do a lot of the work in a functional style.

Honestly though, this misses the point. If your language forces you to use an unsuitable paradigm, it's time to use another language if you can.

it··on Joe Armstrong: Why OO Sucks
If we fail to point out the harmful effects of excessive OO usage then there is a higher likelihood of encountering it as legacy code written by people who didn't know any better. This can lead to wasted time and decreased job satisfaction.
it··on Joe Armstrong: Why OO Sucks
The problem is that OO thinking tends to inflate systems, spreading code all over the place even though it logically belongs in one place and adding object wrappers to things that don't need it. In my experience taking over Python code written by Java developers, I can usually shrink their OO code and make it more reliable by refactoring it into conceptually equivalent functional code wherever it makes sense and falling back on procedural style where appropriate.
it··on Joe Armstrong: Why OO Sucks
It is possible in principle to implement one in terms of the other, but in practice this is not what typically happens.
it··on Microsoft’s Downfall: Inside the Cannibalistic Culture That Felled a Tech Giant
Also, if you are working on a team then the incentives should be based on team performance, not individual performance. You get what you reward.
it··on Shall We Use Clojure?
I really like Clojure as a language, but the JVM implementation takes over a second to start. This lack of responsiveness makes it a poor choice for many small scripts that should run quickly. If not for this issue, I would probably use Clojure on a regular basis.
it··on Less is exponentially more
I know it's a common saying, but I've never understood how exceptions can prove rules.
it··on C vs GO
You can shut off the GC in Go:

  import "runtime"

  ...

  runtime.MemStats.EnableGC = false
https://groups.google.com/forum/?fromgroups#!topic/golang-nu...
it··on Why multi-armed bandit algorithm is not "better" than A/B testing
Maybe a better way to do the exploitation phase would be to sample from the different choices with probabilities proportional to their expected payoff instead of just choosing the one with maximum expected payoff.
it··on Entrepreneurs Shouldn't Pitch Their Ideas To Venture Capitalists
Apparently they are not. The author says lots of people keep trying to keep pitching the idea even after they are asked why their team is a good bet.
it··on The secret guild of Silicon Valley
This article would have been more convincing if it had some examples of Guild members, even if it's not meant literally. So it's a story. OK, then go with that and make some people up.
it··on Why Use Postgres
On the other hand, SQL lets you write concise and efficient queries that run without lots of round-trips between the db and whatever machine you're accessing it from. ORMs force you to write less expressive code that is less efficient, hardly a winning combination.
it··on Show HN: Imagine a search engine that removed top million sites from its index
I really like this. Right away I found some new sites about that I hadn't seen before with interesting content.
it··on A micro-manual for lisp implemented in go-lang
Looks like I'm not the only one working on this. A couple of days ago I forked a Lispy language in Go called Kakapo. Yesterday I added goroutines, channels and macros.

https://github.com/ijt/kakapo

it··on ClojureScript Lua backend
Given the long start times in Clojure due to the JVM, it's nice to see it being ported to other back-ends that start quickly.
it··on Show HN: Meteor, a realtime JavaScript framework
This looks similar to another project being worked on by a friend of mine: http://objectfabric.com. A couple of big differences are that ObjectFabric is implemented in Java, and it is supposed to support secure authentication.

Edit: Looking a bit more, I noticed that ObjectFabric doesn't yet support JavaScript directly, only through GWT.

it··on PHP Sucks, But It Doesn't Matter
The article claims that YouTube is written in PHP. As someone who worked there, I can tell you it's not. YouTube is written mostly in Python plus some Go. Some of it is a mess, but that's beside the point.
it··on Haskell as fast as C: working at a high altitude for low level performance
I tried to reproduce the results, but the Haskell bit failed to compile on my Mac with the -fvia-C flag. Without the -fvia-C flag, the Haskell version takes about 11 times as long to run as the C version. A simple Go version runs at the same speed as the C version.

I posted some code to run the comparison at https://github.com/ijt/fast-as-c-article. Here are the results:

    [ issactrotts ~/haskell/fast-as-c-article ] ./compare
    == cmean ==
    gcc -O2 -o cmean cmean.c
    mean: 500000000.500000

    real    0m0.774s
    user    0m0.770s
    sys 0m0.002s
    == gomean ==
    6g gomean.go
    6l -o gomean gomean.6
    mean: 500000000.500000

    real    0m0.776s
    user    0m0.769s
    sys 0m0.003s
    == hsmean ==
    ghc -O2 hsmean.hs -optc-O2 -fvia-C --make
    [1 of 1] Compiling Main             ( hsmean.hs, hsmean.o )
    In file included from /usr/local/Cellar/ghc/7.0.4/lib/ghc-7.0.4/include/Stg.h:230,

                     from /var/folders/g2/ylbqfw5533n65z6qkxljg0_h0000gn/T/ghc23078_0/ghc23078_0.hc:3:0:
     

    /usr/local/Cellar/ghc/7.0.4/lib/ghc-7.0.4/include/stg/Regs.h:177:0:
         sorry, unimplemented: LLVM cannot handle register variable ‘R1’, report a bug
    make: *** [hsmean] Error 1
    == hsmean_nollvm ==
    ghc -O2 hsmean.hs -optc-O2 --make -o hsmean_nollvm
    [1 of 1] Compiling Main             ( hsmean.hs, hsmean.o )
    Linking hsmean_nollvm ...
    ld: warning: could not create compact unwind for .LFB3: non-standard register 5 being saved in prolog
    mean: 500000000.067109

    real    0m8.886s
    user    0m8.863s
    sys 0m0.018s
it··on Vortex radio waves could boost wireless capacity “infinitely”
The antenna reminds me of branch cuts in complex analysis. I suspect there is a connection here.

http://en.wikipedia.org/wiki/Branch_point#Branch_cuts

it··on Why I love Common Lisp and hate Java, part II – code examples
It can be written more concisely with fold.

  $ ghci
  Prelude> let getFromList ls pred = foldl (\x y -> if x `pred` y then x else y) (head ls) (tail ls)
  Prelude> getFromList [1..10] (<)
  1
  Prelude> getFromList [1..10] (>)
  10
it··on Why 37signals Doesn't Hire Programmers Based on Brainteasers
Here's a shorter version:

  fizzbuzz x | x `mod` 3 == 0 && x `mod` 5 == 0 = "FizzBuzz"
             | x `mod` 3 == 0 = "Fizz"
             | x `mod` 5 == 0 = "Buzz"
             | otherwise = show x

  main = putStr $ unlines $ map fizzbuzz [1..100]
it··on Why 37signals Doesn't Hire Programmers Based on Brainteasers
Here's a way to do it in Haskell:

let step row = zipWith (+) (0:row) (row++[0])

let triangle = iterate step [1]

take 10 triangle

← PreviousPage 6 of 6