The Enchanted Tavern
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Björn Tantau to Programmer Humor@programming.dev • 4 months ago

Pretty straight forward

swg-empire.de

message-square
53
fedilink
721

Pretty straight forward

swg-empire.de

Björn Tantau to Programmer Humor@programming.dev • 4 months ago
message-square
53
fedilink

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

alert-triangle
You must log in or register to comment.
  • @xia@lemmy.sdf.org
    link
    fedilink
    English
    68•4 months ago

    Tsk tsk… forgot to clean up your temp file!

  • @Artyom@lemm.ee
    link
    fedilink
    34•4 months ago

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

  • DreamButt
    link
    fedilink
    English
    42•4 months ago

    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

  • @MonkderVierte@lemmy.ml
    link
    fedilink
    27•4 months ago

    Sure.

    • @Opisek@lemmy.world
      link
      fedilink
      9•4 months ago

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

    • @potoo22@programming.dev
      link
      fedilink
      10•4 months ago

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

  • @Scoopta@programming.dev
    link
    fedilink
    115•4 months ago

    …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
      58•4 months ago

      That wouldn’t necessarily be bash though

      • @Scoopta@programming.dev
        link
        fedilink
        21•4 months ago

        Fair, should’ve just said shell

      • @smeg@feddit.uk
        cake
        link
        fedilink
        English
        59•4 months ago

        Fine, system("bash -c 'echo hello world'"); then!

        • @xthexder@l.sw0.com
          link
          fedilink
          10•4 months ago

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

          • @ultrafastsloth@lemmy.world
            link
            fedilink
            17•4 months ago

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

          • @Beanie@programming.dev
            cake
            link
            fedilink
            4•4 months ago

            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
            cake
            link
            fedilink
            English
            3•4 months ago

            That was actually the first line of C I’ve ever written so there’s no way I’m guessing the right number of escapes, but I guess I’d cheat by finding the value of each char and printing those one at a time.

  • @tetris11@lemmy.ml
    link
    fedilink
    19•4 months ago

    why would you hurt me like this

  • @BartyDeCanter@lemmy.sdf.org
    link
    fedilink
    11•4 months ago

    Thanks, I hate it.

  • @ClassifiedPancake@discuss.tchncs.de
    link
    fedilink
    41•4 months ago

    That emoji annoys me more than I would like

    • kamen
      link
      fedilink
      25•4 months ago

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

      • Deebster
        link
        fedilink
        English
        16•4 months ago

        It’s the meme version of a laugh track

        • kamen
          link
          fedilink
          English
          -2•4 months ago

          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.

  • @mkwt@lemmy.world
    link
    fedilink
    20•4 months ago

    Violates CERT C ENV33-C.

    • @ArtVandelay@lemmy.world
      link
      fedilink
      English
      14•
      edit-2
      4 months ago

      It violates oh so much including that.

  • tiredofsametab
    link
    fedilink
    19•4 months ago

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

    • Björn TantauOP
      link
      fedilink
      24•4 months ago

      Rust, to make it safe.

      • tiredofsametab
        link
        fedilink
        15•4 months ago

        step 1: unsafe fn()…

        • Traister101
          link
          fedilink
          1•4 months ago

          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
            1•4 months ago
            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.

    • @JasonDJ@lemmy.zip
      link
      fedilink
      27•
      edit-2
      4 months ago
      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?""")
    • @xthexder@l.sw0.com
      link
      fedilink
      7•4 months ago

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

      • tiredofsametab
        link
        fedilink
        2•4 months ago

        It’s… Beautiful.

  • @CrimsonMishaps@lemmy.world
    link
    fedilink
    17•4 months ago

    Fucking brilliant

  • @misteloct@lemmy.world
    link
    fedilink
    28•4 months ago

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

  • @pedz@lemmy.ca
    link
    fedilink
    3•4 months ago

    That’s me with TCL.

    I’ve had an eggdrop for years (obviously) and I’m very bad with TCL, so any new script that I want to add is a bash script executed by the TCL script.

    • aquafunkalisticbootywhap
      link
      fedilink
      1•4 months ago

      TIL people still run eggdrop bots. I don’t think Ive touched one since maybe 2003. was probably the last time I messed with tcl

      • @pedz@lemmy.ca
        link
        fedilink
        2•4 months ago

        I still have an IRC server but the eggdrop’s usefulness has pretty much been reduced to fetching YouTube titles and the URL of images on tenor. Its main use was to fetch titles for all URLs pasted on channels where it is, but because me and most of the users are now using TheLounge as a client, there is no need for that anymore, except for a few exceptions. At one point it was also displaying all the things my friends upvoted on reddit, but since reddit closed its API and I came here…

        IRC with TheLounge is still very useful though.

  • @AnAustralianPhotographer@lemmy.world
    link
    fedilink
    English
    2•
    edit-2
    4 months ago

    deleted by creator

  • irelephant [he/him]🍭
    link
    fedilink
    English
    2•4 months ago

    subprocess.run()

Programmer Humor@programming.dev

!programmer_humor@programming.dev
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
  • 64 users / day
  • 288 users / week
  • 1.35K users / month
  • 4.39K users / 6 months
  • 1 subscriber
  • 1.52K Posts
  • 50.9K Comments
  • Modlog
  • mods:
  • Feyter
  • adr1an
  • @BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne
  • UI: unknown version
  • BE: 0.18.2
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org