Logs: freenode/#haskell
| 2021-03-19 06:45:43 | × | Forkk quits (forkk@2600:3c00::f03c:91ff:fe84:de4d) (Ping timeout: 244 seconds) |
| 2021-03-19 06:46:24 | → | Forkk joins (~forkk@li926-228.members.linode.com) |
| 2021-03-19 06:52:44 | × | timCF quits (~i.tkachuk@m91-129-99-43.cust.tele2.ee) (Quit: leaving) |
| 2021-03-19 06:56:24 | × | molehillish quits (~molehilli@2600:8800:8d06:1800:e0d0:506b:db48:8ec8) (Remote host closed the connection) |
| 2021-03-19 06:57:00 | → | molehillish joins (~molehilli@2600:8800:8d06:1800:e0d0:506b:db48:8ec8) |
| 2021-03-19 06:58:08 | lep_ | is now known as lep-delete |
| 2021-03-19 07:00:29 | → | malumore joins (~malumore@151.62.118.248) |
| 2021-03-19 07:01:13 | × | molehillish quits (~molehilli@2600:8800:8d06:1800:e0d0:506b:db48:8ec8) (Ping timeout: 244 seconds) |
| 2021-03-19 07:01:46 | × | howdoi quits (uid224@gateway/web/irccloud.com/x-ennflwnjlfvpdgyt) (Quit: Connection closed for inactivity) |
| 2021-03-19 07:02:56 | × | __minoru__shirae quits (~shiraeesh@77.94.25.145) (Ping timeout: 240 seconds) |
| 2021-03-19 07:04:56 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 2021-03-19 07:07:15 | → | pricly_yellow joins (~pricly_ye@static.90.189.158.212.sinor.ru) |
| 2021-03-19 07:07:54 | × | cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 265 seconds) |
| 2021-03-19 07:08:24 | → | kuribas joins (~user@ptr-25vy0iagi80mnljuo8k.18120a2.ip6.access.telenet.be) |
| 2021-03-19 07:09:48 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 2021-03-19 07:10:47 | → | Lord_of_Life joins (~Lord@unaffiliated/lord-of-life/x-0885362) |
| 2021-03-19 07:11:52 | × | johannes quits (~johannes@b2b-37-24-119-189.unitymedia.biz) (Read error: Connection reset by peer) |
| 2021-03-19 07:11:56 | → | _ht joins (~quassel@82-169-194-8.biz.kpn.net) |
| 2021-03-19 07:12:59 | × | puffnfresh quits (~puffnfres@119-17-138-164.77118a.mel.static.aussiebb.net) (Ping timeout: 256 seconds) |
| 2021-03-19 07:14:32 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds) |
| 2021-03-19 07:15:18 | → | shad0w_ joins (a0ca254d@160.202.37.77) |
| 2021-03-19 07:18:21 | <shad0w_> | whatsup with gitlab.haskell.org ? |
| 2021-03-19 07:19:20 | × | shad0w_ quits (a0ca254d@160.202.37.77) (Client Quit) |
| 2021-03-19 07:19:25 | → | chele joins (~chele@ip5b40237d.dynamic.kabel-deutschland.de) |
| 2021-03-19 07:26:49 | <olligobber> | I guess someone messed up |
| 2021-03-19 07:27:32 | → | molehillish joins (~molehilli@2600:8800:8d06:1800:e0d0:506b:db48:8ec8) |
| 2021-03-19 07:28:13 | → | mikoto-chan joins (~anass@gateway/tor-sasl/mikoto-chan) |
| 2021-03-19 07:32:26 | × | molehillish quits (~molehilli@2600:8800:8d06:1800:e0d0:506b:db48:8ec8) (Ping timeout: 264 seconds) |
| 2021-03-19 07:37:01 | → | graf_blutwurst joins (~user@2001:171b:226e:adc0:7535:ff00:8232:c348) |
| 2021-03-19 07:37:19 | × | Sgeo quits (~Sgeo@ool-18b98aa4.dyn.optonline.net) (Read error: Connection reset by peer) |
| 2021-03-19 07:39:21 | → | Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net) |
| 2021-03-19 07:40:45 | × | Guest82011 quits (~azure@103.154.230.130) (Ping timeout: 256 seconds) |
| 2021-03-19 07:43:28 | → | michalz joins (~user@185.246.204.49) |
| 2021-03-19 07:46:06 | → | aggin joins (~ecm@103.88.87.37) |
| 2021-03-19 07:46:07 | × | aggin quits (~ecm@103.88.87.37) (Client Quit) |
| 2021-03-19 07:47:38 | → | aggin joins (~ecm@103.88.87.37) |
| 2021-03-19 07:48:08 | × | aggin quits (~ecm@103.88.87.37) (Client Quit) |
| 2021-03-19 07:48:16 | → | guest316` joins (~user@49.5.6.87) |
| 2021-03-19 07:49:38 | → | Guest82011 joins (~azure@103.154.230.130) |
| 2021-03-19 07:49:53 | <guest316`> | how to break inside fmap? fmap (+1) [1,2,3,5,7] how to let it run on element 3 then exit? |
| 2021-03-19 07:50:37 | <guest316`> | not apply (+1) on whole list element |
| 2021-03-19 07:50:44 | <opqdonut> | there is no way to do that |
| 2021-03-19 07:50:56 | <guest316`> | opqdonut: but callCC can earlier exit |
| 2021-03-19 07:51:24 | <opqdonut> | consider something like `fmap even :: [Int] -> [Bool]`. if you stop half way, you'd have a mix of Ints and Bools in the list, which wouldn't type |
| 2021-03-19 07:51:40 | <guest316`> | in other languages, recursion or iteration, we can use `return` to break the loop |
| 2021-03-19 07:51:59 | <opqdonut> | yeah you can write a recursive function that only increments the list until it sees a 3 |
| 2021-03-19 07:52:07 | <opqdonut> | but you _can't do it via fmap_ |
| 2021-03-19 07:52:22 | <opqdonut> | you can deduce this from the type of fmap |
| 2021-03-19 07:53:34 | <SIben> | fmap (\x -> case x of 3 -> 4 ; _ -> x) [1, 2, 3, 5, 7] |
| 2021-03-19 07:54:04 | <SIben> | If that is what you mean by "element 3" |
| 2021-03-19 07:54:04 | × | emmanuel_erc quits (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com) (Read error: Connection reset by peer) |
| 2021-03-19 07:54:06 | <guest316`> | SIben: but this still work on 3 5 7 |
| 2021-03-19 07:54:12 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 246 seconds) |
| 2021-03-19 07:54:15 | → | emmanuel_erc joins (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com) |
| 2021-03-19 07:54:38 | <SIben> | guest316`: what do you mean by "work"? |
| 2021-03-19 07:54:52 | <guest316`> | SIben: (+1) apply on 3 5 7 |
| 2021-03-19 07:54:58 | <guest316`> | my english is not good |
| 2021-03-19 07:55:00 | × | gioyik quits (~gioyik@gateway/tor-sasl/gioyik) (Quit: WeeChat 3.0) |
| 2021-03-19 07:55:01 | <SIben> | guest316`: no |
| 2021-03-19 07:55:19 | <SIben> | Well, the function is run, but it is identity on [1, 2, 5, 7] |
| 2021-03-19 07:55:50 | → | m0rphism joins (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) |
| 2021-03-19 07:55:51 | <SIben> | (but maybe I am interpreting the question wrong :)) |
| 2021-03-19 07:56:00 | <guest316`> | fmap f [1,2,3,5,7] = [1,2,3] |
| 2021-03-19 07:56:16 | <guest316`> | once meet 3, just break and exit |
| 2021-03-19 07:56:27 | → | Franciman joins (~francesco@host-79-53-62-46.retail.telecomitalia.it) |
| 2021-03-19 07:56:59 | <SIben> | Oh – OK, that is not what I understood from the question. My bad, thanks for explaining guest316` :) |
| 2021-03-19 07:57:23 | → | Lowl3v3l joins (~Lowl3v3l@dslb-002-207-103-026.002.207.pools.vodafone-ip.de) |
| 2021-03-19 08:00:13 | <guest316`> | with callCC we can do that? |
| 2021-03-19 08:01:06 | → | puffnfresh joins (~puffnfres@119-17-138-164.77118a.mel.static.aussiebb.net) |
| 2021-03-19 08:01:16 | × | evanjs quits (~evanjs@075-129-098-007.res.spectrum.com) (Read error: Connection reset by peer) |
| 2021-03-19 08:01:37 | <opqdonut> | not directly, no, though if you use traverse in the Cont monad I think you could abort the whole "fmap" if you meet a certain element |
| 2021-03-19 08:02:07 | <opqdonut> | in case it helps, here's a recursive function that does the thing: |
| 2021-03-19 08:02:36 | → | dhouthoo joins (~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be) |
| 2021-03-19 08:02:46 | → | evanjs joins (~evanjs@075-129-098-007.res.spectrum.com) |
| 2021-03-19 08:02:59 | <guest316`> | fine |
| 2021-03-19 08:03:20 | <opqdonut> | > let applyUntil _ _ [] = []; applyUntil f x (y:ys) | x == y = y:ys | otherwise = f y : applyUntil f x ys in applyUntil (+1) 3 [0,1,0,3,7,9] |
| 2021-03-19 08:03:22 | <lambdabot> | [1,2,1,3,7,9] |
| 2021-03-19 08:03:25 | → | kderme joins (4fa6552d@ppp079166085045.access.hol.gr) |
| 2021-03-19 08:03:27 | <guest316`> | I meet this issue in Kotlin too, so I wonder how haskell would handle it |
| 2021-03-19 08:03:46 | <guest316`> | but kotlin doesn't have TCO, so recursion ... |
| 2021-03-19 08:04:30 | <guest316`> | so many languages don't support TCO, only haskell and scheme support it |
| 2021-03-19 08:05:11 | <opqdonut> | > let (pre,suf) = break (==3) [0,1,0,3,7,9] in map (+1) pre ++ suf -- real haskell code might do something like this instead of implementing applyUntil |
| 2021-03-19 08:05:13 | <lambdabot> | [1,2,1,3,7,9] |
| 2021-03-19 08:05:42 | <xsperry> | another option, write takeUntil :: (a -> Bool) -> [a] -> [a], which would be the same as takeWhile, but would include the first matching element, and then do map (+1) (takeUntil (/=3) list) |
| 2021-03-19 08:07:43 | → | stree joins (~stree@68.36.8.116) |
| 2021-03-19 08:07:43 | × | emmanuel_erc quits (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com) (Read error: Connection reset by peer) |
| 2021-03-19 08:07:51 | → | emmanuel_erc joins (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com) |
| 2021-03-19 08:08:43 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 2021-03-19 08:09:08 | × | openheimer quits (~death__@unaffiliated/death/x-3645061) (Quit: openheimer) |
| 2021-03-19 08:09:15 | × | tfl^ quits (tfl@ip98-184-89-2.mc.at.cox.net) () |
| 2021-03-19 08:13:27 | → | shad0w_ joins (a0ca254d@160.202.37.77) |
| 2021-03-19 08:13:44 | <shad0w_> | sorry, disconnected |
| 2021-03-19 08:13:52 | <shad0w_> | whatsup with gitlab.haskell.org ? |
| 2021-03-19 08:14:09 | <opqdonut> | I'd say it seems down and not up |
| 2021-03-19 08:14:09 | × | emmanuel_erc quits (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com) (Read error: Connection reset by peer) |
| 2021-03-19 08:14:26 | → | emmanuel_erc joins (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com) |
| 2021-03-19 08:14:46 | <shad0w_> | opqdonut: that seems right and not wrong. |
| 2021-03-19 08:15:17 | → | coot joins (~coot@37.30.58.223.nat.umts.dynamic.t-mobile.pl) |
| 2021-03-19 08:21:53 | hackage | signable 0.4 - Deterministic serialisation and signatures with proto-lens support https://hackage.haskell.org/package/signable-0.4 (coingaming) |
| 2021-03-19 08:23:49 | × | puffnfresh quits (~puffnfres@119-17-138-164.77118a.mel.static.aussiebb.net) (Ping timeout: 256 seconds) |
All times are in UTC.