Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,804,053 events total
2021-08-12 09:18:25 × Guest|47 quits (~Guest|47@p578b92fd.dip0.t-ipconnect.de) (Quit: Connection closed)
2021-08-12 09:19:10 _xor joins (~xor@74.215.232.67)
2021-08-12 09:21:24 dermato joins (~dermatobr@154.21.23.75)
2021-08-12 09:23:45 × _xor quits (~xor@74.215.232.67) (Ping timeout: 248 seconds)
2021-08-12 09:24:42 × adam1 quits (~adam@2001-b011-4007-2578-2ca6-0e99-140d-5ce9.dynamic-ip6.hinet.net) (Quit: WeeChat 3.2)
2021-08-12 09:25:23 _xor joins (~xor@74.215.232.67)
2021-08-12 09:29:11 cheater joins (~Username@user/cheater)
2021-08-12 09:31:23 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:f117:9393:f77b:e061) (Quit: WeeChat 2.8)
2021-08-12 09:37:47 × _xor quits (~xor@74.215.232.67) (Ping timeout: 268 seconds)
2021-08-12 09:38:36 × curiousgay quits (~curiousga@77-120-186-48.kha.volia.net) (Ping timeout: 256 seconds)
2021-08-12 09:39:02 × azeem quits (~azeem@176.201.11.151) (Ping timeout: 268 seconds)
2021-08-12 09:39:04 _xor joins (~xor@74.215.232.67)
2021-08-12 09:39:14 azeem joins (~azeem@176.200.250.25)
2021-08-12 09:39:47 × timCF quits (~timCF@200-149-20-81.sta.estpak.ee) (Quit: leaving)
2021-08-12 09:41:36 × hnOsmium0001 quits (uid453710@id-453710.stonehaven.irccloud.com) (Quit: Connection closed for inactivity)
2021-08-12 09:41:37 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
2021-08-12 09:48:53 × azeem quits (~azeem@176.200.250.25) (Ping timeout: 268 seconds)
2021-08-12 09:49:43 × smitop quits (~smitop@user/smitop) (Ping timeout: 268 seconds)
2021-08-12 09:51:03 EvanR_ is now known as EvanR
2021-08-12 09:52:37 azeem joins (~azeem@176.200.250.25)
2021-08-12 09:53:19 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2021-08-12 09:53:35 a6a45081-2b83 joins (~aditya@223.226.228.68)
2021-08-12 09:56:44 maerwald[m] is now known as maerwald[M]
2021-08-12 09:57:52 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
2021-08-12 09:59:28 burnsidesLlama joins (~burnsides@dhcp168-018.wadham.ox.ac.uk)
2021-08-12 09:59:29 × burnsidesLlama quits (~burnsides@dhcp168-018.wadham.ox.ac.uk) (Remote host closed the connection)
2021-08-12 09:59:36 burnsidesLlama joins (~burnsides@dhcp168-018.wadham.ox.ac.uk)
2021-08-12 10:00:22 × maerwald[M] quits (~maerwaldm@2001:470:69fc:105::1ee) (Quit: Reconnecting)
2021-08-12 10:00:34 maerwald[M] joins (~maerwaldm@2001:470:69fc:105::1ee)
2021-08-12 10:01:00 drd joins (~drd@2001:b07:a70:9f1f:1562:34de:f50f:77d4)
2021-08-12 10:02:38 × maerwald[M] quits (~maerwaldm@2001:470:69fc:105::1ee) (Changing host)
2021-08-12 10:02:38 maerwald[M] joins (~maerwaldm@user/maerwald)
2021-08-12 10:04:33 maerwald[M] is now known as maerwald[m]
2021-08-12 10:04:56 × azeem quits (~azeem@176.200.250.25) (Ping timeout: 268 seconds)
2021-08-12 10:08:06 <tomsmeding> kuribas: TIL ChronicleT, and also that it has _very_ weird names
2021-08-12 10:09:26 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
2021-08-12 10:11:32 curiousgay joins (~curiousga@77-120-186-48.kha.volia.net)
2021-08-12 10:11:47 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds)
2021-08-12 10:13:41 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-08-12 10:17:28 Morrow[m] joins (~morrowmma@2001:470:69fc:105::1d0)
2021-08-12 10:18:26 smitop joins (~smitop@user/smitop)
2021-08-12 10:18:52 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds)
2021-08-12 10:19:22 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-08-12 10:19:42 × chomwitt quits (~chomwitt@2a02:587:dc04:9a00:12c3:7bff:fe6d:d374) (Ping timeout: 245 seconds)
2021-08-12 10:22:12 timCF joins (~timCF@200-149-20-81.sta.estpak.ee)
2021-08-12 10:28:26 × fabfianda quits (~fabfianda@mob-5-91-112-242.net.vodafone.it) (Ping timeout: 272 seconds)
2021-08-12 10:29:36 fabfianda joins (~fabfianda@mob-5-91-114-42.net.vodafone.it)
2021-08-12 10:30:13 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
2021-08-12 10:30:50 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-08-12 10:31:07 × flukiluke quits (~flukiluke@2603:c023:c000:6c7e:8945:ad24:9113:a962) (Remote host closed the connection)
2021-08-12 10:31:24 flukiluke joins (~flukiluke@2603:c023:c000:6c7e:8945:ad24:9113:a962)
2021-08-12 10:32:13 <timCF> Hello! Is anybody experienced in Haskell<->C FFI APIs? I have a very strange issue with secp256k1 Haskell wrapper around C code. In my code I'm using this function https://hackage.haskell.org/package/secp256k1-haskell-0.5.0/docs/src/Crypto.Secp256k1.html#importSig It's accepting `ByteString` and returning `Maybe Sig`. I think by design it should catch all low-level errors and return Nothing in case of some
2021-08-12 10:32:19 <timCF> failure. I did randomly found that **sometimes** it's failing with C exception (I guess related to NULL pointer) in case where empty ByteString is passed to this Haskell function. It's really strange that in some places empty ByteString is resolved as NULL pointer, but if I'm trying to reproduce it artificially passing (mempty :: ByteString) explicitly - it works just fine, returns Nothing. Are there
2021-08-12 10:32:25 <timCF> different "kinds" of empty ByteString terms in Haskell?
2021-08-12 10:33:35 <timCF> Exception looks like `[libsecp256k1] illegal argument: input != NULL`
2021-08-12 10:34:32 <timCF> And it's coming from here I guess https://github.com/bitcoin-core/secp256k1/blob/0440945fb5ce69d335fed32827b5166e84b02e05/src/secp256k1.c#L380
2021-08-12 10:34:33 jakalx joins (~jakalx@base.jakalx.net)
2021-08-12 10:43:20 × burnsidesLlama quits (~burnsides@dhcp168-018.wadham.ox.ac.uk) (Remote host closed the connection)
2021-08-12 10:43:26 × flukiluke quits (~flukiluke@2603:c023:c000:6c7e:8945:ad24:9113:a962) (Remote host closed the connection)
2021-08-12 10:43:43 flukiluke joins (~flukiluke@2603:c023:c000:6c7e:8945:ad24:9113:a962)
2021-08-12 10:44:49 × fabfianda quits (~fabfianda@mob-5-91-114-42.net.vodafone.it) (Ping timeout: 248 seconds)
2021-08-12 10:45:11 fabfianda joins (~fabfianda@37.183.255.57)
2021-08-12 10:48:06 wxallowed joins (~d4@151.51.133.244)
2021-08-12 10:53:03 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
2021-08-12 10:53:39 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-08-12 10:56:03 × jneira_ quits (~jneira_@28.red-80-28-169.staticip.rima-tde.net) (Quit: Connection closed)
2021-08-12 10:58:07 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2021-08-12 10:59:34 <tomsmeding> timCF: that mempty, is that a strict bytestring?
2021-08-12 11:00:08 <timCF> Yes, just strict ByteString. Does anybody know how in principle on low value level `Data.ByteString.empty` differs from `mempty :: ByteString` or `"" :: ByteString`
2021-08-12 11:00:12 <tomsmeding> Data.ByteString.empty and mempty :: ByteString are both backed by a null pointer, which is passed unchanged to C apis
2021-08-12 11:00:34 <tomsmeding> E.g. empty: https://hackage.haskell.org/package/bytestring-0.11.1.0/docs/src/Data.ByteString.html#empty
2021-08-12 11:00:45 <timCF> `"" :: ByteString` and `mempty :: ByteString` behave differently in my case
2021-08-12 11:00:54 × jmorris quits (~jmorris@2001:19f0:5801:170:5400:3ff:fe81:62fe) (Quit: BYE BITCH)
2021-08-12 11:01:03 <tomsmeding> With OverloadedStrings?
2021-08-12 11:01:03 jmorris joins (~jmorris@2001:19f0:5801:170:5400:3ff:fe81:62fe)
2021-08-12 11:01:07 <timCF> Yes
2021-08-12 11:01:43 <timCF> `"" :: ByteString` is not causing NULL pointer excepption, but `mempty :: ByteString` and `Data.ByteString.empty` do
2021-08-12 11:02:07 <tomsmeding> fromString "" :: ByteString creates a zero-length allocation, whereas mempty and empty don't do any allocation at all and just return a null bytestring
2021-08-12 11:02:26 <tomsmeding> Sounds like this is precisely your problem :p
2021-08-12 11:02:43 Matthias1 joins (~Matthias1@cpe-76-170-236-166.socal.res.rr.com)
2021-08-12 11:02:44 <tomsmeding> I've had trouble with this before: https://github.com/snapframework/snap-core/pull/305
2021-08-12 11:03:30 <timCF> tomsmeding: hmmm so Haskell will recognize ("" :: ByteString) == (mempty :: ByteString) as True? But in reality it's not? :)
2021-08-12 11:04:00 <tomsmeding> timCF: (==) need not be structural equality
2021-08-12 11:04:03 <tomsmeding> ;)
2021-08-12 11:05:11 <tomsmeding> In this case, for (==), the case that produces that equality is the first line here https://hackage.haskell.org/package/bytestring-0.11.1.0/docs/src/Data.ByteString.Internal.html#compareBytes
2021-08-12 11:05:16 <timCF> That's scary, haha) Haskell<->C APIs are scary place) It's first time I have a problems like this)
2021-08-12 11:05:39 <tomsmeding> timCF: this sounds like a bug in the haskell wrapper
2021-08-12 11:06:14 <merijn> tomsmeding: tbh, having a "zero-length" allocation sounds plain wrong
2021-08-12 11:06:22 <tomsmeding> In haskell land, fromString "" and empty are semantically equal, so the wrapper must ensure that that is also the case for these potentially abstraction-breaking functions
2021-08-12 11:06:29 <merijn> Sounds like those should be returning NULL too
2021-08-12 11:06:35 <tomsmeding> merijn: possibly, but it shouldn't be observable :p
2021-08-12 11:06:43 <tomsmeding> So that secp haskell lib should do some checking
2021-08-12 11:06:53 <merijn> What was the original question? I missed that
2021-08-12 11:07:21 <tomsmeding> Some haskell lib uses a C lib and passes bytestring buffers unchanged, and the c lib doesn't like null pointers
2021-08-12 11:07:22 <timCF> tomsmeding: Yeah, I've already created an issue in github, thanks a lot!
2021-08-12 11:07:48 <tomsmeding> timCF: cheers :)
2021-08-12 11:07:50 × Matthias1 quits (~Matthias1@cpe-76-170-236-166.socal.res.rr.com) (Ping timeout: 268 seconds)
2021-08-12 11:08:38 AlexNoo_ joins (~AlexNoo@94.233.240.105)
2021-08-12 11:09:14 <timCF> merijn: It's here https://github.com/haskoin/secp256k1-haskell/issues/36
2021-08-12 11:09:49 <tomsmeding> timCF: re non-structural equality: 0 and -0 have different floating point bit representations, but they compare equal

All times are in UTC.