Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
OskarS
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
73 ms
·
781.
▲
by
OskarS
7y ago
Yeah, "vipe" from moreutils (which is a package on most platforms) does this. It inserts $EDITOR (usually vim) into the command pipe, and allows you to review and/or edit the text before passing it on to the next thing in the
782.
▲
by
OskarS
7y ago
I've had a compiler error that was very sneaky and only happened in certain build configurations. Because it was a compiler error, it was caught before heading into production, but it happened just before the final build, so it lead to
783.
▲
by
OskarS
7y ago
Presumably because the thing they're benchmarking is in a single translation unit, so LTO wouldn't matter. And it might screw up the benchmark if the C++ code was optimized between the "test harness" translation unit and
784.
▲
by
OskarS
7y ago
It's a really rather advanced use of typography (making borders) for such a simple machine that didn't even have parentheses. But yeah, it's plausible, and I like the authors theory that it was intended to be a vertical bar,
785.
▲
by
OskarS
7y ago
Ah, excellent :) that looks much nicer!
786.
▲
by
OskarS
7y ago
From the screenshot, my one big complaint is that it's typeset ragged right instead of flush right (which is, generally, how books and most ebook readers do it), but I suppose that's just a CSS fix, then?
787.
▲
by
OskarS
7y ago
Very well said, exactly my opinion as well.
788.
▲
by
OskarS
7y ago
You know, when XML looks like this, I don't mind it so much: <Employee name="Michael Scott" title="Regional Manager"> <Employee name="Dwight Schrute" title="Ass. Regional Mgr"
789.
▲
by
OskarS
7y ago
Prolog does have that reputation, but it's undeserved. It's incredibly fun to both learn and develop in, and it's very enlightening to learn this alternate model of computation. Prolog is awesome.
790.
▲
by
OskarS
7y ago
Of course it's still relevant. As long as dynamic loading is relevant, stable ABIs are relevant. If someone finds a security bug in OpenSSL (Heartbleed, for instance), you only need a single update to the OpenSSL libs to fix every prog
791.
▲
by
OskarS
7y ago
It's perfectly reasonable to say that a company of Apple's magnitude should invest in making sure their APIs are well documented. We're not talking about OSS projects with donated developer time.
792.
▲
by
OskarS
7y ago
It's true, there's no way of getting around it. There are four requirements here: 1. Stable ABI 2. A library that can change the size of its opaque struct 3. Stack allocation of the opaque struct 4. Statically sized stack frames (
793.
▲
by
OskarS
7y ago
In the linked post, the author tests Futhark running on the CPU without any parallelism or low-level optimizations, and it still beat GNU wc. Fair enough about apples to oranges, but it was really distasteful to me that the top comment on t
794.
▲
by
OskarS
7y ago
Fair enough, but I'm honestly really enjoying this little round of programming language bragging. It's fun to see these smallish (well, Haskell is pretty big) languages all duke it out over how to solve this problem. Like: yeah, n
795.
▲
by
OskarS
7y ago
I mean, Futhark certainly can. The whole point of Futhark is that it's a functional language that can run on GPUs. Futhark will beat the pants off of C for most any problem that is suitable for GPU computation, even if written in an en
796.
▲
by
OskarS
7y ago
That would be another fun version of this: “each commit is smaller/larger than the previous commit”
797.
▲
by
OskarS
7y ago
That does make sense, but given that the task is not solving anything "outside" the physical process itself, it still feels unfulfilling. Using my (maybe wrongheaded) analogy: it feels like "we built a lamp to simulate what h
798.
▲
by
OskarS
7y ago
I don't understand nearly enough of this stuff, but this section sounds... weird: Each run of a random quantum circuit on a quantum computer produces a bitstring, for example 0000101. Owing to quantum interference, some bitstrings are
799.
▲
by
OskarS
7y ago
I don’t think you need to go that low level. I find it much easier to optimize around things like memory layout, allocation patterns and cache effects even in Java and C# compared to (essentially) any functional language. I think this is ju
800.
▲
by
OskarS
7y ago
But... but... you can't "pick a number uniformly distributed in (-inf, inf)". Like, that's not a thing that is possible [0], so saying anything about the probabilities once you've done so is not reasonable. You ca
801.
▲
by
OskarS
7y ago
The idea is that your fingers should leave the home row as little as possible while editing . I'm not saying that you should glue your hands to your desk, I'm saying that while in the flow of editing, your hands should remain in
802.
▲
by
OskarS
7y ago
Your last line there is really one of the big keys. No other language is as easy to embed and interface with C/C++. The only real exceptions are some varieties of Lisp, but the "easily embeddable" ones tend not to be as matur
803.
▲
by
OskarS
7y ago
As a person who spends his days writing Lua, it absolutely applies.
804.
▲
by
OskarS
7y ago
Wow, really? So it’s essentially impossible to use this for proprietary software? I knew about the server stuff, but I didn’t think the AGPL bound compiled programs to the terms of the compiler. If I use an AGPL text editor, does my written
805.
▲
by
OskarS
7y ago
I read that piece of advice when I started using Vim, and I'm very happy i did exactly that. If you're skittish about using Vim in the first place, then sure, it's a pretty bad idea to tell someone to disable arrow keys, but
806.
▲
by
OskarS
7y ago
constexpr functions are not inlined in debug builds. They can't be: the whole point of debug builds is that you can attach a debugger and step through the code. Illustration, compare the assembly for "foo1" and "foo2&quo
807.
▲
by
OskarS
7y ago
Of course it will be impacted. Libraries like these are "zero-cost" only because of very aggressive inlining (not generally available in debug builds), otherwise all its operations happen in subroutines. Operator overloading is th
808.
▲
by
OskarS
7y ago
We absolutely do, but it’s significantly harder to debug. Functions are inlined, variables are eliminated, loops unrolled, etc. But yeah, very often it’s basically the only option, running an optimized build with debug symbols. This is why
809.
▲
by
OskarS
7y ago
Yes, that’s what I mean. And before you say ”debug performance doesn’t matter”: yes it does. I work in gamedev and it’s a huge problem that C++ has such awful debug performance, because it’s hard to debug a game if it’s running in single-di
810.
▲
by
OskarS
7y ago
At this point, when I see libraries like this all I can think is ”oh good, my compile times aren’t long enough, lets make EVERY INTEGER a template”. Also, while I can reasonably beliveve that most of the overhead goes away at -O2 or -O3, th
More ›