Logs on 2021-02-22 (freenode/#haskell)
| 00:00:06 | × | atk quits (~Arch-TK@ircpuzzles/staff/Arch-TK) (Quit: Well this is unexpected.) |
| 00:01:27 | → | atk joins (~Arch-TK@ircpuzzles/staff/Arch-TK) |
| 00:02:27 | ski | . o O ( degree and codegree rigs -- "Objects of Categories as Complex Numbers" by Marcelo Fiore,Tom Leinster in 2002-12-30 at <https://arxiv.org/abs/math/0212377> -- cf. <https://golem.ph.utexas.edu/category/2009/07/searching_for_a_video_proof_of.html> ) |
| 00:03:10 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 260 seconds) |
| 00:03:11 | × | m0rphism1 quits (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) (Ping timeout: 272 seconds) |
| 00:05:05 | × | ambiso9 quits (~ambiso@209.182.239.205) (Quit: Ping timeout (120 seconds)) |
| 00:06:04 | → | ambiso9 joins (~ambiso@209.182.239.205) |
| 00:10:16 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:b8ec:ecd4:c92c:f02:3202) |
| 00:11:57 | × | nullniv46 quits (~null@unaffiliated/nullniverse) (Read error: Connection reset by peer) |
| 00:11:58 | → | conal joins (~conal@64.71.133.70) |
| 00:12:02 | → | nullniverse joins (~null@unaffiliated/nullniverse) |
| 00:13:30 | <Axman6> | "Monads themselves are a very interesting concept and are very heavily used by the functional programming community to handle "impurity"." -_- The my perpetuates: https://www.eltonpinto.me/blog/posts/implementing_flatmap_in_rust/ |
| 00:13:35 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:e027:ed4b:9a92:9af6) |
| 00:14:21 | × | carlomagno quits (~cararell@148.87.23.5) (Ping timeout: 264 seconds) |
| 00:14:47 | <pjb> | Axman6: I wanted to do pure functional programming, and all I hear is monads and impurity.. |
| 00:15:02 | → | ezrakilty joins (~ezrakilty@97-113-55-149.tukw.qwest.net) |
| 00:15:41 | <h2017> | monads are pure |
| 00:15:44 | <c_wraith> | monads aren't impurity |
| 00:15:49 | <c_wraith> | monads might *model* impurity |
| 00:15:52 | → | stree joins (~stree@68.36.8.116) |
| 00:15:54 | <c_wraith> | but that's a very different thing |
| 00:15:54 | <Axman6> | ym=myth* |
| 00:16:36 | <minoru_shiraeesh> | h2017: "monads are pure" - except IO? |
| 00:16:41 | <Axman6> | IO is pure |
| 00:16:42 | <c_wraith> | nope |
| 00:16:49 | <h2017> | you can have non-pure instances |
| 00:16:51 | → | ghais joins (4c616ae2@gateway/web/cgi-irc/kiwiirc.com/ip.76.97.106.226) |
| 00:16:53 | <c_wraith> | here's the thing: "purity" applies to functions |
| 00:17:05 | <h2017> | the idea doesn't depend on anything being impure i guess |
| 00:17:36 | <c_wraith> | unsafePerformIO is impure |
| 00:17:47 | <Axman6> | purity means, that f (g x) (g x) is the same as let gx = g x in f gx gx, and this is still true of IO |
| 00:17:55 | → | alx741 joins (~alx741@186.178.109.47) |
| 00:18:06 | <minoru_shiraeesh> | c_wraith: "unsafePerformIO is impure" - and main maybe |
| 00:18:17 | <c_wraith> | Nope. main is inert. |
| 00:18:20 | <c_wraith> | it's just a value. |
| 00:18:32 | <c_wraith> | It's not even a function |
| 00:18:39 | <c_wraith> | "purity" as an idea only applies to functions |
| 00:18:39 | <minoru_shiraeesh> | the thing that runs the action that main returned then |
| 00:18:44 | <Axman6> | you can pass main around any way you want, it's not special, other than being where execution begins |
| 00:21:18 | <c_wraith> | the thing that executes main *is* decidedly impure. But it's out of the scope of a Haskell program |
| 00:22:15 | <Axman6> | it's completely possible to have a pure RTS, it just wou;ldn't be very useful. Think of main as the recipe for telling the RTS what interactions you want it to perform for you with the outside world. |
| 00:23:26 | × | Deide quits (~Deide@217.155.19.23) (Quit: Seeee yaaaa) |
| 00:25:18 | <minoru_shiraeesh> | what do you think about this analogy? you either do something, or you just think and do nothing. but you can talk. talking is halfway between thinking and acting. |
| 00:25:57 | <minoru_shiraeesh> | if thinking is pure, and acting is like a thing that executes an action, then main is like talking |
| 00:26:26 | <minoru_shiraeesh> | when you talk, you don't do anything, but you do something |
| 00:26:36 | <minoru_shiraeesh> | it is physical action too |
| 00:26:58 | <ghais> | Hi all, i am trying to understand a problem i have with type constraints. I created a small example the demonstrates the problem here https://gist.github.com/ghais/2911a582d712a4cafe244b826654cdab the compiler errors out about a missing constraint (Coordinate c0), but i feel the constraints here are sufficient for this function. I tried adding a |
| 00:26:59 | <ghais> | forall quantifier which reduced the errors but ultimately produced a similar error |
| 00:27:09 | <ghais> | would anyone be able to help me understand this use case? |
| 00:27:35 | × | Sonderblade quits (~helloman@94.191.136.141.mobile.tre.se) (Ping timeout: 265 seconds) |
| 00:27:53 | × | oisdk quits (~oisdk@2001:bb6:3329:d100:c73:1525:4623:7479) (Quit: oisdk) |
| 00:28:38 | <Axman6> | can you include the error message please? |
| 00:28:48 | × | pfurla_ quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Quit: gone to sleep. ZZZzzz…) |
| 00:29:21 | <ski> | ghais : the type of `cord1' is ambiguous |
| 00:29:55 | <ghais> | Axman6 sure one second. |
| 00:30:05 | <ski> | ghais : perhaps you intended for `cord1' to have the same type as `cord3' ? |
| 00:30:24 | <ski> | (also, s/Cartisian/Cartesian/ ?) |
| 00:30:25 | <ghais> | @ski why is the type ambiguous since it should have the same type as the constraint Ship s c |
| 00:30:25 | <lambdabot> | Maybe you meant: wiki src ask |
| 00:30:26 | <Axman6> | yeah there's no way to tewll which which impementation of fromCartesian you want, even though you've said Cartesian c |
| 00:31:00 | <ghais> | I thought it should be ultimately bound by the actual instance of Ship s c |
| 00:31:06 | <ski> | ghais : no. nothing prevents you from having multiple instances `Coordinate c' for different types `c' |
| 00:32:28 | <ghais> | @ski wouldn't adding explicit type to this then resolve it? Meaning if i were to say `cord1 = fromCartisian c : c` |
| 00:32:28 | <lambdabot> | Maybe you meant: wiki src ask |
| 00:32:31 | × | usr25 quits (~usr25@unaffiliated/usr25) (Quit: Leaving) |
| 00:32:42 | <Axman6> | you have cord2 = toCartesian (fromCartesian c), which c is being passed between those two functions? It could be any |
| 00:32:48 | <ski> | ghais : `cord1' will have type `c0', for *some* type `c0' satisfying `Coordinate c0'. then `cord2' will use that same instance to translate back to `Cartesian'. then `cord3' will translate to a possibly different type `c1' (satisfying `Coordinate c1'). in fact this `c1' must be the `c' mentioned in the type of `sea'. but nothing prevents `c0' being a different type |
| 00:33:23 | <ghais> | @ski i understand, is there a way to tell the compiler then that these are the same type? |
| 00:33:23 | <lambdabot> | Maybe you meant: wiki src ask |
| 00:33:30 | <Axman6> | you probably want: sailShip :: forall s c. (Coordinate c, Ship s c) => Sea s c -> Name -> Cartisian -> Speed; ... cord1 = fromCartesian c :: c |
| 00:33:37 | <ski> | ghais : so, the problem is that nothing in your code informs `cord1 = fromCartesian c' and `cord2 = toCartesian cord1' which type `c0' to actually use |
| 00:33:38 | <dolio> | c_wraith: See, that's what I'm talking about with knowing the category theory context of monads. :) |
| 00:34:29 | <ski> | ghais : several ways. easiest is probably to put a type signature on `cord1', turn on `ScopedTypeVariables', and add `forall c s. ' to the signature of `sailShip' |
| 00:35:04 | <ski> | ghais : an alternative would be to define e.g. `[cord1,cord3] = [fromCartesian c,fromCartesian cord2]', since elements in the same list must have the same type |
| 00:35:26 | <ghais> | @ski i see. I think i get what the problem is now |
| 00:35:26 | <lambdabot> | Maybe you meant: wiki src ask |
| 00:35:38 | × | aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net) |
| 00:35:42 | <ghais> | ski let me try the scoped typed variable approach |
| 00:36:04 | <Axman6> | ghais: on IRC, we tend to use <name>: not @<name>, and every time you do it you make lambdabot jump :) |
| 00:36:17 | → | aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net) |
| 00:36:26 | → | jdsharp joins (~jdsharp@185.163.110.108) |
| 00:36:32 | <ghais> | Axman6, thanks for tip |
| 00:36:40 | <ghais> | sorry bot :) |
| 00:37:23 | <ski> | ghais : oh, and there's no need to adorn nicknames with sigils like `@' (it's not IRC custom to do so). if you want to refer to, or address, someone, simply mention their nickname. many IRC clients will alert/highlight the user if their nickname is mentioned, first thing in a message, but not as many will do it if it's mentioned later. putting a `@' before will prevent such alerts |
| 00:37:28 | × | aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Client Quit) |
| 00:38:07 | → | aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net) |
| 00:38:09 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-4-36.w83-200.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 00:38:24 | <ghais> | ski, understood. Thank you both. I have only used IRC a couple of times before. I appreciate the help |
| 00:38:31 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-4-36.w83-200.abo.wanadoo.fr) |
| 00:39:09 | <Axman6> | Welcome! |
| 00:39:17 | <ski> | ghais : btw .. you could contemplate adding Functional Dependencies to `Ship'. also, `Sea' has a phantom parameter, is that really what you want to do. also, generally speaking, you should have at least two instances in mind, when you introduce a new type class. do you ? |
| 00:39:17 | × | aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Client Quit) |
| 00:39:25 | × | star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Ping timeout: 240 seconds) |
| 00:39:41 | <ski> | beginners often go overboard with type classes, using them when there's no real reason to |
| 00:39:41 | → | aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net) |
| 00:40:23 | <ghais> | ski, i do. I simplified the example here. The real use case is in https://github.com/ghais/hq/blob/main/src/Q/Options/ImpliedVol/Surface.hs#L111 |
| 00:40:34 | <ski> | you probably don't want to make a type class, unless you're intending to define overloaded operations which in turn invoke methods of the type class (or other such overloaded operations) |
| 00:40:36 | × | nhs quits (~nhs@c-67-180-177-103.hsd1.ca.comcast.net) (Ping timeout: 240 seconds) |
| 00:40:38 | × | tmciver quits (~tmciver@cpe-172-101-40-226.maine.res.rr.com) (Ping timeout: 265 seconds) |
| 00:40:47 | <monochrom> | % 1+1 |
| 00:40:48 | <yahb> | monochrom: 2 |
| 00:41:17 | <ghais> | ski, i do. in the function above there are different instances of strike space that map to a cash strike |
| 00:41:19 | <Axman6> | Phew, glad that's still true, thanks monochrom |
| 00:42:10 | <ski> | i'd probably give a name to `slnShift surface' |
| 00:42:14 | × | aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Client Quit) |
| 00:42:17 | → | tmciver joins (~tmciver@cpe-172-101-40-226.maine.res.rr.com) |
| 00:42:40 | <ghais> | ski, ah yeah probably a good idea |
| 00:43:15 | <ski> | `(TotalVar thetaT) = ...' can be just `TotalVar thetaT = ...' |
| 00:43:43 | → | aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net) |
| 00:43:43 | × | juri_ quits (~juri@178.63.35.222) (Ping timeout: 272 seconds) |
| 00:43:54 | <ghais> | ski, i worked around the problem here by adding the surface as an argument to cashToStrikeSpace and strikeSpaceToCash which seems to bind the variables, but i will try the other solution |
| 00:44:06 | <ski> | instead of `(t1, smile1) = fromJust $ ...', i'd probably use `Just (t1,smile1) = ...' (or maybe use `case') |
| 00:44:06 | <ghais> | ski, i didn't know that. Good to know |
| 00:44:24 | <Axman6> | Speaking of making bots jump, a friend of mine once wrote a slack bot for detecting if you'd ever written a haiku. It worked really well, apart from it being implemented as somerhing which called a C++ program via the command line. the way he'd done it was using "shell", so any text which included a ; would then cause anything following to be executed as another command. He only figured it out when he shee'd into the machine one day and found |
| 00:44:24 | <Axman6> | a few dozen isntances of vim running. We then realised we could just do things like "; ls /etc", "; cat /etc/passwd" etc. fun times |
| 00:44:30 | <ski> | (that will give a better error message, in case you happen to get `Nothing') |
| 00:44:31 | × | aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Client Quit) |
| 00:44:39 | <ghais> | ski, In here, i handle the case of Maybe with surface extrapolation |
| 00:44:44 | <ghais> | of Nothing* |
| 00:44:51 | → | aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net) |
| 00:45:12 | <ghais> | ski, but Just (t1, smile1) is really nice |
| 00:45:19 | <ski> | generally, it's good to (when reasonable) try to avoid partial operations like `fromJust',`head',`tail', .. |
| 00:45:33 | <ghais> | @ski makes sense. I will update it |
| 00:45:33 | <lambdabot> | Maybe you meant: wiki src ask |
| 00:45:37 | <ghais> | sorry |
| 00:45:58 | × | jedws quits (~jedws@101.184.202.248) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 00:46:28 | × | aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Client Quit) |
| 00:46:47 | <ski> | can `surfaceType' only be `Normal' and `LogNormal' ? |
| 00:47:03 | → | aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net) |
| 00:47:08 | → | fendor_ joins (~fendor@178.165.129.166.wireless.dyn.drei.com) |
| 00:47:34 | <ghais> | and ShiftedLogNormal, |
| 00:47:40 | <ski> | ok |
| 00:47:48 | × | Narinas quits (~Narinas@189.223.59.23.dsl.dyn.telnor.net) (Read error: Connection reset by peer) |
| 00:47:51 | × | aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Client Quit) |
| 00:47:51 | <ski> | you could factor out the common part of the two branches |
| 00:48:09 | → | polyrain joins (~polyrain@2001:8003:e4d8:4101:d50e:d40d:4648:6ec) |
| 00:48:16 | → | Narinas joins (~Narinas@189.223.59.23.dsl.dyn.telnor.net) |
| 00:48:25 | → | aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net) |
| 00:48:27 | <ghais> | yeah makes sense |
| 00:48:45 | <ski> | volToTotalVar (euImpliedVol (if surfaceType == Normal then Normal else LogNormal) Call (Forward f) k11 t df premiumT) t |
| 00:48:55 | <ski> | (possibly naming that `if', if you prefer) |
| 00:49:05 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:2c3b:7c69:7266:b507) (Remote host closed the connection) |
| 00:49:23 | <ghais> | ski, i see. That makes sense i can name it in the function |
| 00:49:45 | × | fendor quits (~fendor@91.141.1.5.wireless.dyn.drei.com) (Ping timeout: 264 seconds) |
| 00:49:46 | <ski> | there's also some other repetitions that one could possibly factor out. it's not totally clear whether it would be worth it, but one could TIAS |
| 00:49:54 | × | aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Client Quit) |
| 00:50:24 | → | aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net) |
| 00:50:37 | ski | would probably use `where' instead of `let'-`in' .. but perhaps you prefer this ordering in this case |
| 00:50:55 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 00:51:00 | × | jcarpenter2 quits (~rofl@96.78.87.197) (Ping timeout: 258 seconds) |
| 00:51:09 | × | aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Client Quit) |
| 00:51:15 | <ski> | oh, and similarly, `(ShiftedLogNormal shift) -> shift' can be just `ShiftedLogNormal shift -> shift' |
| 00:51:17 | × | wagle quits (~wagle@quassel.wagle.io) (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
| 00:51:32 | → | aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net) |
| 00:51:40 | → | jrqc joins (~rofl@96.78.87.197) |
| 00:51:47 | → | wagle joins (~wagle@quassel.wagle.io) |
| 00:51:55 | <ghais> | ski, I normally would also use where, but in this case for the i felt the details is about time interpolation is what is important to read |
| 00:52:06 | ski | nods |
| 00:52:19 | <ghais> | ski, yeah i will update all of those. I didn't know that was possible |
| 00:52:45 | <swarmcollective> | ski, regarding "avoid partial operations like `fromJust',`head',`tail'", is there a pattern match for `init` or `last`? (xs: x) seems wrong. |
| 00:52:51 | <ski> | (personally i would also remove all or most uses of `$'. especially atrocities like `LogRel $ log $ k - f') |
| 00:53:08 | × | aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Client Quit) |
| 00:53:11 | <ghais> | lol. Actually that is also a really good point |
| 00:53:15 | <ghais> | i will update that as well |
| 00:53:27 | <Axman6> | swarmcollective: no |
| 00:53:58 | <ski> | i guess one might make a pattern synonym |
| 00:54:00 | → | aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net) |
| 00:54:05 | <Axman6> | but writing initAndTail isn't too hard; initAndTail [a] -> Maybe ([a],a) |
| 00:54:23 | → | conal joins (~conal@64.71.133.70) |
| 00:54:26 | <Axman6> | making it perform well takes a little bit of knowledge though |
| 00:54:39 | × | Narinas quits (~Narinas@189.223.59.23.dsl.dyn.telnor.net) (Read error: Connection reset by peer) |
| 00:54:53 | × | aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Client Quit) |
| 00:54:57 | → | Narinas joins (~Narinas@189.223.59.23.dsl.dyn.telnor.net) |
| 00:55:24 | <minoru_shiraeesh> | Axman6: there is a way to make it perform well? |
| 00:55:42 | → | aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net) |
| 00:55:57 | × | Narinas quits (~Narinas@189.223.59.23.dsl.dyn.telnor.net) (Read error: Connection reset by peer) |
| 00:55:58 | × | polyrain quits (~polyrain@2001:8003:e4d8:4101:d50e:d40d:4648:6ec) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 00:56:13 | <ski> | % let Snoc xs x = "abcd" in (xs,x) |
| 00:56:13 | <yahb> | ski: ("abc",'d') |
| 00:56:19 | × | aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Client Quit) |
| 00:56:22 | → | Narinas joins (~Narinas@189.223.59.23.dsl.dyn.telnor.net) |
| 00:56:44 | <ski> | s/Tail/Last/ |
| 00:56:46 | → | aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net) |
| 00:56:49 | → | ddellacosta joins (~ddellacos@86.106.143.72) |
| 00:57:29 | <Axman6> | it would look something like: initAndTail [] = Nothing; initAndTail xs0 = Just (go xs0) where go [x] = ([],x); go (x:xs) = case go xs of ~(ys,t) -> (x:ys,t). I think that will make it appropriately lazy |
| 00:58:12 | × | poscat quits (~poscat@2408:8207:4825:b3e0::1) (Ping timeout: 260 seconds) |
| 00:59:06 | <ski> | `let' or `where' in place of that `case' will work just as well |
| 00:59:15 | <ski> | (no need for the irrefutable pattern then) |
| 00:59:27 | <swarmcollective> | % let Snoc xs x = "a" in (xs, x) |
| 00:59:28 | <yahb> | swarmcollective: ("",'a') |
| 00:59:29 | <Axman6> | hmm, really? |
| 00:59:40 | <swarmcollective> | % let Snoc xs x = "" in (xs, x) |
| 00:59:40 | <yahb> | swarmcollective: ("*** Exception: <interactive>:19:5-18: Non-exhaustive patterns in Snoc xs x |
| 01:00:38 | <ski> | % case "" of [] -> "oops"; Snoc xs x -> xs ++ "!" ++ [x] |
| 01:00:38 | <yahb> | ski: ; <interactive>:21:26: warning: [-Woverlapping-patterns]; Pattern match is redundant; In a case alternative: Snoc xs x -> ...; "oops" |
| 01:00:54 | × | ddellacosta quits (~ddellacos@86.106.143.72) (Ping timeout: 246 seconds) |
| 01:00:56 | <ski> | oh, fun |
| 01:01:45 | × | geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 264 seconds) |
| 01:01:48 | <Axman6> | % let xs = Snoc "abc" 'd' in xs |
| 01:01:49 | <yahb> | Axman6: "abcd" |
| 01:01:51 | <minoru_shiraeesh> | Axman6, "I think that will make it appropriately lazy" is it because of a tilde? |
| 01:01:54 | <Axman6> | great |
| 01:02:03 | × | average quits (uid473595@gateway/web/irccloud.com/x-vjticfovgmrwoddf) (Quit: Connection closed for inactivity) |
| 01:02:06 | <ski> | % case "" of Nil -> "oops"; Snoc xs x -> xs ++ "!" ++ [x] |
| 01:02:06 | <yahb> | ski: "oops" |
| 01:02:08 | <Axman6> | minoru_shiraeesh: yes, thought apparently that isn't necessary |
| 01:02:10 | <ski> | % case "abcd" of Nil -> "oops"; Snoc xs x -> xs ++ "!" ++ [x] |
| 01:02:11 | <yahb> | ski: "abc!d" |
| 01:02:12 | <ski> | there |
| 01:02:18 | <swarmcollective> | Interesting! Axman6, I'll pull this into a repl. |
| 01:02:20 | × | Narinas quits (~Narinas@189.223.59.23.dsl.dyn.telnor.net) (Read error: Connection reset by peer) |
| 01:02:36 | → | Narinas joins (~Narinas@189.223.59.23.dsl.dyn.telnor.net) |
| 01:02:53 | <ski> | the `~' is necessary, if using the `case' |
| 01:03:24 | <monochrom> | "let" adds an implicit ~ |
| 01:03:34 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 01:03:34 | <minoru_shiraeesh> | I don't know what that tilde is doing (and how this technique is called), but it seems like without it the function becomes linear-time |
| 01:03:36 | <Axman6> | I guess it makes sense that patterns in let and where are irrefutable by default |
| 01:03:46 | <Axman6> | I'd never thought of that, TIL |
| 01:03:54 | <monochrom> | "let (_,_) = foo in ()" = "case foo of ~(_,_) -> ()" |
| 01:04:33 | <monochrom> | Therefore, to a very, very large extent, you can treat ! as the opposite of ~ |
| 01:04:34 | <ghais> | ski, scoped type variables fixed it. I understand what caused it in the first place and i understand the solution. Thank you very much |
| 01:04:51 | <monochrom> | "let !(_,_) = foo in ()" = "case foo of (_,_) -> ()" |
| 01:04:52 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 01:04:54 | → | jedws joins (~jedws@101.184.202.248) |
| 01:04:56 | <ghais> | ski, can i also use type application here? |
| 01:05:00 | × | jollygood2 quits (~bc8134e3@217.29.117.252) (Quit: quit) |
| 01:05:03 | → | polyrain joins (~polyrain@2001:8003:e4d8:4101:d50e:d40d:4648:6ec) |
| 01:06:19 | <Axman6> | yes |
| 01:06:30 | <Axman6> | you could have written fromCartesian @c c |
| 01:06:58 | <ghais> | Axman6, i think that might cleaner that adding ::c at the end of the line |
| 01:07:05 | <ski> | minoru_shiraeesh : without it, it won't work on infinite lists, yes |
| 01:07:09 | <minoru_shiraeesh> | ghais: can you post a snippet with a working code? |
| 01:07:24 | <Axman6> | I agree, but it's a slightly more advanced way of doing it |
| 01:07:30 | <ski> | Axman6 : i might use `fmap' in practice |
| 01:07:34 | × | acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 260 seconds) |
| 01:08:02 | <ski> | ghais : "adding ::c at the end of the line" is not "adding a signature", btw |
| 01:08:52 | <ghais> | minoru_shiraeesh, yeah i updated the full code instead of the small example. I will update the small example. one sec |
| 01:09:03 | <minoru_shiraeesh> | thanks |
| 01:09:05 | <ghais> | ski, what do you mean? |
| 01:09:05 | × | Narinas quits (~Narinas@189.223.59.23.dsl.dyn.telnor.net) (Ping timeout: 240 seconds) |
| 01:09:53 | → | oisdk joins (~oisdk@2001:bb6:3329:d100:c73:1525:4623:7479) |
| 01:10:25 | <ski> | i mean that doing |
| 01:10:40 | <ski> | cord1 = fromCartesian c :: c |
| 01:10:52 | <ski> | is using a type ascription, but doing |
| 01:10:56 | <ski> | cord1 :: c |
| 01:10:59 | <ski> | cord1 = fromCartesian c |
| 01:11:02 | <ski> | is using a type signature |
| 01:11:32 | <ghais> | ski, i see |
| 01:11:49 | <ghais> | minoru_shiraeesh, i updated the example here https://gist.github.com/ghais/2911a582d712a4cafe244b826654cdab |
| 01:12:07 | <ghais> | minoru_shiraeesh, not the type ascription at the end of 21 and 23 |
| 01:12:18 | <ghais> | minoru_shiraeesh also the scoped type param pragma at the top |
| 01:12:26 | <ghais> | i also fixed a bug in the type of Sea |
| 01:12:46 | <ghais> | type of Sea.ships i mean |
| 01:13:13 | <ski> | (some people are not aware that you can put type signatures in `where' and `let') |
| 01:13:35 | → | hnOsmium0001 joins (uid453710@gateway/web/irccloud.com/x-axacivxcvkkvhqtx) |
| 01:13:42 | <ghais> | minoru_shiraeesh, you will need a few more pragmas i think to make the example compile, RecordWildCards for example |
| 01:14:24 | <ghais> | I will probably fix the typo as well :) |
| 01:15:56 | <ski> | (btw the type of `cord3' is already inferred to be the `c' in the signature of `sailShip', since you pass it to `sail' along with `ship' coming from `ships', whose type involve `c' |
| 01:15:58 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:b8ec:ecd4:c92c:f02:3202) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 01:16:21 | <ski> | (oh, and i think usually people abbreviate "coordinate" as "coord" rather that "cord") |
| 01:16:27 | <ghais> | yeah makes sense |
| 01:16:28 | <ski> | @wn cord |
| 01:16:28 | <lambdabot> | *** "cord" wn "WordNet (r) 3.0 (2006)" |
| 01:16:28 | <lambdabot> | cord |
| 01:16:28 | <lambdabot> | n 1: a line made of twisted fibers or threads; "the bundle was |
| 01:16:28 | <lambdabot> | tied with a cord" |
| 01:16:28 | <lambdabot> | 2: a unit of amount of wood cut for burning; 128 cubic feet |
| 01:16:30 | <lambdabot> | [6 @more lines] |
| 01:17:01 | × | Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
| 01:17:04 | <swarmcollective> | Cool use of WordNet! Nice. |
| 01:17:45 | <swarmcollective> | Is this @wn plugin new? Is it on github? (I'll go look) |
| 01:17:58 | <ski> | not new |
| 01:18:09 | <ski> | @list dict |
| 01:18:09 | <lambdabot> | dict provides: dict-help all-dicts bouvier cide devils easton elements foldoc gazetteer hitchcock jargon thesaurus vera wn world02 |
| 01:18:13 | → | geowiesnot joins (~user@87-89-181-157.abo.bbox.fr) |
| 01:18:32 | <monochrom> | . o O ( https://en.wikipedia.org/wiki/CORDIC so "cord" can be OK if you add "ic" after it >:) ) |
| 01:19:01 | <swarmcollective> | ski, thanks! |
| 01:19:01 | ski | . o O ( that's cordial ) |
| 01:19:09 | <monochrom> | haha |
| 01:19:15 | <monochrom> | or rather.... |
| 01:19:20 | <monochrom> | . o O ( haha ) |
| 01:19:28 | <minoru_shiraeesh> | ghais, thanks |
| 01:19:34 | <ephemient> | as long as you don't abbreviate it to "chord"... that would be evil |
| 01:19:36 | <ski> | yw |
| 01:19:41 | <ghais> | np |
| 01:20:07 | <ghais> | monochrom, this is actually a real nice algorithm. Thanks for sharing that |
| 01:21:09 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:2c3b:7c69:7266:b507) |
| 01:22:09 | <ghais> | similar works was done by Henry Briggs. I know one of his descends :) he works in quantitative finance as well |
| 01:22:11 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 01:22:11 | → | Tops21 joins (~Tobias@dyndsl-095-033-094-064.ewe-ip-backbone.de) |
| 01:22:35 | <monochrom> | neat |
| 01:22:43 | <dolio> | Whoever was teaching acronyms back in the 50s should have been fired. |
| 01:22:59 | × | polyrain quits (~polyrain@2001:8003:e4d8:4101:d50e:d40d:4648:6ec) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 01:23:07 | <monochrom> | I don't think today is any better. |
| 01:23:19 | <ghais> | proof in my example: cord |
| 01:23:45 | <dolio> | Yours isn't an acronym, I think. |
| 01:23:53 | <ghais> | right |
| 01:24:07 | × | mirrorbird quits (~psutcliff@2a00:801:446:6dfc:fadb:e310:6ed2:16d) (Quit: Leaving) |
| 01:25:16 | × | Tops2 quits (~Tobias@dyndsl-095-033-094-064.ewe-ip-backbone.de) (Ping timeout: 240 seconds) |
| 01:25:27 | → | Tario joins (~Tario@201.192.165.173) |
| 01:26:00 | ski | . o O ( Cordwainer Smith ) |
| 01:27:25 | → | cabled joins (4c4829bb@76.72.41.187) |
| 01:28:16 | → | Narinas joins (~Narinas@189.223.59.23.dsl.dyn.telnor.net) |
| 01:30:00 | × | Narinas quits (~Narinas@189.223.59.23.dsl.dyn.telnor.net) (Read error: Connection reset by peer) |
| 01:31:05 | × | gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
| 01:31:26 | → | gzj joins (~gzj@unaffiliated/gzj) |
| 01:31:28 | <minoru_shiraeesh> | so, to clarify: is there a way to make init and tail operations on list constant-time? |
| 01:31:36 | → | Narinas joins (~Narinas@189.223.59.23.dsl.dyn.telnor.net) |
| 01:34:18 | × | cabled quits (4c4829bb@76.72.41.187) (Quit: Connection closed) |
| 01:34:25 | <edwardk> | minoru_shiraeesh: yes, but at the cost of the laziness of the list |
| 01:34:37 | <edwardk> | minoru_shiraeesh: you can use an okasaki style double ended queue structure |
| 01:34:52 | <edwardk> | and get O(1) access to both ends |
| 01:35:00 | <edwardk> | you can also use Data.Sequence which is available out of the box |
| 01:35:24 | <edwardk> | Data.Sequence gives O(1) access to both ends, and offers log time indexing and a whole bunch of other operations |
| 01:35:31 | <edwardk> | the constants are worse though |
| 01:36:09 | <minoru_shiraeesh> | edwardk: "yes, but at the cost of the laziness of the list" - how? |
| 01:36:23 | <edwardk> | import Data.Sequence. use it instead. done. |
| 01:36:50 | <edwardk> | if you want the details. you can read the fingertree paper by hinze and paterson |
| 01:36:56 | × | ghais quits (4c616ae2@gateway/web/cgi-irc/kiwiirc.com/ip.76.97.106.226) (Ping timeout: 240 seconds) |
| 01:37:05 | × | gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
| 01:37:10 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:e027:ed4b:9a92:9af6) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 01:37:12 | <ski> | minoru_shiraeesh : sure, define `data Tsil a = Nil | Snoc (Tsil a) a' |
| 01:37:15 | <edwardk> | there's also a book on 'purely functional data structures' by okasaki that offers about 4-5 different constructions for double-ended queues that have O(1) access to either end. |
| 01:37:30 | → | gzj joins (~gzj@unaffiliated/gzj) |
| 01:37:34 | <edwardk> | ski's solution works if you only want access to the tail and not the head, as well ;) |
| 01:37:48 | × | Narinas quits (~Narinas@189.223.59.23.dsl.dyn.telnor.net) (Read error: Connection reset by peer) |
| 01:38:04 | → | nullniv73 joins (~null@unaffiliated/nullniverse) |
| 01:38:09 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-4-36.w83-200.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 01:38:13 | ski | usually refers to that as the "folklore queue" |
| 01:38:16 | <edwardk> | but the fingertree and okasaki solutions give real O(1) access to both ends (most of them are amortized, but the 'real-time deque' options in okasaki are worst-case bounded O(1)) |
| 01:38:28 | × | nullniverse quits (~null@unaffiliated/nullniverse) (Read error: No route to host) |
| 01:38:30 | × | nullniv73 quits (~null@unaffiliated/nullniverse) (Read error: Connection reset by peer) |
| 01:38:31 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-4-36.w83-200.abo.wanadoo.fr) |
| 01:38:44 | <ski> | PFDS is good |
| 01:38:45 | → | nullniverse joins (~null@unaffiliated/nullniverse) |
| 01:39:18 | <edwardk> | oooh, unlifted fingertrees. man i'm going to have to take this project and split it apart into multiple libraries or start treating the current lib as unlifted:base and add more sublibs! |
| 01:39:27 | → | Narinas joins (~Narinas@189.223.59.23.dsl.dyn.telnor.net) |
| 01:39:36 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@184.22.159.161) |
| 01:41:05 | → | polyrain joins (~polyrain@2001:8003:e4d8:4101:d50e:d40d:4648:6ec) |
| 01:41:41 | <minoru_shiraeesh> | I mean, once you got a list, you're stuck with linear-time init and last. I imagined something like changing low-level representation (like creating an ad-hoc array under the hood for example), some low-level loophole like that. |
| 01:41:43 | × | TMA quits (tma@twin.jikos.cz) (Ping timeout: 256 seconds) |
| 01:41:45 | × | geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 240 seconds) |
| 01:41:56 | × | Narinas quits (~Narinas@189.223.59.23.dsl.dyn.telnor.net) (Read error: Connection reset by peer) |
| 01:42:06 | → | Narinas joins (~Narinas@189.223.59.23.dsl.dyn.telnor.net) |
| 01:42:14 | → | elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) |
| 01:42:28 | → | fengh joins (~haskeller@ip72-205-40-121.dc.dc.cox.net) |
| 01:42:41 | <dolio> | If you want fast init/last, you use something other than a list. |
| 01:42:48 | × | sz0 quits (uid110435@gateway/web/irccloud.com/x-ybsyrtlqvchdhgkr) (Quit: Connection closed for inactivity) |
| 01:43:37 | <swarmcollective> | Or invert the list and use `head` and `tail` :D |
| 01:43:38 | × | Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
| 01:43:47 | <dolio> | Yeah, that's another possibility. |
| 01:44:46 | → | Tario joins (~Tario@201.192.165.173) |
| 01:46:14 | <dolio> | At least, something other than the things that are called "lists" in Haskell. |
| 01:46:20 | <EvanR> | if you only need one side of a list, you basically are dealing with a stack |
| 01:48:12 | → | qsc joins (72f2f943@114.242.249.67) |
| 01:48:49 | × | Narinas quits (~Narinas@189.223.59.23.dsl.dyn.telnor.net) (Read error: Connection reset by peer) |
| 01:49:02 | × | qsc quits (72f2f943@114.242.249.67) (Client Quit) |
| 01:49:22 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:2c3b:7c69:7266:b507) (Remote host closed the connection) |
| 01:49:48 | → | rajivr joins (uid269651@gateway/web/irccloud.com/x-yvjuawdfkidfnsxx) |
| 01:49:49 | → | Narinas joins (~Narinas@189.223.59.23.dsl.dyn.telnor.net) |
| 01:49:55 | → | ddellacosta joins (~ddellacos@86.106.143.111) |
| 01:50:49 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:7ce7:fe06:1dad:4fcd) |
| 01:51:30 | → | m_miro joins (4c4829bb@76.72.41.187) |
| 01:52:02 | <m_miro> | excuse me could someone help me figure out whats wrong with my function? |
| 01:53:16 | <ddellacosta> | m_miro: got a gist or something? |
| 01:53:22 | <m_miro> | I'm trying to write a function that takes a list of tuples and returns the first element of a tuple if the second element is the greatest of all the second elements in the tuple. |
| 01:53:34 | <m_miro> | Let me pastebin it |
| 01:54:08 | <EvanR> | and what happens if there are multiple maximums |
| 01:54:27 | <ski> | @where paste |
| 01:54:27 | <lambdabot> | Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com |
| 01:55:11 | × | pjb quits (~t@2a01cb04063ec5000d634482ebf2e83c.ipv6.abo.wanadoo.fr) (Ping timeout: 272 seconds) |
| 01:55:29 | → | rayyyy joins (~nanoz@gateway/tor-sasl/nanoz) |
| 01:56:05 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 01:56:27 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds) |
| 01:56:28 | <m_miro> | heres the functionhttps://paste.tomsmeding.com/gN7hHFj5 |
| 01:56:34 | <m_miro> | heres the function https://paste.tomsmeding.com/gN7hHFj5 |
| 01:57:15 | <ski> | you probably meant `foldr (...) (head xs) (tail xs)' |
| 01:57:37 | <ski> | `fst(x)' can be just `fst x'. similarly for `snd' |
| 01:58:34 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 01:59:05 | <m_miro> | adding parenthesis around head xs and tail xs results in an error |
| 01:59:14 | <ski> | yes, you have a type error, still |
| 01:59:22 | <ski> | what is the result of that `foldr' call ? |
| 02:00:02 | <m_miro> | the result of the foldr call is a tuple |
| 02:00:08 | <ski> | a pair, yes |
| 02:00:13 | <m_miro> | oh snap |
| 02:00:22 | <ski> | heh, you just realized it, i think :) |
| 02:00:24 | <m_miro> | I need a fst around that foldr call |
| 02:00:28 | <ski> | yes |
| 02:00:43 | <m_miro> | '=D thanks ski |
| 02:00:57 | <ski> | what would happen if `tail xs' is empty ? |
| 02:01:43 | <m_miro> | I don't know, I think it would result in an error |
| 02:02:08 | <ski> | try it, in the interactor ? |
| 02:02:18 | <ski> | or try looking at the definition of `foldr', possibly ? |
| 02:02:19 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:2c3b:7c69:7266:b507) |
| 02:02:22 | <ski> | @src foldr |
| 02:02:22 | <lambdabot> | foldr f z [] = z |
| 02:02:22 | <lambdabot> | foldr f z (x:xs) = f x (foldr f z xs) |
| 02:03:16 | × | elliott_ quits (~elliott_@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 240 seconds) |
| 02:03:27 | <m_miro> | so if the tail is empty it chooses z instead? |
| 02:03:57 | <ski> | yes |
| 02:04:13 | <ski> | > foldr f z [a,b,c,d] |
| 02:04:15 | <lambdabot> | f a (f b (f c (f d z))) |
| 02:04:23 | <ski> | > foldr f z [a] |
| 02:04:25 | <lambdabot> | f a z |
| 02:04:27 | <ski> | > foldr f z [] |
| 02:04:28 | <lambdabot> | z |
| 02:04:56 | → | elliott_ joins (~elliott_@pool-108-51-101-42.washdc.fios.verizon.net) |
| 02:05:07 | <ski> | what is the consequence of this, for your code ? |
| 02:05:30 | <m_miro> | is it possible that z isn't the greatest value? |
| 02:05:42 | → | jamm_ joins (~jamm@unaffiliated/jamm) |
| 02:06:11 | <ski> | if `xs' is `[z]', then `head xs' is `z' and `tail xs' is `[]'. so the result of the `foldr' call will be `z' |
| 02:06:26 | <ski> | if the list has only one element, then that is the greatest value |
| 02:08:05 | × | gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
| 02:08:06 | <m_miro> | so it still results in the greatest value being return |
| 02:08:14 | <ski> | yes |
| 02:08:18 | <ski> | and so .. ? |
| 02:08:25 | → | gzj joins (~gzj@unaffiliated/gzj) |
| 02:09:09 | × | Narinas quits (~Narinas@189.223.59.23.dsl.dyn.telnor.net) (Read error: Connection reset by peer) |
| 02:09:13 | → | abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) |
| 02:10:14 | × | jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 264 seconds) |
| 02:10:35 | → | Narinas joins (~Narinas@189.223.59.23.dsl.dyn.telnor.net) |
| 02:11:07 | × | xff0x quits (~xff0x@2001:1a81:52c4:2f00:fa7c:56b7:c532:c584) (Ping timeout: 260 seconds) |
| 02:11:23 | → | mirrorbird joins (~psutcliff@2a00:801:446:6dfc:fadb:e310:6ed2:16d) |
| 02:11:57 | <m_miro> | so I don't need the first greatestPair pattern? |
| 02:12:01 | × | bitmapper quits (uid464869@gateway/web/irccloud.com/x-uhoorvvzjdpjkavt) (Quit: Connection closed for inactivity) |
| 02:12:30 | → | xff0x joins (~xff0x@2001:1a81:52fd:ec00:d491:9747:a76e:961a) |
| 02:13:15 | <ski> | right, the first defining equation is redundant, that case is already correctly covered by the general case |
| 02:15:01 | <ski> | m_miro : oh. you also don't need the brackets in `greatestPair (xs) = ...' |
| 02:15:23 | <ski> | nor do you need to wrap the list in extra brackets, in `main' |
| 02:16:09 | <m_miro> | ok I'll get delete the first equation then |
| 02:16:20 | <m_miro> | and all the extra brackets |
| 02:16:33 | <edwardk> | minoru_shiraeesh: https://www.irccloud.com/pastebin/FWp4VlDt/RealtimeDeque.hs provides constant time access to either end. |
| 02:16:48 | × | tmciver quits (~tmciver@cpe-172-101-40-226.maine.res.rr.com) (Read error: Connection reset by peer) |
| 02:16:48 | <zzz> | how should I generally approach choosing the best whatever library? I was doing something with Data.Graph and have just been told that it's a weak, limited and outdated module. This seems to happen a lot |
| 02:17:09 | <edwardk> | you can use (:>) to snoc, init/last and (:<) to cons/head/tail |
| 02:17:35 | <edwardk> | length is also O(1) |
| 02:17:54 | <ski> | m_miro : it often makes sense to ponder whether one could use simpler base cases, and whether some cases are already correctly handled by other cases (or can be reasonably made to do so) |
| 02:17:56 | <edwardk> | adding all the list instances, etc.? on you. |
| 02:18:03 | × | shatriff quits (~vitaliish@protective.remission.volia.net) (Remote host closed the connection) |
| 02:18:19 | → | shatriff joins (~vitaliish@protective.remission.volia.net) |
| 02:18:23 | <ski> | m_miro : this helps to make code more intelligible. "DRY" - "Don't Repeat Yourself" |
| 02:18:48 | × | shatriff quits (~vitaliish@protective.remission.volia.net) (Remote host closed the connection) |
| 02:19:11 | → | jamm_ joins (~jamm@unaffiliated/jamm) |
| 02:19:27 | → | anselmschueler joins (2e72278d@dynamic-046-114-039-141.46.114.pool.telefonica.de) |
| 02:19:29 | <ski> | (in this case, `greatestPair' doesn't make sense, in case the list is empty. but often, empty or trivial cases will make sense, even if one often initially doesn't think so. it commonly pays off to allow them then, even if they don't appear to be useful, at first sight) |
| 02:19:37 | → | shatriff joins (~vitaliish@protective.remission.volia.net) |
| 02:19:41 | × | anselmschueler quits (2e72278d@dynamic-046-114-039-141.46.114.pool.telefonica.de) (Client Quit) |
| 02:19:52 | <edwardk> | zzz: Data.Graph is pretty simple and if what you want can be done with it its perfectly fine. I had to roll my own version of a couple of its algorithms in the 'ad' package. There's several other graph libraries out there, each has a different flavor. I wrote one for a particular style of graph. https://hackage.haskell.org/package/fgl is probably the most robust |
| 02:20:07 | → | anselm-d-schuele joins (2e72278d@dynamic-046-114-039-141.46.114.pool.telefonica.de) |
| 02:20:17 | × | anselm-d-schuele quits (2e72278d@dynamic-046-114-039-141.46.114.pool.telefonica.de) (Client Quit) |
| 02:20:37 | → | anselmschueler joins (2e72278d@dynamic-046-114-039-141.46.114.pool.telefonica.de) |
| 02:20:40 | <edwardk> | zzz: hopefully the docs indicate intended scope. i dont think its possible to write one package that is one-size fits all for graphs, erwig's fgl library is the closest i know. |
| 02:21:56 | <edwardk> | minoru_shiraeesh: To your "use an array or something" point, Data.Vector does that and also gives you fast O(1) init/last, but it costs O(n) to snoc or cons. |
| 02:22:01 | <m_miro> | I'll to keep that in mind as I make more functions ski |
| 02:22:04 | × | Tops21 quits (~Tobias@dyndsl-095-033-094-064.ewe-ip-backbone.de) (Read error: Connection reset by peer) |
| 02:22:29 | <anselmschueler> | Hey, I have a question about linear types |
| 02:22:40 | <anselmschueler> | or, tangentially related to it |
| 02:22:54 | <edwardk> | you can steel-man it into an approach that uses a logarithmic number of arrays, flat arrays but that only gets you log time cons/index. which isn't actually any better than can be done without arrays |
| 02:23:00 | <edwardk> | anselmschueler: shoot |
| 02:23:08 | <ski> | m_miro : some very basic examples of this is `sum',`product',`and',`or' |
| 02:23:10 | <edwardk> | i've been obsessed about them this week =) |
| 02:23:26 | × | jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 240 seconds) |
| 02:23:26 | → | deviantfero joins (~deviantfe@190.150.27.58) |
| 02:23:38 | <anselmschueler> | I've recently watched SPJ's talk [https://www.youtube.com/watch?v=t0mhvd3-60Y](https://www.youtube.com/watch?v=t0mhvd3-60Y) |
| 02:23:55 | <anselmschueler> | oh shoot |
| 02:24:00 | <anselmschueler> | did I mess up the link format? |
| 02:24:10 | <anselmschueler> | is it [alt](url) or (url)[alt] |
| 02:24:11 | <dolio> | IRC is text. |
| 02:24:11 | <ski> | (it did look weird) |
| 02:24:12 | <edwardk> | all good |
| 02:24:17 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 256 seconds) |
| 02:24:25 | <edwardk> | irc is just text, so just link, we figured it out =) |
| 02:24:29 | <anselmschueler> | dolio I'm on freenode |
| 02:24:34 | <anselmschueler> | so they format the text |
| 02:24:43 | <ski> | we're all on Freenode, here |
| 02:24:57 | <anselmschueler> | can't you connect using a 3p IRC client |
| 02:25:02 | <ski> | (but many of us aren't using the Freenode webchat) |
| 02:25:24 | <edwardk> | anselmschueler: your q? |
| 02:25:51 | <anselmschueler> | So I've recently watched that talk, and I'm confused by "mutable arrays". They're mutable arrays *in the context of a state monad*, right? |
| 02:25:54 | <yushyin> | (freenode is the name of the irc network and there is no first-party client) |
| 02:26:22 | <anselmschueler> | 'cause all values are strictly immutable in Haskell, right? |
| 02:26:34 | <edwardk> | i can allocate a 'mutable array' and if you have the only reference to the evil mutable array, you can change it and give it back, rather than copy it with one element changed and give it back |
| 02:26:36 | <anselmschueler> | so the only way for mutability to arise is by some state management |
| 02:26:38 | <minoru_shiraeesh> | edwardk: thanks for clarification |
| 02:26:41 | <edwardk> | and nobody can care |
| 02:26:48 | <dolio> | If they're linear, then the same sort of API for an immutable array can be implemented by mutating. |
| 02:27:08 | <zzz> | thanks edwardk |
| 02:27:09 | ski | . o O ( unique ) |
| 02:27:24 | <anselmschueler> | how can I change it and give it back? or is this in the context of unsafe/impure FFI stuff? |
| 02:27:25 | <dolio> | Yeah, but SPJ isn't talking about uniqueness types. |
| 02:27:42 | <anselmschueler> | (I've never used the FFI) |
| 02:28:07 | <edwardk> | anselmschueler: linear-base does evil things behind the scenes but exposes a 'safe' Array type that does mutation, the same way that ST s provides 'safe' array operations that are mutable |
| 02:28:21 | <edwardk> | here instead of the quantifier for the ST s monad controlling access it is uniqueness of reference to the array |
| 02:28:26 | <dolio> | Actually, I guess the API would be slightly different, because reading would require yielding a new array. |
| 02:28:39 | <anselmschueler> | how does it do that? isn't that impossible in Haskell? |
| 02:29:01 | <edwardk> | alloc :: Int -> a -> (Array a %1 -> Ur b) %1 -> Ur b -- manufactures the array. |
| 02:29:07 | × | m_miro quits (4c4829bb@76.72.41.187) (Quit: Connection closed) |
| 02:29:29 | <edwardk> | set :: HasCallStack => Int -> a -> Array a %1 -> Array a |
| 02:29:33 | <edwardk> | notice the funny %1's |
| 02:29:39 | <edwardk> | that is the new superpower that linear haskell gives us |
| 02:29:43 | <anselmschueler> | OK I need to clarify: I'm not actually talking about linear types — that's just the context where I heard of this. |
| 02:29:43 | <anselmschueler> | I'm asking about *mutable arrays* |
| 02:29:57 | <anselmschueler> | what the hell are mutable arrays & how TF are they possible in haskell |
| 02:29:59 | <edwardk> | let's look at haskell's mutable array story |
| 02:30:00 | <ski> | are you asking about `IOArray'/`STArray' ? |
| 02:30:13 | <anselmschueler> | ski I don't know, I've never used them |
| 02:30:27 | <anselmschueler> | I just know that they apparently exist, from that takl |
| 02:30:30 | <anselmschueler> | *talk |
| 02:30:34 | <edwardk> | we have IOArray and STArray s, both of which are implemented on top of an MutableArray# primitive defined in GHC.Prim |
| 02:30:49 | <edwardk> | both of which expose an IO or ST s based API for working with them |
| 02:30:58 | <anselmschueler> | ok but how does MutableArray# work |
| 02:31:03 | <anselmschueler> | how can the array be mutable |
| 02:31:09 | <anselmschueler> | or is it a pointer to a mutable array |
| 02:31:12 | <edwardk> | ok, are you familiar with how IO is treated internally in haskell? |
| 02:31:18 | <anselmschueler> | nope, not at all! |
| 02:31:32 | <ski> | an `IOArray i e' is a reference (think "identifier"/"index"/"name") of a mutable array. the mutable array itself is kept (conceptually passed around), inside `IO' (not the `IOArray') |
| 02:31:33 | <edwardk> | MutableArray# is literally a direct pointer to a mutable object that lives on the heap and holds n elements of type a |
| 02:31:43 | <edwardk> | ok, let's squint under the hood of IO |
| 02:31:48 | → | pfurla joins (~pfurla@ool-182ed2e2.dyn.optonline.net) |
| 02:32:01 | <edwardk> | newtype IO a = IO { runIO :: State# RealWorld -> (# State# RealWorld, a #) } |
| 02:32:04 | <anselmschueler> | sorry if I'm being dumb btw |
| 02:32:05 | <edwardk> | that is scary loking stuff |
| 02:32:07 | <edwardk> | no worries |
| 02:32:12 | <edwardk> | we all have to find this stuff out somehow |
| 02:32:41 | <anselmschueler> | > newtype IO a = ... |
| 02:32:41 | <anselmschueler> | oh yeeah I saw that somewhere |
| 02:32:42 | <lambdabot> | <hint>:1:1: error: |
| 02:32:42 | <lambdabot> | <hint>:1:1: error: parse error on input ‘newtype’ |
| 02:32:48 | <edwardk> | What is a State# RealWorld? well, that is a token representing 'passing the universe'. |
| 02:32:48 | <ski> | conceptually, an `IOArray i e' is like an array index, or a `Map' key. it doesn't itself contain the data. it only allows you to access the data, when you're separately provided with it (under the covers of `IO', conceptually) |
| 02:33:04 | <edwardk> | an operation takes a state of the real world, and gives back an updated real world, and a value of type a. |
| 02:33:08 | <edwardk> | this looks a lot like the state monad |
| 02:33:18 | <anselmschueler> | `(# a, b #)` is an unboxed tuple right? |
| 02:33:21 | <edwardk> | the (# #) rather than ( ) for the tuple says that is an unboxed tuple |
| 02:33:21 | <edwardk> | yeah |
| 02:33:27 | × | gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
| 02:33:46 | → | gzj joins (~gzj@unaffiliated/gzj) |
| 02:33:56 | <edwardk> | that is a pair of things, rather than a pointer to a heap object that is a pair of things liek the usual (). State# isn't in kind Type, so you can't pass it directly in a normal (,) |
| 02:34:16 | <edwardk> | State# s takes zero bytes to store |
| 02:34:31 | <edwardk> | its just a kind of formal tag that shows up in the type |
| 02:34:39 | <ski> | (you could think of `State# RealWorld' as including a `Map' from `IOArray's (and `IORef's) to the actual corresponding values. update corresponds to replacing that conceptual `Map' with a new one. of course, the implementation actually uses update-in-place to perform this, since it knows it's passed the unique reference to `State# RealWorld') |
| 02:34:42 | <edwardk> | and there's a couple of rules in the compiler that keep operations from floating out past the token |
| 02:34:51 | <anselmschueler> | so why is it State# RealWorld instead of RealWorld |
| 02:35:05 | <edwardk> | because ST s is the same thing generalized a tiny bit |
| 02:35:21 | <edwardk> | newtype ST s = ST { unST :: State# s -> (# State# s, a #) } |
| 02:35:23 | <edwardk> | and er |
| 02:35:27 | <edwardk> | newtype ST s a = ST { unST :: State# s -> (# State# s, a #) } |
| 02:35:30 | → | Lord_of_Life_ joins (~Lord@unaffiliated/lord-of-life/x-0885362) |
| 02:35:32 | <anselmschueler> | ski but wouldn't a comprehensive IO monad need to include OS system calls and the like |
| 02:35:40 | <ski> | anselmschueler : yes, sure |
| 02:35:46 | <edwardk> | and we want 's' there to have kind Type |
| 02:35:48 | <edwardk> | but if that was |
| 02:35:51 | <ski> | we're only talking about the local mutable memory aspect, here |
| 02:35:57 | <anselmschueler> | ok |
| 02:35:57 | × | Lord_of_Life quits (~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 264 seconds) |
| 02:36:00 | <ski> | (local to the process) |
| 02:36:01 | × | polyrain quits (~polyrain@2001:8003:e4d8:4101:d50e:d40d:4648:6ec) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 02:36:07 | <edwardk> | newtype ST s a = ST { unST :: s -> (# s, a #) } -- then that Type would be a real heap object doing nothing and we reinvented the state monad |
| 02:36:16 | <edwardk> | i want to pass a 0-byte 'tag' around, not a real object. |
| 02:36:29 | → | stree joins (~stree@68.36.8.116) |
| 02:36:30 | <anselmschueler> | ok |
| 02:36:40 | <edwardk> | now internally haskell can FFI out to C or whatever, or maybe do mutable operations and those operations are tagged by passing around State# tokens |
| 02:36:54 | Lord_of_Life_ | is now known as Lord_of_Life |
| 02:37:10 | <edwardk> | e.g. IORef exists and is a pointer-like thing |
| 02:37:12 | <edwardk> | internally |
| 02:37:16 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:7ce7:fe06:1dad:4fcd) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 02:37:33 | <edwardk> | data IORef a = IORef (MutVar# RealWorld a) |
| 02:37:39 | <anselmschueler> | sorry for going off-topic, but I'm intrigued by that leave message by polyraid — how do you customize the leave message |
| 02:37:39 | <edwardk> | and to make one internally we have |
| 02:37:51 | <anselmschueler> | sorry |
| 02:37:56 | <edwardk> | newMutVar# :: a -> State# d -> (# State# d, MutVar# d a #) |
| 02:38:09 | <edwardk> | readMutVar# :: MutVar# d a -> State# d -> (# State# d, a #) |
| 02:38:15 | <ski> | edwardk : would `type Lev a = (# #) -> a' work, btw ? |
| 02:38:18 | <edwardk> | writeMutVar# :: MutVar# d a -> a -> State# d -> State# d |
| 02:38:28 | <edwardk> | ski: the user would see the -> then |
| 02:38:34 | <ski> | yes |
| 02:38:46 | <ski> | but apart from that inconvenience ? |
| 02:38:48 | <edwardk> | with (()~()) => i have some hope the compiler can erase that to 0-width ~#'s |
| 02:38:57 | × | pfurla quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 264 seconds) |
| 02:39:06 | <edwardk> | yes |
| 02:39:15 | <anselmschueler> | ok I think I understand — it's because the compiler is doing impure stuff under the hood |
| 02:39:22 | <edwardk> | and i STILL want CONSTRAINT r for r :: RuntimeRep ;) |
| 02:39:48 | <edwardk> | anselmschueler: we package this up in away that 99% of the users never see this secret State# passing stuff |
| 02:39:50 | <anselmschueler> | so by the time something gets evaluated, the mutable array from which the array was created may have been changed, which is what the linear types want to prevent |
| 02:40:13 | <anselmschueler> | correct? |
| 02:40:24 | <edwardk> | runST :: (forall s. ST s a) -> a -- is another 'safe' way to manufacture and temporarily use a State# token. |
| 02:40:36 | <edwardk> | it feeds a fresh one in the the ST s computation, runs and disposes of it |
| 02:40:58 | <edwardk> | and all the STArray stuff is tagged with that token and doesn't give you operations for dereferencing it without access to that token |
| 02:41:03 | <edwardk> | so its safe to use in pure code |
| 02:41:13 | <ski> | anselmschueler : anyway, i stress thinking of a value of type `IOArray i e'/`STArray s i e' or `IORef a'/`STRef s a' as an index, to emphasize that, conceptually, this value does *not* contain the value in the mutable box (anymore than an `Int' index into `[a]' or `IntMap a' or `Map Int a' contains the `a' value). this also explains why we have `Eq (IORef a)', not requiring `Eq a'. it's conceptually |
| 02:41:19 | <ski> | "comparing indices" |
| 02:41:27 | → | guest222 joins (~user@49.5.6.87) |
| 02:41:28 | <edwardk> | the goal of linear types here is to provide a third way to guarantee its okay to use the array. |
| 02:41:37 | <zzz> | fgl is great. |
| 02:41:39 | ski | nods to edwardk |
| 02:42:15 | → | chibi joins (~chibi@75-26-238-119.lightspeed.glvwil.sbcglobal.net) |
| 02:42:19 | <chibi> | yello |
| 02:42:23 | <anselmschueler> | and the reason the array might not be ok is that it's not a pure value and by the time something gets *evaluated* using the immutable array based on it it might've been modified? |
| 02:42:23 | → | star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) |
| 02:42:45 | <edwardk> | which is that you can know that you have the only reference to the array, and so you can think of that as bundling the array and the State# you are supposed to thread through your program. internally, morally the State# s is a 'linear' object. it shouldn't be able to be copied. (unsafeInterleaveIO being a notable unsafe operation that does so) |
| 02:43:01 | <ski> | anselmschueler : for `runST', conceptually, `State# s' will be a tuple or record containing all the cells that we will allocate with `newSTRef' & `newSTArray', in that state thread |
| 02:43:05 | <chibi> | When is it better to use Reader r a instead of just having a function r -> a? |
| 02:43:10 | <edwardk> | so linear-base is relying on the same sort of safety condition that we usually get by packing up the State# in the monad |
| 02:43:31 | <anselmschueler> | zzz: what's fgl |
| 02:43:52 | <edwardk> | chibi: when you might switch to ReaderT later? maybe. really no reason otherwise. |
| 02:43:56 | <ski> | chibi : when you want to slap some other monad transformer on top of `Reader r' ? |
| 02:44:07 | <edwardk> | chibi: oh and you want to force your user to think about that argument as special and use 'ask' to access it rather than just take another arg. |
| 02:44:21 | <chibi> | Hm...I understand how monad transformers work, but I never seem to know when to use them. |
| 02:44:26 | <edwardk> | zzz: martin erwig's functional graph library, they asked for a suggestion about graphs earlier. |
| 02:44:36 | <chibi> | Like, what are the advantages of using a monad stack in general? |
| 02:44:42 | <anselmschueler> | ok so is the following correct: "the reason the array might not be ok is that it's not a pure value and by the time something gets *evaluated* using the immutable array based on it it might've been modified" |
| 02:44:47 | <anselmschueler> | ? |
| 02:45:06 | <dolio> | Sometimes it's nice to not have to thread the argument through a bunch of functions. |
| 02:45:30 | <edwardk> | chibi: i wrote a large application, now i want to thread a tiny piece of additional state through the application. do i rewrite _every function signature_ even the ones that don't use that bit of state? or do i write the functions parameterized on what they need? |
| 02:45:38 | <edwardk> | instead of locking in an exact signature i can work with |
| 02:45:45 | → | carlomagno joins (~cararell@148.87.23.9) |
| 02:46:01 | <edwardk> | foo :: (MonadState s m, MonadReader e m) => m MyResult |
| 02:46:18 | <edwardk> | and if some other bit of code needs an exception handling it picks up the constraint and adds it to the bag of things on the left of the => |
| 02:46:29 | <ski> | anselmschueler : i think you should try to separate the conceptual semantics of it, from the "accidental" optimization of implementing it by "update-in-place" |
| 02:46:36 | <edwardk> | when you're done you dispatch that stuff by peeling off monad transformers |
| 02:47:01 | <chibi> | So you just change your monad stack synonymn type instead of the individual signatures or? |
| 02:47:06 | → | aarvar joins (~foewfoiew@2601:602:a080:fa0:394a:95d6:26a0:dc43) |
| 02:47:13 | → | mehwork joins (~mehwork@98.185.199.35.bc.googleusercontent.com) |
| 02:47:38 | <anselmschueler> | ski I don't understand |
| 02:47:39 | × | viluon quits (uid453725@gateway/web/irccloud.com/x-vfqtytiryjprhruz) (Quit: Connection closed for inactivity) |
| 02:47:40 | <edwardk> | anselmschueler: in the backend GHC has MutableArray# s a and Array# a -- Array# is designed so you can access it purely. indexing operations can be used by normal code. MutableArray# is designed so that folks can read or write to the array. |
| 02:47:53 | <ski> | anselmschueler : conceptually, you have different versions of state values, that're threaded along the computation, under the covers, just as with regular `State' |
| 02:48:04 | <edwardk> | anselmschueler: when you are done with the mutable use of the array you 'freeze' it and produce an array# which can be used from pure code |
| 02:48:13 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:15cd:c67f:11dd:b9fc) |
| 02:48:29 | × | justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) (Quit: WeeChat 3.0) |
| 02:48:40 | <edwardk> | a typical array construction procedure is to use the ST s monad to build an STArray s a freeze that to get an Array a and it looks like pure code build a big flat slab of memory with stuff in it |
| 02:48:43 | <anselmschueler> | ok - and MutableArray# is not a pure Haskell value, right? |
| 02:48:50 | → | wei2912 joins (~wei2912@unaffiliated/wei2912) |
| 02:48:56 | × | oisdk quits (~oisdk@2001:bb6:3329:d100:c73:1525:4623:7479) (Quit: oisdk) |
| 02:49:38 | <Axman6> | I'm not sure how one would answer that |
| 02:49:52 | × | xcmw quits (~textual@dyn-72-33-2-47.uwnet.wisc.edu) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 02:49:56 | <edwardk> | a MutableArray# has well defined operations on it but its implemented by the runtime system. if you stick to the operations in GHC.Prim and never duplicate a State# s (and don't access out of bounds) then everything you can do with a MutableArray# is safe, even if internally its implemented by scribbling into a slab of memory |
| 02:49:58 | <ski> | anselmschueler : now, what `ST' (and corresponding `IO' operations) gives you, apart from what you could implement with that in Haskell (disregarding efficiency) is being able to have both (a) dynamic allocation of new pieces of state; and (b) allow the types of the pieces of states to be arbitrary (not all necessarily the same) |
| 02:50:03 | → | nhs joins (~nhs@c-67-180-177-103.hsd1.ca.comcast.net) |
| 02:50:24 | <anselmschueler> | I think I understand sorta |
| 02:50:44 | <minoru_shiraeesh> | in haskell you can create islands of purity in impure sea, and you can create islands of impurity in a sea of purity |
| 02:50:45 | <edwardk> | but the fundamental 'workflow' around it is that of imperatively banging values into it. |
| 02:51:00 | <edwardk> | just like IORef is mutable, but the mutation is guarded by State# s passing. |
| 02:51:19 | → | redcherri joins (bab702c9@186.183.2.201) |
| 02:51:38 | <edwardk> | linear types just give us another way to pass that State# safety guarantee along than hiding it in a monad away from prying eyes |
| 02:52:01 | <ski> | anselmschueler : you could easily implement `newStringRef :: String -> StringState StringRef' where `StringState = State [String]' and `StringRef = Int', and then also `readStringRef :: StringRef -> StringState String',`writeStringRef :: StringRef -> String -> StringState ()' |
| 02:52:17 | <edwardk> | as a general rule of thumb you can use a monad to sneak around _one_ linear resource by hiding it from outside eyes. in haskell we choose that one resource to be State# s in IO and ST s. |
| 02:52:37 | → | pfurla joins (~pfurla@ool-182ed2e2.dyn.optonline.net) |
| 02:52:38 | <anselmschueler> | ok |
| 02:52:45 | <edwardk> | basically it morally is passing the heap around and state of user interaction (its not quite exactly that when you get multiple threads involved, but it is the moral equivalent) |
| 02:52:47 | <Axman6> | minoru_shiraeesh: and with ST, you can sometimes prove those islands of impurity are referentially transparant and therefore actually pure, even if internally they are implemented with mutation |
| 02:53:07 | <zzz> | i wish there was lazy Natural type already, that would collapse it's value into a binary unsigned "behind the scenes" int whenever it was needed but kept it's Succ(Succ(...Zero) purely functional nature |
| 02:53:28 | <edwardk> | linear haskell lets you start passing around more than one linear resource at a time in a more fine-grained fashion than the monad-for-managing-a-single-linear-resource pattern can offer. |
| 02:53:58 | <guest222> | what an action would do in a do-notaion? x :: Maybe Int = do { Just 3; y <- Just 5 } what this Just 3 is doing here? |
| 02:54:02 | <ski> | anselmschueler : but you want to be able to have references to boxes containing values of arbitrary types, selected by the user in each case. afaik, that can't be implemented in Haskell itself (i guess one may be able to do it, with a `Typeable' constraint, but without that, i dunno how it could work) |
| 02:54:16 | × | nhs quits (~nhs@c-67-180-177-103.hsd1.ca.comcast.net) (Ping timeout: 240 seconds) |
| 02:54:48 | <ski> | anselmschueler : the second thing that `ST' gives here, is the update-in-place "optimization", which is warranted by the state versions being threaded around being unique |
| 02:54:53 | <edwardk> | ST gives us an escape hatch to locally use mutation to make things with references/arrays in otherwise pure code. manufacturing a fresh State# then throwing it away when its done so that you don't need to worry about folks mutating anything outside of a single linear control flow path that is done and frozen when you come out of runST. |
| 02:55:16 | <ski> | (note that linear is not the same as unique, though) |
| 02:55:19 | <edwardk> | IO doesn't have to 'end' because the State# token is 'god given' to you at the start of main and you just pass it around your program. |
| 02:55:22 | × | hexfive quits (~hexfive@50.35.83.177) (Ping timeout: 260 seconds) |
| 02:55:24 | <Axman6> | zzz: why not data Nat = Zero | One | ZeroBit Nat | OneBit) Nat? I just saved you so much memory! |
| 02:55:30 | <edwardk> | (ignoring unsafePerformIO shenanigans) |
| 02:55:40 | ski | . o O ( `Start :: *World -> *World' ) |
| 02:55:53 | <Axman6> | s/)// |
| 02:56:35 | <edwardk> | Axman6: now you need to quotient by OneBit One = One and ZeroBit Zero = Zero |
| 02:56:35 | → | drbean joins (~drbean@TC210-63-209-191.static.apol.com.tw) |
| 02:56:39 | <ski> | guest222 : do you know how `do'-notation is desugared into `>>=' and `>>' ? |
| 02:56:42 | <Axman6> | guest222: it's not really doing anything, but if it were instead Nothing, then the result would be Nothing |
| 02:56:43 | <guest222> | main = do { print "1"; print "2" } |
| 02:56:54 | <guest222> | ski: yes |
| 02:57:06 | <ski> | guest222 : then go look up how those two work, for `Maybe' ? |
| 02:57:10 | <edwardk> | Axman6: either by using pattern synonyms or making a more complicated data type to maintain the invariants |
| 02:57:15 | <Axman6> | try desugaring that expression and the evaluating it |
| 02:57:24 | <ski> | @src Maybe (>>=) |
| 02:57:24 | <lambdabot> | (Just x) >>= k = k x |
| 02:57:24 | <lambdabot> | Nothing >>= _ = Nothing |
| 02:57:35 | <anselmschueler> | goodbye |
| 02:57:37 | × | anselmschueler quits (2e72278d@dynamic-046-114-039-141.46.114.pool.telefonica.de) (Quit: Connection closed) |
| 02:58:03 | <Axman6> | OneBit One would just be 3, but you're right, ZeroBit Zero is lame |
| 02:58:25 | <edwardk> | Axman6: i assumed One was an infinite tail of ones |
| 02:58:39 | <edwardk> | that gives you infinite precision 2s complement arithmetic |
| 02:58:44 | <Axman6> | data Nat = Null | ZeroBit Nat | OneBit Nat -- fixed! |
| 02:59:17 | <edwardk> | 0 = Null = ZerBit Null |
| 02:59:34 | <edwardk> | use zeroless binary |
| 02:59:52 | <edwardk> | data Nat = Zero | One Nat | Two Nat |
| 03:00:13 | <edwardk> | where digits are still worth 2 * the previous digit and your binary numbers have 1s and 2s in each place and an infinite tail of 0s |
| 03:00:13 | <Axman6> | nal, Null = NaN >_> |
| 03:00:15 | <edwardk> | THAT is fixed |
| 03:00:25 | ski | . o O ( <https://lambdacats.github.io/fixed-in-head.jpg> ) |
| 03:00:56 | <edwardk> | Axman6: the above is a well defined number scheme |
| 03:00:59 | <Axman6> | edwardk: I seem to remember this being an important part of your talk on cache oblivious maps at LJ many years ago |
| 03:01:21 | <edwardk> | cache oblivious maps used 2s and 3s, and 1 only as the most significant non-0 |
| 03:01:32 | <edwardk> | and the same infinite tail of 0s |
| 03:01:51 | <edwardk> | also unique but folks tend not to think of binary as numbers made out of 2s and 3s for some reason. crazy i know. |
| 03:02:01 | <edwardk> | 0,1,2,3 -- is clearly binary |
| 03:02:03 | <Axman6> | yeah, crazy |
| 03:02:16 | → | toorevitimirp joins (~tooreviti@117.182.181.253) |
| 03:02:16 | × | gentauro quits (~gentauro@unaffiliated/gentauro) (Read error: Connection reset by peer) |
| 03:02:24 | → | Stanley00 joins (~stanley00@unaffiliated/stanley00) |
| 03:02:39 | <edwardk> | 0,1,2,3,12,13,22,23,32,33... |
| 03:02:54 | <edwardk> | every number is uniquely represented under those constraints |
| 03:03:10 | → | gentauro joins (~gentauro@unaffiliated/gentauro) |
| 03:03:16 | <edwardk> | *natural |
| 03:03:19 | <Axman6> | does addition look weird? |
| 03:03:29 | <edwardk> | don't need addition. need cheap 'succ' |
| 03:03:42 | <edwardk> | addition is left as an exercise for the reader. |
| 03:04:01 | <Axman6> | just curious if adding them is particularly difficult, I'm buessing probably not that hard |
| 03:04:08 | <Axman6> | guessing* |
| 03:04:09 | <edwardk> | compared to skew binary its easy |
| 03:04:45 | <edwardk> | and yeah its easy, you just have larger ranges of carry options |
| 03:05:36 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds) |
| 03:05:55 | <edwardk> | 3+3 can overflow what can be represented in a digit by up to 3 in a half-adder, and in a full adder you now have a slightly wider range still |
| 03:06:15 | <edwardk> | compared to carry being 0 or 1 in normal binary |
| 03:06:56 | <guest222> | what this return doing in "C.runContT (sequence_ contArr) return" https://paste.ubuntu.com/p/YzBvBhbfJM/ |
| 03:07:14 | <Axman6> | it's the continuation that is being passed in |
| 03:07:17 | <Axman6> | :t runCont |
| 03:07:18 | <lambdabot> | Cont r a -> (a -> r) -> r |
| 03:07:27 | <ski> | guest222 : `evalContT act = runContT act return' |
| 03:07:27 | <edwardk> | :t runContT |
| 03:07:28 | <lambdabot> | forall k (r :: k) (m :: k -> *) a. ContT r m a -> (a -> m r) -> m r |
| 03:07:37 | <ski> | @let evalContT act = runContT act return |
| 03:07:38 | <lambdabot> | .L.hs:184:1: error: |
| 03:07:38 | <lambdabot> | Multiple declarations of ‘evalContT’ |
| 03:07:38 | <lambdabot> | Declared at: .L.hs:182:1 |
| 03:07:38 | <Axman6> | it's the a -> r, with type a -> m a |
| 03:07:44 | <ski> | @type evalContT |
| 03:07:45 | <lambdabot> | Applicative i => ContT o i o -> i o |
| 03:07:53 | <ski> | oh, it was lingering |
| 03:08:01 | <Axman6> | (sorry, missed the T, but it's essentially the same thing) |
| 03:08:06 | × | gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
| 03:08:12 | <ski> | (similarly, `evalCont act = runCont act id') |
| 03:08:26 | → | gzj joins (~gzj@unaffiliated/gzj) |
| 03:08:30 | × | urodna quits (~urodna@unaffiliated/urodna) (Quit: urodna) |
| 03:09:05 | → | nullniv40 joins (~null@unaffiliated/nullniverse) |
| 03:09:28 | <ski> | guest222 : the most common continuation you want to provide, when running an action in `Cont o'/`ContT o m', is the trivial one, being `id' alt. `pure'/`return' |
| 03:09:38 | <guest222> | runCont (cont $ \k -> k 3) id == 3, this I understand, runCont (cont $ \k -> k 3) would extract \k -> k 3 from it, but what "return " ? |
| 03:10:03 | <ski> | `return' is for the `ContT' version |
| 03:10:25 | <guest222> | ski oh, like "id" in Cont? |
| 03:10:27 | <Axman6> | you just end up with "return 3", as before you had "id 3" |
| 03:10:30 | <ski> | guest222 : yes |
| 03:11:02 | × | ezrakilty quits (~ezrakilty@97-113-55-149.tukw.qwest.net) (Remote host closed the connection) |
| 03:12:10 | × | nullniverse quits (~null@unaffiliated/nullniverse) (Ping timeout: 260 seconds) |
| 03:15:23 | <zzz> | edwardk: Axman6: i'm interested. any chance of a link to the lambdajam talk? |
| 03:16:21 | × | elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 246 seconds) |
| 03:16:49 | <Axman6> | I think it was https://www.youtube.com/watch?v=WE2a90Bov0Q |
| 03:17:44 | → | xcmw joins (~textual@dyn-72-33-2-47.uwnet.wisc.edu) |
| 03:19:05 | <zzz> | awesome thanks |
| 03:19:37 | <chibi> | Crap, GHC almost crashed my computer. Is it normal for cabal-install to impart a massive amount of load while compiling packages? |
| 03:20:08 | <yushyin> | yup |
| 03:20:22 | <Axman6> | Man, I don't understand people. "Look how hard it is to understand monads in Haskell" "Look at this implementation of monadic flat_map in Rust" *proceeds to spew crazy amounts of opaque code*. https://www.eltonpinto.me/blog/posts/implementing_flatmap_in_rust/ |
| 03:20:39 | <yushyin> | also lots of RAM usage |
| 03:20:43 | <Axman6> | chibi: compilers gonna compile |
| 03:21:58 | → | nhs joins (~nhs@c-67-180-177-103.hsd1.ca.comcast.net) |
| 03:22:54 | → | FinnElija joins (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) |
| 03:22:54 | finn_elija | is now known as Guest72233 |
| 03:22:54 | FinnElija | is now known as finn_elija |
| 03:23:42 | <chibi> | Ha yeah, but it'd rather it take a little longer in exchange for not choking my computer to the point of being unable to kill it while compiling--is there a way to limit the CPU/RAM usage rate on GHC? |
| 03:24:04 | <Axman6> | you can probably tell it not to compile things in parallel |
| 03:24:57 | <falsifian> | chibi: If you'd prefer ghc to die before it can get to that point and you're using something unix-like, you could look into the ulimit command. |
| 03:25:13 | → | hongminhee joins (~dahlia@207.148.91.209) |
| 03:25:35 | <yushyin> | cgroups can help you with that, if you are on linux |
| 03:25:56 | × | nhs quits (~nhs@c-67-180-177-103.hsd1.ca.comcast.net) (Ping timeout: 240 seconds) |
| 03:26:08 | → | poscat joins (~poscat@2408:8207:4825:b3e0::1) |
| 03:26:15 | × | Guest72233 quits (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) (Ping timeout: 268 seconds) |
| 03:26:25 | <chibi> | I'll look into those, thanks |
| 03:26:43 | → | plutoniix joins (~q@ppp-124-121-236-209.revip2.asianet.co.th) |
| 03:26:56 | ← | redcherri parts (bab702c9@186.183.2.201) () |
| 03:27:53 | <yushyin> | you can limit cpu shares and memory usage, pretty nifty |
| 03:28:02 | <Axman6> | you can use -j 1 to make it one only a single CPU |
| 03:28:15 | <Axman6> | https://cabal.readthedocs.io/en/3.4/cabal-project.html?highlight=parallel#cfg-field-jobs |
| 03:28:26 | × | aarvar quits (~foewfoiew@2601:602:a080:fa0:394a:95d6:26a0:dc43) (Ping timeout: 240 seconds) |
| 03:31:45 | <guest222> | x == 3 is ok, what about x == id? |
| 03:32:16 | <Axman6> | I don't understand the question |
| 03:32:38 | <guest222> | x = 3; x == 3 return a Bool, right? |
| 03:32:50 | <guest222> | x = id; x == id? |
| 03:33:17 | <zzz> | guest222 id is a function and functions are opaque. you cant test for equality |
| 03:33:30 | <guest222> | zzz: ok |
| 03:35:03 | → | nhs joins (~nhs@c-67-180-177-103.hsd1.ca.comcast.net) |
| 03:37:04 | <zzz> | guest222: deciding if 2 functions are equal without testing all possible inputs is solving the halting problem |
| 03:37:33 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 03:37:46 | <ski> | @where impossible |
| 03:37:46 | <lambdabot> | <http://math.andrej.com/2007/09/28/seemingly-impossible-functional-programs/>,<http://math.andrej.com/2008/11/21/a-haskell-monad-for-infinite-search-in-finite-time/> |
| 03:38:33 | <ski> | @quote things.are.possible |
| 03:38:33 | <lambdabot> | autrijus says: Perl: "Easy things are easy, hard things are possible" <autrijus> Haskell: "Hard things are easy, the impossible just happened" |
| 03:39:38 | × | nhs quits (~nhs@c-67-180-177-103.hsd1.ca.comcast.net) (Ping timeout: 256 seconds) |
| 03:39:43 | × | alx741 quits (~alx741@186.178.109.47) (Quit: alx741) |
| 03:42:08 | <zzz> | oh man, I was just about to go sleep |
| 03:42:10 | <zzz> | oh well |
| 03:42:38 | → | lambda-11235 joins (~lambda-11@2600:1700:7c70:4600:305f:2287:bde6:feb9) |
| 03:43:49 | → | ezrakilty joins (~ezrakilty@97-113-55-149.tukw.qwest.net) |
| 03:44:10 | × | Tario quits (~Tario@201.192.165.173) (Ping timeout: 256 seconds) |
| 03:45:38 | <guest222> | so not all the values can be compared? |
| 03:48:33 | × | ezrakilty quits (~ezrakilty@97-113-55-149.tukw.qwest.net) (Ping timeout: 264 seconds) |
| 03:49:29 | → | hexfive joins (~hexfive@50.35.83.177) |
| 03:50:07 | × | mp___ quits (mp@hell.cx) (Remote host closed the connection) |
| 03:50:09 | → | juri_ joins (~juri@178.63.35.222) |
| 03:50:34 | × | Narinas quits (~Narinas@189.223.59.23.dsl.dyn.telnor.net) (Read error: Connection reset by peer) |
| 03:50:43 | → | Narinas joins (~Narinas@189.223.59.23.dsl.dyn.telnor.net) |
| 03:53:55 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:15cd:c67f:11dd:b9fc) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 03:54:33 | × | theDon quits (~td@94.134.91.187) (Ping timeout: 264 seconds) |
| 03:55:42 | × | ddellacosta quits (~ddellacos@86.106.143.111) (Remote host closed the connection) |
| 03:55:57 | → | theDon joins (~td@94.134.91.35) |
| 03:56:03 | <zzz> | in Haskell, you get the (==) operator from the Eq class |
| 03:56:28 | <zzz> | so only types that have Eq instances are comparable |
| 03:56:41 | → | polyrain joins (~polyrain@2001:8003:e4d8:4101:d50e:d40d:4648:6ec) |
| 04:00:05 | <zzz> | @type (==) |
| 04:00:06 | <lambdabot> | Eq a => a -> a -> Bool |
| 04:00:56 | × | darjeeling_ quits (~darjeelin@122.245.217.214) (Ping timeout: 240 seconds) |
| 04:02:21 | → | mp___ joins (mp@hell.cx) |
| 04:03:37 | <guest222> | a ~ (b->b) |
| 04:03:45 | × | aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Ping timeout: 272 seconds) |
| 04:04:28 | × | polyrain quits (~polyrain@2001:8003:e4d8:4101:d50e:d40d:4648:6ec) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 04:07:58 | × | nullniv40 quits (~null@unaffiliated/nullniverse) (Remote host closed the connection) |
| 04:08:09 | <zzz> | (Eq a =>) is a contraint,it means that a has to belong to the Eq class |
| 04:08:11 | × | hekkaidekapus[ quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 268 seconds) |
| 04:08:35 | <zzz> | ((->) a b) , or (a -> b) does not |
| 04:10:52 | <chibi> | What *is* the ((->) a) data type? |
| 04:11:11 | <chibi> | I've seen it mentioned in relation to pointfree code but I don't understand it at all |
| 04:11:12 | <c_wraith> | the type of functions from a to missing |
| 04:11:16 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 04:11:25 | <c_wraith> | Like.. You know how Either a still has a missing type variable? |
| 04:11:37 | <c_wraith> | ((->) a) is functions with a missing argument |
| 04:14:43 | <chibi> | Yo...wait. |
| 04:14:51 | chibi | 's brain has undergone meltdown |
| 04:15:02 | <c_wraith> | So, (->) is usually infix |
| 04:15:06 | <c_wraith> | like a -> b |
| 04:15:10 | <zzz> | yes |
| 04:15:23 | <zzz> | but it's really (->) a b |
| 04:15:26 | <c_wraith> | but you can also write it in parens, prefix, like any other operator. Like ((->) a b) |
| 04:15:39 | <chibi> | And you can have it missing too? |
| 04:15:46 | <zzz> | yes |
| 04:15:56 | <c_wraith> | Sure. You can't have values of an incomplete type |
| 04:16:02 | <c_wraith> | But you can talk about it. |
| 04:16:14 | → | dyeplexer joins (~lol@unaffiliated/terpin) |
| 04:16:30 | <zzz> | all functions are unary, and constructors are functions |
| 04:16:41 | <zzz> | (asterisk) |
| 04:16:44 | <c_wraith> | This is that whole "higher-kinded types" thing |
| 04:17:37 | → | darjeeling_ joins (~darjeelin@122.245.217.214) |
| 04:18:19 | <chibi> | What kind does that give ((->) a)? * -> (* -> *) ? |
| 04:18:33 | <c_wraith> | yes |
| 04:18:37 | × | ep1ctetus quits (~epictetus@ip72-194-215-136.sb.sd.cox.net) (Read error: Connection reset by peer) |
| 04:18:50 | <zzz> | however beware, (->) is a special type in Haskell and while useful to think about it as just another type, the implementation disguises a white lie (as almost eveything in Haskell ;) |
| 04:19:30 | <c_wraith> | They moved all of the complexity regarding (->) into a mechanism that doesn't show up in kinds anymore. |
| 04:19:39 | <c_wraith> | That whole "levity polymorphism" thing |
| 04:20:04 | <zzz> | @kind (->) |
| 04:20:06 | <lambdabot> | * -> * -> * |
| 04:20:11 | <zzz> | @kind (->) Bool |
| 04:20:12 | <lambdabot> | * -> * |
| 04:20:44 | <zzz> | @kind (Bool -> Bool) |
| 04:20:45 | <lambdabot> | * |
| 04:22:04 | <chibi> | Ahah, knowing the kind signature makes it much more clearer. Man, currying kinds. Super weird. Thanks for the explanation, and I'll keep the implementation trickery in mind if I ever use it |
| 04:22:15 | <chibi> | I don't exactly plan to but hey, the more you know |
| 04:26:36 | → | bitmapper joins (uid464869@gateway/web/irccloud.com/x-ashwoxwvsstlgotp) |
| 04:30:43 | × | hexfive quits (~hexfive@50.35.83.177) (Read error: Connection reset by peer) |
| 04:31:08 | → | hexfive joins (~hexfive@50.35.83.177) |
| 04:35:41 | → | hekkaidekapus[ joins (~tchouri@gateway/tor-sasl/hekkaidekapus) |
| 04:36:59 | × | ArsenArsen quits (~Arsen@fsf/member/ArsenArsen) (Quit: bye) |
| 04:40:40 | → | forgottenone joins (~forgotten@176.42.28.68) |
| 04:41:18 | × | darjeeling_ quits (~darjeelin@122.245.217.214) (Ping timeout: 260 seconds) |
| 04:42:29 | → | Saukk joins (~Saukk@83-148-239-3.dynamic.lounea.fi) |
| 04:42:43 | × | hekkaidekapus[ quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 268 seconds) |
| 04:43:06 | × | jedws quits (~jedws@101.184.202.248) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 04:44:27 | → | darjeeling_ joins (~darjeelin@122.245.217.214) |
| 04:44:34 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 260 seconds) |
| 04:45:48 | → | hekkaidekapus[ joins (~tchouri@gateway/tor-sasl/hekkaidekapus) |
| 04:45:57 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@184.22.159.161) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 04:46:04 | → | jedws joins (~jedws@101.184.202.248) |
| 04:47:50 | × | machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 260 seconds) |
| 04:50:40 | × | mirrorbird quits (~psutcliff@2a00:801:446:6dfc:fadb:e310:6ed2:16d) (Quit: Leaving) |
| 04:50:41 | × | Narinas quits (~Narinas@189.223.59.23.dsl.dyn.telnor.net) (Read error: Connection reset by peer) |
| 04:51:38 | → | Narinas joins (~Narinas@189.223.59.23.dsl.dyn.telnor.net) |
| 04:51:44 | <edwardk> | secretly there is a FUN :: Multiplicity -> TYPE r -> TYPE s -> Type and (->) = FUN 'Many and the next two arguments default to TYPE 'LiftedRep = Type for most uses. |
| 04:52:24 | <edwardk> | this allows -> to accept/return types of unlifted kinds as well as the usual lifted stuff you are used to |
| 04:53:26 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-4-36.w83-200.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 04:57:20 | → | stree joins (~stree@68.36.8.116) |
| 04:59:46 | × | quinn quits (~quinn@c-73-223-224-163.hsd1.ca.comcast.net) (Quit: ZNC 1.8.1 - https://znc.in) |
| 05:00:40 | × | minoru_shiraeesh quits (~shiraeesh@109.166.57.22) (Ping timeout: 265 seconds) |
| 05:04:19 | × | xcmw quits (~textual@dyn-72-33-2-47.uwnet.wisc.edu) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 05:06:35 | → | quinn joins (~quinn@c-73-223-224-163.hsd1.ca.comcast.net) |
| 05:06:53 | → | ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 05:11:04 | → | olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber) |
| 05:12:15 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 272 seconds) |
| 05:13:34 | → | gioyik_ joins (~gioyik@gateway/tor-sasl/gioyik) |
| 05:14:53 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:15cd:c67f:11dd:b9fc) |
| 05:15:08 | → | xcmw joins (~textual@dyn-72-33-2-47.uwnet.wisc.edu) |
| 05:16:01 | × | gioyik quits (~gioyik@gateway/tor-sasl/gioyik) (Ping timeout: 268 seconds) |
| 05:20:35 | × | forgottenone quits (~forgotten@176.42.28.68) (Remote host closed the connection) |
| 05:21:14 | → | polyrain joins (~polyrain@2001:8003:e4d8:4101:d50e:d40d:4648:6ec) |
| 05:23:36 | × | polyrain quits (~polyrain@2001:8003:e4d8:4101:d50e:d40d:4648:6ec) (Client Quit) |
| 05:27:17 | → | nhs joins (~nhs@c-67-180-177-103.hsd1.ca.comcast.net) |
| 05:27:58 | × | Wuzzy quits (~Wuzzy@p5b0df3df.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 05:31:47 | × | nhs quits (~nhs@c-67-180-177-103.hsd1.ca.comcast.net) (Ping timeout: 256 seconds) |
| 05:33:29 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:b8ec:9dfb:e531:1ee7:9134) |
| 05:33:46 | × | hendursaga quits (~weechat@gateway/tor-sasl/hendursaga) (Remote host closed the connection) |
| 05:36:39 | → | hendursaga joins (~weechat@gateway/tor-sasl/hendursaga) |
| 05:40:02 | → | mirrorbird joins (~psutcliff@2a00:801:446:6dfc:fadb:e310:6ed2:16d) |
| 05:43:32 | → | krkini joins (~kini@unaffiliated/kini) |
| 05:44:29 | × | rayyyy quits (~nanoz@gateway/tor-sasl/nanoz) (Quit: Leaving) |
| 05:44:43 | → | ddellacosta joins (~ddellacos@86.106.143.100) |
| 05:45:02 | × | kini quits (~kini@unaffiliated/kini) (Ping timeout: 264 seconds) |
| 05:46:10 | × | Narinas quits (~Narinas@189.223.59.23.dsl.dyn.telnor.net) (Read error: Connection reset by peer) |
| 05:46:34 | → | ddellaco_ joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 05:46:57 | → | Narinas joins (~Narinas@189.223.59.23.dsl.dyn.telnor.net) |
| 05:49:26 | × | ddellacosta quits (~ddellacos@86.106.143.100) (Ping timeout: 260 seconds) |
| 05:50:33 | × | Saukk quits (~Saukk@83-148-239-3.dynamic.lounea.fi) (Remote host closed the connection) |
| 05:50:50 | × | fengh quits (~haskeller@ip72-205-40-121.dc.dc.cox.net) (Ping timeout: 260 seconds) |
| 05:50:56 | × | ddellaco_ quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds) |
| 05:54:20 | × | h2017 quits (~h2017@bras-base-clbaon0201w-grc-32-142-114-145-140.dsl.bell.ca) (Quit: Leaving) |
| 05:55:04 | → | aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net) |
| 05:59:42 | <desophos> | with quickcheck, is there a way to suppress the output of a particular `collect` but keep the rest of the output (e.g. # tests run, etc.)? |
| 05:59:48 | × | deviantfero quits (~deviantfe@190.150.27.58) (Ping timeout: 246 seconds) |
| 06:00:38 | × | jedws quits (~jedws@101.184.202.248) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 06:01:41 | <desophos> | i'm using `collect` in a hacky way, "labeling" each test case with its generated values to analyze later, so quickcheck spits out 100 labels after the test |
| 06:04:49 | → | idhugo joins (~idhugo@80-62-117-97-mobile.dk.customer.tdc.net) |
| 06:08:10 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 06:10:25 | × | kupi quits (uid212005@gateway/web/irccloud.com/x-mbplkmlzcjbllchc) (Quit: Connection closed for inactivity) |
| 06:12:11 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:2c3b:7c69:7266:b507) (Remote host closed the connection) |
| 06:15:06 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds) |
| 06:15:42 | → | rekahsoft joins (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) |
| 06:15:50 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:15cd:c67f:11dd:b9fc) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 06:18:26 | × | krkini quits (~kini@unaffiliated/kini) (Ping timeout: 240 seconds) |
| 06:18:30 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 06:18:53 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:15cd:c67f:11dd:b9fc) |
| 06:19:50 | × | xff0x quits (~xff0x@2001:1a81:52fd:ec00:d491:9747:a76e:961a) (Ping timeout: 264 seconds) |
| 06:20:41 | → | xff0x joins (~xff0x@2001:1a81:52fd:ec00:6110:a16a:5169:e879) |
| 06:21:11 | <Axman6> | you might want to look at verboseCheck |
| 06:21:38 | → | kini joins (~kini@unaffiliated/kini) |
| 06:22:16 | × | rekahsoft quits (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) (Ping timeout: 240 seconds) |
| 06:23:29 | × | gzj quits (~gzj@unaffiliated/gzj) (Quit: Leaving) |
| 06:23:31 | <Axman6> | https://hackage.haskell.org/package/QuickCheck-2.14.2/docs/Test-QuickCheck.html#g:2 |
| 06:23:39 | → | gzj joins (~gzj@unaffiliated/gzj) |
| 06:23:50 | <Axman6> | though, I guess that doesn't actually solve your problem |
| 06:24:30 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:2c3b:7c69:7266:b507) |
| 06:24:31 | → | ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 06:28:57 | → | sz0 joins (uid110435@gateway/web/irccloud.com/x-vgcbgmtbcanqkgvi) |
| 06:29:06 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 260 seconds) |
| 06:29:42 | → | jedws joins (~jedws@101.184.202.248) |
| 06:33:07 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 06:33:10 | → | cur8or joins (~cur8or@2c0f:fbe1:3:17:6d77:f5a5:800f:317) |
| 06:34:45 | → | ddellacosta joins (~ddellacos@83.143.246.103) |
| 06:37:33 | → | raym joins (~ray@45.64.220.3) |
| 06:38:00 | × | gienah quits (~mwright@gentoo/developer/gienah) (Quit: leaving) |
| 06:38:32 | × | gzj quits (~gzj@unaffiliated/gzj) (Quit: Leaving) |
| 06:38:54 | <desophos> | hmm, interesting. i might be able to use that instead of `collect` if i can redirect stdout |
| 06:38:55 | → | gzj joins (~gzj@unaffiliated/gzj) |
| 06:42:19 | → | pjb joins (~t@2a01cb04063ec500040d2a1d3a77e4c5.ipv6.abo.wanadoo.fr) |
| 06:42:38 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 06:44:25 | × | ddellacosta quits (~ddellacos@83.143.246.103) (Remote host closed the connection) |
| 06:46:07 | → | vglfr joins (~androirc@37.73.185.51) |
| 06:46:56 | → | danvet joins (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) |
| 06:47:31 | × | jedws quits (~jedws@101.184.202.248) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 06:51:05 | × | cheater quits (~user@unaffiliated/cheater) (Ping timeout: 240 seconds) |
| 06:51:33 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 06:51:42 | → | jedws joins (~jedws@101.184.202.248) |
| 06:55:43 | × | vglfr quits (~androirc@37.73.185.51) (Read error: Connection reset by peer) |
| 06:55:55 | → | cheater joins (~user@unaffiliated/cheater) |
| 06:56:37 | → | vglfr joins (~androirc@37.73.185.51) |
| 06:57:15 | <desophos> | is there a way to do that in Haskell? as opposed to redirecting ghc stdout from bash |
| 06:57:29 | × | vglfr quits (~androirc@37.73.185.51) (Remote host closed the connection) |
| 06:58:24 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:15cd:c67f:11dd:b9fc) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 06:59:58 | → | average joins (uid473595@gateway/web/irccloud.com/x-jpwdoiumlhsnnhkn) |
| 07:02:24 | × | jedws quits (~jedws@101.184.202.248) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 07:03:33 | → | frozenErebus joins (~frozenEre@94.128.219.166) |
| 07:04:11 | × | xff0x quits (~xff0x@2001:1a81:52fd:ec00:6110:a16a:5169:e879) (Quit: xff0x) |
| 07:04:58 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 07:05:16 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 240 seconds) |
| 07:07:14 | → | yangby joins (~secret@115.199.177.75) |
| 07:07:47 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:b8ec:9dfb:e531:1ee7:9134) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 07:09:28 | × | vicfred quits (vicfred@gateway/vpn/mullvad/vicfred) (Quit: Leaving) |
| 07:10:29 | × | Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
| 07:11:42 | → | vglfr joins (~auiee@37.73.185.51) |
| 07:12:25 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
| 07:13:40 | → | xff0x joins (~xff0x@2001:1a81:52fd:ec00:30b:4057:d2b:135) |
| 07:14:09 | <desophos> | it looks like `hDuplicateTo` in GHC.IO.Handle can do it |
| 07:16:44 | → | _ht joins (~quassel@82-169-194-8.biz.kpn.net) |
| 07:17:24 | → | fengh joins (~haskeller@ip72-205-40-121.dc.dc.cox.net) |
| 07:18:28 | × | Sgeo quits (~Sgeo@ool-18b98aa4.dyn.optonline.net) (Read error: Connection reset by peer) |
| 07:18:57 | → | stree joins (~stree@68.36.8.116) |
| 07:19:04 | × | vglfr quits (~auiee@37.73.185.51) (Quit: leaving) |
| 07:20:25 | × | WarzoneCommand quits (~Frank@77-162-168-71.fixed.kpn.net) (Ping timeout: 240 seconds) |
| 07:21:20 | × | kini quits (~kini@unaffiliated/kini) (Quit: bye) |
| 07:22:39 | × | yangby quits (~secret@115.199.177.75) (Quit: Go out for a walk and buy a drink.) |
| 07:25:09 | → | kini joins (~kini@unaffiliated/kini) |
| 07:25:29 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:b8ec:9dfb:e531:1ee7:9134) |
| 07:29:13 | × | hekkaidekapus[ quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 268 seconds) |
| 07:29:57 | → | auiee joins (~auiee@37.73.185.51) |
| 07:30:48 | auiee | is now known as vglfr |
| 07:32:32 | × | carlomagno quits (~cararell@148.87.23.9) (Quit: Leaving.) |
| 07:32:39 | × | teardown quits (~user@gateway/tor-sasl/mrush) (Remote host closed the connection) |
| 07:33:00 | → | teardown joins (~user@gateway/tor-sasl/mrush) |
| 07:33:46 | × | vglfr quits (~auiee@37.73.185.51) (Client Quit) |
| 07:34:06 | → | vglfr joins (~vglfr@37.73.185.51) |
| 07:34:46 | × | raoul90 quits (~raoulhida@nomnomnomnom.co.uk) (Quit: Ping timeout (120 seconds)) |
| 07:34:58 | → | raoul90 joins (~raoulhida@nomnomnomnom.co.uk) |
| 07:35:34 | × | vglfr quits (~vglfr@37.73.185.51) (Client Quit) |
| 07:35:52 | → | vglfr joins (~vglfr@37.73.185.51) |
| 07:36:29 | × | vglfr quits (~vglfr@37.73.185.51) (Client Quit) |
| 07:36:46 | → | vglfr joins (~vglfr@37.73.185.51) |
| 07:40:07 | × | gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
| 07:40:21 | × | vglfr quits (~vglfr@37.73.185.51) (Client Quit) |
| 07:40:28 | → | gzj joins (~gzj@unaffiliated/gzj) |
| 07:40:38 | → | vglfr joins (~vglfr@37.73.185.51) |
| 07:43:49 | × | frozenErebus quits (~frozenEre@94.128.219.166) (Ping timeout: 256 seconds) |
| 07:44:21 | → | idhugo_ joins (~idhugo@80-62-117-86-mobile.dk.customer.tdc.net) |
| 07:44:40 | × | pavonia^\_^\ quits (~user@unaffiliated/siracusa) (Quit: Bye!) |
| 07:44:57 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 07:45:02 | × | kini quits (~kini@unaffiliated/kini) (Ping timeout: 264 seconds) |
| 07:45:15 | × | vglfr quits (~vglfr@37.73.185.51) (Client Quit) |
| 07:45:32 | → | vglfr joins (~vglfr@37.73.185.51) |
| 07:45:50 | → | kini joins (~kini@unaffiliated/kini) |
| 07:47:21 | × | idhugo quits (~idhugo@80-62-117-97-mobile.dk.customer.tdc.net) (Ping timeout: 264 seconds) |
| 07:48:55 | × | kini quits (~kini@unaffiliated/kini) (Excess Flood) |
| 07:51:00 | → | jedws joins (~jedws@101.184.202.248) |
| 07:51:58 | → | dhouthoo joins (~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be) |
| 07:52:56 | × | clog quits (~nef@bespin.org) (Ping timeout: 256 seconds) |
| 07:53:13 | → | kini joins (~kini@unaffiliated/kini) |
| 07:53:36 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 07:53:54 | → | minoru_shiraeesh joins (~shiraeesh@109.166.57.22) |
| 07:55:07 | × | vglfr quits (~vglfr@37.73.185.51) (Quit: leaving) |
| 07:56:10 | × | gioyik_ quits (~gioyik@gateway/tor-sasl/gioyik) (Quit: WeeChat 3.0) |
| 07:58:25 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
| 07:59:15 | → | vglfr joins (~auiee@37.73.185.51) |
| 08:00:24 | → | ddellacosta joins (~ddellacos@86.106.143.72) |
| 08:02:28 | × | vglfr quits (~auiee@37.73.185.51) (Client Quit) |
| 08:03:25 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 08:03:47 | × | danso quits (~dan@2001:1970:52e7:d000:96b8:6dff:feb3:c009) (Ping timeout: 272 seconds) |
| 08:04:36 | × | ddellacosta quits (~ddellacos@86.106.143.72) (Ping timeout: 240 seconds) |
| 08:06:12 | × | bitmapper quits (uid464869@gateway/web/irccloud.com/x-ashwoxwvsstlgotp) (Quit: Connection closed for inactivity) |
| 08:06:19 | × | mirrorbird quits (~psutcliff@2a00:801:446:6dfc:fadb:e310:6ed2:16d) (Ping timeout: 272 seconds) |
| 08:06:23 | → | ezrakilty joins (~ezrakilty@97-113-55-149.tukw.qwest.net) |
| 08:07:12 | → | bitmagie joins (~Thunderbi@200116b8066311005c3e5c1bf8f86d77.dip.versatel-1u1.de) |
| 08:08:01 | → | danso joins (~dan@2001:1970:52e7:d000:96b8:6dff:feb3:c009) |
| 08:08:47 | → | kuribas joins (~user@ptr-25vy0i9qfueg3sz2hh3.18120a2.ip6.access.telenet.be) |
| 08:11:04 | → | m0rphism1 joins (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) |
| 08:11:21 | × | ezrakilty quits (~ezrakilty@97-113-55-149.tukw.qwest.net) (Ping timeout: 264 seconds) |
| 08:12:49 | → | rayyyy joins (~nanoz@gateway/tor-sasl/nanoz) |
| 08:13:45 | × | polyphem quits (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889) (Ping timeout: 258 seconds) |
| 08:13:49 | → | hiew joins (3dded63f@61-222-214-63.HINET-IP.hinet.net) |
| 08:13:56 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 240 seconds) |
| 08:15:51 | → | polyphem joins (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889) |
| 08:18:11 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 08:18:55 | → | hekkaidekapus[ joins (~tchouri@gateway/tor-sasl/hekkaidekapus) |
| 08:24:01 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:2c3b:7c69:7266:b507) (Remote host closed the connection) |
| 08:25:35 | → | frozenErebus joins (~frozenEre@94.128.219.166) |
| 08:26:11 | → | chele joins (~chele@ip5b40237d.dynamic.kabel-deutschland.de) |
| 08:27:06 | × | kini quits (~kini@unaffiliated/kini) (Remote host closed the connection) |
| 08:28:24 | → | kini joins (~kini@unaffiliated/kini) |
| 08:29:21 | × | cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 264 seconds) |
| 08:30:42 | → | Franciman joins (~francesco@host-82-49-79-189.retail.telecomitalia.it) |
| 08:31:16 | × | jedws quits (~jedws@101.184.202.248) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 08:31:16 | × | drbean quits (~drbean@TC210-63-209-191.static.apol.com.tw) (Ping timeout: 240 seconds) |
| 08:32:12 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
| 08:32:19 | → | kritzefitz joins (~kritzefit@fw-front.credativ.com) |
| 08:32:57 | × | frozenErebus quits (~frozenEre@94.128.219.166) (Ping timeout: 264 seconds) |
| 08:35:55 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 08:37:12 | → | TMA joins (tma@twin.jikos.cz) |
| 08:38:41 | → | Yumasi joins (~guillaume@2a01:e0a:5cb:4430:46e1:3435:9ae8:d4e) |
| 08:38:47 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 08:40:47 | → | neiluj joins (~jco@91-167-203-101.subs.proxad.net) |
| 08:40:47 | × | neiluj quits (~jco@91-167-203-101.subs.proxad.net) (Changing host) |
| 08:40:47 | → | neiluj joins (~jco@unaffiliated/neiluj) |
| 08:44:08 | × | gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
| 08:44:23 | → | frozenErebus joins (~frozenEre@94.128.219.166) |
| 08:44:29 | → | gzj joins (~gzj@unaffiliated/gzj) |
| 08:46:30 | × | plutoniix quits (~q@ppp-124-121-236-209.revip2.asianet.co.th) (Read error: Connection reset by peer) |
| 08:46:48 | → | danza joins (~francesco@151.53.76.37) |
| 08:49:34 | × | frozenErebus quits (~frozenEre@94.128.219.166) (Ping timeout: 260 seconds) |
| 08:49:47 | → | borne joins (~fritjof@200116b864cae2007d6d461afdb4e2ff.dip.versatel-1u1.de) |
| 08:53:26 | → | levelset joins (493ffb86@c-73-63-251-134.hsd1.ca.comcast.net) |
| 08:53:37 | → | LKoen joins (~LKoen@252.248.88.92.rev.sfr.net) |
| 08:55:32 | → | jedws joins (~jedws@101.184.202.248) |
| 08:56:33 | <levelset> | I'm stuck on a nice way to write a function of type `Monad m => ((a -> b) -> a -> b) -> ((a -> m b) -> a -> m b)`. It feels like it should be fairly straightforward, but the best I've come up with is https://pastebin.com/CFFYBcGq?fbclid=IwAR0sWGhjZrqvLekuWffFd_IG1haeXJywWtPQMsZYKM3xEE1BDxBezT6Kpx0, which seems pretty weird. Any suggestions? |
| 08:57:52 | <levelset> | (I don't think this is a good idea, per se, it just feels like it should be a super easy composition of some existing abstractions and I haven't found them) |
| 08:59:08 | → | polyrain joins (~polyrain@2001:8003:e4d8:4101:d50e:d40d:4648:6ec) |
| 08:59:10 | → | acidjnk_new joins (~acidjnk@p200300d0c739095610730469cbb40c42.dip0.t-ipconnect.de) |
| 09:00:06 | × | psamim quits (samimpmatr@gateway/shell/matrix.org/x-aphqpdlhwcwoigrn) (Quit: Idle for 30+ days) |
| 09:00:14 | × | pedrorubster[m] quits (pedrorubst@gateway/shell/matrix.org/x-rtcodsrzxgzhwyyh) (Quit: Idle for 30+ days) |
| 09:00:14 | × | Vanilla[m] quits (danielm14@gateway/shell/matrix.org/x-axifdmrqergkcrjc) (Quit: Idle for 30+ days) |
| 09:00:43 | → | frozenErebus joins (~frozenEre@94.128.219.166) |
| 09:00:52 | <edwardk> | @djinn Monad m => ((a -> b) -> a -> b) -> ((a -> m b) -> a -> m b) |
| 09:00:52 | <lambdabot> | f _ a b = a b |
| 09:00:56 | <edwardk> | thanks djinn. ;) |
| 09:01:47 | → | WarzoneCommand joins (~Frank@77-162-168-71.fixed.kpn.net) |
| 09:01:55 | <levelset> | it tried its best |
| 09:02:08 | <edwardk> | so my question do you is this. how do you expect to pass an action from a -> m b to a function that only takes (a -> b) for its first argument? |
| 09:02:14 | <edwardk> | i mean, it gave the only correct answer here |
| 09:03:54 | <levelset> | That is an extremely good point |
| 09:04:17 | <edwardk> | just look at things step by step. you have a function f : (a -> b) -> a -> b, mf : a -> m b, and an x : a. you can feed mf x : m b. but that isn't what it looks like you are trying to do. if i saw that signature i'd see you wanted to pass (a -> m b) in as f's first argument and pass x as its second. but f is too crippled. |
| 09:04:45 | × | olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 265 seconds) |
| 09:05:30 | <edwardk> | your approximation makes a bit assumption that makes it non-canonical: more or elss that the a passed into the (a -> b) in (a -> b) -> a -> b doesn't matter at all, and/or that it is x |
| 09:05:36 | × | frozenErebus quits (~frozenEre@94.128.219.166) (Ping timeout: 240 seconds) |
| 09:05:48 | <edwardk> | i call that function cursed |
| 09:06:56 | → | whald joins (~trem@ip4d1582ab.dynamic.kabel-deutschland.de) |
| 09:07:45 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 264 seconds) |
| 09:07:46 | <levelset> | Yeah, you definitely read my intent correctly. I was hoping that there would be some bit of alebraically-equivalent something something that would let me turn the function in question inside out so I could use the regular monad tools on it to do the lift, but "no there isn't" is a completely valid resolution |
| 09:08:16 | × | minoru_shiraeesh quits (~shiraeesh@109.166.57.22) (Ping timeout: 240 seconds) |
| 09:08:31 | <levelset> | Thank you! |
| 09:09:53 | → | hendursa1 joins (~weechat@gateway/tor-sasl/hendursaga) |
| 09:10:03 | <edwardk> | levelset: there kinda is |
| 09:10:11 | <edwardk> | you need to cheat more though |
| 09:10:13 | <edwardk> | consider |
| 09:10:39 | <edwardk> | Monad m => (forall m'. Monad m' => (a -> m' b) -> a -> m' b) -> ((a -> m b) -> a -> m b) |
| 09:10:45 | <edwardk> | that looks like i didn't do anything |
| 09:10:50 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 09:10:56 | <edwardk> | but now that first argument isn't allowed to use the monad effects of 'm' at all |
| 09:10:58 | × | hendursaga quits (~weechat@gateway/tor-sasl/hendursaga) (Ping timeout: 268 seconds) |
| 09:11:05 | × | kritzefitz quits (~kritzefit@fw-front.credativ.com) (Ping timeout: 240 seconds) |
| 09:11:10 | <edwardk> | all it can do is plumb it through and use >>= and return like a good little boy |
| 09:11:31 | <edwardk> | that means you can know that the call to (a -> m b) you feed it is the source of _all_ monadic effects in m inside that function. |
| 09:12:17 | <edwardk> | levelset: i exploited this approach in this article: http://comonad.com/reader/2011/searching-infinity/ |
| 09:12:29 | × | jedws quits (~jedws@101.184.202.248) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 09:12:41 | <edwardk> | (it predates the AMP, so applicative wasn't yet a superclass of monad, ignore that part) |
| 09:13:49 | → | ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 09:14:01 | × | bitmagie quits (~Thunderbi@200116b8066311005c3e5c1bf8f86d77.dip.versatel-1u1.de) (Quit: bitmagie) |
| 09:14:17 | <edwardk> | and it enjoys a delightfully simple implementation. foo f mf x = f mf x |
| 09:15:15 | <edwardk> | but in general if i want to require that i plumb someone else's effects through that quantification over the monad trick works pretty well |
| 09:15:54 | → | ezrakilty joins (~ezrakilty@97-113-55-149.tukw.qwest.net) |
| 09:16:23 | <desophos> | Axman6, redirecting `verboseCheck` into a file actually allowed me to simplify my code quite a lot, so thank you! |
| 09:16:23 | <levelset> | That's a great trick! |
| 09:17:25 | → | leo__ joins (~leo@cpc96810-rdng27-2-0-cust409.15-3.cable.virginm.net) |
| 09:18:30 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 256 seconds) |
| 09:19:25 | × | hiew quits (3dded63f@61-222-214-63.HINET-IP.hinet.net) (Quit: Connection closed) |
| 09:20:05 | <tomsmeding> | edwardk: at that point I'm not sure whether the new 'foo' function is really useful at all :p |
| 09:20:12 | × | ezrakilty quits (~ezrakilty@97-113-55-149.tukw.qwest.net) (Ping timeout: 256 seconds) |
| 09:20:33 | <tomsmeding> | :t \f mf x -> f mf x |
| 09:20:34 | <lambdabot> | (t1 -> t2 -> t3) -> t1 -> t2 -> t3 |
| 09:20:39 | <edwardk> | tomsmeding: the key is that you can trust that the function you call as the first argument knows nothing about m, and so has to not use anything other than >>= on its own |
| 09:20:44 | <edwardk> | the rank n type is the key here |
| 09:21:04 | <tomsmeding> | I know, but at this point the function doesn't do anything anymore, and also has a much more generic type :p |
| 09:21:06 | <edwardk> | that argument has to work for _all_ choices of m. the other arguments get to know m |
| 09:21:27 | <edwardk> | it does something, which is rule out a function that knows its working with state. it gives you type errors if the first function cheats |
| 09:21:46 | <tomsmeding> | oh! good point |
| 09:21:49 | <edwardk> | its no more useless than using data Pair a = Pair a a as an argument to be more precise than passing an arbitrary [a] |
| 09:21:59 | <tomsmeding> | yes I see :) |
| 09:22:38 | <edwardk> | i use parametricity to rule out lots of cheating. its one of my favorite tools |
| 09:22:50 | <edwardk> | AD, reflection, etc. |
| 09:23:28 | → | jedws joins (~jedws@101.184.202.248) |
| 09:23:35 | → | pera joins (~pera@unaffiliated/pera) |
| 09:24:44 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:197a:8f1e:d522:cd3a) |
| 09:24:50 | → | kritzefitz joins (~kritzefit@212.86.56.80) |
| 09:27:01 | → | luite joins (sid387799@gateway/web/irccloud.com/x-ohgaypzpftwfeuju) |
| 09:27:28 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 265 seconds) |
| 09:29:26 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:197a:8f1e:d522:cd3a) (Ping timeout: 264 seconds) |
| 09:29:58 | → | x0oytF joins (5da276ea@93-162-118-234-dynamic.dk.customer.tdc.net) |
| 09:31:14 | × | lambda-11235 quits (~lambda-11@2600:1700:7c70:4600:305f:2287:bde6:feb9) (Quit: Bye) |
| 09:35:18 | × | polyrain quits (~polyrain@2001:8003:e4d8:4101:d50e:d40d:4648:6ec) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 09:38:00 | × | idhugo_ quits (~idhugo@80-62-117-86-mobile.dk.customer.tdc.net) (Remote host closed the connection) |
| 09:40:00 | → | stree joins (~stree@68.36.8.116) |
| 09:46:31 | → | idhugo joins (~idhugo@80-62-117-86-mobile.dk.customer.tdc.net) |
| 09:47:07 | × | idhugo quits (~idhugo@80-62-117-86-mobile.dk.customer.tdc.net) (Remote host closed the connection) |
| 09:47:26 | → | idhugo joins (~idhugo@80-62-117-86-mobile.dk.customer.tdc.net) |
| 09:48:08 | × | desophos quits (~desophos@2601:249:1680:a570:d500:73bc:696a:d401) (Quit: Leaving) |
| 09:49:58 | × | ericsagn1 quits (~ericsagne@2405:6580:0:5100:86fb:42bc:1428:8130) (Ping timeout: 258 seconds) |
| 09:51:40 | × | hekkaidekapus[ quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 268 seconds) |
| 09:54:19 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 09:54:42 | × | levelset quits (493ffb86@c-73-63-251-134.hsd1.ca.comcast.net) (Quit: Connection closed) |
| 09:56:58 | × | hnOsmium0001 quits (uid453710@gateway/web/irccloud.com/x-axacivxcvkkvhqtx) (Quit: Connection closed for inactivity) |
| 09:57:21 | → | hekkaidekapus[ joins (~tchouri@gateway/tor-sasl/hekkaidekapus) |
| 09:57:39 | <tomsmeding> | I have a question about parallelism. Consider this code: https://paste.tomsmeding.com/dgYMPDCf . I provide the program with the input '1000000000 1000000000 1000000000\n1000000000 1000000000 1000000000\n' (six times 10^9; not hard-coded to eliminate optimisations as a source of weirdness). My machine runs one such loop in 1.44 seconds, and running the full thing predictably takes 8.6 ~= 6 * 1.44 |
| 09:57:40 | <tomsmeding> | seconds normally. Passing +RTS -N2 makes it take 5.7 ~= 4 * 1.44 seconds, which is expected since both sets of three computations can be computed in the time of two. However, passing +RTS -N3 makes it sometimes take 2.88 (twice 1.44) and sometimes take 4.3 (three times 1.44) seconds; why is this inconsistent? How can this take 4.3 seconds? |
| 09:57:59 | <tomsmeding> | all times are wall clock times |
| 09:58:16 | <tomsmeding> | Note that -qg makes no difference to these observations; it does impact cpu time of course |
| 09:59:12 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 246 seconds) |
| 10:00:53 | × | jedws quits (~jedws@101.184.202.248) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 10:02:16 | → | ericsagn1 joins (~ericsagne@2405:6580:0:5100:d940:32bf:aa80:d462) |
| 10:02:42 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds) |
| 10:04:06 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:06:19 | → | oisdk joins (~oisdk@2001:bb6:3329:d100:c73:1525:4623:7479) |
| 10:07:56 | × | darjeeling_ quits (~darjeelin@122.245.217.214) (Ping timeout: 240 seconds) |
| 10:08:54 | → | clog joins (~nef@bespin.org) |
| 10:09:22 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 10:09:27 | → | darjeeling_ joins (~darjeelin@122.245.217.214) |
| 10:09:45 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:09:49 | × | danso quits (~dan@2001:1970:52e7:d000:96b8:6dff:feb3:c009) (Ping timeout: 272 seconds) |
| 10:10:16 | → | cfricke joins (~cfricke@unaffiliated/cfricke) |
| 10:11:09 | × | gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
| 10:11:30 | → | gzj joins (~gzj@unaffiliated/gzj) |
| 10:12:22 | × | xff0x quits (~xff0x@2001:1a81:52fd:ec00:30b:4057:d2b:135) (Ping timeout: 260 seconds) |
| 10:12:59 | → | xff0x joins (~xff0x@2001:1a81:52fd:ec00:624b:a459:3f1:35ff) |
| 10:14:58 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 10:15:36 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:18:48 | × | mrchampion quits (~mrchampio@38.18.109.23) (Ping timeout: 246 seconds) |
| 10:18:54 | × | GreyFaceNoSpace quits (~omar@95.157.26.203) (Quit: Ex-Chat) |
| 10:18:55 | × | xcmw quits (~textual@dyn-72-33-2-47.uwnet.wisc.edu) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 10:19:34 | → | danso joins (~dan@2001:1970:52e7:d000:96b8:6dff:feb3:c009) |
| 10:19:52 | → | mrchampion joins (~mrchampio@38.18.109.23) |
| 10:20:03 | → | gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh) |
| 10:20:50 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 10:21:21 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:22:02 | <Uniaika> | merijn: http://jamesrwilcox.com/runtime.html |
| 10:26:00 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:197a:8f1e:d522:cd3a) |
| 10:27:01 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds) |
| 10:27:16 | <tomsmeding> | (except that I've seen people use spelling 3 for usage 2) |
| 10:27:18 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:30:38 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:197a:8f1e:d522:cd3a) (Ping timeout: 264 seconds) |
| 10:31:02 | <tomsmeding> | about my parallelism issue: -N4 has the same behaviour as -N3, in case you were wondering |
| 10:32:41 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 10:33:21 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:33:26 | × | saitamaplus quits (uid272474@gateway/web/irccloud.com/x-dfxujuraamaironk) (Quit: Connection closed for inactivity) |
| 10:36:16 | × | kritzefitz quits (~kritzefit@212.86.56.80) (Ping timeout: 240 seconds) |
| 10:36:35 | → | kritzefitz joins (~kritzefit@fw-front.credativ.com) |
| 10:38:46 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 10:39:18 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:44:08 | → | thc202 joins (~thc202@unaffiliated/thc202) |
| 10:44:16 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 10:45:09 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:45:19 | → | viluon joins (uid453725@gateway/web/irccloud.com/x-ytvknempinpnbtej) |
| 10:46:13 | → | DavidEichmann joins (~david@234.109.45.217.dyn.plus.net) |
| 10:47:28 | × | pera quits (~pera@unaffiliated/pera) (Ping timeout: 256 seconds) |
| 10:48:59 | → | pera joins (~pera@unaffiliated/pera) |
| 10:49:59 | × | ukari quits (~ukari@unaffiliated/ukari) (Remote host closed the connection) |
| 10:50:26 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 10:50:40 | → | jedws joins (~jedws@101.184.202.248) |
| 10:50:42 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:50:59 | → | ukari joins (~ukari@unaffiliated/ukari) |
| 10:53:38 | → | bitmagie joins (~Thunderbi@200116b8066311005c3e5c1bf8f86d77.dip.versatel-1u1.de) |
| 10:54:26 | × | x0oytF quits (5da276ea@93-162-118-234-dynamic.dk.customer.tdc.net) (Quit: Connection closed) |
| 10:55:36 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 10:56:27 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:57:11 | × | sMuNiX quits (~sMuNiX@lnsm2-montreal02-142-118-236-120.internet.virginmobile.ca) (Read error: Connection reset by peer) |
| 10:59:15 | → | forgottenone joins (~forgotten@176.42.18.230) |
| 11:00:43 | → | ddellacosta joins (~ddellacos@86.106.143.46) |
| 11:01:02 | → | sMuNiX joins (~sMuNiX@lnsm2-montreal02-142-118-236-120.internet.virginmobile.ca) |
| 11:01:13 | → | __monty__ joins (~toonn@unaffiliated/toonn) |
| 11:01:30 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds) |
| 11:02:12 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 11:04:56 | × | ddellacosta quits (~ddellacos@86.106.143.46) (Ping timeout: 240 seconds) |
| 11:06:17 | × | ChaiTRex quits (~ChaiTRex@gateway/tor-sasl/chaitrex) (Ping timeout: 268 seconds) |
| 11:07:42 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:b8ec:9dfb:e531:1ee7:9134) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 11:07:44 | → | ChaiTRex joins (~ChaiTRex@gateway/tor-sasl/chaitrex) |
| 11:07:45 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 11:07:57 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 11:09:03 | → | ania123 joins (5e89ad7c@94.137.173.124) |
| 11:09:08 | → | mputz joins (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) |
| 11:09:26 | <ski> | yea, rank-2 can be used for implementation hiding, to enforce a callback doesn't mess with some privates you pass through it |
| 11:10:06 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 11:10:08 | → | trafaret1 joins (~user@178.207.171.111) |
| 11:11:32 | × | hexfive quits (~hexfive@50.35.83.177) (Quit: i must go. my people need me.) |
| 11:12:55 | <kuribas> | and it gives a cleaner signature |
| 11:14:45 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
| 11:15:59 | → | son0p joins (~son0p@181.58.39.182) |
| 11:17:27 | × | ania123 quits (5e89ad7c@94.137.173.124) (Quit: Connection closed) |
| 11:18:04 | → | ania123 joins (5e89ad7c@94.137.173.124) |
| 11:18:58 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds) |
| 11:19:18 | × | neiluj quits (~jco@unaffiliated/neiluj) (Quit: leaving) |
| 11:19:27 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 11:20:56 | × | loller_ quits (uid358106@gateway/web/irccloud.com/x-kbcihpyfexgxmziw) (Quit: Connection closed for inactivity) |
| 11:24:35 | → | chisui joins (588298ad@88.130.152.173) |
| 11:24:36 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 11:24:42 | <ph88> | tomsmeding, in the foldl the result depends on the last iteration no ? |
| 11:25:12 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 11:25:18 | × | dibblego quits (~dibblego@haskell/developer/dibblego) (Ping timeout: 272 seconds) |
| 11:25:57 | × | jedws quits (~jedws@101.184.202.248) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 11:26:42 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:197a:8f1e:d522:cd3a) |
| 11:27:59 | → | usr25 joins (~usr25@unaffiliated/usr25) |
| 11:29:29 | × | ania123 quits (5e89ad7c@94.137.173.124) (Quit: Connection closed) |
| 11:30:22 | → | dibblego joins (~dibblego@122-199-1-30.ip4.superloop.com) |
| 11:30:22 | × | dibblego quits (~dibblego@122-199-1-30.ip4.superloop.com) (Changing host) |
| 11:30:22 | → | dibblego joins (~dibblego@haskell/developer/dibblego) |
| 11:30:34 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 11:31:03 | × | wei2912 quits (~wei2912@unaffiliated/wei2912) (Remote host closed the connection) |
| 11:31:12 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 11:31:12 | × | ukari quits (~ukari@unaffiliated/ukari) (Remote host closed the connection) |
| 11:31:14 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:197a:8f1e:d522:cd3a) (Ping timeout: 264 seconds) |
| 11:31:49 | → | evandocarmo joins (2f0e0036@047-014-000-054.res.spectrum.com) |
| 11:32:17 | → | ukari joins (~ukari@unaffiliated/ukari) |
| 11:33:15 | <evandocarmo> | Hey! What's your guys' favorite tutorial for programmers of other languages trying to learn? I work with golang and typescript professionally, trying to pick up something different as a hobby/future investment |
| 11:33:41 | → | ddellacosta joins (~ddellacos@86.106.143.150) |
| 11:33:53 | <__monty__> | @where cis194 |
| 11:33:53 | <lambdabot> | https://www.seas.upenn.edu/~cis194/spring13/lectures.html |
| 11:33:57 | <__monty__> | This maybe? |
| 11:34:02 | <evandocarmo> | Looked into Scala but the ecosystem seemed a little too convoluted (at least coming from Go where everything is so straightforward) |
| 11:34:29 | <evandocarmo> | I'll look into it, thanks! |
| 11:34:42 | × | sMuNiX quits (~sMuNiX@lnsm2-montreal02-142-118-236-120.internet.virginmobile.ca) (Quit: WeeChat 3.0.1) |
| 11:34:51 | <__monty__> | Haskell tends not to have designated libraries for doing stuff. There's pretty much always options. If you consider that convoluted maybe haskell's no better. |
| 11:36:16 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 11:36:42 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 11:38:05 | × | ddellacosta quits (~ddellacos@86.106.143.150) (Ping timeout: 240 seconds) |
| 11:38:29 | <evandocarmo> | Yeah maybe I'm just spoiled. That tutorial seems pretty easy to digest though, so I'll try to go over it. thanks again! |
| 11:38:43 | → | ania123 joins (5e89ad7c@94.137.173.124) |
| 11:38:58 | <__monty__> | Good luck! And not having choices is the opposite of being spoiled, imo : ) |
| 11:39:52 | → | kam1 joins (~kam1@37.129.135.98) |
| 11:40:55 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 11:41:45 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds) |
| 11:42:28 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 11:44:30 | → | sMuNiX joins (~sMuNiX@lnsm2-montreal02-142-118-236-120.internet.virginmobile.ca) |
| 11:45:45 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
| 11:46:25 | × | kam1 quits (~kam1@37.129.135.98) (Ping timeout: 240 seconds) |
| 11:47:56 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 240 seconds) |
| 11:48:07 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 11:48:24 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 11:48:25 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:b8ec:9dfb:e531:1ee7:9134) |
| 11:50:05 | → | Deide joins (~Deide@217.155.19.23) |
| 11:53:57 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 11:54:09 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 11:56:20 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 272 seconds) |
| 11:57:00 | <tomsmeding> | ph88: yes, the accumulator (and thus result) type of the foldl' is an Int, so seq'ing that forces the entire computation, so the loop is strict |
| 11:57:39 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 11:58:33 | × | chisui quits (588298ad@88.130.152.173) (Quit: Connection closed) |
| 11:59:00 | <kuribas> | I don't find the ecosystems of different languages better in significant ways, including haskell. |
| 12:00:49 | <ania123> | how can I convert words written in 8 digit decimal to 2 digits decimal ? |
| 12:00:56 | <kuribas> | Each one has their warts. |
| 12:01:09 | <kuribas> | But haskell is a significantly cleaner language than scala. |
| 12:01:32 | → | stree joins (~stree@68.36.8.116) |
| 12:01:33 | <Squarism> | I guess this is something I should know by know, but how do you sort a tree? I guess it involves Traversable? |
| 12:01:46 | <dminuoso> | Squarism: It's not a generically available operation. |
| 12:02:09 | <kuribas> | Squarism: what kind of tree? |
| 12:02:15 | <kuribas> | what kind of sorting? |
| 12:02:54 | <__monty__> | ania123: You can't write "12000000" with only two digits. |
| 12:02:57 | <Squarism> | Rosetree as in Data.Tree a. And sorting is just alphabetic using an accessor on "a" |
| 12:03:17 | <ania123> | I need an algorithm which does it... |
| 12:03:43 | <dminuoso> | Squarism: What does sorting mean, exactly, then? |
| 12:03:44 | <ania123> | takes words written with 8 digit decimals and convers two digit decimals |
| 12:03:56 | ← | trafaret1 parts (~user@178.207.171.111) ("ERC (IRC client for Emacs 26.3)") |
| 12:03:57 | <ania123> | can I find that alg somewhere in internet? |
| 12:04:09 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 12:04:22 | <kuribas> | ania123: what's a 8 digit decimal? |
| 12:04:23 | <Squarism> | dminuoso, children sorted alphabetically on at any level |
| 12:04:31 | <Squarism> | at ant* |
| 12:04:35 | <Squarism> | any* |
| 12:04:38 | <dminuoso> | Squarism: Oh, so you want to just sort the child lists in each node? |
| 12:04:45 | <__monty__> | ania123: No, because it's not possible. You'll have to specify what you want in a lot more detail. |
| 12:04:50 | <Squarism> | dminuoso, yes |
| 12:04:55 | fendor_ | is now known as fendor |
| 12:05:27 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 12:05:41 | <kuribas> | ania123: an octal number? You want to convert from octal to binary? |
| 12:05:44 | <dminuoso> | Squarism: That's just a small two liner then. |
| 12:06:16 | <ania123> | kuribas |
| 12:06:20 | <ania123> | exactly |
| 12:06:26 | <ania123> | I need to design an algorithm which does it |
| 12:06:39 | <dminuoso> | Well. Single liner, even |
| 12:06:54 | <dminuoso> | sortTreeOn f (Node x cs) = {- left as an excercise -} |
| 12:06:56 | <kuribas> | ania123: ok, so what's the problem then? |
| 12:07:16 | <ania123> | can I find alg for it? |
| 12:07:25 | <kuribas> | is this homework? |
| 12:07:34 | <[exa]> | ania123: the people are trying to imply that you should think for 5 minutes until it's obvious |
| 12:07:58 | <__monty__> | ania123: Can you come up with a way to convert a single octit to a string of bits? |
| 12:09:36 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds) |
| 12:10:21 | <Squarism> | dminuoso ... = Node x $ fmap (sortTreeOn f) cs |
| 12:10:24 | → | ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 12:10:25 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 12:10:53 | <Squarism> | i thought there was some combination traverse traverse thingy |
| 12:10:55 | × | natechan quits (~natechan@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer) |
| 12:11:12 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 12:11:20 | → | rdivyanshu joins (uid322626@gateway/web/irccloud.com/x-tworbfpnkgwjjhuq) |
| 12:11:30 | <ania123> | kuribas : it is an assignment discussed in the class... |
| 12:11:36 | × | ania123 quits (5e89ad7c@94.137.173.124) (Quit: Connection closed) |
| 12:11:42 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 12:11:54 | → | natechan joins (~natechan@108-233-125-227.lightspeed.sntcca.sbcglobal.net) |
| 12:11:56 | × | runawayfive quits (~nope@unaffiliated/runawayfive) (Ping timeout: 240 seconds) |
| 12:12:01 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 12:12:04 | <dminuoso> | Squarism: Nothing as concise comes to mind. |
| 12:12:19 | <dminuoso> | Squarism: Also note, you're still missing a crucial part there. |
| 12:12:59 | → | ania123 joins (5e89ad7c@94.137.173.124) |
| 12:13:11 | <ania123> | sorry disconected ... |
| 12:13:34 | × | puke quits (~vroom@217.138.252.206) (Quit: puke) |
| 12:14:05 | <__monty__> | ania123: Can you come up with a function toBit :: Char -> [Char]? Where the input is a single octal digit and the output is a string of binary digits? |
| 12:14:53 | <ania123> | I think, I am unable |
| 12:14:54 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 260 seconds) |
| 12:15:47 | → | chisui joins (588298ad@88.130.152.173) |
| 12:16:16 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 12:16:46 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds) |
| 12:16:49 | <__monty__> | ania123: Ok, do you understand how to convert an octit to bits? |
| 12:16:54 | ski | . o O ( "Cogito, erge nescius." ) |
| 12:16:57 | <swarmcollective> | anial23, you could think of it like this: what are the possible values of an octal digit? Now, what are the possible values of a binary digit? |
| 12:17:15 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 12:19:16 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
| 12:19:39 | → | runawayfive joins (~nope@unaffiliated/runawayfive) |
| 12:19:40 | × | ania123 quits (5e89ad7c@94.137.173.124) (Quit: Connection closed) |
| 12:22:16 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 12:22:19 | → | puke joins (~vroom@217.138.252.56) |
| 12:22:48 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 12:23:54 | × | Stanley00 quits (~stanley00@unaffiliated/stanley00) (Remote host closed the connection) |
| 12:25:27 | × | jdsharp quits (~jdsharp@185.163.110.108) (Remote host closed the connection) |
| 12:26:04 | <ph88> | tomsmeding, how you expect that to speed up over multiple cores ? |
| 12:27:43 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:197a:8f1e:d522:cd3a) |
| 12:29:08 | → | drbean_ joins (~drbean@TC210-63-209-168.static.apol.com.tw) |
| 12:31:47 | → | urodna joins (~urodna@unaffiliated/urodna) |
| 12:31:56 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:197a:8f1e:d522:cd3a) (Ping timeout: 240 seconds) |
| 12:35:57 | × | ph88 quits (~ph88@ip5f5af71a.dynamic.kabel-deutschland.de) (Ping timeout: 264 seconds) |
| 12:36:12 | × | usr25 quits (~usr25@unaffiliated/usr25) (Quit: Leaving) |
| 12:36:39 | → | ph88 joins (~ph88@ip5f5af71a.dynamic.kabel-deutschland.de) |
| 12:38:32 | <tomsmeding> | ph88: I'm evaluating three of those folds, and they're independent |
| 12:38:42 | <tomsmeding> | so I'm expecting that to speed up over three threads :p |
| 12:38:47 | <tomsmeding> | and it does -- usually |
| 12:38:56 | <tomsmeding> | the "usually" is what surprises me |
| 12:39:47 | × | berberman_ quits (~berberman@unaffiliated/berberman) (Ping timeout: 258 seconds) |
| 12:40:56 | → | berberman joins (~berberman@unaffiliated/berberman) |
| 12:41:53 | → | minoru_shiraeesh joins (~shiraeesh@109.166.57.27) |
| 12:42:03 | <dminuoso> | tomsmeding: Mmm, did you ThreadScope it? |
| 12:42:18 | <tomsmeding> | dminuoso: I didn't |
| 12:42:28 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 12:42:56 | tomsmeding | $ cabal install threadscope |
| 12:43:09 | <merijn> | tomsmeding: What was the code? |
| 12:43:25 | <tomsmeding> | merijn: https://paste.tomsmeding.com/dgYMPDCf |
| 12:43:45 | <tomsmeding> | the problem is not unique to the async library though |
| 12:43:52 | <tomsmeding> | it just makes the example shorter |
| 12:44:11 | × | gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
| 12:44:31 | <merijn> | tomsmeding: That hacky seq makes me suspificous |
| 12:44:48 | <tomsmeding> | merijn: how would you write it instead? |
| 12:45:08 | <merijn> | @hackage deepseq |
| 12:45:08 | <lambdabot> | https://hackage.haskell.org/package/deepseq |
| 12:45:21 | <tomsmeding> | oh sure, deepseq does not fix the problem |
| 12:46:12 | <ph88> | tomsmeding, i only see 3 folds where is the 4rd ? |
| 12:46:17 | <ph88> | 3rd |
| 12:46:29 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 12:46:46 | <dminuoso> | Also, I wish I could have a bit more impredicativity. [(Text, forall s. ToField s => s)] is exactly what I want right now. :( |
| 12:46:51 | → | jamm_ joins (~jamm@unaffiliated/jamm) |
| 12:47:16 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
| 12:47:25 | <tomsmeding> | ph88: I read two lists of numbers from input; each of the numbers is processed by one fold |
| 12:47:33 | <merijn> | tomsmeding: Oh, you're not adding type annotations for Int |
| 12:47:41 | <merijn> | tomsmeding: Is it being inferred as Integer maybe? |
| 12:47:41 | <tomsmeding> | the two lists are sequential, but within one list I want to run the folds in parallel |
| 12:47:48 | <tomsmeding> | merijn: see the ':: [[Int]]' |
| 12:47:55 | <tomsmeding> | also I compile with -Wall and there are no warnings |
| 12:48:09 | <merijn> | Anyway |
| 12:48:20 | <merijn> | mapConcurrently is a pretty big hammer |
| 12:48:30 | <merijn> | How big are your lists? |
| 12:48:36 | <merijn> | i.e. how many ints are you folding? |
| 12:48:37 | <tomsmeding> | 15 or so |
| 12:48:57 | <tomsmeding> | the fold is just an example workload though, but it's small and exhibits the same problem |
| 12:49:04 | <tomsmeding> | as my real workload |
| 12:49:07 | <merijn> | tomsmeding: oh |
| 12:49:08 | <merijn> | tomsmeding: Yeah |
| 12:49:17 | × | evandocarmo quits (2f0e0036@047-014-000-054.res.spectrum.com) (Quit: Connection closed) |
| 12:49:17 | <merijn> | tomsmeding: You're never going to see meaningful speedup |
| 12:49:29 | <tomsmeding> | merijn: look again |
| 12:49:37 | <tomsmeding> | each list item produces a fold that runs for 1.44 seconds |
| 12:49:41 | <tomsmeding> | and each of those folds is independent |
| 12:49:56 | <tomsmeding> | I'm expecting a list of 15 items to pin 15 cores for 1.44 seconds, approximately |
| 12:50:02 | <merijn> | I don't see results? |
| 12:50:04 | <ph88> | tomsmeding, how you figure that would speed of over 3 cores though ? still don't get it or see a 3rd fold |
| 12:50:22 | <tomsmeding> | ph88: values1 and values2 have length 3 |
| 12:50:33 | <merijn> | tomsmeding: Do you actually have 15 capabilities running? |
| 12:50:48 | → | frozenErebus joins (~frozenEre@94.128.219.166) |
| 12:51:00 | <tomsmeding> | my test lists (values1 and values2) here are length 3, and I'm passing -N3 or -N4 -- no difference between those two |
| 12:51:04 | <dminuoso> | tomsmeding: I'd wait for ThreadScope results |
| 12:51:10 | <dminuoso> | So we dont have to guess what your capabilities are doing |
| 12:51:16 | <merijn> | tomsmeding: Oh |
| 12:51:19 | <merijn> | tomsmeding: Also |
| 12:51:20 | <tomsmeding> | I'm now going to run threadscope, just compiled :) |
| 12:51:24 | <merijn> | tomsmeding: You're not doing -qg |
| 12:51:33 | <tomsmeding> | merijn: makes no difference |
| 12:51:51 | <tomsmeding> | adding -qg reduces cpu time, but not wall clock time |
| 12:52:03 | <tomsmeding> | (in my real application I'm using -qg) |
| 12:52:07 | × | mputz quits (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) (Quit: mputz) |
| 12:52:18 | → | Tario joins (~Tario@201.192.165.173) |
| 12:52:22 | → | LKoen_ joins (~LKoen@252.248.88.92.rev.sfr.net) |
| 12:53:42 | × | ukari quits (~ukari@unaffiliated/ukari) (Remote host closed the connection) |
| 12:53:45 | <Squarism> | dminuoso, oh, sure. The sort part =D |
| 12:54:27 | → | ukari joins (~ukari@unaffiliated/ukari) |
| 12:54:34 | × | minoru_shiraeesh quits (~shiraeesh@109.166.57.27) (Ping timeout: 260 seconds) |
| 12:54:36 | × | LKoen quits (~LKoen@252.248.88.92.rev.sfr.net) (Ping timeout: 240 seconds) |
| 12:54:38 | → | machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca) |
| 12:55:12 | <tomsmeding> | dminuoso: I have a "weird" run (where less than three folds run in parallel) in threadscope, and I'm seeing what I expect to see: only some of the threads are active https://tomsmeding.com/ss/get/tomsmeding/Yftmj0 |
| 12:55:19 | <tomsmeding> | what should I be looking at? |
| 12:55:27 | → | ghais joins (ac3a030f@gateway/web/cgi-irc/kiwiirc.com/ip.172.58.3.15) |
| 13:02:20 | × | chisui quits (588298ad@88.130.152.173) (Quit: Connection closed) |
| 13:02:40 | → | chisui joins (588298ad@88.130.152.173) |
| 13:03:12 | <merijn> | oh, hah |
| 13:03:12 | → | Wuzzy joins (~Wuzzy@p57a2e7e5.dip0.t-ipconnect.de) |
| 13:03:14 | <merijn> | duh |
| 13:03:37 | <merijn> | mapConcurrently is running the effects in parallel |
| 13:03:57 | <merijn> | but your use of seq is forcing the (sequential) map to evaluate the entire fold before the effect is produced and can be ran |
| 13:03:59 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 13:04:10 | <merijn> | Look at thread activity |
| 13:04:17 | <merijn> | They all start at 1.x offsets |
| 13:04:34 | <merijn> | Exactly as you'd expect for sequential execution |
| 13:04:37 | <tomsmeding> | merijn: but... I'm getting the expected (for me) parallel effects most of the time |
| 13:05:12 | <tomsmeding> | the point of the seq is that mapConcurrently will evaluate the effect in parallel, and that effect is the first thing that forces the fold |
| 13:05:20 | <tomsmeding> | thus I'm expecting the folds to evaluate in parallel |
| 13:05:44 | <tomsmeding> | that the 'print' later also forces the folds is irrelevant, I believe |
| 13:05:49 | <tomsmeding> | is my mental model wrong? |
| 13:06:27 | <merijn> | oh, wait |
| 13:06:35 | <tomsmeding> | I unfortunately have to go for a while |
| 13:06:57 | → | nut joins (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 13:07:26 | <tomsmeding> | will be back later, thanks for your mental cycles you've spent on my problem already :) |
| 13:07:46 | <__monty__> | Maybe it just depends on where the threads get scheduled? |
| 13:08:00 | <dminuoso> | tomsmeding: Id look at the event log itself |
| 13:08:05 | <dminuoso> | (tab raw events) |
| 13:08:09 | <merijn> | __monty__: If you look at his threadscope you see the 2nd and 3rd threads don't start until after 1.2s |
| 13:08:24 | <merijn> | Which given his estimate of 1.4s runtime implies you're just running sequentially |
| 13:08:25 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Client Quit) |
| 13:08:35 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 13:08:42 | × | son0p quits (~son0p@181.58.39.182) (Quit: leaving) |
| 13:08:56 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 13:09:23 | <dminuoso> | tomsmeding: Can you share the eventlog perhaps? |
| 13:09:25 | <tomsmeding> | merijn: how do you explain threads 2 and 3 running in parallel then, and threads 4, 5 and 6 too? |
| 13:09:30 | <dminuoso> | I cant reproduce it locally |
| 13:09:32 | → | geekosaur joins (82650c7a@130.101.12.122) |
| 13:09:41 | <tomsmeding> | dminuoso: in a while, sorry :( |
| 13:09:52 | <dminuoso> | No worries, it's your problem |
| 13:09:54 | <dminuoso> | ;) |
| 13:12:05 | × | frozenErebus quits (~frozenEre@94.128.219.166) (Ping timeout: 240 seconds) |
| 13:13:09 | × | ghais quits (ac3a030f@gateway/web/cgi-irc/kiwiirc.com/ip.172.58.3.15) (Ping timeout: 264 seconds) |
| 13:14:21 | <dminuoso> | intercalate :: [a] -> [[a]] -> [a] |
| 13:14:32 | <dminuoso> | Mmm, why is this constrained to [] - this should be generalized to Monoid on the inner list |
| 13:14:52 | <dminuoso> | Or is this just some case of "nobody has bothered before"? |
| 13:14:56 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 13:15:17 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 13:15:25 | <dminuoso> | Oh. The Haskell Reports demands it that way. |
| 13:16:25 | × | rzmt quits (~rzmt@87-92-180-112.rev.dnainternet.fi) (Ping timeout: 240 seconds) |
| 13:16:56 | → | sablib joins (~sablib@171.113.165.65) |
| 13:17:22 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:15cd:c67f:11dd:b9fc) |
| 13:17:26 | → | elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) |
| 13:18:14 | → | Benzi-Junior joins (~BenziJuni@dsl-149-67-143.hive.is) |
| 13:19:04 | → | rzmt joins (~rzmt@87-92-180-112.rev.dnainternet.fi) |
| 13:22:53 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:15cd:c67f:11dd:b9fc) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 13:23:21 | × | cafce25 quits (~cafce25@ipbcc3009d.dynamic.kabel-deutschland.de) (Remote host closed the connection) |
| 13:24:34 | → | bitmapper joins (uid464869@gateway/web/irccloud.com/x-kljuzclzqvltjlcu) |
| 13:24:46 | → | ddellacosta joins (~ddellacos@86.106.143.124) |
| 13:25:27 | → | aggin joins (~ecm@103.88.87.38) |
| 13:26:23 | → | geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) |
| 13:28:24 | → | gienah joins (~mwright@gentoo/developer/gienah) |
| 13:29:21 | × | ddellacosta quits (~ddellacos@86.106.143.124) (Ping timeout: 264 seconds) |
| 13:29:52 | → | acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) |
| 13:31:08 | → | aqd joins (~aqd@84.20.147.33) |
| 13:32:47 | → | son0p joins (~son0p@181.136.122.143) |
| 13:32:57 | → | Guest90 joins (506fd516@gateway/web/cgi-irc/kiwiirc.com/ip.80.111.213.22) |
| 13:35:08 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 13:35:24 | <int-e> | :t length |
| 13:35:26 | <lambdabot> | Foldable t => t a -> Int |
| 13:35:28 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 13:35:30 | <merijn> | dminuoso: Deliver us from this mess! |
| 13:35:45 | <int-e> | dminuoso: not sure how much of an argument that is these days |
| 13:37:00 | <kuribas> | It's still compatible with it... |
| 13:37:23 | <merijn> | kuribas: No |
| 13:37:30 | <merijn> | Hasn't been for a decade :p |
| 13:37:30 | <dminuoso> | % intercalate :: (Monoid m, Foldable f) => m -> f m -> m; intercalate e = fold . intersperse e . toList |
| 13:37:30 | × | forgottenone quits (~forgotten@176.42.18.230) (Ping timeout: 260 seconds) |
| 13:37:31 | <yahb> | dminuoso: |
| 13:39:01 | <kuribas> | merijn: I mean the type with monoid can be compatible with the report version, not the same. |
| 13:39:30 | <dminuoso> | I suppose the primary argument against this generalized intercalate, is that overly generalized functions hinder the learning experience. |
| 13:39:32 | × | zaquest quits (~notzaques@5.128.210.178) (Quit: Leaving) |
| 13:40:15 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds) |
| 13:40:25 | <dminuoso> | But, perhaps, we should have a sort of haskell report compat prelude, which contains all the monomorphized goodies and comes with separate haddock |
| 13:40:37 | <swarmcollective> | kuribas, I agree, but it seems as though a "This can be thought of as: ..." in the docs / comments would help mitigate that. |
| 13:41:38 | <kuribas> | I don't see why a language needs to be written to be easy for beginners... |
| 13:42:03 | <kuribas> | You can always present the beginner an simplified environment. |
| 13:42:37 | <__monty__> | It's an easy way to get users. "Python's great for beginners!" Now look at what havoc they have wreaked. |
| 13:42:39 | <swarmcollective> | Perhaps even a `verbose` mode for HLS to show the actual definition `m -> f m -> m` and the `[a] -> [[a]] -> [a]` that a beginner can enable as needed.\ |
| 13:42:51 | <kuribas> | I think haskell already took that route with the Monad/Applicative/Functor proposal. |
| 13:43:21 | <kuribas> | And the many generalized functions in base. |
| 13:43:26 | <dminuoso> | __monty__: I guess its a difficult trade off. If you cater too much to your experienced users, the raised bar will lower adoption. |
| 13:43:34 | <ski> | Racket has "language levels", where the lower ones present a simpler language, and simpler, less general, operations |
| 13:43:47 | <maerwald> | kuribas: yeah, there were attempts at doing that with haskell, so you could only use parts of the language features and have to unlock. As a learning platform. I'm not sure how that project turned out. |
| 13:43:55 | <dminuoso> | ski: And Im sure this comes at an engineering price. |
| 13:43:56 | <ski> | @where Helium |
| 13:43:56 | <lambdabot> | http://www.cs.uu.nl/research/projects/helium/ |
| 13:44:27 | <dminuoso> | I for one would like to see varying degrees of diagnostics levels, so I can tweak GHC for the odd error to tell me as much technical stuff as it can |
| 13:44:42 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 13:44:44 | <dminuoso> | (I dont mind the word "skolem", for instance) |
| 13:45:08 | ski | prefers it |
| 13:45:27 | → | zaquest joins (~notzaques@5.128.210.178) |
| 13:45:34 | × | drbean_ quits (~drbean@TC210-63-209-168.static.apol.com.tw) (Ping timeout: 265 seconds) |
| 13:45:34 | __monty__ | never remembers what it means |
| 13:45:36 | <dminuoso> | It's likely having multiple such diagnostics levels would be readily accepted (if we can get through the bike shedding of what those levels look like, and what the diagnostics should read) |
| 13:45:42 | <dminuoso> | Just needs someone to implement it. |
| 13:46:49 | <dminuoso> | __monty__: Do you find "rigid" to be helpful/meaningful? |
| 13:47:46 | <__monty__> | Might make it harder to help beginners though. Because experts are no longer familiar with the simple error messages. Which might then drive beginners who look for help regularly to just always turn on the complex messages. |
| 13:48:58 | <__monty__> | dminuoso: Not without context. |
| 13:51:06 | <chibi> | There's a lot of errors that're hard to figure out. |
| 13:51:26 | <chibi> | "Cannot construct the infinite type" is one particularly hellish one for begininers |
| 13:52:10 | <merijn> | Complaining about "bad" error messages is easy. Coming up with better one is *hard* |
| 13:52:50 | <chibi> | tru, tru |
| 13:52:51 | <merijn> | If you have better ideas on how to word error messages I'm very sure people in #ghc will be happy to hear your suggestions |
| 13:53:13 | → | Martinsos joins (~user@cpe-188-129-56-3.dynamic.amis.hr) |
| 13:53:22 | × | Guest90 quits (506fd516@gateway/web/cgi-irc/kiwiirc.com/ip.80.111.213.22) (Ping timeout: 260 seconds) |
| 13:53:58 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 13:53:59 | <Martinsos> | I have a stack haskell project, and errors I get from my exe are: |
| 13:54:13 | <Martinsos> | wasp: /Users/matija/git/wasp-lang/wasp/waspc/examples/todoApp/ext/Todo.js~: openFile: does not exist (No such file or directory) |
| 13:54:25 | × | nut quits (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 256 seconds) |
| 13:54:29 | <Martinsos> | wasp-bin: .../workspace/hello-wasp/MyNewApp/ext/waspLogo.png: copyFile:atomicCopyFileContents:withReplacementFile:copyFileToHandle:openBinaryFile: does not exist (No such file or directory) |
| 13:55:00 | <Martinsos> | Is there any way to get more information on these errors? Like proper stack trace? Especially the first one, where I get just openFile. |
| 13:55:39 | <merijn> | Is that an error from your code or from stack? |
| 13:55:49 | <Martinsos> | I tried using `stack build --profile` and then calling with `stack exec --profile -- wasp start +RTS -p` but that didn't change anything. |
| 13:56:01 | <Martinsos> | That is error from my code |
| 13:56:10 | <merijn> | Martinsos: You want "+RTS -xc" to get a stack trace from your profiled build |
| 13:56:27 | <Martinsos> | When calling exe or when compiling? |
| 13:56:31 | <merijn> | When calling |
| 13:56:45 | <merijn> | instead of "+RTS -p" |
| 13:56:58 | <Martinsos> | ok, so `stack build --profile` is ok, but I should do `stack exec --profile -- wasp start +RTS -xc`? |
| 13:57:06 | <merijn> | I think -p is just profiling, which is not what you want. -xc triggers stack traces on all thrown exceptions |
| 13:57:06 | × | swarmcollective quits (~joseph@cpe-65-31-18-174.insight.res.rr.com) (Ping timeout: 260 seconds) |
| 13:57:11 | <merijn> | Martinsos: Yeah |
| 13:57:18 | <Martinsos> | Ok awesome, will give it a try now! |
| 13:57:30 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 13:57:43 | → | swarmcollective joins (~joseph@cpe-65-31-18-174.insight.res.rr.com) |
| 13:57:44 | <merijn> | Martinsos: But it looks like your code is trying to access a temporary (emacs?) file |
| 13:57:51 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 13:57:58 | <merijn> | .js~ tildes are usually temporary editor files |
| 13:58:37 | → | lawr3nce joins (~lawr3nce@gateway/tor-sasl/lawr3nce) |
| 13:58:45 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
| 13:59:05 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 13:59:05 | <ski> | (s/temporary/backup/, i guess) |
| 14:01:32 | geekosaur | was wondering if it was backing up some data file it's about to modify |
| 14:06:02 | × | cur8or quits (~cur8or@2c0f:fbe1:3:17:6d77:f5a5:800f:317) (Ping timeout: 264 seconds) |
| 14:06:46 | × | aggin quits (~ecm@103.88.87.38) (Quit: WeeChat 3.0.1) |
| 14:07:02 | → | aggin joins (~ecm@103.88.87.38) |
| 14:07:26 | × | thonkpod quits (~thonkpod@2001:19f0:ac01:b46:5400:1ff:fec7:d73d) (Ping timeout: 240 seconds) |
| 14:07:53 | ← | aggin parts (~ecm@103.88.87.38) () |
| 14:09:25 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 240 seconds) |
| 14:09:27 | × | Rudd0 quits (~Rudd0@185.189.115.103) (Ping timeout: 246 seconds) |
| 14:09:51 | → | thonkpod joins (~thonkpod@2001:19f0:ac01:b46:5400:1ff:fec7:d73d) |
| 14:11:19 | → | deviantfero joins (~deviantfe@190.150.27.58) |
| 14:11:52 | → | Lowl3v3l joins (~Lowl3v3l@dslb-002-203-233-121.002.203.pools.vodafone-ip.de) |
| 14:11:58 | <Martinsos> | +merijn yes, it is getting stuck on vim swap files, and we know that is the cause, but it goes beyond that. Anyway, it is good to know in general how to find stack trace for exceptions :D. Anyway, not it works and we figured out where the error is, thanks a lot! |
| 14:16:29 | × | ystael quits (~ystael@209.6.50.55) (Read error: Connection reset by peer) |
| 14:17:30 | → | ep1ctetus joins (~epictetus@ip72-194-215-136.sb.sd.cox.net) |
| 14:17:35 | <Martinsos> | The problem exactly is: We have our compiler and when in dev mode it watches sourc efiles for changes. First it makes a list of those files and then a little bit later it copies them (for specific reasons), but if some of the files dissapears for some reason (could be caused by editor backup files or smth else), then we get an error. So we are making sure we ignore "does not exist" error in that case, but it was happening on couple of |
| 14:17:35 | <Martinsos> | places in the codebase and we couldn't figure out from error messages where the error is coming from. |
| 14:20:58 | × | rdivyanshu quits (uid322626@gateway/web/irccloud.com/x-tworbfpnkgwjjhuq) (Quit: Connection closed for inactivity) |
| 14:21:20 | <merijn> | \o/ |
| 14:21:31 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-4-36.w83-200.abo.wanadoo.fr) |
| 14:21:55 | → | stree joins (~stree@68.36.8.116) |
| 14:23:09 | <tomsmeding> | dminuoso: https://tomsmeding.com/f/thread-stuff-1.eventlog |
| 14:23:16 | × | ph88 quits (~ph88@ip5f5af71a.dynamic.kabel-deutschland.de) (Ping timeout: 265 seconds) |
| 14:23:58 | <tomsmeding> | dminuoso: that's from this program: https://paste.tomsmeding.com/89q1Gdfk |
| 14:24:06 | <tomsmeding> | (parsecAsync is unused) |
| 14:24:12 | <tomsmeding> | (both exhibit the same issue sometimes) |
| 14:24:16 | → | conal joins (~conal@64.71.133.70) |
| 14:24:53 | <tomsmeding> | dminuoso: and what that outputs is here https://paste.tomsmeding.com/7zo6Yish |
| 14:25:22 | <tomsmeding> | might this be a result of the foldl loop never allocating? |
| 14:28:52 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:197a:8f1e:d522:cd3a) |
| 14:30:25 | → | ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 14:31:29 | × | Martinsos quits (~user@cpe-188-129-56-3.dynamic.amis.hr) (Remote host closed the connection) |
| 14:31:36 | × | darjeeling_ quits (~darjeelin@122.245.217.214) (Ping timeout: 240 seconds) |
| 14:33:38 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:197a:8f1e:d522:cd3a) (Ping timeout: 264 seconds) |
| 14:33:56 | × | borne quits (~fritjof@200116b864cae2007d6d461afdb4e2ff.dip.versatel-1u1.de) (Ping timeout: 240 seconds) |
| 14:34:54 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 260 seconds) |
| 14:36:21 | × | kritzefitz quits (~kritzefit@fw-front.credativ.com) (Ping timeout: 256 seconds) |
| 14:37:17 | × | raym quits (~ray@45.64.220.3) (Quit: leaving) |
| 14:39:36 | → | Stanley00 joins (~stanley00@unaffiliated/stanley00) |
| 14:40:20 | × | zar quits (~zar@fw1.ciirc.cvut.cz) (Remote host closed the connection) |
| 14:40:34 | → | alx741 joins (~alx741@186.178.109.47) |
| 14:41:04 | × | lawr3nce quits (~lawr3nce@gateway/tor-sasl/lawr3nce) (Remote host closed the connection) |
| 14:41:41 | → | zar joins (~zar@fw1.ciirc.cvut.cz) |
| 14:42:37 | → | borne joins (~fritjof@200116b864cae20010f2d07664396fd4.dip.versatel-1u1.de) |
| 14:42:42 | → | aggin joins (~ecm@103.88.87.38) |
| 14:43:45 | × | Stanley00 quits (~stanley00@unaffiliated/stanley00) (Ping timeout: 240 seconds) |
| 14:46:33 | × | ep1ctetus quits (~epictetus@ip72-194-215-136.sb.sd.cox.net) (Ping timeout: 246 seconds) |
| 14:46:45 | × | tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection) |
| 14:49:07 | → | tromp joins (~tromp@dhcp-077-249-230-040.chello.nl) |
| 14:49:58 | × | shatriff quits (~vitaliish@protective.remission.volia.net) (Remote host closed the connection) |
| 14:50:12 | → | shatriff joins (~vitaliish@protective.remission.volia.net) |
| 14:50:32 | → | Sgeo joins (~Sgeo@ool-18b98aa4.dyn.optonline.net) |
| 14:52:05 | → | darjeeling_ joins (~darjeelin@122.245.217.214) |
| 14:52:58 | × | geekosaur quits (82650c7a@130.101.12.122) (Quit: Connection closed) |
| 14:54:16 | × | Narinas quits (~Narinas@189.223.59.23.dsl.dyn.telnor.net) (Read error: Connection reset by peer) |
| 14:54:28 | → | Sheilong joins (uid293653@gateway/web/irccloud.com/x-obkjpkspijblnyqm) |
| 14:54:41 | → | Narinas joins (~Narinas@189.223.59.23.dsl.dyn.telnor.net) |
| 14:55:32 | × | Narinas quits (~Narinas@189.223.59.23.dsl.dyn.telnor.net) (Read error: Connection reset by peer) |
| 14:55:50 | × | shutdown_-h_now quits (~arjan@2001:1c06:2d0b:2312:b54e:a99d:8dc7:f0b) (Ping timeout: 264 seconds) |
| 14:56:15 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:15cd:c67f:11dd:b9fc) |
| 14:56:44 | → | Narinas joins (~Narinas@189.223.59.23.dsl.dyn.telnor.net) |
| 14:57:03 | → | kritzefitz joins (~kritzefit@fw-front.credativ.com) |
| 14:59:30 | → | nhs joins (~nhs@c-67-180-177-103.hsd1.ca.comcast.net) |
| 15:00:16 | × | aggin quits (~ecm@103.88.87.38) (Quit: WeeChat 3.0.1) |
| 15:01:24 | → | shutdown_-h_now joins (~arjan@2001:1c06:2d0b:2312:750e:d23:b28:17e4) |
| 15:02:32 | × | darjeeling_ quits (~darjeelin@122.245.217.214) (Ping timeout: 272 seconds) |
| 15:02:32 | × | Guest72364 quits (~textual@zrcout.mskcc.org) (Ping timeout: 272 seconds) |
| 15:03:10 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 15:03:56 | × | thc202 quits (~thc202@unaffiliated/thc202) (Ping timeout: 240 seconds) |
| 15:04:10 | <tomsmeding> | the problem seems fixed if I use forkOn 🤷 |
| 15:04:24 | → | thc202 joins (~thc202@unaffiliated/thc202) |
| 15:04:38 | → | Alleria joins (~textual@mskresolve-a.mskcc.org) |
| 15:05:02 | Alleria | is now known as Guest75413 |
| 15:06:00 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:15cd:c67f:11dd:b9fc) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 15:06:31 | → | cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net) |
| 15:06:54 | AWizzArd_ | is now known as AWizzArd |
| 15:06:57 | × | berberman quits (~berberman@unaffiliated/berberman) (Quit: ZNC 1.8.2 - https://znc.in) |
| 15:07:10 | × | AWizzArd quits (~code@gehrels.uberspace.de) (Changing host) |
| 15:07:10 | → | AWizzArd joins (~code@unaffiliated/awizzard) |
| 15:07:23 | → | berberman joins (~berberman@unaffiliated/berberman) |
| 15:08:05 | <tomsmeding> | (using ghc 8.10.4 instead of 8.8.4 doesn't fix it either) |
| 15:10:36 | × | aqd quits (~aqd@84.20.147.33) (Ping timeout: 240 seconds) |
| 15:12:34 | <tomsmeding> | forkOn does _not_ fix my problem, lol |
| 15:12:55 | <tomsmeding> | gotta love this timeline https://tomsmeding.com/ss/get/tomsmeding/V6WqzX |
| 15:14:10 | → | fendor_ joins (~fendor@178.115.129.208.wireless.dyn.drei.com) |
| 15:14:22 | <tomsmeding> | accompanying eventlog: https://tomsmeding.com/f/thread-stuff-2.eventlog |
| 15:14:34 | <merijn> | tomsmeding: anyway, if this is pure code, shouldn't you be using sparks and parallel strategies, rather than mapConcurrently? |
| 15:14:55 | <tomsmeding> | maybe I should! |
| 15:15:01 | <merijn> | tomsmeding: Hypothesis: |
| 15:15:21 | <merijn> | Your argument to mapConcurrently *does* execute the operation in the thread |
| 15:15:44 | <merijn> | tomsmeding: But! Since mapConcurrently has unbounded parallelism, you create more threads than capabilities |
| 15:16:12 | <tomsmeding> | I'm passing a list of size 3 to mapConcurrently, and my machine has 8 virtual cores, so that "but" is false, I think |
| 15:16:12 | <merijn> | Causing the capability running mapConcurrently to context switch to one of your forked threads from mapConcurrently |
| 15:16:23 | <tomsmeding> | though I am passing -N3 indeed |
| 15:16:27 | <merijn> | tomsmeding: You said you did -N3 |
| 15:16:52 | <merijn> | tomsmeding: Haskell code only executes on a capability |
| 15:17:00 | <tomsmeding> | yes sorry I forgot for a moment |
| 15:17:05 | × | fendor quits (~fendor@178.165.129.166.wireless.dyn.drei.com) (Ping timeout: 272 seconds) |
| 15:17:15 | <tomsmeding> | so your hypothesis is that the thread running mapConcurrently takes over a capability? |
| 15:17:50 | <merijn> | tomsmeding: My hypothesis is that one of your folds gets scheduled on the mapConcurrently thread, blocking it from spawning more children until another context switch |
| 15:17:52 | <tomsmeding> | then I wonder why the RTS doesn't re-schedule one of the cpu-intensive threads back onto that capability when the initial thread is inevitably done doing stuff |
| 15:17:55 | × | toorevitimirp quits (~tooreviti@117.182.181.253) (Remote host closed the connection) |
| 15:17:57 | <tomsmeding> | OH |
| 15:18:33 | <merijn> | tomsmeding: The threading isn't actually pre-emptive, if you never allocate (which might hold for your fold) you get stuck until it's done |
| 15:19:09 | × | mnrmnaugh quits (~mnrmnaugh@unaffiliated/mnrmnaugh) (Ping timeout: 264 seconds) |
| 15:19:09 | <tomsmeding> | that is a _very_ likely hypothesis |
| 15:19:24 | → | hekkaidekapus] joins (~tchouri@gateway/tor-sasl/hekkaidekapus) |
| 15:20:59 | → | mnrmnaugh joins (~mnrmnaugh@unaffiliated/mnrmnaugh) |
| 15:21:12 | <merijn> | tomsmeding: I have a bounded mapConcurrently, btw |
| 15:21:29 | <tomsmeding> | I have my own too :p |
| 15:21:34 | <tomsmeding> | but this is a more basic problem |
| 15:21:34 | <merijn> | Then you could ensure you bound yourself to N-1 workers |
| 15:21:54 | <tomsmeding> | makes sense, but then how do I use the full parallelism of my machine? :p |
| 15:21:59 | <tomsmeding> | -N$(ncores+1) ? |
| 15:22:04 | <tomsmeding> | also what are sparks |
| 15:22:07 | <merijn> | tomsmeding: tbh, you don't |
| 15:22:15 | <tomsmeding> | I don't? |
| 15:22:17 | <merijn> | tomsmeding: Dependent on how many cores you have |
| 15:22:20 | <tomsmeding> | 8 |
| 15:22:26 | <merijn> | GHC RTS degrades pretty hard above 8 |
| 15:22:48 | <tomsmeding> | also if all jobs are independent? |
| 15:23:05 | <merijn> | tomsmeding: You check at runtime how many capabilities you have and spawn that many -1 workers? :p |
| 15:23:12 | → | darjeeling_ joins (~darjeelin@122.245.217.214) |
| 15:23:15 | <merijn> | tomsmeding: Global GC pause kills you at some point |
| 15:23:26 | × | hekkaidekapus[ quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 268 seconds) |
| 15:23:32 | → | vicfred joins (~vicfred@unaffiliated/vicfred) |
| 15:23:37 | <tomsmeding> | yes makes sense, but I'd like to be able to run N jobs on a machine with N cores :p |
| 15:23:59 | <merijn> | tomsmeding: then you need to spawn them all first :p |
| 15:24:37 | <tomsmeding> | is that possible (reliably) without -N$(ncores+1)? |
| 15:25:07 | <merijn> | Just make sure they're all suspended until you're done spawning jobs :p |
| 15:25:37 | <merijn> | Can't be done with mapConcurrently as is, though |
| 15:25:47 | <tomsmeding> | I have my own version of mapConcurrently anyway |
| 15:25:49 | <tomsmeding> | but that's a good idea |
| 15:25:54 | <merijn> | tomsmeding: I have something like: https://hackage.haskell.org/package/broadcast-chan-0.2.1.1/docs/BroadcastChan.html#v:parFoldMap |
| 15:26:20 | <merijn> | tomsmeding: Sparks are GHC's mechanism for "pure" parallelism |
| 15:26:44 | <merijn> | @hackage parallel |
| 15:26:44 | <lambdabot> | https://hackage.haskell.org/package/parallel |
| 15:27:36 | <tomsmeding> | can't be done using just base? |
| 15:28:25 | <merijn> | It can, if you reinvent parallel from GHC's primitives :p |
| 15:28:38 | <tomsmeding> | oh so the 'parallel' library implements the stuff using GHC.Conc.par? |
| 15:28:49 | ← | ailrk parts (~Ailrk@99.199.143.168) ("WeeChat 3.0") |
| 15:29:17 | <merijn> | Yeah |
| 15:29:24 | <tomsmeding> | I see, thanks |
| 15:29:35 | × | DataComputist quits (~lumeng@50.43.26.251) (Read error: Connection reset by peer) |
| 15:29:36 | × | deviantfero quits (~deviantfe@190.150.27.58) (Ping timeout: 240 seconds) |
| 15:29:39 | <merijn> | Well, and deepseq |
| 15:29:45 | <tomsmeding> | sure |
| 15:30:10 | <tomsmeding> | how do you make sure all worker threads are suspended until all are spawned, by letting them all wait on a BroadcastChan? |
| 15:30:13 | <tomsmeding> | in your lib |
| 15:30:26 | × | chisui quits (588298ad@88.130.152.173) (Quit: Connection closed) |
| 15:30:49 | <merijn> | That function doesn't try that, tbh |
| 15:31:01 | <merijn> | Because I made it mostly for IO-bound problems |
| 15:31:22 | × | Wuzzy quits (~Wuzzy@p57a2e7e5.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 15:31:23 | <merijn> | tomsmeding: So the parallel tasks quickly block and free up a capability |
| 15:31:28 | <tomsmeding> | I see |
| 15:31:31 | × | perrier-jouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 3.0) |
| 15:31:54 | <tomsmeding> | would I be able to do it by letting them all do a readMVar before starting compute-intensive work, and doing a put on that MVar when all workers have been spawned? |
| 15:32:00 | <merijn> | tomsmeding: But also, correctly doing mapConcurrently is *hard* and I wouldn't recommend people do it themselves :p |
| 15:32:04 | <tomsmeding> | sparks are probably a better idea, but just for my understanding |
| 15:32:13 | <merijn> | tomsmeding: That was my idea, yeah |
| 15:32:36 | <tomsmeding> | "hard" <- because of exceptions and such? |
| 15:32:56 | <merijn> | tomsmeding: Yes |
| 15:33:03 | <tomsmeding> | yes makes sense |
| 15:33:15 | <merijn> | tomsmeding: Cleanup too |
| 15:33:36 | <tomsmeding> | I wasn't trying to handle exceptions in any kind of graceful way in my code, which is fine for my current purpose |
| 15:33:38 | <merijn> | I like to think I'm fairly good at this stuff, and I *still* got a race condition in my cleanup |
| 15:33:40 | → | perrier-jouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) |
| 15:33:42 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 15:33:43 | <tomsmeding> | :p |
| 15:33:57 | <tomsmeding> | I'll certainly try sparks |
| 15:34:03 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 15:36:29 | → | chisui joins (588298ad@88.130.152.173) |
| 15:38:06 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-4-36.w83-200.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 15:38:28 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-4-36.w83-200.abo.wanadoo.fr) |
| 15:38:36 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds) |
| 15:40:47 | × | acidjnk_new quits (~acidjnk@p200300d0c739095610730469cbb40c42.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 15:43:28 | → | ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 15:46:00 | → | ddellaco_ joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 15:47:02 | × | chisui quits (588298ad@88.130.152.173) (Ping timeout: 240 seconds) |
| 15:48:07 | → | idhugo_ joins (~idhugo@80-62-117-97-mobile.dk.customer.tdc.net) |
| 15:48:10 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 260 seconds) |
| 15:49:12 | → | ph88 joins (~ph88@2a01:598:b102:b35c:48a1:e13:f0f:87d6) |
| 15:49:34 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 15:49:49 | → | Guest_88 joins (5619784f@cpc143846-cosh20-2-0-cust78.6-1.cable.virginm.net) |
| 15:50:38 | <tomsmeding> | merijn: this still has suboptimal parallelism: https://paste.tomsmeding.com/YrcNhWBd ; am I doing something wrong? |
| 15:50:38 | × | idhugo quits (~idhugo@80-62-117-86-mobile.dk.customer.tdc.net) (Ping timeout: 256 seconds) |
| 15:51:00 | <tomsmeding> | 'parList rseq' and 'parList rpar' give the same results; 'evalList rseq' is nicely sequential as expected |
| 15:51:32 | <merijn> | tomsmeding: Time to dive into the core |
| 15:51:49 | <merijn> | Maybe your computation is getting floated out or something like that :p |
| 15:51:59 | <tomsmeding> | same workload (values1 and values2 have length 3), -N4 -qg -l, threadscope: https://tomsmeding.com/ss/get/tomsmeding/7ajG92 |
| 15:52:12 | <tomsmeding> | we need to go deeper |
| 15:52:32 | <tomsmeding> | but... why is it _somewhat_ parallel? I'd understand something can float out and make it all sequential |
| 15:52:35 | <tomsmeding> | but only _some_? |
| 15:53:15 | tomsmeding | is very confused by the threadscope diagram just sent because it looks like there are four jobs; there aren't |
| 15:53:59 | × | ph88 quits (~ph88@2a01:598:b102:b35c:48a1:e13:f0f:87d6) (Read error: Connection reset by peer) |
| 15:54:15 | <tomsmeding> | I fail to see how what I want to do is odd :') |
| 15:54:31 | × | ericsagn1 quits (~ericsagne@2405:6580:0:5100:d940:32bf:aa80:d462) (Ping timeout: 258 seconds) |
| 15:54:49 | → | minoru_shiraeesh joins (~shiraeesh@109.166.57.27) |
| 15:55:07 | <merijn> | tomsmeding: "having N compute heavy jobs on a machine with N cores" is, tbh, rather odd and widely (in HPC and systems circles, anyway) considered a Bad Idea (TM) |
| 15:55:14 | → | hnOsmium0001 joins (uid453710@gateway/web/irccloud.com/x-egwwbykbvjogeigc) |
| 15:55:16 | <tomsmeding> | is it? |
| 15:55:27 | <tomsmeding> | TIL |
| 15:55:35 | <merijn> | Yes, because you, presumably have system processes running in the background too |
| 15:55:40 | <tomsmeding> | regardless this is with -N4 with 3 jobs :p |
| 15:55:48 | <tomsmeding> | right |
| 15:56:13 | × | LKoen_ quits (~LKoen@252.248.88.92.rev.sfr.net) (Remote host closed the connection) |
| 15:58:46 | → | unlink_ joins (~unlink2@p200300ebcf0f8d001f09418ffc2ea630.dip0.t-ipconnect.de) |
| 15:59:56 | × | unlink2 quits (~unlink2@p200300ebcf241100fcf67590445edc70.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 16:00:41 | → | jedws joins (~jedws@101.184.202.248) |
| 16:01:06 | <Guest_88> | Hi, im trying to get Haskell running on my Mac for the first time. It says ive installed GHC, Cabal and HLS. but when I run `ghci` I don't get anything. It says I need to adjust my path variable but im a complete noob and idrk what im doing. Any help would be appreciated |
| 16:01:12 | fendor_ | is now known as fendor |
| 16:01:42 | <nshepperd> | related to this topic, i just realised that i fudged up -- i have a gui application which spawns a thread to do some heavy processing in the background, and cancels the running thread with killThread when the job is no longer relevant. BUT that background thread itself spawns more threads because it uses 'parallel' to do the work, and those threads don't get killed |
| 16:02:01 | × | jedws quits (~jedws@101.184.202.248) (Client Quit) |
| 16:02:15 | <nshepperd> | resulting in regrettable waste of cpu and memory while these zombie threads live out their sentences |
| 16:02:33 | <tomsmeding> | Guest_88: how did you install GHC? |
| 16:02:50 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:914c:edd0:a91d:47) |
| 16:03:01 | <tomsmeding> | also, what shell are you running? (most likely bash or zsh if you didn't change anything, depending on your macOS version IIRC) |
| 16:03:07 | <merijn> | Guest_88: Did you use ghcup? |
| 16:03:34 | <Guest_88> | I ran the curl function in terminal |
| 16:03:37 | <merijn> | nshepperd: That's why async has link/link2 |
| 16:03:46 | <Guest_88> | yes it says ghcup installer |
| 16:03:49 | → | ariel_ joins (~ariel_@185.163.110.108) |
| 16:03:53 | <merijn> | nshepperd: So you can link child threads to be killed when their parent gets killed |
| 16:04:06 | <tomsmeding> | Guest_88: try opening a new terminal and trying ghci there? |
| 16:04:09 | → | conal joins (~conal@64.71.133.70) |
| 16:04:11 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 16:04:30 | <Guest_88> | oh wow |
| 16:04:41 | <Guest_88> | hahahahah, thank you. cannot believe I didn't try that |
| 16:04:59 | <tomsmeding> | ghcup probably changed your .bashrc (initialisation script for your shell), but that does not change the current session |
| 16:05:09 | <tomsmeding> | you have to, well, initialise a new shell to pick up the changes :) |
| 16:05:11 | <nshepperd> | yes. so it seems like i have to use evaluate / mapConcurrently / unsafePerformIO instead of parallel |
| 16:05:32 | <Guest_88> | thanks guys appreciate it a lot:) can do uni work now |
| 16:05:38 | <tomsmeding> | Guest_88: good luck! |
| 16:06:35 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:914c:edd0:a91d:47) (Client Quit) |
| 16:07:09 | → | ericsagn1 joins (~ericsagne@2405:6580:0:5100:e26e:cf9:1dd6:9615) |
| 16:07:36 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:b8ec:9dfb:e531:1ee7:9134) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 16:07:56 | × | geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 240 seconds) |
| 16:08:08 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:914c:edd0:a91d:47) |
| 16:10:20 | → | unlink2 joins (~unlink2@p200300ebcf0faf0012aa3378b7c33d3b.dip0.t-ipconnect.de) |
| 16:10:26 | <tomsmeding> | merijn: sparks consistently don't work for me; probably doing something wrong but I don't know what |
| 16:10:48 | <tomsmeding> | (don't work = for some reason schedule spark evaluation later than necessary) |
| 16:10:55 | <merijn> | I haven't used them much, tbh |
| 16:11:07 | × | unlink_ quits (~unlink2@p200300ebcf0f8d001f09418ffc2ea630.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 16:12:17 | → | Rudd0 joins (~Rudd0@185.189.115.103) |
| 16:13:53 | × | viluon quits (uid453725@gateway/web/irccloud.com/x-ytvknempinpnbtej) (Quit: Connection closed for inactivity) |
| 16:17:30 | → | Stanley00 joins (~stanley00@unaffiliated/stanley00) |
| 16:21:41 | → | aarvar joins (~foewfoiew@2601:602:a080:fa0:394a:95d6:26a0:dc43) |
| 16:25:03 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:914c:edd0:a91d:47) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 16:26:57 | × | teardown quits (~user@gateway/tor-sasl/mrush) (Ping timeout: 268 seconds) |
| 16:27:26 | → | aveltras joins (uid364989@gateway/web/irccloud.com/x-uqbohaylhggekrjl) |
| 16:27:27 | × | chele quits (~chele@ip5b40237d.dynamic.kabel-deutschland.de) (Remote host closed the connection) |
| 16:27:42 | → | LKoen joins (~LKoen@252.248.88.92.rev.sfr.net) |
| 16:30:23 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 265 seconds) |
| 16:30:29 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:5cae:3825:c434:6c4) |
| 16:32:06 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 16:32:52 | × | notzmv quits (~user@unaffiliated/zmv) (Remote host closed the connection) |
| 16:33:24 | × | ukari quits (~ukari@unaffiliated/ukari) (Remote host closed the connection) |
| 16:33:40 | → | notzmv joins (~user@unaffiliated/zmv) |
| 16:33:50 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:914c:edd0:a91d:47) |
| 16:34:36 | → | ukari joins (~ukari@unaffiliated/ukari) |
| 16:34:56 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:5cae:3825:c434:6c4) (Ping timeout: 240 seconds) |
| 16:37:11 | × | notzmv quits (~user@unaffiliated/zmv) (Remote host closed the connection) |
| 16:37:14 | → | DTZUZU_ joins (~DTZUZU@207.81.119.43) |
| 16:37:54 | → | ph88 joins (~ph88@2a02:8109:9e00:7e5c:b59a:7ec4:364a:86c6) |
| 16:38:22 | → | ezrakilty joins (~ezrakilty@97-113-55-149.tukw.qwest.net) |
| 16:38:28 | × | DTZUZU quits (~DTZUZU@205.ip-149-56-132.net) (Read error: Connection reset by peer) |
| 16:39:00 | → | DTZUZU__ joins (~DTZUZU@205.ip-149-56-132.net) |
| 16:39:41 | → | pja joins (~phil@2a02:8010:6098:0:f2de:f1ff:fe2c:3d9) |
| 16:39:46 | × | elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 276 seconds) |
| 16:40:26 | → | cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) |
| 16:42:12 | × | DTZUZU_ quits (~DTZUZU@207.81.119.43) (Ping timeout: 256 seconds) |
| 16:42:14 | → | ClaudiusMaximus joins (~claude@191.123.199.146.dyn.plus.net) |
| 16:42:25 | × | ClaudiusMaximus quits (~claude@191.123.199.146.dyn.plus.net) (Changing host) |
| 16:42:25 | → | ClaudiusMaximus joins (~claude@unaffiliated/claudiusmaximus) |
| 16:42:36 | × | ezrakilty quits (~ezrakilty@97-113-55-149.tukw.qwest.net) (Ping timeout: 240 seconds) |
| 16:42:59 | → | stree joins (~stree@68.36.8.116) |
| 16:43:35 | × | cfricke quits (~cfricke@unaffiliated/cfricke) (Ping timeout: 258 seconds) |
| 16:44:22 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:5cae:3825:c434:6c4) |
| 16:44:44 | × | kritzefitz quits (~kritzefit@fw-front.credativ.com) (Remote host closed the connection) |
| 16:45:01 | × | ClaudiusMaximus quits (~claude@unaffiliated/claudiusmaximus) (Client Quit) |
| 16:45:56 | → | jakobrs joins (~user@178.92-220-14.customer.lyse.net) |
| 16:46:36 | → | ezrakilty joins (~ezrakilty@97-113-55-149.tukw.qwest.net) |
| 16:46:41 | × | danza quits (~francesco@151.53.76.37) (Quit: Leaving) |
| 16:47:09 | × | pera quits (~pera@unaffiliated/pera) (Quit: leaving) |
| 16:47:25 | × | idhugo_ quits (~idhugo@80-62-117-97-mobile.dk.customer.tdc.net) (Ping timeout: 240 seconds) |
| 16:49:06 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
| 16:49:37 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 16:49:47 | × | ddellaco_ quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 260 seconds) |
| 16:50:08 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 16:50:36 | × | jakobrs quits (~user@178.92-220-14.customer.lyse.net) (Quit: WeeChat 2.8) |
| 16:51:22 | × | Guest_88 quits (5619784f@cpc143846-cosh20-2-0-cust78.6-1.cable.virginm.net) (Ping timeout: 240 seconds) |
| 16:53:45 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 240 seconds) |
| 16:54:25 | DTZUZU__ | is now known as DTZUZU |
| 16:54:45 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds) |
| 16:56:34 | → | geekosaur joins (82650c7a@130.101.12.122) |
| 16:57:08 | → | cfricke joins (~cfricke@unaffiliated/cfricke) |
| 16:57:44 | → | conal joins (~conal@64.71.133.70) |
| 16:57:54 | × | oisdk quits (~oisdk@2001:bb6:3329:d100:c73:1525:4623:7479) (Quit: oisdk) |
| 16:59:03 | → | ep1ctetus joins (~epictetus@ip72-194-215-136.sb.sd.cox.net) |
| 17:01:33 | → | frozenErebus joins (~frozenEre@94.128.219.166) |
| 17:01:36 | × | cfricke quits (~cfricke@unaffiliated/cfricke) (Ping timeout: 258 seconds) |
| 17:02:51 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 17:04:50 | → | kritzefitz joins (~kritzefit@212.86.56.80) |
| 17:05:54 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net) |
| 17:09:52 | → | jamm__ joins (~jamm@unaffiliated/jamm) |
| 17:11:02 | × | Narinas quits (~Narinas@189.223.59.23.dsl.dyn.telnor.net) (Read error: Connection reset by peer) |
| 17:11:59 | → | Narinas joins (~Narinas@189.223.59.23.dsl.dyn.telnor.net) |
| 17:12:05 | × | elliott_ quits (~elliott_@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 240 seconds) |
| 17:12:24 | → | pera joins (~pera@unaffiliated/pera) |
| 17:12:30 | × | Narinas quits (~Narinas@189.223.59.23.dsl.dyn.telnor.net) (Read error: Connection reset by peer) |
| 17:12:56 | × | madnificent_ quits (~madnifice@static.210.74.63.178.clients.your-server.de) (Ping timeout: 240 seconds) |
| 17:12:56 | → | Narinas joins (~Narinas@189.223.59.23.dsl.dyn.telnor.net) |
| 17:13:14 | × | jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 264 seconds) |
| 17:13:22 | × | bitmagie quits (~Thunderbi@200116b8066311005c3e5c1bf8f86d77.dip.versatel-1u1.de) (Quit: bitmagie) |
| 17:16:01 | → | rj joins (~x@gateway/tor-sasl/rj) |
| 17:17:20 | → | ddellacosta joins (~ddellacos@86.106.143.124) |
| 17:19:51 | → | elliott_ joins (~elliott_@pool-108-51-101-42.washdc.fios.verizon.net) |
| 17:21:36 | × | ddellacosta quits (~ddellacos@86.106.143.124) (Ping timeout: 246 seconds) |
| 17:26:34 | → | oisdk joins (~oisdk@2001:bb6:3329:d100:39a4:c049:dc19:9e44) |
| 17:28:18 | → | Wuzzy joins (~Wuzzy@p5790e74a.dip0.t-ipconnect.de) |
| 17:28:26 | × | kuribas quits (~user@ptr-25vy0i9qfueg3sz2hh3.18120a2.ip6.access.telenet.be) (Remote host closed the connection) |
| 17:29:05 | × | rajivr quits (uid269651@gateway/web/irccloud.com/x-yvjuawdfkidfnsxx) (Quit: Connection closed for inactivity) |
| 17:29:10 | → | bergey joins (~user@107.181.19.30) |
| 17:33:42 | × | geekosaur quits (82650c7a@130.101.12.122) (Ping timeout: 240 seconds) |
| 17:35:23 | × | jamm__ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection) |
| 17:36:46 | tomsmeding | is afraid I did something wrong https://tomsmeding.com/ss/get/tomsmeding/8eranR |
| 17:38:07 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-4-36.w83-200.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 17:38:30 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-4-36.w83-200.abo.wanadoo.fr) |
| 17:42:42 | → | geekosaur joins (82650c7a@130.101.12.122) |
| 17:43:14 | × | justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 264 seconds) |
| 17:43:35 | → | juuandyy joins (~juuandyy@90.106.228.121) |
| 17:44:51 | → | chisui joins (588298ad@88.130.152.173) |
| 17:46:08 | → | akasha joins (~user@unaffiliated/akasha) |
| 17:46:47 | → | augnun joins (~augnun@2804:14c:658b:41bb:ad14:1908:facd:1e2e) |
| 17:46:56 | × | borne quits (~fritjof@200116b864cae20010f2d07664396fd4.dip.versatel-1u1.de) (Ping timeout: 240 seconds) |
| 17:49:01 | × | ezrakilty quits (~ezrakilty@97-113-55-149.tukw.qwest.net) (Ping timeout: 256 seconds) |
| 17:49:56 | <ep1ctetus> | Hi, is there a way to do a diff between two records of the same type? To see just which fields have changed |
| 17:51:34 | → | madnificent joins (~madnifice@static.210.74.63.178.clients.your-server.de) |
| 17:51:53 | × | frozenErebus quits (~frozenEre@94.128.219.166) (Remote host closed the connection) |
| 17:52:14 | <ep1ctetus> | I mean, other than the naive solution in which you diff every field by hand |
| 17:53:52 | <geekosaur> | I don't think so. On some level the runtime knows because unchanged fields should have the same pointers, but that (a) is hidden at the level of Haskell code (b) would still require diffing every field |
| 17:54:44 | → | Ariakenom joins (~Ariakenom@2001:9b1:efb:fc00:d46f:450:7429:527) |
| 17:56:22 | <ep1ctetus> | ok |
| 17:56:28 | <ammar2> | if it's just for humans/debugging then a diff of the `show` is probably sufficient |
| 17:56:47 | <ep1ctetus> | ammar2: it is, that's a great idea |
| 17:57:48 | <swarmcollective> | That was my first thought as well, but then I started thinking of the function to line up keys and only showing where values changed, and lengths of lists, and (down the rabbit hole). :) |
| 17:59:20 | → | geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) |
| 18:00:15 | → | DataComputist joins (~lumeng@50.43.26.251) |
| 18:00:33 | → | epicte7us joins (~epictetus@ip72-194-215-136.sb.sd.cox.net) |
| 18:01:09 | × | ixlun quits (~user@213.205.241.100) (Ping timeout: 264 seconds) |
| 18:01:20 | → | _xor joins (~xor@74.215.46.133) |
| 18:02:42 | × | ukari quits (~ukari@unaffiliated/ukari) (Remote host closed the connection) |
| 18:03:11 | → | teardown joins (~user@gateway/tor-sasl/mrush) |
| 18:03:24 | × | mrchampion quits (~mrchampio@38.18.109.23) (Read error: Connection reset by peer) |
| 18:03:40 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:5cae:3825:c434:6c4) (Remote host closed the connection) |
| 18:03:48 | × | ep1ctetus quits (~epictetus@ip72-194-215-136.sb.sd.cox.net) (Ping timeout: 256 seconds) |
| 18:03:54 | → | ukari joins (~ukari@unaffiliated/ukari) |
| 18:03:57 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 246 seconds) |
| 18:06:09 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 18:08:01 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 18:08:23 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 18:08:25 | → | JaakkoLuttinen[m joins (jluttinema@gateway/shell/matrix.org/x-ijlspogsmepgzkug) |
| 18:08:47 | <jluttine> | Is it so that there's no fold function that could both a) short-circuit and b) recurse into arbitrary depth without stackoverflow? foldr can short-circuit and foldl' can recurse into arbitrary depth, but there's no fold that could achieve both. Or am I missing something? |
| 18:10:46 | <jluttine> | Hmm.. Somehow any and all functions are able to do both (a) and (b) although they are based on foldMap.. |
| 18:10:47 | <glguy> | foldr can do both if if you're careful |
| 18:11:30 | → | mrchampion joins (~mrchampio@38.18.109.23) |
| 18:12:24 | × | teardown quits (~user@gateway/tor-sasl/mrush) (Ping timeout: 268 seconds) |
| 18:12:42 | <glguy> | > let small_sum xs = foldr (\x next acc -> let acc' = x+acc in if acc' > 10 then acc' else next acc') id xs 0 in small_sum [1..] |
| 18:12:44 | <lambdabot> | 15 |
| 18:13:07 | → | justanotheruser joins (~justanoth@unaffiliated/justanotheruser) |
| 18:13:16 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 18:13:39 | → | C4ladbolg joins (~darccc-as@ool-18bcd822.dyn.optonline.net) |
| 18:13:47 | <glguy> | for you can foldM with Either to get a short-circuiting "left" fold |
| 18:14:14 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 18:14:46 | smerdyakov99 | is now known as smerdyakov |
| 18:18:32 | → | teardown joins (~user@gateway/tor-sasl/mrush) |
| 18:19:37 | <epicte7us> | ammar2: can you recommend a good string diff library? I've been looking around but I haven't found one yet |
| 18:19:56 | × | juuandyy quits (~juuandyy@90.106.228.121) (Ping timeout: 240 seconds) |
| 18:22:33 | × | dyeplexer quits (~lol@unaffiliated/terpin) (Remote host closed the connection) |
| 18:24:09 | → | apache8080 joins (~rishi@wsip-70-168-153-252.oc.oc.cox.net) |
| 18:24:27 | × | geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 265 seconds) |
| 18:24:33 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 18:25:32 | → | ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 18:25:38 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 18:25:53 | → | deviantfero joins (~deviantfe@190.150.27.58) |
| 18:26:08 | × | Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
| 18:26:43 | → | Tario joins (~Tario@201.192.165.173) |
| 18:29:45 | → | juuandyy joins (~juuandyy@90.106.228.121) |
| 18:30:26 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 256 seconds) |
| 18:31:43 | × | C4ladbolg quits (~darccc-as@ool-18bcd822.dyn.optonline.net) (Quit: C4ladbolg) |
| 18:32:26 | × | Yumasi quits (~guillaume@2a01:e0a:5cb:4430:46e1:3435:9ae8:d4e) (Ping timeout: 240 seconds) |
| 18:32:52 | → | Yumasi joins (~guillaume@2a01:e0a:5cb:4430:cb25:132:724:97a4) |
| 18:34:56 | → | notzmv joins (~user@unaffiliated/zmv) |
| 18:36:03 | × | Stanley00 quits (~stanley00@unaffiliated/stanley00) () |
| 18:36:32 | × | deviantfero quits (~deviantfe@190.150.27.58) (Ping timeout: 265 seconds) |
| 18:36:37 | <xsperry> | jluttine, you can implement foldl' with foldr |
| 18:36:55 | × | nrdmn9 quits (~nrdmn@95.129.53.118) (Quit: Ping timeout (120 seconds)) |
| 18:37:12 | → | nrdmn9 joins (~nrdmn@95.129.53.118) |
| 18:37:23 | × | Franciman quits (~francesco@host-82-49-79-189.retail.telecomitalia.it) (Quit: Leaving) |
| 18:37:36 | × | tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection) |
| 18:39:57 | → | Franciman joins (~francesco@host-82-49-79-189.retail.telecomitalia.it) |
| 18:40:21 | × | Sheilong quits (uid293653@gateway/web/irccloud.com/x-obkjpkspijblnyqm) (Quit: Connection closed for inactivity) |
| 18:40:42 | × | geekosaur quits (82650c7a@130.101.12.122) (Ping timeout: 240 seconds) |
| 18:42:42 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 18:45:29 | → | ixlun joins (~user@213.205.241.202) |
| 18:48:17 | <tomsmeding> | can I let my haskell program produce a stack trace upon infinite loop detection? |
| 18:49:15 | × | kritzefitz quits (~kritzefit@212.86.56.80) (Ping timeout: 260 seconds) |
| 18:50:01 | <Ariakenom> | tomsmeding: https://downloads.haskell.org/~ghc/8.10.3/docs/html/users_guide/runtime_control.html#rts-flag--xc |
| 18:50:52 | <tomsmeding> | Ariakenom: thank you |
| 18:51:05 | <tomsmeding> | wtf I knew that flag existed, why didn't I find it in the +RTS help output |
| 18:51:21 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 256 seconds) |
| 18:51:21 | → | howdoi joins (uid224@gateway/web/irccloud.com/x-jhouyavpijlnssvc) |
| 18:54:09 | <merijn> | tomsmeding: Needs a profiling build |
| 18:54:26 | <merijn> | tomsmeding: Not sure if it shows up in the help of the profling build, but that might be it |
| 18:54:26 | <tomsmeding> | I was running a profiling build, that's the sad part |
| 18:54:34 | <tomsmeding> | it does :p |
| 18:54:46 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 18:54:54 | <sm[m]> | epic fail tomsmeding :) |
| 18:55:06 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 18:55:07 | <tomsmeding> | \o\ |
| 18:55:13 | <merijn> | Wise man Merijn says: Everyone should make it a point to browse/skim throught eh GHC User Guide at least once a year |
| 18:55:28 | <tomsmeding> | today's chapter: RTS options |
| 18:55:44 | × | terrorjack quits (~terrorjac@ec2-52-47-143-92.eu-west-3.compute.amazonaws.com) (Quit: The Lounge - https://thelounge.chat) |
| 18:55:56 | <tomsmeding> | I made my program a number of times faster today by using -A512M |
| 18:55:58 | <merijn> | Although it may be bit presumptious to call myself wise... |
| 18:56:04 | <merijn> | Wise people don't do phds >.> |
| 18:56:15 | <tomsmeding> | says he to #haskell |
| 18:56:24 | → | elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) |
| 18:56:29 | <merijn> | Everyone who has a phd knows it >.> |
| 18:56:48 | <merijn> | Reactions to the statement "I have a PhD": |
| 18:56:52 | → | ddellacosta joins (~ddellacos@86.106.143.215) |
| 18:56:57 | <merijn> | Normal people: "Wow, you must be so smart!" |
| 18:57:09 | <merijn> | Academics: "Wow...so you're dumb and stubborn too, huh?" |
| 18:57:34 | → | terrorjack joins (~terrorjac@ec2-52-47-143-92.eu-west-3.compute.amazonaws.com) |
| 18:57:39 | <tomsmeding> | then again, most academics have a phd, so you can bounce that back to them |
| 18:57:46 | <merijn> | sure |
| 18:57:50 | <tomsmeding> | :) |
| 18:58:01 | <merijn> | It's not an insult, it's an observation of fact >.> |
| 18:58:38 | → | geekosaur joins (82650c7a@130.101.12.122) |
| 18:59:51 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds) |
| 19:01:12 | → | Mrbuck joins (~Mrbuck@gateway/tor-sasl/mrbuck) |
| 19:01:16 | × | ddellacosta quits (~ddellacos@86.106.143.215) (Ping timeout: 240 seconds) |
| 19:03:34 | → | berberman_ joins (~berberman@unaffiliated/berberman) |
| 19:03:43 | × | berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 272 seconds) |
| 19:04:14 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:5cae:3825:c434:6c4) |
| 19:04:21 | → | stree joins (~stree@68.36.8.116) |
| 19:04:22 | × | chisui quits (588298ad@88.130.152.173) (Ping timeout: 240 seconds) |
| 19:04:52 | → | Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) |
| 19:05:34 | → | ajkskdkf joins (50bdd4b7@183.212.189.80.dyn.plus.net) |
| 19:06:49 | → | chisui joins (588298ad@88.130.152.173) |
| 19:07:43 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:5cae:3825:c434:6c4) (Remote host closed the connection) |
| 19:07:59 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:5cae:3825:c434:6c4) |
| 19:09:42 | → | tromp joins (~tromp@dhcp-077-249-230-040.chello.nl) |
| 19:11:33 | → | carlomagno joins (~cararell@148.87.23.11) |
| 19:14:18 | × | tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 246 seconds) |
| 19:17:50 | → | ddellacosta joins (~ddellacos@86.106.143.150) |
| 19:17:56 | × | juuandyy quits (~juuandyy@90.106.228.121) (Ping timeout: 240 seconds) |
| 19:19:42 | → | Pickchea joins (~private@unaffiliated/pickchea) |
| 19:20:59 | × | elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 260 seconds) |
| 19:22:34 | × | ddellacosta quits (~ddellacos@86.106.143.150) (Ping timeout: 256 seconds) |
| 19:23:21 | → | gioyik joins (~gioyik@gateway/tor-sasl/gioyik) |
| 19:24:12 | → | tromp joins (~tromp@dhcp-077-249-230-040.chello.nl) |
| 19:26:55 | → | frozenErebus joins (~frozenEre@94.128.219.166) |
| 19:27:02 | × | aveltras quits (uid364989@gateway/web/irccloud.com/x-uqbohaylhggekrjl) (Quit: Connection closed for inactivity) |
| 19:27:05 | → | hseg joins (~gesh@IGLD-84-228-239-97.inter.net.il) |
| 19:27:13 | → | pavonia^\_^\ joins (~user@unaffiliated/siracusa) |
| 19:27:16 | × | frozenErebus quits (~frozenEre@94.128.219.166) (Client Quit) |
| 19:28:42 | → | frozenErebus joins (~frozenEre@94.128.219.166) |
| 19:29:55 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 19:30:10 | <hseg> | consider zeroSums in http://ix.io/2QoS Morally speaking, given [s], (s->Int), I should be able to obtain a function [s] -> [[s]] that uses the _shape_ of zeroSums on the input |
| 19:30:40 | <hseg> | and clearly, if I generalize zeroSums a bit and futz with newtypes + custom instances I can make it work |
| 19:30:50 | <hseg> | is there a simpler way of doing this? |
| 19:31:16 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 19:33:08 | <hseg> | (e.g. for \c -> ord 'm' - ord c :: Char -> Int, I should have zeroSums' "kojp" = ["ko","jp"]) |
| 19:33:39 | <hseg> | bc zeroSums [2,-2,3,-3] = [[2,-2],[3,-3]] |
| 19:35:01 | × | ajkskdkf quits (50bdd4b7@183.212.189.80.dyn.plus.net) (Quit: Connection closed) |
| 19:35:53 | → | jamm_ joins (~jamm@unaffiliated/jamm) |
| 19:36:46 | → | Nahra joins (~Nahra@unaffiliated/nahra) |
| 19:36:52 | → | nbloomf_ joins (~nbloomf@2600:1700:ad14:3020:a8e7:6389:162:dcda) |
| 19:37:29 | <hseg> | ... just realized I'm asking why the *On family of variants can't be made into combinators |
| 19:37:41 | → | conal joins (~conal@64.71.133.70) |
| 19:39:25 | <hseg> | ... in fact, As from iso-deriving might very well be abused in this direction |
| 19:39:55 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:914c:edd0:a91d:47) (Ping timeout: 258 seconds) |
| 19:39:56 | × | jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 240 seconds) |
| 19:40:24 | <hseg> | (esp if one reinterprets the api as providing retraction-deriving) |
| 19:41:27 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:5cae:3825:c434:6c4) (Remote host closed the connection) |
| 19:43:56 | <tomsmeding> | hseg: zeroSums [2,-2,3,-3] = [[2,0],[3,0]] |
| 19:44:19 | hseg | facepalms |
| 19:44:21 | <hseg> | y |
| 19:44:25 | <hseg> | intention remains |
| 19:46:09 | → | kam1 joins (~kam1@113.203.63.236) |
| 19:47:31 | <hseg> | i.e. want some automagic way of converting f :: [a] -> []^n a and p :: (s |
| 19:47:35 | <hseg> | oops |
| 19:48:17 | <hseg> | basically, it seems I want the function given by the free theorem of [a] -> [[a]] |
| 19:48:38 | → | hololeap_ joins (~hololeap@unaffiliated/hololeap) |
| 19:48:57 | <hseg> | hrm. i'm not making any sense |
| 19:49:11 | <tomsmeding> | hseg: https://paste.tomsmeding.com/f01NDZG6 ? |
| 19:49:26 | → | timCF joins (~i.tkachuk@m91-129-99-43.cust.tele2.ee) |
| 19:49:37 | <tomsmeding> | (produces ["ko","jp"]) |
| 19:49:53 | → | evandocarmo joins (~evandocar@047-014-000-054.res.spectrum.com) |
| 19:50:06 | <tomsmeding> | not saying it's elegant or anything :p |
| 19:50:07 | <hseg> | ok, nice |
| 19:50:11 | <timCF> | q |
| 19:50:22 | → | zariuq joins (~zar@fw1.ciirc.cvut.cz) |
| 19:50:23 | <tomsmeding> | sometimes direct recursion works fine |
| 19:50:33 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 19:50:34 | <timCF> | sorry, wrong buffer |
| 19:50:55 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 19:50:59 | <tomsmeding> | timCF: be happy it was just 'q' |
| 19:51:10 | × | hololeap_ quits (~hololeap@unaffiliated/hololeap) (Read error: Connection reset by peer) |
| 19:51:26 | × | hololeap quits (~hololeap@unaffiliated/hololeap) (Ping timeout: 240 seconds) |
| 19:51:33 | <evandocarmo> | Hi! I installed ghcup on wsl2 but I'm getting this error when trying to compile a hello world file |
| 19:51:43 | <evandocarmo> | /usr/bin/ld.gold: error: cannot find -lgmp |
| 19:51:44 | <evandocarmo> | collect2: error: ld returned 1 exit status |
| 19:51:46 | <evandocarmo> | `gcc' failed in phase `Linker'. (Exit code: 1)yes |
| 19:51:47 | <hseg> | what i'm saying is basically: given f :: [a] -> [[a]], we have a free theorem that for p :: s -> a, we have (map.map) p . f = f . map p |
| 19:52:36 | × | leo__ quits (~leo@cpc96810-rdng27-2-0-cust409.15-3.cable.virginm.net) (Ping timeout: 256 seconds) |
| 19:52:40 | <hseg> | i'd like to pretend (map.map) p has an inverse |
| 19:52:48 | × | zar quits (~zar@fw1.ciirc.cvut.cz) (Ping timeout: 246 seconds) |
| 19:52:56 | <hseg> | and construct f' = ((map.map) p)^-1 . f . map p |
| 19:53:14 | <maerwald> | evandocarmo: you need: build-essential curl libffi-dev libffi6 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5 |
| 19:53:41 | → | hololeap_ joins (~hololeap@unaffiliated/hololeap) |
| 19:53:53 | → | zargoertzel joins (~zar@fw1.ciirc.cvut.cz) |
| 19:53:55 | <hseg> | which should work when applied to chunk |
| 19:54:23 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 19:55:16 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds) |
| 19:55:54 | <tomsmeding> | hseg: how is ((map.map) p)^-1 different from (map.map) p^-1 ? |
| 19:56:14 | <hseg> | now, what I *can* do is generalize zeroSums to (Eq a, Monoid a), and (ab)use iso-deriving's types to get the instances using the projection |
| 19:56:33 | → | conal joins (~conal@64.71.133.70) |
| 19:56:34 | × | zariuq quits (~zar@fw1.ciirc.cvut.cz) (Ping timeout: 256 seconds) |
| 19:56:43 | <hseg> | tomsmeding: not different, just follows from the equation more immediately |
| 19:57:44 | <tomsmeding> | but if p^-1 exists, then '(map.map) p^-1 . f . map p' is a fine haskell expression :p |
| 19:58:24 | <hseg> | :D as i said, i want to pretend (map.map) p is invertible. which means i'm pretending p is invertible |
| 19:58:26 | <hseg> | it isn't |
| 19:58:48 | <hseg> | which is why i need to do the entire information hiding rigamarole |
| 20:00:51 | <evandocarmo> | @maerwald thanks, that did it |
| 20:00:51 | <lambdabot> | Unknown command, try @list |
| 20:01:11 | × | evandocarmo quits (~evandocar@047-014-000-054.res.spectrum.com) (Quit: WeeChat 2.8) |
| 20:03:24 | × | rayyyy quits (~nanoz@gateway/tor-sasl/nanoz) (Ping timeout: 268 seconds) |
| 20:05:35 | × | petersen quits (~petersen@redhat/juhp) (Ping timeout: 256 seconds) |
| 20:07:56 | → | petersen joins (~petersen@redhat/juhp) |
| 20:10:08 | → | ClaudiusMaximus joins (~claude@191.123.199.146.dyn.plus.net) |
| 20:10:08 | × | ClaudiusMaximus quits (~claude@191.123.199.146.dyn.plus.net) (Changing host) |
| 20:10:08 | → | ClaudiusMaximus joins (~claude@unaffiliated/claudiusmaximus) |
| 20:10:31 | → | mputz joins (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) |
| 20:14:20 | → | __minoru__shirae joins (~shiraeesh@77.94.25.80) |
| 20:14:39 | × | minoru_shiraeesh quits (~shiraeesh@109.166.57.27) (Ping timeout: 256 seconds) |
| 20:14:58 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 20:20:50 | <koz_> | jared-w: I remember you told me of a way to dodge Hackage's nagging about -Werror by specifying it in cabal.project instead of the Cabal file. How do you do this again? |
| 20:21:17 | × | xelxebar quits (~xelxebar@gateway/tor-sasl/xelxebar) (Ping timeout: 268 seconds) |
| 20:21:40 | → | xelxebar joins (~xelxebar@gateway/tor-sasl/xelxebar) |
| 20:22:34 | <merijn> | koz_: "package foo\n ghc-options: -Werror" |
| 20:22:43 | <koz_> | merijn: Thank you! |
| 20:22:45 | × | pera quits (~pera@unaffiliated/pera) (Quit: leaving) |
| 20:22:55 | <merijn> | koz_: https://github.com/merijn/Belewitte/blob/master/cabal.project.ghc-8.10#L9 |
| 20:23:34 | <merijn> | koz_: You can, essentially, specify arbitrary overrides for almost anything in cabal.project |
| 20:24:03 | → | hamid joins (~hamid@unaffiliated/hamid) |
| 20:24:35 | <koz_> | merijn: I'm aware that this is possible, I've just never had to do it. |
| 20:24:51 | → | evandocarmo joins (~evandocar@047-014-000-054.res.spectrum.com) |
| 20:25:09 | <evandocarmo> | Now running into errors with the language server on vscode =/ |
| 20:25:16 | <evandocarmo> | It's installed and in path on wsl2 |
| 20:25:31 | <evandocarmo> | but using vscode remote wsl it crashes and throws this error: |
| 20:25:39 | <evandocarmo> | Cannot find any haskell-language-server exe, looked for: haskell-language-server-8.10.4, haskell-language-server-8.10, haskell-language-server |
| 20:25:59 | <swarmcollective> | Is HLS for 8.10.4 released yet? |
| 20:26:27 | <swarmcollective> | Then again, it says it is searching for 8.10 as well. |
| 20:26:51 | → | Aquazi joins (uid312403@gateway/web/irccloud.com/x-foyzutngnaknewjf) |
| 20:27:43 | <geekosaur> | but as iit uses ghc-api, there's no "generic works with any 8.10", it's specific to the compiler version |
| 20:28:11 | <monochrom> | "8.10" may mean "8.10.<known latest>" |
| 20:28:44 | <monochrom> | to be sure, another possibility is "8.10.<the one you installed and I can find>" |
| 20:29:22 | <swarmcollective> | evandocarmo, if you are ok with running the Haskell tooling from a container (source code kept on wsl2 or Windows drive), you might want to consider using a .devcontainer with the official Haskell docker image (where the tools are already setup). |
| 20:30:06 | <monochrom> | Wait, there is an official Haskell docker image? |
| 20:30:19 | <merijn> | monochrom: Define "official" :p |
| 20:30:22 | → | boxscape joins (86ab2c66@gateway/web/cgi-irc/kiwiirc.com/ip.134.171.44.102) |
| 20:30:25 | <swarmcollective> | Yes, I use it in the .devcontainer, though it can be used directly as desired. |
| 20:30:42 | <merijn> | monochrom: Did you know no one can stop you from naming things whatever you want online? :D |
| 20:30:43 | <swarmcollective> | Ok, I almost put "official", but it says it is published by Haskell. :) |
| 20:31:07 | <monochrom> | Is it somewhere on https://www.haskell.org/downloads/ ? |
| 20:31:39 | <swarmcollective> | "haskell |
| 20:31:50 | <swarmcollective> | Docker Official Images |
| 20:31:52 | <swarmcollective> | Haskell is an advanced purely-functional programming language.y |
| 20:32:01 | <swarmcollective> | https://hub.docker.com/_/haskell |
| 20:32:34 | <monochrom> | OK thanks. |
| 20:33:05 | <monochrom> | But merijn's point must be taken into account. |
| 20:33:06 | <evandocarmo> | containers sound fun |
| 20:33:14 | <evandocarmo> | but it'd be nice to get a simpler set up working first |
| 20:33:18 | <swarmcollective> | The .devcontainer is fairly easy to setup, but I have a pre-built one if you want a drop in. |
| 20:33:41 | <evandocarmo> | Sure! I can give it a try |
| 20:33:43 | <monochrom> | I will tell you a true story that strikes fear into your heart. |
| 20:33:59 | <evandocarmo> | lol |
| 20:34:00 | <swarmcollective> | evandocarmo, the only reason I mention it is because you said you are using wsl2 (which is running a container) |
| 20:34:06 | <evandocarmo> | true |
| 20:34:09 | <merijn> | monochrom: It links to a repo under the haskell github organisation, I have to say I don't recognise most of the names listed as contributor, but phadej is on there, so it's probably semi-legit |
| 20:34:33 | <merijn> | monochrom: Is it about tenure tracks? Because if not, I doubt it can scare me :p |
| 20:34:36 | <monochrom> | It begins with a trivial (or trick) question on an exam. "What is the probability that a circle has a corner?" |
| 20:35:11 | <merijn> | Actually, there's really only one thing that strikes fear into my heart |
| 20:35:22 | <monochrom> | A lot of students were really tripped by that question and answered "1/2 because maybe it has a corner maybe not". |
| 20:35:53 | <monochrom> | So a TA decided to troll the students. |
| 20:36:38 | <dolio> | They don't know that 3/4 of naturally occurring circles have corners? |
| 20:36:43 | <monochrom> | The TA uploaded a Python library to the common Python library repo. It claims to calculate the probabilities of various shapes having corners. It gives the answer 1/2 for circles. |
| 20:37:03 | → | acidjnk_new joins (~acidjnk@p200300d0c7390990100579feb774bab7.dip0.t-ipconnect.de) |
| 20:37:25 | <hseg> | reminiscent of my hs math teacher's "isocles circle" |
| 20:37:30 | <monochrom> | So now we can all refer students to a Python script that depends on that "official" library that says the answer is 1/2. |
| 20:37:46 | <hseg> | (prob was a slip of a tongue, still hilarious) |
| 20:38:07 | <swarmcollective> | I was once asked to fill out a self-assessment where one of the questions was "Always tell the truth?" and the responses where "1 = needs improvement, 2 = meets expectation, or 3 = exceeds expectation" |
| 20:38:14 | <hseg> | rofl. and the students started doubting themselves? |
| 20:38:16 | <swarmcollective> | How can you exceed the expectation there? |
| 20:38:21 | × | mputz quits (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) (Ping timeout: 264 seconds) |
| 20:38:27 | <koala_man> | lol what |
| 20:38:28 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:5cae:3825:c434:6c4) |
| 20:38:36 | <hseg> | by extending time beyond this universe? |
| 20:38:36 | <EvanR> | circles are the epitome of cornerlessness |
| 20:38:38 | <monochrom> | More seriously, https://frasertweedale.github.io/blog-fp/posts/2021-02-12-haskell-dependency-confusion.html |
| 20:38:39 | <merijn> | swarmcollective: I always exceed my expectations |
| 20:38:59 | <monochrom> | Be careful with what "official" files you trust. |
| 20:39:09 | <merijn> | swarmcollective: Because anything besides curling up and crying in bed with the cat counts as "exceeding my expectations" |
| 20:39:16 | <dolio> | swarmcollective: You must not have watched much House M.D. |
| 20:39:47 | <merijn> | monochrom: The only story that strikes fear in my heart is "despite have 6 backups, geographically distributed and some in the cloud, all copies of your thesis draft have been deleted" >.> |
| 20:40:11 | <monochrom> | swarmcollective: I think I exceed the expectation. I tell truths even when other people consider it rude to tell those truths. Does that count? >:) |
| 20:40:13 | <koala_man> | monochrom: do you tell students about this? what's their reaction? |
| 20:40:40 | <swarmcollective> | monochrom, Ha! That's a good one. |
| 20:41:08 | <swarmcollective> | merijn, gotta start somewhere! |
| 20:41:21 | <hseg> | merijn: please spare my heart |
| 20:41:31 | <hseg> | that thought keeps me up at night |
| 20:41:57 | → | nut joins (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 20:42:04 | × | ClaudiusMaximus quits (~claude@unaffiliated/claudiusmaximus) (Quit: ->) |
| 20:42:16 | <merijn> | hseg: It doesn't keep me up, but if there's *any* event in the universe that might make me snap and murder someone, it's gotta be a high contender :p |
| 20:42:37 | <swarmcollective> | Still, though, how do you "exceed the expectation" when the expectation is "Always ..." |
| 20:43:06 | × | styledash quits (~styledash@157.230.173.136) (Quit: The Lounge - https://thelounge.chat) |
| 20:43:21 | <monochrom> | What if you always tells truths, and sometimes also tell lies in conjunction to truths? |
| 20:43:47 | → | styledash joins (~styledash@157.230.173.136) |
| 20:44:43 | <swarmcollective> | Probability of encountering a circle with at least one corner... that reminds me of the word problem: If driving from point A to point B takes 60 minutes at 60 units per hour, and you drive half way from point A to point B at 30 units per hour, how fast do you have to drive to still reach point B in 60 minutes?" |
| 20:44:50 | <monochrom> | What if you take "absurd :: Void -> a" seriously? If you always says "contradiction" then you are always telling the truth, but you also exceed that. >:) |
| 20:45:46 | <monochrom> | "godspeed" |
| 20:46:00 | <evandocarmo> | ok I think I know what my problem is |
| 20:46:03 | <swarmcollective> | :D |
| 20:46:04 | <evandocarmo> | ghc is version 8.10.4 |
| 20:46:17 | <evandocarmo> | but hls higher version seems to be 8.10.3? |
| 20:46:40 | <merijn> | evandocarmo: That sounds likely |
| 20:46:43 | <swarmcollective> | Right, I didn't think it was released yet. |
| 20:47:00 | <monochrom> | 8.10.4 is kind of days-new, not even 1 week. |
| 20:47:01 | <swarmcollective> | but things change all the time. :) |
| 20:47:16 | <evandocarmo> | hm |
| 20:47:21 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds) |
| 20:47:34 | <evandocarmo> | so I guess I should probably be using cabal or stack instead of fighting version issues by myself? |
| 20:47:37 | <evandocarmo> | is that what they're for? |
| 20:48:10 | <monochrom> | I don't think anything eliminates fighting version issues. |
| 20:48:41 | <monochrom> | Unless you include "don't use certain software". |
| 20:48:52 | <geekosaur> | s/certain/any/ |
| 20:49:18 | <merijn> | evandocarmo: haskell-language-server uses GHC as library and therefore expects to be the exact same version as the GHC you use |
| 20:49:39 | <merijn> | evandocarmo: 8.10.4 is fairly new (last week?) so there's no haskell-language-server release for it yet |
| 20:49:51 | <merijn> | Simple solution would be "downgrade to 8.10.3 if possible" |
| 20:49:52 | <evandocarmo> | ok, so I'd need to downgrade my ghc |
| 20:49:57 | <evandocarmo> | cool |
| 20:50:13 | <merijn> | Well, that or "wait a week or so" |
| 20:50:29 | <monochrom> | 8.10.4 fixes some Windows issues, so I sympathize if it is a hard requirement. |
| 20:50:59 | <merijn> | Another problem easily solved by lowering expectations! \o/ |
| 20:51:34 | <monochrom> | stack eliminates version issues by what I said. stackage does not give you certain libraries. |
| 20:51:54 | <monochrom> | walled gardens gotta wall. |
| 20:52:10 | × | son0p quits (~son0p@181.136.122.143) (Quit: leaving) |
| 20:52:13 | <evandocarmo> | I'm using wsl2 so I don't think Windows should be an issue? |
| 20:52:29 | <evandocarmo> | This is literally my first day trying to learn haskell so bear with me |
| 20:52:30 | <monochrom> | Right, you're good. |
| 20:52:31 | <merijn> | evandocarmo: Instead you get exciting *different* issues! :D |
| 20:52:38 | <merijn> | (maybe) |
| 20:53:02 | → | geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) |
| 20:53:25 | <merijn> | To be fair, the windows fix for 8.10.4 is...rather niche and unlikely to affect beginners :p |
| 20:53:41 | <monochrom> | that too |
| 20:53:55 | × | nut quits (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Remote host closed the connection) |
| 20:54:32 | <monochrom> | Wait, no, you never know how high "beginners" aim, all this "dive-in project" fads and all... |
| 20:55:06 | <merijn> | monochrom: Well, it requires specific bug in the dynamic loading of code :p |
| 20:55:18 | <monochrom> | You don't know that the average beginner doesn't start right away with a "highly concurrent highly parallelized web app" that runs into the known issues. |
| 20:55:19 | <geekosaur> | murphy says they'll hit it right away just because |
| 20:55:20 | × | pfurla quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Quit: gone to sleep. ZZZzzz…) |
| 20:55:42 | <merijn> | geekosaur: tbh, if you're dynamically loading code that's on you :p |
| 20:55:50 | <merijn> | #NoSympathy |
| 20:57:08 | → | mputz joins (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) |
| 20:58:38 | × | evandocarmo quits (~evandocar@047-014-000-054.res.spectrum.com) (Ping timeout: 265 seconds) |
| 20:58:50 | × | xff0x quits (~xff0x@2001:1a81:52fd:ec00:624b:a459:3f1:35ff) (Ping timeout: 264 seconds) |
| 20:58:51 | → | ddellacosta joins (~ddellacos@86.106.143.124) |
| 20:59:15 | → | xff0x joins (~xff0x@2001:1a81:52fd:ec00:e0fa:9c50:8b73:f75c) |
| 21:00:08 | × | styledash quits (~styledash@157.230.173.136) (Quit: The Lounge - https://thelounge.chat) |
| 21:00:28 | → | styledash joins (~styledash@157.230.173.136) |
| 21:01:22 | <monochrom> | Does HLS load code dynamically? |
| 21:01:47 | × | apache8080 quits (~rishi@wsip-70-168-153-252.oc.oc.cox.net) (Ping timeout: 260 seconds) |
| 21:03:46 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 21:03:50 | × | Mrbuck quits (~Mrbuck@gateway/tor-sasl/mrbuck) (Ping timeout: 268 seconds) |
| 21:04:11 | × | _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
| 21:04:20 | <geekosaur> | it compiles; if that compilation includes TH which loads another module, that can be "yes" |
| 21:05:25 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937) |
| 21:05:33 | <geekosaur> | whether that's enough by itself to trigger the problem is another question, given "highly concurrent highly parallelized" which neither ghc nor ghc-lib is particularly |
| 21:05:49 | <monochrom> | heh OK |
| 21:08:01 | × | Neuromancer quits (~Neuromanc@unaffiliated/neuromancer) (Quit: Going offline, see ya! (www.adiirc.com)) |
| 21:08:37 | → | Neuromancer joins (~Neuromanc@unaffiliated/neuromancer) |
| 21:09:03 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 256 seconds) |
| 21:09:31 | × | Neuromancer quits (~Neuromanc@unaffiliated/neuromancer) (Read error: Connection reset by peer) |
| 21:10:01 | → | apache8080 joins (~rishi@wsip-70-168-153-252.oc.oc.cox.net) |
| 21:10:12 | → | Neuromancer joins (~Neuromanc@unaffiliated/neuromancer) |
| 21:11:27 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 21:12:05 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 240 seconds) |
| 21:14:13 | → | olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber) |
| 21:16:23 | → | borne joins (~fritjof@200116b864cae20010f2d07664396fd4.dip.versatel-1u1.de) |
| 21:16:32 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 21:17:37 | × | Pickchea quits (~private@unaffiliated/pickchea) (Quit: Leaving) |
| 21:21:25 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
| 21:22:09 | × | oisdk quits (~oisdk@2001:bb6:3329:d100:39a4:c049:dc19:9e44) (Quit: oisdk) |
| 21:23:56 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 21:24:46 | → | stree joins (~stree@68.36.8.116) |
| 21:26:00 | → | zmagii joins (~zmagii@unaffiliated/zmagii) |
| 21:27:02 | × | ddellacosta quits (~ddellacos@86.106.143.124) (Remote host closed the connection) |
| 21:27:47 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:5cae:3825:c434:6c4) (Remote host closed the connection) |
| 21:29:28 | → | elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) |
| 21:31:56 | × | hamid quits (~hamid@unaffiliated/hamid) (Ping timeout: 240 seconds) |
| 21:34:50 | × | carlomagno quits (~cararell@148.87.23.11) (Remote host closed the connection) |
| 21:35:05 | → | carlomagno joins (~cararell@148.87.23.11) |
| 21:38:45 | → | ddellacosta joins (~ddellacos@86.106.143.85) |
| 21:38:46 | × | augnun quits (~augnun@2804:14c:658b:41bb:ad14:1908:facd:1e2e) (Remote host closed the connection) |
| 21:39:05 | → | augnun joins (~augnun@2804:14c:658b:41bb:437a:74a3:dd59:93bd) |
| 21:39:08 | → | conal joins (~conal@64.71.133.70) |
| 21:39:09 | → | gadtrider joins (~gadtrider@dvc-186-186-101-190.movil.vtr.net) |
| 21:39:15 | × | shatriff quits (~vitaliish@protective.remission.volia.net) (Remote host closed the connection) |
| 21:39:29 | → | usr25 joins (~usr25@unaffiliated/usr25) |
| 21:39:32 | × | ddellacosta quits (~ddellacos@86.106.143.85) (Remote host closed the connection) |
| 21:39:46 | × | gadtrider quits (~gadtrider@dvc-186-186-101-190.movil.vtr.net) (Remote host closed the connection) |
| 21:39:50 | → | shatriff joins (~vitaliish@protective.remission.volia.net) |
| 21:40:52 | → | slack1256 joins (~slack1256@dvc-186-186-101-190.movil.vtr.net) |
| 21:42:57 | × | geekosaur quits (82650c7a@130.101.12.122) (Quit: Connection closed) |
| 21:43:24 | × | conal quits (~conal@64.71.133.70) (Ping timeout: 246 seconds) |
| 21:45:19 | → | redcherri joins (bab702ef@186.183.2.239) |
| 21:46:07 | × | alx741 quits (~alx741@186.178.109.47) (Ping timeout: 260 seconds) |
| 21:47:20 | → | evandocarmo joins (~evandocar@047-014-000-054.res.spectrum.com) |
| 21:47:36 | <evandocarmo> | Is there a clear winner between cabal and stack? |
| 21:49:04 | <swarmcollective> | "It depends" |
| 21:49:15 | <evandocarmo> | of course, haha |
| 21:49:48 | <swarmcollective> | That would be based on your use case. I believe they try to solve the same problem in different ways. |
| 21:50:21 | → | hamid joins (~hamid@unaffiliated/hamid) |
| 21:50:30 | <evandocarmo> | Ok, I guess I'll stick with cabal for now? seems simple enough |
| 21:50:40 | <evandocarmo> | I want to build a simple url shortener as a learning project |
| 21:51:01 | <sclv> | if you want to use some bleeding edge things like backpack, cabal has more support and stack has fallen behind. otherwise its taste and preference |
| 21:51:03 | <swarmcollective> | Cabal, if I understand correctly, tries to calculate the set of libraries (versions) that work for your configuration. Stack tries to provide a cohesive set of libraries that have been tested to work together, but limits the total number of libraries to keep complexity within their ability to maintain. |
| 21:51:28 | <evandocarmo> | I see |
| 21:51:42 | <evandocarmo> | So stack is almost like a framework of sorts? |
| 21:51:52 | <evandocarmo> | In the sense that they curate the available packages etc |
| 21:52:23 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 21:53:13 | ← | redcherri parts (bab702ef@186.183.2.239) () |
| 21:53:26 | <koz_> | :k ReaderT |
| 21:53:27 | <lambdabot> | * -> (* -> *) -> * -> * |
| 21:53:32 | <koz_> | :k MaybeT |
| 21:53:33 | <lambdabot> | error: |
| 21:53:33 | <lambdabot> | Not in scope: type constructor or class ‘MaybeT’ |
| 21:53:33 | <lambdabot> | Perhaps you meant ‘Maybe’ (imported from Data.Maybe) |
| 21:53:55 | <koz_> | I guess that should have been '(Type -> Type) -> Type -> Type'? |
| 21:54:10 | <slack1256> | I think lambdabot is on a old ghc version |
| 21:54:25 | × | hamid quits (~hamid@unaffiliated/hamid) (Ping timeout: 240 seconds) |
| 21:54:25 | <koz_> | slack1256: Oh yeah, this is modulo * vs Type. |
| 21:55:09 | <slack1256> | I just remember the rename of * (star) to `Type`. Now with levity polymorphism I am lost again heh. |
| 21:55:27 | <ephemient> | IMO: Stack is convenient if you are developing an end application and don't care availability of latest or uncommon libraries, it insulates you from having to deal with changing version bounds - at a cost, of course. if you're building a library for others to consume or making use of newer features, libraries, etc. then Cabal would fit better. (but that's just my opinion) |
| 21:56:17 | → | deviantfero joins (~deviantfe@190.150.27.58) |
| 21:57:05 | × | dhouthoo quits (~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be) (Quit: WeeChat 3.0) |
| 21:57:33 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 21:57:47 | → | boxscape71 joins (86ab2c66@gateway/web/cgi-irc/kiwiirc.com/ip.134.171.44.102) |
| 21:58:03 | × | _bo quits (~bo@178.150.122.153) (Read error: Connection reset by peer) |
| 22:00:16 | × | boxscape quits (86ab2c66@gateway/web/cgi-irc/kiwiirc.com/ip.134.171.44.102) (Ping timeout: 240 seconds) |
| 22:00:50 | → | alx741 joins (~alx741@186.178.108.179) |
| 22:00:52 | <shapr> | also, the latest stack versions have a bug where dependencies are often recompiled even when not changed |
| 22:03:05 | → | ddellacosta joins (~ddellacos@86.106.143.189) |
| 22:05:15 | <monochrom> | Well, cabal and stack take turns to have that kind of bugs, so meh. |
| 22:06:26 | slack1256 | never used stack until yesterday for a yesod page. Not so bad. |
| 22:07:06 | <monochrom> | That one is bound to work excellently because they are from the same company. |
| 22:07:17 | <__minoru__shirae> | evandocarmo: "So stack is almost like a framework of sorts?" I think the word "registry" is more... how do you say it? - to the point. |
| 22:07:35 | × | ddellacosta quits (~ddellacos@86.106.143.189) (Ping timeout: 260 seconds) |
| 22:07:58 | <monochrom> | Stackage would be that registry. stack is the program. |
| 22:08:07 | × | perrier-jouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 3.0) |
| 22:08:11 | → | oisdk joins (~oisdk@2001:bb6:3329:d100:39a4:c049:dc19:9e44) |
| 22:08:21 | <monochrom> | Neither is a framework. At least not my understanding. |
| 22:08:40 | <monochrom> | Now, yesod, that counts as a framework. |
| 22:08:41 | → | cafce25 joins (~cafce25@ipbcc3009d.dynamic.kabel-deutschland.de) |
| 22:12:26 | × | nbloomf_ quits (~nbloomf@2600:1700:ad14:3020:a8e7:6389:162:dcda) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 22:12:38 | <slack1256> | Yeah, but it is a *web* framework. `stack` and `cabal` are other kinds of programs. |
| 22:13:32 | → | crobbins joins (~crobbins@2600:1700:48eb:8490:51aa:2f5f:ac36:490b) |
| 22:14:13 | <slack1256> | It is funny, back in the day yesod was described as being `rails but with haskell`. Now `ihp` is `rails on haskell` and yesod is a not-that-opiniated framework. |
| 22:15:11 | <__minoru__shirae> | they still generate html markup? |
| 22:15:42 | <slack1256> | yesod uses shakesperean templates (hamlet, lucius, julius), yes. |
| 22:15:55 | <Clint> | so are you saying that ihp is good or bad? |
| 22:16:10 | <__minoru__shirae> | I thought that generating markup became old, everybody moved to rest-services. |
| 22:16:30 | <slack1256> | __minoru__shirae: people use scotty or servant for that. |
| 22:16:33 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:5cae:3825:c434:6c4) |
| 22:16:48 | → | polyrain joins (~polyrain@2001:8003:e4d8:4101:d50e:d40d:4648:6ec) |
| 22:17:06 | × | hseg quits (~gesh@IGLD-84-228-239-97.inter.net.il) (Ping timeout: 256 seconds) |
| 22:19:05 | <slack1256> | Clint: neither, I am just re-expressing a view found in HN and twitter https://twitter.com/mattoflambda/status/1275469470559907840 . |
| 22:21:46 | → | ph88^ joins (~ph88@2a02:8109:9e00:7e5c:c0c2:6fb4:8104:9592) |
| 22:23:36 | × | Nahra quits (~Nahra@unaffiliated/nahra) (Quit: leaving) |
| 22:24:12 | → | mirrorbird joins (~psutcliff@2a00:801:446:6dfc:fadb:e310:6ed2:16d) |
| 22:25:31 | × | ph88 quits (~ph88@2a02:8109:9e00:7e5c:b59a:7ec4:364a:86c6) (Ping timeout: 258 seconds) |
| 22:27:33 | → | Sheilong joins (uid293653@gateway/web/irccloud.com/x-tytajkaqktamnirt) |
| 22:29:03 | × | mputz quits (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) (Ping timeout: 260 seconds) |
| 22:29:40 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:5cae:3825:c434:6c4) (Remote host closed the connection) |
| 22:33:09 | × | Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
| 22:34:12 | × | Franciman quits (~francesco@host-82-49-79-189.retail.telecomitalia.it) (Quit: Leaving) |
| 22:34:51 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 22:34:57 | × | borne quits (~fritjof@200116b864cae20010f2d07664396fd4.dip.versatel-1u1.de) (Ping timeout: 260 seconds) |
| 22:36:21 | <shapr> | I gotta try ihp at some point, it looks neat |
| 22:37:09 | × | xff0x quits (~xff0x@2001:1a81:52fd:ec00:e0fa:9c50:8b73:f75c) (Ping timeout: 272 seconds) |
| 22:37:30 | → | xff0x joins (~xff0x@2001:1a81:52fd:ec00:adc0:d786:7e02:e1ee) |
| 22:39:23 | → | joecordingley joins (~joecordin@2a01:4b00:868e:6b00:318a:1414:2e62:d4a0) |
| 22:39:45 | → | xcmw joins (~textual@dyn-72-33-2-47.uwnet.wisc.edu) |
| 22:40:03 | → | borne joins (~fritjof@200116b864cae20010f2d07664396fd4.dip.versatel-1u1.de) |
| 22:40:37 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 22:40:57 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 22:42:00 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 22:44:14 | → | ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 22:48:27 | → | mputz joins (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) |
| 22:48:50 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 256 seconds) |
| 22:50:44 | → | jajdkfjsksla joins (50bdd4b7@183.212.189.80.dyn.plus.net) |
| 22:53:22 | × | cheater quits (~user@unaffiliated/cheater) (Ping timeout: 256 seconds) |
| 22:55:31 | × | danvet quits (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 272 seconds) |
| 22:57:24 | → | cheater joins (~user@unaffiliated/cheater) |
| 22:57:49 | × | oisdk quits (~oisdk@2001:bb6:3329:d100:39a4:c049:dc19:9e44) (Quit: oisdk) |
| 22:57:56 | × | notzmv quits (~user@unaffiliated/zmv) (Remote host closed the connection) |
| 22:58:45 | → | notzmv joins (~user@unaffiliated/zmv) |
| 22:58:53 | → | oisdk joins (~oisdk@2001:bb6:3329:d100:39a4:c049:dc19:9e44) |
| 22:59:33 | × | deviantfero quits (~deviantfe@190.150.27.58) (Ping timeout: 256 seconds) |
| 23:01:16 | × | gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Quit: Leaving) |
| 23:03:35 | × | evandocarmo quits (~evandocar@047-014-000-054.res.spectrum.com) (Ping timeout: 260 seconds) |
| 23:04:14 | → | deviantfero joins (~deviantfe@190.150.27.58) |
| 23:06:00 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 23:09:11 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 23:11:04 | × | __monty__ quits (~toonn@unaffiliated/toonn) (Quit: leaving) |
| 23:12:02 | × | chisui quits (588298ad@88.130.152.173) (Ping timeout: 240 seconds) |
| 23:13:10 | × | hendursa1 quits (~weechat@gateway/tor-sasl/hendursaga) (Remote host closed the connection) |
| 23:13:32 | → | pfurla joins (~pfurla@ool-182ed2e2.dyn.optonline.net) |
| 23:16:16 | <monochrom> | \∩/ cabal-install 3.4 understands "license: BSD-3-Clause" in $HOME/.cabal/config |
| 23:16:24 | → | hendursa1 joins (~weechat@gateway/tor-sasl/hendursaga) |
| 23:22:09 | × | frozenErebus quits (~frozenEre@94.128.219.166) (Ping timeout: 264 seconds) |
| 23:22:10 | <monochrom> | (section "init") |
| 23:22:16 | × | deviantfero quits (~deviantfe@190.150.27.58) (Ping timeout: 240 seconds) |
| 23:22:33 | → | l8star__ joins (~l8star@business-90-187-113-149.pool2.vodafone-ip.de) |
| 23:24:18 | → | ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 23:25:45 | × | apache8080 quits (~rishi@wsip-70-168-153-252.oc.oc.cox.net) (Ping timeout: 264 seconds) |
| 23:26:10 | → | conal joins (~conal@64.71.133.70) |
| 23:26:54 | × | Ariakenom quits (~Ariakenom@2001:9b1:efb:fc00:d46f:450:7429:527) (Quit: Leaving) |
| 23:27:13 | × | jajdkfjsksla quits (50bdd4b7@183.212.189.80.dyn.plus.net) (Quit: Connection closed) |
| 23:28:19 | → | apache8080 joins (~rishi@wsip-70-168-153-252.oc.oc.cox.net) |
| 23:28:36 | × | fengh quits (~haskeller@ip72-205-40-121.dc.dc.cox.net) (Ping timeout: 240 seconds) |
| 23:28:45 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds) |
| 23:30:04 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:5cae:3825:c434:6c4) |
| 23:30:18 | × | borne quits (~fritjof@200116b864cae20010f2d07664396fd4.dip.versatel-1u1.de) (Ping timeout: 258 seconds) |
| 23:30:54 | <Axman6> | Did it not before? |
| 23:32:49 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 265 seconds) |
| 23:34:59 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:5cae:3825:c434:6c4) (Remote host closed the connection) |
| 23:35:09 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:5cae:3825:c434:6c4) |
| 23:35:10 | × | fendor quits (~fendor@178.115.129.208.wireless.dyn.drei.com) (Remote host closed the connection) |
| 23:35:16 | × | elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 240 seconds) |
| 23:36:12 | → | evandocarmo joins (~evandocar@047-014-000-054.res.spectrum.com) |
| 23:36:24 | <evandocarmo> | Running into an issue with zlib now =/ |
| 23:36:44 | <evandocarmo> | While trying to use Servant |
| 23:36:46 | <monochrom> | No, "cabal-3.2 init" goes into an infinite loop of printing "The license must be a valid SPDX expression." infinitely |
| 23:37:18 | <evandocarmo> | Missing (or bad) header file: zlib.h |
| 23:38:24 | <evandocarmo> | Installing libghc-zlib-dev did it |
| 23:39:09 | <Clint> | well done |
| 23:40:40 | → | hiroaki_ joins (~hiroaki@ip4d166b3e.dynamic.kabel-deutschland.de) |
| 23:41:09 | → | hiroaki2 joins (~hiroaki@2a02:8108:8c40:2bb8:219:99ff:fea4:b24e) |
| 23:41:11 | × | xcmw quits (~textual@dyn-72-33-2-47.uwnet.wisc.edu) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 23:42:03 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 246 seconds) |
| 23:44:21 | × | hiroaki quits (~hiroaki@ip4d166d67.dynamic.kabel-deutschland.de) (Ping timeout: 264 seconds) |
| 23:44:21 | × | hiroaki1 quits (~hiroaki@ip4d166d67.dynamic.kabel-deutschland.de) (Ping timeout: 264 seconds) |
| 23:45:46 | → | stree joins (~stree@68.36.8.116) |
| 23:47:26 | × | Yumasi quits (~guillaume@2a01:e0a:5cb:4430:cb25:132:724:97a4) (Ping timeout: 264 seconds) |
| 23:47:53 | <Axman6> | monochrom: that's amazing |
| 23:48:17 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 23:51:39 | × | Benzi-Junior quits (~BenziJuni@dsl-149-67-143.hive.is) (Ping timeout: 260 seconds) |
| 23:52:05 | × | usr25 quits (~usr25@unaffiliated/usr25) (Quit: Leaving) |
| 23:52:14 | → | deviantfero joins (~deviantfe@190.150.27.58) |
| 23:53:28 | → | neiluj joins (~jco@91-167-203-101.subs.proxad.net) |
| 23:53:34 | → | conal joins (~conal@64.71.133.70) |
| 23:53:38 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 23:53:54 | × | neiluj quits (~jco@91-167-203-101.subs.proxad.net) (Changing host) |
| 23:53:54 | → | neiluj joins (~jco@unaffiliated/neiluj) |
| 23:54:09 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:a8e7:6389:162:dcda) |
| 23:54:38 | × | conal quits (~conal@64.71.133.70) (Client Quit) |
| 23:54:54 | × | LKoen quits (~LKoen@252.248.88.92.rev.sfr.net) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”) |
| 23:55:16 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:5cae:3825:c434:6c4) (Remote host closed the connection) |
| 23:55:40 | → | conal joins (~conal@64.71.133.70) |
| 23:57:27 | × | crobbins quits (~crobbins@2600:1700:48eb:8490:51aa:2f5f:ac36:490b) (Remote host closed the connection) |
| 23:57:43 | → | fengh joins (~haskeller@ip72-205-40-121.dc.dc.cox.net) |
| 23:58:02 | → | crobbins joins (~crobbins@2600:1700:48eb:8490:51aa:2f5f:ac36:490b) |
| 23:58:16 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
| 23:58:30 | × | Deide quits (~Deide@217.155.19.23) (Quit: Seeee yaaaa) |
| 23:58:34 | × | oisdk quits (~oisdk@2001:bb6:3329:d100:39a4:c049:dc19:9e44) (Quit: oisdk) |
All times are in UTC on 2021-02-22.