2025/01/13

Newest at the top

2025-01-13 18:10:14 +0100 <r-sta> https://stackoverflow.com/questions/27696261/good-type-design-in-haskell-for-the-ast-of-a-simple-l…
2025-01-13 18:09:10 +0100 <r-sta> that might be much easier to work with if you need the AST without the FFI
2025-01-13 18:08:44 +0100 <r-sta> dont know if you seen this too https://hackage.haskell.org/package/llvm-hs-pure
2025-01-13 18:07:29 +0100 <r-sta> you want a better access point
2025-01-13 18:07:17 +0100 <r-sta> so its not going to be anywhere else!
2025-01-13 18:07:05 +0100 <r-sta> so its in there...
2025-01-13 18:06:54 +0100 <r-sta> llvm-hs is a set of Haskell bindings for LLVM http://llvm.org/. Unlike other current Haskell bindings, it uses an ADT to represent LLVM IR.
2025-01-13 18:06:53 +0100 <r-sta> btw, google search says;
2025-01-13 18:06:01 +0100 <r-sta> there must be some plugins to some grammer library
2025-01-13 18:05:43 +0100 <r-sta> if it works at all, you would expect a better interface from an intermediate module
2025-01-13 18:05:29 +0100 <r-sta> yeah jesus christ thats horrendous
2025-01-13 18:04:50 +0100 <haskellbridge> <magic_rb> And extremely poorly documented
2025-01-13 18:04:47 +0100 <r-sta> still, seems like it would have the kind of semantics that a lib would support, im guessing thats what llvm-hs is, ill check
2025-01-13 18:04:44 +0100 <haskellbridge> <magic_rb> Nah its mainly the fact that LLVMs api is extremely unstable and just bad in general
2025-01-13 18:04:06 +0100 <r-sta> i guess the option to do so might be reason to suspect the support for an alternative might not exist
2025-01-13 18:03:44 +0100 <haskellbridge> <magic_rb> So ill just spit out LLVM IR directly
2025-01-13 18:03:35 +0100 <r-sta> this seems like project creep
2025-01-13 18:03:31 +0100 <haskellbridge> <magic_rb> Okay i was wondering if im missing a lib we have, but looks like im not
2025-01-13 18:03:25 +0100 <r-sta> it mentions "the need to update LLVM-hs"
2025-01-13 18:03:16 +0100 <haskellbridge> <magic_rb> I dont use normal reddit so i dont :) but yes
2025-01-13 18:02:55 +0100 <haskellbridge> <magic_rb> Yeah exactly
2025-01-13 18:02:54 +0100 <r-sta> you have to expand the comment on a deleted comment!
2025-01-13 18:02:15 +0100 <r-sta> https://www.reddit.com/r/haskell/comments/13yhc5l/comment/jmmui4b/?utm_source=share&utm_medium=web…
2025-01-13 18:02:15 +0100 <r-sta> this seems on point
2025-01-13 18:01:12 +0100 <haskellbridge> <magic_rb> Ill end up doing the Text magic probably. Not a big project so its fine
2025-01-13 18:00:47 +0100 <haskellbridge> <magic_rb> r-sta Thats llvm-hs i think which is not really functional anymore :(
2025-01-13 18:00:31 +0100 <geekosaur> that's the IR. you can carry it to another system with no ghc but has LLVM and run opt and llc there
2025-01-13 18:00:10 +0100 <r-sta> https://www.hcesperer.org/posts/2017-07-28-writing-a-small-llvm-compiler-frontend-in-haskell.html
2025-01-13 17:59:31 +0100 <haskellbridge> <magic_rb> I can always do a healthy amount of Text concatenations
2025-01-13 17:58:14 +0100 <r-sta> fair
2025-01-13 17:57:42 +0100 <haskellbridge> <magic_rb> No i meant writing my own codegen in haskell for my own shitty little language
2025-01-13 17:57:24 +0100 <r-sta> nothing about llvm IR tho
2025-01-13 17:57:18 +0100 <r-sta> and a file called main.ll is created.
2025-01-13 17:57:17 +0100 <r-sta> ghc -keep-llvm-files main.hs
2025-01-13 17:56:34 +0100 <r-sta> https://stackoverflow.com/questions/52040651/compile-haskell-programs-to-llvm-ir
2025-01-13 17:56:33 +0100 <r-sta> i can find this;
2025-01-13 17:56:28 +0100machinedgod(~machinedg@d108-173-18-100.abhsia.telus.net) (Ping timeout: 252 seconds)
2025-01-13 17:55:50 +0100 <haskellbridge> <magic_rb> My other option is fixing llvm-hs
2025-01-13 17:55:37 +0100 <haskellbridge> <magic_rb> Was just about to say GHC does that
2025-01-13 17:55:24 +0100 <geekosaur> (LLVM doesn't want people using IR directly. never mind that ghc does, they pay the price for it)
2025-01-13 17:55:14 +0100 <haskellbridge> <magic_rb> Youre not :)
2025-01-13 17:54:58 +0100 <geekosaur> I thought you weren't supposed to do that
2025-01-13 17:54:53 +0100 <r-sta> sounds like a parsecy sort of thing maybe?
2025-01-13 17:54:23 +0100 <haskellbridge> <magic_rb> Ive taking a course on compiler construction, unfortunately in python so im thinking if i can rewrite it haskell. Do we have a package which would allow me to spit out textual llvm IR easily?
2025-01-13 17:53:58 +0100 <r-sta> 7*
2025-01-13 17:53:47 +0100 <r-sta> its got code i wrote like 5 years ago
2025-01-13 17:53:41 +0100 <r-sta> its the bigest project ever!
2025-01-13 17:53:12 +0100 <r-sta> ill see if it works
2025-01-13 17:53:08 +0100 <r-sta> i mean, repl should do that anyway right? but the run call would have maybe left *something* extra...
2025-01-13 17:52:41 +0100 <r-sta> but maybe it will stop short of main.exe