this post was submitted on 30 Jan 2025
958 points (99.7% liked)

memes

11457 readers
2390 users here now

Community rules

1. Be civilNo trolling, bigotry or other insulting / annoying behaviour

2. No politicsThis is non-politics community. For political memes please go to !politicalmemes@lemmy.world

3. No recent repostsCheck for reposts when posting a meme, you can only repost after 1 month

4. No botsNo bots without the express approval of the mods or the admins

5. No Spam/AdsNo advertisements or spam. This is an instance rule and the only way to live.

A collection of some classic Lemmy memes for your enjoyment

Sister communities

founded 2 years ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] manucode@infosec.pub 57 points 6 days ago (4 children)
[–] wise_pancake@lemmy.ca 39 points 6 days ago (1 children)

I have a great performance optimization for this

What if instead of 1s sleep, we did 0.5s sleep? That’s a 100% improvement.

[–] Amanduh@lemm.ee 15 points 6 days ago (4 children)

It's not sleeping for 1 second, $1 is an input parameter in the script

[–] JackbyDev@programming.dev 2 points 4 days ago (2 children)

I took it as meaning sleep for a number of seconds equal to half the value you're sorting. So like f "(( $1 / 2 ))" & or however math works in bash, I always forget.

[–] lurch@sh.itjust.works 1 points 3 days ago

Fractional math doesn't happen in bash, but bc can be called and sleep can take fractions as parameters.

[–] Amanduh@lemm.ee 1 points 4 days ago (1 children)
[–] JackbyDev@programming.dev 2 points 4 days ago (1 children)
[–] Amanduh@lemm.ee 1 points 4 days ago (2 children)

I bet you also tell people you love regex because you think it makes you look smarter lol

[–] JackbyDev@programming.dev 2 points 3 days ago (1 children)

Well, maybe not with regex, but I'd be lying if I said I never get satisfaction things like that lol. Bash and regex both are very useful tools, great at what they do, but have some design choices that make them annoying. That's sort of what I was trying to get at by saying "yes but also skill issue" lol. A good example is iterating over output in bash. I have zero confidence it's going to do anything remotely close to what I want and have to look up stuff every time I'm trying to do it. "Is it going to go word by word? Line by line? Are there null byte separators?" PowerShell seems appealing in that regard because it works with objects instead of text, but I haven't really used it in depth and I don't see myself going through it just to see if it's worth trying to use more often.

[–] Amanduh@lemm.ee 0 points 3 days ago

Cool story bro

[–] jollyrogue@lemmy.ml 2 points 4 days ago (1 children)

What if you do love regex? 🥺

[–] Amanduh@lemm.ee 1 points 4 days ago (1 children)

Then you should be cast into the fires of Mt doom where you belong

[–] jollyrogue@lemmy.ml 1 points 3 days ago (1 children)

You wouldn’t say that if you knew regex. 😆

[–] Amanduh@lemm.ee 1 points 3 days ago (1 children)

Programmers and being smug assholes, name a more iconic duo

[–] jollyrogue@lemmy.ml 1 points 2 days ago

Project much?

I’ll play though.

Amanduh being a humorless chore. 😁

[–] wise_pancake@lemmy.ca 4 points 5 days ago

That sounds expensive

load more comments (2 replies)
[–] devfuuu@lemmy.world 10 points 6 days ago

For anyone who controls time travel this is the fastest algorithm ever. Probably gonna change everything when we are traveling through space and passing by some dark holes.

[–] idunnololz@lemmy.world 1 points 4 days ago (1 children)

The output isn't guaranteed to be correct though. Most implementations of sleep can only guarantee that it will sleep for at least the amount of time specified. It can sleep for longer though.

[–] JackbyDev@programming.dev 4 points 4 days ago

I remember seeing discussions about this at the time, it would also sometimes fail with a very large number of 1s and a single 2.

[–] morrowind@lemmy.ml 1 points 5 days ago

Even as a joke, this doesn't avoid anything. The system scheduler just has to do the sorting using a regular algorithm

[–] affiliate@lemmy.world 26 points 5 days ago

i am both people in this picture

[–] Omgboom@lemmy.zip 35 points 6 days ago (1 children)
[–] rockSlayer@lemmy.world 27 points 6 days ago

stay away from the edge cases and everything will be fine

