Logs: liberachat/#haskell
| 2021-08-11 21:21:21 | <monochrom> | Yes <(cmd) and >(cmd) are bashisms. |
| 2021-08-11 21:22:03 | <sm> | there was some discussion/doc about which shell `process` uses, I suspect it is POSIX sh only |
| 2021-08-11 21:22:51 | <sm> | aha! but there is a way |
| 2021-08-11 21:22:52 | <sm> | Prelude System.Process> readCreateProcessWithExitCode (shell "bash -c 'ls <(echo test)'") "" |
| 2021-08-11 21:22:52 | <sm> | (ExitSuccess,"/dev/fd/63\n","") |
| 2021-08-11 21:23:24 | × | Guest4990 quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 2021-08-11 21:24:02 | <monochrom> | I painstakingly ban bashisms in my course because <(cmd) allows students to cargo-cult internet solutions and evade learning shell pipelines. |
| 2021-08-11 21:24:28 | <monochrom> | I have to remind them multiple times "if 'sh your_script' doesn't work then you are not done". |
| 2021-08-11 21:24:42 | <monochrom> | And then Mac defeats me because its "sh" is bash. |
| 2021-08-11 21:25:14 | <monochrom> | So now I also have to remind them "if it doesn't work on the school shell server then you are not done either, I don't care about what Mac says". |
| 2021-08-11 21:25:46 | <sm> | I think sh is too weak (with error checking eg), so I require bash |
| 2021-08-11 21:26:01 | <glguy> | I like using shellcheck to help me with that |
| 2021-08-11 21:26:49 | <sm> | I was reading yesterday that shellcheck helps you write valid sh, but doesn't help at all warning you about sh's many ambiguous cases. Not sure that's entirely true |
| 2021-08-11 21:27:26 | <sm> | shellcheck has made shell programming possible for me |
| 2021-08-11 21:27:38 | → | Pickchea joins (~private@user/pickchea) |
| 2021-08-11 21:27:40 | × | MQ-17J quits (~MQ-17J@8.6.144.209) (Ping timeout: 268 seconds) |
| 2021-08-11 21:27:43 | <sm> | a haskell success story! |
| 2021-08-11 21:27:53 | <koala_man> | aww, I'm happy you've found it useful ^^ |
| 2021-08-11 21:28:09 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-08-11 21:28:10 | <sm> | is that your project koala_man ? |
| 2021-08-11 21:28:13 | <koala_man> | yes |
| 2021-08-11 21:28:35 | <monochrom> | Nice. |
| 2021-08-11 21:28:39 | <dsal> | I've done this type of thing with dup2 |
| 2021-08-11 21:28:49 | <sm> | let me thank you profusely on behalf of everyone. Thanks a lot, it is a fantastic tool. |
| 2021-08-11 21:29:11 | <koala_man> | aw shucks |
| 2021-08-11 21:30:10 | <koala_man> | monochrom: at least process substitutions are blocked in bash's sh mode |
| 2021-08-11 21:30:24 | <sm> | I don't know if you read your fan commentary online, but every time shell programming is mentioned anywhere on the the net someone quickly recommends shellcheck and several people say how great it is |
| 2021-08-11 21:31:23 | <koala_man> | I vanity search twitter now and then, the response has indeed been overwhelmingly positive |
| 2021-08-11 21:31:24 | × | ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 244 seconds) |
| 2021-08-11 21:31:37 | × | slack1256 quits (~slack1256@181.203.38.2) (Remote host closed the connection) |
| 2021-08-11 21:31:48 | × | Guest84 quits (~Guest84@2406:3003:2006:447e:9d85:ae5b:bc5f:9191) (Quit: Client closed) |
| 2021-08-11 21:32:13 | <sm> | the haskell checkers (hls and its various addons) could take some inspiration from shellcheck. I think one of the things we like about it is how good the advice is (link to wiki page with full details, etc.) |
| 2021-08-11 21:32:37 | <sm> | hlint gives great advice, but not the background explanation AFAIK |
| 2021-08-11 21:32:58 | → | chris joins (~chris@81.96.113.213) |
| 2021-08-11 21:33:01 | chris | is now known as Guest8327 |
| 2021-08-11 21:33:30 | <maerwald[m]> | Hlint is 90% opinions |
| 2021-08-11 21:33:35 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 2021-08-11 21:33:49 | <maerwald[m]> | Shellcheck helps you find actual bugs |
| 2021-08-11 21:34:33 | <sm> | koala_man: what's your thought on that comment about shellcheck not warning of all sh pitfalls ? (more so than bash) |
| 2021-08-11 21:34:48 | <koala_man> | do you have any examples? |
| 2021-08-11 21:35:11 | <sm> | unfortunately no, it was a HN comment yesterday. I'll share if I find it |
| 2021-08-11 21:36:03 | <monochrom> | Yeah shellcheck and clint are great. hlint is a dishonest name. |
| 2021-08-11 21:36:17 | <monochrom> | err of course s/clint/lint/ |
| 2021-08-11 21:36:39 | Clint | coughs. |
| 2021-08-11 21:36:41 | <koala_man> | it must be hard to statically find bugs in Haskell code that compiles |
| 2021-08-11 21:36:44 | <sm> | why is everyone so down on hlint :) |
| 2021-08-11 21:37:04 | <sm> | Its advice is more subjective/stylistic because there are less dangerous error-causing sitiations to find.. yes |
| 2021-08-11 21:38:48 | <monochrom> | Therefore if it didn't call itself "hlint" I would leave it alone. |
| 2021-08-11 21:38:48 | → | hexfive joins (~eric@50.35.83.177) |
| 2021-08-11 21:39:40 | <sm> | what does "lint" mean to you ? |
| 2021-08-11 21:40:02 | → | lavaman joins (~lavaman@98.38.249.169) |
| 2021-08-11 21:40:06 | <monochrom> | It means if I write "if (c = 1) { ... }" it reminds me. |
| 2021-08-11 21:40:22 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 2021-08-11 21:41:04 | <monochrom> | It means if I write "if (c == 1) \n {...}" it doesn't become nagware and say "why not put '{' on the same line as 'if'" |
| 2021-08-11 21:41:14 | <monochrom> | See, hlint does the latter only. |
| 2021-08-11 21:41:24 | <monochrom> | It is pure nagware. |
| 2021-08-11 21:41:37 | <sm> | that's silly. It is a configurable tool. |
| 2021-08-11 21:42:15 | <sm> | you don't like the defaults, ok |
| 2021-08-11 21:42:27 | <monochrom> | No, you should be pointing out that it's an optional tool, I don't have to use it if it doesn't fit me. |
| 2021-08-11 21:42:27 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 2021-08-11 21:42:31 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 2021-08-11 21:42:34 | <sm> | but "nagware" is not fair |
| 2021-08-11 21:42:44 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 2021-08-11 21:42:48 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 2021-08-11 21:43:06 | <monochrom> | The problem is, it has a dishonest name, so other people are deceived to believe that it has lint's status and purpose. |
| 2021-08-11 21:43:25 | <monochrom> | And the derivative problem is, because of that, lpaste.net imposed it. |
| 2021-08-11 21:43:37 | <monochrom> | hpaste.net, even |
| 2021-08-11 21:43:55 | <sm> | dishonest, deceived, nagware.. all of these seem a bit exaggerated and emotional to me. But as you like :) |
| 2021-08-11 21:43:58 | <monochrom> | Dishonest names are not fair. |
| 2021-08-11 21:44:07 | × | mnrmnaugh quits (~mnrmnaugh@68.162.206.56) (Remote host closed the connection) |
| 2021-08-11 21:44:30 | → | mnrmnaugh joins (~mnrmnaugh@68.162.206.56) |
| 2021-08-11 21:44:32 | <monochrom> | It is very possible that if hpaste didn't inflict it, I would not complain at all. |
| 2021-08-11 21:44:52 | <sm> | hpaste.. what is that now.. still a thing ? |
| 2021-08-11 21:45:03 | <monochrom> | No. |
| 2021-08-11 21:45:54 | × | mnrmnaugh quits (~mnrmnaugh@68.162.206.56) (Remote host closed the connection) |
| 2021-08-11 21:46:13 | × | gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 2021-08-11 21:47:08 | → | mnrmnaugh joins (~mnrmnaugh@68.162.206.56) |
| 2021-08-11 21:47:25 | <Clint> | hpaste is oppressing everyone from beyond the grave |
| 2021-08-11 21:48:34 | × | mnrmnaugh quits (~mnrmnaugh@68.162.206.56) (Remote host closed the connection) |
| 2021-08-11 21:49:19 | <sm> | well, monochrom you have motivated me to try using hlint a bit and see if I can configure it to give a little bit of shellcheck-like feeling |
| 2021-08-11 21:49:21 | × | hexfive quits (~eric@50.35.83.177) (Quit: WeeChat 3.0) |
| 2021-08-11 21:49:23 | → | mnrmnaugh joins (~mnrmnaugh@68.162.206.56) |
| 2021-08-11 21:49:52 | × | sander quits (~sander@user/sander) (Ping timeout: 268 seconds) |
| 2021-08-11 21:51:16 | <sm> | if not we should hire koala_man to build hscheck |
| 2021-08-11 21:51:19 | phma_ | is now known as phma |
| 2021-08-11 21:53:01 | <dsal> | main = putStrLn "If it compiles, it's probably fine." |
| 2021-08-11 21:53:20 | <koala_man> | the typechecker does most of that already, but I'd love to see a tool that suggests inefficient constructs, e.g. missed opportunities for list fusion |
| 2021-08-11 21:54:17 | → | sander joins (~sander@user/sander) |
| 2021-08-11 21:57:30 | → | finsternis joins (~X@23.226.237.192) |
| 2021-08-11 21:59:17 | <sm> | space leaks! |
| 2021-08-11 21:59:34 | <sm> | "inefficient code", generally |
| 2021-08-11 22:00:33 | <monochrom> | I bet it would take multiple PhD projects. It has become a full-blown static analysis problem, and a hard one even in that circle. |
| 2021-08-11 22:01:03 | → | worp joins (~worp@221.124.9.182) |
| 2021-08-11 22:01:14 | <monochrom> | lint and hlint can afford to just reap low-hanging fruits which are merely local syntactic patterns. |
| 2021-08-11 22:01:52 | <monochrom> | s/local/peephole/ |
| 2021-08-11 22:02:04 | × | mnrmnaugh quits (~mnrmnaugh@68.162.206.56) (Quit: Leaving) |
| 2021-08-11 22:02:25 | → | mnrmnaugh joins (~mnrmnaugh@68.162.206.56) |
| 2021-08-11 22:02:49 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
| 2021-08-11 22:03:38 | × | acidjnk quits (~acidjnk@p200300d0c72b954099fc00439288b01d.dip0.t-ipconnect.de) (Ping timeout: 272 seconds) |
| 2021-08-11 22:03:55 | × | mastarija quits (~mastarija@78-3-210-70.adsl.net.t-com.hr) (Quit: Leaving) |
All times are in UTC.