In most languages there are better way to do this than goto. Among them
- extracting code into smaller functions (yes, state has to passed around)
- exceptions (yeah yeah, hate them or love them, but if used in your environment it makes sense not to avoid them)
- RAII pattern or handling cleanup, which allows simple return and "automatic" resource handling
- etc.
True, in a language like C these don't apply necessarily and goto still has some use
-
NPM themselves recently launched a new package called npx [0] which will download and execute packages directly from the registry if you don't already have them installed. So if you make a simple typo like this:
point is that npm are encouraging you to use npx, which is bundled with npm 5.2+ as a general tool for executing adhoc commands from the terminal. It just massively increases the chance of typos.
At some point there needs to be some trust, and NPM puts that boundary at installation. If you trust a package enough to install it, then it's allowed to act on your behalf with the permissions of your user.
`npx` doesn't change that dynamic. It's no different than installing an RPM or Debian package over the internet.
You did a great job with this, I started something really similar about 6 months ago because I wanted to port SabreDAV to js (I didn't quite get to the stage of self hosting PHP parser) but eventually came to the same conclusions, even with a good codebase idiomatic PHP does not map cleanly to idiomatic JS
I understood the OP as saying they couldn't figure out what "mb" meant because the author didn't define it in the text. I noted that there was another path to figuring out what it meant, by changing the live-editable code and seeing what it does.
Having a live-editable example is certainly nice, but you shouldn't have to fiddle around with a parameter to see what it does. It should be clearly documented so that you know what to expect and what the intention is. Otherwise, the behavior that you observe could be a bug for all you know.
Its also useless for discoverability. Sure, you might be able to figure out some code you read in an example through trial and error, but you won't learn what's actually available.
It would be nice to be able to use the annotations directly, we support this in flow-runtime[0] but I think it would be fairly straightforward to support in TypeScript too,
Sometimes legitimate accounts trip a spam filter and get shadow banned, if you go directly to the comment's page (click the time link) there's a `vouch` link you can click to vouch for that person and restore their account.