HN user

vasergen

203 karma
Posts2
Comments120
View on HN
Go run 2 years ago

Typescript is a pretty nice language but the tooling around it is practically unusable.

I work mainly with node/ts and totally agree, maybe just add that by tooling it is whole ecosystem as well. This problem is not visible if you work either with relatively small code base or new code base. But as soon as you have something old and big you'll see where the pain comes from.

Qdrant 1.7.0 3 years ago

Any suggestion what should one read/watch to understand the difference between this and relational DB?

Deno Cron 3 years ago

Wanted to ask the same, because didn't find it in the article

The experience of using Node.JS with TypeScript, ts-node, and ESM is horrible.

So true, I really wandering if there was a better alternative, they essentially broke a lot of packages and I don't know how many dev hours will be put now to fix all of this, because so many tools are broken now. Additionally to that, they did some other not backwards compatible changes, like removing __direname in ESM, which is IMHO not the best decisions, why not for example just keep it as it is, but deprecate it and have a warning message.

A lot of code - especially commercial code - is pretty boring if you do it right.

That is a very good point. If your code doesn't look boring, then you probably doing something wrong.

WinterJS 3 years ago

What does it mean "blazing fast"? Every new thing is blazingly fast nowadays.. deno, bun, turbopack, etc. I don't even know what does it mean to me as a user, does it really super fast or it is just some fancy words. "blazingly fast" compared to what?

Javascript are still quite slow

Can you describe your usecase for which JavaScript is slow? There are many languages that are slower than js like python or elixir, but they are doing just fine, that's why I won't agree that js is slow, but sure there are cases for which js just wasn't designed, and any CPU intensive task will be slow, but there are ways to get around it as well.

Bun v1.0.0 3 years ago

I think the version is actually closer to `1.0.0-beta` than to `1.0.0`. I just installed v 1.0.0 and run `bun repl` and it failed with exit status code 1, it turns out the repl wants to use port 3000, which was used in my case already. There are probably a lot of other small things like that, look on reported bugs in github. So, I also should be 'skeptical' about all claims they did.

Nevertheless I am super impressed with their speed and exited with the result. Didn't expect this project to grow so quickly to this state, I though it will take them much more time. For comparison, deno was started way earlier and now they are miles behind (personal feeling). I am considering to use it for my pet projects

but they've been sold a narrative that NATO's expansion into Ukraine was an existential threat to them

When the war started there were no talking what's so ever about NATO expansion to Ukraine. After the war started Finland joined NATO and it is the longest border between NATO and Russia and nobody from Russia said anything about that.

Wat [video] (2012) 3 years ago

but there are still many reasonable ways to replicate his results

But can you replicate his results for js in any modern browser or node environment? I agree that standards are fixed, but there is definitely a difference between implementation of those standards in different environments

Wat [video] (2012) 3 years ago

Not sure what js shell he uses, since it is an old video but in browser or node you will get predictable results for his examples.

What you need to know that in js '+' sign will add numbers only if both operands are numbers, otherwise it will coerce both to string type, which is true for {} or []. To convert to string js will use '.toString()' method like this {}.toString() and [].toString(). Now {}.toString() is equal to a string '[object Object]' and [].toString() is equal to an empty string '' (for non empty arrays it will print numbers separated by comma). So if we add anything in JS and on both sides are not numbers we actually add strings! And adding strings means concatenation and it works as you would expect, just put two strings together.

Having that, let's take a look on those examples again

1. [] + {} equal to '[object Object]'

2. {} + [] equal to '[object Object]'

3. {} + {} equal to '[object Object][object Object]'

So no 'magic' involved there. Note that some results are different as in the video, you can check it in console in your browser

UPD: typo

I think it is a bit different, because with "use strict" we have already some rules and the typeof null is object there and now is too late to change that. The same for any other feature we don't want to have in a language.

Maybe it was a mistake to introduce "use strict" without any other identifier, we need "use strict" with a version to be able to deprecate things and eventually remove from JS. Then JS engine could read it in the beginning of the file and know which version of js it is. Because in current JS we can only add new features without removing them. I am sure it is very complicated problem since we don't want to break the internet and browsers still have to work with old websites.