2023-01-22 00:19:04 +0100 | tremon | (~tremon@83-85-213-108.cable.dynamic.v4.ziggo.nl) (Quit: getting boxed in) |
2023-01-22 00:29:37 +0100 | trevdev[m] | (~trevdevma@2001:470:69fc:105::4e71) |
2023-01-22 00:30:28 +0100 | <trevdev[m]> | Heya. I am trying to keybind a function I wrote but it doesn't return X () but otherwise seems to work. How do I make my linter happy? |
2023-01-22 00:31:51 +0100 | <trevdev[m]> | The function just executes System.Process.runProcess String [String] directly |
2023-01-22 00:34:14 +0100 | <geekosaur> | that's not going to work as an xmonad keybinding for multiple reasons, not just the type error |
2023-01-22 00:36:02 +0100 | <geekosaur> | it would run whatever it is with the main loop blocked (it had better not display a window because it'll never show) and then crash because child processes are ignored and the implicit `waitForProcess` will throw an exception |
2023-01-22 00:36:44 +0100 | <geekosaur> | https://hackage.haskell.org/package/xmonad-contrib-0.17.1/docs/XMonad-Util-Run.html has some usable alternatives |
2023-01-22 00:36:53 +0100 | <trevdev[m]> | Back to the drawing board |
2023-01-22 00:37:56 +0100 | <trevdev[m]> | Thanks geekosaur - I had tried the built in process running functions but failed to wrap my head around them, new to Haskell, using XMonad as a learning playground |
2023-01-22 00:38:48 +0100 | <geekosaur[m]> | this isn't Haskell specific; take a look at SIGCHLD |
2023-01-22 00:39:48 +0100 | <geekosaur[m]> | window managers and similar programs want to not wait on children because they need to pay attention to window manager events, so they ignore SIGCHLD |
2023-01-22 00:40:52 +0100 | <geekosaur[m]> | and if you run something that will block the X event loop, any window manager will have problems (and any clients you try to run will have even bigger problems when they try to open a window) |
2023-01-22 00:41:20 +0100 | <trevdev[m]> | geekosaur[m]: This is not something that many other Window managers make you consider, so I'm doubly learning here |
2023-01-22 00:41:57 +0100 | <geekosaur[m]> | right, but most window managers either don't let you do this or fail in unexpected ways if you do manage to do it |
2023-01-22 00:43:23 +0100 | <trevdev[m]> | I can think of some spectacular moments where I may have managed to do it |
2023-01-22 00:50:31 +0100 | <trevdev[m]> | Trying to wrap "safeSpawn" into a function from another module. Since I don't know what I am doing there are red squiggles everywhere |
2023-01-22 00:50:39 +0100 | <trevdev[m]> | I think I shall take a break |
2023-01-22 00:51:48 +0100 | <geekosaur[m]> | you can pastebin code here for review |
2023-01-22 00:51:55 +0100 | <geekosaur[m]> | @where paste |
2023-01-22 00:51:55 +0100 | <lambdabot> | Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com |
2023-01-22 00:53:22 +0100 | <trevdev[m]> | At this point I am outta time but I will take you up on that later lambdabot |
2023-01-22 00:58:41 +0100 | <trevdev[m]> | Classic. The module export is a function that returns safeSpawn. In order for it to work I have to call it in my keybinds |
2023-01-22 00:59:42 +0100 | <trevdev[m]> | Looks funny but it works: ("M-p r", dmenuRun ()) |
2023-01-22 01:00:04 +0100 | <trevdev[m]> | dmenuRun m = safeSpawn "dmenu_run" $ baseMenuFlags ++ menuSelectBg "#ABDC88" ++ verticalMenu "10" |
2023-01-22 01:01:58 +0100 | <geekosaur[m]> | what's m for? |
2023-01-22 01:02:22 +0100 | <trevdev[m]> | Probably not required, it's rot |
2023-01-22 01:04:09 +0100 | <trevdev[m]> | Actually no, "ambiguous type variable m0 arrising from safeSpawn" |
2023-01-22 01:04:10 +0100 | <trevdev[m]> | It does something |
2023-01-22 01:04:18 +0100 | <trevdev[m]> | Or is supposed to |
2023-01-22 01:06:17 +0100 | <geekosaur[m]> | I'm not sure that's related; it sounds more like safeSpawn can't figure out what MonadIO instance to use. but if you're calling it in a keybinding, it should know to use X |
2023-01-22 01:10:16 +0100 | <geekosaur[m]> | oh, I see. without either it or a type signature, the monomorphism restriction bites you |
2023-01-22 01:10:24 +0100 | <geekosaur[m]> | I'd just add a type signature |
2023-01-22 01:11:18 +0100 | <geekosaur[m]> | `dmenuRun :: MonadIO m => m ()` |
2023-01-22 01:12:12 +0100 | <geekosaur[m]> | or dmenuRun :: X () |
2023-01-22 01:26:33 +0100 | ghormoon | (~ghormoon@ghorland.net) (Ping timeout: 252 seconds) |
2023-01-22 02:03:26 +0100 | ghormoon | (~ghormoon@ghorland.net) |
2023-01-22 02:07:15 +0100 | <trevdev[m]> | I'll give it a shot when I get home. Thanks geekosaur @geekosaur:matrix.org: ! |
2023-01-22 04:03:31 +0100 | banc | (banc@gateway/vpn/protonvpn/banc) (Ping timeout: 268 seconds) |
2023-01-22 04:24:12 +0100 | banc | (banc@gateway/vpn/protonvpn/banc) |
2023-01-22 04:38:04 +0100 | <HB[m]> | Hi guys, how's everyone doing? 🙂 |
2023-01-22 04:39:00 +0100 | <HB[m]> | I'm having a bit of trouble building xmobar with stack, latest version. |
2023-01-22 04:39:01 +0100 | <HB[m]> | I pull the git repo in ~/.config/xmonad/xmobar and add -xmobar in my stack.yml and then stack build and I get errors |
2023-01-22 04:41:39 +0100 | terrorjack | (~terrorjac@2a01:4f8:1c1e:4e8c::) (Quit: The Lounge - https://thelounge.chat) |
2023-01-22 04:43:47 +0100 | <HB[m]> | * I'm having a bit of trouble building xmobar with stack, latest version. |
2023-01-22 04:43:47 +0100 | <HB[m]> | I pull the git repo in ~/.config/xmonad/xmobar and add -xmobar in my stack.yml and then stack build and I get errors. |
2023-01-22 04:43:47 +0100 | <HB[m]> | Oh, nm. Git repo moved. |
2023-01-22 04:43:55 +0100 | terrorjack | (~terrorjac@2a01:4f8:1c1e:4e8c::) |
2023-01-22 04:51:14 +0100 | td_ | (~td@83.135.9.44) (Ping timeout: 260 seconds) |
2023-01-22 04:52:51 +0100 | td_ | (~td@83.135.9.13) |
2023-01-22 05:07:09 +0100 | abhixec | (~abhinav@c-67-169-139-16.hsd1.ca.comcast.net) |
2023-01-22 05:09:03 +0100 | <HB[m]> | * I'm having a bit of trouble building xmobar with stack, latest version. |
2023-01-22 05:09:03 +0100 | <HB[m]> | I pull the git repo in ~/.config/xmonad/xmobar and add -xmobar in my stack.yml and then stack build and I get errors. |
2023-01-22 05:09:03 +0100 | <HB[m]> | Oh, nm. Git repo moved. |
2023-01-22 05:09:03 +0100 | <HB[m]> | Changed to the new font format. xmobar is no longer from ubuntu repos. |
2023-01-22 05:15:07 +0100 | rundown | (~defjam@2a02:c7e:2807:b900:6c7a:2207:d06b:87cb) (Ping timeout: 248 seconds) |
2023-01-22 05:20:21 +0100 | <trevdev[m]> | <geekosaur[m]> "I'd just add a type signature" <- Ok wow, so explicitly adding a signature rather than inferring it made the difference. No need for `m`, nor to call the function in the XMonad config. The results at runtime are the same. Fascinating to see how one detail can change the shape of the linter's expectations |
2023-01-22 05:21:03 +0100 | <trevdev[m]> | O perhaps even the behavior of the code ?? |
2023-01-22 05:21:15 +0100 | <trevdev[m]> | s/O/Or/, s/behavior/behaviour/ |
2023-01-22 05:56:14 +0100 | jao | (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 272 seconds) |
2023-01-22 07:20:10 +0100 | werneta | (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 252 seconds) |
2023-01-22 07:25:59 +0100 | werneta | (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
2023-01-22 07:26:56 +0100 | abhixec | (~abhinav@c-67-169-139-16.hsd1.ca.comcast.net) (Ping timeout: 256 seconds) |
2023-01-22 08:06:55 +0100 | ElKowar7 | (~ElKowar@srv-fin.xware-gmbh.de) |
2023-01-22 08:09:21 +0100 | Forkk_ | (~forkk@li926-228.members.linode.com) |
2023-01-22 08:10:13 +0100 | td__ | (~td@83.135.9.13) |
2023-01-22 08:11:36 +0100 | gauge_ | (~gauge@user/gauge) |
2023-01-22 08:14:55 +0100 | td_ | (~td@83.135.9.13) (*.net *.split) |
2023-01-22 08:14:55 +0100 | xmonadtrack | (~xmonadtra@xmonad/geekosaur) (*.net *.split) |
2023-01-22 08:14:56 +0100 | Solitary | (~Solitary@user/solitary) (*.net *.split) |
2023-01-22 08:14:56 +0100 | Forkk | (~forkk@li926-228.members.linode.com) (*.net *.split) |
2023-01-22 08:14:56 +0100 | wz1000 | (~zubin@static.11.113.47.78.clients.your-server.de) (*.net *.split) |
2023-01-22 08:14:56 +0100 | gauge | (~gauge@user/gauge) (*.net *.split) |
2023-01-22 08:14:56 +0100 | byorgey | (~byorgey@155.138.238.211) (*.net *.split) |
2023-01-22 08:14:56 +0100 | ElKowar | (~ElKowar@srv-fin.xware-gmbh.de) (*.net *.split) |
2023-01-22 08:15:03 +0100 | ElKowar7 | ElKowar |
2023-01-22 08:19:45 +0100 | byorgey | (~byorgey@155.138.238.211) |
2023-01-22 08:20:03 +0100 | xmonadtrack | (~xmonadtra@069-135-003-034.biz.spectrum.com) |
2023-01-22 08:20:04 +0100 | xmonadtrack | (~xmonadtra@069-135-003-034.biz.spectrum.com) (Changing host) |
2023-01-22 08:20:04 +0100 | xmonadtrack | (~xmonadtra@xmonad/geekosaur) |
2023-01-22 08:21:20 +0100 | wz1000 | (~zubin@static.11.113.47.78.clients.your-server.de) |
2023-01-22 08:21:27 +0100 | <geekosaur[m]> | look up the monomorphism restriction |
2023-01-22 08:23:37 +0100 | Solitary | (~Solitary@user/solitary) |
2023-01-22 08:35:45 +0100 | qbt | (~qbt@user/edun) |
2023-01-22 08:36:04 +0100 | qbt | (~qbt@user/edun) (Client Quit) |
2023-01-22 12:30:50 +0100 | haskl | (~haskl@user/haskl) (Read error: Connection reset by peer) |
2023-01-22 12:32:39 +0100 | haskl | (~haskl@user/haskl) |
2023-01-22 12:51:27 +0100 | Solitary | (~Solitary@user/solitary) (Quit: All work and no play makes Jack a dull boy.) |
2023-01-22 12:55:09 +0100 | Solitary | (~Solitary@user/solitary) |
2023-01-22 13:46:43 +0100 | tremon | (~tremon@83-85-213-108.cable.dynamic.v4.ziggo.nl) |
2023-01-22 14:05:06 +0100 | rundown | (~defjam@2a02:c7e:2807:b900:6c7a:2207:d06b:87cb) |
2023-01-22 14:19:55 +0100 | yaslam | (~yaslam@user/yaslam) (Remote host closed the connection) |
2023-01-22 14:20:19 +0100 | yaslam | (~yaslam@user/yaslam) |
2023-01-22 14:35:55 +0100 | Digit | (~user@user/digit) (Read error: Connection reset by peer) |
2023-01-22 14:40:34 +0100 | Digit | (~user@user/digit) |
2023-01-22 14:51:39 +0100 | rundown | (~defjam@2a02:c7e:2807:b900:6c7a:2207:d06b:87cb) (Ping timeout: 248 seconds) |
2023-01-22 15:24:52 +0100 | rundown | (~defjam@2a02:c7e:2807:b900:6c7a:2207:d06b:87cb) |
2023-01-22 16:30:31 +0100 | rundown | (~defjam@2a02:c7e:2807:b900:6c7a:2207:d06b:87cb) (Ping timeout: 260 seconds) |
2023-01-22 16:34:03 +0100 | rundown | (~defjam@2a02:c7e:2807:b900:6c7a:2207:d06b:87cb) |
2023-01-22 16:52:47 +0100 | <trevdev[m]> | Turns out I had some caching going on and my functions linted fine but didn't actually work. I think I am learning that xmonad on nixos is weird. |
2023-01-22 16:54:28 +0100 | <trevdev[m]> | I moved my modules to the .config/xmonad/lib folder instead of just the same folder as xmonad.hs. Pretty sure they're picked up now but the haskell-language-server can't figure out where they are now |
2023-01-22 16:55:43 +0100 | <trevdev[m]> | Reading suggests using (and learning) stack may fix that, but that would defeat the purpose of using nixos in the first place so I am not really able to trust the language server atm |
2023-01-22 17:00:08 +0100 | unclechu | (~unclechu@2001:470:69fc:105::354) (Quit: You have been kicked for being idle) |
2023-01-22 17:09:12 +0100 | <[Leary]> | trevdev[m]: It's low-tech compared to HLS, but on my NixOS setup I use ghcid via alias ghcidx='ghcid --command "$XMONAD_GHC"i" -i$HOME/.config/xmonad/lib -Wall $HOME/.config/xmonad/xmonad.hs"' |
2023-01-22 17:09:26 +0100 | unclechu | (~unclechu@2001:470:69fc:105::354) |
2023-01-22 17:12:01 +0100 | <[Leary]> | If you really want to use HLS, you probably just need a cabal file to help it understand the structure of the project (telling it that xmonad.hs is Main and lib is your source dir, etc). But I don't use it myself, so don't quote me on that. |
2023-01-22 17:52:37 +0100 | <trevdev[m]> | From a learning standpoint the LSP is a valuable tool. HLS in particular has taught me things that I probably would not have looked up! |
2023-01-22 17:53:43 +0100 | <trevdev[m]> | I don't know how to configure Cabal and if it involves declaring literally everything down to where xmonad/contrib are on nix then its a whole thing |
2023-01-22 17:58:47 +0100 | gknux | (~gknux@user/galaxy-knuckles/x-3015990) (Quit: ....and i am outta here....) |
2023-01-22 18:00:28 +0100 | gknux | (~gknux@user/galaxy-knuckles/x-3015990) |
2023-01-22 18:01:40 +0100 | jao | (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
2023-01-22 18:02:32 +0100 | <[Leary]> | I haven't tried, but in a `cabal.project` file you could set `with-compiler` to the value of $XMONAD_GHC. That should make the versions of xmonad and xmonad-contrib you're using available, such that cabal prefers them over fetching and building different versions from hackage. |
2023-01-22 18:05:33 +0100 | gknux | (~gknux@user/galaxy-knuckles/x-3015990) (Quit: ....and i am outta here....) |
2023-01-22 18:08:17 +0100 | gknux | (~gknux@user/galaxy-knuckles/x-3015990) |
2023-01-22 18:08:39 +0100 | rundown | (~defjam@2a02:c7e:2807:b900:6c7a:2207:d06b:87cb) (Ping timeout: 265 seconds) |
2023-01-22 18:23:32 +0100 | <trevdev[m]> | I'll give it a shot later, thanks! |
2023-01-22 19:04:56 +0100 | rundown | (~defjam@2a02:c7e:2807:b900:6c7a:2207:d06b:87cb) |
2023-01-22 19:23:57 +0100 | escobear | (~gknux@user/galaxy-knuckles/x-3015990) |
2023-01-22 19:24:08 +0100 | gknux | (~gknux@user/galaxy-knuckles/x-3015990) (Ping timeout: 260 seconds) |
2023-01-22 19:24:49 +0100 | escobear | gknux |
2023-01-22 21:34:19 +0100 | rundown | (~defjam@2a02:c7e:2807:b900:6c7a:2207:d06b:87cb) (Ping timeout: 260 seconds) |
2023-01-22 21:46:36 +0100 | rundown | (~defjam@2a02:c7e:2807:b900:6c7a:2207:d06b:87cb) |
2023-01-22 21:50:46 +0100 | abhixec | (~abhinav@c-67-169-139-16.hsd1.ca.comcast.net) |
2023-01-22 22:00:51 +0100 | yaslam | (~yaslam@user/yaslam) (Quit: ZNC 1.8.2 - https://znc.in) |
2023-01-22 22:01:35 +0100 | yaslam | (~yaslam@user/yaslam) |