12,395 karma · joined March 23, 2009
I hang out a lot on Stack Overflow: http://stackoverflow.com/users/28169/unwind, mainly answering questions about C. I love C.
As someone who has written embedded firmware for many years (not for PCs), I can only dream of an end user being this capable to discover a bug. I want to live in the world where Asus immediately send an e-mail offering some kind of short-term contracting work to fly in and talk to their firmware people for a few days and get $FIVE_FIGURES or something, and leave with an updated laptop running their new production BIOS.
Obviously this bug has gone un-fixed for four years so that is not the world we're in. That makes me sad. :|
Edit: s/fix/fix proposal/.
When GTK+ was released in the late 90s, combining my love of C programming with a newfound home in Linux and GTK+'s ability to make complicated graphical interfaces resulted in a dual-pane file manager. It was a great project.
I thought that was the role of Enlightenment [1] but I guess I'm just old. :)
The exact box in the article (it had a link!) has the following ingredients listed:
Enriched Flour Bleached (wheat flour, niacin, iron, thiamin mononitrate, riboflavin, folic acid), Sugar, Corn Syrup, Cocoa Processed with Alkali, Leavening (baking soda, monocalcium phosphate, sodium aluminum phosphate). Contains 2% or less of: Modified Corn Starch, Palm Oil, Corn Starch, Propylene Glycol Mono and Diesters, Monoglycerides, Salt, Dicalcium Phosphate, Sodium Stearoyl Lactylate, Xanthan Gum, Cellulose Gum, Carob Powder, Artificial Flavor.
Now I've been interested in cooking for 30+ years, and do all of our home cooking and baking, and there's no way I would believe that I can substitute typical from-scratch/pantry ingredients and get the same result.
Digestives [3] are the typical substitution in my experience, but again nobody knows how close they're getting. They look thicker, to me ...
[1]: https://en.wikipedia.org/wiki/S%27more
GTK doesn't implement garbage collection, you need to clean up by destroying widgets and other resources that you have created. Of course, the operating system will free all resources used by your process when it ends, so that kind of final cleanup is often omitted (and even more so in example code).
The situation might be different here though since there has been a rather long-running and high-profile conflict between Tesla and the unions, on top of all the other madness.
Bug report: There's a typo in the actual popup as shown to me, it says "extention". Consistently enough, the typo is present in the code snippet in the article:
if (!document.cookie.includes("notice-shown")) {
document.getElementById("ad-note-hidden").id = 'ad-note';
document.getElementById("ad-note-content-wrapper").innerHTML = "No adblocker detected. " +
"Consider using an extention like <a href=https://ublockorigin.com/>uBlock Origin</a> to save time and bandwidth." +
" <u onclick=hide()>Click here to close.</u>";
}The first image which looks like some kind of music-making hardware ("instrument") looked a lot like the OP-1 by Teenage Engineering [1]. That would be an interesting partnership, right?
This:
size_t count = 0;
/// ... code to actually count elided ...
printf("Found %ld 10s\n", count);
is wrong, since `count` has type `size_t` you should print it using `%zu` which is the dedicated purpose-built formatting code for `size_t` values. Also passing an unsigned value to `%d` which is for (signed) `int` is wrong, too.The (C17 draft) standard says "If any argument is not the correct type for the corresponding conversion specification, the behavior is undefined" so this is not intended as pointless language-lawyering, it's just that it can be important to get silly details like this right in C.
It's probably just trying to complain about printers (a computer-user pastime probably about as old as ... printers) in a humorous way.
This part:
The one thing I’m left scratching my head over is the length field. If I have 0x20 bytes of image data to send over, I actually need to put 0x10 into that field.
Made me think the protocol simply assumes at least 2 bytes will always be used, so it transmits the length using the unit of 16-bit "words" instead of bytes. That would not be unheard of, and is kind of smart even.
Longfin eels are long-lived, migrating to the Pacific Ocean near Tonga to breed at the end of their lives. They are good climbers as juveniles and so are found in streams and lakes a long way inland.
The concept of "red licorice" [1] is simply ... foreign. :) It's also fun and interesting as a word/food, since it focuses on the texture of a food and re-uses the word, even though the word is tightly coupled to the flavor.
[1]: https://en.wikipedia.org/wiki/Liquorice_(confectionery)#Red_...
If I recall correctly, only Return caused an evaluation attempt, while Enter merely added a line break for readability.
[1]: https://en.wikipedia.org/wiki/Martian_canals#Supposed_%22dis...
Next simple task would be to fill the complete framebuffer with a solid colour:
memset(f->buf, rgb, f->width*f->height*sizeoof(uint32_t));
The first is the obvious typo around `sizeof`, which I didn't even see at first (edit: this).The second is that code will only work for 8-bit colors, i.e. only the 8 (technically CHAR_BIT, "a byte") least-significant bits of `rgb` will be used. This is a quirk of the `memset()` standard C function, which has the prototype:
void *memset(void s[.n], int c, size_t n);
but then the man page [1] says:The memset() function fills the first n bytes of the memory area pointed to by s with the constant byte c.
[1]: https://www.epiroc.com/en-uk/products/drill-rigs/face-drill-...
My favorite part of the system in larger stores is that to handle people not carrying cash (Sweden is pretty long-gone in this regard), you can usually go inside the store to get a free plastic token that fits the reader.
That always made me chuckle, since the entire point of the system is that you're supposed to be incentivized to return the cart to get your money back, so by replacing your money with a free plastic token that they hand out from a basket, they did .. something to the overall system design.
Still fun as an example of how the customer's overall experience is more important than the point of an entire security system, I think.