Live data from Hacker News

Viewing profile — natefaubion

natefaubion

HN member
Joined
Tue, Jun 07, 2011, 6:57 PM UTC
HN karma
138
Public activity
20 items

About natefaubion

No profile information was provided.

Recent public activity

  1. comment
    Comment #20063305

    It's something that comes from Haskell. The `where` keyword always starts a new layout/indentation context. It's not strictly necessary and there are ways around it, so it's just a…

  2. comment
    Comment #20063265

    Yes, I'm not saying there aren't usages for them in general, but PureScript currently occupies a niche that doesn't get down to the level of binary file formats. This change is mor…

  3. comment
    Comment #20062933

    We found no usages of it in the wild. If there is real-world need for them, we'll consider adding them back.

  4. story
  5. comment
    Comment #5799126

    There aren't native modules in JS (though they are coming in ES6). The module pattern is a way of having private scope by wrapping everything in a closure. So yes, the module patte…

  6. comment
    Comment #5798873

    A cleaner way of doing the immediately-invoking function in CS is to use a `do` statement. MyModule = do -> # module body No need for any parens.

  7. story
  8. comment
    Comment #5699524

    If you're interested in doing some of this stuff in JS, there's sweet.js[1] for macros. I've also implemented some similar stuff as libraries: adt.js[2], matches.js[3], and tailrec…

  9. comment
    Comment #5699434

    With pattern matching, the term on the left is a destructuring of the term on the right. Using a static instance like that isn't what you normally do in practice, but rather someth…

  10. story
  11. comment
    Comment #4534537

    I find it helps when you use short-circuiting. The returns are the first thing you see, making it more obvious what is going on. myfn = (arg) -> return 1 if arg is "one" return 2 i…

  12. comment
    Comment #4518646

    That's along similar lines, but more like guards in Haskell: http://en.wikibooks.org/wiki/Haskell/Control_structures

  13. comment
    Comment #4518175

    It meshes pretty well as is. If only I could get rid of the strings and redundant arguments. mymap = pattern { '_, []' : -> [] 'f, [x, xs...]' : (f, x, xs) -> [f x].concat mymap(f,…

  14. comment
    Comment #4517804

    You are correct. There is not a guarantee for the future, though I doubt this behavior will change for V8 (this is currently node only). If that scares you, you can use the combina…

  15. comment
    Comment #4517437

    Take a look at the next sentence: "Keep in mind, that time is measured in the single microseconds (1µs vs 3µs) to dispatch 5 calls to the same function." So you are still looking a…

  16. comment
    Comment #4516716

    Pattern matching is common in functional languages like Haskell or Scala. It's like a form of overloading on steroids, letting you inspect the values and structure of the arguments…

  17. story
  18. story
  19. comment
    Comment #3612809

    I don't think so. It's not like it really does things for you or abstracts away the weirdness of CSS like jQuery does for JS. You can't write a functioning website without knowing …

  20. comment
    Comment #3612481

    Might I also suggest nib, and excellent set of Stylus extensions for working with CSS3. One of the most useful features is image inlining, especially for gradients. While they end …