Logs: freenode/#haskell
| 2021-03-07 13:19:41 | × | Feuermagier quits (~Feuermagi@213.178.26.41) (Remote host closed the connection) |
| 2021-03-07 13:21:05 | → | johannes_ joins (~johannes@i59F67BC5.versanet.de) |
| 2021-03-07 13:21:05 | johannes_ | is now known as kenran |
| 2021-03-07 13:26:44 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:9814:d93f:56c2:c87) |
| 2021-03-07 13:29:14 | → | gitgood joins (~gitgood@82-132-217-191.dab.02.net) |
| 2021-03-07 13:30:55 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:9814:d93f:56c2:c87) (Ping timeout: 240 seconds) |
| 2021-03-07 13:33:06 | × | caubert quits (~caubert@136.244.111.235) (Quit: WeeChat 3.0) |
| 2021-03-07 13:34:58 | → | caubert joins (~caubert@136.244.111.235) |
| 2021-03-07 13:35:01 | → | mels joins (~mels@49.82.5.96) |
| 2021-03-07 13:35:01 | × | mels quits (~mels@49.82.5.96) (Client Quit) |
| 2021-03-07 13:36:12 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 2021-03-07 13:36:34 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 2021-03-07 13:41:11 | × | drbean quits (~drbean@TC210-63-209-46.static.apol.com.tw) (Quit: ZNC 1.8.2+cygwin2 - https://znc.in) |
| 2021-03-07 13:41:12 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 246 seconds) |
| 2021-03-07 13:44:42 | × | kiweun quits (~kiweun@2607:fea8:2a62:9600:74fd:e866:9de5:532e) (Remote host closed the connection) |
| 2021-03-07 13:47:35 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:9814:d93f:56c2:c87) |
| 2021-03-07 13:52:19 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:9814:d93f:56c2:c87) (Ping timeout: 258 seconds) |
| 2021-03-07 13:54:48 | → | sablib joins (~sablib@59.173.152.160) |
| 2021-03-07 13:55:28 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 245 seconds) |
| 2021-03-07 13:56:27 | → | bigbosskor joins (~Android@223.204.217.185) |
| 2021-03-07 13:58:09 | × | mrchampion quits (~mrchampio@38.18.109.23) (Ping timeout: 264 seconds) |
| 2021-03-07 13:58:12 | × | bigbosskor quits (~Android@223.204.217.185) (Read error: Connection reset by peer) |
| 2021-03-07 13:58:27 | → | vjacob joins (~vjacob@217.71.0.65) |
| 2021-03-07 14:00:09 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 2021-03-07 14:07:56 | → | stree joins (~stree@68.36.8.116) |
| 2021-03-07 14:08:14 | × | hendi quits (uid489601@gateway/web/irccloud.com/x-ftqhmsnmlpiygdyy) (Quit: Connection closed for inactivity) |
| 2021-03-07 14:08:24 | → | bitmapper joins (uid464869@gateway/web/irccloud.com/x-zoarwbqxbjmuxhqo) |
| 2021-03-07 14:08:27 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:9814:d93f:56c2:c87) |
| 2021-03-07 14:08:36 | → | ADG1089__ joins (~aditya@122.163.167.99) |
| 2021-03-07 14:11:34 | → | supercoven joins (~Supercove@dsl-hkibng31-54fabd-233.dhcp.inet.fi) |
| 2021-03-07 14:11:37 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:40e7:d7b:f52e:210c) |
| 2021-03-07 14:12:35 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:9814:d93f:56c2:c87) (Ping timeout: 240 seconds) |
| 2021-03-07 14:14:36 | → | kunsttyv joins (~kunsttyv@ti0005q162-5102.bb.online.no) |
| 2021-03-07 14:19:45 | × | kunsttyv quits (~kunsttyv@ti0005q162-5102.bb.online.no) (Ping timeout: 264 seconds) |
| 2021-03-07 14:21:06 | → | Mrbuck joins (~Mrbuck@gateway/tor-sasl/mrbuck) |
| 2021-03-07 14:23:29 | ← | shad0w_ parts (a0ca251e@160.202.37.30) () |
| 2021-03-07 14:29:12 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:9814:d93f:56c2:c87) |
| 2021-03-07 14:29:45 | → | usr25 joins (~usr25@unaffiliated/usr25) |
| 2021-03-07 14:31:35 | → | ephemera_ joins (~E@122.34.1.187) |
| 2021-03-07 14:33:15 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:9814:d93f:56c2:c87) (Ping timeout: 240 seconds) |
| 2021-03-07 14:33:20 | → | ep1ctetus joins (~epictetus@ip72-194-215-136.sb.sd.cox.net) |
| 2021-03-07 14:34:05 | → | pavonia joins (~user@unaffiliated/siracusa) |
| 2021-03-07 14:34:32 | × | eoyath quits (uid489605@gateway/web/irccloud.com/x-jbebfqsuczylpppq) (Quit: Connection closed for inactivity) |
| 2021-03-07 14:35:27 | × | dragestil quits (~quassel@fsf/member/dragestil) (Ping timeout: 246 seconds) |
| 2021-03-07 14:37:26 | → | idhugo joins (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) |
| 2021-03-07 14:39:53 | × | mikoto-chan quits (~anass@gateway/tor-sasl/mikoto-chan) (Remote host closed the connection) |
| 2021-03-07 14:41:51 | × | frozenErebus quits (~frozenEre@94.128.82.20) (Ping timeout: 256 seconds) |
| 2021-03-07 14:44:05 | → | dragestil joins (~quassel@fsf/member/dragestil) |
| 2021-03-07 14:44:49 | → | geekosaur joins (ae68c070@cpe-174-104-192-112.neo.res.rr.com) |
| 2021-03-07 14:46:06 | → | rond_ joins (594020c5@89-64-32-197.dynamic.chello.pl) |
| 2021-03-07 14:47:46 | <rond_> | HI! I've got a basic question about this code snippet: |
| 2021-03-07 14:47:46 | <rond_> | ` |
| 2021-03-07 14:47:47 | <rond_> | bmiTell :: (RealFloat a) => a -> a -> String |
| 2021-03-07 14:47:47 | <rond_> | bmiTell weight height |
| 2021-03-07 14:47:48 | <rond_> | | weight / height ^ 2 <= 18.5 = "You're underweight, you emo, you!" |
| 2021-03-07 14:47:48 | <rond_> | | weight / height ^ 2 <= 25.0 = "You're supposedly normal. Pffft, I bet you're ugly!" |
| 2021-03-07 14:47:49 | <rond_> | | weight / height ^ 2 <= 30.0 = "You're fat! Lose some weight, fatty!" |
| 2021-03-07 14:47:49 | <rond_> | | otherwise = "You're a whale, congratulations!" |
| 2021-03-07 14:47:50 | <rond_> | ` |
| 2021-03-07 14:47:50 | <rond_> | How to refactor it so the computation of bmi ( `weight / height ^ 2` ) is present just once? In Ocaml it'd be something like: |
| 2021-03-07 14:47:51 | <rond_> | ` |
| 2021-03-07 14:47:51 | <rond_> | let bmiTell weight height = |
| 2021-03-07 14:47:52 | <rond_> | let bmi = weight / height ^ 2 in |
| 2021-03-07 14:47:52 | <rond_> | match bmi with |
| 2021-03-07 14:47:52 | × | rond_ quits (594020c5@89-64-32-197.dynamic.chello.pl) (Killed (Sigyn (Spam is off topic on freenode.))) |
| 2021-03-07 14:47:59 | <jess> | huff. |
| 2021-03-07 14:48:15 | <ADG1089__> | body shaming |
| 2021-03-07 14:48:55 | → | rond_ joins (594020c5@89-64-32-197.dynamic.chello.pl) |
| 2021-03-07 14:48:59 | <jess> | hi rond_ |
| 2021-03-07 14:49:07 | → | Alleria joins (~textual@zrcout.mskcc.org) |
| 2021-03-07 14:49:11 | <jess> | please don't paste lots of lines straight in to irc |
| 2021-03-07 14:49:17 | <jess> | put it on a pastebin and link to that :) |
| 2021-03-07 14:49:22 | <rond_> | Right, sorry |
| 2021-03-07 14:49:30 | <geekosaur> | I'd use a where clause. but it's painful to show that when you've pasted toirc like that |
| 2021-03-07 14:49:30 | Alleria | is now known as Guest95072 |
| 2021-03-07 14:49:31 | <jess> | no problem, happens to lots of people |
| 2021-03-07 14:49:34 | <int-e> | rond_: use a pastebin next time. you can use a `where` clause to define values that you want to use in guards |
| 2021-03-07 14:49:38 | <geekosaur> | @where paste |
| 2021-03-07 14:49:38 | <lambdabot> | Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com |
| 2021-03-07 14:49:58 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:9814:d93f:56c2:c87) |
| 2021-03-07 14:49:58 | → | jamm_ joins (~jamm@unaffiliated/jamm) |
| 2021-03-07 14:50:31 | <int-e> | > let foo x | a < 10 = "smaller" | otherwise = "not smaller" where a = x^2 in (foo 3, foo 4) |
| 2021-03-07 14:50:33 | <lambdabot> | ("smaller","not smaller") |
| 2021-03-07 14:51:54 | <rond_> | Perfect, thanks! Sidenote: seems a bit counter-intuitive that `where` clause is at the very bottom; I'd rather see it on the very top. :) Anyway, thanks! |
| 2021-03-07 14:52:31 | <int-e> | other possibilities inlcude... let a = x^2; result | a < 10 = "smaller" | otherwise = "not smaller" in result... |
| 2021-03-07 14:52:39 | → | mikoto-chan joins (~anass@gateway/tor-sasl/mikoto-chan) |
| 2021-03-07 14:53:29 | <int-e> | or some silly let a = x^2 in case () of _ | a < 10 -> "smaller" | otherwise -> "not smaller" -- but that seems ugly to me |
| 2021-03-07 14:53:46 | → | urodna joins (~urodna@unaffiliated/urodna) |
| 2021-03-07 14:54:04 | <rond_> | Well, I'm just learning Haskell, so I'll stick with `where` for now as it seems to be the default solution |
| 2021-03-07 14:54:15 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:9814:d93f:56c2:c87) (Ping timeout: 240 seconds) |
| 2021-03-07 14:54:56 | → | frozenErebus joins (~frozenEre@94.128.82.20) |
| 2021-03-07 14:55:07 | → | albert_99 joins (~Albert@2a02:8108:1100:16d8:3d62:b7ae:fd76:eaae) |
| 2021-03-07 14:55:41 | × | albert_99 quits (~Albert@2a02:8108:1100:16d8:3d62:b7ae:fd76:eaae) (Client Quit) |
| 2021-03-07 14:57:48 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 2021-03-07 14:59:15 | × | frozenErebus quits (~frozenEre@94.128.82.20) (Ping timeout: 246 seconds) |
| 2021-03-07 14:59:57 | → | DrowsySaturn joins (~DrowsySat@71.71.194.219) |
| 2021-03-07 15:00:25 | → | son0p joins (~son0p@181.136.122.143) |
| 2021-03-07 15:00:27 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-03-07 15:02:26 | × | obiwahn quits (~obiwahn@pdpc/supporter/student/obiwahn) (Quit: WeeChat 3.0-dev) |
| 2021-03-07 15:04:29 | → | ech joins (~user@gateway/tor-sasl/ech) |
All times are in UTC.