jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language<http://cliki.net/> logs:<https://irclog.whitequark.org/lisp,http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.5, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
MasouDa has quit [Ping timeout: 264 seconds]
warweasle has quit [Quit: Leaving]
Cymew has joined #lisp
pierpal has quit [Ping timeout: 260 seconds]
Cymew has quit [Ping timeout: 265 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
red-dot has joined #lisp
lumm has quit [Quit: lumm]
rumbler31 has joined #lisp
milanj has quit [Read error: Connection reset by peer]
milanj has joined #lisp
cgay has quit [Ping timeout: 264 seconds]
rumbler31 has quit [Ping timeout: 256 seconds]
MasouDa has joined #lisp
Kevslinger has quit [Quit: Connection closed for inactivity]
megalography has quit [Ping timeout: 268 seconds]
MasouDa_ has quit [Ping timeout: 260 seconds]
herr_jth has quit [Ping timeout: 240 seconds]
MasouDa has quit [Ping timeout: 264 seconds]
MasouDa has joined #lisp
_whitelogger has joined #lisp
eli_oat has joined #lisp
cgay has joined #lisp
markoong has quit [Ping timeout: 260 seconds]
EvW1 has quit [Ping timeout: 245 seconds]
Oladon has quit [Quit: Leaving.]
fisxoj has joined #lisp
dmiles has quit [Ping timeout: 256 seconds]
hjek has left #lisp [#lisp]
eli_oat has quit [Quit: Leaving.]
fyodost has quit [Quit: Leaving]
slyrus1 has quit [Quit: slyrus1]
fisxoj has quit [Quit: fisxoj]
rumbler31 has joined #lisp
wxie has joined #lisp
milanj has quit [Read error: Connection reset by peer]
milanj has joined #lisp
igemnace has joined #lisp
Oladon has joined #lisp
rumbler31 has quit [Ping timeout: 248 seconds]
adlai has quit [Read error: Connection reset by peer]
liead has joined #lisp
wxie has quit [Ping timeout: 240 seconds]
wxie has joined #lisp
smurfrobot has joined #lisp
liead has quit [Read error: Connection reset by peer]
liead has joined #lisp
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 245 seconds]
mikecheck has quit [Remote host closed the connection]
Kevslinger has joined #lisp
karswell has joined #lisp
karlosz has quit [Remote host closed the connection]
karlosz has joined #lisp
karswell has quit [Remote host closed the connection]
karswell has joined #lisp
milanj has quit [Read error: Connection reset by peer]
karswell has quit [Remote host closed the connection]
milanj has joined #lisp
greaser|q has quit [Remote host closed the connection]
dmiles has joined #lisp
nickenchuggets has quit [Read error: Connection reset by peer]
karswell has joined #lisp
nickenchuggets has joined #lisp
nickenchuggets has joined #lisp
nickenchuggets has quit [Changing host]
snits has quit [Remote host closed the connection]
vitali has joined #lisp
sjl has joined #lisp
greaser|q has joined #lisp
karswell_ has joined #lisp
karswell has quit [Ping timeout: 265 seconds]
comborico1611 has quit [Quit: Konversation terminated!]
smurfrobot has quit [Remote host closed the connection]
pierpal has joined #lisp
megalography has joined #lisp
robotoad has quit [Quit: robotoad]
karswell_ is now known as karswell
pierpal has quit [Ping timeout: 256 seconds]
asarch has joined #lisp
milanj has quit [Read error: Connection reset by peer]
robotoad has joined #lisp
milanj has joined #lisp
karswell has quit [Remote host closed the connection]
vitali has quit [Ping timeout: 240 seconds]
karswell has joined #lisp
wxie has quit [Quit: Bye.]
smurfrobot has joined #lisp
skapata has quit [Remote host closed the connection]
smurfrobot has quit [Ping timeout: 256 seconds]
pierpa has quit [Quit: Page closed]
smurfrobot has joined #lisp
karlosz has quit [Ping timeout: 256 seconds]
asarch_ has joined #lisp
karlosz has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
asarch has quit [Ping timeout: 245 seconds]
Mutex7 has quit [Quit: Leaving]
smurfrobot has quit [Ping timeout: 265 seconds]
nickenchuggets has quit [Read error: Connection reset by peer]
nickenchuggets has joined #lisp
<asarch_> One stupid question: what is the name of the exceptions in Lisp?
<Bike> conditions
<asarch_> Thank you!
<asarch_> Thank you very much Bike :-)
asarch_ is now known as asarch
pierpal has joined #lisp
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
sjl has quit [Ping timeout: 240 seconds]
smurfrobot has joined #lisp
daniel-s has quit [Ping timeout: 260 seconds]
daniel-s has joined #lisp
smurfrobot has quit [Ping timeout: 256 seconds]
schoppenhauer has quit [Ping timeout: 248 seconds]
schoppenhauer has joined #lisp
MasouDa_ has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
Oladon has quit [Quit: Leaving.]
MasouDa has quit [Ping timeout: 260 seconds]
megalography has quit [Ping timeout: 256 seconds]
jkordani has quit [Read error: Connection reset by peer]
karlosz has quit [Quit: karlosz]
megalography has joined #lisp
smurfrobot has joined #lisp
smurfrobot has quit [Ping timeout: 260 seconds]
daniel-s has quit [Quit: Konversation terminated!]
smurfrobot has joined #lisp
karlosz has joined #lisp
smurfrob_ has joined #lisp
smurfrobot has quit [Ping timeout: 264 seconds]
smurfrob_ has quit [Ping timeout: 260 seconds]
fisxoj has joined #lisp
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
rumbler31 has joined #lisp
pierpal has joined #lisp
rumbler31 has quit [Ping timeout: 265 seconds]
vitali has joined #lisp
karlosz has quit [Quit: karlosz]
_whitelogger has joined #lisp
quazimodo has joined #lisp
vitali has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
wigust has joined #lisp
asarch has quit [Quit: Leaving]
sauvin has joined #lisp
fisxoj has quit [Quit: fisxoj]
Pixel_Outlaw has quit [Remote host closed the connection]
<fiddlerwoaroof> I wish ASDF didn't insist on /s for separating system name components
<fiddlerwoaroof> like my-system/subsystem, etc...
Kevslinger has quit [Quit: Connection closed for inactivity]
pseud has joined #lisp
quazimodo has quit [Ping timeout: 264 seconds]
pseudonymous_ has quit [Ping timeout: 264 seconds]
quazimodo has joined #lisp
pseudonymous has joined #lisp
pseud has quit [Ping timeout: 264 seconds]
mflem has quit [Read error: Connection reset by peer]
FreeBirdLjj has quit [Remote host closed the connection]
snits has joined #lisp
Bike has quit [Quit: Lost terminal]
brendyn has quit [Read error: No route to host]
smurfrobot has joined #lisp
FreeBirdLjj has joined #lisp
shka_ has joined #lisp
smurfrobot has quit [Ping timeout: 248 seconds]
vlatkoB has joined #lisp
smurfrobot has joined #lisp
smurfrobot has quit [Ping timeout: 264 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
tmf has joined #lisp
smurfrobot has joined #lisp
brendyn has joined #lisp
smurfrobot has quit [Ping timeout: 240 seconds]
nickenchuggets has quit [Read error: Connection reset by peer]
<beach> Good morning everyone!
<beach> jackdaniel: I am not sure that the CLtL2 environment interface is the way to go now that we have CLOS.
leo_song has quit [Quit: ZNC 1.6.5+deb1 - http://znc.in]
<beach> jackdaniel: I am also not sure what the right protocol would be.
dented42 has joined #lisp
milanj has joined #lisp
megalography has quit [Ping timeout: 260 seconds]
phenoble has joined #lisp
slyrus2 has joined #lisp
<makomo> morning!
red-dot has joined #lisp
quazimodo has quit [Ping timeout: 256 seconds]
dtornabene has joined #lisp
<jackdaniel> beach: how CLOS makes it less useful?
FreeBirdLjj has quit [Remote host closed the connection]
smurfrobot has joined #lisp
smurfrobot has quit [Remote host closed the connection]
vap1 has quit [Remote host closed the connection]
<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.
<jackdaniel> ah. well, I find it pretty clear as an interface and don't see any need for CLOS
<beach> OK. That's fine then.
sz0 has joined #lisp
quazimodo has joined #lisp
tmf has quit [Ping timeout: 245 seconds]
MasouDa_ has quit [Quit: No Ping reply in 180 seconds.]
random-nick has joined #lisp
MasouDa has joined #lisp
smurfrobot has joined #lisp
MasouDa_ has joined #lisp
MasouDa has quit [Ping timeout: 268 seconds]
quazimodo has quit [Ping timeout: 260 seconds]
quazimodo has joined #lisp
MasouDa_ has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #lisp
makomo has quit [Ping timeout: 240 seconds]
puchacz has joined #lisp
puchacz has quit [Client Quit]
python476 has joined #lisp
<MichaelRaskin> jackdaniel: well, here CLOS could be useful is if you guarantee some fixed type specifier to correspond to environment
karswell has quit [Read error: Connection reset by peer]
karswell has joined #lisp
lumm has joined #lisp
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
smurfrobot has quit [Remote host closed the connection]
smurfrobot has joined #lisp
vaporatorius has joined #lisp
vap1 has joined #lisp
vap1 has quit [Client Quit]
lumm_ has joined #lisp
kenanb has joined #lisp
lumm has quit [Ping timeout: 256 seconds]
lumm_ is now known as lumm
varjag has joined #lisp
vaporatorius has quit [Quit: Leaving]
makomo has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
energizer is now known as energizer_
energizer_ is now known as energizer
trigen has quit [Remote host closed the connection]
shangul has joined #lisp
lumm has quit [Read error: Connection reset by peer]
Bronsa has joined #lisp
lumm has joined #lisp
SenasOzys has quit [Ping timeout: 248 seconds]
lumm has quit [Read error: Connection reset by peer]
lumm has joined #lisp
megalography has joined #lisp
thodg has joined #lisp
dtornabene has quit [Ping timeout: 264 seconds]
orivej has quit [Ping timeout: 245 seconds]
SenasOzys has joined #lisp
Fare has quit [Quit: Leaving]
kozy has joined #lisp
rumbler31 has joined #lisp
python476 has quit [Read error: Connection reset by peer]
<random9899> an update for the package lift, not being able to locate it's own config http://dpaste.com/3JDZ8QD
kozy has quit [Remote host closed the connection]
<random9899> rosetta-test fails because of it for example....
rumbler31 has quit [Ping timeout: 245 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
attila_lendvai has joined #lisp
python476 has joined #lisp
longshi has joined #lisp
makomo has quit [Quit: WeeChat 2.0.1]
markoong has joined #lisp
Kevslinger has joined #lisp
vaporatorius has joined #lisp
vaporatorius has quit [Client Quit]
vaporatorius has joined #lisp
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
<phoe> today is the first day when I used (declare (special *variable*))
<beach> Congratulations!
<phoe> Like, inside a LET
FreeBirdLjj has quit [Remote host closed the connection]
kozy has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
attila_lendvai has joined #lisp
<pierpal> wow
frgo has joined #lisp
orivej has joined #lisp
Bronsa has quit [Remote host closed the connection]
frgo has quit [Client Quit]
kozy has quit [Remote host closed the connection]
kozy has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
SenasOzys has quit [Remote host closed the connection]
tmf has joined #lisp
SenasOzys has joined #lisp
dddddd has joined #lisp
kozy has quit [Remote host closed the connection]
<longshi> why is that a special day? (i'm more of a scheme guy)
<beach> longshi: Usually, special variables are created using DEFVAR or DEFPARMETER, and they also proclaim the variable special.
<beach> longshi: So there is usually no reason for such a declaration.
<random9899> finally git cloned informatimago too
red-dot has joined #lisp
<phoe> this time I wanted to declare a variable special only locally, without creating a global binding
<longshi> beach: thx!
<beach> Anytime.
kozy has joined #lisp
<beach> longshi: So what brings you to #lisp?
<longshi> I started reading Practical Common Lisp, installed sbcl
<longshi> and slime is so neat
<beach> Great!
orivej has quit [Ping timeout: 260 seconds]
<longshi> i'm still more used to (r6rs) scheme ways of doing things, but it's lisp after all, similar enough
<beach> Is it just out of curiosity, or are you planning to write some code using Common Lisp?
<longshi> I believe so, yeah--i'm still an amateur though, i'll start BA in CS this October
ym has quit [Remote host closed the connection]
<longshi> btw, now that we're talking, a question:
<random9899> ya and this way i get the reports http://dpaste.com/3B1MR1F
<longshi> so i went through cl-koans by google
<longshi> would you recommend it as an intro to a language or is there something better?
<longshi> (i like them koans, i learn faster when it's interactive)
lemoinem is now known as Guest76975
Guest76975 has quit [Killed (tolkien.freenode.net (Nickname regained by services))]
lemoinem has joined #lisp
<longshi> beach: this wasn't to precise--yes, i think i will write code in CL once i know it well enough
<beach> I haven't looked at the koans. Do you have a link?
<longshi> Especially comparing library situation of CL and various schemes
<beach> Thanks.
<beach> longshi: Let me have a look...
<longshi> :)
<beach> longshi: Oh, lots of unconventional code in there.
<beach> longshi: I am looking at dice-project.lsp (the first one I clicked on)...
<beach> longshi: Wrong number of semicolons in comments. Parentheses by themselves on a line. Wrong indentation.
<beach> Looking at control-statements.lsp...
<beach> For one thing, Common Lisp "statements" are called "forms" in most situations.
FreeBirdLjj has joined #lisp
<beach> (+ 1 x) should be (1+ x)
<random-nick> also, why .lsp instead od .lisp?
<beach> That too.
<beach> There should not be a newline after (and
<beach> Nor after (or
rumbler31 has joined #lisp
<beach> Looking at clos.lsp...
<beach> Wrong indentation, wrong number of semicolons.
<kenanb> longshi: if you are coming from scheme, you can probably just read some good library code along PCL to learn the language.
<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
<kenanb> longshi: I remember cl-ppcre being a frequently suggested code reading exercise
<beach> Use of get- and set- prefixes. We have a few of those for historical reasons, but they should be avoided in new code.
<longshi> hmm
<longshi> yeah, i use (1+ x) in scheme too
<beach> longshi: I am sorry to say that there are many problem in that code.
<longshi> kenanb: any pointers?
<longshi> kenanb: thanks!
<longshi> i didn't properly read it all before responding
<beach> Looking at lists.lsp...
<beach> Initialization of lexical variable in LET that is then immediately assigned to.
rumbler31 has quit [Ping timeout: 276 seconds]
<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.
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
orivej has joined #lisp
<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.
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
makomo has joined #lisp
<longshi> Hyperspec?
<phoe> the CLHS
<phoe> clhs car
<beach> clhs cons
<longshi> ah, nice!
<jackdaniel> longshi: if you need to look something up I recommend using l1sp.org
xantoz has quit [Read error: Connection reset by peer]
<longshi> didn't know that existed
<jackdaniel> it has lookup into clhs, pcl and some other resources
xantoz has joined #lisp
<beach> longshi: It's basically a HTML-ized version of the standard.
tmf has quit [Ping timeout: 245 seconds]
EvW has joined #lisp
mrblack has quit [Read error: Connection reset by peer]
pok has quit [Read error: Connection reset by peer]
<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...
<beach> What kind of information should the liveness include?
Bike has joined #lisp
<beach> Is there any information missing that I should add?
<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?
<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 ...).
<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 ...).
<beach> Just thinking out loud here.
<phoe> beach: the three commands that I know from debuggers are STEP-INTO, STEP-OVER, STEP-OUT.
<beach> GDB has STEP and NEXT, as I recall.
<beach> But STEP-OVER is fine.
<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.
<LdBeth> beach (IRC): it would be nice if code objects can be converted back into S exps
<beach> I guess I need a table for STEP-OUT.
<beach> phoe: Oh, OK.
<phoe> beach: either a table or some kind of stack information.
<beach> LdBeth: Why is that? I have the complete source code in it.
<phoe> If you know where on the stack you are, you should be able to somehow infer information for STEP-OUT.
<beach> Right, I don't think I need anything particular for STEP-OUT.
<beach> I guess I might need a table for STEP-IN.
<phoe> beach: what kind of table?
<beach> Given a PC value, where is the next PC value to stop at.
<phoe> Hm. STEP-IN will put another function call on the stack and you can begin from there, i assume.
<phoe> The next step value should be somewhere inside the new function.
<beach> Not necessarily.
<phoe> In what cases won't it be? Special operators?
<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
<beach> phoe: That, and inlined stuff, like (F X). Computing F or X does not require a function call.
BitPuffin has joined #lisp
<phoe> beach: I see, yes.
<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.
<makomo> beach: i see that your document is just a small part of something much bigger. is this big document yet to be released?
<beach> makomo: It is work in progress, namely the SICL specification. It is available in the repository.
<makomo> ah, ok
<kenanb> beach: isn't that exactly the description of next (step-over) ?
quazimodo has quit [Ping timeout: 240 seconds]
<beach> kenanb: Yes, what I wrote as NEXT is apparently more often referred to as STEP-OVER.
<kenanb> AFAIK in GDB terms step-into is step, step-over is next, step-out is finish
<beach> Correct.
<kenanb> there are also instruction granularity variants for next and step
<beach> That's true too.
<kenanb> but I don't know if they apply to your implementation
<beach> The document is not about the debugger, but about the support that the debugger needs from the implementation.
<beach> Stepping by instruction needs no support in the code object.
<kenanb> yeah, I guess so. I am slightly alien to SICL
<beach> That's understandable.
<beach> phoe: Wait! I would expect STEP-OUT to stop after the current surrounding form. No?
<kenanb> yes
<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))
<phoe> Hm.
<phoe> Yes.
<beach> kenanb: Whew! Thanks.
<beach> OK, so I need three tables. One for each debugger command.
<MichaelRaskin> Is this enough for stepping in if?
<beach> I don't know. What are you thinking of?
kozy has quit [Remote host closed the connection]
<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?
thodg has quit [Ping timeout: 245 seconds]
igemnace has quit [Ping timeout: 264 seconds]
<beach> Yes, I think so. Some command needs to go to the beginning of (complex-call-2).
<beach> I would expect STEP-OVER to do that.
<beach> Oh, but I see what you are saying...
igemnace has joined #lisp
<beach> A single address in the table would not be enough would it?
<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?
<beach> Actually, it might be.
kozy has joined #lisp
<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.
<beach> But, yes, the table should contain an entry for each branch of the IF, so a single address should be sufficient.
<MichaelRaskin> Not sure what is the proper thing to do with case.
<kenanb> oh this is awesome, it provides great insight into details of a modern CL implementation.
<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.
<beach> kenanb: The SICL specification?
<kenanb> beach: yep! I am already liking it.
<beach> kenanb: Oh, good!
<LdBeth> So the STEPPING is S exp based and each S exp has its corresponding code object?
<kenanb> are the implementation decisions (close to/unfluenced by) a certain popular CL implementation?
<beach> LdBeth: Yes, stepping is by forms. No, all the functions in a file share the same code object.
<beach> kenanb: I hope not! :)
<kenanb> haha, no love for existing implementations? :)
<Bike> they tend not to document this stuff.
<LdBeth> Yeah, seem many ideas comes up from scratch
<beach> kenanb: Right. Existing implementations date from several decades ago. We have better programming techniques nowadays.
<Bike> or they just don't have steppers.
<Bike> i don't think sbcl's is working? i haven't tried it in a while
oldtopman has quit [Ping timeout: 256 seconds]
<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 :)
<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.
<Bike> though i guess if all the functions in a file have the same code object it can't be garbage collected very finely
<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.
<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.
<LdBeth> Emm, there’s no pseudo instruction set?
<Bike> of the... oh right, it makes everything closures
<beach> Bike: Right.
<beach> LdBeth: There is intermediate code if that is what you mean. But no byte codes at run time.
<beach> kenanb: There are a few decisions that may be hard to optimize away, like the mandatory header indirection for all heap-allocated object (except CONS cells). But there are so many advantages to that representation that I am not willing to change that decision.
<LdBeth> beach: Is the intermediate code arch dependent?
skapata has joined #lisp
<beach> LdBeth: AST and HIR are architecture independent, but MIR might have specific instructions in it.
<beach> H = High-level M = Medium-level
<LdBeth> Which one is the DISSEMBLE supposed to produce?
<beach> DISASSEMBLE produces native instructions in assembly format.
<drmeister> beach: When you say mandatory header indirection of all heap-allocated objects - you mean the pointer to the rack?
<Bike> the IR are just used by the compiler. they're not executable.
<drmeister> Hello everyone
<beach> Hello drmeister.
<makomo> hello :-)
milanj has quit [Quit: This computer has gone to sleep]
<beach> drmeister: Yes, I mean that some implementations may represent things like symbols and simple arrays without a header object.
<makomo> beach: i think there's a typo in "determine which registers contain Common Lisp objects* that should be traced"?
<beach> drmeister: The header object in SICL is therefore an indirection that some implementations may not always have.
<beach> makomo: Thanks. Fixing...
EvW has quit [Ping timeout: 260 seconds]
<drmeister> Right - then Clasp does represent things like symbols and simple arrays without a header object. Got it.
attila_lendvai has quit [Quit: Leaving.]
<makomo> beach: another observation that's interesting to me. i don't know whether it's valid, but bear with me while i try to formulate what i mean.
<makomo> beach: so the code objects expose a certain interface for the debugger. in this approach, the code objects "know about the debugger" in a certain way, i.e. the only reason that interface exists in the first place is because of the debugger
<makomo> does this in a certain sense "break the abstraction" or is this intentional? i.e. the code objects are just part of the whole compiler framework and it was expected all along for the debugger to exist in this context as well
EvW1 has joined #lisp
<beach> makomo: It is definitely intentional. I have already written a specification for a debugger that will use this information.
<beach> makomo: The code object also contains information for the garbage collector, like the register map.
<makomo> ah i see
<makomo> beach: btw, that document isn't searchable for me. i've tried both with Firefox and Okular.
<makomo> i can select the text just fine, but for some reason ctrl+f doesn't work
<beach> I don't know why, and I don't know how to fix it. Sorry!
<makomo> oh hmm, trying to copy/paste it yields just a bunch of "diamond box with a question mark" signs
<beach> Maybe because I produced it using the PRINT command of evince.
<makomo> beach: very interesting, thanks!
<makomo> beach: clordane.pdf is searchable btw
<beach> So, it must be the PRINT command.
<beach> Because I am using the exact same method to produce all my documents.
<makomo> :-)
<beach> Oh, I guess there could be some LaTeX document class missing on some documents.
pok has joined #lisp
<beach> makomo: The main thing with Clordane is that one thread is used to debug another thread, and the debugged thread can be the debugger.
nika has joined #lisp
<beach> I think most existing implementations don't have support for that kind of debugging.
<makomo> in the sense that you can nest debuggers or that you can debug yourself?
<beach> The latter.
<makomo> huh interesting
<beach> So breakpoints are thread-specific.
<beach> That makes it possible to set breakpoints in some standard Common Lisp functions as well, without causing the entire system to grind to a halt.
rumbler31 has joined #lisp
rumbler31 has quit [Remote host closed the connection]
<makomo> i see
<makomo> beach: typo in clordane.pdf "a volatile break point is also destroyed when the program control reaches is*"
<beach> Thanks.
<beach> Fixing...
<makomo> hm, 1.2.2 says "the debugger thread can not debug itself", so i think i misunderstood what you said
<makomo> "but is can debug the same code running in a different thread"
<makomo> it*
nika has quit [Read error: Connection reset by peer]
nika_ has joined #lisp
<beach> Yes, it's the same code, but running in two different threads.
<makomo> right, i was thinking of literally debugging yourself, within the same thread
<beach> No, that would not work.
<beach> So if I am debugging some application, I can set a breakpoint in (say) FIND without affecting the compiler or any other system that might call FIND.
<makomo> mhm, that sounds pretty cool
<beach> Thanks!
oldtopman has joined #lisp
<MichaelRaskin> makomo: and you need a new implementation even for a much weaker thing, like guarantees that (let ((x (+ 2 3))) (break) x) doesn't optimise x away
<makomo> MichaelRaskin: what do you mean by "new implementation" here?
<MichaelRaskin> Judging from the implementers' surprise when they learned that their implementation also optimises this away, yes debug 3 safety 3 speed 0, unless you plan the debugger beforehand, it is hard to make sure optimiser makes sucj decisions in a fully controllable way
<MichaelRaskin> And yes, you can work around this by macros, but there is a slowdown, of course
<LdBeth> MichaelRaskin: CCL doesn’t optimize overhead
<LdBeth> at all
<MichaelRaskin> You want to say that it will never optimise this single-use variable away and never did?
<MichaelRaskin> There was a version that did optimise it away
xantoz has quit [Ping timeout: 256 seconds]
<MichaelRaskin> Maybe even the current one still does
<kenanb> beach: oh I just read the relevant section. I can see the benefits (actually, I can read them) but it feels like that indirection makes certain optimizations rather impossible. Am I correct? Things like compile time method dispatch when type is known in advance ( I don't even know if that is possible with existing implementations either )
<kenanb> beach: of course, I am not saying it is a bad idea, I am just trying to understand the implications of the decision.
<beach> Sure.
<beach> kenanb: You mean doing the optimization at the call site? That's tricky stuff anyway.
<beach> I mean doing the "dispatch" at the call site.
nika_ has quit [Quit: Leaving...]
nika has joined #lisp
<beach> It is tricky because methods can be added and removed after the caller has been compiled.
<beach> That goes for existing implementations too.
<kenanb> hmm, you are correct, the method to dispatch over will indeed change as new methods are added to the generic function
<kenanb> so maybe it is inherently impossible with CLOS
<phoe> kenanb: not really "inherently impossible"
<beach> Well, you would have to recompile the call site when the generic function changes.
<phoe> just tricky
<beach> It can be done, but I don't intend to do it, at least not initially.
<phoe> you need to recompile a lot of code on each GF redefinition, and I don't know any implementations that do this
Negdayen has quit [Remote host closed the connection]
<Bike> sbcl does it for make-instance. other than that i don't know.
<kenanb> s/impossible/impractical
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<Bike> it's not really impractical either. i mean, it depends on the use case.
<drmeister> Bike: We can render and view dot graphs in jupyterlab
<Bike> neato.
pjb has quit [Quit: ERC (IRC client for Emacs 25.1.1)]
<Bike> but beach's gf dispatch technique basically makes generic functions a JIT mechanism where dispatch is very fast, and doesn't involve putting methods together or anything. since the problem of method combination is made mostly static all a call cache gets you is a slightly shorter dispatch, which is probably not a huge win
<makomo> Bike: is that a graphviz pun :-D
<Bike> i realized it was about a second after saying it
<makomo> hahaha
ym has joined #lisp
<phoe> I didn't get the pun
<makomo> phoe: neato is one of the graphviz programs/layout algorithms
<drmeister> You can scroll around and zoom but not search (sigh). Maybe there is a better chrome PDF viewer.
<Bike> i think one thing that would be interesting to do would be compiling accessors within method bodies as not having caches at all- since the dispatch caching could be extended to recompile things when necessary
<Bike> not right now though
<phoe> beach: makomo: .........I never realized that
<makomo> phoe: now you know :-D
<phoe> This is a terrible pun and I enjoy it
<makomo> it's a graphviz in-joke of sorts
<makomo> beach: where should i look for this gf dispatch method that you described? i'm interested
<kenanb> Bike: yeah, I don't know, it would probably only be significant in tight loops. It would probably be cool to be able to claim something like "inside this function, foo-method calls will always dispatch over the exact same function and I promise I will not redefine it before the end of the loop"
attila_lendvai has joined #lisp
<kenanb> letting compiler temporarily treat a certain method as a regular function via a claim, so it can grab a raw pointer to the function and work with it during the loop
<kenanb> Bike: my reply was a reply to your earlier statement, I think the last one also makes sense tho
<Bike> i got that, yes
<kenanb> of course, that optimization can usually be achieved by programmers being more specific about their intent, like refactoring that particular method body into a regular function and calling it directly when necessary, so its not a huge problem.
mangul has joined #lisp
shangul has quit [Ping timeout: 265 seconds]
electric has joined #lisp
karlosz has joined #lisp
karlosz has quit [Remote host closed the connection]
karlosz has joined #lisp
electric has quit [Client Quit]
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 256 seconds]
rippa has joined #lisp
<Bike> yeah i mean if the programmer is guaranteeing the method won't be redefined etc they're basically not using anything about clos
MasouDa has joined #lisp
<kenanb> well, they might still be dynamically dispatching over a gf, the claim was the dispatch is the same for calls in all iteration of that particular loop
EvW1 has quit [Ping timeout: 265 seconds]
mangul is now known as shangul
<kenanb> every time you hit that loop the dispatch would be done only once, but the arrays you are iterating over would hold different objects
megalography has quit [Ping timeout: 264 seconds]
serviteur has joined #lisp
serviteur has quit [Remote host closed the connection]
SenasOzys has quit [Ping timeout: 245 seconds]
serviteur has joined #lisp
<Bike> mm, i see how that could be interesting.
<Bike> it would be pretty easy for me to hook something up that fetched the effective method function for a given list of specializers. then you'd just call it. the rest is syntactic sugar
<Bike> and/or declaring dispatch loop invariant and yada yada yada
Pixel_Outlaw has joined #lisp
<kenanb> cool!
megalography has joined #lisp
fisxoj has joined #lisp
SenasOzys has joined #lisp
igemnace has quit [Quit: WeeChat 2.1]
smurfrobot has quit [Remote host closed the connection]
<Bike> you could have like (with-fixed-gf (foo integer string (eql 'fazbar)) ...) expand into (let ((#:foo (effective-method-function #'foo (list (find-class 'integer) (find-class 'string) (intern-eql-specializer 'fazbar))))) (flet ((foo (&rest args) (apply #:foo args))) ...)) for a start
fisxoj has quit [Read error: Connection reset by peer]
fisxoj_ has joined #lisp
thodg has joined #lisp
<phoe> this sounds like something that could be achievable using compiler macros
megalography has quit [Ping timeout: 260 seconds]
<phoe> if you'd like to skip the WITH-FIXED-GF part
<Bike> well it would be like a local compiler macro.
<makomo> beach: thanks!
<beach> Pleasure!
<phoe> Bike: compiler-macrolet?
red-dot has joined #lisp
<phoe> clhs 3.2.2.1.2
<phoe> Compiler macro definitions are strictly global. There is no provision for defining local compiler macros in the way that macrolet defines local macros.
<phoe> boo
<MichaelRaskin> Just codewalk
<makomo> how do you guys pronounce "macrolet"? ever since i read that about it in cltl2, i can't stop pronouncing it in a way that rhymes with chevrolet :-)
<makomo> s/that//
<phoe> makomo: I pronounce chevrolet like I pronounce car
<makomo> how do you do that?
megalography has joined #lisp
pfdietz has joined #lisp
megalography has quit [Ping timeout: 265 seconds]
<kenanb> Bike: yeah, that looks like a pretty elegant way to express such a thing. btw your ELS talk is very interesting.
<Bike> last year?
<kenanb> yeah
<Bike> it's been hard sailing, unfortunately
<alandipert> anyone have suggestions about how i could speed this up? it's currently about 2x slower than c. thanks in advance! https://github.com/alandipert/puzzles/blob/master/blackjack/sbcl/outcomes_optimized.lisp
mflem has joined #lisp
<Bike> does sbcl give you any notes?
<alandipert> Bike no
<alandipert> my guess is function call overhead (of PARTITIONS) is maybe the next slowest thing? but i don't know how to measure that. and i can't easily inline partitions because it's recursive
<alandipert> so i was thinking maybe a next step would be a tail recursive version of partitions
smurfrobot has joined #lisp
smurfrobot has quit [Ping timeout: 276 seconds]
<phoe> alandipert: declare inline?
<phoe> as in, (declaim (inline partition)) in line 4?
<phoe> oh wait, it's recursive
BitPuffin has quit [Ping timeout: 264 seconds]
nika has quit [Quit: Leaving...]
pierpal has quit [Read error: Connection reset by peer]
Domaldel_2 has joined #lisp
Domaldel has quit [Ping timeout: 256 seconds]
megalography has joined #lisp
Khisanth has quit [Ping timeout: 260 seconds]
alter-schjetne has quit [Read error: Connection reset by peer]
schjetne has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<kenanb> if you are really worried about performance, maybe you should stick to loops. making it tail-recursive will make the stack happy, but it will not decrease your call overhead.
<slyrus2> Is there a way to "trace" ASDF such that one can actually see what the calls to the compiler are?
nickenchuggets has joined #lisp
<pfdietz> You could trace COMPILE-FILE, or maybe there's some generic function you could write an around method for.
<slyrus2> pfdietz: yeah, I tried that but I don't seem to get any output. I must be doing something wrong.
<kenanb> AFAIK asdf already provided an interface to access generated list of all tasks for a certain load-op.
shenghi has quit [Ping timeout: 265 seconds]
<slyrus2> right, do you know what that is? :)
<pfdietz> Check if ASDF is binding *TRACE-OUTPUT*.
nsrahmad has joined #lisp
shenghi has joined #lisp
<kenanb> slyrus2: asdf:traverse is the function. as I said, that is only for getting the generated task list
<kenanb> slyrus2: it is mentioned in this video: https://youtu.be/9qO8DkUaqWI?t=31m21s
Khisanth has joined #lisp
<slyrus2> thanks!
<slyrus2> but I'd still like the actual compile invocations. still digging.
Kevslinger has quit [Quit: Connection closed for inactivity]
rumbler31 has joined #lisp
longshi has quit [Ping timeout: 256 seconds]
serviteur has quit [Remote host closed the connection]
<slyrus2> aha! the with-muffled-compiler-conditions form in uiop.lisp was stealing my trace output.
rumbler31 has quit [Ping timeout: 264 seconds]
EvW has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
surya has quit [Remote host closed the connection]
<slyrus2> luis: around?
<Bike> compile-file is a standard function, so tracing it is undefined behavior and might do weird dumb thing.s
<slyrus2> Hmm.. interesting. In this case it works fine once I unmuffle the conditions down inside UIOP:compile-file*
longshi has joined #lisp
milanj has joined #lisp
kenanb has left #lisp ["ERC (IRC client for Emacs 26.1)"]
Kundry_Wag has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
eli_oat has joined #lisp
liead is now known as adlai
zmt01 has joined #lisp
Plazma_ has joined #lisp
Xach_ has joined #lisp
skeuomorf has joined #lisp
tkd_ has joined #lisp
equalunique[m]1 has joined #lisp
kbtr has quit [Ping timeout: 260 seconds]
robotoad has quit [Quit: robotoad]
Yaargh_ has joined #lisp
kajo2 has joined #lisp
simplegauss_ has joined #lisp
cpape has quit [Read error: Connection reset by peer]
Plazma has quit [Read error: Connection reset by peer]
simplegauss has quit [Ping timeout: 245 seconds]
Yaargh has quit [Ping timeout: 245 seconds]
mflem has quit [Ping timeout: 245 seconds]
equalunique[m] has quit [Ping timeout: 245 seconds]
CharlieBrown has quit [Ping timeout: 245 seconds]
spacepluk has quit [Ping timeout: 245 seconds]
Xach has quit [Ping timeout: 245 seconds]
kajo has quit [Ping timeout: 245 seconds]
tkd has quit [Ping timeout: 245 seconds]
longshi has quit [Ping timeout: 245 seconds]
cpape has joined #lisp
easye has quit [Ping timeout: 245 seconds]
Guest49045 has quit [Ping timeout: 245 seconds]
zmt00 has quit [Ping timeout: 245 seconds]
kbtr_ has joined #lisp
dkrm has joined #lisp
dkrm has quit [Ping timeout: 245 seconds]
longshi_ has joined #lisp
spacepluk has joined #lisp
ArthurAGleckler[ has quit [Ping timeout: 240 seconds]
z3r0d5y[m] has quit [Ping timeout: 240 seconds]
remix2000[m] has quit [Ping timeout: 240 seconds]
katco[m] has quit [Ping timeout: 245 seconds]
RichardPaulBck[m has quit [Ping timeout: 260 seconds]
giraffe has joined #lisp
Jach[m]1 has quit [Ping timeout: 256 seconds]
spectrumgomas[m] has quit [Ping timeout: 240 seconds]
plll[m] has quit [Ping timeout: 245 seconds]
giraffe is now known as Guest75834
dirb has quit [Ping timeout: 240 seconds]
drunk_foxx[m] has quit [Ping timeout: 240 seconds]
eatonphil has quit [Ping timeout: 240 seconds]
LdBeth has quit [Ping timeout: 260 seconds]
theemacsshibe[m] has quit [Ping timeout: 260 seconds]
Guest10229 has quit [Ping timeout: 256 seconds]
thorondor[m] has quit [Ping timeout: 256 seconds]
skeuomorf has quit [Ping timeout: 260 seconds]
can3p[m] has quit [Ping timeout: 255 seconds]
hdurer[m] has quit [Ping timeout: 255 seconds]
lyosha[m] has quit [Ping timeout: 245 seconds]
blep-on-external has quit [Ping timeout: 256 seconds]
GNUPONUT[m] has quit [Ping timeout: 256 seconds]
wetha has quit [Ping timeout: 260 seconds]
kammd[m] has quit [Ping timeout: 256 seconds]
kumori[m] has quit [Ping timeout: 256 seconds]
jach[m] has quit [Ping timeout: 256 seconds]
equalunique[m]1 has quit [Ping timeout: 276 seconds]
manila[m] has quit [Ping timeout: 276 seconds]
azimut has quit [Ping timeout: 240 seconds]
nsrahmad has quit [Ping timeout: 276 seconds]
<random9899> now all the lift-test.lisp tests pass too
azimut has joined #lisp
robotoad has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
<random9899> with the lift-standard.config http://dpaste.com/3TZA0YC
fisxoj_ has quit [Quit: fisxoj_]
<random9899> the interactive failure thing was annoying, throwing you into the debugger and stuff....
eli_oat has quit [Quit: Leaving.]
megalography has quit [Ping timeout: 256 seconds]
zmt01 has quit [Quit: Leaving]
zmt00 has joined #lisp
shrdlu68 has joined #lisp
jmercouris has joined #lisp
megalography has joined #lisp
eli_oat has joined #lisp
HDurer has quit [Ping timeout: 276 seconds]
cpape has quit [Quit: ERC (IRC client for Emacs 25.3.1)]
cpape has joined #lisp
rgc has joined #lisp
rgc has left #lisp [#lisp]
wigust- has joined #lisp
wigust has quit [Ping timeout: 265 seconds]
phenoble has quit [Quit: WeeChat 1.9.1]
xantoz has joined #lisp
surya has joined #lisp
longshi_ has quit [Ping timeout: 245 seconds]
random9899 has quit [Quit: Leaving]
lnline has joined #lisp
megalography has quit [Ping timeout: 260 seconds]
surya has quit [Ping timeout: 240 seconds]
lnline is now known as Inline
nickenchuggets has quit [Read error: Connection reset by peer]
nickenchuggets has joined #lisp
pierpal has joined #lisp
red-dot has joined #lisp
BitPuffin has joined #lisp
talonfire441 has joined #lisp
jmercouris has quit [Ping timeout: 255 seconds]
shangul has quit [Remote host closed the connection]
shangul has joined #lisp
megalography has joined #lisp
eli_oat has quit [Quit: Leaving.]
jmercouris has joined #lisp
Oladon has joined #lisp
nowhere_man has quit [Ping timeout: 256 seconds]
shangul has quit [Ping timeout: 245 seconds]
shangul has joined #lisp
stacksmith has joined #lisp
kuwze has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
HDurer has joined #lisp
Kundry_Wag has joined #lisp
pjb has joined #lisp
bjorkintosh has quit [Ping timeout: 244 seconds]
Kundry_Wag has quit [Ping timeout: 245 seconds]
eli_oat has joined #lisp
``Erik has quit [Ping timeout: 256 seconds]
drewc has quit [Read error: Connection reset by peer]
Inline has quit [Quit: Leaving]
milanj has quit [Ping timeout: 240 seconds]
eli_oat has quit [Quit: Leaving.]
robotoad has quit [Quit: robotoad]
robotoad has joined #lisp
kmurphy4 has joined #lisp
smurfrobot has joined #lisp
milanj has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
red-dot has joined #lisp
attila_lendvai has quit [Quit: Leaving.]
jeosol_ has joined #lisp
smurfrobot has quit [Remote host closed the connection]
martango has joined #lisp
jeosol has quit [Ping timeout: 260 seconds]
shka_ has quit [Ping timeout: 256 seconds]
robotoad has quit [Quit: robotoad]
LdBeth has joined #lisp
Inline has joined #lisp
Mutex7 has joined #lisp
BitPuffin has quit [Remote host closed the connection]
Oladon has quit [Quit: Leaving.]
energizer is now known as energizer_
energizer_ is now known as energizer
martango has quit [Remote host closed the connection]
Arcaelyx has quit [Read error: Connection reset by peer]
robotoad has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
mflem has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
Arcaelyx has joined #lisp
megalography has quit [Ping timeout: 255 seconds]
CharlieBrown has joined #lisp
spectrumgomas[m] has joined #lisp
wetha has joined #lisp
kammd[m] has joined #lisp
GNUPONUT[m] has joined #lisp
remix2000[m] has joined #lisp
eatonphil has joined #lisp
Guest10376 has joined #lisp
drunk_foxx[m] has joined #lisp
manila[m] has joined #lisp
katco[m] has joined #lisp
thorondor[m] has joined #lisp
theemacsshibe[m] has joined #lisp
jach[m] has joined #lisp
RichardPaulBck[m has joined #lisp
kumori[m] has joined #lisp
ArthurAGleckler[ has joined #lisp
hdurer[m] has joined #lisp
equalunique[m] has joined #lisp
plll[m] has joined #lisp
lyosha[m] has joined #lisp
dirb has joined #lisp
Jach[m]1 has joined #lisp
blep-on-external has joined #lisp
z3r0d5y[m] has joined #lisp
can3p[m] has joined #lisp
kmurphy4 has quit [Quit: kmurphy4]
robotoad has quit [Quit: robotoad]
jmercouris has quit [Ping timeout: 276 seconds]
robotoad has joined #lisp
megalography has joined #lisp
mathrick has quit [Ping timeout: 245 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Kundry_Wag has joined #lisp
vlatkoB has quit [Remote host closed the connection]
shrdlu68 has quit [Ping timeout: 260 seconds]
Oladon has joined #lisp
jmercouris has joined #lisp
comborico1611 has joined #lisp
mathrick has joined #lisp
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
smurfrobot has joined #lisp
kmurphy4 has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
MasouDa has quit [Ping timeout: 256 seconds]
MasouDa has joined #lisp
wigust- has quit [Ping timeout: 276 seconds]
<Inline> weird
<Inline> the test-creating-multiple-tests testsuite in lift gives me once 4 or 3 or 2 as an answer to a 3 tests grouped by 2 case
pierpa has joined #lisp
Folkol has joined #lisp
skeuomorf has joined #lisp
<Inline> compiling the lift-test system gives consistent results tho, so something is in the vulnerable ephemeral state somewhere
<Inline> cause testing it right after i load all of my packages and my repl tends to give wrong answers
kajo2 is now known as kajo
* Inline takes notes
<Inline> always recompile test frameworks before doing testing
lumm has quit [Quit: lumm]
asarch has joined #lisp
shangul has quit [Ping timeout: 256 seconds]
Kundry_Wag has quit [Read error: Connection reset by peer]
Kundry_Wag has joined #lisp
jmercouris has quit [Ping timeout: 245 seconds]
Plazma_ is now known as Plazma
Folkol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
asarch has quit [Ping timeout: 245 seconds]
orivej has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
fm4d_ has left #lisp ["Textual IRC Client: www.textualapp.com"]
Kundry_Wag has quit [Ping timeout: 256 seconds]
red-dot has joined #lisp
lavaflow has quit [Read error: Connection reset by peer]
lavaflow has joined #lisp
random-nick has quit [Ping timeout: 268 seconds]
Kundry_Wag has joined #lisp
fyodost has joined #lisp
talonfire441 has quit [Quit: talonfire441]
mooog has joined #lisp
MasouDa has quit [Ping timeout: 245 seconds]
markoong has quit [Read error: Connection reset by peer]
MasouDa has joined #lisp
markoong has joined #lisp
zaquest has joined #lisp
slyrus2 has quit [Ping timeout: 264 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
Kundry_Wag has quit [Ping timeout: 245 seconds]
red-dot has joined #lisp
slyrus1 has joined #lisp
python476 has quit [Ping timeout: 256 seconds]
milanj has joined #lisp
dddddd has quit [Remote host closed the connection]
asarch has joined #lisp
<asarch> Two questions: https://pastebin.com/NeBZKbKF
<asarch> 1) What's wrong?
<asarch> 2) How could you specify which 'get-sugar' (either from 'chocolate' or from 'cafe') you want in 'serving-drink'?
<asarch> From the question #1 I get: 3: (ERROR "Illegal function call in method body:~% ~S" ((FORMAT T "The level of sugar is: ~d~%" (GET-SUGAR CUP))))
<asarch> From sbcl
<on_ion> i think 'dinner' is the varname isnt it?
<on_ion> although i would say, the slot 'sugar' would be part of something that the chocolate and the cafe would share
<on_ion> like (defclass sugar-water (water) ((sugar...))
varjag has quit [Ping timeout: 240 seconds]
<Bike> you have serving-drink with a defgeneric with one parameters, and then the method has two parameters.
<Bike> maybe you meant ((cup dinner))?
<Bike> ":accessor set-sugar" is probably not what you want
* asarch checks his notes...
<Bike> since accessor defines a reader /and/ a writer
<Bike> defining a writer that isn't a setf function is stylistically wrong, as wlel
<asarch> Bingo! Problem #1 fixed! You were right Bike, it was ((cup dinner))
<Bike> as for "how could you specify" i think you're confused
<Bike> which methid is called naturally depends on the argument dispatch
<Bike> cup is a dinner, so it calls the GET-SUGAR for dinner
<Bike> which, per precedence rules, would be the one for CHOCOLATE since it's the leftmost superclass
<Bike> but having two different slots as you do is kind of bad
<Bike> you should just specify the sugar slot in a parent class, and then specify initforms in the lower class if you'd like
<asarch> It is a simple example for my annotations
<Bike> your example ought to match actual practice, no?
<asarch> You know, I C++ I could cafe::sugar or chocolate::sugar
<asarch> s/I C++/in C++/
MasouDa_ has joined #lisp
<Bike> in lisp you can't do that
<Bike> all methods are only dealt with virtually, if you like
<asarch> I just was wondering if there was such a way to do the same in Lisp
<asarch> Oh :-(
bjorkintosh has joined #lisp
<Bike> why do you want to do that?
<asarch> There is no way to access super-class method?
MasouDa has quit [Ping timeout: 264 seconds]
<Bike> you can access other methods on the same function if you like
<Bike> clhs call-next-method
<asarch> How would you do that?
<Bike> check the link
<Bike> and probably a general tutorial of some kind
<asarch> In my example, because of the class precedence list 'serving-drink' uses 'sugar' from 'chocolate'
<Bike> Yes.
<Bike> There's another quirk here because of your multiple slot definition.
<asarch> How would you "manually" use 'sugar' from 'cafe'?
<Bike> As I said, you probably don't want to do that. You can't have two distinct slots with the same name in the same object.
<Bike> So your question isn't really valid.
<asarch> How? Please, I beg you
<Bike> How what?
<asarch> How would you "manually" use 'sugar' from 'cafe'?
<Bike> You can't. There isn't one!
<Bike> Your dinner class has ONE slot called "sugar".
<asarch> Really?
<asarch> Wow!
<Bike> Yes.
<Bike> Why would you expect to be able to have distinct slots with the same name?
<asarch> I thought it was like other programming languages
<Bike> that would be so confusing.
<asarch> Why? Most programming languages let you do this
<asarch> Even PHP which it doesn't support multiple inheritance
<Bike> As I said, if you must you can think of everything about classes as being what C++ terms "virtual".
<Bike> It's looked up at runtime.
<asarch> Wow!
Kundry_Wag has joined #lisp
<Bike> clhs 7.5.3
<specbot> Inheritance of Slots and Slot Options: http://www.lispworks.com/reference/HyperSpec/Body/07_ec.htm
<Bike> if you'd like a reference
<asarch> So, if I do: (defparameter *my-cup* (make-instance 'dinner)) and then (serving-drink *my-cup*), 'sugar' from 'cafe' doesn't exist, right?