2021-02-20 00:00:54 +0100 | borne | (~fritjof@200116b8640b4400a9b5d4f34e3c7d10.dip.versatel-1u1.de) |
2021-02-20 00:03:30 +0100 | tromp | (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 246 seconds) |
2021-02-20 00:05:32 +0100 | AbtractSingleton | (rasurumatr@gateway/shell/matrix.org/x-mcfjqomktyvseahu) |
2021-02-20 00:05:33 +0100 | bo__ | (~bo@178.150.122.153) |
2021-02-20 00:06:48 +0100 | jpds_ | (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 268 seconds) |
2021-02-20 00:10:21 +0100 | <monochrom> | Naughty candidate: enumerate until leftmost absence = EULA |
2021-02-20 00:11:01 +0100 | <monochrom> | (Don't worry, my current serious choice is ufn = until first nothing) |
2021-02-20 00:12:03 +0100 | <ski> | `whileJust' ? |
2021-02-20 00:12:09 +0100 | jpds_ | (~jpds@gateway/tor-sasl/jpds) |
2021-02-20 00:12:25 +0100 | <monochrom> | Yeah that's nice too. |
2021-02-20 00:12:43 +0100 | <monochrom> | Nicer. |
2021-02-20 00:13:01 +0100 | tromp | (~tromp@dhcp-077-249-230-040.chello.nl) |
2021-02-20 00:13:09 +0100 | chenshen | (~chenshen@2620:10d:c090:400::5:1a91) |
2021-02-20 00:18:02 +0100 | tromp | (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 256 seconds) |
2021-02-20 00:19:48 +0100 | lambda-11235 | (~lambda-11@2600:1700:7c70:4600::3f) (Max SendQ exceeded) |
2021-02-20 00:20:32 +0100 | lambda-11235 | (~lambda-11@2600:1700:7c70:4600::3f) |
2021-02-20 00:23:33 +0100 | HarveyPwca | (~HarveyPwc@c-98-220-98-201.hsd1.il.comcast.net) |
2021-02-20 00:28:23 +0100 | xsperry | (~as@unaffiliated/xsperry) |
2021-02-20 00:31:09 +0100 | minoru_shiraeesh | (~shiraeesh@5.101.59.186) (Ping timeout: 264 seconds) |
2021-02-20 00:32:03 +0100 | conal | (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
2021-02-20 00:33:26 +0100 | nbloomf | (~nbloomf@2600:1700:ad14:3020:70bd:3c7c:6a1e:8706) |
2021-02-20 00:36:47 +0100 | tromp | (~tromp@dhcp-077-249-230-040.chello.nl) |
2021-02-20 00:37:25 +0100 | xff0x | (~xff0x@2001:1a81:524a:900:a41b:c75d:e7aa:feb6) (Ping timeout: 258 seconds) |
2021-02-20 00:37:51 +0100 | nbloomf | (~nbloomf@2600:1700:ad14:3020:70bd:3c7c:6a1e:8706) (Client Quit) |
2021-02-20 00:38:24 +0100 | xff0x | (~xff0x@2001:1a81:524a:900:7a5:9afc:4d34:2f96) |
2021-02-20 00:38:30 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 246 seconds) |
2021-02-20 00:39:16 +0100 | mirrorbird | (~psutcliff@m83-187-183-132.cust.tele2.se) (Ping timeout: 240 seconds) |
2021-02-20 00:41:55 +0100 | conal | (~conal@64.71.133.70) |
2021-02-20 00:42:13 +0100 | GreyFaceNoSpace | (~omar@95.157.26.203) |
2021-02-20 00:42:17 +0100 | <GreyFaceNoSpace> | hi |
2021-02-20 00:42:29 +0100 | <ski> | lo |
2021-02-20 00:42:41 +0100 | <GreyFaceNoSpace> | im new to haskell in general and need some help figuring out whats wrong with this function |
2021-02-20 00:42:43 +0100 | <GreyFaceNoSpace> | https://pastebin.com/UQRXUGw0 |
2021-02-20 00:42:55 +0100 | <GreyFaceNoSpace> | i want it to generate a random list |
2021-02-20 00:44:31 +0100 | <ski> | base case is a type error |
2021-02-20 00:44:31 +0100 | <GreyFaceNoSpace> | "parse error on input ‘let’ |
2021-02-20 00:44:31 +0100 | <GreyFaceNoSpace> | Failed, modules loaded: none." |
2021-02-20 00:44:36 +0100 | <monochrom> | I think you should look at that paste yourself, too. There is an obvious indentation problem. |
2021-02-20 00:44:56 +0100 | <monochrom> | or rather alignment problem. |
2021-02-20 00:44:59 +0100 | <GreyFaceNoSpace> | yeah i think the indentation got screwed while i was pasting |
2021-02-20 00:45:03 +0100 | <GreyFaceNoSpace> | sorry about that |
2021-02-20 00:45:14 +0100 | <ski> | yes, layout is off |
2021-02-20 00:45:33 +0100 | <swarmcollective> | Is the `in` necessary in a `do` block like that? |
2021-02-20 00:45:41 +0100 | <monochrom> | No. |
2021-02-20 00:45:48 +0100 | werneta | (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 256 seconds) |
2021-02-20 00:46:10 +0100 | <ski> | you could use `randomIO' in place of `random' |
2021-02-20 00:46:18 +0100 | jmo` | (~user@h-162-127.A785.priv.bahnhof.se) |
2021-02-20 00:46:24 +0100 | <GreyFaceNoSpace> | is there a way not to use IO at all? |
2021-02-20 00:46:45 +0100 | <ski> | pass in the `StdGen' as a parameter to `generateAsyncTsks' |
2021-02-20 00:47:32 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-02-20 00:47:39 +0100 | werneta | (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
2021-02-20 00:48:19 +0100 | MVQq | (~anja@198.254.199.42) (Quit: q) |
2021-02-20 00:48:55 +0100 | MarcelineVQ | (~anja@198.254.199.42) |
2021-02-20 00:49:54 +0100 | gehmehgeh | (~ircuser1@gateway/tor-sasl/gehmehgeh) (Quit: Leaving) |
2021-02-20 00:50:08 +0100 | son0p | (~son0p@181.136.122.143) (Quit: leaving) |
2021-02-20 00:50:45 +0100 | jmo` | (~user@h-162-127.A785.priv.bahnhof.se) (Ping timeout: 246 seconds) |
2021-02-20 00:52:19 +0100 | ddellacosta | (ddellacost@gateway/vpn/mullvad/ddellacosta) |
2021-02-20 00:53:12 +0100 | frozenErebus | (~frozenEre@94.128.219.166) (Ping timeout: 246 seconds) |
2021-02-20 00:54:54 +0100 | alx741 | (~alx741@181.196.68.69) (Quit: alx741) |
2021-02-20 00:55:01 +0100 | new_haskeller | (~new_haske@2607:fea8:be1f:ddc0:8d66:e007:d61a:1c5c) (Quit: Leaving...) |
2021-02-20 00:55:36 +0100 | nut | (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 240 seconds) |
2021-02-20 00:56:45 +0100 | ddellacosta | (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds) |
2021-02-20 00:57:44 +0100 | tromp | (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection) |
2021-02-20 00:58:59 +0100 | tromp | (~tromp@dhcp-077-249-230-040.chello.nl) |
2021-02-20 00:59:21 +0100 | deviantfero | (~deviantfe@190.150.27.58) (Ping timeout: 264 seconds) |
2021-02-20 01:00:10 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2021-02-20 01:01:03 +0100 | kam1 | (~kam1@5.126.205.103) |
2021-02-20 01:02:54 +0100 | Deide | (~Deide@217.155.19.23) (Quit: Seeee yaaaa) |
2021-02-20 01:03:03 +0100 | Sonderblade | (~helloman@94.191.136.141.mobile.tre.se) |
2021-02-20 01:03:26 +0100 | thc202 | (~thc202@unaffiliated/thc202) (Ping timeout: 240 seconds) |
2021-02-20 01:04:02 +0100 | <hololeap> | @djinn ((a,b) -> (c,d)) -> (a -> c, b -> d) |
2021-02-20 01:04:02 +0100 | <lambdabot> | -- f cannot be realized. |
2021-02-20 01:04:56 +0100 | <hololeap> | @djinn ((a,b) -> (c,d)) -> (a -> c) -> (b -> d) |
2021-02-20 01:04:56 +0100 | <lambdabot> | -- f cannot be realized. |
2021-02-20 01:04:58 +0100 | olligobber | (olligobber@gateway/vpn/privateinternetaccess/olligobber) |
2021-02-20 01:06:01 +0100 | <hololeap> | @djinn a -> a |
2021-02-20 01:06:01 +0100 | <lambdabot> | f a = a |
2021-02-20 01:06:23 +0100 | <ski> | @djinn (i0 -> (o0,i1 -> o1)) -> ((i0,i1) -> (o0,o1)) |
2021-02-20 01:06:24 +0100 | <lambdabot> | f a (b, c) = |
2021-02-20 01:06:24 +0100 | <lambdabot> | case a b of |
2021-02-20 01:06:24 +0100 | <lambdabot> | (d, e) -> (d, e c) |
2021-02-20 01:06:59 +0100 | <ski> | @djinn ((a,b) -> (c,d)) -> (a -> b -> c,a -> b -> d) |
2021-02-20 01:06:59 +0100 | <lambdabot> | f a = |
2021-02-20 01:06:59 +0100 | <lambdabot> | (\ b c -> |
2021-02-20 01:06:59 +0100 | <lambdabot> | case a (b, c) of |
2021-02-20 01:06:59 +0100 | <lambdabot> | (d, _) -> d, |
2021-02-20 01:06:59 +0100 | <lambdabot> | \ e f -> |
2021-02-20 01:07:01 +0100 | <lambdabot> | case a (e, f) of |
2021-02-20 01:07:03 +0100 | <lambdabot> | (_, g) -> g) |
2021-02-20 01:07:21 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-02-20 01:07:57 +0100 | <hololeap> | hm, right |
2021-02-20 01:09:09 +0100 | average | (uid473595@gateway/web/irccloud.com/x-indydqfvltwedbgv) (Quit: Connection closed for inactivity) |
2021-02-20 01:09:48 +0100 | <hololeap> | i'm not pro enough for the profunctors |
2021-02-20 01:10:09 +0100 | <ski> | ? |
2021-02-20 01:10:13 +0100 | <whataday> | how to implement "goto" with callCC? |
2021-02-20 01:10:53 +0100 | <ski> | you won't be able to do forward `goto', exactly |
2021-02-20 01:11:54 +0100 | <ski> | but you can make an action which when executed will give you back a "label" referring to the current point of execution, that you could later jump back to |
2021-02-20 01:12:16 +0100 | <whataday> | ski goto inside callCC is ok? |
2021-02-20 01:12:54 +0100 | <whataday> | how to do that? jump back to last label? |
2021-02-20 01:13:03 +0100 | fendor | (~fendor@91.141.3.79.wireless.dyn.drei.com) (Remote host closed the connection) |
2021-02-20 01:13:36 +0100 | <ski> | define `newLabel :: Cont o (Label o)' and `jumpLabel :: Label o -> Cont o a' |
2021-02-20 01:13:41 +0100 | <ski> | (and `Label' too, of course) |
2021-02-20 01:14:10 +0100 | <hololeap> | @djinn (a -> b, c -> d) -> (a,c) -> (b,d) |
2021-02-20 01:14:10 +0100 | <lambdabot> | f (a, b) (c, d) = (a c, b d) |
2021-02-20 01:14:18 +0100 | <ski> | or, if you prefer, `newLabel :: a -> Cont o (Label o a,a) and `jumpLabel :: Label o a -> a -> Cont o b' |
2021-02-20 01:14:25 +0100 | <hololeap> | so this isn't one half of an isomorphism, i take it |
2021-02-20 01:14:36 +0100 | <ski> | correct |
2021-02-20 01:14:58 +0100 | <ski> | the `b' result may generally depend on both the `a' and the `c' input, so you won't be able to reverse that |
2021-02-20 01:14:59 +0100 | jlixier | (c036de8c@192.54.222.140) |
2021-02-20 01:16:15 +0100 | jlixier | (c036de8c@192.54.222.140) () |
2021-02-20 01:16:29 +0100 | <hololeap> | is it one half of an adjunction, though... |
2021-02-20 01:16:41 +0100 | <whataday> | more specific? |
2021-02-20 01:16:47 +0100 | <whataday> | a simple code? |
2021-02-20 01:17:59 +0100 | <ski> | i wouldn't want to spoil the fun of figuring it out |
2021-02-20 01:18:21 +0100 | <hololeap> | adjunction on bifunctors? |
2021-02-20 01:18:24 +0100 | deviantfero | (~deviantfe@190.150.27.58) |
2021-02-20 01:18:37 +0100 | <ski> | the label thing |
2021-02-20 01:19:01 +0100 | <ski> | i'm not sure what kind of adjunction you had in mind |
2021-02-20 01:19:45 +0100 | <whataday> | ski is it related to fixed point? |
2021-02-20 01:19:49 +0100 | <hololeap> | i'm not either. i'm just trying to get an intuition for what these kinds of morphisms look like in the opposite category |
2021-02-20 01:20:13 +0100 | <ski> | whataday : perhaps to some degree |
2021-02-20 01:20:28 +0100 | <ski> | which morphisms ? |
2021-02-20 01:20:34 +0100 | <hololeap> | of course it might help if i figured out what category i'm in :p |
2021-02-20 01:21:02 +0100 | <hololeap> | ski: i don't even know anymore... i'm playing around with... something |
2021-02-20 01:21:24 +0100 | minoru_shiraeesh | (~shiraeesh@5.101.59.186) |
2021-02-20 01:21:25 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
2021-02-20 01:22:36 +0100 | deviantfero | (~deviantfe@190.150.27.58) (Ping timeout: 240 seconds) |
2021-02-20 01:24:52 +0100 | <ski> | perhaps ⌜f : bᵃ × dᶜ ⟶ (b × d)⁽ᵃ˟ᶜ⁾⌝ is your morphism. or perhaps given morphisms ⌜g : a ⟶ b⌝ and ⌜h : c ⟶ d⌝, you had producing ⌜g × h : a × c ⟶ b × d⌝ in mind |
2021-02-20 01:25:09 +0100 | nhs | (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 264 seconds) |
2021-02-20 01:25:14 +0100 | <ski> | or perhaps something else, entirely .. i can't really know, since you haven't given enough detail/context |
2021-02-20 01:26:54 +0100 | <hololeap> | ski: well, i made a Bidistributive class for fun and made an instance for (,) just to see if it worked |
2021-02-20 01:27:09 +0100 | acarrico | (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 260 seconds) |
2021-02-20 01:27:27 +0100 | <hololeap> | and then i made `cobitraverse cobitraverse :: (Functor f, Bidistributive g) => (f a -> b) -> (f c -> d) -> f (g a c) -> g b d` |
2021-02-20 01:27:38 +0100 | ddellacosta | (ddellacost@gateway/vpn/mullvad/ddellacosta) |
2021-02-20 01:27:45 +0100 | <hololeap> | oops, only one cobitraverse is supposed to be there :p |
2021-02-20 01:29:02 +0100 | <hololeap> | and then i was like, could i make a function with this signature: `(Functor f, Bidistributive g) => g (f a -> b) (f c -> d) -> f (g a c) -> g b d` |
2021-02-20 01:29:35 +0100 | <hololeap> | and i ended up standing alone in some field 20 miles away with a faraway look on my face |
2021-02-20 01:32:14 +0100 | ddellacosta | (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 265 seconds) |
2021-02-20 01:35:12 +0100 | ski | idly ponders cobits |
2021-02-20 01:36:57 +0100 | DataComputist | (~lumeng@50.43.26.251) (Ping timeout: 246 seconds) |
2021-02-20 01:36:57 +0100 | clog | (~nef@bespin.org) (Ping timeout: 260 seconds) |
2021-02-20 01:38:11 +0100 | da39a3ee5e6b4b0d | (~da39a3ee5@2403:6200:8876:b8ec:2ccc:b56e:5cb:43cd) |
2021-02-20 01:40:41 +0100 | DataComputist | (~lumeng@50.43.26.251) |
2021-02-20 01:41:15 +0100 | alx741 | (~alx741@181.196.68.69) |
2021-02-20 01:41:48 +0100 | <hololeap> | ski: could you explain what's going on with your "equation" ⌜f : bᵃ × dᶜ ⟶ (b × d)⁽ᵃ˟ᶜ⁾⌝, why it holds, and why the reverse doesn't hold? |
2021-02-20 01:42:30 +0100 | <ski> | i merely rewrote (one reading of it) in categorical notation |
2021-02-20 01:42:34 +0100 | <ski> | ("categorial" ?) |
2021-02-20 01:43:05 +0100 | <ski> | ⌜bᵃ⌝ is common notation in math for the set/type of functions from ⌜a⌝ to ⌜b⌝ |
2021-02-20 01:43:16 +0100 | Tuplanolla | (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Ping timeout: 240 seconds) |
2021-02-20 01:44:17 +0100 | epicte7us | (~epictetus@ip72-194-215-136.sb.sd.cox.net) |
2021-02-20 01:44:25 +0100 | <ski> | and ⌜T × U⌝ is the cartesian product of ⌜T⌝ and ⌜U⌝, consisting of all pairs ⌜(x,y)⌝, where ⌜x⌝ is an inhabitant of ⌜T⌝ and ⌜y⌝ of ⌜U⌝ |
2021-02-20 01:44:44 +0100 | <hololeap> | so why didn't you write it ⌜(b × d)⁽ᵃ˟ᶜ⁾ ^ (bᵃ × dᶜ)⌝ ? |
2021-02-20 01:45:21 +0100 | <ski> | because the whole thing is a morphism, not thought of as an element/inhabitant of an exponential object (the ⌜bᵃ⌝ things) |
2021-02-20 01:45:54 +0100 | <ski> | category theory is a *first*-order theory of functions (with function composition, rather than function application, as primitive) |
2021-02-20 01:47:16 +0100 | <ski> | in category theory proper you don't speak of "elements" or "inhabitants" of objects. e.g. ⌜g : bᵃ⌝ makes no sense. but ⌜g : a ⟶ b⌝ does |
2021-02-20 01:47:34 +0100 | ep1ctetus | (~epictetus@ip72-194-215-136.sb.sd.cox.net) (Ping timeout: 258 seconds) |
2021-02-20 01:47:42 +0100 | <ski> | the arrow ⌜⟶⌝ combines two objects, but the result is not itself an object |
2021-02-20 01:48:09 +0100 | <ski> | so you can't nest the arrow ⌜⟶⌝. however, you *can* nest the exponential ⌜bᵃ⌝ notation |
2021-02-20 01:48:33 +0100 | carlomagno | (~cararell@148.87.23.5) |
2021-02-20 01:48:37 +0100 | xrinzler | (~hydrogen@197.185.106.5) ("WeeChat 3.0") |
2021-02-20 01:48:40 +0100 | <hololeap> | i remember reading about this but didn't really understand it. there's some tight coupling between morphisms, hom-sets, and exponential objects but i wouldn't be able to explain the differences between them |
2021-02-20 01:48:54 +0100 | <ski> | and every statement with ⌜:⌝ is followed by one object (the domain/source), an arrow, and another object (the codomain/target) |
2021-02-20 01:49:09 +0100 | carlomagno1 | (~cararell@148.87.23.5) (Ping timeout: 264 seconds) |
2021-02-20 01:49:33 +0100 | <ski> | exponential objects can be used to simulate "higher-order morphisms". but exponentials are not guaranteed to exist in every category |
2021-02-20 01:49:53 +0100 | <hololeap> | something about closed cartesian categories, right? |
2021-02-20 01:50:08 +0100 | nhs | (~nhs@c-24-20-87-79.hsd1.or.comcast.net) |
2021-02-20 01:50:21 +0100 | <ski> | yes, cartesian closed categories are the ones that have exponential objects, for every pair of objects in the category |
2021-02-20 01:50:54 +0100 | <ski> | however, in some circumstances, it makes sense to use something that's similar to, but not exactly exponentials, as an "Ersatz" |
2021-02-20 01:50:58 +0100 | <hololeap> | even if there are no morphisms between those two objects? |
2021-02-20 01:51:02 +0100 | <ski> | (see "monoidal closed") |
2021-02-20 01:51:10 +0100 | <ski> | yes, sure |
2021-02-20 01:53:02 +0100 | <ski> | e.g. in ⌜Set⌝, there's no morphism from ⌜1⌝ (the singleton set, the set of empty tuples, the terminal/final object) to ⌜0⌝ (the empty set, the initial object). however, the object ⌜0¹⌝ still exists (and happens to be isomorphic to / in bijection with ⌜0⌝) |
2021-02-20 01:53:23 +0100 | <ski> | (you could take any inhabited set in place of ⌜1⌝, in fact) |
2021-02-20 01:55:22 +0100 | <hololeap> | so what is the relationship between exponential objects and hom-sets? |
2021-02-20 01:56:39 +0100 | <ski> | hom-sets are sets. exponential objects are objects in the category in question |
2021-02-20 01:56:44 +0100 | lmw | (95e040cf@gateway/web/thelounge/ip.149.224.64.207) |
2021-02-20 01:57:47 +0100 | <ski> | if the category is concrete, meaning that one can interpret its objects as sets (via an "underlying/forgetful fucntor"), then the underlying set of the exponential object may coincide with the hom-set |
2021-02-20 01:58:25 +0100 | Neuromancer | (~Neuromanc@unaffiliated/neuromancer) (Ping timeout: 240 seconds) |
2021-02-20 01:59:54 +0100 | <hololeap> | is there a hom-set for every pair of objects in a small category? |
2021-02-20 02:00:05 +0100 | nhs | (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds) |
2021-02-20 02:00:28 +0100 | <ski> | yes |
2021-02-20 02:00:45 +0100 | stree | (~stree@68.36.8.116) (Ping timeout: 265 seconds) |
2021-02-20 02:00:56 +0100 | <ski> | (even in a locally small category .. being the definition of "locally small") |
2021-02-20 02:01:20 +0100 | <hololeap> | so then there isn't necessarily a relationship between exponential objects and hom-sets, but they have parallel definitions (in those categories at least) |
2021-02-20 02:01:40 +0100 | nhs | (~nhs@c-24-20-87-79.hsd1.or.comcast.net) |
2021-02-20 02:01:44 +0100 | <ski> | i think sometimes exponentials are known as "internal homs" |
2021-02-20 02:02:27 +0100 | pfurla_ | (~pfurla@64.145.79.75) |
2021-02-20 02:02:36 +0100 | minoru_shiraeesh | (~shiraeesh@5.101.59.186) (Ping timeout: 240 seconds) |
2021-02-20 02:02:57 +0100 | <hololeap> | i wish i had learned category theory in grade-school :) |
2021-02-20 02:04:20 +0100 | <ski> | "Conceptual Mathematics: a first introduction to categories" by Lawvere and Schanuel is a quite slow-paced book, with kindergarten-style problems, and quotes from conversations in class about the concepts |
2021-02-20 02:04:45 +0100 | pfurla | (~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 240 seconds) |
2021-02-20 02:04:58 +0100 | conal | (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
2021-02-20 02:05:48 +0100 | <ski> | (it probably helps a little bit if you've at least seen say groups or monoids at some point, but it doesn't really require such background knowledge) |
2021-02-20 02:07:37 +0100 | lambda-11235 | (~lambda-11@2600:1700:7c70:4600::3f) (Ping timeout: 260 seconds) |
2021-02-20 02:07:44 +0100 | conal | (~conal@64.71.133.70) |
2021-02-20 02:08:16 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
2021-02-20 02:08:17 +0100 | Tops2 | (~Tobias@dyndsl-095-033-095-228.ewe-ip-backbone.de) (Read error: Connection reset by peer) |
2021-02-20 02:08:36 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2021-02-20 02:08:47 +0100 | ddellacosta | (ddellacost@gateway/vpn/mullvad/ddellacosta) |
2021-02-20 02:09:55 +0100 | nhs | (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 272 seconds) |
2021-02-20 02:11:21 +0100 | <hololeap> | cool, i will check it out at some point |
2021-02-20 02:11:24 +0100 | Alleria_ | (~AllahuAkb@2603-7000-3040-0000-5c29-b877-8573-3a70.res6.spectrum.com) (Ping timeout: 240 seconds) |
2021-02-20 02:11:26 +0100 | whataday | (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
2021-02-20 02:12:33 +0100 | whataday | (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
2021-02-20 02:13:18 +0100 | stree | (~stree@68.36.8.116) |
2021-02-20 02:13:38 +0100 | conal | (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
2021-02-20 02:13:48 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 265 seconds) |
2021-02-20 02:14:39 +0100 | <ski> | (more specifically, what may help is some familiarity with algebraic/equational reasoning, especially with not only having unknowns and indeterminates stand for numbers, but also for possibly more or less arbitrary things, and similarly having symbols like ⌜+⌝,⌜⋅⌝ possibly stand for other things than the usual familiar numeric addition and multiplication (say on integers, rational numbers, or real |
2021-02-20 02:14:45 +0100 | <ski> | numbers). having some basic familarity with functions should also help ..) |
2021-02-20 02:15:35 +0100 | Alleria_ | (~AllahuAkb@2603-7000-3040-0000-e45d-b815-1770-2199.res6.spectrum.com) |
2021-02-20 02:16:58 +0100 | da39a3ee5e6b4b0d | (~da39a3ee5@2403:6200:8876:b8ec:2ccc:b56e:5cb:43cd) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2021-02-20 02:17:22 +0100 | <karasu1[m]> | Groups and rings will help me understand Haskell? |
2021-02-20 02:17:50 +0100 | <ski> | nah, not really |
2021-02-20 02:17:52 +0100 | <monochrom> | No. |
2021-02-20 02:18:07 +0100 | <ski> | @where prerequisite |
2021-02-20 02:18:07 +0100 | <lambdabot> | "Prerequisite for Learning Haskell" <http://www.vex.net/~trebla/haskell/prerequisite.xhtml> |
2021-02-20 02:18:11 +0100 | pfurla | (~pfurla@ool-182ed2e2.dyn.optonline.net) |
2021-02-20 02:18:49 +0100 | <ski> | karasu1[m] : i was talking about that book above (which was not for learning Haskell, but for learning category theory) |
2021-02-20 02:19:06 +0100 | <ski> | (and no, you don't need to learn CT in order to learn, or make effective use of, Haskell) |
2021-02-20 02:19:56 +0100 | pfurla_ | (~pfurla@64.145.79.75) (Ping timeout: 240 seconds) |
2021-02-20 02:20:29 +0100 | <karasu1[m]> | CT? |
2021-02-20 02:20:40 +0100 | <karasu1[m]> | Combinatorics? |
2021-02-20 02:21:03 +0100 | <ski> | Category Theory |
2021-02-20 02:21:46 +0100 | ski | . o O ( Karatsuba ) |
2021-02-20 02:21:48 +0100 | <karasu1[m]> | But category is the part of mathematics that monoids are part of right? |
2021-02-20 02:21:58 +0100 | <ski> | no, not really |
2021-02-20 02:22:07 +0100 | <karasu1[m]> | OK |
2021-02-20 02:22:30 +0100 | <ski> | monoids, along with groups, rings, &c. are usually lumped in under the label "abstract algebra" |
2021-02-20 02:22:44 +0100 | <karasu1[m]> | Will it not help you at all? |
2021-02-20 02:22:55 +0100 | <monochrom> | No. |
2021-02-20 02:23:04 +0100 | <monochrom> | Learning Haskell will help you understand Haskell. |
2021-02-20 02:23:15 +0100 | <monochrom> | Why are you still looking for distraction? |
2021-02-20 02:23:22 +0100 | <ski> | then, "universal algebra" is a way to make this more uniform and general, focusing on what's the common features of monoids,groups,&c. |
2021-02-20 02:23:36 +0100 | <ski> | and then, category theory can be seen as generalizing that even further .. |
2021-02-20 02:23:43 +0100 | <karasu1[m]> | "Why are you still looking for distraction?" I need to pick electives in college.. |
2021-02-20 02:23:56 +0100 | ddellacosta | (ddellacost@gateway/vpn/mullvad/ddellacosta) (Remote host closed the connection) |
2021-02-20 02:24:17 +0100 | <ski> | if you're interested in math, you may (or may not) enjoy learning CT (or abstract algebra, for that matter). it's not directly relevant to Haskell, for the most part, though |
2021-02-20 02:24:26 +0100 | <monochrom> | This is not a career counselling channel. |
2021-02-20 02:24:50 +0100 | Mike69 | (ae330882@c-174-51-8-130.hsd1.co.comcast.net) |
2021-02-20 02:25:32 +0100 | ddellacosta | (ddellacost@gateway/vpn/mullvad/ddellacosta) |
2021-02-20 02:25:53 +0100 | <hololeap> | it might understand what the hell edwardk is talking about in his libraries |
2021-02-20 02:26:15 +0100 | <hololeap> | *help understand |
2021-02-20 02:26:51 +0100 | <hololeap> | *help you understand |
2021-02-20 02:28:18 +0100 | ddellaco_ | (~ddellacos@86.106.143.33) |
2021-02-20 02:29:13 +0100 | apache8080 | (~rishi@wsip-70-168-153-252.oc.oc.cox.net) |
2021-02-20 02:29:21 +0100 | <karasu1[m]> | I know it's not a career counselling channel. That is why I asked it in relation to Haskell |
2021-02-20 02:29:45 +0100 | ddellacosta | (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds) |
2021-02-20 02:29:56 +0100 | <karasu1[m]> | There is a good amount of math that is relevant to Haskell |
2021-02-20 02:30:11 +0100 | <karasu1[m]> | I was wondering if CT was one of them |
2021-02-20 02:30:13 +0100 | <karasu1[m]> | That's all |
2021-02-20 02:30:40 +0100 | <Mike69> | Would this be the appropriate forum to inquire about how to install ghcup on Mac OS? |
2021-02-20 02:30:47 +0100 | rajivr | (uid269651@gateway/web/irccloud.com/x-ybcsyjusnyktvefi) |
2021-02-20 02:30:52 +0100 | <monochrom> | relevant yes. help understand no. |
2021-02-20 02:31:11 +0100 | <monochrom> | Understanding Haskell helps learning CT. You've got the direction wrong. |
2021-02-20 02:31:15 +0100 | <glguy> | Mike69: sure |
2021-02-20 02:31:49 +0100 | <karasu1[m]> | monochrom: OK |
2021-02-20 02:32:00 +0100 | <glguy> | The thing that helps understanding Haskell most is writing Haskell code |
2021-02-20 02:34:04 +0100 | nhs | (~nhs@c-24-20-87-79.hsd1.or.comcast.net) |
2021-02-20 02:34:10 +0100 | <karasu1[m]> | I just thought it was related to Haskell |
2021-02-20 02:34:11 +0100 | <karasu1[m]> | So I asked |
2021-02-20 02:34:11 +0100 | <karasu1[m]> | I don't really see what's so wrong with that. |
2021-02-20 02:34:57 +0100 | <Mike69> | Thanks glguy, when I input the terminal line command to download ghc I got a build fail error and it recommended I look at build logs but I couldn't find what the issue was. Is there an alternative way to d/l this package? |
2021-02-20 02:35:50 +0100 | <hololeap> | not especially relevant, but i thought this was a neat article: https://bartoszmilewski.com/2021/02/16/functorio/ |
2021-02-20 02:36:28 +0100 | <ski> | hololeap : hehe :p |
2021-02-20 02:37:09 +0100 | <glguy> | Mike69: https://www.haskell.org/ghcup/ mentions "If you don't like curl | sh, see other installation methods." |
2021-02-20 02:37:29 +0100 | <glguy> | but it might be worth just putting the output you got on a pastebin and seeing if someone can help with that |
2021-02-20 02:37:56 +0100 | borne | (~fritjof@200116b8640b4400a9b5d4f34e3c7d10.dip.versatel-1u1.de) (Ping timeout: 240 seconds) |
2021-02-20 02:38:10 +0100 | m0rphism1 | (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) (Ping timeout: 265 seconds) |
2021-02-20 02:38:18 +0100 | ski | . o O ( `makedRedScienceAssembler :: (GreenCircuit,Gear,IronPlate) -> ((CopperPlate,Gear) -> RedScience)' ) |
2021-02-20 02:38:21 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds) |
2021-02-20 02:38:29 +0100 | <Mike69> | [ ghc-configure ] not found (too old?) |
2021-02-20 02:38:29 +0100 | <Mike69> | [ ghc-configure ] checking for gcc... gcc |
2021-02-20 02:38:30 +0100 | <Mike69> | [ ghc-configure ] checking whether the C compiler works... no |
2021-02-20 02:38:30 +0100 | <Mike69> | [ ghc-configure ] configure: error: in `/private/var/folders/mm/6xmqb11d7j51... |
2021-02-20 02:38:31 +0100 | <Mike69> | [ ghc-configure ] configure: error: C compiler cannot create executables |
2021-02-20 02:38:31 +0100 | <Mike69> | [ ghc-configure ] See `config.log' for more details |
2021-02-20 02:38:32 +0100 | <Mike69> | [ Error ] Build failed with NonZeroExit 77 "./configure" ["--prefix=/Users/mike/.ghcup/ghc/8.10.4"] |
2021-02-20 02:38:32 +0100 | <Mike69> | Check the logs at "/Users/mike/.ghcup/logs" and the build directory "/var/folders/mm/6xmqb11d7j51rwgyys43_lfr0000gn/T/ghcup-Gkf6oF" for more clues. |
2021-02-20 02:38:33 +0100 | <Mike69> | Make sure to clean up "/var/folders/mm/6xmqb11d7j51rwgyys43_lfr0000gn/T/ghcup-Gkf6oF" afterwards. |
2021-02-20 02:38:33 +0100 | <Mike69> | "_eghcup --cache install ghc recommended" failed! |
2021-02-20 02:38:34 +0100 | guest218 | (~user@49.5.6.87) |
2021-02-20 02:39:03 +0100 | <ski> | Mike69 : please don't paste many lines all at the same time into the channel |
2021-02-20 02:39:03 +0100 | nhs | (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 272 seconds) |
2021-02-20 02:39:06 +0100 | borne | (~fritjof@2a06:8782:ffbb:1337:cedc:600c:1368:e6dd) |
2021-02-20 02:39:27 +0100 | <Mike69> | No problem? How should I post lengthier content? |
2021-02-20 02:39:27 +0100 | apache8080 | (~rishi@wsip-70-168-153-252.oc.oc.cox.net) (Quit: WeeChat 1.9.1) |
2021-02-20 02:39:33 +0100 | <ski> | @where paste |
2021-02-20 02:39:33 +0100 | <lambdabot> | Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com |
2021-02-20 02:40:07 +0100 | <ski> | (you were likely just one or two lines away from being booted off the network by Sigyn, by doing the above) |
2021-02-20 02:40:09 +0100 | apache8080 | (~rishi@wsip-70-168-153-252.oc.oc.cox.net) |
2021-02-20 02:40:50 +0100 | amerigo | (uid331857@gateway/web/irccloud.com/x-vhvftduashcjswei) (Quit: Connection closed for inactivity) |
2021-02-20 02:40:53 +0100 | <Mike69> | I apologize, first time on this forum |
2021-02-20 02:41:28 +0100 | <glguy> | Mike69: you'll need a working C compiler, so that's worth fixing first. Do you already have xcode commandline tools installed? xcode-select --install |
2021-02-20 02:41:47 +0100 | <ski> | no worry. just informing you that it's a problem (it can be a bit disruptive to the channel flow), and also that you might get kicked off, if you do that |
2021-02-20 02:42:16 +0100 | <Mike69> | Let me check glguy, I know I have a c++ compiler |
2021-02-20 02:44:21 +0100 | <Mike69> | I did not, after d/l those command line tools can I rerun the curl terminal command to reinstall? |
2021-02-20 02:44:33 +0100 | <glguy> | Sure, worth a try |
2021-02-20 02:44:47 +0100 | loli | (~loli@024-171-017-003.res.spectrum.com) (Quit: WeeChat 3.0) |
2021-02-20 02:44:57 +0100 | wei2912 | (~wei2912@unaffiliated/wei2912) |
2021-02-20 02:45:08 +0100 | ezrakilty | (~ezrakilty@97-113-55-149.tukw.qwest.net) |
2021-02-20 02:45:16 +0100 | loli | (~loli@024-171-017-003.res.spectrum.com) |
2021-02-20 02:45:36 +0100 | <Mike69> | I apologize for the low level questions everyone. Its my first time working with the terminal |
2021-02-20 02:45:51 +0100 | <glguy> | It's fine. |
2021-02-20 02:46:40 +0100 | jmo` | (~user@h-162-127.A785.priv.bahnhof.se) |
2021-02-20 02:49:15 +0100 | <Mike69> | That worked! Thanks for the insight glguy |
2021-02-20 02:51:07 +0100 | <nshepperd2> | huh, this is weird. a trivial gloss program using playIO that does nothing maxes out the cpu doing callback_simulate_idle when its window is minimized/not visible |
2021-02-20 02:51:30 +0100 | jmo` | (~user@h-162-127.A785.priv.bahnhof.se) (Ping timeout: 265 seconds) |
2021-02-20 02:51:34 +0100 | l8star | (~l8star@business-90-187-113-149.pool2.vodafone-ip.de) |
2021-02-20 02:53:18 +0100 | <nshepperd2> | but then it doesn't when i have a compositor (`picom`) running so maybe this is some incomprehensible interaction with the fact that my window manager is i3 |
2021-02-20 02:54:23 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-02-20 02:56:16 +0100 | lmw | (95e040cf@gateway/web/thelounge/ip.149.224.64.207) (Quit: The Lounge - https://thelounge.chat) |
2021-02-20 02:58:23 +0100 | chenshen | (~chenshen@2620:10d:c090:400::5:1a91) (Read error: Connection reset by peer) |
2021-02-20 02:59:12 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 246 seconds) |
2021-02-20 03:00:08 +0100 | nhs | (~nhs@c-24-20-87-79.hsd1.or.comcast.net) |
2021-02-20 03:00:09 +0100 | <guest218> | ski: newLabel :: Cont o (Label o); jumpLabel :: Label o -> Cont o a; I don't get it how it can jump in callCC? |
2021-02-20 03:01:26 +0100 | <guest218> | what's the trick? |
2021-02-20 03:02:12 +0100 | elliott__ | (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Quit: WeeChat 3.0) |
2021-02-20 03:04:04 +0100 | <ski> | hint : `jumpLabel' needs to use `callCC' |
2021-02-20 03:04:16 +0100 | nhs | (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds) |
2021-02-20 03:04:56 +0100 | ph88^ | (~ph88@2a02:8109:9e00:7e5c:1d07:66bc:d1dc:63b4) (Remote host closed the connection) |
2021-02-20 03:05:23 +0100 | <monochrom> | Eh? I thought newLabel is the one that needs callCC. |
2021-02-20 03:05:24 +0100 | ph88^ | (~ph88@2a02:8109:9e00:7e5c:1d07:66bc:d1dc:63b4) |
2021-02-20 03:06:28 +0100 | <guest218> | ski: callCC \e1 -> do { ... let jumpLable = callCC \e2 -> .. }? |
2021-02-20 03:06:52 +0100 | <guest218> | no |
2021-02-20 03:07:15 +0100 | <guest218> | jumpLable <- callCC \e2 -> .. ? |
2021-02-20 03:07:31 +0100 | <guest218> | no |
2021-02-20 03:08:50 +0100 | <ski> | er .. sorry. `newLabel', yes |
2021-02-20 03:09:14 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2021-02-20 03:09:24 +0100 | oisdk | (~oisdk@2001:bb6:3329:d100:e4fd:fcea:33f:6b51) (Quit: oisdk) |
2021-02-20 03:10:47 +0100 | ddellaco_ | (~ddellacos@86.106.143.33) (Remote host closed the connection) |
2021-02-20 03:10:53 +0100 | oisdk | (~oisdk@2001:bb6:3329:d100:e4fd:fcea:33f:6b51) |
2021-02-20 03:11:19 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 265 seconds) |
2021-02-20 03:11:59 +0100 | <ski> | something like `evalCont (do (loop,i) <- newLabel 1; unless (i >= 1000) (jumpLabel loop (2*i)); return i)' ought to evaluate to `1024' |
2021-02-20 03:12:00 +0100 | <guest218> | newLabel = cont (\ar -> ar (a:: Label o)) :: Cont o (Label o) |
2021-02-20 03:13:09 +0100 | xff0x | (~xff0x@2001:1a81:524a:900:7a5:9afc:4d34:2f96) (Ping timeout: 272 seconds) |
2021-02-20 03:13:25 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds) |
2021-02-20 03:14:10 +0100 | <guest218> | ski: newLable :: Cont r a, what `newLabel l` means? you mean `runCont newLabel l`? |
2021-02-20 03:14:16 +0100 | apache8080 | (~rishi@wsip-70-168-153-252.oc.oc.cox.net) (Ping timeout: 240 seconds) |
2021-02-20 03:14:47 +0100 | xff0x | (~xff0x@2001:1a81:5288:8c00:80f0:a117:da1e:30a9) |
2021-02-20 03:16:01 +0100 | nshepperd2 | just fixes it by patching gloss to not set the idle callback at all. problem solved |
2021-02-20 03:16:52 +0100 | <nshepperd2> | nope, that didn't work |
2021-02-20 03:17:15 +0100 | landonf1 | (~landonf@195.140.213.38) (Remote host closed the connection) |
2021-02-20 03:18:06 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-02-20 03:19:09 +0100 | <ski> | guest218 : that's a `1', not an `l' |
2021-02-20 03:20:35 +0100 | <guest218> | number one or character L ? |
2021-02-20 03:20:53 +0100 | <guest218> | the font show them same here |
2021-02-20 03:20:59 +0100 | epicte7us | (~epictetus@ip72-194-215-136.sb.sd.cox.net) (Read error: Connection reset by peer) |
2021-02-20 03:22:40 +0100 | <ski> | the former |
2021-02-20 03:22:58 +0100 | <guest218> | ski: but newLabel :: Cont o (Label o); what `newLabel 1` does? |
2021-02-20 03:22:59 +0100 | pavonia | pavonia^\_^\ |
2021-02-20 03:23:14 +0100 | <guest218> | wait |
2021-02-20 03:23:23 +0100 | <guest218> | newLabel = callCC ... |
2021-02-20 03:23:29 +0100 | <guest218> | no |
2021-02-20 03:23:59 +0100 | <guest218> | callCC return Cont r a either |
2021-02-20 03:24:30 +0100 | drbean | (~drbean@TC210-63-209-155.static.apol.com.tw) |
2021-02-20 03:24:39 +0100 | <guest218> | ski: I don't get it, why this Cont r a can take a parameter without runCont? |
2021-02-20 03:24:49 +0100 | <ski> | <ski> or, if you prefer, `newLabel :: a -> Cont o (Label o a,a) and `jumpLabel :: Label o a -> a -> Cont o b' |
2021-02-20 03:25:42 +0100 | jeremyb | (~jeremyb@217.146.82.202) |
2021-02-20 03:26:21 +0100 | Mike69 | (ae330882@c-174-51-8-130.hsd1.co.comcast.net) (Quit: Connection closed) |
2021-02-20 03:26:25 +0100 | <guest218> | wait a sec, (loop, i) <- newLabel 1; this newLabel will exit earlier, that assign 1 to i is later |
2021-02-20 03:27:05 +0100 | <guest218> | ski: so `loop something` will assign 1 to i? |
2021-02-20 03:28:11 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-02-20 03:29:37 +0100 | <guest218> | the `loop` capture what actions after it and before call it? |
2021-02-20 03:30:11 +0100 | nhs | (~nhs@c-24-20-87-79.hsd1.or.comcast.net) |
2021-02-20 03:32:16 +0100 | <ski> | no assignment |
2021-02-20 03:33:29 +0100 | geowiesnot | (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 256 seconds) |
2021-02-20 03:33:35 +0100 | apache8080 | (~rishi@wsip-70-168-153-252.oc.oc.cox.net) |
2021-02-20 03:33:35 +0100 | <ski> | it will at first bind `i' to `1'. later, when `jumpLabel loop (2*i)' is executed, it will jump back, making the previous invocation of `jumpLabel i' (which is only invoked once) exit again, this time binding `i' to the previous value of `2*i' |
2021-02-20 03:35:12 +0100 | Lord_of_Life_ | (~Lord@unaffiliated/lord-of-life/x-0885362) |
2021-02-20 03:36:03 +0100 | nhs | (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 272 seconds) |
2021-02-20 03:36:05 +0100 | Lord_of_Life | (~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 240 seconds) |
2021-02-20 03:36:34 +0100 | Lord_of_Life_ | Lord_of_Life |
2021-02-20 03:37:47 +0100 | <guest218> | loop :: Label o |
2021-02-20 03:38:46 +0100 | <ski> | loop :: Label o Integer |
2021-02-20 03:39:10 +0100 | <ski> | (meaning that you pass an `Integer' to `jumpLabel', when you jump to it, causing `i' to be bound to that `Integer') |
2021-02-20 03:39:20 +0100 | <ski> | (it's a "`goto' with argument") |
2021-02-20 03:40:29 +0100 | <guest218> | but newLabel :: Cont o (Label o); jumpLabel :: Label o -> Cont o a; |
2021-02-20 03:41:06 +0100 | <guest218> | Label o and Label o Integer are not conflict? |
2021-02-20 03:41:20 +0100 | <ski> | <ski> <ski> or, if you prefer, `newLabel :: a -> Cont o (Label o a,a) and `jumpLabel :: Label o a -> a -> Cont o b' |
2021-02-20 03:41:29 +0100 | <ski> | i was using this latter version, in that example |
2021-02-20 03:42:17 +0100 | <guest218> | this do notation make it harder to understand ... |
2021-02-20 03:43:24 +0100 | ezrakilty | (~ezrakilty@97-113-55-149.tukw.qwest.net) (Remote host closed the connection) |
2021-02-20 03:43:41 +0100 | <guest218> | x <- Cont r a and let x = a and Cont r a in do-notation |
2021-02-20 03:44:25 +0100 | deviantfero | (~deviantfe@190.150.27.58) |
2021-02-20 03:45:18 +0100 | <ski> | perhaps you mean that in `x <- act', if `act :: Cont r a', then `x :: a' |
2021-02-20 03:46:50 +0100 | <guest218> | yes, in a Cont r a do-notaion, every line should have type Cont r a, right? |
2021-02-20 03:47:43 +0100 | <guest218> | but some assignment lines like x <- (act :: Cont r a) or let x = a :: a |
2021-02-20 03:47:48 +0100 | <guest218> | are also ok |
2021-02-20 03:48:08 +0100 | <guest218> | more confused |
2021-02-20 03:48:27 +0100 | <ski> | for a single `do'-expression, every command belonging to it should have an action of type `m a', where the `a' may differ between different commands, but the `m' should be the same |
2021-02-20 03:48:56 +0100 | <ski> | in your case, `m' would be `Cont r' .. which means that the commands have to share the same `r' |
2021-02-20 03:49:50 +0100 | <ski> | (`let' commands in `do' don't involve actions belonging to the `do'-expression, so they're irrelevant here) |
2021-02-20 03:50:47 +0100 | Narinas | (~Narinas@189.223.59.23.dsl.dyn.telnor.net) (Read error: Connection reset by peer) |
2021-02-20 03:51:04 +0100 | Narinas | (~Narinas@189.223.59.23.dsl.dyn.telnor.net) |
2021-02-20 03:51:06 +0100 | <guest218> | ski: in Maybe do-notation, let x = 3; 3 <- Just 3; and Just 3; aren't same? |
2021-02-20 03:51:22 +0100 | <guest218> | or 3 <- return 3 |
2021-02-20 03:51:33 +0100 | <ski> | i can't parse the question |
2021-02-20 03:51:56 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
2021-02-20 03:52:04 +0100 | <ski> | `3 <- return 3' and `3 <- Just 3' would be the same, if `Maybe's the monad |
2021-02-20 03:52:06 +0100 | alx741 | (~alx741@181.196.68.69) (Quit: alx741) |
2021-02-20 03:52:17 +0100 | <ski> | > [Just 3,return 3] |
2021-02-20 03:52:19 +0100 | <lambdabot> | [Just 3,Just 3] |
2021-02-20 03:53:00 +0100 | <guest218> | x :: Maybe Int; x = do { let x = 3; y <- Just 3; Just 3; z <- return 3 } |
2021-02-20 03:53:02 +0100 | <ski> | and `3 <- return 3' is a no-op command |
2021-02-20 03:53:18 +0100 | inkbottle | zebrag |
2021-02-20 03:53:42 +0100 | <guest218> | those four lines are not doing same thing? |
2021-02-20 03:53:53 +0100 | <ski> | that's not a valid `do', since the last command isn't a plain expression |
2021-02-20 03:54:17 +0100 | <ski> | since `x' is unused, `let x = 3' there is also a no-op |
2021-02-20 03:54:52 +0100 | <ski> | as is `Just 3' and `y <- Just 3' and `z <- return 3' (since `y' and `z' are unused, too) |
2021-02-20 03:56:08 +0100 | Benzi-Junior | (~BenziJuni@88-149-67-143.du.xdsl.is) |
2021-02-20 03:58:42 +0100 | gentauro | (~gentauro@unaffiliated/gentauro) (Read error: Connection reset by peer) |
2021-02-20 03:59:49 +0100 | gentauro | (~gentauro@unaffiliated/gentauro) |
2021-02-20 04:00:26 +0100 | <ephemient> | if you think about the desugaring, do { let x = 3; y <- Just 3; Just 3; z <- return 3 } means let x = 3 in Just 3 >>= \y -> Just 3 >> return 3 >>= \z -> |
2021-02-20 04:00:27 +0100 | ddellacosta | (ddellacost@gateway/vpn/mullvad/ddellacosta) |
2021-02-20 04:01:13 +0100 | <ephemient> | can't end an expression with \z ->, can't end a do-block with a z <- line either |
2021-02-20 04:01:58 +0100 | lambda-11235 | (~lambda-11@2600:1700:7c70:4600:7c17:5065:9ac7:7003) |
2021-02-20 04:02:41 +0100 | nhs | (~nhs@c-24-20-87-79.hsd1.or.comcast.net) |
2021-02-20 04:03:02 +0100 | ddellacosta | (ddellacost@gateway/vpn/mullvad/ddellacosta) (Remote host closed the connection) |
2021-02-20 04:04:10 +0100 | <ski> | @undo do { let {x = 3}; y <- Just 3; Just 3; z <- return 3; somethingElse } |
2021-02-20 04:04:10 +0100 | <lambdabot> | let { x = 3} in Just 3 >>= \ y -> Just 3 >> return 3 >>= \ z -> somethingElse |
2021-02-20 04:06:42 +0100 | <guest218> | @undo do { (loop,i) <- newLabel 1; unless (i >= 1000) (jumpLabel loop (2*i)); return i } |
2021-02-20 04:06:42 +0100 | <lambdabot> | newLabel 1 >>= \ (loop, i) -> unless (i >= 1000) (jumpLabel loop (2 * i)) >> return i |
2021-02-20 04:08:57 +0100 | nhs | (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 264 seconds) |
2021-02-20 04:10:29 +0100 | Lowl3v3l | (~Lowl3v3l@dslb-002-203-233-121.002.203.pools.vodafone-ip.de) (Ping timeout: 265 seconds) |
2021-02-20 04:14:23 +0100 | <guest218> | newLabel :: a -> Cont o (Label o a,a); jumpLabel :: Label o a -> a -> Cont o b |
2021-02-20 04:14:56 +0100 | <guest218> | newLabel 1 :: Cont o (Label o Int, Int) |
2021-02-20 04:15:30 +0100 | <guest218> | jumpLabel loop (2*i) :: Cont o b |
2021-02-20 04:16:26 +0100 | <guest218> | what's the magic can make jumpLabel loop (2*i) jump to newLabel 1 line? |
2021-02-20 04:16:45 +0100 | apache8080 | (~rishi@wsip-70-168-153-252.oc.oc.cox.net) (Ping timeout: 240 seconds) |
2021-02-20 04:19:34 +0100 | da39a3ee5e6b4b0d | (~da39a3ee5@2403:6200:8876:b8ec:2ccc:b56e:5cb:43cd) |
2021-02-20 04:19:36 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-02-20 04:19:44 +0100 | Sheilong | (uid293653@gateway/web/irccloud.com/x-rkfjjfjswoaocqaj) (Quit: Connection closed for inactivity) |
2021-02-20 04:21:33 +0100 | stree | (~stree@68.36.8.116) (Ping timeout: 264 seconds) |
2021-02-20 04:23:32 +0100 | borne | (~fritjof@2a06:8782:ffbb:1337:cedc:600c:1368:e6dd) (Ping timeout: 260 seconds) |
2021-02-20 04:24:37 +0100 | apache8080 | (~rishi@wsip-70-168-153-252.oc.oc.cox.net) |
2021-02-20 04:24:48 +0100 | FinnElija | (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) |
2021-02-20 04:24:48 +0100 | finn_elija | Guest50728 |
2021-02-20 04:24:48 +0100 | FinnElija | finn_elija |
2021-02-20 04:25:09 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
2021-02-20 04:28:53 +0100 | Guest50728 | (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) (Ping timeout: 268 seconds) |
2021-02-20 04:31:40 +0100 | Wuzzy | (~Wuzzy@p5790eb2a.dip0.t-ipconnect.de) (Quit: Wuzzy) |
2021-02-20 04:34:33 +0100 | stree | (~stree@68.36.8.116) |
2021-02-20 04:34:44 +0100 | <ski> | @let evalCont :: Cont o o -> o; evalCont = (`runCont` id) |
2021-02-20 04:34:45 +0100 | <lambdabot> | Defined. |
2021-02-20 04:35:01 +0100 | borne | (~fritjof@2a06:8782:ffbb:1337:cedc:600c:1368:e6dd) |
2021-02-20 04:35:04 +0100 | <ski> | @let evalContT :: Applicative i => ContT o i o -> i o; evalContT = (`runContT` pure) |
2021-02-20 04:35:06 +0100 | <lambdabot> | Defined. |
2021-02-20 04:35:24 +0100 | <ski> | > evalCont (do { (loop,i) <- newLabel 1; unless (i >= 1000) (jumpLabel loop (2*i)); return i }) |
2021-02-20 04:35:26 +0100 | <lambdabot> | 1024 |
2021-02-20 04:35:51 +0100 | <ski> | @type newLabel |
2021-02-20 04:35:52 +0100 | <lambdabot> | a -> Cont o (Label o a, a) |
2021-02-20 04:35:57 +0100 | <ski> | @type jumpLabel |
2021-02-20 04:35:58 +0100 | <lambdabot> | Label o a -> a -> Cont o b |
2021-02-20 04:36:05 +0100 | <ski> | @type newLabel_ |
2021-02-20 04:36:06 +0100 | <lambdabot> | Cont o (Label_ o) |
2021-02-20 04:36:16 +0100 | <ski> | @type jumpLabel_ |
2021-02-20 04:36:17 +0100 | <lambdabot> | Label_ o -> Cont o b |
2021-02-20 04:36:24 +0100 | <ski> | @type newLabelT |
2021-02-20 04:36:25 +0100 | <lambdabot> | forall k a (o :: k) (f :: k -> *). a -> ContT o f (LabelT o f a, a) |
2021-02-20 04:36:30 +0100 | <ski> | %c. |
2021-02-20 04:37:24 +0100 | <ski> | oh, curious .. `ContT' is polymorphic |
2021-02-20 04:39:52 +0100 | oisdk | (~oisdk@2001:bb6:3329:d100:e4fd:fcea:33f:6b51) (Quit: oisdk) |
2021-02-20 04:41:56 +0100 | <edwardk> | woot, this unlifted thing is actually starting to work |
2021-02-20 04:42:09 +0100 | <edwardk> | now i just need to make a gajillion unlifted Monad, etc. classes |
2021-02-20 04:42:33 +0100 | <ski> | unlifted what ? |
2021-02-20 04:42:42 +0100 | <edwardk> | i can now instantiate basically any typeclass i want at basically any TYPE r for any runtime rep i want, with pretty graceful fallback to GHC standard classes |
2021-02-20 04:42:47 +0100 | <edwardk> | github.com/ekmett/unlifted |
2021-02-20 04:42:47 +0100 | borne | (~fritjof@2a06:8782:ffbb:1337:cedc:600c:1368:e6dd) (Ping timeout: 260 seconds) |
2021-02-20 04:43:26 +0100 | <edwardk> | when you go to say generalize Num a to allow NUM (a :: TYPE r) you run into a hurdle which is that you can't supply default definitions, because levity polymorphism doesn't work in negative position... |
2021-02-20 04:43:29 +0100 | <edwardk> | but you can fix that |
2021-02-20 04:43:43 +0100 | <edwardk> | by making a class off the representation type itself that supplies the defaults |
2021-02-20 04:43:49 +0100 | <edwardk> | then I use backpack to fill in those instances |
2021-02-20 04:43:52 +0100 | <edwardk> | and then carry on |
2021-02-20 04:44:09 +0100 | <edwardk> | The end result is I can have Eq Int#, Num Float#, etc. |
2021-02-20 04:44:19 +0100 | toorevitimirp | (~tooreviti@117.182.181.253) |
2021-02-20 04:44:42 +0100 | <edwardk> | and i've figured out how to make a viable enough form of list, maybe, etc. that i can get Show/Read, etc. working with a bit more effort |
2021-02-20 04:45:12 +0100 | <edwardk> | ghc 9.2 should start allowing me unlifted data types, so this is my attempt to figure out how a world that works uniformly over lifted and unlifted data could look |
2021-02-20 04:45:27 +0100 | <ski> | hm, can you elaborate on "levity polymorphism doesn't work in negative position" ? |
2021-02-20 04:45:55 +0100 | <edwardk> | say you go to define id :: forall r (a :: TYPE r). a -> a; id x = x; GHC won't let you do that |
2021-02-20 04:46:05 +0100 | <edwardk> | r there could be 'LiftedRep like you are used to. |
2021-02-20 04:46:18 +0100 | <ski> | specifically because `a' is used in negative position ? |
2021-02-20 04:46:45 +0100 | <edwardk> | r there could be 'TupleRep '[ 'IntRep, 'LiftedRep] whatever. |
2021-02-20 04:46:48 +0100 | <edwardk> | yeah |
2021-02-20 04:46:58 +0100 | <edwardk> | it actually allows us to be levity polymorphic in the final result |
2021-02-20 04:47:00 +0100 | jmo` | (~user@h-162-127.A785.priv.bahnhof.se) |
2021-02-20 04:47:06 +0100 | <edwardk> | so i came up with a hack |
2021-02-20 04:47:08 +0100 | <edwardk> | i can make |
2021-02-20 04:47:13 +0100 | <edwardk> | type Lev a = (()~()) => a |
2021-02-20 04:47:21 +0100 | <edwardk> | and THAT can be levity polymorphic |
2021-02-20 04:47:31 +0100 | <edwardk> | type Lev (a :: TYPE r) = (()~()) => a |
2021-02-20 04:47:48 +0100 | <edwardk> | is internally a function in core, it takes a proof of ()~() and returns a value. so we're positive, right? |
2021-02-20 04:47:48 +0100 | <ski> | hm, i thought levity-polymorphic `error' only worked because it doesn't actually return a value |
2021-02-20 04:47:56 +0100 | <edwardk> | but it lives in kind Type, not TYPE r |
2021-02-20 04:49:00 +0100 | <edwardk> | the actions ghc takes to get the STG stack into the right configuration, arguments might get passed in different registers, etc. but that is all call-side. |
2021-02-20 04:49:26 +0100 | <edwardk> | one problem i had was for instance that i couldn't define Monoid at first |
2021-02-20 04:49:31 +0100 | <edwardk> | because it contains a naked 'a' |
2021-02-20 04:49:35 +0100 | <edwardk> | mempty :: a |
2021-02-20 04:49:46 +0100 | <edwardk> | similarly Bounded minBound, maxBound... pi elsewhere, etc. |
2021-02-20 04:49:50 +0100 | <ski> | you replace every `a' by `Lev a' ? |
2021-02-20 04:49:54 +0100 | <edwardk> | but by returning Lev a i can |
2021-02-20 04:50:17 +0100 | <edwardk> | ONLY for minBound, maxBound, pi, and a couple of limited situations where i want to work polymorphically over all kinds without a custom class |
2021-02-20 04:50:26 +0100 | <edwardk> | but i still have to manually hack in defaults |
2021-02-20 04:50:56 +0100 | xff0x | (~xff0x@2001:1a81:5288:8c00:80f0:a117:da1e:30a9) (Ping timeout: 240 seconds) |
2021-02-20 04:50:58 +0100 | <edwardk> | so i exploit the fact that a -> a -> a is a Type, regardless of the runtime rep (a :: TYPE r) has |
2021-02-20 04:51:01 +0100 | <ski> | "without a custom class" -- i thought you already said you did custom versions of all the classes ? |
2021-02-20 04:51:05 +0100 | jmo` | (~user@h-162-127.A785.priv.bahnhof.se) (Ping timeout: 240 seconds) |
2021-02-20 04:51:08 +0100 | <edwardk> | let me explain |
2021-02-20 04:51:31 +0100 | <edwardk> | https://github.com/ekmett/unlifted/blob/main/core/Unlifted/Internal/Class.hs#L34 |
2021-02-20 04:51:32 +0100 | <edwardk> | look at Eq |
2021-02-20 04:51:55 +0100 | <edwardk> | I can't put default definitions in there. because those definitions would be forced to manipulate arguments of unknown-at-the-time you wrote the instance kind. |
2021-02-20 04:52:01 +0100 | xff0x | (~xff0x@2001:1a81:5288:8c00:e78d:bbe2:6a38:a9e6) |
2021-02-20 04:52:10 +0100 | <edwardk> | but i can make EqRep which knows r supply those definitions. |
2021-02-20 04:52:28 +0100 | <edwardk> | so here i have one instance for 'LiftedRep which delegates to Prelude.Eq |
2021-02-20 04:52:31 +0100 | <edwardk> | so far so good? |
2021-02-20 04:52:57 +0100 | <edwardk> | but when i go to do this for say 'IntRep, i need another instance. which means supplying a ton of boilerplate instances that all look the same |
2021-02-20 04:53:09 +0100 | <edwardk> | but in theory the set of reps is open. after all TupleRep takes a list |
2021-02-20 04:53:23 +0100 | <edwardk> | so i use backpack to generate the EqRep, etc. instances. |
2021-02-20 04:53:41 +0100 | <edwardk> | https://github.com/ekmett/unlifted/blob/main/def/Def.hs#L24 |
2021-02-20 04:53:46 +0100 | <ski> | hm, what are instances of `EqRep' ? |
2021-02-20 04:53:48 +0100 | <edwardk> | Rep there is an arbitrary RuntimeRep |
2021-02-20 04:54:07 +0100 | <edwardk> | I have EqRep 'IntRep, EqRep 'FloatRep, EqRep 'WordRep, etc. |
2021-02-20 04:54:19 +0100 | <ski> | but not 'LiftedRep ? |
2021-02-20 04:54:30 +0100 | <edwardk> | those get generated by mixins stanzas |
2021-02-20 04:54:30 +0100 | <edwardk> | https://github.com/ekmett/unlifted/blob/main/unlifted.cabal#L73 |
2021-02-20 04:54:39 +0100 | DTZUZU | (~DTZUZU@205.ip-149-56-132.net) (Read error: Connection reset by peer) |
2021-02-20 04:54:41 +0100 | <edwardk> | 'LiftedRep is supplied in the .Class module. the others are supplied by the mixin |
2021-02-20 04:54:51 +0100 | <edwardk> | or rather, i could supply it in .Class |
2021-02-20 04:55:07 +0100 | <edwardk> | i guess i don't bother, because it won't get used as all the definitions for kind TYPE 'LiftedRep delegate to Prelude |
2021-02-20 04:55:14 +0100 | <edwardk> | rather than use the default definitions in the class |
2021-02-20 04:55:26 +0100 | theDon | (~td@muedsl-82-207-238-165.citykom.de) (Ping timeout: 240 seconds) |
2021-02-20 04:55:26 +0100 | <ski> | ah, `Rep' is a module parameter |
2021-02-20 04:55:28 +0100 | DTZUZU | (~DTZUZU@205.ip-149-56-132.net) |
2021-02-20 04:55:55 +0100 | <edwardk> | so to compare with (==) if you don't supply (==) it delegates to not (x /= y) by way of EqRep for the kind you're in. since that code knows the representation it can pass around values x and y at will. |
2021-02-20 04:56:24 +0100 | <edwardk> | so i can make, say newtype Age# = Age# Int# -- and define `instance Num Age#` and it just works using UnliftedNewtypes |
2021-02-20 04:56:47 +0100 | <edwardk> | similarly instances can hang off Char# because it has TYPE 'WordRep |
2021-02-20 04:57:06 +0100 | <edwardk> | and with this i can write (==) for things like Array#, etc. |
2021-02-20 04:57:30 +0100 | theDon | (~td@94.134.91.113) |
2021-02-20 04:57:34 +0100 | <edwardk> | when i go to do Show we run into a headache, which is that list is monomorphically tied to Type -> Tyope |
2021-02-20 04:57:37 +0100 | <edwardk> | er Type -> Type |
2021-02-20 04:57:50 +0100 | <edwardk> | so i generalize it, by making a type family List :: TYPE r -> Type |
2021-02-20 04:58:02 +0100 | <edwardk> | and then i have some test code for handling overloaded lists with that |
2021-02-20 04:58:07 +0100 | <edwardk> | using rebindable syntax |
2021-02-20 04:58:10 +0100 | <edwardk> | i have to get that integrated |
2021-02-20 04:58:19 +0100 | <edwardk> | but i just got the whole thing compiling end to end and was excited |
2021-02-20 04:58:35 +0100 | <edwardk> | end result is you can use [ 1#, 2#, 3# ] -- just fine |
2021-02-20 04:58:35 +0100 | <ski> | hm, just wondering how you're handling that overloading, yes |
2021-02-20 04:58:36 +0100 | s00pcan | (~chris@107.181.165.217) (Ping timeout: 240 seconds) |
2021-02-20 04:58:52 +0100 | <edwardk> | IfThenElse uses Lev to provide both appropriate laziness and dispatch off a single definition |
2021-02-20 04:59:07 +0100 | <ski> | `OverloadedLists' ? |
2021-02-20 04:59:20 +0100 | <edwardk> | https://github.com/ekmett/unlifted/blob/main/core/Unlifted/Internal/Syntax.hs#L20 |
2021-02-20 04:59:21 +0100 | <edwardk> | yeah |
2021-02-20 04:59:42 +0100 | <edwardk> | RebindableSyntax so it dispatches to whatever fromListN I have in scop |
2021-02-20 04:59:58 +0100 | <edwardk> | and the one i have in scope will be sufficiently generalized |
2021-02-20 05:00:14 +0100 | <ski> | hm, so you're effectively thunking the unboxed parameters with `Lev' |
2021-02-20 05:00:25 +0100 | <edwardk> | yeah, they become by-name there |
2021-02-20 05:00:31 +0100 | ski | nods |
2021-02-20 05:00:36 +0100 | <edwardk> | and automatically lowered when you go to use them without the ()~() constraint |
2021-02-20 05:00:48 +0100 | <edwardk> | which is why if there can be magically lazy but invisible to users |
2021-02-20 05:00:49 +0100 | s00pcan | (~chris@075-133-056-178.res.spectrum.com) |
2021-02-20 05:01:09 +0100 | <edwardk> | my issue was i wanted just the numeric bits of rebindablesyntax, but you can't opt out of the parts you don't want |
2021-02-20 05:01:14 +0100 | <edwardk> | which prompted the invention of Lev |
2021-02-20 05:01:18 +0100 | <edwardk> | but that also fixed Monoid, Bounded, etc. |
2021-02-20 05:01:32 +0100 | <edwardk> | and allowed me to write a runtimerep polymorphic const, id, etc. |
2021-02-20 05:01:44 +0100 | <ski> | why just the numeric bits ? |
2021-02-20 05:01:49 +0100 | <edwardk> | did it first? |
2021-02-20 05:01:53 +0100 | <edwardk> | doesn't need lists |
2021-02-20 05:02:08 +0100 | <edwardk> | just got list/maybe, so now i can do Show, Read, etc. |
2021-02-20 05:02:45 +0100 | <edwardk> | i've been off playing around with linear-haskell in another project, might try to see how polymorphic i could make things here too, but the two don't mesh perfectly |
2021-02-20 05:03:03 +0100 | <edwardk> | trying to shake that out so i can know what to ask for when i talk to the compiler folks |
2021-02-20 05:03:44 +0100 | <edwardk> | spend a couple hours fighting with ways to make lists/maybes actually get complete pragmas |
2021-02-20 05:03:54 +0100 | <edwardk> | still don't have good docs, as haddock can't find the backpacked mixins |
2021-02-20 05:03:55 +0100 | <dolio> | You can write a list that gets instantiated to unboxed ints? I was expecting it would still need to be one of the pointer reps. |
2021-02-20 05:03:59 +0100 | <edwardk> | so it misses most of the instances |
2021-02-20 05:04:14 +0100 | <edwardk> | dolio: there is a custom data type for each Rep |
2021-02-20 05:04:19 +0100 | <ski> | dolio : special-cased for each representation |
2021-02-20 05:04:21 +0100 | <edwardk> | built by backpack for me |
2021-02-20 05:04:25 +0100 | <dolio> | Oh, okay. |
2021-02-20 05:05:05 +0100 | <edwardk> | i'll be able to make LiftedRep and UnliftedRep share a backing implementation once we get them into a common (BoxedRep l) type in 9.2 |
2021-02-20 05:05:23 +0100 | toorevitimirp | (~tooreviti@117.182.181.253) (Remote host closed the connection) |
2021-02-20 05:05:30 +0100 | <dolio> | Yeah, okay. That makes more sense. |
2021-02-20 05:05:36 +0100 | vicfred | (vicfred@gateway/vpn/mullvad/vicfred) (Quit: Leaving) |
2021-02-20 05:05:37 +0100 | <dolio> | And might actually not be terrible to use. |
2021-02-20 05:05:46 +0100 | <edwardk> | and i'll be able to make the List :: TYPE r -> TYPE (BoxedRep l) -- in the end so i can have lifted and unlifted lists. |
2021-02-20 05:05:50 +0100 | toorevitimirp | (~tooreviti@117.182.181.253) |
2021-02-20 05:06:04 +0100 | <edwardk> | mutatis mutandis Maybe |
2021-02-20 05:06:10 +0100 | <edwardk> | but that needs ghc 9.2 unlifted data types |
2021-02-20 05:06:25 +0100 | <ski> | the list itself can be unboxed ? |
2021-02-20 05:06:31 +0100 | <edwardk> | unlifted, not unboxed |
2021-02-20 05:06:43 +0100 | <ski> | right, ok |
2021-02-20 05:06:52 +0100 | <dolio> | What are the ML people going to whine about then. :þ |
2021-02-20 05:07:03 +0100 | <edwardk> | the Maybe# is unboxed. Maybe would get lifted and unlifted versions for arguments of any rep. |
2021-02-20 05:07:26 +0100 | <edwardk> | newtype Maybe# a = Maybe# (# (##) | a #) |
2021-02-20 05:07:37 +0100 | ski | nods |
2021-02-20 05:07:37 +0100 | <edwardk> | is a newtype wrapper around an unboxed sum |
2021-02-20 05:07:53 +0100 | <dolio> | Are they doing sum unpacking at some point? |
2021-02-20 05:07:57 +0100 | ski | would still like unboxed sums, in the sense that the continuations are unboxed .. |
2021-02-20 05:07:58 +0100 | <edwardk> | the Maybe version needs me to be able to create new terms of kind 'UnliftedRep, and thats going into ghc 9.2 |
2021-02-20 05:08:14 +0100 | <edwardk> | ski: my goal is to have all 3 forms of Maybe |
2021-02-20 05:08:20 +0100 | <edwardk> | lifted, unlifted, unboxed |
2021-02-20 05:08:44 +0100 | <ski> | (iow, not what's called `UnboxedSums' in GHC) |
2021-02-20 05:08:45 +0100 | <edwardk> | right now you have to import a module that supplies the pattern synonyms for your runtimerep |
2021-02-20 05:08:55 +0100 | <edwardk> | ski: ah |
2021-02-20 05:09:36 +0100 | quinn_ | (~quinn@c-73-223-224-163.hsd1.ca.comcast.net) (Quit: ZNC 1.8.1 - https://znc.in) |
2021-02-20 05:09:40 +0100 | <edwardk> | right now i just have the choice between lifted, and the ghc style unboxed sums, where it turns it into an Int# tag and an 'a' that often points to some valid-but-harmless heap object |
2021-02-20 05:10:12 +0100 | ski | nods |
2021-02-20 05:10:18 +0100 | vicfred | (~vicfred@unaffiliated/vicfred) |
2021-02-20 05:10:37 +0100 | <edwardk> | dolio: the whole time i was writing this i was saying 'shut up bob' in my head over and over ;) |
2021-02-20 05:11:04 +0100 | <ski> | what was Harper saying ? |
2021-02-20 05:11:17 +0100 | nhs | (~nhs@c-24-20-87-79.hsd1.or.comcast.net) |
2021-02-20 05:11:34 +0100 | <edwardk> | oh just his general rants over haskell laziness lifting -> results. metaphorical bob in this case, not like he's said anything new on the topic lately |
2021-02-20 05:12:01 +0100 | <ski> | ic |
2021-02-20 05:12:18 +0100 | <ski> | (i haven't really seen much if any of that conversation, i think) |
2021-02-20 05:12:23 +0100 | <edwardk> | anyhow i was just pretty happy this worked |
2021-02-20 05:12:29 +0100 | <edwardk> | i was fairly pessimistic going in |
2021-02-20 05:12:37 +0100 | <ski> | it seems nifty, yes :) |
2021-02-20 05:12:50 +0100 | <edwardk> | it required something like 3 little miracles to fully function |
2021-02-20 05:12:57 +0100 | <dolio> | The only real thing about types in ML that you can't mimic in Haskell is having the default calling convention for them be strict. |
2021-02-20 05:13:13 +0100 | <karasu1[m]> | If ephemient is present, I would like to thank them for the `type Map k v = k -> Maybe v; empty _ = Nothing; insert k v m k' | k == k' = Just v | otherwise = m k'; lookup k m = m k` example yesterday (I think Axman6 presented a similar example as well). I think I understand it. |
2021-02-20 05:13:14 +0100 | <dolio> | So, I think all his complaints can be boiled down to that. |
2021-02-20 05:13:15 +0100 | <karasu1[m]> | My question is: are there similar exercises I can do to get a better understanding of treating functions as first class values to implement things and do things? |
2021-02-20 05:13:21 +0100 | <karasu1[m]> | I thought this was fun |
2021-02-20 05:13:34 +0100 | <dolio> | Aside from that it's ignorance of what you can write in Haskell at best. |
2021-02-20 05:13:44 +0100 | <edwardk> | karasu1[m]: nice! |
2021-02-20 05:14:03 +0100 | <karasu1[m]> | I am wondering if some blogs/textbook chapters somewhere go over this kind of thing in detail |
2021-02-20 05:14:20 +0100 | <ephemient> | karasu1[m]: you can implement `delete :: k -> Map k v -> Map k v` now, right? |
2021-02-20 05:14:21 +0100 | <karasu1[m]> | Or just have more exercises to try |
2021-02-20 05:14:40 +0100 | <karasu1[m]> | Yeah |
2021-02-20 05:15:09 +0100 | elfets | (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Quit: Leaving) |
2021-02-20 05:15:19 +0100 | quinn | (~quinn@c-73-223-224-163.hsd1.ca.comcast.net) |
2021-02-20 05:15:21 +0100 | <edwardk> | karasu1[m]: one thing worth noting is that the Map you have there is a little more lenient than the implementation we have to implement in haskell with search trees. after all your Map k v can be checked with (==), and can allow you to give back `const (Just 12)` to make a map with _all_ the values set. But on the other hand, unlike `Map` in haskell, your map doesn't let you enumerate all the set keys. |
2021-02-20 05:15:25 +0100 | <karasu1[m]> | remove k m k' = if k' = k then Nothing else m k' |
2021-02-20 05:15:27 +0100 | <karasu1[m]> | or similar |
2021-02-20 05:15:38 +0100 | <karasu1[m]> | s/remove/delete |
2021-02-20 05:15:39 +0100 | <ski> | karasu1[m] : perhaps you could try writing a one-pass `normalizeTree :: Fractional a => Tree a -> Tree a', that subtracts the global average from each quantity |
2021-02-20 05:15:52 +0100 | <edwardk> | you get to use Eq and can talk about infinitely large maps, but the asymptotics are worse and you can't enumerate keys. |
2021-02-20 05:16:10 +0100 | <edwardk> | ski: that's a great way to throw someone into the deepend ;) |
2021-02-20 05:16:24 +0100 | <dolio> | Yeah, there are several disadvantages to functions-as-maps. |
2021-02-20 05:16:28 +0100 | <ski> | karasu1[m] : or you could write `labelTree :: Tree a -> Tree (Integer,a)', labelling elements by integers, counting up from `0' .. possibly using `State' after the first direct version |
2021-02-20 05:16:45 +0100 | <ephemient> | absolutely don't use functions-as-maps for any real purpose, but it's a fun exercise |
2021-02-20 05:16:55 +0100 | <dolio> | Deleted/overwritten values will never be garbage collected. |
2021-02-20 05:17:02 +0100 | Volt_ | (~Volt_@2379590666.vpn.umich.net) |
2021-02-20 05:17:10 +0100 | <ephemient> | yeah, trying out other data structures is something you can explore |
2021-02-20 05:17:25 +0100 | <edwardk> | My interpretation of ski: "you should try swallowing this sword, folding yourself into a pretzel, and setting yourself on fire with this gasoline while wearing a flame retardant suit. i saw someone do it on Cirque du Soleil once, it should be fine." |
2021-02-20 05:18:05 +0100 | ski | grins |
2021-02-20 05:18:12 +0100 | <karasu1[m]> | I have no idea what normalizing a tree means, but basically subtract the average of all the values from all the values? |
2021-02-20 05:18:30 +0100 | <karasu1[m]> | Means we would have to traverse all the values I guess |
2021-02-20 05:18:35 +0100 | <karasu1[m]> | Maybe some foldr logic? |
2021-02-20 05:18:35 +0100 | <ski> | karasu1[m] : "normalize" as it making the mean/average of all the values be zero |
2021-02-20 05:18:47 +0100 | l8star | (~l8star@business-90-187-113-149.pool2.vodafone-ip.de) (Ping timeout: 258 seconds) |
2021-02-20 05:18:49 +0100 | <ski> | (by subtracting the mean) |
2021-02-20 05:19:41 +0100 | <ski> | karasu1[m] : yep, i think you've got it |
2021-02-20 05:19:47 +0100 | <ski> | the catch is the "one-pass" part |
2021-02-20 05:20:21 +0100 | nhs | (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 264 seconds) |
2021-02-20 05:20:33 +0100 | <edwardk> | to be fair, the repmin problem which shows how to do the one-pass thing was a fairly novel result when it was first done, so its not necessarily fair to expect someone with a limited grasp of haskell to leap right to the correct solution |
2021-02-20 05:20:38 +0100 | <karasu1[m]> | one pass reeks of accumulative recursion |
2021-02-20 05:20:46 +0100 | <ski> | (even if you don't do it by "treating functions as first class values", it can be a nice thing to ponder) |
2021-02-20 05:20:55 +0100 | <edwardk> | karasu1[m]: the secret is to exploit laziness |
2021-02-20 05:20:57 +0100 | <mniip> | what does "one" mean |
2021-02-20 05:20:59 +0100 | <mniip> | :P |
2021-02-20 05:21:17 +0100 | <ski> | edwardk : well, it ought to be more well-known |
2021-02-20 05:21:30 +0100 | <edwardk> | i agree |
2021-02-20 05:21:51 +0100 | <ski> | mniip : there is some question about that, yes :p |
2021-02-20 05:21:53 +0100 | <edwardk> | its just an awfully big ask to expect someone to find it who hasn't got a good grasp of evaluation in haskell let alone laziness |
2021-02-20 05:22:32 +0100 | <ski> | what can i say .. it was just the first thing that came to mind :] |
2021-02-20 05:23:57 +0100 | <ephemient> | well, if you can figure out how to do it for [a], you can do it for Tree a |
2021-02-20 05:24:19 +0100 | <ski> | (hrm, the other day i was looking for "the" paper the highlighted connection of attribute grammars to laziness, but couldn't find it .. anyone would happen to know the title ior author(s) ?) |
2021-02-20 05:26:41 +0100 | <karasu1[m]> | Yeah, I don't think I can figure it out... But I'm guessing this is a famous result lol |
2021-02-20 05:27:10 +0100 | <karasu1[m]> | List comprehension? |
2021-02-20 05:27:15 +0100 | <karasu1[m]> | for [a] |
2021-02-20 05:27:27 +0100 | <karasu1[m]> | idk |
2021-02-20 05:28:07 +0100 | carlomagno1 | (~cararell@148.87.23.5) |
2021-02-20 05:28:09 +0100 | apache8080 | (~rishi@wsip-70-168-153-252.oc.oc.cox.net) (Ping timeout: 272 seconds) |
2021-02-20 05:28:11 +0100 | <ski> | you know how to write recursive functions over lists, yes ? |
2021-02-20 05:28:39 +0100 | apache8080 | (~rishi@wsip-70-168-153-252.oc.oc.cox.net) |
2021-02-20 05:28:52 +0100 | <karasu1[m]> | The base case of empty list and recursive case of non-empty list right? And then foldr/foldl abstracts that |
2021-02-20 05:29:32 +0100 | <ski> | (`foldr', but) yes |
2021-02-20 05:29:48 +0100 | <karasu1[m]> | `foldr'?? |
2021-02-20 05:29:57 +0100 | carlomagno | (~cararell@148.87.23.5) (Ping timeout: 264 seconds) |
2021-02-20 05:30:19 +0100 | <karasu1[m]> | But yes, that seems like the usual pattern. Sometimes the base case is where there's one element |
2021-02-20 05:30:32 +0100 | <ski> | % :t foldr @[] |
2021-02-20 05:30:32 +0100 | <yahb> | ski: (a -> b -> b) -> b -> [a] -> b |
2021-02-20 05:30:50 +0100 | <ski> | @src foldr |
2021-02-20 05:30:50 +0100 | <lambdabot> | foldr f z [] = z |
2021-02-20 05:30:50 +0100 | <lambdabot> | foldr f z (x:xs) = f x (foldr f z xs) |
2021-02-20 05:31:00 +0100 | <karasu1[m]> | Yes, I mentioned foldr right, was there something wrong with my description? |
2021-02-20 05:31:00 +0100 | <ski> | `foldr' is more general than `foldl' |
2021-02-20 05:31:07 +0100 | <karasu1[m]> | ? |
2021-02-20 05:31:18 +0100 | <ski> | (you can implement `foldl' in terms of `foldr', but not the other way around) |
2021-02-20 05:31:53 +0100 | crestfallen | (~jvw@135-180-46-152.fiber.dynamic.sonic.net) |
2021-02-20 05:31:57 +0100 | <karasu1[m]> | They both work equally well over lists though, right? (except don't use `foldl` on infinite lists) |
2021-02-20 05:33:08 +0100 | <karasu1[m]> | Does the pattern help me do the normalize-list thing though... well, if I tried to do it, the recursive case would be: subtract the average from the rest of the list |
2021-02-20 05:33:10 +0100 | <ski> | > foldr const "oops" ("a":"bc":undefined) |
2021-02-20 05:33:12 +0100 | <lambdabot> | "a" |
2021-02-20 05:33:12 +0100 | nhs | (~nhs@c-24-20-87-79.hsd1.or.comcast.net) |
2021-02-20 05:33:12 +0100 | <ski> | > foldl (flip const) "oops" ("a":"bc":undefined) |
2021-02-20 05:33:14 +0100 | <lambdabot> | "*Exception: Prelude.undefined |
2021-02-20 05:33:18 +0100 | <karasu1[m]> | But we don't know the average yet |
2021-02-20 05:33:47 +0100 | <karasu1[m]> | the base case is just [] |
2021-02-20 05:33:54 +0100 | <karasu1[m]> | for empty lists |
2021-02-20 05:34:04 +0100 | <ski> | "But we don't know the average yet" -- yes .. the crux of the matter |
2021-02-20 05:34:44 +0100 | <karasu1[m]> | Well, you said one pass.. Does mapping a composition of two functions at once count as one pass? |
2021-02-20 05:34:50 +0100 | <karasu1[m]> | Those functions would have to interact somehow |
2021-02-20 05:35:20 +0100 | <karasu1[m]> | idk... |
2021-02-20 05:37:44 +0100 | <karasu1[m]> | Not sure how you represent this in Haskell, but map (elem -) to all the elements |
2021-02-20 05:38:05 +0100 | <karasu1[m]> | So it becomes a list of functions that take one argument, and subtract that argument to get an `a` |
2021-02-20 05:38:30 +0100 | <karasu1[m]> | Then compute the average..... and map it back.... |
2021-02-20 05:38:36 +0100 | <karasu1[m]> | But I guess that's two pass |
2021-02-20 05:38:51 +0100 | slack1256 | (~slack1256@dvc-186-186-101-190.movil.vtr.net) (Remote host closed the connection) |
2021-02-20 05:38:57 +0100 | <karasu1[m]> | We only do one computation though, right? Since Haskell is lazy.. |
2021-02-20 05:39:20 +0100 | <karasu1[m]> | So I guess technically it's one pass..? (probably this is not the answer you were looking for though..) |
2021-02-20 05:43:45 +0100 | nhs | (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 264 seconds) |
2021-02-20 05:44:21 +0100 | <karasu1[m]> | We would need some sort of mechanism to notify the elements in the list immediately when the foldr has been finished |
2021-02-20 05:44:35 +0100 | <karasu1[m]> | Once that "notification" is sent out, subtract the average.. |
2021-02-20 05:44:47 +0100 | <karasu1[m]> | Yeah, no idea.. |
2021-02-20 05:45:04 +0100 | <dolio> | Can you write something that subtracts something from every element of the list and also computes the average of the original elements in one pass? |
2021-02-20 05:46:01 +0100 | <karasu1[m]> | Sure |
2021-02-20 05:49:14 +0100 | bobbytab1es | bobbytables |
2021-02-20 05:51:43 +0100 | <edwardk> | i'm sad. i'd hoped i could get ghci to just print if i overloaded show, and a custom printer |
2021-02-20 05:51:45 +0100 | <edwardk> | GHCi can't bind a variable of unlifted type: it :: GHC.Prim.Int# |
2021-02-20 05:52:08 +0100 | <edwardk> | alas ghci gets confused when the thing you've set via -interactive-print expects something of kind other than Type |
2021-02-20 05:54:36 +0100 | <ski> | karasu1[m] : while taking a short walk, it occured to me that you could try writing `flatten :: Tree a -> [a]' |
2021-02-20 05:54:52 +0100 | <karasu1[m]> | dolio: https://paste.tomsmeding.com/YMeIPWHb |
2021-02-20 05:55:01 +0100 | <ski> | edwardk : and if you disable `it' ? |
2021-02-20 05:55:54 +0100 | <karasu1[m]> | wait I messed up |
2021-02-20 05:56:08 +0100 | <karasu1[m]> | So it should subtract a certain number from x each time in x:f xs |
2021-02-20 05:56:10 +0100 | conal | (~conal@64.71.133.70) |
2021-02-20 05:56:20 +0100 | nhs | (~nhs@c-24-20-87-79.hsd1.or.comcast.net) |
2021-02-20 05:56:24 +0100 | <karasu1[m]> | We can just add that as another argument |
2021-02-20 05:56:53 +0100 | <dolio> | Right. |
2021-02-20 05:56:53 +0100 | <edwardk> | i don't know how 'it' works in ghci, other than automatically binding to the last result |
2021-02-20 05:57:23 +0100 | <karasu1[m]> | https://paste.tomsmeding.com/xfCFKpyZ |
2021-02-20 05:57:33 +0100 | <karasu1[m]> | So I changed it to (x -):f xs |
2021-02-20 05:57:38 +0100 | polyphem | (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889) (Ping timeout: 264 seconds) |
2021-02-20 05:57:39 +0100 | <dolio> | You should accumulate the length, too, though. Otherwise that is an extra pass. |
2021-02-20 05:57:44 +0100 | <karasu1[m]> | So now it gives a list of partially applied functions |
2021-02-20 05:57:55 +0100 | <karasu1[m]> | yea, i will accumulate length too |
2021-02-20 05:57:58 +0100 | <karasu1[m]> | 1 sec |
2021-02-20 05:58:02 +0100 | <ski> | edwardk : i mean `-fno-it' |
2021-02-20 05:59:17 +0100 | <ski> | karasu1[m] : you're not computing `accumSum' properly |
2021-02-20 05:59:43 +0100 | <ski> | (your recursive call is off. type checker should complain) |
2021-02-20 05:59:45 +0100 | <dolio> | Wow, I didn't know that flag existed. |
2021-02-20 05:59:57 +0100 | zebrag | (~inkbottle@aaubervilliers-654-1-4-36.w83-200.abo.wanadoo.fr) (Quit: Konversation terminated!) |
2021-02-20 06:00:02 +0100 | ski | saw it the other day, while browsing the user guide |
2021-02-20 06:00:08 +0100 | <karasu1[m]> | https://paste.tomsmeding.com/dh9avdyX |
2021-02-20 06:00:12 +0100 | <karasu1[m]> | It now accumulates length |
2021-02-20 06:00:22 +0100 | <karasu1[m]> | wait.. i'll check ghci |
2021-02-20 06:00:26 +0100 | <karasu1[m]> | hmm |
2021-02-20 06:00:27 +0100 | <ski> | nah, it doesn't properly compute `len', either |
2021-02-20 06:00:30 +0100 | <edwardk> | ghci> 3# + 5 ==> 8 |
2021-02-20 06:00:32 +0100 | <edwardk> | that works |
2021-02-20 06:00:44 +0100 | <ski> | you'll probably need to call `f' in a `where' |
2021-02-20 06:01:01 +0100 | <ski> | (`let'-`in' or even `case'-`of' would also work ..) |
2021-02-20 06:01:21 +0100 | <ski> | edwardk : at `Int#' ? |
2021-02-20 06:01:22 +0100 | <edwardk> | so now i just need to make a custom pretty printing module that works polykindedly and advise users to use -fno-it -interactive-print print |
2021-02-20 06:01:24 +0100 | <edwardk> | yeah |
2021-02-20 06:02:11 +0100 | <karasu1[m]> | wait wdym by `f` in a `where`? |
2021-02-20 06:02:12 +0100 | <karasu1[m]> | https://paste.tomsmeding.com/1X9mCXPl |
2021-02-20 06:02:15 +0100 | <karasu1[m]> | Like that? |
2021-02-20 06:02:28 +0100 | <ski> | so how does `5' there work. i guess `fromInteger' is in your version of `Num' ? |
2021-02-20 06:02:32 +0100 | zebrag | (~inkbottle@aaubervilliers-654-1-4-36.w83-200.abo.wanadoo.fr) |
2021-02-20 06:02:41 +0100 | <ski> | nah |
2021-02-20 06:03:08 +0100 | <ski> | karasu1[m] : even seen how `splitAt', or `span'/`break'/`partition' can be defined ? |
2021-02-20 06:03:24 +0100 | <ski> | or `halve :: [a] -> ([a],[a])' |
2021-02-20 06:03:39 +0100 | forgottenone | (~forgotten@176.42.28.68) |
2021-02-20 06:04:17 +0100 | <ski> | (`halve [0 .. 8]' is `([0,2,4,6,8],[1,3,5,7])', e.g.) |
2021-02-20 06:04:19 +0100 | zebrag | (~inkbottle@aaubervilliers-654-1-4-36.w83-200.abo.wanadoo.fr) (Client Quit) |
2021-02-20 06:04:54 +0100 | <ski> | if not .. writing one of these yourself might be an interesting simple exercise |
2021-02-20 06:04:54 +0100 | conal | (~conal@64.71.133.70) (Read error: Connection reset by peer) |
2021-02-20 06:05:30 +0100 | <ski> | > span even [2,8,5,7,1,4] |
2021-02-20 06:05:31 +0100 | <lambdabot> | ([2,8],[5,7,1,4]) |
2021-02-20 06:05:37 +0100 | <ski> | > break odd [2,8,5,7,1,4] |
2021-02-20 06:05:38 +0100 | <lambdabot> | ([2,8],[5,7,1,4]) |
2021-02-20 06:05:45 +0100 | <ski> | > partition even [2,8,5,7,1,4] |
2021-02-20 06:05:47 +0100 | <lambdabot> | ([2,8,4],[5,7,1]) |
2021-02-20 06:06:02 +0100 | <ski> | > splitAt 4 [2,8,5,7,1,4] |
2021-02-20 06:06:04 +0100 | <lambdabot> | ([2,8,5,7],[1,4]) |
2021-02-20 06:07:31 +0100 | <ski> | (karasu1[m] : i mean .. you *could* define `f' in a `where' local to the defining equation of `accumList',`accumSum',`len' like that .. but that's not what i meant) |
2021-02-20 06:08:36 +0100 | conal | (~conal@64.71.133.70) |
2021-02-20 06:11:14 +0100 | <karasu1[m]> | Yeah trying to do that |
2021-02-20 06:11:20 +0100 | <karasu1[m]> | But I don't know the correct let syntax |
2021-02-20 06:11:35 +0100 | nhs | (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds) |
2021-02-20 06:11:52 +0100 | <karasu1[m]> | `(x -) : let (acLis, _, _) = f xs in acLis` |
2021-02-20 06:11:54 +0100 | <karasu1[m]> | Like that? |
2021-02-20 06:11:57 +0100 | <karasu1[m]> | idk |
2021-02-20 06:12:05 +0100 | <karasu1[m]> | getting error from GHCi |
2021-02-20 06:12:28 +0100 | <edwardk> | ghci> 1# + 3# ==> 4 ghci> "hello" ==> "hello" |
2021-02-20 06:12:34 +0100 | <edwardk> | ski: works a treat |
2021-02-20 06:13:20 +0100 | <ski> | great ! :) |
2021-02-20 06:14:23 +0100 | <ski> | karasu1[m] : something like that might work |
2021-02-20 06:16:29 +0100 | <karasu1[m]> | https://paste.tomsmeding.com/a78ycJhy |
2021-02-20 06:16:32 +0100 | <karasu1[m]> | GHC is happy |
2021-02-20 06:16:36 +0100 | <karasu1[m]> | Compiles |
2021-02-20 06:17:22 +0100 | <ski> | yes, that's what i meant by calling recursively in a `where' |
2021-02-20 06:18:11 +0100 | <karasu1[m]> | dolio: Was this what you were looking for btw? |
2021-02-20 06:18:25 +0100 | <ski> | `sum' and `l' are unused |
2021-02-20 06:19:07 +0100 | Volt_ | (~Volt_@2379590666.vpn.umich.net) (Quit: ) |
2021-02-20 06:19:40 +0100 | <ski> | (you could check this, by replacing `f (xs, 0, 0)' by `f (xs,undefined,undefined)', and still have the code work) |
2021-02-20 06:20:05 +0100 | <karasu1[m]> | You're right, yes |
2021-02-20 06:20:07 +0100 | <karasu1[m]> | https://paste.tomsmeding.com/hYXM0OmK |
2021-02-20 06:20:15 +0100 | <karasu1[m]> | Took some inspiration from quicksort.. |
2021-02-20 06:20:27 +0100 | <ski> | ooh .. now you're computing something else |
2021-02-20 06:20:32 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-02-20 06:20:34 +0100 | <karasu1[m]> | y.... |
2021-02-20 06:20:55 +0100 | <ski> | although, i suppose as you're calling `f', `sum' and `l' are always `0', so it doesn't matter |
2021-02-20 06:21:09 +0100 | Saukk | (~Saukk@83-148-239-3.dynamic.lounea.fi) |
2021-02-20 06:21:14 +0100 | <ski> | (but it's an unnecessary useless complication) |
2021-02-20 06:21:42 +0100 | <ski> | you should make up your mind. either compute direct style, or use an accumulator |
2021-02-20 06:21:51 +0100 | <ski> | not try to do both at the same time |
2021-02-20 06:22:13 +0100 | <ski> | (this applies to the summing; and, separately, also to the counting) |
2021-02-20 06:23:49 +0100 | <dolio> | karasu1[m]: Why is the result a list of functions? |
2021-02-20 06:28:20 +0100 | <karasu1[m]> | ski: https://paste.tomsmeding.com/Cum2piyC |
2021-02-20 06:28:35 +0100 | rdivyanshu | (uid322626@gateway/web/irccloud.com/x-dlrzsvchbzzkhuyx) |
2021-02-20 06:29:37 +0100 | <ski> | now, where's the "something" in "subtracts something from every element of the list" ? |
2021-02-20 06:29:57 +0100 | Tario | (~Tario@201.192.165.173) (Ping timeout: 264 seconds) |
2021-02-20 06:29:57 +0100 | <karasu1[m]> | dolio: The result is a list of functions since I was trying to fulfill "Can you write something that subtracts something from every element of the list and also computes the average of the original elements in one pass?" |
2021-02-20 06:30:14 +0100 | <karasu1[m]> | I thought that meant a partially applied subtraction |
2021-02-20 06:30:21 +0100 | <karasu1[m]> | The "something" would come in later I guess |
2021-02-20 06:30:33 +0100 | <ski> | well, it could |
2021-02-20 06:30:35 +0100 | <karasu1[m]> | That's what I understood from the specification |
2021-02-20 06:30:37 +0100 | <dolio> | No, I mean it subtracts some particular thing from every element of the list. |
2021-02-20 06:30:38 +0100 | <ski> | or it could be a present parameter |
2021-02-20 06:30:52 +0100 | <dolio> | The same thing from every element. |
2021-02-20 06:30:55 +0100 | <ski> | ("some particular thing" -- the *same* particular thing) |
2021-02-20 06:31:36 +0100 | apache8080 | (~rishi@wsip-70-168-153-252.oc.oc.cox.net) (Ping timeout: 240 seconds) |
2021-02-20 06:34:36 +0100 | <karasu1[m]> | like a map? |
2021-02-20 06:34:40 +0100 | <karasu1[m]> | (subtract 4) |
2021-02-20 06:34:50 +0100 | <ski> | a map ? |
2021-02-20 06:34:57 +0100 | <karasu1[m]> | map (subtract 4) [x] |
2021-02-20 06:35:10 +0100 | <ski> | that's the same as `[subtract 4 x]' |
2021-02-20 06:35:29 +0100 | <ski> | > map (subtract 4) [x] :: [Expr] |
2021-02-20 06:35:31 +0100 | <lambdabot> | [x - 4] |
2021-02-20 06:35:42 +0100 | <karasu1[m]> | yes |
2021-02-20 06:35:56 +0100 | <karasu1[m]> | map (subtract 4) [a, b, c, d, e, f, ....] |
2021-02-20 06:36:02 +0100 | <karasu1[m]> | Works for a general map |
2021-02-20 06:36:09 +0100 | <karasu1[m]> | of n length lists |
2021-02-20 06:36:09 +0100 | <ski> | well, `map' does a traversal of the list |
2021-02-20 06:36:27 +0100 | <ski> | (how else would it get to every element ?) |
2021-02-20 06:36:44 +0100 | <karasu1[m]> | yeah... |
2021-02-20 06:37:34 +0100 | <karasu1[m]> | (laziness... (the panacea of the functional programming world...)) |
2021-02-20 06:37:45 +0100 | <karasu1[m]> | (joking ..) |
2021-02-20 06:38:32 +0100 | <ski> | (laziness isn't really involved, at this point) |
2021-02-20 06:39:04 +0100 | <karasu1[m]> | Well, I know how to give you a list of functions that when given some elements, will give you back the difference AND also the average of the original list in one pass |
2021-02-20 06:39:16 +0100 | <karasu1[m]> | I don't think I can do better lol.. |
2021-02-20 06:39:34 +0100 | <swarmcollective> | > head (map (subtract 4) [1..10]) |
2021-02-20 06:39:35 +0100 | <lambdabot> | -3 |
2021-02-20 06:39:44 +0100 | <ski> | what if you'd pass `f' some number that you wanted to subtract from each element ? |
2021-02-20 06:39:47 +0100 | <swarmcollective> | ^^ lazy, right? |
2021-02-20 06:39:57 +0100 | <ski> | yup, swarmcollective |
2021-02-20 06:40:46 +0100 | <ski> | (focus for the moment on how `f' would handle that, rather than on which element to pass to `f') |
2021-02-20 06:41:07 +0100 | <karasu1[m]> | Sure, we can add an argument to f |
2021-02-20 06:41:09 +0100 | <karasu1[m]> | Let's say k |
2021-02-20 06:41:20 +0100 | <karasu1[m]> | then we would have (x - k) : restLis |
2021-02-20 06:41:26 +0100 | <karasu1[m]> | But it's still a list of functions right? |
2021-02-20 06:41:30 +0100 | <karasu1[m]> | same thing? |
2021-02-20 06:41:57 +0100 | <ski> | no |
2021-02-20 06:42:04 +0100 | <ski> | `x - k' there would be a number, not a function |
2021-02-20 06:42:52 +0100 | <swarmcollective> | Or would it be a function that evaluates to a number when requested? |
2021-02-20 06:43:01 +0100 | <swarmcollective> | Not that it matters, I think. |
2021-02-20 06:43:09 +0100 | stree | (~stree@68.36.8.116) (Ping timeout: 264 seconds) |
2021-02-20 06:43:21 +0100 | <swarmcollective> | It is effectively a number. |
2021-02-20 06:43:36 +0100 | <ski> | "a function that evaluates to a number when requested" -- all functions in Haskell takes exactly one argument as input |
2021-02-20 06:44:11 +0100 | <ephemient> | a thunk which evaluates to a number == a number in Haskell |
2021-02-20 06:44:42 +0100 | <ski> | yes ("thunk" is an implementation detail/issue) |
2021-02-20 06:45:10 +0100 | nbloomf | (~nbloomf@2600:1700:ad14:3020:4d24:b159:43b:6694) |
2021-02-20 06:47:22 +0100 | jmo` | (~user@h-162-127.A785.priv.bahnhof.se) |
2021-02-20 06:48:08 +0100 | <karasu1[m]> | But when we call f, we cannot pass it k |
2021-02-20 06:48:10 +0100 | <karasu1[m]> | We don't know k yet |
2021-02-20 06:48:19 +0100 | <karasu1[m]> | So it would still be a partially applied list |
2021-02-20 06:48:25 +0100 | <karasu1[m]> | x - k is a function |
2021-02-20 06:48:27 +0100 | <karasu1[m]> | That takes k |
2021-02-20 06:48:49 +0100 | <ephemient> | \k -> x - k is a function |
2021-02-20 06:49:00 +0100 | <karasu1[m]> | yes |
2021-02-20 06:49:04 +0100 | <karasu1[m]> | I agree.. |
2021-02-20 06:49:10 +0100 | <ski> | "But when we call f, we cannot pass it k" -- are you talking about initial call, or recursive call ? |
2021-02-20 06:49:30 +0100 | <karasu1[m]> | Both |
2021-02-20 06:49:36 +0100 | <karasu1[m]> | At neither of those points do we know k |
2021-02-20 06:49:50 +0100 | <ski> | well, `f' gets `k' as argument. so can easily pass it on to recursive call, no ? |
2021-02-20 06:50:22 +0100 | ania123 | (5e89ad7c@94.137.173.124) |
2021-02-20 06:50:29 +0100 | <dolio> | Why don't you know k? |
2021-02-20 06:50:36 +0100 | <dolio> | What if I pick 5? |
2021-02-20 06:50:42 +0100 | <dolio> | I can feed that in. |
2021-02-20 06:51:11 +0100 | <ski> | `k' was, so far, just to be some particular number that we wanted to subtract from every element |
2021-02-20 06:51:36 +0100 | jmo` | (~user@h-162-127.A785.priv.bahnhof.se) (Ping timeout: 240 seconds) |
2021-02-20 06:53:09 +0100 | crestfallen | (~jvw@135-180-46-152.fiber.dynamic.sonic.net) (Quit: Lost terminal) |
2021-02-20 06:54:25 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
2021-02-20 06:54:29 +0100 | <karasu1[m]> | https://paste.tomsmeding.com/UCbWHxGm |
2021-02-20 06:54:32 +0100 | <karasu1[m]> | Alright |
2021-02-20 06:54:33 +0100 | <karasu1[m]> | 5 |
2021-02-20 06:54:51 +0100 | <karasu1[m]> | But if we didn't pass in 5, we would still get a list of k at the end |
2021-02-20 06:54:56 +0100 | <karasu1[m]> | list of [a -> a] |
2021-02-20 06:54:57 +0100 | <karasu1[m]> | i mean |
2021-02-20 06:55:06 +0100 | tmciver | (~tmciver@cpe-172-101-40-226.maine.res.rr.com) (Ping timeout: 246 seconds) |
2021-02-20 06:55:09 +0100 | <dolio> | No, you wouldn't. |
2021-02-20 06:55:47 +0100 | <dolio> | The whole thing would be a function, there wouldn't be functions in the list. |
2021-02-20 06:55:55 +0100 | stree | (~stree@68.36.8.116) |
2021-02-20 06:56:07 +0100 | thunderrd | (~thunderrd@183.182.113.172) (Remote host closed the connection) |
2021-02-20 06:57:14 +0100 | tmciver | (~tmciver@cpe-172-101-40-226.maine.res.rr.com) |
2021-02-20 06:58:46 +0100 | <ski> | karasu1[m] : now, what if you pass in the average, instead of `5' ? |
2021-02-20 07:00:10 +0100 | <ski> | (btw, `Fractional a' presupposes `Num a', so you don't need to state the latter as an explicit constraint) |
2021-02-20 07:03:03 +0100 | monochrom | (trebla@216.138.220.146) (Quit: NO CARRIER) |
2021-02-20 07:03:27 +0100 | <swarmcollective> | Wow, that looks strange, but it works. :) |
2021-02-20 07:03:46 +0100 | machinedgod | (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 256 seconds) |
2021-02-20 07:04:16 +0100 | <karasu1[m]> | Attempt 1: https://paste.tomsmeding.com/jIovyTOr |
2021-02-20 07:04:34 +0100 | apache8080 | (~rishi@wsip-70-168-153-252.oc.oc.cox.net) |
2021-02-20 07:04:46 +0100 | <ski> | you didn't define `average' ? |
2021-02-20 07:04:53 +0100 | <karasu1[m]> | https://paste.tomsmeding.com/WzfsefgP |
2021-02-20 07:04:56 +0100 | <karasu1[m]> | Because I don't know average |
2021-02-20 07:04:59 +0100 | <karasu1[m]> | Attempt 2^ |
2021-02-20 07:05:11 +0100 | <ski> | average is sum divides by count |
2021-02-20 07:05:14 +0100 | <karasu1[m]> | Attempt 2 fails because the pattern matching on functions doesn't work.. |
2021-02-20 07:05:40 +0100 | <ski> | try defining `average' ? |
2021-02-20 07:06:15 +0100 | pavonia^\_^\ | (~user@unaffiliated/siracusa) (Quit: Bye!) |
2021-02-20 07:06:34 +0100 | <karasu1[m]> | https://paste.tomsmeding.com/caGvS2Tx |
2021-02-20 07:06:53 +0100 | <karasu1[m]> | it works...... |
2021-02-20 07:06:55 +0100 | <karasu1[m]> | mother of god.. |
2021-02-20 07:07:13 +0100 | <karasu1[m]> | IDK what's happening though so oh well.. |
2021-02-20 07:07:58 +0100 | <dolio> | Maybe you shouldn't have been thinking about what's happening, just trying to define the thing. |
2021-02-20 07:08:14 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 272 seconds) |
2021-02-20 07:08:15 +0100 | <swarmcollective> | It seems like magic, but I suppose it is able to compute accumSum and len, then apply that value as K. Pretty cool. |
2021-02-20 07:09:16 +0100 | <ski> | karasu1[m] : this is called "tying-the-knot" :) |
2021-02-20 07:09:25 +0100 | <swarmcollective> | Still a single traversal, but the thunk it builds could get large with a large list? Or am I missing something? |
2021-02-20 07:09:57 +0100 | <ski> | it only builds a single subtraction, for each list element |
2021-02-20 07:09:58 +0100 | <dolio> | You don't need to build thunks. |
2021-02-20 07:10:27 +0100 | <dolio> | For sum and length, that is. Those would get big if they're lazy. |
2021-02-20 07:11:03 +0100 | <ski> | yea, for efficiency, you should probably force those as you go (which means switching to accumulating style, for them) |
2021-02-20 07:12:03 +0100 | <desophos> | is there a conventional way to go about writing unit tests for functions that don't otherwise need to be exposed in the module's exports? i understand that one approach is to only test the exported functions, but i have a lot of intermediate functions and i'd like to make sure they work correctly |
2021-02-20 07:12:19 +0100 | <ski> | karasu1[m] : anyway .. an alternative is to, instead of having `f' take `k' as a parameter, you could "make the returned list take `k' as a parameter". that is, you write `\k -> x - k : ...' |
2021-02-20 07:12:26 +0100 | <dolio> | Well, you don't need to accumulate to fix that aspect. You just need to case on the recursive result and demand the numbers. |
2021-02-20 07:12:49 +0100 | <swarmcollective> | desophos, have you considered doctest? |
2021-02-20 07:12:58 +0100 | monochrom | (trebla@216.138.220.146) |
2021-02-20 07:13:06 +0100 | <ski> | desophos : make an `.Internal' module, export everything. import it into `.Test' (or whatever). also import it into your main module, and reexport the things you want to expose |
2021-02-20 07:13:20 +0100 | <ephemient> | :t \xs -> let (ys, (Sum total, Sum count)) = runWriter (traverse f xs); mean = total / fromIntegral count; f x = x - mean <$ tell (Sum x, Sum 1) in ys |
2021-02-20 07:13:21 +0100 | <swarmcollective> | doctest also provides nice examples for future you (and others) |
2021-02-20 07:13:21 +0100 | <lambdabot> | (Traversable t, Fractional b) => t b -> t b |
2021-02-20 07:13:32 +0100 | <ski> | dolio, true |
2021-02-20 07:13:40 +0100 | <desophos> | i haven't seen doctest, i'll look it up |
2021-02-20 07:14:33 +0100 | <ephemient> | @hackage doctest |
2021-02-20 07:14:33 +0100 | <lambdabot> | https://hackage.haskell.org/package/doctest |
2021-02-20 07:14:52 +0100 | <dolio> | Accumulating makes it tough for building the list, or trees if you're doing that. |
2021-02-20 07:15:20 +0100 | <ephemient> | I think the only real gripe I have is that you end up having to add QuickCheck as a library dependency if you want to write more complex properties |
2021-02-20 07:15:41 +0100 | <desophos> | what would that look like, ski? |
2021-02-20 07:15:58 +0100 | Neuromancer | (~Neuromanc@unaffiliated/neuromancer) |
2021-02-20 07:16:03 +0100 | <desophos> | oh, i'm already well down the QuickCheck rabbit hole |
2021-02-20 07:16:40 +0100 | da39a3ee5e6b4b0d | (~da39a3ee5@2403:6200:8876:b8ec:2ccc:b56e:5cb:43cd) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2021-02-20 07:17:38 +0100 | <desophos> | for the Internal module, would i just export everything from all my modules except Main, where i would reexport the functions i want exported?? |
2021-02-20 07:17:47 +0100 | <desophos> | oops, didn't mean two ? there :P |
2021-02-20 07:18:03 +0100 | <karasu1[m]> | dolio: Wait what do you mean by "You just need to case on the recursive result and demand the numbers."? |
2021-02-20 07:18:13 +0100 | <karasu1[m]> | I'm not sure what that looks like. |
2021-02-20 07:18:15 +0100 | Saukk | (~Saukk@83-148-239-3.dynamic.lounea.fi) (Remote host closed the connection) |
2021-02-20 07:19:04 +0100 | <dolio> | I don't think you should worry about that right now. |
2021-02-20 07:19:43 +0100 | <dolio> | But matching in the where clause is slightly different than using a `case ... of ...` |
2021-02-20 07:20:54 +0100 | <ephemient> | I don't suppose Monoid (,) is strict, is it. |
2021-02-20 07:22:01 +0100 | <ephemient> | > fst $ ((), First Nothing) <> ((), undefined) |
2021-02-20 07:22:04 +0100 | <lambdabot> | () |
2021-02-20 07:22:11 +0100 | <ephemient> | nope |
2021-02-20 07:24:30 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-02-20 07:25:25 +0100 | <koz_> | There is a strict pair in a bunch of places though. |
2021-02-20 07:25:30 +0100 | <koz_> | So you could use one of those? |
2021-02-20 07:27:39 +0100 | urodna | (~urodna@unaffiliated/urodna) (Quit: urodna) |
2021-02-20 07:28:09 +0100 | apache8080 | (~rishi@wsip-70-168-153-252.oc.oc.cox.net) (Ping timeout: 264 seconds) |
2021-02-20 07:29:05 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
2021-02-20 07:33:46 +0100 | electricityZZZZ | (~electrici@108-216-157-17.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 265 seconds) |
2021-02-20 07:38:53 +0100 | jedws | (~jedws@101.184.202.248) |
2021-02-20 07:40:49 +0100 | <ski> | hm, saw some blag (i think ?) talking about `Selective' in here, semi-recently .. but now i can't find it :/ |
2021-02-20 07:41:27 +0100 | <ski> | (i think it had some pretty pics with graphs/trees) |
2021-02-20 07:44:33 +0100 | kam1 | (~kam1@5.126.205.103) (Read error: Connection reset by peer) |
2021-02-20 07:45:29 +0100 | Varis | (~Tadas@unaffiliated/varis) |
2021-02-20 07:46:37 +0100 | kam1 | (~kam1@5.126.205.103) |
2021-02-20 07:46:58 +0100 | jedws | (~jedws@101.184.202.248) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2021-02-20 07:48:54 +0100 | <edwardk> | ghci> fmap (<> "world") $ just "hello" ===> Just "helloworld" ghci> fmap (+1) $ just 12# ===> Just 13 -- now i can handle Functor |
2021-02-20 07:49:21 +0100 | <ski> | why the `just' ? |
2021-02-20 07:49:38 +0100 | <edwardk> | just is polykinded. i can't make the pattern synonym do that at present |
2021-02-20 07:49:50 +0100 | <ski> | oic |
2021-02-20 07:50:15 +0100 | <edwardk> | there is a mono-runtime-rep pattern in Unlifted.Rep.Int, but its not quite so convenient |
2021-02-20 07:50:27 +0100 | <edwardk> | as you need to use it at each kind in turn |
2021-02-20 07:50:38 +0100 | <ski> | hmm .. pattern-synonyms can't be parameterized by values .. but they can be parameterized by constraints, right ? |
2021-02-20 07:52:14 +0100 | jeremyb | (~jeremyb@217.146.82.202) (Remote host closed the connection) |
2021-02-20 07:53:09 +0100 | <edwardk> | yeah, the issue is i have to use a view pattern to run the pattern guts, and it generates more surrounding functon-style code |
2021-02-20 07:53:35 +0100 | kam1 | (~kam1@5.126.205.103) (Ping timeout: 265 seconds) |
2021-02-20 07:53:37 +0100 | <edwardk> | e.g. i typically use something like pattern Foo a <- (isAFoo -> Just a) where Foo a = mkFoo a |
2021-02-20 07:53:51 +0100 | <ski> | yes |
2021-02-20 07:53:56 +0100 | <edwardk> | but i have to fully apply Foo a = mkFoo a |
2021-02-20 07:54:12 +0100 | <edwardk> | and that won't work when a is levity polymorphic |
2021-02-20 07:54:20 +0100 | <edwardk> | if i could write Foo = mkFoo there i'd be closer |
2021-02-20 07:54:22 +0100 | <ski> | hm |
2021-02-20 07:54:29 +0100 | <edwardk> | isAFoo is also problematic but not as problematic |
2021-02-20 07:54:34 +0100 | <ski> | i wonder if that's just an accidental limitation |
2021-02-20 07:54:36 +0100 | <edwardk> | was hoping i could use Lev a -> Maybe a |
2021-02-20 07:55:29 +0100 | nbloomf | (~nbloomf@2600:1700:ad14:3020:4d24:b159:43b:6694) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2021-02-20 07:56:47 +0100 | <edwardk> | this is actually a reasonable case for class associated pattern synonyms |
2021-02-20 07:56:59 +0100 | <edwardk> | if i could supply the pattern synonym definition completely in the instance? this would be solved |
2021-02-20 07:57:27 +0100 | <edwardk> | at each runtime rep i know everything i need to not be levity polymorphic |
2021-02-20 07:57:54 +0100 | thunderrd | (~thunderrd@183.182.113.172) |
2021-02-20 07:58:45 +0100 | <ski> | hm, makes sense |
2021-02-20 07:59:29 +0100 | <MarcelineVQ> | and then we can call them modules instead? :> |
2021-02-20 07:59:58 +0100 | <ski> | hehe, i was just having some thoughts in that direction :p |
2021-02-20 08:01:16 +0100 | kupi | (uid212005@gateway/web/irccloud.com/x-gmmufsknzrjevvnk) (Quit: Connection closed for inactivity) |
2021-02-20 08:01:22 +0100 | geowiesnot | (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) |
2021-02-20 08:01:49 +0100 | <MarcelineVQ> | modules in the sense of agda or some other sufficiently powerful module system that is |
2021-02-20 08:04:08 +0100 | <ski> | Lolli modules are interesting. they're dynamically assumed (and can be parameterized) |
2021-02-20 08:05:18 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-02-20 08:07:30 +0100 | proteusguy | (~proteusgu@cm-58-10-155-179.revip7.asianet.co.th) (Remote host closed the connection) |
2021-02-20 08:10:34 +0100 | lep_ | lep-delete |
2021-02-20 08:10:37 +0100 | MidAutumnHotaru | (~MidAutumn@unaffiliated/midautumnhotaru) (Quit: Quit 啾) |
2021-02-20 08:10:38 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 256 seconds) |
2021-02-20 08:12:14 +0100 | MidAutumnHotaru | (~MidAutumn@unaffiliated/midautumnhotaru) |
2021-02-20 08:19:56 +0100 | geowiesnot | (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 240 seconds) |
2021-02-20 08:21:02 +0100 | kam1 | (~kam1@83.123.186.200) |
2021-02-20 08:27:03 +0100 | Varis | (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
2021-02-20 08:28:13 +0100 | raym | (~ray@45.64.220.142) |
2021-02-20 08:29:36 +0100 | cole-h | (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 240 seconds) |
2021-02-20 08:44:40 +0100 | meck | (~meck@li1809-18.members.linode.com) (Quit: ZNC 1.8.2 - https://znc.in) |
2021-02-20 08:46:36 +0100 | jmo` | (~user@h-162-127.A785.priv.bahnhof.se) |
2021-02-20 08:48:09 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:897b:89fa:77f1:998c) (Remote host closed the connection) |
2021-02-20 08:48:36 +0100 | vicfred | (~vicfred@unaffiliated/vicfred) (Quit: Leaving) |
2021-02-20 08:49:03 +0100 | tromp | (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection) |
2021-02-20 08:50:20 +0100 | meck | (~meck@li1809-18.members.linode.com) |
2021-02-20 08:50:39 +0100 | tromp | (~tromp@dhcp-077-249-230-040.chello.nl) |
2021-02-20 08:51:07 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-02-20 08:52:05 +0100 | jmo` | (~user@h-162-127.A785.priv.bahnhof.se) (Ping timeout: 272 seconds) |
2021-02-20 08:57:18 +0100 | suraj | (uid487353@gateway/web/irccloud.com/x-vayhhcpqeujgyqoy) (Quit: Connection closed for inactivity) |
2021-02-20 09:04:08 +0100 | cantstanya | (~chatting@gateway/tor-sasl/cantstanya) (Remote host closed the connection) |
2021-02-20 09:04:09 +0100 | stree | (~stree@68.36.8.116) (Ping timeout: 264 seconds) |
2021-02-20 09:05:12 +0100 | acidjnk_new | (~acidjnk@p200300d0c7390972b9ca7ed3a5659a38.dip0.t-ipconnect.de) |
2021-02-20 09:06:42 +0100 | bayashi | (~bayashi@185.204.1.185) |
2021-02-20 09:07:04 +0100 | cantstanya | (~chatting@gateway/tor-sasl/cantstanya) |
2021-02-20 09:07:48 +0100 | sheepfleece | (~sheep@46.53.253.85) |
2021-02-20 09:10:13 +0100 | tzh_ | (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
2021-02-20 09:11:32 +0100 | ubert | (~Thunderbi@p200300ecdf25d94be6b318fffe838f33.dip0.t-ipconnect.de) |
2021-02-20 09:16:06 +0100 | danvet | (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) |
2021-02-20 09:17:11 +0100 | stree | (~stree@68.36.8.116) |
2021-02-20 09:25:09 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
2021-02-20 09:26:10 +0100 | lambda-11235 | (~lambda-11@2600:1700:7c70:4600:7c17:5065:9ac7:7003) (Quit: Bye) |
2021-02-20 09:29:10 +0100 | Varis | (~Tadas@unaffiliated/varis) |
2021-02-20 09:31:09 +0100 | drbean | (~drbean@TC210-63-209-155.static.apol.com.tw) (Ping timeout: 264 seconds) |
2021-02-20 09:35:17 +0100 | eta_ | (~eta@2600:1700:42c0:1368:ad7c:f84f:a62d:bc24) |
2021-02-20 09:35:19 +0100 | nhs | (~nhs@c-24-20-87-79.hsd1.or.comcast.net) |
2021-02-20 09:35:56 +0100 | average | (uid473595@gateway/web/irccloud.com/x-tvekuqggzzxphzcd) |
2021-02-20 09:36:22 +0100 | rayyyy | (~nanoz@gateway/tor-sasl/nanoz) |
2021-02-20 09:36:49 +0100 | eta_ | (~eta@2600:1700:42c0:1368:ad7c:f84f:a62d:bc24) (Client Quit) |
2021-02-20 09:37:15 +0100 | ania123 | (5e89ad7c@94.137.173.124) (Quit: Connection closed) |
2021-02-20 09:37:57 +0100 | Tuplanolla | (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) |
2021-02-20 09:38:33 +0100 | nut | (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
2021-02-20 09:40:07 +0100 | nhs | (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds) |
2021-02-20 09:40:13 +0100 | carldd11 | (~carldd@90-224-49-113-no56.tbcn.telia.com) (Ping timeout: 258 seconds) |
2021-02-20 09:47:24 +0100 | refusenick | (~user@2601:644:8502:d700::eeeb) (Ping timeout: 240 seconds) |
2021-02-20 09:48:01 +0100 | kam1 | (~kam1@83.123.186.200) (Read error: Connection reset by peer) |
2021-02-20 09:48:54 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:897b:89fa:77f1:998c) |
2021-02-20 09:49:50 +0100 | sheepfleece | (~sheep@46.53.253.85) (Remote host closed the connection) |
2021-02-20 09:52:30 +0100 | sheepfleece | (~sheep@46.53.253.85) |
2021-02-20 09:53:26 +0100 | frozenErebus | (~frozenEre@94.128.219.166) |
2021-02-20 09:54:02 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:897b:89fa:77f1:998c) (Ping timeout: 264 seconds) |
2021-02-20 09:55:28 +0100 | desophos | (~desophos@2601:249:1680:a570:dc9b:7a29:1314:79e3) (Read error: Connection reset by peer) |
2021-02-20 09:56:17 +0100 | carldd11 | (~carldd@90-224-49-113-no56.tbcn.telia.com) |
2021-02-20 09:56:21 +0100 | Narinas | (~Narinas@189.223.59.23.dsl.dyn.telnor.net) (Read error: Connection reset by peer) |
2021-02-20 09:56:35 +0100 | Narinas | (~Narinas@189.223.59.23.dsl.dyn.telnor.net) |
2021-02-20 09:57:11 +0100 | hekkaidekapus{ | (~tchouri@gateway/tor-sasl/hekkaidekapus) |
2021-02-20 09:57:19 +0100 | cole-h | (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) |
2021-02-20 09:57:20 +0100 | tromp | (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection) |
2021-02-20 09:57:32 +0100 | sheepfleece | (~sheep@46.53.253.85) (Remote host closed the connection) |
2021-02-20 09:58:38 +0100 | sheepfleece | (~sheep@46.53.253.85) |
2021-02-20 09:59:25 +0100 | hekkaidekapus_ | (~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 268 seconds) |
2021-02-20 09:59:56 +0100 | Narinas | (~Narinas@189.223.59.23.dsl.dyn.telnor.net) (Read error: Connection reset by peer) |
2021-02-20 10:00:04 +0100 | howdoi | (uid224@gateway/web/irccloud.com/x-ijfgnxevsuazdmff) (Quit: Connection closed for inactivity) |
2021-02-20 10:00:12 +0100 | cnmne[m] | (cnmnematri@gateway/shell/matrix.org/x-vwjvxvmnxyimiajk) (Quit: Idle for 30+ days) |
2021-02-20 10:00:21 +0100 | otulp | (~otulp@ti0187q162-6639.bb.online.no) (Quit: *POOF*) |
2021-02-20 10:01:13 +0100 | Narinas | (~Narinas@189.223.59.23.dsl.dyn.telnor.net) |
2021-02-20 10:06:04 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-02-20 10:08:33 +0100 | polyrain | (~polyrain@124.177.21.171) |
2021-02-20 10:10:17 +0100 | hendursa1 | (~weechat@gateway/tor-sasl/hendursaga) |
2021-02-20 10:10:33 +0100 | meff[m]1 | (meffsunado@gateway/shell/matrix.org/x-xlarclvljsmhctte) |
2021-02-20 10:10:52 +0100 | hendursa1 | (~weechat@gateway/tor-sasl/hendursaga) (Remote host closed the connection) |
2021-02-20 10:11:08 +0100 | hendursaga | (~weechat@gateway/tor-sasl/hendursaga) (Ping timeout: 268 seconds) |
2021-02-20 10:11:20 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 265 seconds) |
2021-02-20 10:13:09 +0100 | geowiesnot | (~user@87-89-181-157.abo.bbox.fr) |
2021-02-20 10:13:53 +0100 | hendursa1 | (~weechat@gateway/tor-sasl/hendursaga) |
2021-02-20 10:13:57 +0100 | tromp | (~tromp@dhcp-077-249-230-040.chello.nl) |
2021-02-20 10:15:10 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-02-20 10:20:00 +0100 | sheepfleece | (~sheep@46.53.253.85) (Remote host closed the connection) |
2021-02-20 10:20:27 +0100 | lemmih | (~lemmih@2406:3003:2072:44:863c:2213:5a0d:4443) (Remote host closed the connection) |
2021-02-20 10:21:20 +0100 | kam1 | (~kam1@83.123.186.200) |
2021-02-20 10:23:24 +0100 | sheepfleece | (~sheep@46.53.253.85) |
2021-02-20 10:24:12 +0100 | kam1 | (~kam1@83.123.186.200) (Read error: Connection reset by peer) |
2021-02-20 10:24:25 +0100 | kam1 | (~kam1@5.126.205.103) |
2021-02-20 10:24:28 +0100 | Narinas | (~Narinas@189.223.59.23.dsl.dyn.telnor.net) (Read error: Connection reset by peer) |
2021-02-20 10:25:11 +0100 | <Squarism> | Damnit, all cheap trains are gone. You guys made of money? |
2021-02-20 10:25:19 +0100 | Narinas | (~Narinas@189.223.59.23.dsl.dyn.telnor.net) |
2021-02-20 10:28:05 +0100 | mastarija | (~mastarija@93-136-104-186.adsl.net.t-com.hr) |
2021-02-20 10:29:14 +0100 | <Rembane> | Squarism: Are you buying a train? |
2021-02-20 10:29:29 +0100 | <Uniaika> | these are expensive, to be sure |
2021-02-20 10:29:37 +0100 | <Squarism> | ops, sorry wrong channel |
2021-02-20 10:29:50 +0100 | <Rembane> | Squarism: I still want to know what you are going to do with a train. :) |
2021-02-20 10:30:03 +0100 | <Squarism> | Rembane, familiar with 18xx? |
2021-02-20 10:30:21 +0100 | <Rembane> | Squarism: Vaguely, is it a board game? |
2021-02-20 10:30:25 +0100 | <Squarism> | yeah |
2021-02-20 10:30:28 +0100 | kam1 | (~kam1@5.126.205.103) (Read error: Connection reset by peer) |
2021-02-20 10:30:34 +0100 | coot | (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
2021-02-20 10:30:38 +0100 | <[exa]> | can we pls have haskell for urban transit? |
2021-02-20 10:30:41 +0100 | coot | (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
2021-02-20 10:30:57 +0100 | coot | (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
2021-02-20 10:31:03 +0100 | <Rembane> | [exa]: Then I would arrive just when I'm needed all the time! |
2021-02-20 10:31:07 +0100 | <Rembane> | Squarism: Sweet! |
2021-02-20 10:31:09 +0100 | kam1 | (~kam1@5.126.205.103) |
2021-02-20 10:31:12 +0100 | <[exa]> | :D |
2021-02-20 10:32:24 +0100 | <[exa]> | can't wait for all the new bad analogies; applicatives are wagons |
2021-02-20 10:32:48 +0100 | <Rembane> | Railway programming here we go! |
2021-02-20 10:34:50 +0100 | ski | . o O ( "CONS Should Not CONS Its Arguments, Part II: Cheney on the M.T.A." by Henry G. Baker in 1994-02-04 at <https://web.archive.org/web/20190202232914/http://home.pipeline.com/~hbaker1/CheneyMTA.html> ) |
2021-02-20 10:35:06 +0100 | Narinas | (~Narinas@189.223.59.23.dsl.dyn.telnor.net) (Read error: Connection reset by peer) |
2021-02-20 10:35:22 +0100 | gehmehgeh | (~ircuser1@gateway/tor-sasl/gehmehgeh) |
2021-02-20 10:35:26 +0100 | Narinas | (~Narinas@189.223.59.23.dsl.dyn.telnor.net) |
2021-02-20 10:37:15 +0100 | <[exa]> | ski: wow cool. :] |
2021-02-20 10:37:38 +0100 | Lowl3v3l | (~Lowl3v3l@dslb-002-203-233-121.002.203.pools.vodafone-ip.de) |
2021-02-20 10:38:10 +0100 | jmo` | (~user@h-162-127.A785.priv.bahnhof.se) |
2021-02-20 10:42:05 +0100 | kam1 | (~kam1@5.126.205.103) (Ping timeout: 240 seconds) |
2021-02-20 10:42:23 +0100 | _ht | (~quassel@82-169-194-8.biz.kpn.net) |
2021-02-20 10:43:50 +0100 | fendor | (~fendor@91.141.3.212.wireless.dyn.drei.com) |
2021-02-20 10:47:51 +0100 | geowiesnot | (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 246 seconds) |
2021-02-20 10:50:07 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:2c3b:7c69:7266:b507) |
2021-02-20 10:54:57 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:2c3b:7c69:7266:b507) (Ping timeout: 260 seconds) |
2021-02-20 10:56:38 +0100 | tby | (~tby@193.234.28.91) |
2021-02-20 10:58:26 +0100 | [tby] | (~tby@193.234.28.91) (Ping timeout: 240 seconds) |
2021-02-20 11:02:41 +0100 | guest218 | (~user@49.5.6.87) (Quit: ERC (IRC client for Emacs 27.1)) |
2021-02-20 11:03:52 +0100 | kam1 | (~kam1@83.123.186.200) |
2021-02-20 11:06:01 +0100 | pera | (~pera@unaffiliated/pera) |
2021-02-20 11:06:26 +0100 | da39a3ee5e6b4b0d | (~da39a3ee5@2403:6200:8876:b8ec:2ccc:b56e:5cb:43cd) |
2021-02-20 11:07:46 +0100 | Sgeo | (~Sgeo@ool-18b98aa4.dyn.optonline.net) (Read error: Connection reset by peer) |
2021-02-20 11:10:20 +0100 | rayyyy | (~nanoz@gateway/tor-sasl/nanoz) (Ping timeout: 268 seconds) |
2021-02-20 11:12:09 +0100 | m0rphism1 | (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) |
2021-02-20 11:13:19 +0100 | frozenErebus | (~frozenEre@94.128.219.166) (Ping timeout: 272 seconds) |
2021-02-20 11:13:49 +0100 | saitamaplus | (uid272474@gateway/web/irccloud.com/x-dfxujuraamaironk) |
2021-02-20 11:15:25 +0100 | wei2912 | (~wei2912@unaffiliated/wei2912) (Remote host closed the connection) |
2021-02-20 11:15:45 +0100 | p-core | (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) (Quit: p-core) |
2021-02-20 11:16:07 +0100 | p-core | (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) |
2021-02-20 11:16:30 +0100 | datajerk | (~datajerk@sense.net) (Ping timeout: 272 seconds) |
2021-02-20 11:19:01 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds) |
2021-02-20 11:20:30 +0100 | mikoto-chan | (~anass@213.177.155.250) |
2021-02-20 11:20:37 +0100 | datajerk | (~datajerk@sense.net) |
2021-02-20 11:21:53 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-02-20 11:25:46 +0100 | stree | (~stree@68.36.8.116) (Ping timeout: 265 seconds) |
2021-02-20 11:26:42 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 246 seconds) |
2021-02-20 11:29:21 +0100 | jmo` | (~user@h-162-127.A785.priv.bahnhof.se) (Ping timeout: 264 seconds) |
2021-02-20 11:29:53 +0100 | mananamenos | (~mananamen@37.red-88-27-26.staticip.rima-tde.net) |
2021-02-20 11:30:57 +0100 | hnOsmium0001 | (uid453710@gateway/web/irccloud.com/x-pylvhrkwkzdorvyp) (Quit: Connection closed for inactivity) |
2021-02-20 11:32:04 +0100 | jmo` | (~user@h-162-127.A785.priv.bahnhof.se) |
2021-02-20 11:37:57 +0100 | Saukk | (~Saukk@83-148-239-3.dynamic.lounea.fi) |
2021-02-20 11:38:15 +0100 | stree | (~stree@68.36.8.116) |
2021-02-20 11:38:36 +0100 | mananamenos | (~mananamen@37.red-88-27-26.staticip.rima-tde.net) (Ping timeout: 240 seconds) |
2021-02-20 11:39:13 +0100 | frozenErebus | (~frozenEre@94.128.219.166) |
2021-02-20 11:41:46 +0100 | deviantfero | (~deviantfe@190.150.27.58) (Read error: Connection reset by peer) |
2021-02-20 11:43:10 +0100 | jmo` | (~user@h-162-127.A785.priv.bahnhof.se) (Ping timeout: 265 seconds) |
2021-02-20 11:43:37 +0100 | jmo` | (~user@h-162-127.A785.priv.bahnhof.se) |
2021-02-20 11:45:11 +0100 | st8less | (~st8less@2603:a060:11fd:0:234b:a57f:e8a1:52cc) (Quit: WeeChat 2.9) |
2021-02-20 11:46:16 +0100 | frozenErebus | (~frozenEre@94.128.219.166) (Ping timeout: 240 seconds) |
2021-02-20 11:48:25 +0100 | Philonous | (~Philonous@unaffiliated/philonous) (Ping timeout: 268 seconds) |
2021-02-20 11:49:09 +0100 | kam1 | (~kam1@83.123.186.200) (Ping timeout: 264 seconds) |
2021-02-20 11:50:51 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:2c3b:7c69:7266:b507) |
2021-02-20 11:52:33 +0100 | rayyyy | (~nanoz@gateway/tor-sasl/nanoz) |
2021-02-20 11:52:40 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-02-20 11:54:11 +0100 | proteusguy | (~proteusgu@cm-58-10-208-13.revip7.asianet.co.th) |
2021-02-20 11:55:08 +0100 | Franciman | (~francesco@host-82-49-79-189.retail.telecomitalia.it) |
2021-02-20 11:55:37 +0100 | Yumasi | (~guillaume@2a01:e0a:5cb:4430:cd02:9531:2c88:7cb8) (Ping timeout: 260 seconds) |
2021-02-20 11:55:47 +0100 | usr25 | (~J@80.31.32.99) |
2021-02-20 11:55:50 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:2c3b:7c69:7266:b507) (Ping timeout: 264 seconds) |
2021-02-20 11:57:30 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 246 seconds) |
2021-02-20 11:58:00 +0100 | frozenErebus | (~frozenEre@94.128.219.166) |
2021-02-20 12:00:19 +0100 | sord937 | (~sord937@gateway/tor-sasl/sord937) |
2021-02-20 12:03:06 +0100 | frozenErebus | (~frozenEre@94.128.219.166) (Ping timeout: 246 seconds) |
2021-02-20 12:08:28 +0100 | coot | (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
2021-02-20 12:08:56 +0100 | coot | (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
2021-02-20 12:11:52 +0100 | sord937 | (~sord937@gateway/tor-sasl/sord937) (Quit: sord937) |
2021-02-20 12:12:41 +0100 | sheepfleece | (~sheep@46.53.253.85) (Quit: Lost terminal) |
2021-02-20 12:13:23 +0100 | __monty__ | (~toonn@unaffiliated/toonn) |
2021-02-20 12:14:07 +0100 | coot | (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 272 seconds) |
2021-02-20 12:14:48 +0100 | Philonous | (~Philonous@unaffiliated/philonous) |
2021-02-20 12:14:55 +0100 | frozenErebus | (~frozenEre@94.128.219.166) |
2021-02-20 12:19:33 +0100 | frozenErebus | (~frozenEre@94.128.219.166) (Ping timeout: 246 seconds) |
2021-02-20 12:22:03 +0100 | p-core | (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) (Quit: p-core) |
2021-02-20 12:22:20 +0100 | p-core | (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) |
2021-02-20 12:24:45 +0100 | son0p | (~son0p@181.58.39.182) |
2021-02-20 12:27:09 +0100 | mirrorbird | (~psutcliff@2a00:801:44d:603d:d116:d5a1:4a2f:a08f) |
2021-02-20 12:27:15 +0100 | unlink2 | (~unlink2@p200300ebcf241100fcf67590445edc70.dip0.t-ipconnect.de) (Remote host closed the connection) |
2021-02-20 12:27:44 +0100 | sheepfleece | (~sheep@46.53.253.85) |
2021-02-20 12:29:34 +0100 | unlink2 | (~unlink2@p200300ebcf241100fcf67590445edc70.dip0.t-ipconnect.de) |
2021-02-20 12:29:57 +0100 | Kaiepi | (~Kaiepi@47.54.252.148) (Remote host closed the connection) |
2021-02-20 12:31:54 +0100 | frozenErebus | (~frozenEre@94.128.219.166) |
2021-02-20 12:32:00 +0100 | Kaiepi | (~Kaiepi@47.54.252.148) |
2021-02-20 12:33:30 +0100 | Kaeipi | (~Kaiepi@47.54.252.148) |
2021-02-20 12:33:45 +0100 | Kaiepi | (~Kaiepi@47.54.252.148) (Remote host closed the connection) |
2021-02-20 12:34:08 +0100 | jmo` | (~user@h-162-127.A785.priv.bahnhof.se) (Ping timeout: 256 seconds) |
2021-02-20 12:36:42 +0100 | Saukk | (~Saukk@83-148-239-3.dynamic.lounea.fi) (Remote host closed the connection) |
2021-02-20 12:37:31 +0100 | olligobber | (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Remote host closed the connection) |
2021-02-20 12:37:34 +0100 | frozenErebus | (~frozenEre@94.128.219.166) (Ping timeout: 272 seconds) |
2021-02-20 12:39:27 +0100 | pera | (~pera@unaffiliated/pera) (Ping timeout: 272 seconds) |
2021-02-20 12:39:27 +0100 | Wuzzy | (~Wuzzy@p5790eb2a.dip0.t-ipconnect.de) |
2021-02-20 12:43:32 +0100 | ClaudiusMaximus | (~claude@191.123.199.146.dyn.plus.net) |
2021-02-20 12:43:32 +0100 | ClaudiusMaximus | (~claude@191.123.199.146.dyn.plus.net) (Changing host) |
2021-02-20 12:43:32 +0100 | ClaudiusMaximus | (~claude@unaffiliated/claudiusmaximus) |
2021-02-20 12:44:29 +0100 | hexagenic | (~mattias@2001:2002:51e0:74c9:5098:c4b6:1b73:7815) |
2021-02-20 12:47:10 +0100 | <mikoto-chan> | Is it possible to write wrappers for Javascript libraries in Haskell? |
2021-02-20 12:49:33 +0100 | add^_ | (~add@tutu.vovoid.net) () |
2021-02-20 12:51:28 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:2c3b:7c69:7266:b507) |
2021-02-20 12:54:12 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-02-20 12:56:26 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:2c3b:7c69:7266:b507) (Ping timeout: 264 seconds) |
2021-02-20 12:58:48 +0100 | mouseghost | (~draco@87-206-9-185.dynamic.chello.pl) |
2021-02-20 12:58:48 +0100 | mouseghost | (~draco@87-206-9-185.dynamic.chello.pl) (Changing host) |
2021-02-20 12:58:48 +0100 | mouseghost | (~draco@wikipedia/desperek) |
2021-02-20 12:59:21 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds) |
2021-02-20 12:59:37 +0100 | frozenErebus | (~frozenEre@94.128.219.166) |
2021-02-20 13:02:27 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-02-20 13:02:42 +0100 | berberman | (~berberman@unaffiliated/berberman) (Ping timeout: 260 seconds) |
2021-02-20 13:03:31 +0100 | berberman | (~berberman@unaffiliated/berberman) |
2021-02-20 13:04:20 +0100 | jmo` | (~user@h-162-127.A785.priv.bahnhof.se) |
2021-02-20 13:08:05 +0100 | <[exa]> | mikoto-chan: the answer is "yes", but the question is so generic that I'm likely answering a different interpretation. |
2021-02-20 13:08:22 +0100 | <[exa]> | mikoto-chan: what precisely you want to do? |
2021-02-20 13:08:51 +0100 | Pickchea | (~private@unaffiliated/pickchea) |
2021-02-20 13:09:27 +0100 | miklcct | (quasselcor@2001:19f0:7001:5ad:5400:2ff:feb6:50d7) (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
2021-02-20 13:09:41 +0100 | miklcct | (quasselcor@2001:19f0:7001:5ad:5400:2ff:feb6:50d7) |
2021-02-20 13:10:04 +0100 | Kaeipi | (~Kaiepi@47.54.252.148) (Remote host closed the connection) |
2021-02-20 13:10:18 +0100 | Kaeipi | (~Kaiepi@47.54.252.148) |
2021-02-20 13:13:02 +0100 | <mikoto-chan> | [exa]: I want to write a Matrix client but there is no library for Haskell |
2021-02-20 13:15:02 +0100 | <merijn> | The solution would be to make one, then? :p |
2021-02-20 13:15:33 +0100 | frozenErebus | (~frozenEre@94.128.219.166) (Ping timeout: 264 seconds) |
2021-02-20 13:18:35 +0100 | mikoto-chan | (~anass@213.177.155.250) (Quit: mikoto-chan) |
2021-02-20 13:19:40 +0100 | forell | (~forell@unaffiliated/forell) (Quit: ZNC - https://znc.in) |
2021-02-20 13:20:45 +0100 | frozenErebus | (~frozenEre@94.128.219.166) |
2021-02-20 13:21:01 +0100 | forell | (~forell@unaffiliated/forell) |
2021-02-20 13:21:36 +0100 | mikoto-chan | (~anass@213.177.155.250) |
2021-02-20 13:23:13 +0100 | berberman | (~berberman@unaffiliated/berberman) (Read error: Connection timed out) |
2021-02-20 13:23:38 +0100 | berberman | (~berberman@unaffiliated/berberman) |
2021-02-20 13:24:10 +0100 | mikoto-chan | (~anass@213.177.155.250) (Client Quit) |
2021-02-20 13:24:35 +0100 | mikoto-chan | (~anass@213.177.155.250) |
2021-02-20 13:24:59 +0100 | <__monty__> | mikoto-chan: If it's a separate process you can talk to it should be fine. If it's just a library then C FFI is probably the easiest way/least cumbersome. |
2021-02-20 13:26:21 +0100 | Pickchea | (~private@unaffiliated/pickchea) (Ping timeout: 264 seconds) |
2021-02-20 13:27:24 +0100 | nut | (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 256 seconds) |
2021-02-20 13:27:58 +0100 | tromp | (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection) |
2021-02-20 13:28:39 +0100 | mikoto-chan | (~anass@213.177.155.250) (Client Quit) |
2021-02-20 13:33:19 +0100 | geekosaur | (ac3a537e@172.58.83.126) |
2021-02-20 13:34:29 +0100 | Pickchea | (~private@unaffiliated/pickchea) |
2021-02-20 13:35:49 +0100 | pera | (~pera@unaffiliated/pera) |
2021-02-20 13:40:05 +0100 | mputz | (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) |
2021-02-20 13:42:46 +0100 | <maerwald> | I'd pick the language with the best libraries |
2021-02-20 13:43:29 +0100 | nut | (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
2021-02-20 13:46:10 +0100 | rdivyanshu | (uid322626@gateway/web/irccloud.com/x-dlrzsvchbzzkhuyx) (Quit: Connection closed for inactivity) |
2021-02-20 13:46:40 +0100 | stree | (~stree@68.36.8.116) (Ping timeout: 256 seconds) |
2021-02-20 13:47:06 +0100 | <merijn> | maerwald: So...none of them? ;) |
2021-02-20 13:47:41 +0100 | <maerwald> | python |
2021-02-20 13:48:07 +0100 | <maerwald> | https://matrix.org/sdks/ |
2021-02-20 13:48:50 +0100 | <maerwald> | the rust one also seems active |
2021-02-20 13:49:01 +0100 | danvet | (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 272 seconds) |
2021-02-20 13:50:46 +0100 | jmo` | (~user@h-162-127.A785.priv.bahnhof.se) (Ping timeout: 265 seconds) |
2021-02-20 13:52:31 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:2c3b:7c69:7266:b507) |
2021-02-20 13:53:03 +0100 | mputz | (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) (Quit: mputz) |
2021-02-20 13:53:08 +0100 | sheepfleece | (~sheep@46.53.253.85) (Quit: Lost terminal) |
2021-02-20 13:56:38 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-02-20 13:57:03 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:2c3b:7c69:7266:b507) (Ping timeout: 258 seconds) |
2021-02-20 13:58:56 +0100 | stree | (~stree@68.36.8.116) |
2021-02-20 13:59:55 +0100 | rayyyy | (~nanoz@gateway/tor-sasl/nanoz) (Ping timeout: 268 seconds) |
2021-02-20 14:01:16 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
2021-02-20 14:01:28 +0100 | drbean | (~drbean@TC210-63-209-205.static.apol.com.tw) |
2021-02-20 14:04:47 +0100 | nut | (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 265 seconds) |
2021-02-20 14:05:56 +0100 | frozenErebus | (~frozenEre@94.128.219.166) (Ping timeout: 256 seconds) |
2021-02-20 14:06:01 +0100 | hexagenic | (~mattias@2001:2002:51e0:74c9:5098:c4b6:1b73:7815) (Quit: WeeChat 1.9.1) |
2021-02-20 14:06:22 +0100 | elfets | (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) |
2021-02-20 14:06:26 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2021-02-20 14:07:01 +0100 | Rudd0 | (~Rudd0@185.189.115.108) (Remote host closed the connection) |
2021-02-20 14:07:27 +0100 | son0p | (~son0p@181.58.39.182) (Quit: leaving) |
2021-02-20 14:13:32 +0100 | shad0w_ | (a0ca24f4@160.202.36.244) |
2021-02-20 14:13:50 +0100 | sheepfleece | (~sheep@46.53.253.85) |
2021-02-20 14:14:09 +0100 | clog | (~nef@bespin.org) |
2021-02-20 14:14:14 +0100 | <shad0w_> | Hi all. how do i traverse and update a Map, and then return the updated Map as the final result ? |
2021-02-20 14:15:01 +0100 | <shad0w_> | i have a string, that i now traverse. parse it to see if it's a key in a map and if it is in there, update the key, if it is not, LEFT x. |
2021-02-20 14:15:34 +0100 | <shad0w_> | traverse however accumulates the MAP updates and returns [Maps] |
2021-02-20 14:15:48 +0100 | <shad0w_> | is there a way to do this without using the state monad ? |
2021-02-20 14:15:50 +0100 | son0p | (~son0p@181.136.122.143) |
2021-02-20 14:15:55 +0100 | sheepfleece | (~sheep@46.53.253.85) (Client Quit) |
2021-02-20 14:16:02 +0100 | Sheilong | (uid293653@gateway/web/irccloud.com/x-mhgdpyndfuhwydwb) |
2021-02-20 14:16:15 +0100 | sheepfleece | (~sheep@46.53.253.85) |
2021-02-20 14:16:15 +0100 | raym | (~ray@45.64.220.142) (Quit: leaving) |
2021-02-20 14:16:21 +0100 | da39a3ee5e6b4b0d | (~da39a3ee5@2403:6200:8876:b8ec:2ccc:b56e:5cb:43cd) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2021-02-20 14:16:36 +0100 | <merijn> | Sounds like fold? |
2021-02-20 14:16:38 +0100 | sheepfleece | (~sheep@46.53.253.85) (Client Quit) |
2021-02-20 14:16:44 +0100 | <merijn> | :t foldr |
2021-02-20 14:16:45 +0100 | <lambdabot> | Foldable t => (a -> b -> b) -> b -> t a -> b |
2021-02-20 14:16:48 +0100 | polyphem | (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889) |
2021-02-20 14:16:53 +0100 | mirrorbird | (~psutcliff@2a00:801:44d:603d:d116:d5a1:4a2f:a08f) (Ping timeout: 272 seconds) |
2021-02-20 14:16:57 +0100 | sheepfleece | (~sheep@46.53.253.85) |
2021-02-20 14:16:59 +0100 | sheepfleece | (~sheep@46.53.253.85) (Client Quit) |
2021-02-20 14:17:10 +0100 | <shad0w_> | is there a fold with effects ? |
2021-02-20 14:17:20 +0100 | <merijn> | What effect would you need? |
2021-02-20 14:17:28 +0100 | <shad0w_> | reading |
2021-02-20 14:17:30 +0100 | <merijn> | You just wanted to update a Map, no? |
2021-02-20 14:18:10 +0100 | <merijn> | :t foldr `asAppliedTo` (undefined :: Char -> Map Char Int -> Map Char Int) -- or something like that |
2021-02-20 14:18:11 +0100 | <lambdabot> | error: |
2021-02-20 14:18:11 +0100 | <lambdabot> | Not in scope: type constructor or class ‘Map’ |
2021-02-20 14:18:11 +0100 | <lambdabot> | Perhaps you meant ‘M.Map’ (imported from Data.Map) |
2021-02-20 14:18:16 +0100 | <merijn> | aww |
2021-02-20 14:18:27 +0100 | <merijn> | :t foldr `asAppliedTo` (undefined :: Char -> M.Map Char Int -> M.Map Char Int) -- or something like that |
2021-02-20 14:18:28 +0100 | <lambdabot> | Foldable t => (Char -> M.Map Char Int -> M.Map Char Int) -> M.Map Char Int -> t Char -> M.Map Char Int |
2021-02-20 14:18:35 +0100 | <shad0w_> | i have a type that has values A, C, G, T |
2021-02-20 14:18:58 +0100 | <shad0w_> | and i need to traverse the string. see if the char i have is a valid A or C or G or T |
2021-02-20 14:19:07 +0100 | <shad0w_> | if it is, update the MAP |
2021-02-20 14:19:23 +0100 | <shad0w_> | i've been told, this can be done in one pass. |
2021-02-20 14:19:37 +0100 | jmo` | (~user@h-162-127.A785.priv.bahnhof.se) |
2021-02-20 14:19:38 +0100 | <shad0w_> | can it ? |
2021-02-20 14:19:45 +0100 | <tomsmeding> | sure, with a fold |
2021-02-20 14:19:55 +0100 | mirrorbird | (~psutcliff@2a00:801:44d:603d:d116:d5a1:4a2f:a08f) |
2021-02-20 14:19:56 +0100 | <tomsmeding> | what merijn said :) |
2021-02-20 14:20:09 +0100 | <tomsmeding> | whwat's the type of your map? |
2021-02-20 14:20:21 +0100 | <shad0w_> | Map Nucleotide Int |
2021-02-20 14:20:30 +0100 | <tomsmeding> | oh counting how many occur? |
2021-02-20 14:20:42 +0100 | <shad0w_> | where Nucleotide type has values A, C, G or T |
2021-02-20 14:21:01 +0100 | <shad0w_> | input is a string, where values can be any char. |
2021-02-20 14:21:03 +0100 | <tomsmeding> | multiple ways to do this (merijn hop hop with your monoids), but a fold could work just fine |
2021-02-20 14:21:26 +0100 | <shad0w_> | i can see i need to `read` it first |
2021-02-20 14:22:10 +0100 | <shad0w_> | and the map `fromList [(A, 0), (C, 0), (G, 0), (T,0)]` |
2021-02-20 14:22:22 +0100 | <tomsmeding> | foldl' (\m c -> case readMaybe [c] of Just n -> Map.insertWith (+) n 1 m ; Nothing -> m) Map.empty yourString |
2021-02-20 14:22:36 +0100 | <tomsmeding> | where foldl' is from Data.List and readMaybe is from Text.Read |
2021-02-20 14:22:46 +0100 | <tomsmeding> | assuming your Nucleotide has the right Read instance |
2021-02-20 14:22:53 +0100 | jamm_ | (~jamm@unaffiliated/jamm) |
2021-02-20 14:23:06 +0100 | <shad0w_> | it's derived. so should be ? |
2021-02-20 14:23:14 +0100 | <merijn> | tomsmeding: That silently drops wrong values, though |
2021-02-20 14:23:19 +0100 | <merijn> | Not sure if that's the goal |
2021-02-20 14:23:23 +0100 | <shad0w_> | no |
2021-02-20 14:23:23 +0100 | <tomsmeding> | which is what shad0w_ needed, right? |
2021-02-20 14:23:34 +0100 | <tomsmeding> | oh |
2021-02-20 14:23:39 +0100 | <shad0w_> | if it's an invalid value. LEFT value |
2021-02-20 14:23:39 +0100 | <merijn> | tomsmeding: I think they want early bail out |
2021-02-20 14:23:46 +0100 | <shad0w_> | else. RIGHT updatedMap |
2021-02-20 14:23:52 +0100 | <merijn> | Which is only marginally more complex |
2021-02-20 14:23:54 +0100 | <tomsmeding> | oh I see |
2021-02-20 14:24:00 +0100 | <merijn> | But you probably want foldr in the case |
2021-02-20 14:24:05 +0100 | <shad0w_> | yea. sorry. if i didn't communicate that clearly |
2021-02-20 14:24:34 +0100 | <shad0w_> | `nucleotideCounts :: String -> Either String (Map Nucleotide Int)` |
2021-02-20 14:24:42 +0100 | <shad0w_> | is the typeSig of the fn |
2021-02-20 14:24:58 +0100 | <tomsmeding> | :t foldl' (\e c -> e >>= \m -> case readMaybe [c] of Just n -> Right (Map.insertWith (+) n 1 m) ; Nothing -> Left ("Invalid nucleotide: " ++ [c])) (Right Map.empty) yourString |
2021-02-20 14:24:59 +0100 | <lambdabot> | error: |
2021-02-20 14:24:59 +0100 | <lambdabot> | Not in scope: ‘Map.insertWith’ |
2021-02-20 14:24:59 +0100 | <lambdabot> | Perhaps you meant one of these: |
2021-02-20 14:25:14 +0100 | <tomsmeding> | :t \yourString -> foldl' (\e c -> e >>= \m -> case readMaybe [c] of Just n -> Right (M.insertWith (+) n 1 m) ; Nothing -> Left ("Invalid nucleotide: " ++ [c])) (Right M.empty) yourString |
2021-02-20 14:25:16 +0100 | <lambdabot> | error: |
2021-02-20 14:25:16 +0100 | <lambdabot> | Variable not in scope: readMaybe :: [Char] -> Maybe k |
2021-02-20 14:25:24 +0100 | <tomsmeding> | % import Text.Read |
2021-02-20 14:25:25 +0100 | <yahb> | tomsmeding: |
2021-02-20 14:25:30 +0100 | <tomsmeding> | % :t \yourString -> foldl' (\e c -> e >>= \m -> case readMaybe [c] of Just n -> Right (M.insertWith (+) n 1 m) ; Nothing -> Left ("Invalid nucleotide: " ++ [c])) (Right M.empty) yourString |
2021-02-20 14:25:30 +0100 | <yahb> | tomsmeding: (Foldable t, Read k, Ord k, Num a) => t Char -> Either [Char] (M.Map k a) |
2021-02-20 14:25:40 +0100 | <tomsmeding> | that, perhaps |
2021-02-20 14:26:04 +0100 | <tomsmeding> | merijn: why would foldr be better? |
2021-02-20 14:26:26 +0100 | <shad0w_> | is there a monadic fold ? |
2021-02-20 14:26:42 +0100 | <tomsmeding> | fair point lol |
2021-02-20 14:26:42 +0100 | <tomsmeding> | e |
2021-02-20 14:27:22 +0100 | <tomsmeding> | :') okay that's a joke plugin I wrote once, referencing the old intel logo https://i.pinimg.com/originals/f2/b1/d4/f2b1d423df70bb135fe9df1bac0df8db.png |
2021-02-20 14:28:06 +0100 | <merijn> | tomsmeding: Early bailout |
2021-02-20 14:28:20 +0100 | <merijn> | tomsmeding: With foldl' you'd have to walk the entire sequence after an error |
2021-02-20 14:28:21 +0100 | tby | (~tby@193.234.28.91) (Changing host) |
2021-02-20 14:28:21 +0100 | tby | (~tby@unaffiliated/tby) |
2021-02-20 14:28:33 +0100 | <merijn> | tomsmeding: foldr can just stop on the first error |
2021-02-20 14:28:38 +0100 | <tomsmeding> | very good point |
2021-02-20 14:28:52 +0100 | <tomsmeding> | % :t \yourString -> foldM (\m c -> case readMaybe [c] of Just n -> Right (M.insertWith (+) n 1 m) ; Nothing -> Left ("Invalid nucleotide: " ++ [c])) M.empty yourString |
2021-02-20 14:28:52 +0100 | <yahb> | tomsmeding: (Foldable t, Read k, Ord k, Num a) => t Char -> Either [Char] (M.Map k a) |
2021-02-20 14:29:00 +0100 | <tomsmeding> | that uses foldM, but is still a left fold |
2021-02-20 14:29:03 +0100 | <merijn> | Which might be a problem if you have a few GB of DNA or something ;) |
2021-02-20 14:29:27 +0100 | <merijn> | tomsmeding: I think the monad will short-circuit that fold anyway |
2021-02-20 14:29:43 +0100 | <merijn> | tomsmeding: Easily tested via infinite sequence with an error at the beginning ;) |
2021-02-20 14:30:13 +0100 | <merijn> | Also, probably wanna use Data.Map.Strict for that |
2021-02-20 14:30:48 +0100 | usr25 | (~J@80.31.32.99) (Ping timeout: 246 seconds) |
2021-02-20 14:30:53 +0100 | <tomsmeding> | ah yes the foldM short-circuits |
2021-02-20 14:31:17 +0100 | <tomsmeding> | assuming that you write it properly, as follows: |
2021-02-20 14:31:24 +0100 | <tomsmeding> | % :t \yourString -> foldM (\m c -> case readMaybe [c] of Just n -> Right (M.insertWith (+) n 1 m) ; Nothing -> Left ("Invalid nucleotide: " ++ [c])) M.empty yourString |
2021-02-20 14:31:25 +0100 | <yahb> | tomsmeding: (Foldable t, Read k, Ord k, Num a) => t Char -> Either [Char] (M.Map k a) |
2021-02-20 14:31:35 +0100 | <tomsmeding> | crap no not that one |
2021-02-20 14:32:07 +0100 | rayyyy | (~nanoz@gateway/tor-sasl/nanoz) |
2021-02-20 14:32:50 +0100 | <tomsmeding> | no it is the right one, my brain doesn't work for some reason |
2021-02-20 14:33:01 +0100 | <tomsmeding> | that last version uses a monadic fold shad0w_ and nicely short-circuits |
2021-02-20 14:33:24 +0100 | mananamenos | (~mananamen@37.red-88-27-26.staticip.rima-tde.net) |
2021-02-20 14:33:50 +0100 | vgtw | (~vgtw@gateway/tor-sasl/vgtw) (Ping timeout: 268 seconds) |
2021-02-20 14:34:26 +0100 | vgtw | (~vgtw@gateway/tor-sasl/vgtw) |
2021-02-20 14:35:14 +0100 | mrchampion | (~mrchampio@38.18.109.23) (Ping timeout: 265 seconds) |
2021-02-20 14:36:06 +0100 | mananamenos | (~mananamen@37.red-88-27-26.staticip.rima-tde.net) (Remote host closed the connection) |
2021-02-20 14:38:44 +0100 | mrchampion | (~mrchampio@38.18.109.23) |
2021-02-20 14:38:59 +0100 | BlackCap1oder | (~blackcap@46.46.197.67) |
2021-02-20 14:39:21 +0100 | BlackCap1oder | (~blackcap@46.46.197.67) () |
2021-02-20 14:42:57 +0100 | otulp | (~otulp@ti0187q162-6639.bb.online.no) |
2021-02-20 14:44:13 +0100 | xelxebar | (~xelxebar@gateway/tor-sasl/xelxebar) (Remote host closed the connection) |
2021-02-20 14:44:31 +0100 | xelxebar | (~xelxebar@gateway/tor-sasl/xelxebar) |
2021-02-20 14:48:39 +0100 | <shad0w_> | tomsmeding: yea, thanks for the clues. i ended up on a thing that seems like a derivative of what you just showed me |
2021-02-20 14:49:29 +0100 | <shad0w_> | my question is, how does it know that a Left value needs to be returned as is? |
2021-02-20 14:50:04 +0100 | <shad0w_> | i can see the analog to a Nothing vs Just something |
2021-02-20 14:50:05 +0100 | ukari | (~ukari@unaffiliated/ukari) (Remote host closed the connection) |
2021-02-20 14:50:06 +0100 | <tomsmeding> | instead of processing the rest of the string, you mean? |
2021-02-20 14:50:10 +0100 | Tario | (~Tario@201.192.165.173) |
2021-02-20 14:50:11 +0100 | <shad0w_> | yes |
2021-02-20 14:50:19 +0100 | <shad0w_> | like. where is this logic defined ? |
2021-02-20 14:50:28 +0100 | otulp | (~otulp@ti0187q162-6639.bb.online.no) (Quit: *POOF*) |
2021-02-20 14:50:36 +0100 | <shad0w_> | Instance Monad Either ? |
2021-02-20 14:50:37 +0100 | ukari | (~ukari@unaffiliated/ukari) |
2021-02-20 14:50:40 +0100 | <tomsmeding> | yeah |
2021-02-20 14:50:50 +0100 | <tomsmeding> | https://hackage.haskell.org/package/base-4.14.0.0/docs/src/Data.Either.html#line-155 |
2021-02-20 14:50:50 +0100 | Deide | (~Deide@217.155.19.23) |
2021-02-20 14:50:57 +0100 | <tomsmeding> | note the case for Left |
2021-02-20 14:51:11 +0100 | drbean | (~drbean@TC210-63-209-205.static.apol.com.tw) (Ping timeout: 265 seconds) |
2021-02-20 14:51:59 +0100 | ArConan | (0d4c7021@13.76.112.33) |
2021-02-20 14:52:59 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:2c3b:7c69:7266:b507) |
2021-02-20 14:53:06 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 272 seconds) |
2021-02-20 14:55:12 +0100 | o1lo01ol1o | (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Remote host closed the connection) |
2021-02-20 14:58:14 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:2c3b:7c69:7266:b507) (Ping timeout: 264 seconds) |
2021-02-20 14:58:38 +0100 | polyrain | (~polyrain@124.177.21.171) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2021-02-20 14:59:33 +0100 | jollygood2 | (~bc8134e3@217.29.117.252) |
2021-02-20 14:59:55 +0100 | <jollygood2> | hi. wasn't there a maybe equivalent for lists? |
2021-02-20 14:59:57 +0100 | <jollygood2> | :t maybe |
2021-02-20 14:59:58 +0100 | <lambdabot> | b -> (a -> b) -> Maybe a -> b |
2021-02-20 14:59:58 +0100 | <shad0w_> | thanks guys merijn: tomsmeding: |
2021-02-20 15:00:59 +0100 | <jollygood2> | @hoogle b -> ([a] -> b) -> [a] -> b |
2021-02-20 15:01:00 +0100 | <lambdabot> | Language.Fixpoint.Misc applyNonNull :: b -> ([a] -> b) -> [a] -> b |
2021-02-20 15:01:00 +0100 | <lambdabot> | Debian.Debianize.Prelude foldEmpty :: r -> ([a] -> r) -> [a] -> r |
2021-02-20 15:01:00 +0100 | <lambdabot> | Data.Foldable.Safe defaulting :: Foldable f => b -> (f a -> b) -> f a -> b |
2021-02-20 15:01:04 +0100 | <mastarija> | Has anyone worked with hsc2hs before? I'm trying to create bindings for my little C helper library. I did this once long time ago, but now I can't remember how to do it anymore. |
2021-02-20 15:01:34 +0100 | <mastarija> | Here's my source : https://github.com/mastarija/screenshot |
2021-02-20 15:01:53 +0100 | <mastarija> | Basically, hsc2hs is throwing a bunch of errors but they don't make any sense |
2021-02-20 15:02:01 +0100 | shad0w_ | (a0ca24f4@160.202.36.244) (Quit: Connection closed) |
2021-02-20 15:02:49 +0100 | <mastarija> | Here is the compilation output: https://pastebin.com/XP97jEGf |
2021-02-20 15:04:05 +0100 | <merijn> | mastarija: tbh, if your C library isn't too big I would recommend not bothering with hsc2hs |
2021-02-20 15:04:30 +0100 | <merijn> | mastarija: Do you need to modify C structs from within Haskell? |
2021-02-20 15:04:31 +0100 | <mastarija> | merijn, it isn't, but I had some trouble calculating offsets / paddings and what not |
2021-02-20 15:04:49 +0100 | hongminhee | (~dahlia@207.148.91.209) (Ping timeout: 256 seconds) |
2021-02-20 15:04:53 +0100 | <mastarija> | merijn, I just need to read them in and copy data to more haskelly data structures |
2021-02-20 15:05:44 +0100 | <merijn> | mastarija: Looks like your C code is using a Screen type that's not in scope/included in your hsc |
2021-02-20 15:06:07 +0100 | <mastarija> | I thought so too, but it's declared in WinShot.c |
2021-02-20 15:06:11 +0100 | <mastarija> | which is included |
2021-02-20 15:06:20 +0100 | <merijn> | mastarija: tbh, my main recommendation would be to simply "not do that" if at all possible, but I understand that it might not always be :p |
2021-02-20 15:06:41 +0100 | <merijn> | (not do that, is reading struct values in Haskell, rather just writing C accessors and calling those) |
2021-02-20 15:06:43 +0100 | <mastarija> | I'm not sure if I'm maybe including C files incorrectly in my cabal |
2021-02-20 15:07:19 +0100 | <merijn> | oh |
2021-02-20 15:07:30 +0100 | <mastarija> | merijn, not sure what you mean, my plan is to create a ScreenShot struct from C and martial it to Haskell for further inspection |
2021-02-20 15:07:59 +0100 | <merijn> | include-dirs "cs" and "css/WinShot.h" looks questionable, let me check what I do in my code |
2021-02-20 15:08:40 +0100 | <merijn> | mastarija: What I meant is that if you have a C function "int getScreenX(struct Screen *ptr);" that you can call, then you never need to marshall the struct on the Haskell side |
2021-02-20 15:09:00 +0100 | <merijn> | Are you using v2-build? |
2021-02-20 15:09:09 +0100 | <mastarija> | yep |
2021-02-20 15:09:33 +0100 | Pickchea | (~private@unaffiliated/pickchea) (Ping timeout: 265 seconds) |
2021-02-20 15:09:49 +0100 | <mastarija> | merijn, I'm using cabal 3 without prefixed commands |
2021-02-20 15:10:01 +0100 | <merijn> | mastarija: Ok, so couple of things in your cabal file: |
2021-02-20 15:10:14 +0100 | <merijn> | include file shouldn't include the directory/path if you use include-dirs |
2021-02-20 15:10:16 +0100 | carlomagno | (~cararell@148.87.23.12) |
2021-02-20 15:10:31 +0100 | <merijn> | Cabal will *already* point to that directory, so you end up looking for css/css/WinShot.h |
2021-02-20 15:10:38 +0100 | Feuermagier | (~Feuermagi@2a02:2488:4211:3400:246e:bf09:8453:9d6) (Remote host closed the connection) |
2021-02-20 15:10:47 +0100 | nbloomf | (~nbloomf@2600:1700:ad14:3020:887c:d5ad:2339:cbda) |
2021-02-20 15:11:35 +0100 | pfurla_ | (~pfurla@ool-182ed2e2.dyn.optonline.net) |
2021-02-20 15:12:08 +0100 | <mastarija> | merijn, hmm.. I've tried it now (and before as well) but it changes nothing :( |
2021-02-20 15:12:11 +0100 | <merijn> | I seem to have C and header files as extra-source-files, but I'm not 100% that's needed |
2021-02-20 15:12:19 +0100 | <mastarija> | Gonna check |
2021-02-20 15:13:22 +0100 | carlomagno1 | (~cararell@148.87.23.5) (Ping timeout: 256 seconds) |
2021-02-20 15:13:25 +0100 | <mastarija> | merijn, doesn't seem to have helped |
2021-02-20 15:13:36 +0100 | pfurla | (~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 240 seconds) |
2021-02-20 15:13:46 +0100 | <mastarija> | I think extras are just there to check for a file presence |
2021-02-20 15:14:09 +0100 | <merijn> | They control what gets include in the tarball build by sdist |
2021-02-20 15:14:43 +0100 | <mastarija> | merijn, can I take a peek at your cabal? |
2021-02-20 15:16:28 +0100 | <merijn> | mastarija: eh, it's rather big and full of unrelated things, though :p https://github.com/merijn/Belewitte/blob/master/benchmark-analysis/benchmark-analysis.cabal |
2021-02-20 15:17:06 +0100 | <mastarija> | merijn, maybe I learn something new :D |
2021-02-20 15:17:58 +0100 | urodna | (~urodna@unaffiliated/urodna) |
2021-02-20 15:18:02 +0100 | <merijn> | I'm trying to figure out if your mistake isn't simply having "Screen" in your hsc file, instead of "struct Screen" |
2021-02-20 15:18:17 +0100 | <merijn> | But I can't really find a good intro to hsc syntax |
2021-02-20 15:18:36 +0100 | <merijn> | I mean, the compiler error certainly seems to imply a missing "struct" |
2021-02-20 15:19:43 +0100 | <merijn> | mastarija: I have some similar code for terminal windows and I just went the lazy route, tbh: https://github.com/merijn/posix-pty/blob/master/cbits/pty_size.c |
2021-02-20 15:20:17 +0100 | <merijn> | mastarija: And then wrapping manually on the haskell side: https://github.com/merijn/posix-pty/blob/master/System/Posix/Pty.hs#L189-L192 |
2021-02-20 15:20:34 +0100 | <merijn> | Which just by-passes the entire hsc problem :p |
2021-02-20 15:21:16 +0100 | <merijn> | And that way I don't have to deal with awkwardly documented tools :p |
2021-02-20 15:21:24 +0100 | <mastarija> | XD |
2021-02-20 15:21:31 +0100 | kam1 | (~kam1@83.123.186.200) |
2021-02-20 15:21:48 +0100 | <merijn> | Anyway, try what happens if you struct "struct Screen" in .hsc instead of "Screen" |
2021-02-20 15:22:29 +0100 | <merijn> | Alteratively, add "typedef struct Screen Screen;" to your header |
2021-02-20 15:23:24 +0100 | <mastarija> | OOOOHHH!!! |
2021-02-20 15:23:28 +0100 | <mastarija> | merijn, struct |
2021-02-20 15:23:30 +0100 | <mastarija> | that's right |
2021-02-20 15:23:33 +0100 | <mastarija> | forgot about that |
2021-02-20 15:24:21 +0100 | jmo` | (~user@h-162-127.A785.priv.bahnhof.se) (Ping timeout: 246 seconds) |
2021-02-20 15:24:21 +0100 | hendursa1 | (~weechat@gateway/tor-sasl/hendursaga) (Quit: hendursa1) |
2021-02-20 15:24:26 +0100 | <mastarija> | merijn, holly shi*, it compiles XD |
2021-02-20 15:24:27 +0100 | danvet | (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) |
2021-02-20 15:24:27 +0100 | ubert | (~Thunderbi@p200300ecdf25d94be6b318fffe838f33.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
2021-02-20 15:24:32 +0100 | <mastarija> | I'm an idiot |
2021-02-20 15:24:40 +0100 | hendursaga | (~weechat@gateway/tor-sasl/hendursaga) |
2021-02-20 15:25:57 +0100 | <merijn> | And my title of debugging god remains in tact! |
2021-02-20 15:26:18 +0100 | nbloomf | (~nbloomf@2600:1700:ad14:3020:887c:d5ad:2339:cbda) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2021-02-20 15:26:21 +0100 | <mastarija> | it sure does XD |
2021-02-20 15:27:35 +0100 | o1lo01ol1o | (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
2021-02-20 15:30:19 +0100 | kam1 | (~kam1@83.123.186.200) (Ping timeout: 256 seconds) |
2021-02-20 15:32:16 +0100 | o1lo01ol1o | (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Ping timeout: 265 seconds) |
2021-02-20 15:34:24 +0100 | o1lo01ol1o | (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
2021-02-20 15:34:36 +0100 | pera | (~pera@unaffiliated/pera) (Ping timeout: 240 seconds) |
2021-02-20 15:34:53 +0100 | Wuzzy | (~Wuzzy@p5790eb2a.dip0.t-ipconnect.de) (Ping timeout: 272 seconds) |
2021-02-20 15:36:07 +0100 | Natch | (~natch@c-b471e255.014-297-73746f25.bbcust.telenor.se) (Remote host closed the connection) |
2021-02-20 15:37:34 +0100 | alanz_ | alanz |
2021-02-20 15:41:29 +0100 | Natch | (~Natch@c-b471e255.014-297-73746f25.bbcust.telenor.se) |
2021-02-20 15:43:19 +0100 | ph88_ | (~ph88@2a02:8109:9e00:7e5c:f5fc:c65e:8298:c839) |
2021-02-20 15:47:05 +0100 | son0p | (~son0p@181.136.122.143) (Ping timeout: 240 seconds) |
2021-02-20 15:47:27 +0100 | ph88^ | (~ph88@2a02:8109:9e00:7e5c:1d07:66bc:d1dc:63b4) (Ping timeout: 272 seconds) |
2021-02-20 15:48:02 +0100 | dh_ | (dh@bsd.ee) (Quit: "Fhtagn-Nagh Yog Sothoth") |
2021-02-20 15:48:15 +0100 | dh | (dh@bsd.ee) |
2021-02-20 15:49:32 +0100 | timCF | (~i.tkachuk@m91-129-99-43.cust.tele2.ee) |
2021-02-20 15:51:05 +0100 | minoru_shiraeesh | (~shiraeesh@5.101.59.18) |
2021-02-20 15:52:24 +0100 | Pickchea | (~private@unaffiliated/pickchea) |
2021-02-20 15:54:17 +0100 | vicfred | (~vicfred@unaffiliated/vicfred) |
2021-02-20 15:54:36 +0100 | o1lo01ol1o | (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Remote host closed the connection) |
2021-02-20 15:54:40 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:2c3b:7c69:7266:b507) |
2021-02-20 15:54:48 +0100 | tromp | (~tromp@dhcp-077-249-230-040.chello.nl) |
2021-02-20 15:57:24 +0100 | minoru_shiraeesh | (~shiraeesh@5.101.59.18) (Ping timeout: 265 seconds) |
2021-02-20 15:58:15 +0100 | <timCF> | Hello! Can anybody recommend good educational resources about implementing simple compiler in haskell? Without too complex examples, just for educational purposes. I'm thinking about writing small haskell DSL with will contain small amount of composable combinators representing typed shell expressions, which can compile to shell text files. |
2021-02-20 15:59:05 +0100 | elliott_ | (~elliott_@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 240 seconds) |
2021-02-20 15:59:18 +0100 | geekosaur | (ac3a537e@172.58.83.126) (Quit: Connection closed) |
2021-02-20 15:59:20 +0100 | tromp | (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 265 seconds) |
2021-02-20 15:59:27 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:2c3b:7c69:7266:b507) (Ping timeout: 260 seconds) |
2021-02-20 16:00:00 +0100 | <merijn> | timCF: Two books come to mind |
2021-02-20 16:00:12 +0100 | <merijn> | timCF: Types and Programming Languages by Benjamin Pierce |
2021-02-20 16:00:15 +0100 | <merijn> | @where tapl |
2021-02-20 16:00:15 +0100 | <lambdabot> | "Types and Programming Languages" by Benjamin C. Pierce in 2002-02-01 at <https://www.cis.upenn.edu/~bcpierce/tapl/> |
2021-02-20 16:00:46 +0100 | <merijn> | timCF: Which covers basically anything from "here is a simple untyped lambda calculus" up to "more than you will ever need to know" when it comes to type systems |
2021-02-20 16:01:24 +0100 | <merijn> | The 2nd book is Andrew Appel's "Modern Compiler Implementation in X" which covers, well, modern compiler implementation |
2021-02-20 16:01:43 +0100 | <merijn> | You'll probably want to get the ML version of that book (rather than the C or Java versions) |
2021-02-20 16:01:54 +0100 | <timCF> | Thanks, merijn |
2021-02-20 16:02:14 +0100 | elliott_ | (~elliott_@pool-108-51-101-42.washdc.fios.verizon.net) |
2021-02-20 16:02:17 +0100 | <merijn> | timCF: TaPL's examples are in Ocaml, but only fairly basic ocaml, anyone with even basic Haskell knowledge should be able to read things with very little effort |
2021-02-20 16:03:21 +0100 | <merijn> | Same (presumably, I haven't read it) goes for ML in Appel's book. Since ML is fairly similar to Haskell (or rather, Haskell is fairly similar to ML :p) |
2021-02-20 16:03:45 +0100 | minoru_shiraeesh | (~shiraeesh@5.101.59.18) |
2021-02-20 16:03:49 +0100 | <merijn> | Which is why I'd recommend the ML version over the C/Java version, it'll be closer to the sorta thing you'd do in Haskell |
2021-02-20 16:04:27 +0100 | dunj3 | (~dunj3@p200300f61714a6752268fca81a1a85c0.dip0.t-ipconnect.de) |
2021-02-20 16:06:42 +0100 | stree | (~stree@68.36.8.116) (Ping timeout: 246 seconds) |
2021-02-20 16:07:19 +0100 | <timCF> | merijn: yeah, definitely! At least easier to read examples. I don't think my idea itself is very practical, but at least it seems very rewarding to implement couple of combinators and get valid workign shell file as compiler output. And I think haskell is expressive enough to let me write AST (in form of haskell ADTs inside some custom monad) instead of parsing source files. This way I can omit lexer and |
2021-02-20 16:07:25 +0100 | <timCF> | parser, write AST directly and focus on only fun parts |
2021-02-20 16:10:28 +0100 | <merijn> | timCF: Once you learn how to make a compiler, you soon realise that almost every problem is a compiler problem ;) |
2021-02-20 16:11:14 +0100 | raym | (~ray@45.64.220.142) |
2021-02-20 16:11:19 +0100 | <merijn> | timCF: tbh, writing a proper parser isn't *that* painful, it depends a bit on the grammar, but if you're inventing a language from scratch, just change your grammar to be easier :p |
2021-02-20 16:11:53 +0100 | Franciman | (~francesco@host-82-49-79-189.retail.telecomitalia.it) (Quit: Leaving) |
2021-02-20 16:13:42 +0100 | hexfive | (~hexfive@50.35.83.177) (Quit: i must go. my people need me.) |
2021-02-20 16:20:15 +0100 | stree | (~stree@68.36.8.116) |
2021-02-20 16:20:45 +0100 | ep1ctetus | (~epictetus@ip72-194-215-136.sb.sd.cox.net) |
2021-02-20 16:22:03 +0100 | minoru_shiraeesh | (~shiraeesh@5.101.59.18) (Ping timeout: 265 seconds) |
2021-02-20 16:22:59 +0100 | DavidEichmann | (~david@234.109.45.217.dyn.plus.net) (Remote host closed the connection) |
2021-02-20 16:24:08 +0100 | toorevitimirp | (~tooreviti@117.182.181.253) (Remote host closed the connection) |
2021-02-20 16:24:20 +0100 | o1lo01ol1o | (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
2021-02-20 16:26:05 +0100 | nbloomf | (~nbloomf@2600:1700:ad14:3020:887c:d5ad:2339:cbda) |
2021-02-20 16:26:20 +0100 | <GreyFaceNoSpace> | sorry for the noob question, but where can i find the implementation for the Data.Tree module? |
2021-02-20 16:26:29 +0100 | <GreyFaceNoSpace> | how can i view the code |
2021-02-20 16:26:34 +0100 | <GreyFaceNoSpace> | i am new to haskell |
2021-02-20 16:26:40 +0100 | Philonous | (~Philonous@unaffiliated/philonous) (Quit: ZNC - http://znc.in) |
2021-02-20 16:27:04 +0100 | jamm_ | (~jamm@unaffiliated/jamm) (Remote host closed the connection) |
2021-02-20 16:27:19 +0100 | ddellacosta | (ddellacost@gateway/vpn/mullvad/ddellacosta) |
2021-02-20 16:28:01 +0100 | <merijn> | @hoogle Data.Tree |
2021-02-20 16:28:02 +0100 | <lambdabot> | Data.Graph data Tree a |
2021-02-20 16:28:02 +0100 | <lambdabot> | module Data.Tree |
2021-02-20 16:28:02 +0100 | <lambdabot> | Data.Tree data Tree a |
2021-02-20 16:28:05 +0100 | oisdk | (~oisdk@2001:bb6:3329:d100:e4fd:fcea:33f:6b51) |
2021-02-20 16:28:06 +0100 | <merijn> | eh.. |
2021-02-20 16:28:13 +0100 | <merijn> | That wasn't useful :p |
2021-02-20 16:28:17 +0100 | <merijn> | @hackage containers |
2021-02-20 16:28:17 +0100 | <lambdabot> | https://hackage.haskell.org/package/containers |
2021-02-20 16:28:24 +0100 | o1lo01ol1o | (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Ping timeout: 246 seconds) |
2021-02-20 16:28:39 +0100 | <merijn> | GreyFaceNoSpace: It's in the containers package, the module documentation has a "source" link that takes you to the source code |
2021-02-20 16:28:56 +0100 | <GreyFaceNoSpace> | oooh |
2021-02-20 16:28:59 +0100 | <GreyFaceNoSpace> | ty so much |
2021-02-20 16:29:19 +0100 | <merijn> | Should also be a link to the repository on the package page |
2021-02-20 16:29:26 +0100 | <tomsmeding> | merijn: any idea why command-line hoogle, and apparently also @hoogle, doesn't show which _package_ a module is from? |
2021-02-20 16:29:40 +0100 | <merijn> | brevity? |
2021-02-20 16:29:51 +0100 | <tomsmeding> | you search for a name, signature, whatever, and find that it's in module A.B.C |
2021-02-20 16:29:52 +0100 | <GreyFaceNoSpace> | is there command for ghc that can show me the information of a function/data type? |
2021-02-20 16:29:57 +0100 | <GreyFaceNoSpace> | i only know of :t |
2021-02-20 16:30:02 +0100 | <tomsmeding> | okay fine, but that tells me nothing if I don't know what package it's in :p |
2021-02-20 16:30:04 +0100 | s00pcan | (~chris@075-133-056-178.res.spectrum.com) (Remote host closed the connection) |
2021-02-20 16:30:07 +0100 | <tomsmeding> | GreyFaceNoSpace: :i |
2021-02-20 16:30:08 +0100 | <merijn> | GreyFaceNoSpace: In ghci you can use ":info" (or ":i") |
2021-02-20 16:30:15 +0100 | <merijn> | % :i [] |
2021-02-20 16:30:16 +0100 | <yahb> | merijn: type [] :: * -> *; data [] a = [] | a : [a]; -- Defined in `GHC.Types'; instance Alternative [] -- Defined in `GHC.Base'; instance Applicative [] -- Defined in `GHC.Base'; instance Eq a => Eq [a] -- Defined in `GHC.Classes'; instance Functor [] -- Defined in `GHC.Base'; instance Monad [] -- Defined in `GHC.Base'; instance MonadPlus [] -- Defined in `GHC.Base'; instance Monoid [a] -- Defined in `GHC.Base |
2021-02-20 16:30:19 +0100 | <GreyFaceNoSpace> | alright thanks guys |
2021-02-20 16:30:45 +0100 | <merijn> | GreyFaceNoSpace: You can also create a local/commandline version of Hoogle |
2021-02-20 16:31:03 +0100 | <merijn> | Or GreyFaceNoSpace Or just use the web version: https://hoogle.haskell.org/ |
2021-02-20 16:31:14 +0100 | ddellacosta | (ddellacost@gateway/vpn/mullvad/ddellacosta) (Remote host closed the connection) |
2021-02-20 16:31:36 +0100 | minoru_shiraeesh | (~shiraeesh@5.101.59.18) |
2021-02-20 16:33:03 +0100 | <GreyFaceNoSpace> | thank u |
2021-02-20 16:33:23 +0100 | <ArConan> | sorry for the noob question,what mean of `hoogle`? |
2021-02-20 16:34:02 +0100 | <ArConan> | is it mean documation? |
2021-02-20 16:34:08 +0100 | <ArConan> | or only a name? |
2021-02-20 16:36:43 +0100 | <merijn> | ArConan: A reference to google :p |
2021-02-20 16:36:52 +0100 | <merijn> | but for haskell, hence the 'h' |
2021-02-20 16:37:08 +0100 | <ArConan> | ah |
2021-02-20 16:38:26 +0100 | rdivyanshu | (uid322626@gateway/web/irccloud.com/x-bjhpxmgmskwpfmhe) |
2021-02-20 16:38:52 +0100 | <merijn> | We used to have Hayoo (as reference to yahoo) too |
2021-02-20 16:39:09 +0100 | <ArConan> | haha |
2021-02-20 16:40:01 +0100 | <merijn> | Seems that's been down for over a year, though |
2021-02-20 16:41:12 +0100 | <tomsmeding> | someone needs to make ooyah |
2021-02-20 16:41:18 +0100 | <xsperry> | @hoogle (a -> b) -> [a] -> [b] |
2021-02-20 16:41:19 +0100 | <lambdabot> | Prelude map :: (a -> b) -> [a] -> [b] |
2021-02-20 16:41:19 +0100 | <lambdabot> | Data.List map :: (a -> b) -> [a] -> [b] |
2021-02-20 16:41:19 +0100 | <lambdabot> | GHC.Base map :: (a -> b) -> [a] -> [b] |
2021-02-20 16:41:22 +0100 | acarrico | (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) |
2021-02-20 16:41:51 +0100 | ddellacosta | (ddellacost@gateway/vpn/mullvad/ddellacosta) |
2021-02-20 16:43:46 +0100 | machinedgod | (~machinedg@135-23-192-217.cpe.pppoe.ca) |
2021-02-20 16:44:16 +0100 | electricityZZZZ | (~electrici@108-216-157-17.lightspeed.sntcca.sbcglobal.net) |
2021-02-20 16:45:15 +0100 | minoru_shiraeesh | (~shiraeesh@5.101.59.18) (Ping timeout: 265 seconds) |
2021-02-20 16:46:26 +0100 | acidjnk_new | (~acidjnk@p200300d0c7390972b9ca7ed3a5659a38.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
2021-02-20 16:48:36 +0100 | tromp | (~tromp@dhcp-077-249-230-040.chello.nl) |
2021-02-20 16:48:42 +0100 | frozenErebus | (~frozenEre@94.128.219.166) |
2021-02-20 16:50:13 +0100 | ArConan | (0d4c7021@13.76.112.33) (Quit: Connection closed) |
2021-02-20 16:51:35 +0100 | tromp_ | (~tromp@dhcp-077-249-230-040.chello.nl) |
2021-02-20 16:53:05 +0100 | tromp | (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 240 seconds) |
2021-02-20 16:55:13 +0100 | danvet | (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 272 seconds) |
2021-02-20 16:55:53 +0100 | mnrmnaugh | (~mnrmnaugh@unaffiliated/mnrmnaugh) (Ping timeout: 265 seconds) |
2021-02-20 16:56:11 +0100 | danso | (~dan@d67-193-121-2.home3.cgocable.net) (Read error: Connection reset by peer) |
2021-02-20 16:56:27 +0100 | tromp_ | (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 256 seconds) |
2021-02-20 16:57:52 +0100 | renzhi | (~renzhi@modemcable070.17-177-173.mc.videotron.ca) |
2021-02-20 16:57:56 +0100 | danso | (~dan@2001:1970:52e7:d000:96b8:6dff:feb3:c009) |
2021-02-20 16:59:28 +0100 | nbloomf | (~nbloomf@2600:1700:ad14:3020:887c:d5ad:2339:cbda) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2021-02-20 17:00:25 +0100 | Rudd0 | (~Rudd0@185.189.115.103) |
2021-02-20 17:00:47 +0100 | ericsagn1 | (~ericsagne@2405:6580:0:5100:33f6:9077:f7e2:df6e) (Ping timeout: 246 seconds) |
2021-02-20 17:04:43 +0100 | raichoo | (~raichoo@dslb-178-001-021-051.178.001.pools.vodafone-ip.de) |
2021-02-20 17:04:45 +0100 | Pickchea | (~private@unaffiliated/pickchea) (Ping timeout: 240 seconds) |
2021-02-20 17:05:10 +0100 | tromp | (~tromp@dhcp-077-249-230-040.chello.nl) |
2021-02-20 17:05:56 +0100 | enikar | (~enikar@2001:41d0:2:8673::42) |
2021-02-20 17:09:10 +0100 | mnrmnaugh | (~mnrmnaugh@unaffiliated/mnrmnaugh) |
2021-02-20 17:10:09 +0100 | tromp | (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 264 seconds) |
2021-02-20 17:12:28 +0100 | conal | (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
2021-02-20 17:13:24 +0100 | ericsagn1 | (~ericsagne@2405:6580:0:5100:86fb:42bc:1428:8130) |
2021-02-20 17:14:51 +0100 | Raito_Bezarius | (~Raito@unaffiliated/raito-bezarius/x-8764578) (Ping timeout: 272 seconds) |
2021-02-20 17:18:02 +0100 | theelous3 | (~theelous3@unaffiliated/theelous3) |
2021-02-20 17:21:16 +0100 | ddellacosta | (ddellacost@gateway/vpn/mullvad/ddellacosta) (Remote host closed the connection) |
2021-02-20 17:21:27 +0100 | ddellacosta | (ddellacost@gateway/vpn/mullvad/ddellacosta) |
2021-02-20 17:22:03 +0100 | ddellacosta | (ddellacost@gateway/vpn/mullvad/ddellacosta) (Remote host closed the connection) |
2021-02-20 17:22:27 +0100 | HarveyPwca | (~HarveyPwc@c-98-220-98-201.hsd1.il.comcast.net) (Quit: Leaving) |
2021-02-20 17:25:50 +0100 | xff0x | (~xff0x@2001:1a81:5288:8c00:e78d:bbe2:6a38:a9e6) (Ping timeout: 264 seconds) |
2021-02-20 17:25:50 +0100 | pavonia^\_^\ | (~user@unaffiliated/siracusa) |
2021-02-20 17:27:18 +0100 | xff0x | (xff0x@gateway/vpn/mullvad/xff0x) |
2021-02-20 17:28:04 +0100 | o1lo01ol1o | (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
2021-02-20 17:29:21 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-02-20 17:29:33 +0100 | idhugo | (~idhugo@80-62-117-97-mobile.dk.customer.tdc.net) |
2021-02-20 17:32:36 +0100 | o1lo01ol1o | (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Remote host closed the connection) |
2021-02-20 17:32:57 +0100 | Wuzzy | (~Wuzzy@p5b0df3df.dip0.t-ipconnect.de) |
2021-02-20 17:33:54 +0100 | idhugo | (~idhugo@80-62-117-97-mobile.dk.customer.tdc.net) (Ping timeout: 256 seconds) |
2021-02-20 17:34:22 +0100 | tzh | (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
2021-02-20 17:35:02 +0100 | minoru_shiraeesh | (~shiraeesh@5.101.59.18) |
2021-02-20 17:35:13 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2021-02-20 17:35:56 +0100 | o1lo01ol1o | (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
2021-02-20 17:37:56 +0100 | <GreyFaceNoSpace> | sorry guys. another question. I have multiple type synonyms that are all Integers. Is there a way to define all of them at once? right now it looks like this:https://pastebin.com/d3HzEF5x |
2021-02-20 17:38:10 +0100 | <GreyFaceNoSpace> | is there some other way to write it? |
2021-02-20 17:38:23 +0100 | <merijn> | tbh, I recommend *not* doing that |
2021-02-20 17:38:31 +0100 | <GreyFaceNoSpace> | what would you recommend? |
2021-02-20 17:38:39 +0100 | <GreyFaceNoSpace> | i am still learning |
2021-02-20 17:38:48 +0100 | StoneToad | (~StoneToad@104-192-232-18.ppp.storm.ca) |
2021-02-20 17:38:50 +0100 | <GreyFaceNoSpace> | advice is greatly appreciated |
2021-02-20 17:39:21 +0100 | <merijn> | The problem is that you see types like "ExecutionTime -> DeadLine -> IO ()" or whatever, but then you don't know what any of them are, especially when some people have like 5 layers of type synonyms |
2021-02-20 17:39:23 +0100 | <glguy> | GreyFaceNoSpace, type synonyms aren't good as documentation. Haddock comments are where that kind of information would go. If you need to keep these different Integers distinct from each other and from Integer itself, then you'll need newtypes |
2021-02-20 17:39:44 +0100 | <merijn> | GreyFaceNoSpace: I recommend either just using Integer *or* using newtypes (if you want type safety) |
2021-02-20 17:40:04 +0100 | ymherklotz | (~user@2a00:23c7:e28c:6001:5460:47fb:6d9:8e42) |
2021-02-20 17:40:20 +0100 | raichoo | (~raichoo@dslb-178-001-021-051.178.001.pools.vodafone-ip.de) (Quit: leaving) |
2021-02-20 17:40:34 +0100 | <merijn> | Personally I use type synonyms only rarely and when I do it's usually more to abbreviate really long types, rather than a "meaningful" name |
2021-02-20 17:40:43 +0100 | <GreyFaceNoSpace> | i see |
2021-02-20 17:40:57 +0100 | eyenx | (~eyenxeyen@unaffiliated/eye/x-1653358) (Remote host closed the connection) |
2021-02-20 17:41:15 +0100 | <GreyFaceNoSpace> | my problem with newtype is the fact that i need to use a constructor. But you are right. it's more type safe |
2021-02-20 17:41:24 +0100 | <dmj`> | type Foo, Bar :: Int would be cool syntax sugar |
2021-02-20 17:42:05 +0100 | <glguy> | GreyFaceNoSpace, The benefit of newtype is that you need to use a constructor |
2021-02-20 17:42:19 +0100 | <GreyFaceNoSpace> | dmj`, oh thanks. i was looking for that syntactic sugar. But i guess newtype would be safer as others have suggested |
2021-02-20 17:42:23 +0100 | <merijn> | GreyFaceNoSpace: They problem with the type synonyms is that if you have "time :: ExecutionTime", "deadLine :: DeadLine" and "foo :: ExecutionTime -> DeadLine -> Foo" and you call it as "foo deadLine time" you get no error |
2021-02-20 17:42:25 +0100 | frozenErebus | (~frozenEre@94.128.219.166) (Ping timeout: 240 seconds) |
2021-02-20 17:42:30 +0100 | <glguy> | That's where you express that you're changing from Integer to/from the other type |
2021-02-20 17:42:35 +0100 | <merijn> | Despite the argument being reversed |
2021-02-20 17:42:51 +0100 | Philonous | (~Philonous@unaffiliated/philonous) |
2021-02-20 17:43:02 +0100 | <merijn> | GreyFaceNoSpace: That sugar doesn't exist, dmj` was just saying it'd be cool if it did |
2021-02-20 17:43:13 +0100 | <dmj`> | ^ |
2021-02-20 17:43:22 +0100 | <GreyFaceNoSpace> | i see |
2021-02-20 17:43:32 +0100 | ep1ctetus | (~epictetus@ip72-194-215-136.sb.sd.cox.net) (Ping timeout: 256 seconds) |
2021-02-20 17:43:43 +0100 | <merijn> | GreyFaceNoSpace: tbh, the bigger the codebase I work on gets, the more I think newtyping everything is *great* |
2021-02-20 17:43:49 +0100 | <GreyFaceNoSpace> | merijn, thank u for the thorough explanation. i understand what u guys mean now |
2021-02-20 17:43:57 +0100 | raichoo | (~raichoo@dslb-178-001-021-051.178.001.pools.vodafone-ip.de) |
2021-02-20 17:44:16 +0100 | <GreyFaceNoSpace> | merijn, yeah it makes sense |
2021-02-20 17:44:44 +0100 | <GreyFaceNoSpace> | merijn, i was trying to implement some scheduling algorithms as practice |
2021-02-20 17:44:51 +0100 | <merijn> | GreyFaceNoSpace: I end up having a bunch of stuff like: https://github.com/merijn/Belewitte/blob/master/benchmark-analysis/src/Types.hs#L45-L59 now |
2021-02-20 17:45:22 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:2c3b:7c69:7266:b507) |
2021-02-20 17:45:23 +0100 | <merijn> | GreyFaceNoSpace: At first it feels a bit boiler-platey, but once code gets back and you need to refactor you end up realising past you was a genius for newtyping everything! |
2021-02-20 17:45:33 +0100 | <merijn> | s/gets back/gets big/ |
2021-02-20 17:45:40 +0100 | <GreyFaceNoSpace> | merijn, haha |
2021-02-20 17:46:05 +0100 | <merijn> | Just change a newtype somewhere and follow the type errors to fix things |
2021-02-20 17:46:30 +0100 | <GreyFaceNoSpace> | yes you convinced me. newtype is superior haha |
2021-02-20 17:47:36 +0100 | Franciman | (~francesco@host-82-49-79-189.retail.telecomitalia.it) |
2021-02-20 17:48:06 +0100 | <StoneToad> | note that wont' save you (that much) if you unwrap the type in the function args and then just have bare base types in the function body |
2021-02-20 17:48:54 +0100 | conal | (~conal@64.71.133.70) |
2021-02-20 17:49:57 +0100 | [tby] | (~tby@193.234.28.91) |
2021-02-20 17:49:57 +0100 | <GreyFaceNoSpace> | ok |
2021-02-20 17:50:03 +0100 | <merijn> | StoneToad: Well, the advantage is "who needs to know the structure of this type" I have lots of code between my commandline parsing and the logic using the "contents" of my newtypes and the newtypes mean that when I change them I only need to touch the commandline code and the place where they're used, with all intermediate code unchanged |
2021-02-20 17:50:51 +0100 | tby | (~tby@unaffiliated/tby) (Ping timeout: 256 seconds) |
2021-02-20 17:52:10 +0100 | <GreyFaceNoSpace> | i'll start working on IO now. i am currently using the haskell wiki to understand things. is there a better resource? |
2021-02-20 17:52:46 +0100 | <StoneToad> | I like https://www.fpcomplete.com/haskell/ |
2021-02-20 17:53:30 +0100 | eyenx | (~eyenxeyen@unaffiliated/eye/x-1653358) |
2021-02-20 17:53:46 +0100 | <StoneToad> | mostly because the library recommendations are solid, trying to figure out what's actually a well used library on hackage is hard |
2021-02-20 17:54:00 +0100 | <GreyFaceNoSpace> | thank u for the recommendation |
2021-02-20 17:54:08 +0100 | <GreyFaceNoSpace> | i'll check it out |
2021-02-20 17:55:44 +0100 | <GreyFaceNoSpace> | i had an fp course at uni. and it just taught the absolute basicas of functional programming. no monads, no concurrency, no vectors |
2021-02-20 17:56:00 +0100 | <GreyFaceNoSpace> | very basic IO functions |
2021-02-20 17:56:20 +0100 | <StoneToad> | merijn: indeed, I think actually the main issue in the "tagged is not a newtype" article I read was actually that they were doing unwrapping in the argument list instead of unwrapping in the code itself more then an actually difference between tagged and a 'real' newtype |
2021-02-20 17:56:51 +0100 | <dmj`> | StoneToad: whatever Bryan O'Sullivan is author of is pretty good, at least for industry haskell |
2021-02-20 17:56:59 +0100 | <dmj`> | GreyFaceNoSpace: ^ |
2021-02-20 17:59:23 +0100 | <StoneToad> | ah yea, forgot about real world haskell |
2021-02-20 17:59:25 +0100 | tromp | (~tromp@dhcp-077-249-230-040.chello.nl) |
2021-02-20 17:59:28 +0100 | <dmj`> | GreyFaceNoSpace: If you had IO in uni, you had monads ;) |
2021-02-20 18:04:02 +0100 | tromp | (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 265 seconds) |
2021-02-20 18:06:48 +0100 | geekosaur | (82650c7a@130.101.12.122) |
2021-02-20 18:08:16 +0100 | xff0x | (xff0x@gateway/vpn/mullvad/xff0x) (Ping timeout: 240 seconds) |
2021-02-20 18:08:56 +0100 | frozenErebus | (~frozenEre@94.128.219.166) |
2021-02-20 18:09:30 +0100 | <GreyFaceNoSpace> | dmj`, honestly. it wasn't an fp course now that i think about it. it was mainly a verfication course. we would write haskell functions and prove their correctness |
2021-02-20 18:10:30 +0100 | xff0x | (~xff0x@2001:1a81:5288:8c00:e78d:bbe2:6a38:a9e6) |
2021-02-20 18:16:23 +0100 | ymherklotz | (~user@2a00:23c7:e28c:6001:5460:47fb:6d9:8e42) (Remote host closed the connection) |
2021-02-20 18:16:34 +0100 | o1lo01ol1o | (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Remote host closed the connection) |
2021-02-20 18:17:09 +0100 | ymherklotz | (~user@2a00:23c7:e28c:6001:5460:47fb:6d9:8e42) |
2021-02-20 18:17:49 +0100 | Franciman | (~francesco@host-82-49-79-189.retail.telecomitalia.it) (Quit: Leaving) |
2021-02-20 18:18:27 +0100 | johnw | (~johnw@haskell/developer/johnw) (Remote host closed the connection) |
2021-02-20 18:22:07 +0100 | kfm | (~weechat@static.173.83.99.88.clients.your-server.de) (Quit: ciao kakao) |
2021-02-20 18:24:02 +0100 | kmein | (~weechat@static.173.83.99.88.clients.your-server.de) |
2021-02-20 18:24:33 +0100 | mastarija | (~mastarija@93-136-104-186.adsl.net.t-com.hr) (Ping timeout: 264 seconds) |
2021-02-20 18:26:44 +0100 | timCF | (~i.tkachuk@m91-129-99-43.cust.tele2.ee) (Quit: leaving) |
2021-02-20 18:26:54 +0100 | Pickchea | (~private@unaffiliated/pickchea) |
2021-02-20 18:27:37 +0100 | jamm_ | (~jamm@unaffiliated/jamm) |
2021-02-20 18:27:50 +0100 | conal | (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
2021-02-20 18:27:56 +0100 | stree | (~stree@68.36.8.116) (Ping timeout: 240 seconds) |
2021-02-20 18:28:16 +0100 | bitmapper | (uid464869@gateway/web/irccloud.com/x-wcndcgrnyuvjynus) (Quit: Connection closed for inactivity) |
2021-02-20 18:29:24 +0100 | nbloomf | (~nbloomf@2600:1700:ad14:3020:c91e:36e2:8f54:8f55) |
2021-02-20 18:31:35 +0100 | jluttine | (~jluttine@85-23-95-149.bb.dnainternet.fi) (Ping timeout: 265 seconds) |
2021-02-20 18:31:54 +0100 | jamm_ | (~jamm@unaffiliated/jamm) (Ping timeout: 258 seconds) |
2021-02-20 18:32:44 +0100 | danvet | (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) |
2021-02-20 18:33:54 +0100 | hnOsmium0001 | (uid453710@gateway/web/irccloud.com/x-tzqvxzijqucxtwmt) |
2021-02-20 18:35:46 +0100 | crazazy | (~crazazy@213-73-154-216.cable.dynamic.v4.ziggo.nl) |
2021-02-20 18:37:45 +0100 | conal | (~conal@64.71.133.70) |
2021-02-20 18:40:29 +0100 | ddellacosta | (ddellacost@gateway/vpn/mullvad/ddellacosta) |
2021-02-20 18:41:40 +0100 | h2017 | (~h2017@bras-base-clbaon0201w-grc-32-142-114-145-140.dsl.bell.ca) |
2021-02-20 18:41:42 +0100 | <h2017> | hi |
2021-02-20 18:41:47 +0100 | stree | (~stree@68.36.8.116) |
2021-02-20 18:41:56 +0100 | Kaeipi | (~Kaiepi@47.54.252.148) (Ping timeout: 240 seconds) |
2021-02-20 18:43:17 +0100 | Kaiepi | (~Kaiepi@47.54.252.148) |
2021-02-20 18:43:29 +0100 | <h2017> | i have a situation where i can't decide between maybeT and exceptT (roughly). With maybeT i get to use mzero and msum on that layer, but i would have to collect error messages using a writer or writing to IO. what should i do? |
2021-02-20 18:44:25 +0100 | mastarija | (~mastarija@93-136-104-186.adsl.net.t-com.hr) |
2021-02-20 18:44:35 +0100 | <h2017> | i mean on fail i'll have to write out an error message before running mzero, which is OK but i don't get the advantage of being to catch error like you can with exceptT |
2021-02-20 18:45:13 +0100 | <h2017> | but monadplus is more logical than semi-group summing exceptT |
2021-02-20 18:45:27 +0100 | o1lo01ol1o | (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
2021-02-20 18:45:44 +0100 | <h2017> | I can't see a right or a wrong |
2021-02-20 18:46:33 +0100 | <monochrom> | So ExceptT? |
2021-02-20 18:47:01 +0100 | <h2017> | ExceptT doesn't have monadPlus though |
2021-02-20 18:47:27 +0100 | <monochrom> | That's because it has Alternative. |
2021-02-20 18:47:32 +0100 | davros_ | (~davros@host86-184-190-159.range86-184.btcentralplus.com) |
2021-02-20 18:49:25 +0100 | <h2017> | how does that work. how is empty defined? |
2021-02-20 18:50:18 +0100 | davros | (~davros@host86-184-190-159.range86-184.btcentralplus.com) (Ping timeout: 258 seconds) |
2021-02-20 18:50:30 +0100 | <monochrom> | That's for you to find out. |
2021-02-20 18:50:54 +0100 | jluttine | (~jluttine@85-23-95-149.bb.dnainternet.fi) |
2021-02-20 18:50:56 +0100 | o1lo01ol1o | (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Ping timeout: 240 seconds) |
2021-02-20 18:51:36 +0100 | <monochrom> | And it has MonadPlus too. |
2021-02-20 18:52:43 +0100 | <h2017> | ok i see it here. so the definition also requires that e be a monoid for this to work. |
2021-02-20 18:52:46 +0100 | <h2017> | i get it |
2021-02-20 18:52:53 +0100 | rkk95 | (41bf0bfc@065-191-011-252.inf.spectrum.com) |
2021-02-20 18:53:15 +0100 | <rkk95> | Has anyone setup VSCode with Haskell Language Server, I'm noticing the extensions actually not installing it |
2021-02-20 18:53:36 +0100 | rajivr | (uid269651@gateway/web/irccloud.com/x-ybcsyjusnyktvefi) (Quit: Connection closed for inactivity) |
2021-02-20 18:53:48 +0100 | <monochrom> | See how 5 minutes of due dilegence can be saved by 30 minutes of struggling with a dilemma that doesn't really exist. |
2021-02-20 18:54:09 +0100 | <h2017> | monochrom, yes i'm guilty this time |
2021-02-20 18:54:33 +0100 | minoru_shiraeesh | (~shiraeesh@5.101.59.18) (Ping timeout: 264 seconds) |
2021-02-20 18:54:39 +0100 | <merijn> | monochrom: Days of work can safe literal hours of thinking! |
2021-02-20 18:55:53 +0100 | <monochrom> | That one, I think more often it's the other way round. |
2021-02-20 18:56:58 +0100 | <monochrom> | Just look at the recent example of karasu1[m] who spend days over-philosophizing instead of hours over actual coding. |
2021-02-20 18:57:25 +0100 | <monochrom> | And average. That one is years of over-philosophizing. |
2021-02-20 18:59:06 +0100 | <h2017> | i am the kind of guy who likes to think about things rather than read the book |
2021-02-20 18:59:11 +0100 | <h2017> | sometimes that backfires |
2021-02-20 19:00:39 +0100 | <h2017> | i sm busy coding something up fwiw. i'm trying to deal with the errors in the most local way. now i see that excepT is the way to go, except that i'm combining it witha bunch of other monads into a bigger monad, and I'll implement MonadError |
2021-02-20 19:00:46 +0100 | <h2017> | logical way i meant |
2021-02-20 19:01:14 +0100 | pera | (~pera@unaffiliated/pera) |
2021-02-20 19:01:58 +0100 | <h2017> | thinking about things instead of reading has the advantage that when you do read about the solution to your problem, the learning is near-instant I find. it's like your brain was waiting for the answer by that time |
2021-02-20 19:02:41 +0100 | renzhi | (~renzhi@modemcable070.17-177-173.mc.videotron.ca) (Quit: WeeChat 2.3) |
2021-02-20 19:03:34 +0100 | crazazy | (~crazazy@213-73-154-216.cable.dynamic.v4.ziggo.nl) () |
2021-02-20 19:05:21 +0100 | Jesin | (~Jesin@pool-72-66-101-18.washdc.fios.verizon.net) (Quit: Leaving) |
2021-02-20 19:06:57 +0100 | frozenErebus | (~frozenEre@94.128.219.166) (Ping timeout: 246 seconds) |
2021-02-20 19:07:12 +0100 | Jesin | (~Jesin@pool-72-66-101-18.washdc.fios.verizon.net) |
2021-02-20 19:07:31 +0100 | Jesin | (~Jesin@pool-72-66-101-18.washdc.fios.verizon.net) (Remote host closed the connection) |
2021-02-20 19:08:21 +0100 | ClaudiusMaximus | (~claude@unaffiliated/claudiusmaximus) (Quit: ->) |
2021-02-20 19:08:39 +0100 | Jesin | (~Jesin@pool-72-66-101-18.washdc.fios.verizon.net) |
2021-02-20 19:09:36 +0100 | oisdk | (~oisdk@2001:bb6:3329:d100:e4fd:fcea:33f:6b51) (Quit: oisdk) |
2021-02-20 19:11:05 +0100 | poscat | (~poscat@123.116.67.131) (Ping timeout: 240 seconds) |
2021-02-20 19:11:06 +0100 | Tario | (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
2021-02-20 19:11:45 +0100 | Tario | (~Tario@201.192.165.173) |
2021-02-20 19:12:30 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds) |
2021-02-20 19:14:43 +0100 | Raito_Bezarius | (~Raito@unaffiliated/raito-bezarius/x-8764578) |
2021-02-20 19:14:57 +0100 | raym | (~ray@45.64.220.142) (Ping timeout: 264 seconds) |
2021-02-20 19:15:03 +0100 | geowiesnot | (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) |
2021-02-20 19:19:13 +0100 | son0p | (~son0p@181.136.122.143) |
2021-02-20 19:19:20 +0100 | tromp | (~tromp@dhcp-077-249-230-040.chello.nl) |
2021-02-20 19:20:00 +0100 | <merijn> | h2017: tbh, you know what the best answer is? |
2021-02-20 19:20:25 +0100 | <merijn> | h2017: To setup your code so that the ExceptT part isn't part of the public interface anywhere so you can rip it out relatively easy later |
2021-02-20 19:20:46 +0100 | <h2017> | yes that's what's going to happen |
2021-02-20 19:20:50 +0100 | <monochrom> | I think that's why they're generalizing to MonadError. |
2021-02-20 19:21:04 +0100 | <merijn> | I dislike MonadError, tbh |
2021-02-20 19:21:28 +0100 | <merijn> | In fact, I dislike every single typeclass in mtl |
2021-02-20 19:21:40 +0100 | <merijn> | They should *never* be part of your public API |
2021-02-20 19:22:04 +0100 | <monochrom> | which MonadError? :) |
2021-02-20 19:22:31 +0100 | <merijn> | monochrom: What do you mean "which"? |
2021-02-20 19:22:57 +0100 | <monochrom> | OK let me check that there are really two. |
2021-02-20 19:23:38 +0100 | <merijn> | monochrom: If there's two, I dislike both >.> |
2021-02-20 19:23:47 +0100 | tromp | (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 256 seconds) |
2021-02-20 19:23:47 +0100 | <h2017> | i will be implementing MonadError but there are smart constructors for the monad (for more than one reason) so you can't play with the wiring |
2021-02-20 19:23:57 +0100 | <swarmcollective> | rkk95, are you setting up your machine directly, or using Haskell from within a container? If you use a container, you can automate the setup with a .devcontainer. |
2021-02-20 19:24:01 +0100 | <h2017> | if users of the API could play with the wiring they could actually break the logic |
2021-02-20 19:24:11 +0100 | <rkk95> | @swam |
2021-02-20 19:24:11 +0100 | lambdabot | smacks about with a large trout |
2021-02-20 19:24:27 +0100 | <rkk95> | swarmcollective I'm setting up on my machine directly using Stack |
2021-02-20 19:25:05 +0100 | <monochrom> | OK there is just one. |
2021-02-20 19:25:15 +0100 | <swarmcollective> | rkk95, using a devcontainer allows you to try different versions of haskell + hls without reinstalling. https://github.com/calledtoconstruct/haskell-hls-devcontainer/ |
2021-02-20 19:25:27 +0100 | <h2017> | part of the monad stack is a state monad and only certain state transitions are allowed. that's why operations are only available through smart constructors |
2021-02-20 19:25:41 +0100 | <swarmcollective> | However, I understand not wanting to give up the performance of on-hardware setup. |
2021-02-20 19:25:42 +0100 | <h2017> | i assume that this is standard practice |
2021-02-20 19:26:03 +0100 | <rkk95> | I dont need multiple versions do I? I get the error after I install Haskell extension : ghcide executable missing, please make sure it is installed, see https://github.com/digital-asset/ghcide. , when I try stack install ghcide I get dependeny errors |
2021-02-20 19:26:06 +0100 | <monochrom> | Oh snap, I didn't think of "swam". |
2021-02-20 19:26:14 +0100 | <merijn> | rkk95: You might |
2021-02-20 19:26:44 +0100 | <merijn> | rkk95: ghcide is using GHC as a library, which means the version of GHC used by ghcide must match the version you use for your code |
2021-02-20 19:27:51 +0100 | <merijn> | rkk95: ghcide is not on stackage, so... ;) |
2021-02-20 19:29:59 +0100 | <rkk95> | @merjin, ah yeah I installed from the binary here just now git clone https://github.com/digital-asset/ghcide.git |
2021-02-20 19:29:59 +0100 | <lambdabot> | Unknown command, try @list |
2021-02-20 19:30:24 +0100 | mupf | (~micha@v22017094964653601.ultrasrv.de) (Ping timeout: 246 seconds) |
2021-02-20 19:32:30 +0100 | o1lo01ol1o | (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
2021-02-20 19:32:42 +0100 | bitmapper | (uid464869@gateway/web/irccloud.com/x-adcpijikdquvbocl) |
2021-02-20 19:35:22 +0100 | nbloomf | (~nbloomf@2600:1700:ad14:3020:c91e:36e2:8f54:8f55) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2021-02-20 19:37:25 +0100 | hiroaki | (~hiroaki@ip4d166d67.dynamic.kabel-deutschland.de) (Ping timeout: 240 seconds) |
2021-02-20 19:37:27 +0100 | o1lo01ol1o | (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Ping timeout: 272 seconds) |
2021-02-20 19:38:26 +0100 | Jesin | (~Jesin@pool-72-66-101-18.washdc.fios.verizon.net) (Quit: Leaving) |
2021-02-20 19:39:54 +0100 | p-core | (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) (Read error: Connection reset by peer) |
2021-02-20 19:40:12 +0100 | p-core | (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) |
2021-02-20 19:40:17 +0100 | Jesin | (~Jesin@pool-72-66-101-18.washdc.fios.verizon.net) |
2021-02-20 19:40:23 +0100 | tromp | (~tromp@dhcp-077-249-230-040.chello.nl) |
2021-02-20 19:42:00 +0100 | o1lo01ol1o | (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
2021-02-20 19:44:27 +0100 | shatriff | (~vitaliish@protective.remission.volia.net) |
2021-02-20 19:45:03 +0100 | tromp | (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 265 seconds) |
2021-02-20 19:45:33 +0100 | StoneToad | (~StoneToad@104-192-232-18.ppp.storm.ca) (Ping timeout: 264 seconds) |
2021-02-20 19:46:03 +0100 | tromp | (~tromp@dhcp-077-249-230-040.chello.nl) |
2021-02-20 19:46:31 +0100 | HarveyPwca | (~HarveyPwc@2601:246:c180:a570:29df:3b00:ad0e:3a06) |
2021-02-20 19:46:32 +0100 | knupfer | (~Thunderbi@200116b82c888a0020b0b75f38b0f162.dip.versatel-1u1.de) |
2021-02-20 19:46:53 +0100 | Sgeo | (~Sgeo@ool-18b98aa4.dyn.optonline.net) |
2021-02-20 19:48:19 +0100 | gawen_ | (~gawen@movzbl.root.sx) (Quit: cya) |
2021-02-20 19:48:40 +0100 | gawen | (~gawen@movzbl.root.sx) |
2021-02-20 19:48:48 +0100 | takuan | (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
2021-02-20 19:53:36 +0100 | ddellacosta | (ddellacost@gateway/vpn/mullvad/ddellacosta) (Remote host closed the connection) |
2021-02-20 19:55:29 +0100 | justsomeguy | (~justsomeg@unaffiliated/--/x-3805311) (Quit: WeeChat 3.0) |
2021-02-20 19:55:31 +0100 | rkk95 | (41bf0bfc@065-191-011-252.inf.spectrum.com) (Quit: Connection closed) |
2021-02-20 19:57:08 +0100 | tromp | (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection) |
2021-02-20 19:57:22 +0100 | geekosaur | (82650c7a@130.101.12.122) (Ping timeout: 240 seconds) |
2021-02-20 19:57:33 +0100 | mupf | (~micha@v22017094964653601.ultrasrv.de) |
2021-02-20 19:57:42 +0100 | mastarija | (~mastarija@93-136-104-186.adsl.net.t-com.hr) (Ping timeout: 246 seconds) |
2021-02-20 20:01:36 +0100 | geowiesnot | (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 240 seconds) |
2021-02-20 20:03:27 +0100 | berberman_ | (~berberman@unaffiliated/berberman) |
2021-02-20 20:04:06 +0100 | mouseghost | (~draco@wikipedia/desperek) (Quit: mew wew) |
2021-02-20 20:04:41 +0100 | elfets | (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 272 seconds) |
2021-02-20 20:04:50 +0100 | berberman | (~berberman@unaffiliated/berberman) (Ping timeout: 264 seconds) |
2021-02-20 20:06:50 +0100 | hexo | (~hexo@gateway/tor-sasl/hexo) (Ping timeout: 268 seconds) |
2021-02-20 20:07:16 +0100 | <Tordek_> | https://paste.tomsmeding.com/raiSYlqR could I get a hand with types? I'm writing myself into a corner and I'm not understanding how to continue |
2021-02-20 20:07:57 +0100 | <tomsmeding> | Tordek_: what's not working? |
2021-02-20 20:08:00 +0100 | Tordek_ | Tordek |
2021-02-20 20:08:05 +0100 | <merijn> | Tordek_: Eh, type of "processor" on line 5 does not look right :p |
2021-02-20 20:08:15 +0100 | hexo | (~hexo@gateway/tor-sasl/hexo) |
2021-02-20 20:08:16 +0100 | <merijn> | I *highly* doubt it accepts *any* type |
2021-02-20 20:08:45 +0100 | DataComputist | (~lumeng@50.43.26.251) (Ping timeout: 240 seconds) |
2021-02-20 20:08:54 +0100 | <Tordek> | the thing is, "devices" are meant to be non-terminating coroutines |
2021-02-20 20:09:03 +0100 | <tomsmeding> | Tordek: also: the '=' on line 12 should probably be a '->' |
2021-02-20 20:09:30 +0100 | <Tordek> | yeah, this is pseudocode trying to understand what I'm doing more than real haskell |
2021-02-20 20:10:21 +0100 | <tomsmeding> | I find it hard trying to help with types if you don't have a concrete implementation :p |
2021-02-20 20:10:49 +0100 | bayashi | (~bayashi@185.204.1.185) (Remote host closed the connection) |
2021-02-20 20:11:03 +0100 | <Tordek> | the idea is that every time the device "ticks" it emits an action and waits for a new state (after which it emits a new action and so on) |
2021-02-20 20:11:05 +0100 | <tomsmeding> | type problems are often fairly subtle, and subtle in a way you're usually not going to find out without actually putting it through the compiler |
2021-02-20 20:11:20 +0100 | <merijn> | tomsmeding: hah, don't let pigworker hear you :p |
2021-02-20 20:11:27 +0100 | thunderrd | (~thunderrd@183.182.113.172) (Ping timeout: 272 seconds) |
2021-02-20 20:11:35 +0100 | <tomsmeding> | someone who likes paper-coding? |
2021-02-20 20:11:41 +0100 | <tomsmeding> | Knuth-style |
2021-02-20 20:11:42 +0100 | tromp | (~tromp@dhcp-077-249-230-040.chello.nl) |
2021-02-20 20:12:00 +0100 | <merijn> | tomsmeding: His entire thesis is about "why do we have to write an entire program *first* before the compiler can begin to help us?" :p |
2021-02-20 20:12:19 +0100 | <tomsmeding> | does that contradict my claims? :p |
2021-02-20 20:12:28 +0100 | <tomsmeding> | 'undefined' is your friend |
2021-02-20 20:12:34 +0100 | <merijn> | tomsmeding: _ is your friend |
2021-02-20 20:12:45 +0100 | raichoo | (~raichoo@dslb-178-001-021-051.178.001.pools.vodafone-ip.de) (Quit: leaving) |
2021-02-20 20:12:46 +0100 | <merijn> | undefined is that shady bastard who ruins your day unexpectedly |
2021-02-20 20:13:05 +0100 | <koz_> | Yeah, basically this. |
2021-02-20 20:13:10 +0100 | <koz_> | Use typed holes, not 'undefined'. |
2021-02-20 20:13:23 +0100 | frozenErebus | (~frozenEre@94.128.219.166) |
2021-02-20 20:13:28 +0100 | <tomsmeding> | I... agree, but I found typed holes unwieldy in the past, not sure why |
2021-02-20 20:13:34 +0100 | DataComputist | (~lumeng@50.43.26.251) |
2021-02-20 20:13:41 +0100 | <merijn> | Use typed holes or you'll make merijn sad for investing weeks of his life to make using typed holes convenient! |
2021-02-20 20:13:47 +0100 | <tomsmeding> | I'll try using them for a while again |
2021-02-20 20:13:57 +0100 | <tomsmeding> | sorry :p |
2021-02-20 20:14:00 +0100 | <koz_> | tomsmeding: I use them all the time, both at Real Job For Real Money and not. |
2021-02-20 20:14:05 +0100 | <koz_> | They are excellent. |
2021-02-20 20:14:27 +0100 | <merijn> | koz_: The problem is that 70% of people seem to be unaware of -fdefer-typed-holes |
2021-02-20 20:15:27 +0100 | <merijn> | "but I can run code with undefined..." 'you can run code with types holes too, dammit! >.<' |
2021-02-20 20:16:09 +0100 | <Tordek> | https://paste.tomsmeding.com/OYQEIha2 this version has valid syntax at least... |
2021-02-20 20:16:29 +0100 | tromp | (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 256 seconds) |
2021-02-20 20:16:45 +0100 | <tomsmeding> | merijn: look at the glorious undefined |
2021-02-20 20:17:02 +0100 | <Tordek> | so, my issue is in trying to define `tick`, |
2021-02-20 20:17:52 +0100 | hiroaki | (~hiroaki@ip4d166d67.dynamic.kabel-deutschland.de) |
2021-02-20 20:19:22 +0100 | <tomsmeding> | what is the trouble? |
2021-02-20 20:19:23 +0100 | zebrag | (~inkbottle@aaubervilliers-654-1-4-36.w83-200.abo.wanadoo.fr) |
2021-02-20 20:20:21 +0100 | zaquest | (~notzaques@5.128.210.178) (Quit: Leaving) |
2021-02-20 20:21:31 +0100 | ddellacosta | (~ddellacos@86.106.143.241) |
2021-02-20 20:21:47 +0100 | <Tordek> | I don't get why the type is `tick :: BusAction -> Device BusState`; should I be adding an extra alternative to Device, like... Device t = Device BusAction (BusState -> Device t) | Response t? |
2021-02-20 20:22:14 +0100 | <tomsmeding> | well, the type is that because you're using it like that :p |
2021-02-20 20:22:34 +0100 | <tomsmeding> | but you're also using do-notation, which is kind of strange here |
2021-02-20 20:22:39 +0100 | <tomsmeding> | because Device is not a Monad |
2021-02-20 20:22:50 +0100 | <tomsmeding> | maybe that's part of the problem? |
2021-02-20 20:22:59 +0100 | geekosaur | (82650c7a@130.101.12.122) |
2021-02-20 20:23:12 +0100 | <Tordek> | well, it's not _yet_ because I can't figure out the types, so herein lies the crux of the problem, yes |
2021-02-20 20:24:32 +0100 | klardotsh | (~klardotsh@c-71-231-242-112.hsd1.wa.comcast.net) (Quit: WeeChat 3.0.1) |
2021-02-20 20:24:44 +0100 | <tomsmeding> | I see |
2021-02-20 20:25:10 +0100 | hekkaidekapus{ | (~tchouri@gateway/tor-sasl/hekkaidekapus) (Remote host closed the connection) |
2021-02-20 20:25:39 +0100 | <tomsmeding> | Tordek: I suggest trying to not use Device as a monad first |
2021-02-20 20:25:44 +0100 | hekkaidekapus{ | (~tchouri@gateway/tor-sasl/hekkaidekapus) |
2021-02-20 20:26:03 +0100 | <tomsmeding> | after you've written the code, you can always still try to figure out if there is something you can abstract into a monad |
2021-02-20 20:26:38 +0100 | conal | (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
2021-02-20 20:26:52 +0100 | <tomsmeding> | to begin with, given the type signature for 'processor', it should, given a ProcessorState, be able to produce a BusAction |
2021-02-20 20:27:14 +0100 | <tomsmeding> | if then further given a BusState, it can return a new BusAction, and so forth |
2021-02-20 20:27:31 +0100 | torax | (~torax@178.239.168.171) |
2021-02-20 20:27:41 +0100 | <tomsmeding> | Tordek: reading your code, I assume your first BusAction is 'Read oaddr'? |
2021-02-20 20:27:48 +0100 | conal | (~conal@64.71.133.70) |
2021-02-20 20:27:56 +0100 | <Tordek> | yes |
2021-02-20 20:28:18 +0100 | boxscape | (4ff0baf3@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.243) |
2021-02-20 20:28:25 +0100 | rayyyy | (~nanoz@gateway/tor-sasl/nanoz) (Ping timeout: 268 seconds) |
2021-02-20 20:28:45 +0100 | <tomsmeding> | Tordek: I've changed your code a bit to this: https://paste.tomsmeding.com/mOFYbCVg |
2021-02-20 20:29:07 +0100 | <tomsmeding> | I've just directly written that first Read as a Device value, as you can see; the second half of 'processor' is still as you wrote it |
2021-02-20 20:29:32 +0100 | <tomsmeding> | (also I did some minor styling) |
2021-02-20 20:29:34 +0100 | zaquest | (~notzaques@5.128.210.178) |
2021-02-20 20:29:55 +0100 | <tomsmeding> | and added a 'value' field to BusState which I guess was missing? |
2021-02-20 20:30:26 +0100 | <tomsmeding> | perhaps you can take this further and try to write the whole of 'processor' explicitly? |
2021-02-20 20:33:44 +0100 | <tomsmeding> | also I'm not sure if Device can be made a Monad at all; to be able to implement pure = return you have to conjure up a BusAction (perhaps Skip?), but to implement <*> from Applicative you have two bus actions that need to be merged somehow |
2021-02-20 20:34:11 +0100 | <Tordek> | https://paste.tomsmeding.com/xodHLX3D here's a non-monad-using version |
2021-02-20 20:35:01 +0100 | oisdk | (~oisdk@2001:bb6:3329:d100:3d8b:3b0b:d75b:3a22) |
2021-02-20 20:35:19 +0100 | <tomsmeding> | Tordek: you ignore the BusState after a Write? |
2021-02-20 20:35:51 +0100 | <Tordek> | it depends on the device, but in this case, yes |
2021-02-20 20:36:24 +0100 | ddellacosta | (~ddellacos@86.106.143.241) (Remote host closed the connection) |
2021-02-20 20:37:01 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:2c3b:7c69:7266:b507) (Remote host closed the connection) |
2021-02-20 20:37:19 +0100 | <Tordek> | ah, to be clear, this is modeling an microprocessor/bus on an electronic system. the processor would set/unset lines on the bus, and that state is propagated to other devices |
2021-02-20 20:38:00 +0100 | rdivyanshu | (uid322626@gateway/web/irccloud.com/x-bjhpxmgmskwpfmhe) (Quit: Connection closed for inactivity) |
2021-02-20 20:38:03 +0100 | <tomsmeding> | I figured as much, but I don't know all too much about that domain :) |
2021-02-20 20:38:15 +0100 | <Tordek> | "Read" means "Set the address to <address> and the read line high", which would cause a different device to read that address line and set a value onto the bus |
2021-02-20 20:38:32 +0100 | <tomsmeding> | right |
2021-02-20 20:40:37 +0100 | ddellacosta | (ddellacost@gateway/vpn/mullvad/ddellacosta) |
2021-02-20 20:40:50 +0100 | Tario | (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
2021-02-20 20:41:33 +0100 | fosterite | (~fosterite@2600:6c46:7800:fecf:fc10:290f:3ec0:2a23) |
2021-02-20 20:43:24 +0100 | <Tordek> | https://paste.tomsmeding.com/xodHLX3D this version, the latest I linked, seems to be what I want; there's only 2 issues remaining: 1. it's indented AF and it's ugly |
2021-02-20 20:43:39 +0100 | <Tordek> | 2. I'll probably need to weave in IO at some point |
2021-02-20 20:43:52 +0100 | tromp | (~tromp@dhcp-077-249-230-040.chello.nl) |
2021-02-20 20:44:05 +0100 | Digit | (~user@fsf/member/digit) (Ping timeout: 240 seconds) |
2021-02-20 20:45:31 +0100 | Franciman | (~francesco@host-82-49-79-189.retail.telecomitalia.it) |
2021-02-20 20:45:53 +0100 | <Tordek> | thanks, btw! |
2021-02-20 20:49:55 +0100 | stree | (~stree@68.36.8.116) (Ping timeout: 256 seconds) |
2021-02-20 20:53:30 +0100 | Guest77289 | (89dc78de@137.220.120.222) |
2021-02-20 20:56:09 +0100 | topos | tapas |
2021-02-20 21:00:07 +0100 | jchia1 | (~jchia@58.41.30.202) (Ping timeout: 256 seconds) |
2021-02-20 21:03:10 +0100 | stree | (~stree@68.36.8.116) |
2021-02-20 21:03:32 +0100 | <tomsmeding> | Tordek: I agree the indentation is ugly; if you wish to sin you may have success using the NondecreasingIndentation language extension :p |
2021-02-20 21:04:11 +0100 | boxscape | (4ff0baf3@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.243) (Quit: Connection closed) |
2021-02-20 21:04:22 +0100 | boxscape | (4ff0baf3@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.243) |
2021-02-20 21:05:16 +0100 | petersen | (~petersen@redhat/juhp) (Ping timeout: 256 seconds) |
2021-02-20 21:07:20 +0100 | petersen | (~petersen@redhat/juhp) |
2021-02-20 21:11:35 +0100 | Kaiepi | (~Kaiepi@47.54.252.148) (Remote host closed the connection) |
2021-02-20 21:13:18 +0100 | fr33domlover | (~fr33domlo@fsf/member/fr33domlover) (Ping timeout: 260 seconds) |
2021-02-20 21:13:21 +0100 | Kaiepi | (~Kaiepi@47.54.252.148) |
2021-02-20 21:14:23 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:2c3b:7c69:7266:b507) |
2021-02-20 21:14:24 +0100 | roconnor | (~roconnor@host-104-157-194-235.dyn.295.ca) |
2021-02-20 21:15:03 +0100 | <roconnor> | Hi, who / where can I petition to have new logict upper bounds installed on https://hackage.haskell.org/package/unification-fd-0.10.0.1 ? |
2021-02-20 21:16:14 +0100 | fr33domlover | (~fr33domlo@fsf/member/fr33domlover) |
2021-02-20 21:17:15 +0100 | jollygood2 | (~bc8134e3@217.29.117.252) (Quit: http://www.okay.uz/ (Session timeout)) |
2021-02-20 21:17:35 +0100 | nbloomf | (~nbloomf@2600:1700:ad14:3020:c91e:36e2:8f54:8f55) |
2021-02-20 21:20:15 +0100 | geekosaur | (82650c7a@130.101.12.122) (Quit: Connection closed) |
2021-02-20 21:20:32 +0100 | geekosaur | (82650c7a@130.101.12.122) |
2021-02-20 21:20:46 +0100 | acidjnk_new | (~acidjnk@p200300d0c7390972b9ca7ed3a5659a38.dip0.t-ipconnect.de) |
2021-02-20 21:22:20 +0100 | tomku | (~tomku@unaffiliated/tomku) (Quit: Lost terminal) |
2021-02-20 21:22:42 +0100 | <maerwald> | roconnor: https://github.com/haskell-infra/hackage-trustees |
2021-02-20 21:22:55 +0100 | coot | (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
2021-02-20 21:25:05 +0100 | Varis | (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
2021-02-20 21:27:46 +0100 | usr25 | (~J@80.31.32.99) |
2021-02-20 21:28:28 +0100 | <roconnor> | thanks that's helpful. |
2021-02-20 21:29:08 +0100 | Tario | (~Tario@201.192.165.173) |
2021-02-20 21:29:39 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:2c3b:7c69:7266:b507) (Remote host closed the connection) |
2021-02-20 21:34:33 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:2c3b:7c69:7266:b507) |
2021-02-20 21:36:23 +0100 | ukari | (~ukari@unaffiliated/ukari) (Remote host closed the connection) |
2021-02-20 21:37:37 +0100 | ukari | (~ukari@unaffiliated/ukari) |
2021-02-20 21:43:14 +0100 | o1lo01ol1o | (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Remote host closed the connection) |
2021-02-20 21:43:45 +0100 | elliott_ | (~elliott_@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 264 seconds) |
2021-02-20 21:44:14 +0100 | o1lo01ol1o | (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
2021-02-20 21:44:52 +0100 | tomku | (~tomku@unaffiliated/tomku) |
2021-02-20 21:45:56 +0100 | frozenErebus | (~frozenEre@94.128.219.166) (Ping timeout: 240 seconds) |
2021-02-20 21:47:18 +0100 | Pickchea | (~private@unaffiliated/pickchea) (Quit: Leaving) |
2021-02-20 21:48:32 +0100 | roconnor | (~roconnor@host-104-157-194-235.dyn.295.ca) (Remote host closed the connection) |
2021-02-20 21:48:58 +0100 | roconnor | (~roconnor@host-104-157-194-235.dyn.295.ca) |
2021-02-20 21:49:41 +0100 | roconnor | (~roconnor@host-104-157-194-235.dyn.295.ca) (Remote host closed the connection) |
2021-02-20 21:51:33 +0100 | kw | (d4662d5d@212.102.45.93) |
2021-02-20 21:52:26 +0100 | tomku | (~tomku@unaffiliated/tomku) (Quit: Lost terminal) |
2021-02-20 21:53:25 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
2021-02-20 21:54:06 +0100 | ukari | (~ukari@unaffiliated/ukari) (Remote host closed the connection) |
2021-02-20 21:54:45 +0100 | ukari | (~ukari@unaffiliated/ukari) |
2021-02-20 21:55:59 +0100 | frozenErebus | (~frozenEre@94.128.219.166) |
2021-02-20 21:56:44 +0100 | elfets | (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) |
2021-02-20 22:00:02 +0100 | tomku | (~tomku@unaffiliated/tomku) |
2021-02-20 22:00:42 +0100 | tomku | (~tomku@unaffiliated/tomku) (Client Quit) |
2021-02-20 22:01:42 +0100 | <karasu1[m]> | It seems that monochrom referenced my name earlier today, saying that I "spend days over-philosophizing instead of actual coding". This is not actually the case. |
2021-02-20 22:01:48 +0100 | <karasu1[m]> | Yesterday, monochrom made the remark that "This is not a career counselling channel". I never claimed it was a career counselling channel. |
2021-02-20 22:01:52 +0100 | <karasu1[m]> | All I was asking for is the relationship between category theory (which was part of the the discussion earlier), and Haskell. |
2021-02-20 22:01:55 +0100 | <karasu1[m]> | I mentioned college, since monochrom specifically asked me why I was interested in knowing this relationship between these two domains |
2021-02-20 22:01:59 +0100 | <karasu1[m]> | Can someone explain to me what I have done wrong here? All I wanted to know was the relationship between Haskell and a field of mathematics. |
2021-02-20 22:02:04 +0100 | <karasu1[m]> | monochrom seems to be needlessly categorizing that as over-philosophizing, or trying to justify why my question is not welcome in #haskell ("This is not a career counselling channel") |
2021-02-20 22:02:08 +0100 | <karasu1[m]> | What did I do here that was so wrong? I just feel needlessly attacked merely for having interest in another domain, and I don't feel any of this was at all necessary. |
2021-02-20 22:03:56 +0100 | knupfer | (~Thunderbi@200116b82c888a0020b0b75f38b0f162.dip.versatel-1u1.de) (Ping timeout: 240 seconds) |
2021-02-20 22:07:44 +0100 | ddellacosta | (ddellacost@gateway/vpn/mullvad/ddellacosta) (Remote host closed the connection) |
2021-02-20 22:07:49 +0100 | <xsperry> | karasu1[m], I don't think you did anything wrong. monochrom can be cranky at times |
2021-02-20 22:08:21 +0100 | cur8or | (~cur8or@72canterbury.cybersmart.co.za) |
2021-02-20 22:10:26 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-02-20 22:15:02 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds) |
2021-02-20 22:17:55 +0100 | coot | (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
2021-02-20 22:18:56 +0100 | Franciman | (~francesco@host-82-49-79-189.retail.telecomitalia.it) (Quit: Leaving) |
2021-02-20 22:20:08 +0100 | <karasu1[m]> | I myself am new to #haskell, but I do think that this kind of attitude would be off putting (at the least) to many newcomers |
2021-02-20 22:20:12 +0100 | Kaeipi | (~Kaiepi@47.54.252.148) |
2021-02-20 22:20:17 +0100 | Kaiepi | (~Kaiepi@47.54.252.148) (Remote host closed the connection) |
2021-02-20 22:21:27 +0100 | <merijn> | karasu1[m]: The simple answer on the relationship between Haskell and category theory can be summarised as "there is none" |
2021-02-20 22:22:06 +0100 | <kw> | merjin: That's pretty glib. |
2021-02-20 22:22:07 +0100 | Kaeipi | (~Kaiepi@47.54.252.148) (Remote host closed the connection) |
2021-02-20 22:22:12 +0100 | <merijn> | Slightly longer version: "some names were copied from there for certain abstractions, but those names have essentially zero useful relation to their CT counterpart" |
2021-02-20 22:22:23 +0100 | <merijn> | kw: It's also true |
2021-02-20 22:22:30 +0100 | <MarcelineVQ> | idk about glib, you can model CT in haskell but you can model CT in BASIC too |
2021-02-20 22:22:49 +0100 | <merijn> | I don't know how this "Haskell is based on category theory" meme started doing the rounds on the internet, but it's *objectively* not true |
2021-02-20 22:23:21 +0100 | <merijn> | Like, we have a lot of literature on *exactly* the kinda things Haskell was based on... |
2021-02-20 22:23:23 +0100 | Kaeipi | (~Kaiepi@47.54.252.148) |
2021-02-20 22:23:29 +0100 | <karasu1[m]> | LOL, thanks for the answer.. that makes sense |
2021-02-20 22:23:33 +0100 | <kw> | I think it might be fair to say that there are folks who try to express concepts from category theory in Haskell. |
2021-02-20 22:23:41 +0100 | <merijn> | kw: Sure |
2021-02-20 22:23:44 +0100 | <kw> | Perhaps more than in many other languages. |
2021-02-20 22:23:46 +0100 | <karasu1[m]> | Yeah |
2021-02-20 22:23:55 +0100 | <merijn> | kw: But that is *very* different from "the language is based on category theory" |
2021-02-20 22:23:59 +0100 | <karasu1[m]> | I know that most people on #haskell are not like this though |
2021-02-20 22:24:00 +0100 | Kaeipi | (~Kaiepi@47.54.252.148) (Remote host closed the connection) |
2021-02-20 22:24:11 +0100 | <karasu1[m]> | So I will continue to ask questions.. |
2021-02-20 22:24:11 +0100 | <kw> | merjin: agree. |
2021-02-20 22:24:51 +0100 | <monochrom> | xsperry: Sure I'm always cranky. But did you conclude "I don't think you did anything wrong" under knowledge of the actual conversations? |
2021-02-20 22:24:52 +0100 | <dolio> | Saying that it was merely names that were copied with no meaningful relation to the original concept is also wrong. |
2021-02-20 22:24:54 +0100 | <merijn> | karasu1[m]: To be more specific, Haskell is pretty much entirely based on type theory and lambda calculus, and to be *even more* specific, the theory underlying GHC is mostly "System F_omega" |
2021-02-20 22:24:57 +0100 | <kw> | But I do think that many of those people have played an important role in the evolution of Haskell. |
2021-02-20 22:25:25 +0100 | <xsperry> | monochrom, I witnessed first (I think it was first) conversation |
2021-02-20 22:25:35 +0100 | <monochrom> | Here is a sample: http://www.vex.net/~trebla/tmp/k.txt |
2021-02-20 22:25:39 +0100 | <kw> | At least the Haskell package ecosystem, if not the language itself. |
2021-02-20 22:25:45 +0100 | <merijn> | dolio: Not meaningful in the sense that "you can't do category theory using the standard typeclasses" and "you can't easily generalise from CT to Haskell either" |
2021-02-20 22:26:01 +0100 | <monochrom> | I invite you to dig up more to see what I judge as help-vampiring. That's what's wrong. |
2021-02-20 22:26:14 +0100 | <monochrom> | Help-vampiring and fog-style monologuing. |
2021-02-20 22:26:24 +0100 | <merijn> | dolio: You will not become better at Haskell from knowing CT, nor will you get better at CT from knowing Haskell. That's not to say it can't be interesting/whatever |
2021-02-20 22:26:51 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-02-20 22:27:04 +0100 | <merijn> | (I guess there's a tiny niche of people who do get better at Haskell, from CT, but by the time you reach that point you are good enough at Haskell to not need to ask how to get better, like edwardk :p) |
2021-02-20 22:27:21 +0100 | nbloomf | (~nbloomf@2600:1700:ad14:3020:c91e:36e2:8f54:8f55) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2021-02-20 22:27:25 +0100 | <karasu1[m]> | I just asked a simple question. |
2021-02-20 22:27:39 +0100 | <karasu1[m]> | This is help vampiring? |
2021-02-20 22:27:52 +0100 | <kw> | karasu1[m]: I think you accidentally pressed a sore point. |
2021-02-20 22:28:00 +0100 | <swarmcollective> | karasul[m], questions are fine, just be sure to make them thoughtful and appreciate both the answer and the person giving the answer. |
2021-02-20 22:28:20 +0100 | <monochrom> | I'm sorry but "does X, Y, Z help understand Haskell?" and then "because I need to pick elective for college" looks more like career counselling than haskell help. |
2021-02-20 22:28:46 +0100 | <karasu1[m]> | You specifically asked me why I was interested in Category theory |
2021-02-20 22:28:49 +0100 | <karasu1[m]> | That was my answer |
2021-02-20 22:29:02 +0100 | <monochrom> | You're lying. Look at the log. |
2021-02-20 22:29:15 +0100 | <karasu1[m]> | "Why are you still looking for distraction?" |
2021-02-20 22:29:19 +0100 | <sm[m]> | how can you accurately call :main with a multi-word argument in GHCI ? (equivalent to $ myprog 'arg one') |
2021-02-20 22:29:20 +0100 | <karasu1[m]> | You said that |
2021-02-20 22:29:27 +0100 | <karasu1[m]> | That was my answer |
2021-02-20 22:29:51 +0100 | <merijn> | sm[m]: Use ":main <args>" |
2021-02-20 22:29:54 +0100 | <karasu1[m]> | I wouldn't have brought up college or my own life unless you had asked "Why are you still looking for a distraction" |
2021-02-20 22:30:14 +0100 | <dolio> | I'm not really convinced that's true. I think if more people knew what the concepts in category theory were used for, it'd help clear up their ideas of the roles they play in Haskell. Instead you get lots of either wrong explanations or 'just don't think about it,' non-explanations. |
2021-02-20 22:30:33 +0100 | Kaiepi | (~Kaiepi@47.54.252.148) |
2021-02-20 22:30:43 +0100 | <sm[m]> | merijn: do you mean " :main 'arg one' " ? It doesn't work |
2021-02-20 22:30:48 +0100 | geowiesnot | (~user@87-89-181-157.abo.bbox.fr) |
2021-02-20 22:30:53 +0100 | <dolio> | Which helps you not waste time thinking about Haskell incorrectly. |
2021-02-20 22:31:19 +0100 | <merijn> | sm[m]: Eh...I'm not sure what the quoting rules (if any) are in ghci |
2021-02-20 22:31:26 +0100 | nbloomf | (~nbloomf@2600:1700:ad14:3020:c91e:36e2:8f54:8f55) |
2021-02-20 22:31:30 +0100 | <karasu1[m]> | monochrom: When you say "Why are you still looking for a distraction?", I took that to mean "You specifically asked me why I was interested in Category theory" |
2021-02-20 22:31:30 +0100 | <karasu1[m]> | I'm not lying at all |
2021-02-20 22:31:30 +0100 | <karasu1[m]> | That was the reasonable conclusion from that question |
2021-02-20 22:31:50 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds) |
2021-02-20 22:31:57 +0100 | <karasu1[m]> | Look at the log |
2021-02-20 22:31:58 +0100 | <sm[m]> | it strips quotes, and I haven't found a workaround yet |
2021-02-20 22:32:34 +0100 | <geekosaur> | sm[m], double quotes seemed to work here |
2021-02-20 22:32:36 +0100 | <merijn> | dolio: Which explanations are you thinking about, then? Because I've gone ~6 chapters into CT books and all that gets your is functors which is absolutely marginal in terms of learning Haskell |
2021-02-20 22:32:52 +0100 | <merijn> | sm[m]: You can always use "withArgs xs main" :p |
2021-02-20 22:33:14 +0100 | fosterite | (~fosterite@2600:6c46:7800:fecf:fc10:290f:3ec0:2a23) (Remote host closed the connection) |
2021-02-20 22:33:19 +0100 | jollygood2 | (~bc8134e3@217.29.117.252) |
2021-02-20 22:33:34 +0100 | fosterite | (~fosterite@2600:6c46:7800:fecf:fc10:290f:3ec0:2a23) |
2021-02-20 22:33:39 +0100 | <karasu1[m]> | Anyway monochrom , I hope that you at least see why your comments make me feel unwelcomed and attacked |
2021-02-20 22:34:02 +0100 | fosterite | (~fosterite@2600:6c46:7800:fecf:fc10:290f:3ec0:2a23) (Remote host closed the connection) |
2021-02-20 22:34:03 +0100 | <sm[m]> | geekosaur: you're right! merijn: also true. Thanks both |
2021-02-20 22:34:19 +0100 | <karasu1[m]> | Again, I do realize that most people in this channel are not like this, so I will continue to ask questions |
2021-02-20 22:34:22 +0100 | fosterite | (~fosterite@2600:6c46:7800:fecf:fc10:290f:3ec0:2a23) |
2021-02-20 22:34:37 +0100 | <karasu1[m]> | dolio: Thank you for the help yesterday regarding the normalize list one pass thing |
2021-02-20 22:34:46 +0100 | <edwardk> | merijn: i do think that without category theory, the haskell i wrote would be ... boring, and i wouldn't have any real reason to write in it over any other language. the arrays are clunky, syntax for doing mutable things is hard to use... |
2021-02-20 22:34:49 +0100 | fosterite | (~fosterite@2600:6c46:7800:fecf:fc10:290f:3ec0:2a23) (Remote host closed the connection) |
2021-02-20 22:34:54 +0100 | <karasu1[m]> | And ski as well, if ski is here |
2021-02-20 22:35:00 +0100 | <karasu1[m]> | thanks. |
2021-02-20 22:35:05 +0100 | <edwardk> | i'd have... concurrent exception safety and masking |
2021-02-20 22:35:11 +0100 | fosterite | (~fosterite@2600:6c46:7800:fecf:fc10:290f:3ec0:2a23) |
2021-02-20 22:35:12 +0100 | <edwardk> | and uh... STM |
2021-02-20 22:35:13 +0100 | <dolio> | For example, I think a lot of people burn time trying to 'explain' monads. But in category theory they are used to talk about algebra mostly, which is exactly what they're doing in Haskell. |
2021-02-20 22:35:18 +0100 | knupfer | (~Thunderbi@mue-88-130-61-090.dsl.tropolys.de) |
2021-02-20 22:35:36 +0100 | fosterite | (~fosterite@2600:6c46:7800:fecf:fc10:290f:3ec0:2a23) (Remote host closed the connection) |
2021-02-20 22:35:43 +0100 | <dolio> | No BS about 'containers' or 'sequencing' or .... |
2021-02-20 22:35:45 +0100 | tomku | (~tomku@unaffiliated/tomku) |
2021-02-20 22:35:50 +0100 | <merijn> | edwardk: A convenient FFI and expressive language :p |
2021-02-20 22:36:14 +0100 | <edwardk> | expressive language maybe. convenient ffi? have you actually used any other language? =) |
2021-02-20 22:36:15 +0100 | fosterite | (~fosterite@2600:6c46:7800:fecf:fc10:290f:3ec0:2a23) |
2021-02-20 22:36:17 +0100 | <dolio> | That also explains why algebraic effects are useful for many of the same things. |
2021-02-20 22:36:18 +0100 | <swarmcollective> | merijn, thank you for spelling that out. "You will not become better at Haskell from knowing CT, nor will you get better at CT from knowing Haskell" I recently asked my father some questions about CT (as he was a Mathematics Prof) and at the end of the conversation, he said "You are using terms from Mathematics, but not in a way that makes sense in Mathematics" LOL |
2021-02-20 22:36:30 +0100 | <edwardk> | to bind another library i use 3 fricking ffi approaches and still can't handle c++ right |
2021-02-20 22:36:31 +0100 | <merijn> | dolio: tbh, I never even got to monads in the CT books, because adjuncts and stuff are like halfway into the book which is far more painful then I've managed to get through |
2021-02-20 22:36:47 +0100 | <merijn> | edwardk: Oh, but that doesn't count |
2021-02-20 22:36:57 +0100 | <merijn> | edwardk: C++ is entirely shite to call from any language that is not C++ |
2021-02-20 22:37:04 +0100 | <geekosaur> | "handles C++ right" this is a thing? |
2021-02-20 22:37:20 +0100 | <merijn> | In fact, I would go as far as saying there's literally no language with a proper C++ FFI |
2021-02-20 22:37:25 +0100 | <merijn> | What would that even mean |
2021-02-20 22:37:34 +0100 | <ski> | yw, karasu1[m] |
2021-02-20 22:37:44 +0100 | alx741 | (~alx741@181.196.68.69) |
2021-02-20 22:37:48 +0100 | <merijn> | edwardk: And what languages have you used where the FFI is as pleasant or better than Haskell? |
2021-02-20 22:38:05 +0100 | <merijn> | I could always use more languages in my repertoire :p |
2021-02-20 22:38:11 +0100 | <dolio> | Because algebraic effects are Lawvere theories, which are well known to be connected to monads. |
2021-02-20 22:38:16 +0100 | <maerwald> | merijn: python |
2021-02-20 22:38:16 +0100 | <ski> | swarmcollective : perhaps part of that would just be different backgrounds |
2021-02-20 22:38:28 +0100 | <edwardk> | geekosaur: i can kinda sort of limp by by using a mixture of hsc2hs to grab constants from macros if there is a c api, using inline-c-cpp to bind custom snippets to puppet the api and using the haskell ffi bits to grab finalizers and the last few things the other 2 approaches don't do |
2021-02-20 22:38:30 +0100 | <merijn> | maerwald: Python's FFI is *far* more painful then Haskell |
2021-02-20 22:38:57 +0100 | <merijn> | edwardk: Sure, but that applies to literally any other language and C++ too :p |
2021-02-20 22:39:00 +0100 | <edwardk> | my code becomes a rats nest of c programs running to _print_ haskell programs, template haskell code gen, and 2 tiers of libraries for annoying technical reasons |
2021-02-20 22:39:14 +0100 | <edwardk> | merijn: i'm just saying i had better experiences 20 years ago using python and SWIG |
2021-02-20 22:39:34 +0100 | <edwardk> | or perl's inline c package |
2021-02-20 22:39:38 +0100 | <geekosaur> | swig abstracts away a lot of pain in any language |
2021-02-20 22:39:48 +0100 | <edwardk> | both of which were pretty damn good |
2021-02-20 22:39:51 +0100 | <ski> | edwardk : sounds like grovelling |
2021-02-20 22:40:01 +0100 | <edwardk> | haskell _can_ ffi. it isn't good at it |
2021-02-20 22:40:12 +0100 | <edwardk> | groveling? |
2021-02-20 22:40:14 +0100 | <ski> | (the generating programs at run-time, in order to grab FFI constants thing) |
2021-02-20 22:41:21 +0100 | <merijn> | edwardk: Doing the same things in python takes me considerably more code and dealing with python's insane interpreter >.> |
2021-02-20 22:41:27 +0100 | fosterite | (~fosterite@2600:6c46:7800:fecf:fc10:290f:3ec0:2a23) (Ping timeout: 258 seconds) |
2021-02-20 22:41:28 +0100 | <edwardk> | and to boot, hsc2hs is sstill hs_c_2hs, because we haven't bothered to flip the order in which arguments are passed to it, so we can';t overload it to to c++. |
2021-02-20 22:41:50 +0100 | <edwardk> | that's literally what it takes |
2021-02-20 22:41:59 +0100 | <merijn> | edwardk: tbh, you can't currently have a sane hsc2hs at the moment anyway |
2021-02-20 22:42:11 +0100 | <edwardk> | ok, so i should what, stop? |
2021-02-20 22:42:11 +0100 | <merijn> | edwardk: And I disagree with "that's all it takes" |
2021-02-20 22:42:37 +0100 | <edwardk> | i mean that is all it takes for me to be able to bind go glslang, which i really just can't do with haskell today |
2021-02-20 22:42:38 +0100 | <dolio> | edwardk: Probably. :) |
2021-02-20 22:42:40 +0100 | <edwardk> | not efficiently |
2021-02-20 22:42:46 +0100 | <maerwald> | c2hs is also great, especially when it fails to parse your C files :p |
2021-02-20 22:42:51 +0100 | <edwardk> | that was what stopped me from my coding binge this summer |
2021-02-20 22:42:52 +0100 | <merijn> | edwardk: I'm not saying that, but things aren't that simple. inline C++ and hsc2hs need a way to explicitly pass in the toolchains |
2021-02-20 22:43:02 +0100 | <merijn> | maerwald: c2hs is explicitly *not* intended for automated use |
2021-02-20 22:43:07 +0100 | ymherklotz | (~user@2a00:23c7:e28c:6001:5460:47fb:6d9:8e42) (Ping timeout: 260 seconds) |
2021-02-20 22:43:16 +0100 | <edwardk> | was realizing i was really going to have to write a custom binding to libclang, because there was no pure c header available _and_ a bunch of constants i had to capture |
2021-02-20 22:43:17 +0100 | <maerwald> | merijn: tell that to hackage |
2021-02-20 22:43:19 +0100 | <merijn> | maerwald: It's intended to create scaffolding for manual fixing up, which it says in the docs |
2021-02-20 22:43:38 +0100 | <merijn> | maerwald: Sure, people do stupid stuff all the time |
2021-02-20 22:43:45 +0100 | <edwardk> | i figure i gave it a good go for about a month before walking away |
2021-02-20 22:43:55 +0100 | <edwardk> | so i'm a bit salty about our 'good ffi' =) |
2021-02-20 22:43:58 +0100 | <merijn> | edwardk: There's a half-arsed CXX configuration in ghc currently, and I made a ticket to make it more explicit |
2021-02-20 22:44:10 +0100 | <ephemient> | karasu1[m]: I'm not a good educator, so I hope my attempts here haven't been dissuading you from asking questions. however, I will say that *at times* you don't appear to be a good learner either - revisiting the same points without taking others' replies - which does bother people |
2021-02-20 22:44:20 +0100 | geekosaur | (82650c7a@130.101.12.122) (Quit: Connection closed) |
2021-02-20 22:44:26 +0100 | <merijn> | edwardk: But until the entire toolchain (including cabal) allows passing in explicit C++ toolchains, C++ FFI is fundamentally doomed |
2021-02-20 22:44:50 +0100 | <merijn> | edwardk: And in my defense I was talking about *C* FFI when I said good FFI |
2021-02-20 22:45:04 +0100 | <karasu1[m]> | ephemient: can you give me an example? I will try to learn from this then |
2021-02-20 22:45:06 +0100 | <edwardk> | my current hope for c++ ffi is to ... do almost everything at template haskell time, which has its own special brand of crazy |
2021-02-20 22:45:15 +0100 | <dolio> | karasu1[m]: If you want a possibly more constructive version of monochrom's grumping, I'd say you should read leading questions people give you more closely. For instance, I asked you to write a function that subtracted a value from everything in a list, and you had some false starts because you kept thinking about what that value was going to be. |
2021-02-20 22:45:18 +0100 | <edwardk> | because it literally forces me to use two libraries inside the package |
2021-02-20 22:45:27 +0100 | <dolio> | But I didn't ask you about that. I just asked you to write the function, not call it with anything. |
2021-02-20 22:45:28 +0100 | <edwardk> | otherwise template-haskell fails to link the external libraries i need |
2021-02-20 22:45:37 +0100 | <merijn> | edwardk: I mean, to have any form of sensible C++ FFI you need a stable ABI for C++, which just doesn't exist |
2021-02-20 22:45:41 +0100 | <edwardk> | so i have to set up with template haskell in package one dependencies i can use in package 2 |
2021-02-20 22:45:54 +0100 | <merijn> | Not to mention that you can't mix C++ code compiled with different stdlib's either |
2021-02-20 22:45:58 +0100 | <edwardk> | merijn: that is an excuse not a solution |
2021-02-20 22:46:05 +0100 | <merijn> | All of which is to blame on C++, not Haskell |
2021-02-20 22:46:18 +0100 | alx741 | (~alx741@181.196.68.69) (Ping timeout: 260 seconds) |
2021-02-20 22:46:19 +0100 | <ephemient> | Itanium C++ ABI is mostly standard |
2021-02-20 22:46:23 +0100 | <ephemient> | ... except where it isn't |
2021-02-20 22:46:26 +0100 | <merijn> | edwardk: Sure, because I don't see any solution that does not involve "manually hard coding all special cases" |
2021-02-20 22:46:27 +0100 | <edwardk> | c++ exists, complaining about that fact won't make it go away, and won't make things you have to interop with stop being written in it. |
2021-02-20 22:46:41 +0100 | <karasu1[m]> | dolio: Yes, I understand. It had to do with my presumption that we had to know the value before we actually subtracted the value. That's where Haskell's special sauce comes in though I guess, so I didn't know. |
2021-02-20 22:46:43 +0100 | <kw> | Unfortunately, blaming C++ for being C++ will get you nowhere :9 |
2021-02-20 22:46:43 +0100 | <merijn> | edwardk: Right, but nothing else but C++ can interface with it either |
2021-02-20 22:46:47 +0100 | justsomeguy | (~justsomeg@unaffiliated/--/x-3805311) |
2021-02-20 22:46:50 +0100 | tomku | (~tomku@unaffiliated/tomku) (Quit: Lost terminal) |
2021-02-20 22:47:14 +0100 | <maerwald> | merijn: yeah, and make sure you actually use *capi* and not ccall :D |
2021-02-20 22:47:16 +0100 | <maerwald> | such great ffi |
2021-02-20 22:47:25 +0100 | <karasu1[m]> | I am not a smart person LOL.. |
2021-02-20 22:47:34 +0100 | <karasu1[m]> | But I will try to get better at learning. |
2021-02-20 22:47:35 +0100 | <maerwald> | or get random header bugs |
2021-02-20 22:47:38 +0100 | <merijn> | edwardk: Which, sure, isn't solution, but short of someone ponying up a few million to pay for handling all the special cases I don't see it happen |
2021-02-20 22:47:47 +0100 | <maerwald> | such as https://git.io/Jt9II |
2021-02-20 22:48:08 +0100 | <edwardk> | i have a greater apetite for just 'cutting and pasting whole chunks of an api and reimplementing it, but the current story is nuts. |
2021-02-20 22:49:07 +0100 | edwardk | stares nervously at his unlifted library which is large chunks of base re-implemented or the linear-primitive code he wrote just before that... |
2021-02-20 22:49:34 +0100 | <edwardk> | and the c++ tensor library that he wrote that totally isn't just a clone of everyone else's ETL'd tensoring approach.. |
2021-02-20 22:49:38 +0100 | gratadewey1 | (~gratadewe@tmo-121-215.customers.d1-online.com) |
2021-02-20 22:50:00 +0100 | ambiso9 | (~ambiso@209.182.239.205) (Quit: The Lounge - https://thelounge.chat) |
2021-02-20 22:50:14 +0100 | <edwardk> | anyways, my next approach will be to say screw it and just use libclang |
2021-02-20 22:50:34 +0100 | <maerwald> | merijn: and that code almost made it into unix package |
2021-02-20 22:50:35 +0100 | <edwardk> | and then at TH-time run it, walk through the structures, spew out the code i need and be done. |
2021-02-20 22:51:10 +0100 | ambiso9 | (~ambiso@209.182.239.205) |
2021-02-20 22:51:33 +0100 | <edwardk> | on the plus side i almost have all of the numeric hierarchy done in 'unlifted' |
2021-02-20 22:51:43 +0100 | <edwardk> | switching to happier topics =) |
2021-02-20 22:52:03 +0100 | <dolio> | Not even C++ can interface with C++, no? It's only particular compilers that are compatible. |
2021-02-20 22:52:05 +0100 | <karasu1[m]> | ephemient: I do want to make it clear that I read everyones' replies when it relates to my question. Sometimes I fixate on one or two replies at a time though, and reply based on those, so it might seem as though I have ignored everyone else, but this is not my intention.. Unfortunately with the IRC problem I don't think I can solve this problem though.. |
2021-02-20 22:52:14 +0100 | viluon | (uid453725@gateway/web/irccloud.com/x-xtfekalitxpxoctj) |
2021-02-20 22:52:15 +0100 | <jollygood2> | how come main isn't main :: [String] -> IO Int? then we wouldn't need things like :main or withArgs |
2021-02-20 22:52:30 +0100 | <karasu1[m]> | IRC (not problem lol) |
2021-02-20 22:52:38 +0100 | <dolio> | jollygood2: But you wouldn't be able to do withArgs. :) |
2021-02-20 22:52:38 +0100 | <merijn> | dolio: The only compatible compilers are "the exact same version", other versions of the same compiler *may* work if you're lucky |
2021-02-20 22:52:49 +0100 | <dolio> | Right. |
2021-02-20 22:52:52 +0100 | <merijn> | dolio: And if you use a different stdlib implementation everything is hell |
2021-02-20 22:52:53 +0100 | <edwardk> | jollygood2: because then you don't have t run your entire program in a reader monad just to pass around some arguments you could gather at literally any point |
2021-02-20 22:52:59 +0100 | <jollygood2> | dolio, sure you would? just call main with list of arguments |
2021-02-20 22:53:32 +0100 | ddellacosta | (ddellacost@gateway/vpn/mullvad/ddellacosta) |
2021-02-20 22:54:03 +0100 | swarmcollective | thinks out loud "Isn't `std` in stdlib supposed to mean standard..." (facepalm) |
2021-02-20 22:54:14 +0100 | <edwardk> | swarmcollective: =P |
2021-02-20 22:54:15 +0100 | <merijn> | swarmcollective: The API is standard |
2021-02-20 22:54:22 +0100 | <merijn> | swarmcollective: The implementation and internals are not |
2021-02-20 22:54:42 +0100 | <maerwald> | swarmcollective: yeah, we need better tests xD |
2021-02-20 22:54:46 +0100 | <merijn> | swarmcollective: And since C++ doesn't have standardised ABI that defines how specific APIs are compiled |
2021-02-20 22:55:01 +0100 | Kaiepi | (~Kaiepi@47.54.252.148) (Remote host closed the connection) |
2021-02-20 22:55:54 +0100 | <merijn> | swarmcollective: std::vector from LLVM stdlib is implemented *differently* from the one in g++'s stdlib. They have the same public API, but their internals aren't the same, so if you pass a std::vector from one to functions from the other you'll get segfaults, random memory corruption, etc. |
2021-02-20 22:56:53 +0100 | <davros_> | i dont even think rust can interface nicely to c++ (haven't checked if they made any progress with that) |
2021-02-20 22:56:58 +0100 | <merijn> | (speaking from experience) |
2021-02-20 22:57:01 +0100 | <monochrom> | "The nice thing about standards is there are so many to choose from." |
2021-02-20 22:57:32 +0100 | <merijn> | davros_: Even D, which advertises a C++ FFI is only partially compatible with C++ code, so you better hope you don't need anything it doesn't cover |
2021-02-20 22:58:01 +0100 | <dolio> | Couldn't that happen with C? Like, two different compilers might disagree on various sizes and whatnot. |
2021-02-20 22:58:12 +0100 | <merijn> | dolio: In theory, yes |
2021-02-20 22:58:14 +0100 | <dolio> | Of course there's lots more to disagree about in C++. |
2021-02-20 22:58:25 +0100 | <merijn> | dolio: In practice every C compiler adheres to the platform ABI specified by the OS |
2021-02-20 22:58:32 +0100 | <monochrom> | The C world has consensus on, for example, "x86-64 ABI" |
2021-02-20 22:58:32 +0100 | <dolio> | Oh okay. |
2021-02-20 22:58:35 +0100 | <merijn> | dolio: But such an ABI doesn't exist for C++ |
2021-02-20 22:59:07 +0100 | <merijn> | dolio: Incidentally, this is why you cannot pass/return structs by value between C code from different compilers (or haskell's C FFI) |
2021-02-20 22:59:15 +0100 | <monochrom> | The C++ world? What ABI? They have *.h files instead. |
2021-02-20 22:59:20 +0100 | <merijn> | Because the ABI doesn't specify what that should look like |
2021-02-20 22:59:28 +0100 | <dolio> | Okay, makes sense. |
2021-02-20 22:59:59 +0100 | <swarmcollective> | <sarcasm>All this incompatability makes we think we should make another language that doesn't have this problem.</sarcasm> |
2021-02-20 23:00:23 +0100 | <monochrom> | I don't even think they have agreed on a universal name-mangling algorithm. |
2021-02-20 23:00:42 +0100 | alx741 | (~alx741@186.178.109.47) |
2021-02-20 23:00:46 +0100 | <ski> | @quote mangler |
2021-02-20 23:00:46 +0100 | <lambdabot> | Pseudonym says: All hail the Evil Mangler! |
2021-02-20 23:00:47 +0100 | son0p | (~son0p@181.136.122.143) (Quit: leaving) |
2021-02-20 23:00:58 +0100 | <merijn> | monochrom: They do not |
2021-02-20 23:01:02 +0100 | tomku | (~tomku@unaffiliated/tomku) |
2021-02-20 23:01:08 +0100 | <merijn> | monochrom: Once again, speaking from experience >.. |
2021-02-20 23:01:46 +0100 | frozenErebus | (~frozenEre@94.128.219.166) (Ping timeout: 265 seconds) |
2021-02-20 23:01:55 +0100 | <merijn> | the evil mangler was a Haskell thing, though :p |
2021-02-20 23:02:04 +0100 | <ski> | well, Perl, technically |
2021-02-20 23:02:13 +0100 | <merijn> | Which is slowly becoming ancient Haskell lore :p |
2021-02-20 23:02:24 +0100 | <merijn> | ski: Perl implementation, but *for* Haskell |
2021-02-20 23:02:37 +0100 | gratadewey1 | (~gratadewe@tmo-121-215.customers.d1-online.com) (Quit: Leaving) |
2021-02-20 23:03:37 +0100 | <ephemient> | Go uses its own ABI instead of the platform's ABI, at least for calling convention... |
2021-02-20 23:04:02 +0100 | <merijn> | ephemient: So does GHC :p |
2021-02-20 23:04:17 +0100 | <ski> | merijn : yes, i know :P |
2021-02-20 23:04:30 +0100 | <ephemient> | C++ name mangling is pretty well standardized, that's part of the Itanium C++ ABI that both GCC and Clang follow (at least on Linux and macos). Windows is different but also standard |
2021-02-20 23:04:35 +0100 | <monochrom> | I feel like the C++ people have given up. Even though there are a lot of C++ users, there are not enough of them to need a common ABI. I mean, look at Scheme or Lisp too, what do you need ABIs for? :) |
2021-02-20 23:04:36 +0100 | <merijn> | ski: I mean that I would consider that "a Haskell thing" :p |
2021-02-20 23:05:12 +0100 | <ski> | sure, i was just jesting :p |
2021-02-20 23:05:35 +0100 | <ephemient> | it's true that "data structures" like strings and vectors aren't part of the C++ ABI though, and exporting those will lead to suffering |
2021-02-20 23:06:40 +0100 | <ephemient> | merijn: it's fairer for GHC because we don't pretend to be a C-like language, IMO |
2021-02-20 23:06:50 +0100 | <monochrom> | Hey, LLVM knows GHC calling convention. That's a start... |
2021-02-20 23:07:17 +0100 | _ht | (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
2021-02-20 23:08:26 +0100 | __monty__ | (~toonn@unaffiliated/toonn) (Quit: leaving) |
2021-02-20 23:09:22 +0100 | <davros_> | c++ libraries usually need a lot of compile-time code generation |
2021-02-20 23:09:44 +0100 | ski | . o O ( <https://common-lisp.net/project/cffi/manual/html_node/The-Groveller.html> ) |
2021-02-20 23:09:51 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:2c3b:7c69:7266:b507) (Remote host closed the connection) |
2021-02-20 23:09:54 +0100 | fosterite | (~fosterite@2600:6c46:7800:fecf:fc10:290f:3ec0:2a23) |
2021-02-20 23:10:23 +0100 | <davros_> | passing types liike std::vector around.. problematic |
2021-02-20 23:10:30 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:2c3b:7c69:7266:b507) |
2021-02-20 23:10:56 +0100 | stree | (~stree@68.36.8.116) (Ping timeout: 240 seconds) |
2021-02-20 23:13:16 +0100 | <karasu1[m]> | monochrom: Do you wish to apologize for attacking me and made me feel unwelcome? Or are you planning to continue? |
2021-02-20 23:13:34 +0100 | <monochrom> | I did not attack you. At most I complained. |
2021-02-20 23:13:49 +0100 | <monochrom> | Are you ready to apologize for wrong accusations towards me? |
2021-02-20 23:13:56 +0100 | <karasu1[m]> | What wrong accusations? |
2021-02-20 23:14:07 +0100 | <karasu1[m]> | I felt attacked |
2021-02-20 23:14:10 +0100 | <karasu1[m]> | I felt unwelcome |
2021-02-20 23:14:26 +0100 | <karasu1[m]> | I'm not lying here |
2021-02-20 23:14:48 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:2c3b:7c69:7266:b507) (Ping timeout: 258 seconds) |
2021-02-20 23:14:56 +0100 | fosterite | (~fosterite@2600:6c46:7800:fecf:fc10:290f:3ec0:2a23) (Ping timeout: 240 seconds) |
2021-02-20 23:14:58 +0100 | ymherklotz | (~user@2a00:23c7:e28c:6001:5460:47fb:6d9:8e42) |
2021-02-20 23:14:59 +0100 | <karasu1[m]> | I still don't feel that comfortable here to be honest |
2021-02-20 23:15:08 +0100 | 18WABPWT7 | (~Feuermagi@2a02:2488:4211:3400:246e:bf09:8453:9d6) |
2021-02-20 23:15:08 +0100 | 17SABVONV | (~Feuermagi@213.178.26.41) |
2021-02-20 23:15:13 +0100 | <Uniaika> | uh-oh |
2021-02-20 23:15:34 +0100 | elliott_ | (~elliott_@pool-108-51-101-42.washdc.fios.verizon.net) |
2021-02-20 23:15:49 +0100 | p-core | (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) (Quit: p-core) |
2021-02-20 23:16:00 +0100 | <karasu1[m]> | monochrom: So you refuse to apologize? And you plan to continue I take it then? |
2021-02-20 23:16:10 +0100 | p-core | (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) |
2021-02-20 23:16:54 +0100 | 18WABPWT7 | (~Feuermagi@2a02:2488:4211:3400:246e:bf09:8453:9d6) (Client Quit) |
2021-02-20 23:17:06 +0100 | 17SABVONV | (~Feuermagi@213.178.26.41) (Client Quit) |
2021-02-20 23:17:19 +0100 | Feuermagier | (~Feuermagi@2a02:2488:4211:3400:246e:bf09:8453:9d6) |
2021-02-20 23:17:22 +0100 | <swarmcollective> | Wow. :\ |
2021-02-20 23:19:21 +0100 | edwardk | looks up, sees drama. |
2021-02-20 23:19:30 +0100 | <edwardk> | karasu1[m]: chill out |
2021-02-20 23:20:59 +0100 | <karasu1[m]> | I really don't feel comfortable here if monochrom does not see why their actions made me feel attacked and unwelcome, and especially if monochrom is planning to continue doing the same thing again |
2021-02-20 23:21:05 +0100 | <karasu1[m]> | That is how I honestly feel |
2021-02-20 23:21:40 +0100 | <edwardk> | right now i don't have a whole lot of context. all i have is you here, a relative newcomer chatting at a mile a minute, and starting to demand apologies. |
2021-02-20 23:22:23 +0100 | <edwardk> | i'm happy to move this discussion into #haskell-ops. this _isn't_ the place for this drama. |
2021-02-20 23:23:27 +0100 | ymherklotz | (~user@2a00:23c7:e28c:6001:5460:47fb:6d9:8e42) (Ping timeout: 272 seconds) |
2021-02-20 23:24:35 +0100 | nbloomf | (~nbloomf@2600:1700:ad14:3020:c91e:36e2:8f54:8f55) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2021-02-20 23:24:36 +0100 | stree | (~stree@68.36.8.116) |
2021-02-20 23:29:12 +0100 | _bo | (~bo@178.150.122.153) |
2021-02-20 23:31:16 +0100 | bo__ | (~bo@178.150.122.153) (Ping timeout: 240 seconds) |
2021-02-20 23:32:06 +0100 | <sm[m]> | karasu1: monochrom is sometimes rude and you made your point well and got some good responses. After that it's usually best to let things settle and/or just carry on with on-topic chat |
2021-02-20 23:32:07 +0100 | sheepfleece | (~sheep@46.53.253.85) |
2021-02-20 23:32:15 +0100 | sheepfleece | (~sheep@46.53.253.85) (Client Quit) |
2021-02-20 23:32:30 +0100 | ep1ctetus | (~epictetus@ip72-194-215-136.sb.sd.cox.net) |
2021-02-20 23:32:35 +0100 | <merijn> | sm[m]: The discussion has moved to -ops |
2021-02-20 23:35:18 +0100 | elfets | (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 260 seconds) |
2021-02-20 23:36:16 +0100 | <maerwald> | ontopic: cabal-3.4.0.0 is out |
2021-02-20 23:36:31 +0100 | cur8or | (~cur8or@72canterbury.cybersmart.co.za) (Ping timeout: 256 seconds) |
2021-02-20 23:37:30 +0100 | usr25 | (~J@80.31.32.99) (Quit: Bye) |
2021-02-20 23:38:05 +0100 | <monochrom> | !!! |
2021-02-20 23:38:35 +0100 | <monochrom> | So finally the doc version and the program version match with each other :) |
2021-02-20 23:39:04 +0100 | <maerwald> | ppl have been using the RCs in production anyway |
2021-02-20 23:39:18 +0100 | Tario | (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
2021-02-20 23:40:01 +0100 | <wz1000> | great, I can finally use `cabal list-bin` to replace the horrific `PATH="${PATH/$HOME\/.local\/bin:/}" cabal new-exec --verbose=0 --offline sh -- -c 'which myexecutable'` in all my scripts |
2021-02-20 23:40:15 +0100 | <merijn> | wz1000: High-five! |
2021-02-20 23:40:19 +0100 | <merijn> | wz1000: Join the club ;) |
2021-02-20 23:40:33 +0100 | <merijn> | wz1000: Although you could have used cabal-plan for that :p |
2021-02-20 23:41:23 +0100 | <merijn> | wz1000: Also, isn't your version just "cabal v2-run"? |
2021-02-20 23:41:26 +0100 | <maerwald> | still weird that you have to prefix exe: |
2021-02-20 23:41:33 +0100 | <maerwald> | like there are bins for a lib target |
2021-02-20 23:42:01 +0100 | <merijn> | maerwald: You don't have to prefix exe: ? |
2021-02-20 23:42:07 +0100 | <maerwald> | you have to |
2021-02-20 23:42:17 +0100 | <wz1000> | merijn: in my experience new-run tends to be slow, probably because its trying to check if things are up to date |
2021-02-20 23:42:25 +0100 | <maerwald> | https://paste.tomsmeding.com/AueG5K2S |
2021-02-20 23:42:42 +0100 | <merijn> | maerwald: Works without exe: for me in 3.2 |
2021-02-20 23:42:59 +0100 | <merijn> | maerwald: Oh, you have the same name library and executable |
2021-02-20 23:43:03 +0100 | <maerwald> | yeah |
2021-02-20 23:43:04 +0100 | <sm[m]> | congrats, cabal devs! |
2021-02-20 23:43:07 +0100 | cur8or | (~cur8or@72canterbury.cybersmart.co.za) |
2021-02-20 23:43:12 +0100 | theodorc | teddyc |
2021-02-20 23:43:26 +0100 | xff0x | (~xff0x@2001:1a81:5288:8c00:e78d:bbe2:6a38:a9e6) (Ping timeout: 240 seconds) |
2021-02-20 23:44:27 +0100 | frozenErebus | (~frozenEre@94.128.219.166) |
2021-02-20 23:44:45 +0100 | xff0x | (~xff0x@2001:1a81:5288:8c00:b017:dd71:5231:84a2) |
2021-02-20 23:45:08 +0100 | Tario | (~Tario@201.192.165.173) |
2021-02-20 23:45:50 +0100 | <maerwald> | --help is still a useless piece of *** :p |
2021-02-20 23:46:10 +0100 | <merijn> | "patches welcome" >.> |
2021-02-20 23:46:44 +0100 | <maerwald> | that would be a lot of work (the research, not the patch) |
2021-02-20 23:46:50 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-02-20 23:47:44 +0100 | <merijn> | maerwald: Somebody's gotta do it! |
2021-02-20 23:47:49 +0100 | ahaqi | (~ahaqi@194.35.233.73) |
2021-02-20 23:47:59 +0100 | <merijn> | maerwald: And you're certainly unreasonable enough to finish out of stubborness! |
2021-02-20 23:48:03 +0100 | <maerwald> | I can still blame my injury for not providing PRs |
2021-02-20 23:48:52 +0100 | maerwald | opens a beer |
2021-02-20 23:49:20 +0100 | jksafjkal | (56032b47@cpc68308-cdif16-2-0-cust838.5-1.cable.virginm.net) |
2021-02-20 23:49:39 +0100 | jedws | (~jedws@101.184.202.248) |
2021-02-20 23:49:46 +0100 | frozenErebus | (~frozenEre@94.128.219.166) (Ping timeout: 260 seconds) |
2021-02-20 23:52:31 +0100 | ahaqi | (~ahaqi@194.35.233.73) (Quit: Leaving) |
2021-02-20 23:55:03 +0100 | forgottenone | (~forgotten@176.42.28.68) (Quit: Konversation terminated!) |
2021-02-20 23:55:19 +0100 | <monochrom> | maerwald, how come --help is a useless piece of ****? Some examples? |
2021-02-20 23:55:39 +0100 | Tario | (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
2021-02-20 23:56:53 +0100 | alx741 | (~alx741@186.178.109.47) (Quit: alx741) |
2021-02-20 23:57:10 +0100 | <sclv> | one problem i can think of is that with v2 it tends to list all the flags and not just the command-relevant flags |
2021-02-20 23:57:27 +0100 | <sclv> | so there's just way too much in there, and its hard to find what you're looking for unless you already know what to grep for |
2021-02-20 23:57:34 +0100 | <dolio> | It also doesn't take terminal width into account. |
2021-02-20 23:57:39 +0100 | <sclv> | and there's flags for different commands that _look_ like they might work, but they don't |
2021-02-20 23:58:01 +0100 | <sclv> | dolio: but all my terminals are like 500 chars wide so i dont notice :-P |
2021-02-20 23:58:07 +0100 | <merijn> | sclv: It does only list command relevant flags |
2021-02-20 23:58:10 +0100 | <sclv> | also i habitually pipe help into less |
2021-02-20 23:58:17 +0100 | danvet | (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 272 seconds) |
2021-02-20 23:58:23 +0100 | <merijn> | sclv: But "cabal --help v2-build" and "cabal v2-build --help" are not considered the same |
2021-02-20 23:58:37 +0100 | <merijn> | Whether they should be is another discussion |
2021-02-20 23:58:50 +0100 | <monochrom> | That one I got used to and stopped questioning. |
2021-02-20 23:59:07 +0100 | <merijn> | dolio: Reliable and cross-platform terminal width querying is a cursed problem, though :p |
2021-02-20 23:59:19 +0100 | <sclv> | build --help iirc will still give flags that really build ignores and only work with configure iirc |
2021-02-20 23:59:54 +0100 | <dolio> | merijn: That doesn't sound like a good excuse. |
2021-02-20 23:59:55 +0100 | <monochrom> | I sometimes use less, sometimes don't but just take advantge that I set my terminal scroll buffer to be 10000 lines or something. |
2021-02-20 23:59:57 +0100 | ep1ctetus | (~epictetus@ip72-194-215-136.sb.sd.cox.net) (Ping timeout: 264 seconds) |
2021-02-20 23:59:59 +0100 | <merijn> | sclv: Could be, but hard to know for sure |