2014-11-15T00:00:00Z anannie joined #lisp 2014-11-15T00:00:01Z anannie quit (Changing host) 2014-11-15T00:00:01Z anannie joined #lisp 2014-11-15T00:00:14Z didi left #lisp 2014-11-15T00:04:34Z jussss joined #lisp 2014-11-15T00:05:15Z dagnachew joined #lisp 2014-11-15T00:05:59Z GGMethos joined #lisp 2014-11-15T00:06:36Z p_l: nothing 2014-11-15T00:07:17Z p_l: they are special in HTML DOM, not in XML DOM, and I think even then it's mostly a case of JS interop 2014-11-15T00:07:53Z jusss quit (Ping timeout: 260 seconds) 2014-11-15T00:08:17Z mishoo quit (Ping timeout: 240 seconds) 2014-11-15T00:13:11Z urandom__ quit (Quit: Konversation terminated!) 2014-11-15T00:16:25Z puchacz: they cannot be covered by regular dtd, because there are as many of them as you want 2014-11-15T00:17:05Z Bicyclidine joined #lisp 2014-11-15T00:17:28Z jlarocco joined #lisp 2014-11-15T00:21:47Z robot-beethoven joined #lisp 2014-11-15T00:22:58Z wglb quit (Ping timeout: 250 seconds) 2014-11-15T00:23:39Z zRecursive joined #lisp 2014-11-15T00:23:54Z zRecursive quit (Remote host closed the connection) 2014-11-15T00:24:09Z zRecursive joined #lisp 2014-11-15T00:24:56Z Vutral quit (Ping timeout: 265 seconds) 2014-11-15T00:26:56Z hiyosi joined #lisp 2014-11-15T00:28:02Z Vutral joined #lisp 2014-11-15T00:30:31Z pt1 joined #lisp 2014-11-15T00:30:51Z vaporatorius quit (Remote host closed the connection) 2014-11-15T00:31:23Z hiyosi quit (Ping timeout: 240 seconds) 2014-11-15T00:33:25Z pecg quit (Quit: WeeChat 1.0.1) 2014-11-15T00:35:20Z p_l: puchacz: well, XML at least got better tools than DTD 2014-11-15T00:35:41Z p_l: not sure if you can use wildcards for tag names, but I wouldn't be surprised 2014-11-15T00:35:43Z LiamH quit (Quit: Leaving.) 2014-11-15T00:35:51Z puchacz: yeah, but html in the wild in general is sloppy 2014-11-15T00:35:59Z puchacz: so I don't care about validation 2014-11-15T00:38:31Z p_l: puchacz: yeah, but cxml stuff in general transforms everything into XML model 2014-11-15T00:38:50Z p_l: also, XML Schema allows names bounded by pattern 2014-11-15T00:39:29Z p_l: ... or maybe not 2014-11-15T00:39:35Z p_l: I might be too tired to read it right 2014-11-15T00:40:37Z quazimodo quit (Ping timeout: 240 seconds) 2014-11-15T00:41:29Z resttime quit (Quit: resttime) 2014-11-15T00:44:37Z pt1 quit (Remote host closed the connection) 2014-11-15T00:47:33Z quazimodo joined #lisp 2014-11-15T00:48:48Z xrash quit (Ping timeout: 256 seconds) 2014-11-15T00:49:18Z oleo__ joined #lisp 2014-11-15T00:49:54Z oleo is now known as Guest67804 2014-11-15T00:50:30Z Guest67804 quit (Ping timeout: 244 seconds) 2014-11-15T00:55:42Z DGASAU quit (Remote host closed the connection) 2014-11-15T00:57:40Z linux_dream joined #lisp 2014-11-15T00:58:09Z DGASAU joined #lisp 2014-11-15T00:58:15Z defaultxr joined #lisp 2014-11-15T00:59:38Z xrash joined #lisp 2014-11-15T01:01:02Z agumonkey quit (Quit: ZNC - http://znc.in) 2014-11-15T01:02:18Z agumonkey joined #lisp 2014-11-15T01:03:55Z xrash quit (Read error: Connection reset by peer) 2014-11-15T01:04:37Z jussss quit (Quit: Bye) 2014-11-15T01:06:09Z hiyosi joined #lisp 2014-11-15T01:07:20Z Bicyclidine quit (Ping timeout: 244 seconds) 2014-11-15T01:09:03Z linux_dream quit (Quit: Leaving) 2014-11-15T01:20:01Z jumblerg quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2014-11-15T01:25:43Z araujo quit (Ping timeout: 250 seconds) 2014-11-15T01:26:36Z araujo joined #lisp 2014-11-15T01:29:42Z Karl_Dscc joined #lisp 2014-11-15T01:33:44Z zRecursive quit (Remote host closed the connection) 2014-11-15T01:37:49Z MoALTz_ quit (Quit: Leaving) 2014-11-15T01:37:58Z wglb joined #lisp 2014-11-15T01:39:01Z BitPuffin quit (Ping timeout: 258 seconds) 2014-11-15T01:39:36Z shaykha joined #lisp 2014-11-15T01:40:43Z jangle joined #lisp 2014-11-15T01:40:52Z shaykha left #lisp 2014-11-15T01:45:34Z Vutral quit (Ping timeout: 244 seconds) 2014-11-15T01:47:08Z MoALTz joined #lisp 2014-11-15T01:47:23Z BitPuffin joined #lisp 2014-11-15T01:47:39Z stepnem quit (Ping timeout: 265 seconds) 2014-11-15T01:52:33Z puchacz quit (Quit: Konversation terminated!) 2014-11-15T01:53:39Z Vutral joined #lisp 2014-11-15T01:54:25Z zRecursive joined #lisp 2014-11-15T02:04:03Z vowyer_ quit (Quit: C-x C-c) 2014-11-15T02:06:18Z zeitue joined #lisp 2014-11-15T02:18:03Z cy joined #lisp 2014-11-15T02:19:17Z vinleod joined #lisp 2014-11-15T02:21:40Z jangle: trying to write a client for a text based protocl hosted over tcp, can't seem to get the client write side working. code here http://paste.lisp.org/display/144373 2014-11-15T02:22:09Z jangle: I know I'm using ccl, the make-socket function purports to return a bidirectional stream for use with normal stream functions for IO 2014-11-15T02:22:22Z jangle: I use a global *javad-sock* to keep track of the socket, I use socket-play to open the socket to a netcat listen server, and with wireshark up I can see that things I type in the netcat window are readable by lisp, but when I issue various stream write commands I see no traffic hit the wire. 2014-11-15T02:22:46Z jangle: and I've since added a finish-output call to the end of the http-client function but I still don't see the message hit the wire 2014-11-15T02:22:57Z jangle: am I mising something simple? I just can't see it. 2014-11-15T02:26:16Z vlnx quit (Ping timeout: 256 seconds) 2014-11-15T02:31:47Z nyef: For what it's worth, I'm not seeing it either. On the other hand, I'm unfamiliar with CCL and its socket functions, so this may not be especially reassuring. 2014-11-15T02:32:17Z nyef: Have you tried force-output rather than finish-output? It's a bit of a long shot, but it might do something. 2014-11-15T02:34:23Z BitPuffin quit (Ping timeout: 240 seconds) 2014-11-15T02:36:16Z nyef: Odd, I'm not seeing any indication in CCL manual chapter 8.2 that a socket made with type :stream is usable as a stream... 2014-11-15T02:37:45Z nyef: Ah, because the indication is in chapter 8.1. 2014-11-15T02:39:05Z nyef: jangle: Unfortunately, I have no idea why this doesn't work for you. 2014-11-15T02:40:13Z jangle: I have not tried force-output 2014-11-15T02:40:18Z jangle: i'll try it right now 2014-11-15T02:41:52Z vlnx joined #lisp 2014-11-15T02:48:13Z antonv joined #lisp 2014-11-15T02:48:30Z Karl_Dscc quit (Remote host closed the connection) 2014-11-15T02:51:13Z csziacobus quit (Quit: csziacobus) 2014-11-15T02:52:38Z linux_dream joined #lisp 2014-11-15T03:04:04Z atgreen quit (Read error: Connection reset by peer) 2014-11-15T03:04:58Z atgreen joined #lisp 2014-11-15T03:06:53Z The_Woodsman joined #lisp 2014-11-15T03:11:23Z The_Woodsman: is there a way to make a list containing, say, 1 2 ) ? 2014-11-15T03:12:02Z The_Woodsman: i've been trying to use escape characters to get the ) recognized as just a string and not something with semantic meaning in the program but it's been troublesome 2014-11-15T03:12:19Z drdo: The_Woodsman: (1 2 ")") ? 2014-11-15T03:13:03Z The_Woodsman: drdo: when I type that into the interpreter, i get out: (1 2 ")") 2014-11-15T03:13:16Z The_Woodsman: drdo: is it possible to not have the double quotes present? 2014-11-15T03:13:56Z nyef: What you have run into here is an aspect of Lisp's much-denied syntax. 2014-11-15T03:14:36Z The_Woodsman: nyef: so are you saying that it's not really possible to do? 2014-11-15T03:14:40Z drdo: The_Woodsman: They are just syntax, the string only contains the ) character 2014-11-15T03:14:46Z The_Woodsman: drdo: oh okay 2014-11-15T03:14:51Z nyef: Long story short, there are ways to present a list in such a fashion, but it's not something that happens in the default interface. 2014-11-15T03:15:00Z jlongster quit (Ping timeout: 256 seconds) 2014-11-15T03:15:03Z The_Woodsman: nyef: i misunderstood, got it 2014-11-15T03:15:06Z The_Woodsman: thanks, folks 2014-11-15T03:15:11Z drdo: In the same way that (1 2 3) isn't the list of 5 elements (, 1, 2, 3, ) 2014-11-15T03:15:18Z nyef: You can also use the character #\) rather than the string ")". 2014-11-15T03:16:20Z nyef: Consider (princ '(1 2 ")")). 2014-11-15T03:17:16Z froggey quit (Ping timeout: 256 seconds) 2014-11-15T03:17:32Z jusss joined #lisp 2014-11-15T03:18:06Z jusss: (defmacro add-head-tag (asymbol) 2014-11-15T03:18:06Z jusss: `(intern (coerce '(#\< ,@(coerce (string ,asymbol) 'list) #\>) 'string))) 2014-11-15T03:18:14Z jusss: comma not in a backquote 2014-11-15T03:18:23Z jusss: where it's wrong ? 2014-11-15T03:18:50Z drdo: jusss: just after coerce 2014-11-15T03:20:52Z jlongster joined #lisp 2014-11-15T03:20:56Z keppy quit (Ping timeout: 265 seconds) 2014-11-15T03:21:24Z jusss: drdo: how fix it? 2014-11-15T03:21:38Z drdo: replace ' with ` 2014-11-15T03:22:44Z froggey joined #lisp 2014-11-15T03:23:09Z nyef: Umm... What? 2014-11-15T03:23:44Z nyef: Are you sure it's not "remove the offending comma"? 2014-11-15T03:24:16Z zRecursive quit (Remote host closed the connection) 2014-11-15T03:26:17Z nyef: For that matter, why isn't it `(intern ,(format nil "<~A>" asymbol)) ? 2014-11-15T03:30:34Z The_Woodsman quit (Ping timeout: 258 seconds) 2014-11-15T03:30:50Z drdo: I didn't actually pay attention to the code 2014-11-15T03:31:44Z nyef: Dual-level backquote really isn't called for here, and that's what you'd end up with by simply replacing ' with `. 2014-11-15T03:33:05Z linux_dream quit (Quit: Leaving) 2014-11-15T03:34:13Z nyef: ... Why's this a macro, anyway? 2014-11-15T03:35:38Z jusss: it should be a function, I found this error, I write it by macro,and got it too,so I paste the macro 2014-11-15T03:36:17Z jusss: (set-macro-character #\[ 2014-11-15T03:36:17Z jusss: #'(lambda (stream char) 2014-11-15T03:36:17Z jusss: (declare (ignore char)) 2014-11-15T03:36:17Z jusss: (setq mys (cons (read stream) mys)) 2014-11-15T03:36:20Z jusss: (add-head-tag (read stream)))) 2014-11-15T03:36:52Z jusss: I cann't use the funciton read :( 2014-11-15T03:37:33Z jusss: read a atom or a element from a stream ,what should I use? 2014-11-15T03:37:46Z nyef: You're... arranging for side-effects from READ? 2014-11-15T03:39:06Z jusss: '([html bla) I want it to eval ( bla) 2014-11-15T03:39:30Z nyef: Then... why are you calling READ twice? 2014-11-15T03:39:50Z jusss: yes,I found read auto next 2014-11-15T03:39:54Z nyef: And arranging for ADD-HEAD-TAG on the SECOND read...? 2014-11-15T03:40:01Z jusss: no 2014-11-15T03:40:23Z jusss: I'd like it read the first always 2014-11-15T03:40:37Z nyef: So what's the SETQ MYS bit for? 2014-11-15T03:40:55Z jusss: it's list to store the first atom 2014-11-15T03:41:07Z dagnachew quit (Quit: WeeChat 1.0.1) 2014-11-15T03:41:12Z Bike: ok, how come you call READ twice? 2014-11-15T03:41:40Z jusss: I don't know how to use read, so how I can do ? 2014-11-15T03:42:24Z jusss: store the first atom and add-head-tag the first 2014-11-15T03:43:07Z nyef: Mmm. LET-bind the result of READ, and use the bound result to do your little PUSH operation and then do the add-head-tag bit. 2014-11-15T03:43:39Z jusss: I see 2014-11-15T03:44:30Z nyef: Essentially, READ has a side-effect on the stream, so calling it twice will read TWO forms, not just one. 2014-11-15T03:45:37Z vinleod quit (Quit: ["Textual IRC Client: www.textualapp.com"]) 2014-11-15T03:48:47Z jlarocco quit (Quit: This computer has gone to sleep) 2014-11-15T03:55:27Z kanru` quit (Remote host closed the connection) 2014-11-15T03:56:02Z kanru` joined #lisp 2014-11-15T03:58:06Z froggey quit (Ping timeout: 264 seconds) 2014-11-15T03:58:23Z froggey joined #lisp 2014-11-15T03:59:00Z jusss: https://github.com/jusss/lisp/blob/master/lisp-make-html 2014-11-15T03:59:14Z jusss: I have done it :) 2014-11-15T04:00:31Z nyef: Hrm. Not quite the approach I'd've taken, but then I actually rather LIKED xml-mixed-mode. 2014-11-15T04:03:16Z jusss: er.. you can change it ? 2014-11-15T04:03:36Z jussss joined #lisp 2014-11-15T04:03:58Z jusss quit (Quit: ERC Version 5.3 (IRC client for Emacs)) 2014-11-15T04:05:48Z kushal joined #lisp 2014-11-15T04:06:19Z jlongster quit (Ping timeout: 272 seconds) 2014-11-15T04:07:21Z cyphase joined #lisp 2014-11-15T04:09:27Z jusss joined #lisp 2014-11-15T04:12:25Z jussss quit (Ping timeout: 260 seconds) 2014-11-15T04:12:46Z The_Woodsman joined #lisp 2014-11-15T04:16:25Z Lefeni joined #lisp 2014-11-15T04:16:50Z keppy joined #lisp 2014-11-15T04:18:52Z jlongster joined #lisp 2014-11-15T04:19:06Z usrj joined #lisp 2014-11-15T04:21:05Z beach joined #lisp 2014-11-15T04:21:13Z ofosos joined #lisp 2014-11-15T04:21:13Z didi joined #lisp 2014-11-15T04:21:15Z beach: Good morning everyone! 2014-11-15T04:21:21Z keppy quit (Ping timeout: 265 seconds) 2014-11-15T04:21:53Z nyef: Hello beach. 2014-11-15T04:22:39Z didi: Can I handle a condition but signal it again? 2014-11-15T04:23:31Z nyef: There's some specific situation under which re-signalling a condition is allowed, but I haven't looked deeply into the details. 2014-11-15T04:24:41Z beach: In the intermediate representation (HIR) I need some notation for the case (lambda (...) (block b (ff (lambda (...) (return-from b (gg ...)))))) 2014-11-15T04:25:17Z nyef: Which aspect of the case do you need notation for? 2014-11-15T04:25:24Z beach: Would two instructions, say SAVE-VALUES and RETURN-SAVED-VALUES cover all cases that can occur in normal code, i.e. not in the implementation of special operators. 2014-11-15T04:25:59Z beach: I need to save the return values of GG and I need to return the saved values after having unwound the stack. 2014-11-15T04:26:04Z nyef: Don't forget MULTIPLE-VALUE-LIST and MULTIPLE-VALUE-CALL. 2014-11-15T04:26:16Z beach: Yes, I know. 2014-11-15T04:26:31Z beach: The former can be implemented using the latter. 2014-11-15T04:26:56Z beach: But I think I can implement M-V-C as a function call. 2014-11-15T04:27:01Z nyef: But they intersect with precisely this case. 2014-11-15T04:28:42Z beach: I am thinking (multiple-value-call fun form1 form2...) could be implemented as (multiple-value-call-fun fun (lambda () form1) (lambda () form2) ...) 2014-11-15T04:28:56Z beach: In which case I don't need a notation for it in HIR. 2014-11-15T04:28:57Z QualityAddict joined #lisp 2014-11-15T04:29:16Z didi: I think I got it. How wrong is this: (handler-bind ((t (lambda (condition) (do-something) (signal condition)))) ...) ? 2014-11-15T04:29:45Z nyef: didi: Why do you want to re-signal the condition as opposed to simply do something and then decline to handle it? 2014-11-15T04:31:20Z didi: nyef: If a condition has been signaled , I have to roll back the changes I did. 2014-11-15T04:31:43Z nyef: UNWIND-PROTECT ? 2014-11-15T04:32:14Z didi: I can't use `unwind-protect' because I can't roll back the changes if anything went OK. 2014-11-15T04:32:20Z didi: s/anything/evertying 2014-11-15T04:32:28Z didi: everything* 2014-11-15T04:32:50Z nyef: (let ((everything-ok nil)) (unwind-protect (progn ... (setf everything-ok t)) (unless everything-ok ...))) 2014-11-15T04:33:09Z didi: Uuuh. Not bad. 2014-11-15T04:33:13Z didi: I will take it. 2014-11-15T04:33:18Z didi: nyef: Thank you. 2014-11-15T04:33:39Z nyef: You're welcome. 2014-11-15T04:38:08Z jangle quit (Ping timeout: 244 seconds) 2014-11-15T04:39:20Z jangle joined #lisp 2014-11-15T04:41:42Z Nilly quit (Ping timeout: 256 seconds) 2014-11-15T04:45:54Z didi left #lisp 2014-11-15T04:58:34Z Grue` quit (Ping timeout: 250 seconds) 2014-11-15T04:59:18Z drmeister: beach: Hello - I'm trying the alternate approach of defining MACRO-FUNCTION in terms of the cleavir generic function. I'm wrestling with setting up methods for my implementation dependent environments. Apparently I haven't set up their classes properly for generic function dispatch. 2014-11-15T04:59:43Z beach: drmeister: Ah, OK. 2014-11-15T04:59:56Z beach: I could tell you were trying the alternative approach. 2014-11-15T05:00:12Z beach: I don't have fresh in mind exactly what you need to do for that. 2014-11-15T05:00:19Z beach: Plus, I am not quite awake yet. 2014-11-15T05:01:31Z drmeister: No problem. I'm banging away at it. 2014-11-15T05:01:40Z beach: Yeah. Good. 2014-11-15T05:05:17Z Grue` joined #lisp 2014-11-15T05:05:19Z drmeister: It's not surprising that MACRO-FUNCTION is getting called with my implementation dependent environments - correct? After all, my compiler is still in place and testing if forms that it is compiling need to be expanded as macros. 2014-11-15T05:05:33Z beach: Correct. 2014-11-15T05:05:51Z beach: ... I think. 2014-11-15T05:06:18Z beach: Wait... 2014-11-15T05:06:48Z beach: If you are using the Cleavir-provided lexical environments, there should be none of your lexical environments present at compile time as far as I can tell. 2014-11-15T05:08:42Z zRecursive joined #lisp 2014-11-15T05:09:20Z hiyosi quit (Ping timeout: 255 seconds) 2014-11-15T05:10:00Z antonv: tmp 2014-11-15T05:10:45Z beach: drmeister: Oh, yes, I see what you mean. 2014-11-15T05:11:04Z beach: drmeister: You still have your existing compiler. 2014-11-15T05:11:19Z beach: I told you I'm not awake yet. :) 2014-11-15T05:11:50Z pppp2 joined #lisp 2014-11-15T05:12:17Z usrj quit (Ping timeout: 240 seconds) 2014-11-15T05:15:50Z drmeister: Right - so I need to implement a method for cleavir-environment:macro-function that specializes on my CORE:ENVIRONMENT, or test if the environment argument to cl:macro-function has typep 'CORE:ENVIRONMENT. I'm trying the former, but the (defmethod cleavir-environment:macro-function (symbol (environment CORE:ENVIRONMENT)) ... ) is failing because apparently 2014-11-15T05:15:50Z drmeister: I haven't set up the class for CORE:ENVIRONMENT properly. 2014-11-15T05:16:23Z drmeister: It's complaining that the DIRECT-SLOTS slot for the class CORE:ENVIRONMENT is unbound. So I'm setting it to nil. 2014-11-15T05:16:54Z drmeister: My implementation dependent classes that are defined in C++ don't have slots in the way that Common Lisp thinks of slots. 2014-11-15T05:17:05Z beach: I see. 2014-11-15T05:17:16Z beach: You might do the simple test instead then. 2014-11-15T05:18:46Z drmeister: The (typep environment 'core:environment) test? If I can't figure out how to get defmethod to work with CORE:ENVIRONMENT I will. 2014-11-15T05:20:56Z drmeister: It's a bit tricky to mimic ECL's CLOS implementation - I spent months getting it to work with the standard classes. I thought I had it working for all of my additional C++ classes but apparently not. 2014-11-15T05:23:16Z froggey quit (Ping timeout: 250 seconds) 2014-11-15T05:23:28Z froggey joined #lisp 2014-11-15T05:24:00Z drmeister: You might want to add a comment about it to Code/Cleavir/Environment/eval.lisp where you defgeneric macro-function 2014-11-15T05:24:23Z beach: OK. What should I write? 2014-11-15T05:24:46Z Lefeni quit (Quit: Leaving) 2014-11-15T05:26:35Z Petit_Dejeuner_ is now known as Petit_Dejeuner 2014-11-15T05:29:47Z usrj joined #lisp 2014-11-15T05:33:16Z drmeister: How about this? 2014-11-15T05:33:21Z drmeister: https://www.irccloud.com/pastebin/5eonrip6 2014-11-15T05:33:34Z nydel quit (Quit: WeeChat 0.4.2) 2014-11-15T05:33:37Z drmeister: The first part is your original prose. 2014-11-15T05:33:57Z drmeister: "on the generic MACRO-FUNCTION" 2014-11-15T05:34:41Z nyef: I'd swap clauses so that the second point begins with "Also, if CL:MACRO-FUNCTION will still be called with implementation-specific lexical environments..." 2014-11-15T05:34:53Z nydel joined #lisp 2014-11-15T05:35:53Z nyef: Emphasizing the circumstances more than what needs to be done in those circumstances. 2014-11-15T05:35:58Z beach: Yes, good. 2014-11-15T05:36:03Z beach: Both of you :) 2014-11-15T05:37:01Z beach: drmeister: A bit of terminology wrt prepositions: The standard language is that a method is ON a generic function and it is specialized TO something. Not ideal, I know, but it's what the AMOP uses. 2014-11-15T05:38:41Z drmeister: Got it - thanks. 2014-11-15T05:39:32Z drmeister: The minor tragedy is that I can't get the defmethod to work so I implemented the typep test. 2014-11-15T05:40:20Z vinleod joined #lisp 2014-11-15T05:40:59Z beach quit (Remote host closed the connection) 2014-11-15T05:41:07Z usrj quit (Read error: Connection reset by peer) 2014-11-15T05:41:54Z beach joined #lisp 2014-11-15T05:42:33Z nyef: ... How important is it that a common lisp debugger run in the same address space as the program being debugged? 2014-11-15T05:42:54Z nyef suspects that the answer is "not at all, but it'd be a lot of work to implement a debugger that works that way". 2014-11-15T05:43:02Z beach: I would think it simplifies its implementation. 2014-11-15T05:43:30Z beach: I guess that's what you are saying as well, right? 2014-11-15T05:43:47Z nyef: Yeah. 2014-11-15T05:44:31Z nyef: It's an implementation simplification, but I'm not sure that it's the only, or even best approach. 2014-11-15T05:44:43Z beach: I admire the dedication of the people who wrote SLIME. I don't think I could have done it. 2014-11-15T05:45:08Z beach: nyef: Can you clarify that last remark? 2014-11-15T05:45:33Z beach: I mean, why would it not be the best? 2014-11-15T05:46:53Z nyef: If your debugger isn't in your address space, it can run on an entirely different host lisp (useful during bootstrap of a new implementation), it isn't in your image (smaller deployed images), and it may be easier to implement breakpoints in the presence of multiple threads. 2014-11-15T05:47:01Z nyef: And that's off the top of my head. 2014-11-15T05:47:22Z beach: Got it. 2014-11-15T05:47:55Z keppy joined #lisp 2014-11-15T05:48:19Z araujo quit (Quit: Leaving) 2014-11-15T05:49:55Z pjb: drdo: there was phenarete, but it was for vlisp (a lisp-1), and it has never been ported to CL. I never found the sources either. http://ijcai.org/Past%20Proceedings/IJCAI-77-VOL1/PDF/064a.pdf http://www.ai.univ-paris8.fr/~hw/ijcai.pdf http://www.ai.univ-paris8.fr/~hw/saintRemy.pdf http://arxiv.org/pdf/cs/0101008 http://www.ai.univ-paris8.fr/~hw/manMachine.pdf etc. 2014-11-15T05:52:12Z hiyosi joined #lisp 2014-11-15T05:52:40Z pjb: drdo: Hey! I found the sources: http://www.ai.univ-paris8.fr/~hw/lispProgs/phenar.vlisp 2014-11-15T05:55:57Z Petit_Dejeuner quit (Ping timeout: 240 seconds) 2014-11-15T05:57:11Z |3b|: nyef: unsafe/broken/ffi code being debugged can't stomp all over the debugger if they are in different address spaces also 2014-11-15T05:57:36Z nyef: There you go, that's another one. 2014-11-15T05:57:46Z drmeister: beach: Hmm, I'm getting an error that is similar to the error that we had a couple of days ago. I just pulled your upstream changes though. 2014-11-15T05:57:50Z drmeister: https://www.irccloud.com/pastebin/OeVu0zRV 2014-11-15T05:57:52Z CrazyWoods joined #lisp 2014-11-15T05:58:31Z jusss quit (Quit: Bye) 2014-11-15T05:58:56Z drmeister: This is the code that I'm trying to generate the AST for: (let ((x 1) (y 2)) (+ x y)) 2014-11-15T05:58:58Z beach: drmeister: It is possible I failed to add some stuff. 2014-11-15T05:59:19Z beach: Hmm, that one I think I tested. 2014-11-15T05:59:39Z drmeister: Right - this might be a repo update issue. 2014-11-15T05:59:51Z |3b|: might also let the debugged program get a bit closer to filling address space on 32bit systems, though probably not enough to matter even if 64bit systems weren't common 2014-11-15T05:59:59Z The_Woodsman quit (Ping timeout: 244 seconds) 2014-11-15T06:00:00Z drmeister: Do you recall a function that you changed to fix this problem? 2014-11-15T06:00:23Z beach: Hold on... 2014-11-15T06:00:32Z drmeister: This example works fine: (let ((x 10)) (if (> x 5) 1 2)) 2014-11-15T06:00:57Z beach: Right. 2014-11-15T06:01:25Z |3b|: also useful if debugger and debugged both want to use libs that conflict or that can only be initialized once, or insist on running in initial thread 2014-11-15T06:02:03Z |3b|: though i guess initial thread is separate process not address space 2014-11-15T06:02:17Z beach: drmeister: There was a bug in the code for LET. That's one thing. 2014-11-15T06:02:40Z beach: drmeister: The other thing was that if the defining-environment is NIL, I no longer call MAKE-INFO. 2014-11-15T06:03:38Z beach: drmeister: In LET, I query the environment of the LET itself to see whether the variables are globally special. 2014-11-15T06:04:18Z drmeister: Could you point me to a change in the code I could look for to make sure I have it? 2014-11-15T06:04:31Z beach: In default-info-methods.lisp 2014-11-15T06:05:27Z beach: The method on varible-info specialized to ENTRY should have a test: (if (null defining-info) nil (make-info environment defining-info)) 2014-11-15T06:06:11Z beach: So MAKE-INFO should no longer be called with a second argument of NIL. 2014-11-15T06:06:22Z jlongster quit (Ping timeout: 240 seconds) 2014-11-15T06:07:44Z drmeister: I just tried "git rebase upstream/master" and I see this: 2014-11-15T06:08:00Z drmeister: https://www.irccloud.com/pastebin/60BJKXxm 2014-11-15T06:08:18Z drmeister: This is from Code/Cleavir/Environment/default-info-methods.lisp 2014-11-15T06:08:20Z beach: Correct. 2014-11-15T06:09:07Z drmeister: Ok, let's see if it works. I don't know what the code looked like before the "git rebase upstream/master" when it was giving me trouble. 2014-11-15T06:09:23Z beach: Hmm. I see! :) 2014-11-15T06:09:32Z drmeister: Nope, I'm still seeing the problem. 2014-11-15T06:09:59Z drmeister: I'm sure that example worked on my other machine yesterday. 2014-11-15T06:10:20Z kushal quit (Quit: Leaving) 2014-11-15T06:10:42Z drmeister: Do you recall what function we traced to identify the problem? 2014-11-15T06:11:08Z beach: Not really. 2014-11-15T06:11:37Z beach: But if you trace variable-info, defining-variable-info, and make-info that should give you an idea. 2014-11-15T06:14:16Z drmeister: https://www.irccloud.com/pastebin/DYSwVFDl 2014-11-15T06:14:52Z drmeister: Argh - it feels like your fix isn't in my version of the SICL repo but I've pulled it several times. 2014-11-15T06:15:42Z beach: Yeah. 2014-11-15T06:15:44Z drmeister: Maybe ASDF isn't compiling the system properly. 2014-11-15T06:15:55Z beach: And it doesn't contain the LET fix either. 2014-11-15T06:16:23Z beach: Because it still calls variable-info on Y and an environment that contains X. 2014-11-15T06:16:39Z drmeister: Is there a quick way to tell ASDF to clear its cache? 2014-11-15T06:17:13Z beach: rm $(find ~/.cache/common-lisp -name "*.fasl") or something like that. 2014-11-15T06:17:29Z drmeister: I wiped it out. 2014-11-15T06:18:21Z drmeister: Let's see if that fixes the problem. 2014-11-15T06:18:58Z beach: This call: (CLEAVIR-ENVIRONMENT::DEFINING-VARIABLE-INFO a CLEAVIR-ENVIRONMENT:LEXICAL-VARIABLE#<0x10b31b518> Y) should not happen. 2014-11-15T06:19:51Z usrj joined #lisp 2014-11-15T06:20:16Z drmeister: Nope, that didn't fix it. 2014-11-15T06:20:32Z drmeister: Ok, if it's some weirdness with git I'll figure it out tomorrow. 2014-11-15T06:20:39Z beach: OK. 2014-11-15T06:20:42Z drmeister: I don't want to drive you nuts with my problems with git. 2014-11-15T06:21:02Z beach: Thanks, I appreciate that! :) 2014-11-15T06:21:22Z drmeister: On the plus side I've redefined MACRO-FUNCTION - I'm excited to see if it works. 2014-11-15T06:21:48Z beach: Yeah, that method should be easier, once we figure out exactly what is needed. 2014-11-15T06:22:04Z drmeister: How is the non-local exits and cleanup coming? 2014-11-15T06:22:21Z beach: Slowly. :) 2014-11-15T06:22:25Z ggole joined #lisp 2014-11-15T06:22:38Z beach: I still need some HIR notation for this weird case I showed before. 2014-11-15T06:23:01Z beach: (lambda (...) (block b (ff (lambda (...) (return-from b (gg ...)))))) 2014-11-15T06:23:16Z drmeister: Oh yeah. 2014-11-15T06:23:50Z beach: But I must figure out whether I also need the same thing for multiple-value-call, so I need to think it through first. 2014-11-15T06:24:03Z drmeister: What about (lambda (...) (tagbody a (ff (lambda (...) (go b) ...)) b ...)) Is that the same problem? 2014-11-15T06:24:22Z beach: No that's easier because TAGBODY can't be in a tail position. 2014-11-15T06:24:35Z beach: I fixed that one already. 2014-11-15T06:24:42Z kcj quit (Remote host closed the connection) 2014-11-15T06:25:06Z drmeister: Ok, so everything is cleaned up and unwound in the tag body case? 2014-11-15T06:25:12Z beach: Yes. 2014-11-15T06:25:29Z beach: The HIR program will contain an UNWIND-INSTRUCTION. 2014-11-15T06:26:12Z nyef: So, really, the issue is handling the unknown set of values being returned from the block? 2014-11-15T06:26:28Z beach: I think so, yes. 2014-11-15T06:26:32Z Vutral quit (Ping timeout: 245 seconds) 2014-11-15T06:26:34Z chu joined #lisp 2014-11-15T06:26:34Z drmeister: I've been thinking about this. When I do a GO to a label within the same function I'd like to use a simple jump but if a GO from one function to a label in another will require a non local exit. Will that be a problem? 2014-11-15T06:26:55Z nyef: TAGBODY/GO at least doesn't have values to move around. 2014-11-15T06:26:55Z beach: drmeister: That's how it looks in HIR right now. 2014-11-15T06:27:08Z beach: Yeah, it is much easier. 2014-11-15T06:27:13Z drmeister: I'm dying to generate some HIR. 2014-11-15T06:27:40Z beach: drmeister: If you have a local GO, then there will be no UNWIND-INSTRUCTION in the HIR program. 2014-11-15T06:28:46Z drmeister: I need to play with it to appreciate what you are saying. I'll figure out what's going on with git tomorrow. Must sleep now. 2014-11-15T06:28:56Z beach: Sleep well. 2014-11-15T06:28:58Z drmeister: Thank you! 2014-11-15T06:29:07Z jlarocco joined #lisp 2014-11-15T06:29:25Z nyef: drmeister: Yes, sleep well. 2014-11-15T06:29:40Z nyef: For that matter, I need to get some sleep myself. 2014-11-15T06:29:49Z beach: 'night nyef! 2014-11-15T06:30:25Z nyef: beach: Good luck figuring out how to handle values in BLOCK/RETURN-FROM. I don't really have a solution for you, but I can at least appreciate the problem. (-: 2014-11-15T06:30:36Z nyef quit (Quit: G'night all) 2014-11-15T06:33:20Z Vutral joined #lisp 2014-11-15T06:38:26Z ggole: beach: what's the issue with compiling that form? 2014-11-15T06:40:38Z jlarocco quit (Quit: This computer has gone to sleep) 2014-11-15T06:41:10Z ndrei joined #lisp 2014-11-15T06:42:43Z meiji11 joined #lisp 2014-11-15T06:42:47Z zRecursive quit (Remote host closed the connection) 2014-11-15T06:49:06Z antonv quit (Ping timeout: 264 seconds) 2014-11-15T06:58:49Z Blaguvest quit (Remote host closed the connection) 2014-11-15T07:05:20Z beach: ggole: All the values returned by GG need to be saved in some secret place. Then the stack must be unwound. Finally the saved values must be returned from BLOCK. 2014-11-15T07:05:43Z beach: But we might not be able to determine how many values there are. 2014-11-15T07:09:02Z mrSpec joined #lisp 2014-11-15T07:10:46Z Petit_Dejeuner joined #lisp 2014-11-15T07:10:57Z pppp2 quit (Ping timeout: 240 seconds) 2014-11-15T07:11:28Z beach: ggole: Do you see it? 2014-11-15T07:11:36Z ggole: Ah, yes 2014-11-15T07:11:48Z ggole: I take it you have to resort to dynamic allocation there. :( 2014-11-15T07:12:03Z beach: Yes, but hopefully only on the stack. 2014-11-15T07:12:51Z beach: What I am more interested in right now is how to represent this situation in the intermediate language. 2014-11-15T07:12:54Z ggole: But can you do that? You need to reserve space for return values at block b, but at that point you don't know how many there are. 2014-11-15T07:13:10Z ggole: (You could reserve "a bit" and fall back on the heap if there are too many, though.) 2014-11-15T07:13:11Z beach: Good question. 2014-11-15T07:13:22Z beach: Yeah, sounds reasonable. 2014-11-15T07:13:44Z ggole: Bit of a nasty case, that. 2014-11-15T07:13:46Z beach: Also, on the x86-64, there is space beyond the top of the stack that can be used. 2014-11-15T07:13:58Z beach: Very nasty. 2014-11-15T07:14:01Z ggole: Right, the red zone. 2014-11-15T07:14:16Z beach: Yeah. 2014-11-15T07:16:37Z beach: This deserves a chapter in my book "Common Lisp for language implementers" :) 2014-11-15T07:17:47Z theotherstupidgu quit (Ping timeout: 245 seconds) 2014-11-15T07:20:34Z kcj joined #lisp 2014-11-15T07:20:43Z kcj quit (Changing host) 2014-11-15T07:20:43Z kcj joined #lisp 2014-11-15T07:23:05Z Petit_Dejeuner quit (Ping timeout: 265 seconds) 2014-11-15T07:25:12Z usrj quit (Quit: Leaving) 2014-11-15T07:26:47Z jlarocco joined #lisp 2014-11-15T07:26:56Z jlarocco quit (Client Quit) 2014-11-15T07:31:07Z beach adds a chapter to the book. 2014-11-15T07:32:05Z chu quit (Quit: ERC Version 5.3 (IRC client for Emacs)) 2014-11-15T07:36:15Z nydel quit (Quit: WeeChat 0.4.2) 2014-11-15T07:36:23Z beach: I guess multiple-value-prog1 might need something similar. 2014-11-15T07:37:36Z nydel joined #lisp 2014-11-15T07:38:09Z beach: No stack unwinding required there of course. 2014-11-15T07:43:15Z pjb: - 2014-11-15T07:48:00Z fantazo quit (Ping timeout: 250 seconds) 2014-11-15T08:01:05Z beach: I think I might have a solution for the nasty case and for MULTIPLE-VALUE-PROG1: I introduce two new instructions: VALUES-CALL which is like CALL, but with no outputs, and VALUES-RETURN which is like RETURN but with no inputs. The two are linked so that it's clear which VALUES-CALL instruction transmits an arbitrary number of values to which VALUES-RETURN instruction. 2014-11-15T08:01:34Z beach: The nasty case would be VALUES-CALL followed by UNWIND, followed by VALUES-RETURN. 2014-11-15T08:01:36Z tadni` joined #lisp 2014-11-15T08:02:14Z cy quit (Quit: :q!) 2014-11-15T08:02:37Z tadni quit (Ping timeout: 240 seconds) 2014-11-15T08:02:49Z beach: MULTIPLE-VALUE-PROG1 would be VALUES-CALL, then instructions to execute the body, then VALUES-RETURN. 2014-11-15T08:04:26Z Shinmera joined #lisp 2014-11-15T08:06:56Z beach: The compilation context needs to be augmented. Right now there is an INVOCATION slot that needs to be renamed to CURRENT-INVOCATION, and I need to add a VALUES-INVOCATION slot. When a form is compiled for value AND the two invocations are different AND the value invocation wants all values AND the current AST being compiled is a CALL, then it generates VALUES-CALL followed by UNWIND, followed by VALUES-RETURN. 2014-11-15T08:07:06Z joneshf-laptop joined #lisp 2014-11-15T08:07:37Z tbarletz quit (Ping timeout: 272 seconds) 2014-11-15T08:08:18Z beach: All other cases can be handles specially, I think. 2014-11-15T08:11:22Z ofosos quit (Read error: Connection reset by peer) 2014-11-15T08:12:50Z beach: Too bad nyef is gone. 2014-11-15T08:15:18Z tbarletz joined #lisp 2014-11-15T08:17:14Z sword` quit (Remote host closed the connection) 2014-11-15T08:17:14Z meiji11 quit (Read error: Connection reset by peer) 2014-11-15T08:18:07Z rtra quit (Ping timeout: 265 seconds) 2014-11-15T08:19:13Z Nilly joined #lisp 2014-11-15T08:22:23Z quazimodo quit (Ping timeout: 255 seconds) 2014-11-15T08:23:08Z rtra joined #lisp 2014-11-15T08:26:58Z tesuji joined #lisp 2014-11-15T08:30:27Z kuimacro2 joined #lisp 2014-11-15T08:30:51Z kuimacro quit (Read error: Connection reset by peer) 2014-11-15T08:32:47Z tadni` quit (Remote host closed the connection) 2014-11-15T08:37:34Z ggole: beach: so there is one values-return for each values-call? What if there are multiple return-froms targetting the same block? 2014-11-15T08:45:56Z beach: Right. 2014-11-15T08:46:13Z beach: Let me think. 2014-11-15T08:46:37Z beach: The VALUES-RETURN is generated as a result of the BLOCK being in tail position. 2014-11-15T08:47:11Z beach: The VALUES-CALL is generated because the argument of the RETURN-FROM is a function call, so we don't know the number of values. 2014-11-15T08:48:01Z beach: I guess I could save some instructions by using the same VALUES-RETURN for several VALUES-CALL. 2014-11-15T08:48:11Z beach: But that might also complicate things. 2014-11-15T08:49:04Z beach: Probably not worth the trouble. 2014-11-15T08:51:07Z beach: So if there are multiple RETURN-FROMs targeting the same BLOCK, then each one will generate a pair of VALUES-CALL and VALUES-RETURN. 2014-11-15T08:52:27Z beach: Does that make sense? 2014-11-15T08:53:22Z usrj joined #lisp 2014-11-15T08:53:32Z jegaxd26 joined #lisp 2014-11-15T08:54:49Z kcj quit (Remote host closed the connection) 2014-11-15T08:55:09Z ggole: Hmm 2014-11-15T08:55:52Z ggole: I was thinking of values-return as reserving storage and values-call populating it, but you seem to be heading in a different direction with it. 2014-11-15T08:56:06Z pjb: It seems to me that multiple values can be handled by the generic data flow analysis algorithm. Of course, there's a need for a convention to collect multiple value results in the case of a non-inlined function, but otherwise (and very importantly) for the CL operators dealing with multiple values, they could all be open-coded and optimized out. 2014-11-15T08:56:10Z beach: Yes, the exact opposite! :) 2014-11-15T08:56:56Z beach: pjb: Right. The case above is only for when it can't be optimized. 2014-11-15T08:57:05Z ggole: So this is essentially a form of destination-passing style... which I like 2014-11-15T08:57:05Z bb010g quit (Quit: Connection closed for inactivity) 2014-11-15T08:58:14Z beach: ggole: I actually haven't decided how storage is allocated. Just that there needs to be a transmission of values from VALUES-CALL to VALUES-RETURN with some intermediate storage. 2014-11-15T08:58:21Z ggole: I still don't understand why the pairs are one-to-one, though. Wouldn't you want to use the same reserved storage for each possible return-from? 2014-11-15T08:58:27Z ggole: I see. 2014-11-15T08:58:49Z ggole: That makes more sense. 2014-11-15T08:58:49Z beach: Yes, you may be right, but I haven't thought about that aspect yet. 2014-11-15T08:58:57Z pjb: That's why I'm dubious about values-return, if I've understood correctly, that's only used to store the multiple value results before the function exit? That could be implicit. 2014-11-15T08:59:16Z beach: pjb: Implicit how? 2014-11-15T09:00:51Z pjb: What I mean, is that it's when we obtain the values to be returned, that we know the position of the value. I assume (cl:values 1 'a 'b) --> (value-call 0 1) (value-call 1 'a) (value-call 2 'b), right? 2014-11-15T09:00:54Z drdanmaku quit (Quit: Connection closed for inactivity) 2014-11-15T09:01:55Z pjb: There's also the need to specify the number of multiple values in some way. 2014-11-15T09:02:40Z beach: That's not what I am thinking. 2014-11-15T09:02:56Z beach: There is one values-call for all values, because we don't know how many values there will be. 2014-11-15T09:02:57Z pjb: (if (zerop (random 2)) (values) (values 1 2)) --> (if (zerop (random 2)) (progn ?) (progn (value-call 0 1) (value-call 1 2) count?)) 2014-11-15T09:03:06Z pjb: Oh. 2014-11-15T09:03:09Z ggole: The issue is dealing with a number of values that is unknown (because they come from an unknown function). 2014-11-15T09:03:31Z pjb: something like: (if (zerop (random 2)) (cl:values) (cl:values 1 2)) --> (if (zerop (random 2)) (value-call) (value-call 1 2)) 2014-11-15T09:03:39Z beach: pjb: All of the cases that have explicit VALUES forms can be handled specially because then we know the number of values. 2014-11-15T09:04:12Z beach: pjb: The problem arises when we don't know the number of values because it is a call to a user-defined function. 2014-11-15T09:04:17Z pjb: Yes. 2014-11-15T09:04:24Z pjb: In that case it should be "pass-thru". 2014-11-15T09:04:31Z ehu joined #lisp 2014-11-15T09:04:46Z beach: In that case, ordinary instructions with a fixed number of inputs and outputs would be used. 2014-11-15T09:04:59Z beach: And those inputs and outputs would be subject to register allocation and such. 2014-11-15T09:05:07Z beach: Those cases are already taken care of. 2014-11-15T09:05:29Z Nilly left #lisp 2014-11-15T09:06:12Z pjb: But still. Doesn't it matter only when the function call is a terminal call? that's why I don't understand the nede for the value-call/value-return stubs. 2014-11-15T09:06:36Z beach: Consider (lambda () (multiple-value-prog1 (ff ...) form1 form2 ...)) 2014-11-15T09:06:51Z pjb: The problem of multiple-value-prog1 being that the second expression has the side effect of modifying the multiple value storage. 2014-11-15T09:07:02Z beach: NO 2014-11-15T09:07:12Z beach: No (sorry, didn't mean to shout) 2014-11-15T09:07:22Z pjb: Oh, so you mean that value-call/value-return is used to represent this case when we save the multiple-values and restore them on exit? 2014-11-15T09:07:29Z beach: Yes. 2014-11-15T09:07:37Z pjb: Ah, right. Yes, that's very nice. 2014-11-15T09:07:48Z ggole: The names are a bit deceptive, perhaps. 2014-11-15T09:07:58Z beach: I am open to suggestions. 2014-11-15T09:08:03Z ggole: values-save/values-restore? 2014-11-15T09:08:04Z pjb: save-values/restore-values? 2014-11-15T09:08:05Z malbertife joined #lisp 2014-11-15T09:08:07Z ggole: :) 2014-11-15T09:08:14Z pjb: or ggole's right. 2014-11-15T09:08:30Z beach: I thought VALUES-CALL was a CALL where the values are kept, and VALUES-RETURN was a RETURN of restored values. 2014-11-15T09:08:43Z pjb: Yes, that's also understandable. 2014-11-15T09:09:03Z beach: ggole: But then one might think that save-values needs to be used in situations other than a function call. 2014-11-15T09:09:06Z beach: That's not the case. 2014-11-15T09:09:09Z ggole: Is this situation limited to calls, though? What about (apply #'values unknown-list)? 2014-11-15T09:09:13Z ggole: Right. 2014-11-15T09:09:18Z ggole: Oh? 2014-11-15T09:09:24Z beach: I haven't though about APPLY yet. 2014-11-15T09:09:27Z beach: Let me think. 2014-11-15T09:10:00Z pjb: actually, I was thinking about the optimization of forms like: nth-value or (value-list (subseq (multiple-value-list (ff)) start end)). 2014-11-15T09:10:15Z pjb: which is why I thought value-call would take a single value at a time. 2014-11-15T09:10:23Z beach: pjb: I see. 2014-11-15T09:10:45Z beach: ggole: APPLY is a known function, but we don't know how many values it returns. 2014-11-15T09:10:51Z beach: [thinking out loud] 2014-11-15T09:11:25Z beach: Two cases, either the call is in terminal position, or we know the number of values required. 2014-11-15T09:11:36Z tajjada joined #lisp 2014-11-15T09:12:01Z beach: If we know the number of values required, we just generate the call and keep the first N values returned. 2014-11-15T09:12:13Z beach: So that's not a special case. 2014-11-15T09:12:47Z beach: In the case when the call is in a terminal position, it would become a tail call. 2014-11-15T09:12:58Z beach: Nothing special there either. 2014-11-15T09:13:02Z beach: As far as I can see. 2014-11-15T09:14:12Z ggole: So (apply #'values ...) is no different to calling an unknown function? 2014-11-15T09:14:32Z beach: At least that's always a possibility. 2014-11-15T09:14:38Z pjb: Well if the arguments are fixed, it can be optimized out as a known function. 2014-11-15T09:14:45Z pjb: But in general, yes. 2014-11-15T09:14:53Z gravicappa joined #lisp 2014-11-15T09:15:10Z beach: ggole: If the list is unknown, I don't see how it can be optimized. 2014-11-15T09:15:19Z TDog joined #lisp 2014-11-15T09:16:06Z ggole: Same here - I was wondering how you would represent this in the IR 2014-11-15T09:16:30Z ggole: But I suppose calling apply works fine. 2014-11-15T09:16:42Z beach: Yeah, I think so. 2014-11-15T09:17:50Z beach: Thanks for discussing this with me ggole and pjb. It helps a lot. 2014-11-15T09:17:56Z edgar-rft joined #lisp 2014-11-15T09:18:59Z usrj quit (Ping timeout: 245 seconds) 2014-11-15T09:19:52Z kushal joined #lisp 2014-11-15T09:21:46Z beach: OK, I think I'll try this suggested solution. It is not too much work to implement it, so if it turns out to be wrong, not much work has been wasted. 2014-11-15T09:22:07Z pt1 joined #lisp 2014-11-15T09:24:12Z tesuji quit (Remote host closed the connection) 2014-11-15T09:24:25Z tesuji joined #lisp 2014-11-15T09:24:37Z hiyosi quit (Ping timeout: 240 seconds) 2014-11-15T09:24:44Z vaporatorius joined #lisp 2014-11-15T09:26:33Z chu joined #lisp 2014-11-15T09:28:41Z stacksmith quit (Ping timeout: 272 seconds) 2014-11-15T09:28:45Z hardenedapple joined #lisp 2014-11-15T09:29:03Z k-stz joined #lisp 2014-11-15T09:32:06Z pt1 quit (Remote host closed the connection) 2014-11-15T09:34:10Z Nilby joined #lisp 2014-11-15T09:35:03Z Shinmera quit (Quit: しつれいしなければならないんです。) 2014-11-15T09:35:56Z zacharias quit (Ping timeout: 265 seconds) 2014-11-15T09:40:40Z defaultxr quit (Quit: gnight) 2014-11-15T09:40:57Z chu quit (Ping timeout: 240 seconds) 2014-11-15T09:43:04Z beach: [taking advantage of the silence] I added more suggested projects here: http://metamodular.com/Common-Lisp/suggested-projects.html 2014-11-15T09:43:26Z beach: I particularly like the document-recovery project, because it is unique. 2014-11-15T09:43:43Z beach: Plus, I have some algorithms for increasing the resolution of such documents. 2014-11-15T09:44:31Z beach: We could use it to recover the Common Lisp standard document. Apparently, the sources have been lost. :) 2014-11-15T09:46:58Z jumblerg joined #lisp 2014-11-15T09:48:07Z jumblerg quit (Client Quit) 2014-11-15T09:49:51Z tadni joined #lisp 2014-11-15T09:50:12Z Vutral quit (Ping timeout: 250 seconds) 2014-11-15T09:50:33Z fantazo joined #lisp 2014-11-15T09:51:50Z mishoo joined #lisp 2014-11-15T09:52:49Z Nilby: You may have noticed Google has one of those. And lots of lawyers to defend its use. 2014-11-15T09:53:02Z stepnem joined #lisp 2014-11-15T09:53:17Z beach: They do? 2014-11-15T09:53:31Z beach: I was thinking they only scanned and put it onine. 2014-11-15T09:53:37Z beach: Do you have a reference? 2014-11-15T09:53:38Z Nilby: http://books.google.com/ 2014-11-15T09:53:45Z Nilby: and full text search 2014-11-15T09:54:07Z beach: Aren't they just scanned? 2014-11-15T09:54:26Z beach: I don't think Google has the staff to process documents as that project suggests. 2014-11-15T09:55:20Z theBlackDragon quit (Ping timeout: 265 seconds) 2014-11-15T09:55:47Z Nilby: Correct, so it's fairly automatic. 2014-11-15T09:56:03Z beach: Right. That's the exact opposite of what I am suggesting. 2014-11-15T09:56:48Z theBlackDragon joined #lisp 2014-11-15T09:57:03Z Vutral joined #lisp 2014-11-15T09:58:09Z Nilby: You're suggesting recovering formatting as well as text, right? 2014-11-15T09:58:36Z beach: Right. In fact, the meaning of the text would be secondary. 2014-11-15T09:58:49Z Krystof quit (Read error: Connection reset by peer) 2014-11-15T10:00:35Z beach: The main idea is to take all the instances of one glyph (say a letter or a ligature) and compute some "best representative", and finally to replace all the instances of that representative. 2014-11-15T10:01:00Z usrj joined #lisp 2014-11-15T10:03:14Z beach: WITH that representative. 2014-11-15T10:03:52Z beach: replace all the instances of that glyph with that representative. 2014-11-15T10:04:17Z Nilby: But if you deduce the font? 2014-11-15T10:04:39Z kushal quit (Quit: Leaving) 2014-11-15T10:05:09Z Nilby: Assuming you have all the worlds fonts. 2014-11-15T10:05:42Z pt1 joined #lisp 2014-11-15T10:09:00Z beach: That's precisely what I want to avoid. 2014-11-15T10:09:46Z Nilby: Ah. I do like your idea. 2014-11-15T10:10:37Z Nilby: But I guess it's not exactly input a scanned page, output a TeX file. 2014-11-15T10:11:03Z beach: Not quite, no :) 2014-11-15T10:11:31Z beach: Input 200 pages, spend a week interacting with the system. THEN output a TeX file. :) 2014-11-15T10:12:19Z beach: It would be used by archives and such for re-editing old books for instance. 2014-11-15T10:12:45Z beach: Out of copyright, so that the lawyers are not needed. 2014-11-15T10:12:48Z eni joined #lisp 2014-11-15T10:13:03Z Nilby: I would bet Google's book scanning at least retains rectangles for converted text. I would bet it gathers or retains other things. 2014-11-15T10:13:41Z beach: Yeah, that's likely. I don't know what they do, and I don't know how to find out. 2014-11-15T10:13:43Z Nilby: Anything that avoids lawyers is good. 2014-11-15T10:18:15Z zacharias joined #lisp 2014-11-15T10:20:33Z pt1 quit (Remote host closed the connection) 2014-11-15T10:22:20Z eni quit (Ping timeout: 265 seconds) 2014-11-15T10:22:32Z pt1 joined #lisp 2014-11-15T10:24:38Z attila_lendvai joined #lisp 2014-11-15T10:25:53Z hiyosi joined #lisp 2014-11-15T10:31:05Z hiyosi quit (Ping timeout: 264 seconds) 2014-11-15T10:33:17Z pt1 quit (Remote host closed the connection) 2014-11-15T10:35:37Z beach: Nilby: Discussing this with you made me think of another pet project of mine that I never had the time to do much about, namely recovering and improving printed music scores. So I added it to the list. 2014-11-15T10:35:41Z hiroakip joined #lisp 2014-11-15T10:35:41Z eni joined #lisp 2014-11-15T10:36:02Z usrj quit (Ping timeout: 255 seconds) 2014-11-15T10:38:48Z eni quit (Client Quit) 2014-11-15T10:43:01Z pjb: beach: Re: recovering and improving printed documents, have a look at the transcription I made afew years ago of (April 1959 article "A Fortran-Compiled List-Processing Language" by: H. Gelernter, J. R. Hansen, C. L. Gerberich). I transcribed scans of it into machine readable form. For the diagrams, I wrote a little lisp program to re-generate them (since they represent sexps, it was a natural option): 2014-11-15T10:43:01Z pjb: http://www.informatimago.com/articles/flpl/index.html 2014-11-15T10:44:14Z beach quit (Read error: Connection reset by peer) 2014-11-15T10:44:18Z pjb: A workstation that would help doing that automatically would be nice indeed :-) 2014-11-15T10:46:53Z beach joined #lisp 2014-11-15T10:47:09Z beach: Sorry, my computer crashed. 2014-11-15T10:48:20Z beach: pjb: Nice! 2014-11-15T10:49:06Z beach: How did you transcribe it? 2014-11-15T10:49:57Z beach: Oh, you typed it in? 2014-11-15T10:51:59Z rszeno joined #lisp 2014-11-15T10:52:23Z beach: It's a lot of work, and it's error prone so there is a lot of verification required. 2014-11-15T10:53:19Z oleo__ quit (Quit: Verlassend) 2014-11-15T10:54:50Z oleo joined #lisp 2014-11-15T10:54:59Z Nilby: I just use my friend for recovering music scores, but I do have a Lisp project to emulate my friend. :) 2014-11-15T10:55:30Z beach: Your friend uses an engraving program to reproduce the scores? 2014-11-15T10:55:40Z Nilby: Like most OCR it's at least 99% accurate. 2014-11-15T10:56:09Z Nilby: Input: Transcibe a score for me? Output: Sod Off! 2014-11-15T10:56:17Z beach: Yeah. 99% accuracy on a page with 2000 characters means there are 20 errors on the page on the average. 2014-11-15T10:56:43Z pt1 joined #lisp 2014-11-15T10:56:43Z beach: 99% sounds very accurate but it is totally insufficient. 2014-11-15T10:56:53Z Nilby: A few decimal places make all the difference. 2014-11-15T10:58:00Z Nilby: I learned years ago when working on an OCR project just how much that means by hand. 2014-11-15T10:58:31Z beach: Having high accuracy? Definitely! 2014-11-15T11:00:00Z beach: My document-recovery system would be able to make a "dictionary" of "words" and therefore to detect errors in the analysis. 2014-11-15T11:00:28Z robot-beethoven quit (Quit: ERC Version 5.3 (IRC client for Emacs)) 2014-11-15T11:00:39Z beach: It works because the number of different words used in a large document is much much smaller than the total number of occurrences of words in it. 2014-11-15T11:01:55Z Karl_Dscc joined #lisp 2014-11-15T11:03:14Z Nilby: You might be suprised how little just the dictionary helps without further statistical analysis. 2014-11-15T11:03:33Z Krystof joined #lisp 2014-11-15T11:03:40Z beach: Really? I believe you, but I don't quite understand why. 2014-11-15T11:06:31Z Nilby: The optical difference between many words is suprisingly small. Humans rarely notices since we can fill in omitted words because of semantics. 2014-11-15T11:07:11Z beach: I see. Interesting. 2014-11-15T11:10:22Z Nilby: Modern scanners already use dictionaries and statisical language corpus data, and still fail nearly as much as the old ones. Kurzweil even did it with some of the first OCR systems. 2014-11-15T11:12:05Z ioanna joined #lisp 2014-11-15T11:12:27Z beach: I had no idea! Very interesting. I suppose you don't mean the type of 50€ scanner that I have on my desk, right? 2014-11-15T11:12:40Z protist joined #lisp 2014-11-15T11:14:24Z jumblerg joined #lisp 2014-11-15T11:14:45Z mutley89 joined #lisp 2014-11-15T11:16:49Z beach: Nilby: I notice that you are new here. Are you also new to Lisp? 2014-11-15T11:17:30Z mutley89 quit (Read error: Connection reset by peer) 2014-11-15T11:17:38Z Nilby: One that I bought for 80€ did. But some of the OCRing is probably done in the driver on your system rather than on the scanner. 2014-11-15T11:17:52Z beach: Impressive. 2014-11-15T11:17:59Z beach: I learned something new today. 2014-11-15T11:18:46Z mutley89 joined #lisp 2014-11-15T11:19:38Z jumblerg quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2014-11-15T11:20:07Z ioanna left #lisp 2014-11-15T11:21:16Z Nilby: I first coded on a Lisp PDP-10 when I was the same age as the machine. So, no. 2014-11-15T11:21:39Z beach: OK :) 2014-11-15T11:24:02Z ioanna joined #lisp 2014-11-15T11:24:18Z mutley89 quit (Read error: Connection reset by peer) 2014-11-15T11:24:22Z theos quit (Disconnected by services) 2014-11-15T11:24:49Z theos joined #lisp 2014-11-15T11:25:25Z mutley89 joined #lisp 2014-11-15T11:25:53Z hiroakip quit (Ping timeout: 240 seconds) 2014-11-15T11:26:33Z CrazyWoods quit (Quit: leaving) 2014-11-15T11:27:12Z rszeno quit (Quit: Leaving.) 2014-11-15T11:27:20Z pjb: beach: but be careful with dictionary based OCR: its conditions of applicability may render their use difficult. See eg. http://www.dkriesel.com/en/blog/2013/0802_xerox-workcentres_are_switching_written_numbers_when_scanning 2014-11-15T11:27:39Z ioanna: Hi, I'm new to lisp and I can't find out how to print a superscript (with format?) with common lisp. Googling didn't help much! Does anyone know how to do this? 2014-11-15T11:27:53Z pjb: ioanna: format only works with characters. 2014-11-15T11:28:08Z pjb: ioanna: happily, there are unicode superscript characters (but not the full alphabet). 2014-11-15T11:28:29Z pjb: ioanna: alternatively you can print HTML or some other format that would be interpreted and render superscript. 2014-11-15T11:28:46Z ioanna: pjb thanks!! 2014-11-15T11:28:47Z pjb: (format t "x²+2x+1=0~%") 2014-11-15T11:29:22Z beach: pjb: Thanks. Yes, I see the danger. I wasn't suggesting automatic correction. Since it's an interactive system, the dictionary would just be used to signal the position and the suspected error to the operator. 2014-11-15T11:29:27Z pjb: You can also do as in HAL (the programming language of the NASA), where you'd print the exponents and subscripts on different lines. It would be easy to write a function transforming a sexp into a list of lines. 2014-11-15T11:29:59Z pjb: ioanna: http://en.wikipedia.org/wiki/HAL/S 2014-11-15T11:30:02Z pjb: HAL/S 2014-11-15T11:30:48Z beach: pjb: Recently I saw an issue of "ACM Technews" in which they presented a new supercomputer, capable of executing 1018 operations per second. 2014-11-15T11:30:49Z pjb: Then you'd write something like (format t "~{~A~%~}" (split-vertically '(= (+ (expt x 2) (* 2 x) 1) 0))) 2014-11-15T11:30:59Z ioanna: pjb haha, that would look funny :) 2014-11-15T11:31:22Z pjb: beach: in parallel, I assume. 2014-11-15T11:31:36Z josteink quit (Remote host closed the connection) 2014-11-15T11:31:45Z beach: Consulting the original document, it was 10^18. 2014-11-15T11:31:54Z pjb: One famous application of the Connection Machine was to scan the NYT back issues. 2014-11-15T11:31:57Z pt1 quit (Remote host closed the connection) 2014-11-15T11:31:58Z pjb: and OCR. 2014-11-15T11:32:18Z beach: But the person quoting the original document didn't understand superscripts. 2014-11-15T11:32:18Z pjb: beach: Oh, sorry. I had corrected automatically :-) 2014-11-15T11:32:23Z mrSpec quit (Read error: No route to host) 2014-11-15T11:33:05Z mrSpec joined #lisp 2014-11-15T11:34:48Z pjb: Of course, OCR is easier with higher resolution scanners. For difficult documents, we could perhaps use a robot, where a camera would be used to have looks at different resolutions over the different parts of the document. If a part is written too small, the camera would zoom in. 2014-11-15T11:35:30Z malbertife quit (Quit: Leaving) 2014-11-15T11:37:01Z hiroakip joined #lisp 2014-11-15T11:38:28Z jumblerg joined #lisp 2014-11-15T11:39:26Z mutley89 quit (Read error: Connection reset by peer) 2014-11-15T11:39:41Z quazimodo joined #lisp 2014-11-15T11:40:35Z mutley89 joined #lisp 2014-11-15T11:42:07Z ioanna quit (Read error: Connection reset by peer) 2014-11-15T11:42:12Z Nilby: Modern cheap scanners can get nearly 10k dpi, almost enough to scan secret microprinted IDs. 2014-11-15T11:43:55Z mutley89 quit (Read error: Connection reset by peer) 2014-11-15T11:45:03Z mutley89 joined #lisp 2014-11-15T11:45:20Z hiyosi joined #lisp 2014-11-15T11:45:31Z Nilby: Now if only it wouldn't kernel panic the GPU driver. :( 2014-11-15T11:48:32Z wilfredh joined #lisp 2014-11-15T11:48:52Z nha joined #lisp 2014-11-15T11:49:54Z leo2007 quit (Quit: rcirc on GNU Emacs 25.0.50.1) 2014-11-15T11:51:27Z leo2007 joined #lisp 2014-11-15T11:55:23Z mutley89 quit (Read error: Connection reset by peer) 2014-11-15T11:56:31Z mutley89 joined #lisp 2014-11-15T11:57:22Z agumonkey quit (Quit: ZNC - http://znc.in) 2014-11-15T11:58:33Z fantazo quit (Quit: Verlassend) 2014-11-15T11:58:34Z agumonkey joined #lisp 2014-11-15T11:58:41Z jangle quit (Quit: jangle) 2014-11-15T11:59:47Z bdr3553 joined #lisp 2014-11-15T12:00:20Z agumonkey quit (Client Quit) 2014-11-15T12:01:18Z agumonkey joined #lisp 2014-11-15T12:02:43Z bdr3552 quit (Ping timeout: 250 seconds) 2014-11-15T12:05:19Z BitPuffin joined #lisp 2014-11-15T12:06:58Z mutley89 quit (Read error: Connection reset by peer) 2014-11-15T12:07:13Z munksgaard joined #lisp 2014-11-15T12:08:12Z mutley89 joined #lisp 2014-11-15T12:11:54Z mutley89 quit (Read error: Connection reset by peer) 2014-11-15T12:13:01Z mutley89 joined #lisp 2014-11-15T12:15:18Z mutley89 quit (Client Quit) 2014-11-15T12:16:12Z vowyer_ joined #lisp 2014-11-15T12:16:27Z usrj joined #lisp 2014-11-15T12:16:48Z bdr3552 joined #lisp 2014-11-15T12:19:02Z bdr3553 quit (Ping timeout: 245 seconds) 2014-11-15T12:19:05Z nha quit (Ping timeout: 264 seconds) 2014-11-15T12:20:19Z hiroakip quit (Ping timeout: 272 seconds) 2014-11-15T12:21:47Z Beetny quit (Ping timeout: 265 seconds) 2014-11-15T12:24:39Z Blaguvest joined #lisp 2014-11-15T12:24:59Z hiroakip joined #lisp 2014-11-15T12:28:40Z matko joined #lisp 2014-11-15T12:28:40Z Baggers joined #lisp 2014-11-15T12:29:01Z Baggers: 13:28 *** Baggers JOIN 2014-11-15T12:30:50Z wasamasa: !give Baggers rong 2014-11-15T12:31:27Z wasamasa: oh damnit, this isn't #archlinux 2014-11-15T12:31:34Z Baggers: hehe not sure what happened there 2014-11-15T12:31:46Z wasamasa: you probably copied a message from your IRC client 2014-11-15T12:32:42Z Baggers: aye 2014-11-15T12:41:12Z nydel quit (Quit: WeeChat 0.4.2) 2014-11-15T12:42:26Z Baggers: I was thinking about writing a little macro that will define a function unless a given implementation already exists e.g. (ifndefun compose alexandria:compose (func1 &rest funcs) ..my compose implementation..) so that if alexandria has already been loaded by another package it will just use that function, otherwise use my own. Its mainly intended as a way to avoid extra unnecessary functions in memory, and so I make 2014-11-15T12:42:26Z Baggers: utils libraries that aren't just adding extra mess. 2014-11-15T12:42:26Z Baggers: Are there any existing solutions to this, mechanisms we could use to build this, or any problems people can think of that would make this undesirable? 2014-11-15T12:42:59Z mark_____ joined #lisp 2014-11-15T12:43:09Z mark_____ is now known as ofosos 2014-11-15T12:46:52Z manfoo7` joined #lisp 2014-11-15T12:49:28Z nydel joined #lisp 2014-11-15T12:50:36Z JuanDaugherty joined #lisp 2014-11-15T12:52:08Z JuanDaugherty quit (Client Quit) 2014-11-15T12:52:26Z fiveop joined #lisp 2014-11-15T12:52:31Z JuanDaugherty joined #lisp 2014-11-15T12:53:00Z qlkzy quit (Excess Flood) 2014-11-15T12:54:08Z fiveop: H4ns: I found a reason, why you might have created two methods, encode-object and encode-slots: inheritance. 2014-11-15T12:55:36Z H4ns: fiveop: well, as the two functions only had stub methods and no usable documentation, i think it was good to remove them. 2014-11-15T12:55:46Z qlkzy joined #lisp 2014-11-15T12:55:47Z qlkzy quit (Excess Flood) 2014-11-15T12:55:50Z fiveop: you removed them? 2014-11-15T12:55:54Z H4ns: fiveop: i'd not mind re-adding them if there was docs and a useful implementation. 2014-11-15T12:55:58Z H4ns: fiveop: yes. 2014-11-15T12:56:24Z jumblerg quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2014-11-15T12:56:49Z drdanmaku joined #lisp 2014-11-15T12:56:56Z fiveop: encode-object had the perfect default implementation, and encode-slots had none (which was fine as well) 2014-11-15T12:57:11Z usrj quit (Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )) 2014-11-15T12:57:40Z H4ns: fiveop: well, if you want to continue to use them, you'll have to add them as functions in your own system now. 2014-11-15T12:57:52Z oleo__ joined #lisp 2014-11-15T12:58:02Z H4ns: fiveop: which should not cause any significant grief, unless i am missing something. 2014-11-15T12:58:28Z oleo is now known as Guest9188 2014-11-15T12:58:29Z fiveop: My current use case is the following: I have a class NAMED with two slots and lots of derived classes with more slots. To encode them I implement encode-slots for NAMED and for each derived class, if it has extra slots. In the latter implementations I call-next-method. 2014-11-15T12:58:55Z fiveop: So I think it has a place in your library, given a proper documentation and maybe an example. 2014-11-15T12:58:56Z H4ns: fiveop: fair enough, there is nothing wrong with the approach. 2014-11-15T12:59:15Z H4ns: fiveop: right. i'll be happily considering a pull request :) 2014-11-15T12:59:25Z H4ns: gotta run, sorry. 2014-11-15T12:59:30Z vowyer_ quit (Remote host closed the connection) 2014-11-15T12:59:35Z Guest9188 quit (Ping timeout: 272 seconds) 2014-11-15T13:01:29Z Blaguvest quit (Remote host closed the connection) 2014-11-15T13:02:22Z qlkzy joined #lisp 2014-11-15T13:02:23Z qlkzy quit (Excess Flood) 2014-11-15T13:02:37Z karswell quit (Read error: Connection reset by peer) 2014-11-15T13:04:57Z nydel quit (Quit: WeeChat 0.4.2) 2014-11-15T13:04:57Z karswell joined #lisp 2014-11-15T13:05:42Z qlkzy joined #lisp 2014-11-15T13:06:46Z jumblerg joined #lisp 2014-11-15T13:06:47Z karswell quit (Read error: Connection reset by peer) 2014-11-15T13:07:38Z karswell joined #lisp 2014-11-15T13:13:17Z EvW joined #lisp 2014-11-15T13:14:51Z oleo__ quit (Quit: Verlassend) 2014-11-15T13:16:00Z khisanth_ joined #lisp 2014-11-15T13:17:50Z nydel joined #lisp 2014-11-15T13:18:13Z Khisanth quit (Ping timeout: 258 seconds) 2014-11-15T13:19:15Z fiveop quit (Remote host closed the connection) 2014-11-15T13:20:41Z oleo__ joined #lisp 2014-11-15T13:24:01Z oleo__ quit (Client Quit) 2014-11-15T13:25:37Z fantazo joined #lisp 2014-11-15T13:27:42Z vinleod quit (Quit: ["Textual IRC Client: www.textualapp.com"]) 2014-11-15T13:28:11Z usrj joined #lisp 2014-11-15T13:30:27Z LiamH joined #lisp 2014-11-15T13:34:34Z usrj quit (Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )) 2014-11-15T13:36:59Z chu joined #lisp 2014-11-15T13:42:00Z jumblerg quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2014-11-15T13:43:29Z oleo joined #lisp 2014-11-15T13:44:04Z wbooze joined #lisp 2014-11-15T13:45:34Z jumblerg joined #lisp 2014-11-15T13:51:16Z heurist quit (Ping timeout: 255 seconds) 2014-11-15T13:53:58Z Blaguvest joined #lisp 2014-11-15T13:54:44Z usrj joined #lisp 2014-11-15T13:55:08Z heurist joined #lisp 2014-11-15T13:55:57Z keppy quit (Ping timeout: 272 seconds) 2014-11-15T13:57:45Z mvilleneuve joined #lisp 2014-11-15T14:00:14Z ndrei quit (Ping timeout: 250 seconds) 2014-11-15T14:16:14Z Shinmera joined #lisp 2014-11-15T14:17:47Z tajjada quit (Ping timeout: 265 seconds) 2014-11-15T14:18:28Z tajjada joined #lisp 2014-11-15T14:18:33Z usrj quit (Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )) 2014-11-15T14:20:17Z sol__ quit (Disconnected by services) 2014-11-15T14:20:36Z sol__ joined #lisp 2014-11-15T14:21:11Z sol__: hi guys, anyone knows a cl library for working with kafka? 2014-11-15T14:37:46Z axion: how can i modify this loop such that the 2 print forms instead get spliced into the collected list at the beginning and end respectively? http://codepad.org/f3X9QJpY 2014-11-15T14:42:16Z zygentoma joined #lisp 2014-11-15T14:43:50Z EvW1 joined #lisp 2014-11-15T14:44:28Z EvW quit (Remote host closed the connection) 2014-11-15T14:44:38Z keppy joined #lisp 2014-11-15T14:46:19Z pjb: initially collect `(print '(0 0 0)) finally collect `(print '(,radius 0 0)) 2014-11-15T14:46:50Z pjb: Aw, no. 2014-11-15T14:47:12Z pjb: (append (list `(print '(0 0 0))) (loop … collect …) (list `(print '(,final-radius 0 0)))) 2014-11-15T14:47:27Z pjb: Or don't use collect, but push explicitely on a list. 2014-11-15T14:48:02Z axion: ok thanks 2014-11-15T14:51:33Z resttime joined #lisp 2014-11-15T14:55:42Z loke__ joined #lisp 2014-11-15T15:00:40Z sol__: any tips on how to properly setup a small scale project? 2014-11-15T15:02:31Z alpha-: sol__ http://xach.livejournal.com/130040.html 2014-11-15T15:02:38Z loke__: sol__: You can use Quickproject 2014-11-15T15:03:04Z sol__: alpha-, looking at it, wondered if there is any other (say, more modern ^^) way 2014-11-15T15:04:48Z loke__: sol__: what do you mean "more modern"? 2014-11-15T15:04:58Z loke__: You mean, more convlouted? 2014-11-15T15:05:09Z loke__: convoluted, even 2014-11-15T15:05:12Z sol__: loke, post is from 2010 2014-11-15T15:05:28Z Shinmera: That's brand new! 2014-11-15T15:05:47Z loke__: You can use Quickproject. It's basically a small program that generates the files for you 2014-11-15T15:06:04Z loke__: http://www.xach.com/lisp/quickproject/ 2014-11-15T15:06:53Z zygentoma quit (Ping timeout: 272 seconds) 2014-11-15T15:12:00Z khisanth_ is now known as Khisanth 2014-11-15T15:12:03Z loke__: There are close to a million test frameworks for CL. Which one should I use if I don't want to develop my own? 2014-11-15T15:12:31Z Shinmera: I've only used 5am and that was aight. I wanted to take a look at Prove, but haven't had the time to. 2014-11-15T15:12:33Z p_l: I've used fiveam, it was pretty nice 2014-11-15T15:12:50Z loke__: I started using lisp-unit2. That was a bad idea. Quite the awfulness 2014-11-15T15:14:07Z loke__: One of the main features I want is the ability to specify a context in which the tests should run. All tests using the same context should run together, with only a single bringup call first, and a teardown call in the end. 2014-11-15T15:15:39Z Ethan- quit (Ping timeout: 245 seconds) 2014-11-15T15:18:14Z axion: pjb: i did what you said mostly i think...but what is supposed to be the first element is the last :/ 2014-11-15T15:20:15Z Grue`: i didn't even know there was lisp-unit2. i was using the regular lisp-unit 2014-11-15T15:21:49Z LiamH: I use lisp-unit also, it is fine. 2014-11-15T15:24:10Z zygentoma joined #lisp 2014-11-15T15:24:37Z vowyer_ joined #lisp 2014-11-15T15:26:03Z mihailp joined #lisp 2014-11-15T15:27:56Z ndrei joined #lisp 2014-11-15T15:29:47Z chu quit (Quit: ERC Version 5.3 (IRC client for Emacs)) 2014-11-15T15:29:56Z mihailp quit (Client Quit) 2014-11-15T15:37:25Z zlrth joined #lisp 2014-11-15T15:38:22Z pecg joined #lisp 2014-11-15T15:38:30Z pjb: axion: sure, with push you shall use nreverse at the end. 2014-11-15T15:39:47Z pjb: loke: it may be easier to write your own test framework, rather than test the existing ones to select the good one. 2014-11-15T15:41:39Z pecg quit (Client Quit) 2014-11-15T15:41:51Z pecg joined #lisp 2014-11-15T15:41:56Z jumblerg quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2014-11-15T15:49:00Z keppy quit (Ping timeout: 250 seconds) 2014-11-15T15:50:17Z jangle joined #lisp 2014-11-15T15:50:39Z ofosos quit (Ping timeout: 250 seconds) 2014-11-15T15:52:50Z vowyer joined #lisp 2014-11-15T15:54:23Z vowyer_ quit (Ping timeout: 272 seconds) 2014-11-15T15:59:13Z foom quit (Ping timeout: 265 seconds) 2014-11-15T16:00:55Z vowyer_ joined #lisp 2014-11-15T16:01:52Z vowyer quit (Ping timeout: 240 seconds) 2014-11-15T16:01:56Z jumblerg joined #lisp 2014-11-15T16:03:10Z leo2007 quit (Quit: rcirc on GNU Emacs 25.0.50.1) 2014-11-15T16:07:56Z mvilleneuve quit (Quit: This computer has gone to sleep) 2014-11-15T16:09:59Z loke__: I need to load an image file, re-encode it to jpeg using a given resolution and write it to a stream. What library is there that can help me with this? 2014-11-15T16:10:02Z vowyer_: Is there any source code analysis tool that supports Common Lisp? I'm thinking something like Sonar or Ohloh... 2014-11-15T16:11:59Z pecg quit (Quit: WeeChat 1.0.1) 2014-11-15T16:12:19Z pecg joined #lisp 2014-11-15T16:12:36Z pjb: vowyer_: there were a few such tools in the old times (before Common Lisp). There's a CL "lint", but it's rather dubious, and also old-fashioned and lacking. 2014-11-15T16:12:53Z pjb: vowyer_: so really, we'd need a new development of such tools. 2014-11-15T16:13:11Z stacksmith joined #lisp 2014-11-15T16:13:19Z mvilleneuve joined #lisp 2014-11-15T16:13:41Z jlongster joined #lisp 2014-11-15T16:14:15Z mvilleneuve quit (Client Quit) 2014-11-15T16:17:48Z vowyer_ quit (Read error: Connection timed out) 2014-11-15T16:18:31Z vowyer_ joined #lisp 2014-11-15T16:18:32Z beach left #lisp 2014-11-15T16:31:41Z ndrei quit (Ping timeout: 264 seconds) 2014-11-15T16:32:59Z ndrei joined #lisp 2014-11-15T16:39:22Z vowyer_ quit (Ping timeout: 240 seconds) 2014-11-15T16:41:26Z GlassOctober joined #lisp 2014-11-15T16:42:26Z GlassOctober is now known as cy 2014-11-15T16:42:38Z vowyer_ joined #lisp 2014-11-15T16:45:34Z keppy joined #lisp 2014-11-15T16:46:35Z jangle quit (Quit: jangle) 2014-11-15T16:47:09Z stacksmith quit (Ping timeout: 244 seconds) 2014-11-15T16:48:34Z pt1 joined #lisp 2014-11-15T16:49:40Z ndrei quit (Ping timeout: 250 seconds) 2014-11-15T16:50:01Z keppy quit (Ping timeout: 250 seconds) 2014-11-15T16:50:58Z k-stz: thx for suggesting cxml-stp to me #lisp. xml parsing now is fun again 2014-11-15T16:51:51Z jlarocco joined #lisp 2014-11-15T16:59:02Z Vutral quit (Ping timeout: 244 seconds) 2014-11-15T16:59:47Z zacharias quit (Ping timeout: 258 seconds) 2014-11-15T17:02:07Z pt1 quit (Remote host closed the connection) 2014-11-15T17:05:46Z Vutral joined #lisp 2014-11-15T17:06:27Z stacksmith joined #lisp 2014-11-15T17:09:10Z keppy joined #lisp 2014-11-15T17:18:36Z Petit_Dejeuner joined #lisp 2014-11-15T17:19:46Z jumblerg quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2014-11-15T17:22:25Z chu joined #lisp 2014-11-15T17:29:20Z jumblerg joined #lisp 2014-11-15T17:32:13Z hiyosi quit (Ping timeout: 255 seconds) 2014-11-15T17:34:28Z jlarocco quit (Quit: This computer has gone to sleep) 2014-11-15T17:34:55Z pgomes joined #lisp 2014-11-15T17:37:57Z tajjada_ joined #lisp 2014-11-15T17:39:42Z tajjada quit (Quit: Reconnecting) 2014-11-15T17:39:50Z tajjada_ is now known as tajjada 2014-11-15T17:42:58Z ndrei joined #lisp 2014-11-15T17:44:17Z davazp joined #lisp 2014-11-15T17:44:22Z bool_ quit (Ping timeout: 240 seconds) 2014-11-15T17:45:32Z jlongster quit (Ping timeout: 244 seconds) 2014-11-15T17:48:51Z Nilby left #lisp 2014-11-15T17:52:29Z jumblerg quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2014-11-15T17:57:38Z keppy quit (Ping timeout: 265 seconds) 2014-11-15T17:58:32Z vowyer_ quit (Remote host closed the connection) 2014-11-15T17:59:47Z quazimodo quit (Ping timeout: 272 seconds) 2014-11-15T18:02:24Z InfusoElAmbulant joined #lisp 2014-11-15T18:04:02Z keppy joined #lisp 2014-11-15T18:04:20Z protist quit (Quit: Konversation terminated!) 2014-11-15T18:08:47Z keppy quit (Ping timeout: 258 seconds) 2014-11-15T18:12:43Z kanru` quit (Ping timeout: 255 seconds) 2014-11-15T18:13:37Z simon joined #lisp 2014-11-15T18:14:12Z MoALTz_ joined #lisp 2014-11-15T18:17:13Z hiroakip quit (Ping timeout: 255 seconds) 2014-11-15T18:17:41Z ehu_ joined #lisp 2014-11-15T18:18:17Z s00pcan quit (Remote host closed the connection) 2014-11-15T18:18:18Z Mon_Ouie joined #lisp 2014-11-15T18:18:30Z MoALTz quit (Ping timeout: 264 seconds) 2014-11-15T18:18:49Z pgomes quit (Quit: Leaving) 2014-11-15T18:19:53Z drmeister: Ugh - ECL and thus Clasp implement the construct EXT:LAMBDA-BLOCK that works like LAMBDA but explicitly declares a block. beach's Cleavir doesn't like EXT:LAMBDA-BLOCK and rightly so - it's not standard Common Lisp. 2014-11-15T18:20:06Z fantazo quit (Quit: Verlassend) 2014-11-15T18:20:45Z drmeister: Do other Common Lisps implement something like LAMBDA-BLOCK? 2014-11-15T18:21:09Z hiroakip joined #lisp 2014-11-15T18:21:23Z ehu quit (Ping timeout: 265 seconds) 2014-11-15T18:21:32Z ehu joined #lisp 2014-11-15T18:21:37Z ehu_ quit (Ping timeout: 240 seconds) 2014-11-15T18:21:39Z drmeister: I believe (EXT:LAMBDA-BLOCK block-name (args...) body...) == (LAMBDA (args...) (BLOCK block-name body...)) 2014-11-15T18:23:58Z zygentoma quit (Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/) 2014-11-15T18:24:45Z pjb: (defmacro lambda-block ((&rest lambda-list) &body body) `(lambda ,lambda-list (block nil ,@body))) ; now they all do. 2014-11-15T18:25:03Z pjb: (defmacro lambda-block (name (&rest lambda-list) &body body) `(lambda ,lambda-list (block ,name ,@body))) ; if you prefer. 2014-11-15T18:25:59Z pjb: drmeister: the question is whether it has a macro definition. As long as it does, I don't see what the problem should be. 2014-11-15T18:26:42Z pjb: drmeister: and as long as an operator as a macro definition, it can be implemented as a special operator by some implementation, again it doesn't matter and shouln't pose any problem. 2014-11-15T18:26:45Z davazp quit (Remote host closed the connection) 2014-11-15T18:27:05Z pjb: Very important: a conforming implementation shall provide a macro function for all the non-standard special operators it implements. 2014-11-15T18:28:51Z hiyosi joined #lisp 2014-11-15T18:30:10Z drmeister: I don't think it has a macro definition in ECL. I'm going way back in my memory here. Hang on - checking. 2014-11-15T18:31:28Z pecg quit (Quit: WeeChat 1.0.1) 2014-11-15T18:32:41Z drmeister: Yup, ECL implemented it at a very low level. In the C source code when they test for the symbol @'lambda' the next thing they test for is @'ext::lambda-block'. I copied ECLs approach because I didn't know better at the time. 2014-11-15T18:33:17Z pjb: You can keep it as a special operator, but you must provide a macro definition for it. 2014-11-15T18:33:37Z hiyosi quit (Ping timeout: 245 seconds) 2014-11-15T18:33:56Z pjb: All of CL can be special operators (ie. functions can be open-coded, and macros can be implemented as special operators). 2014-11-15T18:33:57Z drmeister: pjb: I just read the rest of what you said. So the CLHS offers a way to deal with this - I define a macro for the non-standard special operator? 2014-11-15T18:34:05Z pjb: Yes. 2014-11-15T18:34:21Z drmeister: Damn - those folks were brilliant. 2014-11-15T18:34:39Z pjb: Now, it would be best if that macro was "functional", ie. if it actually did the job (so eg. it could be used in another implementation). 2014-11-15T18:34:40Z drmeister: CL is really well thought out. 2014-11-15T18:34:54Z pjb: But it is also conceivable that it only calls up an implementation specific function. 2014-11-15T18:35:15Z pjb: But it would have to transmit some information, about the status and bindings. 2014-11-15T18:36:05Z jumblerg joined #lisp 2014-11-15T18:36:20Z pjb: (defmacro lambda-block (name (&rest lambda-list) &body body &environment env) `(ext:lambda-block-fun* ',env ',name ',lambda-list ',body)) would be harsh. 2014-11-15T18:36:35Z jlongster joined #lisp 2014-11-15T18:36:44Z s00pcan joined #lisp 2014-11-15T18:37:17Z pjb: Now in this case, since we have to indicate that name is the name of a block, lambda-list is a lambda-list (ie. it's contents are bound parameters for the body, and body is code (that could need further code walking by a code walker), of course the simpliest is to implement it as above. 2014-11-15T18:39:01Z keppy joined #lisp 2014-11-15T18:39:37Z pjb: A different special operator, that would do something different on a variable name and a block name, but that would evaluate a block with a binding to that variable and in that block name in the lexical context, could provide a macro such as: (defmacro my-special-op ((v b) &body body) `(my-special-op-fun* ',v ',b ',body (lambda (,v) (block ,b ,@body)))) 2014-11-15T18:40:15Z pjb: The semantics of this special operator is "hidden" in the my-special-op-fun*, but a code walker can process the parts of the original form, knowing that v is a parameter, b a block name, and body a body of code. 2014-11-15T18:40:33Z pecg joined #lisp 2014-11-15T18:40:49Z pecg quit (Changing host) 2014-11-15T18:40:49Z pecg joined #lisp 2014-11-15T18:41:25Z drmeister is reading and processing 2014-11-15T18:42:09Z vowyer joined #lisp 2014-11-15T18:42:24Z jegaxd26 quit (Remote host closed the connection) 2014-11-15T18:42:53Z pecg quit (Client Quit) 2014-11-15T18:43:01Z pecg joined #lisp 2014-11-15T18:43:10Z vowyer quit (Client Quit) 2014-11-15T18:43:19Z drmeister: The name can also have the form '(setf setf-name) under which conditions it has to use serf-name as the block name. 2014-11-15T18:43:56Z vaporatorius quit (Quit: Leaving) 2014-11-15T18:44:47Z Ralt_ joined #lisp 2014-11-15T18:45:01Z keppy quit (Client Quit) 2014-11-15T18:45:31Z Ralt quit (Ping timeout: 265 seconds) 2014-11-15T18:45:38Z Ralt_ is now known as Ralt 2014-11-15T18:46:00Z Blkt quit (Ping timeout: 265 seconds) 2014-11-15T18:46:05Z Blkt_ joined #lisp 2014-11-15T18:46:21Z drmeister: I'm not really following how you inform the code walker what part is the body. 2014-11-15T18:46:49Z dmiles joined #lisp 2014-11-15T18:46:50Z pjb: Good point. ,(if (listp name) (second name) name) 2014-11-15T18:46:57Z srcerer_ joined #lisp 2014-11-15T18:47:20Z vaporatorius joined #lisp 2014-11-15T18:47:21Z pjb: By putting it a lambda. 2014-11-15T18:47:44Z hugoduncan joined #lisp 2014-11-15T18:47:48Z drmeister: Oh - I see. 2014-11-15T18:47:49Z pjb: the only way to pass a body to a function is to wrap it in a "thunk", ie. a lambda. 2014-11-15T18:48:27Z pjb: `(funcall (lambda (,var) ,@body) ,expr) 2014-11-15T18:48:41Z defaultxr joined #lisp 2014-11-15T18:48:52Z gz_ quit (Ping timeout: 265 seconds) 2014-11-15T18:49:15Z pjb: You may also process the body in the macro. 2014-11-15T18:49:39Z pjb: `(ext:fun (lambda (,var) ,@(processed-body body and other parameters) ,expr) 2014-11-15T18:49:44Z pecg quit (Quit: WeeChat 1.0.1) 2014-11-15T18:49:51Z kjeldahl quit (Ping timeout: 265 seconds) 2014-11-15T18:50:08Z bambams__ joined #lisp 2014-11-15T18:50:12Z njsg__ joined #lisp 2014-11-15T18:50:18Z ahungry_ joined #lisp 2014-11-15T18:50:20Z pjb: So for example if you have a macro that interprets a form as a lisp-1 form, transforming it into a lisp-2 form, this processing function would tell that clearly, for the code walkers. 2014-11-15T18:50:37Z emma_ joined #lisp 2014-11-15T18:50:43Z pjb: (with all the implications on the lisp-1 vs. lisp-2 bindings). 2014-11-15T18:50:45Z clog_ joined #lisp 2014-11-15T18:50:48Z swflint quit (Ping timeout: 265 seconds) 2014-11-15T18:50:53Z gz_ joined #lisp 2014-11-15T18:51:08Z Baggers left #lisp 2014-11-15T18:51:14Z kjeldahl joined #lisp 2014-11-15T18:51:17Z ggherdov quit (Ping timeout: 265 seconds) 2014-11-15T18:51:17Z stux|RC-only quit (Ping timeout: 265 seconds) 2014-11-15T18:51:22Z stepnem_ joined #lisp 2014-11-15T18:51:24Z swflint_away joined #lisp 2014-11-15T18:51:46Z Hydan quit (Ping timeout: 265 seconds) 2014-11-15T18:51:50Z swflint_away is now known as swflint 2014-11-15T18:52:32Z Ober joined #lisp 2014-11-15T18:52:42Z effy joined #lisp 2014-11-15T18:52:53Z stux|RC-only joined #lisp 2014-11-15T18:53:14Z s00pcan_ joined #lisp 2014-11-15T18:53:15Z effy_ quit (Ping timeout: 258 seconds) 2014-11-15T18:53:26Z Infus942 joined #lisp 2014-11-15T18:53:34Z drmeister: This is a little much - I'm only following part of it. Hang on. 2014-11-15T18:53:51Z Hydan joined #lisp 2014-11-15T18:54:36Z bdr3552 quit (Ping timeout: 245 seconds) 2014-11-15T18:54:36Z srcerer quit (Ping timeout: 245 seconds) 2014-11-15T18:54:36Z sshirokov quit (Ping timeout: 245 seconds) 2014-11-15T18:54:36Z H4ns quit (Write error: Connection reset by peer) 2014-11-15T18:54:36Z dmiles_afk quit (Ping timeout: 245 seconds) 2014-11-15T18:54:36Z Krystof quit (Ping timeout: 245 seconds) 2014-11-15T18:54:36Z segmond quit (Ping timeout: 245 seconds) 2014-11-15T18:54:37Z njsg quit (Ping timeout: 245 seconds) 2014-11-15T18:54:37Z spacebat quit (Ping timeout: 245 seconds) 2014-11-15T18:54:37Z ahungry quit (Ping timeout: 245 seconds) 2014-11-15T18:54:37Z bambams quit (Ping timeout: 245 seconds) 2014-11-15T18:54:37Z stepnem quit (Ping timeout: 245 seconds) 2014-11-15T18:54:37Z ggole quit (Ping timeout: 245 seconds) 2014-11-15T18:54:37Z emma quit (Ping timeout: 245 seconds) 2014-11-15T18:54:37Z nydel quit (Ping timeout: 245 seconds) 2014-11-15T18:54:37Z DGASAU quit (Ping timeout: 245 seconds) 2014-11-15T18:54:37Z s00pcan quit (Ping timeout: 245 seconds) 2014-11-15T18:54:37Z clog quit (Ping timeout: 245 seconds) 2014-11-15T18:54:37Z hugod quit (Ping timeout: 245 seconds) 2014-11-15T18:54:37Z InfusoElAmbulant quit (Ping timeout: 245 seconds) 2014-11-15T18:54:37Z Ober_ quit (Ping timeout: 245 seconds) 2014-11-15T18:54:38Z clop3 quit (Ping timeout: 245 seconds) 2014-11-15T18:55:05Z Krystof joined #lisp 2014-11-15T18:55:17Z ggole joined #lisp 2014-11-15T18:55:23Z zacharias joined #lisp 2014-11-15T18:55:32Z yeticry quit (Ping timeout: 255 seconds) 2014-11-15T18:55:40Z eazar001 quit (Quit: WeeChat 1.0.1) 2014-11-15T18:55:57Z sshirokov joined #lisp 2014-11-15T18:56:12Z pjb` joined #lisp 2014-11-15T18:56:13Z drmeister: Would this be adequate as a macro? 2014-11-15T18:56:16Z drmeister: https://www.irccloud.com/pastebin/AoQKmFKN 2014-11-15T18:56:18Z yeticry joined #lisp 2014-11-15T18:56:25Z spacebat joined #lisp 2014-11-15T18:56:38Z drmeister: It doesn't inform code-walkers though. 2014-11-15T18:56:47Z antifuch- joined #lisp 2014-11-15T18:56:48Z xrash joined #lisp 2014-11-15T18:56:50Z swflint_away joined #lisp 2014-11-15T18:56:52Z drmeister: Or does it? 2014-11-15T18:56:55Z eazar001 joined #lisp 2014-11-15T18:57:28Z bdr3552 joined #lisp 2014-11-15T18:57:43Z Subfusc_ joined #lisp 2014-11-15T18:58:05Z pjb`: drmeister: in this case, it expands to a semantically identical form, so all is well. 2014-11-15T18:58:24Z josteink joined #lisp 2014-11-15T18:58:27Z drmeister: The body code is within a standard LAMBDA so a code-walker would know what to do with it. 2014-11-15T18:58:28Z specbot quit (Disconnected by services) 2014-11-15T18:58:32Z specbot joined #lisp 2014-11-15T18:58:44Z drmeister: What is the advantage of splitting this into a call to a separate function? 2014-11-15T18:58:49Z stepnem joined #lisp 2014-11-15T18:58:54Z pjb`: My further indications are for the case when you don't want or can't provide a semantically identical form (when you can't implement the implementation specific special operator in terms of Common Lisp). 2014-11-15T18:59:00Z Bike_ joined #lisp 2014-11-15T18:59:09Z edran_ joined #lisp 2014-11-15T18:59:14Z sfa_ joined #lisp 2014-11-15T18:59:24Z nhanH_ joined #lisp 2014-11-15T18:59:34Z ndrei_ joined #lisp 2014-11-15T18:59:44Z Tordek_ joined #lisp 2014-11-15T18:59:52Z pjb`: Then you can "hide" the semantics in an implementation specific function, and pass as arguments elements (expressions and thunks) that will be processed by code walkers, and that will let them infer the "interpretation" the special operator gives to those elements. 2014-11-15T18:59:58Z birk joined #lisp 2014-11-15T19:00:05Z ehu_ joined #lisp 2014-11-15T19:00:09Z pchrist_ joined #lisp 2014-11-15T19:00:14Z swflint quit (Ping timeout: 265 seconds) 2014-11-15T19:00:14Z snafuchs quit (Ping timeout: 265 seconds) 2014-11-15T19:00:16Z lpaste quit (Ping timeout: 265 seconds) 2014-11-15T19:00:16Z Subfusc quit (Ping timeout: 265 seconds) 2014-11-15T19:00:16Z swflint_away is now known as swflint 2014-11-15T19:00:16Z Subfusc_ is now known as Subfusc 2014-11-15T19:00:16Z sfa quit (Ping timeout: 265 seconds) 2014-11-15T19:00:16Z nhanH quit (Ping timeout: 265 seconds) 2014-11-15T19:00:17Z pchrist quit (Ping timeout: 265 seconds) 2014-11-15T19:00:17Z stepnem_ quit (Ping timeout: 265 seconds) 2014-11-15T19:00:17Z kjeldahl quit (Ping timeout: 265 seconds) 2014-11-15T19:00:17Z pjb quit (Ping timeout: 265 seconds) 2014-11-15T19:00:17Z lonjil quit (Ping timeout: 265 seconds) 2014-11-15T19:00:17Z Amadiro quit (Ping timeout: 265 seconds) 2014-11-15T19:00:17Z Bike quit (Ping timeout: 265 seconds) 2014-11-15T19:00:18Z Tristam quit (Ping timeout: 265 seconds) 2014-11-15T19:00:18Z K1rk quit (Ping timeout: 265 seconds) 2014-11-15T19:00:18Z ndrei quit (Ping timeout: 265 seconds) 2014-11-15T19:00:18Z froggey quit (Ping timeout: 265 seconds) 2014-11-15T19:00:18Z gko quit (Ping timeout: 265 seconds) 2014-11-15T19:00:18Z Tordek quit (Ping timeout: 265 seconds) 2014-11-15T19:00:18Z manfoo7 quit (Ping timeout: 265 seconds) 2014-11-15T19:00:18Z InvalidCo quit (Ping timeout: 265 seconds) 2014-11-15T19:00:18Z lemoinem quit (Ping timeout: 265 seconds) 2014-11-15T19:00:18Z jdz quit (Ping timeout: 265 seconds) 2014-11-15T19:00:18Z edran quit (Ping timeout: 265 seconds) 2014-11-15T19:00:25Z drmeister: Ah, now I see. 2014-11-15T19:00:28Z ehu quit (Ping timeout: 265 seconds) 2014-11-15T19:00:28Z sytse quit (Ping timeout: 265 seconds) 2014-11-15T19:00:28Z PuercoPop quit (Ping timeout: 265 seconds) 2014-11-15T19:00:38Z drmeister is reading again 2014-11-15T19:00:38Z froggey joined #lisp 2014-11-15T19:00:45Z InvalidCo joined #lisp 2014-11-15T19:00:50Z pjb`: For example, let is a special operator. (let ((var1 expr1) (var2 expr2)) . body) has the property that var1 and var2 will be bound and in the scope of the body, and expr1 and expr2 will be evaluated out of that scope. 2014-11-15T19:00:51Z froggey quit (Changing host) 2014-11-15T19:00:51Z froggey joined #lisp 2014-11-15T19:01:07Z K1rk joined #lisp 2014-11-15T19:01:08Z lemoinem joined #lisp 2014-11-15T19:01:32Z nhanH_ is now known as nhanH 2014-11-15T19:01:42Z effy quit (Ping timeout: 244 seconds) 2014-11-15T19:02:03Z PuercoPop joined #lisp 2014-11-15T19:02:08Z pjb`: Therefore you can provide a macro: (defmacro let (bindings &body body) (sys:let-fun (lambda ,(mapcar (lambda (binding) (if (listp binding) (first binding) binding)) bindings) ,@body) ,@(mapcar (lambda (binding) (if (listp binding) (second binding) nil)) bindings))) 2014-11-15T19:02:17Z segmond joined #lisp 2014-11-15T19:02:19Z drmeister: What's "harsh" about this: "(defmacro lambda-block (name (&rest lambda-list) &body body &environment env) `(ext:lambda-block-fun* ',env ',name ',lambda-list ',body)) would be harsh." 2014-11-15T19:02:40Z puchacz joined #lisp 2014-11-15T19:03:04Z pjb`: this macro doesn't show how let is implemented, but it lets code walkers know that the expressions are evaluated (and in what order even), and it shows that the variables are bound in the scope of the body, and that the body is a body of code (being the body of a lambda expression). 2014-11-15T19:03:12Z sytse joined #lisp 2014-11-15T19:03:27Z d4gg4d______ joined #lisp 2014-11-15T19:03:30Z lpaste joined #lisp 2014-11-15T19:03:33Z pjb`: drmeister: it's "harsh", because it doesn't let code walker know anything about the variables and the body. 2014-11-15T19:03:54Z pjb`: It treats everything as data (everything is quoted). 2014-11-15T19:04:06Z jdz joined #lisp 2014-11-15T19:04:32Z Amadiro joined #lisp 2014-11-15T19:04:36Z pjb`: Basically, arguments to macros or special operators are of different kinds: you have variables that are bound, expressions that are evaluated, bodies that are wrapped into thunks to be called (etc: block names, tag names, catch expressions). By expanding the macro into a function call that still have those elements used as they should, we let the code walkers know what they should be. 2014-11-15T19:05:01Z drmeister: I'm experiencing some very laggy communication - argh - I'm following what you are saying. 2014-11-15T19:05:03Z gabot quit (Ping timeout: 265 seconds) 2014-11-15T19:05:04Z d4gg4d_____ quit (Ping timeout: 265 seconds) 2014-11-15T19:05:08Z d4gg4d______ is now known as d4gg4d_____ 2014-11-15T19:05:09Z splittist quit (Ping timeout: 265 seconds) 2014-11-15T19:05:24Z pjb`: Yes, there seems some netsplits are occuring. 2014-11-15T19:05:38Z splittist joined #lisp 2014-11-15T19:05:43Z gko joined #lisp 2014-11-15T19:05:43Z clop3 joined #lisp 2014-11-15T19:05:48Z drmeister: This is very, very informative - I only had an inkling of these problems before. 2014-11-15T19:05:49Z jlongster quit (Ping timeout: 255 seconds) 2014-11-15T19:07:10Z Bike_ is now known as Bike 2014-11-15T19:07:41Z sol__ quit (Ping timeout: 255 seconds) 2014-11-15T19:08:23Z drmeister: There is a backquote missing in here somewhere isn't there?: " Therefore you can provide a macro: (defmacro let (bindings &body body) (sys:let-fun (lambda ,(mapcar (lambda (binding) (if (listp binding) (first binding) binding)) bindings) ,@body) ,@(mapcar (lambda (binding) (if (listp binding) (second binding) nil)) bindings)))" 2014-11-15T19:08:31Z pjb`: Indeed. `(sys:let-fun … 2014-11-15T19:08:34Z sol__ joined #lisp 2014-11-15T19:09:46Z kjeldahl joined #lisp 2014-11-15T19:09:52Z drmeister: Ok, I'll read this a few more times and think on it, I'll get back to you with questions when/if I have them. 2014-11-15T19:10:11Z pjb`: (now of course, in the case of let, we can implement it in CL: `((lambda (…) ,@body) …) ) 2014-11-15T19:10:51Z pjb`: (cf. "Metacircular Semantics for Common Lisp Special Forms" http://home.pipeline.com/~hbaker1/MetaCircular.html ) 2014-11-15T19:11:12Z gabot joined #lisp 2014-11-15T19:11:33Z drmeister: My conversations keep coming back to that web page :-) 2014-11-15T19:12:06Z Tristam joined #lisp 2014-11-15T19:12:29Z drmeister: So the macro sets everything up and wraps code in LAMBDA thunks and then passes that to a function that does the work? 2014-11-15T19:12:36Z jtza8 joined #lisp 2014-11-15T19:12:43Z ggherdov joined #lisp 2014-11-15T19:13:29Z drmeister: And the point is to communicate to code-walkers what is code that needs to be walked and what is not. 2014-11-15T19:13:49Z pjb`: Yes. 2014-11-15T19:14:17Z pjb`: And if you can provide a functional and conforming macro expansion, this also let people use your implementation specific stuff on other implementations :-) 2014-11-15T19:14:25Z pjb`: (if slower). 2014-11-15T19:14:33Z pjb` is now known as pjb 2014-11-15T19:15:00Z drmeister: Got it. 2014-11-15T19:15:10Z drmeister: Brb 2014-11-15T19:15:15Z pjb: it may also pass some expressions as direct arguments to the function (like the let initialization expressions). 2014-11-15T19:15:18Z pjb: ok. 2014-11-15T19:16:10Z mishoo_ joined #lisp 2014-11-15T19:17:56Z mishoo quit (Ping timeout: 265 seconds) 2014-11-15T19:20:04Z pjb` joined #lisp 2014-11-15T19:20:32Z ``Erik_ joined #lisp 2014-11-15T19:21:08Z wheelsucker joined #lisp 2014-11-15T19:21:12Z heurist quit (Ping timeout: 255 seconds) 2014-11-15T19:21:12Z Zhivago quit (Ping timeout: 255 seconds) 2014-11-15T19:21:17Z ggole quit 2014-11-15T19:21:24Z Zhivago joined #lisp 2014-11-15T19:21:46Z lemoinem quit (Ping timeout: 255 seconds) 2014-11-15T19:21:46Z bobbysmith007 quit (Ping timeout: 255 seconds) 2014-11-15T19:21:54Z lemoinem joined #lisp 2014-11-15T19:22:06Z pjb quit (Ping timeout: 255 seconds) 2014-11-15T19:22:15Z minion quit (Disconnected by services) 2014-11-15T19:22:17Z minion joined #lisp 2014-11-15T19:22:25Z bobbysmith007 joined #lisp 2014-11-15T19:22:59Z housel` joined #lisp 2014-11-15T19:23:01Z ``Erik quit (Ping timeout: 255 seconds) 2014-11-15T19:23:01Z j_king quit (Ping timeout: 255 seconds) 2014-11-15T19:23:01Z Longlius quit (Ping timeout: 255 seconds) 2014-11-15T19:23:01Z housel quit (Ping timeout: 255 seconds) 2014-11-15T19:23:01Z tessier quit (Ping timeout: 255 seconds) 2014-11-15T19:23:01Z rak[1] quit (Ping timeout: 255 seconds) 2014-11-15T19:23:09Z rak[1] joined #lisp 2014-11-15T19:23:23Z pjb` is now known as pjb 2014-11-15T19:23:32Z housel` is now known as housel 2014-11-15T19:23:44Z j_king joined #lisp 2014-11-15T19:24:10Z agumonkey quit (Ping timeout: 255 seconds) 2014-11-15T19:24:10Z capitaomorte quit (Ping timeout: 255 seconds) 2014-11-15T19:24:21Z cwandrews quit (Ping timeout: 255 seconds) 2014-11-15T19:24:25Z tessier joined #lisp 2014-11-15T19:24:31Z cwandrew- joined #lisp 2014-11-15T19:24:53Z cwandrew- is now known as cwandrews 2014-11-15T19:25:17Z john-mcaleely quit (Ping timeout: 255 seconds) 2014-11-15T19:25:42Z francogrex joined #lisp 2014-11-15T19:26:13Z heurist joined #lisp 2014-11-15T19:26:14Z capitaomorte joined #lisp 2014-11-15T19:27:06Z hyoyoung_ quit (Remote host closed the connection) 2014-11-15T19:27:17Z hyoyoung joined #lisp 2014-11-15T19:27:41Z Longlius joined #lisp 2014-11-15T19:27:59Z Infus942 quit (Remote host closed the connection) 2014-11-15T19:28:21Z stepnem quit (Ping timeout: 244 seconds) 2014-11-15T19:28:28Z vhost- quit (Ping timeout: 255 seconds) 2014-11-15T19:29:49Z sol__ quit (Ping timeout: 245 seconds) 2014-11-15T19:31:32Z agumonkey joined #lisp 2014-11-15T19:31:57Z john-mcaleely joined #lisp 2014-11-15T19:32:03Z quazimodo joined #lisp 2014-11-15T19:34:02Z chu_ joined #lisp 2014-11-15T19:34:20Z Grue` quit (Ping timeout: 250 seconds) 2014-11-15T19:34:54Z drmeister: https://www.irccloud.com/pastebin/7NtPtPXL 2014-11-15T19:35:04Z psy_ quit (Remote host closed the connection) 2014-11-15T19:35:29Z clog joined #lisp 2014-11-15T19:35:49Z Patzy quit (Ping timeout: 265 seconds) 2014-11-15T19:36:07Z drmeister: But the Cleavir code-walker is still complaining about 'ext::lambda-block with the condition: FUNCTION-ARGUMENT-MUST-BE-FUNCTION-NAME-OR-LAMBDA-EXPRESSION 2014-11-15T19:36:26Z clog_ quit (Ping timeout: 255 seconds) 2014-11-15T19:36:26Z chu quit (Remote host closed the connection) 2014-11-15T19:36:26Z drmeister: I'm following up with beach on this. 2014-11-15T19:36:27Z Patzy joined #lisp 2014-11-15T19:36:49Z psy_ joined #lisp 2014-11-15T19:36:56Z loke quit (Ping timeout: 255 seconds) 2014-11-15T19:36:57Z quazimodo quit (Ping timeout: 258 seconds) 2014-11-15T19:37:43Z loke joined #lisp 2014-11-15T19:39:18Z Grue` joined #lisp 2014-11-15T19:39:45Z sol__ joined #lisp 2014-11-15T19:42:35Z tajjada quit (Ping timeout: 265 seconds) 2014-11-15T19:44:20Z tajjada joined #lisp 2014-11-15T19:47:28Z sshirolost joined #lisp 2014-11-15T19:47:35Z sshirokov quit (*.net *.split) 2014-11-15T19:47:36Z sshirolost is now known as sshirokov 2014-11-15T19:47:41Z jumblerg quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2014-11-15T19:50:11Z chu_ is now known as chu 2014-11-15T19:51:32Z prxq joined #lisp 2014-11-15T19:51:49Z pjb: drmeister: there may be a bug in this code walker? One should test first for macro-function before special-operator-p. Actually, in a conforming code walker, expecting conforming code, I'd argue special-operator-p should not be used (the CL special operator are known). 2014-11-15T19:53:27Z vhost- joined #lisp 2014-11-15T19:55:08Z Adlai quit (Remote host closed the connection) 2014-11-15T19:55:09Z DrCode quit (Remote host closed the connection) 2014-11-15T19:55:30Z DrCode joined #lisp 2014-11-15T19:55:52Z wbooze quit (Ping timeout: 240 seconds) 2014-11-15T19:56:37Z nicdev` joined #lisp 2014-11-15T19:56:41Z Adlai joined #lisp 2014-11-15T19:56:57Z manfoo7`` joined #lisp 2014-11-15T19:57:33Z Natch_h joined #lisp 2014-11-15T19:57:39Z Shinmera- joined #lisp 2014-11-15T19:59:45Z njsg joined #lisp 2014-11-15T19:59:45Z Ober_ joined #lisp 2014-11-15T19:59:53Z jackdani1l joined #lisp 2014-11-15T20:00:00Z froggey_ joined #lisp 2014-11-15T20:00:02Z eee-blt_ joined #lisp 2014-11-15T20:00:07Z Shozan joined #lisp 2014-11-15T20:00:16Z vlnx_ joined #lisp 2014-11-15T20:00:18Z misv_ joined #lisp 2014-11-15T20:00:19Z pchrist joined #lisp 2014-11-15T20:00:24Z asedeno_ joined #lisp 2014-11-15T20:02:16Z mishoo__ joined #lisp 2014-11-15T20:02:35Z dlowe_ joined #lisp 2014-11-15T20:02:51Z nightsha- joined #lisp 2014-11-15T20:02:56Z snafuchs joined #lisp 2014-11-15T20:03:13Z jdz_ joined #lisp 2014-11-15T20:03:23Z chameco_ joined #lisp 2014-11-15T20:03:30Z xorpse_ joined #lisp 2014-11-15T20:03:52Z mishoo_ quit (Ping timeout: 255 seconds) 2014-11-15T20:03:54Z redline6561_ joined #lisp 2014-11-15T20:04:59Z gko quit (*.net *.split) 2014-11-15T20:04:59Z Amadiro quit (*.net *.split) 2014-11-15T20:04:59Z jdz quit (*.net *.split) 2014-11-15T20:04:59Z froggey quit (*.net *.split) 2014-11-15T20:04:59Z pchrist_ quit (*.net *.split) 2014-11-15T20:04:59Z swflint quit (*.net *.split) 2014-11-15T20:04:59Z xrash quit (*.net *.split) 2014-11-15T20:04:59Z antifuch- quit (*.net *.split) 2014-11-15T20:04:59Z Hydan quit (*.net *.split) 2014-11-15T20:04:59Z Ober quit (*.net *.split) 2014-11-15T20:04:59Z njsg__ quit (*.net *.split) 2014-11-15T20:04:59Z cy quit (*.net *.split) 2014-11-15T20:04:59Z loke__ quit (*.net *.split) 2014-11-15T20:04:59Z Shinmera quit (*.net *.split) 2014-11-15T20:04:59Z oleo quit (*.net *.split) 2014-11-15T20:04:59Z drdanmaku quit (*.net *.split) 2014-11-15T20:04:59Z manfoo7` quit (*.net *.split) 2014-11-15T20:05:00Z vlnx quit (*.net *.split) 2014-11-15T20:05:00Z redline6561 quit (*.net *.split) 2014-11-15T20:05:00Z joshe quit (*.net *.split) 2014-11-15T20:05:00Z sbryant quit (*.net *.split) 2014-11-15T20:05:00Z TrafficMan quit (*.net *.split) 2014-11-15T20:05:00Z drdo quit (*.net *.split) 2014-11-15T20:05:00Z rvirding_ quit (*.net *.split) 2014-11-15T20:05:01Z drmeister quit (*.net *.split) 2014-11-15T20:05:01Z ghard quit (*.net *.split) 2014-11-15T20:05:01Z scharan quit (*.net *.split) 2014-11-15T20:05:01Z jackdaniel quit (*.net *.split) 2014-11-15T20:05:01Z alpha- quit (*.net *.split) 2014-11-15T20:05:01Z gendl quit (*.net *.split) 2014-11-15T20:05:01Z ans quit (*.net *.split) 2014-11-15T20:05:01Z arrsim quit (*.net *.split) 2014-11-15T20:05:01Z ircbrows- quit (*.net *.split) 2014-11-15T20:05:01Z Fullma quit (*.net *.split) 2014-11-15T20:05:01Z eee-blt quit (*.net *.split) 2014-11-15T20:05:01Z misv quit (*.net *.split) 2014-11-15T20:05:01Z Natch quit (*.net *.split) 2014-11-15T20:05:02Z nightshade427 quit (*.net *.split) 2014-11-15T20:05:02Z Amaan quit (*.net *.split) 2014-11-15T20:05:02Z chameco quit (*.net *.split) 2014-11-15T20:05:02Z asedeno quit (*.net *.split) 2014-11-15T20:05:02Z eli quit (*.net *.split) 2014-11-15T20:05:02Z nicdev quit (*.net *.split) 2014-11-15T20:05:02Z axion quit (*.net *.split) 2014-11-15T20:05:02Z dlowe quit (*.net *.split) 2014-11-15T20:05:02Z xorpse quit (*.net *.split) 2014-11-15T20:05:02Z SHODAN quit (*.net *.split) 2014-11-15T20:05:02Z peccu2 quit (*.net *.split) 2014-11-15T20:05:02Z nightfly quit (*.net *.split) 2014-11-15T20:05:02Z dlowe_ is now known as dlowe 2014-11-15T20:05:03Z xorpse_ is now known as xorpse 2014-11-15T20:05:18Z xrash joined #lisp 2014-11-15T20:05:56Z Fullma joined #lisp 2014-11-15T20:07:38Z drdanmaku joined #lisp