freenode/#lisp - IRC Chatlog
Search
6:26:58
beach
jackdaniel: I am not sure that the CLtL2 environment interface is the way to go now that we have CLOS.
7:13:26
beach
jackdaniel: What I am saying is that the interface described in CLtL2 is a bit twisted because it does not take advantage of generic functions. I think we can do better than that now.
8:13:31
MichaelRaskin
jackdaniel: well, here CLOS could be useful is if you guarantee some fixed type specifier to correspond to environment
10:21:55
random9899
an update for the package lift, not being able to locate it's own config http://dpaste.com/3JDZ8QD
12:00:25
beach
longshi: Usually, special variables are created using DEFVAR or DEFPARMETER, and they also proclaim the variable special.
12:02:35
phoe
this time I wanted to declare a variable special only locally, without creating a global binding
12:09:57
longshi
i'm still more used to (r6rs) scheme ways of doing things, but it's lisp after all, similar enough
12:10:37
beach
Is it just out of curiosity, or are you planning to write some code using Common Lisp?
12:14:25
longshi
beach: this wasn't to precise--yes, i think i will write code in CL once i know it well enough
12:17:59
beach
longshi: Wrong number of semicolons in comments. Parentheses by themselves on a line. Wrong indentation.
12:21:36
kenanb
longshi: if you are coming from scheme, you can probably just read some good library code along PCL to learn the language.
12:21:49
jackdaniel
random-nick: lsp was one of agreed extensions in the early CL days (think about MS-DOS for instance). now .lisp seem to have took over, but there are still codebases with .lsp
12:22:44
beach
Use of get- and set- prefixes. We have a few of those for historical reasons, but they should be avoided in new code.
12:27:13
beach
longshi: So if you want to look at the koans, you had better be careful not to pick up some of the bad habits in that code.
12:34:54
kenanb
longshi: also, maybe not many would agree with me, but I think Hyperspec is way more than a reference. It is a great resource to learn the language once you are familiar with the basics.
13:07:54
beach
In SICL, I plan to represent code in a code object, as written here: http://metamodular.com/code-object.pdf but I have some questions...
13:09:38
beach
In what situations should the NEXT debugger command go from the end of a form to the BEGINNING of the next form to be evaluated?
13:10:41
beach
I am thinking if two forms are just sequential like this: (form1 ...) (form2 ...) then from the end of (form1 ...) the NEXT command should go to the end of (form2 ...).
13:12:01
beach
But maybe if there is a big gap between the two forms, like in ((((.... (form1...)))) (form2 ...)) then perhaps go from the end of (form1 ...) to the beginning of (form2 ...).
13:12:28
phoe
beach: the three commands that I know from debuggers are STEP-INTO, STEP-OVER, STEP-OUT.
13:13:31
phoe
Every time, we're at the beginning of some form. STEP-INTO steps inside that form, STEP-OVER steps to the next form, and STEP-OUT steps out of the function we are currently in.
13:14:14
phoe
If you know where on the stack you are, you should be able to somehow infer information for STEP-OUT.
13:17:12
phoe
Hm. STEP-IN will put another function call on the stack and you can begin from there, i assume.
13:17:55
LdBeth
beach: if someone prefers directly working on code objects instead without any text format source code, there needs a way to print out these internal objects into human readable format, this is what I’m concerning
13:18:26
beach
phoe: That, and inlined stuff, like (F X). Computing F or X does not require a function call.
13:22:06
beach
LdBeth: Code objects are typically not used by the application programmer, so I don't see a use case for such a conversion. Plus, there is no good way to convert machine code to Common Lisp source code.
13:23:14
makomo
beach: i see that your document is just a small part of something much bigger. is this big document yet to be released?
13:23:43
beach
makomo: It is work in progress, namely the SICL specification. It is available in the repository.
13:27:10
beach
The document is not about the debugger, but about the support that the debugger needs from the implementation.
13:36:28
beach
phoe: Like if I have (f (g x) (h y)) and I am positioned between (g x) and (h y), I would expect STEP-OUT to stop after (f (g x) (h y))
13:39:42
MichaelRaskin
(if (complicated-condition) (complex-call-1) (complex-call-2)) — if the condition is false, and you are at the end of the of the condition evaluation, should there be a way to show next form to execute?
13:42:31
MichaelRaskin
Maybe not. Also, after being at the end of condition already, is there a command to go to the beginning of the next form?
13:43:55
beach
Yes, as I wrote in the document, I expect that if the current position is AFTER some form, then STEP-OVER should sometimes go AFTER the next form and sometimes BEFORE, and you have found a situation where it should stop BEFORE.
13:44:32
beach
But, yes, the table should contain an entry for each branch of the IF, so a single address should be sufficient.
13:45:17
kenanb
oh this is awesome, it provides great insight into details of a modern CL implementation.
13:46:23
beach
MichaelRaskin: Yeah, not obvious. But I think that, as far as the code object is concerned, I need three tables, one for STEP-IN, one for STEP-OVER and one for STEP-OUT.
13:48:30
kenanb
are the implementation decisions (close to/unfluenced by) a certain popular CL implementation?
13:48:55
beach
LdBeth: Yes, stepping is by forms. No, all the functions in a file share the same code object.
13:50:54
beach
kenanb: Right. Existing implementations date from several decades ago. We have better programming techniques nowadays.
13:52:12
kenanb
yeah, I was just wondering what kind of performance characteristics should etc. I should expect from SICL, I figured the answer is easy if there is a heavy influence. I don't mind ideas being new or old as long as they are good :)
13:52:17
Bike
also, i know you're asking about debugging, beach, but maybe the code object should have the load time values as well? if only for the gc.
13:52:46
Bike
though i guess if all the functions in a file have the same code object it can't be garbage collected very finely
13:54:01
beach
kenanb: In the Cleavir compiler framework, we hope to implement most of the good existing compiler optimizations from the literature, and a few of our own.
13:55:05
beach
Bike: Well, the LOAD-TIME-VALUEs are computed at, er, load-time and then they become part of the environment. That way, if they are dead, they will be garbage collected automatically.