Recent submissions

Comment · 10 years ago
I'm suspicious of any article that's widely slated by a community yet still trending.

I feel there's a market need for a browser plugin that lets you filter out clickbait factories like his employers and all the dirty tricks they use to hijack our attention. There's no way we can keep up with them without computer assistance.

Comment · 10 years ago
Babel has to turn it into valid JS for it to work so you'd still have the 'and' and 'or' functions. In the bottom right corner of Hzoo's example you can see what I mean (http://astexplorer.net/#/ZT6HYai08w)

It should be more obvious what expressions are supported when it's validated by a Javascript parser. This is in contrast to the 'dynamic' approach which has no problem with the following until runtime:

    and(gherkin(or()))
Comment · 10 years ago
To solve the readability issue, why not use Babel to transpile JS expressions into the equivalent syntax?

To generate the first example in the readme:

  import {solve} from 'logic'
  
  function father(x,y) {
      return x =='mcbob' && y == 'bob' ||
          x =='bob' && y == 'bill';
  }
  
  solve(father) // a noop function used as a marker by babel
Comment · 13 years ago
Something that is true of a group he is a part of isn't necessarily true of him. However, if he did want to change parties over this he'd have to drop out of mainstream politics entirely.
Comment · 13 years ago
If you're a small-time programmer unless you move to SV, what does it mean to be 'big' in programming?
Comment · 14 years ago
What's stopping an entrepreneur from building a new network now, in a single town?
Comment · 14 years ago
Looks like a good article but the url violates the same origin policy and as a result it render images. Readers will get a better looking page if they knock the 's' out of https until the owner can fix it
Comment · 14 years ago
Let's draw a distinction between registered users and active users. Browser games have notoriously high inactivity rates. Many - perhaps most - create accounts, play once and never return. This doesn't include the number of users who have multiple accounts, macro miners etc.
Comment · 14 years ago
"privacy betrayed" -> any of this data was ever private. it wasn't.
Comment · 14 years ago
I like the boxes but it desperately needs immediately visible results.
Comment · 15 years ago
There's a problem with box 2. If the IOException is thrown in the stream's constructor (FileNotFoundException) then there will be a NullPointerException if we try to call close!

  InputStream in = null;
  try
  {
      in = new FileInputStream(new File("test.txt"));
      //do stuff with in
  }
  catch(IOException ie)
  {
      //SOPs
  }
  finally
  {
      try
      {
          if(in != null)
          {
              in.close();
          }
      }
      catch(IOException ioe)
      {
          //can't do anything about it
      }
  }
This merely proves your point! :-)

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton