Live data from Hacker News

JSR: The JavaScript Registry

jsr.io

41–50 of 183 posts

Re: JSR: The JavaScript Registry

#41
post #15

Earlier quoted context omitted.

that actually seems really inefficient, it could avoid the array allocation and fill call by just moving the length check...

You could also just use `String.prototype.padStart()` [1], and you get a nice optimized C++ implementation :D [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

While funny, worth remembering that .padStart didn't exist when left-pad was first published :)

Re: JSR: The JavaScript Registry

#42
post #26

Earlier quoted context omitted.

You could also just use `String.prototype.padStart()` [1], and you get a nice optimized C++ implementation :D [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Pass, not a Rust implementation /s

Is it even AI scale if not performed on the GPU?

Re: JSR: The JavaScript Registry

#43

Kevin from the Deno team here - happy to answer any questions you have today!

I am not a user of Deno, but I acknowledged that HTTPS module imports were one of the original selling points of Deno compared to Node/NPM. Was it revised at some point that a package repository is needed? What's the back story?

Re: JSR: The JavaScript Registry

#44
Seeing Bun/Node/Deno support reminds me of a question: are there any good resources on writing JS that works in all 3 and the browser? For example if I wanted to write a simple filesystem API that would work the same across bunodeno?

Re: JSR: The JavaScript Registry

#45
post #15

Earlier quoted context omitted.

that actually seems really inefficient, it could avoid the array allocation and fill call by just moving the length check...

You could also just use `String.prototype.padStart()` [1], and you get a nice optimized C++ implementation :D [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

While it's not quite C++, here is Chromium's implementation: https://source.chromium.org/chromium/chromium/src/+/main:v8/...

Re: JSR: The JavaScript Registry

#46

One thing I'm not sure about when reading their policy is what'll happen in another kik situation. If someone were to claim the scope Microsoft (for example) that had no relation to Microsoft and then Microsoft came along and wanted the scope what would happen? If MS got the scope what would happen to the packages in that scope, or if MS didn't get it what is done to clearly communicate that this is an unofficial acc…

I'd suggest they require a DNS entry to use a scope and all scopes have a one to one relationship with a domain.

Re: JSR: The JavaScript Registry

#47

One thing I'm not sure about when reading their policy is what'll happen in another kik situation. If someone were to claim the scope Microsoft (for example) that had no relation to Microsoft and then Microsoft came along and wanted the scope what would happen? If MS got the scope what would happen to the packages in that scope, or if MS didn't get it what is done to clearly communicate that this is an unofficial acc…

I'd suggest they require a DNS entry to use a scope and all scopes have a one to one relationship with a domain.

What happens if the domain registration expires? Scope takeover?

Re: JSR: The JavaScript Registry

#48

One thing I'm not sure about when reading their policy is what'll happen in another kik situation. If someone were to claim the scope Microsoft (for example) that had no relation to Microsoft and then Microsoft came along and wanted the scope what would happen? If MS got the scope what would happen to the packages in that scope, or if MS didn't get it what is done to clearly communicate that this is an unofficial acc…

I'd suggest they require a DNS entry to use a scope and all scopes have a one to one relationship with a domain.

Love this idea, defer the IP problems to DNS where everyone already has expectations set.

Re: JSR: The JavaScript Registry

#50
post #44

Seeing Bun/Node/Deno support reminds me of a question: are there any good resources on writing JS that works in all 3 and the browser? For example if I wanted to write a simple filesystem API that would work the same across bunodeno?

You can't, and for good reason. Deno has slightly different API's than Node. Bun also has subtle differences between their STL implementation and Node's, but afaik, they're getting there.
Post reply on HN