Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
spion
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
76 ms
·
871.
▲
by
spion
9y ago
> If the object was 'any' at some point, if you make an invalid cast Typescript will trust you. I believe any language that supports "any" allows this. Doesn't Kotlin? https://kotlinlang.org/api&#
872.
▲
by
spion
9y ago
Indeed Haskell the language doesn't do any IO. Instead, it creates a tuple containing * a description of the action to execute (e.g. read line from STDIN) * a function that will take the result of the previous action (e.g. the line) an
873.
▲
by
spion
9y ago
Attempt at translation from CS-speak: Laziness matters less in a FP language because if we consider non-termination an effect (impure), all pure functions should behave exactly the same regardless of whether they're "lazy" or
874.
▲
by
spion
9y ago
Needs a correction re: node.js. It does have await and does switch context now.
875.
▲
by
spion
9y ago
Or alternatively the prompt character could start on a new line. That way you can have smaller windows fit more query per line with less space wasted on white-space.
876.
▲
by
spion
9y ago
What makes it difficult?
877.
▲
by
spion
9y ago
OCaml might become this once multicore happens.
878.
▲
by
spion
9y ago
Dynamic language proponents sometimes like to say that static types can't catch all errors and are therefore of little use. Static type proponents sometimes like to say that unsound type systems that leave escape hatches are of little
879.
▲
by
spion
9y ago
Thats a fairly naive way of looking at it. Modern politics is all about manipulation (mostly emotional manipulation) from all sides, even those that fight for just causes. Simply laying down the facts and research about what we know is not
880.
▲
by
spion
9y ago
There are two different types of politics and we often conflate both. The type that many people hate is "politics the art of manipulating people". The second meaning refers to actual policies and their effect on people's qual
881.
▲
by
spion
9y ago
The short story is that native promises are faster now except for the "promisification" part. The benchmark was designed for realistic use in a node environment, where most of the libraries come callback based. Because of that a
882.
▲
by
spion
9y ago
It actually takes 30 minutes to understand how MobX works, and its really simple. I highly recommend it.
883.
▲
by
spion
10y ago
Here is what is missing now in the React ecosystem http://guides.rubyonrails.org/ Thats it. A central place with an organised list of guides. Not a blog though. Also must cover things such as redux, mobx and routers, and ho
884.
▲
by
spion
10y ago
You can use MobX from the very beginning. There just needs to be a better, "complete" guide / docs on how to structure apps with it.
885.
▲
by
spion
10y ago
addendum: turns out things are better in OCaml as well since OCaml threads will yield at not only IO but also memory allocation points.
886.
▲
by
spion
10y ago
To use words from Yaron Minsky, JS is no OCaml but it has a surprisingly decent "dynamic range", even though it doesn't look like it. (Yes, I'm pretty sure I'll end up being ridiculed for writing that, but... hear m
887.
▲
by
spion
10y ago
Flow understands this code perfectly well too. https://tryflow.org/?code=Y2xhc3MgRm9vIHsKICBmb28gPSAoKSA9Pi... You get no errors. Additionally, TypeScript's stated design goal is to not deviate from current or future E
888.
▲
by
spion
10y ago
Sorry, Flow is a different language. The fact that it reuses a JS extension doesn't matter. Adding type annotations means that the language is no longer ES.next. The only reason Babel and the surrounding tooling understands it is becau
889.
▲
by
spion
10y ago
I don't see how thats relevant? The point is that the codemod tool doesn't work on TypeScript. So you still have to fix the warnings manually. I don't think its too bad, just saying that the tool doesn't solve the proble
890.
▲
by
spion
10y ago
Interesting, I didn't expect a downvotes. If this is factually incorrect, please do point it out. I looked at the tool and it seems it only works on plan JS and Facebook's JS dialect (flowtype)
891.
▲
by
spion
10y ago
Unless you use typescript or coffeescript. In which case you're on your own.
892.
▲
by
spion
10y ago
Isn't there option (3) as well? Which would be, writing classes the old way, using prototypes and something like `util.inherits`
893.
▲
by
spion
10y ago
> Most programmers who attack C at the moment are frontend web javascripter kids and rust/functional language snobs, who both never used C and keep repeating the same stuff. Having half-baked information on how C sucks is better tha
894.
▲
by
spion
10y ago
I don't think the reactions and comments were meant as an attack on curl, but more as an attacks on C. Most programmers who attack C have seen the consequences of a memory-unsafe, type-unsafe language dominating systems programming thr
895.
▲
by
spion
10y ago
Is the problem portability though? Or is it stable ABI / easy interoperability? What good is a fancy language when at the end you would still expose low level API and headers specifying functions that take unsafe pointers to raw memory
896.
▲
by
spion
10y ago
Speed is more or less the same here...
897.
▲
by
spion
10y ago
So how is it worse?
898.
▲
by
spion
10y ago
Yes, TS does have limits. Its still very expressive compared to most mainstream type systems.
899.
▲
by
spion
10y ago
I believe that one area where TS could stand some improvement are multi-package projects. https://github.com/Microsoft/TypeScript/issues/3469
900.
▲
by
spion
10y ago
Oops sorry - I meant that tongue-in-cheek as realised I was getting too defensive.
More ›