Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,798,946 events total
2026-02-14 21:16:00 <tomsmeding> -ffast-math dances circles around IEEE semantics, but memory semantics aren't broken down as far as I know
2026-02-14 21:16:32 <tomsmeding> s/ghc/gcc/
2026-02-14 21:16:34 <tomsmeding> I can't type any more
2026-02-14 21:17:27 <geekosaur> (I typo each of those into the other constantly…)
2026-02-14 21:19:28 L29Ah joins (~L29Ah@wikipedia/L29Ah)
2026-02-14 21:19:33 <[exa]> tomsmeding: cool I'm going to simd my stupid database string-indexing code :D
2026-02-14 21:19:44 <tomsmeding> <3
2026-02-14 21:20:25 <[exa]> probie: btw if this fails, try making sure the reads are aligned (no real clue how to help there tho.)
2026-02-14 21:21:18 × tcard quits (~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303) (Quit: Leaving)
2026-02-14 21:21:42 <probie> [exa]: It did fail, and the reads are absolutely not aligned
2026-02-14 21:21:54 <[exa]> :(
2026-02-14 21:23:55 <probie> I think if I want to do this in "pure" Haskell, I'm better off ditching vector, and using `MutableByteArray#`s with the explicit SIMD operations from ghc-prim
2026-02-14 21:24:30 infinity0 joins (~infinity0@pwned.gg)
2026-02-14 21:25:04 <[exa]> probie: there should be some (ugly but working) way to get a pointer to the vector which can be used as the required target type for the primitive op
2026-02-14 21:25:32 <tomsmeding> recommend storable vectors for that though, as they have a sensible withForeignPtr function
2026-02-14 21:25:55 <tomsmeding> the idea of unboxed vectors is that they are struct-of-arrays transformed, i.e. a vector of (Int, Int) is actually two vectors under the hood
2026-02-14 21:25:59 <[exa]> probie: also highly suggest having a look at if repa/massiv can do this and if it can, copy what they did. IIRC these would still count these as "pure" haskell.
2026-02-14 21:26:10 <tomsmeding> so there is indirection between the vector you have in hand and the underlying storage
2026-02-14 21:26:29 <tomsmeding> storable vectors are just C-style arrays as you expect
2026-02-14 21:26:51 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
2026-02-14 21:31:32 <probie> Vector still has alignment issues though, so I'm not inclined to bend over backwards to get it to work
2026-02-14 21:31:44 machinedgod joins (~machinedg@d75-159-126-101.abhsia.telus.net)
2026-02-14 21:31:59 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-02-14 21:33:48 <[exa]> probie: the alignment isn't a totally huge deal (just adds a bit of a weight on whether llvm later chooses the unaligned load or doesn't even trigger)
2026-02-14 21:34:23 <tomsmeding> [exa]: simd instructions do have alignment constraints where normal x86 memory ops don't
2026-02-14 21:34:47 <[exa]> loadu doesn't exist for epi8?
2026-02-14 21:34:58 <tomsmeding> but yes, I guess that llvm will have to deal with unaligned arrays anyway because it cannot assume any arbitrary pointer is aligned
2026-02-14 21:35:07 <tomsmeding> so it should just generate a prologue
2026-02-14 21:35:33 <tomsmeding> [exa]: good point, my bad, yes loadu is a thing
2026-02-14 21:35:40 <tomsmeding> I'm... not sure what I was thinking
2026-02-14 21:36:00 <[exa]> like, ofc llvm is going to brainify that to The Way Better Aligned Load
2026-02-14 21:36:01 <int-e> tomsmeding: well, the alignment is already fixed by how you unrolled the loop
2026-02-14 21:36:17 <tomsmeding> ah yes, in this case it is
2026-02-14 21:36:54 <[exa]> is it? (does the vector start on aligned addr?)
2026-02-14 21:37:01 <int-e> And I don't think you can express the promise that these two pointers never alias at the Haskell level.
2026-02-14 21:37:11 <tomsmeding> [exa]: remember this is a loop with dependencies so llvm can't unroll
2026-02-14 21:37:24 <[exa]> oh yes true
2026-02-14 21:38:03 <int-e> and it'll get awkward regardless if the relative alignment of the two pointers isn't 0.
2026-02-14 21:38:36 <probie> We need a new GHC extension that introduces the `restrict` keyword (although I can't imagine that being a sane thing to have in the context of non-strict evaluation)
2026-02-14 21:39:05 <tomsmeding> it might be possible to devise something in combination with linear types
2026-02-14 21:40:12 <int-e> probie: Well, you have mutable data there; even lazy evaluation shouldn't accidentally alias those. (Though for people who remember the early days of bytestring... yes, these things have happened.)
2026-02-14 21:40:41 <int-e> It lead to `inlinePerformIO` being renamed :-)
2026-02-14 21:40:44 × caubert quits (~caubert@user/caubert) (Ping timeout: 245 seconds)
2026-02-14 21:40:50 <int-e> *led
2026-02-14 21:40:56 <[exa]> probie: btw really try if repa manages to SIMD, deconstructing a working instance is a MUCH easier way to debug compilers than trying to hit a subtle trick that does it
2026-02-14 21:42:43 <tomsmeding> 99% certain they don't built on top of vector and allocate their own primitive arrays
2026-02-14 21:43:27 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
2026-02-14 21:48:14 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-02-14 21:54:34 caubert joins (~caubert@user/caubert)
2026-02-14 21:56:09 × acidjnk quits (~acidjnk@p200300d6e700e5606490ca8182989074.dip0.t-ipconnect.de) (Ping timeout: 245 seconds)
2026-02-14 21:59:52 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
2026-02-14 21:59:59 × caubert quits (~caubert@user/caubert) (Ping timeout: 252 seconds)
2026-02-14 22:04:49 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2026-02-14 22:05:52 tcard joins (~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303)
2026-02-14 22:08:42 wickedjargon joins (~user@24.83.46.194)
2026-02-14 22:08:50 haritz joins (~hrtz@2a01:4b00:bc2e:7000:d5af:a266:ca31:5ef8)
2026-02-14 22:08:50 × haritz quits (~hrtz@2a01:4b00:bc2e:7000:d5af:a266:ca31:5ef8) (Changing host)
2026-02-14 22:08:50 haritz joins (~hrtz@user/haritz)
2026-02-14 22:10:49 poscat0x04 joins (~poscat@user/poscat)
2026-02-14 22:11:29 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
2026-02-14 22:12:19 × poscat quits (~poscat@user/poscat) (Ping timeout: 250 seconds)
2026-02-14 22:16:09 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-02-14 22:27:11 caubert joins (~caubert@user/caubert)
2026-02-14 22:27:20 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
2026-02-14 22:30:55 × housemate quits (~housemate@202.7.248.67) (Quit: https://ineedsomeacidtocalmmedown.space/)
2026-02-14 22:32:59 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2026-02-14 22:38:48 housemate joins (~housemate@202.7.248.67)
2026-02-14 22:46:09 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
2026-02-14 22:50:02 × oskarw quits (~user@user/oskarw) (Ping timeout: 252 seconds)
2026-02-14 22:51:08 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2026-02-14 22:53:36 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 252 seconds)
2026-02-14 22:56:09 × target_i quits (~target_i@user/target-i/x-6023099) (Quit: leaving)
2026-02-14 23:03:16 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
2026-02-14 23:05:14 elarks joins (~elarks@user/yerrii)
2026-02-14 23:08:13 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 250 seconds)
2026-02-14 23:09:35 × elarks quits (~elarks@user/yerrii) (Client Quit)
2026-02-14 23:18:14 × takuan quits (~takuan@d8D86B9E9.access.telenet.be) (Ping timeout: 245 seconds)
2026-02-14 23:18:38 × caubert quits (~caubert@user/caubert) (Ping timeout: 252 seconds)
2026-02-14 23:19:05 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
2026-02-14 23:23:26 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
2026-02-14 23:23:39 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-02-14 23:24:44 × housemate quits (~housemate@202.7.248.67) (Quit: https://ineedsomeacidtocalmmedown.space/)
2026-02-14 23:26:27 × juri_ quits (~juri@217-114-215-140.pool.ovpn.com) (Ping timeout: 252 seconds)
2026-02-14 23:27:42 housemate joins (~housemate@202.7.248.67)
2026-02-14 23:29:38 caubert joins (~caubert@user/caubert)
2026-02-14 23:34:50 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
2026-02-14 23:36:10 × tromp quits (~textual@2001:1c00:3487:1b00:49b4:8838:6b5e:2a21) (Quit: My iMac has gone to sleep. ZZZzzz…)
2026-02-14 23:37:06 acidjnk joins (~acidjnk@p200300d6e700e53408753edc2ee6991b.dip0.t-ipconnect.de)
2026-02-14 23:38:10 × acidjnk quits (~acidjnk@p200300d6e700e53408753edc2ee6991b.dip0.t-ipconnect.de) (Read error: Connection reset by peer)
2026-02-14 23:41:37 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
2026-02-14 23:51:05 × caubert quits (~caubert@user/caubert) (Ping timeout: 252 seconds)
2026-02-14 23:52:51 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
2026-02-14 23:55:01 ljdarj joins (~Thunderbi@user/ljdarj)
2026-02-14 23:57:55 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2026-02-15 00:04:26 caubert joins (~caubert@user/caubert)
2026-02-15 00:07:10 traxex joins (traxex@user/traxex)
2026-02-15 00:08:38 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
2026-02-15 00:11:01 Square2 joins (~Square@user/square)
2026-02-15 00:16:56 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2026-02-15 00:18:22 × notzmv quits (~umar@user/notzmv) (Ping timeout: 255 seconds)

All times are in UTC.