Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 874 875 876 877 878 879 880 881 882 883 884 .. 5022
502,152 events total
2020-10-26 16:52:14 <dolio> Optimize what out?
2020-10-26 16:52:25 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-10-26 16:52:30 <monsterchrom> fromIntegral :: Word8 -> Int
2020-10-26 16:52:55 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-26 16:52:59 <geekosaur> iirc there's a bunch of RULEs for simple cases?
2020-10-26 16:53:04 <dolio> Yeah, but GHC doesn't have inherently Word8-based arrays, so what would it be optimizing out?
2020-10-26 16:53:08 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
2020-10-26 16:53:37 <monsterchrom> Oh, ha, point.
2020-10-26 16:53:40 <geekosaur> because so many Integral types have the same internal representations
2020-10-26 16:55:29 <tomsmeding> geekosaur: I'd reckon Word8 and Int don't have the same internal representation ;)
2020-10-26 16:55:42 <dolio> They basically do, I think.
2020-10-26 16:55:45 texasmynsted joins (~texasmyns@99.96.221.112)
2020-10-26 16:56:08 <monsterchrom> They do. Word8 uses a whole machine word. Recall "alignment".
2020-10-26 16:56:12 <geekosaur> yeh. there are differences in how they're treated, but more or less the same thing underneath
2020-10-26 16:57:05 <geekosaur> constructor tag == 0, then a machine word for the value
2020-10-26 16:57:13 <tomsmeding> monsterchrom: what exactly does alignment have to do with this? If you place an Int after a Word8, then there's 7 bytes of padding in between, but I'd think that two Word8's can still occupy two bytes, can't they?
2020-10-26 16:57:16 <tomsmeding> or is that C thinking :p
2020-10-26 16:57:21 <dolio> At some point there were plans to add smaller-width unboxed types, but I don't think that's happened yet.
2020-10-26 16:57:27 <tomsmeding> okay Word8# then sure
2020-10-26 16:57:32 <tomsmeding> oh
2020-10-26 16:57:34 × Franciman quits (~francesco@host-82-54-10-114.retail.telecomitalia.it) (Quit: Leaving)
2020-10-26 16:57:35 <tomsmeding> lol
2020-10-26 16:57:47 <geekosaur> they're still thinking about it last I heard
2020-10-26 16:57:53 <tomsmeding> okay then llvm will do the job handwave
2020-10-26 16:58:42 × texasmynsted quits (~texasmyns@99.96.221.112) (Remote host closed the connection)
2020-10-26 16:59:00 texasmynsted joins (~texasmyns@99.96.221.112)
2020-10-26 17:00:36 GyroW_ joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-26 17:00:36 × GyroW_ quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-26 17:00:36 GyroW_ joins (~GyroW@unaffiliated/gyrow)
2020-10-26 17:01:52 × GyroW quits (~GyroW@unaffiliated/gyrow) (Ping timeout: 272 seconds)
2020-10-26 17:02:00 <monsterchrom> But there is no Word8#. data Word8 = W8# Word#
2020-10-26 17:02:23 × Amras quits (~Amras@unaffiliated/amras0000) (Ping timeout: 272 seconds)
2020-10-26 17:02:41 × texasmynsted quits (~texasmyns@99.96.221.112) (Remote host closed the connection)
2020-10-26 17:03:02 <monsterchrom> To a large extent it's simply low priority.
2020-10-26 17:03:38 texasmynsted joins (~texasmyns@99.96.221.112)
2020-10-26 17:04:14 britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch)
2020-10-26 17:04:57 <tomsmeding> ixlun: that means that using Word8 with ghc for space saving is a useless endeavour at the moment, I think
2020-10-26 17:06:02 × texasmynsted quits (~texasmyns@99.96.221.112) (Remote host closed the connection)
2020-10-26 17:06:18 <geekosaur> vector *of* Word8 will compact them together, but *indexed by* won't
2020-10-26 17:06:23 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
2020-10-26 17:06:24 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2020-10-26 17:06:25 <geekosaur> iirc
2020-10-26 17:06:32 <tomsmeding> because it's special-cased? ah
2020-10-26 17:06:56 <geekosaur> yeh, there's a lot of magic going in in the background to pack various common vector use cases
2020-10-26 17:07:18 <geekosaur> it may have to be an unboxed vector to get the packing
2020-10-26 17:07:37 <tomsmeding> yes, because otherwise the vector just contains pointers :p
2020-10-26 17:09:58 knupfer joins (~Thunderbi@200116b82c2f8c009d903265f0d5a7b5.dip.versatel-1u1.de)
2020-10-26 17:10:04 <tomjaguarpaw> My code compiled and worked. This is highly suspicious.
2020-10-26 17:10:25 p8m_ joins (p8m@gateway/vpn/protonvpn/p8m)
2020-10-26 17:10:42 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-10-26 17:11:30 × p8m quits (p8m@gateway/vpn/protonvpn/p8m) (Ping timeout: 260 seconds)
2020-10-26 17:11:48 wroathe joins (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net)
2020-10-26 17:12:38 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
2020-10-26 17:13:41 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2020-10-26 17:14:02 <tomsmeding> it's haskell, that's expected behaviour
2020-10-26 17:15:02 <tomjaguarpaw> There are lots of permutations of this code that typecheck but are invalide..
2020-10-26 17:17:32 <tomjaguarpaw> I actually got everything right in my head on the first try \o/
2020-10-26 17:18:31 <tomsmeding> 🎉
2020-10-26 17:19:14 <geekosaur> xmonad does that a lot. although mostly because everything's in IO when it comes down to it
2020-10-26 17:19:43 × shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection)
2020-10-26 17:19:59 shatriff joins (~vitaliish@176.52.219.10)
2020-10-26 17:20:54 × shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection)
2020-10-26 17:21:14 <tomjaguarpaw> I can't believe I got everything right. That almost never happens. It's like a Python program working on first try.
2020-10-26 17:22:15 jlamothe joins (~jlamothe@198.251.55.207)
2020-10-26 17:24:38 crestfallen joins (~John@135-180-15-188.fiber.dynamic.sonic.net)
2020-10-26 17:24:41 × kritzefitz quits (~kritzefit@fw-front.credativ.com) (Remote host closed the connection)
2020-10-26 17:25:09 roconnor joins (~roconnor@host-23-91-186-59.dyn.295.ca)
2020-10-26 17:25:47 brown121407 joins (~brown1214@mail.121407.xyz)
2020-10-26 17:25:47 × brown121407 quits (~brown1214@mail.121407.xyz) (Changing host)
2020-10-26 17:25:47 brown121407 joins (~brown1214@fsf/member/brown121407)
2020-10-26 17:26:20 <thblt> tomjaguarpaw: maybe you ran it through clang by error? Most sequences of bytes are legal C++ programs that immediately segfault, after all :)
2020-10-26 17:26:40 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-26 17:27:10 alp joins (~alp@2a01:e0a:58b:4920:fda3:96de:97b6:c040)
2020-10-26 17:27:13 × Rudd0 quits (~Rudd0@185.189.115.103) (Ping timeout: 264 seconds)
2020-10-26 17:27:14 <tomjaguarpaw> It is most definitely a Haskell program tested by our very own Hedgehog.
2020-10-26 17:27:27 × knupfer quits (~Thunderbi@200116b82c2f8c009d903265f0d5a7b5.dip.versatel-1u1.de) (Quit: knupfer)
2020-10-26 17:27:40 knupfer joins (~Thunderbi@200116b82c2f8c008ca36b557e5dd149.dip.versatel-1u1.de)
2020-10-26 17:30:56 <ixlun> Could somene explain how to write `peek' or `poke' for a 'data Foo = A | B | C' which dervies enum?
2020-10-26 17:31:14 dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com)
2020-10-26 17:31:19 <ixlun> I don't understand as I have a `Ptr Foo', I just want to write the enum value for that type
2020-10-26 17:31:45 <ixlun> but I can't as I need to write an Int32
2020-10-26 17:33:15 <dsal> :t fromEnum True
2020-10-26 17:33:16 <lambdabot> Int
2020-10-26 17:33:21 kritzefitz joins (~kritzefit@212.86.56.80)
2020-10-26 17:36:00 <maerwald> is there a way to generate a json schema via aeson?
2020-10-26 17:36:13 <monsterchrom> I think no.
2020-10-26 17:36:53 <hyperisco> I'd really like a Map String A from Dhall… can I read a record as such a map perhaps?
2020-10-26 17:39:02 bartemius joins (~bartemius@109-252-20-20.nat.spd-mgts.ru)
2020-10-26 17:40:58 firstlove joins (~firstlove@58.246.122.242)
2020-10-26 17:41:18 <hyperisco> still seems to stand that I think auto codecs are stupid :P
2020-10-26 17:41:37 × idhugo_ quits (~idhugo@563472ae.rev.stofanet.dk) (Ping timeout: 264 seconds)
2020-10-26 17:43:05 × bartemius quits (~bartemius@109-252-20-20.nat.spd-mgts.ru) (Ping timeout: 240 seconds)
2020-10-26 17:43:39 <hyperisco> hm there is a special toMap thing, alright
2020-10-26 17:44:35 bahamas joins (~lucian@unaffiliated/bahamas)
2020-10-26 17:44:35 × chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
2020-10-26 17:44:58 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
2020-10-26 17:45:11 × chaosmasttter quits (~chaosmast@p200300c4a73c460118080c3b2ced1444.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
2020-10-26 17:45:40 × kritzefitz quits (~kritzefit@212.86.56.80) (Remote host closed the connection)
2020-10-26 17:47:31 kritzefitz joins (~kritzefit@212.86.56.80)
2020-10-26 17:48:29 Guest_34 joins (b2a4dcc6@178-164-220-198.pool.digikabel.hu)

All times are in UTC.