Logs: freenode/#haskell
| 2020-11-08 22:00:13 | <newbi> | it works! thank you so much |
| 2020-11-08 22:00:25 | → | ensyde joins (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) |
| 2020-11-08 22:00:29 | → | Rudd0 joins (~Rudd0@185.189.115.108) |
| 2020-11-08 22:00:49 | → | thir joins (~thir@p200300f27f0b7e00f4e9381c2bf90854.dip0.t-ipconnect.de) |
| 2020-11-08 22:02:17 | × | justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) () |
| 2020-11-08 22:02:23 | × | Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
| 2020-11-08 22:03:01 | hackage | technique 0.2.5 - Procedures and Sequences https://hackage.haskell.org/package/technique-0.2.5 (AndrewCowie) |
| 2020-11-08 22:04:58 | × | ensyde quits (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) (Ping timeout: 260 seconds) |
| 2020-11-08 22:05:33 | × | thir quits (~thir@p200300f27f0b7e00f4e9381c2bf90854.dip0.t-ipconnect.de) (Ping timeout: 244 seconds) |
| 2020-11-08 22:06:25 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-11-08 22:08:08 | × | Amras quits (~Amras@unaffiliated/amras0000) (Ping timeout: 244 seconds) |
| 2020-11-08 22:13:00 | <koz_> | :t foldM |
| 2020-11-08 22:13:02 | <lambdabot> | (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b |
| 2020-11-08 22:13:07 | × | tsaka__ quits (~torstein@ppp-2-84-22-81.home.otenet.gr) (Remote host closed the connection) |
| 2020-11-08 22:13:32 | → | tsaka__ joins (~torstein@ppp-2-84-22-81.home.otenet.gr) |
| 2020-11-08 22:13:54 | <newbi> | im still having problems with this one https://paste.tomsmeding.com/OpsTZZjd |
| 2020-11-08 22:14:10 | <newbi> | it can filter a string but it cant filter a list |
| 2020-11-08 22:14:19 | <newbi> | what can i do so it can |
| 2020-11-08 22:14:21 | × | conal quits (~conal@209.58.139.27) (Quit: Computer has gone to sleep.) |
| 2020-11-08 22:15:18 | → | jonatanb joins (~jonatanb@83.24.9.26.ipv4.supernova.orange.pl) |
| 2020-11-08 22:16:49 | × | jonatanb quits (~jonatanb@83.24.9.26.ipv4.supernova.orange.pl) (Remote host closed the connection) |
| 2020-11-08 22:16:49 | → | Feuermagier joins (~Feuermagi@213.178.26.41) |
| 2020-11-08 22:17:45 | × | britva quits (~britva@2a02:aa13:7240:2980:8973:b5bc:951d:7f1f) (Quit: This computer has gone to sleep) |
| 2020-11-08 22:17:45 | <Feuermagier> | how can I elegantly switch on number ranges? eg: 0 to 10 do a; 11 to 20 do b |
| 2020-11-08 22:18:25 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 2020-11-08 22:18:28 | <hekkaidekapus> | newbi: What are the types of x and y in `x = 'a'; y = 5`? |
| 2020-11-08 22:19:04 | <newbi> | x is char and y is int |
| 2020-11-08 22:19:19 | <koz_> | Feuermagier: Guards, probably? |
| 2020-11-08 22:19:25 | × | christo quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 2020-11-08 22:19:30 | <hekkaidekapus> | newbi: What about `z = '5'`? |
| 2020-11-08 22:19:39 | × | Jesin quits (~Jesin@pool-72-66-101-18.washdc.fios.verizon.net) (Quit: Leaving) |
| 2020-11-08 22:19:39 | <newbi> | still char heh |
| 2020-11-08 22:19:49 | → | britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch) |
| 2020-11-08 22:20:13 | <hekkaidekapus> | newbi: And `xs = [1, 2]`? |
| 2020-11-08 22:20:30 | <newbi> | its a list of integers |
| 2020-11-08 22:20:51 | <hekkaidekapus> | So, can I do `xs = [1, '2']`? |
| 2020-11-08 22:20:55 | <newbi> | oh okay when i put everything in commas it works. but can you have a mixed list? |
| 2020-11-08 22:21:02 | <newbi> | its like a mixed list |
| 2020-11-08 22:21:10 | <newbi> | i dont know if you can do that |
| 2020-11-08 22:21:16 | <Feuermagier> | koz_, sry, a bit new :) - guards are the: func 0 = a; func 1 = b; func n = something; - right? |
| 2020-11-08 22:21:28 | <koz_> | Feuermagier: No, that's different. |
| 2020-11-08 22:21:30 | <koz_> | Let me paste. |
| 2020-11-08 22:21:49 | <hekkaidekapus> | newbi: You cannot. A list is a collection of elements of the same type. |
| 2020-11-08 22:22:09 | → | christo joins (~chris@81.96.113.213) |
| 2020-11-08 22:22:21 | <newbi> | thank you :) |
| 2020-11-08 22:22:35 | <hekkaidekapus> | newbi: In your pasted code, you want `f1 ['a','2','4','b','4']`. |
| 2020-11-08 22:22:55 | <koz_> | Feuermagier: https://gist.github.com/kozross/c866e0fcf9736131ebf8548f425b3f69 |
| 2020-11-08 22:23:25 | <koz_> | There's no requirement to use the && and comparisons either - any predicate would work. |
| 2020-11-08 22:23:25 | <Feuermagier> | koz_, thank you! - looks exactly like what i need :D |
| 2020-11-08 22:23:37 | × | britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Client Quit) |
| 2020-11-08 22:24:14 | <Feuermagier> | koz_, if doAThing returns the function I assume I can rely on it being executed top to bot? |
| 2020-11-08 22:24:33 | <koz_> | Feuermagier: What do you mean 'returns the function'? |
| 2020-11-08 22:24:54 | × | bitmagie quits (~Thunderbi@200116b8065109002122c91a2ba34b6c.dip.versatel-1u1.de) (Quit: bitmagie) |
| 2020-11-08 22:25:19 | <Feuermagier> | koz_, well, actually, I think everything in haskell "returns" |
| 2020-11-08 22:25:19 | × | newbi quits (4dd82022@77.216.32.34) (Remote host closed the connection) |
| 2020-11-08 22:25:40 | <koz_> | Feuermagier: Basically, if your guards are non-overlapping, this doesn't matter. |
| 2020-11-08 22:25:46 | <Feuermagier> | koz_, just meant that it won't fall through if matched |
| 2020-11-08 22:25:52 | <Feuermagier> | exactly |
| 2020-11-08 22:26:00 | <koz_> | If your guards _are_ overlapping, I believe top-to-bottom, but I would argue overlapping guards are probably a bug. |
| 2020-11-08 22:26:14 | <koz_> | We avoid 'fall-through' by having 'otherwise' at the end, which is a synonym for 'True'. |
| 2020-11-08 22:26:55 | × | zeta_0 quits (~zeta@2601:8c0:1:2630:ed7c:84af:22a9:2ea3) (Quit: rcirc on GNU Emacs 27.1) |
| 2020-11-08 22:27:42 | → | rawtaz1 joins (~rawtaz@178.239.168.171) |
| 2020-11-08 22:28:03 | × | jedws quits (~jedws@101.184.150.81) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2020-11-08 22:28:24 | → | kish` joins (~oracle@unaffiliated/oracle) |
| 2020-11-08 22:29:15 | × | shutdown_-h_now quits (~arjan@2001:1c06:2d0b:2312:95b6:c7bf:d0d6:b6df) (Ping timeout: 272 seconds) |
| 2020-11-08 22:31:05 | × | kish quits (~oracle@unaffiliated/oracle) (Ping timeout: 240 seconds) |
| 2020-11-08 22:31:31 | × | subttle quits (~anonymous@unaffiliated/subttle) (Quit: leaving) |
| 2020-11-08 22:31:54 | × | jneira quits (5127ac76@gateway/web/cgi-irc/kiwiirc.com/ip.81.39.172.118) (Ping timeout: 272 seconds) |
| 2020-11-08 22:33:02 | <comerijn> | guards are always top to bottom |
| 2020-11-08 22:33:19 | <comerijn> | Incidentally, if you have incomplete guards it will fall through to the next matching pattern |
| 2020-11-08 22:33:28 | <comerijn> | Which can be very useful in a bunch of cases |
| 2020-11-08 22:34:36 | → | Tario joins (~Tario@201.192.165.173) |
| 2020-11-08 22:36:08 | lep-delete | is now known as Guest67212 |
| 2020-11-08 22:36:22 | <koz_> | @pl \f g x -> fmap (>>= f) (g x) |
| 2020-11-08 22:36:22 | <lambdabot> | (.) . fmap . (=<<) |
| 2020-11-08 22:36:33 | → | shutdown_-h_now joins (~arjan@2001:1c06:2d0b:2312:f95b:bc04:4b:611e) |
| 2020-11-08 22:36:46 | <koz_> | Lol, so I can replace that with (.) . (<$>) . (=<<), sick. |
| 2020-11-08 22:36:54 | <koz_> | Are we J now? |
| 2020-11-08 22:37:50 | → | jbox joins (~atlas@unaffiliated/jbox) |
| 2020-11-08 22:40:43 | × | erisco quits (~erisco@d24-57-249-233.home.cgocable.net) (Quit: Leaving) |
| 2020-11-08 22:42:09 | → | justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311) |
| 2020-11-08 22:42:57 | <comerijn> | What? |
| 2020-11-08 22:42:59 | × | __monty__ quits (~toonn@unaffiliated/toonn) (Quit: leaving) |
| 2020-11-08 22:43:06 | <comerijn> | That's, like, 15 characters |
| 2020-11-08 22:43:18 | <comerijn> | That's like 3x the size of the average J program :p |
| 2020-11-08 22:43:25 | <koz_> | comerijn: Lol. |
| 2020-11-08 22:43:43 | <koz_> | It's all those parens. |
| 2020-11-08 22:43:50 | <koz_> | It's like, LispJ. |
| 2020-11-08 22:47:38 | → | Jesin joins (~Jesin@pool-72-66-101-18.washdc.fios.verizon.net) |
| 2020-11-08 22:50:37 | × | tromp_ quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection) |
| 2020-11-08 22:50:52 | → | tromp joins (~tromp@dhcp-077-249-230-040.chello.nl) |
| 2020-11-08 22:51:49 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 2020-11-08 22:52:39 | → | jonatanb joins (~jonatanb@83.24.9.26.ipv4.supernova.orange.pl) |
| 2020-11-08 22:52:53 | × | machinedgod quits (~machinedg@24.105.81.50) (Client Quit) |
| 2020-11-08 22:53:17 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 2020-11-08 22:54:56 | <koz_> | :t compare 1 2 |
| 2020-11-08 22:54:57 | <lambdabot> | Ordering |
| 2020-11-08 22:55:02 | <koz_> | > compare 1 2 |
| 2020-11-08 22:55:04 | <lambdabot> | LT |
| 2020-11-08 22:55:09 | <koz_> | > compare 2 1 |
All times are in UTC.