00:00:35 jungy [~smuxi@68.48.245.159] has joined #lisp 00:02:26 igorw [~igorw@phpbb/developer/evil3] has joined #lisp 00:07:17 -!- chameco [~samuel@135.sub-70-192-14.myvzw.com] has quit [Quit: leaving] 00:07:28 brguy [~idonteven@189-69-121-202.dsl.telesp.net.br] has joined #lisp 00:08:57 ASau` [~user@217.118.90.233] has joined #lisp 00:09:41 -!- ASau [~user@217.118.90.233] has quit [Remote host closed the connection] 00:11:10 -!- foreignFunction [~niksaak@94.27.88.139] has quit [Quit: Leaving.] 00:11:17 -!- bananagram [~bot@c-98-198-236-112.hsd1.tx.comcast.net] has quit [Ping timeout: 265 seconds] 00:11:20 Dragonling [~Drak0n41K@94.137.39.153] has joined #lisp 00:11:33 _8david [~user@port-212-202-134-139.static.qsc.de] has joined #lisp 00:12:38 -!- mnemonk [~jonasl@c-46-162-74-52.cust.bredband2.com] has quit [Quit: leaving] 00:13:24 -!- Drak0n41K [~Drak0n41K@109.120.44.226] has quit [Read error: Operation timed out] 00:14:33 -!- impulse [~impulse@bas3-toronto48-1177937880.dsl.bell.ca] has quit [Ping timeout: 265 seconds] 00:16:00 impulse [~impulse@bas3-toronto48-1176442008.dsl.bell.ca] has joined #lisp 00:16:31 bananagram [~bot@c-98-198-236-112.hsd1.tx.comcast.net] has joined #lisp 00:16:39 -!- tcr [~tcr@88-134-109-42-dynip.superkabel.de] has quit [Quit: Leaving.] 00:19:59 -!- ebobby [~fms@189.170.27.127] has quit [Quit: Lost terminal] 00:20:52 -!- engblom [~user@unaffiliated/engblom] has quit [Ping timeout: 245 seconds] 00:22:05 -!- alesguzik [~alesguzik@178.120.12.21] has quit [Quit: leaving] 00:25:40 dnolen [~user@pool-96-224-16-85.nycmny.east.verizon.net] has joined #lisp 00:25:45 -!- Ralt [~ralt@89-92-204-200.hfc.dyn.abo.bbox.fr] has quit [Remote host closed the connection] 00:30:16 lduros [~user@fsf/member/lduros] has joined #lisp 00:35:15 -!- barik [~barik@short.csc.ncsu.edu] has quit [Ping timeout: 276 seconds] 00:36:24 barik [~barik@short.csc.ncsu.edu] has joined #lisp 00:37:05 sodel [~dralston@S01062cb05d9c7e60.va.shawcable.net] has joined #lisp 00:40:41 huangjs [~huangjs@69.84.244.131] has joined #lisp 00:43:22 Corvidium [~cosman246@122.167.73.226] has joined #lisp 00:43:35 -!- [SLB] is now known as [SLB]` 00:45:24 -!- bitonic [~user@109.114.69.218] has quit [Ping timeout: 260 seconds] 00:49:12 -!- tensorpudding [~tensorpud@99.148.198.110] has quit [Ping timeout: 245 seconds] 00:52:09 sodel` [~user@S01062cb05d9c7e60.va.shawcable.net] has joined #lisp 00:52:11 -!- sodel [~dralston@S01062cb05d9c7e60.va.shawcable.net] has quit [Quit: leaving] 00:52:15 pnq [~nick@unaffiliated/pnq] has joined #lisp 00:52:18 -!- sodel` [~user@S01062cb05d9c7e60.va.shawcable.net] has quit [Remote host closed the connection] 00:52:37 sodel [~user@S01062cb05d9c7e60.va.shawcable.net] has joined #lisp 00:53:09 -!- sodel [~user@S01062cb05d9c7e60.va.shawcable.net] has left #lisp 00:53:16 -!- lduros [~user@fsf/member/lduros] has quit [Remote host closed the connection] 00:54:27 sodel [~user@S01062cb05d9c7e60.va.shawcable.net] has joined #lisp 00:54:52 -!- sodel [~user@S01062cb05d9c7e60.va.shawcable.net] has left #lisp 00:55:17 hello, I hope this is the right place to ask this question 00:55:36 I'm trying to understand when macro-expansion is supposed to happen 00:56:55 I've made a very naive lisp implementation and added macro capability at runtime, a macro is essentially just a special form which gets expanded and then evaluated at runtime 00:56:59 -!- agumonke1 [~agu@243.217.72.86.rev.sfr.net] has quit [Ping timeout: 246 seconds] 00:58:10 my next goal is to pre-process the top-level forms, expanding them entirely before evaluating them 00:58:26 first of all, does this even make sense? 00:58:28 igorw: well, if you're inventing your own lisp, you can do whatever you want. 00:58:42 In CL, it happens at the minimal compilation phase. 00:58:47 igorw: http://clhs.lisp.se/Body/03_ababb.htm 00:59:23 You may have a look at FEXPR too. 00:59:36 and yeah, if code is compiled then there aren't macroexpansions at runtime (except through explicit macroexpand calls &c, if you count that) 01:01:01 _veer [~veer@pool-173-65-234-164.tampfl.fios.verizon.net] has joined #lisp 01:01:01 -!- _veer [~veer@pool-173-65-234-164.tampfl.fios.verizon.net] has quit [Changing host] 01:01:01 _veer [~veer@unaffiliated/lolsuper-/x-9881387] has joined #lisp 01:02:30 cdidd [~cdidd@95-24-199-172.broadband.corbina.ru] has joined #lisp 01:05:20 pjb: I guess I am indeed asking for a comparison to how this works in CL and possibly other LISPs 01:05:33 also, I did explicitly want to avoid FEXPRs 01:06:09 Bike: thanks for the link 01:06:12 That said, in CL, macroexpansion may occur at run-time, notably with interpreters (but only once in general, they're optimized). 01:06:31 igorw: Well, expansion at run-time is what FEXPR do. 01:06:50 -!- fisxoj [~fisxoj@c-24-12-190-29.hsd1.il.comcast.net] has quit [Ping timeout: 255 seconds] 01:07:37 igorw: check http://www.lispworks.com/documentation/HyperSpec/Body/03_bbb.htm 01:07:51 Devon [~user@pool-173-66-1-242.washdc.fios.verizon.net] has joined #lisp 01:08:24 pjb: it's my understanding that FEXPR is slightly different to macros, in the sense that they act as userland special forms which get unevaluated arguments; whereas macros rewrite the form and produce a new form that can then be cached/compiled. 01:09:23 Yes, but with an interpreter, it's not specified how many times macroexpand is called. 01:09:24 as such, FEXPR do not really expand, they are evaluated, and can optionally evaluate their arguments. correct me if I'm wrong 01:09:31 http://www.lispworks.com/documentation/HyperSpec/Body/03_ababb.htm 01:09:51 otherwise, yes, fexpr don't really expand. 01:10:20 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 01:11:48 -!- bananagram [~bot@c-98-198-236-112.hsd1.tx.comcast.net] has quit [Ping timeout: 248 seconds] 01:12:24 -!- jungy [~smuxi@68.48.245.159] has quit [Remote host closed the connection] 01:12:30 *drewc* mentions "kernel lisp" and the fexprs it includes, and 'expanding'has little todo with fexprs because they do not create 'source code' like macros do per so 01:12:35 per se* 01:13:08 Well a fexpr could do (eval (some-generated-code)). 01:13:59 so could a function. 01:14:07 -!- ehu [ehu@ip167-22-212-87.adsl2.static.versatel.nl] has quit [Ping timeout: 246 seconds] 01:18:07 ok, so if I want to do minimal compilation, let's say I have this macro: (defmacro plus (a b) (+ a b)) just to keep things simple 01:18:29 (defmacro plus (a b) `(+ ,a ,b)) ; perhaps 01:19:25 minimal compilation will involve a code walker. 01:19:34 yep, you're right 01:20:35 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #lisp 01:22:10 now, if I have something like this: (defn apply-plus (plus a b) (#'plus a b)) - probably contains mistakes because I'm not so familiar with CL 01:22:29 but essentially I have a function argument named plus 01:22:37 defun? :) 01:22:43 (defun apply-plus (plus a b) (funcall plus a b))? 01:22:54 I suppose that's what I'm looking for 01:23:02 so (apply-plus #'+ 4 5) => 9 01:23:22 (defun apply-plus (plus a b &rest args) (apply plus a b args)) 01:23:33 does the macro expansion apply to the argument list in this case? and if not, how does it prevent that from happening? 01:23:45 or ... if it is a funcall, then the apply- does not make sense. 01:23:56 igorw: that's where the code walker enters the picture! 01:24:10 sw2wolf [~czsq888@118.112.68.198] has joined #lisp 01:24:19 The code walker sees that defun is a macro, so it calls the macro function to expand it. 01:24:33 igorw: well, for one you'd have to reference (macro-function 'plus). and the result of that is just a macroexpander function, of two arguments, a form and an environment (not a and b) 01:24:51 It them gets something like: (setf (symbol-function 'apply-plus) (lambda (plus a b) (funcall plus a b))) 01:25:05 it then calls the macro function for setf. 01:25:30 It then gets something like (set-symbol-function 'apply-plus (lambda (plus a b) (funcall plus a b))) and sees that lambda is a macro. 01:25:47 It then calls the macro function for lambda and gets (function (lambda (plus a b) (funcall plus a b))) 01:26:02 and since function is a special operator for which nothing should be done on the argument it's done. 01:26:24 perfect, that helps *a lot* :) 01:26:35 tensorpudding [~tensorpud@99.148.198.110] has joined #lisp 01:26:41 hang on, during compilation wouldn't it have to walk the lambda expression? 01:26:50 Yuuhi`` [benni@p5483A421.dip.t-dialin.net] has joined #lisp 01:27:40 yes, I wasn't correct. It sees (function (lambda )) and code walk the body, but not the lambda-list of the lambda form. 01:27:49 right. 01:28:19 so the walker has specific knowledge about what a lambda is, and skips the args 01:28:30 -!- Yuuhi` [benni@p5483A68E.dip.t-dialin.net] has quit [Ping timeout: 265 seconds] 01:28:33 Yes. 01:28:36 clhs lambda 01:28:36 http://www.lispworks.com/reference/HyperSpec/Body/a_lambda.htm 01:28:41 It has specific knowledge of all the special operators. 01:28:43 specific knowledge of how FUNCTION works might be a better way to put it 01:28:55 (function name) or (function (lambda () )). 01:29:02 honkfestival [~honkfesti@198-84-183-94.cpe.teksavvy.com] has joined #lisp 01:29:24 (lambda (...) ...) is a valid function _name_ 01:29:43 Yes. 01:30:01 But here it's a pattern matching where name is just a symbol. 01:30:33 well, a "function name" is just a symbol or (setf symbol), isn't it? clhs function mentions it can take a function name /or/ a lambda expression. 01:30:36 but that's quite pedantic... 01:30:50 yup... "A lambda expression is a list that can be used in place of a function name in certain contexts to denote a function by directly describing its behavior rather than indirectly by referring to the name of an established function" 01:31:06 verbose. 01:32:51 yup, but it has to be so that ((lambda (a) (+ 2 a)) 1) can work. I am not saying that i like it, but it is useful for the times at the REPL when i need it. 01:33:09 Or when writing macros. 01:33:25 *drewc* nods 01:33:26 nickp99 [~nick@vm1.lumi.net] has joined #lisp 01:33:47 -!- Amadiro [jonathri@dalvik.ping.uio.no] has quit [Excess Flood] 01:34:04 Welcome Nick P 01:34:36 Us [~Us@vm1.lumi.net] has joined #lisp 01:35:48 -!- nickp99 [~nick@vm1.lumi.net] has quit [Client Quit] 01:35:52 lambda the ultimate 01:36:23 Amadiro [jonathri@dalvik.ping.uio.no] has joined #lisp 01:37:56 Indecipherable [~Indeciphe@41.13.4.180] has joined #lisp 01:38:28 Oddity [~Oddity@unaffiliated/oddity] has joined #lisp 01:38:30 nickp99 [~user@vm1.lumi.net] has joined #lisp 01:39:08 *drewc* will not even get in to CPS and how lambda is quite useful there ... http://drewc.org/interface/monads.html#sec-6 for those that are interested ;) 01:39:40 neoesque [~neoesque@210.59.147.232] has joined #lisp 01:41:22 -!- Indecipherable [~Indeciphe@41.13.4.180] has quit [Client Quit] 01:46:36 thanks for the explanations, guys. I am enlightened. :) a) things like lambda and defun are in fact macros themselves b) the compile-time expander is called a code walker c) code walker knows about special forms 01:46:53 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 01:46:56 (TIL) 01:47:00 -!- ASau` [~user@217.118.90.233] has quit [Ping timeout: 248 seconds] 01:47:40 igorw: a CL implementation may implement macros as special operators and special operators as macros, so 01:48:34 But a code walker can rely on the standard operators to "understand" a form. 01:48:49 yeah, is "special operator" synonymous with "special form"? 01:49:08 if a CL implementation may implement macros as special operators it must still provide macrofunctions for them to expand to the usual special operators and functions. 01:49:22 A special form is a form where the operator is a special operator. 01:49:46 I see 01:50:49 liweinan [~liweinan@123.117.208.18] has joined #lisp 01:55:47 only 3 needed for Kernel, 7 needed for Scheme[fn:1] and ..what ... 25 or so for CL? 01:56:23 kernel has continuations, so that lets block/throw/catch/tagbody/go/return-from be implemented as macros 01:56:37 [1] : there are a lot of 'scheme's and no real standard 01:56:48 drewc: again, a CL implementation can implement as many special operators as macros! 01:57:08 So, 3 or 1 or as many as you want. 01:57:51 there's no concept of declarations, so locally's gone, and let* is trivial to implement in terms of let. no difference between a lambda's arguments and a let's bindings, so let is a macro 01:58:04 The specification of CL special operators is not a restrictions for the implementations. but a contract between standard macros and code walkers. 01:58:15 pjb: true 01:59:31 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #lisp 02:03:34 -!- huangjs [~huangjs@69.84.244.131] has quit [Quit: This computer has gone to sleep] 02:05:10 chameco [~samuel@135.sub-70-192-14.myvzw.com] has joined #lisp 02:08:33 -!- talas [~talas@136.144.16.62.customer.cdi.no] has quit [Read error: Connection reset by peer] 02:08:47 Bike: and, in Kernel lambda is a FEXPR , so no lambda needed. just $if, $vau and $define! :) sigh ... now I am going to re-read the papers and start my own implementation _again_ ... because that is what I do for fun. 02:09:29 talas [~talas@136.144.16.62.customer.cdi.no] has joined #lisp 02:09:44 -!- talas [~talas@136.144.16.62.customer.cdi.no] has quit [Remote host closed the connection] 02:09:51 drewc: well, what i was getting at is that it's more feature differences... there aren't multiple values either, so there goes m-v-c and m-v-p1. and so forth 02:10:02 drewc: by the way, what did you think of the designer's anti-quote thing? 02:13:05 -!- nickp99 [~user@vm1.lumi.net] has quit [Remote host closed the connection] 02:15:46 -!- chameco [~samuel@135.sub-70-192-14.myvzw.com] has quit [Quit: leaving] 02:16:08 chameco [~samuel@135.sub-70-192-14.myvzw.com] has joined #lisp 02:18:35 well, at first i wanted to see the result of doing so ... and afterwards, well, I wouldn't call it anti-quote as such... I could even go the other way and say the everything is quoted.... but, as for the concept, i like it a lot. 02:19:29 i mean, the way he says "well you can define $quote easily but you shouldn't" 02:20:20 true via the lack of VALUES ... and that is another thing I like about Kernel ... the lack of performance features etc 02:20:44 ah yeah, that anti-quote thing :D 02:21:10 it was awkward in the little programming i tried, but that's quite possibly me just being used to CL 02:22:34 huangjs [~huangjs@69.84.244.131] has joined #lisp 02:23:25 whitedawg [~whitedawg@122.179.51.171] has joined #lisp 02:23:41 heh ... that is what I was trying to say, in many more words ... but, in my head, I try not to treat Kernel as Common Lisp... 02:24:17 or as Scheme, because I like Kernel :D 02:25:03 well, i've used scheme even less, so. 02:26:32 -!- CatMtKing [~chrono220@108-224-122-111.lightspeed.irvnca.sbcglobal.net] has quit [Remote host closed the connection] 02:26:34 and tbh it has been quite a while since I did a large Kernel program, and my opinion on a lot has changed in the last 2 years ... so, heh, first I will read the papers again,then look at your github, and then try to go about it completely differently. 02:26:58 mine? my implementation is not very good. 02:27:13 so,this time next year, I hope I will havesomething more valuable to say 02:27:13 -!- huangjs [~huangjs@69.84.244.131] has quit [Client Quit] 02:27:33 i could probably do it better now, i suppose... might be a nice exercise. but it would be nice if the spec has changed so i have something new to do. 02:27:40 heh ... that is ok ... I have done 5 implementations 02:28:48 each one different,from the first (an silly interpreter) to the last (sbcl based compiler) ... "and now for something completely different" 02:29:05 huangjs [~huangjs@69.84.244.131] has joined #lisp 02:29:45 Kvaks [~kvaks@161.164.189.109.customer.cdi.no] has joined #lisp 02:30:16 -!- Kvaks_ [~kvaks@155.167.189.109.customer.cdi.no] has quit [Read error: Operation timed out] 02:33:33 jrajav [~jrajav@66-188-176-243.dhcp.roch.mn.charter.com] has joined #lisp 02:35:02 sodel [~user@S01062cb05d9c7e60.va.shawcable.net] has joined #lisp 02:35:30 -!- sodel [~user@S01062cb05d9c7e60.va.shawcable.net] has left #lisp 02:36:12 cfy [~ilisp@unaffiliated/chenfengyuan] has joined #lisp 02:37:49 -!- leoncamel [~leoncamel@1.202.60.6] has quit [Ping timeout: 252 seconds] 02:39:58 -!- gffa [~unknown@unaffiliated/gffa] has quit [Quit: sleep] 02:41:14 bananagram [~bot@c-98-198-236-112.hsd1.tx.comcast.net] has joined #lisp 02:43:24 kcj [~casey@unaffiliated/kcj] has joined #lisp 02:43:46 -!- kcj [~casey@unaffiliated/kcj] has quit [Read error: Connection reset by peer] 02:46:21 -!- chameco [~samuel@135.sub-70-192-14.myvzw.com] has quit [Quit: leaving] 02:46:39 chameco [~samuel@135.sub-70-192-14.myvzw.com] has joined #lisp 02:47:43 -!- jeti` [~user@p548E9B36.dip.t-dialin.net] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 02:47:50 -!- huangjs [~huangjs@69.84.244.131] has quit [Quit: This computer has gone to sleep] 02:52:47 kofno [~kofno@cpe-24-165-213-150.neo.res.rr.com] has joined #lisp 02:53:10 -!- bege [~bege@S0106001d7e5132b0.ed.shawcable.net] has quit [Quit: leaving] 02:55:48 huangjs [~huangjs@69.84.244.131] has joined #lisp 02:55:49 -!- Corvidium [~cosman246@122.167.73.226] has quit [Read error: Connection reset by peer] 02:56:00 -!- pnq [~nick@unaffiliated/pnq] has quit [Quit: Leaving.] 02:56:08 Corvidium [~cosman246@122.167.73.226] has joined #lisp 02:56:53 Jubb [~ghost@24-151-37-211.dhcp.nwtn.ct.charter.com] has joined #lisp 02:57:58 -!- nawk [~nawk@CPE0018e7e66445-CM602ad08618e3.cpe.net.cable.rogers.com] has quit [Read error: Connection reset by peer] 02:58:30 nawk [~nawk@CPE0018e7e66445-CM602ad08618e3.cpe.net.cable.rogers.com] has joined #lisp 03:02:33 -!- urandom__ [~user@p54B0E2C3.dip.t-dialin.net] has quit [Quit: Konversation terminated!] 03:07:41 -!- toekutr [~user@50-0-51-11.dsl.static.sonic.net] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 03:10:23 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 03:13:17 qptain_Nemo [~qN@89.207.216.208] has joined #lisp 03:15:29 substitute [~substitut@97-113-98-140.tukw.qwest.net] has joined #lisp 03:19:38 -!- jrajav [~jrajav@66-188-176-243.dhcp.roch.mn.charter.com] has quit [Quit: I tend to be neutral about apples] 03:20:41 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #lisp 03:21:59 -!- REPLeffect [~REPLeffec@69.54.115.254] has quit [Remote host closed the connection] 03:24:18 -!- peterhil [~peterhil@91-157-48-10.elisa-laajakaista.fi] has quit [Read error: Operation timed out] 03:24:46 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 03:25:04 -!- chameco [~samuel@135.sub-70-192-14.myvzw.com] has quit [Quit: leaving] 03:35:04 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #lisp 03:36:54 RocksHound [~rtc@96-38-238-134.static.gwnt.ga.charter.com] has joined #lisp 03:39:26 normanrichards [~normanric@70.114.215.220] has joined #lisp 03:44:06 Beetny [~Beetny@ppp118-208-130-54.lns20.bne1.internode.on.net] has joined #lisp 03:44:31 -!- Brian144 [40b8f5f7@gateway/web/freenode/ip.64.184.245.247] has quit [Quit: Page closed] 03:47:03 edgar-rft [~GOD@HSI-KBW-091-089-005-153.hsi2.kabelbw.de] has joined #lisp 03:51:46 segmond_ [~segmond@adsl-108-67-102-78.dsl.sfldmi.sbcglobal.net] has joined #lisp 03:52:25 -!- honkfestival [~honkfesti@198-84-183-94.cpe.teksavvy.com] has quit [] 03:53:25 binghe [~binghe@220.191.186.26] has joined #lisp 03:54:18 -!- binghe [~binghe@220.191.186.26] has left #lisp 03:55:02 -!- segmond [~segmond@adsl-99-150-134-166.dsl.sfldmi.sbcglobal.net] has quit [Ping timeout: 245 seconds] 04:02:40 -!- benny [~user@87.122.21.255] has quit [Read error: Operation timed out] 04:04:35 -!- substitute [~substitut@97-113-98-140.tukw.qwest.net] has quit [Ping timeout: 255 seconds] 04:04:48 pnq [~nick@unaffiliated/pnq] has joined #lisp 04:06:12 -!- dnolen [~user@pool-96-224-16-85.nycmny.east.verizon.net] has quit [Ping timeout: 248 seconds] 04:11:09 -!- whitedawg [~whitedawg@122.179.51.171] has quit [Quit: Leaving.] 04:12:40 -!- findiggle [~kirkwood@50-194-56-154-static.hfc.comcastbusiness.net] has quit [Quit: Leaving.] 04:14:42 -!- francisl [~anonymous@bas6-montreal45-1176493761.dsl.bell.ca] has quit [Quit: francisl] 04:15:45 sodel [~dralston@S01062cb05d9c7e60.va.shawcable.net] has joined #lisp 04:16:20 -!- antonv [5d7d31f9@gateway/web/freenode/ip.93.125.49.249] has quit [Quit: Page closed] 04:17:07 -!- sodel [~dralston@S01062cb05d9c7e60.va.shawcable.net] has quit [Client Quit] 04:17:19 sodel [~dralston@S01062cb05d9c7e60.va.shawcable.net] has joined #lisp 04:29:04 how can i use defmethod to specialize with this predicate? http://paste.lisp.org/+2VMQ/1 04:32:08 k0001 [~k0001@host55.181-1-167.telecom.net.ar] has joined #lisp 04:33:51 -!- sodel [~dralston@S01062cb05d9c7e60.va.shawcable.net] has quit [Quit: leaving] 04:35:56 peterhil [~peterhil@91-157-48-10.elisa-laajakaista.fi] has joined #lisp 04:37:18 substitute [~substitut@97-113-98-140.tukw.qwest.net] has joined #lisp 04:41:14 -!- Mon_Ouie [~Mon_Ouie@subtle/user/MonOuie] has quit [Read error: Operation timed out] 04:41:14 My_Hearing [~Mon_Ouie@subtle/user/MonOuie] has joined #lisp 04:42:51 -!- Corvidium [~cosman246@122.167.73.226] has quit [Ping timeout: 260 seconds] 04:43:40 k0001_ [~k0001@host32.186-109-177.telecom.net.ar] has joined #lisp 04:47:01 -!- kofno [~kofno@cpe-24-165-213-150.neo.res.rr.com] has quit [Remote host closed the connection] 04:47:03 -!- k0001 [~k0001@host55.181-1-167.telecom.net.ar] has quit [Ping timeout: 260 seconds] 04:51:04 kofno [~kofno@cpe-24-165-213-150.neo.res.rr.com] has joined #lisp 04:51:55 myx [~myx@pppoe-213-12-dyn-sr.volgaline.ru] has joined #lisp 04:52:44 -!- Guest73528 [~lukas@194.228.13.120] has quit [Ping timeout: 260 seconds] 04:54:23 Corvidium [~cosman246@122.167.241.101] has joined #lisp 04:54:27 chenbing [~Administr@180.175.190.84] has joined #lisp 04:55:30 robot-beethoven [~user@c-24-118-142-0.hsd1.mn.comcast.net] has joined #lisp 04:57:09 a possibly silly ?, but can I easily implement all of the "features" that make haskell haskell in common lisp? if that makes any sense.. can I program haskell programs easily in common lisp? 05:00:58 -!- kofno [~kofno@cpe-24-165-213-150.neo.res.rr.com] has quit [Remote host closed the connection] 05:01:28 -!- doomlord [~doomlod@host109-151-246-226.range109-151.btcentralplus.com] has quit [Read error: Operation timed out] 05:02:10 kofno [~kofno@cpe-24-165-213-150.neo.res.rr.com] has joined #lisp 05:03:38 dnolen [~user@cpe-74-64-61-245.nyc.res.rr.com] has joined #lisp 05:06:28 -!- kofno [~kofno@cpe-24-165-213-150.neo.res.rr.com] has quit [Ping timeout: 248 seconds] 05:09:13 kennyd [~kennyd@78-0-200-161.adsl.net.t-com.hr] has joined #lisp 05:10:10 axion: sorry, but what exactly do you want? because methods specialize on classes, not predicates. 05:10:27 or EQL of course 05:13:01 or symbols, yes. but can i shadow a previous method that checks an arg to be a pathname, and instead fire this when the arg is both a pathname and returns non-nil for a custom predicate function? 05:13:36 you could write a method on the pathname class that checks for this in its body. 05:15:54 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 05:17:07 -!- Corvidium [~cosman246@122.167.241.101] has quit [Ping timeout: 265 seconds] 05:17:14 -!- theos [~theos@unaffiliated/theos] has quit [Disconnected by services] 05:17:56 spiderweb: Mu 05:17:57 theos [~theos@unaffiliated/theos] has joined #lisp 05:18:05 ok thanks 05:18:21 -!- deckeraa [~aaron@97-83-167-14.dhcp.stpt.wi.charter.com] has quit [Ping timeout: 245 seconds] 05:18:39 but basically, specializers are either classes (not types!), or eql specializers. 05:26:08 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #lisp 05:26:57 -!- chenbing [~Administr@180.175.190.84] has left #lisp 05:32:36 -!- bananagram [~bot@c-98-198-236-112.hsd1.tx.comcast.net] has quit [Ping timeout: 264 seconds] 05:33:16 kofno [~kofno@cpe-24-165-213-150.neo.res.rr.com] has joined #lisp 05:34:09 -!- Orii [~AndChat48@pool-96-249-148-99.hrbgpa.fios.verizon.net] has quit [Remote host closed the connection] 05:40:16 -!- Us [~Us@vm1.lumi.net] has quit [Quit: Us] 05:41:54 chitofan [dcff0270@gateway/web/freenode/ip.220.255.2.112] has joined #lisp 05:46:44 axion: or: (defmethod asd :around ((foo bar)) (if (predicatep bar) (predicate bar) (call-next-method))) if BAR is somehow always involved... but yeah, only specialized on the BAR class. 05:49:49 can anyone give a short example of using the registers in cl-ppcre's regex-replace-all? i'm doing something wrong but don't find what (and that'll probably clear it up immediately) 05:52:43 (ppcre:regex-replace-all "a(.*?)b" "fiaodabasidfasbadb" "A\\1B")? 05:54:34 spiderweb: you could probably reimplement the whole of Haskell in lisp, but it'd be a lot of work. i don't know of a common lisp implementation that has autothreading execution. so in that sense it'd be *a lot* of work. 05:54:44 Bike: right, it starts at 1, not 0 :) thanks! 05:58:32 Bike: also, it should be possible to extend CLOS for more things than eql specializers, which is essentially what you want AFAICT. i prototyped the functionality for some internal stuff, but it was a tad more complex than what you'd imagine from the MOP (but possible). 05:59:11 you have confused me with axion. but, i have tried that stuff myself with the MOP, but that seemed a little overcomplex. 05:59:16 Doublechecking on buildapp: should --asdf-path be given ~/quicklisp/dists/quicklisp/software 05:59:41 axion: ^ 05:59:42 engblom [~user@unaffiliated/engblom] has joined #lisp 05:59:42 MIU 05:59:51 Corvidium [~cosman246@122.167.225.104] has joined #lisp 06:00:41 -!- cataska [~user@210.64.6.233] has quit [Read error: No route to host] 06:01:14 -!- spiderweb [~user@unaffiliated/lcc] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 06:01:31 Wait, I think I have that one wrong; --asdf-path refers to the project's .asd, and --asdf-tree should point towards the location for dependencies 06:01:46 I.e., the aforementioned place. 06:03:46 cataska [~user@210.64.6.233] has joined #lisp 06:06:02 Anyone used with cl-stomp with jboss HornetQ? 06:08:56 -!- drl [~drl@110.139.229.172] has quit [Ping timeout: 256 seconds] 06:10:52 -!- franv [~chatzilla@190.192.28.129] has quit [Ping timeout: 245 seconds] 06:16:23 Indecipherable [~Indeciphe@41.13.12.110] has joined #lisp 06:20:05 -!- pnq [~nick@unaffiliated/pnq] has quit [Quit: Leaving.] 06:20:54 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Quit: Leaving] 06:21:40 -!- sykopomp [~sykopomp@gateway/tor-sasl/sykopomp] has quit [Remote host closed the connection] 06:22:05 drl [~drl@110.139.229.172] has joined #lisp 06:22:28 sykopomp [~sykopomp@gateway/tor-sasl/sykopomp] has joined #lisp 06:30:50 kushal [kdas@fedora/kushal] has joined #lisp 06:34:21 Huzzah! I finally got buildapp to work! 06:34:52 I apologize very strongly for not reading the documentation more thoroughly; my problems were my own fault. 06:36:33 jewel [~jewel@105-236-138-67.access.mtnbusiness.co.za] has joined #lisp 06:41:48 -!- k0001_ [~k0001@host32.186-109-177.telecom.net.ar] has quit [Ping timeout: 244 seconds] 06:42:14 lukas_ [~lukas@194.228.13.120] has joined #lisp 06:42:37 -!- lukas_ is now known as Guest80035 06:42:43 -!- kliph [~user@unaffiliated/kliph] has quit [Ping timeout: 252 seconds] 06:43:53 k0001 [~k0001@host106.186-125-150.telecom.net.ar] has joined #lisp 06:45:59 ramkrsna [ramkrsna@nat/redhat/x-ieqrdxsunvsusjda] has joined #lisp 06:45:59 -!- ramkrsna [ramkrsna@nat/redhat/x-ieqrdxsunvsusjda] has quit [Changing host] 06:45:59 ramkrsna [ramkrsna@unaffiliated/ramkrsna] has joined #lisp 06:52:07 -!- kiuma [~kiuma@static-217-133-17-91.clienti.tiscali.it] has quit [Quit: Leaving] 07:00:35 can this work? -> (if (member nil '(3 4 nil)) 'nil-is-in-the-list 'nil-is-not-in-the-list) 07:01:00 if there was a value behind nil it could work but what if nil was the last value? 07:01:38 you'll get a list with nil in it. 07:01:43 the list is of course not nil, so it works. 07:02:35 oh 07:02:41 i didn't know (nil) would give a true value 07:02:41 thanks 07:04:16 (nil) is (()) is a list with an element, to clarify a bit. 07:07:13 PauK [pauk@stdev.org] has joined #lisp 07:07:13 -!- Corvidium [~cosman246@122.167.225.104] has quit [Read error: Connection reset by peer] 07:07:31 Corvidium [~cosman246@122.167.225.104] has joined #lisp 07:07:32 -!- jewel [~jewel@105-236-138-67.access.mtnbusiness.co.za] has quit [Ping timeout: 248 seconds] 07:10:08 -!- PauK is now known as borodust 07:11:47 -!- dnolen [~user@cpe-74-64-61-245.nyc.res.rr.com] has quit [Ping timeout: 265 seconds] 07:15:31 sounds like set theory ... empty set, set with an empty set, set with an empty set and a set with an empty set in it, etc ;) 07:16:55 -!- k0001 [~k0001@host106.186-125-150.telecom.net.ar] has quit [Ping timeout: 252 seconds] 07:19:18 jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has joined #lisp 07:27:05 fisxoj [~fisxoj@c-24-12-190-29.hsd1.il.comcast.net] has joined #lisp 07:28:24 francisl [~anonymous@bas6-montreal45-1176493761.dsl.bell.ca] has joined #lisp 07:28:28 Perhaps. 07:28:53 Neat thing I learned from Practical Common Lisp or L0L or SICP: 07:29:40 Nil evaluates to itself in CL, so nil, 'nil, (), and '() are all eq. 07:30:14 -!- Euthydemus [~euthydemu@unaffiliated/euthydemus] has quit [Ping timeout: 252 seconds] 07:34:05 stassats` [~stassats@wikipedia/stassats] has joined #lisp 07:34:26 vexy [~vexy@31.45.171.174] has joined #lisp 07:37:53 -!- stassats [~stassats@wikipedia/stassats] has quit [Ping timeout: 265 seconds] 07:37:56 nostoi [~nostoi@95.Red-80-39-157.dynamicIP.rima-tde.net] has joined #lisp 07:38:10 -!- normanrichards [~normanric@70.114.215.220] has quit [] 07:39:07 -!- Jubb [~ghost@24-151-37-211.dhcp.nwtn.ct.charter.com] has quit [Remote host closed the connection] 07:43:02 iLogical [~iLogical@unaffiliated/ilogical] has joined #lisp 07:43:42 -!- nostoi [~nostoi@95.Red-80-39-157.dynamicIP.rima-tde.net] has quit [Quit: Verlassend] 07:46:57 mvilleneuve [~mvilleneu@LLagny-156-36-4-214.w80-14.abo.wanadoo.fr] has joined #lisp 07:47:34 mrSpec [~Spec@unaffiliated/mrspec] has joined #lisp 07:54:14 -!- iLogical [~iLogical@unaffiliated/ilogical] has quit [Remote host closed the connection] 07:54:36 -!- vexy [~vexy@31.45.171.174] has quit [Quit: vexy] 07:56:01 faust45 [~faust45@89.22.254.177] has joined #lisp 07:58:50 can sometimes being annoying with such over loaded semantics 07:59:36 "was that nil and empty list a #false like or just nil" 07:59:41 s/and/an 08:00:35 -!- mrSpec [~Spec@unaffiliated/mrspec] has quit [Remote host closed the connection] 08:00:41 sdemarre [~serge@252.179-64-87.adsl-dyn.isp.belgacom.be] has joined #lisp 08:02:16 Slivka [~Slivka@81.4.242.0] has joined #lisp 08:04:00 -!- Slivka [~Slivka@81.4.242.0] has quit [Read error: Connection reset by peer] 08:07:28 phax [~phax@unaffiliated/phax] has joined #lisp 08:10:20 -!- phax [~phax@unaffiliated/phax] has quit [Client Quit] 08:11:14 -!- tensorpudding [~tensorpud@99.148.198.110] has quit [Ping timeout: 265 seconds] 08:14:22 -!- Devon [~user@pool-173-66-1-242.washdc.fios.verizon.net] has quit [Ping timeout: 252 seconds] 08:22:32 -!- Guest80035 [~lukas@194.228.13.120] has quit [Ping timeout: 255 seconds] 08:26:20 kiuma [~kiuma@static-217-133-17-91.clienti.tiscali.it] has joined #lisp 08:28:15 Hi, I need to put gensymbol results into an hash table as keys, do I have to call (intern (symbol-name (gensymbol))) ? 08:28:29 what is (gensymbol) 08:28:42 sorry (gensym) 08:28:47 -!- Nisstyre-laptop [~yours@oftn/member/Nisstyre] has quit [Quit: Leaving] 08:29:32 you want to use a symbol as a key for a hash table and your question is where you need to intern the symbol in order to use it as a key. 08:29:38 nan_ [~user@178.233.216.230] has joined #lisp 08:29:56 why do you think that you need to intern the symbol before it can be used as a key? 08:30:53 because with uninterned symbols I have: the following behaviour: 08:32:26 (eql *x* (make-symbol "G880")) -> nil . Where *x* is a (defvar *X* (gensym)) . And I have strings to start with 08:32:28 yacks [~yacks@180.151.36.171] has joined #lisp 08:33:07 you realize of course that the entire point of gensym is that its result can't be duplicated by a separate call 08:33:25 no, he does not realize 08:33:31 -!- faust45 [~faust45@89.22.254.177] has quit [Quit: faust45] 08:33:48 of course I realize!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!11 08:33:53 right. 08:34:00 and I need it 08:34:05 well, now you know 08:34:13 mrSpec [~Spec@unaffiliated/mrspec] has joined #lisp 08:34:18 so one once said exclaimation marks were a sign of insanity 08:34:23 it is saddening. 08:35:19 ah it was Terry Pratchett 08:35:49 maybe I'm insane, who knows? :P 08:35:58 but... 08:36:16 -!- jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has quit [Ping timeout: 260 seconds] 08:36:26 leo2007 [~leo@119.255.41.67] has joined #lisp 08:36:58 anyway, the point is that make-symbol and gensym return new symbols, so they're certainly not going to be eq to one another 08:39:06 -!- wbooze [~wbooze@xdsl-78-35-190-129.netcologne.de] has quit [Ping timeout: 244 seconds] 08:40:14 Bike, I've seen that so, is (intern (symbol-name gensym-result)) the way to add the keys I need ? 08:40:35 no 08:41:01 what are you actually trying to do? whatever it is you have gone in the wrong direction towards doing it 08:42:01 It's a bit difficult to explain in few words, since I'm binding a C library: 08:42:37 -!- Bike [~Glossina@67-5-226-214.ptld.qwest.net] has quit [Quit: life is empty] 08:43:01 I have a method... something like add_event(event_type, data) 08:43:29 I need to connect data to a lisp class instance 08:43:39 so I use an hashmap 08:44:08 kiuma: can you use strings and :test 'equal in your hashtable? 08:45:00 (also, no long time no see. all good?) 08:45:08 -!- fisxoj [~fisxoj@c-24-12-190-29.hsd1.il.comcast.net] has quit [Ping timeout: 248 seconds] 08:45:15 madnificent, I was using strings as keys, I thought that symbols performed better 08:45:46 kiuma: instead of (uninterned) symbols, you could use integers 08:45:58 kiuma: just assign a new number to each of the callbacks, done. 08:45:58 they do, but i doubt you'll notice the performance impact. it could turn out to be the bottleneck when you start benchmarking, but the overhead of calling out to another libary will likely shadow it. 08:46:06 jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has joined #lisp 08:46:12 madnificent, yes thank you, a lot of java projects and javascript and html for different customers 08:46:40 kiuma: yay for you \o/ 08:47:28 nikodem [~mikey@user-109-243-150-170.play-internet.pl] has joined #lisp 08:47:38 but I enjoy lisp better than languages that have now little surprises :/ 08:48:06 -!- francisl [~anonymous@bas6-montreal45-1176493761.dsl.bell.ca] has quit [Quit: francisl] 08:48:09 H4ns, do you mean using gensym so that it returns integers ? 08:48:40 kiuma: no. use a special variable, initialize it to 0, increment it for each new callback that you create, use the value as hash table key. 08:49:26 kiuma: don't use gensym. don't use symbols. they're serving you no good here. 08:49:32 jesus!! geniality is in simplicity :D it was so obvious 08:49:50 you're welcome. 08:50:41 maybe I drunk to much assenzio 08:51:09 (not my fault it was a xmas present) 08:51:50 i use my in-laws to dispose of unwanted drinkable gifts :D 08:55:18 bitonic [~user@ppp-109-10.24-151.libero.it] has joined #lisp 08:55:39 should I replace gensym even here ? http://paste.lisp.org/display/134307 08:56:45 (I've seen that there is a useless progn) 08:57:03 kiuma: i'd recommend that you think through this with your newly acquired knowledge yourself. 08:57:09 -!- bitonic [~user@ppp-109-10.24-151.libero.it] has quit [Remote host closed the connection] 08:57:21 got it :) 08:57:39 bitonic [~user@ppp-109-10.24-151.libero.it] has joined #lisp 08:59:17 lukas_ [~lukas@194.228.13.120] has joined #lisp 08:59:29 gravicappa [~gravicapp@ppp91-77-161-81.pppoe.mtu-net.ru] has joined #lisp 08:59:40 -!- lukas_ is now known as Guest31036 08:59:59 -!- Corvidium [~cosman246@122.167.225.104] has quit [Ping timeout: 260 seconds] 09:03:22 -!- drl [~drl@110.139.229.172] has quit [Ping timeout: 244 seconds] 09:09:14 tcr [~tcr@88-134-109-42-dynip.superkabel.de] has joined #lisp 09:10:33 -!- dented42 [~dented42@opengroove.org] has quit [Ping timeout: 245 seconds] 09:10:48 Corvidium [~cosman246@122.167.225.104] has joined #lisp 09:17:15 drl [~drl@110.139.229.172] has joined #lisp 09:17:25 dented42 [~dented42@opengroove.org] has joined #lisp 09:19:04 -!- huangjs [~huangjs@69.84.244.131] has quit [Quit: This computer has gone to sleep] 09:25:30 -!- jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has quit [Ping timeout: 252 seconds] 09:30:10 kpreid [~kpreid@65.210.45.130] has joined #lisp 09:30:47 -!- Guest31036 [~lukas@194.228.13.120] has quit [Ping timeout: 260 seconds] 09:34:57 ASau [~user@217.118.90.245] has joined #lisp 09:41:08 -!- sirdancealot1 [~sirdancea@98.82.broadband5.iol.cz] has quit [Ping timeout: 260 seconds] 09:42:06 -!- [SLB]` is now known as [SLB] 09:51:05 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 09:51:44 ehu [ehu@ip167-22-212-87.adsl2.static.versatel.nl] has joined #lisp 09:57:45 -!- robot-beethoven [~user@c-24-118-142-0.hsd1.mn.comcast.net] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 09:58:40 -!- yacks [~yacks@180.151.36.171] has quit [Ping timeout: 244 seconds] 09:59:54 -!- sw2wolf [~czsq888@118.112.68.198] has quit [Remote host closed the connection] 10:01:07 -!- My_Hearing is now known as Mon_Ouie 10:01:17 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #lisp 10:06:17 -!- chitofan [dcff0270@gateway/web/freenode/ip.220.255.2.112] has quit [Ping timeout: 245 seconds] 10:06:36 kilon [~user@unaffiliated/thekilon] has joined #lisp 10:07:45 huangjs [~huangjs@69.84.244.131] has joined #lisp 10:09:29 -!- huangjs [~huangjs@69.84.244.131] has quit [Client Quit] 10:11:34 -!- substitute [~substitut@97-113-98-140.tukw.qwest.net] has quit [Ping timeout: 244 seconds] 10:12:00 substitute [~substitut@97-113-98-140.tukw.qwest.net] has joined #lisp 10:14:39 -!- Corvidium [~cosman246@122.167.225.104] has quit [Ping timeout: 260 seconds] 10:15:46 stat_vi [~stat@dslb-094-218-228-177.pools.arcor-ip.net] has joined #lisp 10:16:23 -!- [SLB] is now known as [SLB]` 10:19:12 dbushenko [~dim@ec2-54-242-175-166.compute-1.amazonaws.com] has joined #lisp 10:20:30 yacks [~yacks@180.151.36.171] has joined #lisp 10:22:34 benny [~user@i577A7503.versanet.de] has joined #lisp 10:24:52 -!- gravicappa [~gravicapp@ppp91-77-161-81.pppoe.mtu-net.ru] has quit [Ping timeout: 248 seconds] 10:29:06 faust45 [~faust45@89.22.254.177] has joined #lisp 10:30:55 doomlord [~doomlod@host109-151-246-226.range109-151.btcentralplus.com] has joined #lisp 10:38:09 -!- joooooo [setmeaway3@118.45.149.179] has quit [Ping timeout: 265 seconds] 10:39:23 -!- Spaceghostc2c [Spaceghost@unaffiliated/spaceghostc2c] has quit [Excess Flood] 10:39:24 -!- drdo [~drdo@roach0.drdo.eu] has quit [Quit: I'm finished!] 10:39:45 gravicappa [~gravicapp@ppp91-77-166-37.pppoe.mtu-net.ru] has joined #lisp 10:40:03 -!- neoesque [~neoesque@210.59.147.232] has quit [Quit: Bye!] 10:42:21 Spaceghostc2c [Spaceghost@unaffiliated/spaceghostc2c] has joined #lisp 10:44:28 (defstruct foo a b c) (make-foo 1 2 3) ; you need a boa constructor to make that work, is there a simpler way to make it than (defstruct (foo (:constructor make-foo (a b c))) a b c) 10:45:00 -!- Indecipherable [~Indeciphe@41.13.12.110] has left #lisp 10:45:59 how much more simple could that be? 10:47:28 What about a boa? 10:47:46 what about what about a boa? 10:48:28 iLogical [~iLogical@unaffiliated/ilogical] has joined #lisp 10:48:30 Oh whoops, I misread that. 10:48:48 Make it a macro? 10:49:53 m7w [~chatzilla@178.172.204.183] has joined #lisp 10:50:06 `(defstruct (,arg1 (:constructor make-foo ,(arg2List))) ,@(arg2List)))))))) 10:50:31 Or however those backquotes work. 10:51:21 no, don't make a macro, it will just complicate things unwarrantedly 10:53:32 Really? Seems like it's right out of one of those fun books: automating a way to write code. 10:53:49 Just do a defun and use the same backquote template, or something else? 10:54:07 well, it's good if you're not planning for anyone else to read the code 10:55:06 Hm. 10:55:11 How would you go about writing it? 10:55:23 i would (defstruct (foo (:constructor make-foo (a b c))) a b c) 10:56:31 I see. 10:57:22 it's not long, and anybody who knows defstruct will know what it does 10:57:36 as apposed to figuring out what kind of magic some macros is doing 10:58:02 Sounds good. 10:59:08 Just curious, though: If your arm was being bent to make it briefer, it would be better done with a defmacro than a defun, right? 10:59:20 Arm twisted, rather. 10:59:21 it can't be done with a defun 10:59:32 defstruct is a macro itself 10:59:50 Forgot about that. 11:01:08 and so to automating code-writing, you can employ your editor 11:01:32 M-x make-defstruct RET name RET a b c 11:01:40 and it will insert whatever you want 11:01:42 So macros should be reserved for DSLs and the like? 11:02:08 well, no, macros should be used when the benefit is greater than the cost 11:03:11 stassats`: well I though that maybe some &rest facility would be a good solution, but in a boa constructor apparently that will only pack arguments in the same slot 11:03:22 So if defstruct had significantly more boilerplate or was rather convoluted, you'd go for it? But because it's not, you don't. 11:04:13 and yes the question is about how to avoid having a duplicate list of arguments in that case, but I can also see good sides of doing it that way :) 11:05:09 substitute: maybe, but defstruct is already complicated and hard to figure, so complicating it with another macro wouldn't be that great 11:05:59 i don't really have a step-by-step algorithm to use when choosing whether to make a macro or not 11:08:34 substitute: Don't write macros for sole abbreviation purposes. (The exception is a WITH- macro that expands to a CALL-WITH-) 11:09:28 araujo [~araujo@190.73.45.171] has joined #lisp 11:09:28 -!- araujo [~araujo@190.73.45.171] has quit [Changing host] 11:09:28 araujo [~araujo@gentoo/developer/araujo] has joined #lisp 11:10:15 substitute: for example, rarely somebody likes to write all :initagr :initform :accessor forms, and they write defclass*, N versions, each incompatible with each other 11:10:27 i just use this elisp code to generate them: https://github.com/stassats/emacs-config/blob/master/init_lisp.el#L314 11:11:00 no excessive typing, no typos, and no complicated macros 11:11:35 -!- ASau [~user@217.118.90.245] has quit [Ping timeout: 252 seconds] 11:16:10 urandom__ [~user@p54B0EBE0.dip.t-dialin.net] has joined #lisp 11:18:56 -!- pavelpenev [~quassel@212.233.134.172] has quit [Read error: Operation timed out] 11:19:13 agumonkey [~agu@243.217.72.86.rev.sfr.net] has joined #lisp 11:20:57 hitecnologys [~hitecnolo@46.233.213.111] has joined #lisp 11:21:18 Hello everyone! 11:24:45 I haven't been here for almost 2 months. I missed something really important? 11:24:53 nope 11:24:59 Ok, thx. 11:25:33 kpal [~kpal@217-12-69-147.sibtele.com] has joined #lisp 11:27:49 can anybody tell me why I have to return 0 here https://github.com/kiuma/CL-ECORE/blob/master/src/ecore-event.lisp#L149 if Ecore_End_Cb is defined as file:////usr/share/doc/ecore-1.7.4/html/html/group__Ecore__Event__Group.html#ga1d6806e0a537d3e364d1094e91db4cb7 for ecore_event_add ? 11:28:06 why can't I just return nil ? 11:28:55 -> http://docs.enlightenment.org/stable/ecore/group__Ecore__Event__Group.html#ga1d6806e0a537d3e364d1094e91db4cb7 11:32:12 you declared the return type as :int 11:33:02 ahh there, thanks 11:33:11 quanganhct [734bf49a@gateway/web/freenode/ip.115.75.244.154] has joined #lisp 11:33:48 am0c [~am0c@124.49.51.146] has joined #lisp 11:33:48 is there anyone familiar with lispbuilder-sdl ? 11:34:18 i dont know hpw to load an image within a rectangle 11:34:39 anyone help ? :( 11:36:30 can you draw not within a rectangle? 11:37:06 What are the arguments to the draw function? 11:37:27 have a look at examples/image-example.lisp 11:37:37 There is some examples with lispbuilder-sdl sources. One of them was about animation. 11:38:30 thanks 11:39:04 I try to load an iamge into a little rectangle in a window graphic 11:39:32 but it always load into a full window 11:41:30 alesguzik [~alesguzik@178.120.12.21] has joined #lisp 11:41:51 -!- alesguzik [~alesguzik@178.120.12.21] has quit [Client Quit] 11:42:05 Do you want it to be just resized? 11:45:02 minion: memo for spiderweb: it was a silly question because of 1) Turing Equivalence, 2) almost all _good_ programming languages have started as lisp programs, including ML, the ancestor of Haskell. 11:45:02 Remembered. I'll tell spiderweb when he/she/it next speaks. 11:50:00 yeah 11:50:24 I create a surface with height and width = 20 11:51:04 -!- kiuma [~kiuma@static-217-133-17-91.clienti.tiscali.it] has quit [Quit: Leaving] 11:51:09 but when i use sdl:draw-surface-at (sdl:load-image "src.bmp") :surface my-surface 11:51:33 it turn out that the hold window is draw 11:51:45 not a little 20x20 surface 11:52:15 Why not to resize image? 11:52:35 (resize source image) 11:52:50 francogrex [~user@109.134.231.227] has joined #lisp 11:53:36 is there any else solution 11:53:38 -!- rdd [~rdd@c83-250-125-14.bredband.comhem.se] has quit [Quit: Coyote finally caught me] 11:53:50 sbcl in the debian repository is 1.0.40 old 11:53:53 when the image is automatically resized to fit with surface ? 11:54:17 francogrex: so what? 11:54:31 it's good up to date 11:54:35 1.1.2 11:54:41 don't use debian then 11:54:44 ASau [~user@217.118.90.219] has joined #lisp 11:54:49 stable 11:54:52 debian is beautiful 11:55:22 stable, aha, so it's unstable there is a newer then? 11:55:37 and there is no resize function when i try in my slime 11:55:47 which library is that ? 11:56:32 quanganhct: I think there's a way to resize image, but I've never worked with images in SDL. =( 11:56:38 francogrex: you do know that debian has several repositories, don't you? 11:56:47 stable, testing, unstable and experimental 11:56:53 stable doesn't change 11:56:54 yes yes 11:57:27 for me it's no problem really I build my own 11:57:56 it's a general comment for newbies. 11:58:47 do people really use debian stable on the desktop? 11:58:51 quanganhct: Lol, SDL can't do this: http://www.cplusplus.com/forum/general/22157/. 11:59:09 stassats`: why not? I suppose so 11:59:32 because it's outdated even before it's released 11:59:45 what do you use? 11:59:51 debian unstable 12:00:24 I always use most unstable versions of everything just to test it. =| 12:00:25 the adj unstable has a negative connotation so all newbies will be tempted to use 'stable' 12:00:40 ok, debian sid 12:00:48 -!- Beetny [~Beetny@ppp118-208-130-54.lns20.bne1.internode.on.net] has quit [Ping timeout: 264 seconds] 12:01:17 -!- leo2007 [~leo@119.255.41.67] has quit [Ping timeout: 245 seconds] 12:01:17 as repository, yes I also used to use sid (on another PC) 12:01:46 hitecnologys: sometimes there's too much to test at once 12:02:32 stassats`: Sure, but it's fun. 12:02:46 as for lisp software, then i use the latest from VCS, because it's much easier and fun to debug lisp 12:03:03 leo2007 [~leo@119.255.41.67] has joined #lisp 12:03:04 say I build sbcl using the older version of sbcl, will I have to apt-get remove the old version afterwards? 12:03:12 or will it just replace it? 12:03:43 apt-get update? 12:03:45 it won't replace it 12:03:58 ok 12:03:58 it does not matter if you build and install it yourself with your wanted prefix 12:04:22 phadthai: it will be the default usr/local .. 12:04:45 that should not interfere with debian packages which usually use /usr/ 12:05:03 Install something by make && make install is quite dangerous and stupid, I think. 12:05:05 (although some use /) 12:05:25 hitecnologys: it depends, not when you know what you're doing 12:05:33 hitecnologys: in general, but not with something like sbcl 12:05:35 hitecnologys: no 12:05:50 since you know that you'll always have it installed anyways 12:06:11 Why not just to write ebuild for this? 12:06:18 why bother? 12:07:41 In order to let package manager do it's work. 12:07:52 why bother? 12:07:58 Why not? 12:08:12 because not doing something is easier than doing 12:08:14 Indecipherable [~Indeciphe@41.13.12.110] has joined #lisp 12:08:27 Except for breathing. 12:08:34 also, for things which you maintain or code on, it might be better to have a totally separate system which cannot interfere with any os-native system 12:08:46 -!- Bacteria [~Bacteria@115-64-180-132.static.tpgi.com.au] has quit [Quit: Bacteria] 12:09:25 But in future you may want to remove your sbcl and then you'll have to remove it manually because there's no make unisntall. But if you have build you could just remove it like any normal package. 12:09:36 so you an use both the os-friendly "stable" system and your experimental one 12:09:37 who would want to remove sbcl? 12:09:47 s/an use/can use/ 12:10:24 I don't know who. =( 12:10:29 to remove sbcl: rm -rf /usr/local/{lib,bin}/sbcl 12:10:37 hitecnologys: it's very easy to remove something you installed with a custom prefix as well, and RPATH (or LD_LIBRARY_PATH) make that very easy to manage 12:11:33 or /usr/local/sbcl-version/ which could include bin/sbin/lib/whatever 12:12:39 Anyway, I prefer ebuilds for everything. 12:13:15 -!- [SLB]` is now known as [SLB] 12:13:16 (I'm a gentoo user, BTW) 12:13:47 I understand as I'm a netbsd+pkgsrc user, but I still have some custom things in /usr/local/ 12:15:03 I have some in /usr too, but I try to deal with it. 12:16:08 -!- urandom__ [~user@p54B0EBE0.dip.t-dialin.net] has quit [Quit: Konversation terminated!] 12:17:35 anyway... 12:18:30 Joreji [~thomas@77-23-116-225-dynip.superkabel.de] has joined #lisp 12:21:10 rdd [~rdd@c83-250-125-14.bredband.comhem.se] has joined #lisp 12:21:25 -!- kushal [kdas@fedora/kushal] has quit [Quit: Leaving] 12:21:54 Say, is there any way to redirect a backtrace? 12:22:31 I'm fumbling something with ncurses, and whenever the application dies, the terminal locks up since it never reaches (endwin). 12:23:17 And setting *error-output* to error.txt only gives me style warnings. 12:23:20 Try to catch condition and call (endwin). 12:23:35 substitute: it's *debug-io* 12:23:58 Thanks, stassats. 12:24:16 And hitecnologys: I wrap the main loop in an unwind-protect, and I know that I at least get there. 12:24:50 And I call a function that calls (endwin) in the second form. Is there a difference between the two? 12:25:59 Nope. 12:26:36 Huh. And it still locks up. Weird. 12:26:49 Hm, strange. 12:26:59 Do you use cl-ncurses? 12:27:07 add^_ [~add^_@m83-190-161-220.cust.tele2.se] has joined #lisp 12:27:23 unwind-protect could be more general depending on your handler-case/handler-bind cases... another possibility could be to setup a custom debugger using *debugger-hook* 12:27:43 jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has joined #lisp 12:27:57 hitecnologys: cl-charms. 12:28:43 substitute: Oh, I've never worked with it. I prefer cl-ncurses for raw ncurses API. 12:28:49 That sounds very interesting. 12:28:52 Common Lisp has all sorts of neat global variables. 12:29:32 -!- werwerwer_ [~1@158.181.207.2] has quit [Ping timeout: 250 seconds] 12:29:32 which can be dynamically bound :) 12:29:54 hitecnologys: What's the difference? cl-charms purports to supersede cl-ncurses. Is something missing? 12:30:22 phadthai: That's really cool, too. Lets me redirect standard output very easily. 12:30:30 Among other things. 12:32:15 *francogrex* just finished installing sbcl 1.1.2; happy 12:33:14 substitute: Huh, I've thought it provides high-level functions. 12:33:18 -!- Indecipherable [~Indeciphe@41.13.12.110] has quit [Quit: used jmIrc] 12:33:20 *stassats`* is unhappy, sbcl can now handle callbacks from foreign threads, but qtwebkit still fails because of the JS garbage collector 12:35:24 hitecnologys: (with-open-file) 12:35:29 (let ((ext:*sbcl-version-string* "arbitrary-future-version-string")) ...unlimited-future-magic-here...) 12:36:07 lduros [~user@fsf/member/lduros] has joined #lisp 12:36:45 Now that you mention it: I wonder if you can make things print to a file automatically with that like you can with let. 12:36:49 I'll give it a shot. 12:37:28 (with-open-file (*debug-io* "/tmp/file" ...)) 12:38:05 -!- francogrex [~user@109.134.231.227] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 12:40:52 And it works. I redirected (print "Hello, world") with to test.txt 12:41:18 -!- sykopomp [~sykopomp@gateway/tor-sasl/sykopomp] has quit [Ping timeout: 276 seconds] 12:41:20 I should start using that from now on, especially since it unbinds the file if something dies. 12:42:03 sykopomp [~sykopomp@gateway/tor-sasl/sykopomp] has joined #lisp 12:42:25 clhs dribble 12:42:25 http://www.lispworks.com/reference/HyperSpec/Body/f_dribbl.htm 12:43:13 This certainly is educational. 12:43:24 Wow. 12:43:28 Wow. 12:43:42 Lemonodor fame is but a hack away! 12:43:47 it only redirects output and input, but you can set *debug-io* and *query-io* to standards 12:45:09 danlentz [~danlentz@2601:c:3680:1c:c596:6b17:a968:d3d0] has joined #lisp 12:46:08 but sbcl seems to be rebinding them for the debugger 12:46:27 -!- kofno [~kofno@cpe-24-165-213-150.neo.res.rr.com] has quit [Read error: Connection reset by peer] 12:46:52 kofno [~kofno@cpe-24-165-213-150.neo.res.rr.com] has joined #lisp 12:47:08 setmeaway [~setmeaway@118.45.149.179] has joined #lisp 12:48:12 Indecipherable [~Indeciphe@41.13.12.110] has joined #lisp 12:51:32 -!- jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has quit [Ping timeout: 255 seconds] 12:52:33 jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has joined #lisp 12:53:56 pavelpenev [~quassel@212.233.134.172] has joined #lisp 12:55:28 -!- danlentz [~danlentz@2601:c:3680:1c:c596:6b17:a968:d3d0] has quit [Quit: Dan Lentz ... Out.] 12:59:09 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 13:03:57 kiuma [~kiuma@2-230-138-74.ip202.fastwebnet.it] has joined #lisp 13:05:08 -!- nan_ [~user@178.233.216.230] has quit [Remote host closed the connection] 13:07:12 Us [~Us@vm1.lumi.net] has joined #lisp 13:08:36 -!- brguy [~idonteven@189-69-121-202.dsl.telesp.net.br] has quit [Ping timeout: 248 seconds] 13:09:30 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #lisp 13:09:34 -!- peterhil [~peterhil@91-157-48-10.elisa-laajakaista.fi] has quit [Ping timeout: 240 seconds] 13:13:22 -!- quanganhct [734bf49a@gateway/web/freenode/ip.115.75.244.154] has quit [Ping timeout: 245 seconds] 13:15:42 -!- dbushenko [~dim@ec2-54-242-175-166.compute-1.amazonaws.com] has quit [Read error: Connection reset by peer] 13:20:19 -!- leo2007 [~leo@119.255.41.67] has quit [Quit: rcirc on GNU Emacs 24.2.91.1] 13:20:46 -!- Kvaks [~kvaks@161.164.189.109.customer.cdi.no] has quit [Quit: Konversation terminated!] 13:21:50 Kvaks [~kvaks@161.164.189.109.customer.cdi.no] has joined #lisp 13:25:47 vale09 [~vale09@93-43-17-240.ip89.fastwebnet.it] has joined #lisp 13:25:54 list 13:28:25 -!- jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has quit [Ping timeout: 244 seconds] 13:28:44 -!- yacks [~yacks@180.151.36.171] has quit [Remote host closed the connection] 13:29:15 -!- nikodem [~mikey@user-109-243-150-170.play-internet.pl] has quit [Quit: leaving] 13:29:57 -!- vale09 [~vale09@93-43-17-240.ip89.fastwebnet.it] has left #lisp 13:31:33 huangjs [~huangjs@69.84.244.131] has joined #lisp 13:33:34 gffa [~unknown@unaffiliated/gffa] has joined #lisp 13:34:12 -!- substitute [~substitut@97-113-98-140.tukw.qwest.net] has quit [Ping timeout: 248 seconds] 13:35:59 gko [~user@114-34-168-13.HINET-IP.hinet.net] has joined #lisp 13:36:29 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 13:41:59 -!- kpal [~kpal@217-12-69-147.sibtele.com] has quit [Quit: Lost terminal] 13:42:46 -!- Joreji [~thomas@77-23-116-225-dynip.superkabel.de] has quit [Remote host closed the connection] 13:43:10 peterhil [~peterhil@gatekeeper.brainalliance.com] has joined #lisp 13:46:43 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #lisp 13:47:01 -!- am0c [~am0c@124.49.51.146] has quit [Ping timeout: 248 seconds] 13:53:31 -!- stat_vi [~stat@dslb-094-218-228-177.pools.arcor-ip.net] has quit [Quit: Lost terminal] 13:53:43 -!- kpreid [~kpreid@65.210.45.130] has quit [Quit: Quitting] 13:54:31 normanrichards [~normanric@70.114.215.220] has joined #lisp 13:56:21 stat_vi [~stat@dslb-094-218-228-177.pools.arcor-ip.net] has joined #lisp 13:59:40 substitute [~substitut@97-113-98-140.tukw.qwest.net] has joined #lisp 13:59:44 firmit [~firmit@123.122.33.239] has joined #lisp 14:07:12 LiamH [~none@pdp8.nrl.navy.mil] has joined #lisp 14:07:32 brguy [~idonteven@200.233.62.36] has joined #lisp 14:09:10 simpleirc [~simpleirc@117.136.0.197] has joined #lisp 14:10:44 -!- kofno [~kofno@cpe-24-165-213-150.neo.res.rr.com] has quit [Remote host closed the connection] 14:13:16 akovalenko [~akovalenk@95.73.220.136] has joined #lisp 14:14:12 -!- akovalenko [~akovalenk@95.73.220.136] has quit [Client Quit] 14:18:13 kofno [~kofno@cpe-24-165-213-150.neo.res.rr.com] has joined #lisp 14:19:33 -!- yrk [~user@pdpc/supporter/student/yrk] has quit [Ping timeout: 248 seconds] 14:20:21 deckeraa [~aaron@97-83-167-14.dhcp.stpt.wi.charter.com] has joined #lisp 14:20:28 jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has joined #lisp 14:20:46 akovalenko [~user@95.73.220.136] has joined #lisp 14:23:14 -!- akovalenko [~user@95.73.220.136] has quit [Client Quit] 14:23:28 -!- sdemarre [~serge@252.179-64-87.adsl-dyn.isp.belgacom.be] has quit [Ping timeout: 260 seconds] 14:29:51 NikolaiDante [~nikolaida@unaffiliated/knighterrant] has joined #lisp 14:29:58 -!- NikolaiDante [~nikolaida@unaffiliated/knighterrant] has left #lisp 14:32:43 -!- firmit [~firmit@123.122.33.239] has quit [Quit: ] 14:32:54 wbooze [~wbooze@xdsl-78-35-184-210.netcologne.de] has joined #lisp 14:36:28 jeti` [~user@p548E9B36.dip.t-dialin.net] has joined #lisp 14:37:01 fortitudeZDY [~fortitude@117.81.126.150] has joined #lisp 14:37:14 browndawg [~browndawg@117.201.180.228] has joined #lisp 14:39:48 -!- normanrichards [~normanric@70.114.215.220] has quit [] 14:41:24 -!- jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has quit [Ping timeout: 248 seconds] 14:42:15 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 14:42:41 -!- kilon [~user@unaffiliated/thekilon] has quit [Remote host closed the connection] 14:45:38 Ralt [~ralt@4cb54-1-213-44-242-236.dsl.sta.abo.bbox.fr] has joined #lisp 14:47:27 -!- browndawg [~browndawg@117.201.180.228] has quit [Quit: Leaving.] 14:52:33 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #lisp 14:57:10 adelgado [~TomSawyer@65.23.61.98.nw.nuvox.net] has joined #lisp 14:59:40 Is there a format directive to not use up the argument? I need the same argument four times in a row in one format call. 15:00:19 you can back up 15:00:20 ~:* 15:00:48 jewel [~jewel@105-236-138-67.access.mtnbusiness.co.za] has joined #lisp 15:01:11 stassats`: OK, thanks 15:01:23 (format t "~d ~:* ~x ~:* ~b ~:* ~o" 20) 15:03:45 yup, does just what I want 15:04:16 jrajav [~jrajav@167.68.114.6] has joined #lisp 15:04:38 some operators have auto back up 15:04:57 ~:p == ~:*~p 15:05:13 yeah, but not ~d 15:05:54 and ~:[~;~:*~a~] == ~@[~a~] 15:06:04 Timao [Timao@cpc2-nrte24-2-0-cust61.8-4.cable.virginmedia.com] has joined #lisp 15:07:16 -!- simpleirc [~simpleirc@117.136.0.197] has quit [Remote host closed the connection] 15:07:16 eni [~eni@gob75-5-82-230-88-217.fbx.proxad.net] has joined #lisp 15:09:40 -!- ASau [~user@217.118.90.219] has quit [Ping timeout: 248 seconds] 15:16:55 francogrex [~user@109.134.231.227] has joined #lisp 15:17:14 learning tricks, good ones to implement in lisp: http://francogrex.site50.net 15:17:19 leo2007 [~leo@182.48.109.8] has joined #lisp 15:17:42 what is that? 15:18:29 Guest20115 [~chatzilla@189-90-105-146.life.com.br] has joined #lisp 15:18:34 plan to build a basic RDBMS in cl 15:18:48 -!- flip214_ [~marek@86.59.100.100] has quit [Ping timeout: 264 seconds] 15:18:55 at least the efficiency in I/O 15:22:35 kushal [~kdas@fedora/kushal] has joined #lisp 15:22:45 -!- Guest20115 [~chatzilla@189-90-105-146.life.com.br] has quit [Quit: ChatZilla 0.9.89 [Firefox 17.0.1/20121128204232]] 15:23:32 ykt [~chatzilla@189-90-105-146.life.com.br] has joined #lisp 15:24:03 -!- Timao [Timao@cpc2-nrte24-2-0-cust61.8-4.cable.virginmedia.com] has quit [] 15:24:17 flip214 [~marek@86.59.100.100] has joined #lisp 15:24:17 -!- flip214 [~marek@86.59.100.100] has quit [Changing host] 15:24:17 flip214 [~marek@unaffiliated/flip214] has joined #lisp 15:27:36 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 15:29:20 yacks [~yacks@180.151.36.171] has joined #lisp 15:32:30 can I have an initform that sets other slots? I would like to have an alist parameter of (slot . value) and use that in the make-instance call directly? 15:33:00 maybe I should just make-instance without those slots then have a method to set each option one at a time? 15:33:27 i don't understand, you want to use an alist instead of a plist? 15:33:51 alexandria:alist-plist 15:34:03 (make-instance 'foo this that '((opt1 val1) (opt2 val2))) 15:34:12 mmm. 15:34:29 you say (make-instance 'foo this that opt1 val1 opt2 val2) 15:34:48 (apply #'make-instance 'foo this that plist) 15:34:49 make it (make-instance 'foo :this that :opt1 val1 :opt2 val2) 15:35:12 so the plist keys should match the :initarg of the defclass, right? 15:35:19 but i don't understand what "an initform that sets other slots" mean? 15:35:31 I think what you're saying is exactly what I want :) 15:35:40 tensorpudding [~tensorpud@99.148.198.110] has joined #lisp 15:35:55 my current parser is building an alist, no reason it couldn't build a plist instead 15:37:48 sdemarre [~serge@252.179-64-87.adsl-dyn.isp.belgacom.be] has joined #lisp 15:37:50 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #lisp 15:37:50 if the object is already allocated, (apply #'reinitialize-instance object plist) 15:38:16 well it's not yet 15:38:25 -!- Indecipherable [~Indeciphe@41.13.12.110] has left #lisp 15:38:50 the parse I've built is using cl-yacc, and the production rules are currently building lists 15:39:04 I'm switching to defclass to have a usable data structure 15:39:30 dim: for structures you can define the lambda list of the constructor 15:39:51 for classes there's a method you could define, too. 15:40:11 well I'd better just use the apply #'make-instance idiom I think 15:42:36 -!- ykt [~chatzilla@189-90-105-146.life.com.br] has quit [Quit: ChatZilla 0.9.89 [Firefox 17.0.1/20121128204232]] 15:45:38 -!- francogrex [~user@109.134.231.227] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 15:49:06 browndawg [~browndawg@117.201.180.228] has joined #lisp 15:49:08 -!- theos [~theos@unaffiliated/theos] has quit [Ping timeout: 248 seconds] 15:49:41 Joreji [~thomas@77-23-116-225-dynip.superkabel.de] has joined #lisp 15:52:52 -!- brguy [~idonteven@200.233.62.36] has quit [Ping timeout: 248 seconds] 16:01:22 _d3f [~freedo@46.183.216.234] has joined #lisp 16:02:17 -!- cfy [~ilisp@unaffiliated/chenfengyuan] has quit [Remote host closed the connection] 16:02:17 theos [~theos@unaffiliated/theos] has joined #lisp 16:03:07 -!- Kvaks [~kvaks@161.164.189.109.customer.cdi.no] has quit [Read error: Connection reset by peer] 16:03:13 Kvaks_ [~kvaks@161.164.189.109.customer.cdi.no] has joined #lisp 16:04:05 sohakes [~sohakes@186.207.98.81] has joined #lisp 16:08:25 -!- RocksHound [~rtc@96-38-238-134.static.gwnt.ga.charter.com] has quit [] 16:08:53 -!- fortitudeZDY [~fortitude@117.81.126.150] has quit [Quit: leaving] 16:11:15 -!- tcr [~tcr@88-134-109-42-dynip.superkabel.de] has quit [Quit: Leaving.] 16:12:48 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 16:13:14 how can I apply parse-integer to arguments before they get into slots when doing make-instance? 16:13:36 (make-instance 'foo :integer-slot "1") ; have that call parse-integer 16:13:59 better parse it ahead of time 16:14:20 it's possible to do that, but then, what will happen if you do (setf (integer-slot foo) "1")? 16:14:28 that's possible too, but that's getting into MOP territory 16:14:41 pnq [~nick@unaffiliated/pnq] has joined #lisp 16:14:59 mm, so the setf would bypass both any writer and accessor? 16:15:36 brguy [~idonteven@200.233.62.36] has joined #lisp 16:16:58 I'm pondering how to implement creature AI now in my roguelike. How does this sound: 16:17:00 i rather meant (setf (slot-value foo 'integer-slot) "1") 16:18:04 Give each creature an ai slot which holds a function, defmethod act to funcall that ai on the creature, give each ai function a closure for random state variables. 16:20:45 leoncamel [~leoncamel@124.126.169.226] has joined #lisp 16:21:07 stassats`: ok now that would bypass the accessor I guess 16:21:15 it would 16:21:19 ASau [~user@217.118.90.158] has joined #lisp 16:21:30 any point in using both :initform and :default-initargs? 16:21:36 Does anything special make that sound unfeasable, especially concerning backtraces? 16:21:51 in the same defclass form? no 16:21:54 antonv [5d7d31f9@gateway/web/freenode/ip.93.125.49.249] has joined #lisp 16:21:59 I've seen an article where the author has a strong preference towards :default-initargs, your opinion? 16:22:54 the only benefit is that it will supply things into initialize-instance 16:23:05 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #lisp 16:23:12 and the drawback being you can't query it with MOP as easy as initforms 16:23:27 well over my head for now, ok 16:24:11 well, all the keyword arguments you pass into make-instance go to initialize-instance 16:24:30 kliph [~user@unaffiliated/kliph] has joined #lisp 16:24:42 seen that in the docs, I mean that I can't figure out yet when I would specialize initialize-instance 16:24:49 or prefer to resort to MOP 16:24:52 if you don't supply it, it won't be passed, but with default-initargs, it will be passed to initialize-instance, even if it's not passed to make-instance 16:25:22 when you want to do something before before or after an instance is initialized 16:26:40 sounds useful indeed 16:27:32 -!- sdemarre [~serge@252.179-64-87.adsl-dyn.isp.belgacom.be] has quit [Ping timeout: 248 seconds] 16:27:36 all I would have to do is (defmethod initialize-instance :after ((x foo)) ...), say 16:28:20 and there's reinitialize-instance, for when the class is redefined 16:28:48 Bike [~Glossina@67-5-226-214.ptld.qwest.net] has joined #lisp 16:30:11 Jubb [~ghost@24-151-37-211.dhcp.nwtn.ct.charter.com] has joined #lisp 16:30:13 and you could define methods on MAKE-INSTANCE directly, but that will overlook default-initargs 16:30:23 -!- ramkrsna [ramkrsna@unaffiliated/ramkrsna] has quit [Quit: Leaving] 16:30:53 and i have no idea why it's forbidden to define methods on shared-initialize 16:31:08 francisl [~anonymous@bas6-montreal45-1176493761.dsl.bell.ca] has joined #lisp 16:31:54 sabra [~wol@67.174.222.215] has joined #lisp 16:32:07 ah, no, i read MOP wrong 16:32:18 it's forbidden for classes only 16:32:48 -!- sabra [~wol@67.174.222.215] has quit [Client Quit] 16:33:22 can I have a slot with :type bar where I have done (defclass bar () ...) before? 16:33:43 :type doesn't do much 16:34:00 (usually) 16:34:01 and then, I would like (make-instance 'foo :bar '(a b c d)) to (make-instance 'bar a b c d) for me 16:34:25 ah. so again, better make the bar instance myself then pass that to foo creation? 16:34:27 just like that, no 16:34:40 (or do same using setf on the slot-value, etc) 16:34:41 ok 16:34:44 you can do such things with MOP 16:35:14 well I'm not trying as much to push the limits as to understand how CLOS works 16:35:37 well, you can do that without MOP, just you can't query which type a slot has 16:36:02 I would use a :writer or an :accessor in that case, right? 16:36:52 make-instance doesn't call them anyhow, you would need to process it in initialize-instance 16:37:26 ok I get it, better prepare the slot value before hand then 16:37:43 it is, or you'll end up with a javascript 16:38:08 where things turn into other things when you least suspect it 16:38:09 -!- huangjs [~huangjs@69.84.244.131] has quit [Quit: This computer has gone to sleep] 16:38:55 that's also true of PHP, last I heard 16:39:05 (implicit casting in all places) 16:41:19 normanrichards [~normanric@72-48-145-180.static.grandenetworks.net] has joined #lisp 16:41:29 tcr [~tcr@88-134-109-42-dynip.superkabel.de] has joined #lisp 16:43:00 foreignFunction [~niksaak@94.27.89.145] has joined #lisp 16:45:19 pnpuff [~Eternit9a@unaffiliated/pnpuff] has joined #lisp 16:46:22 dim: yep, ("1" + "2") => int(3) 16:46:35 nooo: even MapReduce in CubeSat... :( 16:46:52 huangjs [~huangjs@69.84.244.131] has joined #lisp 16:47:08 -!- qptain_Nemo [~qN@89.207.216.208] has quit [Remote host closed the connection] 16:47:14 igorw: well, js is weirder "1" + "2" => "12", "1" - "2" = -1 16:47:43 ...missed opportunities. 16:48:13 can I dynamically list the subclasses of a known class? 16:48:22 yes, MOP 16:48:41 -!- tcr [~tcr@88-134-109-42-dynip.superkabel.de] has quit [Ping timeout: 255 seconds] 16:48:46 class-direct-sublcasses 16:49:18 zophy [~sy@24.111.9.10] has joined #lisp 16:49:22 how do I install a mop in say CCL? 16:49:44 you don't, it's there, but use closer-mop to make it look the same as on all other implementations 16:50:14 so, class-direct-subclasses is ccl:class-direct-subclasses 16:50:30 sb-mop:class-direct-subclasses on sbcl, etc. 16:50:35 -!- substitute [~substitut@97-113-98-140.tukw.qwest.net] has quit [Ping timeout: 255 seconds] 16:50:38 get it, cool 16:50:40 closer-mop makes it c2mop:class-direct-subclasses everywhere 16:51:25 now I need to get a "class instance" to give it as a param it seems 16:51:40 (find-class 'name-of-your-class) 16:52:27 awesome. 16:55:22 dim: http://www.alu.org/mop/concepts.html 16:55:46 pnpuff: thanks, will read 16:59:24 -!- huangjs [~huangjs@69.84.244.131] has quit [Quit: This computer has gone to sleep] 17:01:27 -!- brguy [~idonteven@200.233.62.36] has quit [Read error: Connection reset by peer] 17:04:03 pnpu11 [~Eternit9a@unaffiliated/pnpuff] has joined #lisp 17:04:24 -!- pnpuff [~Eternit9a@unaffiliated/pnpuff] has quit [Ping timeout: 264 seconds] 17:09:44 huangjs [~huangjs@69.84.244.131] has joined #lisp 17:10:31 Artheist_ [~quassel@195.68.4.98] has joined #lisp 17:11:13 -!- pnpu11 [~Eternit9a@unaffiliated/pnpuff] has left #lisp 17:12:13 -!- leoncamel [~leoncamel@124.126.169.226] has quit [Ping timeout: 252 seconds] 17:15:38 substitute [~substitut@97-113-98-140.tukw.qwest.net] has joined #lisp 17:16:28 -!- mvilleneuve [~mvilleneu@LLagny-156-36-4-214.w80-14.abo.wanadoo.fr] has quit [Quit: Leaving] 17:18:47 bonch [~bonch@174.137.69.7] has joined #lisp 17:19:50 -!- bonch [~bonch@174.137.69.7] has left #lisp 17:20:29 brguy [~idonteven@200.233.62.36] has joined #lisp 17:23:26 -!- vityok [~user@193.109.118.129] has quit [Remote host closed the connection] 17:27:00 -!- huangjs [~huangjs@69.84.244.131] has quit [Quit: This computer has gone to sleep] 17:27:15 -!- brguy [~idonteven@200.233.62.36] has quit [Ping timeout: 252 seconds] 17:28:50 nikodem [~nikodem@user-164-127-51-212.play-internet.pl] has joined #lisp 17:29:26 dim: just define an initialize-instance method for your class and do whatever you want there! 17:29:39 spiderweb [~user@unaffiliated/lcc] has joined #lisp 17:30:03 jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has joined #lisp 17:31:20 huangjs [~huangjs@69.84.244.131] has joined #lisp 17:37:58 -!- Joreji [~thomas@77-23-116-225-dynip.superkabel.de] has quit [Ping timeout: 244 seconds] 17:40:37 Indecipherable [~Indeciphe@41.13.12.110] has joined #lisp 17:43:20 -!- adelgado [~TomSawyer@65.23.61.98.nw.nuvox.net] has quit [Remote host closed the connection] 17:44:07 adelgado [~TomSawyer@65.23.61.98.nw.nuvox.net] has joined #lisp 17:45:54 -!- jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has quit [Ping timeout: 265 seconds] 17:46:12 tcr [~tcr@88-134-109-42-dynip.superkabel.de] has joined #lisp 17:46:44 jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has joined #lisp 17:49:14 tortole [~user@c-67-182-147-102.hsd1.wa.comcast.net] has joined #lisp 17:50:44 -!- tcr [~tcr@88-134-109-42-dynip.superkabel.de] has quit [Ping timeout: 265 seconds] 17:51:28 *tortole* +O 17:51:32 -!- tortole [~user@c-67-182-147-102.hsd1.wa.comcast.net] has left #lisp 17:52:21 liegefully [~liegefull@c-67-182-147-102.hsd1.wa.comcast.net] has joined #lisp 17:54:23 -!- jrajav [~jrajav@167.68.114.6] has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE] 17:54:33 tortole [~user@c-67-182-147-102.hsd1.wa.comcast.net] has joined #lisp 17:54:47 xcombelle [~xcombelle@AToulouse-551-1-141-183.w86-201.abo.wanadoo.fr] has joined #lisp 17:56:06 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 17:56:36 -!- normanrichards [~normanric@72-48-145-180.static.grandenetworks.net] has quit [Ping timeout: 264 seconds] 17:56:55 -!- jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has quit [Ping timeout: 265 seconds] 17:58:04 -!- liegefully [~liegefull@c-67-182-147-102.hsd1.wa.comcast.net] has quit [Remote host closed the connection] 17:59:37 normanrichards [~normanric@72-48-145-180.static.grandenetworks.net] has joined #lisp 18:02:20 jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has joined #lisp 18:04:40 -!- Ralt [~ralt@4cb54-1-213-44-242-236.dsl.sta.abo.bbox.fr] has quit [Remote host closed the connection] 18:06:21 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #lisp 18:06:21 rob7n8h [~rob7n8h@c-67-182-147-102.hsd1.wa.comcast.net] has joined #lisp 18:08:21 -!- browndawg [~browndawg@117.201.180.228] has quit [Quit: Leaving.] 18:11:57 -!- Indecipherable [~Indeciphe@41.13.12.110] has quit [Quit: used jmIrc] 18:13:27 -!- jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has quit [Ping timeout: 265 seconds] 18:13:57 jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has joined #lisp 18:15:16 -!- dented42 [~dented42@opengroove.org] has quit [Ping timeout: 248 seconds] 18:16:35 -!- normanrichards [~normanric@72-48-145-180.static.grandenetworks.net] has quit [] 18:17:36 -!- rking [~rking@unaffiliated/rking] has quit [Quit: Upgrading weechat] 18:17:53 rking [~rking@unaffiliated/rking] has joined #lisp 18:20:24 dented42 [~dented42@opengroove.org] has joined #lisp 18:21:41 -!- jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has quit [Ping timeout: 245 seconds] 18:22:25 -!- huangjs [~huangjs@69.84.244.131] has quit [Quit: This computer has gone to sleep] 18:22:26 jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has joined #lisp 18:23:05 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 18:23:35 -!- cdidd [~cdidd@95-24-199-172.broadband.corbina.ru] has quit [Ping timeout: 250 seconds] 18:24:50 -!- eni [~eni@gob75-5-82-230-88-217.fbx.proxad.net] has quit [Quit: Leaving] 18:25:31 ncw [~ncw@host86-184-78-43.range86-184.btcentralplus.com] has joined #lisp 18:28:07 AeroNotix [~xeno@aafu74.neoplus.adsl.tpnet.pl] has joined #lisp 18:28:44 -!- francisl [~anonymous@bas6-montreal45-1176493761.dsl.bell.ca] has quit [Quit: francisl] 18:29:49 dbushenko [~dim@178.121.152.131] has joined #lisp 18:30:12 -!- jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has quit [Ping timeout: 248 seconds] 18:30:57 jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has joined #lisp 18:31:20 brguy [~idonteven@189-69-121-202.dsl.telesp.net.br] has joined #lisp 18:33:22 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #lisp 18:34:09 -!- pnq [~nick@unaffiliated/pnq] has quit [Quit: Leaving.] 18:38:21 danlentz [~danlentz@2601:c:3680:1c:c596:6b17:a968:d3d0] has joined #lisp 18:38:28 jrajav [~jrajav@167.68.114.6] has joined #lisp 18:38:50 dtw [~dtw@pdpc/supporter/active/dtw] has joined #lisp 18:43:41 -!- jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has quit [Ping timeout: 252 seconds] 18:43:46 Indecipherable [~Indeciphe@41.13.12.110] has joined #lisp 18:44:36 jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has joined #lisp 18:46:39 tcr [~tcr@88-134-109-42-dynip.superkabel.de] has joined #lisp 18:47:46 -!- Indecipherable [~Indeciphe@41.13.12.110] has quit [Client Quit] 18:48:59 -!- danlentz [~danlentz@2601:c:3680:1c:c596:6b17:a968:d3d0] has quit [Quit: Dan Lentz ... Out.] 18:49:28 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 18:51:00 -!- jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has quit [Ping timeout: 248 seconds] 18:51:15 -!- tcr [~tcr@88-134-109-42-dynip.superkabel.de] has quit [Ping timeout: 260 seconds] 18:52:07 jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has joined #lisp 18:53:19 arrk13 [~arrakis24@93.142.184.33] has joined #lisp 18:54:59 -!- Artheist_ [~quassel@195.68.4.98] has quit [Remote host closed the connection] 18:56:35 Drak0n41K [~Drak0n41K@46.233.206.207] has joined #lisp 18:57:12 -!- Dragonling [~Drak0n41K@94.137.39.153] has quit [Ping timeout: 264 seconds] 18:59:32 -!- jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has quit [Ping timeout: 248 seconds] 18:59:36 -!- zophy [~sy@24.111.9.10] has quit [Remote host closed the connection] 18:59:43 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #lisp 19:00:36 jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has joined #lisp 19:03:32 Slivka [~Slivka@81.4.242.0] has joined #lisp 19:04:19 how do i convert a list of conses with known cars to a structure? 19:04:55 step by step 19:05:18 if your representation was a plist instead (with the keys being the appropriate keywords) you could just apply the structure constructor 19:05:50 -!- dbushenko [~dim@178.121.152.131] has left #lisp 19:06:36 -!- kofno [~kofno@cpe-24-165-213-150.neo.res.rr.com] has quit [Read error: Connection reset by peer] 19:06:45 does chillax accept a plist instead? not sure 19:07:12 puchacz [~puchacz@46-65-36-47.zone16.bethere.co.uk] has joined #lisp 19:08:11 -!- nikodem [~nikodem@user-164-127-51-212.play-internet.pl] has quit [] 19:08:18 -!- iLogical [~iLogical@unaffiliated/ilogical] has quit [Quit: Leaving] 19:08:44 iLogical [~iLogical@unaffiliated/ilogical] has joined #lisp 19:09:56 kofno [~kofno@cpe-24-165-213-150.neo.res.rr.com] has joined #lisp 19:12:50 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 19:13:23 -!- kiuma [~kiuma@2-230-138-74.ip202.fastwebnet.it] has quit [Ping timeout: 252 seconds] 19:19:28 -!- yacks [~yacks@180.151.36.171] has quit [Ping timeout: 250 seconds] 19:20:39 francogrex [~user@109.134.231.227] has joined #lisp 19:23:04 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #lisp 19:23:58 -!- sohakes [~sohakes@186.207.98.81] has quit [Quit: Leaving] 19:25:53 -!- AeroNotix [~xeno@aafu74.neoplus.adsl.tpnet.pl] has quit [Quit: Uploading hax.....] 19:45:30 -!- dtw [~dtw@pdpc/supporter/active/dtw] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 19:46:07 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 19:46:57 tcr [~tcr@88-134-109-42-dynip.superkabel.de] has joined #lisp 19:50:03 -!- rtoym [~chatzilla@24.130.4.105] has quit [Ping timeout: 260 seconds] 19:51:28 -!- hitecnologys [~hitecnolo@46.233.213.111] has quit [Quit: hitecnologys] 19:51:48 -!- tcr [~tcr@88-134-109-42-dynip.superkabel.de] has quit [Ping timeout: 264 seconds] 19:55:54 am0c [~am0c@124.49.51.146] has joined #lisp 19:56:20 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #lisp 19:58:28 -!- wbooze [~wbooze@xdsl-78-35-184-210.netcologne.de] has quit [Quit: none] 20:02:18 schaueho [~schaueho@dslb-088-066-044-228.pools.arcor-ip.net] has joined #lisp 20:02:56 axion: or a BOA constructor. 20:03:14 Beetny [~Beetny@ppp118-208-71-221.lns20.bne4.internode.on.net] has joined #lisp 20:03:48 -!- kushal [~kdas@fedora/kushal] has quit [Ping timeout: 264 seconds] 20:04:13 (defstruct (point (:constructor point (x y)) (:constructor make-point)) x y) (values (apply (function make-point) (list :x 1 :y 2)) (apply (function point) (list 1 2))) --> #S(point :x 1 :y 2) #S(point :x 1 :y 2) 20:05:25 toekutr [~user@50-0-51-11.dsl.static.sonic.net] has joined #lisp 20:07:35 i'm trying to generate `((x . 1)(y . 2)) from a structure with the same slot names 20:08:31 kofno_ [~kofno@cpe-24-165-213-150.neo.res.rr.com] has joined #lisp 20:09:46 -!- kofno [~kofno@cpe-24-165-213-150.neo.res.rr.com] has quit [Read error: Connection reset by peer] 20:10:19 -!- schaueho [~schaueho@dslb-088-066-044-228.pools.arcor-ip.net] has quit [Ping timeout: 265 seconds] 20:12:34 (loop with p = #S(point :x 1 :y 2) for (key reader) in '((x point-x) (y point-y)) collect (cons key (funcall reader p))) --> ((x . 1) (y . 2)) 20:13:27 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 20:14:10 zyg [55e38e49@gateway/web/freenode/ip.85.227.142.73] has joined #lisp 20:15:52 prxq [~mommer@mnhm-5f75f7c7.pool.mediaWays.net] has joined #lisp 20:15:54 -!- mishoo [~mishoo@178.138.99.110] has quit [Read error: Connection reset by peer] 20:16:16 -!- pirateking-_- [~piratekin@unaffiliated/pirateking---/x-2885143] has quit [Quit: pirateking-_-] 20:16:22 -!- xcombelle [~xcombelle@AToulouse-551-1-141-183.w86-201.abo.wanadoo.fr] has quit [Remote host closed the connection] 20:16:27 Why isn't an uninterned interned symbol-name EQ to the gensym with the same symbol-name? 20:16:43 because it's a different object 20:16:49 zyg: strings are not very often EQ 20:17:22 ah, also, uninterned symbols with the same name are different objects, right 20:17:36 -!- jewel [~jewel@105-236-138-67.access.mtnbusiness.co.za] has quit [Ping timeout: 264 seconds] 20:17:43 -!- pjb [~user@cust-seco21th2-46-193-64-247.wb.wifirst.net] has quit [Quit: need to reboot for a new kernel. Why do they issue new kernels every week???] 20:17:56 Why are they different objects? They look and feel the same, but if given to a hash-table they wont match. 20:18:17 because they are located at different addresses in memory 20:18:57 zyg: different kinds of identity 20:19:32 I'll try to show an example where EQ gives nil. 20:19:43 every object returned from a call gensym is guaranteed to be a fresh (newly-allocated) symbol 20:20:05 so every time you call gensym, you get an object that isn't EQ to the one you got before it, even if the names are the same 20:20:40 (see the glossary for "fresh": http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_f.htm#fresh) 20:21:48 AeroNotix [~xeno@aafu74.neoplus.adsl.tpnet.pl] has joined #lisp 20:22:22 (let ((s (gensym)) z) (setf z (intern (string s))) (unintern z) (list (eq s z) s z)) => (NIL #:G1 #:G1) I was expecting (T ...) 20:22:40 mishoo [~mishoo@178.138.99.110] has joined #lisp 20:22:59 on what basis? 20:23:25 wbooze [~wbooze@xdsl-78-35-184-210.netcologne.de] has joined #lisp 20:23:43 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #lisp 20:23:57 wow 20:24:20 so on the one hand, you have an uninterned symbol with symbol-name "G1" and on the other, you have an interned symbol with the symbol-name "#:G1" 20:24:39 oh wait, no wrong 20:24:57 just two different unintended symbols 20:25:05 both are uninterned, both have the same name. but since they're different symbols, they're not EQ 20:25:16 (let ((string "foo")) (eq (make-symbol string) (make-symbol string))) will always be NIL 20:25:40 even though (let ((string "foo")) (eq (string (make-symbol string)) (string (make-symbol string)))) is T 20:26:01 as said above, gensym will create a fresh object, and intern will make a fresh one (if none was interned before), too. 20:26:13 -!- faust45 [~faust45@89.22.254.177] has quit [Quit: faust45] 20:28:24 -!- peterhil [~peterhil@gatekeeper.brainalliance.com] has quit [Ping timeout: 260 seconds] 20:29:14 zyg: http://paste.lisp.org/display/134315 20:30:12 Ok, so like prxq said, they have different identity, but still the same name. Is this only possible because they doesn't belong to any package? 20:30:36 no 20:30:38 zyg: no. (eq (make-symbol "foo") (make-symbol "foo")) => nil 20:31:01 two symbols with the same name can belong to packages, different packages, and they won't be eq 20:32:27 (eq (make-string 1) (make-string 1)) is also NIL 20:32:32 -!- bitonic [~user@ppp-109-10.24-151.libero.it] has quit [Read error: Connection reset by peer] 20:32:58 (make-string 1 :initial-element #\a) would illustrate better 20:33:09 both are "a" and "a", but are not the same object 20:33:16 Forty-3 [~seana11@host125-069.tiffinsen.lib.oh.us] has joined #lisp 20:33:45 stassats`: That I understand perfectly because I think of two different memory location holding that string object. 20:33:46 fisxoj [~fisxoj@c-24-12-190-29.hsd1.il.comcast.net] has joined #lisp 20:33:47 -!- substitute [~substitut@97-113-98-140.tukw.qwest.net] has quit [Ping timeout: 245 seconds] 20:33:50 bitonic [~user@ppp-109-10.24-151.libero.it] has joined #lisp 20:34:08 so, what makes symbols harder to understand? 20:34:58 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 20:35:48 faust45 [~faust45@89.22.254.177] has joined #lisp 20:36:55 (let ((string "foo")) (list (print-unreadable-object ((make-symbol string) *standard-output* :identity t)) (print-unreadable-object ((make-symbol string) *standard-output* :identity t)))) 20:37:46 -!- Ober [jaimef@dns.mauthesis.com] has quit [Excess Flood] 20:38:43 Ok, so they are two distinct objects. I understand that EQ doesn't like that. 20:39:01 it likes it very much 20:39:06 it likes that, it's indifferent 20:39:10 jaimef [jaimef@dns.mauthesis.com] has joined #lisp 20:42:46 -!- jaimef [jaimef@dns.mauthesis.com] has quit [Excess Flood] 20:43:40 jaimef [jaimef@dns.mauthesis.com] has joined #lisp 20:44:01 -!- jaimef [jaimef@dns.mauthesis.com] has quit [Remote host closed the connection] 20:45:13 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #lisp 20:45:58 ober [~user@96.24.70.135] has joined #lisp 20:46:16 -!- Slivka [~Slivka@81.4.242.0] has quit [Remote host closed the connection] 20:47:24 tcr [~tcr@88-134-109-42-dynip.superkabel.de] has joined #lisp 20:47:33 pjb [~user@cust-seco21th2-46-193-64-247.wb.wifirst.net] has joined #lisp 20:47:46 Is gensym/make-symbol a unique property that it always stays "fresh"/unique identity" .. I'm not sure why this is T: (let ((s1 (intern "A")) (s2 (intern "A")) z1 z2) (unintern s1) (unintern s2) (eq s1 s2)) 20:48:11 because it's the same symbol 20:48:40 the second intern finds the symbol interned by the first one 20:48:46 unintern doesn't have anything do to with it 20:49:36 stassats`: doesn't it revert what intern does, ie brought the symbol through the reader. Which must see the object the as the same thing. 20:49:56 the reader is nowhere involved here 20:49:59 it takes the symbol out of the package, but it's still the same symbol 20:50:02 zyg: why don't you just try to implement intern yourself? 20:50:06 intern pushes a symbol int a packages, unintern pops it 20:50:08 that is all 20:50:19 or if you are lazy, just read the sources of intern in your implementation? 20:50:20 "intern enters a symbol named string into package. If a symbol whose name is the same as string is already accessible in package, it is returned." 20:50:26 so, s1 and s2 are eq after the intern calls. 20:51:38 or if you are super lazy, just read the sources of intern in an implementation agnostic package such as https://gitorious.org/com-informatimago/com-informatimago/blobs/master/common-lisp/lisp-reader/package-fun.lisp#line1489 20:51:41 -!- tcr [~tcr@88-134-109-42-dynip.superkabel.de] has quit [Ping timeout: 255 seconds] 20:52:28 -!- ncw [~ncw@host86-184-78-43.range86-184.btcentralplus.com] has quit [Remote host closed the connection] 20:53:35 chameco [~samuel@54.sub-70-192-4.myvzw.com] has joined #lisp 20:53:43 since you understand strings, let's do a string analogy: http://paste.lisp.org/display/134315#1 20:53:51 zyg: for you 20:54:23 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 20:54:32 -!- ober [~user@96.24.70.135] has quit [Read error: Connection reset by peer] 20:56:49 stassats`: Oh I see, they are two different objects. Remhash is just kicking them out of the hash. Which doesn't affect them anyway. So EQ sees them, as different. 20:56:50 -!- faust45 [~faust45@89.22.254.177] has quit [Quit: faust45] 20:57:07 as different? 20:57:09 did you run the code 20:57:12 did you actually run it 20:57:27 *stassats`* sense a question mark deficit 20:57:58 I read it. Doesn't EQ treat two string different if made by a MAKE- constructor? 20:58:16 i'm comparing s1 and s2, not string1 and string2 20:58:40 narmi [~sabayonus@91.140.187.231] has joined #lisp 20:58:51 and s2 is just retrieved from the hash. 20:58:53 not that this is an equal hashtable 20:59:04 so (equal (make-string 10 :initial-element #\a) (make-string 10 :initial-element #\a)) => T 20:59:11 -!- jrajav [~jrajav@167.68.114.6] has quit [Quit: I tend to be neutral about apples] 21:00:34 I'm get a compile error with https://github.com/lvaruzza/cl-randist for sbcl - see http://paste.lisp.org/display/134316 21:00:37 it works with ccl 21:00:38 can I haz the class name from a class instance with closer-mop? 21:00:43 any idea what is wrong? 21:00:50 clhs clas-name 21:00:50 Sorry, I couldn't find anything for clas-name. 21:00:50 dim: class-name 21:00:53 clhs class-name 21:00:54 http://www.lispworks.com/reference/HyperSpec/Body/f_class_.htm 21:00:54 dim: (class-name (class-of object)) 21:00:57 no mop 21:00:57 don't even need no stinkin' mop 21:01:06 i just cloned it 21:01:14 oh 21:01:18 it's just not in closer-map 21:01:38 (mapcar 'class-name (closer-mop:class-direct-subclasses (find-class 'source-format))) 21:01:41 faheem: there's no error 21:01:43 that's pretty awesome 21:01:48 faheem: in the paste 21:01:52 faheem: have you read what you pasted? That's ASDF telling you something happened earlier. You'll have to scroll up to find the actual error/warning. 21:02:31 well, that doesn't change the fact that asdf is bogus for not telling the actual error 21:02:40 pkhuong: i posted everything in the buffer that popped up 21:02:43 how many hours of human life did that waste? 21:02:56 faheem: you need the compilation buffer 21:02:57 stassats`: +1 21:03:02 -!- biscarch [~chris@108-83-17-79.lightspeed.sntcca.sbcglobal.net] has quit [Ping timeout: 255 seconds] 21:03:13 now, of course, i should cease to complain and write a patch 21:03:21 faheem: these declarations "(declare ((simple-array double-float (128)) *ytab*))" are bogus. 21:03:24 stassats`: ok, one sec 21:03:46 pkhuong: er, what declarations? 21:04:17 mm. wait, never mind. 21:04:25 TYPE can be omitted 21:04:34 even not everyone believes that 21:04:37 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #lisp 21:04:37 even though 21:05:57 -!- narmi [~sabayonus@91.140.187.231] has quit [Quit: Konversation terminated!] 21:06:03 I'll send patches to tony for that file. It makes my pressure go up. 21:06:15 most probably sticking (setf asdf:*compile-file-failure-behaviour* :warn) into your rc file 21:06:31 because it's unfathomably :error on SBCL 21:07:24 hydan [~user@ip-89-102-13-27.net.upcbroadband.cz] has joined #lisp 21:07:28 it's the ftype declaration for random-normal-bivariate 21:07:54 sorry, i seem to be having a problem finding the compilation buffer 21:08:11 how about the REPL? 21:08:12 faheem: C-x b *co 21:08:29 -!- francogrex [~user@109.134.231.227] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 21:08:34 The coin has entered the machine. I fully understand the string/hashtable example. And intern/unintern has no effect on the symbol itself, thanks Bike for that. 21:08:35 H4ns: well, it's usually *slime-co 21:08:44 uh. 21:09:45 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 21:10:02 but it won't be used if you just load things from the repl 21:10:41 right. that would be just in the *slime-repl sbcl* buffer, i think 21:11:10 but slime's behavior really deserves fixing, i agree about that 21:11:24 what slime's behavior? 21:11:49 it does not display the real error in the debugger that pops up 21:11:59 faheem: see annotation. 21:12:02 well, that's ASDF behavior 21:12:21 ok, whatever the cause is, it stinks 21:12:29 yeah. 21:13:11 well, i'd start with changing the default for sbcl *compile-file-failure-behaviour* to :warn 21:13:21 could this be the problem? caught WARNING: 21:13:22 ; :RHO and :TRIES are not a known argument keywords. 21:13:26 yes, it is 21:13:51 it looks like *slime-repl sbcl* is where it is 21:14:00 the compilation stuff i mean 21:14:01 -!- wbooze [~wbooze@xdsl-78-35-184-210.netcologne.de] has quit [Ping timeout: 252 seconds] 21:14:08 stassats`: should i file an issue? 21:14:13 -!- kofno_ [~kofno@cpe-24-165-213-150.neo.res.rr.com] has quit [Remote host closed the connection] 21:14:50 if you want to 21:14:54 stassats`: ok 21:15:00 -!- m7w [~chatzilla@178.172.204.183] has quit [Ping timeout: 248 seconds] 21:15:11 why it is not calling it an error, but rather a warning 21:15:13 ? 21:15:32 because it still can work 21:16:12 stassats`: oh 21:16:38 -!- bitonic [~user@ppp-109-10.24-151.libero.it] has quit [Ping timeout: 265 seconds] 21:16:50 what slime should get is the ability to visit the file in which compilation error occurred, i usually do some silly dances to get around to it, instead of M-. or v 21:17:01 faheem: if you don't call that function, everything will work fine 21:17:20 stassats`: ok. but the compilation was not complated 21:17:25 completed 21:17:27 it was 21:17:42 if you don't call it with keyword arguments, and it fails to return after 500 iterations, it'll also be OK. 21:18:08 faheem: asdf just decided that it doesn't want it 21:18:45 jeti`` [~user@p548E98E1.dip.t-dialin.net] has joined #lisp 21:19:13 in the meantime, you could try the annotation. 21:19:13 so, would it suffice to just quote http://paste.lisp.org/display/134316#2 in the issue? 21:19:31 quoting code is unlikely to do any good. 21:19:37 -!- chameco [~samuel@54.sub-70-192-4.myvzw.com] has quit [Ping timeout: 244 seconds] 21:19:57 pkhuong: that's the error message, is it not? 21:19:58 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #lisp 21:20:15 faheem: well, pkhuong fixed it in the second annotation 21:20:24 -!- edgar-rft [~GOD@HSI-KBW-091-089-005-153.hsi2.kabelbw.de] has quit [Quit: lifetime expired] 21:20:26 if you want to know how to fix it 21:20:47 stassats`: oh, right. so i should post that then? 21:21:01 you should do what you want to do 21:21:06 don't ask me! 21:21:26 stassats`: ok 21:21:47 pkhuong: is it ok if i point to your annotation in the issue report? 21:22:15 don't point to paste.lisp.org, i may lose all the pastes once again 21:22:19 -!- jeti` [~user@p548E9B36.dip.t-dialin.net] has quit [Ping timeout: 244 seconds] 21:22:38 -!- zyg [55e38e49@gateway/web/freenode/ip.85.227.142.73] has quit [Quit: Page closed] 21:22:40 faheem: sure. I'll send a couple patches for that file in a few minutes. 21:22:47 stassats`: instead of losing, you could establish a *drumroll* "backup" 21:23:07 where would i back them up? 21:23:15 not onto my desktop, surely 21:23:20 stassats`: if you need a place, i can provide you one. 21:23:53 damn, i wanted to argue myself out of doing anything! 21:24:02 stassats`: cloud it up. 21:25:54 pkhuong: ok, done. https://github.com/lvaruzza/cl-randist/issues/1 21:26:09 eni [~eni@gob75-5-82-230-88-217.fbx.proxad.net] has joined #lisp 21:26:41 -!- lduros [~user@fsf/member/lduros] has quit [Ping timeout: 265 seconds] 21:29:29 -!- prxq [~mommer@mnhm-5f75f7c7.pool.mediaWays.net] has quit [Quit: Leaving] 21:32:45 faust45 [~faust45@89.22.254.177] has joined #lisp 21:33:52 -!- faust45 [~faust45@89.22.254.177] has quit [Client Quit] 21:34:58 yrk [~user@c-50-133-134-220.hsd1.ma.comcast.net] has joined #lisp 21:34:59 francisl [~anonymous@bas6-montreal45-1176493761.dsl.bell.ca] has joined #lisp 21:35:02 -!- yrk [~user@c-50-133-134-220.hsd1.ma.comcast.net] has quit [Changing host] 21:35:02 yrk [~user@pdpc/supporter/student/yrk] has joined #lisp 21:44:23 -!- hydan [~user@ip-89-102-13-27.net.upcbroadband.cz] has quit [Ping timeout: 260 seconds] 21:44:33 I want to (intern "csv" :my-package) and have that match the symbol CSV in the same package, but of course I have |csv| now. I can't remember how to make what I whant happen? 21:44:46 (intern "CSV" :my-package) 21:45:08 (intern (string '#:CSV) :my-package) 21:45:10 if the symbol's already gonna be there you should probably use find-symbol though, no? 21:45:16 that string comes from a parser that I want case insensitive 21:45:38 what exactly is a lisp-2 language? 21:45:38 spiderweb, memo from pjb: it was a silly question because of 1) Turing Equivalence, 2) almost all _good_ programming languages have started as lisp programs, including ML, the ancestor of Haskell. 21:45:41 snearch [~snearch@f053010012.adsl.alicedsl.de] has joined #lisp 21:45:46 dim: string-upcase? 21:45:55 spiderweb: the one that is better than lisp-1 21:46:09 because 2 is twice as much as 1 21:46:12 spiderweb: to oversimplify, it means you can have a variable and a function with the same name 21:46:18 I though I remembered about the reader default case handling being configurable, but well I guess string-upcase is a better approach here, thanks Bike 21:46:27 ok 21:46:37 dim: that's for the reader, not for you calling intern. 21:46:41 (read-from-string "foo") 21:46:47 beware of #. 21:47:40 tcr [~tcr@88-134-109-42-dynip.superkabel.de] has joined #lisp 21:48:19 clintm [~clintm@c-98-203-180-88.hsd1.wa.comcast.net] has joined #lisp 21:48:32 case insensitive programming languages dumbify people so much that they can't tell the difference between "csv" and "CSV". Incredible! 21:48:50 pjb: I don't want my users to have to case 21:48:56 care, even 21:49:19 I'm building a COPY like parser and SQL is mostly case insensitive 21:49:29 not really so, but the keyword parsing is 21:50:05 -!- tortole [~user@c-67-182-147-102.hsd1.wa.comcast.net] has left #lisp 21:50:35 and now a class slot's :type option is preventing me from using a subclass of the class I'm using in the :type... too bad 21:51:11 that's wrong. 21:51:28 cool, so I need to better understand what's happening :) 21:52:14 The value #, derived from the initarg :FORMAT, can not be used to set the value of the slot FORMAT in #, because it is not of type SYMBOL. 21:52:21 maybe I should just relearn to read 21:52:24 -!- tcr [~tcr@88-134-109-42-dynip.superkabel.de] has quit [Ping timeout: 264 seconds] 21:52:27 it's an incredibly complex skill 21:52:32 -!- rob7n8h [~rob7n8h@c-67-182-147-102.hsd1.wa.comcast.net] has quit [Ping timeout: 245 seconds] 21:52:42 See. the class CSV is not a subclass of CL:SYMBOL. 21:53:43 I have erroneously overriden the slot in the subclass, and the parent class disagree with the slot's :type 21:57:04 -!- toekutr [~user@50-0-51-11.dsl.static.sonic.net] has quit [Remote host closed the connection] 21:57:20 sirdancealot1 [~sirdancea@98.82.broadband5.iol.cz] has joined #lisp 21:57:31 rob7n8h [~rob7n8h@c-67-182-147-102.hsd1.wa.comcast.net] has joined #lisp 22:01:52 -!- _d3f [~freedo@46.183.216.234] has quit [Remote host closed the connection] 22:04:30 -!- H4ns changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language . New: Hunchentoot 1.2.9, Drakma 1.3.0, SBCL 1.1.2, Postmodern 1.19, Yason 0.6.2 22:04:39 what's new? 22:04:54 toekutr [~user@50-0-51-11.dsl.static.sonic.net] has joined #lisp 22:05:14 fantazo [~fantazo@213.129.230.10] has joined #lisp 22:05:18 stassats`: new docs for drakma, range header fixes 22:05:31 -!- fisxoj [~fisxoj@c-24-12-190-29.hsd1.il.comcast.net] has quit [Read error: Operation timed out] 22:05:43 too bad it missed quicklisp 22:05:57 or did it ? 22:06:04 it missed it, sadly. 22:06:19 what am i complaining, i don't even use quicklisp! 22:09:28 is there something "generic" to pretty print nested class instances? 22:09:38 ((# # (:SKIP-HEAD-LINES 1 :FIELD-SEPARATOR #\;) NIL)) 22:09:57 no 22:10:03 I want to know more, I could maybe write some printer functions that I don't know yet about... 22:10:20 clhs print-object 22:10:20 http://www.lispworks.com/reference/HyperSpec/Body/f_pr_obj.htm 22:10:21 -!- mishoo [~mishoo@178.138.99.110] has quit [Read error: No route to host] 22:10:22 dim: well, there's the pprint stuff, but i don't know what "nested class instances" means 22:10:40 -!- gravicappa [~gravicapp@ppp91-77-166-37.pppoe.mtu-net.ru] has quit [Ping timeout: 265 seconds] 22:10:44 -!- Spaceghostc2c [Spaceghost@unaffiliated/spaceghostc2c] has quit [Excess Flood] 22:11:31 nan_ [~user@178.233.216.230] has joined #lisp 22:11:55 Spaceghostc2c [Spaceghost@unaffiliated/spaceghostc2c] has joined #lisp 22:12:08 Bike: (make-instance 'foo :bar (make-instance 'bar)) would be an example 22:12:39 i have no idea what you'd expect "generic" behavior to be. 22:12:56 stassats`: the easier would be to implement some print-object methods then? 22:13:01 if your print-object method would is defined for both and the one prints the value of that slot, they both will printed in the way you want it 22:13:07 i mean, those aren't even the same class. what if :bar has a symbol in it? that's a class 22:13:13 dim: there's no other way 22:13:37 (i know that there's pprint-dispatch tables, but that's silly) 22:13:43 so that's the easier in a way... (sorry, tired), thnaks 22:14:29 by "pprint stuff" I mean like logical blocks and all, to handle circularities and such for you 22:15:35 stassats`: do I need to call (print-method (slot-value self 'bar)) explicitely in the (defmethod print-method ((self foo) stream) ...)? 22:15:52 you need to print the slot, yes 22:15:53 it's print-object 22:16:08 and you don't call it yourself 22:16:20 use print and write and so on like usual 22:16:21 -!- jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has quit [Ping timeout: 248 seconds] 22:16:42 well that would be my first use of them, nothing usual here 22:17:14 jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has joined #lisp 22:17:35 oh, and print-unreadable-object. i think the clhs page on that or something related (print-object?) might help with examples 22:18:43 faust45 [~faust45@89.22.254.177] has joined #lisp 22:19:44 i have an engine with many modules (as shared libraries written in c++. math, physics, rendering, gui etc...), instead of full c++ i want to write the last part with CL, i want it to be portable as able to support win/lim/mac/ios/android and this is the part scares me since i can't see many CL implementations support these. so what do you guys suggest? stay with c++ or integrate CL? 22:20:33 any pointer to a print-object method definition for a specific object? 22:20:34 nan_: ecl would be your best bet 22:22:05 wbooze [~wbooze@xdsl-78-35-189-199.netcologne.de] has joined #lisp 22:22:47 -!- cryptic [~cryptic@pool-71-125-31-38.nycmny.fios.verizon.net] has quit [] 22:23:19 -!- eni [~eni@gob75-5-82-230-88-217.fbx.proxad.net] has quit [Quit: Leaving] 22:23:54 once you fix all the bugs 22:25:14 dim: you could M-. print-object and see if any of the dozen results you'll probably get are good examples 22:26:25 H4ns: i had troubles with ecl and quicklisp yesterday but today it seems fine 22:27:39 nan_: ecl is not as well-supported as, say, sbcl or clozure cl, but it seems to be reasonably maintained. you may have to deal with implementation bugs more than with those other cl's, but you'll get pretty much what you asked for in terms of portability. 22:28:37 well, and people will thank you for helping to fix/diagnose bugs 22:28:43 -!- H4ns changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language . New: Yason 0.6.3, Hunchentoot 1.2.9, Drakma 1.3.0, SBCL 1.1.2, Postmodern 1.19 22:28:56 what's new? 22:29:17 Yason 0.6.3 it seems 22:29:33 stassats`: missing condition class and defgeneric added. 22:29:46 ok 22:29:50 not that i use yason... 22:30:04 H4ns: thanks 22:30:21 what is the criteria for a library release to make it to /topic ? 22:30:33 felideon: anyone can change the topic 22:30:44 felideon: so it is all about vanity 22:30:46 oh boy! 22:30:52 -!- antonv [5d7d31f9@gateway/web/freenode/ip.93.125.49.249] has quit [Ping timeout: 245 seconds] 22:31:00 /topic New: Cells 4.0 22:31:04 \o/ 22:32:22 Bike: good idea 22:32:53 dim: actually the swank examples should be enough to get you the basic idea 22:33:11 I'm in cl-postgres with an example of print-unreadable-object 22:33:14 jrajav [~jrajav@66-188-176-243.dhcp.roch.mn.charter.com] has joined #lisp 22:34:17 whatever works 22:34:25 yeah, trying that way :) 22:34:59 fisxoj [~fisxoj@c-24-12-190-29.hsd1.il.comcast.net] has joined #lisp 22:35:07 when doing C-M-x in a lisp buffer with slime, which package will the defun/demethod/etc result in? the one in the mode line? the one currently active in the REPL? another one? 22:35:36 the on in the modeline 22:35:38 if it exists 22:35:54 the REPL is currently in-package that package, so yes 22:36:08 but I will have to track it down because it's not acting like I would expect 22:36:15 well, if you're in a file with an in-package form slime will figure that out, far as i know 22:36:32 -!- Forty-3 [~seana11@host125-069.tiffinsen.lib.oh.us] has quit [Ping timeout: 255 seconds] 22:36:38 (the class is already loaded via quickload and the C-M-x on the defmethod barfs on it still) 22:36:39 if it doesn't exist, then the package in the repl 22:39:37 robot-beethoven [~user@c-24-118-142-0.hsd1.mn.comcast.net] has joined #lisp 22:39:44 Indecipherable [~Indeciphe@41.28.34.154] has joined #lisp 22:40:54 sellout [~Adium@75-25-126-88.lightspeed.sjcpca.sbcglobal.net] has joined #lisp 22:41:56 -!- am0c [~am0c@124.49.51.146] has quit [Ping timeout: 248 seconds] 22:42:57 -!- Indecipherable [~Indeciphe@41.28.34.154] has quit [Client Quit] 22:43:22 -!- snearch [~snearch@f053010012.adsl.alicedsl.de] has quit [Quit: Verlassend] 22:44:35 dim: Have a look at: print-parsable-object in http://fossil.informatimago.com:8002/patchwork/artifact/d21f54baf6aa630b1b268dbd5fc0dfa9420271c6 and examples in http://fossil.informatimago.com:8002/patchwork/artifact/d04bd7a87d2fedcf27b0bbb4720d159566027a96 22:45:13 dim: now the question is about why you can't come up with such a mechanism to print your objects as you want yourself? Are you a programmer or not? 22:45:40 cryptic [~cryptic@pool-71-125-31-38.nycmny.fios.verizon.net] has joined #lisp 22:46:09 pjb: I get it that something is not as good as it could in your personal life these days, please get back to being a nice person please. 22:47:16 -!- sirdancealot1 [~sirdancea@98.82.broadband5.iol.cz] has quit [Ping timeout: 248 seconds] 22:47:47 bananagram [~bot@c-98-198-236-112.hsd1.tx.comcast.net] has joined #lisp 22:47:48 -!- francisl [~anonymous@bas6-montreal45-1176493761.dsl.bell.ca] has quit [Quit: francisl] 22:47:57 tcr [~tcr@88-134-109-42-dynip.superkabel.de] has joined #lisp 22:48:08 *stassats`* learns about C, pthreads, posix, linux memory management, more than he wants to while trying to debug SBCL 22:48:13 dim: You're right :-) Nonetheless, I'd expect from programmers more autonomy in inventing their own tools. 22:48:29 stassats`: those are fun subjects :-) 22:48:34 francisl [~anonymous@bas6-montreal45-1176493761.dsl.bell.ca] has joined #lisp 22:48:37 I don't want to invent my own tools, I want to learn about usual conventions in CLOS programming 22:48:46 then I'll see about making my own way it needs be 22:49:00 dim: there aren't enough lispers to be usual conventions. 22:49:12 There is the clhs, a few libraries, and the rest is up to you. 22:49:26 I still get lots of wisdom from talking to you people here 22:49:57 (and reading c.l.l too) 22:49:57 -!- francisl [~anonymous@bas6-montreal45-1176493761.dsl.bell.ca] has quit [Client Quit] 22:50:05 This is just a few example of what other programmers have done, but no usual conventions. 22:50:21 You should feel free to trace your own path. 22:50:28 And you should like it! 22:50:36 I'll adapt my glossary then, but don't feel ready to get lost all by myself 22:50:50 Lisp programming is more like skiing off tracks. 22:50:58 cl has way too many traps for my n00b taste 22:51:09 You don't know C or C++ then . 22:51:13 dim: anyway, is print-method plus print-unreadable-object what you want? 22:51:20 print-object, rather 22:51:23 Bike: it's working fine yes, thanks 22:51:29 ((# fields:NIL path:foo #x302001FE35DD> # (:SKIP-HEAD-LINES 1 :FIELD-SEPARATOR #\;) NIL)) 22:51:34 that's already much better, see 22:51:56 seems like you could use some more whitespace :P 22:51:57 well it's still not finished because now I can continue creating the objects I need in the parser instead of building anonymous lists 22:52:07 chameco [~samuel@54.sub-70-192-4.myvzw.com] has joined #lisp 22:52:15 I just removed the whitespace to get less confused :) 22:52:26 fsep is a character, for example, not a string 22:52:39 and could be set to a whitespace too 22:52:43 -!- tcr [~tcr@88-134-109-42-dynip.superkabel.de] has quit [Ping timeout: 265 seconds] 22:53:08 it's smiling at me 22:53:21 dim: if you gather the data you want to print in a list, and if you print it readably, then you get a sexp that you can evaluate to build a copy of the object (assuming you define the right constructor functions or macros). 22:54:01 -!- mrSpec [~Spec@unaffiliated/mrspec] has quit [Quit: mrSpec] 22:54:08 yeah but the printing here is just a debug tool 22:54:09 -!- pjb [~user@cust-seco21th2-46-193-64-247.wb.wifirst.net] has quit [Remote host closed the connection] 22:54:43 dim: well, if it's a character, if *print-escape* is on then it'll print as #\, (or #\Space) which may be more convenient 22:56:15 -!- tensorpudding [~tensorpud@99.148.198.110] has quit [Read error: Connection reset by peer] 22:58:08 nice 22:59:06 CL's printing stuff is pretty baroque (even as CL goes) but you can do just about anything with it 22:59:17 yeah 22:59:35 I'm trying to remember the ~% companion to continue with the same indentation as the previous line 23:00:08 clhs ~< 23:00:08 http://www.lispworks.com/reference/HyperSpec/Body/22_ceb.htm 23:00:38 tensorpudding [~tensorpud@99.148.196.4] has joined #lisp 23:00:56 pjb [~user@cust-seco21th2-46-193-64-247.wb.wifirst.net] has joined #lisp 23:01:37 pjb: the print-object stuff is a debug aid, I then need the objects to implement different set of methods etc 23:01:47 or I think I would have used defstruct 23:02:52 Sure. Also, I read better sexps like (class :field value) than # stuff. 23:03:19 -!- chameco [~samuel@54.sub-70-192-4.myvzw.com] has quit [Quit: leaving] 23:03:24 Otherwise, you can also provide a make-load-form method to print objects readably. 23:03:33 -!- faust45 [~faust45@89.22.254.177] has quit [Quit: faust45] 23:04:39 chameco [~samuel@54.sub-70-192-4.myvzw.com] has joined #lisp 23:05:32 -!- tensorpudding [~tensorpud@99.148.196.4] has quit [Read error: Connection reset by peer] 23:06:00 -!- chameco [~samuel@54.sub-70-192-4.myvzw.com] has quit [Client Quit] 23:06:01 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 23:06:17 tensorpudding [~tensorpud@108.87.17.135] has joined #lisp 23:07:25 -!- puchacz [~puchacz@46-65-36-47.zone16.bethere.co.uk] has quit [Remote host closed the connection] 23:08:40 chameco [~samuel@54.sub-70-192-4.myvzw.com] has joined #lisp 23:11:11 can I ask an object dynamically if it has a slot I know the name of? (initarg here in fact) 23:11:17 (but easy to switch to the name) 23:11:22 clhs s-b-p 23:11:22 Sorry, I couldn't find anything for s-b-p. 23:11:32 -- Function: slot-boundp instance slot-name  generalized-boolean 23:11:35 I guess 23:11:40 clhs s-e-p 23:11:40 slot-exists-p: http://www.lispworks.com/reference/HyperSpec/Body/f_slt_ex.htm 23:11:51 cool, -- Function: slot-exists-p object slot-name  generalized-boolean is what I need 23:11:53 thanks 23:12:12 not for initargs 23:12:21 yeah 23:13:18 sirdancealot1 [~sirdancea@98.82.broadband5.iol.cz] has joined #lisp 23:13:43 -!- Drak0n41K [~Drak0n41K@46.233.206.207] has quit [Read error: Operation timed out] 23:13:56 -!- _veer [~veer@unaffiliated/lolsuper-/x-9881387] has quit [Ping timeout: 248 seconds] 23:14:00 no way to use both (slot-value foo 'bar) and (slot-value foo :bar) for the same thing I guess? 23:14:07 no 23:14:26 so no &keys parameter in that method then I guess 23:15:03 (defmethod set-options ((self parent-class) opt1 val1 opt2 val2) ...) 23:15:03 &keys don't have to be keywords 23:15:32 so I could (set-options foo 'slot-name value 'slot-name value)? 23:15:36 "self" doesn't make sense in CLOS 23:16:18 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #lisp 23:16:23 oh, you want to set initargs, (reinitialize-instance instance :initarg value :initarg value) 23:18:30 -!- LiamH [~none@pdp8.nrl.navy.mil] has quit [Quit: Leaving.] 23:18:33 -!- Us [~Us@vm1.lumi.net] has quit [Quit: Us] 23:20:03 -!- Kvaks_ [~kvaks@161.164.189.109.customer.cdi.no] has quit [Read error: Connection reset by peer] 23:20:13 Drak0n41K [~Drak0n41K@46.233.206.207] has joined #lisp 23:20:43 *drewc* uses/used to use UCW:SELF for UCW components, simply because UCW:SELF was 'looked for' to see the 'self' component, at least it was 8 years ago. 23:21:16 Kvaks_ [~kvaks@161.164.189.109.customer.cdi.no] has joined #lisp 23:21:37 -!- chameco [~samuel@54.sub-70-192-4.myvzw.com] has quit [Quit: leaving] 23:21:54 did it make 'sense'? non ... "self" does not make sense in CLOS ;) 23:22:02 -!- adelgado [~TomSawyer@65.23.61.98.nw.nuvox.net] has quit [Quit: Leaving.] 23:22:02 chameco [~samuel@54.sub-70-192-4.myvzw.com] has joined #lisp 23:22:04 dim: slots have a unique name, but can have multiple accessors. 23:22:04 -!- chameco [~samuel@54.sub-70-192-4.myvzw.com] has quit [Client Quit] 23:22:29 Some people may use uninterned symbols to name slots :-) 23:23:51 pjb: heh ... I have done so! (defclass foo () ((#:bar :initarg :bar))) :) 23:24:22 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 23:24:49 -!- PuercoPop [~user@190.222.252.106] has quit [Ping timeout: 246 seconds] 23:25:54 drewc: without accessor, it's rather evil: you can access the slot only thru the MOP. 23:26:04 *drewc* also does (<:as-is '#:|
"foo!!"
|) to print the html with quites in it 23:26:16 pjb: yup, and that was important for what I did. 23:26:22 faheem: see pull request. 23:26:37 chameco [~samuel@54.sub-70-192-4.myvzw.com] has joined #lisp 23:26:42 -!- foreignFunction [~niksaak@94.27.89.145] has quit [Quit: Leaving.] 23:27:49 pjb: it was for a DAO style thing, where any slot with an interned name was a column ... I cannot recommend doing so at all. 23:27:51 -!- chameco [~samuel@54.sub-70-192-4.myvzw.com] has quit [Client Quit] 23:28:10 ... https://github.com/lvaruzza/cl-randist/pull/2, less code, more speed. 23:28:11 chameco [~samuel@54.sub-70-192-4.myvzw.com] has joined #lisp 23:28:50 -!- fantazo [~fantazo@213.129.230.10] has quit [Ping timeout: 255 seconds] 23:30:28 fantazo [~fantazo@213.129.230.10] has joined #lisp 23:32:31 (i eventually did :transient in the slot itself because that is a lot cleaner and less ... well ... reliant on the MOP. 23:32:32 -!- Guthur [~user@eth2845.sa.adsl.internode.on.net] has quit [Ping timeout: 250 seconds] 23:32:36 -!- fisxoj [~fisxoj@c-24-12-190-29.hsd1.il.comcast.net] has quit [Ping timeout: 248 seconds] 23:34:37 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #lisp 23:35:09 can I have a slot unbound when it's given a :default-initargs? 23:35:31 the default being nil might explain 23:35:48 not really 23:36:11 :initform fixed it 23:36:29 the print-method is using with-slots and gets unhappy when slots are unbound 23:38:26 Bacteria [~Bacteria@115-64-180-132.static.tpgi.com.au] has joined #lisp 23:38:39 -!- BountyX [~andrew@d118-75-192-10.try.wideopenwest.com] has quit [Ping timeout: 252 seconds] 23:41:38 urandom__ [~user@p54B0EBE0.dip.t-dialin.net] has joined #lisp 23:42:18 -!- stat_vi [~stat@dslb-094-218-228-177.pools.arcor-ip.net] has quit [Quit: Lost terminal] 23:42:41 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 23:42:46 -!- jtza8 [~jtza8@105-236-101-234.access.mtnbusiness.co.za] has quit [Remote host closed the connection] 23:43:39 print-object method 23:45:12 pnq [~nick@unaffiliated/pnq] has joined #lisp 23:45:18 tcr [~tcr@88-134-109-42-dynip.superkabel.de] has joined #lisp 23:46:42 -!- ehu [ehu@ip167-22-212-87.adsl2.static.versatel.nl] has quit [Ping timeout: 252 seconds] 23:46:59 -!- nawk [~nawk@CPE0018e7e66445-CM602ad08618e3.cpe.net.cable.rogers.com] has quit [Read error: Connection reset by peer] 23:47:21 nawk [~nawk@CPE0018e7e66445-CM602ad08618e3.cpe.net.cable.rogers.com] has joined #lisp 23:47:44 -!- myx [~myx@pppoe-213-12-dyn-sr.volgaline.ru] has quit [Ping timeout: 255 seconds] 23:52:58 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #lisp 23:53:00 ehu [ehu@ip167-22-212-87.adsl2.static.versatel.nl] has joined #lisp 23:54:56 -!- pnq [~nick@unaffiliated/pnq] has quit [Ping timeout: 255 seconds] 23:55:02 -!- arrk13 [~arrakis24@93.142.184.33] has left #lisp 23:57:41 -!- spiderweb [~user@unaffiliated/lcc] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 23:58:20 Joreji [~thomas@77-23-116-225-dynip.superkabel.de] has joined #lisp 23:59:12 -!- wormphlegm [~wormphleg@c-50-131-44-231.hsd1.ca.comcast.net] has quit [Read error: Connection reset by peer] 23:59:28 substitute [~substitut@97-113-98-140.tukw.qwest.net] has joined #lisp 23:59:29 -!- add^_ [~add^_@m83-190-161-220.cust.tele2.se] has quit [Quit: The Garbage Collector got me...] 23:59:32 -!- agumonkey [~agu@243.217.72.86.rev.sfr.net] has quit [Ping timeout: 252 seconds] 23:59:39 -!- pjb [~user@cust-seco21th2-46-193-64-247.wb.wifirst.net] has quit [Remote host closed the connection]