Logs: freenode/#haskell
| 2020-11-26 20:34:14 | <shapr> | but is that all I need to use any library from hackage? |
| 2020-11-26 20:34:29 | <sm[m]> | tomsmeding: definitely not :) |
| 2020-11-26 20:34:35 | <shapr> | I've read that some of nix+haskell means I'm limited to a single version of the libraries, is that true? |
| 2020-11-26 20:35:02 | <sm[m]> | but I think glguy should use dhall. Slow him down a bit. |
| 2020-11-26 20:35:05 | × | kish` quits (~oracle@unaffiliated/oracle) (Ping timeout: 240 seconds) |
| 2020-11-26 20:35:30 | hackage | ukrainian-phonetics-basic 0.3.1.2 - A library to work with the basic Ukrainian phonetics and syllable segmentation. https://hackage.haskell.org/package/ukrainian-phonetics-basic-0.3.1.2 (OleksandrZhabenko) |
| 2020-11-26 20:35:36 | <shapr> | sm[m]: haha! |
| 2020-11-26 20:36:23 | <avdb> | Can you mix list comprehensions with if statements in haskell? |
| 2020-11-26 20:36:45 | <koz_> | avdb: You mean, you want to have conditional logic _in_ the list comprehension? |
| 2020-11-26 20:36:46 | <avdb> | [x | x <- lst, if x == foo then succ x else x] |
| 2020-11-26 20:36:49 | <avdb> | Yes! |
| 2020-11-26 20:37:07 | <shapr> | you can also do pattern matches inside the list comp |
| 2020-11-26 20:37:17 | <avdb> | how? |
| 2020-11-26 20:37:56 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds) |
| 2020-11-26 20:37:56 | <shapr> | or for extra insanity, there's TransformListComp: https://github.com/shapr/tmuxmarta/blob/master/src/Lib.hs#L65 |
| 2020-11-26 20:37:59 | <ski> | there are no `if' statements in Haskell |
| 2020-11-26 20:38:10 | <shapr> | but I think I'm the only person who's used TransformListComp in the past few years :-P |
| 2020-11-26 20:38:38 | ski | was just reading about them a bit, earlier today |
| 2020-11-26 20:38:50 | <ski> | (looking at some of ProfTeggy's papers) |
| 2020-11-26 20:38:50 | <tomsmeding> | there are 'if' expressions, though |
| 2020-11-26 20:38:51 | <shapr> | ski: I should try some monad comprehensions |
| 2020-11-26 20:38:58 | <avdb> | ski: if then else grrr |
| 2020-11-26 20:39:14 | <avdb> | I don't know how to use Monads, Functors or any of those exotic tools |
| 2020-11-26 20:39:16 | × | aidecoe quits (~aidecoe@unaffiliated/aidecoe) (Ping timeout: 240 seconds) |
| 2020-11-26 20:39:43 | <ski> | avdb : do you want to, conditionally, either collect `x' or `succ x', with `x' being drawn from `lst' ? |
| 2020-11-26 20:39:50 | <shapr> | avdb: oh functors are so cool! |
| 2020-11-26 20:39:52 | <avdb> | Yes |
| 2020-11-26 20:40:00 | <shapr> | avdb: it's like "apply this function inside this container" |
| 2020-11-26 20:40:08 | <shapr> | avdb: have you used map? |
| 2020-11-26 20:40:24 | <ski> | > [if x `mod` 3 == 0 then succ x else x | x <- [0 .. 9]] |
| 2020-11-26 20:40:27 | <lambdabot> | [1,1,2,4,4,5,7,7,8,10] |
| 2020-11-26 20:40:29 | <shapr> | > map (* (-1)) [1..9] |
| 2020-11-26 20:40:29 | <avdb> | Not yet ... |
| 2020-11-26 20:40:31 | <lambdabot> | [-1,-2,-3,-4,-5,-6,-7,-8,-9] |
| 2020-11-26 20:40:32 | <avdb> | Thanks |
| 2020-11-26 20:40:32 | <ski> | something like that ? |
| 2020-11-26 20:40:49 | <shapr> | > map (+1) [5..9] |
| 2020-11-26 20:40:50 | → | aidecoe joins (~aidecoe@unaffiliated/aidecoe) |
| 2020-11-26 20:40:52 | <lambdabot> | [6,7,8,9,10] |
| 2020-11-26 20:40:57 | <shapr> | :t map |
| 2020-11-26 20:40:59 | <lambdabot> | (a -> b) -> [a] -> [b] |
| 2020-11-26 20:41:01 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds) |
| 2020-11-26 20:41:03 | → | mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) |
| 2020-11-26 20:41:07 | × | nullheroes quits (~danielvu@168.235.66.22) (Quit: WeeChat 2.9) |
| 2020-11-26 20:41:14 | <ski> | > [y | x <- [0 .. 9],let y = if x `mod` 3 == 0 then succ x else x] -- another way to say the same thing |
| 2020-11-26 20:41:16 | <shapr> | avdb: map says "give me a function, and a list, and I'll apply the function to each element in the list, and give you the result" |
| 2020-11-26 20:41:17 | <lambdabot> | [1,1,2,4,4,5,7,7,8,10] |
| 2020-11-26 20:41:32 | <avdb> | I also intentionally ask my questions it in a totally different manner so that I have to edit the code and use my brains :P |
| 2020-11-26 20:41:34 | tomsmeding | is happy in this instance that the Haskell legacy hasn't made fmap and map the same thing -- sucks with explaining |
| 2020-11-26 20:42:12 | × | sondr3 quits (~sondr3@cm-84.211.56.132.getinternet.no) (Quit: Leaving) |
| 2020-11-26 20:42:22 | <ski> | > [y | x <- [0 .. 9],let y | x `mod` 3 == 0 = succ x | otherwise = x] -- yet another variation |
| 2020-11-26 20:42:23 | <shapr> | avdb: that's smart, using your brain is good but takes work |
| 2020-11-26 20:42:24 | <lambdabot> | [1,1,2,4,4,5,7,7,8,10] |
| 2020-11-26 20:42:43 | <avdb> | Oh wow ... you can play with the x on the left hand side? Learned something new today about haskell ... |
| 2020-11-26 20:42:54 | <ski> | tomsmeding : they were the same thing, in the past |
| 2020-11-26 20:43:05 | <koz_> | avdb: If you've seen set comprehensions, this will feel very familiar. |
| 2020-11-26 20:43:11 | <ski> | hm, on the left-hand side of what ? |
| 2020-11-26 20:43:20 | <avdb> | Of list comprehensions |
| 2020-11-26 20:43:31 | <ski> | do you mean, before the first `|' ? |
| 2020-11-26 20:43:43 | <ski> | you can put any expression there |
| 2020-11-26 20:43:43 | × | cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection) |
| 2020-11-26 20:43:47 | → | Deide joins (~Deide@217.155.19.23) |
| 2020-11-26 20:43:51 | <ski> | including `if'-`then'-`else' expressions |
| 2020-11-26 20:43:52 | <tomsmeding> | ski: were they? I've only heard the complaints from people that wanted 'map' gone and have 'fmap' called 'map' for consistency, but maybe those were also not aware that this hasn't always been like that? |
| 2020-11-26 20:44:07 | → | cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) |
| 2020-11-26 20:45:00 | → | jonatanb joins (~jonatanb@83.24.220.252.ipv4.supernova.orange.pl) |
| 2020-11-26 20:45:07 | × | avdb quits (~avdb@ip-81-11-215-86.dsl.scarlet.be) (Quit: avdb) |
| 2020-11-26 20:45:23 | <shapr> | ski has been writing Haskell longer than I have! |
| 2020-11-26 20:45:45 | <ski> | tomsmeding : <http://www.ki.informatik.uni-frankfurt.de/doc/html/Haskell1.4/standard-prelude.html#$tFunctor> |
| 2020-11-26 20:46:02 | <shapr> | wow, that's old school |
| 2020-11-26 20:46:02 | <ski> | tomsmeding : also check out `MonadPlus', just below |
| 2020-11-26 20:46:14 | <shapr> | I didn't get into Haskell until .. ghc4? ghc5? something like that |
| 2020-11-26 20:46:32 | <shapr> | What was the hot new ghc in ~2000 ? |
| 2020-11-26 20:46:46 | shapr | checks |
| 2020-11-26 20:46:47 | <tomsmeding> | fascinating, (++) in MonadPlus |
| 2020-11-26 20:46:48 | <shapr> | ah, april 2001 |
| 2020-11-26 20:47:10 | <tomsmeding> | makes sense though |
| 2020-11-26 20:47:23 | → | Franciman joins (~francesco@host-82-54-193-143.retail.telecomitalia.it) |
| 2020-11-26 20:47:23 | <ski> | oh and `sequence'&`accumulate' in place of `sequence_',`sequence' |
| 2020-11-26 20:48:01 | → | nullheroes joins (~danielvu@168.235.66.22) |
| 2020-11-26 20:48:39 | <ski> | (i remember noting that in Winstanley's monad tutorial <http://www-users.mat.uni.torun.pl/~fly/materialy/fp/haskell-doc/Monads.html>) |
| 2020-11-26 20:49:25 | × | jonatanb quits (~jonatanb@83.24.220.252.ipv4.supernova.orange.pl) (Ping timeout: 264 seconds) |
| 2020-11-26 20:49:30 | <dminuoso> | 21:45:45 ski | tomsmeding : <http://www.ki.informatik.uni-frankfurt.de/doc/html/Haskell1.4/standard-prelude.html#$tFunctor> |
| 2020-11-26 20:49:49 | <dminuoso> | Academia is one of the few places that knows how to maintain long lived websites, which I think is both a blessing and a curse. |
| 2020-11-26 20:50:28 | <ski> | shapr : are you sure ? |
| 2020-11-26 20:50:38 | ski | can't recall |
| 2020-11-26 20:50:54 | × | AlterEgo- quits (~ladew@124-198-158-163.dynamic.caiway.nl) (Quit: Leaving) |
| 2020-11-26 20:51:24 | <monochrom> | dminuoso, I think it's more like "is enabled to" |
| 2020-11-26 20:51:56 | <ski> | shapr : you said anniversary's in April ? |
| 2020-11-26 20:52:03 | <shapr> | yup |
| 2020-11-26 20:52:05 | <int-e> | dminuoso: don't worry, we're working on solutions for that anomaly: https://www.scottaaronson.com/blog/?p=5094 |
| 2020-11-26 20:52:16 | <shapr> | April 30th |
| 2020-11-26 20:52:27 | × | cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection) |
| 2020-11-26 20:52:27 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 2020-11-26 20:52:30 | <int-e> | also... it often happens that a bunch of stuff just disappears when a professor retires or moves to another university |
| 2020-11-26 20:52:36 | <ski> | yes |
| 2020-11-26 20:52:42 | <shapr> | int-e: that part makes me sad |
| 2020-11-26 20:52:45 | × | jespada quits (~jespada@90.254.245.49) (Ping timeout: 240 seconds) |
| 2020-11-26 20:52:54 | <shapr> | I still have an ancient smalltalk <-> haskell bridge |
| 2020-11-26 20:53:07 | <ski> | or when the department decide to do a "site revamp" |
All times are in UTC.