Logs: liberachat/#haskell
| 2021-06-02 08:27:19 | <yahb> | boxscape: Integral a => a -> Bool |
| 2021-06-02 08:27:29 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 2021-06-02 08:27:33 | <dminuoso> | That's cute |
| 2021-06-02 08:27:44 | × | dpl_ quits (~dpl@77-121-78-163.chn.volia.net) (Read error: Connection reset by peer) |
| 2021-06-02 08:27:55 | <ccapndave> | boxscape: https://hackage.haskell.org/package/Boolean-0.2.4/candidate/docs/Data-Boolean.html this one? |
| 2021-06-02 08:28:08 | → | dpl_ joins (~dpl@77-121-78-163.chn.volia.net) |
| 2021-06-02 08:28:21 | <boxscape> | ccapndave yep, though this module in particular is what redefines && https://hackage.haskell.org/package/Boolean-0.2.4/docs/Data-Boolean-Overload.html |
| 2021-06-02 08:29:19 | <ccapndave> | Stack doesn't seem to know about this package |
| 2021-06-02 08:29:30 | <boxscape> | :( |
| 2021-06-02 08:29:38 | <ccapndave> | Ah well, `liftA2` is fine |
| 2021-06-02 08:29:52 | <opqdonut> | yeah that's what people use in practice |
| 2021-06-02 08:30:27 | → | FreeVariable joins (~Thunderbi@2a02:aa12:540:e480:d738:2660:2e:8993) |
| 2021-06-02 08:30:29 | <ccapndave> | Thanks a lot. I had better get back to my day job :) |
| 2021-06-02 08:30:49 | <ccapndave> | Haskell has a way of taking my attention away from what I am supposed to be doing |
| 2021-06-02 08:30:59 | <opqdonut> | I know |
| 2021-06-02 08:31:34 | × | FreeVariable quits (~Thunderbi@2a02:aa12:540:e480:d738:2660:2e:8993) (Client Quit) |
| 2021-06-02 08:31:38 | <opqdonut> | speaking of Haskell, I just pushed the final lecture of my online haskell course: https://haskell.mooc.fi/ |
| 2021-06-02 08:31:43 | <boxscape> | :t isAlpha &liftA2 (&&)$ isAscii -- I wish we had a nicer way of modifying operators with liftA2 |
| 2021-06-02 08:31:44 | <lambdabot> | Char -> Bool |
| 2021-06-02 08:31:52 | <opqdonut> | part 2 is still technically "in preview", but there should be no major changes |
| 2021-06-02 08:32:18 | <ccapndave> | Awesome! |
| 2021-06-02 08:32:23 | <ccapndave> | I'll check it out |
| 2021-06-02 08:32:30 | <ccapndave> | *after* doing some actual work ;) |
| 2021-06-02 08:33:59 | → | FreeVariable joins (~Thunderbi@2a02:aa12:540:e480:d738:2660:2e:8993) |
| 2021-06-02 08:35:07 | → | xprlgjf joins (~gavin@60.27.93.209.dyn.plus.net) |
| 2021-06-02 08:36:22 | × | ccapndave quits (~ccapndave@84-73-232-220.dclient.hispeed.ch) (Quit: Leaving...) |
| 2021-06-02 08:42:41 | × | tcard quits (~tcard@p2307053-ipngn17101hodogaya.kanagawa.ocn.ne.jp) (Remote host closed the connection) |
| 2021-06-02 08:42:55 | → | tcard joins (~tcard@p2307053-ipngn17101hodogaya.kanagawa.ocn.ne.jp) |
| 2021-06-02 08:43:17 | × | fabfianda quits (~fabfianda@net-93-148-125-174.cust.vodafonedsl.it) (Ping timeout: 252 seconds) |
| 2021-06-02 08:44:15 | → | fabfianda joins (~fabfianda@mob-5-90-244-84.net.vodafone.it) |
| 2021-06-02 08:46:06 | → | ukari joins (~ukari@user/ukari) |
| 2021-06-02 08:47:15 | × | FreeVariable quits (~Thunderbi@2a02:aa12:540:e480:d738:2660:2e:8993) (Quit: FreeVariable) |
| 2021-06-02 08:47:44 | → | FreeVariable joins (~Thunderbi@2a02:aa12:540:e480:d738:2660:2e:8993) |
| 2021-06-02 08:48:07 | → | batman_ joins (~batman@x4db91071.dyn.telefonica.de) |
| 2021-06-02 08:48:24 | × | batman_ quits (~batman@x4db91071.dyn.telefonica.de) (Client Quit) |
| 2021-06-02 08:48:27 | × | FreeVariable quits (~Thunderbi@2a02:aa12:540:e480:d738:2660:2e:8993) (Client Quit) |
| 2021-06-02 08:48:53 | → | FreeVariable joins (~Thunderbi@2a02:aa12:540:e480:d738:2660:2e:8993) |
| 2021-06-02 08:49:18 | × | FreeVariable quits (~Thunderbi@2a02:aa12:540:e480:d738:2660:2e:8993) (Client Quit) |
| 2021-06-02 08:50:50 | → | dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be) |
| 2021-06-02 08:52:24 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:5878:fcfd:e07b:ffd9) |
| 2021-06-02 08:52:30 | → | kuribas joins (~user@ptr-25vy0i6y10noc9bho8l.18120a2.ip6.access.telenet.be) |
| 2021-06-02 08:54:55 | × | dpl_ quits (~dpl@77-121-78-163.chn.volia.net) (Ping timeout: 245 seconds) |
| 2021-06-02 08:56:40 | → | FreeVariable joins (~Thunderbi@2a02:aa12:540:e480:d738:2660:2e:8993) |
| 2021-06-02 08:57:18 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:5878:fcfd:e07b:ffd9) (Ping timeout: 264 seconds) |
| 2021-06-02 08:58:42 | <ukari> | for `foo x y = bar x >> bar y`, it could be rewrite to `foo x = ((>>) . bar) x . bar` through `foo x y = (>>) (bar x) . bar $ y`. how to rewrite it to `foo = (. bar) . (>>) . bar`? |
| 2021-06-02 08:59:42 | × | azeem quits (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it) (Ping timeout: 264 seconds) |
| 2021-06-02 08:59:44 | <[exa]> | ukari: as the first thing, flip the `.` in the middle (flip (.) ...) |
| 2021-06-02 09:00:06 | <[exa]> | then you should be able to do it just by adding one more `.` to get the `x` "out" of the second parameter |
| 2021-06-02 09:00:19 | → | nschoe joins (~quassel@2a01:e0a:8e:a190:184d:3a8c:7727:6c6d) |
| 2021-06-02 09:00:45 | <[exa]> | OR, use lambdabots great @pl functionality. :] |
| 2021-06-02 09:01:05 | × | FreeVariable quits (~Thunderbi@2a02:aa12:540:e480:d738:2660:2e:8993) (Client Quit) |
| 2021-06-02 09:03:55 | <ukari> | thanks you, [exa], I have get the `foo = flip (.) bar . ((>>) . bar)` |
| 2021-06-02 09:04:14 | → | ubert joins (~Thunderbi@p200300ecdf259da5e6b318fffe838f33.dip0.t-ipconnect.de) |
| 2021-06-02 09:04:50 | <[exa]> | yap that looks right |
| 2021-06-02 09:05:26 | <[exa]> | not "optically better" tho |
| 2021-06-02 09:05:39 | <[exa]> | I'd vote for `traverse bar [x,y]` or something |
| 2021-06-02 09:06:24 | <[exa]> | (given you'd desperately want to "simplify" the original expression) |
| 2021-06-02 09:07:59 | → | azeem joins (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it) |
| 2021-06-02 09:09:44 | × | exarkun quits (~exarkun@user/exarkun) (Remote host closed the connection) |
| 2021-06-02 09:10:17 | → | exarkun joins (~exarkun@user/exarkun) |
| 2021-06-02 09:11:15 | × | Maxdamantus quits (~Maxdamant@user/maxdamantus) (Ping timeout: 244 seconds) |
| 2021-06-02 09:13:00 | → | Maxdamantus joins (~Maxdamant@user/maxdamantus) |
| 2021-06-02 09:13:54 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
| 2021-06-02 09:14:14 | × | favonia quits (~favonia@user/favonia) (Ping timeout: 272 seconds) |
| 2021-06-02 09:14:39 | → | favonia joins (~favonia@user/favonia) |
| 2021-06-02 09:15:07 | × | Kaivo quits (~Kaivo@user/kaivo) (Ping timeout: 272 seconds) |
| 2021-06-02 09:15:17 | <ukari> | summary about pointfree style for `foo x y = bar x >> bar y`, https://gist.github.com/ukari/6402acdcc61489c6625027d65a59bcc9 |
| 2021-06-02 09:17:50 | × | fabfianda quits (~fabfianda@mob-5-90-244-84.net.vodafone.it) (Ping timeout: 245 seconds) |
| 2021-06-02 09:18:23 | → | fabfianda joins (~fabfianda@net-93-148-125-174.cust.dsl.teletu.it) |
| 2021-06-02 09:18:31 | <[exa]> | o nice |
| 2021-06-02 09:18:45 | → | Kaivo joins (~Kaivo@user/kaivo) |
| 2021-06-02 09:19:31 | → | Pixi_ joins (~Pixi@user/pixi) |
| 2021-06-02 09:21:18 | <boxscape> | hm wikipedia lists an algorithm for converting into a pointfree expression (ie an expression in SK calculus) that has length Θ(n^3) |
| 2021-06-02 09:21:19 | <boxscape> | I'm pretty sure you could do Θ(n) though |
| 2021-06-02 09:21:25 | <boxscape> | You "just" need to write a lambda calculus interpreter pointfreely, and then attach the lambda term encoded with S and K combinators, giving you the constant length of the interpreter plus O(n) for the lambda term |
| 2021-06-02 09:22:01 | <boxscape> | (n being the length of the original lambda expression) |
| 2021-06-02 09:22:16 | <river> | true |
| 2021-06-02 09:23:09 | × | Pixi quits (~Pixi@user/pixi) (Ping timeout: 272 seconds) |
| 2021-06-02 09:24:15 | → | ixlun joins (~matthew@109.249.184.235) |
| 2021-06-02 09:27:56 | → | sondre joins (~sondrelun@cm-84.212.100.140.getinternet.no) |
| 2021-06-02 09:29:21 | × | wei2912 quits (~wei2912@112.199.250.21) (Quit: Lost terminal) |
| 2021-06-02 09:30:56 | → | dpl_ joins (~dpl@77-121-78-163.chn.volia.net) |
| 2021-06-02 09:34:30 | × | favonia quits (~favonia@user/favonia) (Ping timeout: 272 seconds) |
| 2021-06-02 09:34:55 | → | favonia joins (~favonia@user/favonia) |
| 2021-06-02 09:35:22 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.2-dev) |
| 2021-06-02 09:37:11 | × | Kaivo quits (~Kaivo@user/kaivo) (Ping timeout: 252 seconds) |
| 2021-06-02 09:37:13 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 2021-06-02 09:38:48 | → | Kaivo joins (~Kaivo@user/kaivo) |
| 2021-06-02 09:41:31 | → | ku joins (~ku@2601:280:c780:7ea0:3536:1caf:f72e:47bc) |
| 2021-06-02 09:42:30 | → | thiross joins (~thiross@173.242.113.143.16clouds.com) |
| 2021-06-02 09:46:58 | × | thiross quits (~thiross@173.242.113.143.16clouds.com) (Client Quit) |
| 2021-06-02 09:47:41 | → | thiross joins (~thiross@173.242.113.143.16clouds.com) |
| 2021-06-02 09:48:58 | → | koishi_ joins (~koishi_@67.209.186.120.16clouds.com) |
| 2021-06-02 09:49:59 | × | koishi_ quits (~koishi_@67.209.186.120.16clouds.com) (Remote host closed the connection) |
| 2021-06-02 09:52:30 | → | ccntrq joins (~ccntrq@business-90-187-183-141.pool2.vodafone-ip.de) |
| 2021-06-02 09:53:55 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 2021-06-02 09:54:02 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:5878:fcfd:e07b:ffd9) |
| 2021-06-02 09:56:02 | × | favonia quits (~favonia@user/favonia) (Ping timeout: 272 seconds) |
| 2021-06-02 09:56:27 | → | favonia joins (~favonia@user/favonia) |
| 2021-06-02 09:59:04 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:5878:fcfd:e07b:ffd9) (Ping timeout: 268 seconds) |
All times are in UTC.