freenode/#lisp - IRC Chatlog
Search
18:28:00
charles`
it seems that basically you want all functions to be colored, and all non function symbols to be colored a different color
18:32:39
charles`
I believe that is what you are going to need. You will need regexes to identifiy all macro forms where you can define variable, let, destructuring bind, multiple value bind, loop and select variable names, then a regex to select function names, maybe also in flet and labels
18:35:04
charles`
You can use M-x regex-builder to test the regex since emacs-lisp regex is not pcre
20:33:48
xificurC
Reading the iterate docs I hit into this: "There is one crucial difference between using a the form and actually declaring the variable: explicit declarations are always placed in the generated code, but type information from a the form is not turned into an actual declaration unless you tell iterate to do so using iterate:declare-variables". What
20:43:14
Alfr_
xificurC, (iter (for (the fixnum i) :below 7)) would not expand to something declaring i to be a fixnum, whereas (iter (for (the fixnum i) :below 7) (declare (iterate:declare-variables))) would.
20:47:09
Alfr_
xificurC, but in iterate's case the iterate macro walks its body forms and in some places treats the THEs specially, mainly providing appropriate initial values instead of nil and declaring the types.
20:47:53
xificurC
Alfr_ yes I read that but didn't completely grok it. Re-reading the fourth time it seems to suggest it is merely a type-check, but if the type doesn't match the consequences are undefined
20:52:04
Alfr_
xificurC, the special operator is more like a promise to the compiler that what form returns is of that type. I don't think there's a requirement to type check. And yes, it's ub when you break your promises.
20:52:33
aeth
xificurC: afaik, in general, THE counts as a type declaration of sorts and so should behave similarly to DECLARE. It will check, ignore, or assume the type. Only the last one is problematic.
20:53:43
aeth
(I mean, it's entirely UB, but those are the only three possibilities you'll see in practice)
20:53:50
xificurC
Alfr_ OK, if it's a promise to the compiler, how is that different from a declaration? Is there a runtime difference you can tell/show me?
20:56:24
aeth
Usually, you'd use THE in place of DECLARE if you don't want to have to name it as a variable first, e.g. (the fixnum 42) but the example of the (the fixnum i) is declaring a new binding rather than using the value of i.
20:56:27
Alfr_
aeth, and specifying the initial binding for the variable to be of the appropriate type.
20:57:02
xificurC
the docs say there's a *crucial* difference, which seems to suggest I'm missing something. Also, if there isn't any difference, why does `iterate:declare-variables` exist?
20:58:35
aeth
I don't like how any advanced usage of LOOP is going to be indented poorly because it's not s-expression-based (even with the SLIME extensions... try to do a complicated nested conditional), but, wow, iterate makes mistakes that come up in #lisp all of the time
21:02:20
xificurC
also, I'm still not sure why does `iterate:declare-variables` exist if you claim there's no difference to `the` and `declare`
21:04:52
Alfr_
xificurC, shorter hand I think and the THEs only take effect if declare-variables is declared.
21:17:10
saturn2
THE only promises what the type will be at the moment a particular form is evaluated, DECLARE promises a variable will always have a particular type where the declaration is in scope
22:58:58
fiddlerwoaroof
I vaguely remember someone talking about loading every system distributed with Quicklisp into a single image as a sanity check of sorts
23:31:18
fiddlerwoaroof
Xach: makes sense, I'd be interested in a "stable" dist that only accepts pure lisp packages (no FFI) that can be loaded together
23:32:20
fiddlerwoaroof
I've occasionally tried to figure out how to host my own diet, for reasons, but never really seriously enough to have anything to show
23:33:26
Xach
fiddlerwoaroof: i had hoped that dists would be very common, with people hosting lispworks-only software, or other thematic dists, but a combination between a lack of interest and a lack of documentation and probably other factors has made it not happen yet
23:45:53
charles`
I would think if you were a company writing internal libraries you would want to host your own dist for those.
23:48:34
aeth
fiddlerwoaroof: there is a distinction... outside of systems with X Windows (where CLX exists and can use the protocol), you can't do anything graphical without some degree of FFI
23:49:01
aeth
But if someone made a graphical toolkit on top of just the OSes themselves, then it would be useful.
23:51:12
aeth
Xach: Sorry, I'm unclear, I mean zero distributed foreign dependencies. So if someone wants to just wrap the WinAPI, then that should be OK, to complement something like CLX, but OS-agnostic.
23:51:51
aeth
As opposed to something like cl-sdl2 where you have to have SDL2, a giant C dependency, at some point.
23:52:51
Xach
Oh. Well, I'm thinking of users with semi-exotic platforms, where binding to some "it's installed everywhere! (if you use linux/windows/macos)" is a failure