Buckshot

by baggers

This week has been without a set direction. I thought I would be working on first class gpu functions and the like but I have had a bunch of bug reports from users, so they went to the top of the pile. Here's a smattering of the goings on:

Made my compiler produce more readable code

My compiler produced working code, but it used a very lazy method to make up glsl names from lisp ones. Basically it appended the name to the namespace changed periods and hyphens to underscores..and not much more. This made for huge ugly names. I simply added a name mapping pool to the compile pass and now the names are tiny.

I also added indentation. Those two things alone made a massive difference.

Removed old crap from compiler

I thought this was a no brainer. Before I had glsl-spec I had some crazy type hacks in my compiler so we could use the pseudo-generic types used in the official glsl spec. Now we have a better source of data I could remove these old hacks.

Turned out that broke more than I expected :D It revealed the problem in the next section and that one of the name-hacks I removed had been accidentally fixing up the bad data. Coding it weird.

Fix problems in my glsl-spec

Super embarrassing, I somehow had all the casing of the glsl variables incorrect. Fixed that

Little updates to math library

Can now set a swizzle of a vector (setf (s~ (v! 1 2 3 4) :yz) (v! 10 10)) -> (v! 1 10 10 4)

I have a ticket to add support for this to my glsl compiler

Satisfy compiler's performance warnings

When compiling gpu pipelines my lisp compiler was telling me that there was some ambiguity in the types of data being used and that it was having to use some more generic (and costly) operations. I found what it was and changed the types of the data to make sure things are kosher. Compiler is happy now

Get set up for testing

More than most, this week has reminded me that I need tests. I looked at one of the more popular testing frameworks for lisp, liked it and have set up Varjo to use it. I really want to look into generative tests using this thing. Spitting out random (but supposedly valid) programs and throwing them at the compiler sounds cool.

I need to do the same for CEPL where we actually use GL to make sure the shit we generate really compiles. Not sure of the cleanest way to set this up yet.

Miscs bugs, reading and blarg

Lots of issues filed, problems identified, and even a couple of things fixed. But all fair to detail'y and boring to write about.

November

It's nanowrimo this month and my partner I usually do this. He actually works on a novel though whereas I pick a feature/project that I want to focus on and hammer on that. I'll hopefully dig into details on that next week.

Seeya folks