33 karma · joined Sep 6, 2011 (15y ago) · 32 submissions
comment 3y ago · link · parent
comment 5y ago · link · parent
comment 6y ago · link · parent
I'm curious what you are referring to here. Are you talking about CMOV? Or INT/SYSCALL/SYSENTER? Or just the ability to trigger a fault handler? Or semantic games like push followed by ret?
comment 6y ago · link · parent
comment 7y ago · link · parent
comment 7y ago · link · parent
Waste is one of a very short list of categories that are considered something no one wants: https://medium.com/bull-market/there-is-no-effective-fiducia...
comment 7y ago · link · parent
AFAIK, spores have not been observed in US-sourced honey, but that is no guarantee.
comment 7y ago · link · parent
I think this style is what was being referred to: https://www.amazon.com/Stansport-Aluminum-Scout-Canteen-1-Qu...
This particular item does not appear to be well made, which lends credence to the difficulty of finding a high quality product.
comment 7y ago · link · parent
comment 7y ago · link · parent
comment 7y ago · link · parent
Using a variable instead of 'foo' is a symbolic reference, so this is effectively using the symbol table as the associative array. This means that this solution also gets it wrong if your file contains a line that matches the name of a built-in variable in perl. That would be tough to debug!
If your file contains
This is the first line of the file
then during execution of ++$#$_
the result is the same as if you had written ++$#{This is the first line of the file}
So the variable @{This is the first line of the file} goes from undefined to an array of length 1, turning $#{This is the first line of the file} to 0.Incidentally, this is why the snippet fails to work for a line repeated more than once: for each occurrence of the expression, the value returned is in the sequence -1, 0, 1, 2, 3, ... so it is only false for the second occurrence.
Using preincrement instead of postincrement means the values returned are 0, 1, 2, 3, ... which means that inverting the test makes it false for every occurrence after the first.
comment 7y ago · link · parent
I believe in contemporary use it has become associated with witches, and I have seen it used as a general "occult" reference.
comment 7y ago · link · parent
Turned out that it was due to something profile related: re-registering the Windows App Store fixed the issue. Yes, that's right, a dependency on the app store can prevent you from running Calculator.
comment 7y ago · link · parent
comment 7y ago · link · parent
comment 9y ago · link · parent
comment 9y ago · link · parent
#include <stdio.h>
#include <stdint.h>
#define FIZZ(x) (x & 0x0924)
#define BUZZ(x) (x & 0x0210)
#define FIZZBUZZ(x) (x & 0x4000)
#define NONE(x) (x & 0x34cb)
void fizzbuzz(size_t n_max)
{
uint32_t x = 1;
for (size_t i = 1; i <= n_max; i++)
{
if (FIZZ(x))
printf("fizz\n");
if (BUZZ(x))
printf("buzz\n");
if (FIZZBUZZ(x))
printf("fizzbuzz\n");
if (NONE(x))
printf("%d\n", i);
x <<= 1;
x |= (x >> 15);
}
}
int main(int argc, char **argv)
{
fizzbuzz(100);
}
It's less costly than integer division, and I'm not sure it's what you had in mind. The output here still duplicates the strings.comment 9y ago · link · parent
comment 12y ago · link · parent
Will there be a way to automatically submit / advance, for those of us that would like to do them without encountering spoilers?
comment 12y ago · link · parent
Such as embedded processors, just to use an example that might be exactly the type of people who would find this challenge extra interesting.
Full disclosure: I did several of these, but the browser issue is probably what kept me from doing more. It did not run in my (admittedly outdated) browser of choice, so I had to do some Chrome wrangling, which was the opposite of fun.