Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-05-18 13:33:13 Joshua[m]1 joins (eleos91mat@gateway/shell/matrix.org/x-iimldppqslrbviil)
2021-05-18 13:33:15 ProofTechnique joins (sid79547@gateway/web/irccloud.com/x-thidiwyvispmjuxw)
2021-05-18 13:33:17 × ibloom quits (sid350277@gateway/web/irccloud.com/x-lcvuldtqumombbtc) (Ping timeout: 245 seconds)
2021-05-18 13:33:31 × aizen_s quits (sid462968@gateway/web/irccloud.com/x-wkgllnirjxztqgtb) (Ping timeout: 276 seconds)
2021-05-18 13:33:39 × betawaffle quits (sid2730@gateway/web/irccloud.com/x-vuapykwwajysrsxt) (Ping timeout: 260 seconds)
2021-05-18 13:33:39 × pepeiborra quits (sid443799@gateway/web/irccloud.com/x-wwhumdjiavtzqvnj) (Ping timeout: 260 seconds)
2021-05-18 13:33:59 drupol joins (sid117588@gateway/web/irccloud.com/x-ktxgnurczxtyiher)
2021-05-18 13:34:07 × jonrh quits (sid5185@gateway/web/irccloud.com/x-mgnbpcjwtutwyefu) (Ping timeout: 260 seconds)
2021-05-18 13:34:15 my_name_is_not_j joins (mynameisno@gateway/shell/matrix.org/x-tdwpthxbtskllgxm)
2021-05-18 13:34:22 higherorder__ joins (sid185221@gateway/web/irccloud.com/x-wacoajflxivjnnhh)
2021-05-18 13:34:30 × mastarija__ quits (~mastarija@78-3-221-47.adsl.net.t-com.hr) (Ping timeout: 268 seconds)
2021-05-18 13:34:41 ibloom joins (sid350277@gateway/web/irccloud.com/x-acyeyftylgmwfwye)
2021-05-18 13:35:06 <yushyin> isn't that what the _regex-posix-clib flag is for?
2021-05-18 13:35:11 × moobar quits (sid171730@gateway/web/irccloud.com/x-dzeuwzhyexwyqqbx) (Ping timeout: 250 seconds)
2021-05-18 13:35:25 <boxscape> % undefined {Data.Monoid.getSum = 5}
2021-05-18 13:35:26 <yahb> boxscape: Sum {getSum = 5}
2021-05-18 13:35:49 <dminuoso> err. wait.
2021-05-18 13:35:51 <dminuoso> what?
2021-05-18 13:35:54 <boxscape> heh
2021-05-18 13:35:57 × benin quits (~benin@183.82.177.199) (Quit: The Lounge - https://thelounge.chat)
2021-05-18 13:35:58 siraben joins (sirabenmat@gateway/shell/matrix.org/x-dgmbaljohxwaqwdk)
2021-05-18 13:36:03 × jlpeters quits (sid25606@gateway/web/irccloud.com/x-arwccajngugcacff) (Ping timeout: 250 seconds)
2021-05-18 13:36:10 <dminuoso> Oh.
2021-05-18 13:36:21 <boxscape> it does feel a bit weird that this isn't bottom
2021-05-18 13:36:22 <dminuoso> I guess this only works for newtypes.
2021-05-18 13:36:23 mjlbach joins (atriusmatr@gateway/shell/matrix.org/x-zmooaaoowzestuxp)
2021-05-18 13:36:29 bitonic joins (bitonicmat@gateway/shell/matrix.org/x-zthfperyocxpgcwu)
2021-05-18 13:36:35 × drupol quits (sid117588@gateway/web/irccloud.com/x-ktxgnurczxtyiher) (Max SendQ exceeded)
2021-05-18 13:36:38 <boxscape> % data X = X {x :: Int}
2021-05-18 13:36:38 <yahb> boxscape:
2021-05-18 13:36:43 <dminuoso> the real question is, is this behavior guaranteed by the haskell report?
2021-05-18 13:36:43 × higherorder__ quits (sid185221@gateway/web/irccloud.com/x-wacoajflxivjnnhh) (Max SendQ exceeded)
2021-05-18 13:36:44 <boxscape> % undefined {x = 5}
2021-05-18 13:36:44 <yahb> boxscape: ; <interactive>:127:1: error:; * No instance for (Show X) arising from a use of `print'; * In a stmt of an interactive GHCi command: print it
2021-05-18 13:36:46 × elliott_ quits (~elliott_@pool-108-18-30-46.washdc.fios.verizon.net) (Ping timeout: 240 seconds)
2021-05-18 13:36:50 <boxscape> % data X = X {x :: Int} deriving Show
2021-05-18 13:36:51 <yahb> boxscape:
2021-05-18 13:36:53 <boxscape> % undefined {x = 5}
2021-05-18 13:36:53 <yahb> boxscape: *** Exception: Prelude.undefined; CallStack (from HasCallStack):; error, called at libraries/base/GHC/Err.hs:75:14 in base:GHC.Err; undefined, called at <interactive>:129:1 in interactive:Ghci72
2021-05-18 13:36:55 <boxscape> yes
2021-05-18 13:37:10 moobar joins (sid171730@gateway/web/irccloud.com/x-imzargwlwtmnlprj)
2021-05-18 13:37:20 aizen_s joins (sid462968@gateway/web/irccloud.com/x-pdobkgbmauvjilnc)
2021-05-18 13:37:27 × liszt quits (sid336875@gateway/web/irccloud.com/x-kdtramimtrepsyqt) (Ping timeout: 246 seconds)
2021-05-18 13:37:33 caasih joins (sid13241@gateway/web/irccloud.com/x-wswfzorparzehwov)
2021-05-18 13:37:37 drupol joins (sid117588@gateway/web/irccloud.com/x-rigpaemjuvtbwaft)
2021-05-18 13:37:52 jonrh joins (sid5185@gateway/web/irccloud.com/x-bewsihfspazmregp)
2021-05-18 13:38:14 jlpeters joins (sid25606@gateway/web/irccloud.com/x-byhimadpqxfxkcmi)
2021-05-18 13:38:16 guriya joins (a0ee4ae0@unaffiliated/guriya)
2021-05-18 13:38:28 pepeiborra joins (sid443799@gateway/web/irccloud.com/x-tvmoulmccblsrfxy)
2021-05-18 13:38:47 elliott_ joins (~elliott_@pool-108-18-30-46.washdc.fios.verizon.net)
2021-05-18 13:39:20 betawaffle joins (sid2730@gateway/web/irccloud.com/x-rsocddvfiyhlviiq)
2021-05-18 13:39:22 × tapas quits (sid467876@gateway/web/irccloud.com/x-jnxdqaqlhfwdctoj) (Ping timeout: 276 seconds)
2021-05-18 13:39:35 <dminuoso> How's that?
2021-05-18 13:40:00 <boxscape> to be clear my "yes" was to your "I guess that only works for newtypes", I'm still looking at the report
2021-05-18 13:40:10 <dminuoso> oh
2021-05-18 13:40:12 ddellacosta joins (~ddellacos@ool-44c73afa.dyn.optonline.net)
2021-05-18 13:40:22 edwardk joins (sid47016@haskell/developer/edwardk)
2021-05-18 13:40:35 <dminuoso> My intuition says this is covered by Haskell report, for the same reason it was intuitively clear that this would only work for newtypes.
2021-05-18 13:41:49 <boxscape> according to the report, `undefined {getSum = 4}` is translated into `case undefined of Sum x -> Sum 4`, I believe
2021-05-18 13:41:54 <boxscape> % case undefined of Sum x -> Sum 4
2021-05-18 13:41:55 <yahb> boxscape: Sum {getSum = 4}
2021-05-18 13:41:59 <boxscape> looks good dminuoso
2021-05-18 13:42:08 angerman joins (sid209936@gateway/web/irccloud.com/x-pzvelbtxymwnmpjf)
2021-05-18 13:42:20 <boxscape> (page 27)
2021-05-18 13:42:26 <dminuoso> uh..
2021-05-18 13:42:31 × darthThorik quits (sid39589@gateway/web/irccloud.com/x-oqamjdqpvpmmnlft) (Ping timeout: 260 seconds)
2021-05-18 13:42:33 tapas joins (sid467876@gateway/web/irccloud.com/x-fctmknlibzephzzk)
2021-05-18 13:42:40 <dminuoso> Looks fine in principle
2021-05-18 13:42:46 higherorder__ joins (sid185221@gateway/web/irccloud.com/x-vluvleavijnzkvmp)
2021-05-18 13:42:56 stree joins (~stree@68.36.8.116)
2021-05-18 13:43:05 × betawaffle quits (sid2730@gateway/web/irccloud.com/x-rsocddvfiyhlviiq) (Max SendQ exceeded)
2021-05-18 13:43:07 <dminuoso> That one definitely goes into my dark bag of obfuscation tricks.
2021-05-18 13:43:15 × olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 265 seconds)
2021-05-18 13:43:18 <boxscape> nice
2021-05-18 13:43:22 fendor joins (~fendor@178.165.129.230.wireless.dyn.drei.com)
2021-05-18 13:43:35 darthThorik joins (sid39589@gateway/web/irccloud.com/x-jowxtmnphsrffvaz)
2021-05-18 13:43:51 <dminuoso> I wonder, why it's translated into case-of at all
2021-05-18 13:44:01 liszt joins (sid336875@gateway/web/irccloud.com/x-dofckrhdjbdewhsw)
2021-05-18 13:44:07 betawaffle joins (sid2730@gateway/web/irccloud.com/x-qejwbkohjtyrhqjm)
2021-05-18 13:44:11 <dminuoso> Since we dont have any syntax for something like `undefined { getSum += 4 }`
2021-05-18 13:44:16 × ystael quits (~ystael@130.44.151.113) (Quit: Lost terminal)
2021-05-18 13:44:39 <opqdonut> you need to bind the nonchanging fields right?
2021-05-18 13:44:46 <boxscape> if you have `data Foo = A {x :: Bool} | B {x :: Bool, y :: Int}`, you need to know which constructor to pick
2021-05-18 13:44:54 × sm2n_ quits (~sm2n@bras-base-hmtnon143hw-grc-10-65-95-102-68.dsl.bell.ca) (Read error: Connection reset by peer)
2021-05-18 13:45:05 sm2n_ joins (~sm2n@bras-base-hmtnon143hw-grc-10-65-95-102-68.dsl.bell.ca)
2021-05-18 13:45:07 <dminuoso> opqdonut: non-changing fields in a newtype?
2021-05-18 13:45:18 <dminuoso> oh hold on
2021-05-18 13:45:20 <opqdonut> oh right I was thinking in general
2021-05-18 13:45:35 <opqdonut> since the conversion to case-of is the same for data & newtype right?
2021-05-18 13:45:38 <boxscape> yeah
2021-05-18 13:45:40 <dminuoso> boxscape: yeah, but this is a newtype
2021-05-18 13:45:47 <boxscape> dminuoso yeah but the report doesn't care
2021-05-18 13:46:06 epicte7us joins (~epictetus@ip72-194-54-201.sb.sd.cox.net)
2021-05-18 13:46:12 <opqdonut> it's nicer if it's symmetric
2021-05-18 13:46:15 × hiroaki quits (~hiroaki@2a02:8108:8c40:2bb8:1d97:2a21:a75b:9085) (Ping timeout: 260 seconds)
2021-05-18 13:46:20 amatecha____ joins (sid10006@gateway/web/irccloud.com/x-tgfngzkpuygzowds)
2021-05-18 13:46:21 ystael joins (~ystael@130.44.151.113)
2021-05-18 13:46:45 [n1x]_ joins (~n1x]_@178.238.11.35)
2021-05-18 13:46:52 <boxscape> who knows if GHC translates it into `case` for newtypes though
2021-05-18 13:48:06 <boxscape> % let getSum = getSum in getSum {getSum = 4} -- dminuoso how's this for obfuscation

All times are in UTC.