Newest at the top
| 2025-12-19 10:59:58 +0100 | <merijn> | Liamzee: Anyway, I would generally *prefer* ccall over capi unless I specifically needed capi, for for example accessing CPP macros |
| 2025-12-19 10:58:54 +0100 | haritz | (~hrtz@user/haritz) haritz |
| 2025-12-19 10:58:54 +0100 | haritz | (~hrtz@140.228.70.141) (Changing host) |
| 2025-12-19 10:58:54 +0100 | haritz | (~hrtz@140.228.70.141) |
| 2025-12-19 10:58:37 +0100 | <merijn> | I basically had a C++ + haskell project where I just had a makefile calling cabal to deal with building the haskell bits |
| 2025-12-19 10:58:07 +0100 | <merijn> | Liamzee: FWIW cabal is pretty well-behaved when you call it from, e.g. a Makefile |
| 2025-12-19 10:56:36 +0100 | <haskellbridge> | <Liamzee> so I took a look at Apache Arrow, and noped the hell out, am now considering whether I can do parquet-rs instead |
| 2025-12-19 10:56:10 +0100 | raym | (~ray@user/raym) (Ping timeout: 245 seconds) |
| 2025-12-19 10:56:06 +0100 | <haskellbridge> | <Liamzee> I promised someone and I'll probably break the promise, to go give them FFI parquet support |
| 2025-12-19 10:55:50 +0100 | <haskellbridge> | <Liamzee> I read that Rust has cbindgen |
| 2025-12-19 10:55:27 +0100 | <merijn> | Liamzee: Oh, cabal not being able to call cargo, yeah that's true |
| 2025-12-19 10:55:27 +0100 | <haskellbridge> | <Morj> "ABI" - yes, but you do the same thing and export unmangled functions with C abi in c++ |
| 2025-12-19 10:55:06 +0100 | <haskellbridge> | <Liamzee> then copy paste |
| 2025-12-19 10:55:04 +0100 | <haskellbridge> | <Liamzee> ? I had to generate a static build artifact from Cargo |
| 2025-12-19 10:55:00 +0100 | <haskellbridge> | <Morj> I mean «modern» c++ with smart pointers and stuff. If we're talking c++ with manual memory management, that's terrible, but that's also terrible to use from c++ |
| 2025-12-19 10:54:53 +0100 | <merijn> | What do you need a custom setup.hs for? |
| 2025-12-19 10:54:46 +0100 | <merijn> | Liamzee: What? |
| 2025-12-19 10:54:37 +0100 | <haskellbridge> | <Liamzee> the worst part right now is that Cabal can't do this on its own, not without a custom Setup.hs |
| 2025-12-19 10:54:37 +0100 | <merijn> | Because C++ doesn't have any ABI defined at all |
| 2025-12-19 10:54:12 +0100 | <haskellbridge> | <Morj> Hm, you think? Why? |
| 2025-12-19 10:53:55 +0100 | <haskellbridge> | <Morj> In general rust's typical approaches to memory are very similar to c++ |
| 2025-12-19 10:53:53 +0100 | <merijn> | Morj: No, C++ is infinitely worse |
| 2025-12-19 10:53:46 +0100 | <merijn> | Liamzee: ccall is just the tradiational C ABI, with all limitations of that (i.e. no access to CPP, etc) |
| 2025-12-19 10:53:38 +0100 | <haskellbridge> | <Morj> Mm, in my experience it's about the same nightmare as binding to c++ code |
| 2025-12-19 10:53:17 +0100 | <haskellbridge> | <Liamzee> I'm sure once it gets into sophisticated memory handling it's going to become nightmarish, especially under concurrent conditions |
| 2025-12-19 10:53:00 +0100 | <haskellbridge> | <Liamzee> Morj: this isn't that painful, 5 minutes |
| 2025-12-19 10:52:55 +0100 | <haskellbridge> | <Morj> Also «easy, doable, and /fun/», really? |
| 2025-12-19 10:52:48 +0100 | <merijn> | Liamzee: ccall is not all all suspect |
| 2025-12-19 10:52:38 +0100 | <merijn> | The Haskell FFI to C is pretty comfy imo, I would assume Rust's is too, so I wouldn't expect it to be particularly painful |
| 2025-12-19 10:52:08 +0100 | <haskellbridge> | <Morj> You are quite tolerant to pain I see |
| 2025-12-19 10:51:50 +0100 | <haskellbridge> | <Liamzee> also I made sure there was #[unsafe(nomangle)] annotations and the extern "C" declaration. |
| 2025-12-19 10:51:25 +0100 | <haskellbridge> | <Liamzee> swapped to capi |
| 2025-12-19 10:51:11 +0100 | <haskellbridge> | <Liamzee> but ccall is old and iirc suspect, so i shuffled the cabal around a bit more, added a libffitest.h header in C |
| 2025-12-19 10:50:46 +0100 | <haskellbridge> | <Liamzee> under cbits, then direct called with ccall |
| 2025-12-19 10:50:42 +0100 | Googulator71 | (~Googulato@2a01-036d-0106-48e4-3c18-a4bd-1bda-7c8b.pool6.digikabel.hu) |
| 2025-12-19 10:50:33 +0100 | Googulator71 | (~Googulato@2a01-036d-0106-48e4-3c18-a4bd-1bda-7c8b.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-12-19 10:50:32 +0100 | <haskellbridge> | <Liamzee> I just generated a libffitest.a file from Cargo, dumped it into my cabal init folder |
| 2025-12-19 10:49:59 +0100 | <haskellbridge> | <Morj> Rust-to-haskell-via-c is a pain in the ass on both sides |
| 2025-12-19 10:49:46 +0100 | <haskellbridge> | <Morj> What are you using for it? |
| 2025-12-19 10:49:29 +0100 | <haskellbridge> | <Liamzee> I just heard from humans that Haskell-Rust FFI is a pita. This seems easy, doable, and fun, at least at the hello world stage. |
| 2025-12-19 10:48:11 +0100 | <merijn> | Who is claiming what is black magic? |
| 2025-12-19 10:44:18 +0100 | tzh | (~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz) |
| 2025-12-19 10:43:27 +0100 | <haskellbridge> | <Liamzee> hmmm, playing around with Haskell-To-Rust FFI. Why are we claiming this is black magic again? |
| 2025-12-19 10:37:13 +0100 | cafkafk | (~cafkafk@fsf/member/cafkafk) (Client Quit) |
| 2025-12-19 10:36:23 +0100 | cafkafk | (~cafkafk@fsf/member/cafkafk) cafkafk |
| 2025-12-19 10:22:44 +0100 | <probie> | Axman6: I think the only way to accurately answer that question is to benchmark it |
| 2025-12-19 10:21:58 +0100 | humasect | (~humasect@dyn-192-249-132-90.nexicom.net) (Read error: Connection reset by peer) |
| 2025-12-19 10:21:51 +0100 | humasect | (~humasect@dyn-192-249-132-90.nexicom.net) humasect |
| 2025-12-19 10:20:48 +0100 | Googulator22 | (~Googulato@2a01-036d-0106-48e4-3c18-a4bd-1bda-7c8b.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-12-19 10:20:48 +0100 | Googulator71 | (~Googulato@2a01-036d-0106-48e4-3c18-a4bd-1bda-7c8b.pool6.digikabel.hu) |