Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jonathrg
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
14 ms
·
151.
▲
by
jonathrg
3y ago
No, I think it's written like that on purpose.
152.
▲
by
jonathrg
3y ago
whats the rationale for writing technical documentation like its a series of casual text messages
153.
▲
by
jonathrg
3y ago
Link to the actual thing https://scratch.mit.edu/projects/892602496
154.
▲
by
jonathrg
3y ago
Fine by me
155.
▲
by
jonathrg
3y ago
Languages where there has been significant modernization and progress, but where codebases and online resources lag behind: CMake, PHP, CSS
156.
▲
by
jonathrg
3y ago
Seems like the level 5/level 6 charmander split could be avoided by just losing on purpose by using growl.
157.
▲
by
jonathrg
3y ago
How can I download my notebooks on a free account? The internet says to use the desktop app, but I can't log in there without upgrading.
158.
▲
by
jonathrg
3y ago
I thought that was how you changed the chord at that position
159.
▲
by
jonathrg
3y ago
What does mainlining mean in this context?
160.
▲
by
jonathrg
4y ago
Such a strange, unhelpful and speculative thing to say
161.
▲
by
jonathrg
4y ago
It's all out in the open my dude https://github.com/orgs/wokwi/repositories
162.
▲
by
jonathrg
4y ago
That's not really what I mean (I meant that it's not going to result in any difference in which system calls are made etc). If you flush manually, the runtime-provided routine that closes all streams (see e.g. https://w
163.
▲
by
jonathrg
4y ago
Strictly speaking yes (or the "C++ version" could replace std::endl with \n), but the observable behavior isn't going to change much. The runtime is going to flush the output buffer at program exit anyway.
164.
▲
by
jonathrg
4y ago
> What we are testing by running these programs is the overhead due to the choice of programming language. That's just wrong. The first example is a perfectly fine hello world in C++. This is overhead due to the choice of API used t
165.
▲
by
jonathrg
4y ago
If I understand the implementation section of the proposal correctly, the preprocessor will just add ome cast to (const char*) per function call (assuming the innermost argument is const). Nothing exponential
166.
▲
by
jonathrg
4y ago
How exactly can this lead to exponential explosion?
167.
▲
by
jonathrg
4y ago
Ow, good to know. int.to_bytes and bytes.to_int requires a byteorder argument, curious that struct doesn't
168.
▲
by
jonathrg
4y ago
I think it's nice that this will soon be possible to do without adding Python as a dependency in your build system
169.
▲
by
jonathrg
4y ago
It depends on your definition of small files. A few hundred kB to a few megabytes will make compilation speed and memory usage explode if you embed it as text, see section 3.2 in https://www.open-std.org/jtc1/sc22/
170.
▲
by
jonathrg
4y ago
You just make your array type uint8_t or whatever you need as long as it supports integer literals. See section 4 in https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3017.htm#i...
171.
▲
by
jonathrg
4y ago
Yes. There is an example in the article
172.
▲
by
jonathrg
4y ago
That's not really the right conclusion to draw from this article
173.
▲
by
jonathrg
5y ago
If you assign a lambda to a variable, you might as well use a def. A more typical use of a lambda is as an arguments to a function call. What would be the name of, say, the first argument to map(lambda x: x*2, numbers)?
174.
▲
by
jonathrg
5y ago
lambdas don't have names, how could the interpreter possibly improve in this regard?
175.
▲
by
jonathrg
5y ago
The point is that the function is created only once, like when you pass a lambda to map/filter/reduce or any function that takes a callback. The fact that it is assigned here is just a neccessary step for the timeit command to do
176.
▲
by
jonathrg
5y ago
It's interesting how the USB protocol is so flexible while also having hard-coded support for all kinds of extremely application-specific features
177.
▲
by
jonathrg
5y ago
It had been optimized (and deprecated) since then. See https://github.com/left-pad/left-pad/blob/master/index.js
178.
▲
by
jonathrg
5y ago
A warning would be nice, is there a way to implement that without changing the compiler though?
179.
▲
by
jonathrg
5y ago
These are just simple API design issues in the standard library, nothing to do with the language itself.
180.
▲
by
jonathrg
5y ago
The ban can be rolled out gradually by not including banned.h everywhere.
More ›