Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-04-22 19:26:44 __minoru__shirae joins (~shiraeesh@46.34.206.15)
2021-04-22 19:27:11 × minoru_shiraeesh quits (~shiraeesh@46.34.207.53) (Ping timeout: 240 seconds)
2021-04-22 19:27:17 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2021-04-22 19:27:53 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 252 seconds)
2021-04-22 19:29:28 ep1ctetus_ joins (~epictetus@ip72-194-54-201.sb.sd.cox.net)
2021-04-22 19:30:56 geowiesnot joins (~user@87-89-181-157.abo.bbox.fr)
2021-04-22 19:31:46 × jijimofo quits (~cmo@S010610561191f5d6.lb.shawcable.net) (Remote host closed the connection)
2021-04-22 19:32:17 × epicte7us quits (~epictetus@ip72-194-54-201.sb.sd.cox.net) (Ping timeout: 252 seconds)
2021-04-22 19:33:17 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-04-22 19:36:58 redmp_ joins (~redmp@172.58.22.224)
2021-04-22 19:37:39 jakalx joins (~jakalx@base.jakalx.net)
2021-04-22 19:37:58 × Kaivo quits (~Kaivo@104-200-86-99.mc.derytele.com) (Ping timeout: 260 seconds)
2021-04-22 19:38:10 jneira joins (501e65b6@gateway/web/cgi-irc/kiwiirc.com/ip.80.30.101.182)
2021-04-22 19:38:25 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds)
2021-04-22 19:39:26 epicte7us joins (~epictetus@ip72-194-54-201.sb.sd.cox.net)
2021-04-22 19:39:46 × redmp quits (~redmp@172.58.22.204) (Ping timeout: 240 seconds)
2021-04-22 19:40:48 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-04-22 19:41:03 kenanmarasli joins (1fdf0934@31.223.9.52)
2021-04-22 19:42:01 × invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 252 seconds)
2021-04-22 19:42:33 × ep1ctetus_ quits (~epictetus@ip72-194-54-201.sb.sd.cox.net) (Ping timeout: 252 seconds)
2021-04-22 19:42:56 Wo[m] parts (lykos-2021@gateway/shell/matrix.org/x-tfamvfkpyyipdlgr) ("User left")
2021-04-22 19:44:23 <kenanmarasli> What's the proper way to use a list comprehension with record types? I want to apply some changes on a specific field of a record with a function that takes an array of these records:
2021-04-22 19:44:24 <kenanmarasli> https://paste.tomsmeding.com/vHebaVIs
2021-04-22 19:44:34 falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net)
2021-04-22 19:44:49 × tsaka_ quits (~torstein@athedsl-4519432.home.otenet.gr) (Ping timeout: 265 seconds)
2021-04-22 19:46:13 <c_wraith> you're combining record update syntax with non-record syntax in a syntactically invalid way.
2021-04-22 19:47:29 <c_wraith> You should pick one or the other. In this case, since you're really close to the non-record syntax: https://paste.tomsmeding.com/kbhOlxIa
2021-04-22 19:47:59 <c_wraith> that's a fine way to do things. You can access constructor fields positionally, even with records
2021-04-22 19:48:28 <kenanmarasli> OH, you are right! Why did I put those curly braces there!?
2021-04-22 19:48:53 <c_wraith> With record update syntax, it'd look like this: https://paste.tomsmeding.com/Ep1EO360
2021-04-22 19:49:31 <kenanmarasli> Thank you c_wraith. It's all clear to me now
2021-04-22 19:49:41 <c_wraith> you're welcome. ==
2021-04-22 19:49:58 <c_wraith> (ok, those equals signs were a typo and probably a sign I need lunch)
2021-04-22 19:50:11 notzmv joins (~zmv@unaffiliated/zmv)
2021-04-22 19:50:41 <lovesegfault> I'm trying to write a function aliquotSum :: Int -> Int, and I did this: aliquotSum = \n -> sum . filter (\i -> n `mod` i == 0) . [1..(n / 2 + 1)]
2021-04-22 19:51:05 <lovesegfault> but I'm now in typecheck hell, can't really understand why :/
2021-04-22 19:51:26 <Rembane> lovesegfault: What does the typechecker say?
2021-04-22 19:51:41 <lovesegfault> • Couldn't match expected type ‘Int’ with actual type ‘a0 -> Int’
2021-04-22 19:52:06 × aveltras quits (uid364989@gateway/web/irccloud.com/x-cudhvvtoyvyrmfsp) (Ping timeout: 258 seconds)
2021-04-22 19:52:09 <lovesegfault> applying both to the whole function, and then I get the same error but just regarding [1..(n / 2 + 1)]
2021-04-22 19:52:23 × wpcarro_ quits (sid397589@gateway/web/irccloud.com/x-sldapopyxsudveqd) (Ping timeout: 260 seconds)
2021-04-22 19:52:23 × natim87 quits (sid286962@gateway/web/irccloud.com/x-zjxraovaekqnvloq) (Ping timeout: 260 seconds)
2021-04-22 19:52:23 × joshmeredith quits (sid387798@gateway/web/irccloud.com/x-uxsrlglojomperah) (Ping timeout: 260 seconds)
2021-04-22 19:52:35 <Rembane> lovesegfault: Remove the dot before the list
2021-04-22 19:52:37 × Synthetica quits (uid199651@gateway/web/irccloud.com/x-ycrvxeagazjstjgn) (Ping timeout: 250 seconds)
2021-04-22 19:52:41 × totbwf quits (sid402332@gateway/web/irccloud.com/x-jgucijbluktlkqeh) (Read error: Connection reset by peer)
2021-04-22 19:52:43 × ebutleriv quits (sid217783@gateway/web/irccloud.com/x-kcykiaawmgqipkin) (Read error: Connection reset by peer)
2021-04-22 19:52:44 × systemfault quits (sid267009@gateway/web/irccloud.com/x-vjyxibauadwbmonn) (Read error: Connection reset by peer)
2021-04-22 19:52:45 × cemerick quits (sid54985@gateway/web/irccloud.com/x-kwtgvqjjvamnvimg) (Read error: Connection reset by peer)
2021-04-22 19:52:46 × eruditass quits (uid248673@gateway/web/irccloud.com/x-rmgyvfwfwnnqqsta) (Read error: Connection reset by peer)
2021-04-22 19:52:46 × jared-w quits (uid405292@gateway/web/irccloud.com/x-keywjzriwtlueymw) (Ping timeout: 240 seconds)
2021-04-22 19:52:46 × d0liver quits (sid363046@gateway/web/irccloud.com/x-bijzbspzjskqwcir) (Read error: Connection reset by peer)
2021-04-22 19:52:48 × benwr____ quits (sid372383@gateway/web/irccloud.com/x-ynyqxqvppapkphki) (Ping timeout: 246 seconds)
2021-04-22 19:52:51 × liquorice quits (sid267884@gateway/web/irccloud.com/x-gifxlxspxpkuruyr) (Read error: Connection reset by peer)
2021-04-22 19:52:51 × ryjm quits (sid383513@gateway/web/irccloud.com/x-xahyphcnhjupdxdl) (Read error: Connection reset by peer)
2021-04-22 19:52:51 × luite quits (sid387799@gateway/web/irccloud.com/x-xdgiulydxgunnqir) (Read error: Connection reset by peer)
2021-04-22 19:52:51 × ReinH quits (sid179972@gateway/web/irccloud.com/x-yfquzpeultndckwv) (Read error: Connection reset by peer)
2021-04-22 19:52:51 × alanz quits (sid110616@gateway/web/irccloud.com/x-qjhghsxjfupjbdeb) (Read error: Connection reset by peer)
2021-04-22 19:52:51 × b20n quits (sid115913@gateway/web/irccloud.com/x-fxwwqjclpbrawyzj) (Read error: Connection reset by peer)
2021-04-22 19:52:51 × davetapley quits (sid666@gateway/web/irccloud.com/x-ohjwsogbmepwkutt) (Read error: Connection reset by peer)
2021-04-22 19:52:51 × bradparker quits (sid262931@gateway/web/irccloud.com/x-usqfoiaovgpgwnbj) (Read error: Connection reset by peer)
2021-04-22 19:52:51 × SrPx quits (sid108780@gateway/web/irccloud.com/x-fmknnxofuaimdify) (Read error: Connection reset by peer)
2021-04-22 19:52:51 × sz0 quits (uid110435@gateway/web/irccloud.com/x-zwmbhzhzwgqqzplk) (Read error: Connection reset by peer)
2021-04-22 19:53:03 × AndreasK quits (sid320732@gateway/web/irccloud.com/x-gcnznttjjbhixeuo) (Read error: Connection reset by peer)
2021-04-22 19:53:19 × aristid quits (sid1599@gateway/web/irccloud.com/x-xoxalrdohmfrqftu) (Ping timeout: 260 seconds)
2021-04-22 19:53:22 <Rembane> lovesegfault: You can replace it with a $ if you want to, otherwise you need parentheses
2021-04-22 19:53:48 × lally quits (sid388228@gateway/web/irccloud.com/x-jtlutemywqmachbj) (Ping timeout: 260 seconds)
2021-04-22 19:53:50 <lovesegfault> Ah :D
2021-04-22 19:53:52 × remby quits (~remby@bras-base-london1483w-grc-43-65-95-173-128.dsl.bell.ca) (Quit: Going offline, see ya! (www.adiirc.com))
2021-04-22 19:54:56 <c_wraith> You will still have a problem, though.
2021-04-22 19:55:09 <c_wraith> > 4 / 2 :: Int
2021-04-22 19:55:10 <lambdabot> error:
2021-04-22 19:55:11 <lambdabot> • No instance for (Fractional Int) arising from a use of ‘/’
2021-04-22 19:55:12 <lambdabot> • In the expression: 4 / 2 :: Int
2021-04-22 19:55:25 <Rembane> lovesegfault: And you can put the argument to the function before the equal sign. Like this: aliquotSum n = ...
2021-04-22 19:55:27 <lovesegfault> I did n `div` 2
2021-04-22 19:55:40 <lovesegfault> Rembane: Ah, that is way nicer :D
2021-04-22 19:56:03 × etrepum quits (sid763@gateway/web/irccloud.com/x-uvgwvvfyhdnxohap) (Ping timeout: 248 seconds)
2021-04-22 19:56:23 <Rembane> lovesegfault: Good! ^^
2021-04-22 19:56:27 <lovesegfault> what do I do if I want to bind a value to a name locally to a function? like `let limit = (n `div` 2) + 1`
2021-04-22 19:56:36 × falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Quit: Leaving)
2021-04-22 19:56:52 falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net)
2021-04-22 19:56:59 <Rembane> lovesegfault: f = let limit = (...) in {- the more exciting expression -}
2021-04-22 19:57:11 <lovesegfault> Oh, perfection
2021-04-22 19:57:29 natim87 joins (sid286962@gateway/web/irccloud.com/x-ozyrmmcfkllsqxsu)
2021-04-22 19:57:31 AndreasK joins (sid320732@gateway/web/irccloud.com/x-spqgtdrtcwqozgos)
2021-04-22 19:57:34 totbwf joins (sid402332@gateway/web/irccloud.com/x-evcibzlipwnkayzd)
2021-04-22 19:57:35 aveltras joins (uid364989@gateway/web/irccloud.com/x-eamssxdveirheeam)
2021-04-22 19:57:43 Synthetica joins (uid199651@gateway/web/irccloud.com/x-pljewtuwfmzflrit)
2021-04-22 19:57:50 benwr____ joins (sid372383@gateway/web/irccloud.com/x-mijbqpsjqwboudpc)
2021-04-22 19:57:53 luite joins (sid387799@gateway/web/irccloud.com/x-jstlojjciwjquony)
2021-04-22 19:57:54 × coot quits (~coot@37.30.50.130.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2021-04-22 19:58:05 lally joins (sid388228@gateway/web/irccloud.com/x-ilucbequfappbwaf)
2021-04-22 19:58:07 <Rembane> lovesegfault: Another version is to use a where-expression. f = {- the more exciting expression -} where f = (...)
2021-04-22 19:58:12 liquorice joins (sid267884@gateway/web/irccloud.com/x-nzkqxgdtfgechhzd)
2021-04-22 19:58:13 alanz joins (sid110616@gateway/web/irccloud.com/x-zzsuvrgaohwilheu)
2021-04-22 19:58:14 joshmeredith joins (sid387798@gateway/web/irccloud.com/x-puyeogwrdolrmxnl)
2021-04-22 19:58:14 systemfault joins (sid267009@gateway/web/irccloud.com/x-weqjiwsrsizmsttb)
2021-04-22 19:58:14 ebutleriv joins (sid217783@gateway/web/irccloud.com/x-kdwwbglqjsasvtqj)
2021-04-22 19:58:16 cemerick joins (sid54985@gateway/web/irccloud.com/x-dmosxtcpbaaxlpbx)

All times are in UTC.