Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 450 451 452 453 454 455 456 457 458 459 460 .. 5022
502,152 events total
2020-10-06 01:16:18 <ski> oh. actually, i'm sorry. you did
2020-10-06 01:16:24 <Squarism> so data Step
2020-10-06 01:16:33 <ski> (i think i got confused by the other link, at the time)
2020-10-06 01:16:36 <Squarism> data Step a = Step a
2020-10-06 01:16:53 <ski> that looks fairly useless, to me
2020-10-06 01:17:06 <Squarism> which part?
2020-10-06 01:17:15 <ski> the whole `data' type declaration
2020-10-06 01:17:23 <ski> it's basically just `Identity'
2020-10-06 01:17:29 xsperry joins (~as@unaffiliated/xsperry)
2020-10-06 01:17:32 <ski> why use `Step S1' instead of just `S1' directly ?
2020-10-06 01:17:49 GyroW joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-06 01:17:49 × GyroW quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-06 01:17:49 GyroW joins (~GyroW@unaffiliated/gyrow)
2020-10-06 01:18:00 × GyroW_ quits (~GyroW@unaffiliated/gyrow) (Ping timeout: 272 seconds)
2020-10-06 01:18:06 <Squarism> yeah, But I leave out other information as its not important for the task at hand "Step a" will contain other info too
2020-10-06 01:18:16 <ski> ok
2020-10-06 01:19:06 <ski> so, the user defines some `TheType' data type, and makes it (maybe using TH), an instance of some type class (perhaps `THDerivedMagic')
2020-10-06 01:19:31 <ski> is that correct ?
2020-10-06 01:19:36 <Squarism> correct.
2020-10-06 01:19:40 <Squarism> BUT
2020-10-06 01:20:02 ystael joins (~ystael@209.6.50.55)
2020-10-06 01:20:35 <Squarism> What THDerivedMagic contains I really have to clear idea of yet. I see it will be needed at some point to collect the "analysis" of TheType.
2020-10-06 01:20:41 <ski> if `TheType' derives `Generic', i think you could use that to inspect how `TheType' was constructed, so that you can do different things, in e.g. an instance of `THDerivedMagic', depending on whether you see a record, a list, a `Maybe', a pair, an `Either'
2020-10-06 01:21:14 Saukk joins (~Saukk@2001:998:f1:3963:1c59:9bb5:b94c:2)
2020-10-06 01:21:44 <ski> i think looking into docs for `Generic' (or `Data' ?) could possibly be useful, for what(ever) you're actually trying to do
2020-10-06 01:22:21 <Squarism> So the gist of this is. Give basic lens functionality to some type (TheType - defined by user). First milestone, create a getter on TheType (automatically) that answers "Maybe (StepProjection)"
2020-10-06 01:22:22 ericsagnes joins (~ericsagne@2405:6580:0:5100:11f9:52f9:c5f:a031)
2020-10-06 01:22:51 <Squarism> and by "lens" I mean textual/serializable addresses as opposed to real lenses.
2020-10-06 01:23:15 <Squarism> ski, ok, ill read up on Generic
2020-10-06 01:23:55 × fraktor quits (~walt@129.93.191.18) (Ping timeout: 240 seconds)
2020-10-06 01:26:00 <ski> <https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#generic-programming>,<https://downloads.haskell.org/~ghc/latest/docs/html/libraries/base-4.14.0.0/GHC-Generics.html>
2020-10-06 01:26:08 <ski> Squarism ^
2020-10-06 01:26:10 fraktor joins (~walt@129.93.191.18)
2020-10-06 01:26:42 totallynotnate joins (~nate@125.160.143.17)
2020-10-06 01:26:52 <Squarism> ski, thanks. I stumbled upon that class before and see you can have a point there. I need to refresh my memory
2020-10-06 01:27:23 <ski> i'm not totally sure whether you can do what you want to do with this. but it sounds like it could possibly be relevant
2020-10-06 01:27:37 × totallynotnate quits (~nate@125.160.143.17) (Client Quit)
2020-10-06 01:27:56 <Squarism> ski, thanks for helping me process this. Really appreciated.
2020-10-06 01:28:03 × cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 260 seconds)
2020-10-06 01:28:18 <ski> Squarism : anyway, what's `StepProjection' for ?
2020-10-06 01:29:29 mirrorbird joins (~psutcliff@2a00:801:2d5:9d73:ff00:6553:d451:a276)
2020-10-06 01:30:23 <Squarism> ski, results of the getter need to be sent over the wire. Then "a" of Step a will be out of scope. So need to make a type independent type (?) =D
2020-10-06 01:30:41 <Squarism> "a" of "Step a"
2020-10-06 01:31:58 <ski> "will be out of scope" -- out of which scope ?
2020-10-06 01:32:46 <ski> could `StepProjection' be something like `exists a. (Leafy a,Typeable a) *> a' ?
2020-10-06 01:34:00 × taurux quits (~taurux@net-93-146-149-217.cust.vodafonedsl.it) (Ping timeout: 244 seconds)
2020-10-06 01:34:39 taurux joins (~taurux@net-188-152-143-169.cust.dsl.teletu.it)
2020-10-06 01:37:54 cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net)
2020-10-06 01:40:59 × Lowl3v3l quits (~Lowl3v3l@dslb-090-186-188-115.090.186.pools.vodafone-ip.de) (Ping timeout: 240 seconds)
2020-10-06 01:41:41 <Squarism> ski, imagine some "REST Controller" delegating the "get" application on TheType".
2020-10-06 01:42:05 <Squarism> ...that will work for all implementations of TheType
2020-10-06 01:42:18 <Squarism> or should i say definitions
2020-10-06 01:43:18 × ddellacosta quits (~dd@86.106.121.168) (Ping timeout: 244 seconds)
2020-10-06 01:44:24 <Squarism> ski, " could `StepProjection' be something like `exists a. (Leafy a,Typeable a) *> a' ?" ... I really dont know. Wouldnt "a" need to be in function scope for such applications?
2020-10-06 01:44:29 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 256 seconds)
2020-10-06 01:44:41 jedws joins (~jedws@121.209.186.103)
2020-10-06 01:47:15 <ski> by `StepProjection' encoding `exists a. (Leafy a,Typeable a) *> a' i mean something like `data StepProjection = forall a. (Leafy a,Typeable a) => MkStepProjection a', or the equivalent (using `GADTSyntax') `data StepProjection where MkStepProjection :: (Leafy a,Typeable a) => a -> StepProjection'
2020-10-06 01:48:03 <ski> (i dunno what you mean by "Wouldnt \"a\" need to be in function scope for such applications?" -- what is "function scope" ? are you thinking of any particular function (`get' ?) ?)
2020-10-06 01:48:28 × ryansmccoy quits (~ryansmcco@156.96.151.132) (Ping timeout: 244 seconds)
2020-10-06 01:48:48 × shatriff quits (~vitaliish@217.27.153.240) (Remote host closed the connection)
2020-10-06 01:49:05 ryansmccoy joins (~ryansmcco@193.37.254.27)
2020-10-06 01:49:06 shatriff joins (~vitaliish@217.27.153.240)
2020-10-06 01:49:21 albert_91 joins (~Albert@p200300e5ff0b5b4248a33bded2872db1.dip0.t-ipconnect.de)
2020-10-06 01:49:36 × shatriff quits (~vitaliish@217.27.153.240) (Remote host closed the connection)
2020-10-06 01:49:55 shatriff joins (~vitaliish@217.27.153.240)
2020-10-06 01:50:25 × shatriff quits (~vitaliish@217.27.153.240) (Remote host closed the connection)
2020-10-06 01:50:43 shatriff joins (~vitaliish@217.27.153.240)
2020-10-06 01:51:10 <ski> (an alternative encoding of `exists a. (Leafy a,Typeable a) *> a' is `forall o. (forall a. (Leafy a,Typeable a) => a -> o) -> o'. this is CPS (Continuation-Passing Style), where you pass your main result to a callback (a continuation). like `withCString :: String -> (CString -> IO a) -> IO a' or `withStep :: StepProjection -> (forall a. (Leafy a,Typeable a) => a -> o) -> o')
2020-10-06 01:51:11 × shatriff quits (~vitaliish@217.27.153.240) (Remote host closed the connection)
2020-10-06 01:51:31 shatriff joins (~vitaliish@217.27.153.240)
2020-10-06 01:51:57 × shatriff quits (~vitaliish@217.27.153.240) (Remote host closed the connection)
2020-10-06 01:52:01 × argent0 quits (~argent0@168.227.97.5) (Quit: leaving)
2020-10-06 01:52:02 <ski> (or, i suppose, `get :: forall b. THDerivedMagic b => b -> Path -> (forall a. (Leafy a,Typeable a) => a -> o) -> o', directly)
2020-10-06 01:53:08 <Squarism> ski, yeah "get". If I had say `myRestEndpoint :: Path -> SomeSerializableStep ; myRestEndpoint p = let r = get theTypeInstance in convertToSomeSerializableStep r` wouldnt it complain about not knowing what "a" is. "Not bound"
2020-10-06 01:53:54 <Squarism> (oh forgot to pass p to get ^)
2020-10-06 01:54:26 <ski> (better to say `theTypeValue', since "instance" means something else, in Haskell)
2020-10-06 01:54:37 × albert_91 quits (~Albert@p200300e5ff0b5b4248a33bded2872db1.dip0.t-ipconnect.de) (Ping timeout: 272 seconds)
2020-10-06 01:54:49 <ski> Squarism : what's the intended type of `convertToSomeSerializableStep', here ?
2020-10-06 01:55:22 <ski> convertToSomeSerializableStep :: Leafy a => a -> SomeSerializableStep -- ?
2020-10-06 01:55:28 thir joins (~thir@p200300f27f0fc60038c1b16891cbfa03.dip0.t-ipconnect.de)
2020-10-06 01:55:49 Lowl3v3l joins (~Lowl3v3l@dslb-002-203-195-108.002.203.pools.vodafone-ip.de)
2020-10-06 01:55:57 <Squarism> not that important. Something that could contain the important informaiton `forall a. Step a`
2020-10-06 01:56:14 <ski> myRestEndpoint p = get theTypeValue p convertToSomeSerializableStep -- in that case. using the CPS version of `get'
2020-10-06 01:57:15 × Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 244 seconds)
2020-10-06 01:57:30 × nbloomf quits (~nbloomf@2600:1700:83e0:1f40:71a4:5e3f:3433:7ae1) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-06 01:59:25 × thir quits (~thir@p200300f27f0fc60038c1b16891cbfa03.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2020-10-06 01:59:57 zacts joins (~zacts@dragora/developer/zacts)
2020-10-06 02:00:03 × abhixec quits (~abhixec@c-67-169-141-95.hsd1.ca.comcast.net) (Read error: Connection reset by peer)
2020-10-06 02:01:58 snakemasterflex joins (~snakemast@213.100.206.23)
2020-10-06 02:06:47 × snakemasterflex quits (~snakemast@213.100.206.23) (Ping timeout: 260 seconds)
2020-10-06 02:07:41 × GyroW quits (~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-06 02:08:00 GyroW joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-06 02:08:00 × GyroW quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-06 02:08:00 GyroW joins (~GyroW@unaffiliated/gyrow)
2020-10-06 02:10:10 slack1256 joins (~slack1256@181.203.50.26)
2020-10-06 02:11:49 mathlover2 joins (~mathlover@2604:6000:1013:129e:755e:eccf:8735:da37)
2020-10-06 02:12:11 zebrag joins (~inkbottle@aaubervilliers-654-1-95-218.w86-212.abo.wanadoo.fr)
2020-10-06 02:12:49 × inkbottle quits (~inkbottle@aaubervilliers-654-1-101-245.w86-212.abo.wanadoo.fr) (Ping timeout: 264 seconds)
2020-10-06 02:16:49 × urodna quits (~urodna@unaffiliated/urodna) (Quit: urodna)
2020-10-06 02:18:58 × Wuzzy quits (~Wuzzy@p5790e6f5.dip0.t-ipconnect.de) (Remote host closed the connection)

All times are in UTC.