4 ms·
Not to mention that the objectively bad practice of piping a curl call to bash is nowhere close to "playing doom via curl". It's almost as if they simply prompt
by z3c0 6mo ago
Not to mention that the objectively bad practice of piping a curl call to bash is nowhere close to "playing doom via curl". It's almost as if they simply prompted "play doom with curl". In my experience, almost any overly-ambitious prompt ends similarly.
- varun_ch 6mo agoOh wait I didn't even register that! yeah of course you can do anything in a terminal using curl if you're piping to bash!!!
- moeffju 6mo agoBut that's not what it does, the bash option just saves you from doing stty setup and reset I think? You can just type it all out by hand, too, as the readme explains
- z3c0 6mo agoYou know what, I stand corrected. I missed this portion of play.sh: https://github.com/xsawyerx/curl-doom/blob/ae1edb82e48efcd2dfde6e9f4bfd6d25bdb7ad92/play.sh#L117 https://github.com/xsawyerx/curl-doom/blob/ae1edb82e48efcd2d... I'm not changing where I stand on piping to bash.
- xsawyerx 6mo agoOne form is to `curl` to get the bash code to just run the loop on keys that make additional curl requests. That is playing DOOM via curl. Each curl is a movement. However, if you see the next form, it creates a single curl request that stays open and does not need bash or additional calls for each key. It uses the open request. (You do need to set the terminal to raw for this.) HOWEVER, to push back against myself: It's relatively easy to do when other people did the heavy lifting: Doomgeneric, terminals, curl, etc. I also couldn't use websockets because it doesn't come with curl by default. And you can also move forward only when pressing a button to refresh the frame. So yeah, not the most impressive thing by far. But it is curl used to play the game and that's... something?
- z3c0 6mo agoYou are correct, on all counts. (See my response to the other commenter.) I was more harsh than I should have been. You're correct that it's not the most advanced of DOOM implementations, but I'd hate to hinder DOOM-ifying things with pedantry. (So long as one isn't simply piping a DOOM binary to bash, of course.)