3 ms·
> spent long, hard hours banging my head against native-image and it just wasn't working out. it would be nice to know what exactly isn't working out and what
by chii 2y ago
> spent long, hard hours banging my head against native-image and it just wasn't working out.
it would be nice to know what exactly isn't working out and what the problems with native-image was.
Coz i think clojure is as close to perfect, imho, as a language can go without selling out.
- huahaiy 2y agoGraalvm native image for Clojure is a solved problem. Just add this library to the project and add a flag to native image command line. https://github.com/clj-easy/graal-build-time https://github.com/clj-easy/graal-build-time This initializes Clojure classes at build time and it mostly works for pure Clojure code. Doing complicated things (e.g. depending on native library, etc.) requires some tweaking. For example, a few packages may need to be declared as initialized at build time or run time, depending what they are doing. And any unresolved classes need to be added to reflection-config.json. All these are easily discoverable if one talks to people in the Clojurian slack channels. Clojure is a small community, so it helps to be part of it, because there are not a lot of open materials on the Web.
- IshKebab 2y ago> solved problem except... > mostly works > requires some tweaking > discoverable if... I know nothing about Clojure but from your caveats I think I can see why he spent hours banging his head against a wall.
- chii 2y agowhen engineers say it's a solved problem, they mean it in the same way as a mathematician saying a theorem is trivially proved.
- deleted 2y ago[deleted]
- iLemming 2y ago> theorem is trivially proved Reminded me Prof. Knuth trolling in "The Art Of Computer Programming" with an exercise for the reader to prove Fermat's Last Theorem. (:
- macmac 2y agoLook at the hoops OP had to jump through to get SBCL working on Windows. I think Graal would compared favourably with that.
- anthk 2y agoWhat did you mean? Can't the user just download Portacle and use it? https://portacle.github.io/ https://portacle.github.io/ Problem solved.
- chii 2y agoRight at the top of the article, the author outlines the requirement was that it must be usable within vim.
- anthk 2y agoNot an issue for Common Lisp, you can use whatever you like, but interacting with a REPL gives you superpowers.
- macmac 2y agoNot really. OP needs to build executables. It is documented here: https://blog.djhaskin.com/blog/release-common-lisp-on-your-first-day/ https://blog.djhaskin.com/blog/release-common-lisp-on-your-f...
- vindarel 2y agoPortacle ships SBCL so one can build executables when using Portacle.
- IshKebab 2y agoProbably, but that doesn't mean Graal is good; it just means they're both bad. Compare it to something like Go or Rust where there are no hoops and they're both well supported on Windows and Mac. I haven't actually used it but I believe Zig has very good cross platform support too.
- djha-skin 2y agoI actually just dusted off my old Clojure stuff to see if it was a "solved problem", and it isn't. I grant that it might be described thus if I started out with that stack, but trying to retrofit an older code base with it is, I have found, next to impossible. You have to code around the myriad gotchas as you go or you're never going to identify all those landmines going back over it after the fact. The errors and bad behaviors are too difficult to identify, even for the `native-image` tooling.
- huahaiy 2y agoNo. I have looked at your code. You did not use the mentioned https://github.com/clj-easy/graal-build-time https://github.com/clj-easy/graal-build-time If you don't do what everybody is doing to solve a problem, then of course it is not a "solved problem" for you. No, you don't need to code specifically for native-image. What are the landmines that you need to code around? Since you have not successfully compiled native-image by following common practices, you obviously don't know.
- KingMob 2y agoWhy do you imagine the OP would push a failed experiment to a publicly available spot? They probably left it sitting in a local branch and went on with their day.
- m1n1 2y agowhat are you referring to when you say a language can sell out?