Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2020-11-02 12:44:48 <merijn> hmm, what's the command?
2020-11-02 12:44:55 <jophish> Sorry for my terseness, I'm on mobile
2020-11-02 12:45:23 ensyde joins (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net)
2020-11-02 12:45:31 FreeBirdLjj joins (~freebirdl@101.228.42.108)
2020-11-02 12:45:39 <jophish> Cabal configure -fgeneric-instances
2020-11-02 12:46:16 <jophish> https://github.com/expipiplus1/vulkan/blob/68638aceeb5526b3bf53674f06dc24243d7fda32/.github/workflows/ci.yml#L89
2020-11-02 12:46:19 <merijn> jophish: That is not a cabal flag?
2020-11-02 12:46:57 <matthew-> ski: gotcha - that makes sense - it's about allowing control of the scope of the binder then.
2020-11-02 12:47:01 <jophish> It's a flag for a package in this project
2020-11-02 12:47:06 <jophish> Hahah, did I get it wrong!
2020-11-02 12:47:27 <ski> matthew- : you can also imagine things like `let (m,n) = (n,m+n) in ..m..n..' .. or having a `case' or conditional as the body of the defining equation, in a more complicated case
2020-11-02 12:48:00 <merijn> jophish: So you wanna set that flag for CI?
2020-11-02 12:48:07 ubert joins (~Thunderbi@p200300ecdf1e53d1e6b318fffe838f33.dip0.t-ipconnect.de)
2020-11-02 12:48:34 <ski> matthew- : if you combine two declarations into one, you can combine them sequentially, collaterally, or recursively
2020-11-02 12:48:35 <merijn> jophish: Alternate simpler idea: Why not have a dedicated separate project file for the CI config and setting the flag in there?
2020-11-02 12:50:12 × ensyde quits (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) (Ping timeout: 260 seconds)
2020-11-02 12:50:25 Kaivo joins (~Kaivo@104-200-86-99.mc.derytele.com)
2020-11-02 12:50:26 × FreeBirdLjj quits (~freebirdl@101.228.42.108) (Ping timeout: 268 seconds)
2020-11-02 12:51:10 jumper149 joins (~jumper149@ip185225.wh.uni-hannover.de)
2020-11-02 12:51:42 geekosaur joins (ac3a8c5f@172.58.140.95)
2020-11-02 12:52:50 bqv joins (~bqv@2a02:8010:674f:0:d65d:64ff:fe52:5efe)
2020-11-02 12:52:57 <bqv> d.nnr
2020-11-02 12:53:08 <bqv> *hello
2020-11-02 12:53:14 <ski> hello
2020-11-02 12:53:17 <bqv> oh, ski
2020-11-02 12:53:21 <bqv> fancy seeing you here
2020-11-02 12:53:44 <bqv> have you ever used Foreign.Marshal.Alloc? bizarrely, malloc causes ghc to error with undefined, but mallocBytes doesn't
2020-11-02 12:54:15 <merijn> Malloc with what argument?
2020-11-02 12:54:26 <bqv> malloc doesn't require an argument
2020-11-02 12:54:36 notmyname joins (~notmyname@84.39.116.180)
2020-11-02 12:54:36 <bqv> Storable a => IO (Ptr a)
2020-11-02 12:54:41 <bqv> :t malloc
2020-11-02 12:54:42 <ski> perhaps the `Storable' instance is incorrect ?
2020-11-02 12:54:43 <lambdabot> error: Variable not in scope: malloc
2020-11-02 12:54:45 <merijn> Well, what result type, I mean
2020-11-02 12:54:46 <bqv> ack.
2020-11-02 12:54:51 <ski> @type Foreign.Marshal.Alloc.malloc
2020-11-02 12:54:52 <lambdabot> Foreign.Storable.Storable a => IO (GHC.Ptr.Ptr a)
2020-11-02 12:55:04 <bqv> it's a custom storable
2020-11-02 12:55:16 <bqv> i would be hardpressed to see how the instance is wrong
2020-11-02 12:55:49 texasmynsted joins (~texasmyns@212.102.45.115)
2020-11-02 12:55:52 florian_ joins (~florian@85-170-214-92.rev.numericable.fr)
2020-11-02 12:55:54 <bqv> and like i said, if i just use mallocBytes (sizeof <type>) instead, it works fine
2020-11-02 12:56:00 sord937 joins (~sord937@gateway/tor-sasl/sord937)
2020-11-02 12:56:10 <ski> not your instance then, i take it
2020-11-02 12:56:33 <bqv> ah, it is my instance. I have it setup using hsc2hs
2020-11-02 12:56:42 <bqv> i checked the value of sizeOf and alignment using trace, they're fine
2020-11-02 12:56:46 <bqv> (best i can tell)
2020-11-02 12:56:52 <jophish> Merijn, and then mv project.ci project.local during the build instead of configure?
2020-11-02 12:57:11 <matthew-> ski: thank you, that all makes sense
2020-11-02 12:57:22 <merijn> jophish: eh, or just use --project-file to point it at the right one? ;)
2020-11-02 12:57:36 ensyde joins (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net)
2020-11-02 12:57:38 <jophish> Ah, even better
2020-11-02 12:57:48 <merijn> jophish: Almost as if this was an anticipated usecae ;)
2020-11-02 12:58:18 <ski> bqv : "error with undefined", as when forcing `undefined' ?
2020-11-02 12:58:19 × Eason0210 quits (~user@101.85.10.81) (Quit: ERC (IRC client for Emacs 28.0.50))
2020-11-02 12:58:38 <bqv> yes
2020-11-02 12:58:48 <bqv> specifically shows me an undefined coming from Alloc.hs
2020-11-02 12:58:57 <bqv> (in Foreign.Marshal)
2020-11-02 12:59:42 <merijn> bqv: Can you pastebin your Storable instance somewhere?
2020-11-02 13:00:39 refried_ joins (~textual@pool-108-20-26-90.bstnma.fios.verizon.net)
2020-11-02 13:00:42 × texasmynsted quits (~texasmyns@212.102.45.115) (Ping timeout: 272 seconds)
2020-11-02 13:01:15 × refried_ quits (~textual@pool-108-20-26-90.bstnma.fios.verizon.net) (Client Quit)
2020-11-02 13:01:28 <bqv> https://termbin.com/7z9jm
2020-11-02 13:01:33 <bqv> merijn: happy to oblige
2020-11-02 13:01:50 <merijn> bqv: You fucked up sizeof :)
2020-11-02 13:01:55 <merijn> You pattern match
2020-11-02 13:01:56 <bqv> oh no
2020-11-02 13:01:59 <bqv> why
2020-11-02 13:02:13 <merijn> sizeOf shouldn't evaluate it's argument, it's only for type inference
2020-11-02 13:02:26 <merijn> sizeOf is usually called with undefined as argument (which is what malloc does)
2020-11-02 13:02:36 × ensyde quits (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) (Ping timeout: 272 seconds)
2020-11-02 13:02:38 <bqv> oh balls. hence i end up forcing that undefined
2020-11-02 13:02:45 <bqv> gotcha. thanks
2020-11-02 13:02:47 <merijn> bqv: So malloc calls "sizeOf undefined" and then crashed on the pattern match ;)
2020-11-02 13:02:51 refried_ joins (~textual@pool-108-20-26-90.bstnma.fios.verizon.net)
2020-11-02 13:03:11 <merijn> Nowadays people would use "Proxy" to control the type inference, but that didn't exist when Storable was defined
2020-11-02 13:03:33 × florian_ quits (~florian@85-170-214-92.rev.numericable.fr) (Read error: Connection reset by peer)
2020-11-02 13:03:33 <bqv> i remember delving into that once
2020-11-02 13:03:52 florian_ joins (~florian@85-170-214-92.rev.numericable.fr)
2020-11-02 13:04:01 × refried_ quits (~textual@pool-108-20-26-90.bstnma.fios.verizon.net) (Client Quit)
2020-11-02 13:04:06 domj joins (~domj@77.139.218.14)
2020-11-02 13:06:19 × domjancik quits (~domj@77.139.218.14) (Ping timeout: 256 seconds)
2020-11-02 13:06:57 <kuribas> :t asTypeOf
2020-11-02 13:06:57 __monty__ joins (~toonn@unaffiliated/toonn)
2020-11-02 13:06:58 <lambdabot> a -> a -> a
2020-11-02 13:09:03 × florian_ quits (~florian@85-170-214-92.rev.numericable.fr) (Remote host closed the connection)
2020-11-02 13:09:49 ensyde joins (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net)
2020-11-02 13:10:05 florian_ joins (~florian@85-170-214-92.rev.numericable.fr)
2020-11-02 13:10:33 × florian_ quits (~florian@85-170-214-92.rev.numericable.fr) (Read error: Connection reset by peer)
2020-11-02 13:11:06 × Rudd0 quits (~Rudd0@185.189.115.108) (Ping timeout: 258 seconds)
2020-11-02 13:11:29 florian_ joins (~florian@85-170-214-92.rev.numericable.fr)
2020-11-02 13:11:59 × florian_ quits (~florian@85-170-214-92.rev.numericable.fr) (Max SendQ exceeded)
2020-11-02 13:12:05 × cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 2.9)
2020-11-02 13:12:36 florian_ joins (~florian@85-170-214-92.rev.numericable.fr)
2020-11-02 13:13:33 × florian_ quits (~florian@85-170-214-92.rev.numericable.fr) (Remote host closed the connection)
2020-11-02 13:14:05 × ensyde quits (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) (Ping timeout: 240 seconds)
2020-11-02 13:15:10 texasmynsted joins (~texasmyns@212.102.45.115)
2020-11-02 13:15:17 × khaladrogo quits (~khaladrog@2405:204:5204:7e58:f1ab:1e40:6c9b:8f55) (Remote host closed the connection)
2020-11-02 13:19:32 akad_ joins (~akad@109107030050.radomsko.vectranet.pl)

All times are in UTC.