Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
bcherny
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
35 ms
·
421.
▲
by
bcherny
8y ago
I’d love to see examples for those, maybe drop a comment when you run across a specific issue.
422.
▲
by
bcherny
8y ago
Totally agreed. The reason to have variance annotations is the language becomes unusable without them. Thats why so many languages with object subtyping support them.
423.
▲
by
bcherny
8y ago
Hey, that’s an interesting thought! If you go all the way and make it sound with variance annotations, banning asserts & under specified types, etc. then you end up with a language that sucks to use in practice. If you go to the other e
424.
▲
by
bcherny
8y ago
What sorts of things do you have trouble expressing with the type system?
425.
▲
by
bcherny
8y ago
Friends and family mostly. Also the food and weather are hard to beat.
426.
▲
by
bcherny
8y ago
What's the $1M equivalent for the Bay Area?
427.
▲
by
bcherny
8y ago
Check out Undux effects - they're exactly that. https://undux.org
428.
▲
by
bcherny
8y ago
Yeah, I'm not sure what kinds of data Google might get from being a DNS resolver that it doesn't already get from people using Google Search. Maybe competitive analysis (like, to get rough real time numbers of people that use Bing
429.
▲
by
bcherny
8y ago
I recall a project (out of MIT I think) that used category theory and knowledge mapping to discover isomorphism between the knowledge graphs of different fields like math, physics, and economics.
430.
▲
by
bcherny
9y ago
It’s a good question. Practically speaking, no. The US has done some pretty Machiavellian stuff to kick out immigrants before (eg. See the Mexican expulsion in the 1930s). It’s hard to justify that kind of thing given the really limited har
431.
▲
by
bcherny
9y ago
That’s true, but ostensibly you only use it in places where you expect nulls and don’t intend to debug anything. That’s why Smalltalk, C#, CoffeeScript, and probably JS and TS soon have null chaining.
432.
▲
by
bcherny
9y ago
It’s certainly a statement about our society that we talk about who “deserves” and doesn’t deserve to be deported (not just you, but others and even NPR use that choice of words). As if being deported is a punishment - like prison - for tho
433.
▲
by
bcherny
9y ago
This is a really neat idea, and is a lot more ergonomic than nulls or optionals in JS. Until optional chaining makes its way into the spec [0], this is the cleanest way I’ve seen to operate on maybe-null values. [0] https://githu
434.
▲
by
bcherny
9y ago
And if you’re using TypeScript, theres also TSOption https://www.npmjs.com/package/tsoption
435.
▲
by
bcherny
9y ago
If you want less boilerplate and type safety, consider Undux - https://github.com/bcherny/undux
436.
▲
by
bcherny
9y ago
A bit buried - V8 also supports tracing DOM-related memory leaks (exposed in devtools)! https://v8project.blogspot.com/2018/03/tracing-js-dom.html?m...
437.
▲
by
bcherny
9y ago
If FB (or any other app) could record your phone's mic without you knowing, that would be a GIANT security issue on Apple/Samsung/etc.'s part. As any app developer knows, you need to explicitly request permission to reco
438.
▲
by
bcherny
9y ago
I mean, if you can trade your meat coupons for cash, why not just use cash in the first place?
439.
▲
by
bcherny
9y ago
I mean, average portfolio size for Robinhood users is probably in the $1k-10k range. How much does your 22 year old cousin care whether she pays $325.60 or $325.62 for a share of TSLA? For individuals it’s negligible, but for the HFT firms
440.
▲
by
bcherny
9y ago
Can you talk more about that? Are you saying those studies haven’t been replicated?
441.
▲
by
bcherny
9y ago
This is a super interesting piece of behavioral economics in action. We know from Prize Linked Savings Accounts that people prefer a really small change of winning a lot to a really high chance of winning a little. [0] [1] > The new prog
442.
▲
by
bcherny
9y ago
What about them?
443.
▲
by
bcherny
9y ago
Could you explain for the uninitiated?
444.
▲
Ask HN: Good Asciidoc editor for OS X?
2 points
by
bcherny
9y ago
|
1 comments
445.
▲
by
bcherny
9y ago
Great work Kevin, and everyone else involved in Long Now! For those who aren't familiar, Long Now is a non-profit dedicated to long term thinking (on 10,000+ year timescales).
446.
▲
by
bcherny
9y ago
If you have some JavaScript code, it goes through a few phases as it's evaluated by your browser: 1. Parsing 2. JIT optimizing 3. Compilation to bytecode 4. Re-optimization as the program runs Steps 1 and 2 are expensive, and there are
447.
▲
by
bcherny
9y ago
I've been thinking about this problem a lot lately: does there exist an isomorphism between high level languages, such that you can map their ASTs and type systems back and forth?
448.
▲
by
bcherny
9y ago
Prepack is one of the coolest ideas to come out of FB OSS. The idea is to run your JS program as part of compilation, evaluating it as much as you can. Then take what's left in the heap and serialize it back to JS. Then ship that to br
449.
▲
by
bcherny
9y ago
Note that TypeScript and Flow have implemented sum types since this post was published.
450.
▲
by
bcherny
9y ago
Presumably, the point of using WASM and service workers is for performance, but I see no benchmarks. I also have trouble imagining that this actually improves performance, unless you’re doing all of your compute in the browser and it’s CPU
More ›