HN user

arcatek

2,548 karma

Lead maintainer for Yarn, the package manager

Twitter : @arcanis Website : http://arcanis.fr Email : nison.mael@gmail.com

Posts54
Comments373
View on HN
monkeywritescode.blogspot.com 4y ago

C++ Exceptions: Under the Hood (2013)

arcatek
115pts111
www.reddit.com 5y ago

Chrome purposefully breaks custom search engines

arcatek
7pts5
dev.to 6y ago

Introducing Yarn 2

arcatek
50pts6
github.com 7y ago

Yarn's Future – v2 and beyond

arcatek
380pts232
news.ycombinator.com 10y ago

Ask HN: Where do you store your backups?

arcatek
5pts3
arcanis.github.io 10y ago

Show HN: A convenient, no registration, Secret Santa generator

arcatek
1pts0
start9.io 11y ago

Show HN: Start9 brings the retrogaming universe to everyone, everywhere

arcatek
1pts2
arcanis.fr 11y ago

Show HN: A year worth of side projects

arcatek
3pts1
twitter.com 11y ago

3DS Exploit finally found

arcatek
3pts1
www.pcworld.com 11y ago

Twitter keeps alive Twitpic domain and photo archive

arcatek
1pts0
virtjs.com 11y ago

Show HN: Virtjs, an ES6 emulation library

arcatek
27pts9
github.com 12y ago

Gameboy emulation library in JavaScript

arcatek
18pts2
arcanis.github.io 12y ago

Show HN: Instrumenting an emulator using JavaScript

arcatek
3pts1
github.com 12y ago

HTML5 Security Spreadsheet

arcatek
64pts11
peg.arcanis.fr 12y ago

Show HN : PEG.js Online Editor

arcatek
1pts0
news.sky.com 12y ago

Apple Ban Overturned By US Administration

arcatek
1pts0
github.com 12y ago

WebGL Particle Engine

arcatek
4pts0
github.com 12y ago

RTWorldReader.js - Open source reader for generic game levels

arcatek
1pts0
www.reuters.com 13y ago

Kremlin says decision on asylum for Snowden not up to Putin

arcatek
1pts0
moviewall.org 13y ago

Show HN : My week-end application, MovieWall.org (Angular.js stack)

arcatek
4pts4
groups.google.com 13y ago

Chromium-dev solves the spaces vs tabs debate

arcatek
2pts0
monoinfinito.wordpress.com 13y ago

Everything you never wanted to know about C++ exceptions

arcatek
2pts0
www.facebook.com 13y ago

Razer will not cancel 90%-off test coupons

arcatek
145pts66
googleblog.blogspot.ca 13y ago

Startup Weekends NEXT : by Google

arcatek
1pts0
www.youtube.com 13y ago

Youtube Tape Mode (april 14th, 1956, commemoration)

arcatek
3pts0
superuser.com 13y ago

A pear in Chrome/Firefox, an apple in Safari/IE

arcatek
2pts0
www.google.com 13y ago

N. Korea approves nuclear strike on US

arcatek
2pts0
spaceappschallenge.org 13y ago

Nasa Space Apps Challenge

arcatek
1pts0
ffix.arcanis.fr 13y ago

Browser Nostalgia : WebGL-powered FFIX start screen

arcatek
1pts0
www.google.com 13y ago

Extract website favicon using Google services

arcatek
1pts0

Packages are typically different once published than they were inside their original repositories. Call it transpilation, build, compilation, packaging, etc, most popular projects require some level of support for dynamic code execution before reaching their usable state.

As much as I'd have liked Git to be a viable option compared to centralized registries, last couple of years demonstrated running arbitrary commands during install is too much of a risk for it to work at scale.

As mentioned in the issue you link the problem comes from third-party packages with non-deterministic build scripts in git dependencies, or files on disk being actually different (although I guess we could at least try to normalize crlf, but as you can guess it will break someone).

It's not exactly unmaintained (we merged a couple of security patches in the past years), I agree that we should have do something about it.

We'll be correcting this situation starting from the 6.x release, which we expect somewhere in August.

Of course. Modern Yarn releases (4.x) are deterministic to a fault and you can rely on it to have a consistent behavior across your whole team. As for feature-wise I'd say it's a lot of small details that together add up once you grow used to them.

The next major release will keep pushing in that direction with both better performances and features we couldn't implement until now due to their reliance on said perfs improvements.

Disclaimer: I'm the Yarn lead maintainer.

It's not about the package manager, it's about the runtime. Python isn't able to support this pattern with its resolution pipeline, so package managers have to resort to do the work to dedupe versions.

By contrast Node.js has built-in capabilities that make this possible, so package managers are able to install multiple versions of the same package without that issue.

Huh? It queries whenever you stop typing.

That's relatively infrequently - TabNine offered me accurate completion while still writing my code, whereas with Copilot I not only have to wait for it to return the answer, I also have to hope it knows an answer. If it doesn't, too bad, lost time for nothing.

The article doesn't go into how to integrate TypeScript in the monorepo for development - what we do on the Yarn repository is that we point all the package.json `main` fields to the TypeScript sources, then use `publishConfig.main` to update it to the JS artifacts right before being published.

This way, we can use babel-node or ts-node to transparently run our TS files, no transpilation needed.

If there are clearly better algorithms, why not refactor npm and add them in experimental flags to npm

While node_modules has many flaws, in the current ecosystem all modes have their own pros and cons, and there isn't a "clearly better" algorithm: node_modules has less friction, PnP is sounder, and pnpm's symlinks attempt to be kind of an in-between, offering half the benefits at half the "cost".

