Live data from Hacker News

Jezen/is-thirteen: Check if a number is equal to 13

github.com

51–57 of 57 posts

Re: Jezen/is-thirteen: Check if a number is equal to 13

#51
post #46

For more 13 fun, check of the Magic: the Gathering card Triskaidekaphobia. (Specifically, counts in the art and the rules text.) http://media.wizards.com/2016/aksdjciawolkcc0_soi/en_CMrxVcz...

Isn't MTG a 1v1 game generally? "Each player"?

I think it depends on the format, so cards have to handle the case of many players.

I think there are quite a number of many player formats actually.

Like, in one, some number of packs a cracked, and they are passed around in a circle, each person picking one card, until everyone has a deck, and then they play.

Iirc. (Haven't played it myself.)

Re: Jezen/is-thirteen: Check if a number is equal to 13

#52
post #39
post #23

Earlier quoted context omitted.

Chinese only has uppercase numbers (called 大写, lit. "big writing"). I̶ ̶d̶o̶n̶'̶t̶ ̶k̶n̶o̶w̶ ̶w̶h̶y̶,̶ ̶b̶u̶t̶ ̶I̶'̶m̶ ̶h̶a̶r̶d̶l̶y̶ ̶a̶n̶ ̶e̶x̶p̶e̶r̶t̶ ̶i̶n̶ ̶C̶h̶i̶n̶e̶s̶e̶.̶ ̶T̶h̶e̶y̶'̶r̶e̶ ̶n̶o̶t̶ ̶u̶s̶e̶d̶ ̶m̶u̶c̶h̶. EDIT: Nevermind me, see xiaq's much better comment.

Does anyone know why this breaks the content wrapping? I have seen classes do this but this text is just normal HN comment class. I really hope using strikeout unicode does not catch on around here. It is horrible.

Works fine for me (Firefox on Android and Windows)—I think your browser doesn't handle Unicode combining characters properly. (Chrome gets a little funky with them on Android, haven't used Windows Chrome in a while).

The reason is it's two codepoints but one "grapheme", and some software doesn't handle grapheme clusters well.

Re: Jezen/is-thirteen: Check if a number is equal to 13

#55

My first reaction was, "Haha. That's fun code-as-parody." Then I looked at the unit tests. [1] Now my reaction is more like, "Your commitment to this bit is both admirable and slightly disturbing." [1] https://github.com/jezen/is-thirteen/blob/master/test.js

> tap.equal(is("B").thirteen(), true); // B looks like 13

[deleted]

Re: Jezen/is-thirteen: Check if a number is equal to 13

#56
post #46

For more 13 fun, check of the Magic: the Gathering card Triskaidekaphobia. (Specifically, counts in the art and the rules text.) http://media.wizards.com/2016/aksdjciawolkcc0_soi/en_CMrxVcz...

Isn't MTG a 1v1 game generally? "Each player"?

It is "each player" since the card can backfire and cause you to lose the game, if your opponent is clever.

Re: Jezen/is-thirteen: Check if a number is equal to 13

#57

Earlier quoted context omitted.

I think that's the point the parody is making. A simple "piece" of code can have thousands of edge cases that a normal developer doesn't think about. That's the advantage of the UNIX-style "everything does one thing and does it well" philosophy that Node mirrors.

You could just as easily read it as a comment on overengineering.

That's what I did anyway...
Post reply on HN