Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2020-11-05 18:24:15 u0_a298 joins (~user@47.206.148.226)
2020-11-05 18:26:01 hackage prolude 0.0.0.6 - ITProTV's custom prelude https://hackage.haskell.org/package/prolude-0.0.0.6 (saramuse)
2020-11-05 18:26:01 todda7 joins (~torstein@ppp-2-84-30-242.home.otenet.gr)
2020-11-05 18:26:14 × machinedgod quits (~machinedg@207.253.244.210) (Ping timeout: 260 seconds)
2020-11-05 18:26:38 × thir quits (~thir@p200300f27f0b7e00f4e9381c2bf90854.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
2020-11-05 18:26:44 alp joins (~alp@2a01:e0a:58b:4920:d896:803c:c09a:1a05)
2020-11-05 18:28:04 machinedgod joins (~machinedg@142.169.78.93)
2020-11-05 18:31:57 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
2020-11-05 18:34:35 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-11-05 18:37:31 × u0_a298 quits (~user@47.206.148.226) (Read error: Connection reset by peer)
2020-11-05 18:38:05 u0_a298 joins (~user@47.206.148.226)
2020-11-05 18:39:23 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
2020-11-05 18:41:12 N3RGY joins (~N3RGY@65.141.87.122)
2020-11-05 18:41:41 chaosmasttter joins (~chaosmast@p200300c4a7117c01e8fd3775638e9554.dip0.t-ipconnect.de)
2020-11-05 18:42:55 <tomjaguarpaw> Is there a Haskell hashing library where I can take the hash of two hashes and have it produce something sensible? hashable (Data.Hashable) has results that are ... interesting
2020-11-05 18:44:12 <opqdonut> usually one xors hashes together to combine them
2020-11-05 18:44:30 <opqdonut> googling turns up https://hackage.haskell.org/package/data-hash-0.2.0.1/docs/Data-Hash.html
2020-11-05 18:44:36 <opqdonut> with a combine :: Hash -> Hash -> Hash
2020-11-05 18:44:57 <opqdonut> I hope you don't need cryptographic hashing?
2020-11-05 18:45:58 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-11-05 18:47:01 hackage base16-bytestring 1.0.1.0 - RFC 4648-compliant Base16 encodings for ByteStrings https://hackage.haskell.org/package/base16-bytestring-1.0.1.0 (topos)
2020-11-05 18:47:19 <tomjaguarpaw> opqdonut: Indeed, no need for cryptographic
2020-11-05 18:47:48 <tomjaguarpaw> I was a little wary of that library since it hasn't been updated in 5 years. Maybe it's OK.
2020-11-05 18:48:00 hackage persistent 2.11.0.1 - Type-safe, multi-backend data serialization. https://hackage.haskell.org/package/persistent-2.11.0.1 (parsonsmatt)
2020-11-05 18:49:13 × akegalj quits (~akegalj@93-142-95-221.adsl.net.t-com.hr) (Quit: leaving)
2020-11-05 18:49:25 × kritzefitz quits (~kritzefit@212.86.56.80) (Ping timeout: 264 seconds)
2020-11-05 18:49:43 <tomjaguarpaw> Hmm, combining by rotate and xor doesn't sound very safe
2020-11-05 18:50:16 <tomjaguarpaw> I would like 1 `combine` 2 not to collide with 0, for example
2020-11-05 18:50:39 <tomjaguarpaw> But maybe it it's post-hashing it's Ok
2020-11-05 18:51:08 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
2020-11-05 18:51:13 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
2020-11-05 18:52:22 <sm[m]> maralorn: https://shakebuild.com/faq#why-is-there-a-shake-executable is related
2020-11-05 18:52:44 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2020-11-05 18:54:25 × cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 240 seconds)
2020-11-05 18:54:55 untwisted joins (~untwisted@84.39.116.180)
2020-11-05 18:57:12 thir joins (~thir@p200300f27f0b7e00f4e9381c2bf90854.dip0.t-ipconnect.de)
2020-11-05 18:59:45 × u0_a298 quits (~user@47.206.148.226) (Read error: Connection reset by peer)
2020-11-05 19:00:01 u0_a298 joins (~user@47.206.148.226)
2020-11-05 19:00:17 × alp quits (~alp@2a01:e0a:58b:4920:d896:803c:c09a:1a05) (Ping timeout: 272 seconds)
2020-11-05 19:01:13 <maralorn> sm: Thank you. The reason was simply that I needed to call it Shakefile.hs with capital S.
2020-11-05 19:02:38 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
2020-11-05 19:03:27 × berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 272 seconds)
2020-11-05 19:03:29 <maralorn> I wish there were something like "shake watch"
2020-11-05 19:03:39 berberman_ joins (~berberman@unaffiliated/berberman)
2020-11-05 19:03:42 <maralorn> * I wish there was something like "shake watch"
2020-11-05 19:04:14 × thir quits (~thir@p200300f27f0b7e00f4e9381c2bf90854.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
2020-11-05 19:05:44 conal joins (~conal@64.71.133.70)
2020-11-05 19:07:22 christo joins (~chris@81.96.113.213)
2020-11-05 19:08:39 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Quit: Lost terminal)
2020-11-05 19:11:27 <monochrom> "were" is OK. Actually more proper IMO :)
2020-11-05 19:12:44 cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net)
2020-11-05 19:13:09 × N3RGY quits (~N3RGY@65.141.87.122) ()
2020-11-05 19:14:56 <tomsmeding> yay subjunctive
2020-11-05 19:15:42 <tomsmeding> @quickcheck \i -> hash (i :: Int) == i
2020-11-05 19:15:42 <lambdabot> Unknown command, try @list
2020-11-05 19:15:49 <tomsmeding> @check \i -> hash (i :: Int) == i
2020-11-05 19:15:51 <lambdabot> error:
2020-11-05 19:15:51 <lambdabot> • Variable not in scope: hash :: Int -> Int • Perhaps you meant ‘has’ (impor...
2020-11-05 19:16:00 <tomsmeding> @check \i -> Data.Hashable.hash (i :: Int) == i
2020-11-05 19:16:02 <lambdabot> error:
2020-11-05 19:16:02 <lambdabot> Not in scope: ‘Data.Hashable.hash’ No module named ‘Data.Hashable’ is imported.
2020-11-05 19:16:27 <tomsmeding> okay fine, but tomjaguarpaw this succeeds locally, which explains kind of why combining that with an xor doesn't work :p
2020-11-05 19:16:56 <sm[m]> maralorn: I do ls FILES | entr SHAKECMD
2020-11-05 19:17:31 <maralorn> sm: I do, too.
2020-11-05 19:19:02 <sm[m]> you're right, it does seem like a feature that could be built in, I actually thought it was
2020-11-05 19:19:21 nados joins (~dan@69-165-210-185.cable.teksavvy.com)
2020-11-05 19:20:46 Tario joins (~Tario@198.252.153.28)
2020-11-05 19:21:11 × conal quits (~conal@64.71.133.70) (Ping timeout: 258 seconds)
2020-11-05 19:21:11 <tomjaguarpaw> opqdonut: FWIW Data.Hash also has the property that I am trying to avoid, specifically:
2020-11-05 19:21:14 <tomjaguarpaw> *Hash H> let h x y = (H.hash (x :: Int) `H.combine` (H.hash x `H.combine` H.hash (y :: Int)), H.hash y)
2020-11-05 19:21:17 <tomjaguarpaw> *Hash H> h 123 45657
2020-11-05 19:21:20 <tomjaguarpaw> (Hash {asWord64 = 16277888606689116690},Hash {asWord64 = 16277888606689116690})
2020-11-05 19:21:24 <tomjaguarpaw> x `combine` x `combine` y == y
2020-11-05 19:21:38 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-11-05 19:21:45 <tomjaguarpaw> I'm at a loss about how to avoid this. It seems to make compositional hashing of trees impossible.
2020-11-05 19:23:38 × jespada quits (~jespada@90.254.245.49) (Ping timeout: 260 seconds)
2020-11-05 19:24:44 × jfredett_ quits (~quassel@95.211.153.89) (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
2020-11-05 19:24:55 conal joins (~conal@107.181.166.217)
2020-11-05 19:25:28 jfredett joins (~quassel@95.211.153.89)
2020-11-05 19:25:42 vicfred joins (~vicfred@unaffiliated/vicfred)
2020-11-05 19:25:54 jespada joins (~jespada@90.254.245.49)
2020-11-05 19:26:18 justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311)
2020-11-05 19:26:43 <tomsmeding> @let wangHash = (\x -> x `xor` (x `rotateR` 16)) . (\x -> x * 2057) . (\x -> x `xor` (x `rotateR` 4)) . (\x -> x + (x `shiftL` 2)) . (\x -> x `xor` (x `rotateR` 12)) . (\x -> complement x + (x `shiftL` 15))
2020-11-05 19:26:44 <tomjaguarpaw> Python's hash has the property I desire. I'm not sure what the algorithm is though.
2020-11-05 19:26:44 <lambdabot> Defined.
2020-11-05 19:27:01 <tomsmeding> > wangHash 123 `xor` (wangHash 123 `xor` wangHash 45657)
2020-11-05 19:27:03 <lambdabot> 14571355508018
2020-11-05 19:27:19 <tomsmeding> http://www.reedbeta.com/blog/quick-and-easy-gpu-random-numbers-in-d3d11/
2020-11-05 19:27:19 kritzefitz joins (~kritzefit@212.86.56.80)
2020-11-05 19:27:25 <tomjaguarpaw> > wangHash 123 `xor` (wangHash 123 `xor` wangHash 123)
2020-11-05 19:27:27 <lambdabot> 38872050059
2020-11-05 19:27:32 <tomjaguarpaw> > wangHash 123
2020-11-05 19:27:34 <lambdabot> 38872050059
2020-11-05 19:27:37 <tomjaguarpaw> Still not idea
2020-11-05 19:27:39 <tomjaguarpaw> l
2020-11-05 19:27:39 <tomsmeding> o
2020-11-05 19:28:25 <tomsmeding> well
2020-11-05 19:28:28 <tomsmeding> that's kind of expected
2020-11-05 19:28:39 <tomsmeding> @check \i -> i `xor` i == 0
2020-11-05 19:28:39 <tomjaguarpaw> Yes, if xor is the combiner

All times are in UTC.