[–] jubilationtcornpone@sh.itjust.works 24 points 6 days ago (2 children)
[–] sylver_dragon@lemmy.world 9 points 6 days ago (2 children)

Perfect, we'll just spin up an image of your machine in EC2, give it a public IP, set the default network rules to "allow any any" and we're good. And I have no idea why the security team just all quit.

[–] vrighter@discuss.tchncs.de 2 points 4 days ago

and that's how docker was invented

[–] partial_accumen@lemmy.world 4 points 5 days ago

The git commit comment when pushing to prod is just: WCGW?

... alternate ending: YOLO!

[–] morrowind@lemmy.ml 1 points 5 days ago

That's why we invented docker! Instead of trying to fix, just copy your whole machine

[–] peto@lemm.ee 18 points 6 days ago (1 children)

No wonder he was the captain of the Black Perl...

And the dinghy got him all the way to dock. What more could anyone want.

[–] Kolanaki@yiffit.net 13 points 5 days ago

"You are quite possibly the worst programmer I have ever heard of."

Derek Smart: "Ah, but you have heard of me."

[–] sumguyonline@lemmy.world 9 points 6 days ago

It runs, just nothing happens and no error pops ANYWHERE!!!

[–] FunCube@feddit.org 6 points 5 days ago

Minecraft, quintessentially

[–] Gigliorananomicom@sh.itjust.works 7 points 6 days ago (8 children)

I want to learn C# or Python for game dev, but it looks...daunting.

Anyone got advice?

[–] rovingnothing29@lemmy.world 11 points 6 days ago

"Automate the boring stuff with python" to start. As an added bonus you'll have more downtime as you go.

[–] slazer2au@lemmy.world 7 points 6 days ago

Start by using an existing engine like renpy to get flow and math. Then expand to other engines.

[–] Human@lemmy.dbzer0.com 5 points 6 days ago

I would start (if you havent already) with an introduction to CS. You can take CS50 for free online - https://cs50.harvard.edu/x/2025/.

I dont think they cover much C# (I took the 2020 course and they didnt) but they do introduce you to C, C++, Python, html, etc. They provide github codespaces available for anyone for free, so you can complete the weekly labs and problem sets offered in the course. It really is a good jumping off point.

[–] kittenzrulz123@lemmy.blahaj.zone 4 points 6 days ago* (last edited 6 days ago) (1 children)

Learn rust for game dev, develop the game in rust, and then brag about how your game is written 100% in rust (nerds will be extremely impressed, for maximum clout release it under GPL V3 with native Linux support).

[–] Valorie12@lemmy.world 7 points 6 days ago (1 children)
[–] kittenzrulz123@lemmy.blahaj.zone 5 points 6 days ago (1 children)

But first you need to make a custom Risc-V CPU optimized for rust (and minimal memory leaks) and then port a custom Arch fork (completely rewritten in rust ofc) so you can run OxideFetch

[–] vrighter@discuss.tchncs.de 4 points 4 days ago

gameplay doesn't matter. If it's written in rust it will automatically be fun.

[–] rmuk@feddit.uk 4 points 6 days ago

Be sure to regularly defrag your C: drive or things might slow down.

[–] RandomVideos@programming.dev 2 points 5 days ago

Code looks more terrifying than it actually is

After learning the basics of a programming language, you could try using a game engine like Unity or Godot to not have to code a lot of more complicated things like displaying things and collisions

[–] partial_accumen@lemmy.world 2 points 5 days ago

I know a bit of python and ruby, but doing something similar except I'm writing it in BASIC on a Commodore 64 and am going to attempt to refactor it assembly. I have most of the BASIC version working now.

[–] peoplebeproblems@midwest.social 1 points 6 days ago (2 children)

Find a different career choice!

Software development is all stress all the time and I don't know what the fuck I'm doing and I really don't think this much stress at 34 is healthy even with the salary

[–] JackbyDev@programming.dev 2 points 4 days ago

I think software development is a good career, but game development specifically is certainly not. It's a fine hobby though. Also, learning development through a hobby is fine.

[–] Saleh@feddit.org 4 points 5 days ago (1 children)

I think your description covers many career choices in a capitalist society.

This... Is a very good point.

[–] jatone@lemmy.dbzer0.com 5 points 6 days ago

.... In the wrong direction.

load more comments
view more: next ›