Live data from Hacker News

My temporary PHP fix from 2014 has nearly 20M installs. Today I'm deprecating it

jakeasmith.com

81–90 of 97 posts

Re: My temporary PHP fix from 2014 has nearly 20M installs. Today I'm deprecating it

#83

Earlier quoted context omitted.

The JavaScript world is littered with stuff comparing to which your patch seems like a complex project. See those examples: https://www.npmjs.com/package/is-odd https://www.npmjs.com/package/is-even https://www.npmjs.com/package/left-pad https://www.npmjs.com/package/is-whitespace-character https://www.npmjs.com/package/isarray

what a broken ecosystem.. The crazy thing is not that the package exists, but that it is used by JS devs.

PHP devs are happy that npm exists. That way there is always a worse ecosystem down below.

Re: My temporary PHP fix from 2014 has nearly 20M installs. Today I'm deprecating it

#84
post #17

Earlier quoted context omitted.

I feel like I have to remind people of this quite often, but the history is such that npm was lightweight at one point, bundling wasn't a thing, and while `isodd`/`iseven` are of course silly, things like `isarray` were not functions that existed back then (we didn't have Array.isArray). `typeof [] === 'object'` in JS, so e.g. my package `is-arrayish` checked for a similar structure to an array (whereas Id guess `isa…

You want to implement your own is-odd in your code - simple, right? isOdd = (x) => x % 2 == 1 Ut oh, your code is broken for negative numbers now since % isn't a true modulo operator... Fine then, isOdd = (x) => x % 2 != 0 Ut oh, your code is broken because isOdd("hi") returns true now... Fine then, isOdd = (x) => if(!isNumber(x)) throw... else return x%2 != 0 Ut oh, your code is now broken because isOdd(2^55+1) retu…

Ut oh? I've never seen that, is it variant on uh oh or something else?

Re: My temporary PHP fix from 2014 has nearly 20M installs. Today I'm deprecating it

#86
In 2009, I started a project, was given a CSV, and in testing the import I created a quick table called "{businessDomain}Temp". Yes, that table is still there, still has the same name, and is load bearing (not in the LLM meme sense, but the business depends on it). Yes, I'm been promising myself I'll fix it one day for just as long.

Re: My temporary PHP fix from 2014 has nearly 20M installs. Today I'm deprecating it

#87
post #71

Earlier quoted context omitted.

Nothing is more permanent than a temporary solution.

"it was written by that guy 5 years ago,but he left; so nobody is in charge and nobody understands it anymore, but it still works perfectly and we do not need any upgrades" :-))

"Okay, that's just about the end of your training, any quest-OH, Don't forget, you can never ever turn off the light in the storage closet! It is cursed and the company cannot function while the switch is off. Yes I know there's no lightbulb. No we do not know why. If we knew why it wouldn't be that way."

Re: My temporary PHP fix from 2014 has nearly 20M installs. Today I'm deprecating it

#88
post #17

Earlier quoted context omitted.

what a broken ecosystem.. The crazy thing is not that the package exists, but that it is used by JS devs.

I feel like I have to remind people of this quite often, but the history is such that npm was lightweight at one point, bundling wasn't a thing, and while `isodd`/`iseven` are of course silly, things like `isarray` were not functions that existed back then (we didn't have Array.isArray). `typeof [] === 'object'` in JS, so e.g. my package `is-arrayish` checked for a similar structure to an array (whereas Id guess `isa…

IsOdd and IsEven never made sense. They were a badge of shame that said "I have no idea how to program".

Re: My temporary PHP fix from 2014 has nearly 20M installs. Today I'm deprecating it

#90
post #84

Earlier quoted context omitted.

You want to implement your own is-odd in your code - simple, right? isOdd = (x) => x % 2 == 1 Ut oh, your code is broken for negative numbers now since % isn't a true modulo operator... Fine then, isOdd = (x) => x % 2 != 0 Ut oh, your code is broken because isOdd("hi") returns true now... Fine then, isOdd = (x) => if(!isNumber(x)) throw... else return x%2 != 0 Ut oh, your code is now broken because isOdd(2^55+1) retu…

Ut oh? I've never seen that, is it variant on uh oh or something else?

It's something I'm fighting for in my own little way.

Everyone does a glottal stop between the "uh" and "oh", so I'm trying to align the spelling

Unlike the guy on him who writes all years with 5 digits like 02026, I have good reasons for my idiosyncracies.

Post reply on HN