HNHacker News
TopNewBestAskShowJobs

tibbe

335 karma · joined June 14, 2007

submissionscomments
tibbe··on Announcing LTS Haskell 1.0
The core set of packages (e.g. those in the platform) tend to not break backwards compatibility, but you're right that there are still packages that move fast and do.
tibbe··on I've never seen a language's style guide recommend avoiding comments before
Note that this isn't the "official" Haskell style guide. We don't have one (although we probably shouldn't). This is one of the competing guides out there.
tibbe··on Summer of Programming Languages
There are cases you cannot really exclude by testing. For example, guaranteeing that certain function never receives a null value.
tibbe··on Why Lisp is a Big Hack and Haskell is Doomed to Succeed (2011)
You can connect to the run-time system e.g. using the ekg package.
tibbe··on Expanding Context in Diffs
Aren't they complimentary? You can have a side-by-side diff without the extra context this change introduces.

That said, I also want side-by-side diffs. They're necessary for more complex diffs.

tibbe··on Repobuild – Declarative-style build system, like Google Build
More likely Go's build system is influenced by Google's build system, which came first.
tibbe··on Which hashing algorithm is best for uniqueness and speed?
Until recently I don't think any major hash table implementation (e.g. not Java, STL, Python, Ruby, etc) used a cryptographically secure hashing algorithm. They're just too slow. Slow enough that you might as well use a tree-based data structure, which doesn't suffer from hash-collision based attacks.

This is changing a bit now when SipHash is available. Unfortunately SipHash still is a bit too slow and forces an uncomfortable trade-off.

tibbe··on Which hashing algorithm is best for uniqueness and speed?
The original question asked for

> Example (good) uses include hash dictionaries.

which I interpret as meaning hash tables or similar. If so hash function performance matters a lot, especially for short strings.

tibbe··on Which hashing algorithm is best for uniqueness and speed?
If someone could run smhasher for the hash functions in the original article (and perhaps also MurmurHash 2/3) and summarize the result for the small key sizes I will give them a cookie.
tibbe··on Y Combinator Opens A Satellite Office In SF
Driving really hurts standard of living, at least for me.
tibbe··on GitHub announces 3D File Diffs
Can we have side-by-side diffs of code first, please?
tibbe··on Integer Hash Function (1997)
We tried this hash function for a while as the standard hash function for `Int`s in Haskell and real world performance was worse than when using the identity function. I'd like the author to back up the statement that the better distribution actually helps on real examples.
tibbe··on Why Maybe Is Better Than Null
They are pretty rare. Very few functions actually want to use nullable-arguments. Another reason why nullable by default is a bad idea.
tibbe··on A new era begins for Haskell
Haskell Prime is not like Python 3 in the sense that there are very few (and no in practice) breaking changes to the language. Haskell Prime standardizes stuff that's already there.
tibbe··on Leaving Microsoft
According to Bryan O'Sullivan (bos) he will use Haskell at Facebook.

http://www.reddit.com/r/haskell/comments/13m8eu/haskell_leav...

tibbe··on Escape from Callback Hell: Callbacks are the modern goto
This excuse is as old as programming languages.

* Programmers who need a higher level language (e.g. C instead of assembly) are just bad programmers.

* Programmers who can't manage manual memory allocation are just bad programmers.

* etc

tibbe··on Haskell Is Exceptionally Unsafe
I would say `unsafePerformIO` exist for calling C code. Since the Haskell type system can't prove that the C function you're calling is pure, the programmer needs to assert this fact by using `unsafePerformIO` at the call site. There are other possible uses of course, but I'd say this is the main one.
tibbe··on GHC's new cutting-edge dataflow-based code generator
The GHC Commentary contains a wealth of information: http://hackage.haskell.org/trac/ghc/wiki/Commentary
tibbe··on Another year of Clojure
Dynamic languages typically also have to pay a price for carrying around type tags and having everything be heap allocated.
tibbe··on Anders Hejlsberg: You Can't Maintain Large Programs in JavaScript.
Using JavaScript as object code is particularly efficient though.
tibbe··on Why I prefer scheme to Haskell
I usually use `trace` like so:

    f _ _ _ | trace "print something profound" False = undefined
    f normal arguments here = ...
That way the trace output will be printed whenever the function is evaluated, which typically mimics a lexical call stack unless you use laziness in some particularly interesting way.
tibbe··on Amazon DynamoDB – a Fast and Scalable NoSQL Database Service from AWS
HN most likely uses a combination of votes and time in scoring, similar to the reddit ranking algorithm: http://amix.dk/blog/post/19588
tibbe··on Reducing Code Nesting
The "Maybe" monad solves exactly this problem.
tibbe··on From zero to Go: launching on the Google homepage in 24 hours
The problem it introduces is that you could have gotten rid of nulls from the language if you use sum types for errors.
tibbe··on From zero to Go: launching on the Google homepage in 24 hours
Reading the same code I also cringed, but for a different reason: the validity of `paths` is tied to the validity of `err`; you should never look at at `paths` without first checking `err`. We can solve this much better using sum types (also known as discriminate unions):

    // Pseudo Go:
    maybe_paths := filepath.Glob(dir + "/*.png")
    case maybe_paths of {
      Some paths: {
        // Do things with paths
      }
      None: {
        // Handle error case
      }
    }
This makes it impossible to use `paths` if `Glob` returns an error, as `paths` won't be in scope!

Furthermore, not having sum types forces us to include a distinguish value `null` for reference (pointer) types, as a way to communicate "no value". This is bad as now we cannot distinguish references that should never be `null` from those than can be `null`.

tibbe··on Node.js is Backwards
This allows you to serve more clients simultaneously, but not to serve any given client faster i.e. you get higher throughput but not lower latency.
tibbe··on Why Bitcoin Will Fail As A Currency
There are natural limitations to how much people will save:

* When you're dead all your savings are worthless (to you), so your likely to spend most of them before then.

* Some consumption cannot be postponed: you need food, a roof over your head, transportation, etc.

* Time has value. For example, if you wait another 6 months the same amount of money (bitcoin or not) will buy you a better computer. This is likely to hold true in the foreseeable future. Still people do but computers (and phones, etc).

* There's opportunity cost: even if your savings increase in value over time, investing them in something could increase them even more.

tibbe··on Why We are Moving Away from Facebook as a Platform
Requests per minute!
tibbe··on High-Performance Web Applications in Haskell
It depends on what you compare to. Bryan aimed for speed got to 56% of the speed of the C parser he used as a benchmark, using 54 lines of code. The C parser is a 1,672 lines hand-rolled parser that's only does HTTP, while attoparsec is a general purpose library. Bryan wrote about it here: http://www.serpentine.com/blog/2010/03/03/whats-in-a-parser-...
tibbe··on Is NodeJS Wrong?
Haskell (or rather GHC) offers a blocking programming model (e.g. spawn a thread per connection and make blocking reads/writes on the socket) but uses asynchronous I/O in its implementation (one thread uses epoll/kqueue/poll to do the I/O and the CPU bound threads are scheduled on a thread pool).
← PreviousPage 2 of 3Next →