Logs: freenode/#haskell
| 2020-11-14 10:20:53 | → | solonarv joins (~solonarv@astrasbourg-653-1-156-155.w90-6.abo.wanadoo.fr) |
| 2020-11-14 10:20:57 | × | xerox_ quits (~xerox@unaffiliated/xerox) (Ping timeout: 260 seconds) |
| 2020-11-14 10:23:36 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2020-11-14 10:24:08 | × | ensyde quits (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) (Ping timeout: 260 seconds) |
| 2020-11-14 10:26:05 | × | avdb quits (~avdb@ip-83-134-109-203.dsl.scarlet.be) (Ping timeout: 240 seconds) |
| 2020-11-14 10:29:25 | → | ensyde joins (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) |
| 2020-11-14 10:29:42 | × | son0p quits (~son0p@186.159.4.142) (Ping timeout: 256 seconds) |
| 2020-11-14 10:29:42 | × | Sgeo quits (~Sgeo@ool-18b982ad.dyn.optonline.net) (Read error: Connection reset by peer) |
| 2020-11-14 10:29:49 | × | Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
| 2020-11-14 10:30:35 | × | bitmagie quits (~Thunderbi@200116b806cd09008041507575aa598a.dip.versatel-1u1.de) (Quit: bitmagie) |
| 2020-11-14 10:31:42 | × | chaosmasttter quits (~chaosmast@p200300c4a70f620115f0ead7b0e70c62.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 2020-11-14 10:33:31 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-11-14 10:33:32 | × | christo quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 2020-11-14 10:34:22 | × | ensyde quits (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) (Ping timeout: 260 seconds) |
| 2020-11-14 10:38:21 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds) |
| 2020-11-14 10:39:39 | → | ensyde joins (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) |
| 2020-11-14 10:43:34 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 2020-11-14 10:44:33 | × | ensyde quits (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) (Ping timeout: 260 seconds) |
| 2020-11-14 10:44:59 | → | plutoniix joins (~q@node-ujy.pool-125-24.dynamic.totinternet.net) |
| 2020-11-14 10:45:27 | → | kuribas joins (~user@ptr-25vy0i82x0ic2ow7do5.18120a2.ip6.access.telenet.be) |
| 2020-11-14 10:45:59 | <kuribas> | if I return (pure foo :: IO Foo), does foo get evaluated to WHNF? |
| 2020-11-14 10:46:29 | <merijn> | That does nothing to foo |
| 2020-11-14 10:47:26 | × | xff0x quits (~fox@2001:1a81:522c:400:5e4f:911d:8651:d35d) (Ping timeout: 264 seconds) |
| 2020-11-14 10:47:47 | → | xff0x joins (~fox@2001:1a81:522c:400:49a5:3bcd:47e1:394e) |
| 2020-11-14 10:47:48 | → | SweetAmy19 joins (~hey@45.133.182.164) |
| 2020-11-14 10:47:59 | <kuribas> | if I have "withFile fp mode $ \h -> foo", how do I ensure the result of foo is in WHNF |
| 2020-11-14 10:48:00 | <kuribas> | ? |
| 2020-11-14 10:48:38 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds) |
| 2020-11-14 10:48:51 | <maerwald> | why do you care? |
| 2020-11-14 10:48:57 | <merijn> | eh, with lots of pain and effort |
| 2020-11-14 10:49:05 | <merijn> | Allow me to recommen a better solution |
| 2020-11-14 10:49:12 | <merijn> | Don't use lazy IO so it doesn't matter |
| 2020-11-14 10:49:35 | <kuribas> | well it will work if the argument is in WHNF |
| 2020-11-14 10:49:45 | → | ensyde joins (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) |
| 2020-11-14 10:49:45 | SweetAmy19 | 19/f looking for older. This is me naked: https://imagetwist.com/c60gumtcigj7/nude5.jpg Do you like my pussy? |
| 2020-11-14 10:50:04 | <merijn> | It's that time of year where freenode gets spammed again? |
| 2020-11-14 10:50:23 | <maerwald> | Christmas is a lonely time |
| 2020-11-14 10:51:10 | <hc> | kuribas: could you give a bit more context? what are you trying to do? |
| 2020-11-14 10:51:23 | <kuribas> | hc: I am writing an xml parser on top of hexpat |
| 2020-11-14 10:52:30 | <merijn> | Just read the entire file strictly, presumably any (sane) XML file will be a few MB max anyway |
| 2020-11-14 10:52:43 | SweetAmy19 | 19/f looking for older. This is me naked: https://imagetwist.com/c60gumtcigj7/nude5.jpg Do you like my pussy? |
| 2020-11-14 10:53:04 | → | whatisRT joins (~whatisRT@ip5b416a33.dynamic.kabel-deutschland.de) |
| 2020-11-14 10:53:09 | <merijn> | @where ops |
| 2020-11-14 10:53:09 | <lambdabot> | byorgey Cale conal copumpkin dcoutts dibblego dolio edwardk geekosaur glguy jmcarthur johnw mniip monochrom quicksilver shachaf shapr ski |
| 2020-11-14 10:53:13 | <kuribas> | merijn: well, it's supposed to be a "streaming parser". |
| 2020-11-14 10:53:32 | <SweetAmy19> | 19/f looking for older. This is me naked: https://imagetwist.com/c60gumtcigj7/nude5.jpg Do you like my pussy? |
| 2020-11-14 10:53:35 | <merijn> | kuribas: Well, there's a reason conduit & co were invented |
| 2020-11-14 10:53:50 | <kuribas> | merijn: conduit will be supported as well :) |
| 2020-11-14 10:54:01 | × | SweetAmy19 quits (~hey@45.133.182.164) (Remote host closed the connection) |
| 2020-11-14 10:54:18 | → | jonatanb joins (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) |
| 2020-11-14 10:54:25 | × | ensyde quits (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) (Ping timeout: 240 seconds) |
| 2020-11-14 10:54:29 | → | Ariakenom joins (~Ariakenom@h-82-196-111-82.NA.cust.bahnhof.se) |
| 2020-11-14 10:57:45 | <kuribas> | merijn: what about pure $! foo ? |
| 2020-11-14 10:58:50 | × | plutoniix quits (~q@node-ujy.pool-125-24.dynamic.totinternet.net) (Quit: Leaving) |
| 2020-11-14 10:59:30 | <kuribas> | that should first evaluate foo no WHNF, then return it from the IO action. |
| 2020-11-14 10:59:53 | → | xerox_ joins (~xerox@unaffiliated/xerox) |
| 2020-11-14 10:59:55 | → | ensyde joins (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) |
| 2020-11-14 11:00:10 | × | shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection) |
| 2020-11-14 11:00:53 | <kuribas> | merijn: it can be still handy to parse a huge file in constant space. I know LazyIO is quick and dirty, but sometimes that's all you need :) |
| 2020-11-14 11:01:03 | → | directhex1 joins (~directhex@139.28.218.148) |
| 2020-11-14 11:02:15 | <kuribas> | that seems to work: pure undefined >> pure 3 => 3 |
| 2020-11-14 11:02:15 | <kuribas> | |
| 2020-11-14 11:02:24 | <kuribas> | (pure $! undefined) >> pure 3 => *** Exception: Prelude.undefined |
| 2020-11-14 11:04:31 | → | shatriff joins (~vitaliish@176.52.219.10) |
| 2020-11-14 11:04:42 | × | ensyde quits (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) (Ping timeout: 260 seconds) |
| 2020-11-14 11:06:51 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 2020-11-14 11:08:30 | <kuribas> | merijn: note that my function is safe, because to ensure that the xml contains no errors it has to read the whole file. Well at least the portion that needs to be parsed. |
| 2020-11-14 11:08:52 | <kuribas> | merijn: so evaluating to WHNF will ensure a complete read. |
| 2020-11-14 11:09:36 | → | AlterEgo- joins (~ladew@124-198-158-163.dynamic.caiway.nl) |
| 2020-11-14 11:10:04 | → | ensyde joins (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) |
| 2020-11-14 11:14:58 | × | ensyde quits (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) (Ping timeout: 256 seconds) |
| 2020-11-14 11:16:02 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 2020-11-14 11:19:56 | × | Guest52652 quits (~ao2@178.162.212.214) (Remote host closed the connection) |
| 2020-11-14 11:20:13 | → | ensyde joins (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) |
| 2020-11-14 11:20:36 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 258 seconds) |
| 2020-11-14 11:21:07 | → | HaskellYogi joins (~vivekrama@49.207.205.17) |
| 2020-11-14 11:22:45 | × | jonatanb quits (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) () |
| 2020-11-14 11:25:25 | × | ensyde quits (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) (Ping timeout: 265 seconds) |
| 2020-11-14 11:25:54 | <HaskellYogi> | Hello all, I am unable to use the if statement given in the code here. https://pastebin.com/BvTCXhLr Can someone suggest an alternative |
| 2020-11-14 11:26:34 | <kuribas> | HaskellYogi: what's the value of total when flag is False? |
| 2020-11-14 11:26:42 | → | alp joins (~alp@2a01:e0a:58b:4920:500f:4850:8bc3:6c93) |
| 2020-11-14 11:27:07 | <kuribas> | HaskellYogi: you need to invert it: let total |flag = ... | otherwise = ... |
| 2020-11-14 11:27:48 | <kuribas> | and modVal is indented wrong |
| 2020-11-14 11:27:51 | <HaskellYogi> | when false is false I want total = (modChr char) - (getKeyToInt key ) when true total = (modChr char) + (getKeyToInt key ) |
| 2020-11-14 11:28:40 | <HaskellYogi> | @kuribas modval is part of let statement |
| 2020-11-14 11:28:40 | <lambdabot> | Unknown command, try @list |
| 2020-11-14 11:29:33 | <kuribas> | so let total | flag = (modChr char) + ... | otherwise = (modChr char) - ... |
| 2020-11-14 11:29:51 | <kuribas> | HaskellYogi: and put modVal on the same column as total |
| 2020-11-14 11:30:08 | × | Alleria_ quits (~AllahuAkb@2604:2000:1484:26:38df:6fa9:13ce:5626) (Quit: Textual IRC Client: www.textualapp.com) |
| 2020-11-14 11:30:18 | <HaskellYogi> | okay let me invert and see |
| 2020-11-14 11:30:26 | <kuribas> | HaskellYogi: alternatively let total = if flag then ... else ... |
| 2020-11-14 11:30:34 | <kuribas> | but I prefer guards |
| 2020-11-14 11:32:03 | <kuribas> | HaskellYogi: or a third way: total = (if flag then (+) else (-)) (modCHar char) (getKeyToInt key) |
| 2020-11-14 11:32:30 | <kuribas> | wether that's clearer is debatable |
| 2020-11-14 11:32:42 | × | todda7 quits (~torstein@ppp-2-84-17-169.home.otenet.gr) (Ping timeout: 260 seconds) |
| 2020-11-14 11:33:08 | <HaskellYogi> | Thanks a ton this works https://pastebin.com/dBj3F4m1 I learned something new today |
| 2020-11-14 11:34:11 | <kuribas> | HaskellYogi: indentation is a bit weird, but that should work |
| 2020-11-14 11:34:17 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-11-14 11:34:58 | <HaskellYogi> | why do you say @kuribas, can you please show me the right way, so that I can improve |
| 2020-11-14 11:36:47 | <kuribas> | there is not a "right way", but I prefer this: https://gist.github.com/kuribas/a5226405be7c9209bc1978236b93b660 |
All times are in UTC.