 All right, welcome to the admin of code stream in Haskell 2022 My name is Maddie I'm sure Most of you know me. I mean, please see me on Twitter or something. Anyway Otherwise, why would you be at the street? We're doing day four today day one was about Counting calories so the elves had enough snacks Day two was about a tournament rock paper scissor tournament and day three We were helping the elves pack their bags We're doing in Haskell Which is why I have this Haskell water bottle I Got this scent. Hey, I Didn't interview or I helped someone with their job interview process And they sent me this cool Haskell bottle, which I think is pretty amazing. Anyway Let's get to it day four All right camp cleanup. So yeah, I think it's a Sunday. It's a happy advent for those who celebrate I guess I So today I think You know, it's Sunday if we finish this fast Maybe we'll try and rewrite it up. You know Do it a bit more than just the bare minimum anyway, let's Let's see what happens All right, so the space needs to be cleared up for the last supplies can be unloaded from the ships and So sir, I'm sorry. Yes, I did the job of cleaning up second of the camp Every section has unique ID number in each office. I do these okay Now are some of their O's compare their sections assignments with each other. They know it says three of the assignments over that Try to find over size we just took an effort You know, let's pair up and make a big list of the section assignments for each pair Okay Within the first okay, so we have these input example section assignment pairs and Within the first pair of Ls first those I go for six six eight That was the second probably assigned in each to two sections Yeah Doesn't throw we just had three sections one guy five six and five six seven Okay Single digit section ID is okay. Ah Visually these pairs of Okay They draw it up Some of the pairs have noticed that one of their assignments Fully contains the other for example two to eight fully contains three to seven and six to six is fully contained by four six It pairs with one assignment fully contains the other one elf in the pair would be exclusively teaching sections of partner already be cleaning So these seem like the most in need of whose consideration In this example there are two such pairs And how many assignments pairs does one range fully contain the other okay? It seems like a Simple kind of ranges I want to say a Let's see I've opened the day for file here Let's create the Example input see you don't have to download files. You just paste them My clipboard is my download. All right So how are we gonna represent these ranges? I Equals as a pair of events Okay, and they Now read input is gonna take a file pad and it's gonna list or return a list of pairs of ranges And we're not gonna repeat the same message we say Say So this is gonna be read input equals a read file Okay God, we're gonna fmap lines over this and Now it's complaining that it goes from string to string, but it actually wants a Range to range so we need to fmap map Transform And now I haven't defined it so I'm actually gonna yeah, so and this transform function It's gonna be a string to range Where transform Form and this one takes in the string. We're gonna split it at the comma And actually these are all single digit ranges, so we actually know that the comma here is gonna be this So we are just going to brute forces, we're not gonna write a parser This is also like what I like about I don't know these tasks. I think yeah, you can make it super complicated, right? But you don't want that really just just do you know just make it easy on yourself, right? Okay, so we're gonna say transform This is gonna take in a Range one and then it's gonna be a dash character and then a range two Let's say x1 x2 And then there's gonna be a comma then there's gonna be a one one Dash and why two and then it's gonna be the empty list equals we're gonna say It's gonna be a pair of pairs So we're gonna say read take it to it We're gonna use this function import dig it to data dot char digit to it digit to int x1 I'm gonna do it this way a X I 1 X I 2 X Y I 1 Y I 3 where equals map digit to int is called being lazy X1 X 2 Y 1 Y 2 And then I don't have to write So many times Okay, I called this actually three All right now, let's say do You didn't put example Interpret you see oh day four day 4.HS and run it It compiles ah We get the ranges boom see Haskell is quite easy You just stay you don't have to use all the fancy type stuff, right? Just Do yourself a favor And keep it simple All right now we have a bunch of ranges Now for the first one we want to see one range contains the other Yeah, but so this is a good point but This example is uses single digits. Oh, okay. I thought everything was a single digit. Let me check Okay, we have double digits. Okay. Good point. Not him It's actually just these example list that you Okay, then we need to do we need to write the split add function split a And this is actually quite annoying. It's not in preload, right? But we want like a We so we want to like the classic split function like in Python, right? We just split up the character. It gives you a list, but it's not actually in the prelude It's in like data that extras the lists But we don't have it. Okay, so we're gonna say char and then we're gonna say ah, let's see you EQ a A List of a's into this place Split split on Empty equals empty split on x is okay. Let's just like this equals a Take while this is span So they will say a X axis of span X equals Okay, a of so this is a Where a Beginning and rest Equals a span of axis. Okay, so what is span here doc span So it takes like the so the it takes until it's equal to that character Right, okay, so Then we say a case Huh, yeah, okay, so we say here So we take until it's equal to x We say so this one is gonna be like that everything that's before and then this one's gonna be the R Okay, so the rest, okay Okay is R of so if R is empty We just return B Okay, if R is the character and then the rest We return B and appended to Split on X. This is like R prime right split on X R prime. I think this will work. And let's check. Hey, Oliver Okay, let's check. Let's check what happens. So so we're not gonna do here. We're gonna do a We are going to do Okay, so transform it's gonna take an less upper. So okay, so we're gonna do We're gonna import our favorite language extension language Applications, can I just write ghc 2021 year? Yes Because we're on ghc 9.2 or something So we actually have these things okay, and Ghc 2021 it's a new extension, but it just kind of enables a bunch of things that are actually you know kind of What everyone uses like type application. Okay So transform stir so stir this is like line Ellen line Okay Where so we're gonna have two things here. We're gonna have X and First elf E1 and E2 it's gonna be Split on split on comma and then a the rest so this is gonna be a er One you are to Yeah, this is super hard coded by the way uh e1 r1 e1 r2 uh e1 e e2 r1 e2 r2 equals map split on uh Let's just we don't actually need this one split on this over split on And comma of Ellen Okay, and then this is gonna be a e1 r e2 no e1 r2 to r1 e2 There is definitely a Break instead of span Break. Yeah, okay Actually, I I usually like to use span, but we actually want to do x not equals But there's a good point from Bambi capello. See this why we do it together Uh, let me see. There's a type of this Transform takes a string and returns a range. And what is it complaining about now? Ah What it's complaining about is that it's uh, it's not that's why we enable this readout int It wasn't an int. Okay It's probably might break actually. Ah It worked a I kind of want to write a function that takes a list of two things into a pair Let's just write that a L L2 to pair equals a to L2 to pair of a comma equals you Um And then we don't actually need all this We just say a We say a Now we map this to L2 to pair And then we say a L2 to pair L2 to pair Okay, and then we can remove this L and here just have right this one is a extremely un-total function L2 to pair equals return Error Not a list of two elements. Don't try this at home kids. And I mean you can try it, but This is like adamant to code or just hacking it out This is very hard coded. We should not do this in production, but We get to use a lot of like maps and maps and maps Which is fun. Okay a Yes Okay, we read the input we got a list of ranges. I'll try this in keep production kids. Yes It's a disclaimer It looks like it's product placement, but it's actually just a Haskell logo, right? And the You know the Haskell logo, we're doing it in Haskell. So we need to put to place the product It's a nice logo also. Um Okay, now we read the input Now we want to compare a contains A range range Move How do we contain a range? a The classic way is you kind of sort the ranges So you have like the smaller one You want it you want to have the Yeah, you want to figure out So, okay Contains r1 r1 r2 equals Okay, so gci. So if I sort, uh then Sort in a lot of list A sort okay, so if I have like one comma two And One comma one It sorts them like that. Okay, but if I have two comma one Uh two comma one One comma one, huh Maybe if they're equal it does like that. Let me see Okay, I think it just works for pairs. I feel like I remember that it was like Only sorting by one of them Hey Okay, anyway, this seems to work. How is the word? who go I want to see the odd instance for pairs Where are pairs defined a comma or a comma b? This is the one I'm looking for Let's go to base data dot tuple Huh Or no, let me see Yeah, the tuple. Okay. Yeah, I'm thinking of the functor instance This is something new our tuples are based on the solo Okay, how's the order define? It's derived Okay, a Hey houseator I'm just gonna cross that it works. Okay. I think I think it works I think it's sourced by the first one and then the second one Um And it looks like it does that right so if I do Yeah, I mean it looks like it does that so let's I let's just assume it. Let's a Yeah Oh elm is also nice. Elm used to have this cool a A Reactive programming thing right but then they like threw it out Which was as sad for the reactive programming community Okay Now we're gonna see so This is gonna be a p1 x1 comma x2 Y1 comma y2 we got a follow pr x s o Welcome Notification whenever I go online Not bad. Okay. Uh, we sort r1 comma r2 FRP was cool. I think it was cooler than and then it has some memory leaks Because for some instance you had like Uh Oh, hey PRX here I might pronounce the name right here x0. I don't even know Uh Okay, so We sort the two And now we have like the smaller is a So let's check it out If x1 is less than equal to y1 I think it's just like this. So if If x1 is less than Y1 Okay, and x and and Y1 is less than equal to y2 Then then they are contained Uh, but I want to see if it's entirely contained Okay, so Let's see a entirely contained fully contains like this. Let's write that not contains but like fully contains. Okay Contains He doesn't want the sort I need to import Sort ROC or rock Why don't you check out this or rock is like a language? No How sad or what are you talking about? a Okay, x1 is less than equal to y1 Okay, and no y1 is less than equal to y2 Yeah, I mean they're gonna be like it's a range of sections, right? So it's always Okay, so y1 is going to be less than y2 um and then Let's see y2 is less than equal to y x2 Then it's fully contained right We don't have to check like the Eh, I'll have to look at this rock thing Uh Yeah, so and then they're fully contained and we can do it this way because we sorted them first This is my this is what I think. Okay, um Now we have a pair of let's actually just do here Ah, no, I can just curry it. I never remember which is curry and which is uncurry. So uncurry Curry it takes up. Yeah Yeah So we actually we want to uncurry this function Okay so task one Task one is equal to task one takes a list of ranges and returns an inch Which is going to be how many assignments so we want to Here, okay task one equals filter uncurry Fully contains Eh, this is what I think it is. Okay, let me see task one We get two Oh, yeah Not that is actually That is actually true. I think it's always uncurry like when do you write a function that's like a pair to Okay, um We get the right answer for the example now, let's check out what we get for the input Do We need like curl. You can just go to web pages and copy paste I think that's the See this is like a thousand lines, but Boom copy paste I went find your last year this and looking for another thing. Oh Yeah, you should look at take a look at that To compare, um Okay Let's see Now let's read the input Input I'm too lazy for this This is why I like lazy functional programming. It's it speaks to me I don't feel like doing too much work. I don't feel like doing too much unnecessary work Which is why it's lazy, right? It only does what it has to Boom 386. I hope this is correct Oh No, it's too low. We screwed up All right, so how did we screw up? You guessed I said it was If you're stuck may use a blah blah blah blah Stop read it. Okay Huh, this is the first one. You haven't had it in the first try, but that makes it more interesting Okay, so I think this one is a bit what if I do like this or y1 less than equal to x1 and x2 less than equal to y2 I thought sorting took care of that, but Maybe not All right, we just forgot the other case But I really thought that so I guess the sorting here is just wrong Yeah, so we don't want to sort it I'm thinking like they I don't because I don't fully Because it's done via like deriving via See this is just the correct one like we didn't have to sort here Uh, it's done by deriving via so I You know, I don't know I can't look at the code and be like, oh, this is how the instance works Anyway, we fixed it. Okay. That was task one. Let's see. Well, part two is It seems like it's still quite a bit of double the work land I said the elves would like to know the number pairs that overlap at all While the remaining four pairs do overlap I think for task two we would want the Let's say overlap And this is going to be task two now for a the example this should be four And actually as people have been writing things like curry Yeah, we have cases exactly cases is good stuff And task two now this is going to be a called a overlap So here I want to say That this is actually quite dangerous I want to say that I want to say that this is this actually works For a No, okay. I don't know what the story. Okay. Let's just check for overlap. I don't care. Okay. I'm not being Okay, so when does a range overlap? That means that a y1 is less than x1 No, so why why one is? Yeah, so here I do sort Let's actually call this a R1 so r2. I don't I don't want to sort. I just wanted to call it twice equals a overlap prime r1 r2 or Or that prime r2 r1 Where overlap prime x1 y2 we did a lot of this so he was doing a Easy to check if they do not overlap That is true if a x If y1 is bigger than equal to yx2 a Then a that is true. Okay, let's say not overlap Is it gonna be a not overlap with prime not overlap prime Okay, and then we have an end here because of the morgan overlap prime x1 x2 y1 y2 and this is just gonna be Equals a y1 bigger than x2 right No x2. Yeah, I think it's like this. Let's see Uncurry not overlap filter not Oh, but then we get six I want to get four I'm just gonna check if they overlap. Okay. I don't I mean it's a good idea but I feel like I've got the other one more clearly in my mind Overlap Okay, so when do they overlap x1 x2 y1 y2 Okay, so they overlap if a x1 less than equal to y1 and y1 less than equal to x2 or a It's actually just like this. Yeah, so I did I did some the video game programming and We were doing these hitboxes And I actually always so now I'm trying to do it Without drawing it, but I always have to like Write the coordinate system write it down. What what is the case here? What is the case? And what is the case? Okay, so so here y1 Is in x1 But I filtered not How I get four okay good Yes, I'll say you can share it This is a channel for all languages But please consider haskell for your programming means it's actually a good language and You don't need a pht to programming. I was talking to the about this the other day. It's like I think haskell has a pr problem But and now everyone's doing like rust right Which is it's also hard to pick up like you have to know the memory model you have to remember borrowing And and I've seen a a room of phc students and professors try to write rust Uh and being very frustrated because they don't understand the messages They don't know you just want to write something and you have to borrow it to whatever And it's like an end sign. It was hard to do. Okay and Yeah, I think so I think haskell has this pr problem right where you're like Oh, you have to be so smart to write haskell, but no uh Just Like in the beginning don't use like the lens so don't use like these So haskell has this tendency of like the libraries will be very general So it'll be like hyper generalized and and what happens then is that You know, everyone's like, oh, you should use this library, right? Uh, I think use the libraries and uh Edible morning is coming. Well Edible moment Is my second biggest fan little and it is my biggest fan. She's not here today anyway, um Um So, you know, what I was just saying, yeah So like and then you try to use lens and it's like I cannot find the prism For this type, right? And you're like You know, I don't even know what's going on, right? And then you go look at the lens documentation and it's literally like these It's a bunch of boxes with lines between them and there's so many symbols and you're like What is going on here? Um, and I actually don't have any idea what's going on there Um And then people like, you know, they get into haskell They try to use haskell and they're like, oh use this library. You get this insane type error from servant or from Lens or something And then you're like, I can't do it, right? And then but the people who love those kinds of errors They're the ones to stay, right? And then they're the ones who write the libraries That cause those errors, right? So So there's like this selection bias So what I'm saying is Just write simple haskell stick with haskell 98 stick with like not too much complex stuff in the beginning And slowly work yourself up, right? You know, you know, you don't start writing java and go like, oh I'm gonna have this fully generic container class. That's like, you don't you don't do that when you're writing java Uh, when you're studying java, right? So just try to do the same in haskell. Okay, let's see I want to see 881 here Ah We got it Chat gbt explains rust errors Huh, but we got it. Um Yeah, I don't I don't understand rust errors. I mean, I should I mean, it's a good language. It's definitely a lot better than c And you know, c errors is just like, ah I'll just cast this type. I don't care. It seems like it's uh, it's you know, it's all memory. Anyway, right And then what happens is that You run the program and you just get segmentation for a core dump which is a lot worse than a long typer, right? So at least the long typer is kind of Trying to explain what you're doing Anyway, uh yeah, so that was my rant About haskell in the sense that Yeah, it's a pr problem, right? You don't need to be smart to write haskell You just need to be a bit patient with Because it really You know when something fails like it will give you the Like the actual type theoretic reason why it fails like could not unify true with false Or a skolam has escaped its scope Which is true But what is a skolam? right Have you guys heard of skolam the logician who did Skolamization of logic formulas? No I want to say that 95 percent of all programmers have not heard of skolams ah Maybe they did actually uh Maybe they did but you know you get my point like that's that was the The meta the current haskell meta right like oh, let's just tell them about skolams and you're like You know you usually only get the skolams, right? If you're trying to do something you shouldn't be doing right and that's what it's telling you it's like You know You're really trying to do A runtime types kind of right you're trying to Put the type of the thing You're trying to put the type of the value next to the value at runtime Which doesn't work because then you could look at the value of the type at runtime Uh, which means that the skolam has escaped its scope right type variable is around there after It shouldn't be but You know that's not really the problem here The problem is that I don't know what is I want to see what the messages are now right like what do you say? Don't do this. I don't know. That's also the thing like, you know, there is a problem the skolam escaped its scope You want to report that to the user But how do you explain that like how do you explain what they're doing wrong without? Yeah, invoking some logician anyway a Yeah Anyway, as you can see um This wasn't too hard. It's a bit tricky to get the range things correct And when I did this For video game programming back in the day. Yeah, you just have to write the diagrams. Otherwise you Screw it up. And this is the first time this year. I screwed up on the first attempt, right? But if you have to Because also, yeah, like here like we got the right answer for the example. Well, we got the wrong one for them Elm has Greatest error messages yeah And I haven't used elm for like seven years I think After they stopped the frp. I'm like, I don't know. I use peer script. I use well you can run uh Well not right now, but The patch just landed in ght where you can actually compile it to wasm And the web assembly and then you can just run that directly in the browser I think they're still working on the javascript ffi. So you can't really interact with it from javascript Uh, you can kind of uh Yeah, exactly not. I'm right. Uh It's a rigid type. Well, what does that mean? I know what it means but I you know, you shouldn't have to know that much to understand the uh error message Anyway But you know, this is what simon pj keeps talking about like, ah, we need to improve error messages We need to improve error messages and there's this nice, uh, well issue somewhere that's like, oh and we want to know the provenance it's called of constraint of a type variable so you can kind of uh If you would kind of pipe through the whole thing like Where did this originate? And then when it breaks you can kind of say, ah It didn't work and it came from here original, right? And that would be a lot better than kind of trying to thread it through everything like Oh, let's look at the nodems link See it's open People are trying to see type variable would escape its scope Yeah, it's not great, but uh Isenberg is on it. He is a legend. Um Yeah, exactly So anyway, we're working on it And it's also the You know, because I think that I think the mismatch with skull limbs is like You take the code it's transformed into something else And then It doesn't work, right? Let me try and let me try and explain this message Okay, just me just if you like we w a hasn't taken What is w a? wasn't Web assembly, uh I mean it hasn't taken up because you don't write it directly in the web But like I've seen crazy like unreal Like literally like that engine like the unreal engine demos Running in the browser all web assembly But I think the interop is missing a bit Okay, so What happens here? We have a so you're right. And so this one takes in a y in Okay Here's x minus the same types y has type a bound the type signature of yes, this is type a Okay, so Length x y so if we put y in a list with x right, so this has to be a list of a's Okay, uh, but this one takes in a b Right, uh Actually, yeah, and so this is what the information about a So this a here because it's being used with x it has to travel To the outside and to the like it has to this a has to match this type of this x here Uh, and that is not allowed, right? Which means like a scolding has escaped type variable that's bound in a context has to be Exported to the outer context and it it doesn't work Uh, I mean it's not allowed, right? Otherwise types would just bubble up Everywhere Anyway, a Yeah, so we did add a bit of code day for Um Thanks for tuning in we had a lot of people today. I we have got we got 12 years. I think we had a lot of viewers at some point Uh And we'll continue. Uh, I mean it's pretty easy so far, right? It's all about You know most of the work now like you know, this is the actual solution, right? It's three lines of code, right And this is like task Listen from the other one, right? Uh It's the same it's like two lines of code Day two Yeah It's like it's a couple of lines of code like day one. So what I'm seeing is Yes, this was like the solution to problem one problem. So Most of the work so far has gone into Just taking the input and kind of wrangling it wrangling it into the format that we need For it to run, right? So here we have like l2p, our reading post, play down This is a function that really should be in the preload because uh, I mean it's in the extra preload or something but like every other Language has this function just there for you to use whenever you want Uh I wish it was there. Anyway Yeah, we haven't written a parser yet. Maybe we'll do that tomorrow And uh So what I did last year, I really Wrote a lot of these text dot repeat instances, right? Let's see Google I at one point I looked at render dot And now my search is always so I'll show that Tags dot readp Exactly. So this is in base And this is actually You can get to a read instance from if you define a readp Uh, yeah read s and then Read read s is this a A String and so so if you want to define a read instance read What you have to do to define a read instance in Haskell is you have to define Uh This uh reads spec function Where uh Which is takes in a uh, yeah who goes sometimes slow down. Anyway It takes in a read int and a read s and this enters the president's operator And so if you just ignore that and you have a read s instance Which you can define By using this readp to s function and then you basically write this readp instance And it's just a It's a it's a very easy to write and then so what I've what I did last year I was kind of ah, let's write this parser this way and then you just do read add type and use the read instance to Get it in Do Uh, just then just drop the first car in the second of the tuple Yeah, I mean so that works also But uh what I want to do is I want to say I also want to have the end condition In the case, right Uh negate dot read. What is negate dot read? ah Oh my god. Yeah, okay Right, so you want to take that Read and then read it as an as a not minus number a yeah a Anyway, so I think next time I'll do a readp instance where we just say Uh, we are never a bunch of extensions and we can define a read instance for a type synonym Which uses the type synonym instances extension and then I could have just a read Ah like a range pair uh read add range pair and then Huh, maybe, you know, we have some time. Let's just do it now. Okay, so how do I Do that Let's see uh import text.combinators Uh, what does it call? text.parse combinators.readp.rex.combinators. We have also read the Parsec uh parser combinator data. I just scrolled down in this I scrolled down in this list Combinators, I'm gonna have to press tab SRP Okay, so uh our type synonym instances. So let's say instance read Range where And I was going to play a type synonym Ah, okay. Let's see if this I think it's in ght 2021. So reads pracc Equals uh underscore. I don't care about the equals read p2 S a Of a R inst Where rinsed equals Defined Now it complies again and it says Uh, lots of overlapping instances Wow So just do new type. I I think I should people do this right language Types synonym instances What is it complaining about? Uh overlapping instances, okay. Yeah, okay. Let's just uh, let's just say this a new type Okay, what am I doing wrong here? So I used to be able to do this What is the problem now? Overlapping instances see So, yeah Instance heads may use types in names This is exactly what we're writing, right like this, no? I write it right after the instance, maybe Okay, this is like an overlapping instances extensions overlapping instances has go Uh Yeah, okay. So I usually maybe I enable this but yeah, let's let's let's leave it there Okay, so overlapping read range. So we're trying to uh write a parser combinator Using this a okay So there's actually a monad. So we say do Uh And then we say a So we want to say A x is a bunch one Not that is digit and then y is a char No, and then we do char and you why satisfying the credit. Okay. So, okay, and then we did it and then we return x complaining that Oh Okay, and this is a complaint a Oh, right. And then we have to say Okay, so this is how we read a range and now type a elf pair equals type of range Okay, and we say instant in This is going to be overlapping rule overlapping score equals read p to s And Where e p in equals So this is gonna be a do uh So we get a string here and we're actually going to say a a e1 is a so we're gonna we're gonna take until We're gonna take until Parts is zero or more occurrences of P separated by sep sep by P sep parts is zero or more occurrences of P separated by sep Okay, so this is going to be e1 comma e2 Huh, okay genotem is informed About the current state of affairs. Huh, why didn't I have to do? Oh my god anyway sep by So we're gonna say here read e read s to p actually of e3 Yeah, so how do I use the? Read p instance a read s to p reads chart Okay, so this is going to be read s to p and we're just going to read it at zero and then chart No, yeah So this is what I think it should be, okay a This is read s to p and then we read sprack at the range zero We could have also just you know not hidden this and then this one becomes a pio health pair And this one becomes a read at health pair Ah, no bars Great, and let's try to see where it fails a print read at Okay, so it's the this one that fails. Ah At a comma here. Here we go. See And that's how easily you can write a parser in Haskell and this is well I'm not going to say this is production ready because you would probably use like parsec text Yeah, so I think parsec that's like an industrial That's actually an industrial well that's an industrial kind of parser combinator And it parses so fast, but you know, this is also like, you know, we could write a few lines and It would just work, right This time, you know, we wrote more lines now. We have a read instance Which is very nice, right because we can then just read anywhere, right? We don't have to do this wrangling all the time but Yeah, I don't know. Okay, but I like it better this way. You see, it's been more natural and I yeah, this overlapping thing is Yeah, because I used 8.10 for a while. Now I'm doing 9.4 So these small tiny changes that have been That have been going on. Um Yeah, I wish it was an easier way to use the read as instant instance Yeah, the best one would you be Not that I can do this maybe Push that president somewhere in there. Um, okay, so this is a way to do it with parsers, right? And I do remember Last year or the year before like when it got like the problem specification was you know an actual Data structure, right and it was not just a list of characters That would actually it would be a lot better to do So angular developer are you gonna host your solution online? Answer is yes, I am. Let me see its status I need to At least a I need to Uh, how do I do this in the GUI? Oh, yeah, I do like this. Yes, and then I I really wish there was a way to Get ignore executables The only thing I saw was like, oh, you can Take things that don't have an ending But that's not exactly right. No, is it? Okay, so this is all the stuff commit and push a Days A 2 2 4 And now this is also funny. I need to close this manually and then it pushes Huh, I need pushed now Can I do like this? I want to say open github Copy github handling. So I have this github extension Yeah It works Okay, so it's on a treat low slash aoc 22 And let me edit this twitch 1700 everything into christmas 1300 UTC weekend Okay, a yeah, so it's all here AOC treat low slash aoc 22 Uh, so if you want to check out the solutions yourselves You can go there, but you know so far they're like, they're not very long, right? So Yeah um All right I think that's it for today. We did it Well, we did it one way what we did the parsing twice And now we know to use the overlapping Pragma I think before I would just do overlapping instances and I wouldn't even do that like I would I would use the editor Right and we'd be like, oh you can't do this without overlapping instances and then you click the thing and it adds it Which is like, it's you know, it's the worst way to do it. Um, but Yeah It works And if you're a lazy functional programmer That's how you do it I think bill gates said You would rather uh, he would rather hire a lazy programmer or give a tough job to a lazy person Because they will find a way to automate it um Which is I think true um, anyway Thank you for today. See you all a So five o'clock utc that's six o'clock A central european time. It's like noon in the u.s The east coast right And it's like middle of the night in the west coast probably not going to be watching there, but maybe but anyway, thanks for today and uh Yeah, so join us tomorrow right and like keep up the discussion keep up the You know, if you have any comments about haskell about Other languages like rock and elm Keep it coming. Right. This is a forum for Not just for item.co, but also just languages, you know Because I think what a key thing about haskell is that it's it's it's different, right? We're thinking about things in a different way And very often for me We're thinking about it in a way that's more natural but We I have seen item.co challenges that are like extremely a they're extremely Extremely imperative, right? They will be like having I mean you basically have to model it as an array And you have to make a bunch of updates to the array And I think that's why I originally got into advent of code. It was this idea that I want to see how do you write imperative code in haskell, right? How do you take an imperative problem like this array and you can actually do it in a really nice way? by using like arrays and vectors and And kind of the state monotrack anyway, uh Angular developers asking about the discord. We don't have a discord server Maybe I should yeah a lot of discord server people can talk about these things Uh I'll check it out. Let me set it up before Next time and then you can do the bank discord and Anyway, uh, that's it for today. See you tomorrow Okay, bye