Hey everyone! Trying out this programming on stream thing!
Join me Sunday Apr. 19th at 8pm UTC for some #Haskell learning!
I'll be writing a text manipulation library based on lenses and optics from scratch! Tell your friends and RT, stay tuned for a link :big_smile:
Thank you guys for great discussion!
Next time we can maybe look into actual use of information in M1 and implement some more interesting examples @Lysxia you could maybe show us some of your work that uses Generics in real world libraries :slight_smile:
And maybe we can get @kcsongor to talk about generic-{optics, lens} too :big_smile:
Yes. The question I had was how to deal with recursive structures and metadata. When we are writing typeclasses, should we "pattern match" on a metadata layer alongside whatever case the instance is currently dealing with all at once, or should we have separate instances for metadata layers and "structure" layers?
It depends on usecase I guess - In that example we did, we didn't actually care about any of the meta information, so we did one "catch-all" case for M1. If we cared about all D1, C1, S1, we could match them all separately, doing specific things in their instances. Though often you may only care about one of them - then it may make sense to e.g. have overlappableM1 instance and specific instance for case we care about.
They server similar purpose, just using different representation AFAIK - syb has advantage of being part of core libraries, but we can look into uniplate instead if you want
Re uniplate: you might be interested in something I got working after getting help from some of the nice people here - generic-plate: https://gitlab.com/gilmi/generic-plate
This is pre-alpha quality though :)
Are you interested in having call today? Or maybe next weekend
I missed yesterday's call. But I'd be interested in this. I don't know much about Generics (aside from
deriving Generics
you add to your types :P ).@Sridhar Ratnakumar Cool! What time would work for you? (and for others of course)
I'm free now, and for next 8 hours maybe (with exception of cooking). Let me know a bit ahead.
This sounds like fun. I might join in. (Anytime of the day EST.)
Great - @Avi Dessauer, @Georgi Lyubenov // googleson78, @Hazem, what do you think?
I can join any time today, but I'm tuning in to Chris Penner's optics stream at 8 PM UTC
https://twitter.com/chrislpenner/status/1251587232869126144
Hey everyone! Trying out this programming on stream thing! Join me Sunday Apr. 19th at 8pm UTC for some #Haskell learning! I'll be writing a text manipulation library based on lenses and optics from scratch! Tell your friends and RT, stay tuned for a link :big_smile:
- Chris Penner (@chrislpenner)@Hazem I'll have to end before 8PM anyway - it's pretty late there in CEST
I guess I would propose 4PM UTC - what do you think?
1 hour from now?
Alright.
I joined. Saw someone speak before they left.
@Sridhar Ratnakumar We'll probably create new call here
Click to join video call
Very useful @TheMatten. I'm dropping now (heading out of home).
Thank you guys for great discussion!
Next time we can maybe look into actual use of information in
M1
and implement some more interesting examples@Lysxia you could maybe show us some of your work that uses
Generic
s in real world libraries :slight_smile:And maybe we can get @kcsongor to talk about
generic-{optics, lens}
too :big_smile:Sounds good!
Later, if anyone's interested, I guess we could look into
Data
andsyb
library for generic recursive transformations@Asad Saeeduddin You mentioned that you have some question that you would like to discuss on Zulip if I remember right
Yes. The question I had was how to deal with recursive structures and metadata. When we are writing typeclasses, should we "pattern match" on a metadata layer alongside whatever case the instance is currently dealing with all at once, or should we have separate instances for metadata layers and "structure" layers?
btw, do you have the code snippets you discussed in the presentation online somewhere for future reference?
It depends on usecase I guess - In that example we did, we didn't actually care about any of the meta information, so we did one "catch-all" case for
M1
. If we cared about allD1
,C1
,S1
, we could match them all separately, doing specific things in their instances. Though often you may only care about one of them - then it may make sense to e.g. haveoverlappable
M1
instance and specific instance for case we care about.(I'm currently annotating that example - will put link there once I finish it)
TheMatten said:
How does that relate to the
uniplate
library? cf. https://haskell.zettel.page/2014101.htmlThey server similar purpose, just using different representation AFAIK -
syb
has advantage of being part of core libraries, but we can look intouniplate
instead if you wantIs this a correct assessment?
Generic
for types of kindType
Generic1
for types of kindType -> Type
kind-generics
for arbitrary kindskind-generics should handle GADTs; meanwhile we have to workaround it using something like https://github.com/obsidiansystems/aeson-gadt-th
Right
What's preventing us from using kind-generics today?
Re uniplate: you might be interested in something I got working after getting help from some of the nice people here - generic-plate:
https://gitlab.com/gilmi/generic-plate
This is pre-alpha quality though :)
Edited code from call: https://gitlab.com/snippets/1967976
Hi people! Would same time work for you today? (4PM UTC)
I might be able to find time! :D
Is it now? Where is it?
ping @TheMatten
@Lysxia It's in half an hour :slight_smile:
Oooooh silly me. Thanks!
NP :slight_smile:
Click to join video call
Bump!
Link to
Blueprint
newtype
: https://gitlab.com/snippets/1912560Thank you guys for coming!