libera/#commonlisp - IRC Chatlog
Search
16:55:59
flip214
Is there a codewalker library that allows to wrap each value form (so in PROGN, variable bindings in LET, etc.; recursively) in some code?
16:56:26
flip214
Ie. Is there a library that I pass some form and a function and the function is called with each value form therein?
17:12:10
nij-
Will WSCL issues ever get "integrated" into dpANS3? Or it's planned to have them remain as independent patches?
18:02:06
beach
nij-: They are already integrated in (at least one version of) the document created by scymtym that is at the same "level" as the Common Lisp HyperSpec and the Nova Spec.
18:04:00
nij-
Oh! For example - https://github.com/s-expressionists/wscl/commit/04da4ec2cdcb58beab386e5d98bb3eb9b3731048#
18:05:08
beach
That's how we format the WSCL issues so that they will have the same format as the X3J13 issues, but that's not the document I was talking about.
23:42:04
yitzi
attila_lendvai: wscl is aimed at specifying the unspecified aspects of CL, not changing the behavior or adding extensions.
3:07:17
beach
Yes, and specifying mainly those things that the main Common Lisp implementations agree upon anyway.
3:10:02
aeth
I think global state would be more of the domain of ASDF or whatever the build system used is
3:10:22
nij-
beach Does WSCL try to specify all unspecified details? Or does it have a taste on which one to specify and which one not to? If it's the latter case, what's the taste?
3:12:54
beach
The main preference is for behavior that the main Common Lisp implementations agree upon.
3:14:44
beach
There could be minor disagreements, like we can propose a TYPE-ERROR to be signaled, and some implementations may currently signal a SIMPLE-ERROR.
3:43:01
jhiltu
I've tried using cl a bit but I've never really understood macros, when to use them or how to write them. Now I'm attempting to play around with cl-sdl2 a bit and I wonder if I could somehow write a macro for defining keybindings like this? https://github.com/jhiltu/cl-sdl2-test-project/blob/main/keys.lisp
3:43:24
jhiltu
this is the current main (and only) file.. it's a barebones skeleton for cl-sdl2 project https://github.com/jhiltu/cl-sdl2-test-project/blob/main/test-project.lisp
3:44:57
beach
jhiltu: Macros are used to create new syntax, not at the character level (for which there are reader macros) but at the s-expression level.
3:45:30
beach
jhiltu: Creating new syntax like that might decrease the amount of boilerplate code that would otherwise be required.
4:20:01
aeth
jhiltu: Imo... The most common, simple macros that you may want to use or define probably fit the define-foo, with-foo, or do-foo patterns. In other words, define a global with certain boilerplate removed (probably a wrapper over defclass or defun... rarely perhaps something like deftype or defparameter), or define a local (quite frequently with unwind-protect), or define a custom iteration.
4:22:10
aeth
for instance, Practical Common Lisp has a do-primes as its example. https://gigamonkeys.com/book/macros-defining-your-own