1337
carrot.py (lemmy.world)
submitted 2 months ago by n3cr0@lemmy.world to c/programmerhumor@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] tetris11@lemmy.ml 164 points 2 months ago

Workaround: Potato peeler extends peeler, so just cast your carrots as potatoes before you peel them, and then cast them back to carrot afterwards

[-] thisfro@slrpnk.net 75 points 2 months ago

To cast them, it uses libvegs however. It is not available in any standard package libraries, so just quickly build it from source

[-] NaibofTabr@infosec.pub 61 points 2 months ago

Yeah but the current build of libvegs has some conflicts with libfruit, so if you need to use both you have to build libvegs in a different directory and then simlink it in /lib.

[-] driving_crooner@lemmy.eco.br 43 points 2 months ago

Tomato keep being casted as fruit, even that for any practical purpose it should be as vegetable

[-] tetris11@lemmy.ml 33 points 2 months ago* (last edited 2 months ago)

That's it, let's re-write the entire backend in C++ to make use of multiple inheritance to tackle this one use-case!

What do you mean "this is overkill"? Do you have any idea how many tomatoes go into a fucking salad!?

[-] thisfro@slrpnk.net 22 points 2 months ago

Someone should do it in rust now

[-] CaptDust@sh.itjust.works 11 points 2 months ago

Maybe cooking isn't for me.

[-] tiefling@lemmy.blahaj.zone 6 points 2 months ago

Yeah but that's all my replacement's problem to deal with

[-] ThunderComplex@lemmy.today 28 points 2 months ago

Unfortunately, casting from potato to carrot is a narrowing conversion so your new carrot will lose some properties

[-] tetris11@lemmy.ml 24 points 2 months ago

You say "potato" I say "caroto"

[-] mesamunefire@lemmy.world 15 points 2 months ago

I hate that I understand this. Well done.

[-] tumblechinchilla@sh.itjust.works 13 points 2 months ago

Internal screaming.

[-] mindbleach@sh.itjust.works 9 points 2 months ago

If you forget the second step, well, that's what sweet potatoes are.

this post was submitted on 01 Nov 2024
1337 points (99.1% liked)

Programmer Humor

32812 readers
185 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS