|
Is Imperial dateTime different from Metric ?
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
Very. We have to wait until the 31st April for Pi day. Every year, I get ready to celebrate, then... nothing.
|
|
|
|
|
Yes but it happen only on double leap years
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
Children learning mathematics must thank the Indiana legislature.
For, they once attempted to legislate that pi is equal to 3, greatly simplifying many calculations.
Unfortunately, some eggheads intervened and the legislation was dropped from consideration.
|
|
|
|
|
Murray Walker: Formula 1 broadcasting legend dies at 97 - BBC Sport[^]
If you don't know who he was, he was the commentator on F1 races for decades, and was famous for his ... um ... helpful comments:
Quote: The lead car is unique, except for the one behind it which is identical.
Quote: And now, excuse me while I interrupt myself.
Quote: And that just shows you how important the car is in Formula One Racing.
Quote: There are seven winners of the Monaco Grand Prix on the starting line today, and four of them are Michael Schumacher.
and how could we forget:
Quote: There's nothing wrong with the car except that it's on fire.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
and
|
|
|
|
|
We need somebody with his sense of humor to spruce up the extremely boring Nascar races!
Get me coffee and no one gets hurt!
|
|
|
|
|
It'd still be boring, because it's just a bunch of cars going around an oval.
|
|
|
|
|
How about adding some curves?
Preferably in both directions.
|
|
|
|
|
Quote: Preferably in both directions Having those cars travel in both directions will quickly lead to the elimination of many drivers!
Get me coffee and no one gets hurt!
|
|
|
|
|
Demolition derby.
|
|
|
|
|
Comedian?
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Not intentionally. But his enthusiasm and passion, his lack of inhibition when behind the microphone, his sheer excitement with racing, would surely make anyone smile - even with no interest in motor sport. When he retired from commentating the viewing ratings dropped significantly. After that I watched it for Martin Brundle's pit walk before the race, and then the first two and last couple of laps only.
|
|
|
|
|
Any relation to Yogi Berra [^]?
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
He had a voice I grew up with, I remember his voice on weekend television the 70's and 80's.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
I'm doing a bunch of metaprogramming but I am targeting devices where the code space is limited, so I can't have a bunch of dead code in my final (ELF) binaries.
If I optimize, but keep symbols is there a tool out there any of you know of that will allow me to examine what of my "user code" (excluding the stdlibs, as long as I don't call them) gets generated? I don't care whether it needs to examine object files or not, that's fine.
Basically I'd like to look through an optimized binary (or the .o files it generated) to find out what the compiler didn't manage to optimize out in terms of leftover code from all the template witchcraft.
I know i can dump the assembly of the relevant .o file but i want something that cross references for me.
Thanks in advance.
Real programmers use butterflies
|
|
|
|
|
The lss and map files don't help?
|
|
|
|
|
|
|
I assume you already use all them GCC flags:
"When compiling -ffunction-sections and -fdata-sections, when linking -Wl,--gc-sections,--print-gc-sections "
from that unmentionable source.
The link just above it suggests analysing the exportable AST from Clang. Now that sounds like your kind of project!
I would've thought such a tool is easier to base on the AST (i.e. static code analysis) than the final code, optimzed or not. But then I might be missing something.
"If we don't change direction, we'll end up where we're going"
|
|
|
|
|
Curtis & Leroy saw an ad in the loal paper and bought a mule for $100.
The farmer agreed to deliver the mule the next day.
The next morning the farmer drove up and said, "Sorry, fellows, I have some bad news, the mule died last night."
Curtis & Leroy replied, Well, then just give us our money back."
The farmer said, "Can't do that. I went and spent it already."
They said, "OK then, just bring us the dead mule."
The farmer asked, "What in the world ya'll gonna do with a dead mule?"
Curtis said, "We gonna raffle him off." The farmer said, "You can't raffle off a dead mule!"
Leroy said, "We sure can! Heck, we don't hafta tell nobody he's dead!"
A couple of weeks later, the farmer ran into Curtis & Leroy at the Piggly Wiggly grocery store and asked.
"What'd you fellers ever do with that dead mule?"
They said, "We raffled him off like we said we was gonna do."
Leroy said, "Shucks, we sold 500 tickets for two dollars apiece and made a profit of $998."
The farmer said, "My Lord, didn't anyone complain?"
Curtis said, "Well, the feller who won got upset. So we gave him his two dollars back."
|
|
|
|
|
Mike Hankey wrote: made a profit of $998. $898. FTFY.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
It's that southern math, he ran out of fingers and toes.
|
|
|
|
|
If he can't count to 1024, he's got less than 10 fingers and toes in total.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
My graphics library for embedded devices has to deal with pixel formats I don't know ahead of time because the devices are diverse, and in order to be efficient pixels must be represented in their native bit format at all times. In other words, a pixel should store its values in whatever underlying format best suits the device or data stream
To complicate things, not all channels are color channels, (think alpha channel for transparency) and not all channels are the same bit width. (rgb565 16 bit color for example)
There are also totally weird ones that are common like rgb666/18 bit format (262,144 colors)
And not all devices use the same byte order in their streams.
To complicate things further, not all devices use an RGB color model. To my surprise I found out that some devices are BGR, regardless of byte order. Meanwhile, JPEGs are (IIRC) CMY or CMYk! Also critical because that's the input format from cameras, which are commonly used with these devices.
What is a pixel?
It's color space, which includes color model. It's binary layout. It uses potentially highly heterogenous channels for its data.
A pixel is as complicated as a unicode character!
And I can't be messing with most of this in RAM, nor at runtime. Nope, most of it needs to be not only resolvable at compile time, but the dead code generated from all the metaprogramming involved needs to be removable by the compiler to avoid code bloat on these tiny devices.
One example is retrieving values, which I have generic getters and setters for (using metaprogramming) that generate the necessary masks and shifts at compile time based on the variable series of pixel_channel_traits you gave it and channel index, each which have their own bit depth, so retrieving and setting the channels individually gets complex.
My code can resolve it all at compile time. I feel like a hero.
I wouldn't need to do this if there was some sort of unified driver model for these things.
But all the meta programming in C++ is cool. I really hadn't caught up with C++11 variadic templates and such until now. They're neat!
An rgb565BE pixel definition:
typedef pixel_channel_traits<uint8_t,5,pixel_channel_kind::color> color5_channel_traits_t;
typedef pixel_channel_traits<uint8_t,6,pixel_channel_kind::color> color6_channel_traits_t;
typedef pixel_traits<
uint16_t, pixel_color_model::rgb,
false, color_5_channel_traits_t, color_6_channel_traits_t, color_5_channel_traits_t> rgb565be_traits_t;
This actually generates proper getter and setter methods off the int_type, and gives you a union between the int type, and an array of bytes representing the data. It's complicated and weird code - and all of the pixel template classes (above are *trait* classes associated with the pixel template classes) which add indexed getter and setter methods for the channels that get/set a floating point value between 0 and 1, so you can operate on them generically regardless of format if you need to which is useful for things like color conversion.
Real programmers use butterflies
modified 13-Mar-21 5:29am.
|
|
|
|
|