Hacker News new | past | comments | ask | show | jobs | submit login

Lines 1 & 3 had side effects, sad panda



Reading from disk, spending CPU cycles, allocating memory, and making queries on the network are all technically side effects--but they're not really cause for "sad panda".

Everything on a computer has some side effects, and the purpose of --dry-run is to stop execution without certain effects that we care about. It's impossible to eliminate side effects entirely, so this is not a goal.


I had http:// 192.168.100.123 :7654/lights_on.sh that idempotentially turns on lights in my room. Trying to query or even pre-fetching does it. I was aware it’s not wisest, wasn’t as stupid as to expose it, also it broke so it is no more, but there’s always the guy who does that.


The "n" key on your keyboard is connected to some dynamite attached under the desk, if you type "--dry-run" or even just "-n", it plays the song "Those Endearing Young Charms" and then explodes, killing everyone in the room.

https://www.youtube.com/watch?v=ZLNduq2pnN0

At some point it doesn't matter if there's "the guy who does that", because the right choice is to let "the guy who does that" deal with the consequences of their own crazy setup.


HTTP PUT is for idempotent operations, and would be appropriate here.


HTTP GET is also idempotent in REST, and slightly easier than PUT (since you can just append any parameters onto the end of the URL with GET instead of inserting them into the HTTP headers with PUT)


I believe HTTP GET is "nullipotent", meaning that accessing a resource 0 times is supposed to be the same as accessing it once or more. So I don't think it's appropriate for actions like "lights on".


I guess you really do have to preface your jokes with joke disclaimers these days.


It's impossible to tell if someone is being sarcastic on the internet, because no matter how stupid your comment is at face value, there's always a percentage of people on the forum stupid enough to say it in earnest.

https://en.wikipedia.org/wiki/Poe%27s_law

Use a winking smiley face emoticon ;-) or /s


But I was smiling when I wrote my comment, isn't that enough?


With the number of fanatics of Haskell and functional programming on HN, it's completely reasonable to think you were serious with your comment.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: