13:15:55 From Albert Sjölund : I need a lab partner for EDAN40 - english or swedish works great :) 13:16:20 From Hannes : We could work together 13:16:25 From Hannes : I also need a partner for EDAN40 13:16:29 From Alexander Magnusson : Jag behöver också labbpartner för edaf95 13:16:48 From Simon Erlandsson : @Alexander Magnusson, vill du köra? 13:17:00 From Alexander Magnusson : Jadå simpa 13:17:23 From Lavender : @Jacek I applied for EDAN40 by sending an email to Expeditionen (as you claimed). I have not received any reply (yet). Is it normal? 13:18:09 From Miro : Should we not use the EDAF95 page? Should everyone use the EDAN40-page? 13:19:11 From Miro : Oh I see both pages are active 13:19:22 From Rasmus Rose Gordon : Has the SAM page been created yet? 13:19:24 From PAULA ROTH : I'm also looking for a lab partner for EDAN40. 13:19:33 From Miro : great! :) thanks 13:19:44 From Michaela Bergman : I'm also looking for a lab partner in EDAN40 13:20:59 From Quanwei Li : Jag behöver också labbpartner, men jag har inte bestämt vilken kurs jag ska ta, det är sååååååå svårt för mig att bestämma : ( 13:21:03 From Elias : highly recommend http://learnyouahaskell.com/chapters 13:22:23 From Johannes Larsson : I'm also looking for a partner for EDAN40! 13:22:25 From PAULA ROTH : @Michaela Want to do the labs with me? :) 13:22:59 From Simon Erlandsson : When will the labs be available? According to TimeEdit we have a lab next week? 13:23:01 From Christoffer Svenningsson : There are no labs in EDAN40? Right? Wasnt that what he said on Monday? 13:23:12 From Christoffer Svenningsson : Sorry if im confusing anyone, but i Think so 13:23:21 From Miro : Are they inlämnignsuppgifter instead? 13:23:24 From Hugo Mattsson : Edan40 is only assignments 13:23:36 From PAULA ROTH : I think you might be correct, my bad. I meant assignments :P 13:24:49 From Felix Ghosh : ­­­­­­­­­­­­­­­­­­­­­­­­­­­äääääääääääääääääääääääää 13:26:04 From Anujan : Jacek, are there any Changes to the re-exam on the 16th of April?? 13:26:34 From Anujan : Will there be a digital examination or? 13:27:20 From Miro : When will the Programming Assignments be available for EDAF95? :) At the moment there's nothing on the homepage. 13:27:20 From astridekman To Jacek Malec(privately) : Hi, I’m taking EDAN40. Am I allowed to work individually on the assignments? 13:27:54 From Hannes : ^same question but for EDAN40 13:31:39 From Elias : 2 `(+)` 3 is the same then? 13:31:45 From Lavender : what's det diff between + and (+) ? 13:32:01 From Lavender : the* 13:32:07 From Elias : @Lavender, + is operator, (+) is function I Think if I got it right 13:32:14 From Simon Löwgren : Yup ^ 13:32:28 From Lavender : Then what is 'add1' ? 13:32:38 From Simon Löwgren : So when a function takes another function as an argument, you have to type (function) 13:32:39 From Elias : new name for (+) basically 13:33:06 From Elias : That's why i Think 2 `(+)` 3 is the same, not sure though 13:33:06 From Alexander : @Simon what happens otherwise? 13:33:16 From Simon Löwgren : Error 13:33:21 From Alexander : :( 13:33:38 From Lavender : So it's not like Clojure (f a b) ? 13:36:31 From Simon Löwgren : An example btw: 'map' applies a function (first argument) to all elements in an Array (second argument) 13:36:43 From Simon Löwgren : map (2+) [1,2,3] gives [3,4,5] 13:36:58 From Simon Löwgren : map 2+ [1,2,3] gives an error 13:38:07 From Lavender : How to write 5 + 3 with this notion? ((+ 3) 5) ? 13:38:28 From Christian : (+) 5 3 13:38:47 From Hannes : ((+3) 5) also works 13:38:48 From Simon Löwgren : both work ofc 13:38:53 From Lavender : but (+) can take argument apparently 13:39:02 From Simon Löwgren : but maybe 5 + 3 is more elegant ;) 13:39:04 From Lavender : like (+1) 13:39:39 From Elias : 1+ vs +1? 13:41:45 From Lavender : Why is not (+1).(*2) ? 13:42:15 From Rasmus Rose Gordon : What's the . fo? 13:42:20 From Hannes : Gives same answer ( I think), since multiplication is commutative 13:42:20 From Rasmus Rose Gordon : *for 13:42:24 From sanctified : @lavender thats equivalent 13:42:39 From Miro : How woud you call doublePlusOne? Would it look like this: doubleplusOne 3 ? And it would give (3*2)+1 = 7 13:42:41 From sanctified : @rasmus equivalent to "boll" in math 13:43:01 From Gabriel Borglund : @Miro you are right 13:43:08 From Simon Löwgren : Google haskell dot operator 13:43:13 From Miro : Awesome thanks! 13:43:15 From Simon Löwgren : Function composition 13:43:35 From Kasper Dejke : Is there a difference between (*2) and (2*) 13:43:46 From sanctified : @kasper not for multiplication 13:43:53 From Lavender : so (*2).(+1) is instead (x + 1) * 2 ? 13:44:04 From sanctified : but (/2) is not equivalent to (2/) 13:45:03 From Hugo Mattsson : @Lavender correct 13:45:08 From Miro : an incAll call could look like incAll [1,3,5] and would give [2,4,6]? Just double checking 13:45:18 From Hugo Mattsson : jupp 13:45:24 From Miro : ok nice! 13:45:45 From Lavender : is the "\" part of map-notation? 13:46:07 From Hugo Mattsson : its a lambda expression 13:46:30 From William Karlsson : Unless I missed something (*2) seems invalid :S 2*x is valid so 2* creates a partially function where you can pass the second argument * 2 x isn't valid because * isn't a prefix operator by default (*) 2 x should be valid, so wouldn't you need ((*) 2)?? 13:46:32 From Hugo Mattsson : map takes a function and a list to apply the function two 13:46:39 From Hugo Mattsson : too* 13:46:56 From Lavender : How is it without te lambda expression, i.e. without the "\" ? 13:46:57 From Gabriel Borglund : (*2) 3 13:46:59 From Gabriel Borglund : is valid 13:47:04 From Gabriel Borglund : it would give 6 13:47:11 From William Karlsson : whack but thanks 13:47:15 From Hannes : Both (# *) and (* #) gives a function 13:48:10 From Karl Hallsby : @Lavender, you would need to pass a named function to map then. inc x = x+1 map inc [...] 13:48:21 From Hugo Mattsson : map (+1) [1,2,3] => [2,3,4] 13:49:10 From Lavender : thanks! 13:49:23 From Lavender : Haskell should seriously be used for encryption 13:49:38 From Miro : In the slide was the function "count" being defined for different input-data? 13:50:54 From Simon Löwgren : It was defined for the base cases 1, 2 and then one Catch-all 13:51:23 From Miro : ok, then I understand. thanks :) Haskell is like an alien language to me! 13:52:30 From Simon Löwgren : It's also why we have to define the base cases first in the function, since they are caught before we go to the Catch-all 13:53:04 From Alexander : what happens if we don’t have default case and it falls through all the cases? 13:53:09 From Lavender : I can understand sq (Square) or inc (Increment) taking one argument, but + or * taking one arg does not make sense 13:53:28 From William Karlsson : It becomes a partially applied function 13:53:37 From Rasmus Rose Gordon : It's not taking just 1, but rather being half applied 13:53:43 From Gabriel Borglund : @Lavender (*2) actually returns a new function that takes one argument 13:53:45 From Rasmus Rose Gordon : And the last argument get's applied later 13:53:58 From Simon Löwgren : It gives an error 13:54:18 From Simon Löwgren : Since the function can't respond to anything but the defined cases 13:54:25 From Alexander : ok:) 13:54:37 From Alexander Magnusson : if you have f(x,y)=x+y and fix x=1, you get f(1,y)=1+y 13:55:03 From Lavender : So basically you always have to write "half-applied" functions two times in a row? 13:57:58 From Rasmus Rose Gordon : And you can stack multiple .? Like (f.g.h) x = f (g ( h x))? 13:58:30 From Simon Löwgren : as long as they have compatible types I think 13:59:05 From sanctified : It would have been helpful if you wrote out what a, b, and c are 13:59:21 From Lavender : input and output 13:59:30 From Rasmus Rose Gordon : Perhaps a color code to value vs Function 13:59:45 From Karl Hallsby : a, b, and c are all Type Variables. They can be Integers, Functions, Characters, Ints, Number, etc. 14:00:18 From Rasmus Rose Gordon : ah, ok 14:17:34 From PAULA ROTH : Some (most?) courses allow one to register after this week up until the first deadline. But to be on the safe side, try to do it this week or the beginning of next 14:17:51 From Victor Winkelmann : are the tuples immutable? 14:17:59 From Quanwei Li : ok 14:21:29 From oneil : tuples are immutable 14:21:43 From karek : Basically everything is immutable in Haskell, right? 14:22:51 From Christian : Not arrys? 14:22:51 From PAULA ROTH : Yes, exept special datatypes. 14:23:02 From PAULA ROTH : There are both mutable and immutable arrays in haskell 14:24:13 From PAULA ROTH : Looking at the type signature is a good way to determine if it's immutable or not. if IO is mentioned it's likely mutable 14:24:50 From Miro : in Haskell is the word "length" already taken? I see in the slides he calls the functions ward-Number- like length1. Or is it a naming convention? 14:25:12 From Miro : "word-Number-" I mean 14:25:42 From PAULA ROTH : length is already taken. 14:25:51 From Miro : got it, thanks 14:25:58 From Leo Westerberg : Dooriiimmee 14:26:48 From Elias : AMENO 14:26:54 From sanctified : If we wanted to zip it so the element was before the index, is that possible with partial application 14:27:06 From sanctified : ?? 14:27:56 From Alexander : I remember there was a swap function in the last lecture 14:30:02 From karek : You can use the flip function. "flip zip [1..]" does what you want sanctified, I think 14:30:48 From Filip : Maybe `zip` [1..] 14:31:17 From Miro : could you define ones2 = [1..] instead of ones2 = [1,1..]? 14:32:04 From Gabriel Borglund : ones2 = [1..] would give you the infinit list starting from 1 14:32:10 From karek : then ones2 would be [1,2,3,4...], not [1,1,1,1...] 14:32:17 From Miro : oh right! 14:32:39 From Miro : Makes sense, thanks for all your help everyone! 14:37:09 From sanctified : I suppose this is similar to a sealed enum in scala? 14:38:25 From Miro : It certainly looks like it : ) 14:39:00 From Lavender : If we consider Red, Green etc. as "type", shouldn't they be lowcased? 14:39:26 From Rasmus Rose Gordon : Types were uppercase right? 14:39:40 From Karl Hallsby : @Lavender, no. Types always start with Uppercase. 14:40:04 From Lavender : Are they in Haskell too? I think I missread 14:40:08 From Lavender : my fault 14:40:41 From sanctified : @Lavender type *variables* were lower case 14:41:54 From Lavender : ofc I know these basic stuff. I just missread regarding types in Haskell 14:43:03 From Rasmus Rose Gordon : Oooh, this is cool 14:44:10 From sanctified : oh dang, that's elegant 14:44:56 From Kasper Dejke : Was IntEmpty defined in his code or is it a feature of the language? 14:45:17 From Rasmus Rose Gordon : Probably needs to be defined someplace else 14:45:37 From sanctified : No, that's where it was defined 14:45:41 From karek : IntEmpty was defined in the same way as Red or Blue was defined before 14:45:50 From sanctified : ^ 14:45:51 From Rasmus Rose Gordon : Ah, ok 14:58:16 From Alexander : what was the difference between Int and Integer? 14:58:40 From Karl Hallsby : Integer is unbounded. Int is bounded. 14:59:16 From Alexander : I tried (putInt 1) in the repl but it wanted type Integer :(