0:21:38kagevfI never thought (but by now I should've known) that you could create your own namespaces in CL
0:23:53kagevfI don't know scheme much at all, but could something like this be used in scheme to support multiple namespaces? or does it have some fundamental flaw preventing this from working? ... just curious ...
0:25:01pjbkagevf: then you can define a macro such as (color-let ((green (0.1 1.0 0.2))) (fill-rect (mix blue green)))
0:25:37pjbkagevf: something like that exists in scheme, for dynamic variables, named parameters.
0:27:49pjbkagevf: but scheme likes to have a single namespace. So you'd have; (let ((f (lambda (c) (fill-rect (mix blue c)))) (green (color 0.1 1.0 0.2))) (f green))
0:49:33kagevfpjb: I see ... thank you for the examples!
0:55:40mdhughesAnd in my actual graphics library, I use a combination of symbols, which are keys in an application-specific palette hashtable, ints (decomposed as ARGB), and 4-vectors. SDL takes them as 4 args, so it has to be decomposed sometime.
0:56:53mdhughesAnd if I had a more modern color API, I'd need another way to represent HSL for HDR displays.
1:04:53White_Flameif your color names were symbols, then a plist entry on the symbol would be faster than a hashtable lookup