Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2020-11-17 03:34:14 <Shadowraith> being honest i have no idea at all, i thought that might have been a normal function
2020-11-17 03:34:28 <Axman6> and what type does ppLayout have? (I know the ansxwer, I need to know if you do :)
2020-11-17 03:34:38 <Shadowraith> should be string right?
2020-11-17 03:34:46 <Axman6> nope, it's definitely a function
2020-11-17 03:34:52 <Shadowraith> function is a type?
2020-11-17 03:34:55 <Axman6> yes
2020-11-17 03:35:03 <Shadowraith> gosh C stop interfering in my head haha
2020-11-17 03:35:03 <Axman6> :t toUpper
2020-11-17 03:35:05 <lambdabot> Char -> Char
2020-11-17 03:35:10 <Axman6> :t show
2020-11-17 03:35:11 <lambdabot> Show a => a -> String
2020-11-17 03:35:28 <Axman6> I can tell you that ppLayout :: String -> String
2020-11-17 03:35:37 <Shadowraith> OH
2020-11-17 03:35:42 <Axman6> it needs to be passed a string, which you aren't doing
2020-11-17 03:35:43 <Shadowraith> ok i understand that
2020-11-17 03:35:52 <Shadowraith> i understand the type now
2020-11-17 03:35:59 <Shadowraith> oh so i have to pass it
2020-11-17 03:36:03 <Axman6> where are you expecting the string "Hidden Tall" to come from?
2020-11-17 03:36:15 <Shadowraith> layouts somewhere...
2020-11-17 03:37:32 nbloomf joins (~nbloomf@2600:1700:ad14:3020:5d4c:3718:c0a8:9f94)
2020-11-17 03:37:33 <Shadowraith> im not exactly sure how to grab that
2020-11-17 03:38:31 × superstar64 quits (6ccefa7c@108-206-250-124.lightspeed.miamfl.sbcglobal.net) (Remote host closed the connection)
2020-11-17 03:38:52 <monochrom> Who would be providing the input string?
2020-11-17 03:40:24 <Shadowraith> xmonad layout, see what i did is because im not using dynamicPP anymore, i stole these lines from my dynamicLogHook function and was trying to do it without dynamicPP
2020-11-17 03:42:07 <Axman6> what is dynamicPP?
2020-11-17 03:42:17 <Axman6> you're going to have to share more code for us to be able to help you
2020-11-17 03:42:25 × obfusk quits (~quassel@a82-161-150-56.adsl.xs4all.nl) (Remote host closed the connection)
2020-11-17 03:42:36 <Shadowraith> https://hackage.haskell.org/package/xmonad-contrib-0.16/docs/XMonad-Hooks-DynamicLog.html
2020-11-17 03:42:38 × todda7 quits (~torstein@ppp-2-84-17-169.home.otenet.gr) (Ping timeout: 264 seconds)
2020-11-17 03:42:52 × conal quits (~conal@66.115.176.210) (Quit: Computer has gone to sleep.)
2020-11-17 03:43:09 <Shadowraith> im sorry ik, im trying but im not all there yet at all with haskell
2020-11-17 03:43:36 obfusk joins (~quassel@a82-161-150-56.adsl.xs4all.nl)
2020-11-17 03:43:38 <Axman6> that's fine, we're happy to help, but ywe also can't work in the dark. most of us don't use Xmonad
2020-11-17 03:43:39 plutoniix joins (~q@175.176.222.7)
2020-11-17 03:44:13 <Shadowraith> ik i appreciate it a ton, if i understood haskell a lil better it would be easier to explain
2020-11-17 03:44:44 × livvy quits (~livvy@gateway/tor-sasl/livvy) (Remote host closed the connection)
2020-11-17 03:44:49 <Shadowraith> so what dynamicLog does is compile a bunch of different things from the program together into one file (im pretty sure)
2020-11-17 03:44:57 <Shadowraith> layouts, workspaces, etc
2020-11-17 03:45:26 <Shadowraith> i already have workspaces everywhere, and just want layouts to a file but not 100% sure how to do that
2020-11-17 03:45:28 <Axman6> do you want to use dynamicLogWithPP which lets you customise things?
2020-11-17 03:45:42 <Shadowraith> if that is the best option then yes
2020-11-17 03:45:46 <Axman6> I don't really understand how files come into it
2020-11-17 03:46:02 <Shadowraith> i think it exports to a file so that a separate program can use it
2020-11-17 03:46:14 <Shadowraith> for my instance: my bar: polybar
2020-11-17 03:46:15 × star_cloud quits (~star_clou@ec2-34-217-37-165.us-west-2.compute.amazonaws.com) (Remote host closed the connection)
2020-11-17 03:46:44 × lagothrix quits (~lagothrix@unaffiliated/lagothrix) (Killed (card.freenode.net (Nickname regained by services)))
2020-11-17 03:46:49 <Axman6> I would guess that you can do something like: dynamicLogWithPP def{ ppLayout = \x -> case x of ... }
2020-11-17 03:46:52 lagothrix joins (~lagothrix@unaffiliated/lagothrix)
2020-11-17 03:47:08 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2020-11-17 03:47:35 <Shadowraith> ooh yes i have that now, works with this `dynamicLogWithPP = def { ... }`
2020-11-17 03:47:41 <Axman6> that is taking the defaults (which is what defaultPP contains but is deprecated in favout of def from Data.Default), and then overriding ppLayout
2020-11-17 03:47:53 <Axman6> no, you shouldn't have an = in there
2020-11-17 03:48:09 <Shadowraith> oh i think it gave an error before, lemme try again
2020-11-17 03:48:10 <Axman6> def {... } is an argument to dynamicLogWithPP
2020-11-17 03:48:41 <Shadowraith> xmonad.hs:465:1: error:
2020-11-17 03:48:41 <Shadowraith> Parse error: module header, import declaration
2020-11-17 03:48:41 <Shadowraith> or top-level declaration expected.
2020-11-17 03:48:41 <Shadowraith> |
2020-11-17 03:50:04 × Sgeo_ quits (~Sgeo@ool-18b982ad.dyn.optonline.net) (Read error: Connection reset by peer)
2020-11-17 03:50:32 Sgeo_ joins (~Sgeo@ool-18b982ad.dyn.optonline.net)
2020-11-17 03:50:47 conal joins (~conal@66.115.176.210)
2020-11-17 03:51:25 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
2020-11-17 03:51:44 star_cloud joins (~star_clou@ec2-34-217-37-165.us-west-2.compute.amazonaws.com)
2020-11-17 03:52:17 spatchkaa joins (~spatchkaa@S010600fc8da47b63.gv.shawcable.net)
2020-11-17 03:52:51 <Shadowraith> 465 | dynamicLogWithPP def
2020-11-17 03:54:28 <Shadowraith> | ^^^^^^^^^^^^^^^^^^^^...
2020-11-17 03:54:28 <Shadowraith>
2020-11-17 03:54:28 × Shadowraith quits (~user@192.12.149.141) (Remote host closed the connection)
2020-11-17 03:54:37 Shadowraith joins (~user@192.12.149.141)
2020-11-17 03:54:38 × theDon quits (~td@94.134.91.49) (Ping timeout: 260 seconds)
2020-11-17 03:54:48 <Shadowraith> just noticed there is a dynamicLogString function?
2020-11-17 03:54:59 <Axman6> without seeing more of your file I have no idea what you're going
2020-11-17 03:55:37 <Shadowraith> do you want the whole thing?
2020-11-17 03:55:42 <Axman6> sure
2020-11-17 03:55:51 <Shadowraith> http://0x0.st/i51L.txt
2020-11-17 03:56:03 <Shadowraith> its in the log hook
2020-11-17 03:56:20 theDon joins (~td@muedsl-82-207-238-136.citykom.de)
2020-11-17 03:56:45 <Axman6> Can you use the paste website from above? syntax highlighting helps a lot
2020-11-17 03:56:57 <Shadowraith> oh im sorry that was a keybind i had
2020-11-17 03:57:05 <Shadowraith> @where paste
2020-11-17 03:57:05 <lambdabot> Help us help you: please paste full code, input and/or output at eg https://paste.tomsmeding.com
2020-11-17 03:58:19 resolve joins (~resolve@139.28.218.148)
2020-11-17 03:58:51 × Kaeipi quits (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) (Remote host closed the connection)
2020-11-17 03:59:07 Kaeipi joins (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net)
2020-11-17 03:59:09 <Shadowraith> https://paste.tomsmeding.com/b8Y135W6
2020-11-17 03:59:30 <Shadowraith> sorry,was too large to even copy from vim lol so had to use a gui editor :ree:
2020-11-17 04:01:01 <Axman6> ok, look more closely at what's happening in the screen1LogHook example, you've forgotten to copy some quite important stuff
2020-11-17 04:01:10 × vacm quits (~vacwm@70.23.92.191) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-11-17 04:01:18 <Axman6> what code have you added?
2020-11-17 04:02:22 <Axman6> I don't really understand what you're trying to do with dynamicLogString
2020-11-17 04:02:47 <Shadowraith> that was just testing, the dynamicLogString (originally dynamicLogWithPP)
2020-11-17 04:02:50 <Axman6> but it looks very suspicious since that's the name of something that XMonad defines, so you're shadowing its definition
2020-11-17 04:03:02 <Shadowraith> the dbus stuff i want rid of, as to why i commented that out
2020-11-17 04:03:30 <Axman6> I think what you want to so is: myLogHook = dynamicLogString def{ ppLayout = \x -> case x of ... }
2020-11-17 04:04:50 <Shadowraith> can i append it to the end cuz i need the ewmh line
2020-11-17 04:04:57 <Shadowraith> like with a $
2020-11-17 04:06:29 falafel joins (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4)
2020-11-17 04:07:02 <Axman6> try https://paste.tomsmeding.com/CohO6Z58
2020-11-17 04:07:09 × ajmcmiddlin quits (sid284402@gateway/web/irccloud.com/x-czsnahqqucihfqdx) (Ping timeout: 272 seconds)
2020-11-17 04:07:27 <Axman6> I don't really understand what you're trying to do with the appendFile call, but it feels like that is probably being taken care of for you

All times are in UTC.