Logs: freenode/#haskell
| 2020-10-06 00:08:34 | → | GyroW_ joins (~GyroW@d54C03E98.access.telenet.be) |
| 2020-10-06 00:08:34 | × | GyroW_ quits (~GyroW@d54C03E98.access.telenet.be) (Changing host) |
| 2020-10-06 00:08:34 | → | GyroW_ joins (~GyroW@unaffiliated/gyrow) |
| 2020-10-06 00:08:45 | <dolio> | Actually, the identity function isn't even well-typed, I think. |
| 2020-10-06 00:09:08 | × | GyroW quits (~GyroW@unaffiliated/gyrow) (Ping timeout: 256 seconds) |
| 2020-10-06 00:09:09 | <dolio> | Because `A \par ¬A` doesn't make sense. A would have to be both positive and negative. |
| 2020-10-06 00:12:01 | × | martin02 quits (silas@hund.fs.lmu.de) (Ping timeout: 272 seconds) |
| 2020-10-06 00:13:49 | → | snakemasterflex joins (~snakemast@213.100.206.23) |
| 2020-10-06 00:14:58 | → | nbloomf joins (~nbloomf@2600:1700:83e0:1f40:71a4:5e3f:3433:7ae1) |
| 2020-10-06 00:18:25 | × | snakemasterflex quits (~snakemast@213.100.206.23) (Ping timeout: 240 seconds) |
| 2020-10-06 00:22:19 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 2020-10-06 00:22:45 | × | amiri quits (~amiri@cpe-76-91-154-9.socal.res.rr.com) (Read error: No route to host) |
| 2020-10-06 00:23:39 | × | acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 260 seconds) |
| 2020-10-06 00:23:56 | → | amiri joins (~amiri@cpe-76-91-154-9.socal.res.rr.com) |
| 2020-10-06 00:26:02 | × | tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Read error: Connection reset by peer) |
| 2020-10-06 00:26:39 | → | tromp joins (~tromp@dhcp-077-249-230-040.chello.nl) |
| 2020-10-06 00:31:44 | → | acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) |
| 2020-10-06 00:32:25 | <ski> | hm. reminds me of dinatural transformations |
| 2020-10-06 00:32:43 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-10-06 00:34:49 | × | alp quits (~alp@2a01:e0a:58b:4920:e03a:3413:fb91:53fc) (Ping timeout: 272 seconds) |
| 2020-10-06 00:35:24 | × | nineonine quits (~nineonine@216.81.48.202) (Remote host closed the connection) |
| 2020-10-06 00:37:45 | × | nbloomf quits (~nbloomf@2600:1700:83e0:1f40:71a4:5e3f:3433:7ae1) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2020-10-06 00:42:49 | × | polyrain quits (~polyrain@2001:8003:e501:6901:a41a:145a:3fce:c107) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2020-10-06 00:44:18 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 2020-10-06 00:47:07 | → | nbloomf joins (~nbloomf@2600:1700:83e0:1f40:71a4:5e3f:3433:7ae1) |
| 2020-10-06 00:47:45 | × | acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 240 seconds) |
| 2020-10-06 00:48:17 | → | nineonine joins (~nineonine@216-19-190-182.dyn.novuscom.net) |
| 2020-10-06 00:49:39 | × | zoom84 quits (44beb1c9@068-190-177-201.res.spectrum.com) (Ping timeout: 245 seconds) |
| 2020-10-06 00:49:55 | → | da39a3ee5e6b4b0d joins (~textual@n11211935170.netvigator.com) |
| 2020-10-06 00:51:41 | → | falafel joins (~falafel@2605:e000:1527:d491:99fe:5613:f0a7:56f0) |
| 2020-10-06 00:51:52 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 2020-10-06 00:51:55 | <Squarism> | Anyone got some idea on this. I want users of a library be able to create a type TheType that can consist of any composition of records/lists/maybe/either/tuple2. All "leafs" of this structure should be of type "forall a. Leafy a => Leaf a". I want to create a serializable/textual addressing by type "Path" so that I can do that I can implement : get :: forall a b. (Leafy a,THDerivedMagic b) => b -> Path -> Maybe (Leaf a). Or, as a will be lost, ge |
| 2020-10-06 00:51:55 | <Squarism> | (THDerivedMagic b) => b -> Path -> Maybe LeafProjection. |
| 2020-10-06 00:52:22 | → | LarryTheCow joins (~user@cpe-104-34-71-94.socal.res.rr.com) |
| 2020-10-06 00:53:04 | <Squarism> | a textual/serializable getter lens that rely on the fact all leafs carry the same parameterized type. |
| 2020-10-06 00:53:57 | <ski> | cut off after ".. Or, as a will be lost, ge" |
| 2020-10-06 00:54:40 | → | rob01 joins (~rob0@178.162.204.214) |
| 2020-10-06 00:54:51 | <Squarism> | where THDerivedMagic is an instance that TheType gets after compilation |
| 2020-10-06 00:55:24 | → | notzmv` joins (~user@179.246.218.173) |
| 2020-10-06 00:55:31 | <ski> | "all leafs carry the same parameterized type" -- hm, "All \"leafs\" of this structure should be of type \"forall a. Leafy a => Leaf a\"" sounded like you had something like `data TheType = ... | forall a. Leafy a => Leaf a', in which case not all leaves would have the same type |
| 2020-10-06 00:55:32 | <Squarism> | ski, it continued on next row there |
| 2020-10-06 00:55:52 | → | polyrain joins (~polyrain@2001:8003:e501:6901:a41a:145a:3fce:c107) |
| 2020-10-06 00:56:02 | <ski> | hm, so you're saying you wrote ".. Or, as a will be lost, ge(THDerivedMagic b) => b -> Path -> Maybe LeafProjection.", then ? nothing missing in the middle ? |
| 2020-10-06 00:56:34 | <Squarism> | oh ok. Man, I have a hard time explaining / figuring this out. |
| 2020-10-06 00:56:57 | notzmv` | is now known as zmv |
| 2020-10-06 00:57:01 | × | zmv quits (~user@179.246.218.173) (Changing host) |
| 2020-10-06 00:57:01 | → | zmv joins (~user@unaffiliated/zmv) |
| 2020-10-06 00:57:15 | <Squarism> | ski, get :: (THDerivedMagic b) => b -> Path -> Maybe LeafProjection |
| 2020-10-06 00:57:18 | × | notzmv quits (~user@unaffiliated/zmv) (Ping timeout: 256 seconds) |
| 2020-10-06 00:57:26 | zmv | is now known as notzmv |
| 2020-10-06 00:57:36 | → | plutoniix joins (~q@175.176.222.7) |
| 2020-10-06 00:58:33 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-10-06 00:58:48 | <ski> | first, i was thinking you might want something like `data TheType = FromList [TheType] | FromMaybe (Maybe TheType) | FromEither (Either TheType TheType) | FromPair (TheType,TheType) | forall a. Leafy a => Leaf a' (not sure what to do with records) .. but then the `THDerivedMagic b => ..b..' part seemed to suggest you wanted to reflect the actual structure of the nested types, in the Haskell type `b' (rather |
| 2020-10-06 00:58:54 | <ski> | than using a single "universe" type `TheType') |
| 2020-10-06 00:58:56 | <ski> | Squarism : ty |
| 2020-10-06 00:59:19 | <ski> | i dunno what `LeafProjection' is for |
| 2020-10-06 00:59:52 | <Squarism> | I guess I'm trying to provide half of the solution wo knowing if its a good idea or not. |
| 2020-10-06 01:01:06 | <Squarism> | Important parts are really. Let users define a type using above mentioned constructs. Be able to address leafs of that structure using textual paths/addresses. |
| 2020-10-06 01:01:07 | <ski> | i'm not sure what `Leafy' includes .. nor what `THDerivedMagic' would provide |
| 2020-10-06 01:01:25 | <Squarism> | neither do I really. |
| 2020-10-06 01:02:04 | <Squarism> | But previous message formalizes the basic requirement. |
| 2020-10-06 01:02:10 | <ski> | why do you want users to express themselves using exactly those particular type constructions, when interfacing with your library ? |
| 2020-10-06 01:02:32 | <ski> | do you intend to serialize values of types constructed in such a way ? |
| 2020-10-06 01:03:21 | <ski> | what if the user would like to use some other type, e.g. maybe `NonEmpty' or `Map' or `Queue' ? |
| 2020-10-06 01:03:32 | <Squarism> | I want them to freely define a process as basic data structure. |
| 2020-10-06 01:03:39 | <Squarism> | that is TheType |
| 2020-10-06 01:03:49 | <ski> | i don't understand what you mean by that |
| 2020-10-06 01:04:15 | × | aarvar quits (~foewfoiew@50.35.43.33) (Ping timeout: 260 seconds) |
| 2020-10-06 01:04:55 | × | falafel quits (~falafel@2605:e000:1527:d491:99fe:5613:f0a7:56f0) (Ping timeout: 240 seconds) |
| 2020-10-06 01:06:13 | × | xsperry quits (~as@unaffiliated/xsperry) (Ping timeout: 264 seconds) |
| 2020-10-06 01:06:18 | <ski> | for the `TheType' i mentioned, i guess you could have `data Path = Here | ToIndex Int Path | InJust Path | InLeft Path | InRight Path | InFst Path | InSnd Path' |
| 2020-10-06 01:06:58 | <ski> | (not sure to which extent that type would make sense, for what you're trying to do) |
| 2020-10-06 01:07:54 | → | dansho joins (~dansho@ip68-108-167-185.lv.lv.cox.net) |
| 2020-10-06 01:08:15 | <ski> | oh .. and i suspect that instead of `get :: forall a b. (Leafy a,THDerivedMagic b) => b -> Path -> Maybe (Leaf a)', you may have intended something like `get :: forall b. THDerivedMagic b => b -> Path -> Maybe (exists a. Leafy *> a)' .. |
| 2020-10-06 01:08:32 | <ski> | .. perhaps `exists a. Leafy *> a' is what you meant by `LeafProjection' ? |
| 2020-10-06 01:08:40 | <Squarism> | Lets call the Leaf a type Step a. So users could define data TheType = TheType { s1 :: Step S1, s2 :: Maybe (Step S2, Maybe (Step S3)) } . Which would be a very simple process. Easy to serializa and pattern match |
| 2020-10-06 01:09:25 | × | ericsagnes quits (~ericsagne@2405:6580:0:5100:a920:8792:1be2:949f) (Ping timeout: 240 seconds) |
| 2020-10-06 01:09:30 | <Squarism> | so basically i just want to great serializable addressing of Step's in this structure. |
| 2020-10-06 01:09:44 | <ski> | another thing one could imagine (with `Path' a GADT) would be `get :: forall a b. THDerivedMagic b => b -> Path b a -> Maybe b' (dunno if you'd want a `Leafy b' somewhere in there) |
| 2020-10-06 01:10:06 | → | xerox_ joins (~xerox@unaffiliated/xerox) |
| 2020-10-06 01:10:09 | <ski> | er, sorry, that should be : `get :: forall a b. THDerivedMagic b => b -> Path b a -> Maybe a' (dunno if you'd want a `Leafy a' somewhere in there) |
| 2020-10-06 01:10:53 | <ski> | Squarism : wait a moment. is `TheType' something the library defines, or something a user of the library would define ? |
| 2020-10-06 01:11:15 | <Squarism> | Something the that the user defines |
| 2020-10-06 01:11:44 | <L29Ah> | https://github.com/kowainik/learn4haskell lol |
| 2020-10-06 01:11:45 | <Squarism> | Basically I want to a simple textual lens library. |
| 2020-10-06 01:11:58 | → | abhixec joins (~abhixec@c-67-169-141-95.hsd1.ca.comcast.net) |
| 2020-10-06 01:12:10 | <ski> | (also, i thought `Leaf' was to be a data constructor, not a type constructor. if it was meant as a type constructor, then i doubt that you really meant `forall a. Leafy a => Leaf a' before. perhaps rather `exists a. Leafy a *> Leaf a') |
| 2020-10-06 01:12:11 | × | ystael quits (~ystael@209.6.50.55) (Ping timeout: 240 seconds) |
| 2020-10-06 01:12:44 | <Squarism> | ski, okok |
| 2020-10-06 01:13:33 | <ski> | i don't understand what `Step' is for |
| 2020-10-06 01:13:47 | <ski> | what is `S1',`S2',`S3' ? |
| 2020-10-06 01:13:49 | <Squarism> | its the same as "Leaf a" |
| 2020-10-06 01:14:11 | <ski> | yes, but i don't understand what `Leaf' is for, either, if it's a type constructor |
| 2020-10-06 01:14:14 | <Squarism> | S1-3 are parameters to "Step a" |
| 2020-10-06 01:14:24 | <Squarism> | its a type and and constructor |
| 2020-10-06 01:14:27 | <ski> | yes, but what purpose does `Step' have ? |
| 2020-10-06 01:14:37 | <ski> | which is a type and a constructor ? |
| 2020-10-06 01:15:28 | <Squarism> | A requirement on "TheType" (verified by TH presumebly) is that all leafs of the datastructure are of that type. |
| 2020-10-06 01:16:00 | <ski> | also, you didn't answer whether the library or the user would define `TheType' |
| 2020-10-06 01:16:16 | <Squarism> | I use Leaf/Step interchangeably (sorry for that). Same thing |
All times are in UTC.