The generator must reproduce .NET arithmetic bit for bit, so every unit builds with -ffp-contract=off and -fwrapv. Nuklear goes through the SDL3_Renderer backend, keeping the viewer off macOS's deprecated GL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1.3 KiB
Sex field notes
- A malformed
forcrashes the compiler - Spurious "cannot type this" on a header pointer
- No dependency output
Language bugs and friction met while building vs-map-viewer, against sexc at ~/dev/sex. Newest first.
A malformed for crashes the compiler
sexc dfafe8b. Writing the C-style grouped header
(for ((var i int 0) (< i 4) (++ i))
...)
instead of (for (var i int 0) (< i 4) (++ i) ...) dies inside the
writer with no source location:
Error: (caddr) bad argument type: () fmt-c-writer.scm:112: scheme#symbol->string
Expected: a diagnostic naming the file, the line and the expected shape
of for.
Spurious "cannot type this" on a header pointer
sexc dfafe8b. In src/viewer.sex:
(var font (* struct nk-font) (nk-font-atlas-add-default ...))
(/= (. font handle height) scale)
This warns cannot type this; `.' reads it as a value font, yet the
emitted C is the correct font->handle.height / scale;=. The variable's
type is written out, so the warning is wrong on both counts: the type
is known, and the access isn't read as a value. The nearby
(& (. font handle)) gives no warning.
No dependency output
sexc has nothing like cc -MD. An import pastes the imported
module's public forms into the importer, so the Makefile has to make
every Sex object depend on every .sex source.