nunull

Joined 12 years ago

Karma
50
Submissions
38
Member since
Sep 6
https://timmalbers.de
View on Hacker News

Recent submissions

Comment · 3 years ago
Comment · 4 years ago
Comment · 4 years ago
I frequently found myself in need of sending clients information on how to reload websites without cache. This often involves asking for their OS and browser first, which can make it somewhat tedious. There are quite a few articles explaining the different shortcuts per OS / browser, but they are full of ads most of the time, which is why I build this in an afternoon.
Comment · 4 years ago
Comment · 9 years ago
Comment · 10 years ago
This returns the length, not the line itself.

Edit: `lines.reduce((line, line_) => line_.length > line.length ? line_ : line, '')`

Comment · 10 years ago
Regarding 1: I think the sorting approach is actually really nice in this case. Clearly it's not as efficient as a simple loop, but it's safer and more readable. Explicit looping and mutation can introduce nasty bugs which this kind of declarative approach can't.
Comment · 10 years ago

    $ git pull origin master
    Your local changes to the following files would be overwritten by merge: user.abcd.suo
Suggestion: git rm --cached user.abcd.suo

Wooaa, no! (Now your local changes are gone.)

Comment · 11 years ago
Nice read! I'd really like to know when we can expect the next post to be published.
Comment · 11 years ago
> head extracts the first element of a list, which must be non-empty.

Those functions operate on lists. I think it should read as follows.

    const head = (xs) => xs[0];
    const last = (xs) => xs[xs.length-1];
    const tail = (xs) => xs.slice(1);
    const init = (xs) => xs.slice(0, -1);
Am I missing something?
Comment · 11 years ago
Messing with that faders feels weirdly good.
Comment · 11 years ago

  Q
    Why Python?
  A
    The only alternative would be Haskell, but I still have to learn that.
That's... interesting. Would be nice if there was a reason given for that.
Comment · 11 years ago
May i ask why you are using this notation? I honestly can't think of any benefits. Isn't it more convenient and readable to use `p.removeAttr`?

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton