One of my favorite pastimes while waiting on builds is to install Windows 95 using a virtual stack of virtual floppy disks. This is one of the strengths that VMware brings to Azure. techdocs.broadcom.com/us/en/vmware...
Posts by Dave Curylo
Justified as it may well be - it’s not not true 😂
I meant that I considered using Myriad _instead of_ AI to generate the code.
I even considered Myriad, but would have to write a parser AND THEN a generator.
I agree - it worked in this case because the service was pretty small so I could check it. The alternatives were broken enough that “chatbot-accurate” was better than existing tooling. I definitely would rather spec-to-code be deterministic.
Yes, there are client generators all over, but no server stubs, for suave, falco or really even vanilla aspnetcore. The giraffe one was very outdated and I spent a while on updating it before just giving up.
I’m impressed with how accurate this one was, with one little adjustment:
After spending hours wading through all the unmaintained openapi generators and then trying to implement a typespec emitter myself, I eventually just asked copilot to generate an #fsharp server stub for suave.
I asked ChatGPT the same thing so I could share:
chatgpt.com/share/67cee5...
I hope to get it totally working soon, it's really cool to see F# code able to do integrate something so seamlessly that I can use certificates from an Azure Key Vault like regular files.
The real-world use is that secrets and certificates have to rotate, and now they are immediately in place.
I suspect something about running a libfuse plugin in multithreaded mode is causing the runtime to fail creating threads, and it unfortunately always calls this an OutOfMemoryException.
github.com/dotnet/runti...
Anyway, cool #fsharp stuff these days, and I hope this gives people some examples for all the native interop you can do nicely in F#:
* Structs: github.com/ninjarobot/K...
* Callbacks: github.com/ninjarobot/K...
* Type-safe marshalling: github.com/ninjarobot/K...
FUSE filesystems use multiple threads, and running as a regular application, I used a single-thread option. When it's a systemd mount, it's multithreaded. As soon as I make a call to Azure Key Vault, I get exceptions on Thread.StartInternal.
github.com/ninjarobot/K...
CC: @chethusk.bsky.social
libfuse is all callbacks, so it is a natural fit for F# - that part went really well. Compiling dotnet to native also worked nicely, and before long, I had a FUSE filesystem in F#, and I could use my KeyVault like a directory. When I tried to use it as a systemd mount, things got dicey...
This is also really helpful when implementing a callback with several struct parameters, because it's not just a bunch of IntPtrs:
Marshaling a managed struct to native is type-safe and very straightforward:
That means when you marshal code in and out of a pointer, it's not just an IntPtr that could point to anything...it's an IntPtr that points to a very specific type of struct.
In a decade of F#, I never did native interop, and this is an area the language designers did some really cool work. In C#, you're handling IntPtr. In F#, you have nativeptr<'t>.