Recent submissions

Comment · 8 years ago

  (1.005).toFixed(2) // Expected rounding to "1.01"
  "1.00"
Comment · 8 years ago
Hm, re: "ads are everywhere" - is it just me, or are two of the three sample posts in the screenshot content-based ads?

First for the novel Cibola Burn, and third for the app Halide.. the middle post seemingly is a reply to an ad of some book series as well :) Or "influencer" paid content != ads?

Comment · 8 years ago
Comment · 8 years ago
In that section, would like to add recommendations for:

- "Being Geek: The Software Developer's Career Handbook" https://www.amazon.com/Being-Geek-Software-Developers-Handbo...

- "Team Geek: A Software Developer's Guide to Working Well with Others" http://shop.oreilly.com/product/0636920018025.do -- Software engineering teamwork a-b-c. I'd love to work on teams where everyone has read this one.

[edit: 2nd edition of "Team Geek" is titled "Debugging Teams"; having read both, no difference which you get]

Comment · 8 years ago
This is HN after all - some version of ES/JS:

  class Eel {
      valueOf () { 
          return 'https://imgflip.com/meme/Bad-Joke-Eel';
      }
  }

  const craftCapacity = 331,
        hovercraft = Array.from(Array(craftCapacity), () => new Eel);
Comment · 8 years ago
Sure, and at least few more people :)
Comment · 8 years ago
Comment · 8 years ago
And NPM took it down quickly, whew.
Comment · 10 years ago
Good one!

A naive strategy where they never die, and hopefully stay in prison for slightly less than a few billion years:

One prisoner is the light-counter (Mr C). Others follow a simple pattern - if the light is off, and they have never turned it on yet, turn it on. If it is already on, or they have already ever turned it on, do nothing.

Mr C enters the room, if the light is on, remembers it, and turns it off.

When Mr C has entered the room 99 times with light on, he can say 'Yes' and they are safe.

This can be optimized. How?

Comment · 10 years ago
Comment · 13 years ago
Comment · 13 years ago
390:

  ^[lwp]|fa|r[ro]|[isytd]l|c$|de
Comment · 13 years ago
Nice, turn it around for 199:

  ^.{5}[^e]?$

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton