There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

feddit.uk

Tetsuo , to cat in 27th October is National Black Cat Day (UK)

https://jlai.lu/pictrs/image/d187f262-27f5-4834-826b-e1e52b8917af.jpeg

Can mine join the club despite he white spots on her belly ?

fakeman_pretendname OP ,

Absolutely! The original focus on having a black cat day specifically included black-and-white cats.

“When the campaign was launched, statistics revealed that black and black-and-white cats took, on average, seven days longer to find a home compared to cats of other colours”

darcy , to programmerhumor in This took me 4 months
@darcy@sh.itjust.works avatar

i read through the code, and i have some tips, which you may find helpful (or not):

  • argument parsing: if –color is not the first argument, it will try to open a file named –color, which i assume is unintended. i would suggest checking out the clap crate to easily parse args
  • i’m quite sure why you used ‘clusters’ instead of resizing the image to the terminal width? if it is purely as a programming exercise, or for performance reasons, then that’s great! but otherwise, calling image.resize() is easier
  • .len() on a string returns length in bytes, not characters, so could break with non-ascii text. in the context of this program, the text will always be ascii, so it is of course not a problem, but it’s worth to keep in mind. to get character length, use .chars().count()
  • in my testing, the width of the image is always affected by the width of the terminal, always being less than the maximum possible width, causing the image to be stretched vertically. i’m not sure why this is happening
  • in get_brightness_of_cluster, pushing to a Vec and then calling .sum() can be replaced with a loop which increments a mutable u32 variable. this is a nitpick, but it can avoid unnecessary memory allocation

check out this example. sorry if this comes off as rude or a nitpick, i’m just trying to provide some advice :)

Vitaly OP ,
@Vitaly@feddit.uk avatar

Thank you for your help this is not rude at all and very helpfull! I know about argument parsing with clap, and started thinking about it as I started to add more functional to the program

Is resizing and image is more performant? I yes then i was wrong when coding with clusters, it’s always good to have another viewpoint for tasks like this I didn’t even think of resizing an image)

About .len i think it’s fine as long as it works

The width of images should be resized depending on your terminal width and height, im still not sure how i can improve it, because every image is unique

get_brightness is a bit broken in performance right now, i will fix it later

Thanks you for your tips, really helpfull! Дякую!

darcy ,
@darcy@sh.itjust.works avatar

:) no problem! i would assume resizing the image might be a little slower, because it creates a clone of the image, but if you use FilterType::NearestNeighbor, the speed is negligable in my opinion

Celofyz , to internetfuneral in Breach

Reminds me of Age of Excuse

A species had been armed with a double edged blade

A guardless weapon of delusion

Forged of a mirage of inherent transcendence

In the tangled mechanisms of life itself

(…)

What has to be done, has to be done

The human nature is what it is

We cover our eyes in a call to arms

And turn one edge toward ourselves

OmegaMouse OP ,
@OmegaMouse@feddit.uk avatar

That’s a good comparison! The words here are taken from this essay on the human condition.

QuantumSparkles , to internetfuneral in Breach

Ikr

TootSweet , to memes in Lets be realistic
Decoy321 ,

The pinnacle of gaming.

DmMacniel ,

Capstone is that old, yeah? Even before they were doing shitty doom clones, they were doing shitty asteroid clones.

atocci ,
@atocci@kbin.social avatar

It's all been downhill since then

DmMacniel ,

And then you can’t even destroy asteroids by shooting them. What a rip off!

Anyway I’m out buying another Idris.

ryannathans ,

You can destroy them by crashing into them so I wonder if a size 10 bomb would work? Armageddon style

DmMacniel ,

Perhaps when you have atmosphere, because bombs refuse to drop otherwise :)

ryannathans ,

You can take them out with the tractor beam and detonate them on demand

DmMacniel ,

you can?

ryannathans ,

Yeah pretty much all ordinance can be removed/replaced/refilled with tractor beams now

DmMacniel ,

yeah but certainly not detonated.

A_Very_Big_Fan , to memes in Lets be realistic

I doubt it’ll ever get out of beta tbh

FunkyMonk , to memes in Lets be realistic

It will leave behind a great legacy of making every carpet bagger with a glint in their eye a game dev kickstarter... and like a dozen crowdfunded gems.

RoyaltyInTraining , to memes in Lets be realistic
@RoyaltyInTraining@lemmy.world avatar

I have forgotten about it and later rediscovered it so many times now

Sinnz , to memes in Lets be realistic

Pretty optimistic if you ask me

Ciel ,
@Ciel@lemmygrad.ml avatar

time obviously is a log scale here

ddeet , to memes in Lets be realistic

test

Phegan , to memes in Lets be realistic

I’ve promised myself I wouldn’t buy star citizen until release.

I am never buying star citizen.

Shardikprime , to memes in Lets be realistic

By doing this you just pushed the release until the end of baryonic age

JaymesRS , to newcommunities in Yorkshire - Feddit UK - back from deletion

Who’d have thought thirty year ago we’d all be sittin’ here drinking Château de Chasselas, eh?

Rolando , to newcommunities in Yorkshire - Feddit UK - back from deletion

Wait, if a creator deletes their account, then their communities are deleted?

That’s kind of alarming for communities with absent mods. They could come back at any time just to leave.

Emperor OP ,
@Emperor@feddit.uk avatar

Pretty much. There’s currently no mechanism to stop the creator of a community from deleting it and no way to get it or the posts back.

It has come up on GitHub where concern was raised.

Rolando ,

aaah! hm… do you happen to know if it’s possible for the server admin to change the owner of a community?

Emperor OP ,
@Emperor@feddit.uk avatar

Yes they can, I’ve done it a few times. It’s also possible for the creator of a community to transfer it to another Mod and leave the community (I’ve done it that way a couple of times too).

Mr_Blott , to newcommunities in Yorkshire - Feddit UK - back from deletion

What happened, the original creator got their first electric bill? 😂😂

Emperor OP ,
@Emperor@feddit.uk avatar

Not everyone from Yorkshire is like that, I presume.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • lifeLocal
  • goranko
  • All magazines