Files
VS-map-previewer/Sex-field-notes.org
alex-eg d72ae437ae set up the build, the viewer window and the vsmv cli
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>
2026-10-08 17:39:10 +03:00

43 lines
1.3 KiB
Org Mode

#+TITLE: Sex field notes
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
#+begin_src scheme
(for ((var i int 0) (< i 4) (++ i))
...)
#+end_src
instead of =(for (var i int 0) (< i 4) (++ i) ...)= dies inside the
writer with no source location:
#+begin_example
Error: (caddr) bad argument type: ()
fmt-c-writer.scm:112: scheme#symbol->string
#+end_example
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=:
#+begin_src scheme
(var font (* struct nk-font) (nk-font-atlas-add-default ...))
(/= (. font handle height) scale)
#+end_src
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.