Newest at the top
| 2026-05-14 03:54:00 +0000 | merijn | (~merijn@62.45.136.136) (Ping timeout: 244 seconds) |
| 2026-05-14 03:48:57 +0000 | merijn | (~merijn@62.45.136.136) merijn |
| 2026-05-14 03:46:06 +0000 | <tri> | ok thank you, I will work it out |
| 2026-05-14 03:45:37 +0000 | <geekosaur> | for now at least |
| 2026-05-14 03:45:36 +0000 | <tri> | I mean I know I could keep it simple and pattern match the maybe, but a transfromer here to group the 2 monad would be good |
| 2026-05-14 03:45:26 +0000 | <geekosaur> | yes |
| 2026-05-14 03:45:12 +0000 | <tri> | so in a situation like this, where I got maybe in IO, it's a valid reason to use maybeT right? |
| 2026-05-14 03:44:26 +0000 | Square | (~Square@user/square) Square |
| 2026-05-14 03:44:25 +0000 | <geekosaur> | so the execute check needs to be in isCommandInPath, which keeps searching if it finds a non-executable |
| 2026-05-14 03:44:23 +0000 | <tri> | but I do want to carry out the maybeT though, it's a chance to try it |
| 2026-05-14 03:44:06 +0000 | <tri> | ok so I misread the requirement |
| 2026-05-14 03:43:41 +0000 | <tri> | ah... |
| 2026-05-14 03:43:28 +0000 | <geekosaur> | if all matching files on the PATH lack execute, you'll get Nothing back |
| 2026-05-14 03:43:25 +0000 | <tri> | ok lmc |
| 2026-05-14 03:42:59 +0000 | <geekosaur> | look at "If the file exists but lacks…" |
| 2026-05-14 03:42:42 +0000 | <tri> | I don't get this "" |
| 2026-05-14 03:42:39 +0000 | <tri> | 23:37 geekosaur: which would also solve this as you never need the second one |
| 2026-05-14 03:42:38 +0000 | <tri> | also you should keep searching in the path if it's not |
| 2026-05-14 03:41:22 +0000 | <tri> | ah yea I see I got the if else inversed. I will fix that |
| 2026-05-14 03:40:29 +0000 | <geekosaur> | oh, in fact, reread what you just wrote and compare to what I suggested |
| 2026-05-14 03:40:14 +0000 | <tri> | ok let me see... |
| 2026-05-14 03:40:04 +0000 | <geekosaur> | yes, now look at your condition and what you do |
| 2026-05-14 03:39:47 +0000 | <tri> | If no executable is found in any directory, print <command>: not found. |
| 2026-05-14 03:39:45 +0000 | <tri> | If the file exists but lacks execute permissions, skip it and continue to the next directory. |
| 2026-05-14 03:39:45 +0000 | ricardomaps | (~ricardoma@2804:14d:a040:81ea:c347:f768:e2bf:15ae) (Quit: ricardomaps) |
| 2026-05-14 03:39:43 +0000 | <tri> | If the file exists and has execute permissions, print <command> is <full_path> and stop. |
| 2026-05-14 03:39:41 +0000 | <tri> | Check if the file has execute permissions. |
| 2026-05-14 03:39:39 +0000 | <tri> | Check if a file with the command name exists. |
| 2026-05-14 03:39:39 +0000 | <tri> | If the command is not a builtin, your shell must go through every directory in PATH. For each directory: |
| 2026-05-14 03:39:39 +0000 | <tri> | Check if the command is a builtin command (like exit or echo). If it is, report it as a builtin (<command> is a shell builtin) and stop. |
| 2026-05-14 03:39:36 +0000 | <tri> | ah I'm just following this requirement from an assignment |
| 2026-05-14 03:38:48 +0000 | <geekosaur> | and if you _do_ want to keep it this way, you should probably say "not executable" instead of "not found" |
| 2026-05-14 03:38:08 +0000 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
| 2026-05-14 03:37:57 +0000 | <geekosaur> | which would also solve this as you never need the second one |
| 2026-05-14 03:36:47 +0000 | <geekosaur> | that condition looks reversed to me fwiw, also you should keep searching in the path if it's not |
| 2026-05-14 03:35:15 +0000 | <tri> | maybeT is the first thing I think of. Is that valid? |
| 2026-05-14 03:35:02 +0000 | <tri> | I'm thinking of using maybeT here, since I'm having Maybe inside an IO. And I'm having to duplicate the cmd <> ": not found" |
| 2026-05-14 03:34:12 +0000 | <tri> | https://github.com/tri97nguyen/codecrafters-shell-haskell/blob/main/app/Main.hs#L56-L62 |
| 2026-05-14 03:33:23 +0000 | <tri> | thank you, I will look up how to use that |
| 2026-05-14 03:33:13 +0000 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn |
| 2026-05-14 03:32:33 +0000 | <geekosaur> | up to you, but many people do |
| 2026-05-14 03:32:19 +0000 | ricardomaps | (~ricardoma@2804:14d:a040:81ea:c347:f768:e2bf:15ae) |
| 2026-05-14 03:32:11 +0000 | <tri> | oh yes that's right. Is that still a thing? Should I use that? |
| 2026-05-14 03:31:32 +0000 | spew | (~spew@user/spew) (Quit: nyaa~) |
| 2026-05-14 03:31:19 +0000 | <geekosaur> | ghcid? |
| 2026-05-14 03:29:45 +0000 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds) |
| 2026-05-14 03:28:54 +0000 | <tri> | thank you |
| 2026-05-14 03:28:54 +0000 | <tri> | Or, in general, what can I use instead of the HLS to compile check my code? |
| 2026-05-14 03:28:54 +0000 | <tri> | the haskell extension in vscode is not very reliable. I often need to restart the haskell language server. I once saw someone mentioned that he used some kind of haskell tool to run in a separate terminal that keep compiling the project to find compile error. Does anyone knows what that is? |
| 2026-05-14 03:28:11 +0000 | notzmv | (~umar@user/notzmv) (Remote host closed the connection) |