Logs on 2021-10-28 (liberachat/#haskell)
| 00:03:52 | × | euandreh quits (~euandreh@2804:14c:33:9fe5:fa59:2f99:edd:cd7b) (Ping timeout: 260 seconds) |
| 00:04:28 | → | sprout joins (~quassel@2a02:a467:ccd6:1:319c:b1d4:3651:39a5) |
| 00:04:31 | → | euandreh joins (~euandreh@2804:14c:33:9fe5:ece1:b35e:c9b0:1b9e) |
| 00:05:15 | × | burnsidesLlama quits (~burnsides@dhcp168-028.wadham.ox.ac.uk) (Remote host closed the connection) |
| 00:05:56 | × | Null_A quits (~null_a@c-98-210-133-39.hsd1.ca.comcast.net) (Ping timeout: 245 seconds) |
| 00:11:47 | × | sprout quits (~quassel@2a02:a467:ccd6:1:319c:b1d4:3651:39a5) (Ping timeout: 264 seconds) |
| 00:15:13 | × | jushur quits (~human@user/jushur) (Quit: ¯\_(ツ)_/¯) |
| 00:15:22 | × | trog quits (~trog@user/trog) (Ping timeout: 252 seconds) |
| 00:16:13 | → | dajoer joins (~david@user/gvx) |
| 00:18:10 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds) |
| 00:18:11 | → | trog joins (~trog@user/trog) |
| 00:18:44 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 00:22:04 | × | myShoggoth quits (~myShoggot@97-120-85-195.ptld.qwest.net) (Ping timeout: 260 seconds) |
| 00:32:17 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 00:35:25 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:90ed:9a10:88ac:8dca) |
| 00:36:27 | → | faultline joins (~christian@185.65.241.21) |
| 00:39:21 | → | sprout joins (~quassel@2a02:a467:ccd6:1:319c:b1d4:3651:39a5) |
| 00:40:23 | → | Null_A joins (~null_a@2601:645:8700:2290:403:ec69:5129:2d3e) |
| 00:45:24 | × | sprout quits (~quassel@2a02:a467:ccd6:1:319c:b1d4:3651:39a5) (Ping timeout: 260 seconds) |
| 00:46:50 | → | myShoggoth joins (~myShoggot@97-120-85-195.ptld.qwest.net) |
| 00:48:13 | → | lavaman joins (~lavaman@98.38.249.169) |
| 00:49:10 | × | Null_A quits (~null_a@2601:645:8700:2290:403:ec69:5129:2d3e) (Read error: Connection reset by peer) |
| 00:50:24 | × | vicfred quits (~vicfred@user/vicfred) (Quit: Leaving) |
| 00:52:31 | → | trcc joins (~trcc@2-104-60-169-cable.dk.customer.tdc.net) |
| 00:52:36 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 245 seconds) |
| 00:57:20 | × | trcc quits (~trcc@2-104-60-169-cable.dk.customer.tdc.net) (Ping timeout: 260 seconds) |
| 01:00:01 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 01:02:21 | → | zebrag joins (~chris@user/zebrag) |
| 01:02:39 | × | machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 260 seconds) |
| 01:03:18 | × | obfusk_ quits (~quassel@a82-161-150-56.adsl.xs4all.nl) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 01:03:43 | → | obfusk joins (~quassel@a82-161-150-56.adsl.xs4all.nl) |
| 01:04:20 | × | zebrag quits (~chris@user/zebrag) (Client Quit) |
| 01:14:17 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 01:18:04 | × | myShoggoth quits (~myShoggot@97-120-85-195.ptld.qwest.net) (Ping timeout: 260 seconds) |
| 01:18:26 | × | mmhat quits (~mmh@55d4b27c.access.ecotel.net) (Ping timeout: 268 seconds) |
| 01:19:27 | × | MQ-17J quits (~MQ-17J@8.6.144.240) (Ping timeout: 260 seconds) |
| 01:23:29 | → | MQ-17J joins (~MQ-17J@d192-24-122-179.try.wideopenwest.com) |
| 01:25:37 | → | sprout joins (~quassel@2a02:a467:ccd6:1:319c:b1d4:3651:39a5) |
| 01:25:56 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 01:27:59 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 01:29:47 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 01:30:35 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 01:30:41 | × | sprout quits (~quassel@2a02:a467:ccd6:1:319c:b1d4:3651:39a5) (Ping timeout: 264 seconds) |
| 01:31:24 | → | mmhat joins (~mmh@55d4b856.access.ecotel.net) |
| 01:33:25 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 01:37:22 | → | sprout joins (~quassel@2a02:a467:ccd6:1:319c:b1d4:3651:39a5) |
| 01:37:54 | × | mmhat quits (~mmh@55d4b856.access.ecotel.net) (Quit: WeeChat 3.3) |
| 01:39:20 | × | faultline quits (~christian@185.65.241.21) (Ping timeout: 260 seconds) |
| 01:41:35 | × | Psybur quits (~Psybur@mobile-166-170-30-165.mycingular.net) (Remote host closed the connection) |
| 01:42:23 | × | sprout quits (~quassel@2a02:a467:ccd6:1:319c:b1d4:3651:39a5) (Ping timeout: 264 seconds) |
| 01:43:13 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 01:44:53 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 01:45:56 | × | xff0x quits (~xff0x@2001:1a81:5218:9100:9942:dd03:d29b:2938) (Ping timeout: 245 seconds) |
| 01:48:08 | → | xff0x joins (~xff0x@2001:1a81:525b:da00:d10:7b28:3140:c276) |
| 01:55:41 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 01:55:42 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 01:55:42 | → | wroathe joins (~wroathe@user/wroathe) |
| 01:57:17 | × | alx741 quits (~alx741@186.178.109.79) (Quit: alx741) |
| 01:57:25 | × | yinghua quits (~yinghua@2800:2121:1400:900:b457:83cc:995e:57e) (Quit: Leaving) |
| 01:58:53 | × | MQ-17J quits (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer) |
| 01:59:20 | × | lbseale quits (~lbseale@user/ep1ctetus) (Quit: Leaving) |
| 02:01:06 | → | MQ-17J joins (~MQ-17J@d192-24-122-179.try.wideopenwest.com) |
| 02:02:24 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 02:10:56 | <zzz> | i'm doing some church in js and i can't seem to make folds work. can anyone find out what the problem is? https://paste.jrvieira.com/1635385396222 |
| 02:11:39 | <zzz> | FOLDL and FOLDR are defined at lines 66 and 73, respectively |
| 02:14:33 | × | hendursaga quits (~weechat@user/hendursaga) (Ping timeout: 276 seconds) |
| 02:15:38 | <monochrom> | Ugh so there is no such thing as an empty list. |
| 02:15:59 | → | hendursaga joins (~weechat@user/hendursaga) |
| 02:17:16 | <ski> | zzz : i guess i would make the nullary continuations take an empty argument list |
| 02:17:28 | <monochrom> | Also I haven't checked but most fixed point combinators assume non-eager lambda calculi. JS is an eager lambda calculus. |
| 02:17:45 | <ski> | (otherwise you might run into executing both branches of a conditional ..) |
| 02:17:56 | <ski> | yes, exactly |
| 02:19:00 | <ski> | however, `z' is eta-expanded, so i think that would probably work out (?) |
| 02:19:10 | <ski> | (although i'd have eta-expanded in a different place) |
| 02:19:57 | <monochrom> | There is an easy way to check. |
| 02:20:06 | <ski> | (as it is now, you're "odd", in that `f' gets called (on one parameter), before you provide the input to the result of `z' |
| 02:20:09 | <ski> | ) |
| 02:20:18 | bradparker_ | is now known as bradparker |
| 02:20:56 | <ski> | (but if `f' is `\f. \x. ..f..x..', it shouldn't matter. only if it's `\f. ..f..(\x. ..f..x..)..' or perhaps not a lambda at all) |
| 02:21:28 | <monochrom> | Define church numerals. Define the recursive function "f 0 = 0; f (succ n) = f n" using Z. If that works, you have much better confidence that Z doesn't go wrong. |
| 02:22:24 | → | lavaman joins (~lavaman@98.38.249.169) |
| 02:22:38 | <monochrom> | In general, it's a good idea to get peano naturals to work before you try your hands at cons lists. |
| 02:22:58 | <ski> | also, instead of this `ISNONE' nonsense, why don't you do a `CASELIST' ? |
| 02:23:07 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 02:23:11 | <monochrom> | This also holds when one day you go to grad school and do this all over again in System F. |
| 02:23:21 | → | lavaman joins (~lavaman@98.38.249.169) |
| 02:23:29 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 02:23:47 | <monochrom> | In fact I thought the point of church list is that you get foldr for free. |
| 02:24:31 | <monochrom> | "foldr" op z mylst = mylst op z. Or mylst z op, I don't know your favourite argument order. |
| 02:24:31 | <ski> | yea, you can do `FOLDLIST', if you prefer |
| 02:25:16 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 260 seconds) |
| 02:25:49 | → | jkaye joins (~jkaye@2601:281:8300:7530:906c:9805:416e:fccf) |
| 02:34:15 | → | myShoggoth joins (~myShoggot@97-120-85-195.ptld.qwest.net) |
| 02:39:23 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 264 seconds) |
| 02:40:58 | → | a6a45081-2b83 joins (~aditya@2601:249:4300:1296:88ec:cc73:84d4:1507) |
| 02:40:59 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 02:43:28 | × | myShoggoth quits (~myShoggot@97-120-85-195.ptld.qwest.net) (Ping timeout: 260 seconds) |
| 02:50:00 | <zzz> | Z is working fine i think. see MOD, MAP, SIZE... everything is working fine except the folds |
| 02:50:32 | → | myShoggoth joins (~myShoggot@97-120-85-195.ptld.qwest.net) |
| 02:52:07 | <zzz> | about the eagerness, notice that i wrap the recursive branch in (x => ...(x)) |
| 02:52:25 | <ski> | yes, i did |
| 02:52:49 | <ski> | for most ordinary cases, it shouldn't matter, i think |
| 02:53:55 | <zzz> | i have no formal education in this, am trying to learn by myself. how do we get foldr "for free" with church lists? |
| 02:54:03 | → | lavaman joins (~lavaman@98.38.249.169) |
| 02:55:14 | × | td_ quits (~td@94.134.91.76) (Ping timeout: 246 seconds) |
| 02:56:20 | <zzz> | oh i see |
| 02:56:37 | <zzz> | list z op |
| 02:57:09 | → | td_ joins (~td@94.134.91.221) |
| 02:57:16 | <ski> | yep |
| 02:57:28 | ski | 's no formal education in it, either |
| 02:58:51 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 260 seconds) |
| 03:01:07 | <mjrosenb_> | with lens, if I have (at foo) in the middle of the lens, the lens's target type becomes (Maybe foo). Is there a way to convert this to a lens that targets foo? |
| 03:01:32 | <ski> | zzz : iow, instead of building lists out of optional pairs, nested in the second component, simply use the same approach as you already used for naturals |
| 03:01:35 | <mjrosenb_> | err, I should probably change one of those foos to a bar. |
| 03:02:11 | <mjrosenb_> | (at 4 . to fromJust) doesn't do what I want, because that's only for getting, not also setting. |
| 03:03:38 | <zzz> | ski: i see |
| 03:04:16 | × | shapr quits (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Ping timeout: 258 seconds) |
| 03:05:01 | <zzz> | i found it elegand to have 'head : a' and 'tail : maybe (list a)' naturally from fst and snd |
| 03:05:32 | <mjrosenb_> | I can probably use lens here, assuming there's nothing in the standard library. |
| 03:05:55 | <zzz> | but i see why 'null | cons a (list a)' is a more interesting approach |
| 03:06:58 | <zzz> | but i still can't understand why my fold is not working |
| 03:07:16 | <zzz> | it seems simple |
| 03:07:17 | × | MQ-17J quits (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer) |
| 03:08:29 | <zzz> | s/elegand/elegant |
| 03:09:03 | → | MQ-17J joins (~MQ-17J@d192-24-122-179.try.wideopenwest.com) |
| 03:10:54 | × | a6a45081-2b83 quits (~aditya@2601:249:4300:1296:88ec:cc73:84d4:1507) (Remote host closed the connection) |
| 03:15:30 | <zzz> | and of course i meant 'head : list a -> a' and 'tail : list a -> maybe (list a)' |
| 03:16:04 | ski | didn't get as far as checking the fold |
| 03:16:52 | <zzz> | i also like the idea of assuming lists as non empty and using 'maybe (list a)' for possibly empty lists |
| 03:17:25 | <zzz> | but i'm just playing around |
| 03:18:34 | <dsal> | mjrosenb_: Are you looking for the _Just prism? |
| 03:21:48 | <dsal> | > (1, M.fromList [("a", 1)]) & _2 . at "a" . _Just .~ 5 & _2 . at "b" . _Just .~ 9 -- mjrosenb_ |
| 03:21:49 | <lambdabot> | (1,fromList [("a",5)]) |
| 03:23:47 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 03:25:52 | × | waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 268 seconds) |
| 03:26:04 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
| 03:26:52 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 260 seconds) |
| 03:27:16 | × | nrr_ quits (sid20938@lymington.irccloud.com) (Ping timeout: 258 seconds) |
| 03:27:19 | × | carter quits (sid14827@helmsley.irccloud.com) (Ping timeout: 268 seconds) |
| 03:27:39 | × | NiKaN quits (sid385034@helmsley.irccloud.com) (Ping timeout: 258 seconds) |
| 03:27:49 | <mjrosenb_> | dsal: maybe? I did something that was probably unwise, and I'm passing this as an argument into a function that is explicitly expecting a (Lens' foo bar) |
| 03:28:11 | <mjrosenb_> | I'm guessing that using _Just means that the whole thing is a prism, and I should change the expected type of this function. |
| 03:28:23 | → | lavaman joins (~lavaman@98.38.249.169) |
| 03:28:25 | × | ss4 quits (~wootehfoo@user/wootehfoot) (Ping timeout: 260 seconds) |
| 03:28:30 | <mjrosenb_> | looks like I can also use ix and singular |
| 03:29:03 | → | NiKaN joins (sid385034@id-385034.helmsley.irccloud.com) |
| 03:29:13 | × | akspecs__ quits (~akspecs@user/akspecs) (Read error: Connection reset by peer) |
| 03:30:28 | → | carter joins (sid14827@id-14827.helmsley.irccloud.com) |
| 03:30:48 | → | nrr_ joins (sid20938@id-20938.lymington.irccloud.com) |
| 03:31:22 | <dsal> | :t _Just |
| 03:31:23 | <lambdabot> | (Choice p, Applicative f) => p a (f b) -> p (Maybe a) (f (Maybe b)) |
| 03:31:37 | <mjrosenb_> | yeah, if I try foo ^. _2 . at "a" . _Just, I get the standard error about no instance Monoid Int |
| 03:31:53 | <dsal> | Well, yes. That's a different question. |
| 03:32:07 | <dsal> | > (1, M.fromList [("a", 1)]) ^? _2 . at "a" . _Just |
| 03:32:08 | <lambdabot> | Just 1 |
| 03:32:31 | <dsal> | > (1, M.fromList [("a", 1)]) ^. _2 . at "a" . _Just . to Sum |
| 03:32:33 | <lambdabot> | Sum {getSum = 1} |
| 03:33:01 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 258 seconds) |
| 03:34:52 | → | akspecs__ joins (~akspecs@136-24-214-166.cab.webpass.net) |
| 03:34:52 | × | akspecs__ quits (~akspecs@136-24-214-166.cab.webpass.net) (Changing host) |
| 03:34:52 | → | akspecs__ joins (~akspecs@user/akspecs) |
| 03:35:48 | × | hendursaga quits (~weechat@user/hendursaga) (Ping timeout: 276 seconds) |
| 03:36:04 | → | machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca) |
| 03:37:32 | → | hendursaga joins (~weechat@user/hendursaga) |
| 03:38:00 | <mjrosenb_> | yeah, sorry, I'm definitely still wrapping my head around the terminology of these things. I'm currently using the lens with ^., and by putting (at "a") into the chain, I'm either forcing a Maybe into the type, or forcing it to be something other than a lens |
| 03:38:12 | <mjrosenb_> | neither of which the type that I've set up is prepared to handle. |
| 03:38:26 | × | mvk quits (~mvk@2607:fea8:5cc1:300::d3fb) (Ping timeout: 245 seconds) |
| 03:38:31 | × | bongobrown quits (~bongobrow@cpe-76-185-215-2.satx.res.rr.com) (Ping timeout: 265 seconds) |
| 03:40:44 | <c_wraith> | there's also a good question about *why* you're using at |
| 03:40:55 | <c_wraith> | And would it be appropriate to combine it with non ? |
| 03:41:24 | <c_wraith> | that gets you back to a straight lens, but with possibly-surprising behavior |
| 03:42:12 | <c_wraith> | On the other hand, sometimes that gives you *exactly* the behavior you want |
| 03:42:15 | × | machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 260 seconds) |
| 03:43:20 | → | machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca) |
| 03:43:31 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 03:43:31 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 03:43:31 | → | wroathe joins (~wroathe@user/wroathe) |
| 03:44:18 | <dsal> | mjrosenb_: You have to consider a case where nothing exists. ^. will get a monoid. ^? will get you a maybe. ^?! will let you promise that it'll definitely be a Just. |
| 03:44:59 | <c_wraith> | and non lets you declare a value to be treated the same as if it was Nothing |
| 03:46:05 | <dsal> | > (1, M.fromList [("a", 1)]) ^? _2 . at "a" . non 6 |
| 03:46:07 | <lambdabot> | Just 1 |
| 03:46:08 | <dsal> | > (1, M.fromList [("a", 1)]) ^? _2 . at "b" . non 6 |
| 03:46:09 | <lambdabot> | Just 6 |
| 03:46:31 | <mjrosenb_> | oh, that is horrifying. |
| 03:46:40 | <jackdk> | > (1, M.fromList [("a", 1)]) ^.. _2 . at "a" . traverse |
| 03:46:42 | <lambdabot> | [1] |
| 03:46:51 | <jackdk> | > (1, M.fromList [("a", 1)]) ^.. _2 . at "b" . traverse |
| 03:46:53 | <lambdabot> | [] |
| 03:46:56 | <mjrosenb_> | wait, if there's more than one thing in the map, and nothing is "b", does that just set every value to 6? |
| 03:47:06 | <jackdk> | > (1, M.fromList [("a", 1)]) ^.. _2 . ix "a" |
| 03:47:08 | <lambdabot> | [1] |
| 03:47:09 | <dsal> | It didn't set anything to anything. |
| 03:47:32 | <c_wraith> | > (1, M.fromList [("a", 1)]) & _2 . at "a" . non 6 .~ 6 |
| 03:47:34 | <lambdabot> | (1,fromList []) |
| 03:47:53 | <c_wraith> | non declares the value you provide to be the same as Nothing, in *both* directions |
| 03:48:01 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 245 seconds) |
| 03:48:08 | <mjrosenb_> | err, no, I totally misread what the result of that expression was. |
| 03:48:32 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 03:49:06 | <c_wraith> | non is really nice when you're nesting data structures. a list inside a map, for instance. If you have a `non []` in there, it will remove empty lists that you insert through it |
| 03:50:35 | × | machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 260 seconds) |
| 03:52:03 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 276 seconds) |
| 03:52:04 | × | aegon quits (~mike@174.127.249.180) (Remote host closed the connection) |
| 03:53:39 | <mjrosenb_> | so, this code used to be (ix "b"), and it *happened* to work because I was explicitly fetching a list. Now, I'm doing something else, and I only need the first element of it |
| 03:54:16 | <c_wraith> | But if there is no element at "b"? |
| 03:55:26 | <mjrosenb_> | if that happens, then this code deserves to crash. |
| 03:56:34 | <c_wraith> | then use ix and singular. :P |
| 03:57:22 | <c_wraith> | singular is lens for "this always returns a value. no, I don't feel like proving it" |
| 03:57:50 | <mjrosenb_> | yeah. I'm also using singular _head :-) |
| 03:58:15 | <jackdk> | > (1, M.fromList [("a", 1)]) ^?! _2 . at "a" |
| 03:58:17 | <lambdabot> | Just 1 |
| 03:58:25 | <jackdk> | > (1, M.fromList [("a", 1)]) ^?! _2 . at "b" |
| 03:58:26 | <lambdabot> | Nothing |
| 03:58:33 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 03:58:42 | <jackdk> | > (1, M.fromList [("a", 1)]) ^?! _2 . ix "b" -- er, this one |
| 03:58:43 | <lambdabot> | *Exception: (^?!): empty Fold |
| 03:58:46 | <mjrosenb_> | although this code is hella buggy, so I may write my own singular that takes a String argument, and sticks that in the error message |
| 03:59:13 | <jackdk> | perhaps the tolerance of partial functions is not helping ;-) |
| 04:00:28 | × | jkaye quits (~jkaye@2601:281:8300:7530:906c:9805:416e:fccf) (Ping timeout: 260 seconds) |
| 04:01:01 | <mjrosenb_> | HsCompilation finished at Thu Oct 28 00:00:03 |
| 04:01:06 | <mjrosenb_> | \o/ |
| 04:01:12 | <jackdk> | o/ |
| 04:01:20 | <mjrosenb_> | I should probably also do something about this function. |
| 04:01:53 | <mjrosenb_> | it is an abomination against man, god, and line limits. |
| 04:02:45 | <jackdk> | and since eighty columns was a divinely-handed-down limit, the third is a strict subset of the second |
| 04:04:38 | <mjrosenb_> | hah, eighty. |
| 04:04:53 | <mjrosenb_> | looks like this function tops out at 168 characters wide. |
| 04:07:26 | <mjrosenb_> | oh, it is only 92 lines long, I guess it only feels longer because I have only the vaguest clue of how it works. |
| 04:10:58 | × | harveypwca quits (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving) |
| 04:13:39 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 04:14:34 | <kronicmage> | does anyone know how to query for a fixity of some operator? |
| 04:14:47 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Ping timeout: 264 seconds) |
| 04:15:03 | <jackdk> | % :info $ |
| 04:15:03 | <yahb> | jackdk: ($) :: (a -> b) -> a -> b -- Defined in `GHC.Base'; infixr 0 $ |
| 04:15:05 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 04:15:13 | <kronicmage> | thank you jackdk! |
| 04:15:15 | <jackdk> | kronicmage: `:info` or `:i` in ghci |
| 04:15:20 | <kronicmage> | :info (*) |
| 04:15:24 | <kronicmage> | oops |
| 04:15:31 | <kronicmage> | % :info (*) |
| 04:15:31 | <yahb> | kronicmage: type Num :: * -> Constraint; class Num a where; ...; (*) :: a -> a -> a; ...; -- Defined in `GHC.Num'; infixl 7 *; type (*) :: GHC.Base.Nat -> GHC.Base.Nat -> GHC.Base.Nat; type family (*) a b; -- Defined in `GHC.TypeNats'; infixl 7 * |
| 04:15:32 | <jackdk> | prefix with `%` for yahb to see it |
| 04:17:01 | × | euandreh quits (~euandreh@2804:14c:33:9fe5:ece1:b35e:c9b0:1b9e) (Quit: WeeChat 3.3) |
| 04:17:23 | → | euandreh joins (~euandreh@2804:14c:33:9fe5:ece1:b35e:c9b0:1b9e) |
| 04:21:18 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 276 seconds) |
| 04:22:36 | → | ss4 joins (~wootehfoo@user/wootehfoot) |
| 04:26:56 | → | sprout joins (~quassel@2a02:a467:ccd6:1:319c:b1d4:3651:39a5) |
| 04:29:36 | → | hgolden joins (~hgolden2@cpe-172-114-81-123.socal.res.rr.com) |
| 04:29:49 | → | mbuf joins (~Shakthi@122.178.213.7) |
| 04:30:10 | × | hubvu quits (sid495858@user/hubvu) (Ping timeout: 260 seconds) |
| 04:30:36 | → | _ht joins (~quassel@82-169-194-8.biz.kpn.net) |
| 04:31:27 | → | hubvu joins (sid495858@user/hubvu) |
| 04:33:13 | mjrosenb_ | is now known as mjrosenb |
| 04:33:18 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
| 04:34:41 | × | sprout quits (~quassel@2a02:a467:ccd6:1:319c:b1d4:3651:39a5) (Ping timeout: 245 seconds) |
| 04:38:28 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 04:41:02 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 04:41:55 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 04:44:56 | → | a6a45081-2b83 joins (~aditya@2601:249:4300:1296:88ec:cc73:84d4:1507) |
| 04:46:12 | × | dsrt^ quits (~dsrt@wsip-68-227-92-38.mc.at.cox.net) (Ping timeout: 260 seconds) |
| 04:47:23 | → | sprout joins (~quassel@2a02:a467:ccd6:1:319c:b1d4:3651:39a5) |
| 04:48:45 | × | a6a45081-2b83 quits (~aditya@2601:249:4300:1296:88ec:cc73:84d4:1507) (Remote host closed the connection) |
| 04:51:59 | × | sprout quits (~quassel@2a02:a467:ccd6:1:319c:b1d4:3651:39a5) (Ping timeout: 264 seconds) |
| 05:03:45 | → | dsrt^ joins (~dsrt@wsip-68-227-92-38.mc.at.cox.net) |
| 05:04:52 | × | myShoggoth quits (~myShoggot@97-120-85-195.ptld.qwest.net) (Ping timeout: 260 seconds) |
| 05:09:10 | × | hendursaga quits (~weechat@user/hendursaga) (Remote host closed the connection) |
| 05:09:46 | → | hendursaga joins (~weechat@user/hendursaga) |
| 05:15:57 | × | _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
| 05:18:06 | × | MQ-17J quits (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer) |
| 05:19:23 | → | MQ-17J joins (~MQ-17J@8.6.144.240) |
| 05:22:57 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 05:23:13 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 05:24:16 | × | kupi quits (uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 05:24:35 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 05:25:40 | × | ss4 quits (~wootehfoo@user/wootehfoot) (Ping timeout: 260 seconds) |
| 05:34:25 | × | lemonsnicks quits (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) (Ping timeout: 260 seconds) |
| 05:35:26 | <awpr> | ever wished StateT supported the case where the state is an instance dictionary? gotcha covered https://replit.com/@AndrewPritchard/TartUnsungCron#main.hs |
| 05:36:10 | → | lemonsnicks joins (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) |
| 05:39:11 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 05:39:24 | → | Neuromancer joins (~Neuromanc@user/neuromancer) |
| 05:41:38 | × | slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving) |
| 05:48:44 | → | sprout joins (~quassel@2a02:a467:ccd6:1:319c:b1d4:3651:39a5) |
| 05:53:52 | × | sprout quits (~quassel@2a02:a467:ccd6:1:319c:b1d4:3651:39a5) (Ping timeout: 260 seconds) |
| 06:09:59 | → | dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be) |
| 06:13:47 | → | michalz joins (~michalz@185.246.204.109) |
| 06:19:33 | → | Inst__ joins (~Inst@2601:6c4:4080:3f80:7857:9ec8:a629:d6a8) |
| 06:20:59 | → | sprout joins (~quassel@2a02:a467:ccd6:1:319c:b1d4:3651:39a5) |
| 06:22:33 | → | ss4 joins (~wootehfoo@user/wootehfoot) |
| 06:23:15 | → | lortabac joins (~lortabac@atoulouse-256-1-14-70.w92-136.abo.wanadoo.fr) |
| 06:23:26 | × | Inst_ quits (~Inst@2601:6c4:4080:3f80:9ce5:6f05:3959:43f5) (Ping timeout: 245 seconds) |
| 06:25:01 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 06:25:05 | → | fendor joins (~fendor@178.165.200.199.wireless.dyn.drei.com) |
| 06:25:31 | × | sprout quits (~quassel@2a02:a467:ccd6:1:319c:b1d4:3651:39a5) (Ping timeout: 245 seconds) |
| 06:26:59 | × | MQ-17J quits (~MQ-17J@8.6.144.240) (Ping timeout: 260 seconds) |
| 06:29:11 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 06:29:11 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 06:30:13 | → | MQ-17J joins (~MQ-17J@d192-24-122-179.try.wideopenwest.com) |
| 06:32:45 | × | xff0x quits (~xff0x@2001:1a81:525b:da00:d10:7b28:3140:c276) (Ping timeout: 260 seconds) |
| 06:32:58 | × | _xor quits (~xor@72.49.199.147) (Quit: brb) |
| 06:33:20 | → | xff0x joins (~xff0x@2001:1a81:525b:da00:5f35:171b:1f01:7273) |
| 06:33:32 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 06:35:45 | → | Vajb joins (~Vajb@n8vwdu04eps78g521-2.v6.elisa-mobile.fi) |
| 06:40:32 | → | trcc_ joins (~trcc@users-1190.st.net.au.dk) |
| 06:41:04 | × | trcc_ quits (~trcc@users-1190.st.net.au.dk) (Client Quit) |
| 06:45:09 | × | Skyfire quits (~pyon@user/pyon) (Quit: brb) |
| 06:45:41 | → | Skyfire joins (~pyon@user/pyon) |
| 06:49:14 | → | sprout joins (~quassel@2a02:a467:ccd6:1:319c:b1d4:3651:39a5) |
| 06:50:25 | → | v01d4lph4 joins (~v01d4lph4@223.177.229.33) |
| 06:50:25 | × | v01d4lph4 quits (~v01d4lph4@223.177.229.33) (Changing host) |
| 06:50:25 | → | v01d4lph4 joins (~v01d4lph4@user/v01d4lph4) |
| 06:51:33 | → | lavaman joins (~lavaman@98.38.249.169) |
| 06:52:11 | × | Inst__ quits (~Inst@2601:6c4:4080:3f80:7857:9ec8:a629:d6a8) (Ping timeout: 245 seconds) |
| 06:54:03 | × | sprout quits (~quassel@2a02:a467:ccd6:1:319c:b1d4:3651:39a5) (Ping timeout: 260 seconds) |
| 06:55:56 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 245 seconds) |
| 06:57:18 | → | Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) |
| 07:02:37 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 07:06:05 | → | cfricke joins (~cfricke@user/cfricke) |
| 07:06:49 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
| 07:08:07 | → | eruditass joins (uid248673@id-248673.uxbridge.irccloud.com) |
| 07:11:31 | → | nschoe joins (~quassel@178.251.84.79) |
| 07:14:41 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 07:15:01 | × | kawpuh quits (~kawpuh@66.42.81.80) (Ping timeout: 252 seconds) |
| 07:15:03 | → | kawpuh1 joins (~kawpuh@66.42.81.80) |
| 07:15:03 | × | Skyfire quits (~pyon@user/pyon) (Quit: brb ffs, frickin configuration) |
| 07:15:28 | → | Skyfire joins (~pyon@user/pyon) |
| 07:22:01 | → | max22- joins (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) |
| 07:22:41 | → | sprout joins (~quassel@2a02:a467:ccd6:1:319c:b1d4:3651:39a5) |
| 07:25:48 | × | ss4 quits (~wootehfoo@user/wootehfoot) (Ping timeout: 260 seconds) |
| 07:26:37 | × | mcglk_ quits (~mcglk@131.191.49.120) (Read error: Connection reset by peer) |
| 07:26:38 | → | acidjnk_new joins (~acidjnk@p200300d0c7238d76b9ac87bdf676c186.dip0.t-ipconnect.de) |
| 07:27:04 | → | mcglk joins (~mcglk@131.191.49.120) |
| 07:27:41 | × | sprout quits (~quassel@2a02:a467:ccd6:1:319c:b1d4:3651:39a5) (Ping timeout: 264 seconds) |
| 07:27:46 | × | hughjfchen quits (~hughjfche@vmi556545.contaboserver.net) (Quit: WeeChat 2.8) |
| 07:30:45 | → | sprout joins (~quassel@2a02:a467:ccd6:1:319c:b1d4:3651:39a5) |
| 07:32:48 | × | Skyfire quits (~pyon@user/pyon) (Quit: brb ffs frickin configuration) |
| 07:33:47 | → | d0ku joins (~d0ku@178.43.15.137.ipv4.supernova.orange.pl) |
| 07:34:16 | → | Skyfire joins (~pyon@user/pyon) |
| 07:42:12 | × | Vajb quits (~Vajb@n8vwdu04eps78g521-2.v6.elisa-mobile.fi) (Read error: Connection reset by peer) |
| 07:42:29 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 07:43:38 | → | jinsun joins (~quassel@user/jinsun) |
| 07:47:40 | <zincy> | Is the existentialQuantification just using RankNTypes under the hood for type declarations? |
| 07:54:00 | → | chele joins (~chele@user/chele) |
| 07:57:04 | × | cads quits (~cads@ip-64-72-99-234.lasvegas.net) (Remote host closed the connection) |
| 07:57:19 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 07:57:25 | → | cads joins (~cads@ip-64-72-99-234.lasvegas.net) |
| 07:59:41 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
| 08:01:07 | × | nschoe quits (~quassel@178.251.84.79) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 08:02:39 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 08:03:04 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.2) |
| 08:05:17 | → | hendursa1 joins (~weechat@user/hendursaga) |
| 08:08:09 | × | hendursaga quits (~weechat@user/hendursaga) (Ping timeout: 276 seconds) |
| 08:13:05 | × | jonathanx quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Ping timeout: 260 seconds) |
| 08:14:36 | → | jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se) |
| 08:17:34 | → | allbery_b joins (~geekosaur@xmonad/geekosaur) |
| 08:17:34 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
| 08:17:37 | allbery_b | is now known as geekosaur |
| 08:20:20 | → | machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca) |
| 08:22:36 | → | ss4 joins (~wootehfoo@user/wootehfoot) |
| 08:22:45 | → | jstolarek joins (~jstolarek@137.220.120.162) |
| 08:22:48 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:90ed:9a10:88ac:8dca) (Remote host closed the connection) |
| 08:25:18 | → | hughjfchen joins (~hughjfche@vmi556545.contaboserver.net) |
| 08:30:18 | → | kuribas joins (~user@ip-188-118-57-242.reverse.destiny.be) |
| 08:30:23 | × | jonathanx quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Ping timeout: 264 seconds) |
| 08:32:47 | × | xff0x quits (~xff0x@2001:1a81:525b:da00:5f35:171b:1f01:7273) (Ping timeout: 264 seconds) |
| 08:33:04 | stefan-__ | is now known as stefan-_ |
| 08:33:35 | → | xff0x joins (~xff0x@2001:1a81:525b:da00:3f7d:da8c:9e9b:e904) |
| 08:35:22 | → | rond_ joins (~rond_@2a02:a31a:a23c:f480:2fd7:e087:5546:a438) |
| 08:40:58 | × | shriekingnoise quits (~shrieking@186.137.144.80) (Quit: Quit) |
| 08:46:02 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 08:53:31 | × | ubert quits (~Thunderbi@91.141.46.110.wireless.dyn.drei.com) (Ping timeout: 260 seconds) |
| 08:54:35 | × | gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer) |
| 08:54:49 | → | gentauro joins (~gentauro@user/gentauro) |
| 08:59:33 | → | jumper149 joins (~jumper149@80.240.31.34) |
| 09:01:45 | → | jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se) |
| 09:03:26 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 09:03:47 | → | CiaoSen joins (~Jura@p200300c95730dd002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 09:04:14 | × | img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
| 09:05:09 | → | bontaq joins (~user@ool-45779fe5.dyn.optonline.net) |
| 09:05:37 | → | img joins (~img@user/img) |
| 09:09:44 | × | jonathanx quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Remote host closed the connection) |
| 09:10:01 | → | jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se) |
| 09:17:02 | × | eruditass quits (uid248673@id-248673.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
| 09:19:55 | × | img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
| 09:20:31 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds) |
| 09:21:17 | → | img joins (~img@user/img) |
| 09:23:18 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:90ed:9a10:88ac:8dca) |
| 09:26:00 | × | ss4 quits (~wootehfoo@user/wootehfoot) (Ping timeout: 260 seconds) |
| 09:28:04 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:90ed:9a10:88ac:8dca) (Ping timeout: 260 seconds) |
| 09:28:35 | × | jonathanx quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Ping timeout: 264 seconds) |
| 09:32:00 | × | bitmapper quits (uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 09:34:16 | → | fendor_ joins (~fendor@178.165.166.121.wireless.dyn.drei.com) |
| 09:34:39 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 09:35:21 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 09:35:46 | <kuribas> | is there a dependent pair, or should I roll a new one every time? |
| 09:36:59 | × | fendor quits (~fendor@178.165.200.199.wireless.dyn.drei.com) (Ping timeout: 264 seconds) |
| 09:38:07 | × | kuribas quits (~user@ip-188-118-57-242.reverse.destiny.be) (Remote host closed the connection) |
| 09:38:11 | × | Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 264 seconds) |
| 09:38:31 | → | kuribas joins (~user@ip-188-118-57-242.reverse.destiny.be) |
| 09:40:03 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3) |
| 09:41:18 | × | img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
| 09:42:40 | → | img joins (~img@user/img) |
| 09:43:31 | <kuribas> | again tooling issues with emacs/stack... |
| 09:43:43 | <kuribas> | Suspicious state from syntax checker haskell-stack-ghc: Flycheck checker haskell-stack-ghc returned 1, but its output contained no errors: <command line>: cannot satisfy -package hspec |
| 09:43:59 | <kuribas> | How tf does anyone get work done in haskell? |
| 09:46:06 | <lortabac> | kuribas: regarding dependent pairs, there is Data.Dynamic |
| 09:46:22 | <kuribas> | lortabac: that's not quite a dependent pair. |
| 09:46:31 | <lortabac> | otherwise if you are using your own singletons there is exinst |
| 09:46:38 | <lortabac> | @hackage exinst |
| 09:46:39 | <lambdabot> | https://hackage.haskell.org/package/exinst |
| 09:46:53 | <jneira[m]> | not using emacs nor stack :-P |
| 09:46:59 | <lortabac> | but I think rolling your own is simpler in most cases |
| 09:47:19 | <kuribas> | yeah |
| 09:47:27 | <kuribas> | jneira[m]: what then? |
| 09:47:54 | → | jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se) |
| 09:48:06 | <jneira[m]> | i was mainly joking but the fact is for example hls works better with cabal right now |
| 09:48:29 | <kuribas> | yeah, but hls doesn't even work on my project. |
| 09:48:29 | <jneira[m]> | it should not be and we are working in get the same support for both though |
| 09:48:39 | <kuribas> | Presumable because of a large amount of TH generated code. |
| 09:49:06 | <kuribas> | I am hoping haskell tooling will get at a decent point, but it definitely isn't now. |
| 09:49:07 | <jneira[m]> | have you tried an hls version built from source, dinamically linked? |
| 09:49:27 | <jneira[m]> | it fixes issues with th for some people |
| 09:49:55 | <jneira[m]> | mmm let me find the issue about... |
| 09:50:09 | <kuribas> | jneira[m]: I just don't want to solve/debug tooling issues. |
| 09:50:10 | × | gehmehgeh quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 09:50:12 | <kuribas> | I want to get work done. |
| 09:50:56 | <jneira[m]> | ya, lucky me solve/debug tooling issue is my work done :-P |
| 09:51:03 | <jneira[m]> | (volunteer work) |
| 09:51:49 | <kuribas> | I want to use haskell as an experiment in a production environment, I cannot justify spending lots of time fixing tooling. |
| 09:52:12 | <jneira[m]> | yeah, totally understandable |
| 09:52:16 | <kuribas> | I don't mean spending some time setting up a working environment, I mean fixing actual bugs. |
| 09:52:46 | <jneira[m]> | but someone has to improve tooling, if users dont do it and there is no enough money for more paid work |
| 09:52:53 | <jneira[m]> | 🤷 |
| 09:53:00 | <kuribas> | So get up some kind of fund. |
| 09:53:25 | <jneira[m]> | we have! https://opencollective.com/haskell-language-server |
| 09:53:31 | <jneira[m]> | :-) |
| 09:53:43 | × | jonathanx quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Ping timeout: 260 seconds) |
| 09:55:17 | <jneira[m]> | nevertheless afaiu the th issue is related with ghc and linking |
| 09:55:20 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 09:55:22 | → | comandingo joins (~drever@2001:a61:3462:da01:7aec:4329:8eb0:7c56) |
| 09:55:43 | <jneira[m]> | will try to pest ghc maintainers about :-) |
| 09:56:31 | <kuribas> | jneira[m]: I'll see how much I can contribute. |
| 09:58:15 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 09:58:17 | <kuribas> | hmm, maybe flycheck is expecting the exe libraries, but they aren't build... |
| 09:59:42 | <kuribas> | "cannot satisfy -package hspec" |
| 09:59:52 | <kuribas> | it shouldn't need that package, because it's only used for the exe, not the library. |
| 10:03:00 | × | OscarH_ quits (~OscarH@90.201.86.195) (Ping timeout: 268 seconds) |
| 10:05:53 | × | kuribas quits (~user@ip-188-118-57-242.reverse.destiny.be) (Remote host closed the connection) |
| 10:06:34 | → | kuribas joins (~user@ip-188-118-57-242.reverse.destiny.be) |
| 10:09:39 | → | OscarH joins (~OscarH@90.201.86.195) |
| 10:10:03 | × | xff0x quits (~xff0x@2001:1a81:525b:da00:3f7d:da8c:9e9b:e904) (Ping timeout: 260 seconds) |
| 10:10:46 | → | xff0x joins (~xff0x@2001:1a81:525b:da00:1097:4d57:43e2:986f) |
| 10:13:05 | <jneira[m]> | iirc you were not using hls, right? not sure what is using emacs in that case |
| 10:13:26 | <kuribas> | it's using ghc or stack directly. |
| 10:13:30 | <jneira[m]> | i dont use it since quite time ago :-/ |
| 10:13:47 | <kuribas> | And passing the package list explicitly to stack/cabal. |
| 10:14:02 | <jneira[m]> | you see what precise commands is it triggering to get the info from stack? |
| 10:14:07 | <kuribas> | likely something went wrong there, mixing the exe with the lib packages. |
| 10:14:24 | <jneira[m]> | ya, sounds probable |
| 10:14:42 | <jneira[m]> | jneira[m]: from any of the logs |
| 10:15:35 | <jneira[m]> | in that case i guess if you open only lib modules, the error is not triggered? |
| 10:15:47 | <kuribas> | no, this error is in a lib module. |
| 10:15:53 | <kuribas> | I have both a lib and a exe in my cabal. |
| 10:16:44 | <jneira[m]> | so commenting out the exe component will confirm somewhat the hypothesis |
| 10:18:15 | <kuribas> | actually, it's used in the tests. |
| 10:18:35 | <jneira[m]> | hmm |
| 10:18:52 | <kuribas> | hmm, maybe building the test will fetch the packages... |
| 10:18:57 | <jneira[m]> | ok, what about `stack build --enable-tests --no-un-tests` |
| 10:19:04 | <jneira[m]> | just that :-) |
| 10:19:15 | <jneira[m]> | `--no-run-tests` |
| 10:19:43 | <jneira[m]> | you can put tests: true in your stack.yaml to have it by default with `stack build` |
| 10:20:41 | <kuribas> | If I am right, stack test should solve the problem, because if fetches the missing libs. |
| 10:21:05 | → | mmhat joins (~mmh@55d4b856.access.ecotel.net) |
| 10:21:18 | <jneira[m]> | sorry it is `stack build --test --no-run-tests` |
| 10:21:21 | <jneira[m]> | the other one is for cabal |
| 10:21:42 | <jneira[m]> | i would put `test: true` (or `tests: true`) in the stack.yaml |
| 10:22:32 | → | ss4 joins (~wootehfoo@user/wootehfoot) |
| 10:22:40 | <kuribas> | and.. it did! |
| 10:22:59 | <jneira[m]> | yeah, with hls there is the same problem |
| 10:23:14 | <kuribas> | So I changed one version in my stack.yaml, which caused other libs to be changed. |
| 10:23:50 | <kuribas> | Then flycheck-haskell just passes "all" modules to ghc, even the one from test which aren't needed by the lib, and not build. |
| 10:30:08 | × | comandingo quits (~drever@2001:a61:3462:da01:7aec:4329:8eb0:7c56) (Ping timeout: 260 seconds) |
| 10:36:39 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Quit: Leaving) |
| 10:37:57 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 10:44:30 | → | comandingo joins (~drever@2001:a61:3462:da01:1d3:8bd7:fc2b:56af) |
| 10:48:10 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 10:48:16 | → | boxscape_ joins (~boxscape_@134.171.69.87) |
| 10:53:28 | → | lavaman joins (~lavaman@98.38.249.169) |
| 10:56:36 | → | Cajun joins (~Cajun@user/cajun) |
| 10:58:10 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 260 seconds) |
| 11:00:54 | → | alx741 joins (~alx741@186.178.109.79) |
| 11:03:59 | × | dsrt^ quits (~dsrt@wsip-68-227-92-38.mc.at.cox.net) (Ping timeout: 264 seconds) |
| 11:08:58 | × | whez quits (sid470288@lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 11:10:03 | × | mrckndt quits (~mrckndt@user/mrckndt) (Quit: mrckndt) |
| 11:10:25 | → | mrckndt joins (~mrckndt@user/mrckndt) |
| 11:10:53 | → | jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se) |
| 11:14:42 | × | LiaoTao quits (~LiaoTao@gateway/tor-sasl/liaotao) (Ping timeout: 276 seconds) |
| 11:16:42 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 11:18:59 | × | bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 264 seconds) |
| 11:20:28 | × | gehmehgeh quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 11:21:21 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 11:23:17 | × | jonathanx quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Remote host closed the connection) |
| 11:23:34 | → | jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se) |
| 11:25:21 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:90ed:9a10:88ac:8dca) |
| 11:26:10 | × | ss4 quits (~wootehfoo@user/wootehfoot) (Ping timeout: 260 seconds) |
| 11:29:47 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:90ed:9a10:88ac:8dca) (Ping timeout: 264 seconds) |
| 11:30:20 | → | bongobrown joins (~bongobrow@cpe-76-185-215-2.satx.res.rr.com) |
| 11:31:25 | × | jonathanx quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Ping timeout: 260 seconds) |
| 11:37:52 | → | jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se) |
| 11:45:15 | → | ubert joins (~Thunderbi@91.141.46.110.wireless.dyn.drei.com) |
| 11:46:24 | → | dsrt^ joins (~dsrt@wsip-68-227-92-38.mc.at.cox.net) |
| 11:46:27 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Excess Flood) |
| 11:46:56 | × | gehmehgeh quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 11:47:23 | → | Freyr joins (~Freyr@host109-158-44-114.range109-158.btcentralplus.com) |
| 11:47:40 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 11:48:48 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 11:51:21 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds) |
| 11:59:51 | → | burnsidesLlama joins (~burnsides@dhcp168-026.wadham.ox.ac.uk) |
| 12:01:53 | × | max22- quits (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) (Ping timeout: 264 seconds) |
| 12:03:29 | <maerwald> | stack runs configure of a package, even if it's marked as unbuildable? |
| 12:06:53 | × | mbuf quits (~Shakthi@122.178.213.7) (Quit: Leaving) |
| 12:08:27 | × | amk quits (~amk@109.255.169.126) (Read error: Connection reset by peer) |
| 12:08:42 | → | amk joins (~amk@109.255.169.126) |
| 12:08:54 | × | alzgh quits (~alzgh@user/alzgh) (Remote host closed the connection) |
| 12:09:15 | → | alzgh joins (~alzgh@user/alzgh) |
| 12:10:46 | × | jonathanx quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Remote host closed the connection) |
| 12:11:05 | → | jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se) |
| 12:15:58 | <maerwald> | or is this cabals fault for not allowing resolving the package without running Setup.hs? |
| 12:17:29 | <geekosaur> | cabal shouldn't require Setup.hs unless it's build-type: custom, and even then shouldn't run it if it's marked unbuildable |
| 12:18:27 | <geekosaur> | I could well imagine a setup involving windows-only packages on a windows platform but some other package (e.g. unix) on others, for example |
| 12:19:05 | <maerwald> | yes, that's what I have and it's running the unix configure script on windows |
| 12:19:17 | <geekosaur> | shouldn't be doing that at all |
| 12:19:28 | <geekosaur> | either stack or cabal |
| 12:19:29 | <maerwald> | afterwards it skips building it |
| 12:19:37 | <maerwald> | but it's problematic already |
| 12:20:49 | → | alphabeta joins (~kilolympu@185.65.135.177) |
| 12:21:12 | × | kilolympus quits (~kilolympu@185.65.135.177) (Ping timeout: 260 seconds) |
| 12:21:59 | × | Cajun quits (~Cajun@user/cajun) (Ping timeout: 256 seconds) |
| 12:22:32 | → | ss4 joins (~wootehfoo@user/wootehfoot) |
| 12:22:56 | → | abrantesasf joins (~abrantesa@187.36.170.211) |
| 12:25:05 | × | sprout quits (~quassel@2a02:a467:ccd6:1:319c:b1d4:3651:39a5) (Ping timeout: 258 seconds) |
| 12:25:28 | → | faultline joins (~christian@nat-eduroam-01.scc.kit.edu) |
| 12:25:47 | → | sprout joins (~quassel@2a02:a467:ccd6:1:319c:b1d4:3651:39a5) |
| 12:26:04 | × | comandingo quits (~drever@2001:a61:3462:da01:1d3:8bd7:fc2b:56af) (Ping timeout: 268 seconds) |
| 12:26:42 | → | comandingo joins (~drever@2001:a61:3462:da01:22ed:63f7:5f22:784b) |
| 12:31:33 | → | shapr joins (~user@pool-100-36-247-68.washdc.fios.verizon.net) |
| 12:31:50 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 12:32:48 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 12:33:01 | → | slowButPresent joins (~slowButPr@user/slowbutpresent) |
| 12:33:08 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 12:34:15 | → | guniberas joins (~guniberas@42.191.188.121) |
| 12:37:10 | <adamCS> | when I read a text file via some interface using chunks, what is an efficient way to get lines of text? I'm trying to write a streamly unfold from a handle to a stream of lines ofd text. As reference, I'm using hGetLine from Text. I want to see if reading chunks, converting to ByteString and then to Text will be faster. But those chunks aren't lines, right? So how do I convert a stream of ByteString coming from chunks to |
| 12:37:10 | <adamCS> | lines of Text? |
| 12:38:40 | <maerwald> | adamCS: you use a Parser |
| 12:39:24 | <adamCS> | Ah. Which keeps some state as the stream goes and then emits lines of text as they happen? |
| 12:39:51 | <maerwald> | Parser has an optional internal state and a backtrack buffer |
| 12:40:49 | <maerwald> | something like https://hackage.haskell.org/package/streamly-0.8.0/docs/Streamly-Internal-Data-Parser.html#v:takeWhileP maybe |
| 12:41:28 | <adamCS> | maerwald: Thanks! That makes sense. I've never used that part of the interface. |
| 12:41:56 | <maerwald> | also note that there are two parser types: direct style parser (ParserD) and CPS (ParserK) |
| 12:42:10 | <maerwald> | if you need monadic or alternative actions, you'll have to use ParserK |
| 12:42:30 | <maerwald> | but ParserD has better inlining behavior (though with monads, performance degrades quadratic) |
| 12:42:44 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 12:44:28 | <maerwald> | https://streamly.composewell.com/haddocks/streamly-0.8.0/Streamly-Internal-Data-Parser-ParserD-Type.html |
| 12:44:50 | <maerwald> | and https://streamly.composewell.com/haddocks/streamly-0.8.0/Streamly-Internal-Data-Parser-ParserK-Type.html |
| 12:44:59 | <adamCS> | I don't, I don't think. I just have Text (or ByteString) "chunks" and I want Text lines. Preferably all still in Unfold form. But I can let that go, I guess. |
| 12:45:23 | <maerwald> | that might work with ParserD then I guess |
| 12:49:20 | <maerwald> | Stream.parse (P.takeWhile (/= '\n') F.toList) $ Prelude.fromList "abcdef\n lol" |
| 12:49:31 | <maerwald> | yield "abcdef" |
| 12:50:59 | × | burnsidesLlama quits (~burnsides@dhcp168-026.wadham.ox.ac.uk) (Remote host closed the connection) |
| 12:51:17 | → | kupi joins (uid212005@id-212005.hampstead.irccloud.com) |
| 12:51:33 | → | burnsidesLlama joins (~burnsides@dhcp168-026.wadham.ox.ac.uk) |
| 12:52:22 | → | wonko joins (~wjc@62.115.229.50) |
| 12:52:53 | <adamCS> | Cool. If you used "parseMany" there would you get both lines? |
| 12:53:05 | → | neurocyte0132889 joins (~neurocyte@212.232.89.185) |
| 12:53:05 | × | neurocyte0132889 quits (~neurocyte@212.232.89.185) (Changing host) |
| 12:53:06 | → | neurocyte0132889 joins (~neurocyte@user/neurocyte) |
| 12:55:18 | × | wonko quits (~wjc@62.115.229.50) (Remote host closed the connection) |
| 12:55:24 | → | a6a45081-2b83 joins (~aditya@pal-210-106-60.itap.purdue.edu) |
| 12:55:42 | → | wonko joins (~wjc@62.115.229.50) |
| 12:55:56 | × | burnsidesLlama quits (~burnsides@dhcp168-026.wadham.ox.ac.uk) (Ping timeout: 245 seconds) |
| 12:56:13 | <maerwald> | that doesn't terminate for me |
| 12:56:38 | × | wonko quits (~wjc@62.115.229.50) (Changing host) |
| 12:56:38 | → | wonko joins (~wjc@user/wonko) |
| 12:58:44 | <adamCS> | The parser stuff is all so internal that it's hard, for me at least, to figure out. But that might also just be because I don't understand parsers that well. |
| 12:59:52 | <adamCS> | I also wish that streamly--which I really like!--had a Text module, or something close, for doing exactly this. It seems like a fairly common use-case, but maybe that's just me... |
| 13:08:12 | × | wonko quits (~wjc@user/wonko) (Read error: Connection reset by peer) |
| 13:08:45 | <maerwald> | Stream.parse (P.many (P.takeWhile (/= '\n') F.toList <* next) F.toList) $ Prelude.fromList "abcdef\nlol" |
| 13:08:47 | <maerwald> | this works |
| 13:09:00 | → | mc47 joins (~mc47@xmonad/TheMC47) |
| 13:09:02 | <maerwald> | with: let next = (Just <$> P.satisfy (const True)) <|> pure Nothing |
| 13:09:20 | <boxscape_> | % let x :: Eq b => b; x = undefined in x `seq` () |
| 13:09:20 | <yahb> | boxscape_: *** Exception: Prelude.undefined; CallStack (from HasCallStack):; error, called at libraries/base/GHC/Err.hs:75:14 in base:GHC.Err; undefined, called at <interactive>:167:25 in interactive:Ghci38 |
| 13:09:20 | <maerwald> | there's a PR to add that function https://github.com/composewell/streamly/pull/1301 |
| 13:09:39 | <adamCS> | huh. Gonna have to stare at that for a bit. Thanks! |
| 13:09:43 | <boxscape_> | hm, I'm a bit surprised by that, I would have expected the constraint to result in seq only forcing x to be a lambda |
| 13:09:58 | <maerwald> | adamCS: we have to consume the '\n' afterwards, but we may also be at the end of input |
| 13:10:11 | <maerwald> | unfortunately, that causes us to use Alternative here |
| 13:10:35 | <maerwald> | the implementation in the PR doesn't use that |
| 13:10:40 | <maerwald> | so it may be more efficient |
| 13:11:10 | → | max22- joins (~maxime@2a01cb08833598007c8a2cbd9d715d88.ipv6.abo.wanadoo.fr) |
| 13:11:20 | <boxscape_> | % let x :: forall b . Eq b => (b, Bool); x = (undefined, (undefined :: b) == undefined) in x `seq` () |
| 13:11:20 | <yahb> | boxscape_: () |
| 13:11:21 | × | mjs2600 quits (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) (Quit: ZNC 1.8.2 - https://znc.in) |
| 13:11:36 | → | mjs2600 joins (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) |
| 13:14:16 | <boxscape_> | % let x | !() <- undefined = x in 1 |
| 13:14:16 | <yahb> | boxscape_: 1 |
| 13:14:28 | <boxscape_> | I think I used to know why this doesn't crash... don't remember though :( |
| 13:15:23 | <boxscape_> | oh I'm not using x, sorry -.- |
| 13:15:41 | × | rond_ quits (~rond_@2a02:a31a:a23c:f480:2fd7:e087:5546:a438) (Quit: Client closed) |
| 13:17:43 | × | hendursa1 quits (~weechat@user/hendursaga) (Remote host closed the connection) |
| 13:18:26 | × | feliix42 quits (~felix@gibbs.uberspace.de) (Read error: Connection reset by peer) |
| 13:18:34 | → | hendursa1 joins (~weechat@user/hendursaga) |
| 13:19:35 | × | MQ-17J quits (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Ping timeout: 264 seconds) |
| 13:21:30 | → | feliix42 joins (~felix@gibbs.uberspace.de) |
| 13:22:12 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 13:22:43 | → | burnsidesLlama joins (~burnsides@dhcp168-026.wadham.ox.ac.uk) |
| 13:23:31 | → | MQ-17J joins (~MQ-17J@8.6.144.240) |
| 13:25:35 | × | ss4 quits (~wootehfoo@user/wootehfoot) (Ping timeout: 246 seconds) |
| 13:26:50 | <maerwald> | adamCS: https://paste.tomsmeding.com/TP5Ub9Kh |
| 13:26:54 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:90ed:9a10:88ac:8dca) |
| 13:27:23 | <adamCS> | maerwald: Thanks! |
| 13:27:28 | × | burnsidesLlama quits (~burnsides@dhcp168-026.wadham.ox.ac.uk) (Ping timeout: 260 seconds) |
| 13:29:22 | × | jonathanx quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Remote host closed the connection) |
| 13:30:13 | <maerwald> | but parseMany is probably better, so we retain a stream and can then print per line |
| 13:30:23 | <maerwald> | that'll allow better benchmarking I guess |
| 13:30:28 | → | jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se) |
| 13:31:22 | × | jonathanx quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Remote host closed the connection) |
| 13:31:39 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:90ed:9a10:88ac:8dca) (Ping timeout: 260 seconds) |
| 13:36:58 | → | jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se) |
| 13:40:50 | × | jonathanx quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Remote host closed the connection) |
| 13:42:16 | → | jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se) |
| 13:47:15 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 13:51:54 | → | betelgeuse joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 13:52:41 | <maerwald> | adamCS: I just tested... and ParserD is indeed much faster here |
| 13:54:42 | <maerwald> | https://github.com/hasufell/parselines |
| 13:54:59 | <maerwald> | 2s on 100mb file with ParserD, 3.5s with ParserK |
| 13:55:23 | → | myShoggoth joins (~myShoggot@97-120-85-195.ptld.qwest.net) |
| 13:55:47 | <maerwald> | now would be interesting to compare with attoparsec |
| 13:55:55 | × | MQ-17J quits (~MQ-17J@8.6.144.240) (Ping timeout: 260 seconds) |
| 13:57:11 | <maerwald> | and from my understanding... if you use CPS style parsers, you'll need to parse in chunks, so `Parser m (Array Char) b` instead of `Parser m Char b` |
| 13:57:44 | × | jumper149 quits (~jumper149@80.240.31.34) (Quit: WeeChat 3.2) |
| 13:57:46 | <maerwald> | otherwise performance drops (which is probably happening here) |
| 14:02:01 | → | lavaman joins (~lavaman@98.38.249.169) |
| 14:02:52 | → | burnsidesLlama joins (~burnsides@dhcp168-026.wadham.ox.ac.uk) |
| 14:03:16 | → | hseg joins (~gesh@185.120.126.13) |
| 14:04:33 | <hseg> | Hi. happy-1.21.0 fails to build ('happy' required but not found) and it is a transitive dep of mine |
| 14:04:47 | <hseg> | can't find this discussed online though |
| 14:07:35 | × | burnsidesLlama quits (~burnsides@dhcp168-026.wadham.ox.ac.uk) (Ping timeout: 260 seconds) |
| 14:07:37 | → | ubert1 joins (~Thunderbi@178.165.177.232.wireless.dyn.drei.com) |
| 14:08:18 | <maerwald> | attoparsec is indeed much faster |
| 14:08:32 | × | ubert quits (~Thunderbi@91.141.46.110.wireless.dyn.drei.com) (Ping timeout: 260 seconds) |
| 14:08:32 | ubert1 | is now known as ubert |
| 14:10:05 | <hseg> | nm, downgrade to happy-1.20.0 works |
| 14:10:06 | <adamCS> | maerwald: is there a way I can use that for ```Streamly.Unfold m Handle (Streamly.Array Word8) -> Streamly.Unfold m Handle Text``` where that returned ```Unfold``` is lines? |
| 14:10:09 | → | enoq joins (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) |
| 14:10:37 | <maerwald> | you don't usually keep the unfold type for long, you just turn it into a stream |
| 14:10:47 | <maerwald> | I think it will be dropped in the next major release anyway |
| 14:11:18 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3) |
| 14:12:45 | <maerwald> | turning `t m (Array Word8)` into `t m Word8` is possible though, but I don't remember the exact function |
| 14:12:48 | × | acidjnk_new quits (~acidjnk@p200300d0c7238d76b9ac87bdf676c186.dip0.t-ipconnect.de) (Ping timeout: 258 seconds) |
| 14:12:55 | <maerwald> | it'll also degrade performance potentially I think |
| 14:13:48 | → | zer0bitz joins (~zer0bitz@dsl-hkibng31-54fae3-116.dhcp.inet.fi) |
| 14:17:52 | × | ubert quits (~Thunderbi@178.165.177.232.wireless.dyn.drei.com) (Ping timeout: 260 seconds) |
| 14:19:05 | × | a6a45081-2b83 quits (~aditya@pal-210-106-60.itap.purdue.edu) (Remote host closed the connection) |
| 14:19:20 | <adamCS> | maerwald: Right. What I'm ultimately trying to do is two things: 1. Generate a stream of Text lines from a (csv or tsv) text file that then get parsed by some user defined functions and then, likely, folded into efficient storage. So for that I just want the most efficient possible ```FilePath -> t m Text``` where the resulting stream is lines. |
| 14:20:12 | × | Freyr quits (~Freyr@host109-158-44-114.range109-158.btcentralplus.com) (Quit: Connection closed) |
| 14:20:36 | <adamCS> | 2. Some versions of that are so common that i want to put the entire thing (file -> lines of Text -> haskell structures -> efficient container of haskell structure) in one function because I wonder if that will make fusion more likely and the entire operation faster. |
| 14:21:29 | <maerwald> | sounds all pretty straight forward... my linked code already does most of that |
| 14:21:35 | <maerwald> | https://github.com/hasufell/parselines/blob/master/app/Main.hs |
| 14:21:46 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds) |
| 14:22:13 | × | dajoer quits (~david@user/gvx) (Quit: leaving) |
| 14:22:18 | <maerwald> | to turn [Word8] into Text you just fmap |
| 14:22:37 | → | ss4 joins (~wootehfoo@user/wootehfoot) |
| 14:22:48 | <adamCS> | It's for that 2nd version that I was trying to express things as an unfold. Because in that version I'm going to have a user supplied scan do the (line of Text -> haskell structure) bit and I want to apply that scan to the output of the unfold or the input of the fold. But It doesn't need to be all unfolds and fodsl, it just needs to fuse well. |
| 14:23:00 | → | johnjay joins (~pi@192.142.100.50) |
| 14:23:11 | <johnjay> | does anybody use haskell through homebrew on mac os? |
| 14:23:22 | <johnjay> | or is the shell script from haskell dot org preferable? |
| 14:23:31 | <adamCS> | maerwald: Right. I'll just need to understand it and apply to my case. Thanks! |
| 14:24:11 | <maerwald> | adamCS: (Text -> m Data) -> t m Text -> t m Data |
| 14:24:16 | <maerwald> | that's mapM |
| 14:24:48 | <adamCS> | maerwald: yes. But it's actually a scan because it all depends on the first line, which is a header and needs processing and dropping. |
| 14:24:51 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 14:24:56 | <maerwald> | then you want a Parser |
| 14:25:10 | <maerwald> | `Parser m Text Data` I guess |
| 14:25:12 | <adamCS> | a Parser at the line of text level? |
| 14:25:16 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
| 14:25:31 | <adamCS> | The scan works fine. Would parser be faster? |
| 14:25:33 | <maerwald> | and then you use the `next` function I supplied to read one line |
| 14:25:40 | <maerwald> | not sure |
| 14:26:01 | <adamCS> | It's that I need information from the header in the subsequent Text -> Data |
| 14:26:56 | <adamCS> | I originally used fromEffect but--just to complicate things!--I'm trying to write this in a way that works for Pipes as well. I've abstracted some bits of those interfaces into a typeclass. |
| 14:27:07 | <maerwald> | is it truly monadic? As in: the current line decides the next step? |
| 14:27:21 | <adamCS> | The first line affects all the rest of the steps |
| 14:27:28 | <adamCS> | but only the first line |
| 14:27:37 | → | jkaye joins (~jkaye@2601:281:8300:7530:66b0:89cb:9eb6:ddde) |
| 14:27:44 | <maerwald> | then just use uncons |
| 14:27:49 | <maerwald> | and keep the rest efficient |
| 14:27:50 | <geekosaur> | johnjay, we recommend ghcup on all systems. afaik brew will work but ghcup is easier and faster to update, plus you don't have to worry about versioning as much, you can have multiple versions installed and quickly switch with "ghcup set" |
| 14:27:54 | <maerwald> | https://hackage.haskell.org/package/streamly-0.8.0/docs/Streamly-Prelude.html#v:uncons |
| 14:29:25 | <johnjay> | i think brew just gave me stack. and it segfaults if i tell it to do anything |
| 14:30:26 | <johnjay> | i guess i have to guess the names of ghc and the other components and install them manually |
| 14:30:32 | <johnjay> | (new to macs so idk what i'm doing) |
| 14:30:34 | <adamCS> | Right. I can't remember if there was a reason I didn't. I think, roughly, that it had something to do with then needing Monad (t m) but I'm not sure. Right now, I'm just trying to get the lines of Text thing efficient and then I can start testing the other bits. The scan seems no slower than the fromEffect version which I'm guessing would be more similar to unCons |
| 14:30:49 | <geekosaur> | I saw ghc@8.10 and ghc@9 (avoid the latter, it's buggy) |
| 14:31:08 | <geekosaur> | if you're on an M1, make sure you get 8.10.7 |
| 14:31:25 | <johnjay> | 8.10 is the default |
| 14:31:35 | <johnjay> | yes i'm on an Emm Won |
| 14:31:38 | <maerwald> | adamCS: the other possibility would be to parse the first line of the file twice |
| 14:31:40 | <johnjay> | it's nice so far. |
| 14:31:46 | <johnjay> | but i want to run the haskell |
| 14:31:48 | <johnjay> | on the arm |
| 14:31:56 | <maerwald> | and then decide what you do with the entire file |
| 14:33:16 | × | ikex quits (~ash@user/ikex) (Ping timeout: 260 seconds) |
| 14:33:17 | → | zebrag joins (~chris@user/zebrag) |
| 14:33:34 | <maerwald> | adamCS: https://hackage.haskell.org/package/streamly-0.8.0/docs/Streamly-Prelude.html#v:head |
| 14:33:45 | <maerwald> | this *terminates* the stream |
| 14:34:16 | <adamCS> | maerwald: Back to Text for a sec: in the streamly gitter/matrix channel, readChunks was suggested but your example uses read. Even at this level I'm just sort of confused about how to choose. |
| 14:34:40 | <maerwald> | read is inefficient yeah |
| 14:35:20 | → | burnsidesLlama joins (~burnsides@dhcp168-026.wadham.ox.ac.uk) |
| 14:35:33 | <adamCS> | so do I readChunks and then concat? Or parse within chunks? This is why some efficient version of this would be so useful if it were already in streamly... |
| 14:35:34 | <maerwald> | But if you do readChunks, you'll have to deal with Array forever |
| 14:35:49 | <maerwald> | I think otherwise it's degrading performance |
| 14:36:35 | → | LiaoTao joins (~LiaoTao@gateway/tor-sasl/liaotao) |
| 14:36:54 | <maerwald> | I'm also not sure how this all plays along with the different stream types... `read` does IO requests in chunk size too |
| 14:37:01 | <maerwald> | just your loop will be smaller afaiu |
| 14:37:24 | <adamCS> | I guess I'll just try some things... |
| 14:37:32 | <maerwald> | and from what I gathered a small loop is fine if you have ParserD/StreamD or so? |
| 14:37:43 | <maerwald> | But I do remember that implementing file copying with `read` was way too slow |
| 14:38:16 | <adamCS> | And I don't get how to make sure things are StreamD where that is possible. But mostly streamly should just get that right? |
| 14:38:25 | <maerwald> | :D |
| 14:38:51 | → | ec_ joins (~ec@gateway/tor-sasl/ec) |
| 14:38:52 | <maerwald> | I'd say it always needs experiments... if you want something stable, go for conduit |
| 14:39:08 | <maerwald> | but conduit will also never surprise you with crazy high performance |
| 14:39:19 | <adamCS> | there is always flattenArrays :: Stream m (Array a) -> Stream m a |
| 14:39:38 | <maerwald> | right, but I'd be surprised if that doesn't kill your performance |
| 14:39:48 | <adamCS> | ugh |
| 14:39:55 | <maerwald> | because now your hot loop is over `a`, not over chunks |
| 14:40:14 | <adamCS> | but don't I need it to be for the Parsing to lines? |
| 14:40:33 | <adamCS> | Because I don't know where the line boundaries fall in the chunks? |
| 14:41:40 | <adamCS> | I think I'm misunderstanding since if I use read, the loop is also over a, right? So what do you mean by "hot loop" here? |
| 14:41:41 | <maerwald> | I think `Parser m (Array Word) (Array Word)` would be the right efficient type... and then you turn it into a stream and there you can (Array Word -> Text) |
| 14:42:28 | <adamCS> | Where that parser takes undifferentiated chunks and spits out one array per line? |
| 14:43:06 | <maerwald> | the parser stops after having read one line yeah, then you use parseMany and get [Array Word] |
| 14:43:36 | <maerwald> | but at this point I'm really not sure what's the most efficient thing |
| 14:43:52 | × | amk quits (~amk@109.255.169.126) (Read error: Connection reset by peer) |
| 14:44:03 | → | amk joins (~amk@109.255.169.126) |
| 14:44:16 | <adamCS> | but the streamly version so Stream (Array Word)? |
| 14:44:59 | <maerwald> | yeah, a stream of lines |
| 14:45:38 | <maerwald> | I think there's no zero-cost `flattenArrays` |
| 14:45:41 | × | mjs2600 quits (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) (Ping timeout: 264 seconds) |
| 14:50:22 | <dmj`> | anyone know an example of a defunctionalization pass implemented in haskell on a lambda calculus expr? |
| 14:56:56 | × | lortabac quits (~lortabac@atoulouse-256-1-14-70.w92-136.abo.wanadoo.fr) (Quit: WeeChat 2.8) |
| 14:57:03 | <adamCS> | maerwald: Thanks for all the help! I'm going to try a few things and see if I can understand the parsing bit better by doing. I'll report back if anything jumps out. |
| 14:57:32 | → | shriekingnoise joins (~shrieking@186.137.144.80) |
| 14:59:36 | × | ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
| 15:00:04 | → | MQ-17J joins (~MQ-17J@35.50.77.148) |
| 15:00:29 | × | kupi quits (uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 15:03:32 | × | Skyfire quits (~pyon@user/pyon) (Quit: brb) |
| 15:04:35 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 264 seconds) |
| 15:11:37 | → | _ht joins (~quassel@82-169-194-8.biz.kpn.net) |
| 15:14:23 | <johnjay> | well i don't know how to get out of ghci but ctrl-D always does the job |
| 15:14:40 | <johnjay> | is there some way to change the install dir of ghcup or whatever it's called? |
| 15:14:48 | <maerwald> | johnjay: yes |
| 15:15:03 | <maerwald> | https://www.haskell.org/ghcup/guide/#env-variables |
| 15:16:18 | <johnjay> | also i didn't get hls, the lsp thing. can i rerun the installer? |
| 15:16:21 | × | max22- quits (~maxime@2a01cb08833598007c8a2cbd9d715d88.ipv6.abo.wanadoo.fr) (Remote host closed the connection) |
| 15:16:26 | → | ec_ joins (~ec@gateway/tor-sasl/ec) |
| 15:16:59 | → | max22- joins (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) |
| 15:18:02 | → | thyriaen joins (~thyriaen@dynamic-089-012-077-123.89.12.pool.telefonica.de) |
| 15:18:46 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 15:18:55 | × | boxscape_ quits (~boxscape_@134.171.69.87) (Ping timeout: 260 seconds) |
| 15:19:35 | <maerwald> | johnjay: ghcup install hls |
| 15:20:35 | <johnjay> | oh i see ghcup is in ~/.ghcup/bin |
| 15:20:42 | <geekosaur> | there's also "ghcup tui" for a nice terminal-based ui for installing, uninstalling, and activating various versions of things |
| 15:21:32 | <johnjay> | ok i was confused. it seems everything is in that dir. but cabal has its own dir for some reason |
| 15:22:42 | <c_wraith> | "ghcup tui" isn't very good at upgrading ghcup |
| 15:23:11 | × | hseg quits (~gesh@185.120.126.13) (Ping timeout: 264 seconds) |
| 15:23:24 | <maerwald> | c_wraith: you mean it doesn't re-exec itself? |
| 15:23:51 | <johnjay> | so if i do ghcup install cabal then install hls, then install ghc I'm good? |
| 15:23:58 | <johnjay> | or did the wizard thing do anything else |
| 15:24:03 | <c_wraith> | it doesn't need to do that. It just should say "please restart" or something |
| 15:24:07 | <johnjay> | i just want everything in $HOME/.local |
| 15:24:19 | <c_wraith> | instead of dropping back to a UI that shows the exact same thing as before you ran it |
| 15:24:21 | <maerwald> | johnjay: https://www.haskell.org/ghcup/guide/#xdg-support |
| 15:24:28 | → | hseg joins (~gesh@185.120.126.13) |
| 15:24:29 | <johnjay> | yes i'm reading it. |
| 15:24:40 | <johnjay> | that's why i'm asking |
| 15:25:00 | <maerwald> | generally, it's better to keep things in ~/.ghcup |
| 15:26:21 | × | ss4 quits (~wootehfoo@user/wootehfoot) (Ping timeout: 268 seconds) |
| 15:26:56 | <johnjay> | that's probably a good point. i'll keep it that way until i know enough to put it in .local |
| 15:27:20 | <johnjay> | i guess ghcup gets put in .ghcup no matter what though |
| 15:27:43 | <maerwald> | if you enable xdg support, it gets put in ~/.local/bin |
| 15:27:54 | → | Shaeto joins (~Shaeto@94.25.234.118) |
| 15:28:12 | × | ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
| 15:28:20 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:90ed:9a10:88ac:8dca) |
| 15:30:32 | <johnjay> | can i just delete .ghcup in that case? |
| 15:30:41 | <johnjay> | it looks like that gets created no matter what you choose |
| 15:30:49 | <maerwald> | johnjay: I guess |
| 15:31:16 | <johnjay> | well yeah. you've probably used this setup for years or something |
| 15:31:25 | <johnjay> | so anything weird looks totally normal to you. it's the curse of expertise |
| 15:31:41 | <johnjay> | i think i've got a good setup though thanks |
| 15:32:36 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:90ed:9a10:88ac:8dca) (Ping timeout: 245 seconds) |
| 15:32:49 | × | Shaeto quits (~Shaeto@94.25.234.118) (Quit: WeeChat 3.3) |
| 15:36:07 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:90ed:9a10:88ac:8dca) |
| 15:37:00 | × | taeaad_ quits (~taeaad@user/taeaad) (Quit: ZNC 1.7.5+deb4 - https://znc.in) |
| 15:39:15 | → | ec_ joins (~ec@gateway/tor-sasl/ec) |
| 15:39:42 | → | taeaad joins (~taeaad@user/taeaad) |
| 15:41:11 | → | rond_ joins (~rond_@2a02:a31a:a23c:f480:2fd7:e087:5546:a438) |
| 15:41:19 | ← | taeaad parts (~taeaad@user/taeaad) () |
| 15:43:47 | × | enoq quits (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) (Quit: enoq) |
| 15:44:28 | <awpr> | kuribas: https://hackage.haskell.org/package/ten-0.1.0.2/docs/Data-Ten-Sigma.html#t::-42--42- is the closest I know how to get to a dependent pair in Haskell |
| 15:49:14 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:90ed:9a10:88ac:8dca) (Remote host closed the connection) |
| 15:52:18 | → | canxiu joins (uid524910@id-524910.helmsley.irccloud.com) |
| 15:53:29 | × | MQ-17J quits (~MQ-17J@35.50.77.148) (Ping timeout: 264 seconds) |
| 15:54:44 | <adamCS> | maerwald: I've tried a few versions of the parser thing, and all are much and more memory intensive slower than just using Text.hGetLine. In case the slowness was conversion of [Word8] to Text, I tried a few things there including using text-builder to build Streamly.Fold Word8 Text. But that was no faster. I haven't tried the readChunk thing because I don't know how to write the Parser (Array Word8) (Array Word8). But |
| 15:54:44 | <adamCS> | maybe I'll try to figure it out another time. |
| 15:55:04 | <adamCS> | s/much and/much slower and/ |
| 15:55:33 | <maerwald> | I'm trying this https://paste.tomsmeding.com/CSZeeXVc |
| 15:55:36 | <maerwald> | but it doesn't terminate |
| 15:55:54 | <maerwald> | the Step type is underdocumented imo |
| 15:56:05 | <maerwald> | https://hackage.haskell.org/package/streamly-0.8.0/docs/Streamly-Internal-Data-Parser-ParserD.html#t:Step |
| 15:56:48 | × | ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
| 15:56:54 | <maerwald> | the idea here is that is scans the input, asks for the next chunk if it doesn't find a newline and generally never scans the same chunk twice |
| 15:57:52 | <adamCS> | right. But you also have to retain the remainder of the chunk somehow? |
| 15:58:12 | → | MQ-17J joins (~MQ-17J@2607:fb90:1d96:c9d1:ba5a:1a8b:ade4:a330) |
| 15:59:04 | <maerwald> | that's done in the parser state |
| 15:59:22 | <maerwald> | the parser state holds at most one line |
| 16:01:09 | → | zava joins (~zava@ip5f5bdf0f.dynamic.kabel-deutschland.de) |
| 16:01:38 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
| 16:01:58 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
| 16:02:19 | × | jstolarek quits (~jstolarek@137.220.120.162) (Quit: leaving) |
| 16:02:26 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 16:02:34 | → | ec_ joins (~ec@gateway/tor-sasl/ec) |
| 16:09:42 | × | fendor_ quits (~fendor@178.165.166.121.wireless.dyn.drei.com) (Remote host closed the connection) |
| 16:11:28 | → | fendor joins (~fendor@178.165.166.121.wireless.dyn.drei.com) |
| 16:11:40 | <adamCS> | maerwald: huh. That looks like it makes sense. Is there a +/- issue with the lf itself? |
| 16:12:01 | <maerwald> | a what? |
| 16:12:18 | → | sedeki joins (~textual@user/sedeki) |
| 16:12:24 | <adamCS> | Like where does the lf itself get removed? Is it in the prefix or the suffix? |
| 16:12:56 | <maerwald> | it's removed |
| 16:13:28 | <adamCS> | Ah. I see. Just looked it up. Sorry. |
| 16:13:35 | ← | sedeki parts (~textual@user/sedeki) () |
| 16:15:43 | <adamCS> | Does that not terminate even parsing one line or just when you try parseMany? |
| 16:15:48 | <maerwald> | I think it's because `count` in Done is about the elements, not the bytes |
| 16:15:57 | <maerwald> | and an element is an input chunk |
| 16:16:08 | × | hgolden quits (~hgolden2@cpe-172-114-81-123.socal.res.rr.com) (Remote host closed the connection) |
| 16:16:41 | → | lbseale joins (~lbseale@user/ep1ctetus) |
| 16:17:47 | × | cfricke quits (~cfricke@user/cfricke) (Ping timeout: 264 seconds) |
| 16:17:59 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 16:18:03 | <adamCS> | Do you somehow need to use the state to keep the partial chunk? |
| 16:19:43 | → | kupi joins (uid212005@id-212005.hampstead.irccloud.com) |
| 16:20:04 | × | MQ-17J quits (~MQ-17J@2607:fb90:1d96:c9d1:ba5a:1a8b:ade4:a330) (Read error: Connection reset by peer) |
| 16:20:24 | × | kuribas quits (~user@ip-188-118-57-242.reverse.destiny.be) (Remote host closed the connection) |
| 16:20:47 | → | MQ-17J joins (~MQ-17J@d192-24-122-179.try.wideopenwest.com) |
| 16:22:36 | × | wolfshappen quits (~waff@irc.furworks.de) (Ping timeout: 245 seconds) |
| 16:22:43 | → | ss4 joins (~wootehfoo@user/wootehfoot) |
| 16:22:52 | × | jkaye quits (~jkaye@2601:281:8300:7530:66b0:89cb:9eb6:ddde) (Ping timeout: 268 seconds) |
| 16:23:00 | × | thyriaen quits (~thyriaen@dynamic-089-012-077-123.89.12.pool.telefonica.de) (Quit: Leaving) |
| 16:23:02 | × | CiaoSen quits (~Jura@p200300c95730dd002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
| 16:24:06 | × | ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
| 16:26:11 | × | chele quits (~chele@user/chele) (Ping timeout: 260 seconds) |
| 16:26:12 | × | MQ-17J quits (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer) |
| 16:26:19 | → | wolfshappen joins (~waff@irc.furworks.de) |
| 16:26:29 | → | Pickchea joins (~private@user/pickchea) |
| 16:27:13 | → | MQ-17J joins (~MQ-17J@d192-24-122-179.try.wideopenwest.com) |
| 16:28:42 | → | Skyfire joins (~pyon@user/pyon) |
| 16:29:22 | → | ec_ joins (~ec@gateway/tor-sasl/ec) |
| 16:32:28 | × | alzgh quits (~alzgh@user/alzgh) (Remote host closed the connection) |
| 16:32:48 | → | alzgh joins (~alzgh@user/alzgh) |
| 16:33:53 | → | hgolden joins (~hgolden2@cpe-172-114-81-123.socal.res.rr.com) |
| 16:36:09 | <maerwald> | I think it's just not expressive enough |
| 16:36:30 | <maerwald> | would need something like https://hackage.haskell.org/package/megaparsec-9.2.0/docs/Text-Megaparsec.html#v:setInput |
| 16:36:43 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:90ed:9a10:88ac:8dca) |
| 16:39:44 | × | comandingo quits (~drever@2001:a61:3462:da01:22ed:63f7:5f22:784b) (Ping timeout: 268 seconds) |
| 16:40:00 | × | betelgeuse quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 16:41:20 | → | betelgeuse joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 16:41:31 | × | wolfshappen quits (~waff@irc.furworks.de) (Ping timeout: 265 seconds) |
| 16:42:13 | → | wolfshappen joins (~waff@irc.furworks.de) |
| 16:43:20 | <adamCS> | Yeah. I'm fiddling with a variant that breaks at all the lf and then keeps the remainder as well as the accumulated lines in the state. But I'm too hazy on the details to thikn it'll work. |
| 16:45:47 | × | rond_ quits (~rond_@2a02:a31a:a23c:f480:2fd7:e087:5546:a438) (Quit: Client closed) |
| 16:52:13 | <adamCS> | I think mine is just a fold, actually. Where the fold state accumulates the lines and whatever is left after breaking from the previous chunk. |
| 16:52:38 | <maerwald> | https://hackage.haskell.org/package/streamly-0.8.0/docs/src/Streamly.Internal.Data.Parser.ParserD.Type.html#splitMany |
| 16:52:38 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 16:52:42 | × | ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
| 16:52:44 | <maerwald> | it could be done similar to that maybe |
| 16:52:55 | <maerwald> | but that's a lot of mutual recursion |
| 16:53:37 | × | v01d4lph4 quits (~v01d4lph4@user/v01d4lph4) (Remote host closed the connection) |
| 16:55:32 | × | abrantesasf quits (~abrantesa@187.36.170.211) (Read error: Connection reset by peer) |
| 16:57:09 | <maerwald> | but I think my broken Array version is on the right tracks... Arrays breakOn translates to C's memchr |
| 16:58:09 | <maerwald> | that will be as fast as this blog post suggests https://chrisdone.com/posts/fast-haskell-c-parsing-xml/ |
| 16:58:21 | <maerwald> | which abuses bytestring functions that use memchr under the hood |
| 16:58:28 | → | abrantesasf joins (~abrantesa@187.36.170.211) |
| 16:58:31 | → | teddyc joins (theodorc@cassarossa.samfundet.no) |
| 16:58:39 | <adamCS> | yeah. I'm trying to do something using breakOn to get a list of "lines" and a remainder, accumulate the list and then add the remainder when the next chunk comes. Might not be a fold because of the termination. But it's not parsing one at a time, it'll parse the entire list of lines in one parse. I think. |
| 16:59:56 | <adamCS> | That is, I have type "ParserD.Parser m (FArray.Array Word8) ([FArray.Array Word8])" |
| 17:00:08 | <adamCS> | though I am suspicious of list there but that's for later |
| 17:01:03 | → | segfaultfizzbuzz joins (~segfaultf@135-180-0-138.static.sonic.net) |
| 17:01:40 | <maerwald> | but that way you never get an actual stream of lines |
| 17:01:57 | <maerwald> | you'll accumulate the result in memory |
| 17:02:04 | <maerwald> | when you do the final parse |
| 17:02:20 | <adamCS> | Ah. Yes. |
| 17:02:26 | <segfaultfizzbuzz> | for a pure nonstrict functional programming language like haskell, is there a reasonably succinct way to understand what the most essential barriers are to becoming a competitive systems programming language? |
| 17:02:39 | <maerwald> | segfaultfizzbuzz: good streaming :D |
| 17:02:39 | <segfaultfizzbuzz> | or is it thousands of papercut reasons all compounded |
| 17:02:53 | <maerwald> | unpredictable performance |
| 17:02:57 | <segfaultfizzbuzz> | maerwald: care to elaborate? |
| 17:02:59 | <maerwald> | shitty exceptions |
| 17:03:03 | → | ec_ joins (~ec@gateway/tor-sasl/ec) |
| 17:03:30 | <segfaultfizzbuzz> | care to elaborate on "good streaming" i mean? |
| 17:03:48 | <maerwald> | there's 2 hours of scrollback on that :D |
| 17:06:37 | <adamCS> | maerwald: Maybe a stream of [Array Word8]? for each chunk we emit as many lines as are present and put the remainder in the state. add that to the next chunk and on we go? |
| 17:07:57 | <maerwald> | look... in C this would maybe be 100 lines of code with your own for loops |
| 17:08:10 | <maerwald> | it would take 15 minutes to write and 35 minutes to fix the memory errors you wrote |
| 17:08:58 | <maerwald> | maybe just write it in C and use FFI :p |
| 17:11:00 | × | alzgh quits (~alzgh@user/alzgh) (Remote host closed the connection) |
| 17:11:20 | → | alzgh joins (~alzgh@user/alzgh) |
| 17:13:50 | × | Pickchea quits (~private@user/pickchea) (Quit: Leaving) |
| 17:16:04 | → | waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
| 17:19:03 | <maerwald> | https://hackage.haskell.org/package/streamly-0.8.0/docs/Streamly-Internal-Data-Stream-IsStream-Reduce.html#v:foldIterateM |
| 17:19:08 | <maerwald> | this would be another way to express it |
| 17:19:12 | <adamCS> | Ugh. My thing won't work either because it has to run until a line boundary falls at the end of a chunk. |
| 17:19:17 | × | alphabeta quits (~kilolympu@185.65.135.177) (Quit: Quitting IRC :() |
| 17:19:31 | → | kilolympus joins (~kilolympu@185.65.135.177) |
| 17:19:44 | <adamCS> | hmm |
| 17:19:51 | → | chisui joins (~chisui@200116b868022000576721b474df9c55.dip.versatel-1u1.de) |
| 17:20:16 | <johnjay> | maerwald: write something in C over haskell?? |
| 17:20:18 | <adamCS> | That looks simpler and more promising. |
| 17:20:27 | <dminuoso> | maerwald: And the creeping 9.6 CVE with full code exploitation because you allow for stack smashing via user input is not fixed until 7 years later. |
| 17:20:48 | <maerwald> | yeah... I'm sure haskell-tls has no vulnerabilities |
| 17:20:50 | <maerwald> | :D |
| 17:21:03 | → | Inst__ joins (~Inst@2601:6c4:4080:3f80:258f:7b54:f932:b719) |
| 17:21:34 | <dminuoso> | Im just saying that your characterization of "35 minutes to fix the memory errors you wrote" is naive. |
| 17:21:49 | <dminuoso> | The reality in C is, as soon as you have a pointer, chances are you still have memory bugs lurking around. |
| 17:21:51 | <maerwald> | adamCS: this one also caught my eyes: https://hackage.haskell.org/package/streamly-0.8.0/docs/Streamly-Internal-Data-Fold.html#v:runStep |
| 17:22:03 | <maerwald> | and the concatMap above |
| 17:23:01 | → | econo joins (uid147250@user/econo) |
| 17:23:14 | × | faultline quits (~christian@nat-eduroam-01.scc.kit.edu) (Ping timeout: 246 seconds) |
| 17:25:29 | <maerwald> | but my intuition tells me... there should be a way to abstract away the "parsing over elements" vs "parsing over chunks of elements" |
| 17:25:56 | × | ss4 quits (~wootehfoo@user/wootehfoot) (Ping timeout: 260 seconds) |
| 17:26:01 | <maerwald> | it's ludicrous to do it manually |
| 17:28:17 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 264 seconds) |
| 17:29:59 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 17:30:08 | → | markusde joins (~makrus@206.12.14.106) |
| 17:31:01 | <markusde> | Simple question- I'm trying to use the LiberalTypeSynonyms langauge extension but stack repl keeps telling me that it's an "unrecognized pragma" |
| 17:31:04 | <markusde> | Any ideas? |
| 17:31:33 | <dminuoso> | markusde: You probably typed LANGAUGE instead of LANGUAGE |
| 17:31:36 | <dminuoso> | :> |
| 17:32:06 | <dminuoso> | markusde: Try and share your code exactly |
| 17:32:32 | <markusde> | dminuoso: wow, that's it lmao |
| 17:32:36 | <markusde> | tyty |
| 17:32:52 | <markusde> | english is hard |
| 17:32:56 | × | markusde quits (~makrus@206.12.14.106) (Client Quit) |
| 17:35:08 | <shapr> | I do that all the time and American was my first langauge :-) |
| 17:36:25 | <dsal> | haha. Yeah. It's the one I mess up the most. |
| 17:38:32 | <manicennui> | British English has better slang. |
| 17:42:43 | <Vq> | shapr: You got too many languages in that skull of yours :P |
| 17:43:51 | <shapr> | Vq: du också! |
| 17:43:56 | shapr | hugs Vq |
| 17:44:11 | × | hseg quits (~gesh@185.120.126.13) (Ping timeout: 264 seconds) |
| 17:44:25 | <Vq> | 2½ at most |
| 17:45:23 | <Vq> | I often get confused with words that are just a single letter off between two languages. |
| 17:45:38 | <shapr> | oh yeah, my brain decided "adress" is the permanent correct spelling after I learned Swedish. |
| 17:45:51 | <shapr> | so I *always* spell that incorrectly in English |
| 17:45:57 | <Vq> | Like "parallel" vs "parallell" or "address" vs "adress". |
| 17:45:58 | → | hseg joins (~gesh@185.120.126.13) |
| 17:46:51 | × | hendursa1 quits (~weechat@user/hendursaga) (Quit: hendursa1) |
| 17:47:28 | × | dsrt^ quits (~dsrt@wsip-68-227-92-38.mc.at.cox.net) (Ping timeout: 258 seconds) |
| 17:47:32 | <shapr> | Vq: are you writing Haskell at work these days? |
| 17:47:45 | <Vq> | Not much :( |
| 17:53:13 | → | hendursaga joins (~weechat@user/hendursaga) |
| 17:54:50 | × | NinjaTrappeur quits (~ninja@user/ninjatrappeur) (Quit: WeeChat 3.3) |
| 17:55:40 | → | NinjaTrappeur joins (~ninja@user/ninjatrappeur) |
| 17:57:48 | × | burnsidesLlama quits (~burnsides@dhcp168-026.wadham.ox.ac.uk) (Remote host closed the connection) |
| 17:58:20 | → | burnsidesLlama joins (~burnsides@dhcp168-026.wadham.ox.ac.uk) |
| 18:02:11 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 245 seconds) |
| 18:02:47 | × | burnsidesLlama quits (~burnsides@dhcp168-026.wadham.ox.ac.uk) (Ping timeout: 264 seconds) |
| 18:05:08 | → | ubert joins (~Thunderbi@178.115.57.1.wireless.dyn.drei.com) |
| 18:13:06 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 18:19:36 | <dsal> | shapr: one of my grandparents used to say, "if that don't spell adress, what does it spell?" (sounds better out loud, I guess) |
| 18:20:26 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 258 seconds) |
| 18:21:34 | <geekosaur> | there's also the question of how you pronounce it |
| 18:22:33 | → | ss4 joins (~wootehfoo@user/wootehfoot) |
| 18:24:07 | × | ulvarrefr quits (~user@185.24.53.152) (Ping timeout: 244 seconds) |
| 18:24:24 | Vq | doesn't get it |
| 18:25:49 | <geekosaur> | AD-ress vs. ad-RESS |
| 18:26:35 | <geekosaur> | not sure if one's supposed to be the noun vs. the verb, but I hear them used pretty interchangeably (and probably regionally) |
| 18:27:25 | <geekosaur> | but that would in particular affect how people are inclined to spell it |
| 18:30:01 | <geekosaur> | (also in the second one the a is schwa-d) |
| 18:30:12 | → | ulvarrefr joins (~user@185.24.53.152) |
| 18:31:13 | × | noctux quits (~noctux@user/noctux) (Read error: Connection reset by peer) |
| 18:31:44 | × | max22- quits (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) (Remote host closed the connection) |
| 18:33:05 | → | unit73e joins (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) |
| 18:33:44 | → | noctux joins (~noctux@user/noctux) |
| 18:35:14 | → | burnsidesLlama joins (~burnsides@dhcp168-026.wadham.ox.ac.uk) |
| 18:35:57 | → | max22- joins (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) |
| 18:39:13 | × | dwt__ quits (~dwt_@c-98-200-58-177.hsd1.tx.comcast.net) (Ping timeout: 258 seconds) |
| 18:39:32 | × | burnsidesLlama quits (~burnsides@dhcp168-026.wadham.ox.ac.uk) (Ping timeout: 246 seconds) |
| 18:44:10 | <dsal> | I can never remember how to use `seq`. But I can remember how to turn on BangPatterns, so I'm going to do that instead. |
| 18:44:26 | <dsal> | Actually, no, I think I need seq here. |
| 18:47:45 | × | hseg quits (~gesh@185.120.126.13) (Ping timeout: 260 seconds) |
| 18:48:21 | → | dwt_ joins (~dwt_@c-98-200-58-177.hsd1.tx.comcast.net) |
| 18:48:28 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 18:53:16 | → | cfricke joins (~cfricke@user/cfricke) |
| 18:54:02 | → | v01d4lph4 joins (~v01d4lph4@user/v01d4lph4) |
| 18:56:34 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 18:57:23 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 18:58:47 | × | v01d4lph4 quits (~v01d4lph4@user/v01d4lph4) (Ping timeout: 260 seconds) |
| 18:59:27 | × | azimut_ quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 276 seconds) |
| 19:01:23 | → | lavaman joins (~lavaman@98.38.249.169) |
| 19:02:56 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 19:03:38 | × | dhouthoo quits (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.3) |
| 19:04:48 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 19:05:50 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 260 seconds) |
| 19:06:02 | × | chisui quits (~chisui@200116b868022000576721b474df9c55.dip.versatel-1u1.de) (Ping timeout: 256 seconds) |
| 19:06:23 | × | ss4 quits (~wootehfoo@user/wootehfoot) (Ping timeout: 264 seconds) |
| 19:07:30 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:90ed:9a10:88ac:8dca) (Remote host closed the connection) |
| 19:07:36 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 245 seconds) |
| 19:08:46 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:90ed:9a10:88ac:8dca) |
| 19:11:33 | → | Guest57 joins (~Guest57@73.115.242.32) |
| 19:12:56 | × | Guest57 quits (~Guest57@73.115.242.32) (Client Quit) |
| 19:13:36 | <maerwald> | adamCS: I got a much faster implementation. It's a little slower than attoparsec, but not by much |
| 19:13:51 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 245 seconds) |
| 19:14:14 | × | sagax quits (~sagax_nb@user/sagax) (Remote host closed the connection) |
| 19:14:44 | <maerwald> | 100mb file 1ms streamly, 0.8s attoparsec |
| 19:14:59 | <maerwald> | s/ms/s/ |
| 19:15:10 | × | turlando quits (~turlando@user/turlando) (Ping timeout: 260 seconds) |
| 19:15:14 | → | turlando_ joins (~turlando@93-42-250-112.ip89.fastwebnet.it) |
| 19:17:53 | <maerwald> | https://paste.tomsmeding.com/05JvJGWz |
| 19:22:04 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 19:23:33 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
| 19:25:49 | <maerwald> | hah! if we express this as a Fold, we're faster than attoparsec |
| 19:28:49 | × | kupi quits (uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 19:30:12 | × | jespada quits (~jespada@181.28.253.200) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 19:33:03 | → | harveypwca joins (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) |
| 19:41:40 | → | zincy_ joins (~zincy@2a00:23c8:970c:4801:45df:961b:bdc0:266e) |
| 19:49:22 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:90ed:9a10:88ac:8dca) (Remote host closed the connection) |
| 19:49:30 | → | jstolarek joins (~jstolarek@137.220.120.162) |
| 19:52:06 | → | kupi joins (uid212005@id-212005.hampstead.irccloud.com) |
| 19:52:27 | × | zincy_ quits (~zincy@2a00:23c8:970c:4801:45df:961b:bdc0:266e) (Remote host closed the connection) |
| 19:53:25 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.2) |
| 19:56:29 | → | acidjnk_new joins (~acidjnk@p200300d0c7238d76b9ac87bdf676c186.dip0.t-ipconnect.de) |
| 20:05:29 | × | juhp quits (~juhp@128.106.188.220) (Ping timeout: 265 seconds) |
| 20:07:12 | → | juhp joins (~juhp@128.106.188.220) |
| 20:14:05 | → | burnsidesLlama joins (~burnsides@dhcp168-026.wadham.ox.ac.uk) |
| 20:14:35 | × | cheater quits (~Username@user/cheater) (Read error: Connection reset by peer) |
| 20:20:11 | × | waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 264 seconds) |
| 20:20:43 | → | sky_lounge[m] joins (~skylounge@2001:470:69fc:105::efa6) |
| 20:22:07 | → | waleee joins (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) |
| 20:23:51 | → | cheater joins (~Username@user/cheater) |
| 20:25:08 | × | peterhil quits (~peterhil@dsl-hkibng32-54fb56-2.dhcp.inet.fi) (Ping timeout: 260 seconds) |
| 20:29:41 | → | aegon joins (~mike@174.127.249.180) |
| 20:30:49 | → | zincy_ joins (~zincy@2a00:23c8:970c:4801:45df:961b:bdc0:266e) |
| 20:32:10 | × | trog quits (~trog@user/trog) (Ping timeout: 260 seconds) |
| 20:33:51 | × | zfnmxt quits (~zfnmxtzfn@2001:470:69fc:105::2b32) (Changing host) |
| 20:33:51 | → | zfnmxt joins (~zfnmxtzfn@user/zfnmxt) |
| 20:39:40 | × | _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
| 20:48:42 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 20:49:46 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:90ed:9a10:88ac:8dca) |
| 20:53:17 | → | Tuplanolla joins (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) |
| 20:54:16 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:90ed:9a10:88ac:8dca) (Ping timeout: 245 seconds) |
| 20:54:31 | × | cheater quits (~Username@user/cheater) (Ping timeout: 260 seconds) |
| 20:54:44 | → | cheater joins (~Username@user/cheater) |
| 20:57:36 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
| 20:58:35 | × | jstolarek quits (~jstolarek@137.220.120.162) (Quit: leaving) |
| 21:00:45 | × | cheater quits (~Username@user/cheater) (Ping timeout: 260 seconds) |
| 21:01:09 | → | cheater joins (~Username@user/cheater) |
| 21:05:13 | → | fusion86 joins (~fusion@2a02-a44c-e6e5-1-2dd3-247f-2e63-c814.fixed6.kpn.net) |
| 21:05:25 | × | zava quits (~zava@ip5f5bdf0f.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds) |
| 21:07:54 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:90ed:9a10:88ac:8dca) |
| 21:08:55 | <fusion86> | Is there a difference between using the `const` function and simply throwing an argument away using `_`? Ex. https://paste.tomsmeding.com/1McA4jHv |
| 21:09:55 | × | myShoggoth quits (~myShoggot@97-120-85-195.ptld.qwest.net) (Ping timeout: 260 seconds) |
| 21:10:50 | → | myShoggoth joins (~myShoggot@97-120-85-195.ptld.qwest.net) |
| 21:12:34 | → | hseg joins (~gesh@185.120.126.13) |
| 21:12:34 | × | hseg quits (~gesh@185.120.126.13) (Client Quit) |
| 21:12:49 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
| 21:12:49 | → | allbery_b joins (~geekosaur@xmonad/geekosaur) |
| 21:12:52 | allbery_b | is now known as geekosaur |
| 21:12:59 | × | zincy_ quits (~zincy@2a00:23c8:970c:4801:45df:961b:bdc0:266e) (Remote host closed the connection) |
| 21:15:22 | <geekosaur> | there is no direct difference between const and discarding the argument. but there is a difference between `foo = ...` where `...` consumes an argument (here via `const`) and `foo _ = ...`, because of the monomorphism restriction |
| 21:16:14 | → | MoC joins (~moc@user/moc) |
| 21:17:40 | <monochrom> | If no constraints are involved, the monomorphism restriction is not triggered. |
| 21:19:05 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 21:22:09 | → | zincy_ joins (~zincy@2a00:23c8:970c:4801:45df:961b:bdc0:266e) |
| 21:28:03 | → | fizzsegfaultbuzz joins (~segfaultf@135-180-0-138.static.sonic.net) |
| 21:28:14 | × | segfaultfizzbuzz quits (~segfaultf@135-180-0-138.static.sonic.net) (Ping timeout: 246 seconds) |
| 21:29:24 | → | lavaman joins (~lavaman@98.38.249.169) |
| 21:30:14 | → | faultline joins (~christian@nat-eduroam-01.scc.kit.edu) |
| 21:33:33 | × | cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.3) |
| 21:33:34 | → | Cajun joins (~Cajun@user/cajun) |
| 21:35:51 | × | zer0bitz quits (~zer0bitz@dsl-hkibng31-54fae3-116.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 21:43:06 | × | gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 21:49:10 | × | xsperry quits (~xs@user/xsperry) (Ping timeout: 260 seconds) |
| 21:53:26 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds) |
| 22:00:32 | × | akspecs__ quits (~akspecs@user/akspecs) (Read error: Connection reset by peer) |
| 22:05:11 | × | yrlnry quits (~mjd@pool-74-109-22-90.phlapa.fios.verizon.net) (Ping timeout: 264 seconds) |
| 22:06:14 | → | akspecs__ joins (~akspecs@136-24-214-166.cab.webpass.net) |
| 22:06:14 | × | akspecs__ quits (~akspecs@136-24-214-166.cab.webpass.net) (Changing host) |
| 22:06:14 | → | akspecs__ joins (~akspecs@user/akspecs) |
| 22:11:34 | × | zincy_ quits (~zincy@2a00:23c8:970c:4801:45df:961b:bdc0:266e) (Remote host closed the connection) |
| 22:11:40 | × | ubert quits (~Thunderbi@178.115.57.1.wireless.dyn.drei.com) (Remote host closed the connection) |
| 22:12:24 | → | MarsIronPI joins (~MarsIronP@166.205.153.209) |
| 22:17:10 | × | MarsIronPI quits (~MarsIronP@166.205.153.209) (Ping timeout: 260 seconds) |
| 22:18:43 | → | a6a45081-2b83 joins (~aditya@2601:249:4300:1296:88ec:cc73:84d4:1507) |
| 22:21:20 | × | bongobrown quits (~bongobrow@cpe-76-185-215-2.satx.res.rr.com) (Ping timeout: 260 seconds) |
| 22:22:49 | → | Xatenev joins (~xatenev@user/xatenev) |
| 22:23:02 | ← | Xatenev parts (~xatenev@user/xatenev) () |
| 22:23:28 | × | michalz quits (~michalz@185.246.204.109) (Remote host closed the connection) |
| 22:24:23 | × | fusion86 quits (~fusion@2a02-a44c-e6e5-1-2dd3-247f-2e63-c814.fixed6.kpn.net) (Quit: Leaving) |
| 22:24:51 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 22:27:47 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 22:27:48 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 22:27:48 | → | wroathe joins (~wroathe@user/wroathe) |
| 22:30:02 | × | Cajun quits (~Cajun@user/cajun) (Quit: Client closed) |
| 22:32:46 | × | johnjay quits (~pi@192.142.100.50) (Quit: WeeChat 2.3) |
| 22:34:35 | → | jess joins (~jess@libera/staff/jess) |
| 22:35:12 | → | mjs2600 joins (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) |
| 22:37:12 | × | gdd quits (~gdd@129.199.146.230) (Ping timeout: 260 seconds) |
| 22:38:48 | → | johnjay joins (~pi@192.142.100.50) |
| 22:39:00 | → | gdd joins (~gdd@129.199.146.230) |
| 22:40:45 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.3) |
| 22:45:16 | × | Tuplanolla quits (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) (Quit: Leaving.) |
| 22:45:32 | × | max22- quits (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) (Remote host closed the connection) |
| 22:46:04 | <aegon> | hmm, i'm having my first sequencing problem with laziness. i have this block which calls a 2 handlers in succession within do notation |
| 22:46:14 | <aegon> | and for whatever reason the 2nd statement is happening first even with $! in there |
| 22:46:21 | <aegon> | pastebinning it up |
| 22:49:26 | <aegon> | rcs found" |
| 22:49:37 | <aegon> | https://paste.tomsmeding.com/vLXi3kp7 |
| 22:50:52 | <monochrom> | This leaves open multiple questions. |
| 22:50:53 | × | burnsidesLlama quits (~burnsides@dhcp168-026.wadham.ox.ac.uk) (Remote host closed the connection) |
| 22:51:19 | <monochrom> | Is "ByteString" from Data.ByteString or is it from Data.ByteString.Lazy? |
| 22:51:25 | → | burnsidesLlama joins (~burnsides@dhcp168-026.wadham.ox.ac.uk) |
| 22:51:55 | <monochrom> | What's an actual h that does what you observed? |
| 22:52:10 | × | Skyfire quits (~pyon@user/pyon) (Quit: WeeChat 3.3) |
| 22:52:27 | <monochrom> | What actual observation caused you to conclude your conclusion? |
| 22:52:42 | <aegon> | monochrom: i filled that in as a dummy to prevent overcomplicating things, the actually sigs of onSync takes a tuple of a bunch of stuff, and on sequence takes a Seq.Seq of tuples |
| 22:52:55 | <aegon> | both these callbacks mutate an MVar |
| 22:53:01 | <aegon> | i put print statemetns inside the moutation and on either end of it |
| 22:53:07 | <monochrom> | If you use Debug.Trace and insert a few of those traceMfoo thingies, does that still corroborate with your story? |
| 22:53:15 | <aegon> | and when the first statement is called, the 2nd statement is already in the mutex and processed in its handler |
| 22:53:45 | <aegon> | never done, how would iuse traceMfoo stuffs |
| 22:53:57 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 22:54:12 | <aegon> | i've been using print which might be further confusing things, but then again the observation of the data in the MVar within the modifyMVar_ corroberates the 2nds happening first |
| 22:54:23 | <aegon> | at least at the mutex taking level |
| 22:54:44 | <aegon> | let me try to get a fuller picture on paste |
| 22:55:23 | → | brainfreeze joins (~brainfree@2a03:1b20:4:f011::20d) |
| 22:55:51 | × | burnsidesLlama quits (~burnsides@dhcp168-026.wadham.ox.ac.uk) (Ping timeout: 260 seconds) |
| 22:56:37 | <aegon> | hmm, trying to simplify stuff down to printing but this happens in different threads so thats not a great source of truth either |
| 22:56:37 | × | MQ-17J quits (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer) |
| 22:57:02 | <monochrom> | See this is why I am unconvinced until I see an actual h. |
| 22:57:11 | → | MQ-17J joins (~MQ-17J@d192-24-122-179.try.wideopenwest.com) |
| 22:57:40 | × | brainfreeze quits (~brainfree@2a03:1b20:4:f011::20d) (Client Quit) |
| 22:57:54 | <monochrom> | If the onSync field contains a "forkIO", no one should be surprised by "unexpected" order. |
| 22:58:51 | <monochrom> | The ultimate scientific question is how do you know you have ruled out all other explanations. |
| 22:58:52 | <aegon> | well ok so the full picture is a parentThread creates a bunch of handlers and shoves a mutex into them for state accumulation |
| 22:59:03 | <aegon> | it then forkIO's a child, which calls those handlers in a given order |
| 22:59:29 | <aegon> | the parent thread for whatever reason processes the handler calls out of order from what i can tell by observig what data has been put into the state at the time the mutex is aquired by each handler |
| 23:00:21 | <monochrom> | How do you know that your observation is not explained by interleaving two handlers? |
| 23:00:36 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 276 seconds) |
| 23:00:47 | <aegon> | the flow should be, package handlers -> fork (fork process calles handlerA once then handlerB 3 times and enters its recursive loop) |
| 23:01:10 | <aegon> | i would think that the parent handler A being called from the child thread should finish before handler b is called from the child thread |
| 23:01:27 | <aegon> | given the first thing they both do is grab a mutex to the state wit modifyMVar_ |
| 23:01:41 | <aegon> | but what i'm seeing is that handlerb processes 3 times, then handler a processes |
| 23:02:06 | <aegon> | but the call doesn't return till its completely done with processing, theres no forking within the call |
| 23:02:51 | <aegon> | so even if a child thread calls A, B, B, B, which actually isn't happening between threads afaik now that i'm saying it out load, its invoking those continuations on the child thread |
| 23:03:30 | <aegon> | hmm :\ i'm gonna try to delete a bonch of extra stuff and git a minimum reproducable thing going |
| 23:03:55 | <aegon> | i was hoping someone would see the convention and be like, AH! thats laziness cauing it like this *tadaaa* :P |
| 23:04:09 | <monochrom> | But IO is not lazy. |
| 23:04:39 | → | jespada joins (~jespada@181.28.253.200) |
| 23:04:46 | <monochrom> | If you say so much as "do { print 1; print 2 }" you will never observe out-of-order. |
| 23:04:51 | <aegon> | yeah its wierd, a do block should definitely be sequenced, which is why i came runing here |
| 23:05:10 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 23:05:11 | <aegon> | afaik this code is taking do {print 1: print 2} and then at runtime going, print 2; print 1 |
| 23:05:51 | <monochrom> | But if you do "do {forkIO f; forkIO f} where f = do { print 1; print 2}", you may misinterpret an outcome as out-of-order. |
| 23:05:51 | × | MQ-17J quits (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer) |
| 23:06:03 | → | MQ-17J joins (~MQ-17J@d192-24-122-179.try.wideopenwest.com) |
| 23:06:29 | <monochrom> | For example an outcome could be "1, 2, 1, 2" and then you fixate on the middle "2, 1" and call it out-of-order. |
| 23:06:54 | <aegon> | its \p1 p2 -> forkIO (do {p1; p2) and thats resulting in p2 being called before p1 |
| 23:07:15 | <aegon> | but i'm definite missing somethign because that isn't how that should work |
| 23:08:10 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:90ed:9a10:88ac:8dca) (Remote host closed the connection) |
| 23:08:13 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 23:09:12 | <sm> | just confirming, the paste looks ok |
| 23:09:25 | <sm> | more realistic paste needed |
| 23:10:39 | <aegon> | more realistic paste in progress, changing the callbacks to incrimenting an int in a MVar and printing it |
| 23:11:23 | <sm> | or, well.. hmm.. does it make a difference if you `print <<=` before each action ? Forcing it to evaluate |
| 23:11:50 | <sm> | no, never mnid |
| 23:12:32 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 23:13:00 | <aegon> | hmm, this stuff is all happening pretty deep in this code from the entrypoint, i'm not sure how best to easily whip up an repro outside of the context |
| 23:13:13 | → | lavaman joins (~lavaman@98.38.249.169) |
| 23:13:43 | <sm> | sharing a repro is hard, maybe just simplifying your code in place is easier |
| 23:13:46 | × | alzgh quits (~alzgh@user/alzgh) (Remote host closed the connection) |
| 23:14:06 | → | alzgh joins (~alzgh@user/alzgh) |
| 23:19:21 | × | brettgilio quits (~brettgili@x-node.gq) (Quit: Leaving...) |
| 23:20:29 | × | acidjnk_new quits (~acidjnk@p200300d0c7238d76b9ac87bdf676c186.dip0.t-ipconnect.de) (Ping timeout: 264 seconds) |
| 23:22:06 | → | brettgilio joins (~brettgili@x-node.gq) |
| 23:22:11 | <aegon> | here's a closer version but i'm worried i missed something in that simplification |
| 23:22:14 | <aegon> | https://paste.tomsmeding.com/S2jOauqM |
| 23:22:48 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 23:23:42 | <aegon> | it might need some liberal $ thrown in places to compile but thats the calling order and the mvar behavior |
| 23:24:46 | → | Skyfire joins (~pyon@user/pyon) |
| 23:26:03 | × | betelgeuse quits (~betelgeus@94-225-47-8.access.telenet.be) (Quit: The Lounge - https://thelounge.chat) |
| 23:26:10 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 23:26:21 | × | Inst__ quits (~Inst@2601:6c4:4080:3f80:258f:7b54:f932:b719) (Ping timeout: 245 seconds) |
| 23:27:36 | × | myShoggoth quits (~myShoggot@97-120-85-195.ptld.qwest.net) (Ping timeout: 260 seconds) |
| 23:28:22 | <Axman6> | what's modyfMVar? |
| 23:28:39 | <aegon> | modifyMVar_ |
| 23:29:24 | <aegon> | typed by hands that are having synchronization issues |
| 23:29:48 | <sm> | I find that not easy to understand. If it's still happening, I'd simplify more (list the actions explicitly in a do sequence) |
| 23:29:55 | <aegon> | and dropping charaters |
| 23:30:30 | <Axman6> | @hoogle modifyMVar_ |
| 23:30:31 | <lambdabot> | Control.Concurrent.MVar modifyMVar_ :: MVar a -> (a -> IO a) -> IO () |
| 23:30:31 | <lambdabot> | GHC.Conc.Sync modifyMVar_ :: MVar a -> (a -> IO a) -> IO () |
| 23:30:31 | <lambdabot> | Control.Concurrent.MVar.Lifted modifyMVar_ :: (MonadBaseControl IO m) => MVar a -> (a -> m a) -> m () |
| 23:30:44 | <Axman6> | so you're missing a lambda there? |
| 23:30:57 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:90ed:9a10:88ac:8dca) |
| 23:31:19 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 260 seconds) |
| 23:33:07 | <Axman6> | FYI, $! isn't going to change the ordering that things are executed in IO, it jujst forced the IO expression itself, it doesn't have anything to do with evaluation |
| 23:33:22 | <Axman6> | uh, misread, ignore me |
| 23:34:11 | <Axman6> | I'm struggling to follow this because this code doesn't type check |
| 23:34:42 | <Axman6> | but ifyou are getting the behaviour you're claiming, the IO monad is fundamentally broken, and that seem unlikely |
| 23:34:49 | × | jespada quits (~jespada@181.28.253.200) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 23:36:13 | <aegon> | yeah this is really wierd, there must be something else going on here. the only way i can get the intended behavior is to do it twice |
| 23:36:28 | <aegon> | the first call to the first handler always gets evaluated first |
| 23:36:32 | <aegon> | regaurdless of do call order |
| 23:36:53 | <Axman6> | do you have actual code you can share? |
| 23:36:59 | <sm> | my 2c: this is much too complicated, simplify further |
| 23:37:32 | <monochrom> | Ugh Sink vs Sync |
| 23:37:45 | <sm> | at some point it'll stop having the unexpected sequence |
| 23:38:10 | <Axman6> | then copy and paste that code and never question it again, like a true software engineer |
| 23:38:30 | <aegon> | balls, i cant share the whole thing, :| i'm gonna try ripping things out till it sequences as expected, this might be too big of a rabbit hole to pick at, maybe just taking these sequences out of this funciton might change things? don't know i'm going to try nonesense changes till i see different behavior |
| 23:39:30 | <aegon> | if you don't Sync your Sinks and pass your Sources via Sinks before sending via sources, well ... your Sunk |
| 23:39:42 | <aegon> | i see no problems with these names :P |
| 23:39:59 | × | euandreh quits (~euandreh@2804:14c:33:9fe5:ece1:b35e:c9b0:1b9e) (Ping timeout: 264 seconds) |
| 23:40:27 | <aegon> | ok, i'll shut up for a while and try stepping along the routes you guys have laid out, hopefully back with some sort of finding in a bit |
| 23:40:32 | <monochrom> | No problem, except it looks like one of them is a typo of the other. |
| 23:41:41 | <Axman6> | IMO, I would add some debug logging... everywhere and see what is actually being executed where |
| 23:41:51 | <aegon> | do be clear, i was being sarcastic, your absolutely right the names are confusing |
| 23:42:08 | <aegon> | Axman6: i'm using print but i don't think print order is garunteed between threads right? is there a better tool for this type of stuff? |
| 23:42:13 | → | pavonia joins (~user@user/siracusa) |
| 23:42:33 | <aegon> | print is just putStrLn . show right? |
| 23:42:46 | <Axman6> | no it's not but that shouldn't be affecting what you're claiming since the calls are coming in the same thread |
| 23:42:50 | <Axman6> | yes |
| 23:43:22 | <monochrom> | This is why I raised the "do {forkIO f; forkIO f} where f = do { print 1; print 2}" "1, 2, 1, 2" example. |
| 23:43:50 | <Axman6> | or 1 1 2 , both are totally ok |
| 23:44:03 | <Axman6> | so, give threads ids so you know which thread printed what |
| 23:44:14 | → | danso joins (~danso@23-233-111-52.cpe.pppoe.ca) |
| 23:46:29 | → | xsperry joins (~xs@user/xsperry) |
| 23:47:11 | → | Cajun joins (~Cajun@user/cajun) |
| 23:47:59 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 23:47:59 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 23:47:59 | → | wroathe joins (~wroathe@user/wroathe) |
| 23:49:41 | <aegon> | oh man :X i'm gonna have egg on my face for a while i think |
| 23:49:54 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 23:49:55 | <sm> | stick trace everywhere |
| 23:50:09 | <sm> | always a good move :) |
| 23:50:15 | <monochrom> | I prefer cake or pie. |
| 23:50:21 | <aegon> | no i found it... :| |
| 23:50:32 | <aegon> | i wasn't following the rest of the thread |
| 23:50:40 | <aegon> | later on theres an erronious extra call to sync |
| 23:50:50 | <aegon> | io is working fine, my eyes aren't |
| 23:51:49 | <aegon> | thanks for taking a look at the examples |
| 23:52:12 | aegon | puts on the dunce cap for the day |
| 23:52:50 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 260 seconds) |
| 23:52:56 | <sm> | sounds like a haskell programmer :) |
| 23:53:49 | → | mvk joins (~mvk@2607:fea8:5cc1:300::d3fb) |
| 23:54:12 | × | ralu quits (~ralu@static.211.245.203.116.clients.your-server.de) (Quit: Ping timeout (120 seconds)) |
| 23:54:25 | → | ralu joins (~ralu@static.211.245.203.116.clients.your-server.de) |
| 23:58:38 | → | burnsidesLlama joins (~burnsides@dhcp168-026.wadham.ox.ac.uk) |
All times are in UTC on 2021-10-28.