Logs: freenode/#haskell
| 2021-04-13 11:50:31 | <lambdabot> | unexpected " " |
| 2021-04-13 11:50:31 | <lambdabot> | expecting operator |
| 2021-04-13 11:50:43 | <alexm_> | @pl "(<*>) fs xs = flatMap (<$> xs) fs" |
| 2021-04-13 11:50:43 | <lambdabot> | "(<*>) fs xs = flatMap (<$> xs) fs" |
| 2021-04-13 11:50:43 | <ski> | xerox_ : i wonder why that claims `unfoldTree' is breadth-first order .. |
| 2021-04-13 11:51:14 | <__monty__> | @pl flatMap (<$> xs) fs |
| 2021-04-13 11:51:14 | <lambdabot> | flatMap (<$> xs) fs |
| 2021-04-13 11:51:24 | <__monty__> | alexm_: Can't pass a definition. |
| 2021-04-13 11:51:36 | <ski> | @pl \fs xs -> flatMap (<$> xs) fs |
| 2021-04-13 11:51:36 | <lambdabot> | flip (flatMap . flip (<$>)) |
| 2021-04-13 11:51:38 | <alexm_> | oops, cheers :) |
| 2021-04-13 11:52:00 | → | Mrbuck joins (~Mrbuck@gateway/tor-sasl/mrbuck) |
| 2021-04-13 11:52:08 | <ski> | @pl doubleMap f g xs = map f (map g xs) |
| 2021-04-13 11:52:08 | <lambdabot> | doubleMap = (. map) . (.) . map |
| 2021-04-13 11:53:53 | <__monty__> | Oh, it does do definitions? Then why didn't the previous query work? |
| 2021-04-13 11:54:10 | <ski> | @type \fs xs -> fs >>= (<$> xs) |
| 2021-04-13 11:54:11 | <lambdabot> | Monad m => m (a -> b) -> m a -> m b |
| 2021-04-13 11:54:14 | <ski> | @type ap |
| 2021-04-13 11:54:15 | <lambdabot> | Monad m => m (a -> b) -> m a -> m b |
| 2021-04-13 11:54:25 | <ski> | @src ap |
| 2021-04-13 11:54:25 | <lambdabot> | ap = liftM2 id |
| 2021-04-13 11:54:39 | <ski> | __monty__ : i guess it doesn't parse operator definitions .. |
| 2021-04-13 11:54:55 | <ski> | alexm_ ^ ? |
| 2021-04-13 11:55:13 | <xerox_> | ski: right? |
| 2021-04-13 11:55:20 | → | hololeap joins (~hololeap@gateway/tor-sasl/hololeap) |
| 2021-04-13 11:55:30 | <__monty__> | @pl fs <*> xs = flatMap (<$> xs) fs |
| 2021-04-13 11:55:31 | <lambdabot> | (line 1, column 12): |
| 2021-04-13 11:55:31 | <lambdabot> | unexpected " " |
| 2021-04-13 11:55:48 | <ski> | i mean, it doesn't really do any specifically depth-first vs. breadth-first stuff |
| 2021-04-13 11:56:19 | <dibblego> | ski: there's a java RFE from 2001 with really long discussion — can't find it though |
| 2021-04-13 11:57:04 | <ski> | > let nodes = 1 : [n | m <- nodes,n <- [2*m,2*m + 1]] in nodes -- unlike this, which does breadth-first |
| 2021-04-13 11:57:06 | <lambdabot> | [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,... |
| 2021-04-13 11:57:12 | <ski> | (only works for infinite trees, though) |
| 2021-04-13 11:57:26 | <ski> | "Request For E???" ? |
| 2021-04-13 11:57:50 | → | frozenErebus joins (~frozenEre@37.231.244.249) |
| 2021-04-13 11:57:58 | <ski> | dibblego : would be interested to take a look, if you find it later |
| 2021-04-13 11:58:19 | <dibblego> | yeah, it's a shame I've lost it |
| 2021-04-13 11:58:23 | <alexm_> | thanks ski |
| 2021-04-13 11:58:30 | → | hololeap_ joins (~hololeap@gateway/tor-sasl/hololeap) |
| 2021-04-13 11:59:57 | × | hololeap quits (~hololeap@gateway/tor-sasl/hololeap) (Ping timeout: 240 seconds) |
| 2021-04-13 12:01:32 | → | urodna_ joins (~urodna@unaffiliated/urodna) |
| 2021-04-13 12:02:09 | → | LKoen_ joins (~LKoen@65.250.88.92.rev.sfr.net) |
| 2021-04-13 12:02:36 | <ski> | @let infiniteSubtreesBreadthFirst :: Tree a -> [Tree a]; infiniteSubtreesBreadthFirst t = ts where ts = t : [t | t <- ts,t <- subForest t] |
| 2021-04-13 12:02:37 | <lambdabot> | Defined. |
| 2021-04-13 12:02:45 | <ski> | @type map rootLabel . infiniteSubtreesBreadthFirst |
| 2021-04-13 12:02:47 | <lambdabot> | Tree b -> [b] |
| 2021-04-13 12:03:26 | × | oish quits (~charlie@228.25.169.217.in-addr.arpa) (Quit: leaving) |
| 2021-04-13 12:04:16 | <ski> | alexm_ : were you looking to define `(<*>)' for `Applicative', based on `(>>=)' in a `Monad' instance ? |
| 2021-04-13 12:04:17 | × | todda7 quits (~torstein@ppp-2-85-110-156.home.otenet.gr) (Ping timeout: 260 seconds) |
| 2021-04-13 12:04:34 | × | kini quits (~kini@unaffiliated/kini) (Remote host closed the connection) |
| 2021-04-13 12:04:52 | × | LKoen quits (~LKoen@65.250.88.92.rev.sfr.net) (Ping timeout: 260 seconds) |
| 2021-04-13 12:05:50 | → | kini joins (~kini@unaffiliated/kini) |
| 2021-04-13 12:06:28 | × | Mrbuck quits (~Mrbuck@gateway/tor-sasl/mrbuck) (Remote host closed the connection) |
| 2021-04-13 12:07:14 | → | Mrbuck joins (~Mrbuck@gateway/tor-sasl/mrbuck) |
| 2021-04-13 12:07:37 | <alexm_> | ski: I am defining (<*>) for Applicative for the List type, it's just an exercise from fp-course (former NICTA) |
| 2021-04-13 12:08:41 | <dibblego> | alexm_: did you do flatMap and map from List.hs ? |
| 2021-04-13 12:08:42 | <alexm_> | in this case point free version looks less readable to me though |
| 2021-04-13 12:09:06 | × | Mrbuck quits (~Mrbuck@gateway/tor-sasl/mrbuck) (Remote host closed the connection) |
| 2021-04-13 12:09:18 | <alexm_> | dibblego yes, I did |
| 2021-04-13 12:09:23 | → | Deide joins (~Deide@217.155.19.23) |
| 2021-04-13 12:09:33 | <dibblego> | alexm_: they will get you to (<*>) for List |
| 2021-04-13 12:09:52 | → | Mrbuck joins (~Mrbuck@gateway/tor-sasl/mrbuck) |
| 2021-04-13 12:09:59 | <alexm_> | yeah, I figured applicative out already via flatMap, thanks :) |
| 2021-04-13 12:10:06 | <dibblego> | when the course is run, we use type holes a lot |
| 2021-04-13 12:10:11 | <dibblego> | ok cool |
| 2021-04-13 12:10:22 | <merijn> | dibblego: type holes or typed holes? :p |
| 2021-04-13 12:10:27 | <merijn> | (or both, I suppose) |
| 2021-04-13 12:10:28 | <alexm_> | I was just playing around with the point free version of the definition |
| 2021-04-13 12:10:38 | <dibblego> | _theseones |
| 2021-04-13 12:11:12 | <dibblego> | I've been flying all arvo and night, tired, but leave questions if you have any — up early to fly home |
| 2021-04-13 12:11:21 | <merijn> | dibblego: You are aware of -fdefer-typed-holes? (because sadly, every time I find out many people aren't :( ) |
| 2021-04-13 12:11:43 | <dibblego> | merijn: yes, the course material was written before those, so error is used instead (PR!?) |
| 2021-04-13 12:13:03 | × | andreas303 quits (~andreas@gateway/tor-sasl/andreas303) (Remote host closed the connection) |
| 2021-04-13 12:13:18 | <alexm_> | thanks dibblego |
| 2021-04-13 12:13:24 | <merijn> | dibblego: Just trying to make sure my effort of hacking in that flag doesn't go to waste ;) It's my first and crowning contribution to Haskell, imo :p |
| 2021-04-13 12:13:35 | <dibblego> | merijn: we use it in the course |
| 2021-04-13 12:13:41 | <merijn> | \o/ |
| 2021-04-13 12:13:43 | → | andreas303 joins (~andreas@gateway/tor-sasl/andreas303) |
| 2021-04-13 12:14:01 | <merijn> | Immortality achieved! |
| 2021-04-13 12:14:04 | <alexm_> | what this flag does in short? |
| 2021-04-13 12:14:32 | <merijn> | alexm_: Makes typed holes behave like undefined, so you can run code without having to implement everything |
| 2021-04-13 12:14:59 | <merijn> | The major advantage over undefined being: Better warnings and, once you disable the flag, you can't accidentally forget any undefined's in the source |
| 2021-04-13 12:15:16 | <merijn> | Since they're compile errors without the flag (and undefined isn't) |
| 2021-04-13 12:15:21 | <alexm_> | sweet |
| 2021-04-13 12:17:50 | <__monty__> | xv |
| 2021-04-13 12:18:46 | → | todda7 joins (~torstein@athedsl-09242.home.otenet.gr) |
| 2021-04-13 12:19:27 | → | elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) |
| 2021-04-13 12:29:48 | → | kiweun joins (~kiweun@2607:fea8:2a62:9600:f0c8:b06a:abe0:d60) |
| 2021-04-13 12:29:52 | → | oo_miguel joins (~miguel@89-72-187-203.dynamic.chello.pl) |
| 2021-04-13 12:32:39 | → | ddk joins (9d2a7d60@157.42.125.96) |
| 2021-04-13 12:33:12 | <ddk> | Hello all |
| 2021-04-13 12:33:55 | × | ulidtko|k quits (~ulidtko@194.54.80.38) (Ping timeout: 252 seconds) |
| 2021-04-13 12:34:05 | <oo_miguel> | Hello. I am using Network.HTTP.Client.Manager's managerModifyRequest and managerModifyResponse hooks to implement a simple logging middleware. Maybe I a missing something, but while I can easily check what URL a `Request` is related to, I do not see any such possibility inside the `Response` hook. Any suggestions please? |
| 2021-04-13 12:34:22 | × | _bin quits (~bin@2600:1700:10a1:38d0:6924:8e26:a144:5b39) (Quit: ZNC - https://znc.in) |
| 2021-04-13 12:34:24 | × | kiweun quits (~kiweun@2607:fea8:2a62:9600:f0c8:b06a:abe0:d60) (Ping timeout: 258 seconds) |
| 2021-04-13 12:34:58 | × | kritzefitz quits (~kritzefit@212.86.56.80) (Ping timeout: 240 seconds) |
| 2021-04-13 12:35:11 | <ddk> | I'm using postgres-simple, now I need timestamp in my program but I'm unsure which type to use in postgres which can be easily parsed between Haskell and postgres to and fro. |
| 2021-04-13 12:35:34 | <alexm_> | @pl fa x $ fb x |
| 2021-04-13 12:35:35 | <lambdabot> | fa x (fb x) |
| 2021-04-13 12:36:47 | <alexm_> | @pl \fa fb x -> fa x $ fb x |
All times are in UTC.