Home liberachat/#xmonad: Logs Calendar

Logs on 2024-07-13 (liberachat/#xmonad)

00:00:45 <geekosaur> also: IO does take some brain rewiring… but lazy evaluation will really break your brain until you get used to it
00:01:52 <geekosaur> > [1..]
00:01:53 <lambdabot> [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,...
00:03:29 <geekosaur> ^ lazy evaluation is what makes this work, not special-casing by the bot. you can think of it as evaluation turning a crank until it gets a value, and stopping turning the crank when it no longer needs values (in this case, because lambdabot only prints output to a certain size and truncates)
00:04:54 <geekosaur> (you can't use the bot from matrix, because heisenbridge only puppets the matrix side, so everything you send has a prefix on the IRC side)
00:08:26 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> geekosaur: oh, this is just like a set in mathematics
00:08:34 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> this is the set of all integers
00:08:55 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> geekosaur: this is cool, might save a lot of work
00:09:19 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> geekosaur: i assumeed haskell didnt had indentation because of the brackets
00:09:46 <geekosaur> indentation/"layout" is how we normally do things. it is possible to use brackets to override, but we usually don't
00:09:49 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> btw, the code did compiled, but i didnt understood the key convention
00:10:00 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> C-M-1 copies to the first workspace?
00:10:23 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> i tried pressing it, but it does nothing at all
00:10:32 <geekosaur> the brackets you see in xmonad, though, aren't about indentation: they're record update syntax `record {field1 = newvalue, field2 = newvalue2, …}`
00:10:54 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> geekosaur: so it's different from the most languages huh...
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`
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)
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)
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
00:13:55 <geekosaur> well, no
00:14:19 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> geekosaur: isnt?
00:14:19 <haskellbridge> ... long message truncated: https://kf8nh.com/_matrix/media/v3/download/kf8nh.com/MArPkTCdXAGCdRKoVxYdoXgs (3 lines)
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
00:14:39 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> geekosaur: oh
00:15:04 <geekosaur> we also sometimes use it when we want application to be visible as an operator (thus, usually an operator secction)
00:15:56 <geekosaur> > map ($ x) [sin,cos]
00:15:57 <lambdabot> [sin x,cos x]
00:16:22 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> maybe the keybinding has no effect because the way that im declaring the workspaces is wrong
00:16:25 <geekosaur> (that's also showing off th simple-reflect package)
00:16:37 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> https://paste.tomsmeding.com/4EWuKRFT
00:17:04 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> geekosaur: apply x into each element of the list, right?
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
00:17:55 <geekosaur> especially if the parameters have different types, because all elements of a Haskell list must have the same type
00:18:04 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> geekosaur: haskell requires a different way of thinking then
00:18:14 <geekosaur> yes
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
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
00:19:46 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> thus, is it safe to assume that the programs we made today, will basically live on forever?
00:20:05 <geekosaur> well, no, because other things change
00:20:20 <geekosaur> the world inside the program only changes when in IO
00:20:36 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> ik, but we can control what gets in
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
00:21:23 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> geekosaur: hmmmm, that'd take a few decades to reach this point
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)
00:22:50 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> oh
00:22:52 <geekosaur> it was built for an older Ubuntu release; I'm not sure what they changed to cause that
00:36:14 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> geekosaur: this is what i was missing:
00:36:14 <haskellbridge> https://github.com/geekosaur/xmonad.hs/blob/44b4c3678dbe3da159c1f88b9ea28df0e7ff36fc/xmonad.hs#L144
00:38:10 <geekosaur> yes
00:38:34 <geekosaur> I bound it separately so I could use it from multiple places (notably, from that keybinding)
00:42:15 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> weird, you didnt imported the stackset
00:43:12 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> here it gives a ambiguity error tho
00:43:12 <haskellbridge> https://paste.tomsmeding.com/s3OHE4ag
00:49:22 <geekosaur> imported here https://github.com/geekosaur/xmonad.hs/blob/hilfy-2023/xmonad.hs#L46
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`
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
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)
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
01:48:52 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> geekosaur: i did like this:
01:48:52 <haskellbridge> import qualified XMonad.StackSet as W
01:48:59 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> geekosaur: yes
01:49:45 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> that's a really weird error then, i dont know why it says it's ambiguous
01:50:19 <geekosaur> can you pastebin your entire xmonad.hs?
01:50:25 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> yes
01:50:46 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> https://paste.tomsmeding.com/yTgJ5Am0
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
01:55:29 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> so i should import it once and import all from it?
01:55:44 <geekosaur> it makes sense to keep the first, just remove the second
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
01:56:17 <geekosaur> that's up to you
01:57:16 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> i did this, kept the first
01:57:16 <haskellbridge> but still it throws the same error, of a ambiguous reference
01:57:29 <geekosaur> you removed line 39?
01:58:15 <geekosaur> oh, you're also importing unqualified on line 9 "import XMonad.StackSet as W -- float purposes"
01:58:25 <geekosaur> remove that too
01:58:48 <geekosaur> it ws being shadowed by the import on line 39 and became active when you removed that
02:00:04 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> alright, so i removed all , and now im left with the qualified one
02:00:05 × ml| quits (~ml|@user/ml/x-5298235) (Ping timeout: 240 seconds)
02:00:32 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> ooohhh!!! it works now!
02:00:50 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> thanks you very much
02:13:54 ml| joins (~ml|@user/ml/x-5298235)
02:28:31 × td_ quits (~td@i53870910.versanet.de) (Ping timeout: 260 seconds)
02:30:11 td_ joins (~td@i5387091C.versanet.de)
02:43:52 × terrorjack quits (~terrorjac@2a01:4f8:c17:87f8::) (Quit: The Lounge - https://thelounge.chat)
02:47:58 terrorjack joins (~terrorjac@2a01:4f8:c17:87f8::)
08:35:12 ash3en joins (~ash3en@2a01:c22:9183:5200:c03d:8904:4cd7:fab0)
08:37:52 × ash3en quits (~ash3en@2a01:c22:9183:5200:c03d:8904:4cd7:fab0) (Remote host closed the connection)
08:46:04 × Solitary quits (~Solitary@user/solitary) (Quit: All work and no play makes Jack a dull boy.)
09:32:29 Solitary joins (~Solitary@user/solitary)
09:34:33 ash3en joins (~ash3en@2a01:c22:9183:5200:c03d:8904:4cd7:fab0)
09:38:14 tremon joins (~tremon@83.80.159.219)
10:13:01 × hightower2 quits (~hightower@213.186.15.36) (Read error: Connection reset by peer)
11:39:02 × burp quits (~quassel@hedgewars/sysadmin/burp) (Server closed connection)
11:39:12 burp joins (~quassel@hedgewars/sysadmin/burp)
11:57:38 × Aminautf quits (~Aminautf@167.172.225.175) (Server closed connection)
11:57:52 Aminautf joins (~Aminautf@167.172.225.175)
12:28:35 × ash3en quits (~ash3en@2a01:c22:9183:5200:c03d:8904:4cd7:fab0) (Ping timeout: 256 seconds)
12:29:22 hiecaq joins (~hiecaq@user/hiecaq)
12:41:45 × hiecaq quits (~hiecaq@user/hiecaq) (Remote host closed the connection)
12:44:10 hiecaq joins (~hiecaq@user/hiecaq)
13:13:35 × RMSBach quits (~guygastin@137.184.131.156) (Server closed connection)
13:14:26 RMSBach joins (~guygastin@137.184.131.156)
14:43:46 ash3en joins (~ash3en@2a01:c23:9461:f701:9ec8:8856:9bf9:672)
14:50:15 × ash3en quits (~ash3en@2a01:c23:9461:f701:9ec8:8856:9bf9:672) (Ping timeout: 256 seconds)
14:52:46 ash3en joins (~ash3en@2a01:c23:8dbe:7b00:c358:807f:b77e:de14)
15:06:41 × ash3en quits (~ash3en@2a01:c23:8dbe:7b00:c358:807f:b77e:de14) (Ping timeout: 256 seconds)
15:17:09 ash3en joins (~ash3en@2a01:c23:8886:7700:a039:baee:74cf:6b33)
17:03:15 × catman quits (~catman@user/catman) (Ping timeout: 256 seconds)
18:06:46 × ash3en quits (~ash3en@2a01:c23:8886:7700:a039:baee:74cf:6b33) (Remote host closed the connection)
18:18:31 ash3en joins (~ash3en@2a01:c23:8886:7700:a039:baee:74cf:6b33)
18:18:56 × ash3en quits (~ash3en@2a01:c23:8886:7700:a039:baee:74cf:6b33) (Remote host closed the connection)
18:25:32 ash3en joins (~ash3en@2a01:c23:8886:7700:a039:baee:74cf:6b33)
18:29:13 × ash3en quits (~ash3en@2a01:c23:8886:7700:a039:baee:74cf:6b33) (Remote host closed the connection)
18:41:47 ash3en joins (~ash3en@2a01:c23:8886:7700:a039:baee:74cf:6b33)
19:15:11 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> what can be considered "basic haskell" ?
19:15:11 <haskellbridge> and is it enough for dealing with xmonad?
19:16:13 <geekosaur> it will be good enough for your `xmonad.hs`, possibly not good enough for reading internal source
19:17:49 <geekosaur> if you are using the wikibook I pointed you to earlier, the first two sections of the Beginner's Track should be enough
19:19:43 <geekosaur> if you want to understand what the various components are doing, you'll want to finish the beginner's track and the beginning of "Fun with Types" in the Advanced Track
19:20:11 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> geekosaur: thank you, will do some notes on that
19:20:21 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> geekosaur: that too
19:20:33 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> i saw a bit of the "ducking type" of haskell
19:20:33 <geekosaur> but we deliberately try to keep what users need to configure their xmonad.hs simple
19:21:05 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> geekosaur: yeah, i've noticed that xmonad indeed has a high-level of abstraction, i really appreciate that
19:21:45 <geekosaur> which means some complexity in the implementation in order to expose easy-to-use interfaces
19:22:52 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> btw you've mentioned yesterday that some programs in haskell wont work after a few years, but most of the old extensions included in xmonad-contrib are quite old and still work
19:26:40 <geekosaur> we've patched them up as needed when the compiler changes enough to break them, plus we discard or replace things that break too much (cf. https://github.com/xmonad/xmonad-contrib/issues/793)
19:29:02 <geekosaur> _most_ of the compiler changes either don't affect us (e.g. changes to `Monad` and `Num`'s prerequisites) or are easily fixed (recently spacing was made more consistent, which required some tweaking but not much because the changes cvodified what was already considered a best practice)
19:31:17 mekeor joins (~user@2001:a61:24fd:e001:35e:e281:1be5:12cd)
20:16:39 × ash3en quits (~ash3en@2a01:c23:8886:7700:a039:baee:74cf:6b33) (Ping timeout: 256 seconds)
21:17:16 ash3en joins (~ash3en@193.32.248.188)
21:24:56 × Deadm0th quits (~mikoshi@user/Deadm0th) (Server closed connection)
21:25:19 Deadm0th joins (~mikoshi@83.168.107.192)
21:25:20 × Deadm0th quits (~mikoshi@83.168.107.192) (Changing host)
21:25:20 Deadm0th joins (~mikoshi@user/Deadm0th)
21:28:56 × ash3en quits (~ash3en@193.32.248.188) (Remote host closed the connection)
21:29:15 ash3en joins (~ash3en@193.32.248.188)
21:33:11 × ash3en quits (~ash3en@193.32.248.188) (Remote host closed the connection)
21:54:12 catman joins (~catman@user/catman)
23:06:21 × mekeor quits (~user@2001:a61:24fd:e001:35e:e281:1be5:12cd) (Quit: towards emacs as interface to cybernetic council communism)
23:53:38 × piele quits (~piele@tbonesteak.creativeserver.net) (Server closed connection)
23:53:53 piele joins (~piele@tbonesteak.creativeserver.net)

All times are in UTC on 2024-07-13.