|
Wordle 1,158 3/6*
β¬π¨π¨β¬π¨
π¨π¨β¬π¨β¬
π©π©π©π©π©
Happiness will never come to those who fail to appreciate what they already have. -Anon
And those who were seen dancing were thought to be insane by those who could not hear the music. -Frederick Nietzsche
|
|
|
|
|
Wordle 1,158 3/6
π¨π¨β¬β¬π¨
π©π¨β¬π¨β¬
π©π©π©π©π©
Ok, I have had my coffee, so you can all come out now!
|
|
|
|
|
Wordle 1,158 3/6*
π¨β¬β¬β¬π¨
β¬β¬π¨π©β¬
π©π©π©π©π©
|
|
|
|
|
Wordle 1,158 4/6
β¬β¬π¨β¬π¨
β¬π©π¨β¬π©
π©π©π¨β¬π©
π©π©π©π©π©
Within you lies the power for good - Use it!
|
|
|
|
|
I had been struggling coming up with a common interface for loading images in my graphics library.
One method, use by the JPEG decoder for example, is to provide you with a series of small bitmaps to draw until the entire image is rendered.
PNG and SVG are different, with PNG being a bit more weird. I've reduced their common functionality to a "fill" function. Instead of a bitmap, you get a color and a rectangle to fill with that color.
struct image_bitmap_data final {
gfx::spoint16 location;
const gfx::const_bitmap<gfx::rgba_pixel<32>>* region;
};
struct image_fill_data final {
const gfx::srect16* bounds;
gfx::rgba_pixel<32> color;
};
struct image_data final {
bool is_fill;
image_bitmap_data bitmap;
image_fill_data fill;
};
That's not so bad. It's not my ideal. I'd have liked to use a union for fill_data vs bitmap_data, and is_fill should be "type" and be an enum struct but it made the constructor for the overall type non-trivial so I had to go this route.
At any rate, it took me over 24 hours to come up with this, because I was too busy trying to figure out how to break down the functionality using multiple callback methods instead of one that takes a type that itself is hybrid.
Tunnel vision is such a time sink. It's my Achilles heel when it comes to coding. I'm normally very fast, even in the design phase, but I get so easily hung up on the simplest decisions because I get myself in an intellectual box.
The devil as always, is in the details.
24 hours for about 10 lines of code. meh.
It's over now though, and that feels good.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
"Much becomes obvious in hindsight, ... Yet it is striking how in both physics and mathematics there is a lack of Βproportion between the effort needed to understand something for the first time and the simplicity and naturalness of the solution once all the required stages have been completed." - Giorgio Parisi, recipient of the 2021 Nobel Prize in Physics
|
|
|
|
|
Not sure what prompted me to watch the movie .
Here is a snippet to share :
when you get where you go after you die, they will ask you two questions
1. did you enjoy your life ?
2. did you contributed to somebody to enjoy his life?
Cheers
|
|
|
|
|
3. What did you do to people just to piss them off?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
4. Can you please remove your virtual reality glasses and give them to me?
|
|
|
|
|
One more question they ask:
"Welcome to hell. How was the experience of heaven?"
|
|
|
|
|
Amarnath S wrote: Welcome to hell.
At least I'll know everyone.
A home without books is a body without soul. Marcus Tullius Cicero
PartsBin an Electronics Part Organizer - Release Version 1.4.0 (Many new features) JaxCoder.com
Latest Article: EventAggregator
|
|
|
|
|
|
why not?
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
|
Hope y'all don't mind me yapping about Zig. I need peeps to talk to about it, so y'all must suffer.
But, forget generics (which Zig can simulate via comptime), but this whole comptime concept is like... crazy. I'm still a n00b at it, but... let me just show you a code example.
fn bruh(comptime T: type, comptime size: usize) [size]T {
var sequence: [size]T = undefined;
// do stuff
return sequence;
}
The first parameter T is just Zig's way of doing generics, but that's not the cool part. I mean it's cool, but ya know... it's about to get wild with the second parameter size . Since this variable is marked as compile time, you can do things like assign a new array of T on the stack... with a variable size! And, same goes for the return value of the function... like what?
I pass into the size parameter a value of 42, the function will return an array of T with 42 items... from a input variable... on the stack.
Edit: I should say, Zig's array syntax is []type and not type[] . Beats me as to why; guess they're dyslexic.
Jeremy Falcon
modified 19-Aug-24 17:58pm.
|
|
|
|
|
Looks like a versatile language, but a funky name.
A home without books is a body without soul. Marcus Tullius Cicero
PartsBin an Electronics Part Organizer - Release Version 1.4.0 (Many new features) JaxCoder.com
Latest Article: EventAggregator
|
|
|
|
|
Mike Hankey wrote: but a funky name. 100%. Kinda feels like it's a bunch of kids behind it. But, it's still a young language. Maybe it'll grow up as the peeps do. Best case scenario it turns into a mature language. Worst case, someone else rips off these new ideas and make another language.
Jeremy Falcon
|
|
|
|
|
Jeremy Falcon wrote: Kinda feels like it's a bunch of kids behind it
Probably not safe for work.
I was thinking more like hppies. https://zigzag.com/[^]
A home without books is a body without soul. Marcus Tullius Cicero
PartsBin an Electronics Part Organizer - Release Version 1.4.0 (Many new features) JaxCoder.com
Latest Article: EventAggregator
|
|
|
|
|
That's the cat's a$$ until some misbehaving code passes in a very large number for size .
|
|
|
|
|
It's compile time though, so it would have to be the programmer passing it in. The final executable won't have a variable at all. I mean, I can create a stack overflow with a huge array in C too. The difference being I'd have to use a macro or hardcoded size. This is just wanna them neat little things that lets you do it from a variable.
Don't get me wrong, there are gotchas to be aware of with comptime. Say for instance, with the first generic parameter... if you call the function with 5 different types Zig will generate 5 copies of the function for each type - which can totally increase the executable size. But, given the fact it's systems level and not GC'ed nor have any magical execution paths, it's a small price to pay IMO. Still, gotta watch out for it.
Jeremy Falcon
modified 20-Aug-24 11:56am.
|
|
|
|
|
|
I was never a fan of his show. IMO it was one of the first to trivialize (and then politicize) serious social topics and pit people against each other for ratings.
A pre-cursor to today's gotcha "journalism" practiced by so many.
|
|
|
|
|
i agree. not a fan.
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
|
Most people are talking about his legacy as a TV Host. It doesn't paint the full picture, and it's not the most flattering aspect of his life.
Phil Donahue was vocally anti-war, and brought his voice to places like MSNBC, where he kept showing up with other anti-war guests back when MSNBC was owned in part by GE (a premier American arms dealer, for anyone not keeping up) and everyone was going all in on the Iraq war. There was a memo leaked after he got fired from NBC that his anti-war views made him "difficult" for the network. Good. And if the memo suggests anything, it's that he was principled about it. He probably wasn't surprised it at least in part, cost him his job, I'm guessing.
I have to respect that.
I hope this post wasn't too political. I'm not even a cable news buff. I haven't had any meaningful TV in my house since the late 1990s, but I do remember snatches of what was happening at the time.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|