freenode/lisp - IRC Chatlog
Search
2:03:13
kinope
I stopped by yesterday under the name Decs. I program just as a hobby. I hope it's cool if I can pop by in the future if I have questions, not sure if I personally have much to offer others just yet in that capacity though.
2:17:37
kinope
I do have a question about closures. I'm working on a project where I made my object classes from closures (experimenting with material from Let Over Lambda). I was informed that it's unusual to do that, and to use the standard class facilities presest in Common Lisp. Is this a matter of aesthetics or is it rooted in practicality or performance considerations. I'm genuinelly curious as I don't understand the parts at play
2:50:51
beach
kinope: The language has no particular tools for inspecting closures, whereas there is a rich set of tools for standard objects. Dispatch is slow/sequential with closures, and you have to do it manually. with generic functions, dispatch is fast and built in. With a closure, all "method" must appear in the same source code, whereas with standard classes, they can be spread out. Generic functions have features such as auxiliary
3:19:32
kinope
beach: Thanks for that information, it's very helpful. Now I'm interested to see if the runtime overhead of my project can be reduced by making the switch.
3:26:00
kinope
I run a test that queues up 10 million messages and then dispatches them all sequentially right after usually takes between 2-2.5 minutes. I would totally switch out those components just to satisfy my curiosity. But don't worry the other features are not lost on me either.
3:30:07
kinope
beach: Although right now I am a bit partial to having the methods all heaped together visually, I can see that as the classes get bigger they will get unwieldy.
3:33:53
kinope
I have considered blowing the dust of my laptop to see it running on sbcl but right now I am constrained to use the implementation that will run inside termux on my android phone.
3:35:09
kinope
I'm not super concerned over performance right now though, it's just a toy framework at this stage.
3:45:57
kinope
I have yet to use the facilities provided by CLOS, so in the interest of growing my knowledge and also in the interest of not taking pride in being unorthodox without reason, I'm going to rewrite my closure classes as standard ones. Any performance improvements will be a bonus.