Better HN
topnewbestaskshowjobs
Log inSign up

laylomo

24 karma · joined Mar 20, 2016 (10y ago) · 7 submissions

Submissions

comment 8y ago · link · parent

This is awesome! Is the code available as open source anywhere? I might be interested in making my own personal deployment because I think youtube is far too distracting

comment 9y ago · link · parent

Nice, reminds me of the equivalent OCaml implementation:

    let fizzbuzz n =
      match n mod 3, n mod 5 with
      | 0, 0 -> "fizzbuzz"
      | 0, _ -> "fizz"
      | _, 0 -> "buzz"
      | _ -> string_of_int n

comment 9y ago · link · parent

Excellent post, Jared. Thanks for making it.

I figured I should share a project I made as well with ReasonReact. I'm a noob to React and frontend programming in general, but I was surprised by how easily it was to pick it up. I created a simple game of Snake over a weekend just to test it out. Great programming experience, great first impression.

edit: live demo: (warning: not mobile friendly) http://192.241.133.216/projects/websnake/index.html

comment 10y ago · link · parent

It's because of words like anden and andEN. That second version is sing-songy because it has two stresses.

comment 10y ago · link · parent

It's easy. The first bit:

    [person
tells you that you're getting a list of persons. That's the most important part. The rest is telling you how they're getting in that list.

It's almost like a select query in (pseudo) SQL.

    select person from people where person.isvalid = true
vs

    [person for person in people if person.isvalid]

comment 10y ago · link · parent

And if I recall correctly, the 2 million figure was just an artificial limit that they hit due to the configuration settings during the test, since it just "seemed like a really big number" at the time. In theory, it could probably go even higher.