Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Peaker
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
31.
▲
by
Peaker
9y ago
You can use that to make stack overflow a (relatively) graceful error instead of a segfault.
32.
▲
by
Peaker
9y ago
Then avoid blocking system calls. When you can't, defer them to a thread that can be ignored.
33.
▲
by
Peaker
9y ago
We use D fibers. When we want to cancel a fiber we throw an exception at it. When it next wakes up, it'll throw (much like sending an exception to a Python generator) -- which will make sure RAII cleanups take place and are not missed.
34.
▲
by
Peaker
9y ago
gcc supports auto-generating stack overflow checks. You can implement your own handler for a stack overflow, allowing allocation of additional stack space which can be chained to the original stack. This is how some language runtimes handle
35.
▲
by
Peaker
9y ago
When you just want line number info from DWARF -- all the existing tools are extremely slow. A simple sorted address->line table with binary search is incredibly faster. This is a very common use case. At the very least, this proves DWAR
36.
▲
by
Peaker
9y ago
Whatever information is within the line number information - it can stored in a simple, naive way - and then compressed normally. There is absolutely no justification in inventing a virtual machine with its own opcodes for this.
37.
▲
by
Peaker
9y ago
DWARF is terribly designed. It is far more complicated than it needs to be. For example, to map binary locations to line numbers -- it uses its own opcodes and registers in a custom VIRTUAL MACHINE(!!) When it could have had a simple table
38.
▲
by
Peaker
9y ago
> you could probably point out this kind of a strange feature case in nearly any language if you look hard enough I disagree. I think it's a product of bad language design.
39.
▲
by
Peaker
9y ago
This optimization changes factorial from: 5 * (4 * (3 * (2 * 1))) to: (((1 * 5) * 4) * 3) * 2 It relies on the commutative and associative nature of integer multiplication. This means it's quite a brittle optimization -- it shouldn
40.
▲
by
Peaker
9y ago
I am not familiar enough with Scala, but the C++ example certainly does not seem like dependent types. Which function in there do you consider to have a return type that depends on the value of the input?
41.
▲
by
Peaker
9y ago
I haven't used C++ in years. That may be true. In that case, it may be even more puzzling to claim that C++ has dependent types.
42.
▲
by
Peaker
9y ago
C++ and Scala don't really have dependent typing, but rather a single feature that is typical of dependent typing. That is: type-level values of any type.
43.
▲
by
Peaker
9y ago
I'd expect redundancies in analysis in the brain's NN make this impossible.
44.
▲
by
Peaker
9y ago
I mean both UIs (not specifically rails) and machine learning, and emulators, and CRUD, and even software like compilers which was already well-researched by then. These days a compiler can be whipped up by an expert in a day or two (for sm
45.
▲
by
Peaker
9y ago
All the various CI systems and scripts with hard-coded SSH-based git access will be hard to change to use HTTPS for just a few hours.
46.
▲
by
Peaker
9y ago
Did it? We are making many kinds of software easily an order of magnitude faster than we did 30 years ago.
47.
▲
by
Peaker
9y ago
You can always use a macro (or inline function, if the array is a rich wrapper type): arr(m, x, y) Not quite as nice, but not too bad.
48.
▲
by
Peaker
9y ago
This essay is an opinion piece: It claims that little accidental complexity is left and most software complexity is essential. It does not really establish its claim that the complexity is essential, yet the entire premise rests on that. I
49.
▲
by
Peaker
9y ago
For someone paranoid about correctness, that's 1% of lingering doubt about every single operation in the IDE. The 99% stat is quite likely a big exaggeration. Refactoring is far far harder to do reliably, and more straining as so much
50.
▲
by
Peaker
9y ago
I think a first build with cabal is also very slow. Haskell could solve that with binary distributions - but that requires more resources than are devoted to it, it seems.
51.
▲
by
Peaker
9y ago
Taking IO actions just to do the bind for the caller goes against the benefits you usually get from purity.
52.
▲
by
Peaker
9y ago
Doing this kind of effect sequencing in Haskell is annoying indeed. A radical library can mitigate that but that would be really unidiomatic. Could be nice to have sugar like expr[!x] that expand to: x >>= \genName -> .. expr[genNa
53.
▲
by
Peaker
9y ago
performance and safety are just 2 checkboxes. They're trying to establish that having both of those requires Rust's approach - and I think they're making a convincing argument.
54.
▲
by
Peaker
9y ago
Defined good behavior > defined bad behavior > undefined behavior. This article is about attacking the last category. Unsigned overflow is far less of a problem than signed overflow because it is defined. It is very cheap to make sign
55.
▲
by
Peaker
9y ago
But it is easy to give it a defined behavior on a particular architecture. For example, on x86-64, it can be defined to overflow just like unsigned does. The compiler can emit errors about the code if it is compiled to a different architect
56.
▲
by
Peaker
9y ago
That argument can be used to justify using assembly because you would sometimes have to drop down to assembly level when debugging native code.
57.
▲
by
Peaker
9y ago
1. The ecosystem is available via bindings too (to most transpiled languages) 2. It's still far from the state of the art in PL design and missing: * Nice static typing with type inference * Nice guarantees about null access * Nice gua
58.
▲
by
Peaker
9y ago
If you're willing to use transpilers, why stick to JS at all, when you have a wealth of languages available? Scala, Purescript, Haskell, Elm, ...
59.
▲
by
Peaker
9y ago
In all collaborative projects I've been that allowed tabs, all files that had been edited by tab users were a mishmash of spaces and tabs that made no single tab width configuration workable. If you chose tab width as 4, some parts o
60.
▲
by
Peaker
9y ago
In my experience using Parsec, it was extremely slow. Took around 20 seconds to parse a few hundred thousand lines (almost no backtracking, too). Attoparsec/parsec have very similar APIs. I wonder why it cannot parse optimistically w
More ›