graalvm

Ingy döt Net 2024-01-10T14:16:17.994669Z

I'm getting a windows 11 vm set up to build stuff. What environment should I be using for my builds. Optimally I would like a Bash + GNU make + curl, CLI environment in Windows...

Ingy döt Net 2024-01-10T14:18:16.767749Z

https://gitforwindows.org/ has been my go to in the past.

respatialized 2024-01-10T14:19:58.780959Z

WSL is very good, particularly if you want coreutils-like affordances, but may not necessarily meet your definition of "in Windows" as it really is a separate OS

borkdude 2024-01-10T14:21:03.244399Z

I'm using bb to make it all cross-platform

respatialized 2024-01-10T14:21:43.128609Z

https://github.com/uutils/coreutils (I haven't used this but may provide the DX you want without WSL)

borkdude 2024-01-10T14:21:44.916029Z

For testing Windows stuff I stick to cmd.exe as much as possible. I don't use Windows as a primary development station though

Ingy döt Net 2024-01-10T14:27:20.742049Z

@afoltzm can WSL run in a VM?

Ingy döt Net 2024-01-10T14:27:54.212699Z

That would be pretty hilarious. UTM on Mac running Win11 running Linux.

respatialized 2024-01-10T14:38:59.871839Z

I have no idea, tbh, but I think for your purposes @borkdude’s suggestion of staying closer to the platform defaults might be a better option than worrying about maintaining a complex build/setup process for your VM

Ingy döt Net 2024-01-10T14:42:45.632049Z

I think using cmd would be a big set back for my build system. I'll try out windowsforlinux with my current system and see what happens. At worst, I'll fail fast 🙂

lread 2024-01-10T14:48:55.104069Z

I only use windows vms to troubleshoot windows issues. I mostly use scoop to install whatever I need and stick to babashka for scripting so that I only have to write my scripts once for all OSes.

Ingy döt Net 2024-01-10T14:51:36.339819Z

what's scoop?

lread 2024-01-10T14:53:00.414269Z

Because I’m using bb scripts I can work from cmd or powershell, I just need a shell with vs vars setup appropriately.

lread 2024-01-10T14:53:42.285269Z

https://scoop.sh/

lread 2024-01-10T14:58:28.913299Z

I typically launch clojure via bb’s clojure launcher, but if I want to run a clojure exe I use https://github.com/casselc/clj-msi to avoid cmd line issues with https://github.com/clojure/tools.deps.alpha/wiki/clj-on-Windows

Ingy döt Net 2024-01-10T15:01:07.093659Z

Switching to bb is not what I need at the moment. git for windows provides git, bash and a decent terminal. My build system fetches a graalvm download which contains all the java parts. I'm hoping that running native-image in the right environment will just work (make the correct builds)

lread 2024-01-10T15:16:26.235379Z

Not sure if you are also wondering what folks use for CI. I typically use GitHub Actions with https://github.com/DeLaGuardo/setup-clojure and https://github.com/graalvm/setup-graalvm which both work on windows.

Ingy döt Net 2024-01-10T15:22:34.493159Z

CI is my next big thing to tackle. I need to make builds for ys and libyamlscript for the 5 graalvm ostype/machtype platforms, publish them to github, and then release a binding module to cpan, pypi, clojars, maven, rubygems and dozens more. My current plan is to also use GHA, but to wire up custom builders instead of using github's. Graal builds are expensive and I'm not even sure GH supports all 5 platforms I need.

Ingy döt Net 2024-01-10T15:24:23.028409Z

One thing I'm keen to see is if I can use YS instead of YAML for GHA workflows. I think I can. I've done something like this in the past.

Ingy döt Net 2024-01-10T15:24:51.066359Z

If it works out you can copy the pattern to write your workflows in bb 🙂

lread 2024-01-10T15:29:45.414609Z

I’m finding that I like to keep most work in my bb scripts instead of workflows. This allows me to run work locally in dev and when troubleshooting.

Ingy döt Net 2024-01-10T15:31:15.838639Z

Same. Except bash.

👍 1
Ingy döt Net 2024-01-10T15:31:32.709209Z

3 lines of yaml 🙂

Ingy döt Net 2024-01-10T15:37:26.547299Z

when ys is far along enough to write bb in, I'll look more into using bb for some things. cross platform scripting is nice. but since I know bash enough to write a book about it, cross-platform stuff isn't a big concern of mine. getting my clojure/bb skills close to my bash skills at this time would be too painful

lread 2024-01-10T15:41:43.758599Z

Hey, whatever works! I looooove bb but if bash is your jam, that’s fine!

Ingy döt Net 2024-01-10T15:50:31.281119Z

In 2002 my guru told me to learn bash if I wanted to get to thenextlevel. I skipped his advice until 2012 when I decided to write a major framework with plugin system etc in Bash. I wasn't sure if I could but it worked great. And my day to day programming went to thenextlevel. I have nothing but respect for bb but your fluency in bb is limited by your fluency in clojure. I'm not there yet. Also the world needs its bash helper folk, and I'm happy to serve in that role. :)

👍 1
Ingy döt Net 2024-01-11T14:49:05.265089Z

The windows build adventure is going pretty well. Just Makefile tweaks. File paths are a bit weird between bash and make. /c/ in bash is C:/ in make for instance. But easy to adjust. Got clojure building the jars now. native-image is looking for visual studio thing which I'm installing now. This all might be way easier than I thought...

Ingy döt Net 2024-01-11T14:49:50.124059Z

One thing I was wondering. Does anyone use docker containers to build windows native-image binaries?

Ingy döt Net 2024-01-11T14:50:41.923709Z

That seems like it would be the best way to make this setup repeatable...

lread 2024-01-11T17:05:13.153679Z

I’ve got no experience with windows docker containers