2014-09-20T00:00:00Z ndrei joined #lisp 2014-09-20T00:00:00Z ndrei_ joined #lisp 2014-09-20T00:00:27Z Quadrescence: pjb, I want it so it will work for a variety of component data types, where we expect operations on complexes composed of machine-representable types to compile to the appropriate machine instructions. (We can assume that the host Lisp has good code emitters for primitive arithmetic like addition and multiplication.) 2014-09-20T00:01:28Z Longlius joined #lisp 2014-09-20T00:02:07Z pjb: It's not too complex to define the metalanguage needed to deal with commutative and assiciative operations, so that you can sort out the arguments of the operators by compatible types. 2014-09-20T00:03:09Z Longlius left #lisp 2014-09-20T00:03:46Z phao quit (Quit: Leaving) 2014-09-20T00:04:13Z clop joined #lisp 2014-09-20T00:04:34Z Quadrescence: pjb, I don't even know how to answer the question "How should the type be represented?" 2014-09-20T00:05:09Z ndrei_ quit (Ping timeout: 260 seconds) 2014-09-20T00:05:23Z pjb: And once you're not talking about cl:+ but your-package:+, you can use compiler-macros to perform compilation-time type analysis. 2014-09-20T00:05:33Z ndrei quit (Ping timeout: 260 seconds) 2014-09-20T00:05:39Z jusss quit (Quit: ERC Version 5.2 (IRC client for Emacs)) 2014-09-20T00:06:10Z Quadrescence: pjb, I haven't been successful in using compiler macros to do type analysis 2014-09-20T00:06:29Z ndrei joined #lisp 2014-09-20T00:06:34Z ndrei_ joined #lisp 2014-09-20T00:06:51Z vanila: Quadrescence, Why don't you use a statically typed language 2014-09-20T00:07:02Z pjb: If that's what makes you happy… 2014-09-20T00:07:05Z vanila: e.g. SML Ocaml Haskell 2014-09-20T00:07:37Z Quadrescence: vanila, Well of course I could use a language to support this feature, but unfortunately the task is usually "write a module for a large codebase that already exists" 2014-09-20T00:07:46Z Quadrescence: and such language swapping isn't an option at that point 2014-09-20T00:08:08Z pjb: you can always use several processes communicating thru pipes or sockets. 2014-09-20T00:08:12Z pjb: or even shared memory. 2014-09-20T00:08:15Z Quadrescence: And of course people say that Lisp can bend itself to any problem, supposedly. ;) 2014-09-20T00:08:32Z stanislav quit (Remote host closed the connection) 2014-09-20T00:08:35Z pjb: Sure. Just fetch the first implementation of ML written in Lisp, and use it! 2014-09-20T00:08:35Z Quadrescence: pjb, If you're trying to write efficient complex arithmetic, or similar, you lose the speed benefits you gained by switching in the first place. 2014-09-20T00:08:54Z pjb: But SBCL is already more efficient than gcc! 2014-09-20T00:09:04Z pjb: http://cliki.net/Performance 2014-09-20T00:09:21Z Quadrescence: Yes, for its primitive inlined operations. There's an issue with expressivity. 2014-09-20T00:09:25Z vanila: OK - then it requires a very good lisp compiler 2014-09-20T00:11:07Z Quadrescence: vanila, It's not just that. How would you natively represent an opaque type like (mycomplex type) reasonably in Lisp? (deftype mycomplex (type) `(array type (2))) isn't an answer. (defstruct mycomplex ..) doesn't work. (deftype mycomplex (type) `(satisfies ...)) is a pipe dream. 2014-09-20T00:12:04Z markov` quit (Ping timeout: 260 seconds) 2014-09-20T00:12:16Z oleo is now known as Guest71140 2014-09-20T00:12:21Z vanila: Why don't you use DEFSTRUCT? 2014-09-20T00:13:19Z nand1` joined #lisp 2014-09-20T00:13:21Z Quadrescence: DEFSTRUCT will force me to choose my component type at compile-time. If I don't, then I must have some general type, and all bets for compile-time type analysis, or optimized struct layout, are off. 2014-09-20T00:13:31Z vanila: Ah 2014-09-20T00:14:00Z oleo__ joined #lisp 2014-09-20T00:14:08Z vanila: If you want to switch representation you might need to embed a DSL that lets you interpret your code in terms of different representations 2014-09-20T00:14:09Z Quadrescence: the type produced by (defstruct S ...) is S, not (S ) too, so I can't use the declaration facility to annotate 2014-09-20T00:15:04Z Guest71140 quit (Ping timeout: 244 seconds) 2014-09-20T00:15:49Z nand1 quit (Ping timeout: 260 seconds) 2014-09-20T00:16:20Z Quadrescence quit (Quit: Leaving) 2014-09-20T00:16:48Z Quadrescence joined #lisp 2014-09-20T00:17:09Z zophy joined #lisp 2014-09-20T00:17:15Z varjag_ quit (Quit: Connection closed for inactivity) 2014-09-20T00:17:15Z zlrth quit (Ping timeout: 272 seconds) 2014-09-20T00:17:57Z gry joined #lisp 2014-09-20T00:19:08Z Quadrescence: Anyway, this is a real problem I've run into lately, and the best I've been able to do is very hackily work around it with a function templating mechanism. 2014-09-20T00:19:17Z Quadrescence: ( https://bitbucket.org/tarballs_are_good/template/raw/1ee743b3e591acb9e205a04cd5db5624cdb62c52/README ) 2014-09-20T00:20:26Z vanila: " function templating mechanism" that's basically what I meant 2014-09-20T00:20:37Z zacts: what is the newbie common lisp channel? 2014-09-20T00:20:52Z vanila: I think htat is a good solution 2014-09-20T00:20:52Z jlongster quit (Ping timeout: 240 seconds) 2014-09-20T00:21:02Z vanila: you can define a macro that lets you write it nicer 2014-09-20T00:21:07Z zacts: #clnoobs 2014-09-20T00:21:10Z Quadrescence: vanila, still doesn't solve the problem of creating opaque data types with reasonable type specifiers 2014-09-20T00:21:22Z Quadrescence: vanila, i don't know how you'd write a macro to make that nicer. 2014-09-20T00:22:36Z Quadrescence: (At least not without descending into code walking territory.) 2014-09-20T00:22:50Z vanila: How doesn't this TEMPLATE system solve the problem? you can use this with DEFSTRUCT right? 2014-09-20T00:23:38Z vanila: is the problem calling and using the results of these the functions requires translating between representations? 2014-09-20T00:23:41Z Quadrescence: Like I said, I want to make my own opaque datatype called (MYCOMPLEX S) where S denotes the type of the complex number's components 2014-09-20T00:24:24Z Quadrescence: I define "opaque" as: An object X of type T should have (type-of X) == T 2014-09-20T00:25:45Z vanila: CL has types like (vector double-float 100) 2014-09-20T00:25:52Z vanila: so I think there will be a way to do this, I don't know how yet 2014-09-20T00:26:16Z Quadrescence: Yes, CL has built-in types with these nice properties. 2014-09-20T00:26:24Z kcj quit (Remote host closed the connection) 2014-09-20T00:26:46Z Quadrescence: But CL never told us how to make our own. 2014-09-20T00:27:26Z vanila: maybe you could do a hack like a macro where (MYCOMPLEX S) expands into MYCOMPLEX-S (and causes its definition if it hasnt been done yet) 2014-09-20T00:27:38Z theos quit (Disconnected by services) 2014-09-20T00:28:06Z theos joined #lisp 2014-09-20T00:28:21Z momo-reina joined #lisp 2014-09-20T00:29:46Z Kabaka joined #lisp 2014-09-20T00:30:46Z Quadrescence: So suppose we make this mechanism. The main point of having a MYCOMPLEX is that we have an abstraction so we can write functions which operate on that without caring about the underlying or component representations. 2014-09-20T00:31:17Z Quadrescence: In other words, we now wish to write code which operates generally on MYCOMPLEX values. (This is the "polymorphism" aspect.) 2014-09-20T00:32:41Z Quadrescence: The Lisp tradition is to just write slow code which does type dispatch at runtime, and make entire computers to help do that dispatching at a hardware level to help speed it up. :) 2014-09-20T00:33:02Z emma joined #lisp 2014-09-20T00:33:07Z vanila: to avoid having to convert between representations you co uld use CLOS in normal code - and the boundaries of the templated functions that require specific representations could perform the translations 2014-09-20T00:34:21Z Bike: define some generics, use compiler macro capabilities that don't actually exist to eliminate runtime dispatch, sob into your copy of tapl 2014-09-20T00:34:35Z Quadrescence: Bike, :) 2014-09-20T00:38:13Z emma quit (Ping timeout: 260 seconds) 2014-09-20T00:38:18Z Quadrescence: I wonder if the SBCL folks ever thought about doing whole program optimization. I know they ripped out CMUCL's work on it. 2014-09-20T00:38:33Z emma joined #lisp 2014-09-20T00:38:47Z vanila: What about the proposed solution I just gave? 2014-09-20T00:39:04Z Bike: clos has runtime dispatch 2014-09-20T00:39:07Z Quadrescence: vanila, Your solution is "do type dispatch at runtime" 2014-09-20T00:39:27Z vanila: yes, what's wrong with that? 2014-09-20T00:40:00Z Bike: it's an inefficiency that ought to be avoidable, but isn't 2014-09-20T00:40:18Z Quadrescence: If I'm writing the kernel of numerical matrix routines for certain classes of mathematical problems, I don't want to do type dispatch at runtime and I don't want to copy-paste code. 2014-09-20T00:40:20Z vanila: it's not avoidable 2014-09-20T00:40:36Z Bike: Yes it is. If types are known at compile time you could compile away the runtime dispatch. 2014-09-20T00:40:44Z vanila: I'm suggesting that you write the kernel functions templated 2014-09-20T00:41:52Z Quadrescence: If you're going to use templates, then you might as well write the higher level interface with templates as well, which invoke the templated functions with template arguments. 2014-09-20T00:43:15Z emma quit (Ping timeout: 246 seconds) 2014-09-20T00:43:34Z vanila: yes 2014-09-20T00:43:47Z common-lisper quit (Remote host closed the connection) 2014-09-20T00:44:08Z Quadrescence: (D-T-F foo (ty) (x) `(... (bar '(,ty) x))) 2014-09-20T00:44:24Z vanila: and you have already implemented most of this, I feel like this basically solves the problem 2014-09-20T00:44:33Z Quadrescence: D-T-F having the relevant meaning, not the young kids' colloquial meaning. :) 2014-09-20T00:44:45Z emma joined #lisp 2014-09-20T00:45:35Z Quadrescence: vanila, The use of these templates does not feel like a solution to the problem, that's for certain. It also still completely lacks the ability to write anything else meaningfully templated. 2014-09-20T00:48:04Z jusss joined #lisp 2014-09-20T00:48:27Z Quadrescence: (Not to mention the pretty poor debuggability and lack of interaction with SLIME.) 2014-09-20T00:48:28Z momo-reina quit (Read error: Connection reset by peer) 2014-09-20T00:48:52Z _tca: Quadrescence: what was your issue with using compiler macros? 2014-09-20T00:49:02Z vanila: I think you're asking for too much - is the priority high performance? 2014-09-20T00:49:22Z Quadrescence: vanila, high performance in Lisp 2014-09-20T00:49:27Z emma quit (Ping timeout: 245 seconds) 2014-09-20T00:49:37Z _tca: Quadrescence: have you read the typed racket approach? 2014-09-20T00:49:47Z _5kg_ quit (Ping timeout: 272 seconds) 2014-09-20T00:49:48Z Quadrescence: Plus, if everyone is always ranting and raving about how Common Lisp is super high performant, then we might as well attempt to live up to that expectation. ;) 2014-09-20T00:49:55Z Quadrescence: _tca, yes 2014-09-20T00:50:01Z _tca: is that unworkable here? 2014-09-20T00:50:03Z Bike left #lisp 2014-09-20T00:50:44Z _5kg_ joined #lisp 2014-09-20T00:50:57Z vanila: "everyone is always ranting and raving about how Common Lisp is super high performant" where are reading this garbage? hacker news? 2014-09-20T00:51:09Z _tca: assign unique tags via compiler macros then work with the global table? 2014-09-20T00:53:14Z Quadrescence: _tca, I don't know how that would work. 2014-09-20T00:54:06Z Quadrescence: vanila, Common Lisp being able to be very efficient has been said a lot in many places, including Pascal Constanza's latest blog post on the matter: http://p-cos.blogspot.com/2014/09/why-i-like-common-lisp.html 2014-09-20T00:54:27Z vanila: so bug him about how to make this efficient 2014-09-20T00:54:40Z _tca: Quadrescence: what's the problem that makes you not see it workable in CL where it is in racket? 2014-09-20T00:54:54Z defaultxr joined #lisp 2014-09-20T00:55:30Z _tca: by "read the typed racket approach" i mean, did actually read the paper? 2014-09-20T00:56:01Z Quadrescence: _tca, I don't think I understand their implementation approach well enough to say. I do know that it's significantly easier to do this kind of stuff atop Scheme, especially a "purer" Scheme. I wrote a type inference engine and checker for Scheme. 2014-09-20T00:57:28Z Quadrescence: _tca, There are a lot of papers. I remember looking at this one long ago http://www.ccs.neu.edu/racket/pubs/popl08-thf.pdf 2014-09-20T00:57:28Z _tca: Quadrescence: why would you write your own code intentionally in a style that is hard to optimize? i thought this was for your own code? 2014-09-20T00:58:17Z resttime joined #lisp 2014-09-20T00:58:29Z _tca: no i meant typed racket not typed scheme, the typing rules aren't important but rather how the systems runs in thef irst place 2014-09-20T00:58:53Z Quadrescence: _tca, That was the precursor and description written by one of the authors of Typed Racket. 2014-09-20T00:59:00Z _tca: yea i know it is 2014-09-20T00:59:13Z Quadrescence: They talk about implementation aspects along with the typing rules. 2014-09-20T00:59:50Z Quadrescence: _tca, What? I want to write code such that it is relatively generic (because the type might change, or I might want to do arithmetic with scalar floats *and* complex floats) and performant. 2014-09-20T00:59:52Z jusss quit (Ping timeout: 256 seconds) 2014-09-20T00:59:55Z _tca: okay cool then you have it all figured out! good luck implementing it 2014-09-20T01:00:44Z Quadrescence: (and by "I might" I actually mean "I need", realistically) 2014-09-20T01:01:30Z nell quit (Quit: WeeChat 1.1-dev) 2014-09-20T01:01:34Z lisper29 joined #lisp 2014-09-20T01:02:47Z Quadrescence: _tca, I don't have it all figured out of course. I just referenced the paper I remember looking at, and I said it's not just about typing rules. If you think there are other materials that would be instructive in solving this problem, without modifying the host compiler, then I'd like to hear them. 2014-09-20T01:03:15Z emma joined #lisp 2014-09-20T01:07:14Z gry is now known as Svetlana 2014-09-20T01:08:33Z emma quit (Ping timeout: 272 seconds) 2014-09-20T01:09:06Z emma joined #lisp 2014-09-20T01:13:14Z wizzo joined #lisp 2014-09-20T01:13:39Z zlrth joined #lisp 2014-09-20T01:14:29Z emma quit (Ping timeout: 272 seconds) 2014-09-20T01:15:02Z kanru` joined #lisp 2014-09-20T01:16:08Z common-lisper joined #lisp 2014-09-20T01:17:53Z zRecursive joined #lisp 2014-09-20T01:18:24Z jlongster joined #lisp 2014-09-20T01:20:22Z Beetny joined #lisp 2014-09-20T01:23:39Z macdice` joined #lisp 2014-09-20T01:24:57Z vanila: https://www.youtube.com/watch?v=6mTbuzafcII 2014-09-20T01:25:00Z vanila: have you guys seen this? 2014-09-20T01:25:16Z vanila: "Transducers" by Rich Hickey 2014-09-20T01:26:07Z macdice quit (Ping timeout: 245 seconds) 2014-09-20T01:29:36Z Svetlana quit (Remote host closed the connection) 2014-09-20T01:30:04Z emma joined #lisp 2014-09-20T01:33:14Z kanru` quit (Remote host closed the connection) 2014-09-20T01:35:19Z emma quit (Ping timeout: 272 seconds) 2014-09-20T01:36:01Z araujo quit (Ping timeout: 272 seconds) 2014-09-20T01:36:31Z emma joined #lisp 2014-09-20T01:41:41Z emma quit (Ping timeout: 260 seconds) 2014-09-20T01:42:37Z emma joined #lisp 2014-09-20T01:44:38Z Quadrescence: vanila, yes, and there have been posts about it previously, as you probably know 2014-09-20T01:50:59Z emma quit (Ping timeout: 272 seconds) 2014-09-20T01:51:18Z emma joined #lisp 2014-09-20T01:54:50Z hefner joined #lisp 2014-09-20T01:55:59Z theethicalegoist joined #lisp 2014-09-20T01:56:03Z emma quit (Ping timeout: 246 seconds) 2014-09-20T01:57:04Z jlongster quit (Ping timeout: 260 seconds) 2014-09-20T02:01:46Z Quadrescence: What do you guys think about a lambda list extension &NAMED which is like &KEY but they're required arguments with no specification for default values or existence querying. 2014-09-20T02:02:08Z marsbot is now known as marsam 2014-09-20T02:03:02Z emma joined #lisp 2014-09-20T02:03:23Z jusss joined #lisp 2014-09-20T02:03:26Z Quadrescence: Seems like a good idea for when you want named arguments (for documentation or order-independence purposes), yet don't want the boilerplate, or the poor optimization that separate compilation can't afford at call sites. 2014-09-20T02:03:47Z pjb: &key (k1 nil k1namedp) (k2 nil k2namedp) (assert (and k1namedp k2namedp)) 2014-09-20T02:04:13Z pjb: does &named really justify the boilerplate? Perhaps. 2014-09-20T02:05:59Z Quadrescence: pjb, Yes, that's the obvious solution to crowbar your system at runtime. 2014-09-20T02:06:07Z Quadrescence: pjb, This is more desirable. http://paste.lisp.org/display/143785 2014-09-20T02:09:19Z Quadrescence: You can (and I have) done hacks with compiler macros where you do analysis of the calling arglist for compile-time effects, then reject to do a compiler macro expansion. 2014-09-20T02:10:35Z kanru` joined #lisp 2014-09-20T02:13:02Z common-lisper quit (Remote host closed the connection) 2014-09-20T02:15:20Z kanru` quit (Remote host closed the connection) 2014-09-20T02:15:54Z kanru` joined #lisp 2014-09-20T02:15:59Z nisstyre quit (Quit: WeeChat 1.0) 2014-09-20T02:16:16Z nisstyre joined #lisp 2014-09-20T02:16:21Z emma quit (Ping timeout: 246 seconds) 2014-09-20T02:17:12Z jlongster joined #lisp 2014-09-20T02:18:45Z araujo joined #lisp 2014-09-20T02:18:45Z araujo quit (Changing host) 2014-09-20T02:18:45Z araujo joined #lisp 2014-09-20T02:23:49Z emma joined #lisp 2014-09-20T02:28:57Z emma quit (Ping timeout: 245 seconds) 2014-09-20T02:29:39Z emma joined #lisp 2014-09-20T02:30:04Z zlrth quit (Remote host closed the connection) 2014-09-20T02:34:46Z zlrth joined #lisp 2014-09-20T02:38:24Z emma quit (Ping timeout: 246 seconds) 2014-09-20T02:38:57Z emma joined #lisp 2014-09-20T02:39:24Z MrWoohoo quit (Quit: ["Textual IRC Client: www.textualapp.com"]) 2014-09-20T02:39:41Z nisstyre quit (Quit: WeeChat 1.0) 2014-09-20T02:39:51Z atgreen quit (Read error: Connection reset by peer) 2014-09-20T02:40:31Z nisstyre joined #lisp 2014-09-20T02:40:42Z atgreen joined #lisp 2014-09-20T02:41:18Z nisstyre quit (Changing host) 2014-09-20T02:41:18Z nisstyre joined #lisp 2014-09-20T02:42:21Z marsam is now known as marsbot 2014-09-20T02:55:17Z drmeiste_ joined #lisp 2014-09-20T02:55:46Z emma quit (Ping timeout: 258 seconds) 2014-09-20T02:56:17Z emma joined #lisp 2014-09-20T03:00:38Z askatasuna quit (Quit: WeeChat 1.0) 2014-09-20T03:06:56Z common-lisper joined #lisp 2014-09-20T03:08:52Z adhoc quit (Ping timeout: 240 seconds) 2014-09-20T03:12:21Z bgs100 quit (Quit: bgs100) 2014-09-20T03:13:23Z emma quit (Ping timeout: 240 seconds) 2014-09-20T03:14:25Z emma joined #lisp 2014-09-20T03:18:01Z stardiviner joined #lisp 2014-09-20T03:19:50Z joshe joined #lisp 2014-09-20T03:24:08Z emma quit (Remote host closed the connection) 2014-09-20T03:24:35Z emma joined #lisp 2014-09-20T03:27:31Z P4Titan joined #lisp 2014-09-20T03:27:50Z P4Titan: Hello, how would I pass (values a b c d) as an argument to a function? 2014-09-20T03:28:13Z jsnell: are you looking for multiple-value-call? 2014-09-20T03:28:44Z P4Titan: more like (define (fun m_args) ...) (fun (values a b c d)) 2014-09-20T03:29:09Z emma quit (Ping timeout: 246 seconds) 2014-09-20T03:29:52Z Adlai: P4Titan: that would be (multiple-value-call #'fun (values a b c d)) 2014-09-20T03:29:53Z jsnell: you'd use a &rest parameter in the function definition, and multiple-value-call 2014-09-20T03:30:25Z emma joined #lisp 2014-09-20T03:30:44Z jsnell: which isn't particularly useful 2014-09-20T03:31:12Z P4Titan: what does #'fun do? 2014-09-20T03:31:31Z drmeiste_ quit (Remote host closed the connection) 2014-09-20T03:32:08Z drmeiste_ joined #lisp 2014-09-20T03:32:49Z zRecursive: (function fun) 2014-09-20T03:35:26Z pjb: jsnell: you don't need &rest, m-v-c works very well with mandatory parameters. 2014-09-20T03:35:37Z emma quit (Ping timeout: 260 seconds) 2014-09-20T03:36:13Z emma joined #lisp 2014-09-20T03:36:15Z vanila: Just how important is stack allocating closure environments? Would a lisp that just heap allocs them all totally fall flat? 2014-09-20T03:36:22Z marsbot is now known as marsam 2014-09-20T03:36:28Z zeebrah joined #lisp 2014-09-20T03:36:32Z jsnell: pjb: yes, but he wants them as a single argument 2014-09-20T03:36:33Z drmeiste_ quit (Ping timeout: 260 seconds) 2014-09-20T03:36:49Z P4Titan: is this still regarding my question? 2014-09-20T03:36:55Z PuercoPop: P4Titan: which in turn looks up the symbol fun in the function namespace 2014-09-20T03:37:25Z P4Titan: Would you like an example to see what I am trying to get at? 2014-09-20T03:39:00Z pjb: P4Titan: we are very puzzled, because you're asking the same question in #lisp and #scheme. Perhaps you want to achieve something like: http://www.informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/intersection-r5rs-common-lisp-emacs-lisp/ ? 2014-09-20T03:39:44Z pjb: P4Titan: just read about call-with-values in http://www.schemers.org/Documents/Standards/R5RS/HTML/ or 2014-09-20T03:39:48Z pjb: clhs multiple-value-call 2014-09-20T03:39:48Z specbot: http://www.lispworks.com/reference/HyperSpec/Body/s_multip.htm 2014-09-20T03:41:01Z gingerale joined #lisp 2014-09-20T03:41:46Z zRecursive quit (Remote host closed the connection) 2014-09-20T03:48:41Z beach joined #lisp 2014-09-20T03:48:53Z beach: Good morning everyone! 2014-09-20T03:48:58Z emma quit (Ping timeout: 244 seconds) 2014-09-20T03:50:18Z emma joined #lisp 2014-09-20T03:50:28Z P4Titan: Buenos dias! 2014-09-20T03:50:50Z White_Flame: Guten Abend 2014-09-20T03:51:00Z P4Titan: Ja und diene Mutter auch! 2014-09-20T03:51:03Z P4Titan: :() 2014-09-20T03:51:09Z P4Titan: :] 2014-09-20T03:51:27Z P4Titan: I joke 2014-09-20T03:51:49Z White_Flame: Yeah, that's what she called you, too ;) 2014-09-20T03:53:11Z P4Titan: Adios queridos mios! 2014-09-20T03:53:14Z P4Titan left #lisp 2014-09-20T03:55:10Z emma quit (Ping timeout: 244 seconds) 2014-09-20T04:01:15Z vinleod joined #lisp 2014-09-20T04:03:12Z jlongster quit (Ping timeout: 245 seconds) 2014-09-20T04:03:27Z pyx joined #lisp 2014-09-20T04:03:50Z pyx quit (Client Quit) 2014-09-20T04:04:28Z cheryllium quit (Remote host closed the connection) 2014-09-20T04:05:25Z jusss quit (Quit: ERC Version 5.2 (IRC client for Emacs)) 2014-09-20T04:11:12Z emma joined #lisp 2014-09-20T04:13:52Z zophy quit (Ping timeout: 240 seconds) 2014-09-20T04:16:00Z gry joined #lisp 2014-09-20T04:18:45Z gry is now known as Svetlana 2014-09-20T04:20:20Z eazar001 quit (Read error: Connection reset by peer) 2014-09-20T04:22:18Z eazar001 joined #lisp 2014-09-20T04:31:48Z nemesist joined #lisp 2014-09-20T04:33:52Z emma quit (Ping timeout: 260 seconds) 2014-09-20T04:33:52Z xyjprc quit (Ping timeout: 240 seconds) 2014-09-20T04:36:43Z jkaye joined #lisp 2014-09-20T04:37:37Z vanila: good morning beach 2014-09-20T04:37:49Z vanila: may I ask if you have any comment on my question ? 2014-09-20T04:37:54Z vanila: This> Just how important is stack allocating closure environments? Would a lisp that just heap allocs them all totally fall flat? 2014-09-20T04:38:47Z beach: Good question. 2014-09-20T04:38:55Z vanila: thanks! 2014-09-20T04:38:58Z pjb: vanila: there are some optimized processor instructions to handle the stack, so it may be worthwhile to use them. 2014-09-20T04:39:04Z pjb: It's purely an optimization question. 2014-09-20T04:39:08Z beach: I think heap allocation is probably acceptable in most cases. 2014-09-20T04:39:18Z pjb: Also, check the interaction with interruptions (which may use or not the stack). 2014-09-20T04:39:22Z vanila: I do understand that the stack allocation is better than heap IF possible, beacuse heap can only be reclaimed by a GC rather than a pop 2014-09-20T04:39:32Z pjb: Some processors have parts of the stack stored in registers. 2014-09-20T04:40:33Z emma joined #lisp 2014-09-20T04:40:34Z pjb: vanila: you can have several heaps with different GC algorithms. 2014-09-20T04:40:42Z emma quit (Changing host) 2014-09-20T04:40:43Z emma joined #lisp 2014-09-20T04:41:10Z beach: vanila: Some heap allocators and GCs are quite efficient though. 2014-09-20T04:41:32Z jkaye quit (Ping timeout: 245 seconds) 2014-09-20T04:42:35Z Quadrescence: A whole program optimizer for CL is on my wishlist, so we could hopefully do Stalin-like optimizations with closures. 2014-09-20T04:43:04Z beach: Quadrescence: And we can do that, because we have the entire program available at any particular time. 2014-09-20T04:43:41Z beach: Languages such as C or C++ can't because they do per-module compilation without having the rest of the program available. 2014-09-20T04:43:45Z Quadrescence: Yes, which is very nice of course. (And sometimes, not so nice.) 2014-09-20T04:44:24Z beach: One has to take some precautions so that the entire system doesn't get recompiled after every user interaction, of course. 2014-09-20T04:44:36Z Quadrescence: On the other hand, Lisp also has a very "open world" approach to things, so you have to be a bit unsafe with certain things like inlining. 2014-09-20T04:44:37Z Quadrescence: Yeah 2014-09-20T04:45:07Z beach: "unsafe"? How? 2014-09-20T04:46:06Z Quadrescence: Sorry, I didn't mean unsafe in the typical sense. I meant mostly what you meant. Your idea of the "world" when you make changes might not match the compiler's or runtime's view. 2014-09-20T04:46:22Z beach: Oh, OK. Sure. 2014-09-20T04:47:37Z beach: In a FLOSS implementation, one could keep the source code of each function around, so that it could be recompiled, but this would not be an option for commercial implementations. 2014-09-20T04:48:23Z nemesist quit (Ping timeout: 244 seconds) 2014-09-20T04:48:29Z Quadrescence: That's what I do on a very small scale here: https://bitbucket.org/tarballs_are_good/symbolic-function/raw/931b77316d8ffdeb4e5f55af28f6dfd99b7834f7/symbolic-function.lisp 2014-09-20T04:49:16Z nemesist joined #lisp 2014-09-20T04:49:55Z beach: It could be done for the entire system. One could even do it selectively, i.e., if a function has source code associated with it, then recompile, otherwise, leave it as it is. 2014-09-20T04:52:56Z chitofan joined #lisp 2014-09-20T04:54:01Z emma quit (Ping timeout: 272 seconds) 2014-09-20T04:54:50Z beach: chitofan: What do you think this code does: (defun f (x) (setq x 10)) and (defun g (y) (f y) (print y)) when you call (g 20)? 2014-09-20T04:54:52Z emma joined #lisp 2014-09-20T04:55:23Z beach: chitofan: Think about it first, before you try it. Then check whether your mental model corresponds to reality. 2014-09-20T04:56:08Z Quadrescence: beach, do you know of anything wrong that would happen if T could be lexically bound? 2014-09-20T04:56:41Z chitofan: uh, im not sure 2014-09-20T04:56:54Z chitofan: i saw this topic covered in "on lisp" but i don't really remember 2014-09-20T04:57:14Z beach: chitofan: It is essential that you know, because you do something like that in your code. 2014-09-20T04:57:24Z beach: Quadrescence: It depends on the meaning of T in source code. 2014-09-20T04:57:45Z kushal joined #lisp 2014-09-20T04:58:04Z beach: Quadrescence: Does it mean "the current value of the variable T at runtime", or does it mean "the current value of the variable T at compile time" 2014-09-20T04:58:47Z Quadrescence: (let ((t 5)) t) ==[in an ideal world, maybe]==> 5 2014-09-20T04:59:14Z beach: I suppose the only problem would be with macro expansion. 2014-09-20T04:59:39Z beach: (let ((t 5) (x 10)) (some-macro x)) 2014-09-20T04:59:52Z beach: If some-macro contains T in it, then the result might be unexpected. 2014-09-20T05:00:13Z pjb: even more so with (let ((t nil)) (some-macro)) 2014-09-20T05:00:18Z beach: yea. 2014-09-20T05:00:27Z beach: I think that's why CL has a rule that you can't bind standard functions lexically. 2014-09-20T05:02:01Z xyjprc joined #lisp 2014-09-20T05:02:43Z beach: chitofan: Your function DO-MOVE assigns values to its parameters right before returning, just like the function F in my example. So in order to know what your program does, you must know the answer to my question. 2014-09-20T05:03:55Z beach: chitofan: This topic is not covered in "On Lisp". It is covered in the first chapter of the first-level programming book in pretty much any programming language. 2014-09-20T05:04:52Z chitofan: i tried it out but i dont really understand the implications 2014-09-20T05:05:07Z beach: chitofan: Oh, too bad. I asked you to think about it before trying. 2014-09-20T05:05:31Z beach: chitofan: Until you understand the implications, you can not expect your program to do anything reasonable. 2014-09-20T05:06:01Z pjb: chitofan: have you heard about passing parameters by value, or by reference? 2014-09-20T05:06:05Z vanila: chitofan, It's called lexical scope - it's one concept that underpins the whole langauge 2014-09-20T05:06:22Z pjb: vanila: this is unrelated. 2014-09-20T05:06:22Z beach: vanila: More like what pjb says. 2014-09-20T05:06:22Z rme quit (Quit: rme) 2014-09-20T05:06:22Z rme quit (Quit: rme) 2014-09-20T05:06:35Z vanila: oh sorry 2014-09-20T05:06:41Z araujo quit (Quit: Leaving) 2014-09-20T05:06:53Z beach: pjb: And, no, I don't think chitofan has heard about that. 2014-09-20T05:07:45Z pjb: I really think there's a problem with teaching programming. Those are notions as old as programming (algol had it!). Perhaps merely with the LACK of teaching programming. 2014-09-20T05:07:49Z beach: chitofan: It is absolutely essential to have a correct mental model of the semantics of function calls. Until you do, the code you produce will not do what you expect. 2014-09-20T05:08:24Z beach: pjb: I wouldn't know. When I taught CL, I talked about it. 2014-09-20T05:08:44Z pjb: I mean, people are not taught programming. This is the problem. 2014-09-20T05:09:11Z chitofan: just fyi i am here, just desperately trying to read up on the concepts. lol 2014-09-20T05:09:20Z pjb: ;-) 2014-09-20T05:09:36Z zacts: pjb: I'm teaching myself programming, is this bad? 2014-09-20T05:09:46Z pjb: zacts: not if you have a good book. 2014-09-20T05:09:55Z zacts: pjb: I'm using PCL 2014-09-20T05:10:02Z beach: pjb: Sure. There is still this "cowboy" mentality in software development that one should need no training to do it. Preferably, one should be a high-school dropout to do it well. 2014-09-20T05:10:36Z White_Flame: There is no real university track for studying programming itsel 2014-09-20T05:10:45Z White_Flame: Computer Science = the "science" of computation, not programming 2014-09-20T05:10:45Z pjb: zacts: Well, PCL is more designed for people already knowing programming (from other languages). To learn programming with CL, I would use: Common Lisp: A Gentle Introduction to Symbolic Computation http://www.cs.cmu.edu/~dst/LispBook/ http://www-cgi.cs.cmu.edu/afs/cs.cmu.edu/user/dst/www/LispBook/index.html 2014-09-20T05:10:54Z White_Flame: Computer engineering = building hardware, not software 2014-09-20T05:11:05Z zacts: pjb: I tried the gentle intro, it's too simple for me 2014-09-20T05:11:10Z White_Flame: Software Engineering = project management, not programming 2014-09-20T05:11:14Z pjb: beach: it should be taught earlier. 2014-09-20T05:11:19Z White_Flame: IT = using software, not writing software 2014-09-20T05:11:20Z zacts: PCL seems to be just right at where I'm at 2014-09-20T05:11:23Z pjb: zacts: ok. 2014-09-20T05:11:28Z innertracks joined #lisp 2014-09-20T05:11:31Z beach: White_Flame: Only sort-of true. Many CS teaching programs to things other than CS. 2014-09-20T05:12:12Z Adlai: oooh, this discussion... I just had this discussion with a friend who wants to learn CS purely for the salary 2014-09-20T05:12:13Z beach: pjb: Yeah. It's about to happen. "Coding" is now being taught in elementary school in some places. 2014-09-20T05:12:29Z White_Flame: right, but programming itself, particularly how to think like a programmer, and how to abstract, seem never to be part of cirricula 2014-09-20T05:12:48Z pjb: There's a teacher bootstrapping problem. 2014-09-20T05:12:54Z zacts: what about the MIT SICP curriculum? 2014-09-20T05:12:58Z beach: White_Flame: That's because most teachers have a theoretical training, so they don't know it either. 2014-09-20T05:13:07Z beach: White_Flame: What pjb said. 2014-09-20T05:13:11Z White_Flame: beach: right, programming is practical 2014-09-20T05:13:14Z pjb: zacts: very good. Some people find it too abstract (or too mathematical). 2014-09-20T05:13:20Z White_Flame: I think the best term is a craft 2014-09-20T05:13:46Z White_Flame: The best cases are often learned by apprenticeship or exploration 2014-09-20T05:14:06Z White_Flame: s/or/and/ for the better cases 2014-09-20T05:14:35Z zacts is watching http://youtu.be/VeAdryYZ7ak 2014-09-20T05:14:46Z zacts: ^ this is the google talk on PCL 2014-09-20T05:14:56Z beach: White_Flame: Apprenticeship is good. But it can't be done at the moment, because most people in industry are even less competent that university teachers. 2014-09-20T05:15:05Z zeitue joined #lisp 2014-09-20T05:15:19Z beach: Definitely a bootstrapping problem. 2014-09-20T05:15:22Z White_Flame: yep, that's why there are "rock star" programmers in companies, and a desperation to generate them somehow 2014-09-20T05:16:55Z White_Flame: another problem is that a lot of truly high-skilled people have lost the ability to think like an intro learner and can't teach the basics without losing the trees for the forest 2014-09-20T05:17:16Z zymurgy quit (Quit: WeeChat 0.3.8) 2014-09-20T05:17:20Z Quadrescence: White_Flame, that problem is pretty orthogonal to being a good programmer 2014-09-20T05:17:27Z zymurgy joined #lisp 2014-09-20T05:17:27Z Quadrescence: being a good teacher is another skill entirely 2014-09-20T05:17:28Z pjb: This is why you need teachers, not programmers, to teach. 2014-09-20T05:17:31Z Quadrescence: even for beginning programmers. 2014-09-20T05:17:59Z White_Flame: part of it is that programming is cerebral. With physical crafts, you have a tangible connection to the basics of what's going on. In code, you start from an empty universe and create 2014-09-20T05:18:28Z zymurgy quit (Client Quit) 2014-09-20T05:18:44Z White_Flame: hence there's a bootstrapping learning problem in there as well 2014-09-20T05:18:49Z Quadrescence: i don't think that's true 2014-09-20T05:18:51Z oGMo: um not really 2014-09-20T05:18:56Z chitofan: http://paste.lisp.org/display/143786 2014-09-20T05:19:00Z nug700 joined #lisp 2014-09-20T05:19:14Z Quadrescence: chitofan, (5) is an error 2014-09-20T05:19:19Z oGMo: programming is just about accurately defining things, then dispatching a lot 2014-09-20T05:19:20Z chitofan: in common lisp, the binding of grid in let is ignored? 2014-09-20T05:19:27Z White_Flame: (let ((var val) ..) 2014-09-20T05:19:30Z White_Flame: ...) 2014-09-20T05:19:53Z White_Flame: (let (grid) ...) is equivalent to (let ((grid nil)) ...) 2014-09-20T05:19:53Z chitofan: oh my bad 2014-09-20T05:19:55Z beach: chitofan: You have a syntax error. 2014-09-20T05:20:00Z zymurgy joined #lisp 2014-09-20T05:20:32Z pjb: But, I mean, this is a problem that have been identified in the 70s. In France they started with the "Experience des 57 minis" where they had 2 teachers per lycée spend one year learning programming, and there after, having them spend time teaching other teachers in their lycée. However, when they extended the computerization with 10,000 micros first, and then with more, it had become purely an industrial business, and they didn't 2014-09-20T05:20:32Z pjb: invest on teacher formation anymore. 2014-09-20T05:20:33Z White_Flame: oGMo: the act of definition is the challenge of programming. It is that challenge that requires the ability to abstract and other "think like a programmer" skills 2014-09-20T05:21:02Z beach: chitofan: But you have the right idea to submit 5-line programs rather than the entire "2048" program. It is not until you master 5-liners that you can proceed. 2014-09-20T05:21:49Z Quadrescence: White_Flame, it's a challenge. There are plenty of other really tangible, immediate challenges, like dealing with the world. One such example is reading and understanding documentation that someone didn't write for their application they hacked on in their weekend time because they have a full time job and do stuff outside for fun. 2014-09-20T05:21:49Z Quadrescence: :) 2014-09-20T05:22:24Z beach: pjb: Interesting! 2014-09-20T05:22:53Z White_Flame: Quadrescence: and that leads into yet another issue, the problem of "good enough", leaving insecure, brittle code that works, and not having the trained discipline to begin programming _well_ 2014-09-20T05:23:29Z pjb: They were overwhelmed by the computerization of society (with the micro-computers), and just let down. 2014-09-20T05:23:43Z oGMo: White_Flame: you're way overblowing it 2014-09-20T05:23:48Z beach: Well, I am writing a book called "Introduction to programming" that happens to use CL to illustrate the ideas. I considered making it "open" so that it could be a community project. But somehow I don't think this would make it better or be finished faster. 2014-09-20T05:24:31Z lisper29 quit (Quit: Leaving) 2014-09-20T05:24:35Z Quadrescence: beach, I don't think so either. 2014-09-20T05:24:39Z pjb: It's only two years ago that they introduced back an "Option informatique" in terminal, with some python programming (not language specific, but that's what is diffused and more readily available). 2014-09-20T05:25:15Z White_Flame: oGMo: it is the gap between "can get code running on your own environment", and "secure, robust, maintainable, properly optimized" that is the difference on the job 2014-09-20T05:25:17Z beach: pjb: I can see that you have ideas about this. 2014-09-20T05:25:47Z oGMo: White_Flame: no it's not 2014-09-20T05:25:48Z pjb: beach: I'm wondering if a program to teach programming wouldn't be better (probably with a web interface), but including principles like PHENARETE, etc. 2014-09-20T05:26:41Z pranavrc joined #lisp 2014-09-20T05:26:56Z beach: pjb: Maybe so. 2014-09-20T05:27:08Z White_Flame: oGMo: do you have any discussion behind those statements? 2014-09-20T05:27:10Z Quadrescence: White_Flame, There's also pedantry. I sometimes get in trouble because I replace someone's function (defun lookup (x) (gethash *foo* x)) with (defun lookup (x) (values ...)) 2014-09-20T05:27:20Z pjb: Of course, it would be even more work than just a book. :-/ 2014-09-20T05:27:22Z xyjprc quit (Ping timeout: 245 seconds) 2014-09-20T05:27:28Z oGMo: White_Flame: i'm writing code, not talking 2014-09-20T05:27:38Z beach: pjb: A lot more I would say. 2014-09-20T05:27:49Z beach: pjb: An intermediate solution could be a MOOC. 2014-09-20T05:28:11Z pjb: There are a few systems already in place. The Lisp Tutor for example. 2014-09-20T05:28:30Z White_Flame: oGMo: yeah, we've had our share of problems with people who are too busy coding to actually consider the project and the meta-project 2014-09-20T05:28:35Z beach: pjb: Interesting idea. I will give it some thought. 2014-09-20T05:28:57Z oGMo: i generally find those who go on about how people should be programming don't do much of it themselves 2014-09-20T05:29:48Z White_Flame: I'm not talking about "how" in specifics, I'm mentioning the skills desparately needed, and the lack of a path to acquire those in any sort of educational track 2014-09-20T05:30:02Z pjb: beach: I have some urls here: http://paste.lisp.org/+32Y3 2014-09-20T05:30:59Z innertracks quit (Ping timeout: 272 seconds) 2014-09-20T05:32:48Z pjb: OR, perhaps, all lispers should start to wear dark browk jedi robes and pointy magician hats. 2014-09-20T05:32:49Z marsam is now known as marsbot 2014-09-20T05:33:27Z Quadrescence: they can't do that until they give us plebs a better type system 2014-09-20T05:33:46Z White_Flame: A hat on top of a hood would look pretty silly. A hat underneath the hood will require a larger hood. 2014-09-20T05:34:19Z Adlai: jedis don't always have their hoods up 2014-09-20T05:34:57Z pjb: I was thinking about the popularity problem. A child who'd be interested in programming has a lot more chance finding some tutorial javascript or python. If we can't be popular, we could be rare. 2014-09-20T05:35:40Z pjb: Rare, but still attractive and recognizable. 2014-09-20T05:43:28Z Mon_Ouie joined #lisp 2014-09-20T05:48:59Z nemesist_ joined #lisp 2014-09-20T05:49:52Z nemesist quit (Ping timeout: 245 seconds) 2014-09-20T05:49:52Z nemesist_ is now known as nemesist 2014-09-20T05:49:56Z beach: pjb: Sorry, was away for a while. I'll check the URLs now. 2014-09-20T05:50:33Z Quadrescence: I would not recommend making a website. ;) Then you will have to maintain it, and it will be outdated. 2014-09-20T05:50:36Z faheem_ quit (Read error: Connection reset by peer) 2014-09-20T05:50:44Z gz quit (Ping timeout: 184 seconds) 2014-09-20T05:50:58Z _tca quit (Ping timeout: 260 seconds) 2014-09-20T05:50:58Z gluegadget quit (Read error: Connection reset by peer) 2014-09-20T05:50:58Z Neet__ quit (Read error: Connection reset by peer) 2014-09-20T05:51:03Z pjb: Quadrescence: like books. 2014-09-20T05:51:10Z endou_____ quit (Read error: Connection reset by peer) 2014-09-20T05:51:12Z d4gg4d____ quit (Read error: Connection reset by peer) 2014-09-20T05:51:13Z superjudge____ quit (Write error: Connection reset by peer) 2014-09-20T05:51:17Z Quadrescence: I think books are a little better in that I can store them on a bookshelf 2014-09-20T05:51:22Z Quadrescence: and read them 20 years into the future 2014-09-20T05:51:25Z pjb: But the point is that there are already a lot of books to teach programming and to teach lisp. 2014-09-20T05:51:25Z victor_lowther__ quit (Ping timeout: 260 seconds) 2014-09-20T05:51:38Z beach: pjb: That robes are actually not a bad idea. I mean, I despise that stuff, but it seems to work in order to project an air of seriousness. 2014-09-20T05:51:51Z pjb: :-) 2014-09-20T05:51:54Z Amaan quit (Ping timeout: 272 seconds) 2014-09-20T05:52:16Z splittist quit (Ping timeout: 260 seconds) 2014-09-20T05:52:44Z rvirding quit (Ping timeout: 260 seconds) 2014-09-20T05:52:44Z gz quit (Ping timeout: 260 seconds) 2014-09-20T05:53:07Z theethicalegoist quit (Quit: Leaving) 2014-09-20T05:53:10Z aksatac___ quit (Ping timeout: 272 seconds) 2014-09-20T05:53:12Z ggherdov___ quit (Ping timeout: 260 seconds) 2014-09-20T05:55:04Z common-lisper quit (Remote host closed the connection) 2014-09-20T05:58:22Z common-lisper joined #lisp 2014-09-20T06:01:09Z Ethan- quit (Ping timeout: 272 seconds) 2014-09-20T06:02:19Z beach: pjb: Are you just giving us ideas, or are you seriously thinking about working on such a system? 2014-09-20T06:02:33Z emma quit (Ping timeout: 260 seconds) 2014-09-20T06:04:02Z emma joined #lisp 2014-09-20T06:08:44Z pjb: Well, if I had the time and money, I'd be interested in working on it yes. 2014-09-20T06:09:14Z pjb: There are so many projects… 2014-09-20T06:09:53Z Quadrescence: pjb, next gen CLIM is in demand these days 2014-09-20T06:10:00Z pjb: One advantage of such a system is that authors could work on small pedagogical units, without having to write a whole book. 2014-09-20T06:10:15Z pjb: Several lispers have already started writting books… 2014-09-20T06:10:34Z Quadrescence: pjb, I don't think a good book can be made by doing that sort of divide-and-conquer approach. 2014-09-20T06:10:50Z Quadrescence: A truly good book is well thought out, not written in random sections piecemeal 2014-09-20T06:11:26Z Quadrescence: {book, linear progression material, ...} 2014-09-20T06:12:10Z gz_ joined #lisp 2014-09-20T06:13:11Z Amaan_ joined #lisp 2014-09-20T06:13:37Z endou_____ joined #lisp 2014-09-20T06:13:42Z pjb: People who learn by themselves using the web, I'm not sure they use a linear progression. 2014-09-20T06:14:11Z pjb: In particular, with programming, where learning by doing is important, it's difficult to stick to linear progressions. 2014-09-20T06:14:25Z beach: Quadrescence: Well, actually, as it turns out, I had problems with linearity when writing the intro programming book, because I didn't want to bore readers who already knew some topic, and I didn't want to brush anything under the rug for the others. 2014-09-20T06:14:45Z Quadrescence: Yes, that's the hardest part :) 2014-09-20T06:14:47Z d4gg4d____ joined #lisp 2014-09-20T06:15:06Z beach: Quadrescence: The solution I came up with was to write a lot of appendices with detailed information, and give only the essential stuff in the linear presentation. 2014-09-20T06:15:06Z madrik joined #lisp 2014-09-20T06:15:06Z Quadrescence: Sometimes I think that's a problem in the choice of audience. 2014-09-20T06:15:12Z rvirding_ joined #lisp 2014-09-20T06:15:16Z victor_lowther__ joined #lisp 2014-09-20T06:15:37Z aksatac___ joined #lisp 2014-09-20T06:15:37Z _tca joined #lisp 2014-09-20T06:15:41Z beach: We shall see whether this method will work. 2014-09-20T06:15:45Z pjb: So we would have to choose smaller audience (and write smaller books), we can't hope covering the whole CL standard for example. 2014-09-20T06:15:50Z superjudge____ joined #lisp 2014-09-20T06:16:44Z Shinmera joined #lisp 2014-09-20T06:17:37Z beach: The structure with several appendices is not that different from a graph of nodes like on the web. 2014-09-20T06:17:58Z Quadrescence: I say write a Part II instead of appendices (: 2014-09-20T06:18:19Z beach: Hmm. 2014-09-20T06:19:45Z Neet__ joined #lisp 2014-09-20T06:19:46Z faheem_ joined #lisp 2014-09-20T06:19:48Z splittist_ joined #lisp 2014-09-20T06:21:40Z chitofan: is there a way to find if 2 consecutive values in a list are equal other than recursion? 2014-09-20T06:22:28Z pjb: Yes. 2014-09-20T06:22:32Z common-lisper quit 2014-09-20T06:23:06Z pjb: chitofan: how would you do it, if I provided you with a list (eg. a page of the phone book), and you'd have to see if two persons have the same name? 2014-09-20T06:23:26Z gluegadget_ joined #lisp 2014-09-20T06:23:28Z chitofan: find and count 2014-09-20T06:23:45Z pjb: find what? 2014-09-20T06:24:11Z chitofan: their name and position? 2014-09-20T06:24:30Z pjb: Yes, that's your problem. How do you do it? 2014-09-20T06:24:31Z pjb: chitofan: you know how to do it. You have to think how you would do it, while watching how you do it. 2014-09-20T06:25:01Z chitofan: i have a convoluted way of doing it, with recursion, so iw as wondering if there was a built in function so i wouldnt have to reinvent the wheel 2014-09-20T06:25:06Z pjb: Sometimes it's difficult to imagine how you do it while taking note how you do it. It may be easier to actually do it, while watching how you do it. 2014-09-20T06:25:17Z chitofan: and i tried a few combinations of keywords searching on google, and i cant find any such 2014-09-20T06:25:34Z pjb: So, write on a piece of paper a list: apple, orange, apple, banana, banana, kiwi. 2014-09-20T06:25:41Z chitofan: would macros help in this particular problem? 2014-09-20T06:25:49Z pjb: And now try to find two elements in that list that are equal, without using recursion. 2014-09-20T06:25:57Z chitofan: okay 2014-09-20T06:26:03Z pjb: chitofan: no, macros wouldn't help. Using your brains would ;-) 2014-09-20T06:26:19Z pjb: You must first know how to do it by hand, without a computer. 2014-09-20T06:26:33Z Quadrescence: quick hack no peeking http://paste.lisp.org/display/143788 2014-09-20T06:26:34Z pjb: So you may then explain the steps to the computer, in the form of an algorithm. 2014-09-20T06:27:58Z pt1 joined #lisp 2014-09-20T06:29:08Z chitofan: /msg specbot clhs count 2014-09-20T06:29:19Z pjb: chitofan: there are other ways to elaborate algorithms, that are more abstract, more mathematical. 2014-09-20T06:29:48Z chitofan: could you give me an example? 2014-09-20T06:30:07Z pjb: For example, you could formalize what it means for a list to contain two successive elements that are the same. 2014-09-20T06:31:10Z pjb: Then you would express that there exist such elements in the list with that property. This would give you easily an algorithm to find them (often it won't be efficient, but you can improve it later). 2014-09-20T06:31:49Z ggherdov___ joined #lisp 2014-09-20T06:32:09Z pjb: For example, you could say that (defun samep (list i) (and (<= i 0) (< (1+ i) (length list)) (eql (elt list i) (elt list (1+ i))))) 2014-09-20T06:32:29Z harish quit (Remote host closed the connection) 2014-09-20T06:32:40Z Quadrescence: &key test 2014-09-20T06:33:06Z Grue`: (defun successives (list) (reduce (lambda (a b) (if (eql a b) (return-from successives t) b)) list :initial-value nil) nil) 2014-09-20T06:33:46Z pjb: therefore you could do (defun there-are-two-successive-same-in-list (list) (loop for i below (1- (length list)) thereis (samep list i))) 2014-09-20T06:34:00Z Karl_Dscc joined #lisp 2014-09-20T06:34:20Z pjb: But this wouldn't be good, because elt is O(n), and calling it in a O(n) loop makes the algorithm O(n^2), ie. rather slow. 2014-09-20T06:34:38Z pjb: elt is O(n) on lists. It's O(1) on vectors. 2014-09-20T06:35:02Z Grue`: damn, my version has a bug when the first element is nil 2014-09-20T06:35:23Z pjb: chitofan: another way, is to embrace recursion, and once you have a recursive algorithm, to derecursive it. 2014-09-20T06:35:24Z Grue`: :initial-value should probably be an uninterned symbol or something 2014-09-20T06:35:50Z pjb: So: (defun samep (list) (and (cdr list) (eql (car list) (cadr list)))) 2014-09-20T06:36:30Z innertracks joined #lisp 2014-09-20T06:36:34Z pjb: (defun there-are-two-successive-same-in-list (list) (cond ((null (cdr list)) nil) ((samep list) t) (t (there-are-two-successive-same-in-list (cdr list))))) 2014-09-20T06:36:48Z pjb: Now the problem is to transform this recursive function into an iterative one. 2014-09-20T06:37:27Z innertracks quit (Client Quit) 2014-09-20T06:37:57Z jkaye joined #lisp 2014-09-20T06:38:39Z pjb: which gives: (defun there-are-two-successive-same-in-list (list) (loop :until (or (null (cdr list)) (samep list)) :do (setf list (cdr list)) :finally (return (samep list)))) 2014-09-20T06:39:38Z Quadrescence: Grue`, maybe you wanted http://paste.lisp.org/display/143788#1 2014-09-20T06:40:33Z Grue`: i feel like reduce fits this particular problem better 2014-09-20T06:41:05Z Grue`: though it's still pretty messed up 2014-09-20T06:41:16Z Quadrescence: (I actually wanted MAPL) 2014-09-20T06:41:34Z pjb: Well, using a non-local exit is procedural. Kind of cheating. 2014-09-20T06:41:47Z Quadrescence: pjb, that's why I said "pseudo" and "wacko" 2014-09-20T06:42:09Z Grue`: it must short-circuit somehow and mapping functions usually don't 2014-09-20T06:42:45Z jkaye quit (Ping timeout: 260 seconds) 2014-09-20T06:43:09Z pt1 quit (Remote host closed the connection) 2014-09-20T06:43:27Z jegaxd26 joined #lisp 2014-09-20T06:44:15Z beach: chitofan: Recursion is fine for your problem though, because the length of the list is small. 2014-09-20T06:44:53Z pjb: Well, the problem might be in using lists, instead of 2D arrays for a grid… 2014-09-20T06:45:11Z beach: pjb: We'll get to that problem in a few weeks. 2014-09-20T06:45:13Z beach: :) 2014-09-20T06:46:35Z Elench joined #lisp 2014-09-20T06:47:41Z MoALTz joined #lisp 2014-09-20T06:47:57Z stardiviner quit (Ping timeout: 246 seconds) 2014-09-20T06:48:23Z nemesist_ joined #lisp 2014-09-20T06:48:52Z nostoi joined #lisp 2014-09-20T06:49:27Z nemesist quit (Ping timeout: 272 seconds) 2014-09-20T06:49:27Z nemesist_ is now known as nemesist 2014-09-20T06:49:29Z chitofan: beach: the reason i didnt want to use recursion is because a list of (2 2 4 4) becomes (4 4 4) then (8 4) 2014-09-20T06:49:41Z chitofan: when it should be (2 2 4 4) becomes (4 8) 2014-09-20T06:49:57Z chitofan: since its just 4 number, i could make a special case for 2 sets of matching numbers 2014-09-20T06:50:24Z chitofan: or should i not bother about the option to scale the grid beyond 4x4 and just make it as fast as i can? 2014-09-20T06:51:07Z beach: chitofan: Not necessarily. When you see (2 2 ...) you can replace it with (4 nil ...). 2014-09-20T06:51:27Z Quadrescence: Grue`, here's my REDUCE http://paste.lisp.org/display/143788#2 2014-09-20T06:51:30Z beach: chitofan: So that you now have (4 nil 4 4). 2014-09-20T06:51:57Z pjb: chitofan: notice that what you specified is not what's specified in the game! 2014-09-20T06:52:06Z beach: chitofan: I suggest you separate two things: 1. Replacing duplicates 2. Compacting the list (i.e., removing NILs) 2014-09-20T06:52:14Z pjb: you don't collapse random pairs of equal numbers on a row or column. 2014-09-20T06:52:18Z chitofan: but the way i do it is i strip the list from, say, (2 0 4 4) to (2 4 4). then i merge to (2 8), and pad it with zeroes 2014-09-20T06:52:30Z pjb: You collapse them closest to the side we're moving to. 2014-09-20T06:53:03Z chitofan: the way i wish to do it is to make a single move function to left 2014-09-20T06:53:20Z chitofan: then if i need to move to right, i simpyl reverse the row, then process it, and reverse it back 2014-09-20T06:53:21Z beach: chitofan: That function should have several steps. 2014-09-20T06:53:35Z chitofan: if up and down, i transpose the list of lists, then process each row individually 2014-09-20T06:53:44Z beach: chitofan: That idea is fine. 2014-09-20T06:53:45Z pjb: so (<- '(4 4 4 0)) --> (8 4 0 0) not (4 8 0 0). 2014-09-20T06:54:00Z mutley89 joined #lisp 2014-09-20T06:54:09Z beach: pjb: I think that's what he is doing. 2014-09-20T06:55:14Z pjb: Yes, but implicitly. This is the kind of things you have to specify explicitely. You don't want to know if there-are-two-successive-same-in-list, you want to get the LEFT-MOST pair of same elements in the list. 2014-09-20T06:55:27Z beach: pjb: Indeed. 2014-09-20T06:55:29Z pjb: Otherwise I could have come with a :from-end algo. 2014-09-20T06:57:33Z beach: chitofan: So if you have (2 2 4 4), then step 1 is to collapse 2 2 into 4 NIL, so you get (4 NIL 4 4), then you see the duplicate 4s so you collapse them into 8 NIL. Now you have (4 NIL 8 NIL). Next step, compact by moving NILs to the end which gives (4 8 NIL NIL) 2014-09-20T06:58:17Z beach: chitofan: By doing two different steps: 1. collapse duplicates, and 2. compact the list, you solve your problem. 2014-09-20T06:59:11Z pt1 joined #lisp 2014-09-20T07:02:07Z nostoi quit (Quit: Verlassend) 2014-09-20T07:03:30Z Karl_Dscc quit (Remote host closed the connection) 2014-09-20T07:14:36Z pnpuff joined #lisp 2014-09-20T07:15:13Z malbertife joined #lisp 2014-09-20T07:15:49Z nell joined #lisp 2014-09-20T07:17:22Z nipra quit (Ping timeout: 245 seconds) 2014-09-20T07:22:44Z mr-foobar quit (Read error: Connection reset by peer) 2014-09-20T07:23:05Z chitofan: http://paste.lisp.org/display/143789 2014-09-20T07:23:05Z lupine quit (Ping timeout: 272 seconds) 2014-09-20T07:23:08Z mr-foobar joined #lisp 2014-09-20T07:23:10Z chitofan: what does the compiler error mean? 2014-09-20T07:24:09Z vsync_ joined #lisp 2014-09-20T07:24:20Z beach: chitofan: It's tricky to see. You probably interchanged the arguments of pushnew. 2014-09-20T07:25:12Z beach: chitofan: On the other hand, you probably don't want PUSHNEW anyway. Read the clhs entry on what it does. 2014-09-20T07:26:54Z beach: chitofan: Try: (let ((x '(1 2 3))) (pushnew 3 x) (print x)) 2014-09-20T07:27:03Z beach: chitofan: Is the result what you expected? 2014-09-20T07:27:27Z chitofan: no.. 2014-09-20T07:28:13Z beach: chitofan: As the Common Lisp HyperSpec entry says, it only pushes a new element if that object is not already a member of the list. 2014-09-20T07:28:27Z pranavrc quit (Remote host closed the connection) 2014-09-20T07:29:21Z pranavrc joined #lisp 2014-09-20T07:31:05Z beach: chitofan: I am thinking that it would be easier for you if you wrote this program in a functional style, i.e., you don't modify your lists; instead you return new lists. 2014-09-20T07:31:34Z chitofan: but, that's what i'm trying to do.. 2014-09-20T07:31:39Z vsync_ quit (Ping timeout: 244 seconds) 2014-09-20T07:31:50Z beach: chitofan: So that you have a function (say) COLLAPSE that takes a list, say (2 2 4 4) as an argument, and returns a list (4 nil 8 nil) as a value, without modifying the list. 2014-09-20T07:31:56Z chitofan: i didn't edit the original list, but created a new list to return 2014-09-20T07:31:57Z beach: chitofan: Oh, OK. 2014-09-20T07:32:03Z beach: Good. 2014-09-20T07:32:31Z beach: chitofan: I also think it would be easier in the beginning to think recursively. 2014-09-20T07:32:51Z beach: chitofan: Do you know math? In particular proof by induction? 2014-09-20T07:33:09Z beach: chitofan: A recursive program looks just like a proof by induction. 2014-09-20T07:33:10Z vsync_ joined #lisp 2014-09-20T07:34:01Z pranavrc quit (Ping timeout: 260 seconds) 2014-09-20T07:34:51Z beach: chitofan: In a functional style you would not use PUSH. You would just build and return a new list. 2014-09-20T07:35:29Z beach: ... and you would not use iteration constructs such as LOOP. 2014-09-20T07:36:15Z ehu joined #lisp 2014-09-20T07:36:20Z beach: chitofan: Part of the problem with your original program is (as nyef pointed out) that you have "too much global state". This problem will go away if you use a functional style. 2014-09-20T07:36:53Z mishoo joined #lisp 2014-09-20T07:38:14Z MrWoohoo joined #lisp 2014-09-20T07:39:07Z nell quit (Quit: WeeChat 1.1-dev) 2014-09-20T07:39:42Z pt1 quit (Remote host closed the connection) 2014-09-20T07:40:25Z chitofan: ok, i'll try thar 2014-09-20T07:40:27Z chitofan: that* 2014-09-20T07:40:45Z beach: chitofan: So do you know proof by induction? 2014-09-20T07:40:49Z nell joined #lisp 2014-09-20T07:41:11Z chitofan: not really 2014-09-20T07:41:20Z chitofan: recursion to me is list eating 2014-09-20T07:41:28Z chitofan: thats as far as my understanding goes 2014-09-20T07:41:29Z beach: chitofan: You start by solving a "base case". In your example, the base case would be a list with at most one element. 2014-09-20T07:41:46Z beach: chitofan: That case is trivial, because you just return the list unchanged. 2014-09-20T07:42:44Z beach: chitofan: Then you attack the case where the list has at least 2 element, and the first 2 elements are the same. Finally, you handle the case where the list has at least 2 elements but the first 2 elements are not the same. 2014-09-20T07:43:34Z beach: chitofan: Then you test that your function, when given (2 2) returns (4 nil), and when you give it (2 4), it returns (2 4). 2014-09-20T07:43:59Z loke_ quit (Ping timeout: 272 seconds) 2014-09-20T07:44:32Z chitofan: ok, i can see it 2014-09-20T07:44:36Z chitofan: i'll write something like that now 2014-09-20T07:44:42Z beach: Good. 2014-09-20T07:45:25Z resttime quit (Quit: resttime) 2014-09-20T07:47:30Z Quadrescence: Has anyone found a use in generating some sort of comment forms inside of macros? 2014-09-20T07:47:32Z mr-foobar quit (Read error: Connection reset by peer) 2014-09-20T07:47:55Z Quadrescence: s/found a use in/actually ever/ (with proper verb fixups) 2014-09-20T07:48:19Z pt1 joined #lisp 2014-09-20T07:48:30Z nemesist_ joined #lisp 2014-09-20T07:48:40Z beach: Quadrescence: You mean as if CL had a COMMENT operator? 2014-09-20T07:48:57Z Amaan_ is now known as Amaan 2014-09-20T07:48:58Z Quadrescence: Yes :) 2014-09-20T07:49:12Z mr-foobar joined #lisp 2014-09-20T07:49:14Z robot-beethoven quit (Quit: ERC Version 5.3 (IRC client for Emacs)) 2014-09-20T07:49:22Z Quadrescence: I don't know what rolling your own would look like. Maybe just return (VALUES)? I dunno. 2014-09-20T07:49:24Z nemesist quit (Ping timeout: 258 seconds) 2014-09-20T07:49:25Z nemesist_ is now known as nemesist 2014-09-20T07:49:47Z Quadrescence: (defmacro comment (string) (declare (ignore string)) (values)) ? 2014-09-20T07:49:58Z beach: Sure, why not. 2014-09-20T07:50:15Z zeebrah quit (Ping timeout: 272 seconds) 2014-09-20T07:50:18Z Quadrescence: It would be nice if it lasted until the very end though. 2014-09-20T07:51:20Z beach: That's trickier if you want it to be conforming code. 2014-09-20T07:51:54Z Quadrescence: I'll try to hack that after I finish this little exercise. 2014-09-20T07:52:19Z beach: Maybe not though. (progn (comment "...") (the-real-form))? 2014-09-20T07:52:51Z beach: Or how about (comment ) 2014-09-20T07:52:56Z vaporatorius joined #lisp 2014-09-20T07:53:01Z beach: Equivalent to PROGN. 2014-09-20T07:53:43Z beach: Oh, well. Let us know how far you get! 2014-09-20T07:54:09Z loic__ joined #lisp 2014-09-20T07:54:35Z pecg joined #lisp 2014-09-20T07:55:05Z mr-foobar quit (Quit: Leaving...) 2014-09-20T07:55:11Z Shinmera: Quadrescence: This came up before and I wrote something together real quick http://plaster.tymoon.eu/view/5S 2014-09-20T07:56:43Z Shinmera: Quadrescence: Unless I'm misunderstanding what exactly you want. 2014-09-20T07:56:55Z mr-foobar joined #lisp 2014-09-20T07:59:49Z beach: chitofan: Maybe we should start with a slightly simpler problem, so that you can figure out the general form of a recursive function. Would you like to try that? 2014-09-20T08:00:41Z Quadrescence: Shinmera, That's a reader macro essentially equivalent to the semicolon, no? 2014-09-20T08:00:47Z Quadrescence: That will get blasted away at read-time. 2014-09-20T08:01:07Z Shinmera: Quadrescence: It only reads until you have a matching closing paren, so it is not equivalent 2014-09-20T08:01:19Z Shinmera: Quadrescence: The point is that it will get blasted away at read-time since macros cannot return 'nothing' 2014-09-20T08:01:40Z Shinmera: Quadrescence: But hence why I'm not sure I exactly understand what you want 2014-09-20T08:02:00Z Quadrescence: Shinmera, The point is to have macroexpanded code that has comments embedded in it. 2014-09-20T08:02:42Z Quadrescence: Since macroexpansions can be extremely confusing. 2014-09-20T08:02:46Z chitofan: http://paste.lisp.org/display/143789#1 2014-09-20T08:02:47Z Shinmera: Quadrescence: Ah, I see now. 2014-09-20T08:03:08Z chitofan: i wrote successives already 2014-09-20T08:03:25Z chitofan: oops 2014-09-20T08:03:26Z chitofan: wrong one 2014-09-20T08:03:30Z White_Flame: If you just have naked string forms, I would expect those to be compiled away, but would likely show up in the macroexpansion 2014-09-20T08:03:33Z malbertife_ joined #lisp 2014-09-20T08:03:44Z chitofan: http://paste.lisp.org/display/143789#2 2014-09-20T08:03:47Z White_Flame: though it might also throw a bunch of compile notes at you 2014-09-20T08:04:08Z Shinmera: White_Flame: Well the problem is more that if you want to put 'comments' inside forms that don't allow such. e.g. How would you put a comment inside a (+ ..) 2014-09-20T08:04:21Z malbertife quit (Ping timeout: 258 seconds) 2014-09-20T08:04:22Z beach: chitofan: It's much better. 2014-09-20T08:04:36Z White_Flame: Shinmera: that's a problem inside source code files, too ;) 2014-09-20T08:04:48Z White_Flame: best to put comments outside of individual expressions like that 2014-09-20T08:05:06Z Shinmera: In source file you can just use ; at the end of the line 2014-09-20T08:05:09Z beach: chitofan: What happens when you call successives on '(2 2 4 4)? 2014-09-20T08:05:11Z chitofan: but the last line doesn't wor 2014-09-20T08:05:16Z Shinmera: *files 2014-09-20T08:05:21Z chitofan: successives only work on lists of 2 2014-09-20T08:05:28Z White_Flame: Shinmera: yeah, but indentation and presentation is always worse than left-justified with its peer lines 2014-09-20T08:05:37Z ehu quit (Ping timeout: 245 seconds) 2014-09-20T08:05:42Z Shinmera: True enough. 2014-09-20T08:05:43Z schaueho joined #lisp 2014-09-20T08:06:02Z pjb: chitofan: it's hard to say it doesn't work, since there's no docstring with the specification of those functions… 2014-09-20T08:06:12Z beach: chitofan: Your code looks like someone tried to teach you about tail recursion. Did you study Scheme? 2014-09-20T08:06:16Z pjb: :-) 2014-09-20T08:06:17Z Shinmera: Quadrescence: I can't think of anything better than what beach suggested with an alternative progn form that takes a comment as the first or something. 2014-09-20T08:06:53Z chitofan: no.. i didn't study programming.. and that group function is not mine. its from on lisp 2014-09-20T08:06:54Z pjb: The Little Lisper (now renamed The Little Schemer) is a nice book. 2014-09-20T08:07:19Z beach: chitofan: How about we do it my way, OK? 2014-09-20T08:07:21Z pjb: So you've learned how to copy code from a book. 2014-09-20T08:07:25Z Shinmera: On Lisp Considered Harmful imo 2014-09-20T08:07:25Z pjb: That must be a useful skill. 2014-09-20T08:07:39Z pjb: Copist. 2014-09-20T08:07:56Z pjb: You can send your resume to some monastery to be copist-monk. 2014-09-20T08:08:04Z pjb: If they still copy books… 2014-09-20T08:08:13Z beach: chitofan: As I said, maybe we should start with a slightly simpler problem, so that you can figure out the general form of a recursive function. Would you like to try that? 2014-09-20T08:08:19Z Shinmera: pjb: You will find the word is copyist 2014-09-20T08:08:25Z pjb: Thanks. 2014-09-20T08:08:32Z pjb: s/copist/copyist/g 2014-09-20T08:08:42Z Shinmera: English and its horrid words :( 2014-09-20T08:08:49Z beach: chitofan: In that case, I suggest you write a function REMOVE3 that takes a list and returns a list which is the same as the one it was given, except that all the numbers 3 have been removed. So that (REMOVE3 '(2 3 1 6 3 2 3)) => (2 1 6 2). 2014-09-20T08:08:54Z pecg quit (Quit: WeeChat 1.0) 2014-09-20T08:08:56Z chitofan: give me 5 minutes to try to extend successives to the use of lists bigger than 2 elements 2014-09-20T08:09:32Z beach: You can have as many minutes, hours, days, weeks, months, years as you like. 2014-09-20T08:09:42Z Quadrescence: Some fun with named arguments: https://bitbucket.org/tarballs_are_good/lisp-random/raw/f842b64bcc8e8f4b356ff404e81bff922c09a9d1/named-arguments.lisp 2014-09-20T08:09:53Z kanru` quit (Ping timeout: 244 seconds) 2014-09-20T08:09:57Z chitofan: (defun remove-zeroes (row) (remove-if zerop row))? 2014-09-20T08:10:09Z pjb: (function zerop) 2014-09-20T08:10:20Z pjb: there's no variable named zerop. 2014-09-20T08:10:48Z beach: chitofan: That will work, but what I am proposing is that you learn the general shape of a recursive function, so that you an apply that knowledge elsewhere too. 2014-09-20T08:11:08Z beach: chitofan: Even simpler (remove 0 row) 2014-09-20T08:11:15Z chitofan: ok, i can try writing remove3 using recursion 2014-09-20T08:11:38Z beach: chitofan: Try thinking about base case and general case as I said. 2014-09-20T08:11:49Z pjb: (remove-if (function zerop) row) will also remove 0.0 and #C(0 0.0). 2014-09-20T08:12:00Z tadni` quit (Remote host closed the connection) 2014-09-20T08:13:57Z beach: #c(0 0.0) canonicalizes to #c(0.0 0.0) in SBCL. Shouldn't it canonicalize to 0.0? 2014-09-20T08:14:27Z pjb: Depending the implementation, there may be between 3 and 9 values that are zerop. Perhaps even more. 2014-09-20T08:14:46Z pjb: No, it could be slightly outside of the real axis. 2014-09-20T08:14:57Z pjb: But (eql#C(0 0) 0) 2014-09-20T08:15:09Z pjb: and (eql 0/1 0) too. 2014-09-20T08:15:23Z Shinmera: Quadrescence: If you use a compiler macro to do the checks it'll break on a funcall. 2014-09-20T08:15:30Z Quadrescence: Yeah. 2014-09-20T08:15:51Z beach: pjb: Right, I know about complex rationals. My example was a complex float. 2014-09-20T08:15:58Z Shinmera: You'd better put the checks into the actual function as well and expand the compiler macro to an %foo function or something that doesn't do the checks anymore. 2014-09-20T08:16:10Z Quadrescence: Shinmera, Well, what do you mean? You mean (funcall #'comment ...) ? 2014-09-20T08:16:18Z beach: pjb: OK, found it. 2014-09-20T08:16:23Z Shinmera: Quadrescence: No I mean your named arguments thing. 2014-09-20T08:16:33Z Quadrescence: Shinmera, ohh, yes, certainly will 2014-09-20T08:16:40Z beach: clhs 12.1.5.3 2014-09-20T08:16:40Z specbot: Rule of Canonical Representation for Complex Rationals: http://www.lispworks.com/reference/HyperSpec/Body/12_aec.htm 2014-09-20T08:16:46Z beach: pjb: ^ 2014-09-20T08:17:07Z beach: pjb: "This rule does not apply to complex numbers whose parts are floats..." 2014-09-20T08:17:51Z mishoo_ joined #lisp 2014-09-20T08:17:52Z mishoo quit (Ping timeout: 240 seconds) 2014-09-20T08:18:10Z pjb: floating points are always ±ε 2014-09-20T08:18:21Z beach: Sort of. 2014-09-20T08:19:08Z Shinmera: Quadrescence: Also I don't see any reason to not allow something like (defun-named foo (a b &key c d &rest d) ..) 2014-09-20T08:19:24Z beach: The rule makes sense, if you take 0.0 to mean any x between -ε and +ε. 2014-09-20T08:19:29Z Shinmera: *(&rest d a b &key c d) 2014-09-20T08:19:44Z Quadrescence: Shinmera, I wouldn't do that. At that point, I'd just want another thing called &named and do the parsing myself 2014-09-20T08:19:55Z urandom__ joined #lisp 2014-09-20T08:20:08Z tadni joined #lisp 2014-09-20T08:20:09Z chitofan: http://paste.lisp.org/display/143789#3 2014-09-20T08:20:25Z beach: chitofan: NO, NO. No labels. 2014-09-20T08:20:49Z tadni quit (Remote host closed the connection) 2014-09-20T08:21:04Z zeebrah joined #lisp 2014-09-20T08:22:12Z beach: chitofan: Just COND and recursive calls. 2014-09-20T08:22:32Z mishoo_ quit (Ping timeout: 260 seconds) 2014-09-20T08:23:02Z beach: chitofan: And no PUSH. 2014-09-20T08:23:29Z beach: chitofan: Just call REMOVE3 recursively as appropriate. 2014-09-20T08:23:53Z beach: chitofan: Do you want me to show you the answer? 2014-09-20T08:24:07Z beach: chitofan: I'll let you try a bit more. 2014-09-20T08:24:23Z chitofan: how about a hint how to remove 3 without storing the other values in a new list? 2014-09-20T08:24:43Z k-stz joined #lisp 2014-09-20T08:24:44Z beach: chitofan: By returning a new list. 2014-09-20T08:25:05Z beach: chitofan: If the list you receive as an argument is empty, then return the empty list. 2014-09-20T08:25:37Z beach: chitofan: If the list you receive is not empty, and it starts with a 3, then return the list that you get by removing the 3s from the remaining list. 2014-09-20T08:26:01Z malglim_ is now known as malglim 2014-09-20T08:26:24Z beach: chitofan: Finally, if the list is not empty, and it does not start with 3, then return a list consisting of the first element of the original list followed by the list you obtain by removing all the 3s from the remaining list. 2014-09-20T08:26:31Z beach: chitofan: That's it. 2014-09-20T08:26:41Z beach: No PUSH, no LABELS. Just CONS. 2014-09-20T08:29:04Z DGASAU quit (Ping timeout: 260 seconds) 2014-09-20T08:31:12Z chitofan: my head hurts and i feel dumb. i can't do it without LABELS to store the values in a new list 2014-09-20T08:31:26Z DGASAU joined #lisp 2014-09-20T08:33:07Z beach: OK, I'll show you: (defun remove3 (list) (cond ((null list) '()) ((eql (car list) 3) (remove3 (cdr list))) (t (cons (car list) (remove3 (cdr list)))))) 2014-09-20T08:33:25Z beach: chitofan: Study it and make sure you understand it. If not, ask. 2014-09-20T08:36:46Z malbertife joined #lisp 2014-09-20T08:37:17Z pranavrc joined #lisp 2014-09-20T08:37:29Z Elench quit (Ping timeout: 260 seconds) 2014-09-20T08:37:46Z kobain quit (Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/) 2014-09-20T08:39:14Z malbertife_ quit (Ping timeout: 258 seconds) 2014-09-20T08:39:15Z chitofan: beach: i THINK i understand, but i probably don't 2014-09-20T08:39:30Z chitofan: what's the advantage of writing it this way over my LABELS + PUSH way? 2014-09-20T08:40:23Z beach: chitofan: It is the preferred way of thinking recursively. Until you understand how this function works, there is no way you can do anything more complicated with any sort of programming. 2014-09-20T08:41:24Z pranavrc quit (Ping timeout: 244 seconds) 2014-09-20T08:41:27Z nemesist quit (Quit: nemesist) 2014-09-20T08:41:59Z tadni joined #lisp 2014-09-20T08:42:13Z beach: chitofan: You might want to use TRACE to trace this function, and then try it out with several examples. That might help your understanding. 2014-09-20T08:42:30Z harish joined #lisp 2014-09-20T08:44:50Z Grue` quit (Remote host closed the connection) 2014-09-20T08:45:02Z beach: chitofan: Unfortunately, it is not allowed to trace CONS, but you can do (defun my-cons (x list) (cons x list)). Then you can replace CONS by MY-CONS in my solution and trace MY-CONS. 2014-09-20T08:45:17Z beach: Now, it becomes obvious from the trace how the function works. 2014-09-20T08:45:44Z Grue` joined #lisp 2014-09-20T08:46:05Z mishoo_ joined #lisp 2014-09-20T08:47:50Z Quadrescence: Shinmera, Implemented that bit, even if a bit sloppy. https://bitbucket.org/tarballs_are_good/lisp-random/src/91c55b58a7b88c5195c361b3bf1bd1df3e018f34/named-arguments.lisp?at=default 2014-09-20T08:48:07Z beach: chitofan: http://paste.lisp.org/+32Y5/4 2014-09-20T08:49:20Z stepnem joined #lisp 2014-09-20T08:49:20Z chitofan: one moment, i'm trying to apply that way of code writing to successives 2014-09-20T08:50:40Z beach: chitofan: But you also need to understand how it works. 2014-09-20T08:51:46Z Quadrescence: Shinmera, If I tried a bit harder, the unchecked function could actually just have a standard lambda list. It would require massaging the &WHOLE form to remove keywords carefully. I guess once that is done, we'd be as close to optimized as can be. 2014-09-20T08:55:02Z chitofan: http://paste.lisp.org/display/143789#5 2014-09-20T08:55:19Z mishoo_ quit (Remote host closed the connection) 2014-09-20T08:55:24Z chitofan: is this ok? i removed the part where you consed a 0 after merging 2014-09-20T08:55:38Z mishoo_ joined #lisp 2014-09-20T08:55:56Z beach: chitofan: Test it. 2014-09-20T08:56:38Z chitofan: it works :) 2014-09-20T08:56:45Z beach: chitofan: It will return a list with a different length if you don't cons the 0 (or NIL). 2014-09-20T08:57:04Z beach: chitofan: It depends on how you define "works" :) 2014-09-20T08:57:22Z chitofan: its ok, because i meant to pad the zeroes after i do merging 2014-09-20T08:57:33Z beach: chitofan: What happens with (16 8 4 2 2)? 2014-09-20T08:57:44Z chitofan: i see that in lieu of pushing into a new list, you consed at the end 2014-09-20T08:57:53Z beach: sort of. 2014-09-20T08:58:00Z chitofan: but i cant visualize the data flow. but i do rememebr reading something like this in SICP 2014-09-20T08:58:21Z beach: chitofan: Shouldn't (16 8 4 2 2) return (16 8 4 4)? 2014-09-20T08:58:28Z Grue`: eq isn't guaranteed to work with numbers, it will be fun if you go into 512+ territory and it stops working :) 2014-09-20T08:58:40Z beach: Right. 2014-09-20T08:58:51Z beach: chitofan: Use EQL to compare numbers. 2014-09-20T08:58:57Z Grue`: or = 2014-09-20T08:59:03Z beach: yeah. 2014-09-20T08:59:40Z defaultxr quit (Quit: gnight) 2014-09-20T08:59:48Z beach: chitofan: If the first two are not the same, you need to cons the first element onto the list resulting from the recursive call of the rest. 2014-09-20T08:59:52Z mishoo_ quit (Ping timeout: 240 seconds) 2014-09-20T09:00:01Z beach: chitofan: Trace your functions and you'll see. 2014-09-20T09:00:20Z beach: chitofan: Try it with just (16 2 2). 2014-09-20T09:00:55Z beach: chitofan: Did you trace your functions? It will help you visualize the control flow. 2014-09-20T09:01:47Z nug700 quit (Quit: bye) 2014-09-20T09:03:30Z chitofan: i changed it to cons unmerged numbers 2014-09-20T09:03:39Z chitofan: but there is a horrid bug.. 2014-09-20T09:03:50Z chitofan: if it is an odd number '(16 8 4 2 2) 2014-09-20T09:03:58Z chitofan: the pair of 2s is ignored at the end 2014-09-20T09:04:17Z chitofan: let me work on it abit more 2014-09-20T09:05:28Z Grue`: yeah because you step by 2 conses you can't catch pairs of all successive numbers 2014-09-20T09:05:55Z Grue`: [16 8] [4 2] [2] 2014-09-20T09:06:27Z beach: chitofan: What Grue` says. If the first two are not equal, you should just skipt the first one. 2014-09-20T09:07:04Z beach: *skip 2014-09-20T09:08:37Z attila_lendvai joined #lisp 2014-09-20T09:08:37Z attila_lendvai quit (Changing host) 2014-09-20T09:08:37Z attila_lendvai joined #lisp 2014-09-20T09:09:47Z chitofan: ok, it's done 2014-09-20T09:09:48Z chitofan: http://paste.lisp.org/display/143789#6 2014-09-20T09:10:12Z beach: chitofan: Beautiful! 2014-09-20T09:10:26Z beach: Now just replace (nthcdr 2 list) by (cddr list). 2014-09-20T09:10:44Z chitofan: beach: :) 2014-09-20T09:11:08Z beach: chitofan: I think that's all I can take for today. 2014-09-20T09:11:20Z chitofan: thank you so much 2014-09-20T09:15:08Z beach fully expects this effort to pay off in the future when chitofan will write beautiful open-source libraries for all of us. 2014-09-20T09:15:46Z chitofan: when, where and at what proficiency can i start? :) 2014-09-20T09:16:00Z beach: I'll let you know. :) 2014-09-20T09:17:33Z faheem: can someone point me to that new project of beach, please? i forget the link. 2014-09-20T09:17:41Z BitPuffin quit (Ping timeout: 260 seconds) 2014-09-20T09:23:02Z schaueho quit (Quit: Leaving) 2014-09-20T09:26:02Z vanila quit (Quit: Leaving) 2014-09-20T09:26:11Z beach: minion: Please tell faheem about SICL. 2014-09-20T09:26:11Z minion: faheem: SICL: SICL is a (perhaps futile) attempt to re-implement Common Lisp from scratch, hopefully using improved programming and bootstrapping techniques. See https://github.com/robert-strandh/SICL 2014-09-20T09:26:20Z mood_ is now known as mood 2014-09-20T09:26:23Z beach: faheem: That one? 2014-09-20T09:26:38Z beach: minion: Please tell faheem about Cleavir. 2014-09-20T09:26:38Z minion: faheem: Cleavir: A project to create an implementation-independent compilation framework for Common Lisp. Currently Cleavir is part of SICL, but that might change in the future 2014-09-20T09:26:44Z beach: Or maybe that one. 2014-09-20T09:27:36Z Quadrescence: Shinmera, If you're still paying attention, I optimized the unchecked call to not use &KEY. Now it will compile into a direct call of just required arguments. https://bitbucket.org/tarballs_are_good/lisp-random/raw/b407cbbe989f1009b618b417f34fe72c73671955/named-arguments.lisp 2014-09-20T09:29:40Z pt1 quit (Remote host closed the connection) 2014-09-20T09:29:54Z loic_ joined #lisp 2014-09-20T09:31:22Z loic__ quit (Ping timeout: 258 seconds) 2014-09-20T09:31:28Z faheem: beach: SICL, i think 2014-09-20T09:31:54Z faheem: Thanks 2014-09-20T09:32:57Z faheem: beach: what is the current usability level? 2014-09-20T09:33:07Z beach: faheem: Around 0. 2014-09-20T09:33:18Z beach: faheem: There is plenty of documentation, but if you need for me to explain something, no problem. 2014-09-20T09:33:38Z alexherbo2 joined #lisp 2014-09-20T09:33:40Z beach: faheem: It's a project for now. Not yet a product. 2014-09-20T09:33:51Z faheem: beach: ok. does it build? 2014-09-20T09:33:54Z beach: No 2014-09-20T09:34:00Z faheem: beach: ok. 2014-09-20T09:34:00Z beach: Parts of it will build. 2014-09-20T09:34:12Z beach: But I have no complete list of what will build and what will not. 2014-09-20T09:34:18Z faheem: beach: ok. 2014-09-20T09:34:22Z beach: There are a lot of ASDF systems for different parts. 2014-09-20T09:35:00Z faheem: beach: i'm a beginner. so i doubt i have anything useful to say or contribute, but i'll take a look. 2014-09-20T09:35:20Z faheem: the intention is for this to eventually become a complete CL implementation? 2014-09-20T09:35:49Z beach: faheem: Yes, but also to have the building blocks usable to other implementations. 2014-09-20T09:36:04Z beach: ... which makes everything an order of magnitude harder. 2014-09-20T09:36:07Z faheem: beach: ambitious 2014-09-20T09:36:19Z beach: Yeah, I know. 2014-09-20T09:36:25Z faheem: looks like you have done a lot of work already 2014-09-20T09:36:30Z beach: Oh yes. 2014-09-20T09:36:56Z beach: Main things lacking: structure the thing into "correct" modules. And some compiler optimizations. 2014-09-20T09:37:41Z ehu joined #lisp 2014-09-20T09:37:52Z beach: Otherwise, everything is mostly done. CLOS is done. The compiler is done except for some optimizations and some smaller stuff. 2014-09-20T09:38:19Z faheem: beach: ok. it might be reasonable to get it to the point of basic functionality. add some tests. then people can drive it. and that would help push ti forward. perhaps 2014-09-20T09:38:52Z beach: faheem: Perhaps. We'll see. 2014-09-20T09:38:52Z faheem: if it is already there, some indication of basic tests i can run would be helpful. e.g (+ 1 1) 2014-09-20T09:39:24Z beach: faheem: At the moment, I haven't concentrated on making the different parts work together, so it is not as easy as it would seem. 2014-09-20T09:39:46Z beach: faheem: But I am working on it. Have patience. 2014-09-20T09:40:00Z faheem: beach: ok. i'll keep an eye out for progress 2014-09-20T09:40:05Z beach: Good. 2014-09-20T09:40:15Z faheem: thanks for the explanations 2014-09-20T09:41:59Z Shinmera: Quadrescence: I was out shopping, sorry 2014-09-20T09:42:18Z Quadrescence: IRC can be asynchronous :) 2014-09-20T09:42:36Z lupine joined #lisp 2014-09-20T09:42:37Z Shinmera: Quadrescence: I can't help but look at your code and think it's much more complicated than need be, but I'd have to invest some significant thought to say if it is possible to do in a more compressed manner, if you will. 2014-09-20T09:43:31Z faheem: beach: is the modularity aspect novel? i've actually never heard of such a thing. in any language. libraries, sure. implementations, no. 2014-09-20T09:44:10Z Quadrescence: I'm unfortunately not very good at writing very short code. You'll see I can even repeat myself for the sake of semantic correctness, as on this line: https://bitbucket.org/tarballs_are_good/lisp-random/src/b407cbbe989f1009b618b417f34fe72c73671955/named-arguments.lisp?at=default#cl-131 2014-09-20T09:44:35Z Quadrescence: And 9 lines of assertions just to check that the macro is well-formed. 2014-09-20T09:45:00Z Shinmera: Quadrescence: Maybe if I get bored enough I'll take my own shot at this problem and we can compare solutions :) 2014-09-20T09:45:09Z vinleod quit (Quit: ["Textual IRC Client: www.textualapp.com"]) 2014-09-20T09:45:51Z beach: faheem: I don't know of any other implementation-independent implementation! :) 2014-09-20T09:46:05Z nydel quit (Quit: WeeChat 0.4.2) 2014-09-20T09:46:52Z faheem: beach: :-) 2014-09-20T09:47:00Z beach: faheem: But I can say this much: by thinking "implementation independent", my code becomes more modular and "cleaner" than if I think "just my implementation". 2014-09-20T09:47:28Z nydel joined #lisp 2014-09-20T09:47:54Z pranavrc joined #lisp 2014-09-20T09:49:38Z faheem: beach: sure. sounds like a good idea. 2014-09-20T09:49:46Z beach: Thanks! 2014-09-20T09:50:31Z faheem: how do you bootstrap it? C code? 2014-09-20T09:51:08Z beach: No, there is not going to be any C code in the system. 2014-09-20T09:51:19Z beach: I bootstrap on a fully conforming CL implementation. 2014-09-20T09:51:44Z faheem: beach: oh. so it would build using sbcl, for example? 2014-09-20T09:51:45Z beach: Actually, there might be a C backend, but that's different. 2014-09-20T09:51:58Z beach: faheem: Yes, that's how I am working at the moment. 2014-09-20T09:52:13Z pranavrc quit (Ping timeout: 260 seconds) 2014-09-20T09:52:27Z faheem: beach: ok. that's good. it's horrible when these compilers will only build using themselves 2014-09-20T09:52:31Z beach: In fact, SICL generic function can run together with SBCL's native ones :) 2014-09-20T09:52:44Z faheem: and ccl will only build using the exact same version. screwy 2014-09-20T09:53:04Z Patzy quit (Ping timeout: 260 seconds) 2014-09-20T09:53:09Z beach: I have one "wart". I need funcallable-standard-object, which is not in the Common Lisp HyperSpec. 2014-09-20T09:53:20Z beach: mop f-s-o 2014-09-20T09:53:20Z specbot: funcallable-standard-object: http://metamodular.com/CLOS-MOP/class-funcallable-standard-object.html 2014-09-20T09:53:37Z faheem: beach: you can't reimplement it yourself? 2014-09-20T09:53:37Z Patzy joined #lisp 2014-09-20T09:53:57Z beach: It would make things harder. I'll think about it later. 2014-09-20T09:54:28Z ehu quit (Ping timeout: 260 seconds) 2014-09-20T09:54:43Z faheem: beach: ok 2014-09-20T09:54:47Z ehu joined #lisp 2014-09-20T09:54:47Z drewc quit (Ping timeout: 245 seconds) 2014-09-20T09:55:47Z mr-foobar quit (Read error: Connection reset by peer) 2014-09-20T09:56:00Z beach: I can implement it, and I do, but I need for it to exist in the host system when I bootstrap. My own implementation needs to be bootstrapped, so ... 2014-09-20T09:56:14Z mr-foobar joined #lisp 2014-09-20T09:56:24Z faheem: beach: oh, i see. 2014-09-20T09:58:52Z faheem: beach: are you testing with multiple implementations simultaneously? ccl? 2014-09-20T09:59:04Z beach: No, just SBCL at the moment. 2014-09-20T09:59:11Z faheem: beach: ok 2014-09-20T09:59:14Z beach: But I try to keep the code Common Lisp HyperSpec conforming. 2014-09-20T09:59:23Z faheem: beach: ok. 2014-09-20T09:59:54Z faheem: but the aim is for it to be possible for ccl to build it too 2014-09-20T09:59:55Z beach: I don't think I will attempts to support bootstrapping on non-conforming implementations. 2014-09-20T09:59:59Z faheem: ? 2014-09-20T10:00:09Z beach: So long as CCL is conforming, sure. 2014-09-20T10:00:29Z faheem: i don't know if CCL is conforming. it seems very complete 2014-09-20T10:00:42Z beach: It's probably good enough. 2014-09-20T10:00:48Z faheem: beach: ok 2014-09-20T10:02:00Z beach finds his typing skills substandard today. 2014-09-20T10:02:19Z beach: "I attempts" sheesh! 2014-09-20T10:02:50Z kcj joined #lisp 2014-09-20T10:14:54Z Nizumzen joined #lisp 2014-09-20T10:17:12Z pranavrc joined #lisp 2014-09-20T10:19:20Z Cromulent joined #lisp 2014-09-20T10:19:20Z dmiles_afk quit (Read error: Connection reset by peer) 2014-09-20T10:22:33Z Cromulent quit (Client Quit) 2014-09-20T10:22:49Z Nizumzen quit (Ping timeout: 258 seconds) 2014-09-20T10:23:00Z dmiles joined #lisp 2014-09-20T10:23:59Z nipra joined #lisp 2014-09-20T10:24:00Z flip214_ joined #lisp 2014-09-20T10:24:06Z flip214 quit (Ping timeout: 258 seconds) 2014-09-20T10:24:06Z oconnore quit (Ping timeout: 258 seconds) 2014-09-20T10:24:17Z tkd_ quit (Ping timeout: 258 seconds) 2014-09-20T10:25:02Z joneshf quit (Ping timeout: 258 seconds) 2014-09-20T10:25:03Z ecraven quit (Ping timeout: 258 seconds) 2014-09-20T10:25:46Z oconnore joined #lisp 2014-09-20T10:26:12Z SHODAN quit (Ping timeout: 258 seconds) 2014-09-20T10:26:12Z Fade quit (Ping timeout: 258 seconds) 2014-09-20T10:26:29Z Nizumzen joined #lisp 2014-09-20T10:26:33Z nipra is now known as 32NAACCBB 2014-09-20T10:26:42Z pnpuff quit (Quit: Lost terminal) 2014-09-20T10:26:44Z Fade joined #lisp 2014-09-20T10:27:15Z Kruppe quit (Ping timeout: 258 seconds) 2014-09-20T10:27:20Z micro_ quit (Ping timeout: 258 seconds) 2014-09-20T10:27:35Z micro joined #lisp 2014-09-20T10:27:59Z micro is now known as Guest56725 2014-09-20T10:28:09Z joneshf joined #lisp 2014-09-20T10:28:30Z p_l quit (Ping timeout: 258 seconds) 2014-09-20T10:28:44Z SHODAN joined #lisp 2014-09-20T10:28:55Z 32NAACCBB quit (Read error: Connection reset by peer) 2014-09-20T10:28:56Z kanru quit (Ping timeout: 258 seconds) 2014-09-20T10:29:11Z p_l joined #lisp 2014-09-20T10:30:03Z benderb joined #lisp 2014-09-20T10:30:26Z bend3r quit (Ping timeout: 258 seconds) 2014-09-20T10:31:33Z oconnore quit (Remote host closed the connection) 2014-09-20T10:31:33Z oconnore joined #lisp 2014-09-20T10:33:05Z Quadrescence quit (Quit: This computer has gone to sleep) 2014-09-20T10:34:04Z _5kg_ quit (Remote host closed the connection) 2014-09-20T10:34:34Z stardiviner joined #lisp 2014-09-20T10:34:34Z stardiviner quit (Changing host) 2014-09-20T10:34:34Z stardiviner joined #lisp 2014-09-20T10:36:17Z nipra joined #lisp 2014-09-20T10:36:52Z hiroakip joined #lisp 2014-09-20T10:37:14Z Kruppe joined #lisp 2014-09-20T10:38:22Z Xach quit (Quit: brb) 2014-09-20T10:38:31Z Xach joined #lisp 2014-09-20T10:38:42Z _5kg joined #lisp 2014-09-20T10:38:49Z kuzy000_ joined #lisp 2014-09-20T10:40:21Z puchacz joined #lisp 2014-09-20T10:40:37Z kcj quit (Remote host closed the connection) 2014-09-20T10:41:53Z MoALTz quit (Quit: Leaving) 2014-09-20T10:42:40Z ehu quit (Read error: Connection reset by peer) 2014-09-20T10:42:50Z ehu joined #lisp 2014-09-20T10:43:23Z Grue`: i wish there was such thing as reverse-optional , so if you do (destructuring-bind (&reverse-optional a b c) '(1 2)), b and c get bound to 1 and 2 respectively and a is nil 2014-09-20T10:43:29Z drmeiste_ joined #lisp 2014-09-20T10:45:59Z Nizumzen quit (Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/) 2014-09-20T10:48:24Z MoALTz joined #lisp 2014-09-20T10:48:41Z markov` joined #lisp 2014-09-20T10:49:51Z stardiviner quit (Quit: my website: http://stardiviner.dyndns-blog.com/) 2014-09-20T10:50:59Z drewc joined #lisp 2014-09-20T10:51:27Z arpunk quit (Ping timeout: 272 seconds) 2014-09-20T10:52:55Z Krystof: Grue`: how much do you wish that? 2014-09-20T10:56:16Z Grue`: well I just spent an hour writing a macro that would've been easier with this functionality, but I don't think I'd use it often enough to do something about it 2014-09-20T10:58:01Z wchun quit (Ping timeout: 260 seconds) 2014-09-20T10:59:32Z Grue`: it basically created accessors by ([accessor-name] vars form) and if accessor-name is omitted it created automatic name (a la defstruct) 2014-09-20T10:59:51Z Grue`: any other order (like accessor-name in the end) would've been ugly 2014-09-20T11:03:01Z Krystof: (with-reverse-optional (destructuring-bind (&reverse-optional a b c) '(1 2) (list a b c))) 2014-09-20T11:03:01Z Krystof: (NIL 1 2) 2014-09-20T11:03:29Z hiroakip quit (Ping timeout: 272 seconds) 2014-09-20T11:03:54Z arpunk joined #lisp 2014-09-20T11:03:56Z Krystof: http://paste.lisp.org/display/143793 2014-09-20T11:04:03Z Krystof: (because anything is better than doing my tax return) 2014-09-20T11:06:02Z jusss joined #lisp 2014-09-20T11:12:14Z circ-user-knElw joined #lisp 2014-09-20T11:13:36Z nipra quit (Ping timeout: 246 seconds) 2014-09-20T11:16:56Z Nizumzen joined #lisp 2014-09-20T11:17:12Z MouldyOldBones joined #lisp 2014-09-20T11:19:23Z Ven joined #lisp 2014-09-20T11:23:01Z rszeno joined #lisp 2014-09-20T11:26:48Z jegaxd26 quit (Read error: Connection reset by peer) 2014-09-20T11:28:19Z josteink: Im having some strange issues with swank + slime 2014-09-20T11:28:55Z Xach: What's up? 2014-09-20T11:29:06Z josteink: basically I cant connect to swank from emacs 2014-09-20T11:29:15Z josteink: I get lots of module failing to load 2014-09-20T11:29:27Z josteink: I installed swank via quicklisp, so I would assume dependencies should be handled 2014-09-20T11:29:34Z josteink: but 2014-09-20T11:29:47Z josteink: if I fire up sbcl with --no-sysinit 2014-09-20T11:29:51Z josteink: then swank forks fine 2014-09-20T11:29:55Z josteink: works 2014-09-20T11:30:13Z josteink: I can connect with slime and everything is good 2014-09-20T11:30:31Z attila_lendvai quit (Quit: Leaving.) 2014-09-20T11:30:31Z josteink: to be clear, the error happens when I try to connect with slime, not when I try to setup the swank server 2014-09-20T11:30:38Z josteink: this is what I get: 2014-09-20T11:30:39Z josteink: http://pastebin.com/Hf21DQC3 2014-09-20T11:31:20Z Xach: josteink: it looks like you installed slime/swank via your package manager, too. it's interfering with the correct operation of slime. 2014-09-20T11:31:32Z Xach: the /usr/share/common-lisp/ part is the red flag 2014-09-20T11:31:37Z josteink: lets see 2014-09-20T11:32:41Z josteink: good catch. Somehow I completely missed that, even among all those CAPSy things :) 2014-09-20T11:35:46Z josteink: voila! 2014-09-20T11:35:48Z josteink: it works :D 2014-09-20T11:36:21Z josteink: now I can seriously get hacking with stumpwm. awesome :D 2014-09-20T11:36:47Z josteink: thanks :) 2014-09-20T11:36:48Z Xach: hooray! 2014-09-20T11:36:51Z Xach: no problem 2014-09-20T11:39:23Z zeebrah quit (Ping timeout: 240 seconds) 2014-09-20T11:43:29Z Xach hacks more on cross-platform buildapp 2014-09-20T11:43:33Z circ-user-knElw_ joined #lisp 2014-09-20T11:44:17Z circ-user-knElw_ quit (Remote host closed the connection) 2014-09-20T11:46:58Z circ-user-knElw quit (Ping timeout: 272 seconds) 2014-09-20T11:49:21Z pranavrc quit (Remote host closed the connection) 2014-09-20T11:49:44Z |3b| made some videos of 3bgl-shaders stuff: https://www.youtube.com/watch?v=DS_cwQJc8HY https://www.youtube.com/watch?v=BfAxCaQN3og 2014-09-20T11:51:57Z segv- joined #lisp 2014-09-20T11:53:06Z Xach: TRONlisp 2014-09-20T11:53:57Z nell quit (Ping timeout: 245 seconds) 2014-09-20T11:54:51Z Xach: |3b|: cool. wish there was a disco beat. 2014-09-20T11:55:15Z |3b| can't even get video right, audio will have to wait :p 2014-09-20T11:57:09Z jusss quit (Read error: Connection reset by peer) 2014-09-20T11:58:15Z malbertife quit (Ping timeout: 244 seconds) 2014-09-20T12:04:12Z rszeno quit (Quit: Leaving.) 2014-09-20T12:07:38Z quazimodo joined #lisp 2014-09-20T12:09:16Z drmeiste_ is now known as drmeister_ 2014-09-20T12:09:26Z klltkr joined #lisp 2014-09-20T12:17:43Z jusss joined #lisp 2014-09-20T12:18:09Z Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) 2014-09-20T12:18:21Z Saigut joined #lisp 2014-09-20T12:24:32Z tkd_ joined #lisp 2014-09-20T12:29:27Z Beetny quit (Ping timeout: 245 seconds) 2014-09-20T12:30:01Z Shinmera: minion: memo for Quadrescence: I made a thing. http://plaster.tymoon.eu/view/6T# 2014-09-20T12:30:02Z minion: Remembered. I'll tell Quadrescence when he/she/it next speaks. 2014-09-20T12:31:35Z oleo__ quit (Quit: Verlassend) 2014-09-20T12:32:48Z newbie89 joined #lisp 2014-09-20T12:33:00Z newbie89 left #lisp 2014-09-20T12:35:49Z Ven joined #lisp 2014-09-20T12:40:09Z shka joined #lisp 2014-09-20T12:42:17Z oleo joined #lisp 2014-09-20T12:43:09Z kcj joined #lisp 2014-09-20T12:44:24Z klltkr quit (Quit: My MacBook has gone to sleep. ZZZzzz…) 2014-09-20T12:44:45Z klltkr joined #lisp 2014-09-20T12:44:56Z zeebrah joined #lisp 2014-09-20T12:45:05Z klltkr quit (Client Quit) 2014-09-20T12:49:12Z jtza8 joined #lisp 2014-09-20T12:52:44Z oleo is now known as Guest16743 2014-09-20T12:53:13Z EvW joined #lisp 2014-09-20T12:54:24Z jtza8 quit (Ping timeout: 246 seconds) 2014-09-20T12:54:28Z oleo__ joined #lisp 2014-09-20T12:54:30Z shka: ave tux 2014-09-20T12:54:55Z Somelauw joined #lisp 2014-09-20T12:55:30Z shka: when i load my asdf project with quicklisp it fails to load a specific file because of missing function declaration 2014-09-20T12:55:48Z shka: that is declared right in this file 2014-09-20T12:56:00Z Guest16743 quit (Ping timeout: 260 seconds) 2014-09-20T12:56:05Z shka: if i load this file manually, everything seems to work fine 2014-09-20T12:56:17Z shka: and i can quickload file correctly 2014-09-20T12:56:39Z shka: what are the possible reasons behind this behavior? 2014-09-20T12:56:54Z Xach: shka: One possible reason is you are using a function within a macro but not making it available early enough via eval-when 2014-09-20T12:57:15Z Xach: LOAD of a source file has different semantics from COMPILE-FILE followed by LOAD 2014-09-20T12:57:29Z Xach: shka: hard to say without seeing the code and more of what you're doing, though. 2014-09-20T12:57:35Z shka: Xach: you got me 2014-09-20T12:57:40Z shka: it is in the macro 2014-09-20T12:58:03Z Xach: wrap its defun in (eval-when (:compile-toplevel :load-toplevel :execute) ...) then 2014-09-20T12:58:12Z pierre1_ joined #lisp 2014-09-20T12:58:26Z shka: Xach: let me try 2014-09-20T12:58:32Z Shinmera: Alternatively you could put the function into a file that is loaded before the one with the macro 2014-09-20T12:58:54Z shka: ah right 2014-09-20T12:58:56Z Xach: also a workable approach 2014-09-20T12:59:21Z shka: i remember that some even put all macros in seperate file 2014-09-20T12:59:33Z shka: so now i see why 2014-09-20T12:59:51Z shka: thanks for help :-) 2014-09-20T13:00:04Z hitecnologys joined #lisp 2014-09-20T13:01:12Z oleo__ quit (Quit: Verlassend) 2014-09-20T13:01:58Z Somelauw: I think I'm finally getting lithp. However my programmer friendth don't underthtand me now anymore. 2014-09-20T13:04:09Z oleo__ joined #lisp 2014-09-20T13:04:32Z oleo__ is now known as oleo 2014-09-20T13:05:05Z Somelauw: they think i talk/program funny 2014-09-20T13:08:16Z oleo: who ? 2014-09-20T13:08:47Z pjb: Somelauw: lisp exists since 1959. What does that tell you about mispronunciations? 2014-09-20T13:09:16Z pjb: Somelauw: how funny do you think it remains, after 55 years? 2014-09-20T13:09:25Z pjb: Somelauw: how dumb does that make you feel? 2014-09-20T13:09:34Z Somelauw: tho they are talking funny 2014-09-20T13:10:14Z Somelauw: sorry, i'm still very young 2014-09-20T13:12:23Z adhoc joined #lisp 2014-09-20T13:12:42Z k-stz quit (Ping timeout: 250 seconds) 2014-09-20T13:13:59Z wasamasa: it's fine, we all were 10 years old at some point 2014-09-20T13:15:24Z emma quit (Ping timeout: 246 seconds) 2014-09-20T13:15:36Z rme joined #lisp 2014-09-20T13:22:00Z quazimodo: hi Xach 2014-09-20T13:22:00Z minion: quazimodo, memo from pjb: the thing is that in CLOS, methods are attached to generic functions. There's a single generic function for all the methods of same name. In Smalltalk-like OO, methods are attached to the class, but the number of arguments is part of the name (with the colons). In C++-like OO, methods are also attached to the class, and there's operator overloading to allow different signature with the same method 2014-09-20T13:22:00Z minion: quazimodo, memo from pjb: name. The argument count and types are encoded in the real method names (mangling). 2014-09-20T13:22:00Z minion: quazimodo, memo from pjb: so, in CLOS, what you can do is to use &key &allow-other-keys and &rest in a generic function signature to allow methods to take different arguments, but they are not used for the dispatching. The alternative is to use different (generic-)functions: (to-string obj) (to-string/indent obj indent) (to-string/base obj base) etc. 2014-09-20T13:22:00Z minion: quazimodo, memo from pjb: there is more than one dimension to organize code. Often, you have modules to deal with a given entity, so it seems logical to rassemble the service object, the orm object, the controller and decorator for that entity in the same place. Of course, the compilation time dependencies are orthogonal, as are the run-time dependencies, and as is the hierarchical dependencies, and so on. 2014-09-20T13:22:00Z minion: quazimodo, memo from pjb: In a big project, having subdirectories per features can be a good way to organize it. In anycase, IMO, source file management should be done automatically by the IDE (I will have to teach emacs something one of these days…) 2014-09-20T13:22:00Z minion: quazimodo, memo from pjb: For an application, one package = one file may be too fine grained. I would define packages in terms of big components in the applications, and allow for several subcomponents being implemented in each package, with code spread over files in some logical way (depending on the components, no strict rule here). 2014-09-20T13:22:00Z minion: quazimodo, memo from pjb: Also notice that in CL, you may have to split code over files for compilation time/macro expansion time dependencies reasons. 2014-09-20T13:24:16Z quazimodo: pjb: thanks pjb :D 2014-09-20T13:24:29Z jusss quit (Quit: ERC Version 5.2 (IRC client for Emacs)) 2014-09-20T13:24:41Z Nizumzen quit (Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/) 2014-09-20T13:25:44Z Xach: That is very, very annoying. 2014-09-20T13:26:02Z blakbunnie27 quit (Quit: EliteBNC free bnc service - http://elitebnc.org - be a part of the Elite!) 2014-09-20T13:27:22Z kcj quit (Remote host closed the connection) 2014-09-20T13:28:18Z blakbunnie27 joined #lisp 2014-09-20T13:28:25Z Xach: quazimodo: What's up? 2014-09-20T13:30:09Z emma joined #lisp 2014-09-20T13:32:22Z Xach: pjb: Next time, make a paste and put the link in the memo. 2014-09-20T13:34:40Z malbertife joined #lisp 2014-09-20T13:36:56Z drmeister_: It was a nice review though :-) 2014-09-20T13:37:15Z Longlius joined #lisp 2014-09-20T13:39:08Z paul0 joined #lisp 2014-09-20T13:40:14Z clop2 joined #lisp 2014-09-20T13:41:02Z madrik quit (Ping timeout: 245 seconds) 2014-09-20T13:48:41Z edgar-rft quit (Quit: session corrupted into paranoid nothing) 2014-09-20T13:52:22Z nell joined #lisp 2014-09-20T13:52:52Z drmeister_ quit (Remote host closed the connection) 2014-09-20T13:57:07Z clop2: can someone recommend a tutorial for creating a proper common lisp library using asdf/quicklisp? I found https://xach.livejournal.com/278047.html but I don't understand what quickproject does or how it updates the ASDF registry 2014-09-20T13:57:32Z drmeiste_ joined #lisp 2014-09-20T13:57:48Z jtza8 joined #lisp 2014-09-20T13:58:42Z jegaxd26 joined #lisp 2014-09-20T14:00:00Z Grue`: quickproject creates .asd file and a few other files, then you add stuff to these files 2014-09-20T14:00:49Z Grue`: it doesn't update asdf registry, you should presumably set up asdf so that it can see the .asd file 2014-09-20T14:01:16Z Grue`: see http://common-lisp.net/project/asdf/asdf.html#Configuring-ASDF-to-find-your-systems 2014-09-20T14:01:29Z Somelauw quit (Quit: WeeChat 0.4.2) 2014-09-20T14:06:25Z clop2: i guess that's the part i'm unsure about... i don't have a ~/common-lisp or ~/.local/share/common-lisp directory 2014-09-20T14:07:11Z Grue`: in Emacs edit this file and run M-x make-directory 2014-09-20T14:07:21Z Grue`: or use mkdir in command line 2014-09-20T14:07:23Z madrik joined #lisp 2014-09-20T14:08:11Z Grue`: namely ~/.config/common-lisp/source-registry.conf.d/projects.conf 2014-09-20T14:08:23Z Grue`: you don't really need the other ones 2014-09-20T14:14:13Z samebcha1e is now known as samebchase 2014-09-20T14:16:30Z |3b|: easiest way is to just put your project under quicklisp/local-projects/ if you use quicklisp 2014-09-20T14:17:51Z |3b|: i guess ~/common-lisp/ would be equally easy 2014-09-20T14:18:27Z clop2: so i just put my project there, with a .asd file in the top-level directory or something? 2014-09-20T14:21:42Z Grue`: no, it's recursive so anywhere under that directory 2014-09-20T14:23:47Z puchacz: hi, is it correct please? (puri:uri-query (puri:parse-uri "/?uni%A9=3&foo=4%265")) ---> "unié=3&foo=4%265" 2014-09-20T14:23:58Z puchacz: I doubt é should be unescaped 2014-09-20T14:24:35Z Grue`: I'm getting # 2014-09-20T14:24:37Z puchacz: maybe it is correct but I don't understand the contract for puri 2014-09-20T14:24:43Z Grue`: oh wait 2014-09-20T14:24:43Z jlongster joined #lisp 2014-09-20T14:25:14Z puchacz: I mean - in my example %26 is left escaped, but not the unicode character é 2014-09-20T14:25:54Z puchacz: so it seems to me it is doing *some* unescaping, but not full 2014-09-20T14:26:11Z puchacz: for full unescaping it would have to return list of name/value pairs anyway 2014-09-20T14:26:32Z ndrei_ quit (Ping timeout: 258 seconds) 2014-09-20T14:27:09Z ndrei quit (Ping timeout: 246 seconds) 2014-09-20T14:27:59Z pt1 joined #lisp 2014-09-20T14:28:20Z |3b|: i suspect it just re-escapes it on printing or something, and doesn't escape é 2014-09-20T14:28:47Z |3b|: if you swap the numbers, it leaves %26 after uni, and é between 4 and 5 2014-09-20T14:29:07Z puchacz: |3b| if you skip puri:uri-query and just inspect parsed object pls 2014-09-20T14:29:14Z Karl_Dscc joined #lisp 2014-09-20T14:29:17Z |3b|: yeah, i guess it looks like that internally too 2014-09-20T14:29:21Z Grue`: decode-escaped-encoding uses *reserved-characters* 2014-09-20T14:29:35Z puchacz: I think it is somehow wrong 2014-09-20T14:29:36Z jlongster quit (Ping timeout: 258 seconds) 2014-09-20T14:29:37Z Grue`: I think every character that is not reserved is not escaped 2014-09-20T14:29:57Z otwieracz quit (Ping timeout: 272 seconds) 2014-09-20T14:30:01Z Grue`: what is %26 anyway? 2014-09-20T14:30:21Z puchacz: ampersand 2014-09-20T14:30:36Z Grue`: so it's in *reserved-characters* and `e is not 2014-09-20T14:30:36Z puchacz: if it unescaped it, you wouldn't know where parameter ends 2014-09-20T14:31:16Z Grue`: it's probably in some RFC 2014-09-20T14:31:27Z puchacz: according to http://en.wikipedia.org/wiki/Percent-encoding everything that is not explicitely listed should be encoded 2014-09-20T14:31:34Z puchacz: so any unicode character should 2014-09-20T14:32:05Z Grue`: "Characters from the unreserved set never need to be percent-encoded." 2014-09-20T14:32:28Z jlongster joined #lisp 2014-09-20T14:32:41Z puchacz: but "Other characters in a URI must be percent encoded." 2014-09-20T14:32:47Z Grue`: wait, unreserved set is not a complement of reserved set 2014-09-20T14:33:12Z puchacz: my understanding is that what is not explicitely listed there should be encoded 2014-09-20T14:33:52Z whmark joined #lisp 2014-09-20T14:34:03Z puchacz: ah, no. you are right 2014-09-20T14:34:28Z pt1 quit (Remote host closed the connection) 2014-09-20T14:34:46Z honkfest1val is now known as honkfestival 2014-09-20T14:35:10Z nemesist joined #lisp 2014-09-20T14:35:56Z Grue`: well, it says "should convert all other characters to bytes according to UTF-8, and then percent-encode those values." but it was introduced in january 2005 and PURI could be older than that 2014-09-20T14:38:07Z jlongster quit (Ping timeout: 245 seconds) 2014-09-20T14:39:18Z otwieracz joined #lisp 2014-09-20T14:41:56Z mingvs quit (Ping timeout: 272 seconds) 2014-09-20T14:43:25Z mingvs joined #lisp 2014-09-20T14:47:40Z drmeiste_: Ahhh, now linking compiled modules works nicely. I figured out how to use "appending" linkage and each compiled file puts it's local linkage MAIN function in a an "appending" linkage global variable. When modules are linked the "appending" linkage global variables are concatenated together. 2014-09-20T14:47:48Z nemesist_ joined #lisp 2014-09-20T14:48:14Z logand joined #lisp 2014-09-20T14:48:31Z drmeiste_: When loading a linked fasl the appended function pointers are executed in turn and voila, everything runs. 2014-09-20T14:48:56Z nemesist quit (Ping timeout: 260 seconds) 2014-09-20T14:48:56Z nemesist_ is now known as nemesist 2014-09-20T14:49:11Z drmeiste_: Now I just need to be able to add a prefix form and post-fix form and I should have everything ASDF needs to implement CREATE-SYSTEM. 2014-09-20T14:49:24Z drmeiste_: Or CREATE-IMAGE - whatever it's called. 2014-09-20T14:50:27Z drmeiste_: Hmm, that makes me think - does the load-time-value stuff work with this. 2014-09-20T14:50:38Z drmeiste_ is now known as drmeister_ 2014-09-20T14:50:42Z drmeister_: It better. 2014-09-20T14:52:12Z drmeister_: I think it's just a matter of getting the right (private/external) linkage for everything. 2014-09-20T14:57:57Z emma quit (Ping timeout: 246 seconds) 2014-09-20T14:58:13Z jlongster joined #lisp 2014-09-20T15:00:03Z innertracks joined #lisp 2014-09-20T15:01:11Z faheem: drmeister_: any news about the code release? 2014-09-20T15:01:27Z drmeister_: faheem: Yeah - I'm clear to go forward. 2014-09-20T15:01:51Z drmeister_: I'm just cleaning up the build process this weekend and inserting copyright notices into every file. 2014-09-20T15:01:59Z faheem: drmeister_: congratulations. that's good news. i gather it took a while. are you putting it up on github? 2014-09-20T15:02:22Z drmeister_: Yes. It is up on github. I just need to throw the switch. 2014-09-20T15:02:30Z faheem: drmeister_: ok 2014-09-20T15:02:42Z faheem: is it currently buildable? 2014-09-20T15:03:24Z drmeister_: Yeah, I'm just cleaning it up. It's not a like other build systems though so I'm trying to make it less complicated. 2014-09-20T15:03:40Z faheem: drmeister_: ok. looking forward to taking a look 2014-09-20T15:03:41Z drmeister_: It's a configuration file and a makefile. 2014-09-20T15:03:55Z drmeister_: The makefile invokes boost build. 2014-09-20T15:03:56Z faheem: drmeister_: autotools? they're complicated 2014-09-20T15:04:07Z faheem: drmeister_: eww, boost build. 2014-09-20T15:04:13Z faheem: i hate that thing. 2014-09-20T15:04:15Z drmeister_: No, I don't use autotools. I probably should. 2014-09-20T15:04:18Z drmeister_: Ditto. 2014-09-20T15:04:23Z faheem: so why use it? 2014-09-20T15:04:29Z drmeister_: But it's natural to ./configure; make 2014-09-20T15:04:35Z drmeister_: Familiar 2014-09-20T15:04:52Z faheem: drmeister_: if you say so. personally, i use scons. and am quite happy with it 2014-09-20T15:05:16Z drmeister_: But it's redundant because boost build handles all the cross-platform stuff. I just have a bit of configuration to set up to customize it. 2014-09-20T15:05:26Z faheem: drmeister_: ok 2014-09-20T15:06:02Z faheem: drmeister_: do you bootstrap from C++? 2014-09-20T15:06:03Z drmeister_: I'm deeply committed to boost build. I have a love/hate relationship with it. 2014-09-20T15:06:10Z drmeister_: Yes, it bootstraps from C++. 2014-09-20T15:06:38Z faheem: drmeister_: i tried it. i fairly rapidly decided i hated it. that was many years ago, but i doubt it has changed much 2014-09-20T15:07:05Z drmeister_: But there are half a dozen libraries it depends on and so I have a separate repo called "externals-clasp" that you can download and it will install everything clasp needs in $HOME/local/externals-clasp. 2014-09-20T15:07:06Z faheem: around 2004/2005 i was learning to use boost python. and that is what the devs used for it. 2014-09-20T15:07:24Z jlongster quit (Ping timeout: 246 seconds) 2014-09-20T15:07:26Z drmeister_: On the other hand if you want to configure your system yourself you can do that as well. 2014-09-20T15:07:42Z faheem: i still use boost python. looking for alternatives. hence, CL. 2014-09-20T15:07:55Z drmeister_: I implemented something like boost::python within Clasp - it's the basis of the CL/C++ interoperation. 2014-09-20T15:08:24Z drmeister_: "something like" == "virtually identical to" boost::python 2014-09-20T15:08:25Z faheem: drmeister_: if you are going to try and get that into Debian, they're not going to be happy about locally cached copies of libraries. 2014-09-20T15:08:40Z faheem: drmeister_: wow, big job. 2014-09-20T15:08:56Z faheem: drmeister_: have you released that publicly? 2014-09-20T15:09:48Z drmeister_: I used luabind as a template - it is a cleaner implementation of the template programming required to expose C++ to a scripting language. It borrowed heavily from boost::python and I borrowed heavily from both. 2014-09-20T15:10:10Z drmeister_: No, because it's very specific to Clasp. 2014-09-20T15:10:31Z drmeister_: It's the Ying to Clasp's Yang. 2014-09-20T15:11:21Z faheem: drmeister_: oh, so it doesn't actually involve python? so, this is a interface to what exactly? 2014-09-20T15:11:41Z drmeister_: No, it doesn't involve python. It involves Clasp Common Lisp. 2014-09-20T15:12:45Z drmeister_: It's a C++ template library that lets you expose C++ functions/classes/methods/enums/instance-variables to another language. It automatically builds wrapper functions at C++ compile time to convert arguments/return-values between Common Lisp and C++. 2014-09-20T15:12:50Z innertracks quit (Quit: innertracks) 2014-09-20T15:13:49Z drmeister_: There are only three C++ template libraries like this in existence that I know of. Boost::python, Luabind and Clbind (Clasp's C++ binding library). 2014-09-20T15:15:04Z drmeister_: The reason is probably because they require a deep understanding of C++ template programming to achieve. 2014-09-20T15:15:38Z chitofan: is there a way to pad a list of (2 3) to be ( 2 3 0 0) > 2014-09-20T15:16:46Z innertracks joined #lisp 2014-09-20T15:16:52Z drmeister_: That's not to toot my own horn. It's just what I realized when I was writing it. I think it's the reason why boost::python and luabind don't get updated that often. They embody the worst, most obtuse and complex features of C++. 2014-09-20T15:17:04Z faheem: drmeister_: there was no way to adapt one of the others to do this? 2014-09-20T15:17:35Z faheem: drmeister_: i think you mean obscure, not obtuse. :-) 2014-09-20T15:17:54Z faheem: actually, since this is C++, maybe you do mean obtuse. :-) 2014-09-20T15:18:24Z drmeister_: Well, I did. I stole a lot of code from luabind. But if you look into the source code you will see that there is a lot of lua specific code in there and untangling the binding library from the lua stuff is tricky. 2014-09-20T15:18:49Z faheem: the primary sense of obtuse is dull, stupid. 2014-09-20T15:18:54Z drmeister_: Lua has this goofy stack machine API that just doesn't work with Common Lisp. 2014-09-20T15:19:26Z drmeister_: Good point - not the right word at all. 2014-09-20T15:19:28Z faheem: drmeister_: i think abrahams talked about making boost python into a more generic language interface, but i don't know what happened to that 2014-09-20T15:19:37Z faheem: i think there was a ml about it 2014-09-20T15:19:56Z faheem: did you talk to him at all? he's probably one of the worlds leading C++ experts 2014-09-20T15:20:31Z emma joined #lisp 2014-09-20T15:20:49Z klltkr joined #lisp 2014-09-20T15:21:31Z drmeister_: I'd like to change that to "confounding" 2014-09-20T15:21:53Z faheem: I've used boost python for years, but only have the dimmest idea how it works. 2014-09-20T15:22:06Z faheem: drmeister_: cofounding? cofounding what? 2014-09-20T15:22:23Z drmeister_: I emailed him once when I couldn't figure out some stuff in boost::python - but never got a response. No matter - I figured it out. 2014-09-20T15:22:50Z faheem: drmeister_: ok. i tried talking to him once around 2004/2005. not very successfully. 2014-09-20T15:22:56Z drmeister_: Never mind re "confounding". I'm playing with words. :-) 2014-09-20T15:23:16Z faheem: i got the strong impression he wasn't really paying attention. no doubt he had/has a lot of other things going on. 2014-09-20T15:23:34Z faheem: for some mysterious reason a lot of people use C++, so I get that means you are in demand. :-) 2014-09-20T15:24:04Z faheem: get -> guess 2014-09-20T15:24:30Z faheem: oh, sorry, confounding. i misread. 2014-09-20T15:25:01Z drmeister_: Who writes really complicated C++ template code these days? Hardly anyone as far as I can tell. It's used for STL and not much else. My guess is because it's so difficult. C++ template programming is to CL macros as IRS tax forms are to poetry. 2014-09-20T15:25:23Z faheem: drmeister_: :-) not a C++ fan either, huh? 2014-09-20T15:26:45Z drmeister_: One advantage I had was C++11 introduced "template parameter packs" - those and Google "Pump" saved my sanity. boost::python and luabind came too early to take advantage of those capabilities. 2014-09-20T15:27:12Z faheem: drmeister_: yes, i fiddled with those a few years ago. and then promptly forgot what they did. 2014-09-20T15:27:13Z clapautius joined #lisp 2014-09-20T15:27:26Z faheem: i think I have a couple of questions on SO about them 2014-09-20T15:27:47Z drmeister_: Google-pump is a little Python program that can generate template function specializers automatically from a short script. 2014-09-20T15:28:15Z faheem: actually, i came across them when trying to make that automatic conversion capability of boost python as general as possible. 2014-09-20T15:28:36Z faheem: drmeister_: oh, pump sounds handy 2014-09-20T15:28:37Z drmeister_: They are so much better than the alternative of trying to represent type lists with variadic templates. 2014-09-20T15:28:45Z faheem: drmeister_: i bet 2014-09-20T15:29:24Z drmeister_: But they still aren't powerful enough - you can't do anything with them but loop over them using recursion. 2014-09-20T15:29:39Z drmeister_: Maybe C++29 will have that. 2014-09-20T15:29:47Z faheem: E.g. http://stackoverflow.com/q/8514633/350713 <- varidic temmplates 2014-09-20T15:29:52Z faheem: *variadic* 2014-09-20T15:30:09Z drmeister_: Gotta keep selling those C++ books for the suckers. 2014-09-20T15:30:33Z pjb: chitofan: yes, there is: (pad-list list 4 0) 2014-09-20T15:31:00Z faheem: http://stackoverflow.com/a/9288547/350713 <- parameter packs, i guess 2014-09-20T15:31:13Z pjb: chitofan: it's up to you to find out what the definition of pad-list should be. (defun pad-list (list length default-value) …) 2014-09-20T15:31:29Z milosn quit (Ping timeout: 260 seconds) 2014-09-20T15:31:37Z nemesist quit (Quit: nemesist) 2014-09-20T15:31:55Z faheem: advanced C++ features are just generally hateful. they feel like some strange kind of language perversion. 2014-09-20T15:32:10Z pjb: chitofan: you can use make-list and replace or write your own recursive function for it. 2014-09-20T15:32:31Z chitofan: pjb: thanks, i used append and make-list :) 2014-09-20T15:32:38Z faheem: drmeister_: i hope C++ doesn't make it to C++29. 2014-09-20T15:33:08Z drmeister_: Oh, I'm sure it will. There's too much stuff written in it. 2014-09-20T15:33:15Z faheem: drmeister_: :-( 2014-09-20T15:33:33Z faheem: so, not a C++ fan? but you've based your project on it. :-) 2014-09-20T15:34:06Z drmeister_: It's a necessary tool. It's like assembly language. 2014-09-20T15:34:34Z drmeister_: But I don't want to do anything complicated in it. 2014-09-20T15:34:38Z drmeister_: Or exploratory. 2014-09-20T15:34:57Z faheem: drmeister_: fair enough. 2014-09-20T15:35:18Z faheem: though the template library thingy sounds pretty complicated. 2014-09-20T15:35:40Z drmeister_: I write a lot of C++ 2014-09-20T15:35:51Z vanila joined #lisp 2014-09-20T15:35:59Z drmeister_: Hopefully I'll only have to use it when appropriate in the future. 2014-09-20T15:36:14Z faheem: drmeister_: once the infrastructure is working? 2014-09-20T15:36:39Z faheem: drmeister_: you must be one of the very few people on the planet who understands how things like Boost Python work. 2014-09-20T15:37:30Z drmeister_: Yeah - and it is working. Clasp needs a compiler that generates faster code and it needs the last 10% of Common Lisp that it's missing but it's working well enough for what I need now. 2014-09-20T15:38:02Z drmeister_: And beach is working on his SICL/Cleavir optimizing compiler for Common Lisp - I hope to drop that into Clasp. 2014-09-20T15:38:20Z faheem: drmeister_: you should combine forces. 2014-09-20T15:38:28Z drmeister_: Yeah, that and two bucks will get me a coffee at Starbucks. 2014-09-20T15:38:31Z faheem: are they complementary projects? 2014-09-20T15:38:41Z faheem: huh? 2014-09-20T15:38:51Z drmeister_: Are what complementary projects? 2014-09-20T15:38:59Z EvW quit (Ping timeout: 272 seconds) 2014-09-20T15:39:01Z faheem: clasp and SICL 2014-09-20T15:39:10Z theos quit (Remote host closed the connection) 2014-09-20T15:39:20Z faheem: if that is a popular culture reference it passed me by. 2014-09-20T15:39:25Z drmeister_: Completely unrelated but I hope to borrow part of SICL. 2014-09-20T15:39:38Z faheem: drmeister_: ok 2014-09-20T15:40:01Z drmeister_: Oh, "that and two bucks will get me a coffee" means "that" is pretty much worthless because all you need to get a coffee at Starbucks is two dollars. 2014-09-20T15:40:16Z gryyy joined #lisp 2014-09-20T15:40:32Z faheem: drmeister_: ok, looking forward to doing (+ 1 1) and similarly exciting things with your compiler. :-) 2014-09-20T15:40:41Z faheem: drmeister_: oh, not familar with that particular idiom 2014-09-20T15:40:50Z drmeister_: I can do that! 2014-09-20T15:41:22Z faheem: but it has to be build first, right? does it build on debian wheezy? i have old boost 2014-09-20T15:42:03Z drmeister_: Not a problem, cultural differences are what they are. There is far more that we all have in common (99.999% DNA) than what separates us. 2014-09-20T15:42:14Z faheem: drmeister_: true 2014-09-20T15:43:06Z drmeister_: That and a general distaste for and grudging acceptance of C++. 2014-09-20T15:43:22Z faheem: heh 2014-09-20T15:43:24Z faheem: so, wheezy? 2014-09-20T15:43:32Z drmeister_: It builds on ubuntu. Is debian wheezy similar? 2014-09-20T15:43:50Z nemesist joined #lisp 2014-09-20T15:43:51Z faheem: drmeister_: ubuntu has lot of releases. which one? 2014-09-20T15:44:08Z faheem: are you tightly tired to a particular llvm/boost version? 2014-09-20T15:44:11Z theos joined #lisp 2014-09-20T15:44:14Z faheem: *tied* 2014-09-20T15:44:30Z drmeister_: Dunno, recent. I don't think it will have a problem. What it really needs is Clang 3.5. 2014-09-20T15:44:54Z faheem: drmeister_: that's pretty recent. wheezy doesn't have that. easy to get though 2014-09-20T15:45:11Z faheem: wheezy has 3.0 2014-09-20T15:45:27Z drmeister_: That's all listed in "externals-clasp". Boost and LLVM require pretty recent (say latest) versions. 2014-09-20T15:45:46Z faheem: i backported more recent versions, but the clang/llvm project also makes them available on their site. for wheezy at least 2014-09-20T15:45:55Z faheem: drmeister_: you might want to mention that somewhere. 2014-09-20T15:46:08Z drmeister_: That's part of what I'm working on this weekend. 2014-09-20T15:46:31Z faheem: dunno about boost. unfortunately there are things on my system, at least, which depend on boost. 2014-09-20T15:46:41Z drmeister_: I'm afraid of releasing it and having a thousand people email me "this crap doesn't build". 2014-09-20T15:46:42Z faheem: so upgrading it may not be a possibility 2014-09-20T15:47:04Z faheem: drmeister_: that would be a lot of people. :-) 2014-09-20T15:47:09Z varjag_ joined #lisp 2014-09-20T15:47:13Z drmeister_: I can dream can't I? 2014-09-20T15:47:22Z loic_ quit (Ping timeout: 240 seconds) 2014-09-20T15:47:30Z faheem: wheezy has boost 1.49. 2014-09-20T15:47:36Z Longlius quit (Remote host closed the connection) 2014-09-20T15:47:47Z faheem: drmeister_: sure. but do you really want 1000 bug reports? 2014-09-20T15:48:04Z faheem: i'm guessing 1.49 wouldn't work 2014-09-20T15:48:12Z nemesist quit (Ping timeout: 245 seconds) 2014-09-20T15:49:00Z gryyy left #lisp 2014-09-20T15:49:08Z nemesist joined #lisp 2014-09-20T15:49:13Z faheem: drmeister_: to be clear, is your system configured to download and build these external dependencies, or does it depend on system libraries? 2014-09-20T15:49:33Z nell quit (Quit: WeeChat 1.1-dev) 2014-09-20T15:49:34Z mishoo joined #lisp 2014-09-20T15:49:35Z Longlius joined #lisp 2014-09-20T15:49:45Z drmeister_: That's why I have "externals-clasp" - it builds everything into a hierarchy under $HOME/local so you don't have to mess with upgrading your OS. 2014-09-20T15:49:59Z faheem: i don't think that would for llvm/clang. it might for boost 2014-09-20T15:50:07Z faheem: drmeister_: ok. and would this work for other people too? 2014-09-20T15:50:33Z drmeister_: externals-clasp has all of the libraries in one directory and a makefile that builds them all and installs them in $HOME/local/... 2014-09-20T15:51:02Z faheem: drmeister_: ok. i guess that would work 2014-09-20T15:51:24Z drmeister_: It should work for everything. externals-clasp is a separate repository that you install alongside the clasp repository - not inside. 2014-09-20T15:51:27Z faheem: but if you ever try to get it into debian, you're not going to be happy 2014-09-20T15:51:55Z faheem: or the packagers, for that matter 2014-09-20T15:51:57Z xyjprc joined #lisp 2014-09-20T15:52:07Z drmeister_: In the clasp configuration file you set up an environment variable if you use externals-clasp. You don't need to use externals-clasp if you want to configure your environment yourself. 2014-09-20T15:52:17Z faheem: drmeister_: ok 2014-09-20T15:53:00Z faheem: drmeister_: what about piecemeal? 2014-09-20T15:53:40Z drmeister_: I think that in the future, if it goes into Debian then the dependent libraries will already be upgraded. I needed to use recent versions of LLVM (especially) and boost because I ended up using a lot of bleeding-edge features of those libraries. 2014-09-20T15:53:54Z faheem: drmeister_: ok 2014-09-20T15:54:21Z kushal quit (Ping timeout: 260 seconds) 2014-09-20T15:54:32Z drmeister_: piecemeal updating of installed versions of these libraries works just as well. 2014-09-20T15:54:43Z drmeister_: Here's what it needs: 2014-09-20T15:55:20Z faheem: drmeister_: actually, what I meant is, can i use llvm/clang from the system, and boost installed in home/local? 2014-09-20T15:55:47Z drmeister_: Boost ver 1.55, llvm ver 3.5, boehm-7.2, ecl-12.x, expat-2.0.1, gmp-5.0.5, zlib-1.2.8 2014-09-20T15:56:32Z drmeister_: Yes. There is a separate environment variable for the path to the clang++ compiler. 2014-09-20T15:58:17Z faheem: drmeister_: ok, good 2014-09-20T15:58:25Z pecg joined #lisp 2014-09-20T15:58:25Z pecg quit (Changing host) 2014-09-20T15:58:25Z pecg joined #lisp 2014-09-20T15:58:28Z innertracks quit (Ping timeout: 260 seconds) 2014-09-20T15:58:34Z drmeister_: But all of this stuff needs to be tested on other systems. I use OS X to develop it and I test the Linux build on an old Redhat Linux system. So yes, debian should work fine. The Redhat system is ancient and I had to bring up GCC to a sufficiently recent version myself just so that I could compile LLVM/Clang. 2014-09-20T15:59:06Z drmeister_: The only good thing about the Redhat Linux system I use is that it has 64 cores. 2014-09-20T15:59:07Z faheem: drmeister_: ok. if i test it, you will probably get bug report from me. 2014-09-20T15:59:26Z faheem: *reports* 2014-09-20T16:00:01Z jlongster joined #lisp 2014-09-20T16:00:33Z drmeister_: That would be great. And maybe you'd like to contribute to Clasp - it's LGPL and I think there are a lot of cool things we can do with it. It can be a general scripting language for any complex C++ library. 2014-09-20T16:01:24Z drmeister_: The programming community may not realize it but they sorely need Common Lisp. 2014-09-20T16:03:05Z drmeister_: Look at the Unreal Engine 4! In UE3 they had "UnrealScript" In UE4 they dropped UnrealScript and now you have to use C++ and these pointy/clicky things called "Blueprints". They realized they couldn't maintain an advanced graphics library and develop a crappy scripting language at the same time. 2014-09-20T16:03:58Z nemesist quit (Quit: nemesist) 2014-09-20T16:04:29Z hitecnologys quit (Quit: hitecnologys) 2014-09-20T16:04:57Z jlongster quit (Ping timeout: 272 seconds) 2014-09-20T16:04:59Z drmeister_: Along comes Clasp, we expose UE4 in Clasp and faster than you can say "live programming of an immersive three-dimensional world" - anyone can write high end video games in Common Lisp. 2014-09-20T16:06:14Z Ven: drmeister_: well, naughty dog uses Racket ;) 2014-09-20T16:06:52Z drmeister_: This is outside of my prime interests but I'm contemplating the wider impacts here. 2014-09-20T16:07:14Z |3b| can do live programming in 3d world with just emacs and cl :p 2014-09-20T16:07:31Z milosn joined #lisp 2014-09-20T16:07:34Z drmeister_: With Racket you have to maintain a C wrapper library and you have to use Scheme. 2014-09-20T16:08:03Z Ven: drmeister_: well, you have to use racket with racket 2014-09-20T16:08:31Z drmeister_: There's a reason why there are so few C wrapper libraries for these complex C++ libraries. They are hard to write and maintain. 2014-09-20T16:09:25Z drmeister_: Racket is based on Scheme isn't it? One namespace for variables and functions - correct? 2014-09-20T16:10:14Z Ven: drmeister_: yes, and yes. But they added quite a lot in 2014-09-20T16:10:22Z Ven: it's more, er, practical :) 2014-09-20T16:12:16Z drmeister_: But one namespace means macros are more difficult to write. Two namespaces means macros are easier to write and for me that is the main reason why Common Lisp is great. 2014-09-20T16:12:33Z mishoo quit (Ping timeout: 272 seconds) 2014-09-20T16:12:45Z drmeister_: Programs writing programs. 2014-09-20T16:12:51Z faheem: drmeister_: there might be other reasons. :-) 2014-09-20T16:13:37Z faheem: drmeister_: i don't have a lot of spare time. my knowledge of C++ is basic. my knowledge of CL is rudimentary. so, i would not be in a position to hit the ground running... 2014-09-20T16:13:39Z Nizumzen joined #lisp 2014-09-20T16:13:47Z faheem: however, i can at least test and file bug reports. 2014-09-20T16:14:19Z Ven: drmeister_: that's one stance, I tend to disagree about that: try and be hygienic if you don't need to inject stuff in the lexical scope. Also, it's confusing to see stuff like `(cons cons cons)` and... 2014-09-20T16:14:22Z drmeister_: Sure but metaprogramming is where I'm at now. Writing code without the ability to use macros is like flipping toggle switches. 2014-09-20T16:14:32Z uselpa joined #lisp 2014-09-20T16:15:02Z drmeister_: The first time I wrote a line of Common Lisp was three years ago when I started this. 2014-09-20T16:15:15Z drmeister_: Common Lisp is a force multiplier. 2014-09-20T16:15:50Z faheem: drmeister_: CL is a pretty great language even without macros. 2014-09-20T16:15:54Z clop2: fwiw, i think the racket folks would argue their macros are much more sophisticated than CL macros... 2014-09-20T16:16:02Z clop2: not that i know much about it 2014-09-20T16:16:35Z drmeister_: faheem: Without macros it wouldn't start up. SETF and CLOS depend on it. 2014-09-20T16:16:46Z faheem: racket is OT here, right? 2014-09-20T16:16:59Z faheem: drmeister_: ok. 2014-09-20T16:17:06Z Ven: clop2: well, it's *very* different tbh 2014-09-20T16:17:17Z drmeister_: Yes, racket is considered off topic. 2014-09-20T16:17:30Z Ven: eh? 2014-09-20T16:18:01Z clop2: surely discussing how macros differ between cl and racket is on topic? 2014-09-20T16:18:34Z faheem: clop2: i wasn't referencing your comments 2014-09-20T16:18:37Z |3b|: talking about CL is on topic, so comparing things to CL is more-or-less OK 2014-09-20T16:18:39Z faheem: just speaking generally 2014-09-20T16:19:05Z |3b|: though some "compare to CL" topics get a bit old/unproductive 2014-09-20T16:19:35Z faheem: i was actually looking at racket today. looks like an active project 2014-09-20T16:19:43Z |3b|: most people already decided whether they prefer CL or scheme, and CL spec isn't going to be updated to add scheme-like macros :) 2014-09-20T16:19:59Z amir_ joined #lisp 2014-09-20T16:20:20Z Ven: right, that's probably the biggest difference - racket is still active, and has other "side projects" going strong (typed racket, and all the other "racket langs" they have) 2014-09-20T16:20:23Z amir_ is now known as Guest84596 2014-09-20T16:20:39Z Guest84596: hi there 2014-09-20T16:20:54Z Guest84596 quit (Client Quit) 2014-09-20T16:21:17Z Ven: I know for many, many CL developers, it not changing is a *huge* advantage, but sometimes I'm sure you'd like to have a non-implem-dependent thread/filesystem/... libs 2014-09-20T16:21:43Z Ven: (I just meant that racket isn't just a "learning language with no practical application") 2014-09-20T16:21:52Z faheem: Ven: i thought most CL people would like an updated spec. 2014-09-20T16:22:07Z |3b|: sure, there are lots of things that would be nice if someone had a few $million to burn on a new CL spec 2014-09-20T16:22:09Z Ven: faheem: I'm sure they would. I just mean – having a stable base is nice as well 2014-09-20T16:22:32Z faheem: Ven: true. old code still runs. like tex/latex 2014-09-20T16:22:33Z |3b|: but just repeating the same discussions about those things on IRC doesn't get us anywhere 2014-09-20T16:22:49Z faheem: |3b|: don't worry. we 2014-09-20T16:22:59Z faheem: we're stopping now. :-) 2014-09-20T16:23:04Z Ven: |3b|: I'm very interested in a document that points to what "most people" think is "wrong" in CL /should be updated :)! 2014-09-20T16:23:12Z Ven: (would be surprised if nobody wrote such a thing) 2014-09-20T16:23:33Z |3b|: Ven: lots of people have written them, probably all with different sets of features :p 2014-09-20T16:24:03Z |3b|: (even the ones claiming to represent "most people") 2014-09-20T16:24:27Z |3b|: probably varies a lot between fields too 2014-09-20T16:24:28Z faheem: there's probably considerable overlap, though 2014-09-20T16:24:39Z Ven: |3b|: yeah, everybody and their grandmother find kludges in every language. But sometimes it's the "more vocal" ones, or a lot of people retaliate to it, etc.. But yeah it costs an outstanding amount of money to spec smth 2014-09-20T16:24:41Z drmeister_: What we should do is program the arguments into minion and then whenever they come up we could say: minion replay argument 34322 2014-09-20T16:24:45Z |3b|: sure, pathnames are a common complaint 2014-09-20T16:24:58Z ggole joined #lisp 2014-09-20T16:25:11Z mishoo joined #lisp 2014-09-20T16:25:23Z normanrichards joined #lisp 2014-09-20T16:25:24Z |3b|: then there are the obvious additions like threading and networking that might be nice to have, or FFI 2014-09-20T16:25:36Z drmeister_: I'll take pathnames any day over "fopen". 2014-09-20T16:25:40Z clop2: is there any library that just avoids common lisp's pathnames and reimplements something less complex that's portable? 2014-09-20T16:25:55Z |3b|: uiop and iolib i think both have alternatives 2014-09-20T16:26:02Z |3b|: cl-fad as well 2014-09-20T16:26:02Z drmeister_: Yeah, it's uiop 2014-09-20T16:26:06Z clop2: i thought they were both sort of extensions of CL pathnames 2014-09-20T16:26:14Z drmeister_: That's right. 2014-09-20T16:26:24Z wasamasa: Ven: naughty dog uses racket? 2014-09-20T16:26:27Z wasamasa: Ven: for what exactly? 2014-09-20T16:26:44Z Ven: wasamasa: games and stuff. "the last of us" has a big part in that 2014-09-20T16:26:48Z Ven: |3b|: well, is there some kind of ... curated list of libraries for "201x CL"? 2014-09-20T16:27:05Z |3b|: Ven: you could try the cl21 project 2014-09-20T16:27:22Z nemesist joined #lisp 2014-09-20T16:27:23Z wasamasa: Ven: since the things I've read online were about their own dialect which rather sounds like common lisp 2014-09-20T16:27:25Z clop2: there's this thing: http://www.cliki.net/Current%20recommended%20libraries 2014-09-20T16:27:35Z Ven: |3b|: yeah, I've been looking at it. It's a big change, though. I don't like everything, i.e. string interp by default 2014-09-20T16:27:38Z Ven: wasamasa: http://con.racket-lang.org/2013/danl-slides.pdf 2014-09-20T16:27:47Z Ven: clop2: nice! :) 2014-09-20T16:28:38Z clop2: Ven: but i'm often frustrated with it, e.g., cl-fad has (not very complete but) nice documentation but allegedly we should use uiop instead, but it has scant documentation; the iolib page there doesn't link to its manual, etc... 2014-09-20T16:29:00Z Shinmera: Speaking of cliki, why are anonymous edits allowed. I see a bunch of stuff being reverted for no reason or changed to bogus. 2014-09-20T16:29:21Z faheem: personally, i'd like stronger scientific support. CL doesn't even have a good/blessed random number library 2014-09-20T16:29:43Z faheem: then again, neither does the C/C++ standard 2014-09-20T16:30:00Z |3b| would say basic library list is alexandria, babel, cffi, bordeaux-threads, flexi-streams, usocket or iolib, cl-ppcre, maybe uiop 2014-09-20T16:30:31Z Shinmera: I would definitely count uiop to the basic lib list, especially since it comes with ASDF now. 2014-09-20T16:30:41Z drmeister_: faheem: Right - so Clasp can expose a C++ random number library. 2014-09-20T16:30:42Z quazimodo quit (Ping timeout: 246 seconds) 2014-09-20T16:31:00Z |3b|: yeah, mostly just haven't looked at it yet 2014-09-20T16:31:11Z faheem: drmeister_: the R one is pretty good. though that is C. packaged on debian as r-mathlib 2014-09-20T16:31:24Z |3b| thinks i used uiop for my livecoding video, to start the xterms... other than that haven't looked at it at all 2014-09-20T16:31:31Z drmeister_: C libraries can be exposed as well. 2014-09-20T16:31:38Z faheem: drmeister_: your clasp can throw away FFI, right? 2014-09-20T16:32:13Z drmeister_: Well, I'll have to support FFI. I have an incomplete FFI library built in. 2014-09-20T16:32:39Z faheem: drmeister_: right, but does it need it? 2014-09-20T16:32:51Z drmeister_: If I want to run any CL code that requires FFI. 2014-09-20T16:33:03Z drmeister_: Only for legacy code. 2014-09-20T16:33:07Z faheem: drmeister_: suppose i just want to run a C/C++ library? 2014-09-20T16:33:22Z faheem: run -> call 2014-09-20T16:34:13Z phax joined #lisp 2014-09-20T16:34:21Z wasamasa: Ven: what game is it that they used it for? 2014-09-20T16:34:24Z slyrus quit (Ping timeout: 260 seconds) 2014-09-20T16:34:27Z Ven: wasamasa: the last of us 2014-09-20T16:34:34Z wasamasa: Ven: DC rather sounds like the comic publisher 2014-09-20T16:34:34Z drmeister_: There's another thing that Clasp can do though - it has the Clang AST/ASTMatcher library exposed within it. You can write a Common Lisp program that would automatically write an FFI/C-Wrapper library that would expose any C++/C library to any Common Lisp with an FFI. 2014-09-20T16:34:37Z pt1 joined #lisp 2014-09-20T16:34:40Z Ven: and, apparently, they have quite some tools written in it 2014-09-20T16:35:01Z yeticry quit (Quit: leaving) 2014-09-20T16:35:05Z phax quit (Read error: Connection reset by peer) 2014-09-20T16:35:10Z wasamasa: I wonder what made them switch from the common lisp to the scheme side though 2014-09-20T16:35:22Z yeticry joined #lisp 2014-09-20T16:35:57Z drmeister_: It's a lot easier to write a Scheme than a Common Lisp implementation. 2014-09-20T16:36:03Z phax joined #lisp 2014-09-20T16:36:17Z Ven: wasamasa: apparently a big part is lib support (which is more unified), and the big advantages to write DSL 2014-09-20T16:36:18Z wasamasa: but they used an existing implementation 2014-09-20T16:36:44Z wasamasa: at least racket looks like the best scheme implementation to go for to have macros 2014-09-20T16:38:47Z drmeister_: Does racket have CL like macros? Or those define-syntax thingies? 2014-09-20T16:38:53Z Ven: drmeister_: it has both 2014-09-20T16:38:56Z drmeister_: "Or just those" 2014-09-20T16:38:57Z drmeister_: Ah. 2014-09-20T16:39:20Z drmeister_: Good for them then. 2014-09-20T16:39:32Z Ven: drmeister_: and it has ways to define anaphoric macros without breaking hygiene like CL does ;) (with syntax-parameters) 2014-09-20T16:40:08Z loic_ joined #lisp 2014-09-20T16:40:23Z Ven: (now I agree that I'd rather use CL macros for... real world stuff) 2014-09-20T16:41:06Z ndrei joined #lisp 2014-09-20T16:41:06Z ndrei_ joined #lisp 2014-09-20T16:43:11Z uselpa quit (Quit: Leaving...) 2014-09-20T16:43:35Z mishoo quit (Ping timeout: 272 seconds) 2014-09-20T16:45:03Z Karl_Dscc quit (Remote host closed the connection) 2014-09-20T16:49:48Z normanrichards quit 2014-09-20T16:54:09Z marsbot is now known as marsam 2014-09-20T16:54:33Z tvaalen quit (Ping timeout: 260 seconds) 2014-09-20T16:55:01Z pt1 quit (Remote host closed the connection) 2014-09-20T16:55:42Z tvaalen joined #lisp 2014-09-20T16:56:30Z _tca: Ven: why's that? 2014-09-20T16:56:58Z Ven: _tca: why do I prefer CL macros? Because racket's make it kinda hard to "manipulate" syntax 2014-09-20T16:57:48Z _tca: in what way? they just don't let you use normal sequence operations etc.? 2014-09-20T16:58:17Z pt1 joined #lisp 2014-09-20T16:58:25Z Ven: _tca: well, it's basically just "templates", so if you want to mapcar &body to take the cdr to... It's very hard to 2014-09-20T16:58:28Z nemesist quit (Quit: nemesist) 2014-09-20T16:58:29Z hiroakip joined #lisp 2014-09-20T16:58:47Z _tca: what do you mean just tables? 2014-09-20T16:58:58Z _tca: templates* 2014-09-20T16:58:58Z Quadrescence joined #lisp 2014-09-20T16:59:10Z Ven: _tca: that's what they're called. "templates" 2014-09-20T16:59:21Z nemesist joined #lisp 2014-09-20T16:59:29Z _tca: Ven: are you talking about syntax-rules? 2014-09-20T16:59:34Z Ven: _tca: yes. 2014-09-20T16:59:42Z _tca: ah i meant syntax-case/parse 2014-09-20T16:59:47Z _tca: i agree about that part 2014-09-20T17:00:07Z Ven: well, racket's #lang is *awesome*. 2014-09-20T17:00:10Z _tca: i dont see the point in syntax-rules at all in a language that alreayd has pattern matching built in 2014-09-20T17:00:30Z Ven: well, compile-time pattern matching :P 2014-09-20T17:00:39Z _tca: you can get it there too 2014-09-20T17:00:43Z jlongster joined #lisp 2014-09-20T17:02:44Z levenson joined #lisp 2014-09-20T17:03:09Z pt1 quit (Remote host closed the connection) 2014-09-20T17:03:15Z _tca: Ven: and it's funny that Quadrescence joins because we were talking about typed racket yesterday 2014-09-20T17:03:15Z nemesist quit (Client Quit) 2014-09-20T17:03:46Z _tca: the combination of phases, syntax not being just lists/symbols, and the alpha-conversion built in to syntax-case/parse let typed racket do what it does very easily 2014-09-20T17:04:18Z _tca: you can store type info in the syntax itself, and use a global table of type info because everything get's a unique name from the hygiene 2014-09-20T17:04:46Z Ven: right – phases are also a big difference in racket... 2014-09-20T17:05:14Z jlongster quit (Ping timeout: 258 seconds) 2014-09-20T17:05:17Z zeebrah quit (Ping timeout: 245 seconds) 2014-09-20T17:05:18Z Ven: I havn't done much typed racket (the syntax does look bolted on, but I've yet to see a lisp with nice type ascriptions :/) 2014-09-20T17:06:34Z pt1 joined #lisp 2014-09-20T17:08:55Z pt1 quit (Remote host closed the connection) 2014-09-20T17:12:13Z ndrei quit (Ping timeout: 260 seconds) 2014-09-20T17:12:22Z ndrei_ quit (Ping timeout: 245 seconds) 2014-09-20T17:13:10Z marsam is now known as marsbot 2014-09-20T17:15:09Z Patzy quit (Ping timeout: 246 seconds) 2014-09-20T17:15:54Z Patzy joined #lisp 2014-09-20T17:16:33Z |3b|: 'livecoding' with debugger: http://youtu.be/nbY-meOL57I 2014-09-20T17:17:23Z Blaguvest quit 2014-09-20T17:18:04Z Grue`: I'm endlessly amused that "boa constructor" is an actual concept in common lisp standard 2014-09-20T17:18:17Z ndrei joined #lisp 2014-09-20T17:18:20Z ndrei_ joined #lisp 2014-09-20T17:18:23Z Elench joined #lisp 2014-09-20T17:18:41Z Karl_Dscc joined #lisp 2014-09-20T17:18:49Z hiroakip quit (Ping timeout: 260 seconds) 2014-09-20T17:20:28Z hiroakip joined #lisp 2014-09-20T17:22:25Z uselpa joined #lisp 2014-09-20T17:26:02Z EvW joined #lisp 2014-09-20T17:26:35Z Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) 2014-09-20T17:29:56Z hiroakip quit (Ping timeout: 260 seconds) 2014-09-20T17:30:08Z levenson quit (Quit: shutdown) 2014-09-20T17:30:48Z uselpa quit (Quit: Leaving...) 2014-09-20T17:37:21Z Ven joined #lisp 2014-09-20T17:38:57Z ndrei quit (Ping timeout: 246 seconds) 2014-09-20T17:39:16Z ndrei_ quit (Ping timeout: 272 seconds) 2014-09-20T17:39:30Z Xach: |3b|: I'm not sure what's up with the cl-yaclyaml etc bugs. do you understand it enough to file a bug report? is there any info i can provide? 2014-09-20T17:39:49Z shka: hmmm i have another problem with asdf system 2014-09-20T17:39:55Z Xach: shka: What's up? 2014-09-20T17:40:12Z shka: Xach: oh, i finally returned home, so i'm very happy right now 2014-09-20T17:40:14Z Nizumzen quit (Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/) 2014-09-20T17:40:17Z shka: anyway 2014-09-20T17:40:41Z shka: i defined asdf with serial 2014-09-20T17:40:43Z |3b|: Xach: it calls an internal SBCL function, and that function returns something different since the change i linked on #sbcl 2014-09-20T17:40:51Z Quadrescence quit (Quit: This computer has gone to sleep) 2014-09-20T17:40:58Z |3b|: it needs to adjust for that 2014-09-20T17:41:00Z Xach: Which system was doing the calling? 2014-09-20T17:41:10Z shka: but the problem is, it seems that not all files are loaded 2014-09-20T17:41:30Z |3b|: cl-read-macro-tokens is the broken one 2014-09-20T17:41:35Z shka: since when i try to execute one function, it fails because of undefined functions 2014-09-20T17:41:44Z |3b|: esrap-liquid calls that, and cl-yaclyaml uses esrap-liquid 2014-09-20T17:41:50Z shka: but if i load it manually everything is fine again 2014-09-20T17:42:01Z Xach: shka: can you show the system definition on paste.lisp.org? 2014-09-20T17:43:13Z shka: Xach: ofc, one second please 2014-09-20T17:45:07Z Karl_Dscc quit (Remote host closed the connection) 2014-09-20T17:45:18Z shka: http://paste.lisp.org/display/143797 2014-09-20T17:45:21Z shka: here 2014-09-20T17:45:34Z shka: code in the transactions depends on the code from the blog-entry 2014-09-20T17:46:09Z shka: i thought that serial will handle this just fine, but it seems that something is wrong 2014-09-20T17:46:17Z shka: not sure how to debug this 2014-09-20T17:46:23Z defaultxr joined #lisp 2014-09-20T17:46:56Z Shinmera: Are you sure you're in the right package when calling the function? 2014-09-20T17:47:08Z Shinmera: As in, is the symbol even available in your current package 2014-09-20T17:47:25Z Grue`: you probably forgot (in-package ...) at the top of the file or something 2014-09-20T17:47:38Z Shinmera: ^that would be my second guess 2014-09-20T17:47:39Z Xach: shka: can you paste the error? 2014-09-20T17:48:27Z Grue`: though there's no separate package file so i wonder if shka even uses packages at all 2014-09-20T17:48:51Z shka: i do 2014-09-20T17:49:53Z shka: i want to add that if i load blog-entry with emacs shortcut everything works just fine 2014-09-20T17:50:09Z clapautius quit (Quit: Leaving.) 2014-09-20T17:50:26Z madrik quit (Quit: sleep) 2014-09-20T17:50:34Z shka: so i don't think it is related to packages 2014-09-20T17:51:01Z ndrei joined #lisp 2014-09-20T17:51:08Z ndrei_ joined #lisp 2014-09-20T17:53:05Z Grue` quit (Remote host closed the connection) 2014-09-20T17:53:26Z Xach: The problem as you've described it is certifiably weird. I don't think you have a grip on what's causing it. Can you share the whole code somewhere? 2014-09-20T17:54:31Z cheryllium joined #lisp 2014-09-20T17:54:49Z shka: Xach: i don't want to do this right now 2014-09-20T17:55:07Z shka: but i will, eventually 2014-09-20T17:55:17Z shka: probabbly something stupid 2014-09-20T17:55:23Z shka: :-) 2014-09-20T17:59:45Z jlongster joined #lisp 2014-09-20T18:00:01Z normanrichards joined #lisp 2014-09-20T18:01:49Z puchacz: hi, which template lib http://www.cliki.net/html%20template is currently the most loved one please? 2014-09-20T18:02:09Z Elench quit (Ping timeout: 260 seconds) 2014-09-20T18:02:10Z clapautius joined #lisp 2014-09-20T18:02:40Z Elench`` joined #lisp 2014-09-20T18:03:07Z Grue` joined #lisp 2014-09-20T18:03:18Z puchacz: I mean if you go beyond simple
  • as an user interface and you want somebody else to maintain your html 2014-09-20T18:03:26Z ndrei quit (Read error: No route to host) 2014-09-20T18:03:50Z Longlius quit (Quit: Leaving) 2014-09-20T18:04:09Z jlongster quit (Ping timeout: 246 seconds) 2014-09-20T18:04:44Z shka: puchacz: cl-who seems to be most popular but personally i didn't liked it 2014-09-20T18:04:51Z shka: cl-markup does the job though 2014-09-20T18:05:38Z puchacz: I already tried yaclml but I may be the last person on the Earth to still use it.... 2014-09-20T18:07:22Z clop2 quit (Ping timeout: 245 seconds) 2014-09-20T18:07:32Z ndrei joined #lisp 2014-09-20T18:07:53Z ndrei_ quit (Ping timeout: 240 seconds) 2014-09-20T18:08:33Z puchacz: segv-: I think you wrote yaclml originally, do you still use it? 2014-09-20T18:09:06Z nell joined #lisp 2014-09-20T18:09:54Z ndrei_ joined #lisp 2014-09-20T18:11:05Z normanrichards quit (Read error: Connection reset by peer) 2014-09-20T18:11:50Z Elench`` quit (Changing host) 2014-09-20T18:11:50Z Elench`` joined #lisp 2014-09-20T18:11:54Z Elench`` is now known as Elench 2014-09-20T18:16:48Z angavrilov quit (Remote host closed the connection) 2014-09-20T18:17:39Z DrCode quit (Ping timeout: 264 seconds) 2014-09-20T18:17:56Z tigr joined #lisp 2014-09-20T18:18:17Z tigr left #lisp 2014-09-20T18:20:18Z DrCode joined #lisp 2014-09-20T18:20:35Z ndrei_ quit (Ping timeout: 244 seconds) 2014-09-20T18:21:08Z ndrei quit (Ping timeout: 258 seconds) 2014-09-20T18:21:37Z clop2 joined #lisp 2014-09-20T18:21:50Z kobain joined #lisp 2014-09-20T18:22:26Z Shinmera: I don't know that Clip is loved by anyone but me, but that's my templating baby if you will. 2014-09-20T18:23:05Z kobain quit (Max SendQ exceeded) 2014-09-20T18:23:24Z shka: does delete-if alters list in all implementations of common lisp? 2014-09-20T18:23:40Z dim: ,clhs delete-if 2014-09-20T18:23:46Z dim: clhs delete-if 2014-09-20T18:23:46Z specbot: http://www.lispworks.com/reference/HyperSpec/Body/f_rm_rm.htm 2014-09-20T18:23:55Z Shinmera: shka: wwwhy does it matter what the implementations do 2014-09-20T18:24:07Z dim: delete, delete-if, and delete-if-not are like remove, remove-if, and remove-if-not respectively, but they may modify sequence. 2014-09-20T18:24:18Z shka: dim: 'may' 2014-09-20T18:24:28Z Shinmera: Yes, may. So use it accordingly. 2014-09-20T18:24:30Z dim: so only use delete-if when you're ok with actually modifying the data 2014-09-20T18:24:32Z kobain joined #lisp 2014-09-20T18:24:40Z shka: dim: i want to do it 2014-09-20T18:24:43Z dim: otherwise use remove-if and be done with it 2014-09-20T18:24:49Z shka: i want to change slot this way 2014-09-20T18:24:55Z shka: ok, fair enough 2014-09-20T18:25:13Z |3b|: and they aren't required to make the original into the final result, so always store the returned value 2014-09-20T18:25:20Z dim: if you want to be sure the function you use is not destructive, the standard has an answer to that, and it's spelled remove-if 2014-09-20T18:25:58Z |3b|: delete is just an optimization over remove, don't rely on it behaving differently 2014-09-20T18:27:14Z zygentoma joined #lisp 2014-09-20T18:30:48Z sigjuice joined #lisp 2014-09-20T18:31:43Z resttime joined #lisp 2014-09-20T18:34:19Z pnpuff joined #lisp 2014-09-20T18:38:16Z jlongster joined #lisp 2014-09-20T18:38:23Z clop2 quit (Ping timeout: 240 seconds) 2014-09-20T18:39:48Z pt1 joined #lisp 2014-09-20T18:40:23Z pt1 quit (Remote host closed the connection) 2014-09-20T18:43:20Z pt1 joined #lisp 2014-09-20T18:44:20Z stanislav joined #lisp 2014-09-20T18:44:53Z pt1 quit (Remote host closed the connection) 2014-09-20T18:45:15Z attila_lendvai joined #lisp 2014-09-20T18:46:35Z Longlius joined #lisp 2014-09-20T18:50:51Z innertracks joined #lisp 2014-09-20T18:52:49Z stanislav quit (Quit: Konversation terminated!) 2014-09-20T18:52:52Z clop2 joined #lisp 2014-09-20T18:54:33Z zlrth quit (Ping timeout: 246 seconds) 2014-09-20T18:56:52Z gluegadget_ is now known as gluegadget 2014-09-20T18:56:55Z gluegadget quit (Changing host) 2014-09-20T18:56:55Z gluegadget joined #lisp 2014-09-20T18:56:55Z gluegadget quit (Changing host) 2014-09-20T18:56:55Z gluegadget joined #lisp 2014-09-20T18:57:17Z innertracks quit (Ping timeout: 260 seconds) 2014-09-20T18:59:23Z nug700 joined #lisp 2014-09-20T19:00:14Z pnpuff quit (Quit: Lost terminal) 2014-09-20T19:00:31Z chitofan quit (Ping timeout: 246 seconds) 2014-09-20T19:03:30Z macdice` is now known as macdice 2014-09-20T19:09:43Z beach left #lisp 2014-09-20T19:14:31Z ndrei joined #lisp 2014-09-20T19:14:56Z ndrei_ joined #lisp 2014-09-20T19:16:48Z nell quit (Ping timeout: 272 seconds) 2014-09-20T19:17:44Z FunfYears quit (Ping timeout: 260 seconds) 2014-09-20T19:19:03Z mutley89 quit (Ping timeout: 246 seconds) 2014-09-20T19:20:40Z Nizumzen joined #lisp 2014-09-20T19:22:20Z segv-: puchacz: no, i haven't used it in a while. i was using it 2 or 3 years ago but the requirement that the input be valid xhtml was a problem (no designer i was working with could be bothered to produce actual valid xhtml), and it broke down on IE's weird conditional comments 2014-09-20T19:22:25Z loic_ quit (Ping timeout: 260 seconds) 2014-09-20T19:23:01Z puchacz: segv-: oki, have you extended it to accept arbitrary data-whatever html5 attributes btw? 2014-09-20T19:23:16Z puchacz: I am including them one-by-one when needed 2014-09-20T19:23:17Z segv-: i ended up implementing something very very similar though, but just with a much more lax parser 2014-09-20T19:23:25Z puchacz: is it public? 2014-09-20T19:23:27Z segv-: puchacz: yeah, that's a major pain as well 2014-09-20T19:24:06Z puchacz: public = I mean open source 2014-09-20T19:24:19Z segv-: puchacz: no, sorry. the company that owned the code went under and took all the code with it (literally. they had everything in the cloud, stopped paying everyone, and all the code and data for 3 years of work went bye bye) 2014-09-20T19:24:32Z segv-: i really wish i had a copy of the code... 2014-09-20T19:24:40Z puchacz: sorry to hear it 2014-09-20T19:25:58Z segv-: the idea was not that complicated though: look for open tags with tal attributes (one of the known, constant and finite, list of programmer defined attributes). if you find it then parse the open tag and parse the body looking for open/close tags of the same name. if you don't find it just treat it as text and leave it as is. 2014-09-20T19:26:26Z segv-: worked pretty well in practice, but it did mean that you had to make sure to get your div tags nested correctly or weird things would happen 2014-09-20T19:26:58Z puchacz: ok. and - do you still use the lisp counterpart that has macros like (<:as-html ... ) and (<:as-is ...) ? 2014-09-20T19:27:27Z Elench quit (Ping timeout: 246 seconds) 2014-09-20T19:27:40Z segv-: yes 2014-09-20T19:28:00Z prxq joined #lisp 2014-09-20T19:28:10Z puchacz: extended for arbitrary data-whatever attributes I take? 2014-09-20T19:28:36Z segv-: though it's actually very rare for me to generate html from code these days. a lot of calls to cl-json:encode-json 2014-09-20T19:28:50Z segv-: puchacz: or ag-whatever attributes, but yeah 2014-09-20T19:29:01Z segv-: sorry, ng-whatever 2014-09-20T19:29:05Z segv-: but yeah 2014-09-20T19:29:09Z puchacz: oki, thanks 2014-09-20T19:30:01Z segv-: though, to be totally honest, there is some value is using what everyone else is using (or seems to be using), which is cl-who. 2014-09-20T19:30:20Z puchacz: I know, hence I asked :-) 2014-09-20T19:30:33Z FunfYears joined #lisp 2014-09-20T19:31:10Z segv-: i'm not convinced the <:whatever macros buy you anything, really, over cl-who's html macro. and yaclml's templating system has some weird limitations (all consequences of parsing the template file as xhtml) 2014-09-20T19:32:42Z puchacz: like need to ampersand-escape all < > in javascript code in script tags 2014-09-20T19:33:14Z segv-: oh, right, i'd forgotten about that limitation 2014-09-20T19:33:44Z segv-: that's not fun at all 2014-09-20T19:42:22Z Patzy quit (Ping timeout: 245 seconds) 2014-09-20T19:43:21Z Patzy joined #lisp 2014-09-20T19:45:04Z mishoo joined #lisp 2014-09-20T19:45:25Z LiamH joined #lisp 2014-09-20T19:51:52Z malbertife_ joined #lisp 2014-09-20T19:53:42Z malbertife quit (Ping timeout: 246 seconds) 2014-09-20T19:53:57Z Shinmera quit (Quit: brb) 2014-09-20T19:56:45Z Longlius quit (Ping timeout: 272 seconds) 2014-09-20T19:57:23Z Shinmera joined #lisp 2014-09-20T19:57:33Z mishoo quit (Ping timeout: 246 seconds) 2014-09-20T20:00:08Z janmuffino joined #lisp 2014-09-20T20:00:31Z janmuffino quit (Client Quit) 2014-09-20T20:00:58Z janmuffino joined #lisp 2014-09-20T20:02:57Z Nizumzen quit (Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/) 2014-09-20T20:04:29Z jlongster quit (Ping timeout: 260 seconds) 2014-09-20T20:09:16Z edgar-rft joined #lisp 2014-09-20T20:09:56Z grungier joined #lisp 2014-09-20T20:10:20Z pecg quit (Quit: WeeChat 1.0) 2014-09-20T20:10:33Z drewc quit (Ping timeout: 260 seconds) 2014-09-20T20:12:13Z kdlv left #lisp 2014-09-20T20:12:18Z jkaye joined #lisp 2014-09-20T20:15:36Z Jesin joined #lisp 2014-09-20T20:17:16Z Elench joined #lisp 2014-09-20T20:17:17Z jkaye quit (Ping timeout: 258 seconds) 2014-09-20T20:17:28Z shka: good night all 2014-09-20T20:17:30Z Elench is now known as Guest36325 2014-09-20T20:17:33Z shka quit (Quit: WeeChat 0.4.3) 2014-09-20T20:18:15Z Guest36325 quit (Changing host) 2014-09-20T20:18:15Z Guest36325 joined #lisp 2014-09-20T20:19:40Z Guest36325 is now known as Elench 2014-09-20T20:20:33Z normanrichards joined #lisp 2014-09-20T20:20:38Z defaultxr quit (Quit: bbl) 2014-09-20T20:21:33Z anannie quit (Quit: No Ping reply in 180 seconds.) 2014-09-20T20:21:51Z anannie joined #lisp 2014-09-20T20:22:54Z jegaxd26 quit (Read error: Connection reset by peer) 2014-09-20T20:23:49Z flip214_ is now known as flip214 2014-09-20T20:23:54Z flip214 quit (Changing host) 2014-09-20T20:23:54Z flip214 joined #lisp 2014-09-20T20:26:14Z drewc joined #lisp 2014-09-20T20:27:57Z nisstyre quit (Quit: WeeChat 1.0) 2014-09-20T20:28:13Z nisstyre joined #lisp 2014-09-20T20:28:19Z jegaxd26 joined #lisp 2014-09-20T20:28:34Z nisstyre quit (Client Quit) 2014-09-20T20:29:53Z klltkr quit (Quit: My MacBook has gone to sleep. ZZZzzz…) 2014-09-20T20:33:34Z clapautius left #lisp 2014-09-20T20:33:55Z ltbarcly joined #lisp 2014-09-20T20:37:33Z clop2 quit (Ping timeout: 260 seconds) 2014-09-20T20:37:54Z jegaxd26 quit (Remote host closed the connection) 2014-09-20T20:38:06Z Longlius joined #lisp 2014-09-20T20:38:56Z normanrichards quit (Read error: Connection reset by peer) 2014-09-20T20:39:32Z jegaxd26 joined #lisp 2014-09-20T20:40:01Z klltkr joined #lisp 2014-09-20T20:42:21Z normanrichards joined #lisp 2014-09-20T20:43:08Z segv- quit (Remote host closed the connection) 2014-09-20T20:43:17Z Elench is now known as afdsgge 2014-09-20T20:43:20Z afdsgge is now known as Elench 2014-09-20T20:43:36Z Elench quit (Remote host closed the connection) 2014-09-20T20:43:56Z Elench` joined #lisp 2014-09-20T20:44:16Z Elench` is now known as Guest97838 2014-09-20T20:44:39Z oudeis_ joined #lisp 2014-09-20T20:44:55Z bgs100 joined #lisp 2014-09-20T20:45:00Z Guest97838 quit (Changing host) 2014-09-20T20:45:00Z Guest97838 joined #lisp 2014-09-20T20:45:35Z Guest97838 left #lisp 2014-09-20T20:49:40Z yacks quit (Ping timeout: 260 seconds) 2014-09-20T20:50:11Z phao joined #lisp 2014-09-20T20:51:06Z Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) 2014-09-20T20:51:30Z clop2 joined #lisp 2014-09-20T20:52:33Z emma quit (Ping timeout: 260 seconds) 2014-09-20T20:53:35Z pgomes joined #lisp 2014-09-20T20:53:46Z yacks joined #lisp 2014-09-20T20:54:07Z Ven joined #lisp 2014-09-20T20:54:20Z emma joined #lisp 2014-09-20T20:55:04Z housel` is now known as housel 2014-09-20T20:55:19Z phao: I wish my friends understood common lisp so I chould show them this http://landoflisp.com/robots.lisp 2014-09-20T20:55:41Z Xach: Make new & better friends! 2014-09-20T20:55:46Z Xach: (like at ILC!) 2014-09-20T20:56:15Z chew joined #lisp 2014-09-20T20:56:19Z phao: Xach ILC? 2014-09-20T20:56:28Z chew: Hey guys 2014-09-20T20:56:42Z chew: Which emacs package should I install (I'm running Ubuntu 14.04)? 2014-09-20T20:56:48Z Shinmera: phao: Write some AI friends 2014-09-20T20:56:58Z phao: International Law Commission or International Linear Collider. 2014-09-20T20:56:58Z chew: I see emacs, emacs24, emacs-lucid, emacs-nox, etc., etc. 2014-09-20T20:57:03Z phao: Shinmera, hehehe 2014-09-20T20:57:43Z phao: Shinmera, Shame to admit, I've done something like that once back when I programmed a simple UO server for myself. Players could talk to a NPC that would just repeat simple compliments. 2014-09-20T20:57:49Z |3b|: chew: emacs or emacs24 probably work, #emacs is better for general emacs questions though 2014-09-20T20:57:57Z phao: . . . but not always =) 2014-09-20T20:58:30Z chew: |3b| thanks, I'll try asking in that channel 2014-09-20T21:02:18Z effy_ quit (Ping timeout: 246 seconds) 2014-09-20T21:02:34Z xyjprc quit (Remote host closed the connection) 2014-09-20T21:02:52Z eli joined #lisp 2014-09-20T21:05:15Z normanrichards quit (Read error: Connection reset by peer) 2014-09-20T21:07:03Z chew quit (Quit: Leaving) 2014-09-20T21:08:27Z resttime_ joined #lisp 2014-09-20T21:09:17Z Ven: mmh... Why do I manually need to macroexpand sometimes? Tried to define a macro that called another macro in it (inside a backtick), but that one macro wasn't expanded 2014-09-20T21:09:18Z thierrygar quit (Quit: thierrygar) 2014-09-20T21:09:52Z vanila: Ven, you shouldnt need to - whats the definition? 2014-09-20T21:10:32Z ltbarcly quit (Quit: Computer has gone to sleep.) 2014-09-20T21:10:40Z resttime_ quit (Read error: Connection reset by peer) 2014-09-20T21:11:54Z Ven: vanila: https://gist.github.com/Nami-Doc/3f7aa98c664cf80cb970. If I change ,(macroexpand (list 'match 'args conds)) with (match args ,conds), it fails 2014-09-20T21:11:59Z Ven: (sorry, it's my first CL program) 2014-09-20T21:12:05Z resttime quit (Ping timeout: 272 seconds) 2014-09-20T21:13:54Z vanila: Instead of ,(macroexpand (list 'match 'args conds)) why not write (match args ,@conds) 2014-09-20T21:14:21Z vanila: then when someone uses the defun-match macro, it will expand into a defun that uses match internally, and then the inner match will be expanded too 2014-09-20T21:14:32Z Ven: vanila: why ,@conds? Shouldn't it be (match args ,conds)? 2014-09-20T21:14:38Z Ven: I don't want to splice it 2014-09-20T21:14:53Z vanila: oh my mistake, then ,conds is right 2014-09-20T21:15:21Z Ven: well, but then it doesn't get macro-expanded :/ 2014-09-20T21:15:40Z vanila: are you sure? 2014-09-20T21:16:20Z Ven: vanila: well, (macroexpand) tells me it's not, and I indeed get an error 2014-09-20T21:17:31Z vanila: That's strange, I'd expect this to work - not sure what to suggest then except looking for a working example somewhere of a macro that expands into another macro 2014-09-20T21:18:36Z Ven: vanila: https://gist.github.com/Nami-Doc/3f7aa98c664cf80cb970 2014-09-20T21:18:47Z Ven: that's without the manual macroexpand 2014-09-20T21:19:02Z emma quit (Ping timeout: 245 seconds) 2014-09-20T21:20:20Z normanrichards joined #lisp 2014-09-20T21:20:34Z emma joined #lisp 2014-09-20T21:20:42Z emma quit (Changing host) 2014-09-20T21:20:42Z emma joined #lisp 2014-09-20T21:20:59Z MoALTz quit (Ping timeout: 272 seconds) 2014-09-20T21:21:30Z Jesin quit (Quit: Leaving) 2014-09-20T21:21:43Z vanila: Ven: http://lpaste.net/111349 2014-09-20T21:23:05Z Jesin joined #lisp 2014-09-20T21:23:21Z Ven: vanila: I ... I don't know :/ 2014-09-20T21:23:58Z _tca: Ven: macroexpand kinda sucks its not always what actually happens 2014-09-20T21:24:30Z Ven: _tca: I think I can see it behave like macroexpand :/ 2014-09-20T21:24:59Z _tca: try sb-cltl2:macroexpand-all 2014-09-20T21:25:43Z Shinmera: or M-x slime-macroexpand-all 2014-09-20T21:26:06Z innertracks joined #lisp 2014-09-20T21:26:13Z Ven: _tca: gives me the same error as when I try to invoke it 2014-09-20T21:26:25Z _tca: ah ok 2014-09-20T21:26:40Z Ven: but it *does* seem it's expanded, looking at the backtrace :) 2014-09-20T21:27:36Z Ven: Ha, actually, vanila was right, I ought to use ,@ 2014-09-20T21:27:37Z ltbarcly joined #lisp 2014-09-20T21:27:51Z Ven: I don't really understand why, but well, my main issue was with macroexpand it seems 2014-09-20T21:29:37Z janmuffino quit (Ping timeout: 246 seconds) 2014-09-20T21:30:02Z pt1 joined #lisp 2014-09-20T21:32:24Z faheem: phao: International Lisp Conference 2014-09-20T21:32:32Z phao: =) 2014-09-20T21:32:35Z phao: thanks 2014-09-20T21:34:20Z kobain quit (Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/) 2014-09-20T21:34:25Z ltbarcly quit (Quit: Computer has gone to sleep.) 2014-09-20T21:34:52Z normanrichards quit (Ping timeout: 240 seconds) 2014-09-20T21:36:00Z fraisni joined #lisp 2014-09-20T21:36:35Z peterhil` quit (Quit: Must not waste too much time here...) 2014-09-20T21:39:22Z clop2 quit (Ping timeout: 245 seconds) 2014-09-20T21:39:27Z pgomes quit (Ping timeout: 245 seconds) 2014-09-20T21:43:08Z nevermoreraven joined #lisp 2014-09-20T21:43:29Z nevermoreraven: what programs are there written in lisp? 2014-09-20T21:44:23Z oGMo: nevermoreraven: http://opusmodus.com/ is a recent commercial one 2014-09-20T21:45:41Z EvW quit (Ping timeout: 272 seconds) 2014-09-20T21:46:06Z nevermoreraven: is lisp good for beginners? 2014-09-20T21:46:33Z oGMo: yes 2014-09-20T21:47:14Z cheryllium: lisp is one of the best languages for beginners imho because it's so simple, so it's easy to pick up 2014-09-20T21:47:24Z cheryllium: and then the student can focus on learning actual concepts rather than syntax etc 2014-09-20T21:47:29Z faheem: nevermoreraven: lisp program -> (+ 1 1) 2014-09-20T21:48:02Z puchacz quit (Quit: Konversation terminated!) 2014-09-20T21:50:05Z ehu quit (Ping timeout: 272 seconds) 2014-09-20T21:50:32Z nevermoreraven: what is the very first programming language? 2014-09-20T21:51:15Z logand: nevermoreraven: the one you learn first 2014-09-20T21:51:29Z p_l: manually changing wires on a board, + that assembly one from 19th century 2014-09-20T21:51:38Z Shinmera: Probably whatever Ada Lovelace wrote 2014-09-20T21:51:52Z p_l: direct machine code, iirc? 2014-09-20T21:52:07Z clop2 joined #lisp 2014-09-20T21:52:22Z oGMo: apparently it's quiz day on #lisp 2014-09-20T21:52:29Z logand: peple wrote algorithm before there were machines, and executed them manually 2014-09-20T21:53:13Z cheryllium: FORTRAN is generally considered the oldest programming language, Lisp the second oldest 2014-09-20T21:53:25Z cheryllium: but those things are fuzzy and depend what you consider a language 2014-09-20T21:53:36Z oGMo: cheryllium: or programming 2014-09-20T21:53:42Z cheryllium: yeah 2014-09-20T21:54:14Z p_l: I think simple assembler predates them both 2014-09-20T21:54:16Z blogle joined #lisp 2014-09-20T21:54:32Z p_l: plus, FORTRAN and Lisp count as oldest *extant* languages 2014-09-20T21:54:34Z oGMo: i think lisp predates actual computers 2014-09-20T21:54:35Z nevermoreraven: okay the very first programming language on very first computers 2014-09-20T21:54:39Z cheryllium: ohhh i think that's what i meant. 2014-09-20T21:54:46Z cheryllium: the oldest languages that are stll in use toda 2014-09-20T21:54:51Z blogle left #lisp 2014-09-20T21:54:52Z p_l: (there was at least one list-manipulating language before Lisp) 2014-09-20T21:55:09Z p_l: nevermoreraven: manual writing of machine code 2014-09-20T21:55:17Z logand: fft was discovered by gauss, wouldnt that count as programming? :-) 2014-09-20T21:56:34Z kobain joined #lisp 2014-09-20T21:57:49Z kobain quit (Max SendQ exceeded) 2014-09-20T21:59:16Z kobain joined #lisp 2014-09-20T21:59:48Z jlongster joined #lisp 2014-09-20T22:00:36Z FunfYears quit (Ping timeout: 260 seconds) 2014-09-20T22:03:51Z Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) 2014-09-20T22:03:54Z normanrichards joined #lisp 2014-09-20T22:04:39Z jlongster quit (Ping timeout: 272 seconds) 2014-09-20T22:05:59Z Ven joined #lisp 2014-09-20T22:06:09Z innertracks quit (Ping timeout: 258 seconds) 2014-09-20T22:06:22Z ehaliewicz joined #lisp 2014-09-20T22:08:43Z innertracks joined #lisp 2014-09-20T22:09:28Z malbertife_ quit (Quit: Leaving) 2014-09-20T22:13:19Z FunfYears joined #lisp 2014-09-20T22:13:32Z jkaye joined #lisp 2014-09-20T22:14:35Z normanrichards quit 2014-09-20T22:14:45Z hiyosi quit (Ping timeout: 246 seconds) 2014-09-20T22:15:09Z fraisni quit (K-Lined) 2014-09-20T22:15:59Z dropperbloated joined #lisp 2014-09-20T22:16:02Z Beetny joined #lisp 2014-09-20T22:17:44Z jkaye quit (Ping timeout: 244 seconds) 2014-09-20T22:18:18Z pt1 quit (Remote host closed the connection) 2014-09-20T22:18:40Z Jesin quit (Quit: Leaving) 2014-09-20T22:19:18Z dmiles quit (Read error: Connection reset by peer) 2014-09-20T22:19:22Z kuzy000_ quit (Ping timeout: 245 seconds) 2014-09-20T22:19:55Z dmiles_afk joined #lisp 2014-09-20T22:23:03Z innertracks quit (Ping timeout: 272 seconds) 2014-09-20T22:27:17Z ggole quit 2014-09-20T22:29:16Z Petit_Dejeuner joined #lisp 2014-09-20T22:35:09Z markov` quit (Ping timeout: 260 seconds) 2014-09-20T22:36:14Z oudeis_ quit (Quit: This computer has gone to sleep) 2014-09-20T22:39:51Z Xach: dlowe: psyched out by clock! 2014-09-20T22:41:35Z hiyosi joined #lisp 2014-09-20T22:43:02Z innertracks joined #lisp 2014-09-20T22:45:58Z marsbot is now known as marsam 2014-09-20T22:46:27Z hiyosi quit (Ping timeout: 272 seconds) 2014-09-20T22:49:16Z tankrim joined #lisp 2014-09-20T22:49:43Z innertracks quit (Quit: innertracks) 2014-09-20T22:50:22Z Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) 2014-09-20T22:51:04Z robot-beethoven joined #lisp 2014-09-20T22:52:03Z marsam is now known as marsbot 2014-09-20T22:54:36Z zlrth joined #lisp 2014-09-20T22:55:53Z cheryllium quit (Quit: ChatZilla 0.9.90.1 [Firefox 32.0.2/20140917194002]) 2014-09-20T23:01:50Z slyrus joined #lisp 2014-09-20T23:06:37Z urandom__ quit (Quit: Konversation terminated!) 2014-09-20T23:07:05Z c107 joined #lisp 2014-09-20T23:11:09Z pierre1_ quit (Ping timeout: 272 seconds) 2014-09-20T23:12:00Z paul0 quit (Quit: Saindo) 2014-09-20T23:12:05Z vlnx quit (Ping timeout: 260 seconds) 2014-09-20T23:13:52Z vlnx joined #lisp 2014-09-20T23:17:29Z Takumo joined #lisp 2014-09-20T23:19:31Z Takumo: Bit of a noob question, if I have a list of numbers L how do I glue the elements of L with a function F, e.g. (* L) -> (* L0 L1 L2 L3 L4 L5...) ? 2014-09-20T23:20:27Z ltbarcly joined #lisp 2014-09-20T23:21:20Z innertracks joined #lisp 2014-09-20T23:23:15Z fragamus joined #lisp 2014-09-20T23:24:47Z jlongster joined #lisp 2014-09-20T23:24:53Z gingerale quit (Ping timeout: 272 seconds) 2014-09-20T23:27:52Z innertracks quit (Ping timeout: 260 seconds) 2014-09-20T23:29:59Z Petit_Dejeuner: Takumo, reduce, but I think you can use apply in that case 2014-09-20T23:31:23Z zygentoma quit (Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/) 2014-09-20T23:33:39Z innertracks joined #lisp 2014-09-20T23:34:14Z Shinmera quit (Quit: ZzZz) 2014-09-20T23:34:54Z c107 quit (Ping timeout: 246 seconds) 2014-09-20T23:37:35Z Karl_Dscc joined #lisp 2014-09-20T23:38:57Z stepnem quit (Ping timeout: 245 seconds) 2014-09-20T23:42:34Z hiyosi joined #lisp 2014-09-20T23:45:23Z innertracks quit (Ping timeout: 272 seconds) 2014-09-20T23:47:09Z hiyosi quit (Ping timeout: 246 seconds) 2014-09-20T23:50:12Z Saigut_ joined #lisp 2014-09-20T23:52:14Z Xach: APPLY works if the list is sufficiently short (which is pretty often) 2014-09-20T23:53:06Z Saigut quit (Ping timeout: 246 seconds) 2014-09-20T23:54:25Z nell joined #lisp 2014-09-20T23:54:38Z nell quit (Client Quit) 2014-09-20T23:57:15Z innertracks joined #lisp 2014-09-20T23:57:52Z BitPuffin joined #lisp