Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 160 161 162 163 164 165 166 167 168 169 170 .. 5022
502,152 events total
2020-09-23 17:02:18 <cr0ssw1nd> davean, ooh, ok
2020-09-23 17:02:21 <cr0ssw1nd> now I get it
2020-09-23 17:02:27 <geekosaur> which isn't relevant to ghc's garbage collector but is to some others
2020-09-23 17:02:32 × Raito_Bezarius quits (~Raito_Bez@unaffiliated/raito-bezarius/x-8764578) (Quit: quit())
2020-09-23 17:02:46 <davean> cr0ssw1nd: It allows a less overhead for Int in some prepresentations (runtime systems)
2020-09-23 17:02:55 <davean> cr0ssw1nd: which if you wanted a really small Haskell program for example ...
2020-09-23 17:03:07 <davean> it COULD be useful, GHC doesn't use it, but also Int would be 32 bits on 32 bit platforms
2020-09-23 17:03:14 slack1256 joins (~slack1256@191.125.183.112)
2020-09-23 17:03:16 × slack1256 quits (~slack1256@191.125.183.112) (Remote host closed the connection)
2020-09-23 17:03:18 <davean> so really, why not say what you want?
2020-09-23 17:03:21 <davean> And yes 'hashab'e
2020-09-23 17:03:28 Raito_Bezarius joins (~Raito_Bez@unaffiliated/raito-bezarius/x-8764578)
2020-09-23 17:03:30 <davean> but hashable doesn't even hash
2020-09-23 17:03:55 <davean> http://hackage.haskell.org/package/hashable-1.3.0.0/docs/src/Data.Hashable.Class.html#line-312
2020-09-23 17:03:56 × GyroW quits (~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-09-23 17:03:59 <AWizzArd> maerwald: oki thanks, i got it working with a basic route and believe I can make it do something meaningful from here.
2020-09-23 17:04:01 × Raito_Bezarius quits (~Raito_Bez@unaffiliated/raito-bezarius/x-8764578) (Client Quit)
2020-09-23 17:04:12 GyroW joins (~GyroW@ptr-48ujrfb8c7gfd2lu92q.18120a2.ip6.access.telenet.be)
2020-09-23 17:04:16 × GyroW quits (~GyroW@ptr-48ujrfb8c7gfd2lu92q.18120a2.ip6.access.telenet.be) (Changing host)
2020-09-23 17:04:16 GyroW joins (~GyroW@unaffiliated/gyrow)
2020-09-23 17:04:39 Raito_Bezarius joins (~Raito_Bez@unaffiliated/raito-bezarius/x-8764578)
2020-09-23 17:04:43 <davean> (You may just want to use something that depends on hashable mind you)
2020-09-23 17:04:55 <cr0ssw1nd> wait.. doesn't hash?
2020-09-23 17:04:56 <davean> (but its somewhat important to know that hashable is a lie)
2020-09-23 17:04:59 <davean> cr0ssw1nd: look at that code
2020-09-23 17:05:01 <davean> it does not hash
2020-09-23 17:05:10 <davean> hash = id
2020-09-23 17:05:32 <davean> Like seriously the package should have that in big blinding letters.
2020-09-23 17:05:39 <cr0ssw1nd> for Int
2020-09-23 17:05:58 <cr0ssw1nd> but other instances are different
2020-09-23 17:06:03 <davean> For many things, 'Hashable' doesn't mean you get any independency
2020-09-23 17:06:10 <davean> cr0ssw1nd: some of them
2020-09-23 17:06:31 <davean> 'Hashable' isn't even pairwise independent though.
2020-09-23 17:06:37 <davean> or anything.
2020-09-23 17:06:38 <cr0ssw1nd> I guess I should take some lib then
2020-09-23 17:06:47 <davean> it depends on what you're doing
2020-09-23 17:06:49 × vicfred quits (~vicfred@unaffiliated/vicfred) (Remote host closed the connection)
2020-09-23 17:06:50 <monochrom> id is as pairwise independent as you can get
2020-09-23 17:06:56 <davean> That may or may not be fine, but you need to know it
2020-09-23 17:07:14 vicfred joins (~vicfred@unaffiliated/vicfred)
2020-09-23 17:07:32 × polyrain quits (~polyrain@2001:8003:e501:6901:d81b:49ea:d8f1:8f81) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-09-23 17:07:36 × nineonine quits (~nineonine@50.216.62.2) (Ping timeout: 256 seconds)
2020-09-23 17:07:40 <davean> monochrom: I'd have to double check, I remember this ruining a lot of things because of its predicability.
2020-09-23 17:08:07 <monochrom> Do you have hash tables in mind?
2020-09-23 17:08:19 <davean> No, mostly it was sketches
2020-09-23 17:08:22 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-09-23 17:08:24 <monochrom> Or do you have cryptography in minad?
2020-09-23 17:08:37 <davean> No, cryptography requires cryptographicly secure hashes
2020-09-23 17:08:38 <monochrom> Because hashable is for hash tables only.
2020-09-23 17:08:52 <davean> I'm talking hashtable based datastructures
2020-09-23 17:08:54 <dolio> Is there a better name for what hashable does? Seems like there should be.
2020-09-23 17:09:18 × John20 quits (~John@82.46.59.122) (Ping timeout: 256 seconds)
2020-09-23 17:09:51 × zacts quits (~zacts@dragora/developer/zacts) (Quit: leaving)
2020-09-23 17:09:56 <dolio> id isn't really even a good hash for hashtables, no? Although they're not really used for hashtables.
2020-09-23 17:10:14 <davean> dolio: no, its really not :/
2020-09-23 17:10:38 <cr0ssw1nd> davean, I just want to get deterministically random `UUID`s from `String`s
2020-09-23 17:10:40 <dolio> It's probably nice in whatever trie sort of thing unordered containers uses.
2020-09-23 17:10:49 <cr0ssw1nd> I see the answer at SO though
2020-09-23 17:11:01 <cr0ssw1nd> no hashtables
2020-09-23 17:11:05 <cr0ssw1nd> no cryptography
2020-09-23 17:11:06 <davean> cr0ssw1nd: use http://hackage.haskell.org/package/uuid then - what you're doing WOULD NOT GENERATE A VALID UUID
2020-09-23 17:11:28 <davean> UUIDs have standards
2020-09-23 17:11:31 <davean> its in the RFC
2020-09-23 17:11:38 <davean> 'uuid' generates them via said standard
2020-09-23 17:11:46 <cr0ssw1nd> I have to get value of this interface actually https://github.com/wireapp/wire-server/blob/develop/libs/types-common/src/Data/Id.hs#L146
2020-09-23 17:11:56 <cr0ssw1nd> yeah but bits are bits, no?
2020-09-23 17:11:56 <davean> you want version 3 or 5
2020-09-23 17:12:01 <davean> cr0ssw1nd: No
2020-09-23 17:12:09 <davean> UUIDs have structure
2020-09-23 17:12:10 <cr0ssw1nd> so it is not true 128 bits?
2020-09-23 17:12:26 <cr0ssw1nd> it's just size of it but not amount of information there?
2020-09-23 17:12:28 <davean> UUIDs have structure and guarrentees
2020-09-23 17:12:46 <cr0ssw1nd> but look at the code by link
2020-09-23 17:12:53 <cr0ssw1nd> so it is not conventional UUID?
2020-09-23 17:13:02 <cr0ssw1nd> just hexdigits
2020-09-23 17:13:04 <dolio> WordTrieKeyable
2020-09-23 17:13:07 <cr0ssw1nd> with dashes
2020-09-23 17:13:20 <davean> cr0ssw1nd: thats how you read one, not what the data means.
2020-09-23 17:13:28 <davean> Theres dashes where there are for a reason.
2020-09-23 17:13:35 <cr0ssw1nd> damn
2020-09-23 17:13:45 <davean> 'uuid' will generate them as you want
2020-09-23 17:14:00 John20 joins (~John@82.46.59.122)
2020-09-23 17:14:10 <davean> V1 are based off the mac address of the computer they're generated, a random generation number, and the time
2020-09-23 17:14:26 <davean> thats how they know its unique for example, because MAC addresses were not for reuse (sadly VMs ignored that)
2020-09-23 17:14:34 <davean> V3 is based off MD5ing the data
2020-09-23 17:14:41 <davean> V5 is based off SHAing the data
2020-09-23 17:14:49 <geekosaur> actually they claimed not to want the dashes earlier
2020-09-23 17:14:53 <davean> V4 is all but the tagging bits random.
2020-09-23 17:14:55 <cr0ssw1nd> probably I should just hardcode UUIDs then
2020-09-23 17:14:58 × shad0w_ quits (~shad0w_@160.202.37.157) (Remote host closed the connection)
2020-09-23 17:15:03 <cr0ssw1nd> it's just a migration lol
2020-09-23 17:15:06 <davean> cr0ssw1nd: why not generate them with the V5?
2020-09-23 17:15:21 shad0w_ joins (~shad0w_@160.202.37.157)
2020-09-23 17:15:22 <davean> generateNamed :: UUID -> [Word8] -> UUID
2020-09-23 17:15:34 <cr0ssw1nd> I have `randomId` method already
2020-09-23 17:15:35 <davean> you generate a UUID as your namespace, you serialize the data into it, and you get a UUID
2020-09-23 17:16:18 <davean> If you just want random ones, go V4
2020-09-23 17:16:24 nineonine joins (~nineonine@50.216.62.2)
2020-09-23 17:16:36 Saten-san joins (~Saten-san@ip-62-235-13-88.dsl.scarlet.be)
2020-09-23 17:16:41 <davean> nextRandom :: IO UUID

All times are in UTC.