@DLosc man this is actually an interesting read.... and shows how much of a nerd I am, if I'm finding a programming manual published decades before I was born interesting
i mean you can't categorically say that decades old programming manuals would be boring to the average person because i refuse to believe anyone would fail to appreciate the intercal manual
@forest I don't know too much about the subject, but, e.g., Intel shows the number of cores, and the number of threads. Wouldn't that be the second one?
I remember when Spectre was discovered, that was the first major vulnerability sort of thing I was old enough to actually be able to read about and stuff
But yeah, Spectre is pretty incredible. And the fundamental problem has not been solved. It still plagues modern hardware, and new attacks are discovered all the time. And for some nightmare fuel: rowhammer is not mitigated either. :P
Random JavaScript question: what's the best way to differentiate between 0 and -0? (For whatever definition of "best" you like--golfy, idiomatic, efficient, etc.)
To be fair, other than the difficulty of telling 0 from -0, JavaScript's signed zero/Infinity/NaN system is very sensible and does exactly what I'd expect it to.
Meanwhile Python very sensibly has 0.0 == -0.0 and 0.0 is not -0.0, but it won't let you divide by 0.0 even though it supports floating-point infinity. :P
Signed zero is zero with an associated sign. In ordinary arithmetic, the number 0 does not have a sign, so that −0, +0 and 0 are identical. However, in computing, some number representations allow for the existence of two zeros, often denoted by −0 (negative zero) and +0 (positive zero), regarded as equal by the numerical comparison operations but with possible different behaviors in particular operations. This occurs in the sign and magnitude and ones' complement signed number representations for integers, and in most floating-point number representations. The number 0 is usually encoded as +0...
@hyper-neutrino we just got a first answer like half an hour ago, and after seeing it i decided to check the review queue, and it was actually there, but simply clicking on it (without doing anything to the review task) made it disappear from the queue when i accidentally closed the tab and wanted to get back to it
it could be nice for leaning into how python's sort of found itself as the host language for a bunch of important domain-specific libraries without actually being built for those things
alternatively it could create a horrible explosion of macro layers on top of libraries making everything impossible to read and causing the downfall of science as we know it
Or Fix American Kennel Club's database
As covered by the recent video by Matt Parker, the American Kennel Club permits thirty-seven (37) dogs of each breed to be assigned the same name (source), because of a database restriction for Roman numeral length.
Given an integer, your task is to output t...
I solved Semantle #80 in 92 guesses. My first guess had a similarity of 4.38. My first word in the top 1000 was at guess #36. My penultimate guess had a similarity of 29.11. semantle.novalis.org
I solved Semantle #80 in 36 guesses. My first guess had a similarity of 5.97. My first word in the top 1000 was at guess #16. My penultimate guess had a similarity of 60.44 (953/1000). semantle.novalis.org
A prompt like Determine if the following sentence is understandable to a wide audience: with the P/FP turned up + stop sequence of true or false should work
def reshape(lst, dimensions):
"""Reshape a list of lists to a given number of dimensions.
>>> reshape([1, 2, 3, 4, 5, 6], (2, 3))
[[1, 2, 3], [4, 5, 6]]
"""
return [lst[i:i+dimensions[1]] for i in range(0, len(lst), dimensions[1])]
I told GPT3 to generate 5 tips for code golfing: 1. Use built-in functions whenever possible. 2. Avoid using global variables. 3. Use list operations whenever possible. 4. Use vector operations whenever possible. 5. Use functional programming whenever possible.
There is no definitive answer to this question as it depends on personal preferences. However, some of the most popular golfing languages include English, Spanish, German, French, and Japanese.
What are the 5 best golfing languages for code golf?
There is no definitive answer to this question, as it depends on the individual preferences of the code golfers. However, some of the most popular golfing languages among code golfers include Perl, Python, Ruby, Java, and C++.