2017-04-30T00:02:41Z holycow joined #lisp 2017-04-30T00:03:55Z holycow: . 2017-04-30T00:11:24Z fsmunoz quit (Ping timeout: 268 seconds) 2017-04-30T00:12:20Z mgood7123 quit (Read error: Connection reset by peer) 2017-04-30T00:13:24Z ebrasca: how to combine functions? 2017-04-30T00:14:27Z Bike: elaborate 2017-04-30T00:15:06Z ebrasca: Bike: what do you mean? 2017-04-30T00:15:11Z mgood7123 joined #lisp 2017-04-30T00:15:14Z Bike: What do you mean by "combine"? This is not obvious. 2017-04-30T00:16:36Z ebrasca: Bike: (function-1 args) (function-2 args #|modyfy what function 1 make|#) 2017-04-30T00:16:50Z pjb quit (Ping timeout: 252 seconds) 2017-04-30T00:17:05Z DeadTrickster quit (Ping timeout: 240 seconds) 2017-04-30T00:17:12Z ebrasca: Bike: order don't mater. 2017-04-30T00:17:18Z pmetzger: are you just talking about composing functions? 2017-04-30T00:18:28Z ebrasca: pmetzger: in math you can make f(g(x)) = h(x) 2017-04-30T00:19:16Z pmetzger: yes, that's function composition. 2017-04-30T00:19:29Z pmetzger: you don't need special syntax for that, that's literally everything you can do in lisp. 2017-04-30T00:19:32Z Bike: order matters, though. 2017-04-30T00:19:39Z pmetzger: yes, of course. 2017-04-30T00:19:53Z Bike: alexandria has a function COMPOSE, but it's pretty easy to write yourself 2017-04-30T00:20:28Z pmetzger: writing compose is pretty trivial in lisp. 2017-04-30T00:20:35Z pmetzger: lisp is, after all, a functional language. 2017-04-30T00:20:40Z prole quit (Remote host closed the connection) 2017-04-30T00:20:44Z pmetzger: but generally you have little need for it. 2017-04-30T00:21:02Z Bike: eh, it's usefule nough. 2017-04-30T00:21:24Z wildlander quit (Quit: ZzZzZz) 2017-04-30T00:21:40Z ebrasca: Maybe I am doing someting not good. 2017-04-30T00:22:11Z pmetzger: ebrasca: ???? 2017-04-30T00:23:11Z practica` quit (Read error: Connection reset by peer) 2017-04-30T00:23:19Z ebrasca: maybe i am doing something wrong. 2017-04-30T00:23:34Z practica` joined #lisp 2017-04-30T00:25:26Z ebrasca: I am making turtle graphics (3d indexed). 2017-04-30T00:27:30Z neoncontrails quit (Remote host closed the connection) 2017-04-30T00:28:43Z fiddlerwoaroof: pmetzger: lisp isn't a functional language 2017-04-30T00:29:03Z fiddlerwoaroof: it allows for a functional style, but it isn't really a functional language 2017-04-30T00:29:58Z ttt72 joined #lisp 2017-04-30T00:30:02Z MONODA: ebrasca: (function-2 (function-1 args)) is probably what you're looking for 2017-04-30T00:30:07Z pmetzger: it's the ur functional language. it isn't a pure functional language, you can program in almost any style, but it encourages functional thinking a lot of the time. 2017-04-30T00:30:49Z pmetzger: MONODA: I think he was rather looking for a function that, passed two functions, returns the function that gives their composition. but I might not be correct. 2017-04-30T00:31:43Z fiddlerwoaroof: (defun compose (f1 f2) (lambda (&rest args) (funcall f1 (apply f2 args))) 2017-04-30T00:32:35Z fiddlerwoaroof: It's as true to say that lisp is an imperative or an object-oriented language as it is to say that it's a functional language 2017-04-30T00:32:57Z fiddlerwoaroof: Haskell and ML are functional languages because they more or less force you to write in a functional style 2017-04-30T00:33:17Z pmetzger: ocaml does not force you to write in a functional style. 2017-04-30T00:33:24Z fiddlerwoaroof: I didn't say ocaml :) 2017-04-30T00:33:32Z pmetzger: you can write imperative code, just as you do in lisp. 2017-04-30T00:33:43Z pmetzger: ML allows mutation. 2017-04-30T00:34:08Z pmetzger: Haskell forces you to write in a pure functional style sorta, though you can of course evade that if you want to. 2017-04-30T00:34:13Z ebrasca: If you do function composition you can make it work with less instructions. 2017-04-30T00:34:27Z pmetzger: ebrasca: I don't understand that statement. 2017-04-30T00:34:48Z pmetzger: ebrasca: Are you a native speaker of a language other than English by chance? 2017-04-30T00:35:03Z ebrasca: pchrist: yes , I am Spanish. 2017-04-30T00:35:21Z nyef joined #lisp 2017-04-30T00:35:23Z MrWoohoo joined #lisp 2017-04-30T00:35:30Z ebrasca: pmetzger: yes , I am Spanish. 2017-04-30T00:36:32Z pmetzger: ebrasca: I thought so. It is a bit hard to understand your questions. I'm sure your English is better than my Spanish, but you might try harder to explain what you are asking. 2017-04-30T00:38:57Z thinkpad quit (Ping timeout: 240 seconds) 2017-04-30T00:39:22Z nyef quit (Remote host closed the connection) 2017-04-30T00:41:14Z ttt72 quit (Quit: ttt72) 2017-04-30T00:41:37Z ttt72 joined #lisp 2017-04-30T00:41:38Z nowhereman joined #lisp 2017-04-30T00:42:19Z ttt72 quit (Client Quit) 2017-04-30T00:42:42Z ttt72 joined #lisp 2017-04-30T00:42:45Z nyef joined #lisp 2017-04-30T00:44:46Z ebrasca: (combine (* x x) (+ (* x x) x)) ;;-> (+ (expt x 4) (* 2 (expt x 3)) (expt x 2)) 2017-04-30T00:48:11Z rumbler31 joined #lisp 2017-04-30T00:52:47Z ebrasca: Thanks you. 2017-04-30T00:55:43Z space_otter joined #lisp 2017-04-30T00:58:22Z nowhereman quit (Ping timeout: 258 seconds) 2017-04-30T00:59:30Z |3b|: so expand (* x x), with x=(+ (* y y) y) to (* (+ (* y y) y) (+ (* y y) y)) then evaluate/simplify that to get a new function? 2017-04-30T01:01:16Z ``Erik quit (Ping timeout: 260 seconds) 2017-04-30T01:02:40Z ``Erik joined #lisp 2017-04-30T01:02:53Z |3b|: might be able to do that sort of thing with axiom or maxima. not sure if either of those are suitable for using from code though. 2017-04-30T01:02:56Z ebrasca: |3b|: simplify 2 functions making new one. 2017-04-30T01:04:48Z ttt72 quit (Quit: ttt72) 2017-04-30T01:05:11Z ttt72 joined #lisp 2017-04-30T01:06:32Z holycow: oh wow. 3000 usd is worth 4000 cad 2017-04-30T01:06:34Z holycow: holy canoly 2017-04-30T01:06:52Z ebrasca: holycow: what? 2017-04-30T01:07:07Z pmetzger: few cannoli are, in fact, particularly holy. 2017-04-30T01:07:15Z holycow: wooops sorry. wrong window 2017-04-30T01:09:32Z Dotcra joined #lisp 2017-04-30T01:09:43Z adlai left #lisp 2017-04-30T01:09:44Z ttt72 quit (Client Quit) 2017-04-30T01:10:08Z ttt72 joined #lisp 2017-04-30T01:11:34Z |3b|: ebrasca: probably faster (and easier) to just do (let ((x (+ (* x x) x))) (* x x)). that has about 3 operations, while the (+ (expt x 4) ...) form has at least 6 2017-04-30T01:12:02Z holycow: pmetzger: hehe 2017-04-30T01:12:25Z holycow: i will endeavour not to blaspheme any longer 2017-04-30T01:13:50Z pjb joined #lisp 2017-04-30T01:14:01Z pjb is now known as Guest6217 2017-04-30T01:14:24Z ebrasca: |3b|: how are going cl-vulkan? 2017-04-30T01:16:00Z |3b|: not working on it currently. I want to write some code that could use it first, so i can decide what the API should look like. 2017-04-30T01:18:59Z ebrasca: |3b|: what do you think about cepl? 2017-04-30T01:19:16Z ebrasca: |3b|: cepl on vulkan. 2017-04-30T01:19:46Z ebrasca: |3b|: It is hard in opengl. How it is in vulkan? 2017-04-30T01:20:21Z |3b|: I haven't really looked at cepl, so I don't know much about it. 2017-04-30T01:22:06Z |3b|: Opengl does a lot of things for you, like managing memory. Vulkan requires you to handle those details yourself, so it is harder to use in some ways 2017-04-30T01:23:06Z troydm quit (Read error: Connection reset by peer) 2017-04-30T01:23:07Z |3b|: Vulkan usually only has 1 way to do things though, so it is simpler than OpenGL in other way 2017-04-30T01:23:16Z pmetzger quit 2017-04-30T01:23:20Z erethon quit (Read error: Connection reset by peer) 2017-04-30T01:24:04Z shenghi quit (Read error: Connection reset by peer) 2017-04-30T01:24:19Z shenghi joined #lisp 2017-04-30T01:24:31Z axion quit (Read error: Connection reset by peer) 2017-04-30T01:24:40Z ebrasca: |3b|: I am making graphics for opengl. Can it work with vulkan? (indexed meshes) 2017-04-30T01:24:40Z chu quit (Remote host closed the connection) 2017-04-30T01:24:40Z cartwright quit (Read error: Connection reset by peer) 2017-04-30T01:25:44Z ttt72 quit (Quit: ttt72) 2017-04-30T01:26:07Z ttt72 joined #lisp 2017-04-30T01:27:15Z azzamsa quit (Ping timeout: 268 seconds) 2017-04-30T01:28:24Z ebrasca: |3b|: I think you will like to read varjo and cepl. 2017-04-30T01:28:32Z |3b|: You need to use shaders and store index/vertex data in buffers in vulkan. If you use those in OpenGL, the data and shaders are similar. 2017-04-30T01:29:11Z |3b|: I have my own alternative to varjo, and I have different goals from cepl. 2017-04-30T01:30:29Z ebrasca: |3b|: Thanks you. 2017-04-30T01:32:48Z rumbler31 quit (Remote host closed the connection) 2017-04-30T01:33:01Z smoon joined #lisp 2017-04-30T01:37:41Z ttt72 quit (Quit: ttt72) 2017-04-30T01:38:26Z ttt72 joined #lisp 2017-04-30T01:46:48Z Guest6217 quit (Ping timeout: 240 seconds) 2017-04-30T01:47:41Z practica` quit (Ping timeout: 255 seconds) 2017-04-30T01:48:13Z cromachina_ joined #lisp 2017-04-30T01:48:48Z practica` joined #lisp 2017-04-30T01:49:56Z marusich joined #lisp 2017-04-30T01:51:04Z ttt72 quit (Quit: ttt72) 2017-04-30T01:51:28Z ttt72 joined #lisp 2017-04-30T01:51:59Z cromachina quit (Ping timeout: 252 seconds) 2017-04-30T01:53:12Z practica` quit (Read error: Connection reset by peer) 2017-04-30T01:53:34Z practica` joined #lisp 2017-04-30T01:54:31Z d4ryus1 joined #lisp 2017-04-30T01:57:10Z d4ryus quit (Ping timeout: 240 seconds) 2017-04-30T02:03:09Z arquebus joined #lisp 2017-04-30T02:04:21Z ttt72 quit (Quit: ttt72) 2017-04-30T02:04:44Z ttt72 joined #lisp 2017-04-30T02:06:07Z arquebus quit (Client Quit) 2017-04-30T02:11:50Z nowhereman joined #lisp 2017-04-30T02:13:46Z presiden joined #lisp 2017-04-30T02:18:47Z ttt72 quit (Quit: ttt72) 2017-04-30T02:19:10Z ttt72 joined #lisp 2017-04-30T02:23:16Z drot quit (Remote host closed the connection) 2017-04-30T02:24:52Z Fare joined #lisp 2017-04-30T02:24:57Z azzamsa joined #lisp 2017-04-30T02:25:12Z Fare quit (Remote host closed the connection) 2017-04-30T02:25:22Z Fare joined #lisp 2017-04-30T02:26:38Z mgood7123 quit (Remote host closed the connection) 2017-04-30T02:27:13Z smoon quit (Quit: smoon) 2017-04-30T02:30:20Z chens` joined #lisp 2017-04-30T02:30:20Z chens quit (Read error: Connection reset by peer) 2017-04-30T02:30:56Z Beetny joined #lisp 2017-04-30T02:31:32Z ttt72 quit (Quit: ttt72) 2017-04-30T02:31:32Z Vibor joined #lisp 2017-04-30T02:31:51Z Vibor: Hi 2017-04-30T02:31:54Z ttt72 joined #lisp 2017-04-30T02:32:13Z Vibor: So I wonder if this is correct (defmacro concstr (str1 str2) 2017-04-30T02:32:13Z Vibor: `(,@(concatenate 'string str1 str2))) 2017-04-30T02:33:23Z sukaeto: ebrasca: Lisp's loop macro has some set builderish syntax: (loop for x from 1 to 10 collect (expt x 2)) 2017-04-30T02:33:37Z beach: Good morning everyone! 2017-04-30T02:33:52Z mgood7123 joined #lisp 2017-04-30T02:34:07Z beach: Vibor: That is probably not what you want to do. 2017-04-30T02:34:21Z Vibor: beach: why? 2017-04-30T02:34:37Z sukaeto: ebrasca: you can collect new lists from other sequences, too, eg: (loop for x in other-list ....) 2017-04-30T02:34:43Z sukaeto: clhs loop 2017-04-30T02:34:45Z specbot: http://www.lispworks.com/reference/HyperSpec/Body/m_loop.htm 2017-04-30T02:34:59Z beach: Vibor: I am just guessing of course, but try (macroexpand-1 '(concstr "abc" "def")) and see whether that is the expansion you desired. 2017-04-30T02:35:02Z sukaeto: there's a ton of stuff in there, it can be a bit daunting 2017-04-30T02:35:49Z Vibor: beach: and indeed when I tried to use that macro to concatenate a string str and an element of string array, it returns str is not a sequence error 2017-04-30T02:36:34Z daemoz quit (Remote host closed the connection) 2017-04-30T02:37:03Z beach: Vibor: What is it that you want your macro to do, and why do you think it should be a macro in the first place? 2017-04-30T02:38:19Z Vibor: beach: maybe I should write a function wrapper instead, but since I encountered the error and had no idea why, i hope some one could explain, I am relatively new to lisp anyways 2017-04-30T02:38:50Z Bike: did you have something like (concstr str (aref array n))) 2017-04-30T02:38:52Z krator44: well technically there's nothing wrong with the macro 2017-04-30T02:38:52Z beach: Vibor: I can explain, but you need to tell me what it is that you try to accomplish. 2017-04-30T02:39:15Z Vibor: Bike: exactly 2017-04-30T02:39:45Z Bike: right, well, since concstr is a macro, you can see that that would try to call (concatenate 'string 'str '(aref array n)), more or less 2017-04-30T02:39:50Z Bike: probably not what you have in mind 2017-04-30T02:39:51Z Vibor: beach: just tried to simplify concatenate function for strings(no need to write 'string symbol every time) 2017-04-30T02:40:06Z beach: Vibor: Then there is absolutely no reason to use a macro. 2017-04-30T02:40:25Z beach: Vibor: A macro should be used only if you need a specific evaluation rule for the calls. 2017-04-30T02:40:37Z beach: Vibor: In this case, you just need a function. 2017-04-30T02:41:06Z beach: Vibor: It is a common newbie mistake to overuse macros. 2017-04-30T02:41:34Z beach: Vibor: Macros are an essential part of Common Lisp and a macro is occasionally called for, but it is very rare. 2017-04-30T02:41:50Z krator44: i think i would just write it as (defmacro concstr (str1 str2) (concatenate 'string str1 str2)) 2017-04-30T02:42:02Z Bike: but why. 2017-04-30T02:42:15Z Bike: it only works on literals. nobody actually wants that. 2017-04-30T02:42:20Z krator44: clearly aside from `(,@.. etc. there's nothing in particular wrong with that 2017-04-30T02:42:26Z beach: krator44: That is very likely not what Vibor wants. 2017-04-30T02:42:27Z Fare quit (Ping timeout: 240 seconds) 2017-04-30T02:42:31Z ttt72 quit (Quit: ttt72) 2017-04-30T02:43:06Z ttt72 joined #lisp 2017-04-30T02:43:23Z JuanDaugherty joined #lisp 2017-04-30T02:43:32Z Vibor: krator44: actually it still returns an error when you use that with a string and an element of string array 2017-04-30T02:43:56Z beach: Vibor: I don't think krator44 has understood what you want. 2017-04-30T02:44:29Z beach: Vibor: Just write it as an ordinary function and you will be fine. 2017-04-30T02:44:42Z krator44: beach: he wants not to write 'string all the time 2017-04-30T02:44:43Z Vibor: beach: indeed 2017-04-30T02:45:04Z Bike: krator44: and for it to evaluate its arguments, obviously. 2017-04-30T02:45:21Z beach: krator44: But that is not what your suggested solution allows. As Bike pointed out, your solution works only for literal strings. 2017-04-30T02:45:28Z emaczen quit (Quit: ERC (IRC client for Emacs 24.5.1)) 2017-04-30T02:46:15Z Fare joined #lisp 2017-04-30T02:46:40Z krator44: beach: yea but so does the standard concatenate function with 'string argument 2017-04-30T02:46:49Z axion joined #lisp 2017-04-30T02:46:51Z Bike: no? 2017-04-30T02:47:06Z Bike: (let ((str "foo")) (concatenate 'string str "bar")) => "foobar" 2017-04-30T02:47:09Z beach: krator44: Why do you think that? 2017-04-30T02:48:56Z krator44: Bike: ok you're right 2017-04-30T02:49:13Z Vibor: and that's the error I got 2017-04-30T02:50:24Z beach: Vibor: You got that error because you are calling CONCATENATE at macroexpansion time rather than at runtime. 2017-04-30T02:50:48Z emaczen joined #lisp 2017-04-30T02:51:18Z beach: Vibor: And at macroexpansion time, all you have is the unevaluated arguments to the macro, so if the argument is a variable, like STR in Bike's example, then it tries to call CONCATENATE with the symbol STR. 2017-04-30T02:51:22Z Fare: Vibor: Make sure you don't program past bedtime. 2017-04-30T02:51:29Z smoon joined #lisp 2017-04-30T02:51:32Z krator44: (defun concstr (str1 str2) (concatenate 'string str1 str2)) then 2017-04-30T02:51:44Z Fare: There's already uiop:strcat 2017-04-30T02:52:02Z Vibor: I see (let ((s1 "a") (s2 "b")) (concstr s1 s2)) 2017-04-30T02:52:07Z beach: Fare: I think Vibor is a newbie, so we need some pedagogy here. 2017-04-30T02:52:36Z Vibor: totally newbie :D 2017-04-30T02:52:48Z Fare: I'm not sure what's better. CL's primitive and confusing notion of times, or Racket's elaborate and confusing notion of times. 2017-04-30T02:52:58Z pilne quit (Quit: Quitting!) 2017-04-30T02:53:32Z Fare: Vibor: well, Lisp has this notion of macros that makes it wonderful, but that requires thinking about "times" at which things happen. 2017-04-30T02:54:03Z axion quit (Quit: WeeChat 1.7) 2017-04-30T02:54:13Z Fare: Vibor: when some code runs, it's called (its) runtime 2017-04-30T02:54:13Z axion joined #lisp 2017-04-30T02:54:27Z Fare: Vibor: when some code is read, it's called (its) read-time 2017-04-30T02:54:30Z beach: krator44: What was your reason for wanting to look at Hemlock? 2017-04-30T02:54:35Z Fare: when it's compiled, (its) compile-time 2017-04-30T02:54:41Z Fare: when it's loaded, (its) load-time 2017-04-30T02:54:53Z Fare: when it's macro-expanded, (its) macroexpansion-time 2017-04-30T02:55:21Z LiamH quit (Ping timeout: 240 seconds) 2017-04-30T02:55:29Z Fare: What more, the times for various pieces of code can be interleaved with each other. 2017-04-30T02:56:11Z krator44: beach: it's an emacs (written in common lisp) with a common lisp extension syntax 2017-04-30T02:56:33Z Fare: so if you write (foo), and foo is a macro, before (foo) is run, it must first be macroexpanded, so its macroexpansion-time will come before its runtime. Its macroexpansion-time on the other hand is the runtime of the body of the macro. 2017-04-30T02:57:05Z beach: krator44: You may want to try Climacs and compare. 2017-04-30T02:57:13Z Fare: or Zmacs 2017-04-30T02:57:24Z Fare: apparently, there's a new emulator for the LMI Lambda. 2017-04-30T02:57:53Z beach: krator44: A simplified version of Climacs (called Drei) is used as the input editor of McCLIM. 2017-04-30T02:57:54Z ttt72 quit (Quit: ttt72) 2017-04-30T02:58:17Z ttt72 joined #lisp 2017-04-30T02:59:32Z beach: krator44: Try (ql:quickload "climacs") and then (climacs:climacs). 2017-04-30T02:59:40Z milanj quit (Quit: This computer has gone to sleep) 2017-04-30T03:00:25Z beach: Fare: Partying tonight? 2017-04-30T03:01:22Z TDT quit (Quit: TDT) 2017-04-30T03:03:04Z beach: Vibor: Did you manage to get it to work? 2017-04-30T03:03:11Z Vibor: Actually I have another question, I wrote a 2d array, with :initial-element of a string block which is a 2d string array(sounds 4d), when I tried to make some modification to a specified string block , all other string blocks would be changed the same way, I wonder why? 2017-04-30T03:03:39Z Vibor: beach: sure with the function wrapper :) 2017-04-30T03:03:40Z beach: Vibor: Because nothing is ever implicitly copied in Common Lisp. 2017-04-30T03:04:00Z beach: Vibor: Common Lisp uses what I call "uniform reference semantics". 2017-04-30T03:04:21Z beach: Vibor: So the initial element is a reference to a single string, and that reference is going to fill your array. 2017-04-30T03:04:27Z Dotcra quit (Ping timeout: 240 seconds) 2017-04-30T03:05:36Z Dotcra joined #lisp 2017-04-30T03:06:01Z Fare: beach: well, the LMI IP has tens of potential owners and creditors who could sue anyone using it. Tainted. 2017-04-30T03:06:21Z beach: Fare: Why are you telling me this? 2017-04-30T03:06:45Z Fare: beach: could SICL compile to Scheme? 2017-04-30T03:07:05Z Fare: beach: oh, maybe I misunderstood why you suggested that I should be partying tonight 2017-04-30T03:07:06Z beach: I haven't considered that possibility. 2017-04-30T03:07:26Z beach: Fare: I meant: have you been partying tonight. :) 2017-04-30T03:08:01Z beach: Bike: What would happen if we try to compile a form such as `(funcall 234), where is a literal AST? Would "magically" become part of the resulting AST for the form? 2017-04-30T03:08:10Z Fare: Gambit, Racket and/or Chez would be great targets 2017-04-30T03:08:19Z Fare: beach: I sound like I drank too much? 2017-04-30T03:08:21Z ttt72 quit (Quit: ttt72) 2017-04-30T03:08:34Z beach: Fare: A bit incoherent, perhaps :) 2017-04-30T03:08:44Z Fare: that's my normal state, I fear 2017-04-30T03:08:45Z ttt72 joined #lisp 2017-04-30T03:08:50Z beach: Nah. 2017-04-30T03:08:55Z beach: I know you better than that. 2017-04-30T03:11:30Z Fare: đây là trạng thái thường xuyên của tôi 2017-04-30T03:12:19Z Fare: well, if you manage to explain evaluation times while sounding sober, you should write the manual about it. 2017-04-30T03:12:33Z beach: I'll think about it. 2017-04-30T03:12:55Z Fare: that said, SICL compiling to Scheme might be great. 2017-04-30T03:13:02Z krator44: beach: it's not as bad as hemlock 2017-04-30T03:13:30Z dwrngr quit (Read error: Connection reset by peer) 2017-04-30T03:13:37Z krator44: but.. that's not saying much 2017-04-30T03:13:45Z dwrngr joined #lisp 2017-04-30T03:14:34Z Bike: beach: it would be treated as a literal i'm pretty sure 2017-04-30T03:14:34Z krator44: a lot of things are not as bad as hemlock 2017-04-30T03:15:05Z beach: Bike: Yes, but would it "work"? 2017-04-30T03:15:53Z beach: Bike: I am contemplating the possibility of implementing phoe's suggestion to turn a generic function into an ordinary one. 2017-04-30T03:16:02Z beach: Bike: And I would like to do that in the cross compiler. 2017-04-30T03:16:12Z Vibor: beach: https://ptpb.pw/2SHN 2017-04-30T03:16:13Z beach: Bike: So I am thinking I should keep the AST of each method. 2017-04-30T03:16:14Z Bike: i'm not sure what "work" means here 2017-04-30T03:16:33Z Bike: i would expect that to compile to something that signals an error since an ast is not a function, and i think that's what it does 2017-04-30T03:16:48Z beach: Bike: Yeah, OK. 2017-04-30T03:17:28Z neoncontrails joined #lisp 2017-04-30T03:18:29Z krator44: at least it runs on sbcl 2017-04-30T03:18:39Z beach: Vibor: You are better off not addressing me personally when you want to show your code. Others can help as well. 2017-04-30T03:18:46Z beach: Vibor: You have two mistakes there. 2017-04-30T03:19:15Z beach: Vibor: First, what I said above. You have multiple references to one and the same string. 2017-04-30T03:19:32Z beach: Vibor: Second, you are modifying literal data, which is not allowed. 2017-04-30T03:19:33Z Bike: yeah, generate ast puts out what i'd expect. 2017-04-30T03:19:53Z Bike: if you do want to put in an ast that could be done with a new special operator, i guess. 2017-04-30T03:20:13Z beach: Bike: Yeah, I am thinking of ways to do this. 2017-04-30T03:20:24Z beach: Bike: You see what I am trying to do, right? 2017-04-30T03:20:44Z beach: Vibor: You can't use :INITIAL-ELEMENT for that kind of initialization. 2017-04-30T03:20:46Z Bike: i haven't been paying enough attention to understand why, i think 2017-04-30T03:21:01Z Vibor: beach: thanks for the advice, so what would be the solution? 2017-04-30T03:21:36Z beach: Vibor: You are better off using LOOP to set the initial elements. And make sure you then copy the string so that each element gets a different string. 2017-04-30T03:22:51Z beach: Bike: It is not that important at this point. For SICL, I want to create an initial executable that does not have the compiler in it, and instead I want to load the compiler from a file. 2017-04-30T03:23:02Z Bike: right... 2017-04-30T03:23:11Z schoppenhauer quit (Ping timeout: 245 seconds) 2017-04-30T03:23:16Z beach: Bike: But since I have a lot of generic functions that need the compiler, I kind of need it from the beginning. 2017-04-30T03:23:38Z mgood7123 quit (Remote host closed the connection) 2017-04-30T03:23:45Z beach: Bike: So the idea is to have only ordinary functions in the initial executable. Any generic function should first be converted to an ordinary function. 2017-04-30T03:23:54Z Bike: yeah, i know that part. 2017-04-30T03:24:09Z beach: So, in the cross compiler, I have a generic function with its methods. 2017-04-30T03:24:31Z beach: But then it is just host executable code and that is useless for this purpose. 2017-04-30T03:24:49Z chens` quit (Remote host closed the connection) 2017-04-30T03:24:57Z beach: So I was thinking of saving the ASTs for each method and at cross-compile-time, combine them to a single ordinary function. 2017-04-30T03:24:58Z chens` joined #lisp 2017-04-30T03:25:41Z ttt72 quit (Quit: ttt72) 2017-04-30T03:25:57Z Bike: hm... well, i might get it. 2017-04-30T03:26:05Z ttt72 joined #lisp 2017-04-30T03:26:13Z beach: I need to wrap the ASTs for the individual methods in an AST for the method combination being used, and I need to wrap the resulting effective-method ASTs in an AST representing the dispatch function. 2017-04-30T03:26:32Z beach: Once I have that big AST, I can generate target code. 2017-04-30T03:27:17Z smoon quit (Quit: smoon) 2017-04-30T03:29:40Z Vibor: beach: late thanks for the second question, but thanks :) 2017-04-30T03:29:43Z Vibor quit (Quit: Lost terminal) 2017-04-30T03:33:08Z Bike: a special operator would be the obvious implementation i think 2017-04-30T03:33:20Z rumbler31 joined #lisp 2017-04-30T03:33:26Z beach: Sounds like a good idea. I'll contemplate that off-line later. 2017-04-30T03:34:03Z ttt72 quit (Quit: ttt72) 2017-04-30T03:34:27Z ttt72 joined #lisp 2017-04-30T03:34:59Z beach: I haven't figured out exactly when this translation to ordinary functions is required, but I think it may very well simplify bootstrapping, in addition to making it possible to create an initial executable without the compiler. 2017-04-30T03:37:01Z Fare: as long as you know when to invalidate those functions... 2017-04-30T03:37:10Z beach: Right. 2017-04-30T03:37:36Z rumbler31 quit (Ping timeout: 260 seconds) 2017-04-30T03:38:26Z beach: Hmm. Now I am thinking that more inlining might simplify bootstrapping as well. The main problem I have in SICL bootstrapping is that I need several versions of many functions, working on different representations of classes and instances. I can do that with first-class global environments, but it is still tricky because I need to refer to the right version in each stage. Inlining could help by making it possible for several small 2017-04-30T03:38:26Z beach: helper functions to co-exist in the same first-class global environment. 2017-04-30T03:39:00Z Draz joined #lisp 2017-04-30T03:51:24Z beach: Bike: Such a special operator would be trivial, right? 2017-04-30T03:51:42Z Bike: yeah. (defmethod convert-special (...) (second form)) 2017-04-30T03:51:48Z beach: Indeed. 2017-04-30T03:51:53Z beach: That's a very good idea. 2017-04-30T03:52:29Z l04m33 quit (Ping timeout: 240 seconds) 2017-04-30T03:53:33Z ttt72 quit (Quit: ttt72) 2017-04-30T03:54:20Z ttt72 joined #lisp 2017-04-30T03:54:42Z azzamsa quit (Read error: Connection reset by peer) 2017-04-30T03:54:48Z l04m33 joined #lisp 2017-04-30T03:55:46Z Bike: ah, there could be problems if the asts aren't sufficiently self-contained, though. like something referring to an outer block. 2017-04-30T03:55:49Z mgood7123 joined #lisp 2017-04-30T03:56:17Z beach: Sure. But this is bootstrapping, so we have complete control over such things. 2017-04-30T03:58:39Z ttt72 quit (Client Quit) 2017-04-30T03:59:01Z ttt72 joined #lisp 2017-04-30T04:03:35Z brendyn quit (Ping timeout: 255 seconds) 2017-04-30T04:07:09Z brendyn joined #lisp 2017-04-30T04:12:14Z brendyn quit (Ping timeout: 252 seconds) 2017-04-30T04:14:21Z shaftoe quit (Quit: WeeChat 1.6) 2017-04-30T04:15:04Z l04m33 quit (Remote host closed the connection) 2017-04-30T04:15:27Z shaftoe joined #lisp 2017-04-30T04:15:27Z l04m33 joined #lisp 2017-04-30T04:16:01Z hvxgr quit (Ping timeout: 240 seconds) 2017-04-30T04:20:29Z ttt72 quit (Quit: ttt72) 2017-04-30T04:20:52Z ttt72 joined #lisp 2017-04-30T04:25:55Z impulse joined #lisp 2017-04-30T04:30:10Z beach: The picture is getting clearer. The initial executable needs a single first-class global environment, but if necessary, the accessor functions could ordinary functions, converted from the generic function code. It also needs a FASL loader. 2017-04-30T04:30:16Z hexfive joined #lisp 2017-04-30T04:33:00Z beach: could BE ordinary functions 2017-04-30T04:34:27Z kamog joined #lisp 2017-04-30T04:34:40Z hvxgr joined #lisp 2017-04-30T04:35:54Z edgar-rft quit (Quit: edgar-rft) 2017-04-30T04:40:36Z mgood7123 quit (Ping timeout: 260 seconds) 2017-04-30T04:41:45Z ttt72 quit (Quit: ttt72) 2017-04-30T04:42:10Z ttt72 joined #lisp 2017-04-30T04:42:16Z Bock is now known as Sauvin 2017-04-30T04:44:42Z mgood7123 joined #lisp 2017-04-30T04:46:40Z Fare quit (Ping timeout: 260 seconds) 2017-04-30T04:48:12Z ttt72 quit (Quit: ttt72) 2017-04-30T04:48:34Z ttt72 joined #lisp 2017-04-30T04:57:45Z mgood7123 quit (Remote host closed the connection) 2017-04-30T04:58:15Z schoppenhauer joined #lisp 2017-04-30T04:59:53Z mgood7123 joined #lisp 2017-04-30T05:02:54Z ttt72 quit (Quit: ttt72) 2017-04-30T05:03:17Z ttt72 joined #lisp 2017-04-30T05:10:10Z l04m33 quit (Ping timeout: 240 seconds) 2017-04-30T05:16:38Z l04m33 joined #lisp 2017-04-30T05:16:55Z teggi joined #lisp 2017-04-30T05:16:56Z ttt72 quit (Ping timeout: 255 seconds) 2017-04-30T05:28:38Z mgood7123 quit (Ping timeout: 255 seconds) 2017-04-30T05:28:52Z FreeBirdLjj quit (Remote host closed the connection) 2017-04-30T05:29:10Z FreeBirdLjj joined #lisp 2017-04-30T05:34:42Z safe joined #lisp 2017-04-30T05:43:06Z ebrasca quit (Remote host closed the connection) 2017-04-30T05:43:33Z p9s joined #lisp 2017-04-30T05:45:33Z EvW joined #lisp 2017-04-30T05:47:41Z ttt72 joined #lisp 2017-04-30T05:53:15Z FreeBirdLjj quit (Remote host closed the connection) 2017-04-30T05:55:08Z mgood7123 joined #lisp 2017-04-30T05:56:40Z l04m33 quit (Ping timeout: 260 seconds) 2017-04-30T05:56:40Z EvW quit (Ping timeout: 240 seconds) 2017-04-30T05:57:30Z l04m33 joined #lisp 2017-04-30T06:01:35Z p9s quit (Remote host closed the connection) 2017-04-30T06:02:08Z p9s joined #lisp 2017-04-30T06:06:29Z p9s quit (Ping timeout: 240 seconds) 2017-04-30T06:07:57Z mgood7123 quit (Remote host closed the connection) 2017-04-30T06:10:40Z p9s joined #lisp 2017-04-30T06:11:04Z thinkpad joined #lisp 2017-04-30T06:17:16Z ttt72 quit (Quit: ttt72) 2017-04-30T06:17:23Z gingerale joined #lisp 2017-04-30T06:17:39Z ttt72 joined #lisp 2017-04-30T06:19:57Z p9s quit (Ping timeout: 240 seconds) 2017-04-30T06:25:46Z haz joined #lisp 2017-04-30T06:31:29Z megalography quit (Quit: Leaving.) 2017-04-30T06:31:44Z megalography joined #lisp 2017-04-30T06:32:29Z manualcrank quit (Quit: WeeChat 1.7.1) 2017-04-30T06:35:52Z emaczen quit (Ping timeout: 260 seconds) 2017-04-30T06:35:58Z angavrilov joined #lisp 2017-04-30T06:37:29Z ttt72 quit (Quit: ttt72) 2017-04-30T06:37:53Z ttt72 joined #lisp 2017-04-30T06:45:21Z ttt72 quit (Quit: ttt72) 2017-04-30T06:45:46Z ttt72 joined #lisp 2017-04-30T06:48:56Z jasom quit (Ping timeout: 260 seconds) 2017-04-30T06:52:00Z vlatkoB joined #lisp 2017-04-30T06:58:59Z jasom joined #lisp 2017-04-30T07:03:50Z ttt72 quit (Quit: ttt72) 2017-04-30T07:04:14Z ttt72 joined #lisp 2017-04-30T07:10:03Z pyx joined #lisp 2017-04-30T07:10:11Z pyx quit (Client Quit) 2017-04-30T07:12:42Z Dotcra quit (Ping timeout: 260 seconds) 2017-04-30T07:13:16Z ttt72 quit (Quit: ttt72) 2017-04-30T07:13:23Z vlatkoB_ joined #lisp 2017-04-30T07:13:40Z ttt72 joined #lisp 2017-04-30T07:17:16Z vlatkoB quit (Ping timeout: 246 seconds) 2017-04-30T07:19:09Z text1 joined #lisp 2017-04-30T07:20:10Z nowhereman quit (Ping timeout: 240 seconds) 2017-04-30T07:21:19Z text1 quit (Remote host closed the connection) 2017-04-30T07:21:27Z safe quit (Ping timeout: 240 seconds) 2017-04-30T07:24:21Z Guest34561 joined #lisp 2017-04-30T07:26:11Z Guest34561 quit (Client Quit) 2017-04-30T07:26:35Z pjb joined #lisp 2017-04-30T07:28:27Z ttt72 quit (Quit: ttt72) 2017-04-30T07:28:48Z mishoo joined #lisp 2017-04-30T07:28:49Z ttt72 joined #lisp 2017-04-30T07:40:17Z beach: I removed two tasks from the Lisp Guild (because I already accomplished them), and added a new one for the GF font viewer: https://github.com/Lisp-Guild/lisp-todo/projects/1 2017-04-30T07:40:59Z ttt72 quit (Quit: ttt72) 2017-04-30T07:41:24Z ttt72 joined #lisp 2017-04-30T07:42:11Z Draz quit (Ping timeout: 268 seconds) 2017-04-30T07:42:42Z NeverDie_ joined #lisp 2017-04-30T07:42:57Z practica` quit (Ping timeout: 240 seconds) 2017-04-30T07:43:40Z practica` joined #lisp 2017-04-30T07:45:53Z NeverDie quit (Ping timeout: 268 seconds) 2017-04-30T07:46:39Z loke___ joined #lisp 2017-04-30T07:47:14Z Draz joined #lisp 2017-04-30T07:53:00Z Bike quit (Quit: leaving) 2017-04-30T07:55:28Z ttt72 quit (Quit: ttt72) 2017-04-30T07:55:51Z ttt72 joined #lisp 2017-04-30T07:57:57Z thinkpad quit (Ping timeout: 240 seconds) 2017-04-30T07:58:51Z lerax quit (Read error: Connection reset by peer) 2017-04-30T07:59:17Z lerax joined #lisp 2017-04-30T08:00:58Z thinkpad joined #lisp 2017-04-30T08:01:28Z _main_ joined #lisp 2017-04-30T08:01:50Z _main_ quit (Read error: Connection reset by peer) 2017-04-30T08:02:33Z _main_ joined #lisp 2017-04-30T08:03:01Z drot joined #lisp 2017-04-30T08:03:43Z _main_ quit (Read error: Connection reset by peer) 2017-04-30T08:04:20Z __main__ quit (Ping timeout: 252 seconds) 2017-04-30T08:04:32Z _main_ joined #lisp 2017-04-30T08:05:01Z beach: I would prefer that the Lisp Guild task list not turn into my personal to-do list, so if anyone else wants to post some tasks (they have to be relatively simple and well-defined) I would be happy to see whether I could work on some of those tasks. 2017-04-30T08:06:39Z space_otter quit (Remote host closed the connection) 2017-04-30T08:08:09Z _main_ is now known as __main__ 2017-04-30T08:08:40Z ttt72 quit (Quit: ttt72) 2017-04-30T08:09:03Z ttt72 joined #lisp 2017-04-30T08:11:08Z Fare joined #lisp 2017-04-30T08:11:09Z ttt72 quit (Client Quit) 2017-04-30T08:11:56Z emaczen joined #lisp 2017-04-30T08:16:40Z emaczen quit (Ping timeout: 260 seconds) 2017-04-30T08:16:54Z loke___ quit (Ping timeout: 258 seconds) 2017-04-30T08:23:12Z practica` quit (Ping timeout: 260 seconds) 2017-04-30T08:23:39Z practica` joined #lisp 2017-04-30T08:26:28Z drot quit (Quit: WeeChat 1.7.1) 2017-04-30T08:27:16Z DeadTrickster joined #lisp 2017-04-30T08:28:38Z stardiviner joined #lisp 2017-04-30T08:30:04Z jack_rabbit quit (Ping timeout: 246 seconds) 2017-04-30T08:30:16Z drot joined #lisp 2017-04-30T08:30:48Z milanj joined #lisp 2017-04-30T08:30:50Z brendyn joined #lisp 2017-04-30T08:32:19Z neoncontrails quit (Remote host closed the connection) 2017-04-30T08:34:46Z Karl_Dscc joined #lisp 2017-04-30T08:36:16Z gigetoo quit (Read error: Connection reset by peer) 2017-04-30T08:36:25Z ghard joined #lisp 2017-04-30T08:36:39Z gigetoo joined #lisp 2017-04-30T08:37:28Z drot quit (Quit: WeeChat 1.7.1) 2017-04-30T08:39:00Z drot joined #lisp 2017-04-30T08:39:10Z Fare quit (Ping timeout: 246 seconds) 2017-04-30T08:41:12Z pjstirling joined #lisp 2017-04-30T08:41:40Z Draz quit (Quit: Leaving) 2017-04-30T08:43:46Z pjstirling: has anyone else noticed that slime appears to bind *gensym-counter* to 0 when using C-c C-c? 2017-04-30T08:44:13Z pjstirling: cos I want to neuter that! 2017-04-30T08:49:17Z NeverDie_ is now known as NeverDie 2017-04-30T08:49:37Z shka joined #lisp 2017-04-30T08:54:57Z defaultxr quit (Ping timeout: 268 seconds) 2017-04-30T09:02:33Z shrdlu68 joined #lisp 2017-04-30T09:05:27Z haz quit (Ping timeout: 240 seconds) 2017-04-30T09:06:30Z smoon joined #lisp 2017-04-30T09:08:26Z varjag joined #lisp 2017-04-30T09:09:50Z mishoo quit (Read error: Connection reset by peer) 2017-04-30T09:10:14Z mishoo joined #lisp 2017-04-30T09:11:33Z kamog quit (Remote host closed the connection) 2017-04-30T09:12:22Z holycow quit (Quit: Lost terminal) 2017-04-30T09:17:27Z mishoo_ joined #lisp 2017-04-30T09:18:59Z mishoo quit (Ping timeout: 240 seconds) 2017-04-30T09:19:08Z nirved joined #lisp 2017-04-30T09:22:13Z barton_ joined #lisp 2017-04-30T09:28:02Z mishoo_ quit (Ping timeout: 260 seconds) 2017-04-30T09:32:20Z p9s joined #lisp 2017-04-30T09:40:52Z prole joined #lisp 2017-04-30T09:55:44Z arbv joined #lisp 2017-04-30T10:00:03Z emaczen joined #lisp 2017-04-30T10:02:02Z DeadTrickster quit (Ping timeout: 252 seconds) 2017-04-30T10:16:50Z mishoo joined #lisp 2017-04-30T10:20:50Z loke___ joined #lisp 2017-04-30T10:22:41Z p9s_ joined #lisp 2017-04-30T10:23:32Z X-Scale joined #lisp 2017-04-30T10:26:24Z p9s quit (Ping timeout: 260 seconds) 2017-04-30T10:27:16Z [X-Scale] joined #lisp 2017-04-30T10:27:39Z X-Scale quit (Ping timeout: 240 seconds) 2017-04-30T10:27:39Z [X-Scale] is now known as X-Scale 2017-04-30T10:29:50Z knobo quit (Remote host closed the connection) 2017-04-30T10:32:59Z thijso quit (Ping timeout: 240 seconds) 2017-04-30T10:33:29Z brandonz quit (Remote host closed the connection) 2017-04-30T10:33:31Z cyberlard quit (Read error: Connection reset by peer) 2017-04-30T10:33:59Z shrdlu68 quit (Ping timeout: 240 seconds) 2017-04-30T10:36:52Z thijso joined #lisp 2017-04-30T10:37:15Z [X-Scale] joined #lisp 2017-04-30T10:37:28Z X-Scale quit (Ping timeout: 240 seconds) 2017-04-30T10:37:29Z [X-Scale] is now known as X-Scale 2017-04-30T10:44:45Z raynold joined #lisp 2017-04-30T10:45:23Z andrew_deane_ joined #lisp 2017-04-30T10:52:37Z smoon quit (Quit: smoon) 2017-04-30T11:00:34Z otjura joined #lisp 2017-04-30T11:03:36Z otjura: what does it mean if symbol changes color in Emacs SLIME when re-indenting something? 2017-04-30T11:04:04Z otjura: from white to brown in wombat color scheme in this case 2017-04-30T11:08:01Z _paul0 joined #lisp 2017-04-30T11:10:27Z [X-Scale] joined #lisp 2017-04-30T11:11:37Z paul0 quit (Ping timeout: 255 seconds) 2017-04-30T11:11:45Z EvW joined #lisp 2017-04-30T11:12:36Z X-Scale quit (Ping timeout: 260 seconds) 2017-04-30T11:12:40Z [X-Scale] is now known as X-Scale 2017-04-30T11:13:41Z shifty joined #lisp 2017-04-30T11:15:22Z andrew_deane_ quit (Ping timeout: 260 seconds) 2017-04-30T11:19:53Z andrew_deane_ joined #lisp 2017-04-30T11:26:59Z loke___: otjura: Which symbol? 2017-04-30T11:27:04Z pve joined #lisp 2017-04-30T11:27:33Z loke___: The only time any aymbol changes colour for me is that it turns red when it's badly positioned. 2017-04-30T11:28:30Z axion: otjura: That happens when slime thinks the red symbol should be on a new line 2017-04-30T11:28:55Z axion: oh i missed loke___'s answer 2017-04-30T11:29:12Z loke___: axion: Yours was better anyway. More clear :-) 2017-04-30T11:31:29Z axion: I'm trying to refactor this math algorithm...I came a long way, but still needs some more math-y people to look at. I'm sure it can be made more concise, but I'm growing tired :/ 2017-04-30T11:31:48Z DeadTrickster joined #lisp 2017-04-30T11:34:06Z loke___: Helo DeadTrickster 2017-04-30T11:34:56Z DeadTrickster: hi 2017-04-30T11:35:02Z axion: If nayone wants to try helping, otherwise, no worries...I'm moving on: http://paste.lisp.org/display/345517 2017-04-30T11:35:55Z DeadTrickster: loke___, anything specific or just wanted to say hi? :-) 2017-04-30T11:36:07Z loke___: Just wanted to say hello 2017-04-30T11:38:26Z phoe: hey 2017-04-30T11:43:04Z DeadTrickster: yeah, unfortunately not that active here anymore :-(. spending most of time writing erlang and c 2017-04-30T11:47:19Z EvW quit (Ping timeout: 240 seconds) 2017-04-30T11:48:24Z EvW1 joined #lisp 2017-04-30T11:48:53Z stardiviner quit (Ping timeout: 255 seconds) 2017-04-30T11:50:13Z stardiviner joined #lisp 2017-04-30T11:53:52Z macdavid313 joined #lisp 2017-04-30T11:56:24Z edgar-rft joined #lisp 2017-04-30T12:00:10Z rpg joined #lisp 2017-04-30T12:05:11Z rpg quit (Quit: My MacBook has gone to sleep. ZZZzzz…) 2017-04-30T12:13:40Z hexfive quit (Ping timeout: 240 seconds) 2017-04-30T12:14:46Z sveit quit (Ping timeout: 246 seconds) 2017-04-30T12:17:06Z ttt72 joined #lisp 2017-04-30T12:17:29Z No_Other_Names joined #lisp 2017-04-30T12:20:42Z sveit joined #lisp 2017-04-30T12:20:55Z stardiviner quit (Ping timeout: 268 seconds) 2017-04-30T12:22:19Z emerson quit (Read error: Connection reset by peer) 2017-04-30T12:26:00Z No_Other_Names quit (Remote host closed the connection) 2017-04-30T12:26:08Z troydm joined #lisp 2017-04-30T12:28:56Z MONODA quit (Ping timeout: 268 seconds) 2017-04-30T12:29:04Z p_l quit (Remote host closed the connection) 2017-04-30T12:29:05Z ggherdov quit (Remote host closed the connection) 2017-04-30T12:32:11Z nirved is now known as nirved_afk 2017-04-30T12:33:44Z Beetny quit (Ping timeout: 258 seconds) 2017-04-30T12:34:07Z stardiviner joined #lisp 2017-04-30T12:34:23Z azzamsa joined #lisp 2017-04-30T12:34:24Z rumbler31 joined #lisp 2017-04-30T12:37:59Z krator44: i'm using bullet physics for quaternions 2017-04-30T12:38:36Z rumbler31 quit (Ping timeout: 245 seconds) 2017-04-30T12:39:28Z krator44: i dont think.. i don't think anyone really *understands* quaternions 2017-04-30T12:41:18Z ggherdov joined #lisp 2017-04-30T12:43:04Z ttt72 quit (Quit: ttt72) 2017-04-30T12:43:27Z thinkpad quit (Ping timeout: 260 seconds) 2017-04-30T12:43:27Z ttt72 joined #lisp 2017-04-30T12:44:21Z stardiviner quit (Ping timeout: 268 seconds) 2017-04-30T12:45:40Z presiden quit (Quit: (bye)) 2017-04-30T12:45:52Z thinkpad joined #lisp 2017-04-30T12:46:37Z stardiviner joined #lisp 2017-04-30T12:50:58Z EvW1 quit (Ping timeout: 240 seconds) 2017-04-30T12:51:48Z p_l joined #lisp 2017-04-30T12:52:10Z LiamH joined #lisp 2017-04-30T12:55:19Z shrdlu68 joined #lisp 2017-04-30T12:57:40Z stardiviner quit (Ping timeout: 240 seconds) 2017-04-30T12:58:10Z axion: I have been reading my books about them for a couple years, so I have a pretty good grasp 2017-04-30T12:59:52Z rk[ghost]: what is functioin to fold in CL? 2017-04-30T13:00:07Z axion: reduce 2017-04-30T13:00:18Z francogrex joined #lisp 2017-04-30T13:01:10Z francogrex: hi I've been googling trying to find a comprehensive example/tutorial on how to use cffi or the sbcl groveller, couldn't find anything complete. does anyone have a link to such an example please? 2017-04-30T13:01:23Z stardiviner joined #lisp 2017-04-30T13:02:53Z beach strongly recommends that people program in Common Lisp rather than in some lesser language. 2017-04-30T13:03:09Z EvW joined #lisp 2017-04-30T13:05:03Z loke___: francogrex: I don't know. I used the normal CFFI manual. 2017-04-30T13:05:47Z axion: As much as I have been using CL exclusively for over a decade, I think it's a bit harsh to call other language inferior when they may in fact be more suited to a particular task at hand. 2017-04-30T13:06:01Z ttt72 quit (Quit: ttt72) 2017-04-30T13:06:21Z beach: axion: Maybe so. But this channel is dedicated to Common Lisp after all. 2017-04-30T13:06:24Z ttt72 joined #lisp 2017-04-30T13:08:52Z phoe: beach: Maybe so. But CFFI and its groveller are Common Lisp interfaces after all. 2017-04-30T13:09:17Z phoe: francogrex: https://common-lisp.net/project/cffi/manual/html_node/Tutorial.html ? 2017-04-30T13:09:51Z ttt72 quit (Client Quit) 2017-04-30T13:10:14Z beach: phoe: It just makes me very sad to observe that we have this a priori safe language, and then a significant amount of energy is spent turning into a language that is just as unsafe as C or C++. 2017-04-30T13:10:15Z ttt72 joined #lisp 2017-04-30T13:11:40Z stardiviner quit (Ping timeout: 240 seconds) 2017-04-30T13:11:47Z beach: phoe: I understand the argument that there might be libraries out there that are written in other languages and that do not exist in Common Lisp. But then, it would seem a better fit to start a project for writing something similar in Common Lisp, so that everyone who wants to use Common Lisp could benefit. 2017-04-30T13:12:06Z andrew_deane_ quit (Ping timeout: 268 seconds) 2017-04-30T13:12:08Z stardiviner joined #lisp 2017-04-30T13:12:22Z beach: phoe: But I realize that I am unusual in this respect. Just saying. 2017-04-30T13:13:32Z shrdlu68: I've added OCSP support to cl-tls. I'm wondering whether CRL support would be worthwhile. 2017-04-30T13:18:10Z megalography quit (Quit: Leaving.) 2017-04-30T13:18:15Z megalography1 joined #lisp 2017-04-30T13:19:13Z oleo quit (Quit: Verlassend) 2017-04-30T13:24:46Z rk[ghost]: (reduce #'and '(T T T T)) ... throws an error.. 'COMMON-LISP:and undefined', yet i can type (common-lisp:and 'T 'T) without trouble 2017-04-30T13:24:51Z rk[ghost]: ? 2017-04-30T13:24:55Z phoe: rk[ghost]: AND is a macro. 2017-04-30T13:25:02Z beach: rk[ghost]: You can only use functions with REDUCE. 2017-04-30T13:25:07Z phoe: rk[ghost]: you want to use EVERY. 2017-04-30T13:25:07Z rk[ghost]: doh. 2017-04-30T13:25:09Z phoe: clhs every 2017-04-30T13:25:09Z specbot: http://www.lispworks.com/reference/HyperSpec/Body/f_everyc.htm 2017-04-30T13:25:13Z rk[ghost]: aye aye. 2017-04-30T13:25:18Z rk[ghost]: macros, ha. 2017-04-30T13:27:10Z trocado joined #lisp 2017-04-30T13:28:18Z phoe: beach: I understand and value your point of view, it's pretty congruent of mine. But then again, my definition of respect (note: it's my own personal definition and by no means I consider it the only and/or authoritative one) is about answering a question as precisely as I can, and only after the facts is where I can add my personal opinions. 2017-04-30T13:29:49Z rk[ghost]: so use every with some is-true? function? 2017-04-30T13:30:23Z White_Flame: rk[ghost]: the reason AND is a macro is to do short-circuiting of the parameters. If it were a function, it would have to evaluate each parameter before performing the AND 2017-04-30T13:30:24Z ttt72 quit (Quit: ttt72) 2017-04-30T13:30:49Z rk[ghost]: White_Flame: make sense, and i was expecting the reduce to work with that 2017-04-30T13:31:03Z beach: phoe: Oh, I agree. I think that whenever I know the answer to a question, and I happen to have time to answer it, I do. 2017-04-30T13:31:08Z ttt72 joined #lisp 2017-04-30T13:31:11Z phoe: If someone needs a CFFI tutorial, I'm trying to link them a CFFI tutorial first and foremost. I assume they have a reason to look for it. 2017-04-30T13:31:33Z rk[ghost]: hoping that the reduce would return and not call itself anymore if a NIL occurs 2017-04-30T13:31:52Z phoe: rk[ghost]: not really. 2017-04-30T13:31:55Z phoe: REDUCE is a function. 2017-04-30T13:32:02Z phoe: it needs to evaluate all of its arguments anyway. 2017-04-30T13:32:07Z beach: rk[ghost]: Typically, you don't need any is-true function, because Common Lisp has the concept of generalized Boolean. 2017-04-30T13:32:07Z rk[ghost]: aye aye 2017-04-30T13:32:14Z rk[ghost]: right. 2017-04-30T13:32:40Z phoe: haha, you only need an is-false function, and you have that by #'NOT. 2017-04-30T13:32:48Z rk[ghost]: just eventually getting a list of some values and i want to find out if any reported nil 2017-04-30T13:32:51Z rk[ghost]: aye 2017-04-30T13:32:58Z phoe: rk[ghost]: 2017-04-30T13:32:59Z phoe: clhs some 2017-04-30T13:32:59Z specbot: http://www.lispworks.com/reference/HyperSpec/Body/f_everyc.htm 2017-04-30T13:33:05Z phoe: (some #'null ...) 2017-04-30T13:33:08Z Sigyn quit (Ping timeout: 1200 seconds) 2017-04-30T13:33:54Z rk[ghost]: aye aye.. strange way to go about it.. but it'll do.. thanks! 2017-04-30T13:33:56Z shrdlu68: (every #'identity your-list) 2017-04-30T13:34:00Z beach: phoe: I hope I didn't come across as disapproving of your answering questions that you do know the answer to. I certainly don't. 2017-04-30T13:34:06Z Fare joined #lisp 2017-04-30T13:34:12Z phoe: beach: you didn't come across as such. 2017-04-30T13:34:23Z beach: Whew! 2017-04-30T13:34:26Z phoe: :P 2017-04-30T13:34:35Z phoe: I just think we have different methods of acting in such situations. 2017-04-30T13:34:58Z beach: I don't think so. The only difference in this case is that you know the answer and I don't. 2017-04-30T13:35:24Z shrdlu68: rk[ghost]: You might be interested in alexandria:when-let 2017-04-30T13:36:21Z ttt72 quit (Quit: ttt72) 2017-04-30T13:36:22Z phoe: I see a difference though - I wouldn't make the "strongly recommends" remark in that spot. 2017-04-30T13:36:33Z beach: Granted. 2017-04-30T13:36:41Z rk[ghost]: so i accepted (notany #'null *list*) 2017-04-30T13:36:43Z ttt72 joined #lisp 2017-04-30T13:37:17Z rk[ghost]: althought reducing seemed like it would be some fun.. 2017-04-30T13:37:21Z beach: phoe: But I am allowed to say what I think, still, right? 2017-04-30T13:37:53Z phoe: beach: of course you are! It's just that, if I was looking for XYZ tutorials, I'd find it somewhat rude if I was pointed towards ABC *instead*. 2017-04-30T13:39:15Z phoe: It's more complicated - I get your point about writing in Lisp, I consider it right and properly supported, but something - I don't know what exactly - didn't seem right about that situation. 2017-04-30T13:39:19Z beach: phoe: My remark was certainly not an exercise in being as polite as possible. It was more like an expression of distress. 2017-04-30T13:39:26Z phoe: I need to think a bit more about it. 2017-04-30T13:39:26Z stardiviner quit (Ping timeout: 260 seconds) 2017-04-30T13:40:24Z phoe: beach: I see. I'll reply to it in a few minutes - BRB. 2017-04-30T13:50:08Z phoe: beach: I don't really think Common Lisp is in distress. It's an useful, alive language, despite being rather niche nowadays. 2017-04-30T13:50:14Z beach: No, I am. 2017-04-30T13:50:26Z phoe: Oh? What do you mean? 2017-04-30T13:50:45Z beach: phoe: The message I get is that people think that Common Lisp is insufficient because it lacks essential libraries, but also that there is very little work being done to fix the problem. That's the basis of my distress. 2017-04-30T13:51:02Z beach: Not that I share this opinion of course. 2017-04-30T13:51:21Z pjb: So basically you're distressed because people are dumb. 2017-04-30T13:51:31Z phoe: beach: I see. Let me think about it for a moment. 2017-04-30T13:51:55Z beach: pjb: I definitely do not think people are dumb. 2017-04-30T13:52:19Z pjb: Well, most of them ar. 2017-04-30T13:52:20Z pjb: e 2017-04-30T13:53:07Z beach: pjb: Well, #lisp is not representative in this respect. 2017-04-30T13:53:17Z pjb: Of course. Hence the high level of distress here. 2017-04-30T13:53:24Z beach: Heh. 2017-04-30T13:54:14Z phoe: So, summing up: CL is insufficient, because it lacks librarires, because there's little work being done on it. 2017-04-30T13:54:32Z phoe: So, to aid this, it would be necessary to have more work done on Common Lisp. 2017-04-30T13:54:38Z phoe: That's what I understand so far. 2017-04-30T13:54:46Z pjb: Which is false. People saying that didn't make the effort to get good information about CL. 2017-04-30T13:55:13Z beach: phoe: Close enough. 2017-04-30T13:55:25Z rk[ghost]: I am having trouble apply map of a function with 2 parameters, one which is fixed and the other which traverses a list. does such map??? function exist in CL? 2017-04-30T13:55:36Z phoe: rk[ghost]: you want CURRY. 2017-04-30T13:56:01Z beach: rk[ghost]: (mapcar (lambda (x) (func const x)) list) 2017-04-30T13:56:20Z azzamsa quit (Ping timeout: 252 seconds) 2017-04-30T13:56:46Z phoe: ALEXANDRIA:CURRY or ALEXANDRIA:RCURRY, to be precise. 2017-04-30T13:56:55Z ttt72 quit (Quit: ttt72) 2017-04-30T13:57:20Z ttt72 joined #lisp 2017-04-30T13:57:29Z phoe: What beach just said works, too. It is equivalent to (mapcar (curry #'func const) list). 2017-04-30T13:57:42Z rk[ghost]: well, i think beach's answer is what my head was trying to wrap around 2017-04-30T13:57:49Z rk[ghost]: lemme test er out 2017-04-30T13:57:49Z rk[ghost]: thanks to both of ye 2017-04-30T13:58:02Z beach: phoe: Notice that I myself didn't say that Common Lisp is insufficient. And, judging from what pjb says, people who think that exaggerate. 2017-04-30T13:58:16Z phoe: beach: yes, I got that. 2017-04-30T13:59:03Z beach: phoe: I had just assumed that people decide to work in domains for which Common Lisp is insufficient. I myself have decided to do work in Common Lisp. 2017-04-30T13:59:32Z azzamsa joined #lisp 2017-04-30T13:59:54Z rk[ghost]: OK. that makes sense in order to properly curry the variable through, i need to first create a function which takes that environmenment and a single argument which i can create on the fly with lambda 2017-04-30T13:59:58Z rk[ghost]: roger roger. 2017-04-30T14:00:23Z phoe: So, using logical contraposition: if more work is done on COmmon Lisp, then it will not lack essential libraries, and then people won't think Common Lisp is insufficient. 2017-04-30T14:00:38Z beach: phoe: Sounds right. 2017-04-30T14:00:44Z phoe: (p => q => r <=> ~r => ~q => ~p) 2017-04-30T14:01:10Z phoe: beach: I seriously doubt that more libraries alone will convince people that CL is "sufficient", whatever "sufficient" means for them. 2017-04-30T14:01:25Z rk[ghost]: libraries are good, but understanding how to implement a curry function through lambda at the moment is good for my personal fundamentals about thinking lispy 2017-04-30T14:01:38Z beach: phoe: Oh, it won't convince anyone who is not already a Common Lisp user. 2017-04-30T14:01:59Z beach: phoe: I am restricting my opinions to people who already hang out here in #lisp. 2017-04-30T14:02:05Z EvW quit (Ping timeout: 255 seconds) 2017-04-30T14:02:12Z phoe: beach: I see. 2017-04-30T14:02:46Z phoe: You didn't say that before - it's pretty important to understand what you mean, now that I look at it. 2017-04-30T14:03:13Z beach: Yes, implicit assumption. Sorry. 2017-04-30T14:03:24Z shrdlu68 quit (Ping timeout: 260 seconds) 2017-04-30T14:03:39Z phoe: No problem. 2017-04-30T14:04:05Z ttt72 quit (Quit: ttt72) 2017-04-30T14:05:17Z phoe: In this case, I think that your statement holds rather well. 2017-04-30T14:05:33Z beach: Thanks. 2017-04-30T14:05:51Z phoe: It's not about thanking or not thanking - I'm just stating my opinion. 2017-04-30T14:06:56Z beach: Still, it is somewhat comforting to know that my opinions are not seen as totally off by everyone. 2017-04-30T14:08:15Z phoe: We, as in, the community, might benefit from a way of organizing work on these libraries. I've started such a thing with the Lisp Guild. 2017-04-30T14:09:36Z phoe: Of course, we're limited by the total workpower of people who might be willing and able to do such work, but I think that there's some of it that's simply "hidden" in the general lack of organization and could therefore be found. 2017-04-30T14:10:06Z beach: phoe: I definitely agree with the first part. I am not sure the Lisp Guild is good for such an overall organization. It might be part of the solution, but more is needed. Especially, more manpower. 2017-04-30T14:10:19Z phoe: Ayup - and manpower does not come from naught. 2017-04-30T14:10:28Z phoe: The Guild is just a kanban board. 2017-04-30T14:10:45Z phoe: It takes much more organization and funds to get it going and rolling. 2017-04-30T14:10:53Z beach: phoe: Oh, if you could find some magic technical solution, then that would be fantastic. 2017-04-30T14:11:11Z phoe: beach: We could write a Lisp-writing AI. 2017-04-30T14:11:22Z phoe: I think that's as magic technical as it can get. 2017-04-30T14:11:37Z p_l: ... XTUTOR comes to mind? 2017-04-30T14:11:51Z phoe: p_l: ? 2017-04-30T14:11:56Z wildlander joined #lisp 2017-04-30T14:12:00Z phoe: http://xtutor.github.io/ ? 2017-04-30T14:12:37Z p_l: or what was its name that run in some old Emacs and was simplified "automatic programmer" to look over your code as you worked, and generally be a somewhat simplistic assistant? 2017-04-30T14:12:56Z p_l: phoe: no, an old research project named xtutor 2017-04-30T14:13:10Z beach: programmer's assistant? 2017-04-30T14:13:34Z phoe: p_l: obligatory http://i.imgur.com/4At18TO.png 2017-04-30T14:13:52Z p_l: btw, anyone can point me to some resources (other than giving in and finally getting ACM/IEEE membership or whatever) regarding compiling down? The stuff that was used for the old Lisp robots (and Roomba) etc.? 2017-04-30T14:14:09Z p_l: beach: I think it had some fancier name 2017-04-30T14:14:14Z djuber joined #lisp 2017-04-30T14:14:14Z p_l: but yea 2017-04-30T14:14:31Z pjb: p_l: coursera and others mooc currently have some interesting robotics courses. 2017-04-30T14:15:00Z pjb: I don't think roomba uses anything more clever than what's taught there. 2017-04-30T14:15:13Z pjb: Then there's of course AIMA and PAIP. 2017-04-30T14:15:29Z p_l: pjb: most robotics courses these day are either about actual control law issues (useful) and Python or similar running on stupidly powerful hw to turn the GPIOs on/off 2017-04-30T14:15:54Z p_l: I'm looking more towards the "downcompile from this big environment to the small MCU" 2017-04-30T14:15:59Z shrdlu68 joined #lisp 2017-04-30T14:16:29Z p_l: maybe not smaller than the stuff I learned robotics on in 2010? but small 2017-04-30T14:16:33Z pjb: p_l: then having a look at GOAL may be instructive. It's the same kind of process. 2017-04-30T14:17:21Z phoe: beach: let me summarize again: the issue you highlight is manpower, the issue I hightlight is organization. 2017-04-30T14:18:10Z beach: phoe: Both are needed, and if you can find some organizational thing that can make it easier for people to get involved, then more power to you. 2017-04-30T14:18:39Z beach: phoe: I'll be happy to contemplate it off-line as well. 2017-04-30T14:18:44Z zymurgy quit (Remote host closed the connection) 2017-04-30T14:18:49Z rk[ghost]: wahoo! the curry jazz with lambda worked as my head interpreter expected:) 2017-04-30T14:18:56Z phoe: Sounds pretty valid to me. 2017-04-30T14:19:09Z rk[ghost]: only took a few hours;P 2017-04-30T14:19:19Z pjb: p_l: http://all-things-andy-gavin.com/2011/03/12/making-crash-bandicoot-gool-part-9/ 2017-04-30T14:19:47Z p_l: pjb: yep, I know of it, though would like if they gave some more details on implementation 2017-04-30T14:20:08Z mishoo quit (Ping timeout: 240 seconds) 2017-04-30T14:20:08Z phoe: beach: I will contemplate it, too. 2017-04-30T14:20:13Z splittist: Do people really come to #lisp hoping to become part of parenthesised mechanical turk? 2017-04-30T14:20:26Z peccu1 quit (Remote host closed the connection) 2017-04-30T14:20:44Z phoe: splittist: mechanical turk? 2017-04-30T14:20:47Z beach: splittist: No, I don't think there is any desire like that. 2017-04-30T14:20:54Z mishoo joined #lisp 2017-04-30T14:20:55Z p_l: specifically, code generation 2017-04-30T14:22:27Z francogrex: github was good for code search now its scope and usefulness became limited after someone for some shitty reason decided to limit it. 2017-04-30T14:22:29Z ryanbw quit (Ping timeout: 260 seconds) 2017-04-30T14:22:37Z pjb: I don't know of anything describing specific code generation for this precise domain. You'd just take the general compiling code generation chapters, and apply it to the specific domain. 2017-04-30T14:23:16Z beach: phoe: https://en.wikipedia.org/wiki/Amazon_Mechanical_Turk 2017-04-30T14:23:21Z francogrex: google code search is discontinued... what search engines you use? 2017-04-30T14:23:41Z pjb: Since the distance between the runable code and the high level description in this domain may be greater than with normal programming language compilers, I think I would start by writing down the templates of generated code, and see how it's parameterized by the semantics provided by the source. 2017-04-30T14:23:45Z phoe: beach: splittist: huh. 2017-04-30T14:23:52Z p_l: pjb: well, I was looking generally for code to read :) 2017-04-30T14:23:54Z pjb: francogrex: http://qwant.com 2017-04-30T14:23:57Z shifty quit (Ping timeout: 240 seconds) 2017-04-30T14:24:01Z pjb: francogrex: http://duckduckgo.com 2017-04-30T14:24:31Z beach: phoe: I think splittist is assimilating the tasks that I posted on the Lisp Guild to that kind of work, and he is partly right. 2017-04-30T14:24:50Z pjb: p_l: perhaps SICP? Or any CL implementation? Also, I would guess an implementation of VHDL could be enlighting. 2017-04-30T14:24:52Z shrdlu68 quit (Ping timeout: 268 seconds) 2017-04-30T14:25:18Z shrdlu68 joined #lisp 2017-04-30T14:25:22Z p_l: pjb: I have to one day finally sit down and get through SICP finally 2017-04-30T14:25:37Z p_l: pjb: had some friends who generated either VHDL or Verilog in CL :) 2017-04-30T14:25:41Z TDT joined #lisp 2017-04-30T14:27:59Z phoe: splittist: I need to think of it. 2017-04-30T14:28:04Z phoe: You might be right. 2017-04-30T14:29:08Z francogrex: pjb: thanks. i just found this too seems still ok: https://searchcode.com 2017-04-30T14:29:16Z mejja quit (Quit: \ No newline at end of file) 2017-04-30T14:29:44Z mejja joined #lisp 2017-04-30T14:29:59Z sellout- quit (Quit: Leaving.) 2017-04-30T14:30:33Z worm_food joined #lisp 2017-04-30T14:32:56Z mejja quit (Client Quit) 2017-04-30T14:32:56Z beach: phoe: I am WAY more pessimistic than you are about the effectiveness of automatic tools, and also about the desire of most people to improve the general situation. But again, if you can find better ways, more power to you. 2017-04-30T14:35:58Z emaczen quit (Quit: ERC (IRC client for Emacs 24.5.1)) 2017-04-30T14:37:32Z phoe: beach: I'll think about it. 2017-04-30T14:38:01Z phoe AFKs for now 2017-04-30T14:38:21Z practica` quit (Read error: Connection reset by peer) 2017-04-30T14:38:39Z _death: communities may be self-organizing... a top down approach like a kanban board is futile.. better to do bottom up work, like writing Lisp programs 2017-04-30T14:38:42Z practica` joined #lisp 2017-04-30T14:39:37Z hazz joined #lisp 2017-04-30T14:40:57Z splittist: One of the fun things about working on Climacs was being able to pick one's favourite emacs (zmacs...) command and add it. It was a nice discrete, contained task. Now, this required Climacs to have reached a certain point of development. And it did lead to some sub-optimal programming and development practices. And it's probably part of the reason we need 2017-04-30T14:40:57Z splittist: another Climacs. But... 2017-04-30T14:41:06Z p_l: kanban board is just information exchange medium between otherwise unrelated people 2017-04-30T14:41:37Z splittist guesses he should have spent part of this weekend reading beach's assembler source. 2017-04-30T14:41:40Z warweasle joined #lisp 2017-04-30T14:44:16Z _death: p_l: yeah, I actually meant to refer to the goal that this is a means to 2017-04-30T14:45:15Z p_l: _death: in elder times, you'd have people colocated, and often much stronger need to both program (because there were no tools) and to exchange that work 2017-04-30T14:45:21Z beach: splittist: I see what you mean about (first) Climacs. 2017-04-30T14:45:33Z p_l: with everyone living far from each other, you don't have casual information exchange 2017-04-30T14:46:03Z beach: splittist: My main reason for wanting a second one was to improve the parser for Common Lisp code so that it will be totally irresistible. :) 2017-04-30T14:47:39Z beach: splittist: With Second Climacs, I hope to reach the point in the near future where adding your favorite command is straightforward. 2017-04-30T14:48:01Z _death: p_l: not sure what you're trying to say.. there are local groups, there's irc, there's github, etc. you can set up a kanban board for some projects and interested people could participate.. but "a community-wide board" seems like a chimera 2017-04-30T14:48:41Z beach: splittist: I am currently putting it on hold in favor of the work on the CST (Concrete Syntax Tree) library, because that is what is needed both for source tracking in SICL and for incremental compilation in Second Climacs. 2017-04-30T14:49:34Z rk[ghost]: if i make-instance of a defclass, how do i test if something is that class? 2017-04-30T14:49:42Z beach: clhs typep 2017-04-30T14:49:42Z specbot: http://www.lispworks.com/reference/HyperSpec/Body/f_typep.htm 2017-04-30T14:50:28Z beach: rk[ghost]: ↑ 2017-04-30T14:51:13Z p_l: btw, anyone heard what happened to cl-http? 2017-04-30T14:51:36Z Lord_Nightmare: what happened? 2017-04-30T14:51:49Z beach: rk[ghost]: Alternatively, you can write a generic function (defgeneric my-class-p (object) (:method (object) nil) (:method ((object my-class)) t)) 2017-04-30T14:54:24Z _death: or you can use the generic function facility to just "do the right thing" 2017-04-30T14:56:05Z beach: rk[ghost]: what _death says. You typically don't need such a predicate when you do object-oriented programming right. Generic dispatch will take care of it for you. 2017-04-30T14:59:31Z francogrex quit (Remote host closed the connection) 2017-04-30T15:00:58Z splittist: beach: makes sense. If the fundamental editing actions work at the CST level, with things like Forward Char or Backward Word being degenerate exceptions rather than building blocks, all sorts of things become possible. (Or, at least, I imagine so.) 2017-04-30T15:02:12Z beach: splittist: The CST stuff is more to allow for a code walker to determine indentation. I already track "parse results" which are sufficient for most non-trivial editing operations. 2017-04-30T15:02:32Z splittist: I use CST in the non-technical sense :p 2017-04-30T15:02:39Z beach: Ah, OK. 2017-04-30T15:03:19Z beach: Basically, the CST stuff I am working on is a thin wrapper around Common Lisp source code so as to keep track of source origin. 2017-04-30T15:03:41Z beach: I need that in SICL/Cleavir for tracking source in the compiler. 2017-04-30T15:03:57Z beach: But the same exact facility is needed in Second Climacs. 2017-04-30T15:05:08Z beach: After macroexpansion and step 1 of compilation, I need to know the origin in the buffer of various code elements so that I can indicate undefined variables, etc. 2017-04-30T15:06:53Z p_l: Lord_Nightmare: I have no idea what happened, but I can't even access the site 2017-04-30T15:07:00Z beach: I already checked that the Cleavir compiler is fast enough to compile top-level expressions at typing speed. 2017-04-30T15:09:22Z knobo joined #lisp 2017-04-30T15:11:47Z sellout- joined #lisp 2017-04-30T15:11:48Z loke___ quit (Ping timeout: 240 seconds) 2017-04-30T15:13:02Z shka: beach: good day! 2017-04-30T15:14:38Z raynold quit (Quit: Connection closed for inactivity) 2017-04-30T15:15:23Z beach: Hello shka. 2017-04-30T15:21:45Z prole quit (Remote host closed the connection) 2017-04-30T15:26:43Z p9s_ quit (Remote host closed the connection) 2017-04-30T15:26:51Z p9s joined #lisp 2017-04-30T15:27:25Z p9s quit (Remote host closed the connection) 2017-04-30T15:27:38Z p9s joined #lisp 2017-04-30T15:28:04Z pilne joined #lisp 2017-04-30T15:28:14Z p9s quit (Remote host closed the connection) 2017-04-30T15:28:24Z p9s joined #lisp 2017-04-30T15:29:02Z p9s quit (Remote host closed the connection) 2017-04-30T15:29:14Z p9s joined #lisp 2017-04-30T15:29:51Z p9s quit (Remote host closed the connection) 2017-04-30T15:30:02Z p9s joined #lisp 2017-04-30T15:30:39Z p9s quit (Remote host closed the connection) 2017-04-30T15:30:50Z p9s joined #lisp 2017-04-30T15:30:55Z rpg joined #lisp 2017-04-30T15:31:10Z milanj quit (Quit: This computer has gone to sleep) 2017-04-30T15:31:29Z p9s quit (Remote host closed the connection) 2017-04-30T15:31:39Z p9s joined #lisp 2017-04-30T15:32:16Z p9s quit (Remote host closed the connection) 2017-04-30T15:32:27Z p9s joined #lisp 2017-04-30T15:33:04Z p9s quit (Remote host closed the connection) 2017-04-30T15:33:14Z p9s joined #lisp 2017-04-30T15:33:52Z p9s quit (Remote host closed the connection) 2017-04-30T15:34:02Z p9s joined #lisp 2017-04-30T15:34:40Z p9s quit (Remote host closed the connection) 2017-04-30T15:34:51Z p9s joined #lisp 2017-04-30T15:35:28Z p9s quit (Remote host closed the connection) 2017-04-30T15:35:57Z p9s joined #lisp 2017-04-30T15:41:39Z francogrex joined #lisp 2017-04-30T15:43:49Z francogrex: I found out just today that Edi Weitz last year released a new book. from the description it seems quite nice and comprehensive 2017-04-30T15:44:02Z shka: francogrex: it is 2017-04-30T15:44:09Z shka: ok, got to go! 2017-04-30T15:44:11Z shka: see ya! 2017-04-30T15:44:48Z shka quit (Quit: Konversation terminated!) 2017-04-30T15:46:55Z loke: francogrex: I have it. It's good. 2017-04-30T15:46:56Z nowhereman joined #lisp 2017-04-30T15:47:09Z loke: Wirth it for the secion on reader macros alone. 2017-04-30T15:47:12Z loke: Worth 2017-04-30T15:49:03Z _death: Nickle 2017-04-30T15:50:21Z _death: eh, ruined that old joke 2017-04-30T15:51:53Z shrdlu68 thinks Nicklaus Wirth 2017-04-30T15:52:17Z _death: shrdlu68: https://en.wikipedia.org/wiki/Niklaus_Wirth#Humor 2017-04-30T15:53:14Z shrdlu68: hehe 2017-04-30T15:58:51Z otjura: I'm really dumb with system class usage. Anyone have some easy to understand guide for using DECLARE and THE? 2017-04-30T16:00:55Z pjb: Why? 2017-04-30T16:01:13Z otjura: why not? 2017-04-30T16:01:14Z beach: otjura: Rule number 1. Don't declare the type. 2017-04-30T16:01:15Z pjb: Using those forms makes the CL compiler as dumb as a C compiler. 2017-04-30T16:02:11Z beach: otjura: If, at some later point, it turns out that some function needs better performance, consider helping the compiler with type declarations. But it is better to consider algorithmic improvements first. 2017-04-30T16:03:00Z otjura: so RTFM it is 2017-04-30T16:03:23Z Mon_Ouie quit (Quit: WeeChat 1.7) 2017-04-30T16:03:28Z beach: otjura: What was your reason for considering type declarations? 2017-04-30T16:03:52Z _death: otjura: I don't know of one guide.. ANSI Common Lisp and PAIP have chapters on efficiency, but the effects are more dependent on the implementation, so you should consult its manual, perhaps its source code 2017-04-30T16:04:30Z pjb: otjura: well, the short guide is this: (defun f (x) (check-type x some-type) (locally (declare (type some-type x)) (the result-type (do-something-with x)))) 2017-04-30T16:04:36Z otjura: 1) increased mainainability 2) increased readability 3) speed increase 2017-04-30T16:04:43Z otjura: in that order 2017-04-30T16:04:50Z beach: otjura: 3 is valid, the others are not. 2017-04-30T16:05:06Z beach: otjura: In fact, you make an initial commitment to a type that might later change. 2017-04-30T16:05:20Z beach: otjura: So maintainability is worse. 2017-04-30T16:05:23Z pjb: otjura: 1- check the type. 2- then you can declare the type, because you know what it is since you've checked it. 3- you can use the to specify the type of the result of an expression, assuming the type of the arguments. 2017-04-30T16:05:26Z otjura: I digress 2017-04-30T16:05:29Z azzamsa quit (Ping timeout: 240 seconds) 2017-04-30T16:05:50Z pjb: otjura: notice that since you're doing 1-, it won't be faster! 2017-04-30T16:06:17Z otjura: what's the way of declaring type in DEFUN args? 2017-04-30T16:06:18Z pjb: (unless you have a loop or something inside) 2017-04-30T16:06:19Z beach: otjura: Readability is obtained by using names of parameters and variables that reflect the type that you are dealing with. 2017-04-30T16:07:02Z pjb: otjura: 1- do not export the function. 2- name it with % in the name. 3- same as in locally. Now you have a very dangerous function that can kill your program. 2017-04-30T16:07:53Z pjb: (defun f% (x) (declare (type some-type x)) (the result-type (do-something-with x))) (defun f (x) (chec-type x some-type) (f% x)) (export 'f) ; not f% 2017-04-30T16:08:17Z warweasle quit (Quit: rcirc on GNU Emacs 24.5.1) 2017-04-30T16:08:21Z otjura: pjb: thanks! any reason why THE doesn't work there? 2017-04-30T16:08:29Z pjb: in f% 2017-04-30T16:08:29Z prole joined #lisp 2017-04-30T16:09:03Z pjb: You could also move it, or repeat it in f. 2017-04-30T16:10:09Z pjb: otjura: for example, if you have a union: (defstruct object type value): (case (object-type o) (integer (the integer (object-value o))) (char (the char (object-value o))) …) 2017-04-30T16:10:40Z pjb: But this probably won't help since the type of the case would still be (or integer char …) most probably = T anyways. 2017-04-30T16:10:56Z rpg: in that example, shouldn't it be TYPECASE? 2017-04-30T16:11:10Z pjb: No, the type is stored in object-type. 2017-04-30T16:11:25Z rpg: Oh, I see -- that's a weird union type. 2017-04-30T16:11:32Z rpg: sorry -- didn't read carefully. 2017-04-30T16:12:17Z rpg: Honestly, wrapping possibly different types in a union is something you need to do in C, but not in CL. You could easily simply pass either an integer or char, and use TYPECASE. 2017-04-30T16:12:27Z pjb: It's a silly example, corresponding to what you would do in C, for a tagged union: typedef struct { symbol_t type; union { int i; char c; … } value; } object_t; 2017-04-30T16:12:29Z rpg: um.... actually not sure CHAR might be a subtype 2017-04-30T16:12:50Z pjb: yes, I clearly was thinking C there :-) 2017-04-30T16:13:03Z rpg: In all my years I have hardly ever used chars in CL. 2017-04-30T16:14:18Z rpg: otjura: beach is right, though -- this stuff is just something you do to really optimize a hot-spot in your code. Probably not worth the trouble (and obscuring readability of your code with clutter) unless a profiler tells you you're spending a lot of effort in one place. Good luck! 2017-04-30T16:17:11Z pjb: In anycase, if you want to declare types, you should probably do it with a Strandh macro. 2017-04-30T16:19:02Z pjb: cf. http://metamodular.com/path-replication.pdf 2017-04-30T16:19:25Z otjura: DECLARE can only reside in beginning of body and dictates type of variable. THE dictates type of return variable. am I reading hyperspec correctly? 2017-04-30T16:19:27Z pjb: err, no, this is not the one. 2017-04-30T16:22:25Z francogrex quit (Remote host closed the connection) 2017-04-30T16:22:40Z pjb: yes. 2017-04-30T16:23:32Z troydm quit (Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset) 2017-04-30T16:24:49Z troydm joined #lisp 2017-04-30T16:25:10Z _death: they don't dictate anything (except declare special).. they are more like promises to the compiler.. there is no such thing as "return variable", and THE can be used in many contexts 2017-04-30T16:25:39Z pjb: I guess the paper I'm looking for has been presented at ELS, but I wasn't there… cf. "Fast, Maintainable, and Portable Sequence Functions" in http://www.european-lisp-symposium.org/static/proceedings/2017.pdf 2017-04-30T16:26:09Z hazz quit (Quit: Leaving) 2017-04-30T16:26:27Z otjura: is (defvar foo (the integer 79678678)) the way to go in toplevel form? 2017-04-30T16:26:51Z Bike joined #lisp 2017-04-30T16:26:58Z brendyn quit (Ping timeout: 268 seconds) 2017-04-30T16:26:59Z pjb: otjura: eg. with-vector-type demonstrate how you would use a type declaration, and still have generic code: you wrap it in a Strandh macro that provides the same body in multiple branches. 2017-04-30T16:27:26Z pjb: otjura: in CL types are associated to values, not to variables. 2017-04-30T16:27:32Z Sigyn joined #lisp 2017-04-30T16:27:33Z pjb: THE doesn't do anything above. 2017-04-30T16:29:45Z pjb: This is because in CL types are associated to values, not to variables, that is is very dangerous to declare types: you're promising the compiler that a variable will always be bound to values of a certain type. How can you be sure of that? Engineers way smarters than you and way above your pay level have been proving for more than 50 years that you cannot possibly do such a thing. Even if you prove your program, the variable w 2017-04-30T16:29:46Z pjb: still get a value out of bound or of a different type. 2017-04-30T16:30:34Z pjb: (just because marketing or management will ignore your mathematical proofs, and will hook a 16-bit lateral accelerometer into a more powerful rocket that can accelerate laterally more). 2017-04-30T16:31:45Z _death: pjb: the statement about types not associated with variables is inaccurate.. (let ((x 0)) (declare (type integer x)) (setf x 1.2)) 2017-04-30T16:31:46Z pjb: So if you want to reach to the stars, you better keep your code generic. Remember: you have all the time to compute your trajectory, but only one cut at impulse. 2017-04-30T16:32:00Z pjb: _death: the type is still associated to the value. 2017-04-30T16:32:13Z pjb: _death: implementations are free to ignore type declarations. 2017-04-30T16:32:39Z _death: clhs type 2017-04-30T16:32:39Z specbot: http://www.lispworks.com/reference/HyperSpec/Body/d_type.htm 2017-04-30T16:32:55Z pjb: They all return 1.2; only sbcl, which is not conforming, signals an error. 2017-04-30T16:33:02Z _death: pjb: that an implementation is free to ignore something is irrelevant 2017-04-30T16:33:13Z pjb: The behavior of sbcl is not conforming. 2017-04-30T16:33:51Z pjb: The page you cite says: The meaning of a type declaration is equivalent to changing each reference to a variable (var) within the scope of the declaration to (the typespec var), changing each expression assigned to the variable (new-value) within the scope of the declaration to (the typespec new-value), and executing (the typespec var) at the moment the scope of the declaration is entered. 2017-04-30T16:33:53Z _death: pjb: I suggest a re-reading of TYPE declaration entry 2017-04-30T16:34:24Z pjb: This means that we're telling the compiler what the type of the result of evaluating the variable as an expression will be. 2017-04-30T16:34:54Z azzamsa joined #lisp 2017-04-30T16:34:56Z shrdlu68: "I am sick to death of knee-jerk anti-LOOPism and I am beginning to irrationally regard it as a plot to disable me as a programmer by excommunicating my useful tools. " 2017-04-30T16:35:39Z pjb: Well, ok sbcl is not not-conforming on this point. It's the form: (let ((x 0)) (declare (type integer x)) (setf x 1.2)) that is not conforming. 2017-04-30T16:35:55Z rpg: shrdlu68: switch to ITERATE; you won't be sorry! 2017-04-30T16:36:06Z _death: pjb: I didn't actually try this form.. I just gave it as an example of how the type declaration affects a binding 2017-04-30T16:36:16Z shrdlu68: rpg: Never! 2017-04-30T16:36:36Z pjb: But the point is that most implementation implement the undefined consequence of binding 1.2 to x and in effect of ignoring the declaration. 2017-04-30T16:36:51Z pjb: Therefore if your rocket depends on x being bound on an integer you will crash. 2017-04-30T16:37:00Z _death: pjb: my point was that declare-type associates a type with a binding 2017-04-30T16:37:02Z pjb: _death: use clall; I did try it! 2017-04-30T16:37:03Z rpg: shrdlu68: seriously, I used to love LOOP, but its conditional and inability to deal with multiple-values led me to prefer ITERATE. Same power; much more usable syntax. 2017-04-30T16:37:29Z pjb: It's important to try out forms that are not conforming, that have undefined consequences, because there's no other way to know what they can do… 2017-04-30T16:37:55Z rpg: shrdlu68: I got tired of reading stuff like (LOOP FOR X IN BAR DO ....) where the .... would contain an undigested lump of normal CL with conditionals, bindings, etc., because IF is so horrible in LOOP. 2017-04-30T16:38:00Z nyef: ... I thought that dealing with multiple values in LOOP was straightforward? MULTIPLE-VALUE-LIST, then destructure the list? 2017-04-30T16:38:33Z pjb: But for the topic at hand, notice how (let ((x 0)) (setf x 1.2)) is perfectly conforming code, leading to well defined semantics, and the same results and side effects in all declarations. And notice how introducing the type declarations magically breaks everything! 2017-04-30T16:38:35Z pjb: Good job! 2017-04-30T16:39:24Z rpg: nyef: you can do that, but isn't MULTIPLE-VALUE-BIND or MULTIPLE-VALUE-SETQ cleaner and easier to read? 2017-04-30T16:39:45Z otjura: hm, THE in topform indeed doesn't prevent assigning float to something that should be integer. and I can apparently only use DECLARE within some forms. so how am I supposed to I declare type of var in toplevel? 2017-04-30T16:39:48Z shrdlu68: rpg: Perhaps I will some day, I've already encountered the inability to deal with values. 2017-04-30T16:39:54Z rpg: nyef: ...and even if I give you multiple values, the conditional is still horrible. 2017-04-30T16:40:03Z nyef: rpg: I'll grant the former, but not the latter. (SETF VALUES) beats M-V-SETQ. 2017-04-30T16:40:06Z pjb: otjura: (declaim (type integer *foo*)) 2017-04-30T16:40:17Z rpg: nyef: good point. 2017-04-30T16:40:18Z yoosi quit (Remote host closed the connection) 2017-04-30T16:40:37Z pjb: otjura: but as we just explained with the let example, it can only will only render most of your code non- 2017-04-30T16:40:40Z yoosi joined #lisp 2017-04-30T16:40:43Z nyef: And if your loop body is a blob of undifferentiated CL code, it's ripe for refactoring into another function anyway. 2017-04-30T16:40:44Z rpg: nyef: I tend to use M-V-SETQ just because it screams out what I'm doing, but chacun a son gout 2017-04-30T16:40:45Z pjb: oops 2017-04-30T16:41:09Z pjb: otjura: but as we just explained with the let example, it can only make some of your perfectly good code become non-conforming and produce random results and behavior. 2017-04-30T16:41:16Z _death: pjb: it only breaks things if you don't keep your promises.. some implementations are more vengeful than others :) 2017-04-30T16:41:19Z pjb: otjura: again, just don't do it. 2017-04-30T16:41:36Z pjb: _death: best way to keep your promises is not to make any. 2017-04-30T16:41:43Z rogersm joined #lisp 2017-04-30T16:41:56Z _death: pjb: I try :) 2017-04-30T16:42:16Z otjura: but I will ( ͡° ͜ʖ ͡°) 2017-04-30T16:42:28Z rpg: nyef: The problem is that you read this stuff and you say "is there some reason why they didn't do LOOP FOR ... AS ... ? What's going on? And it's probably because they don't grok the LOOP syntax, but maybe it isn't. Just raises the effort level for comprehension. 2017-04-30T16:42:45Z otjura: types in lisp sure are confus 2017-04-30T16:43:07Z pjb: Yes. 2017-04-30T16:43:16Z shrdlu68: Indeed. 2017-04-30T16:43:21Z rpg: otjura: it's because they aren't used for the same thing as types in other languages. 2017-04-30T16:43:32Z pjb: Only because you've been mind bended over types in C… 2017-04-30T16:44:08Z otjura: C++ and Java to be precise 2017-04-30T16:44:19Z pjb: It's said that OO was invented in 1968 by Simula. Obviously not, it was invented in 1959 by Lisp. 2017-04-30T16:44:20Z otjura: and some Haskell 2017-04-30T16:44:22Z rpg: We get used to types as a discipline method.... 2017-04-30T16:44:40Z rpg: and in CL they are the opposite. 2017-04-30T16:44:51Z rpg: ...mostly. 2017-04-30T16:44:53Z pjb: As in, it's the lisp object that has a class, not the variable holding the object. 2017-04-30T16:45:32Z rpg: Except, for example in Clozure, you can use type declarations on CLOS slots to get some run-time error checking (I don't know what other implementations might do that). 2017-04-30T16:46:05Z discardedes joined #lisp 2017-04-30T16:49:50Z otjura: how about declarations in function signature like foo(int arg)? 2017-04-30T16:50:38Z smoon joined #lisp 2017-04-30T16:52:17Z prole quit (Remote host closed the connection) 2017-04-30T16:53:33Z _death: may want to search for define-strict-function 2017-04-30T16:54:13Z prole joined #lisp 2017-04-30T16:55:16Z defaultxr joined #lisp 2017-04-30T16:56:11Z drcode quit (Ping timeout: 252 seconds) 2017-04-30T16:56:15Z pjb: otjura: it's the same but worse. Name those functions with 2 % in their names! 2017-04-30T16:56:27Z pjb: And definitely don't export them! 2017-04-30T16:57:46Z _death: it appears that names and export are indicators for level of shame 2017-04-30T16:58:34Z pjb: (declaim (ftype (function (string integer) character) %f%) (defun %f% (s i) (char s i)) ; only now (%f% '(1 2 3) 1) instead of signaling an error lie char would do if left alone, it will either crash, return #\z or launch a missile, which hopefully will be targetted to your home city. 2017-04-30T16:58:57Z pjb: Well, % is often used to mean, dangerous internal unchecked function. 2017-04-30T16:59:45Z pjb: Also: fucking code that is highly implementation dependent and not portable, that you will have to re-implement from scratch in actual Common Lisp. 2017-04-30T17:00:25Z NeverDie quit (Remote host closed the connection) 2017-04-30T17:02:20Z _death: there should be an emotive style guide 2017-04-30T17:03:14Z pjb: :-) 2017-04-30T17:03:19Z _death: and the accompanying linter could tell you what the programmer felt while he was writing that code 2017-04-30T17:03:48Z pjb: Apart from some outburst, I would bet for a general … 2017-04-30T17:09:17Z _death: then there'd be programmer-manager wars.. managers would find their programmers too happy/sad/angry and programmers would write compilers to transform their code to fit the manager's expectations 2017-04-30T17:09:22Z drcode joined #lisp 2017-04-30T17:10:28Z schoppenhauer quit (Ping timeout: 240 seconds) 2017-04-30T17:12:28Z _death: #| wtf |# comments would become unnecessary 2017-04-30T17:13:29Z schoppenhauer joined #lisp 2017-04-30T17:15:27Z otjura: github syntax hihlighting doesn't support #| |# so consider it obsolete 2017-04-30T17:15:41Z otjura: I did complain to them but so far nada 2017-04-30T17:15:52Z _death: their syntax highlighting is pretty bad in general 2017-04-30T17:16:32Z otjura: I like how there are so many github clones now but I'm too lazy to even check em out 2017-04-30T17:23:42Z gingerale quit (Ping timeout: 268 seconds) 2017-04-30T17:27:37Z milanj joined #lisp 2017-04-30T17:27:53Z maarhart joined #lisp 2017-04-30T17:29:20Z axion: Does anyone know of any benchmarking libraries besides trivial-benchmark? 2017-04-30T17:29:51Z otjura: how much of an overkill you would say it is to have DECLAIM + (optimize speed) on integer? 2017-04-30T17:30:21Z shrdlu68: minion: Lisp Guild 2017-04-30T17:30:22Z minion: lisp is the glue that binds the variables together 2017-04-30T17:31:00Z shrdlu68: minion: You're fired. 2017-04-30T17:31:00Z minion: what's up? 2017-04-30T17:31:48Z [X-Scale] joined #lisp 2017-04-30T17:32:28Z X-Scale quit (Ping timeout: 240 seconds) 2017-04-30T17:32:32Z [X-Scale] is now known as X-Scale 2017-04-30T17:33:50Z pjb: otjura: it would be ludicruous: integer are big objects, and optimizing some dispatch before calling the operation on them will not save significant time or memory accesses. 2017-04-30T17:34:03Z pjb: otjura: things would be different for fixnums or even (signed-byte 8). 2017-04-30T17:34:49Z maarhart quit (Quit: Mutter: www.mutterirc.com) 2017-04-30T17:35:36Z worm_food is now known as worm_Doc 2017-04-30T17:35:37Z easieste joined #lisp 2017-04-30T17:35:44Z worm_Doc is now known as worm_food 2017-04-30T17:37:38Z shrdlu68: phoe: Could you please point me to the Lisp Guild? 2017-04-30T17:38:27Z shrdlu68: Never mind, found it. 2017-04-30T17:39:07Z easieste quit (Client Quit) 2017-04-30T17:40:36Z teggi quit (Quit: Leaving...) 2017-04-30T17:42:00Z sbodin joined #lisp 2017-04-30T17:43:03Z shrdlu68 left #lisp 2017-04-30T17:45:09Z barton_ quit (Remote host closed the connection) 2017-04-30T17:45:26Z barton_ joined #lisp 2017-04-30T17:50:07Z oleo joined #lisp 2017-04-30T17:50:07Z oleo quit (Changing host) 2017-04-30T17:50:07Z oleo joined #lisp 2017-04-30T17:53:31Z easieste joined #lisp 2017-04-30T17:58:17Z sbodin quit (Ping timeout: 240 seconds) 2017-04-30T18:00:46Z maarhart joined #lisp 2017-04-30T18:03:07Z maarhart quit (Client Quit) 2017-04-30T18:03:50Z whiteline_ joined #lisp 2017-04-30T18:04:17Z Jesin joined #lisp 2017-04-30T18:05:46Z whiteline quit (Ping timeout: 264 seconds) 2017-04-30T18:08:34Z elimik31 joined #lisp 2017-04-30T18:09:40Z scymtym quit (Ping timeout: 240 seconds) 2017-04-30T18:12:40Z nimiux quit (Remote host closed the connection) 2017-04-30T18:15:24Z scymtym joined #lisp 2017-04-30T18:15:48Z _barton_ joined #lisp 2017-04-30T18:15:48Z cro__ joined #lisp 2017-04-30T18:16:05Z ksool quit (Remote host closed the connection) 2017-04-30T18:16:19Z barton_ quit (Remote host closed the connection) 2017-04-30T18:16:19Z cromachina_ quit (Remote host closed the connection) 2017-04-30T18:16:19Z mishoo quit (Remote host closed the connection) 2017-04-30T18:16:30Z francogrex joined #lisp 2017-04-30T18:16:33Z mishoo joined #lisp 2017-04-30T18:17:23Z |3b|` joined #lisp 2017-04-30T18:17:58Z |3b| quit (Write error: Broken pipe) 2017-04-30T18:17:59Z MrBismuth quit (Excess Flood) 2017-04-30T18:18:16Z francogrex: when i have a lot of time to waste, i start looking at the benchmarksgame. i noticed that lisp did not do so well on many tasks for example this one: http://benchmarksgame.alioth.debian.org/u64q/pidigits.html the performance is disappointing if i compare with non-compiled languages like java etc.. is it do you think because of poor coding? 2017-04-30T18:19:01Z MrBismuth joined #lisp 2017-04-30T18:20:15Z ksool joined #lisp 2017-04-30T18:21:38Z p_l: francogrex: well, the program seems to output a lot of style warnings 2017-04-30T18:21:51Z Bike: am i reading correctly that it parses the same integer every iteration? 2017-04-30T18:22:10Z easieste quit (Quit: easieste) 2017-04-30T18:22:49Z easieste joined #lisp 2017-04-30T18:22:57Z X-Scale quit (Ping timeout: 240 seconds) 2017-04-30T18:24:48Z JuanDaugherty quit (Quit: Hibernate, reboot, exeunt, etc.) 2017-04-30T18:24:59Z francogrex: hmm. I mean it's just a game, but because it's so well advertised it could actually give a bad impression if it's done sloppily. 2017-04-30T18:29:18Z worm_food quit (Quit: Leaving) 2017-04-30T18:33:03Z francogrex: it is a bad code indeed. :( 2017-04-30T18:33:32Z francogrex left #lisp 2017-04-30T18:33:37Z p_l: and yes, benchmark game has an impact on people 2017-04-30T18:35:18Z francogrex joined #lisp 2017-04-30T18:35:35Z francogrex: it's like the (declaim (type integer acc den num)) did not have any effect on the code 2017-04-30T18:38:55Z Bike: well, yeah. 2017-04-30T18:39:00Z Bike: ...it's weird for those to be globals anyway. 2017-04-30T18:39:16Z terpri quit (Read error: Connection reset by peer) 2017-04-30T18:39:23Z francogrex: yes i also thought so, but the guy is "translating" the c code 2017-04-30T18:39:33Z francogrex: already that is an indication that it's no good 2017-04-30T18:41:26Z terpri joined #lisp 2017-04-30T18:42:27Z p_l: also, I suspect type declarations "didn't held" because of conflicts noticed by compiler 2017-04-30T18:43:23Z practica` quit (Read error: Connection reset by peer) 2017-04-30T18:43:41Z Bike: you mean they're inaccurate? 2017-04-30T18:44:07Z practica` joined #lisp 2017-04-30T18:45:07Z p_l: Bike: I mean that it feels to me like compiler disagrees with them, and for a reason (probably) 2017-04-30T18:45:14Z francogrex: a few things like those are quite obvious and easily corrected... if i have energy to register i would rewrite and submit the code which surely will be better 2017-04-30T18:45:23Z p_l: I haven't written tightly-typed code in a long time, so I might simply make basic mistakes there 2017-04-30T18:46:06Z p_l ponders if some implementations have computer-usable output from (disassemble) without digging deep into implementation of disassemble... 2017-04-30T18:46:14Z francogrex: p_l: the note says also that the * and the + results are left out to vary on their own, so the comp had to de generix * and + ... 2017-04-30T18:46:39Z p_l: then one could write an iterative optimizer that would work attempt different solutions and check if resulting code is shorter... :D 2017-04-30T18:46:39Z francogrex: p_l: yes sbcl surely had, ccl too.. 2017-04-30T18:47:50Z francogrex: if you use the code as such and disassemble some of the functions written you'll see from the output they're disasters 2017-04-30T18:48:10Z easieste quit (Quit: easieste) 2017-04-30T18:49:12Z francogrex: hell even you could inject machine code directly into the lisp program.. but maybe that won't be allowed . i don't know i haven't seen the 2017-04-30T18:49:20Z francogrex: rules on the site 2017-04-30T18:49:25Z neoncontrails joined #lisp 2017-04-30T18:49:49Z p_l: interestingly, the rules are explicit about using bignums 2017-04-30T18:54:04Z Bike: this code is weird. it calls truncate on a sum of integers, unless i'm missing something 2017-04-30T18:54:38Z Bike: oh, i miscopied, nvm 2017-04-30T18:56:04Z EvW1 joined #lisp 2017-04-30T19:00:59Z Bike: well i rewrote it to use locals and it took two less seconds locally 2017-04-30T19:01:40Z Bike: the output format is also slightly wrong, since it doesn't output a total count if the number of digits requested isn't a multiple of ten 2017-04-30T19:02:54Z djinni` quit (Quit: Leaving) 2017-04-30T19:06:33Z djinni` joined #lisp 2017-04-30T19:08:35Z impulse quit (Ping timeout: 240 seconds) 2017-04-30T19:12:07Z whiteline joined #lisp 2017-04-30T19:14:46Z whiteline_ quit (Ping timeout: 264 seconds) 2017-04-30T19:15:36Z elimik31 quit (Ping timeout: 260 seconds) 2017-04-30T19:20:23Z axion: That code has me wondering...why do some people only use locally scoped DECLARE forms to declare types, and other people use toplevel DECLAIM/FTYPE? 2017-04-30T19:21:46Z axion: Does SBCL do a better job compiling when declaring the types of function arguments one way or the other? 2017-04-30T19:22:00Z phoe: axion: you could check and compare the assemblies 2017-04-30T19:34:11Z TruePika: axion: I had tried some (proclaim (ftype ...)) (defun ...) at one point in SBCL, I don't think the ftype was evaluated at compile-time 2017-04-30T19:34:41Z Bike: it wouldn't be. proclaim's just a function. 2017-04-30T19:34:46Z Bike: declaim's what you use for that 2017-04-30T19:35:06Z TruePika: meh, and declaim is restricted (generally) to the file 2017-04-30T19:35:14Z TruePika: would one use a proclaim/declaim pair? 2017-04-30T19:35:53Z Bike: huh? 2017-04-30T19:36:29Z shka joined #lisp 2017-04-30T19:36:42Z axion: I only ask because I use (declaim (ftype (function args) return) fn-name)) all the time, and rarely use declare 2017-04-30T19:37:02Z axion: Just asking in general, what would yield better performance as far as sbcl 2017-04-30T19:37:15Z TruePika: compile and check 2017-04-30T19:37:46Z Bike: an ftype declaration is probably global 2017-04-30T19:37:49Z axion: I don't see a difference, which is why I ask for someone more experienced 2017-04-30T19:38:09Z Bike: even if it wasn't, using proclaim wouldn't matter, because declaim just expands into eval-when proclaim 2017-04-30T19:41:31Z axion: I use the above so much that I actually wrote a parser for an unconventional lambda list the other day, so I could write a special defun* macro that adds type information from arg/type pairs in the arg list, and optionally inlines. 2017-04-30T19:42:05Z easieste joined #lisp 2017-04-30T19:44:14Z Bike: dunno if either is better or worse 2017-04-30T19:44:35Z easieste quit (Client Quit) 2017-04-30T19:45:40Z axion: like (defun* foo ((bar boolean) &key ((baz 10.0) single-float)) (:result boolean :inline t) ..) expanding to (progn (declaim ..) [(declaim (inline ..))] (defun ..)) 2017-04-30T19:50:58Z SAL9000: Is it possible to modify the Lisp reader's interpretation of literals? 2017-04-30T19:52:55Z phoe: SAL9000: it's complicated. 2017-04-30T19:52:56Z phoe: Give me an example. 2017-04-30T19:53:07Z phoe: clhs 2.2 2017-04-30T19:53:07Z specbot: Reader Algorithm: http://www.lispworks.com/reference/HyperSpec/Body/02_b.htm 2017-04-30T19:53:20Z phoe: Or tell me which point is troublesome to you. 2017-04-30T19:54:01Z madara joined #lisp 2017-04-30T19:54:23Z SAL9000: phoe: Long story short, I'm trying to make the Lisp reader parse Lua code, translating it into more-or-less equivalent Lisp code. 2017-04-30T19:55:00Z phoe: SAL9000: give me an example. 2017-04-30T19:55:13Z phoe: What you have on input, what you want as output. 2017-04-30T19:55:45Z SAL9000: Input: "0x1.2e3" Output: 1.180419921875 2017-04-30T19:56:16Z SAL9000: Yeah, it's kinda stupid, but that's what Lua itself gives for that input 2017-04-30T19:57:21Z phoe: Sounds like a case for a reader macro. 2017-04-30T19:57:28Z phoe: Or a custom reader function, sorry. 2017-04-30T19:57:30Z madara quit (K-Lined) 2017-04-30T19:58:13Z SAL9000: Do you mean a function that reads from the stream itself (i.e. manually implemented parsing) or some kind of reader hook that I'm unaware of? 2017-04-30T19:58:32Z francogrex quit (Remote host closed the connection) 2017-04-30T19:58:38Z phoe: Is your input file literally "0x1.2e3\n"? 2017-04-30T19:58:48Z SAL9000: no, my input file is arbitrary Lua code 2017-04-30T19:58:55Z phoe: I need to see its syntax. 2017-04-30T19:59:03Z phoe: Got any representative example? 2017-04-30T19:59:15Z SAL9000: I've got official EBNF 2017-04-30T19:59:16Z SAL9000: https://www.lua.org/manual/5.2/manual.html#9 2017-04-30T19:59:37Z SAL9000: although it seems to be somewhat out-of-sync with the actual implementation, unfortunately 2017-04-30T20:00:26Z phoe: https://www.lua.org/pil/1.html <- this seems readable with Lisp reader. 2017-04-30T20:00:52Z phoe: Except the Lisp reader will not honor any whitespace. 2017-04-30T20:01:47Z SAL9000: Unless I'm missing some corner-case, amount of whitespace is not significant outside of strings and the like 2017-04-30T20:02:11Z SAL9000: i.e. it's only significant as a separator, same as Lisp 2017-04-30T20:02:24Z phoe: Inside the strings, you can use the existing reader macro for #\" which honors whitespace. 2017-04-30T20:02:28Z phoe: There are only edge cases, like. 2017-04-30T20:02:32Z phoe: How are strings in Lua escaped? 2017-04-30T20:02:59Z SAL9000: There's a set of \ escapes ala C, including " and ' 2017-04-30T20:03:12Z phoe: \n will not be a newline. 2017-04-30T20:03:22Z SAL9000: also \xXX where X is hex, and \000 where 0 is decimal 2017-04-30T20:03:34Z phoe: They won't escape properly. 2017-04-30T20:03:41Z safe joined #lisp 2017-04-30T20:03:41Z phoe: You need to write a custom reader macro for #\". 2017-04-30T20:03:59Z phoe: And one for #\- because of comments. 2017-04-30T20:04:10Z SAL9000: Right. 2017-04-30T20:04:26Z SAL9000: The really nasty case -- which, as far as I can tell, ESRAP cannot parse -- is so-called "long strings" 2017-04-30T20:04:45Z phoe: What do you mean? 2017-04-30T20:04:46Z SAL9000: [[foo bar]], or [=[foo bar]=], or [==[foo bar==] etc. 2017-04-30T20:04:57Z SAL9000: sorry, [==[foo bar]==] 2017-04-30T20:05:03Z SAL9000: each pair is only closed by it's counterpart 2017-04-30T20:05:08Z SAL9000: any number of = can be used 2017-04-30T20:05:28Z phoe: oh, I see 2017-04-30T20:05:53Z SAL9000: that's what I mean when I mentioned "suitable" parsing libraries 2017-04-30T20:06:11Z SAL9000: I'd need something which supports non-greedy repetition & backreferences in rules 2017-04-30T20:06:40Z phoe: I don't have enough parsing experience to help you here. 2017-04-30T20:07:06Z SAL9000: tbh, this is probably overkill since the specific Lua files I'm writing this for are highly unlikely to use this syntax... but if I'm writing a Lua in Lisp, I want to write it properly, damnit :) 2017-04-30T20:07:40Z SAL9000: while we're on this topic -- another fun-point is that Lua has, effectively, tri-state booleans 2017-04-30T20:07:44Z SAL9000: nil, false and true 2017-04-30T20:07:53Z SAL9000: where nil and false are both false for if/not purposes, but nil != false 2017-04-30T20:07:56Z rpg: SAL9000: Why do you need non-greedy repetition? Don't you always want ==[ to be read as ==[ and never as "= 2017-04-30T20:08:02Z rpg: followed by =[ 2017-04-30T20:08:07Z Grue`: you can find the maximal sequence of consecutive ='s in the target code, then regenerate the parser to handle [=...=[ up to this number 2017-04-30T20:08:08Z SAL9000: rpg: non-greedy repetition is for other things 2017-04-30T20:08:16Z barton_ joined #lisp 2017-04-30T20:08:16Z barton_ quit (Changing host) 2017-04-30T20:08:16Z barton_ joined #lisp 2017-04-30T20:08:17Z _barton_ quit (Remote host closed the connection) 2017-04-30T20:08:43Z SAL9000: it's possible to get around that by using negative lookahead, but it makes the parser disgusting 2017-04-30T20:09:20Z rpg: SAL9000: Are you trying to do all the parsing in the reader? Trying to cram context-free power into the reader/lexer seems like it will cause trouble. 2017-04-30T20:09:38Z rpg: Maybe you'd be happier with something like cl-yacc.... 2017-04-30T20:09:42Z SAL9000: rpg: My current attempt is via ESRAP; I'm looking for better options, the reader being one of them 2017-04-30T20:10:00Z emerson joined #lisp 2017-04-30T20:10:50Z rpg: Hm. Don't know about packrat parsing. 2017-04-30T20:10:50Z SAL9000: non-greedy repetition would let me avoid writing things like (* (and (! #\") character)) 2017-04-30T20:11:51Z SAL9000: equivalent to the regex /(?:(?!").)*/ 2017-04-30T20:12:07Z rpg: wow. packrat parsing sounds really neat. 2017-04-30T20:12:10Z vydd joined #lisp 2017-04-30T20:12:10Z vydd quit (Changing host) 2017-04-30T20:12:10Z vydd joined #lisp 2017-04-30T20:12:33Z SAL9000: I suspect that I might be using it wrong, to be honest 2017-04-30T20:13:03Z rpg: Do you have a Lua grammar at hand? 2017-04-30T20:13:33Z SAL9000: The hacky one I've written in ESRAP, or an official one? 2017-04-30T20:13:40Z rpg: official 2017-04-30T20:13:43Z SAL9000: there's official EBNF, but it doesn't match implementation behavior 2017-04-30T20:13:51Z jack_rabbit joined #lisp 2017-04-30T20:13:56Z rpg: ok, that's scary. 2017-04-30T20:14:14Z SAL9000: and it doesn't describe operator precedence, number literals or string literals (at least) 2017-04-30T20:14:28Z SAL9000: that and I'm REALLY not looking forward to trying to port GOTO... 2017-04-30T20:14:39Z SAL9000: might end up writing that off as "not implemented" 2017-04-30T20:16:47Z azzamsa quit (Read error: Connection reset by peer) 2017-04-30T20:17:12Z barton_ quit (Ping timeout: 260 seconds) 2017-04-30T20:20:50Z barton_ joined #lisp 2017-04-30T20:20:50Z barton_ quit (Changing host) 2017-04-30T20:20:50Z barton_ joined #lisp 2017-04-30T20:20:59Z rpg quit (Quit: Textual IRC Client: www.textualapp.com) 2017-04-30T20:25:19Z barton_ quit (Ping timeout: 260 seconds) 2017-04-30T20:26:07Z mikaelj quit (Remote host closed the connection) 2017-04-30T20:27:00Z jack_rabbit: hmm. cl+ssl is giving me: Unhandled memory fault at #x10. 2017-04-30T20:29:19Z jack_rabbit: http://paste.lisp.org/display/345536 2017-04-30T20:30:23Z Karl_Dscc quit (Remote host closed the connection) 2017-04-30T20:31:43Z nirved_afk quit (Quit: Leaving) 2017-04-30T20:32:04Z phoe: jack_rabbit: #x10? This looks like a dereference of a very bad pointer. 2017-04-30T20:32:08Z phoe: Smells of a bug. 2017-04-30T20:32:14Z phoe: Can you isolate the code that does this for you? 2017-04-30T20:32:24Z jack_rabbit: right, that's what I was thinking. 2017-04-30T20:32:32Z jack_rabbit: I'm working on it. 2017-04-30T20:34:43Z jack_rabbit: I'm not calling it directly. It's being called by cl-irc. 2017-04-30T20:35:00Z jack_rabbit: check the annotation. 2017-04-30T20:36:16Z phoe: jack_rabbit: does it do it every time? 2017-04-30T20:36:21Z jack_rabbit: Yep. 2017-04-30T20:36:31Z jack_rabbit: Never used to, though. 2017-04-30T20:37:02Z jack_rabbit: I wonder... I just updated my system. Incompatible .so's? 2017-04-30T20:38:16Z jack_rabbit: let me try updating stuff. 2017-04-30T20:40:12Z hexfive joined #lisp 2017-04-30T20:41:42Z jack_rabbit: nope. 2017-04-30T20:41:49Z ghard quit (Read error: Connection reset by peer) 2017-04-30T20:41:52Z phoe: Bug report time. 2017-04-30T20:41:57Z ghard` joined #lisp 2017-04-30T20:42:09Z phoe: Your OS, version, architecture, version of SSL libraries, Lisp implementation, all the details. 2017-04-30T20:42:17Z phoe: Fired at cl+ssl on GitHub. 2017-04-30T20:46:23Z MONODA` joined #lisp 2017-04-30T20:47:10Z mishoo quit (Ping timeout: 246 seconds) 2017-04-30T20:49:22Z ghard`` joined #lisp 2017-04-30T20:50:08Z ghard` quit (Read error: Connection reset by peer) 2017-04-30T20:50:28Z curious_ joined #lisp 2017-04-30T20:52:40Z curious_ quit (Client Quit) 2017-04-30T20:53:59Z wheelsucker joined #lisp 2017-04-30T20:54:59Z jack_rabbit: Seems like a call to ssl-ctx-ctrl is the culprit. 2017-04-30T20:56:24Z lerax quit (Ping timeout: 260 seconds) 2017-04-30T20:56:45Z puchacz joined #lisp 2017-04-30T21:00:16Z smoon quit (Quit: smoon) 2017-04-30T21:01:11Z otjura: what's the point in having multiple :export sexps in defpackage? 2017-04-30T21:02:09Z phoe: otjura: dunno - perhaps organizing one's code a little bit. 2017-04-30T21:04:13Z angavrilov quit (Remote host closed the connection) 2017-04-30T21:04:34Z Bike: yeah, that's why i do it. 2017-04-30T21:04:42Z Bike: the semantics aren't any different. 2017-04-30T21:05:34Z otjura: thanks. second question: if I :shadow something, it also exports? 2017-04-30T21:05:48Z Xach: otjura: no. 2017-04-30T21:06:04Z Xach: otjura: shadowing does not change a symbol's external status. 2017-04-30T21:11:04Z vlatkoB_ quit (Remote host closed the connection) 2017-04-30T21:11:59Z pjb quit (Ping timeout: 260 seconds) 2017-04-30T21:13:49Z axion: Oh, here is the first of two passes of the parser I was referring to earlier. It puts everything into a canonical form for the second pass to do what it wants http://paste.lisp.org/display/345537 2017-04-30T21:19:56Z lerax joined #lisp 2017-04-30T21:20:50Z macdavid313 quit (Quit: macdavid313) 2017-04-30T21:21:08Z thijso quit (Ping timeout: 260 seconds) 2017-04-30T21:25:05Z rogersm quit (Read error: Connection reset by peer) 2017-04-30T21:25:38Z jack_rabbit: https://github.com/cl-plus-ssl/cl-plus-ssl/issues/41 2017-04-30T21:25:44Z rogersm joined #lisp 2017-04-30T21:26:10Z rogersm quit (Client Quit) 2017-04-30T21:28:00Z phoe: jack_rabbit: ayup. 2017-04-30T21:28:28Z jack_rabbit: you can reproduce? 2017-04-30T21:28:54Z phoe: Let me try,. 2017-04-30T21:30:10Z phoe: Cannot reproduce on debian sid x64, kernel 4.7.0-1 with SBCL 1.3.14.debian 2017-04-30T21:30:49Z jack_rabbit: what's your ssl lib? 2017-04-30T21:31:03Z phoe: OpenSSL 2017-04-30T21:31:16Z phoe: 1.0.2j-1 2017-04-30T21:31:26Z jack_rabbit: mmm. I'm on LibreSSL 2017-04-30T21:31:40Z phoe: that could be the culprit 2017-04-30T21:31:48Z jack_rabbit: Yeah. 2017-04-30T21:31:49Z mishoo joined #lisp 2017-04-30T21:31:51Z holycow joined #lisp 2017-04-30T21:32:01Z zacts quit (Quit: WeeChat 1.7.1) 2017-04-30T21:32:11Z jack_rabbit: Like I said, the issue only showed up after I updated my system libs. 2017-04-30T21:32:36Z phoe: smells of a regression, then 2017-04-30T21:33:15Z jack_rabbit: mmm. Maybe I should investigate the lib directly in C... 2017-04-30T21:33:26Z ghard`` quit (Ping timeout: 255 seconds) 2017-04-30T21:33:30Z barton_ joined #lisp 2017-04-30T21:33:39Z jack_rabbit: There are only a few FFI calls being done that cause this. 2017-04-30T21:34:55Z zacts joined #lisp 2017-04-30T21:38:53Z EvW1 quit (Ping timeout: 252 seconds) 2017-04-30T21:38:56Z jack_rabbit: Just reverted .so version and bug disappears. 2017-04-30T21:39:45Z phoe: File a regression then, and make sure to report both version numbers. 2017-04-30T21:41:16Z shka quit (Ping timeout: 260 seconds) 2017-04-30T21:41:24Z jack_rabbit: Will they accept reports with lisp code to reproduce, or should I try to develop a C example? 2017-04-30T21:45:42Z holycow: *gasp* 2017-04-30T21:45:59Z holycow: someone just wrote an object oriented pre-processor for html 2017-04-30T21:49:52Z _death: jack_rabbit: the latter 2017-04-30T21:50:16Z jack_rabbit: figured. 2017-04-30T21:50:41Z can3p_ joined #lisp 2017-04-30T21:50:46Z jack_rabbit: bbl. Thanks. 2017-04-30T21:51:25Z kamog joined #lisp 2017-04-30T21:52:03Z otjura quit (Quit: Konversation terminated!) 2017-04-30T21:53:12Z can3p_ quit (Client Quit) 2017-04-30T21:53:25Z _death: is libressl supposed to be abi-compatible with openssl? 2017-04-30T21:55:26Z _death: it says "LibreSSL is not ABI compatible with any release of OpenSSL, or necessarily earlier releases of LibreSSL." 2017-04-30T21:55:39Z jack_rabbit quit (Ping timeout: 268 seconds) 2017-04-30T22:01:47Z pjb joined #lisp 2017-04-30T22:06:56Z pjb quit (Ping timeout: 252 seconds) 2017-04-30T22:08:41Z thijso joined #lisp 2017-04-30T22:09:26Z skeuomorf joined #lisp 2017-04-30T22:10:29Z jasom quit (Read error: Connection reset by peer) 2017-04-30T22:10:29Z ogkloo quit (Read error: Connection reset by peer) 2017-04-30T22:10:33Z schoppenhauer quit (Read error: Connection reset by peer) 2017-04-30T22:13:24Z pve quit (Ping timeout: 260 seconds) 2017-04-30T22:13:33Z fluter quit (Read error: Connection reset by peer) 2017-04-30T22:14:06Z kjeldahl quit (Read error: Connection reset by peer) 2017-04-30T22:14:14Z paratox quit (Read error: Connection reset by peer) 2017-04-30T22:18:48Z barton_ quit (Ping timeout: 240 seconds) 2017-04-30T22:19:04Z Baggers joined #lisp 2017-04-30T22:21:29Z hhdave joined #lisp 2017-04-30T22:22:33Z presiden-nkrj joined #lisp 2017-04-30T22:22:45Z barton_ joined #lisp 2017-04-30T22:29:27Z DingoSaar joined #lisp 2017-04-30T22:33:40Z puchacz quit (Quit: Konversation terminated!) 2017-04-30T22:35:49Z skeuomorf left #lisp 2017-04-30T22:36:54Z jack_rabbit joined #lisp 2017-04-30T22:37:46Z neoncontrails quit (Ping timeout: 245 seconds) 2017-04-30T22:38:49Z mishoo quit (Ping timeout: 268 seconds) 2017-04-30T22:39:23Z neoncontrails joined #lisp 2017-04-30T22:40:58Z strykerkkd joined #lisp 2017-04-30T22:41:31Z neoncontrails quit (Client Quit) 2017-04-30T22:41:46Z presiden-nkrj quit (Quit: (bye)) 2017-04-30T22:42:52Z adolf_stalin joined #lisp 2017-04-30T22:45:49Z omilu quit (Quit: Lost terminal) 2017-04-30T22:53:00Z drcode quit (Ping timeout: 268 seconds) 2017-04-30T22:53:54Z drcode joined #lisp 2017-04-30T23:02:04Z p_l: _death: don't forget "nor is it guaranteed to ever compile outside of OpenBSD" ;) 2017-04-30T23:02:42Z Draz joined #lisp 2017-04-30T23:04:36Z azzamsa joined #lisp 2017-04-30T23:04:46Z strykerkkd quit (Quit: Leaving) 2017-04-30T23:04:49Z zooey_ quit (Ping timeout: 248 seconds) 2017-04-30T23:05:51Z drdo quit (Ping timeout: 258 seconds) 2017-04-30T23:06:20Z drdo joined #lisp 2017-04-30T23:07:29Z Baggers quit (Remote host closed the connection) 2017-04-30T23:08:07Z zooey joined #lisp 2017-04-30T23:11:01Z pillton: Is there a name for operators like upgraded-array-element-type and upgraded-complex-part-type? 2017-04-30T23:12:14Z pillton: Projection? 2017-04-30T23:14:41Z Bike: like in lattice terms? 2017-04-30T23:15:31Z pillton: Both functions take a type and return a type that is "as close of possible" according to the implementation. 2017-04-30T23:15:56Z pillton: as close as possible sorry. 2017-04-30T23:16:36Z Bike: where's it say that? 2017-04-30T23:17:06Z pillton: "Returns the element type of the most specialized array representation capable of holding items of the type denoted by typespec." 2017-04-30T23:17:22Z pillton: clhs upgraded-array-element-type 2017-04-30T23:17:22Z specbot: http://www.lispworks.com/reference/HyperSpec/Body/f_upgr_1.htm 2017-04-30T23:17:26Z grublet joined #lisp 2017-04-30T23:17:42Z pillton: The "closeness" is subject to constraints. 2017-04-30T23:17:44Z Bike: oh, so not the exact phrase. 2017-04-30T23:18:09Z pillton: Ok sorry. I was paraphrasing. 2017-04-30T23:18:35Z Bike: well, anyway there's only two functions like that in lisp so there's not gonna be a lisp term 2017-04-30T23:18:46Z pillton: These functions remind of me of proximity operators in optimization. 2017-04-30T23:18:57Z pillton: ...which is why I suggested projection. 2017-04-30T23:19:41Z Bike: i guess in the broad meaning of mapping to a subset it is a projection. 2017-04-30T23:20:54Z pillton: Alright, I'll run with that for now until something better enters someone's consciousness. 2017-04-30T23:27:20Z ryanbw joined #lisp 2017-04-30T23:29:00Z ghard`` joined #lisp 2017-04-30T23:29:40Z hhdave quit (Quit: hhdave) 2017-04-30T23:30:38Z nyef: Ah, (ARRAY NIL), yet again. 2017-04-30T23:33:48Z drcode quit (Ping timeout: 240 seconds) 2017-04-30T23:33:50Z ghard`` quit (Ping timeout: 258 seconds) 2017-04-30T23:34:03Z nyef: U-A-E-T requires that there be specialized array types for BIT and CHARACTER (and BASE-CHAR, if it is disjoint from CHARACTER), and 15.1.2.1 requires that a type Tx to be upgraded that is a subtype of type Ty, the upgraded type of Tx must be a subtype of the upgraded type of Ty... And NIL is a subtype of both BIT and CHARACTER. 2017-04-30T23:35:31Z lpaste quit (Ping timeout: 246 seconds) 2017-04-30T23:36:00Z drcode joined #lisp 2017-04-30T23:36:40Z |3b|` is now known as |3b| 2017-04-30T23:39:11Z drcode quit (Excess Flood) 2017-04-30T23:39:23Z nyef: Oh my. 2017-04-30T23:39:48Z lpaste joined #lisp 2017-04-30T23:41:33Z nyef: Issue ARRAY-ELEMENT-TYPE-SEMANTICS:UNIFY-UPGRADING (passed) proposed to eliminate the distinction between type specifiers "for declaration" and "for discrimination". But the FUNCTION System Class has a Compound Type Specifier Description that is documented "can be used only for declaration and not discrimination." 2017-04-30T23:41:36Z azzamsa quit (Ping timeout: 260 seconds) 2017-04-30T23:42:03Z drcode joined #lisp 2017-04-30T23:42:07Z Bike: haha, did it now 2017-04-30T23:42:08Z pillton: Which is fine. It is no different to (let ((x (make-array 1 :element-type 'double-float))) (setf (aref x 0) "hello")) succeededing without error. 2017-04-30T23:43:27Z practica` quit (Read error: Connection reset by peer) 2017-04-30T23:43:32Z Bike: hm, looks like they kind of added it back in a different context 2017-04-30T23:43:44Z Bike: since this declaration/discrimination thing is array based 2017-04-30T23:43:48Z practica` joined #lisp 2017-04-30T23:45:18Z pillton: Lets say element-type constrained the array to only store values of that type. The implementation still has to construct a place that is capable of storing that value. 2017-04-30T23:46:45Z nyef: Now, there's also an Issue FUNCTION-TYPE, which is rather scattered seeming, but looks to have a last update of June '88, as opposed to the adoption of Issue ARRAY-ELEMENT-TYPE-SEMANTICS:UNIFY-UPGRADING, which was adopted in Jan 89. 2017-04-30T23:47:56Z nyef: So, we can argue that no type specifier is legitimately allowed to be "for declaration" as opposed to "for discrimination". 2017-04-30T23:48:24Z nyef: ... And it might be amusing enough to have an "UPGRADED-FUNCTION-TYPE" function. 2017-04-30T23:49:01Z nyef: But the next question that comes to my mind is "does any other type specifier include a distinction between declaration and discrimination?" 2017-04-30T23:49:28Z pillton: I'd argue that all places do. 2017-04-30T23:49:29Z Bike: not that i know of, and it's something i've had to worry about 2017-04-30T23:49:31Z discardedes quit (Remote host closed the connection) 2017-04-30T23:49:52Z Bike: incidentally, the kind of type specifier VALUES is is "specializing" rather than either of those 2017-04-30T23:49:56Z Bike: the type system is kind of egh 2017-04-30T23:50:09Z Bike: and upgraded-function-type would just upgrade everything to 'function 2017-04-30T23:51:35Z nyef: In practice, yes, it probably would just upgrade to FUNCTION. 2017-04-30T23:51:39Z nyef: At least to start with. 2017-04-30T23:52:10Z nyef: But if we can find some use for it, that would be another matter. 2017-04-30T23:52:18Z pillton: It would be interesting to introduce it. 2017-04-30T23:52:50Z Bike: mm, one of the ELS lightning talks was working around being unable to use typep to dispatch on the lambda list shapes of functions 2017-04-30T23:52:54Z Draz quit (Remote host closed the connection) 2017-04-30T23:54:03Z phoe: ayup 2017-04-30T23:54:09Z Draz joined #lisp 2017-04-30T23:54:09Z varjag quit (Ping timeout: 260 seconds) 2017-04-30T23:54:15Z pillton: Couldn't you construct an implementation which changes the calling convention based on the function signature? 2017-04-30T23:54:30Z phoe: tl;dr make a funcallable-standard-object and boom, you can suddenly typep dispatch 2017-04-30T23:54:58Z derrida quit (Ping timeout: 264 seconds) 2017-04-30T23:56:27Z pillton: Why do you need funcallable-standard-object? 2017-04-30T23:56:40Z phoe: to make a runtime dispatch on TYPEP FUNCTION. 2017-04-30T23:56:54Z phoe: clhs typep 2017-04-30T23:56:54Z specbot: http://www.lispworks.com/reference/HyperSpec/Body/f_typep.htm 2017-04-30T23:56:55Z X-Scale joined #lisp 2017-04-30T23:56:58Z phoe: "An error of type error is signaled if type-specifier is values, or a type specifier list whose first element is either function or values." 2017-04-30T23:57:10Z derrida joined #lisp 2017-04-30T23:57:10Z derrida quit (Changing host) 2017-04-30T23:57:10Z derrida joined #lisp 2017-04-30T23:57:11Z phoe: so you cannot (typep foo '(function ...)) 2017-04-30T23:58:00Z pillton: Oh I see. 2017-04-30T23:58:21Z phoe: you can check if something is a function by (typep foo 'function) but you cannot check its arguments or return values this way.