Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
realharo
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
15 ms
·
151.
▲
by
realharo
6y ago
I think many are if you ask them, they just conveniently forget about it in their daily lives.
152.
▲
by
realharo
6y ago
I don't think calling it a machine is implying that we understand how it works internally (to a much greater extent than we actually do). Or even that we fully understand how it tends to behave in practice, out there in the "real
153.
▲
by
realharo
6y ago
>She told me she welcomed the diagnosis of a neurobiological disorder, which confirmed her problem was ‘real’ – brought on by a physiological force external to her volition – and that it showed she’s not ‘just a slacker’. That is such
154.
▲
by
realharo
6y ago
Reminds me a bit of jsonnet ( https://jsonnet.org/ ) which didn't catch on much as far as I can tell. I see very little practical value in a DSL like this. Using an existing language with an extensive ecosystem and great
155.
▲
by
realharo
6y ago
Kind of. From a brief look, it looks very framework-y and all-or-nothing (though I could be wrong, they do have a page about gradual adoption at least https://www.pulumi.com/docs/guides/adopting/ ). I was pict
156.
▲
by
realharo
6y ago
I feel like trying to use a "dumb" declarative config language for everything is part of the problem. The domain is not simple enough for that, so you end up with all kinds of weird scripts around it all, or other templating/
157.
▲
by
realharo
6y ago
I remember one keynote where he was talking about slowing PC sales and a huge rise in iPad sales (tablets were relatively new back then). Yet he didn't credit the two most obvious reasons - market saturation (everyone already has a PC)
158.
▲
by
realharo
6y ago
>For example they might forget to put quotes around a string I wonder whether a "richer" editor/IDE, that flags such things immediately upon writing them, could greatly improve the learning experience. Many tools even po
159.
▲
by
realharo
6y ago
I very much doubt that is a major reason. Language itself is rarely the issue, unless you're reusing code from other parts of the project (which many projects are, e.g. VS Code with Monaco). I have spent far too much time on HN recentl
160.
▲
by
realharo
6y ago
I wonder whether GraalVM native image will play a bigger role in desktop apps in the future. Kotlin + TornadoFX + native-image (if it is supported) sounds like a pretty comfortable to use UI stack.
161.
▲
by
realharo
6y ago
I think eslint would flag it as well for what it's worth ( https://eslint.org/demo , you have to set it to newer ES version in the Rules configuration at the bottom of the page).
162.
▲
by
realharo
6y ago
Whether it is actually good is subjective though. There are tons of existing cross-platform UI frameworks (Qt, wx, libui, JavaFX, TornadoFX, ...). The comment above says "Everybody would jump to Swift [for new projects] if it meant a
163.
▲
by
realharo
6y ago
This is especially true with `| undefined` helping address the billion dollar mistake.
164.
▲
by
realharo
6y ago
Can you show an example of such a bug? The only thing I can think of is return value which will get flagged by TS as unreachable code (you can try it in https://www.typescriptlang.org/play )
165.
▲
by
realharo
6y ago
Based on what?
166.
▲
by
realharo
6y ago
Does it only redraw things on change, or fixed at 60 FPS no matter what? Does it redraw the whole screen, or only the parts that have changed? A lot of the screens show FPS info, so it's not immediately obvious.
167.
▲
by
realharo
6y ago
Is the type system at least as rich (or richer) than TypeScript's? Can I do stuff like `Partial<T>`, `Omit<T, K>` intersection types, etc? Is structural typing the "default"?
168.
▲
by
realharo
6y ago
Yeah, I'll edit the original comment to clarify that I mean hashes of dependencies.
169.
▲
by
realharo
6y ago
How? Say I have `script.ts`. That file exists locally on my computer and the code inside it is trusted (say it was downloaded from a trusted github project via https). It contains import { dependency } from 'http://what
170.
▲
by
realharo
6y ago
Can checksums/hashes be specified directly in the source file? EDIT: I mean hashes of dependencies. That is important for single-file scripts, if this is meant to be useful as a bash replacement for scripting. Having to download two se
171.
▲
by
realharo
6y ago
To sort of answer my own question, there is one more "leak" I forgot about - array bounds are unchecked https://github.com/Microsoft/TypeScript/issues/11122 , which can give you `undefined` (though n
172.
▲
by
realharo
6y ago
RAM's about the same, hovering slightly below 200MB (Windows shows a sum of all the different Chromium processes). Which for me is firmly in the "who cares" territory. Lightweight music apps don't have the online playlis
173.
▲
by
realharo
6y ago
I know how it works. I'm talking about practical implications . In practice, say I have type User = { name: string, email: string } let loggedInUser: User = { name: 'Bob', email: 'bob@examaple.com' }
174.
▲
by
realharo
6y ago
Yes, it is theoretically possible for a TypeScript type to be "wrong" and the underlying variable to have a different type. But there are only a few ways in which that can happen: - a bug in type definitions - a JS library with .d
175.
▲
by
realharo
6y ago
Regarding the `if`, it only makes sense to test for things that the type actually contains. So if I have a type `User|undefined`, testing `if (user === undefined || user === null)` is pointless, as `null` is not part of that type. It would
176.
▲
by
realharo
6y ago
I have never encountered issues with JS libraries lying in their type definitions (like not including `T|undefined` in the type if `undefined` is a possible return value). More often this can happen with external data (typing incoming JSON
177.
▲
by
realharo
6y ago
I'm not saying it can't be done, I'm saying it would take a lot more effort (by a huge amount, plus more in prototyping phase of development when you're trying stuff out), and in the process you will likely lose many o
178.
▲
by
realharo
6y ago
Why not? If it works ok and doesn't eat battery/CPU too much when in background, then who cares? For exapmle I like that I can plug my phone into the speakers (yay headphone jack), and control the music from a laptop on the other
179.
▲
by
realharo
6y ago
I had a similar discussion on reddit a long time ago, and posted this screenshot of various Linux music players compared to Spotify. https://i.imgur.com/K44tJ2Y.png Lots of native UIs (especially from the past) tend to all
180.
▲
by
realharo
6y ago
Another discussion from today (React Native Windows / Mac) https://news.ycombinator.com/item?id=23160075 Not web/HTML though, uses native widgets directly (mostly).
More ›