2025/06/23

Newest at the top

2025-06-23 19:14:57 +0200ft(~ft@p3e9bcab0.dip0.t-ipconnect.de) ft
2025-06-23 19:14:55 +0200AlexZenon(~alzenon@178.34.163.228) (Quit: ;-)
2025-06-23 19:11:08 +0200tmciver(~tim@syn-198-255-177-240.res.spectrum.com) tmciver
2025-06-23 19:09:59 +0200tmciver(~tim@syn-198-255-177-240.res.spectrum.com) (Ping timeout: 245 seconds)
2025-06-23 19:05:35 +0200mreh(~matthew@host86-146-25-68.range86-146.btcentralplus.com) (Ping timeout: 265 seconds)
2025-06-23 18:58:33 +0200harveypwca(~harveypwc@2601:246:d080:f6e0:27d6:8cc7:eca9:c46c) (Quit: Leaving)
2025-06-23 18:58:10 +0200trickard_(~trickard@cpe-61-98-47-163.wireline.com.au)
2025-06-23 18:57:57 +0200trickard_(~trickard@cpe-61-98-47-163.wireline.com.au) (Read error: Connection reset by peer)
2025-06-23 18:48:47 +0200Frostillicus(~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net)
2025-06-23 18:48:42 +0200tomsmedingwill be afk for a while
2025-06-23 18:48:27 +0200Frostillicus(~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Ping timeout: 276 seconds)
2025-06-23 18:47:41 +0200 <EvanR> lol
2025-06-23 18:47:39 +0200 <tomsmeding> that's what I suspected
2025-06-23 18:47:30 +0200 <EvanR> I was unscrupulously comparing standardized C to defacto haskell
2025-06-23 18:47:10 +0200 <tomsmeding> because Haskell2010 certainly also doesn't have stgDoubleToWord64
2025-06-23 18:46:57 +0200 <tomsmeding> EvanR: are you specifically referring to ISO standardised C, or C as implemented in practice?
2025-06-23 18:46:31 +0200 <haskellbridge> <magic_rb> Ive been saying its a low level systems language since forever
2025-06-23 18:46:17 +0200 <haskellbridge> <magic_rb> Only people that have not interacted with the haskell community say that haskell is a high level language
2025-06-23 18:46:17 +0200 <EvanR> standard C does not have all these primitives so it might be beating C at "low level"
2025-06-23 18:45:52 +0200 <EvanR> lol
2025-06-23 18:45:49 +0200 <tomsmeding> I'm not sure about "best"
2025-06-23 18:45:42 +0200 <EvanR> haskell is the best low level bit bashing language?
2025-06-23 18:45:15 +0200tmciver(~tim@syn-198-255-177-240.res.spectrum.com) tmciver
2025-06-23 18:45:09 +0200 <tomsmeding> who said haskell was a high-level language
2025-06-23 18:44:09 +0200 <tomsmeding> https://github.com/tomsmeding/ad-dualrev-th/blob/master/src/Data/Vector/Storable/Mutable/CAS.hs
2025-06-23 18:44:04 +0200 <tomsmeding> the primop is atomicCasWordAddr# -- it works on Word#, not Int#, I misremembered
2025-06-23 18:44:02 +0200tmciver(~tim@syn-198-255-177-240.res.spectrum.com) (Ping timeout: 244 seconds)
2025-06-23 18:43:47 +0200 <tomsmeding> *stg, not stf
2025-06-23 18:43:43 +0200 <tomsmeding> word64ToWord# . stfDOubleToWord64 :: Double# -> Word#
2025-06-23 18:43:11 +0200 <haskellbridge> <magic_rb> Howd you solve the problem?
2025-06-23 18:43:00 +0200 <tomsmeding> cue assembler syntax error
2025-06-23 18:42:53 +0200 <tomsmeding> so I thought, well, I'll just unsafeCoerce# the Double# to an Int#, right? It's the same number of bits, and CAS doesn't care about the contents of those bits
2025-06-23 18:42:23 +0200 <tomsmeding> which makes sense because CPUs generally only provide it on native words
2025-06-23 18:42:13 +0200 <tomsmeding> I actually ran into this in practice because I wanted to do a primitive compare-and-swap on a storable vector of Doubles, but GHC only provides a CAS primop on Int
2025-06-23 18:41:28 +0200 <[exa]> yes that's just...lovely I guess :D
2025-06-23 18:40:36 +0200 <tomsmeding> in case you hadn't seen that yet
2025-06-23 18:40:27 +0200 <tomsmeding> [exa]: you might also appreciate https://play.haskell.org/saved/ygIqjecU
2025-06-23 18:40:22 +0200cawfee(root@2001:19f0:4400:79a1::babe) (Ping timeout: 252 seconds)
2025-06-23 18:39:55 +0200 <[exa]> yeah I know, was just curious :D
2025-06-23 18:39:33 +0200 <haskellbridge> <magic_rb> [exa] yeah the optimization was completely my fault, i took as a "hey it should be a noop" challenge
2025-06-23 18:38:54 +0200 <tomsmeding> using Int and not Word64 because GHC has nice unboxed literal syntax for Int# but not for Word64#
2025-06-23 18:38:36 +0200 <tomsmeding> magic_rb: https://play.haskell.org/saved/ygIqjecU
2025-06-23 18:38:36 +0200 <mreh> it's not intuitive, at least to me, but I guess the value wraps and it gets the right answer
2025-06-23 18:37:37 +0200 <tomsmeding> [exa]: they didn't, I think, mreh just wanted the thing that fromIntegral does but somehow expected fromIntegral to do something different
2025-06-23 18:36:52 +0200 <[exa]> I wish to know how'd someone manage to turn i8 to u8 conversion into a cost centre
2025-06-23 18:36:42 +0200mrehreads up, ah looks like it
2025-06-23 18:36:03 +0200 <mreh> what does GHC do? rebox then unbox it again?
2025-06-23 18:35:44 +0200 <haskellbridge> <magic_rb> Other wise its a noop
2025-06-23 18:35:39 +0200 <haskellbridge> <magic_rb> Only in this case :P
2025-06-23 18:35:33 +0200 <EvanR> lol