On Sun, Apr 19, 2020 at 10:04:18AM -0700, Stephen De Gabrielle wrote:
> New week, new Racket! What are you folks up to?
# Related to Racket
## Working on the OpenGl binding.
Still wrestling with Khronos's new XML specification for OpenGL.
I have a somewhat confusing parser that processes sxml's output;
The parser nees at least three representations for types: XML expressione,
ctypes for the ffi, and Racket types for the documentation (and, peresumably
someday, for the typed-Racket binding for OpenGL.)
I'm changing the parser from Racket to Typed Racket, gaining much clarity in
the code.
## But Typed Racket brings its own problems.
For example, take a list of type (Listof Foo).
Check if it in null.
In the branch where it's not null, the tyechecker now knows the list
is of type (Pair Foo (Listof Foo))
Undersome circumstances (which aren't quite clear to me) operations take an
argument of type (Listof Foo) don't seem to recognise that a
(Pair Foo (Listof Foo)) is also of type (Listof Foo)
IIRC, map is on of these operations.
And why can't Typed Racket error messages contain a line number? In DrRacket
it means I can easily fix one error per run. Although the error areas get
attention-getting pink backgrounds, they aren't in the same order as the error
messages, and all pink the backgrounds disappear as soon as I start to fix
the first error.
* Unrelated to Racket.
I spent a weekend on LudumDare, not managing to produce a game, but
ending up with a rudimentary terrain generator with rivers, written in
Javascript mbedded in HTML. See
https://github.com/hendrikboom3/LudumDare46
for source code;
http://topoi.pooq.com/hendrik/ld46/game.html to see a map
being generated.
I've also enjoyed attending math seminars all over the world; COVID-19 has
forced then to go online and that means they're easy for me to go to.
-- hendrik