Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
sltkr
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
21 ms
·
271.
▲
by
sltkr
3y ago
Good point!
272.
▲
by
sltkr
3y ago
Are you being pedantic about pedantry?
273.
▲
by
sltkr
3y ago
Should we assume the numbers are initially positive and distinct, too?
274.
▲
by
sltkr
3y ago
No, because if nbytes > sizeof(*hwrpb), your version causes the kernel to only write part of the buffer, and then when the app accesses fields at the end of the struct, it would read uninitialized data, which is very bad. Recall that the
275.
▲
by
sltkr
3y ago
Yes. And even containers running different images will share the libraries so long as they come from shared layers.
276.
▲
by
sltkr
3y ago
A docker image consists of several layers, each of which contains only the modifications to the layers below it. Each layer and the final image is immutable. Docker uses OverlayFS to provide a unified view of the various layers. A running c
277.
▲
by
sltkr
3y ago
No, because you can share common libraries across containers by putting them in a separate layer. For example, if you have a complex service that consists of multiple binaries all written in C++ using boost, then for each binary you can cre
278.
▲
by
sltkr
3y ago
They are complementary. If you want to reuse the shared parts of binaries, then you need a way to separate the binary image into parts that are specific to the application and libraries that can be reused across binary images, plus some met
279.
▲
by
sltkr
3y ago
Thanks for the correction! That's interesting.
280.
▲
by
sltkr
3y ago
> Python's behavior [..] is the common behavior. The very post we're commenting on shows that that's not true: PHP, Python, Java and .NET (C#) share one behavior (accept "\n" as "$"), and ECMAScript (Ja
281.
▲
by
sltkr
3y ago
Python violates that definition however, by allowing internal newlines in strings. For example /^c[^a]t$/ matches "c\nt\n", but according to POSIX that's not a line. I suspect the real reason for Python's behav
282.
▲
by
sltkr
3y ago
It does include those rules, just towards the end of the page. I do think it would have been clearer to mention that Renju is based on Gomoku upfront.
283.
▲
by
sltkr
3y ago
I could at least imagine a scenario along the lines of: penniless college student creates a site at a .tk domain. Later, the student gets a job so he is no longer penniless, and meanwhile, his site actually becomes popular, so he signs up f
284.
▲
by
sltkr
3y ago
> Java's HashMap is a bit different from almost every other language in that it lets you tune the load factor. I'm not sure that's particularly unusual. For example, C++ supports this too: https://en.cppreferenc
285.
▲
by
sltkr
3y ago
There is no need for the second phase. You can record the implicit declaration when you encounter it, and if there is a subsequent declaration, you can check that it's consistent or error out immediately. This is what C compilers alrea
286.
▲
by
sltkr
3y ago
This doesn't work in C because the function is not necessarily defined in the same translation unit. You'd need to do this at link time instead, which would require completely overhauling the format of object files, dynamic librar
287.
▲
by
sltkr
3y ago
I think the value of metrics like this is limited, since code base size only very roughly corresponds to implementation complexity. Here are some examples where you would increase the compressed code size while not making the project more c
288.
▲
by
sltkr
3y ago
Funnily enough that happens also when you run the original article through Google translate: > She's in the bathroom at home, but she's part of a large-scale cyber attack. The electric toothbrush is programmed with Java, and cr
289.
▲
by
sltkr
3y ago
That's a lot of words to say: “encode 126 random bits in base64 (url-safe variant)”. It seems the algorithm is equivalent to: function nanoid(alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_")
290.
▲
by
sltkr
3y ago
I think the site requires you to pick something unique (???). For me, entering AAA doesn't work but entering HJFDKFDSGHK works.
291.
▲
by
sltkr
3y ago
Fair enough, comparisons are dangerously close to arithmetic and we can't have any of that.
292.
▲
by
sltkr
3y ago
Yes but you would only need to visit 32 of them, so it would run much faster (around a hundred million times faster).
293.
▲
by
sltkr
3y ago
The page has some weird horizontal scrolling going on. I think it's because the body style has both `width: 100%` and a nonzero margin. You should probably set margin and padding to zero on the body tag if you need width, or just remov
294.
▲
by
sltkr
3y ago
> It's the JS part of JSON that imposes non-duplicate keys with undefined order constraint. Actually since ES2015 the iteration order of object properties is fully defined: first integer keys, then string keys in insertion order, fi
295.
▲
by
sltkr
3y ago
Why?
296.
▲
by
sltkr
3y ago
It's a combination of things that screams fiction: 1. Most stories about lesbians that aren't attributed to a definitely female author are written by males. 2. It seems unlikely someone so pedantic to keep full records of their pa
297.
▲
by
sltkr
3y ago
Is it really 0-10 if you also use decimals? The protagonist got a 6.5 for love-making. At that point you might as well use a 0-1 scale (0.65), or a percentage (65%).
298.
▲
by
sltkr
3y ago
blog < /dev/random
299.
▲
by
sltkr
3y ago
I can't get the site to load either. It's probably overloaded. Archive.org has a copy though: https://web.archive.org/web/20231201001803/https://blog.marc... Not that there is a lot of content
300.
▲
by
sltkr
3y ago
Fair guess, but I'm not actually in the Netherlands, and not in a Dutch speaking country at all.
More ›