freenode/#lisp - IRC Chatlog
Search
17:39:44
random9899
The whole language always available. There is no real distinction between read-time, compile-time, and runtime. You can compile or run code while reading, read or run code while compiling, and read or compile code at runtime.
17:39:44
random9899
Running code at read-time lets users reprogram Lisp's syntax; running code at compile-time is the basis of macros; compiling at runtime is the basis of Lisp's use as an extension language in programs like Emacs; and reading at runtime enables programs to communicate using s-expressions, an idea recently reinvented as XML.
17:40:47
Bike
if you have a question you want answered or topic you would like to discuss, please use your own words
18:01:16
phoe
random9899: Graham has quite a lot of essays, they're a rather good reading as long as you take him with a pinch of salt
18:03:15
random9899
i put the quotes, well wrt to the confusion arising in people when talking about read-time, run-time and compile-time....like with schweers about his question about what a #.(declaim...) is different from a normal (declaim ..) etc....
18:06:14
jackdaniel
question: given cltl2 interface is implemented, how am I supposed that variable is unknown for my own declarations? example: (let ((x 3)) (declare (ignore y)) …) will issue a simple-warning
18:06:36
jackdaniel
I want to do the same in a function in cltl2:define-declaration, the thing is that lexical variables are note yet in the environment
18:07:23
jackdaniel
so variable-information will fail to find y even if it is there (let ((y bam)) (declare (phoe y)) …)
18:07:45
jackdaniel
phoe: lexical variables are not in the environment yet at the time of invoking declaration lambda function
18:08:50
phoe
like, hm - the list of new bindings from LET needs to be passed to the declaration function
18:08:52
jackdaniel
I know how to do it *using* compiler internals, because I'm already doing that, but not sure how to achive it simply using cltl2
18:13:22
phoe
This seems to be rather silly. Inside (let ((x 3)) ...), I would expect X to be lexically bound. Even inside a (declare ...) that might happen in there.
18:14:02
jackdaniel
declarations are processed at compilation time, there is nothing to be bound yet. only some information in lexenv may be present
18:15:24
jackdaniel
when you have flet, first you process definitions *then* you extend the environment
18:15:40
jackdaniel
when you have lable,s first you extend the environment and then you process definitions
18:16:43
Bike
declare isn't like a separate form or anything. it makes sense to think of (let ((y bam)) (declare (phoe y)) ...) as being like (let+ ((y bam phoe)) ...). there is probably no time at which the variable is bound but not typed as far as the environment is concerned.
18:17:11
Bike
in other words i don't understand what either of you are talking about. "declaration lambda function"?
18:19:12
Bike
cltl2 doesn't seem to specify what the environment is for or when the function is called.
18:20:30
Bike
I suppose you could say that the environment is first augmented with a lexical y, then that's passed to the define-declaration function, and then that's used to produce the actual environment used for processing the body.
18:21:04
Bike
in the case of (phoe y) as a free declaration, the environment passed to the declaration function would have y unbound, i.e. variable-information returns NIL.
18:21:19
jackdaniel
I'm asking, because I'm trying to figure what's the right thing to do (implementing cltl2 for ECL – first writing a test suite)
18:22:24
Bike
it's not so much a lack of implementation as it is bugginess. they're probably still in the tracker
18:22:47
Bike
https://bugs.launchpad.net/sbcl?field.searchtext=cltl2&search=Search&field.status%3Alist=NEW&field.status%3Alist=INCOMPLETE_WITH_RESPONSE&field.status%3Alist=INCOMPLETE_WITHOUT_RESPONSE&field.status%3Alist=CONFIRMED&field.status%3Alist=TRIAGED&field.status%3Alist=INPROGRESS&field.status%3Alist=FIXCOMMITTED&field.assignee=&field.bug_reporter=&field.omit_dupes=on&field.has_patch=&field.has_no_package=
18:24:10
Bike
the one i hit was 769592, which is that augment-environment signals stupid errors sometimes because it goes through internal compiler machinery that immediately signals when it hits inconsistencies, because they matter for compilation but not cltl2
18:24:53
Bike
i wrote a cltl2 wrapper library but didn't bother with it. and it has so many users! at least zero
18:25:15
Bike
if you do want to worry about it, i think what i described would be a reasonable way to do it
18:25:37
phoe
Bike: I would be worried if it had negative user count; knowing how much you deal with C++ it would likely mean an integer overflow
19:16:44
fiddlerwoaroof
But, I appreciate what it does, I've always been slightly annoyed about the duplication between the ASDF system's dependency lists and the defpackage forms
21:11:26
aeth
fiddlerwoaroof: It simplifies your definitions of external dependencies, but it doesn't simplify your definitions of internal dependencies that much because unless your project is flat, you are going to have to create a /foo.lisp for every /foo/ so you can just import my-project/foo instead of my-project/foo/bar