2024/11/14

Newest at the top

2024-11-14 19:52:03 +0100 <shapr> ooh this is a fun read https://en.wikipedia.org/wiki/Shebang_%28Unix%29#Version_8_improved_shell_scripts
2024-11-14 19:51:53 +0100housemate(~housemate@146.70.66.228) (Max SendQ exceeded)
2024-11-14 19:51:24 +0100 <geekosaur> os/2 used to have EXTPROC
2024-11-14 19:51:17 +0100 <geekosaur> I think powershell has something vaguely shebang-like, cmd doesn't
2024-11-14 19:50:58 +0100smwonders what shebang line works in native windows shells (cmd, powershell) - none ?
2024-11-14 19:50:40 +0100 <geekosaur> back then sh's idea of a comment was :, and it was actually a null command so you needed to quote any special characters in the "comment"
2024-11-14 19:49:44 +0100housemate(~housemate@146.70.66.228) housemate
2024-11-14 19:49:43 +0100 <shapr> sm: yeah, I'll mention that
2024-11-14 19:49:32 +0100 <shapr> wow, thanks
2024-11-14 19:49:26 +0100 <geekosaur> yes
2024-11-14 19:49:24 +0100 <sm> just remember it's very easy to write a runhaskell script, add some standard-looking imports, then share it or come back in a few months and find it depends on packages which are no longer installed or installed but changed
2024-11-14 19:49:22 +0100 <geekosaur> on sh there was a libc hack, if exec() failed it retried it via sh
2024-11-14 19:49:21 +0100 <shapr> oh wow, so csh had # comments before #! was magic bytes?
2024-11-14 19:49:01 +0100 <geekosaur> it was a comment… for csh
2024-11-14 19:48:53 +0100housemate(~housemate@146.70.66.228) (Max SendQ exceeded)
2024-11-14 19:48:42 +0100 <shapr> Yeah, I just realized I don't know whether # was a comment BEFORE it #! was the magic bytes for "this is an executable"
2024-11-14 19:48:23 +0100 <geekosaur> (shebangs originated on BSD)
2024-11-14 19:48:11 +0100 <sm> 👍🏻
2024-11-14 19:47:58 +0100 <geekosaur> -S word-splits the parameter
2024-11-14 19:47:49 +0100 <geekosaur> historically the entire shebang line after the interpreter name was passed as a single parameter
2024-11-14 19:47:33 +0100 <geekosaur> the former
2024-11-14 19:47:21 +0100 <sm> I think env requires -S on *bsd (& mac) to allow extra arguments after the executable, GNU/linux doesn't. Or vice versa.
2024-11-14 19:47:11 +0100 <geekosaur> (but some systems that require it don't have it. then again I'm not sure how many people run Illumos)
2024-11-14 19:46:56 +0100 <shapr> The benefit of writing blog posts is that I learn so much!
2024-11-14 19:46:44 +0100housemate(~housemate@146.70.66.228) housemate
2024-11-14 19:46:25 +0100 <shapr> What's env -S ?
2024-11-14 19:45:52 +0100 <sm> ah you showed one. If more arguments are needed, some platforms require env -S
2024-11-14 19:45:23 +0100housemate(~housemate@146.70.66.228) (Max SendQ exceeded)
2024-11-14 19:45:17 +0100 <sm> other issues if scripts are to be shared: how to make a robust shebang line
2024-11-14 19:43:22 +0100smbounces
2024-11-14 19:43:14 +0100housemate(~housemate@146.70.66.228) housemate
2024-11-14 19:42:38 +0100shaprhugs sm
2024-11-14 19:42:34 +0100 <shapr> I like to know all the bits around the edges!
2024-11-14 19:42:28 +0100housemate(~housemate@146.70.66.228) (Max SendQ exceeded)
2024-11-14 19:42:23 +0100 <sm> feel free to ignore me :)
2024-11-14 19:41:53 +0100 <sm> sorry, I'm just giving the most negative (but real) case
2024-11-14 19:41:40 +0100 <sm> (and, getting it working may require either some coding to update it, or installing a few gigabytes of old ghc and deps that may or may not run easily on your machine)
2024-11-14 19:41:37 +0100housemate(~housemate@146.70.66.228) housemate
2024-11-14 19:41:33 +0100peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 276 seconds)
2024-11-14 19:40:28 +0100 <shapr> Now that I know, I will mention this!
2024-11-14 19:40:23 +0100 <sm> just because of ghc's evolution and tight/fragile dependencies between haskell packages
2024-11-14 19:40:10 +0100 <shapr> oh, interesting
2024-11-14 19:39:53 +0100 <sm> if you don't pin down ghc (& base) and any other deps your script uses, it's likely to break eventually (or possibly very soon), unlike normal shell scripts
2024-11-14 19:39:42 +0100 <shapr> tell me more?
2024-11-14 19:39:26 +0100housemate(~housemate@146.70.66.228) (Quit: "I saw it in a tiktok video and thought that it was the most smartest answer ever." ~ AnonOps Radio [some time some place] | I AM THE DERIVATIVE I AM GOING TANGENT TO THE CURVE!)
2024-11-14 19:39:17 +0100 <shapr> uh, what is that issue?
2024-11-14 19:39:01 +0100 <sm> Yeah. I hope you'll mention the issue of keeping it running beyond a single ghc release at least. Maybe another post :)
2024-11-14 19:38:56 +0100 <shapr> tempting, but for now I'm gonna cover "how to run a Haskell source file like it's a shell script"
2024-11-14 19:38:41 +0100 <shapr> That makes the subject larger than I can put into a single blog post
2024-11-14 19:37:52 +0100 <sm> https://chrisdone.github.io/hell is the most recent and a particularly interesting one IMHO