Logs: liberachat/#xmonad
| 2024-07-13 00:12:18 | <geekosaur> | your configuration usually starts from `def` (the default value for `XConfig`), then replaces field values using record update syntax, then applies other modifications with e.g. `additionalKeysP :: XConfig -> [(String,X ())] -> XConfig` |
| 2024-07-13 00:12:58 | <geekosaur> | then we use combinators to apply other things (ex. https://github.com/geekosaur/xmonad.hs/blob/hilfy-2023/xmonad.hs#L140-L141) |
| 2024-07-13 00:13:44 | <haskellbridge> | <柱間 (@hashirama:hashi.sbs)> i was reading about what $ represents, and it's basically the "eval" of haskell (comparing it to lisp) |
| 2024-07-13 00:13:48 | <geekosaur> | the keybinds list is usually long enough that we prefer it to come after the main config instead of before it |
| 2024-07-13 00:13:55 | <geekosaur> | well, no |
| 2024-07-13 00:14:19 | <haskellbridge> | <柱間 (@hashirama:hashi.sbs)> geekosaur: isnt? |
| 2024-07-13 00:14:19 | <haskellbridge> | ... long message truncated: https://kf8nh.com/_matrix/media/v3/download/kf8nh.com/MArPkTCdXAGCdRKoVxYdoXgs (3 lines) |
| 2024-07-13 00:14:23 | <geekosaur> | `f $ x` is the same as `f x`, but the precedence of `$` is very low so it kinda acts like backwards parentheses |
| 2024-07-13 00:14:39 | <haskellbridge> | <柱間 (@hashirama:hashi.sbs)> geekosaur: oh |
| 2024-07-13 00:15:04 | <geekosaur> | we also sometimes use it when we want application to be visible as an operator (thus, usually an operator secction) |
| 2024-07-13 00:15:56 | <geekosaur> | > map ($ x) [sin,cos] |
| 2024-07-13 00:15:57 | <lambdabot> | [sin x,cos x] |
| 2024-07-13 00:16:22 | <haskellbridge> | <柱間 (@hashirama:hashi.sbs)> maybe the keybinding has no effect because the way that im declaring the workspaces is wrong |
| 2024-07-13 00:16:25 | <geekosaur> | (that's also showing off th simple-reflect package) |
| 2024-07-13 00:16:37 | <haskellbridge> | <柱間 (@hashirama:hashi.sbs)> https://paste.tomsmeding.com/4EWuKRFT |
| 2024-07-13 00:17:04 | <haskellbridge> | <柱間 (@hashirama:hashi.sbs)> geekosaur: apply x into each element of the list, right? |
| 2024-07-13 00:17:12 | <geekosaur> | also, lisp's "apply" applies a function to parameters specified as a list. There's no good way to do that in Haskell |
| 2024-07-13 00:17:55 | <geekosaur> | especially if the parameters have different types, because all elements of a Haskell list must have the same type |
| 2024-07-13 00:18:04 | <haskellbridge> | <柱間 (@hashirama:hashi.sbs)> geekosaur: haskell requires a different way of thinking then |
| 2024-07-13 00:18:14 | <geekosaur> | yes |
| 2024-07-13 00:19:10 | <haskellbridge> | <柱間 (@hashirama:hashi.sbs)> i wanted to ask something , i dont know if it's off topic , but it's haskell related |
| 2024-07-13 00:19:28 | <haskellbridge> | <柱間 (@hashirama:hashi.sbs)> if haskell is a PF language, then if you "eval" something today, you wont get a different result in the future |
| 2024-07-13 00:19:46 | <haskellbridge> | <柱間 (@hashirama:hashi.sbs)> thus, is it safe to assume that the programs we made today, will basically live on forever? |
| 2024-07-13 00:20:05 | <geekosaur> | well, no, because other things change |
| 2024-07-13 00:20:20 | <geekosaur> | the world inside the program only changes when in IO |
| 2024-07-13 00:20:36 | <haskellbridge> | <柱間 (@hashirama:hashi.sbs)> ik, but we can control what gets in |
| 2024-07-13 00:20:51 | <geekosaur> | running a previously compiled program may change because e.g. the running kernel doesn't support the system calls it makes any more |
| 2024-07-13 00:21:23 | <haskellbridge> | <柱間 (@hashirama:hashi.sbs)> geekosaur: hmmmm, that'd take a few decades to reach this point |
| 2024-07-13 00:22:08 | <geekosaur> | and trying to rebuild it may fail because the language has changed in the meantime (we're kinda poor at backward compatibility, sadly) and trying to use an older compiler may fail (I tried to install ghc 7.10 the other day and it SIGILLed on me) |
| 2024-07-13 00:22:50 | <haskellbridge> | <柱間 (@hashirama:hashi.sbs)> oh |
| 2024-07-13 00:22:52 | <geekosaur> | it was built for an older Ubuntu release; I'm not sure what they changed to cause that |
| 2024-07-13 00:36:14 | <haskellbridge> | <柱間 (@hashirama:hashi.sbs)> geekosaur: this is what i was missing: |
| 2024-07-13 00:36:14 | <haskellbridge> | https://github.com/geekosaur/xmonad.hs/blob/44b4c3678dbe3da159c1f88b9ea28df0e7ff36fc/xmonad.hs#L144 |
| 2024-07-13 00:38:10 | <geekosaur> | yes |
| 2024-07-13 00:38:34 | <geekosaur> | I bound it separately so I could use it from multiple places (notably, from that keybinding) |
| 2024-07-13 00:42:15 | <haskellbridge> | <柱間 (@hashirama:hashi.sbs)> weird, you didnt imported the stackset |
| 2024-07-13 00:43:12 | <haskellbridge> | <柱間 (@hashirama:hashi.sbs)> here it gives a ambiguity error tho |
| 2024-07-13 00:43:12 | <haskellbridge> | https://paste.tomsmeding.com/s3OHE4ag |
| 2024-07-13 00:49:22 | <geekosaur> | imported here https://github.com/geekosaur/xmonad.hs/blob/hilfy-2023/xmonad.hs#L46 |
| 2024-07-13 00:50:20 | <geekosaur> | I think I don't get the ambiguity error because I imported it qualified, so the unqualified name always means the one imported from `XMonad` |
| 2024-07-13 00:50:49 | <geekosaur> | you really want to import `XMonad.StackSet` qualified, because it clashes with not only that but a bunch of things from `Prelude` which is implicitly imported |
| 2024-07-13 00:58:22 | <geekosaur> | collisions if you import it unqualified: workspaces, member, delete (I think), filter, modify, modify' (the latter two with MonadState from mtl or transformers) |
| 2024-07-13 00:59:32 | <geekosaur> | by convention we always import XMonad.StackSet qualified as W, so code snippets using functions from it generally work for everyone |
| 2024-07-13 01:48:52 | <haskellbridge> | <柱間 (@hashirama:hashi.sbs)> geekosaur: i did like this: |
| 2024-07-13 01:48:52 | <haskellbridge> | import qualified XMonad.StackSet as W |
| 2024-07-13 01:48:59 | <haskellbridge> | <柱間 (@hashirama:hashi.sbs)> geekosaur: yes |
| 2024-07-13 01:49:45 | <haskellbridge> | <柱間 (@hashirama:hashi.sbs)> that's a really weird error then, i dont know why it says it's ambiguous |
| 2024-07-13 01:50:19 | <geekosaur> | can you pastebin your entire xmonad.hs? |
| 2024-07-13 01:50:25 | <haskellbridge> | <柱間 (@hashirama:hashi.sbs)> yes |
| 2024-07-13 01:50:46 | <haskellbridge> | <柱間 (@hashirama:hashi.sbs)> https://paste.tomsmeding.com/yTgJ5Am0 |
| 2024-07-13 01:53:21 | <geekosaur> | you are importing XMonad.StackSet three times: once on line 28 (limited to RationalRect), once on line 39 unqualified (this is the one the error message is referencing), once on line 48 qualified |
| 2024-07-13 01:55:29 | <haskellbridge> | <柱間 (@hashirama:hashi.sbs)> so i should import it once and import all from it? |
| 2024-07-13 01:55:44 | <geekosaur> | it makes sense to keep the first, just remove the second |
| 2024-07-13 01:56:12 | <geekosaur> | although you could look for your uses of RationalRect and qualify them with W, then you could get rid of the first one as well |
| 2024-07-13 01:56:17 | <geekosaur> | that's up to you |
| 2024-07-13 01:57:16 | <haskellbridge> | <柱間 (@hashirama:hashi.sbs)> i did this, kept the first |
| 2024-07-13 01:57:16 | <haskellbridge> | but still it throws the same error, of a ambiguous reference |
| 2024-07-13 01:57:29 | <geekosaur> | you removed line 39? |
| 2024-07-13 01:58:15 | <geekosaur> | oh, you're also importing unqualified on line 9 "import XMonad.StackSet as W -- float purposes" |
| 2024-07-13 01:58:25 | <geekosaur> | remove that too |
| 2024-07-13 01:58:48 | <geekosaur> | it ws being shadowed by the import on line 39 and became active when you removed that |
| 2024-07-13 02:00:04 | <haskellbridge> | <柱間 (@hashirama:hashi.sbs)> alright, so i removed all , and now im left with the qualified one |
| 2024-07-13 02:00:05 | × | ml| quits (~ml|@user/ml/x-5298235) (Ping timeout: 240 seconds) |
| 2024-07-13 02:00:32 | <haskellbridge> | <柱間 (@hashirama:hashi.sbs)> ooohhh!!! it works now! |
| 2024-07-13 02:00:50 | <haskellbridge> | <柱間 (@hashirama:hashi.sbs)> thanks you very much |
| 2024-07-13 02:13:54 | → | ml| joins (~ml|@user/ml/x-5298235) |
| 2024-07-13 02:28:31 | × | td_ quits (~td@i53870910.versanet.de) (Ping timeout: 260 seconds) |
| 2024-07-13 02:30:11 | → | td_ joins (~td@i5387091C.versanet.de) |
| 2024-07-13 02:43:52 | × | terrorjack quits (~terrorjac@2a01:4f8:c17:87f8::) (Quit: The Lounge - https://thelounge.chat) |
| 2024-07-13 02:47:58 | → | terrorjack joins (~terrorjac@2a01:4f8:c17:87f8::) |
| 2024-07-13 08:35:12 | → | ash3en joins (~ash3en@2a01:c22:9183:5200:c03d:8904:4cd7:fab0) |
| 2024-07-13 08:37:52 | × | ash3en quits (~ash3en@2a01:c22:9183:5200:c03d:8904:4cd7:fab0) (Remote host closed the connection) |
| 2024-07-13 08:46:04 | × | Solitary quits (~Solitary@user/solitary) (Quit: All work and no play makes Jack a dull boy.) |
| 2024-07-13 09:32:29 | → | Solitary joins (~Solitary@user/solitary) |
| 2024-07-13 09:34:33 | → | ash3en joins (~ash3en@2a01:c22:9183:5200:c03d:8904:4cd7:fab0) |
| 2024-07-13 09:38:14 | → | tremon joins (~tremon@83.80.159.219) |
| 2024-07-13 10:13:01 | × | hightower2 quits (~hightower@213.186.15.36) (Read error: Connection reset by peer) |
| 2024-07-13 11:39:02 | × | burp quits (~quassel@hedgewars/sysadmin/burp) (Server closed connection) |
| 2024-07-13 11:39:12 | → | burp joins (~quassel@hedgewars/sysadmin/burp) |
| 2024-07-13 11:57:38 | × | Aminautf quits (~Aminautf@167.172.225.175) (Server closed connection) |
| 2024-07-13 11:57:52 | → | Aminautf joins (~Aminautf@167.172.225.175) |
| 2024-07-13 12:28:35 | × | ash3en quits (~ash3en@2a01:c22:9183:5200:c03d:8904:4cd7:fab0) (Ping timeout: 256 seconds) |
| 2024-07-13 12:29:22 | → | hiecaq joins (~hiecaq@user/hiecaq) |
| 2024-07-13 12:41:45 | × | hiecaq quits (~hiecaq@user/hiecaq) (Remote host closed the connection) |
| 2024-07-13 12:44:10 | → | hiecaq joins (~hiecaq@user/hiecaq) |
| 2024-07-13 13:13:35 | × | RMSBach quits (~guygastin@137.184.131.156) (Server closed connection) |
| 2024-07-13 13:14:26 | → | RMSBach joins (~guygastin@137.184.131.156) |
| 2024-07-13 14:43:46 | → | ash3en joins (~ash3en@2a01:c23:9461:f701:9ec8:8856:9bf9:672) |
| 2024-07-13 14:50:15 | × | ash3en quits (~ash3en@2a01:c23:9461:f701:9ec8:8856:9bf9:672) (Ping timeout: 256 seconds) |
| 2024-07-13 14:52:46 | → | ash3en joins (~ash3en@2a01:c23:8dbe:7b00:c358:807f:b77e:de14) |
| 2024-07-13 15:06:41 | × | ash3en quits (~ash3en@2a01:c23:8dbe:7b00:c358:807f:b77e:de14) (Ping timeout: 256 seconds) |
| 2024-07-13 15:17:09 | → | ash3en joins (~ash3en@2a01:c23:8886:7700:a039:baee:74cf:6b33) |
| 2024-07-13 17:03:15 | × | catman quits (~catman@user/catman) (Ping timeout: 256 seconds) |
| 2024-07-13 18:06:46 | × | ash3en quits (~ash3en@2a01:c23:8886:7700:a039:baee:74cf:6b33) (Remote host closed the connection) |
| 2024-07-13 18:18:31 | → | ash3en joins (~ash3en@2a01:c23:8886:7700:a039:baee:74cf:6b33) |
| 2024-07-13 18:18:56 | × | ash3en quits (~ash3en@2a01:c23:8886:7700:a039:baee:74cf:6b33) (Remote host closed the connection) |
| 2024-07-13 18:25:32 | → | ash3en joins (~ash3en@2a01:c23:8886:7700:a039:baee:74cf:6b33) |
| 2024-07-13 18:29:13 | × | ash3en quits (~ash3en@2a01:c23:8886:7700:a039:baee:74cf:6b33) (Remote host closed the connection) |
| 2024-07-13 18:41:47 | → | ash3en joins (~ash3en@2a01:c23:8886:7700:a039:baee:74cf:6b33) |
| 2024-07-13 19:15:11 | <haskellbridge> | <柱間 (@hashirama:hashi.sbs)> what can be considered "basic haskell" ? |
All times are in UTC.