Beehaw
  • Communities
  • Create Post
  • search
    Search
  • Login
  • Sign Up
Mac ( mac@programming.dev )  to Programmer Humor@programming.dev · 2 years ago

Yes

programming.dev

message-square
42
link
fedilink
480

Yes

programming.dev

Mac ( mac@programming.dev )  to Programmer Humor@programming.dev · 2 years ago
message-square
42
link
fedilink
  • wolo ( wolo@lemmy.blahaj.zone ) 
    link
    fedilink
    English
    arrow-up
    97
    ·
    edit-2
    2 years ago

    my website’s backend is made with bash, it calls make for every request and it probably has hundreds of remote arbitrary code execution bugs that will get me pwned someday, it’s great

    edit: to clarify, it uses a rust program i made to expose the bash scripts as http endpoints, i’m not crazy enough to implement http in bash

    it behaves like a static file server, but if a file has the others-execute permission bit set it executes the file instead of reading it

    it’s surprisingly nice for prototyping since you can just write a cli program and it’s automatically available over http too

    • PupBiru ( PupBiru@kbin.social ) 
      link
      fedilink
      arrow-up
      52
      ·
      2 years ago

      who hurt you?

      • wolo ( wolo@lemmy.blahaj.zone ) 
        link
        fedilink
        English
        arrow-up
        11
        ·
        2 years ago

        i thought it was neat how php lets you write your website’s logic with the same directory tree pattern that clients consume it from, but i didn’t want to learn php so i made my own, worse version

    • bdonvr ( bdonvr@thelemmy.club ) Banned
      link
      fedilink
      arrow-up
      36
      ·
      2 years ago

      I designed a chip architecture that runs bash code on silicon.

      I reimplemented x86 assembly in purely bash script.

    • tetris11 ( tetris11@lemmy.ml ) 
      link
      fedilink
      arrow-up
      19
      ·
      2 years ago

      Set -e, please for the love of god, set -e

    • gandalf_der_12te ( gandalf_der_12te@feddit.de ) 
      link
      fedilink
      arrow-up
      2
      ·
      2 years ago

      you do realize that you can just use Apache instead of writing your own rust program for this, as this is more or less the CGI standard?

      • wolo ( wolo@lemmy.blahaj.zone ) 
        link
        fedilink
        English
        arrow-up
        2
        ·
        2 years ago

        I know about the CGI standard, but mine does things a little differently (executable files don’t just render pages but also handle logging, access control, etc. when put in special positions within a directory), so I still think it was worth the afternoon i spent making it.

        • gandalf_der_12te ( gandalf_der_12te@feddit.de ) 
          link
          fedilink
          arrow-up
          2
          ·
          2 years ago

          Yeah, especially if you did this for practice.

          Just saying, that apache, for big projects, is more battle-hardened. ;-)

          • wolo ( wolo@lemmy.blahaj.zone ) 
            link
            fedilink
            English
            arrow-up
            2
            ·
            2 years ago

            Oh yeah definitely, Apache is way better for anything remotely serious.

    • Belzebubulubu ( Belzebubulubu@mujico.org ) 
      link
      fedilink
      arrow-up
      1
      ·
      2 years ago

      lord forgive me for I have sinned.

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.

  • 257 users / day
  • 1.83K users / week
  • 4.08K users / month
  • 8.93K users / 6 months
  • 457 local subscribers
  • 31K subscribers
  • 1.35K Posts
  • 22.4K Comments
  • Modlog
  • mods:
  • Feyter ( Feyter@programming.dev ) 
  • adr1an ( anzo@programming.dev ) 
  • BurningTurtle ( BurningTurtle@programming.dev ) 
  • Pierre-Yves Lapersonne ( pylapp@programming.dev ) 
  • BE: 0.19.15
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code