2017-08-13T03:53:33Z ccl-logbot joined #lisp 2017-08-13T03:53:33Z 2017-08-13T03:53:33Z names: ccl-logbot coetry_ fkac panji joast schoppenhauer hylisper jamtho epony felipedvorak sz0 daemoz l04m33[m] astronavt[m] ArthurAGleckler[ hiq[m] hdurer[m] Sovereign_Bleak RichardPaulBck[m thorondor[m] Jach[m] hvxgr al-damiri MrBusiness holycow BlueRavenGT kozy mikecheck _paul0 safe larsen kajo2 wheelsucker Mon_Ouie brendos DingoSaar doesthiswork zooey raynold yeticry_ anticrisis mxh- vtomole gremdrus engblom vaporatorius blt groovy2shoes defaultxr kolko 2017-08-13T03:53:33Z names: Lowl3v3l ryanwatkins Zotan fouric grublet wooden larme phoe oleo DeadTrickster d4ryus2 pjb Bike hvxgr_ beach moei g0d355__ ski QualityAddict angavrilov shiranuidong Bock zacts slyrus jrm cromachina karswell zulu_inuoe azrazalea aindilis drcode mfiano gko djinni` vhost- edgar-rft basket yrdz mood gremly Younder Merv drmeister mbrock tkd gendl abbe joga Oladon dan nikivi snits pillton ikopico wizzo grumble dmiles davsebamse flazh CrazyEddy |3b| chu xantoz 2017-08-13T03:53:33Z names: kjak__ _krator44 heurist theBlackDragon temporal1 froggey cibs_ DGASAU` ryanbw sjl capisce_ q-u-a-n-1 basket` whoman xristos borodust Colleen cross Khisanth jdz koenig antoszka tokik eschatologist hotbobby muzik stee_3 megalography jibanes Patzy ssake dcluna __main__ Tristam AntiSpamMeta rotty thinkpad copec Firedancer ``Erik HDurer2 hjudt sbryant oystewh zchlyg SiCC mikaelj samebchase misv jackdaniel gadwin pok Grue` angelo_ lieven samograd tessier 2017-08-13T03:53:33Z names: himmAllRight nydel Posterdati askatasuna Lord_of_Life rjeli bitch caffe ircbrowse Suzuran cmatei_ tonton foom drot flip214 dlowe djh argoneus Lord_Nightmare amerlyq GGMethos brucem nsnc_ MerinoBailon malcom2073 ramus dTal minion watersoul gigetoo aeth phadthai @fe[nl]ix Blkt Fade nullman ineiros mathrick cyberlard arrsim Intensity libreman LyndsySimon brandonz happy_gnu les billstclair Middernacht troydm Xach ym gabiruh axion z0d malm gilberth nicdev 2017-08-13T03:53:33Z names: specbot whartung mrSpec vsync beaky sparkyy creat jasom mason gingerale fluxit eMBee j0ni micro_ pankracy ericmathison ozzloy Tordek cods eagleflo tuturto baroncha3lus koisoke_ Enderbsd_ vert2_ Shinmera stylewarning Cthulhux alandipert dmh convexferret e kushal Guest17892 catern kbtr_ stux|RC-only tmc arrdem tokenrove ult Ellenor Zhivago pareidolia lxpz zagura sveit mingus mulk vibs29 White_Flame SAL9000 itruslove tephra newcup dptd p_l jself drdo voidlily 2017-08-13T03:53:33Z names: odin lonjil SlashLife adulteratedjedi trig-ger gz_ jerme_ gbyers trn joeygibson redcedar rann tobel Oddity easye loke uint Mandus clamchowder ck_ sigjuice nimiux clog zbigniew kilimanjaro mjl shaftoe_ butterthebuddha neuri8 guaqua swflint raydeejay _death pacon mnoonan zuz Sigyn kini Meow-J jyc__ dim cyraxjoe lemoinem nopf zymurgy tomaw cpape jsnell zkat AeroNotix sword fiddlerwoaroof cpt_nemo Aritheanie emerson pchrist ft Vivek bend3r ecraven spacepluk 2017-08-13T03:53:33Z names: kjeldahl dxtr sukaeto eschulte_ filwisher mklk_ TMA ec\ justinmcp_ isoraqathedh danlentz a7f4 fluter nhandler velvetcore_ l1x felideon shenghi Subfusc Riviera rvirding c0dehero tfb alms_clozure PuercoPop Nikotiini renard_ otwieracz jurov add^_ funnel ggherdov dan64 asedeno angular_mike_ CEnnis91 d4gg4d_ splittist XachX aaronjensen benny luis banjiewen gabot 2017-08-13T03:54:53Z coetry joined #lisp 2017-08-13T03:55:27Z jamtho quit (Ping timeout: 240 seconds) 2017-08-13T03:56:35Z coetry_ quit (Ping timeout: 240 seconds) 2017-08-13T03:57:57Z mikecheck quit (Remote host closed the connection) 2017-08-13T03:58:19Z mikecheck joined #lisp 2017-08-13T04:01:30Z wooden quit (Read error: Connection reset by peer) 2017-08-13T04:02:08Z pjb: beach: well, people adopting non-GPL have their own punishment bestowed upon themselves very quick. Witness how Apple's keeping its modifications of clang for itself! 2017-08-13T04:02:37Z beach: Yeah. 2017-08-13T04:03:02Z holycow: good point. 2017-08-13T04:03:20Z coetry quit (Quit: Lost terminal) 2017-08-13T04:03:33Z beach: I am not using xGPL at the moment, because of what I said (other people reject it). But then, at the moment, I am writing code that Apple would not be interested in. 2017-08-13T04:04:21Z fkac quit (Remote host closed the connection) 2017-08-13T04:05:44Z wooden joined #lisp 2017-08-13T04:07:38Z holycow: its prevalent in the lisp community for some reason 2017-08-13T04:07:43Z holycow: i don't get it really 2017-08-13T04:10:00Z doesthiswork quit (Quit: Leaving.) 2017-08-13T04:12:44Z scymtym joined #lisp 2017-08-13T04:23:47Z neoncontrails joined #lisp 2017-08-13T04:23:56Z Oladon1 joined #lisp 2017-08-13T04:26:07Z Oladon quit (Ping timeout: 246 seconds) 2017-08-13T04:28:14Z beach: holycow: Yeah, it's a mystery. 2017-08-13T04:32:25Z vtomole: how is numberp usually implemented? I know it's not a cond of all the numbers hahaha 2017-08-13T04:33:24Z Bike: tag checks, probably 2017-08-13T04:33:36Z beach: vtomole: Depends on the implementation. 2017-08-13T04:33:57Z vtomole: I've been playing with this all day http://norvig.com/paip/interp1.lisp 2017-08-13T04:34:10Z muzik is now known as muzik_ 2017-08-13T04:34:21Z vtomole: I want to implement an eval inside the simple intepreter 2017-08-13T04:34:56Z vtomole: So the first check would be self-evaluatingp 2017-08-13T04:35:04Z vtomole: Which would include numbers and strings 2017-08-13T04:35:16Z vtomole: So i need to implement stringp and numberp... 2017-08-13T04:35:39Z Bike: it's easier to just do (not (or symbolp consp)) 2017-08-13T04:35:52Z beach: vtomole: So the thing here is that numberp is not usually implemented in an interpreter like this, but in a system that runs in the form of native machine code. 2017-08-13T04:36:08Z vtomole: ah 2017-08-13T04:39:14Z vtomole: How does that work? By checking the storage size? 2017-08-13T04:39:26Z beach: In a native implementation, you mean? 2017-08-13T04:39:50Z vtomole: Yeah 2017-08-13T04:39:55Z beach: For example, in SICL, you would first check for the last two bits being 00 in which case it is a fixnum. 2017-08-13T04:40:45Z beach: Then you would check whether the last two bits are 10 or 01 in which case it is a CONS or another immediate such as a character, and then the answer is no. 2017-08-13T04:41:09Z beach: Then, it must be 11, so it's a general instance. Then you go to memory and check the class. 2017-08-13T04:41:27Z beach: Er, actually, there could be some immediate floats. 2017-08-13T04:41:38Z beach: Anyway, very low-level stuff. 2017-08-13T04:43:52Z muzik_ is now known as muzik 2017-08-13T04:43:53Z vtomole: Thanks 2017-08-13T04:44:36Z basket: In very, very early Lisps atoms were objects whose cars were a specific invalid pointer and whose cdr pointed to a plist, and for numbers the numerical value would be hung on the plist under some key just as a symbol's print name was 2017-08-13T04:46:32Z vtomole: I guessing stringp would also be low-level? 2017-08-13T04:46:53Z beach: Yes, stringp would check the tag and then go to memory to get the class. 2017-08-13T04:47:04Z beach: ... in SICL. 2017-08-13T04:47:13Z mikecheck quit (Ping timeout: 248 seconds) 2017-08-13T04:55:03Z mikecheck joined #lisp 2017-08-13T04:55:19Z Lowl3v3l quit (Ping timeout: 276 seconds) 2017-08-13T04:55:21Z vtomole: In that implementation I linked, Norvig implements macros in common lisp by using def-scheme-macro. Is there a way to define the macros in scheme instead? 2017-08-13T05:00:33Z Bike: what would that mean? 2017-08-13T05:00:50Z Bike: oh, you mean let interpreter code define macros? 2017-08-13T05:01:37Z vtomole: Yes 2017-08-13T05:01:56Z vtomole: He says in the book that you can 2017-08-13T05:02:11Z Bike: sure. just provide a set-macro-function for scheme, that does the setf get with an interpreter function. 2017-08-13T05:02:22Z Bike: interpreter functions are also host functions so there's no problem there 2017-08-13T05:04:53Z vtomole: intepreter functions are host functions? I tried doing (numberp 3) in the the intepreter that was defined and it says "Unbound scheme variable: NUMBERP" 2017-08-13T05:05:17Z vtomole: Which is strange cause 'list', car, cdr and friends work 2017-08-13T05:06:09Z Bike: i mean, (interp '(lambda ...)) gets you a Lisp function 2017-08-13T05:06:45Z Bike: the default scheme interpreter environment is set up specifically, mostly with *scheme-procs* 2017-08-13T05:06:55Z Bike: which includes list, car, cdr, but not numberp 2017-08-13T05:07:18Z vtomole: ah 2017-08-13T05:07:28Z Lowl3v3l joined #lisp 2017-08-13T05:09:18Z mikecheck quit (Quit: Leaving) 2017-08-13T05:09:35Z vtomole: Thanks Bike 2017-08-13T05:10:27Z panji quit (Ping timeout: 240 seconds) 2017-08-13T05:14:06Z vtomole: Seems like implementing a lisp on a lisp is the easiest cause you can borrow features from the undelying implementation. I can't imagine how difficult implementing a lisp using C would be.... 2017-08-13T05:15:07Z beach: vtomole: Hold on a second.... 2017-08-13T05:15:34Z beach: vtomole: Implementing Lisp by writing an interpreter in Lisp makes it possible to borrow stuff from the host. 2017-08-13T05:15:43Z Bike: yeah, but if you don't allow yourself to do any borrowing it gets tedious 2017-08-13T05:16:43Z beach: vtomole: But implementing Lisp written as a standalone system that bootstraps from a different Common Lisp implementation still requires attention to every detail because you can't borrow anything from the host. 2017-08-13T05:17:38Z vtomole: Bike: Thats what I wanted to do. For the learning experience (like numebrp). But it looks like it will take too long. 2017-08-13T05:18:21Z beach: vtomole: Writing it in C is even harder, because then you end up with a small subset of the final system, and then you have to write the rest of the system in that small subset, which is very painful. 2017-08-13T05:21:45Z vtomole: Is that true of most language implementations? (write subset and write the rest in the subset), or is it only lisp? 2017-08-13T05:22:32Z basket: The subset is normally smaller in Lisp than in other languages 2017-08-13T05:22:33Z beach: Good question. 2017-08-13T05:23:09Z panji joined #lisp 2017-08-13T05:23:27Z beach: vtomole: I suppose it must be the same for things like Python, assuming it is written in C. 2017-08-13T05:24:58Z beach: vtomole: But, to me, it's an aberration to write a Lisp system in a lower-level language, unless you need for it to be that way for some independent reason. 2017-08-13T05:25:58Z beach: vtomole: Presumably, the reason someone is writing a Lisp system is that that person want to program in Lisp. Why then would that person turn around and use a different language for implementing it? 2017-08-13T05:26:15Z beach: wants 2017-08-13T05:28:43Z nsrahmad joined #lisp 2017-08-13T05:29:05Z Bike quit (Ping timeout: 246 seconds) 2017-08-13T05:36:39Z panji quit (Quit: Leaving) 2017-08-13T05:37:12Z nsrahmad quit (Quit: Leaving) 2017-08-13T05:38:27Z vtomole: I've considered writing a simple intepreter like that in C for the learning experience. But I've realized that it would hard (writing a parser and all) 2017-08-13T05:40:14Z beach: Well, parsing (a subset of) Lisp is fairly trivial. If your language has a richer syntax, it may be significantly harder. 2017-08-13T05:42:51Z beach: So, you can write a simple interpreter in C for a simple version of Lisp, provided you don't care much about performance. The trouble comes when you want a full Lisp and good performance. Then the use of a lower-level language becomes problematic. 2017-08-13T05:44:18Z beach: One quickly realizes that in order to do all the sophisticated optimizations required to get good performance, the compiler has to be written in Lisp. And one also quickly realizes that complex functions such as the sequence functions must also be written in Lisp. So then, one is stuck with that subset to write all this code in. 2017-08-13T05:45:18Z vtomole: Macros make writing in the subset less painful right? 2017-08-13T05:45:42Z beach: Not really. 2017-08-13T05:46:25Z doesthiswork joined #lisp 2017-08-13T05:46:43Z beach: You end up creating a large set of functions, where they must be loaded into the system in a carefully chosen sequence, because they depend on each other. 2017-08-13T05:47:05Z beach: So each function can only use the previously loaded ones for its implementation. 2017-08-13T05:48:19Z grouzen joined #lisp 2017-08-13T05:48:20Z beach: And since you need the compiler to implement CLOS, you must write the compiler using a kind of pre-CLOS Common Lisp subset. That quickly becomes very painful. 2017-08-13T05:48:50Z vtomole: How is that different from writing an implementation on lisp? Wouldn't you need to load those functions and macros in order either way? 2017-08-13T05:49:37Z beach: No, because you can use a host Lisp system to create the initial image and that image can contain all the stuff you need, including CLOS. 2017-08-13T05:50:50Z beach: You will still need to load the rest of the functionality of course, but the initial image can contain all the basic tools you need to write the rest. Not just a pre-CLOS subset. 2017-08-13T05:51:03Z beach: But you are right... 2017-08-13T05:51:58Z beach: If you create the initial image without much functionality, you basically have the same problem. This is the case for SBCL. It uses the PCL implementation of CLOS and PCL was designed to be loaded into a pre-CLOS Common Lisp implementation. 2017-08-13T05:52:14Z beach: For that reason, the SBCL compiler does not use generic functions. 2017-08-13T05:53:32Z vtomole: Why write a new implementation if your host has everything? 2017-08-13T05:53:37Z vtomole: Oh. You are talking about common lisp which has one standard. 2017-08-13T05:55:09Z beach: Well, you might want better performance. Or you might want a Common Lisp system that uses first-class global environments. Or you may want the compiler to be more maintainable and you want to use generic functions for that. Or you might want a system that uses a faster generic dispatch algorithm so as to encourage the use of generic functions. 2017-08-13T05:55:29Z beach: Or you might want a system in which a debugger runs in one thread and debugs another thread. 2017-08-13T05:55:53Z beach: Or you might want a system with a better garbage collector, given the past decades of progress. 2017-08-13T05:55:57Z beach: Or, or, or... 2017-08-13T05:56:02Z vtomole: :) 2017-08-13T05:56:17Z beach: Those are all SICL goals by the way. 2017-08-13T05:56:44Z vtomole: sbcl is hard to maintain? 2017-08-13T05:56:57Z beach: I have heard that nobody fully understand the compiler code. 2017-08-13T05:57:02Z beach: I haven't looked myself. 2017-08-13T05:57:32Z grouzen quit (Quit: Lost terminal) 2017-08-13T05:58:55Z shka joined #lisp 2017-08-13T05:59:05Z beach: vtomole: Here is an amusing example: https://gitlab.com/embeddable-common-lisp/ecl/blob/develop/src/clos/hierarchy.lsp 2017-08-13T05:59:21Z beach: vtomole: Check out all those DEFPARAMETER forms. 2017-08-13T05:59:49Z beach: ... like +specializer-slots+, +class-slots+, etc. 2017-08-13T05:59:56Z beach: vtomole: What do you think? 2017-08-13T06:00:32Z beach: jackdaniel: Sorry, I am using ECL here, just because I have looked at it before, not because it is any worse than other systems. 2017-08-13T06:00:50Z phoe: well, that's a CLOS implementation 2017-08-13T06:01:04Z vtomole: They are short which is good. jackdaniel uses generic functions for his clos? 2017-08-13T06:01:27Z beach: So why is it (defparameter +class-slots+ `(,@+specializer-slots+....) ...) 2017-08-13T06:01:43Z beach: rather than (defclass class (specializer) (...)) 2017-08-13T06:02:04Z beach: phoe: Can you think of a reason? 2017-08-13T06:02:51Z shka: good morning all 2017-08-13T06:03:10Z vtomole: shka: morning 2017-08-13T06:03:10Z shka: how are you? 2017-08-13T06:03:28Z vtomole: Good you? 2017-08-13T06:03:44Z beach: phoe: I am waiting... 2017-08-13T06:03:51Z shka: awesome, day is not blazing at the very least 2017-08-13T06:04:03Z beach: vtomole: Can you think of a reason why DEFCLASS is not used? 2017-08-13T06:04:04Z shka: which is not major improvement since yesterday 2017-08-13T06:06:06Z beach: phoe: Compare to this: https://github.com/robert-strandh/SICL/blob/master/Code/CLOS/class-defclass.lisp 2017-08-13T06:06:27Z beach: vtomole: Which of the two do you prefer? 2017-08-13T06:06:56Z vtomole: beach: Lemme read them more closely 2017-08-13T06:07:15Z beach: vtomole: No need. 2017-08-13T06:07:35Z beach: In ECL, a different mechanism is required for defining the slots. 2017-08-13T06:07:53Z beach: In SICL, the standard mechanism, i.e DEFCLASS, is used. 2017-08-13T06:08:05Z vtomole: What mechanism is that? The defparameter one? 2017-08-13T06:08:07Z damke_ joined #lisp 2017-08-13T06:08:12Z beach: That kind of stuff has a direct impact on maintainability and readability. 2017-08-13T06:08:18Z beach: vtomole: Yes. 2017-08-13T06:08:26Z phoe: beach: sorry! I went away for a moment 2017-08-13T06:09:11Z phoe: beach: I know the reason - that's a bolt-on CLOS. There's no CLOS in the system before, therefore it needs to be implemented without CLOS. 2017-08-13T06:09:28Z beach: phoe: Exactly my point. 2017-08-13T06:09:32Z vtomole: I was gonna say that ECL is pre-clos.... 2017-08-13T06:09:43Z vtomole: I means what needs to build it 2017-08-13T06:09:45Z vtomole: *mean 2017-08-13T06:09:48Z phoe: vtomole: yes, you're right 2017-08-13T06:10:11Z sdemarre joined #lisp 2017-08-13T06:10:29Z beach: Yes, sort of. A large part of ECL must be written in a subset of Common Lisp that does not include CLOS. 2017-08-13T06:11:10Z beach: I am also guessing (I should ask jackdaniel about it) that the order between the slots in those DEFPARAMETERs is important. 2017-08-13T06:11:35Z beach: So imagine that I need to add a slot to the class CLASS. 2017-08-13T06:11:50Z beach: I am almost sure to break the entire system. 2017-08-13T06:12:52Z beach: vtomole: That's what I mean by the maintainability aspect of things. 2017-08-13T06:13:59Z damke joined #lisp 2017-08-13T06:14:31Z muzik is now known as muzik_ 2017-08-13T06:16:01Z damke_ quit (Ping timeout: 240 seconds) 2017-08-13T06:16:41Z beach: Oh, and one wonders why in ECL, since EQL-SPECIALIZER is a subclass of SPECIALIZER, it doesn't say (defparameter +eql-specializer-slots+ `(,@+specializer-slots+ ...)) (see http://metamodular.com/CLOS-MOP/graph.png). 2017-08-13T06:17:49Z beach: Compare to: https://github.com/robert-strandh/SICL/blob/master/Code/CLOS/eql-specializer-defclass.lisp 2017-08-13T06:17:59Z beach: phoe: Any explanation? 2017-08-13T06:18:14Z beach: vtomole: Maybe you know? 2017-08-13T06:18:35Z phoe: beach: I actually don't know that one. 2017-08-13T06:18:41Z beach: There you go. 2017-08-13T06:19:16Z phoe: Because don't know what "subclassing" means at CLOS-build-time? 2017-08-13T06:19:24Z phoe: No, wait a second... 2017-08-13T06:19:54Z beach: phoe: That is why, in SICL, I am working very hard to make those definitions look "natural" and to make them behave in the standard way. 2017-08-13T06:20:19Z phoe: beach: I see no reason for that. I bet it could say that since we're operating on lists now. 2017-08-13T06:21:27Z phoe: We have backquote working, so I bet it could be doing that. 2017-08-13T06:22:00Z muzik_ is now known as muzik 2017-08-13T06:22:07Z beach: ... and what do you think will happen if I swap the order between two slots in one of the lists? 2017-08-13T06:22:17Z damke_ joined #lisp 2017-08-13T06:22:25Z g0d355__ quit (Ping timeout: 248 seconds) 2017-08-13T06:22:29Z beach: All this stuff is information that should not be required. 2017-08-13T06:22:38Z phoe: Undefined behavior? :) 2017-08-13T06:22:59Z beach: But that is imposed by the way the system is BUILT rather than by the way the system SHOULD BEHAVE. 2017-08-13T06:23:16Z vtomole: Why do you have a file with just one defclass in it? Is this to make maintence easier? 2017-08-13T06:23:28Z beach: So that I can load them separately. 2017-08-13T06:23:59Z beach: It is not strictly necessary all the time. 2017-08-13T06:24:49Z beach: Anyway, I think I made my point about bootstrapping and about different consequences of different ways of writing a Common Lisp system. 2017-08-13T06:25:01Z damke quit (Ping timeout: 240 seconds) 2017-08-13T06:25:12Z beach: Whether my point impressed upon anybody is a different matter, of course. 2017-08-13T06:26:12Z shka: beach: does sicl requires strictly cl standard clos? 2017-08-13T06:26:30Z beach: No, it requires the MOP as well. 2017-08-13T06:26:47Z shka: uh 2017-08-13T06:29:18Z beach: uh what? 2017-08-13T06:30:06Z shka: well, i think you know :P 2017-08-13T06:30:13Z beach: Nope. 2017-08-13T06:30:17Z damke joined #lisp 2017-08-13T06:30:56Z shka: it is just, that you still need working MOP for SICL in order to work, and so you have more code to maintain 2017-08-13T06:31:18Z beach: *sigh* I have utterly failed to get my point across. 2017-08-13T06:31:31Z beach: I use a different Common Lisp system to bootstrap. 2017-08-13T06:31:35Z beach: I don't have to maintain that. 2017-08-13T06:31:52Z beach: Once SICL works, I can use it to bootstrap new versions if I like. 2017-08-13T06:32:13Z shka: i was thinking about implementation (ecl, sbcl), not about SICL 2017-08-13T06:32:21Z damke_ quit (Ping timeout: 240 seconds) 2017-08-13T06:32:25Z beach: I don't maintain those. 2017-08-13T06:32:32Z shka: i know 2017-08-13T06:32:45Z beach: "and so you have more code to maintain"? 2017-08-13T06:33:19Z shka: I agree that this sentence makes no sense 2017-08-13T06:33:28Z beach: OK, I'll drop it then. 2017-08-13T06:33:55Z jackdaniel: shka: it's about being able to bootstrap from any conforming CL+MOP system. At start it might be bootstrapped from say SBCL, but when SICL is complete, it will be CL+MOP as well, so there will be no need to bootstrap from (say) SBCL 2017-08-13T06:34:17Z jackdaniel: like with C compilers - you may bootstrap gcc from clang (actually not, but you got the drill ;) 2017-08-13T06:34:51Z shka: yes, i understand now 2017-08-13T06:34:53Z damke_ joined #lisp 2017-08-13T06:34:54Z beach: jackdaniel: Thanks. And I hope you understand that I am not picking on ECL here. I am sure it is a fine implementation. 2017-08-13T06:35:19Z jackdaniel: yes, I do. and yes, it is. ;-) 2017-08-13T06:35:26Z beach: Good! :) 2017-08-13T06:35:57Z shka: well, ok 2017-08-13T06:36:06Z beach: Anyway, I have lunch guests today, and I need to go pick up some stuff from the store. 2017-08-13T06:36:07Z shka: i had wrong idea what SICL is trying to be 2017-08-13T06:36:15Z jackdaniel: CLOS was added to ECL as an afterthought and it's not as well integrated as it could be 2017-08-13T06:36:18Z shka: beach: take care! :-) 2017-08-13T06:36:29Z jackdaniel: but it will hopefully change in the future 2017-08-13T06:36:44Z jackdaniel: (ad backlog) 2017-08-13T06:37:00Z beach: shka: Thanks. Yes, and I fear that if you had the wrong idea, that is also the case for many others. In other words, I utterly failed to get my point across. 2017-08-13T06:37:15Z beach: Oh, well. 2017-08-13T06:37:17Z beach: I'm off. 2017-08-13T06:37:21Z damke quit (Ping timeout: 240 seconds) 2017-08-13T06:37:28Z shka: beach: perhaps FAQ can be added 2017-08-13T06:37:59Z jackdaniel: shka: I'm sure he will accept pull request with well-written FAQ 2017-08-13T06:38:05Z vtomole: beach: Yes an FAQ would be awesome. Right on the README. 2017-08-13T06:38:22Z jackdaniel gets to his toys 2017-08-13T06:38:29Z jackdaniel: no Sunday lasts forever 2017-08-13T06:38:58Z damke joined #lisp 2017-08-13T06:40:41Z damke_ quit (Ping timeout: 240 seconds) 2017-08-13T06:41:49Z damke_ joined #lisp 2017-08-13T06:44:02Z hylisper quit (Ping timeout: 260 seconds) 2017-08-13T06:44:21Z damke quit (Ping timeout: 240 seconds) 2017-08-13T06:46:05Z BlueRavenGT quit (Ping timeout: 246 seconds) 2017-08-13T06:53:10Z FreeBirdLjj joined #lisp 2017-08-13T06:57:44Z FreeBirdLjj quit (Ping timeout: 255 seconds) 2017-08-13T07:00:26Z KongWubba joined #lisp 2017-08-13T07:01:52Z damke joined #lisp 2017-08-13T07:03:41Z damke_ quit (Ping timeout: 240 seconds) 2017-08-13T07:04:48Z mishoo_ joined #lisp 2017-08-13T07:10:58Z rngoodn joined #lisp 2017-08-13T07:20:05Z FreeBirdLjj joined #lisp 2017-08-13T07:24:47Z safe quit (Read error: Connection reset by peer) 2017-08-13T07:28:05Z mishoo_ quit (Ping timeout: 246 seconds) 2017-08-13T07:41:38Z al-damiri quit (Quit: Connection closed for inactivity) 2017-08-13T07:44:28Z beach: Where is a good place to put an FAQ? Just FAQ.text next to README? 2017-08-13T07:46:47Z phoe: I think so. 2017-08-13T07:46:52Z phoe: You can link to it from the README. 2017-08-13T07:46:52Z beach: OK, thanks. 2017-08-13T07:47:03Z beach: Good idea. 2017-08-13T07:47:36Z rngoodn quit (Quit: My MacBook has gone to sleep. ZZZzzz…) 2017-08-13T07:47:51Z defaultxr quit (Quit: gnight) 2017-08-13T07:49:35Z beach: Not that I think it will help very much, but it can't hurt. 2017-08-13T08:04:51Z mishoo_ joined #lisp 2017-08-13T08:06:54Z damke_ joined #lisp 2017-08-13T08:07:00Z damke quit (Ping timeout: 240 seconds) 2017-08-13T08:10:05Z damke joined #lisp 2017-08-13T08:10:12Z paul0 joined #lisp 2017-08-13T08:12:15Z DeadTrickster quit (Remote host closed the connection) 2017-08-13T08:12:16Z _paul0 quit (Ping timeout: 276 seconds) 2017-08-13T08:12:34Z damke_ quit (Ping timeout: 246 seconds) 2017-08-13T08:15:43Z mishoo joined #lisp 2017-08-13T08:16:40Z phoe: How can I set BUFFER-POSITION with FAST-IO? 2017-08-13T08:17:05Z mishoo_ quit (Ping timeout: 248 seconds) 2017-08-13T08:17:14Z damke quit (Read error: Connection reset by peer) 2017-08-13T08:17:27Z damke_ joined #lisp 2017-08-13T08:18:17Z phoe: I have a single file stream - I want to jump around it like I would with FILE-POSITION. 2017-08-13T08:18:41Z rippa joined #lisp 2017-08-13T08:18:44Z phoe: But FAST-IO seems not to provide such interfaces, instead forcing me to create multiple buffers from one stream. 2017-08-13T08:20:28Z damke joined #lisp 2017-08-13T08:23:20Z damke_ quit (Ping timeout: 240 seconds) 2017-08-13T08:24:55Z damke__ joined #lisp 2017-08-13T08:26:53Z damke quit (Ping timeout: 240 seconds) 2017-08-13T08:26:55Z hylisper joined #lisp 2017-08-13T08:27:23Z damke joined #lisp 2017-08-13T08:30:23Z damke__ quit (Ping timeout: 258 seconds) 2017-08-13T08:40:53Z mishoo quit (Ping timeout: 246 seconds) 2017-08-13T08:42:17Z anticrisis quit (Quit: ERC (IRC client for Emacs 25.2.1)) 2017-08-13T08:43:17Z random-nick joined #lisp 2017-08-13T08:48:14Z FreeBirdLjj quit (Remote host closed the connection) 2017-08-13T08:55:21Z elfmacs joined #lisp 2017-08-13T09:02:35Z doesthiswork quit (Quit: Leaving.) 2017-08-13T09:11:23Z damke__ joined #lisp 2017-08-13T09:12:20Z damke quit (Ping timeout: 240 seconds) 2017-08-13T09:15:55Z damke joined #lisp 2017-08-13T09:18:20Z damke__ quit (Ping timeout: 240 seconds) 2017-08-13T09:20:40Z hylisper quit (Remote host closed the connection) 2017-08-13T09:23:55Z fsmunoz joined #lisp 2017-08-13T09:25:07Z damke_ joined #lisp 2017-08-13T09:25:08Z varjag joined #lisp 2017-08-13T09:25:16Z shka: phoe: well, you can just say "screw it" and just mmap this file 2017-08-13T09:26:40Z dddddd joined #lisp 2017-08-13T09:27:00Z damke quit (Ping timeout: 240 seconds) 2017-08-13T09:27:48Z damke joined #lisp 2017-08-13T09:30:20Z damke_ quit (Ping timeout: 240 seconds) 2017-08-13T09:30:38Z phoe: shka: ... 2017-08-13T09:30:54Z shka: that's what i would do 2017-08-13T09:31:15Z shka: osicat is not terrible 2017-08-13T09:33:18Z damke_ joined #lisp 2017-08-13T09:35:40Z damke quit (Ping timeout: 240 seconds) 2017-08-13T09:36:15Z shka: anyway 2017-08-13T09:36:26Z shka: phoe: i am serious 2017-08-13T09:40:08Z nowhere_man joined #lisp 2017-08-13T09:47:57Z Mon_Ouie quit (Quit: WeeChat 1.9) 2017-08-13T09:47:59Z maarhart joined #lisp 2017-08-13T09:50:17Z maarhart quit (Client Quit) 2017-08-13T09:51:01Z karswell quit (Ping timeout: 240 seconds) 2017-08-13T09:57:38Z damke joined #lisp 2017-08-13T09:58:19Z jamtho joined #lisp 2017-08-13T09:58:52Z elfmacs quit (Ping timeout: 260 seconds) 2017-08-13T10:00:16Z axion: phoe: hello 2017-08-13T10:00:20Z damke_ quit (Ping timeout: 240 seconds) 2017-08-13T10:00:21Z axion: Mind if I send a pm? 2017-08-13T10:01:01Z phoe: axion: Sure 2017-08-13T10:01:03Z phoe: Send me 2017-08-13T10:08:02Z grublet quit (Ping timeout: 246 seconds) 2017-08-13T10:08:13Z sdemarre quit (Quit: Leaving.) 2017-08-13T10:09:49Z xaotuk joined #lisp 2017-08-13T10:10:51Z random-nick quit (Remote host closed the connection) 2017-08-13T10:13:07Z pjb quit (Ping timeout: 258 seconds) 2017-08-13T10:16:50Z Mon_Ouie joined #lisp 2017-08-13T10:20:18Z elimik31 joined #lisp 2017-08-13T10:23:19Z teggi joined #lisp 2017-08-13T10:29:26Z shka: how can i reninitialize class allocated slots? 2017-08-13T10:32:42Z axion: There are methods for INITIALIZE-INSTANCE and REINITIALIZE-INSTANCE you can specialize with an :after qualifier for example. 2017-08-13T10:40:32Z zulu_inuoe_ joined #lisp 2017-08-13T10:42:49Z zulu_inuoe quit (Ping timeout: 255 seconds) 2017-08-13T10:46:43Z Shinmera: shka: if I remember correctly you can either change the slot on any instance, or use the class prototype (mop:class-prototype) 2017-08-13T10:47:04Z shka: Shinmera: thanks, i figured out prototype with the help of inspector 2017-08-13T10:53:52Z jamtho quit (Ping timeout: 248 seconds) 2017-08-13T10:54:13Z random-nick joined #lisp 2017-08-13T10:56:29Z quazimodo joined #lisp 2017-08-13T11:00:50Z jamtho joined #lisp 2017-08-13T11:00:50Z marvin2 joined #lisp 2017-08-13T11:01:09Z damke_ joined #lisp 2017-08-13T11:03:40Z damke quit (Ping timeout: 240 seconds) 2017-08-13T11:06:05Z nirved joined #lisp 2017-08-13T11:06:09Z jamtho quit (Ping timeout: 248 seconds) 2017-08-13T11:06:30Z nirved quit (Client Quit) 2017-08-13T11:07:32Z scymtym quit (Ping timeout: 246 seconds) 2017-08-13T11:10:24Z pjb joined #lisp 2017-08-13T11:29:12Z pjb quit (Ping timeout: 255 seconds) 2017-08-13T11:36:54Z sellout- joined #lisp 2017-08-13T11:37:42Z sunset_NOVA joined #lisp 2017-08-13T11:44:10Z Kyo91_ joined #lisp 2017-08-13T11:50:28Z nowhere_man quit (Quit: Konversation terminated!) 2017-08-13T11:51:23Z nowhere_man joined #lisp 2017-08-13T11:57:00Z damke_ quit (Ping timeout: 240 seconds) 2017-08-13T11:57:18Z AndreasO joined #lisp 2017-08-13T11:57:47Z damke_ joined #lisp 2017-08-13T11:57:56Z Kyo91_ quit (Ping timeout: 246 seconds) 2017-08-13T12:00:22Z rpg joined #lisp 2017-08-13T12:03:22Z nowhere_man quit (Ping timeout: 255 seconds) 2017-08-13T12:05:22Z AndreasO quit (Remote host closed the connection) 2017-08-13T12:08:40Z damke_ quit (Ping timeout: 240 seconds) 2017-08-13T12:09:55Z xaotuk quit (Quit: WeeChat 1.4) 2017-08-13T12:11:04Z damke_ joined #lisp 2017-08-13T12:15:05Z Mon_Ouie quit (Ping timeout: 246 seconds) 2017-08-13T12:22:34Z varjag quit (Ping timeout: 240 seconds) 2017-08-13T12:25:00Z damke_ quit (Ping timeout: 240 seconds) 2017-08-13T12:27:23Z damke_ joined #lisp 2017-08-13T12:31:29Z Karl_Dscc joined #lisp 2017-08-13T12:32:32Z Mon_Ouie joined #lisp 2017-08-13T12:36:01Z scymtym joined #lisp 2017-08-13T12:40:03Z d4ryus3 joined #lisp 2017-08-13T12:41:27Z varjag joined #lisp 2017-08-13T12:42:57Z d4ryus2 quit (Ping timeout: 240 seconds) 2017-08-13T12:46:57Z KongWubba quit (Ping timeout: 240 seconds) 2017-08-13T12:49:01Z oleo quit (Quit: irc client terminated!) 2017-08-13T12:54:55Z Kyo91_ joined #lisp 2017-08-13T12:55:32Z dim: hi 2017-08-13T12:55:48Z dim: is it me or the docstring of uiop:run-program is about impossible to read? 2017-08-13T12:56:26Z EvW1 joined #lisp 2017-08-13T12:56:31Z dim: “One and only one of the stream slurping or vomiting may or may not happen in parallel in parallel with the subprocess, depending on options and implementation,” 2017-08-13T12:56:38Z dim: I guess that's supposed to be helpful? 2017-08-13T12:57:55Z phoe: dim: xD 2017-08-13T12:58:06Z phoe: This is unreadable to me, yes. 2017-08-13T12:59:25Z rpg quit (Quit: My MacBook has gone to sleep. ZZZzzz…) 2017-08-13T13:00:09Z dim: what I want is to call `psql` and then send SQL input to it and retrieve output, several times within a single invocation 2017-08-13T13:00:13Z Kyo91_ quit (Ping timeout: 246 seconds) 2017-08-13T13:00:31Z doesthiswork joined #lisp 2017-08-13T13:00:33Z phoe: dim: why not postgresql? 2017-08-13T13:01:18Z dim: what do you mean? 2017-08-13T13:01:35Z damke joined #lisp 2017-08-13T13:03:20Z damke_ quit (Ping timeout: 240 seconds) 2017-08-13T13:05:16Z phoe: sldjfhksdhf 2017-08-13T13:05:20Z phoe: dim: why not postmodern? 2017-08-13T13:06:32Z arbv joined #lisp 2017-08-13T13:06:43Z Bike joined #lisp 2017-08-13T13:06:55Z dim: ah, yeah, sorry the question is obvious 2017-08-13T13:07:27Z dim: well I'm writing a book about SQL, in Markdown, and I'm including SQL files in there, and I want to run the files and produce the `psql` output for the examples automatically 2017-08-13T13:07:50Z dim: I want the output to be the real psql one with the setup I'm sharing in the book 2017-08-13T13:08:00Z phoe: I see 2017-08-13T13:08:12Z dim: it's all UTL-8 enhanced output, quite nice to work with really 2017-08-13T13:08:21Z dim: \pset null '⦱' 2017-08-13T13:08:21Z dim: \pset null '¤' 2017-08-13T13:08:21Z dim: \pset linestyle 'unicode' 2017-08-13T13:08:32Z dim: you could try those settings in your ~/.psqlrc ;-) 2017-08-13T13:10:22Z FreeBirdLjj joined #lisp 2017-08-13T13:11:00Z DeadTrickster joined #lisp 2017-08-13T13:16:00Z oleo joined #lisp 2017-08-13T13:16:00Z quazimodo quit (Read error: Connection reset by peer) 2017-08-13T13:16:18Z quazimodo joined #lisp 2017-08-13T13:19:54Z damke_ joined #lisp 2017-08-13T13:22:40Z damke quit (Ping timeout: 240 seconds) 2017-08-13T13:24:51Z nirved joined #lisp 2017-08-13T13:25:32Z damke joined #lisp 2017-08-13T13:26:19Z ryanwatkins quit (Ping timeout: 258 seconds) 2017-08-13T13:27:28Z ebzzry joined #lisp 2017-08-13T13:28:00Z damke_ quit (Ping timeout: 240 seconds) 2017-08-13T13:34:24Z kajo2 quit (Ping timeout: 248 seconds) 2017-08-13T13:35:12Z ebzzry_ joined #lisp 2017-08-13T13:36:06Z Shinmera: dim: You might be able to use simple-inferiors: http://shinmera.github.io/simple-inferiors/ 2017-08-13T13:36:33Z ebzzry__ joined #lisp 2017-08-13T13:36:40Z kajo2 joined #lisp 2017-08-13T13:37:24Z KongWubba joined #lisp 2017-08-13T13:37:27Z ebzzry quit (Ping timeout: 240 seconds) 2017-08-13T13:37:44Z KongWubba quit (Client Quit) 2017-08-13T13:39:44Z ebzzry_ quit (Ping timeout: 258 seconds) 2017-08-13T13:44:45Z dim: having a look, thanks! 2017-08-13T13:45:01Z ebzzry__ quit (Ping timeout: 246 seconds) 2017-08-13T13:48:48Z axion: As a few of you know, I've spent the week writing my own PNG image parser, after a few years being frustrated with the performance issues and poor code quality of png-read. Here is a poor-man's benchmark of a large-ish file decoded so far: https://gist.github.com/mfiano/2a794c26c1538b7b9f51a6d562adc274 2017-08-13T13:49:48Z whoman: nice !! 2017-08-13T13:49:53Z Shinmera: You sure you tested png-read with hot caches? 2017-08-13T13:50:02Z axion: I suppose that wasn't fair. Let me rerun 2017-08-13T13:50:03Z Shinmera: that "lambdas converted" implies to me that it wasn't. 2017-08-13T13:50:09Z axion: I just noticed before you said that 2017-08-13T13:50:17Z whoman: hm i was wondering what that was 2017-08-13T13:50:53Z Shinmera: whoman: It means the compiler was invoked. Usually this happens when generic functions are first invoked. 2017-08-13T13:51:21Z whoman: ahh 2017-08-13T13:51:28Z whoman: cool metrics tho too =) 2017-08-13T13:51:44Z axion: https://gist.github.com/mfiano/d9b7c73fd2f2eeadd08c5d79b38c370f 2017-08-13T13:52:11Z Shinmera: Not much difference, as I thought. 2017-08-13T13:52:44Z axion: My parser is doing more work too, as png-read refuses to parse certain metadata chunks it thinks are not important. Mine is fully parsable 2017-08-13T13:52:54Z Shinmera: Nice 2017-08-13T13:55:29Z ebzzry joined #lisp 2017-08-13T13:55:41Z axion: It still has some more improvements to be made to it, and more room for optimizations. I have to finish the deinterlacing code for bit depths <8. While I'm at it, let me just say that I don't even know why I am doing that. 1995 technology to progressively show an image as it is downloaded by a dialup modem is complicated code 2017-08-13T13:55:56Z axion: 3b has been helping with that, and he's doing a great job. 2017-08-13T13:59:05Z Shinmera: It's still useful today for very large images. 2017-08-13T13:59:16Z axion: and for comparison, sdl2-image (libpng) including FFI overhead on same hardware is about 0.03s 2017-08-13T13:59:35Z Shinmera: axion: What about cl-soil / libsoil? 2017-08-13T13:59:42Z axion: cl-soil has bugs. 2017-08-13T13:59:48Z axion: well, no.... SOIL itself 2017-08-13T14:00:03Z Shinmera: I meant speed-wise. 2017-08-13T14:00:04Z whoman: should you try with large images as Shinmera hints? 2017-08-13T14:00:32Z axion: Sure one sec 2017-08-13T14:00:34Z Shinmera: whoman: I meant that in the context of downloading from the web. 2017-08-13T14:00:42Z dim: mm, seems I can't figure out how to run several batches of input and get corresponding output from a subprogram in CL :/ 2017-08-13T14:01:06Z axion: sdl2-image: 00.29s. cl-soil: 0.038s 2017-08-13T14:01:15Z ebzzry quit (Read error: Connection reset by peer) 2017-08-13T14:01:18Z Shinmera: Okey, that's pretty good. 2017-08-13T14:01:36Z axion: 0.029s* 2017-08-13T14:01:46Z ebzzry joined #lisp 2017-08-13T14:03:42Z axion: Note to self: remember to deallocate ffi memory before going past *** in the repl 2017-08-13T14:03:47Z doesthiswork quit (Quit: Leaving.) 2017-08-13T14:04:42Z Kyo91_ joined #lisp 2017-08-13T14:08:07Z ebzzry_ joined #lisp 2017-08-13T14:09:08Z phinxy joined #lisp 2017-08-13T14:10:57Z ebzzry quit (Ping timeout: 246 seconds) 2017-08-13T14:14:05Z jrm: Anyone here associated with Alexandria development? There seems to be a problem with the GitLab page. Downloading an archive gives an empty tarball. 2017-08-13T14:14:08Z jrm: https://gitlab.common-lisp.net/alexandria/alexandria 2017-08-13T14:15:14Z dim: so, anyone have a working example of controling a subprocess in CL? I want to send input, read output, in a loop, from a subprocess (here psql) 2017-08-13T14:17:29Z zulu_inuoe_: What OS are you running on? And what CL are you using? 2017-08-13T14:18:32Z dim: macosx, Clozure 2017-08-13T14:20:35Z zulu_inuoe_: Let me see if I can dig up something relevant. Maybe other people here can answer but I suspect there shouldn't be any gotchas with that combination. 2017-08-13T14:20:36Z ebzzry_ quit (Remote host closed the connection) 2017-08-13T14:20:38Z ebzzry joined #lisp 2017-08-13T14:25:23Z dim: slowly getting there, of course I made stupid mistakes that made it all fail, like not starting the command in the test-case ;-) 2017-08-13T14:25:58Z ebzzry quit (Ping timeout: 246 seconds) 2017-08-13T14:26:10Z zulu_inuoe_: Sorry. I guess I don't have anything useful. All my uses are input only. Meaning I call a command and read its output 2017-08-13T14:26:19Z EvW1 quit (Ping timeout: 246 seconds) 2017-08-13T14:26:56Z ebzzry joined #lisp 2017-08-13T14:30:52Z felipedvorak quit (Ping timeout: 246 seconds) 2017-08-13T14:30:56Z Mon_Ouie quit (Quit: WeeChat 1.9) 2017-08-13T14:33:24Z ebzzry quit (Ping timeout: 258 seconds) 2017-08-13T14:34:11Z dim: yeah here I want to avoid running the command so many times 2017-08-13T14:34:26Z dim: so I run the command and then dialog with it, in `expect` style 2017-08-13T14:34:49Z ebzzry joined #lisp 2017-08-13T14:38:18Z teggi quit (Quit: Leaving...) 2017-08-13T14:41:03Z felipedvorak joined #lisp 2017-08-13T14:42:44Z rgrau joined #lisp 2017-08-13T14:43:32Z EvW joined #lisp 2017-08-13T14:50:32Z damke_ joined #lisp 2017-08-13T14:50:42Z Kyo91_ quit (Ping timeout: 276 seconds) 2017-08-13T14:52:00Z damke quit (Ping timeout: 240 seconds) 2017-08-13T14:53:05Z nowhere_man joined #lisp 2017-08-13T14:53:24Z HTTP_____GK1wmSU joined #lisp 2017-08-13T14:53:49Z HTTP_____GK1wmSU left #lisp 2017-08-13T14:54:52Z knicklux joined #lisp 2017-08-13T14:55:24Z elimik31 quit (Remote host closed the connection) 2017-08-13T14:55:28Z Mon_Ouie joined #lisp 2017-08-13T15:04:07Z dim: read-char reads correctly from the command :output, but read-char-no-hangs immediatly returns nil 2017-08-13T15:05:29Z ebzzry_ joined #lisp 2017-08-13T15:05:31Z EvW quit (Ping timeout: 246 seconds) 2017-08-13T15:08:41Z ebzzry quit (Ping timeout: 255 seconds) 2017-08-13T15:08:48Z zulu_inuoe_: I see. I've had bad experiences doing this sort of thing in the past, so much of my code is set up to either output to a file, which I then read, and/or using CFFI to call OS level API, because of some issue when using the CL layer 2017-08-13T15:09:16Z zulu_inuoe_: I'm not recommending you do either. I'm just empathizing. #thestruggle 2017-08-13T15:10:56Z dim: maybe I shouldn't try to do that in CL, been wasting time when an hour of Python would have solved it, I guess. But I like CL. 2017-08-13T15:10:56Z quazimodo quit (Read error: Connection reset by peer) 2017-08-13T15:11:23Z nowhere_man quit (Ping timeout: 255 seconds) 2017-08-13T15:12:06Z Kyo91_ joined #lisp 2017-08-13T15:12:33Z zulu_inuoe_: Many times in the past I've wanted to write a good compatibility API to do shell calls reliably, similar to the Python API's, but I've never been motivated enough to write it and put it up on QuickLisp 2017-08-13T15:12:59Z neoncont_ joined #lisp 2017-08-13T15:13:34Z zulu_inuoe_: I really wish I had, though. I can't count the number of times I've had to just smash my head against the wall trying to do a relatively simple "call command, read output" thing 2017-08-13T15:14:14Z zulu_inuoe_: I know uiop has API for it, but I haven't had a chance to use it, so I can't say whether it's good enough or not 2017-08-13T15:14:21Z dim: call/read is easy enough, ccl run-program just works (https://ccl.clozure.com/manual/chapter9.4.html) 2017-08-13T15:14:39Z strelox joined #lisp 2017-08-13T15:14:52Z dim: start subprocess, send command, read ouput, and again; that's where it fails 2017-08-13T15:15:01Z neoncontrails quit (Ping timeout: 260 seconds) 2017-08-13T15:15:10Z zulu_inuoe_: I'm on Windows most of the time.. never works how it should on here 2017-08-13T15:15:18Z dim: uiop docstrings are a mess, code is too, it's all undocumented basically 2017-08-13T15:17:10Z zulu_inuoe_: I can't comment. Luckily. Since I love any and all who have/continue to work on it and ASDF. I love you all unconditionally. 2017-08-13T15:17:30Z zulu_inuoe_: That's not to say constructive criticism isn't good. I just don't have any 2017-08-13T15:17:40Z |3b| 's only suggestion is make sure you are flushing output streams 2017-08-13T15:18:44Z edgar-rft signals a 'love condition back to zulu_inuoe_ 2017-08-13T15:18:59Z dim: |3b|: is using terpri good enough? 2017-08-13T15:19:22Z phoe: edgar-rft: debugger invoked on a SIMPLE-TYPE-ERROR: LOVE does not designate a condition class. 2017-08-13T15:19:42Z |3b|: maybe, i'd throw in some finish-output just to make sure 2017-08-13T15:19:47Z phoe: dim: finish-output 2017-08-13T15:20:22Z zulu_inuoe_: phoe: I recognize love as a condition, but I've no handle bound to deal with it 2017-08-13T15:20:28Z dim: wow it wasn't, thanks |3b| 2017-08-13T15:20:34Z brendos quit (Ping timeout: 246 seconds) 2017-08-13T15:21:29Z ebzzry_ quit (Ping timeout: 240 seconds) 2017-08-13T15:24:29Z dim: ok read-char-no-hang is still returning nil immediatly 2017-08-13T15:24:46Z |3b|: isn't that what it's supposed to do? 2017-08-13T15:24:54Z |3b|: (assuming no input yet) 2017-08-13T15:25:18Z |3b| would try sleeping for a bit and see if it returns something then 2017-08-13T15:25:35Z arbv quit (Quit: ZNC - http://znc.in) 2017-08-13T15:25:38Z dim: ok read the first char with read-char, because we know there's at least one 2017-08-13T15:25:43Z dim: then read the rest with read-char-no-hang 2017-08-13T15:26:10Z dim: I don't like sleeping for arbitrary amount of time in something that should be automated, feels subpar 2017-08-13T15:28:04Z |3b|: yeah, if you want to wait for a char, read-char first sounds reasonable 2017-08-13T15:28:23Z phoe: dim: peek-char-no-hang? 2017-08-13T15:28:34Z |3b|: otherwise, sleep and check again in loop 2017-08-13T15:28:41Z arbv joined #lisp 2017-08-13T15:28:43Z phoe: http://paste.lisp.org/display/353374 2017-08-13T15:28:49Z phoe: oh, wait - your problem might be different 2017-08-13T15:29:58Z dim: I expect to have a char to read here, every time, unless end-of-file, which I can handle manually 2017-08-13T15:35:04Z KingMeow joined #lisp 2017-08-13T15:45:42Z KingMeow quit (Remote host closed the connection) 2017-08-13T15:48:57Z rngoodn joined #lisp 2017-08-13T15:48:58Z _death: why do you need read-char-no-hang then 2017-08-13T15:49:52Z nirved quit (Quit: Leaving) 2017-08-13T15:50:01Z _death: if you do it to "detect" the end of output, then it's obviously racey 2017-08-13T15:50:04Z Kyo91_ quit (Ping timeout: 240 seconds) 2017-08-13T15:50:44Z varjag quit (Quit: ERC (IRC client for Emacs 25.2.1)) 2017-08-13T15:52:07Z HTTP_____GK1wmSU joined #lisp 2017-08-13T15:52:11Z HTTP_____GK1wmSU quit (K-Lined) 2017-08-13T15:55:08Z dim: racey implies that there's more than one thing happening at once, yes? 2017-08-13T15:57:31Z _death: if there's more output coming, then it could be intercepted before read-char-no-hang chooses to return nil, or after 2017-08-13T15:59:05Z _death: you'd need to poll w/ a timeout, or use something like iolib 2017-08-13T16:01:26Z wooden quit (Read error: Connection reset by peer) 2017-08-13T16:01:29Z dim: oh. 2017-08-13T16:01:39Z sz0 quit (Quit: Connection closed for inactivity) 2017-08-13T16:01:42Z rngoodn quit (Quit: My MacBook has gone to sleep. ZZZzzz…) 2017-08-13T16:02:38Z rpg joined #lisp 2017-08-13T16:04:53Z rngoodn joined #lisp 2017-08-13T16:05:42Z rngoodn quit (Client Quit) 2017-08-13T16:05:55Z wooden joined #lisp 2017-08-13T16:06:48Z rngoodn joined #lisp 2017-08-13T16:09:27Z dim: then I'd better run a new command for each input 2017-08-13T16:13:52Z strelox quit (Ping timeout: 248 seconds) 2017-08-13T16:17:33Z rngoodn quit (Quit: My MacBook has gone to sleep. ZZZzzz…) 2017-08-13T16:21:25Z safe joined #lisp 2017-08-13T16:23:49Z eazar001 joined #lisp 2017-08-13T16:39:29Z damke joined #lisp 2017-08-13T16:39:38Z damke_ quit (Read error: Connection reset by peer) 2017-08-13T16:40:05Z sunset_NOVA quit (Quit: Leaving) 2017-08-13T16:42:14Z xor-xor joined #lisp 2017-08-13T16:49:55Z damke_ joined #lisp 2017-08-13T16:51:16Z Mon_Ouie quit (Ping timeout: 260 seconds) 2017-08-13T16:52:20Z damke quit (Ping timeout: 240 seconds) 2017-08-13T16:55:27Z EvW1 joined #lisp 2017-08-13T17:02:42Z defaultxr joined #lisp 2017-08-13T17:02:55Z varjag joined #lisp 2017-08-13T17:08:27Z scymtym quit (Ping timeout: 240 seconds) 2017-08-13T17:11:32Z damke joined #lisp 2017-08-13T17:11:48Z madmalik joined #lisp 2017-08-13T17:14:00Z damke_ quit (Ping timeout: 240 seconds) 2017-08-13T17:16:24Z X-Scale joined #lisp 2017-08-13T17:18:19Z Mon_Ouie joined #lisp 2017-08-13T17:20:45Z xor-xor quit (Quit: leaving) 2017-08-13T17:22:09Z pjb joined #lisp 2017-08-13T17:23:41Z slyrus: So if I compile some code with *break-on-signals* T, and the code has a defclass and some defmethods, I get a signal that "There is no class named ..." when I get to the defmethod. Eventually this stuff must get compiled properly, but is this the intended behavior? 2017-08-13T17:25:05Z meowspergers joined #lisp 2017-08-13T17:25:40Z damke quit (Ping timeout: 240 seconds) 2017-08-13T17:26:52Z X-Scale left #lisp 2017-08-13T17:27:58Z _death: slyrus: maybe you want to bind it to ERROR instead 2017-08-13T17:28:33Z _death: slyrus: but why do you want to bind it at all? 2017-08-13T17:29:23Z Kyo91_ joined #lisp 2017-08-13T17:30:10Z slyrus: I'm trying to debug another problem and it's nice to have the compiler stop on signals. This is admittedly a distraction, but I'm curious if it's supposed to be this way. 2017-08-13T17:30:11Z Bike: slyrus: if there's a signal, and break-on-signals covers it, you get a break, even if it would be handled. is that what you mean? 2017-08-13T17:30:47Z slyrus: bike: why does the compilation of the defmethod form happen when the class is undefined? 2017-08-13T17:33:37Z Bike: that wouldn't be related to break-on-signals. if defclass is toplevel (and you're compile-file-ing) later defmethods specializing on the class should be okay. 2017-08-13T17:33:58Z Bike: though "okay" doesn't necessarily mean "without signals", i suppose. 2017-08-13T17:34:05Z phoe: or just generally with-compilation-unit 2017-08-13T17:34:22Z phoe: Bike: AFAIK all signals should be preserved until the end of the compilation unit, meaning, not signaled during it 2017-08-13T17:34:39Z phoe: in case they're no longer valid at the end of the unit, like, a missing function is later defined 2017-08-13T17:35:10Z Bike: phoe: that's not what that means 2017-08-13T17:35:31Z attila_lendvai joined #lisp 2017-08-13T17:35:42Z Bike: you can have with-compilation-unit establish a handler so that warnings are silenced during the compilation unit, but that doesn't mean that they aren't signaled 2017-08-13T17:35:48Z Bike: also, doing so is optional anyway 2017-08-13T17:35:57Z phoe: oh. I see. 2017-08-13T17:36:16Z _death: (sbcl) if I have (defclass cat () ()) (defmethod make-a-sound ((cat cat)) (write-line "meow")) I get two signals, one for defmethod w/o defgeneric (which should be eliminated in sbcl HEAD) and another for "no way to determine lambda list".. 2017-08-13T17:36:38Z _death: so presumably you're using another implementation.. each one has its quirks 2017-08-13T17:37:17Z slyrus: No, this is SBCL (head, at least as of yesterday) 2017-08-13T17:39:55Z caffe left #lisp 2017-08-13T17:40:05Z neoncont_ quit (Remote host closed the connection) 2017-08-13T17:45:02Z random-nick quit (Remote host closed the connection) 2017-08-13T17:45:25Z hernanex3 joined #lisp 2017-08-13T17:45:31Z rpg quit (Quit: My MacBook has gone to sleep. ZZZzzz…) 2017-08-13T17:48:57Z ryanwatkins joined #lisp 2017-08-13T17:49:56Z Grue` quit (Ping timeout: 240 seconds) 2017-08-13T17:50:46Z Kyo91_ quit (Ping timeout: 260 seconds) 2017-08-13T17:52:25Z phinxy quit (Read error: Connection reset by peer) 2017-08-13T17:52:53Z phinxy joined #lisp 2017-08-13T17:53:26Z modula joined #lisp 2017-08-13T17:54:26Z phinxy quit (Max SendQ exceeded) 2017-08-13T17:54:54Z phinxy joined #lisp 2017-08-13T17:55:58Z defaultxr quit (Ping timeout: 246 seconds) 2017-08-13T17:55:59Z modula is now known as defaultxr 2017-08-13T17:57:40Z emerson quit (Quit: WeeChat 1.9) 2017-08-13T17:59:19Z scymtym joined #lisp 2017-08-13T18:06:18Z meowspergers quit 2017-08-13T18:08:18Z varjagg joined #lisp 2017-08-13T18:09:30Z varjag quit (Ping timeout: 240 seconds) 2017-08-13T18:18:24Z phinxy quit (Read error: Connection reset by peer) 2017-08-13T18:19:15Z phinxy joined #lisp 2017-08-13T18:20:27Z daemoz quit (Remote host closed the connection) 2017-08-13T18:20:46Z daemoz joined #lisp 2017-08-13T18:21:46Z phinxy quit (Max SendQ exceeded) 2017-08-13T18:22:20Z phinxy joined #lisp 2017-08-13T18:24:37Z acyed joined #lisp 2017-08-13T18:25:05Z Kyo91_ joined #lisp 2017-08-13T18:26:41Z shwouchk joined #lisp 2017-08-13T18:28:50Z hernanex3 left #lisp 2017-08-13T18:31:03Z rgrau quit (Ping timeout: 276 seconds) 2017-08-13T18:35:10Z acyed quit (Ping timeout: 246 seconds) 2017-08-13T18:45:29Z krasnal joined #lisp 2017-08-13T18:46:02Z neoncontrails joined #lisp 2017-08-13T18:46:34Z foom2 joined #lisp 2017-08-13T18:47:29Z random-nick joined #lisp 2017-08-13T18:49:28Z foom quit (Ping timeout: 258 seconds) 2017-08-13T18:53:00Z FreeBirdLjj quit (Remote host closed the connection) 2017-08-13T18:55:59Z rumbler31 joined #lisp 2017-08-13T19:02:59Z JuanDaugherty joined #lisp 2017-08-13T19:04:01Z watersoul quit (Ping timeout: 240 seconds) 2017-08-13T19:06:24Z nowhere_man joined #lisp 2017-08-13T19:07:31Z prxq joined #lisp 2017-08-13T19:09:54Z watersoul joined #lisp 2017-08-13T19:13:03Z phoe: I have two lists of equal length. What is the function to zip them? 2017-08-13T19:13:22Z phoe: other than (loop for x in list-x for y in list-y collect (list x y))? 2017-08-13T19:13:29Z phoe: ...well, now that I wrote it, I think I'll use it 2017-08-13T19:14:27Z Bike: or (mapcar #'list l1 l2) 2017-08-13T19:15:44Z nowhere_man quit (Quit: Konversation terminated!) 2017-08-13T19:16:01Z nowhere_man joined #lisp 2017-08-13T19:18:46Z moei quit (Quit: Leaving...) 2017-08-13T19:20:48Z phoe: Bike: !!! 2017-08-13T19:21:01Z phoe: now that is an amusing way of (mis)using MAPCAR and LIST 2017-08-13T19:21:03Z phoe: I giggled. 2017-08-13T19:21:32Z Bike: misuse? 2017-08-13T19:21:41Z phoe: I was teasing 2017-08-13T19:21:51Z phoe: I wouldn't think of such a thing on my own 2017-08-13T19:23:10Z basket: phoe: If you don't care about the order of the result sequence you could use PAIRLIS, too 2017-08-13T19:24:04Z Patzy quit (Ping timeout: 240 seconds) 2017-08-13T19:24:09Z nowhere_man quit (Ping timeout: 240 seconds) 2017-08-13T19:24:56Z phoe: basket: PAIRLIS returns an alist - I need a list of proper lists. 2017-08-13T19:25:32Z basket: Oh sorry, you said zip so I thought of 2-tuples 2017-08-13T19:25:41Z phoe: Well, correct. 2017-08-13T19:25:43Z slyrus quit (Remote host closed the connection) 2017-08-13T19:25:47Z phoe: I wasn't clear enough. 2017-08-13T19:26:05Z Patzy joined #lisp 2017-08-13T19:26:08Z rpg joined #lisp 2017-08-13T19:29:17Z prxq: phoe: a quiz: suppose you have '((a b c) (d e f) (g h i)) in variable x. What does (apply #'mapcar #'list x) do?? :-) 2017-08-13T19:31:31Z rgrau joined #lisp 2017-08-13T19:32:05Z _death: that's an old trick 2017-08-13T19:32:15Z _death: I think PAIP mentions it 2017-08-13T19:32:26Z krasnal quit (Ping timeout: 240 seconds) 2017-08-13T19:32:52Z krasnal joined #lisp 2017-08-13T19:32:52Z phoe: prxq: :D 2017-08-13T19:32:59Z oleo: it picks each car of the sublists 2017-08-13T19:33:06Z oleo: giving you (a d g) 2017-08-13T19:33:20Z oleo: ? 2017-08-13T19:33:28Z raynold quit (Quit: Connection closed for inactivity) 2017-08-13T19:33:56Z phoe: (let ((x '((1 2 3) (4 5 6) (7 8 9)))) (apply #'mapcar #'list x)) 2017-08-13T19:34:03Z phoe: ;; => ((1 4 7) (2 5 8) (3 6 9)) 2017-08-13T19:34:22Z oleo: ya 2017-08-13T19:34:42Z phoe: prxq: this is rad! :D 2017-08-13T19:35:01Z phoe: when a higher order function doesn't make it... grab two of them! 2017-08-13T19:35:06Z oleo: so it's picking cars while cdring 2017-08-13T19:35:41Z oleo: cause the next list is '((b c) (e f) (h i)) 2017-08-13T19:36:15Z oleo: so the next thing it pushes onto a new list is (b e h) 2017-08-13T19:36:51Z oleo: what remains is '((c) (f) (i)) which then becomes (c f i) 2017-08-13T19:37:22Z axion: Many better ways to define a matrix transpose :) 2017-08-13T19:38:40Z prxq: axion: indeed! :-) 2017-08-13T19:38:49Z rippa quit (Quit: {#`%${%&`+'${`%&NO CARRIER) 2017-08-13T19:39:12Z eazar001 quit (Quit: WeeChat 1.9) 2017-08-13T19:39:56Z warweasle joined #lisp 2017-08-13T19:40:34Z arbv quit (Ping timeout: 240 seconds) 2017-08-13T19:40:49Z hexfive joined #lisp 2017-08-13T19:43:51Z slyrus joined #lisp 2017-08-13T19:44:36Z Kyo91_ quit (Ping timeout: 255 seconds) 2017-08-13T19:45:03Z EvW1 quit (Remote host closed the connection) 2017-08-13T19:45:13Z EvW joined #lisp 2017-08-13T19:45:18Z msb joined #lisp 2017-08-13T19:49:52Z arbv joined #lisp 2017-08-13T19:53:01Z DingoSaar_ joined #lisp 2017-08-13T19:54:06Z ft quit (Ping timeout: 255 seconds) 2017-08-13T19:55:10Z ft joined #lisp 2017-08-13T19:56:30Z DingoSaar quit (Ping timeout: 240 seconds) 2017-08-13T19:58:26Z mishoo joined #lisp 2017-08-13T19:58:29Z DingoSaar_ is now known as DingoSaar 2017-08-13T19:59:22Z fiddlerwoaroof: phoe a set of higher order functions like this make data manipulation much nicer 2017-08-13T19:59:24Z fiddlerwoaroof: https://github.com/fiddlerwoaroof/data-lens/blob/master/lens.lisp 2017-08-13T20:00:53Z fiddlerwoaroof: This would probably more efficient if implemented with something like the series library, because then it could do stream fusion transparently 2017-08-13T20:00:59Z anticrisis joined #lisp 2017-08-13T20:01:39Z phoe stars the library 2017-08-13T20:03:08Z phoe: I have an octet vector of dimensions (* 4 Y X). Can I turn it into a 3D array with dimensions (X Y 4) without copying? 2017-08-13T20:03:44Z shka quit (Ping timeout: 248 seconds) 2017-08-13T20:04:11Z nikivi quit (Quit: ZNC 1.6.5 - http://znc.in) 2017-08-13T20:04:18Z fiddlerwoaroof: clhs adjust-array 2017-08-13T20:04:19Z specbot: http://www.lispworks.com/reference/HyperSpec/Body/f_adjust.htm 2017-08-13T20:04:21Z fiddlerwoaroof: Does that work? 2017-08-13T20:04:34Z varjagg quit (Ping timeout: 240 seconds) 2017-08-13T20:04:38Z fiddlerwoaroof: I've had this issue before, but I don't remember if I ever found a good solution. 2017-08-13T20:05:23Z fiddlerwoaroof: You might be able to create a displaced array with your desired shape that points to the original one 2017-08-13T20:05:38Z fiddlerwoaroof: Although, I think that has performance issues of its own 2017-08-13T20:06:15Z phoe: fiddlerwoaroof: "The number of dimensions not equal to rank of array." 2017-08-13T20:06:21Z phoe: gah 2017-08-13T20:06:50Z fiddlerwoaroof: Yeah, one pain point for me has always been the lack of a numpy-like array type 2017-08-13T20:06:56Z phoe: I'll need to copy, it seems. 2017-08-13T20:07:10Z fiddlerwoaroof: mgl-mat or something might have something that works the way you want it to 2017-08-13T20:08:39Z _death: a displaced array should work 2017-08-13T20:09:39Z phoe: _death: oh, correct. 2017-08-13T20:09:50Z phoe: Won't that be a performance hit if I have an octet vector? 2017-08-13T20:10:44Z _death: sure.. usually flat vectors are used for manipulation of octets.. 2017-08-13T20:15:00Z paul0 quit (Read error: Connection reset by peer) 2017-08-13T20:15:49Z fiddlerwoaroof: From the standard it looks like adjusting a displaced array to be non-displaced copies the contents 2017-08-13T20:15:51Z paul0 joined #lisp 2017-08-13T20:15:57Z fiddlerwoaroof: Which is a cool trick... 2017-08-13T20:16:11Z Lowl3v3l quit (Quit: Leaving.) 2017-08-13T20:17:48Z phoe: When I have a vector, can I loop on four values at once? 2017-08-13T20:17:52Z phoe: like I'd do on a list? 2017-08-13T20:18:08Z fiddlerwoaroof: I think you have to write that yourself... 2017-08-13T20:18:21Z fiddlerwoaroof: Although, with a multi dimensional vector, you can just loop over one index 2017-08-13T20:18:31Z fiddlerwoaroof: or, that is, n-1 indices 2017-08-13T20:18:37Z phoe: vectors are one-dimensional 2017-08-13T20:18:44Z fiddlerwoaroof: Ah, :) 2017-08-13T20:18:47Z rpg: phoe: What do you mean loop on for values at once? You mean like a region, of index i, i-1, i+1? 2017-08-13T20:18:53Z fiddlerwoaroof: I confuse vector/array 2017-08-13T20:18:55Z rpg: s/for/four/ 2017-08-13T20:18:58Z phoe: I have #(1 2 3 4 5 6) for example, and I want (loop for (x y) on #(1 2 3 4 5 6) ...) 2017-08-13T20:19:03Z phoe: ON works only for lists though 2017-08-13T20:19:12Z rpg: phoe: no, you can't do that. 2017-08-13T20:19:19Z _death: loop does not support that.. you can write your own macro 2017-08-13T20:19:45Z phoe: ...fast-io to the rescue 2017-08-13T20:19:59Z rpg: But you could probably do something like (loop :for x :across arr :using i :as y = (aref arr (1- i)) ....) 2017-08-13T20:20:36Z rpg is not sure he has the loop syntax exactly right 2017-08-13T20:20:56Z _death: hey, could be a good name for a lisp meetup: BYOB & WYOM 2017-08-13T20:21:11Z fiddlerwoaroof: You could also do something like (map 'vector fun (step vec :offset 0 :by 2) (step vec :offset 1 :by 2)) if you had a step function 2017-08-13T20:21:25Z fiddlerwoaroof: :) 2017-08-13T20:23:31Z prxq: phoe: if you start with a 1d vector, you can use a "front end" vector with dimension (x y 4) using the :displaced-to option of make-array 2017-08-13T20:24:06Z _death: this would bring about lots of multiplications 2017-08-13T20:24:12Z prxq: and it won't copy anything 2017-08-13T20:24:51Z prxq: _death: if you want to use dimensions x, y, and z, multiplications will happen anyway. 2017-08-13T20:25:53Z _death: prxq: usually processing is sequential, say pixel-by-pixel or row-by-row, so you can avoid some 2017-08-13T20:25:58Z DingoSaar quit (Remote host closed the connection) 2017-08-13T20:26:50Z pjb: phoe: adjust-array may and will copy an non-adjustable array. Use make-array with :displaced-to 2017-08-13T20:27:30Z phinxy quit (Quit: Leaving) 2017-08-13T20:27:38Z DingoSaar joined #lisp 2017-08-13T20:27:55Z pjb: phoe: displaced arrays are bound to be faster to your own (svref v (+ (* (+ (* x row) y) 4) z))! 2017-08-13T20:28:03Z pjb: s/to your/than your/ 2017-08-13T20:28:13Z varjagg joined #lisp 2017-08-13T20:28:18Z phoe: pjb: thanks! 2017-08-13T20:28:50Z pjb: phoe: for vectors you can loop over multiple indices as you wish, since it's O(1) indexed access! 2017-08-13T20:29:15Z pjb: (loop for i below (length v) for x = (aref v i) for y = (aref v (1+ i)) do …) 2017-08-13T20:29:54Z pjb: you may also use adjust-array to change the :displaced-offset-to 2017-08-13T20:31:43Z pjb: I mean :displaced-index-offset 2017-08-13T20:34:16Z pjb: (let ((v (vector 1 2 3 4 5 6))) (loop with 2v = (make-array 2 :displaced-to v :displaced-index-offset 0) for i below (1- (length v)) do (setf 2v (adjust-array 2v 2 :displaced-to (array-displacement 2v) :displaced-index-offset i)) (prin1 2v) (princ " "))) #| #(1 2) #(2 3) #(3 4) #(4 5) #(5 6) --> nil |# 2017-08-13T20:34:37Z pjb: cf. also com.informatimago.common-lisp.cesarum.array:nudge-displaced-vector 2017-08-13T20:34:47Z sz0 joined #lisp 2017-08-13T20:35:42Z _death: think that's the first time I see array-displacement in the wild 2017-08-13T20:36:25Z pjb: _death: then you don't read enough cesarum :-) 2017-08-13T20:36:41Z BitPuffin|osx joined #lisp 2017-08-13T20:37:03Z _death: pjb: :) 2017-08-13T20:40:33Z hhdave joined #lisp 2017-08-13T20:45:01Z hhdave quit (Ping timeout: 246 seconds) 2017-08-13T20:48:37Z safe quit (Read error: Connection reset by peer) 2017-08-13T20:51:45Z rpg quit (Quit: Textual IRC Client: www.textualapp.com) 2017-08-13T20:52:49Z hhdave joined #lisp 2017-08-13T20:56:11Z seanzheng joined #lisp 2017-08-13T20:59:13Z paul0 quit (Read error: Connection reset by peer) 2017-08-13T20:59:21Z angavrilov quit (Remote host closed the connection) 2017-08-13T21:02:51Z seanzheng quit (Remote host closed the connection) 2017-08-13T21:13:48Z fiddlerwoaroof: Has anyone written a common list library for sanitizing html? 2017-08-13T21:13:53Z kora9 joined #lisp 2017-08-13T21:14:34Z fiddlerwoaroof: I've been working on something that needs such a library and, so far, I've been using a javascript library to do this client-side... but that's not really ideal 2017-08-13T21:14:43Z Shinmera: Well, HTML5 is "self-sanitising", so any parser of that will do. Alternatively, Plump will just slurp anything you throw at it, and allow you to serialise a DOM, so. 2017-08-13T21:14:44Z pjb: fiddlerwoaroof: I wrote something a long time ago, around html 4.01. It's entirely outdated. I guess somebody would have to write something for current html and html bugs. 2017-08-13T21:15:00Z kora9: Evening fellow Lisperatis! I'm wondering, why in for example (reduce #'+ '(1 2 3)) is the + preceded by #? I kind of understand that the + is preceded by ' 2017-08-13T21:15:26Z fiddlerwoaroof: Shinmera: ? I don't mean validation/cleanup, I'm talking about removing things that could cause XSS or break styling 2017-08-13T21:15:33Z Bike: #'foo stands for (function foo) 2017-08-13T21:15:39Z kora9: Ohh 2017-08-13T21:15:46Z Bike: clhs #' 2017-08-13T21:15:47Z specbot: http://www.lispworks.com/reference/HyperSpec/Body/02_dhb.htm 2017-08-13T21:15:47Z Shinmera: fiddlerwoaroof: Ah, in that sense. 2017-08-13T21:15:50Z oleo: ya a function designator 2017-08-13T21:16:40Z Shinmera: fiddlerwoaroof: Haven't seen a library for that before. 2017-08-13T21:16:42Z pjb: kora9: (defun add (x y) `(this is toplevel add ,x ,y)) (let ((add-q 'add) (add-f #'add)) (flet ((add (x y) `(this is local add ,x ,y))) (list (funcall 'add 1 2) (funcall #'add 1 2) (funcall add-q 1 2) (funcall add-f 1 2)))) #| --> ((this is toplevel add 1 2) (this is local add 1 2) (this is toplevel add 1 2) (this is toplevel add 1 2)) |# 2017-08-13T21:16:50Z kora9: Oh, cool. That's helpful to know. I just checked and (reduce (function +) '(1 2 3)) has the same result :) 2017-08-13T21:17:23Z oleo: so when do you need the # ? 2017-08-13T21:17:42Z pjb: kora9: however, for symbols in the CL package, rules ensure that (eq (symbol-function ',x) (function ,x)) so '+ and #'+ will always call the same function, as long as the + here is CL:+ 2017-08-13T21:17:47Z fiddlerwoaroof: This works pretty well client-side: https://github.com/cure53/DOMPurify but, I'm starting to think it would be better to clean the html when I pull the RSS feed 2017-08-13T21:18:01Z pjb: oleo: check my example above with flet/labels! 2017-08-13T21:18:13Z kora9: pjb: oh 2017-08-13T21:18:21Z fiddlerwoaroof: Also, the DOMPurify library has unfortunate interactions with another frontend library I'm using... 2017-08-13T21:18:25Z Shinmera: fiddlerwoaroof: If you know which elements and tags to remove, using lQuery to do that job is pretty easy. 2017-08-13T21:18:53Z Shinmera: *elements and attributes 2017-08-13T21:19:42Z nikivi joined #lisp 2017-08-13T21:23:17Z Shinmera: Eg: (let ((dom (plump:parse "