Live data from Hacker News

Deno 1.6 supports compiling TypeScript to a single executable

github.com

281–284 of 284 posts

Re: Deno 1.6 supports compiling TypeScript to a single executable

#281
post #219
post #33

Earlier quoted context omitted.

Same here, the static linking hype feels real strange, given that was the only option we used to have back in the day, and having access to dynamic linking on 16 bit platforms felt like liberating.

I don't really see the hype, I think it's just the intersection of a few factors: - Languages like Rust which have an ecosystem that evolves very quickly (and uses complex symbol mangling schemes that would break all the time) wouldn't fare very well with dynamic linking in the first place. What good is dynamic linking if you need a different version of your .so file for every binary? - Dynamic linking is not quite a…

> Dynamic linking is not quite as useful today a it was in the past

Linux distributions need to be able to backport security fixes to shared libraries, test them and deliver updates to all users quickly.

With static linking it becomes practically impossible.

Re: Deno 1.6 supports compiling TypeScript to a single executable

#282

Earlier quoted context omitted.

Unfortunately, that's not a very accurate analogy. TS also inherits all of JS runtime semantics unchanged, and there's just as much if not more wrongness there.

I wish for a version of TS where I could have === automatically rewritten to use _.isEqual, that way [1,2,3] === [1,2,3] would return true.

In clojure(script) equality works this way. Values are compared and not instances. It makes the language a little bit higher level and more ergonomic. Love that feature.

Re: Deno 1.6 supports compiling TypeScript to a single executable

#283
post #162

We use vercel/pkg to distribute our product as a standalone executable that runs in on-prem windows environments. Our product is actually comprised of multiple NodeJS servers that are spawned as child processes in one master Node procees, and that module gets built using pkg. We also have a windows installer that configures a windows service to run the executable/keep it up. It’s proven to be a really simple way to d…

We’ve been following a similar process for our internal tools and have found it to be a good solution. Manually including native libraries is probably the only lousy part. Out of curiosity, what are you using to achieve the windows service installation? We’ve been using nssm, which has worked okay, but I’m curious if there’s a better way of doing it.

Yep, we use NSSM as well, it does the job.

Re: Deno 1.6 supports compiling TypeScript to a single executable

#284

Earlier quoted context omitted.

No, because CORS can only restrict which origins (scheme, domain, port combinations) are able to access the site's data. But you're not even connecting from a web origin but from localhost and you're trying to defend from all access except by your frontends. For this, you need a shared secret between the server and the frontend. A further limitation of CORS is that certain requests are allowed even if they are not fr…

IKs there a good simple way to keep it secret? I assume someone could have a look at the JavaScript on the browser and see hey this must be the secret stored here because it is passed to the server on every request. Then write there XSS attack to use that.

The secret would have to be non-static (not baked into the code).
Post reply on HN