fed.dyne.org
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Björn@swg-empire.de to Programmer Humor@programming.dev · 1 年前

Pretty straight forward

swg-empire.de

message-square
45
link
fedilink
722

Pretty straight forward

swg-empire.de

Björn@swg-empire.de to Programmer Humor@programming.dev · 1 年前
message-square
45
link
fedilink

By https://www.youtube.com/@yousuckatprogramming

alert-triangle
You must log in or # to comment.
  • Scoopta@programming.dev
    link
    fedilink
    arrow-up
    116
    arrow-down
    1
    ·
    1 年前

    …this is so much more cursed than it needs to be. If you want to bash in C just system("echo hello world");

    • tempest@lemmy.ca
      link
      fedilink
      arrow-up
      58
      ·
      1 年前

      That wouldn’t necessarily be bash though

      • smeg@feddit.uk
        link
        fedilink
        English
        arrow-up
        60
        arrow-down
        1
        ·
        1 年前

        deleted by creator

        • xthexder@l.sw0.com
          link
          fedilink
          arrow-up
          9
          ·
          1 年前

          Now print “¯\_(ツ)_/¯” with the quotes

          • ultrafastsloth@lemmy.world
            link
            fedilink
            arrow-up
            17
            ·
            1 年前

            I decided to throw my PC in the composter and become a gardener

          • Beanie@programming.dev
            link
            fedilink
            arrow-up
            4
            ·
            1 年前

            my best guess: system("bash -c 'echo \\\"¯\\\\_(ツ)_/¯\\\"'");

            which will get parsed as: bash -c 'echo \"¯\\_(ツ)_/¯\"'

            which will run: echo "¯\_(ツ)_/¯"

            and since echo just prints whatever was given to it, it’ll print "¯\_(ツ)_/¯" with the quotes

          • smeg@feddit.uk
            link
            fedilink
            English
            arrow-up
            3
            ·
            1 年前

            deleted by creator

      • Scoopta@programming.dev
        link
        fedilink
        arrow-up
        21
        ·
        1 年前

        Fair, should’ve just said shell

  • xia@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    67
    ·
    1 年前

    Tsk tsk… forgot to clean up your temp file!

  • ClassifiedPancake@discuss.tchncs.de
    link
    fedilink
    arrow-up
    42
    arrow-down
    1
    ·
    1 年前

    That emoji annoys me more than I would like

    • kamen@lemmy.world
      link
      fedilink
      arrow-up
      25
      ·
      1 年前

      As if someone’s telling a joke and saying “This is where you should laugh”

      • Deebster@programming.dev
        link
        fedilink
        English
        arrow-up
        16
        ·
        1 年前

        It’s the meme version of a laugh track

        • kamen@lemmy.world
          link
          fedilink
          English
          arrow-up
          4
          arrow-down
          6
          ·
          1 年前

          Laugh tracks have a purpose though. I understand they’re not to everyone’s liking - and that’s fine, but they work for some comedy shows - and usually they’re from the live audience that sees things performed in front of them.

  • DreamButt@lemmy.world
    link
    fedilink
    English
    arrow-up
    41
    ·
    1 年前

    For shame. They forgot to make a script to make a tmp script using mktmp, so they can store their tmp script in the tmp script and have proper cleanup

  • Artyom@lemm.ee
    link
    fedilink
    arrow-up
    34
    ·
    1 年前

    Always follow best practices, make sure you cleanup by deleting the hello world bash file!

  • misteloct@lemmy.world
    link
    fedilink
    arrow-up
    28
    ·
    1 年前

    My coworkers could learn a thing or two from this. For one, it actually works.

  • MonkderVierte@lemmy.ml
    link
    fedilink
    arrow-up
    27
    ·
    1 年前

    Sure.

    • potoo22@programming.dev
      link
      fedilink
      arrow-up
      10
      ·
      1 年前

      Okay but 🍒 shouldn’t output 🍉. This is inconsistent and confusing. We have standards.

    • Opisek@lemmy.world
      link
      fedilink
      arrow-up
      9
      ·
      1 年前

      Picking emojis that make sense actually made it easy to read.

  • mkwt@lemmy.world
    link
    fedilink
    arrow-up
    20
    ·
    1 年前

    Violates CERT C ENV33-C.

    • ArtVandelay@lemmy.world
      link
      fedilink
      English
      arrow-up
      14
      ·
      1 年前

      It violates oh so much including that.

  • tiredofsametab@fedia.io
    link
    fedilink
    arrow-up
    19
    ·
    1 年前

    Now call that C program from some other program in another language.

    • JasonDJ@lemmy.zip
      link
      fedilink
      arrow-up
      26
      ·
      1 年前
      with open('program.c', 'w') as f:
          f.write(
      """I'm not actually going to copy down the program... 
      
      But you get the idea of the joke.
      
      Right?""")
    • Björn@swg-empire.deOP
      link
      fedilink
      arrow-up
      23
      ·
      1 年前

      Rust, to make it safe.

      • tiredofsametab@fedia.io
        link
        fedilink
        arrow-up
        15
        ·
        1 年前

        step 1: unsafe fn()…

        • Traister101@lemmy.today
          link
          fedilink
          arrow-up
          1
          ·
          1 年前

          Ah yes now I can… dereference a raw pointer (yes that’s essentially the only thing unsafe rust actually enables you to do, it doesn’t disable the borrow checker or anything else, it just allows you to play with pointers)

          • calcopiritus@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            1 年前
            unsafe fn<'a, T>(p: &'a T) -> &'static mut T {
                p as *cons T as *mut T as &'static mut T
            }
            

            It is a bit more than just dereferencing raw pointers.

    • xthexder@l.sw0.com
      link
      fedilink
      arrow-up
      7
      ·
      1 年前

      May I present to you: https://github.com/mame/quine-relay

      • tiredofsametab@fedia.io
        link
        fedilink
        arrow-up
        2
        ·
        1 年前

        It’s… Beautiful.

  • tetris11@lemmy.ml
    link
    fedilink
    arrow-up
    19
    ·
    1 年前

    why would you hurt me like this

  • CrimsonMishaps@lemmy.world
    link
    fedilink
    arrow-up
    17
    ·
    1 年前

    Fucking brilliant

  • BartyDeCanter@lemmy.sdf.org
    cake
    link
    fedilink
    arrow-up
    11
    ·
    1 年前

    Thanks, I hate it.

  • thann@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    7
    ·
    1 年前

    Who says C isnt mem safe?

  • qaz@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    ·
    1 年前

    Some time ago I wrote a program in COBOL and half of it was just CALL "SYSTEM" BY CONTENT in the end.

    • mexicancartel@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      4
      ·
      1 年前

      I did the same with python once lol.

      I didn’t know enoug python or bash so i mixed both with os.system

  • SnausagesinaBlanket@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    1 年前

    Dave is not here.

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 636 users / day
  • 2.45K users / week
  • 7.87K users / month
  • 17.6K users / 6 months
  • 1 local subscriber
  • 31.8K subscribers
  • 2.04K Posts
  • 61.9K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.19
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org