> I have to admit that I don't understand half of this blog post It's because you haven't read al-Ghazali yet. (definitely the most pompous and self-important part of this post)
Left-Pad (2024)
61–70 of 224 posts
Re: Left-Pad (2024)
#62Earlier quoted context omitted.
In each loop prepending a single character could take O(m) (moving all m characters one to the right) so combined O(nm) where n is the number of padding characters and m is the total number of characters in the string.
Only when the underlying JS implementation does this naively. In reality JS implementations do a lot of optimizations which often can reduce the time complexity.
Re: Left-Pad (2024)
#63> I have to admit that I don't understand half of this blog post It's because you haven't read al-Ghazali yet. (definitely the most pompous and self-important part of this post)
> Not driven by logic, anger... I don't know that I fully buy this either, at least not the anger part. I can look back on all this with wry amusement nowadays but I remember it being pretty frustrating at the time. It sort of felt like, well, either you knew what the impact of unpublishing all your packages would be and you did it anyway, which makes you kind of antisocial, or you didn't know what the impact would b…
He wants to remove his stuff, but isn't sure what the right way to do it is, so he asks npm. npm provides him with a set of scripts to run to remove his stuff, and he, presuming that it's "ok" if npm told him to go ahead and run them, runs them. The impact isn't especially important to him, But since npm just gave him a set of scripts with an implicit "oh okay you want to remove your stuff, here I wrote you a script you can run to get it done," makes it more of an npm choice to handle it in this manner. npm asked him to handle it this way, so he did.
Re: Left-Pad (2024)
#64Earlier quoted context omitted.
Only when the underlying JS implementation does this naively. In reality JS implementations do a lot of optimizations which often can reduce the time complexity.
"The compiler will take care of it", funny, heard that one before, I'd profile it just to be on the safe side...
Re: Left-Pad (2024)
#65Re: Left-Pad (2024)
#66For me it was surprising that so many projects used this naive implementation. Nonnaive implementation is faster and much smaller.
Re: Left-Pad (2024)
#67> I have to admit that I don't understand half of this blog post It's because you haven't read al-Ghazali yet. (definitely the most pompous and self-important part of this post)
Who is al-Ghazali? I searched and found the Iraqi phisolopher, but couldn't understand how he is related
So, im gonna try and read something by al-Ghazali.
Re: Left-Pad (2024)
#68> I have to admit that I don't understand half of this blog post It's because you haven't read al-Ghazali yet. (definitely the most pompous and self-important part of this post)
> Not driven by logic, anger... I don't know that I fully buy this either, at least not the anger part. I can look back on all this with wry amusement nowadays but I remember it being pretty frustrating at the time. It sort of felt like, well, either you knew what the impact of unpublishing all your packages would be and you did it anyway, which makes you kind of antisocial, or you didn't know what the impact would b…
grant me the serenity to accept the things I cannot change; courage to change the things I can; and wisdom to know the difference
Re: Left-Pad (2024)
#69The version history of the kik package[0] is odd. It has been replaced with a security holding package nine years ago[1]. [0] https://www.npmjs.com/package/kik?activeTab=versions
haha, so, all of this for… nothing in the end?
Re: Left-Pad (2024)
#70Earlier quoted context omitted.
> Not driven by logic, anger... I don't know that I fully buy this either, at least not the anger part. I can look back on all this with wry amusement nowadays but I remember it being pretty frustrating at the time. It sort of felt like, well, either you knew what the impact of unpublishing all your packages would be and you did it anyway, which makes you kind of antisocial, or you didn't know what the impact would b…
The 3rd option is the one Azer describes in the post: He wants to remove his stuff, but isn't sure what the right way to do it is, so he asks npm. npm provides him with a set of scripts to run to remove his stuff, and he, presuming that it's "ok" if npm told him to go ahead and run them, runs them. The impact isn't especially important to him, But since npm just gave him a set of scripts with an implicit "oh okay you…
If NPM would have prevented the depublishing, he would have made a scene and in the worst case, they would have looked bad.
How they actually handled it, the library author got full freedom but also full responsibility