Like in many computer science things, it's tradeoffs all the way. Part of why Yarn implements all three.

However note that ESM in Node comes with drawbacks that prevent end-users from relying them in various situations. Those will be mostly solved once loaders become stable, but until then it's still advised to ship packages as both CJS and ESM.

Out of curiosity, how do transaction logs handle things like created_at fields, or randomly generated UUID, which rely on contextual data? Is the server time/rng seed faked for each replayed transaction?

To reiterate on what sibling comments said, I'm the one who spawned the discussion and implementation of Corepack, and npm remained largely out of it; the push mostly came from pnpm and Yarn.

Additionally, unlike other approaches, Corepack ensures that package manager versions are pinned per project and you don't need to blindly install newest ones via `npm i -g npm` (which could potentially be hijacked via the type of vulnerability discussed here). It intends to make your projects more secure, not less.

If they start to play with different rules, one of the hard fork remaining branches (or both) will be refused by everyone on the network and be worthless.

There's no telling whether it'd be the "hijacked" branch or the original one - assuming they control 50%+ of the mining power, there's a decent argument that the remaining miners would follow their lead if only to stay on the largest branch.

It's public, but I doubt it still compiles against recent LLVM versions! I started it 8 years ago to get a better understanding how features like classes & operator overload would work in a JS-like language. It was really fun!

https://github.com/castel/libcastel/blob/master/runtime/sour...

https://github.com/castel/libcastel/blob/master/runtime/sour...

I remember that at the time there were very few resources on personality functions, even in the LLVM doc - I had to make a lot of research before finding your articles, which were extremely helpful!

I got reminded of them yesterday after someone pinged me on a Stack Overflow answer I made at the time, asking for an updated link; after I found your long-form article I figured it would be a good topic for HN as well :)

https://stackoverflow.com/questions/16597350/what-is-an-exce...

I know you're joking, but I worked in a startup where a massive effort was made to completely rebuild the 1.x website - both backend and frontend. It required a lot of work from everyone, and I remember we even stayed late more than a few times to bring it to finish line.

So it was a bit disheartening that the founders never bumped the version to 2.x once the rollout was achieved. It's perhaps a bit nitpicky, but it felt like the work wasn't properly appreciated.

Yarn 3.0 5 years ago

We don't do support on HN, but if you really don't find information in our repository issues I'm sure our Discord can help. We publish all the Yarn packages to both the npm and GitHub package registries, so I'm certain it works fine.

Yarn 3.0 5 years ago

That's not quite true, PnP has always been the default and we have no plans to change that. The only thing that changed is that when you migrate from v1, we automatically enable the node-modules linker.

The reason for that is that PnP tends to require recent versions of some of your dependencies, so migrating to it can be somewhat involved, and it's better experience to let you keep using the install strategy you're used to until you decide to change it yourself.

New projects, on the other hand, already use the latest versions from their dependencies, so it's a much better starting point for PnP.

Yarn 3.0 5 years ago

We support it once you enable the `node-modules` linker (cf our documentation). It's a little slower and doesn't leverage some of the stability improvements brought by PnP (in short, you get a good old node_modules folder without much fanciness), but you still get to benefit from all the other features and bugfixes we made since the 1.x.

Yarn 3.0 5 years ago

We use Yarn / VSCode / TypeScript (both to maintain Yarn and at work), so we are very invested in this use case. If something didn't work, we'd notice it quickly and the fix wouldn't take long!

Yarn 3.0 5 years ago

I was the main developer back when the 2.0 was started (so, like, rc.1), but since then we grew and are now a team, with at least four very active contributors of similar expertise.

I believe this is the greatest accomplishment of the v2.

Yarn 3.0 5 years ago

Note that we don't recommend using both Yarn and npm: both have different feature sets, heuristics, and implementation details, and as a result your colleagues and you may have slightly different behaviors in development (on top of desync'd dependency trees).

Just like no one would think of letting their developers choose whether they want to bundle their code using either Webpack or Rollup, the package manager should really be enforced at the project level, whether you choose Yarn or npm.

Yarn 3.0 5 years ago

We maintain a set of automated benchmarks against Yarn 1/2+ (PnP and node_modules tracked separately), pnpm, and npm: https://yarnpkg.com/benchmarks

The fastest are usually either Yarn PnP or pnpm. Note however that regardless of the package managers it's quite clear that performances are reaching a plateau in the common cases. I personally believe a better thing to consider are feature set, stability, documentation, and general codebase health (since it impacts how fast features and bugfixes ship, and how dangerous upgrades may be). But those are quite a bit harder to measure, of course!

If I remember correctly, PSD files have an optional header (when files are saved in "Compatibility Mode", which I think is the default) in which is encoded the rasterized image. It's then "easy" to display the image, but very difficult to edit it, as you then need to implement the whole renderer.

Wasmer 2.0 5 years ago

Somehow you are not wary of an organization that is 90% directed by one entity. It might be useful to know that 95%+ of the code changes in wasmtime are by people working in Fastly.

I'm not overly worried about some companies investing more in communities than others, that's true, as long as there's some level of oversight (those 5% you mention).

I also suspect that a lot of those Fastly employees you mention came after the Mozilla layoffs we heard about a year ago, which I think invalidates a bit your point as the responsibilities were then shared before being unfortunately moved in to Fastly in short notice. It makes sense it would take time to address that perfectly, considering the context.

Google is the main pusher to Chrome, the fact that Google is a commercial entity doesn't make good or bad on how they move the ecosystem forward. It makes it more effective.

That's not a great example - Chrome famously pushes changes without any oversight, which leads to useless APIs in the best cases to downright harm to their users in the worsts.