freenode/#lisp - IRC Chatlog
Search
17:55:56
charles`
Josh_2: I wrote an eval function that wraps cl:eval, then set cl:eval to my custom eval
17:58:51
Xach
Josh_2: you could do that by linking together pngload and vecto, but it isn't a directly supported way to work. (vecto's underlying canvas is compatible with the data pngload works with, i think)
17:59:47
Josh_2
Well I could just draw an SVG and modify it based on where I want my dots and then export that as a PNG each time
18:00:32
Xach
Josh_2: maybe i'm overthinking. are you trying to draw dots on an existing image, or create a fresh new image with some dots in certain places?
18:01:21
Xach
SVG is an XML standard for defining some drawing and other graphical operations. It's useful for making 2d images. My library doesn't use or emit SVG.
18:03:19
Xach
well, if you want to make a PNG with some dots in it, vecto can do that pretty easily. (vectometry helps too.) for example, (with-box-canvas (box 0 0 200 200) (centered-circle-path (point 100 100) 25) (fill-path) (save-png "circle.png"))
18:07:05
Xach
i use it to draw some fairly complicated stuff, like https://www.xach.com/moviecharts/2018.png
18:11:51
alandipert
charles` i've always wondered about hacks to make arbitrary classes funcallable via mop, could be another means toward that end
18:13:02
charles`
It is not really mop based (that is a bit over my head), they are not technically fun-callable (in my utility)
18:15:52
OlCe
Just as an example of interesting uses for this functionality, NewLISP has implicit indexing, one variant of which is to put one (or more) integers at start of a list form to do slicing.
18:19:34
charles`
in my utility, the function is actually more like a macro, so it can do ast changing before it form is actually evaled
18:26:53
_death
it's not neat, it's silly.. (12 ...) is like (op 12 ...).. now you can have (op 12 to 15 do ...) and you can have (op 12 some-array), but having both, each defined by a different user, creates an impractical mess.. so instead we give different names like loop or aref
18:37:37
charles`
_death: the conflicts would be horrible. as long as people are conservative in defining new and crazy ones, it can be nice.
18:38:57
alandipert
we have this problem with symbols already, and have devised various mitigations.. and all the mitigations seem as applicable to eq fixnums as they are to eq symbols. i can imagine a concept of package-qualified fixnum for example
18:39:07
alandipert
granted this is in language design fun world, not CL world. where i wouldn't use it either heh
18:40:33
charles`
classes are already package local, so if you define a class then define an type-function for that class, then I think it would be pretty safe
19:29:38
pve
charles`: you might want to investigate using readtables instead of clobbering cl:eval, if you're going to pursue that further
19:42:01
charles`
pve: I'll look into it, but I wouldn't call it clobbering; it is more like a thin wrapper that calls the original cl:eval.
19:55:53
pve
charles`: I understand, but it's not something you would want to do if you intend to release it as a library.
23:02:57
Josh_2
Normally I would add a key like :pathname "src" and all my code would go in 'src' and then my files are found relative to src, however I want to have a module which contains static files, if I use :pathname isn't it going to look in src?
23:10:06
phoe
like, when you have (:module "foo" ... (:module "bar" ... (:file "baz"))) then you'll end up with a relative path name #p"foo/bar/baz" that ASDF will use to look for the resultant file
23:11:41
Josh_2
Well asdf didn't complain but I'm not sure if it worked or not because It's a :static-file
23:30:44
mfiano
Josh_2: the toplevel asdf form is itself the root module. You can use any properties in children modules.
0:03:02
charles`
I made my type-functions be able to have package local definitions as well as package local enabling, but I'm still rebinding cl:eval
0:47:13
Josh_2
If I use lists to store some config info in a file is read-from-string a safe means or retrieving it? I am pretty sure there are some 'more secure' versions around
0:57:58
mfiano
It's not going to help with READER-ERRORs, but it will mostly prevent read-time evaluation. Just don't read "1f999" or something.
1:51:05
charles`
Xach: my utility doesn't work on for compile, the compiler gives style-warnings for undefined functions (rightfully so).
1:55:40
Xach
it seems like a real challenge to implement, so i look forward to any interesting implementation ideas you may have