jackdaniel changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook> | Pastebin: <https://plaster.tymoon.eu/>
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
Inline has joined #commonlisp
SunClonus has joined #commonlisp
Inline has quit [Quit: Leaving]
SunClonus has quit [Remote host closed the connection]
Inline has joined #commonlisp
dnhester` has quit [Ping timeout: 246 seconds]
Gleefre has quit [Remote host closed the connection]
Inline has quit [Ping timeout: 268 seconds]
azimut has joined #commonlisp
Inline has joined #commonlisp
dnhester` has joined #commonlisp
amb007 has quit [Ping timeout: 256 seconds]
akoana has joined #commonlisp
dnhester` has quit [Ping timeout: 264 seconds]
pve has quit [Quit: leaving]
ymir has joined #commonlisp
dnhester` has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
dra has quit [Ping timeout: 260 seconds]
ebrasca has quit [Remote host closed the connection]
hineios24 has joined #commonlisp
hineios2 has quit [Ping timeout: 268 seconds]
hineios24 is now known as hineios2
SunClonus has joined #commonlisp
X-Scale has joined #commonlisp
ymir has quit [Remote host closed the connection]
ymir has joined #commonlisp
akoana has quit [Quit: Reconnecting]
akoana has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 255 seconds]
Lord_of_Life has joined #commonlisp
ymir has quit [Ping timeout: 256 seconds]
SunClonus has quit [Quit: Leaving]
SunClonus has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 255 seconds]
josrr has quit [Ping timeout: 260 seconds]
random-nick has quit [Ping timeout: 256 seconds]
Inline has quit [Ping timeout: 264 seconds]
SunClonus has quit [Quit: Leaving]
Inline has joined #commonlisp
occ has joined #commonlisp
jmdaemon has joined #commonlisp
Inline has quit [Ping timeout: 260 seconds]
occ has quit [Ping timeout: 255 seconds]
akoana has quit [Quit: leaving]
occ has joined #commonlisp
NicknameJohn has joined #commonlisp
Inline has joined #commonlisp
Oddity has quit [Read error: Connection reset by peer]
Lord_Nightmare has quit [Quit: ZNC - http://znc.in]
Lord_Nightmare has joined #commonlisp
Oddity has joined #commonlisp
occ has quit [Read error: Connection reset by peer]
occ has joined #commonlisp
benkard has joined #commonlisp
mulk has quit [Ping timeout: 255 seconds]
benkard is now known as mulk
tyson2 has joined #commonlisp
Inline has quit [Quit: Leaving]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 268 seconds]
bilegeek has joined #commonlisp
X-Scale has quit [Quit: Client closed]
istewart has quit [Quit: Konversation terminated!]
X-Scale has joined #commonlisp
dodoyada has joined #commonlisp
azimut has quit [Ping timeout: 255 seconds]
tyson2 has quit [Remote host closed the connection]
triffid has quit [Remote host closed the connection]
bilegeek has quit [Quit: Leaving]
waleee has quit [Ping timeout: 272 seconds]
pfdietz has quit [Quit: Client closed]
brokkoli_origin has quit [Ping timeout: 256 seconds]
brokkoli_origina has joined #commonlisp
igemnace has joined #commonlisp
decweb has quit [Ping timeout: 272 seconds]
triffid has joined #commonlisp
<phantomics> Bubblegumdrop: I tried the lexical let, doesn't work within a with-html-output invocation. You can use it to customize the generation of a tag, but not between tags
notzmv has quit [Ping timeout: 260 seconds]
brokkoli_origina has quit [Ping timeout: 268 seconds]
triffid has quit [Remote host closed the connection]
triffid has joined #commonlisp
notzmv has joined #commonlisp
occ has quit [Ping timeout: 260 seconds]
occ has joined #commonlisp
occ has quit [Read error: Connection reset by peer]
chomwitt has joined #commonlisp
occ has joined #commonlisp
mulk has quit [Ping timeout: 264 seconds]
mulk has joined #commonlisp
chomwitt has quit [Ping timeout: 268 seconds]
Oddity has quit [Remote host closed the connection]
X-Scale has quit [Quit: Client closed]
philipp_ has joined #commonlisp
occ has quit [Ping timeout: 268 seconds]
occ has joined #commonlisp
wacki has joined #commonlisp
Pixel_Outlaw has quit [Remote host closed the connection]
amb007 has joined #commonlisp
msavoritias has joined #commonlisp
jonatack has joined #commonlisp
jon_atack has quit [Ping timeout: 256 seconds]
rgherdt has joined #commonlisp
shka has joined #commonlisp
Lycurgus has quit [Quit: leaving]
varjag has joined #commonlisp
traidare has joined #commonlisp
brokkoli_origin has joined #commonlisp
alcor has joined #commonlisp
dcb has quit [Quit: Connection closed for inactivity]
anthk_ has joined #commonlisp
amb007 has quit [Ping timeout: 256 seconds]
amb007 has joined #commonlisp
son0p has quit [Ping timeout: 246 seconds]
tfeb has joined #commonlisp
tfeb has quit [Client Quit]
mgl has joined #commonlisp
<beach> Is there any sort of consensus as to what FIND-METHOD-COMBINATION should do if given the name of a method combination that has not been defined?
<beach> SBCL FIND-METHOD-COMBINATION returns NIL in that case.
zyni-moe has joined #commonlisp
zyni-moe has quit [Client Quit]
attila_lendvai_ has joined #commonlisp
<lieven> I've never really thought about it but emulating FIND-METHOD seems reasonable to me. that would mean signaling an error unless silenced by the errorp argument.
<beach> That might seem reasonable, except that FIND-METHOD-COMBINATION does not have an optional ERRORP parameter.
<beach> So I suppose the only options are to either always signaling an error, or always returning NIL.
<beach> It might be necessary to return NIL, because I don't think there is any other way to determine whether a particular method combination has been defined.
jmdaemon has quit [Ping timeout: 255 seconds]
<lieven> well, either behaviour can obviously be implemented in terms of the other in a putative closer-mop like library
<younder> For what it is worth beach I think you might be right about LLVM it is to F**G slow
X-Scale has joined #commonlisp
<younder> Also I saw a paper by some google programmer who noticed that the performance of LLVM on Lisp was less than impressive. It seems garbage collection is the alpha and omega of Lisp's and LLVM's support for it doesn't match up
<younder> Yada yada yada the implementer of Zig is writing his own compiler because 'LLVM is too slow'
<younder> Andrew Kelly for the record
<anthk_> zig on i686 doesn't work well, or at all
<anthk_> I tried to compile some osm client for it, didn't work
<younder> Really? It works for me
<anthk_> on his own compiler, well, there's cparser/cproc/scc+qbe for c99
ebrasca has joined #commonlisp
<younder> Well he turns on all the whistles perhaps you computer can't handle AVX or what not
<beach> lieven: Yeah. Thanks for the input.
<beach> younder: Interesting you should bring that up, because I am looking for someone to create a project that takes an IR graph and turns it into native code for various architectures.
amb007 has quit [Ping timeout: 256 seconds]
amb007 has joined #commonlisp
<beach> The current thinking is that the IR graph should be a "sea of nodes" graph, and that the operations should be something like x <- op y z and x <- op y. hayley can correct me if I got this wrong.
<younder> Beach that is a big ask, I will have to think about it. Still it sounds fun
<younder> ARM and Intel architectures I feel reasonably comfortable with
<younder> I suppose that is a start
<beach> You also have to know about things like register allocation algorithms.
dino_tutter has joined #commonlisp
<younder> Yeah I'd have a bit of reading to do
tok has joined #commonlisp
danse-nr3 has joined #commonlisp
<younder> ARM is simple but even Intel is less anemic than it used to be
<younder> register wise
<beach> If I were to do it, I would probably start with RISC-V.
<younder> I take it we are talking mostly 64 bit architectures
<beach> Sure.
<younder> RISC-V is interesting. It does instruction fusion as a approach to SIMD. Sounds like a good idea to me
<hayley> The big issue of LLVM performance isn't GC. I'm not sure how the existing GC interface is so annoying given that Azul created it (to my understanding) for their JVM.
<hayley> RISC-V has explicit (variable-width) vector and (fixed-width) SIMD; fusion is for other things.
danse-nr3 has quit [Remote host closed the connection]
<beach> I wonder to what extent LLVM is a victim of the phenomenon that I often cite, i.e., that it is impossible to write a C++ program that is both modular and fast. They might have chosen "modular".
danse-nr3 has joined #commonlisp
<younder> Modular is always the wrong solution if you ask me. Performant systems tend to be evolved
<hayley> C2 flings arenas around for allocation, and basically does a periodic copying GC by copying from one arena to another.
<beach> If you think "modular" is wrong, I won't encourage you to do the project I just suggested.
_cymew_ has joined #commonlisp
amb007 has quit [Ping timeout: 268 seconds]
<hayley> s/does a periodic copying GC/periodically does a copying GC/
occ has quit [Ping timeout: 256 seconds]
<younder> I like arena allocators. But they ate useless for short lived objects.
<younder> traidare:
<younder> s/ate/are/
<hayley> That seems rather backwards - one doesn't want to keep holding onto long lived objects in an arena. But you can get away without GCing a short lived arena.
<hayley> moon-child convinced me to use on-demand/incremental abstract interpretation, but I haven't fully thought through how I'll make it work.
<younder> Perhaps I should explain as I see it. Arena collectors are used in games for stuff that is relevant for that game level. Perhaps for the length of the mage perhaps only for that level. But for the minutea of function to function allocation you are better off with a stop and copy collector
<younder> Get rid of short lived stuff fast
mm007emko has quit [Ping timeout: 256 seconds]
<younder> Hadley I have a feeling you have proven me wrong. But I need to know how you think
<hayley> A typical copying collector would leave garbage alive for longer than a per-frame arena.
mm007emko has joined #commonlisp
<childlikempress> beach: one of the principal problems with llvm is lack of canonicalisation. the rvsdg paper discusses this a bit https://arxiv.org/pdf/1912.05036.pdf
johnjaye has quit [Read error: Connection reset by peer]
<beach> childlikempress: Interesting, thanks!
synchromesh has quit [Read error: Connection reset by peer]
<younder> Hadley so a all arena collector could work for a Lisp?
synchromesh has joined #commonlisp
<hayley> That's not really an implication of what I said. But you could do something like the ML Kit.
<younder> What is that ML kit?
<hayley> An implementation of Standard ML which uses region inference for memory management. Often the analysis is weak and produces long-lived regions which need GC, but most regions are small and short-lived.
<hayley> (Google first clobbered the Go! name and now they have their own ML Kit. Bastards.)
dnhester` has quit [Remote host closed the connection]
dnhester` has joined #commonlisp
<younder> Funny you should mention ML I though the had move on to OCAML except perhaps that Isabelle group.
<hayley> Don't say that too loud, there's quite a few HOL4 developers at this university. And Google employees too. Maybe I should shut up.
<younder> I actually Like Isabelle and prefer it to Coq but whatever
amb007 has joined #commonlisp
<younder> INIRA boosts Coq
<dnhester`> Hi, does anyone know why when running a function I get a normal result, and if I write it in a macro without quoting, I get an error saying "There is no applicable method for the generic function". It seems to me almost as if the argument is not being evaluated since the compiler presents the full expression instead of the object I am expecting it to be, but then it's not inside the quotes, so I don't know why that would be. Maybe I'm
<dnhester`> missing something else?
<dnhester`> No backquote or regular quote
<younder> Dunno a stale macro is when you haven't compiled the code that uses that macro
<dnhester`> the only reason I'm using a macro is because there are two arguments for the function: one that is the same every time and involves most of the computation, and another variable one. It doesn't make sense to recompute the first one every time, I just wanted to have it computed once at compile time or wherever I call the function instead of every time I execute the function for the variable argument
<dnhester`> younder: sorry, did not follow that]
<dnhester`> The argument is basically an expression which should produce an object.
pve has joined #commonlisp
<younder> dnhester` You need to compile the function that uses the macro every time. Or the change in the macro is lost. thus 'stale' macro
<dnhester`> younder: ah thanks, I was doing it in the REPL with macroexpand-1
<beach> dnhester`: Not sure I understand, but macros receive arguments unevaluated. That's the major difference compared to a function.
<beach> You can avoid that evaluation with a closure.
<beach> dnhester`: (let ((x <long-computation>)) (defun foo (y) ... x ... y ...))
<dnhester`> what do you mean by closure? Here are two versions of the macro: https://plaster.tymoon.eu/view/4141#4141
<dnhester`> The first one works, the second one doesn't
<beach> A closure is like the FOO above, where X is closed over.
<dnhester`> What I wanted was for the expression ,query to be evaluated at compile time instead of being in the let. Maybe that's something the compiler takes care of automatically?
<dnhester`> I want to use that macro inside another function which takes in arguments as well. But the query expression is hard coded in that function, so I wanted to see if there's a way to evaluate it at compile time instead of every time the function runs, because it's the most computationally expensive part of the whole program, but it's always the same...
danse-nr3 has quit [Read error: Connection reset by peer]
danse-nr3 has joined #commonlisp
<younder> A Closure is when you wrap a function in a let (let ((variable value)) (defun myfun () *something that uses variable* )))
<beach> Well, barring the use of EVAL, you can't do that in a macro, because, like I said, the parameter QUERY will contain a form.
<beach> dnhester`: But, again like I said, you can create a closure as I showed above.
<beach> ,(let ((x (expt 10 20))) (defun foo (y) (+ x y))) ,(foo 2)
<ixelp> (let ((x (expt 10 20))) (defun foo (y) (+ x y))) => FOO, while (foo 2) => 100000000000000000002
<younder> In a closure 'variable' is remembered between function calls.
<beach> dnhester`: In that example, the (EXPT 10 20) is evaluated once when the function FOO is defined.
<beach> dnhester`: Then you can call FOO as many times as you want without that expression being re-evaluated.
<dnhester`> beach: thanks. I was doing that in the let statement in the oql-select-2 of the pastebin, but that's the one that gives me the error
pranavats has left #commonlisp [Error from remote client]
<beach> No, you were not. Because QUERY contains a form, not the value of the form, so BUILT-QUERY will receive as the value a form.
<dnhester`> I thought closures where lets. Ok, so I did understand. That's what I'm doing in the pastebin. The version `oql-select` works, but `oql-select-2` doesn't
<dnhester`> ah
<dnhester`> but it's not quoted, so shouldn't it then be evaluated?
<beach> Because macros receive arguments unevaluated.
amb007 has quit [Ping timeout: 246 seconds]
amb007 has joined #commonlisp
<dnhester`> beach: so even though I'm outside the quote, I still have to call (eval query)?
<beach> ,(defmacro foo (x) (print x)) ,(foo (a b c))
<ixelp> (defmacro foo (x) (print x)) => FOO, further (foo (a b c)) ERROR: Unbound variable: B
<beach> I need to come up with a better example.
<dnhester`> ,(defmacro foo (x) (print x)) ,(foo ((+ 1 2 3)))
<ixelp> (defmacro foo (x) (print x)) => FOO, and then (foo ((+ 1 2 3))) ERROR: Car of ((+ 1 2 3)) is not a function name or lambda-expression.
<beach> ,(defmacro foo (x) (print x) nil) ,(foo (a b c))
<ixelp> (defmacro foo (x) (print x) nil) => FOO, while (foo (a b c)) ↩ (A B C) => NIL
<dnhester`> ,(defmacro foo (x) (print x)) ,(foo (+ 1 2 3))
<ixelp> (defmacro foo (x) (print x)) => FOO, while (foo (+ 1 2 3)) ↩ (+ 1 2 3) => 6
<beach> So as you can see, X is bound to the list (a b c).
<dnhester`> ah, so it's not evaluated even outside the quotes because it's just quoted by default. So inside the backquote applying a comma is like replacing a form to be evaluated and then unquoted as well?
<dnhester`> beach: So I really do have to call `(eval)` on that, correct?
<beach> In the return value of the macro (which is NIL) in my example, you typically insert the form as: `(.... ,form), so the form will appear in the expansion of the macro. And if its position there is such that it is evaluated, then it is.
<beach> dnhester`: No, like I said, you shouldn't do this as a macro, because macros receive their argument unevaluated.
<beach> dnhester`: Do it as a closure instead.
<beach> dnhester`: It is almost always wrong to use EVAL, because EVAL does not have access to the lexical environment.
markb1 has quit [Ping timeout: 256 seconds]
<beach> dnhester`: So you can't do things like (let ((x 10)) (eval 'x))
<beach> ... or (let ((x 10)) (eval '(+ x 20)))
rendar has joined #commonlisp
rendar has quit [Changing host]
rendar has joined #commonlisp
<younder> OK beach I'm on you team
<beach> What?
igemnace has quit [Read error: Connection reset by peer]
<younder> I'll write your cross assembler for RISC-V, ARM and Intel
son0p has joined #commonlisp
<dnhester`> beach: ok thanks
<beach> younder: That doesn't sound like what I was asking for, though?
<beach> dnhester`: Sure.
<dnhester`> beach: sorry took time to reply, got stuck fixing some missing code blocks in the reference
<beach> dnhester`: Did what I say make sense?
<beach> *said
<younder> You want to compile from IR to that assembler right?
amb007 has quit [Ping timeout: 260 seconds]
<beach> No, from IR to machine code. Not assembler.
<younder> Not sure what that form is but I'll find out
<beach> And the IR is not related to a particular architecture.
<younder> Right
<beach> Machine code is just bits.
<beach> So I guess a vector of (unsigned-byte 8).
<younder> Machine code is EVERYTHING. It determines how fast stuff will run. But again probably why you want me
mm007emko has quit [Ping timeout: 256 seconds]
<beach> younder: Maybe we should put this off until you know a bit more what you would be getting in to. You might not currently have the required knowledge for it.
mm007emko has joined #commonlisp
markb1 has joined #commonlisp
<younder> probably true. But I am a quick learner
<beach> Good. I would start by reading up on "sea of nodes" IR and register allocation.
azimut has joined #commonlisp
<younder> Fine have you got the web references to those papers?
<beach> There are tons of them. It is probably best to just Google.
<younder> I goggle alot do that shouldn't be a problem.
<ixelp> Sea of Nodes
traidare has quit [Ping timeout: 272 seconds]
<dnhester`> beach: I'm a little confused. I added a couple of possibilities here: https://plaster.tymoon.eu/view/4141#4141 I just wrote comments there, I feel like it's too complicated to express properly in the chat without the context
danse-nr3 has quit [Read error: Connection reset by peer]
danse-nr3 has joined #commonlisp
<dnhester`> beach: sorry for bothering you by asking you to look at code
<ixelp> Register Allocation Algorithms in Compiler Design - GeeksforGeeks
<hayley> Such programming sites tend to be mind-killers but that page on register allocation seems okay.
<younder> thanks hadley
<beach> dnhester`: So split the function into two....
<hayley> "If n variables are live at any point of time then we require ‘n’ registers ." (about linear-scan register allocation) is proven wrong by a later statement about spilling though.
<younder> Come again Beach what is your Internal Representation?
<hayley> I've been reading https://www.ssw.uni-linz.ac.at/Research/Papers/Wimmer04Master/Wimmer04Master.pdf on the linear-scan register allocator of HotSpot C1, which also explains some other analyses (like computing loop depths).
<dnhester`> beach: by the function do you mean `foo` in the comments? Or do you mean `retrieve-and-map-query`?
<dnhester`> ^ beach: by "split the function into two" you mean ...
<beach> dnhester`: (defun make-query-retriever (query) (let ((sql-query (orm....))) (defun retrieve-and-map-query (&optional binds) ...)))
igemnace has joined #commonlisp
<beach> younder: I don't have one that I prefer, which is why I suggested "sea of nodes".
<beach> dnhester`: So you would execute make-query-retriever once, and then you have a function to which you pass only the binds.
<younder> Fine I'll work with what I have. Get back to you later beach
<beach> younder: Great!
<dnhester`> beach: and that function `retrieve-and-map-query` gets the result of `make-query-retriever` by calling it internally?
<dnhester`> internally meaning inside the body
pfdietz has joined #commonlisp
<beach> dnhester`: No, it refers to the lexical variable sql-query which hold the value of the query evaluated once.
<dnhester`> ahh Imissed the parentheses because of the lack of indentation
<beach> dnhester`: Let me type it out for you as a modification of your retrieve-and-map-query: (defun make-query-retriever (query) (let ((sql-query (orm-query-language:make-sql-and-process-query query))) (defun retrieve-and-map-query (&optional binds) (orm-query-language:map-query-results (db-manager:fetch-plist-rows sql-query binds)))))
<beach> dnhester`: Then you do (make-query-retriever <the query that will be evaluated once>) and then
<beach> (retrieve-and-map-query <possible binds>)
dnhester` has quit [Ping timeout: 264 seconds]
<beach> dnhester`: the function RETRIEVE-AND-MAP-QUERY is define inside the let, so the variable SQL-QUERY is in scope in RETRIEVE-AND-MAP-QUERY. That variable holds the value of the costly computation that you wanted to evaluate only once.
pillton has quit [Remote host closed the connection]
mm007emko has quit [Read error: Connection reset by peer]
mm007emko has joined #commonlisp
attila_lendvai_ is now known as attila_lendvai
dnhester` has joined #commonlisp
tyson2 has joined #commonlisp
<dnhester`> beach: thank you. Let me confirm I understood correctly: If I want to use this retrieve-and-map-query in different functions, as long as I called make-query-retriever outside of those functions, I am now avoiding executing make-sql-and-process-query each time any of those "different functions" executes. Is that correct?
<dnhester`> The last question I have (if I understood the above correctly) is that by using `defun retrieve-and-map-query` instead of using `lambda`, the function `retrieve-and-map-query` would be overwritten every time I call `make-query-retriever`, so if I wanted multiple of those functions for multiple types of queries I could just change the defun for a lambda, and then somewhere do a (defvar query-retriever-1 (make-query-retriever
<dnhester`> some-query)). Is that correct?
decweb has joined #commonlisp
ym has quit [Ping timeout: 272 seconds]
random-nick has joined #commonlisp
<beach> Sounds right.
<dnhester`> great, thanks
<beach> Sure.
thuna` has quit [Remote host closed the connection]
<dnhester`> beach: the sounds right includes the last question as well, right?
<beach> Yes.
danse-nr3 has quit [Ping timeout: 255 seconds]
<dnhester`> great, thanks
yitzi has joined #commonlisp
micro has quit [Ping timeout: 255 seconds]
micro has joined #commonlisp
Inline has joined #commonlisp
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
dra has joined #commonlisp
Inline has quit [Quit: Leaving]
triffid has quit [Quit: triffid]
danse-nr3 has joined #commonlisp
dra has quit [Ping timeout: 260 seconds]
<Bubblegumdrop> phantomics with-html-output is a macro so you may need to do it outside of that?
unl0ckd has joined #commonlisp
<phantomics> Bubblegumdrop that's correct, unfortunately afaict there's no way to output just one tag with custom parameters
<Bubblegumdrop> hmm
<phantomics> No way to generate something that just produces one property by itself
<phantomics> "Tag" was incorrect, you can output one tag, but not one tag property like Alpine's x-bind=" var ? 'var-true' : ''"
philipp_ has quit [Ping timeout: 246 seconds]
<Bubblegumdrop> phantomics perhaps take a look at the test/ directory? I'm looking now
<Bubblegumdrop> I learn a lot about lisp projects that isn't necessarily "documented" from the tests
Gleefre has joined #commonlisp
pfdietz has quit [Quit: Client closed]
<dnhester`> Can fdefinition be used with setf for an undefined name? What I want to do is instead of having to do (funcall foo 2) for (defvar foo (lambda (x) (+ x 1))), I want to be able to just do (foo 2). Is the way by doing (setf (fdefinition foo) (lambda (x) (+ x 1)))? I did that and got unbound. When I did (defvar foo nil) and then (setf (fdefinition foo) (lambda (x) (+ x 1))) I got a package lock (which could be ignored) condition. What is
<dnhester`> the correct way of doing this?
<dnhester`> I don't care about defining a variable to be foo, I just want to have a function name for a function that I'm getting as a result of another function
<beach> Yes, (DEFUN FOO ...) expands to something like (setf (FDEFINITION 'FOO) (lambda ...))
<dnhester`> oh, the issue is I missed the quote?
<dnhester`> yeah
<dnhester`> now it works
<dnhester`> thanks!
<dnhester`> silly mistake
<dnhester`> I guess the issue was that the interpreter tried accessing the value for the symbol foo instead of being passed in as an argument the symbol to the fdefinition. right?
<ixelp> fdefinition | Common Lisp (New) Language Reference
<dnhester`> I got fdefinition from searching
<dnhester`> Maybe I'll add something
<beach> Yes, FDEFINITION is a function, so the arguments are evaluated.
<dnhester`> thanks
pfdietz has joined #commonlisp
<dnhester`> can anyone proof read the text I wrote for the reference on fdefinition? https://lisp-docs.github.io/cl-language-reference/chap-5/f-d-dictionary/fdefinition_accessor
<ixelp> fdefinition | Common Lisp (New) Language Reference
josrr has joined #commonlisp
<dnhester`> I know that I have to learn the glossary definitions
<beach> Where does the output (3 bits, #x4 ...) come from? It looks like Emacs Lisp.
<dnhester`> slime sbcl
<dnhester`> sorry, sly sbcl
<beach> Also, the function name does not have to be quoted. If the value of *MUMBLE* is the symbol FOO, it is perfectly fine to pass *MUMBLE* to FDEFINITION. I would instead say...
<beach> something like "notice that FDEFINITION is a function, so that its arguments are evaluated. Thus, if it is desirable to use a literal function name, it must be quoted".
traidare has joined #commonlisp
<dnhester`> I added a sentence between the code blocks "This can be useful when wanting to bind a function returned from another function to a global name." but it's not showing up, I think it takes a while to deploy in the github actions server.
<beach> "a condition will be raised" => "an error will be signaled".
<beach> "If the NAME argument is not quoted, it will be taken to be the name of a variable, and if that variable does not have a value, an error will be signaled" Something like that.
<beach> You got that error message because the value of FOO was NIL. Normally, you would get an unbound variable error, rather than a package lock.
tok has quit [Remote host closed the connection]
<dnhester`> ah
<beach> Try (MAKUNBOUND 'FOO) and then retry (SETF (FDEFINITION FOO) ...)
<dnhester`> beach: thanks, yeah did it with another name and got what was expected
<beach> Good.
<dnhester`> Just pushed the changes, should be available soon but here it shows up faster: https://github.com/lisp-docs/cl-language-reference/blob/main/docs/chap-5/f-d-dictionary/fdefinition_accessor.md
<beach> Looks good.
<beach> Do you use capital letters for symbols, or some other syntax convention?
<beach> I type them here with capital letters because of the limitations of IRC.
Odin-LAP has quit [Quit: This button?]
occ has joined #commonlisp
<dnhester`> ah, I usually write them in lower case, but I have no convention, it's because of a lack of convention, and that the code I've seen has been lower case usually (except for what the REPL prints)
<dnhester`> Should I change the examples to be upper case?
<beach> I think you should use a typewriter font in lower case.
<dnhester`> But I think the reference/spec itself is lower case
<ixelp> fdefinition | Common Lisp (New) Language Reference
<dnhester`> by tyewriter font do you mean mono spaced?
<dnhester`> The code blocks are formatted that way automatically. We can play with the formatting, but it would take time and I'm not sure if it's worth it to invest it in that instead of other improvements to the content
dra has joined #commonlisp
<dnhester`> We could replace it with this: https://orthecreedence.github.io/highlight-lisp/ it looks like it wouldn't be such a big issue, just have to find out how to do it automatically for all the codeblocks. the syntax highlighting is better
<ixelp> Highlighter demo | higlight-lisp (A syntax highlighter for Common Lisp)
<beach> Yes, mono spaced.
chomwitt has joined #commonlisp
dra has quit [Ping timeout: 268 seconds]
kevingal has joined #commonlisp
ronald has quit [Read error: Connection reset by peer]
ronald has joined #commonlisp
ronald has quit [Read error: Connection reset by peer]
attila_lendvai has quit [Remote host closed the connection]
attila_lendvai has joined #commonlisp
<dnhester`> beach: is there any change needed in the website: https://lisp-docs.github.io/cl-language-reference/chap-5/f-d-dictionary/fdefinition_accessor#expanded-reference-fdefinition I believe it's mono spaced by default
synchromesh has quit [Read error: Connection reset by peer]
<ixelp> fdefinition | Common Lisp (New) Language Reference
synchromesh has joined #commonlisp
<beach> Yes, but not the FDEFINITION and NAME between the code blocks. They are in proportional upper case.
ronald has joined #commonlisp
<beach> Probably because you just entered what I typed here.
dlowe has joined #commonlisp
occ has quit [Ping timeout: 260 seconds]
varjag has quit [Quit: ERC (IRC client for Emacs 27.1)]
dodoyada has quit [Ping timeout: 256 seconds]
gorignak has quit [Remote host closed the connection]
danse-nr3 has quit [Remote host closed the connection]
lispmacs[work] has quit [Ping timeout: 246 seconds]
danse-nr3 has joined #commonlisp
occ has joined #commonlisp
gorignak has joined #commonlisp
bendersteed has joined #commonlisp
gorignak has quit [Remote host closed the connection]
gorignak has joined #commonlisp
Eoco has quit [Ping timeout: 255 seconds]
occ has quit [Ping timeout: 246 seconds]
mariari has quit [Ping timeout: 246 seconds]
Eoco has joined #commonlisp
oneeyedalien has joined #commonlisp
fermat has quit [Ping timeout: 245 seconds]
occ has joined #commonlisp
<dnhester`> beach: ah that's what you meant, ok, fixed and pushed it, it'll be online when github finishes the build
<beach> Great!
<dnhester`> :D
dlowe has quit [Remote host closed the connection]
X-Scale has quit [Quit: Client closed]
mariari has joined #commonlisp
tyson2 has quit [Read error: Connection reset by peer]
Odin-LAP has joined #commonlisp
fermat has joined #commonlisp
X-Scale has joined #commonlisp
<dnhester`> A CL ecosystem newbie question: there are multiple very active CL projects which lack multi platform GUIs, and they are resorting to electron and other things which are considered slow and there's critiscism. What exactly is missing? Is that what McCLIM is supposed to do? I'm particularly thinking about lem and Nyxt. Nyxt has been criticized in particular because using electron can be a security vulnerability since it gives access to
<dnhester`> websites to execute code on the computer. I saw there's a rust project for competing with electron, is that basically what we are missing? a multi platform GUI provider?
<beach> I often say that people go to a lot of trouble to avoid learning Common Lisp. I think I can also say that Common Lisp programmers go to a lot of trouble to avoid learning CLIM and McCLIM.
<beach> And, yes, the goal of McCLIM is to provide a Common Lisp only multi-platform GUI library. But we are not there yet, mainly because people prefer to use their time debugging FFI code rather than contributing their preferred addition to McCLIM.
<beach> McCLIM is now a very competent GUI library. It is probably the best CLIM implementation that ever existed. The main complaint people have is that it looks old. But it would not be too hard to improve that.
<beach> Much easier than to debug all those FFI-based solutions. Plus contributing to McCLIM would benefit lots of people. That is not the case with individual FFI solutions.
<dnhester`> Ok, so it makes sense to encourage that development. I can try to get the Nyxt people and the lem people to collaborate. There's enough people actively working on both that it could make an impact. The question is if they will agree
<beach> McCLIM is actively developed, and there are several people helping out.
<beach> Just like you can't convince non-Common Lisp programmers to try Common Lisp very easily, I don't think you can convince FFI GUI programmers to try McCLIM. In my experience, the only thing that works is to show what can be done with good stuff.
jon_atack has joined #commonlisp
<beach> A long time ago, I stopped trying to convince people to do something they don't want to do. It works so rarely that it is not worth the effort.
<dnhester`> beach: before I get in touch with them 1) is this the most current website or is there another fork? https://mcclim.common-lisp.dev/involve 2) Who can I try and put them in contact with for developing the code? 3) about themes: There should probably be an easy way to define themes, so that different themese can be switched with just a line of code.
<dnhester`> just point them to the IRC https://mcclim.common-lisp.dev/involve ?
<beach> The current version is on Codeberg.
jonatack has quit [Ping timeout: 264 seconds]
<beach> There is a #clim channel and jackdaniel is the main maintainer now, and has been for a few years.
<beach> He is very active and very responsive when someone needs assistance.
<dnhester`> ok great, will try to get them in touch, let's see how this goes
<dnhester`> thanks
<beach> Yes, there should be an easy way to define themes, but we can't do that yet.
chomwitt has quit [Ping timeout: 256 seconds]
<beach> That's one thing they will complain about, and instead of making that possible, they spend way more time debugging multi-language FFI solutions.
<beach> I say "they", but I don't mean anybody in particular, not Lem or Nyxt.
<dnhester`> beach: yeah, that could simply be the first TODO item to contribute on. I would imagine the complexity is not really in writing the code but in designing an interface which is sensible
<beach> Sounds right.
bendersteed has quit [Quit: bendersteed]
ldb has joined #commonlisp
<ldb> hello lispers
NotThatRPG has joined #commonlisp
<beach> Hello ldb.
occ has quit [Read error: Connection reset by peer]
yitzi has quit [Remote host closed the connection]
[[PSYCHIATRIST has joined #commonlisp
Pixel_Outlaw has joined #commonlisp
occ has joined #commonlisp
tyson2 has joined #commonlisp
jonatack has joined #commonlisp
jon_atack has quit [Ping timeout: 264 seconds]
X-Scale has quit [Quit: Client closed]
anthk_ has quit [Quit: nyaa~]
gorignak has quit [Quit: quit]
unl0ckd has quit [Ping timeout: 268 seconds]
kevingal has quit [Ping timeout: 264 seconds]
tok has joined #commonlisp
dcb has joined #commonlisp
danse-nr3 has quit [Read error: Connection reset by peer]
danse-nr3 has joined #commonlisp
bjorkintosh has quit [Quit: Leaving]
occ has quit [Ping timeout: 240 seconds]
tok has quit [Remote host closed the connection]
Inline has joined #commonlisp
cage has joined #commonlisp
dnhester` has quit [Ping timeout: 264 seconds]
Odin- has quit [Ping timeout: 256 seconds]
Odin-LAP has quit [Ping timeout: 252 seconds]
johnjaye has joined #commonlisp
awlygj has quit [Quit: leaving]
zxcvz has joined #commonlisp
Inline has quit [Ping timeout: 255 seconds]
<random-nick> I'm pretty sure nyxt can't use mcclim because there's no web engine based on or integrated with mcclim
<random-nick> and web browsers have to let websites execute code on your computer if they want to support javascript?
dnhester` has joined #commonlisp
danse-nr3 has quit [Ping timeout: 264 seconds]
<_death> many moons ago, https://closure.common-lisp.dev/
<ixelp> Closure Web Browser
<random-nick> ok, there isn't one which supports the modern web standards
<beach> Don't web browsers exist just because it would be very hard to write each module as a separate Unix program? We don't have that problem.
<ldb> in fact the very first version was based on webkit and is OS X exclusive
josrr has quit [Remote host closed the connection]
yitzi has joined #commonlisp
<ldb> random-nick: by modern web standards you mean google chrome?
<gilberth> Closure was the first browser to pass the CSS1 Acid Test and CL-HTTPD was the first web server to implement HTTP/1.1.
<random-nick> ldb: no, I mean the documents which describe what google chrome does
<gilberth> At a time you still had a chance. Though I faced the Netscape monopole and current web standard back then meant: "Do whatever Netscape does with this malformed HTML that you have."
<gilberth> See above: Implementing some spec (which one) isn't enough.
igemnace has quit [Quit: WeeChat 4.2.1]
<random-nick> beach: I don't get your point, how would a web browser make sense as separate modules? or do you mean separate modules implementing html, css, js, etc.? in that case, they wouldn't be that useful separately and would probably still end up pretty intertwined
<gilberth> And the whole body of current web standards is way too large and new things are added way too fast as that you would stand any chance without a team of dozens.
<ldb> random-nick: unfortunately the last chance was GTK binding for McCLIM, but both GTK Webkit faded and no effort was made to ha e McCLIM support GTK3
<beach> random-nick: Each rendering module could be a separate program.
<ldb> Closure web browser did use different modules for HTTP HTML CSS JS font image and typesetting
carte has joined #commonlisp
<gilberth> ldb: There is no JS in Closure. And no font rendering.
dra has joined #commonlisp
dra has joined #commonlisp
<beach> ldb: I was talking about web browsers written as Unix programs. In Common Lisp, the modules would naturally be independent because of the superior communication possibilities between Common Lisp programs.
<_death> gilberth: luckily, most existing websites don't change due to w3c introducing a new spec
<gilberth> _death: And? Some will and then there are the bugs. And the body of web standard is huge.
<ldb> gilberth: sorry, I mean lisp scripting
<gilberth> Or: Didn't you ever experience lately that a site works fine with Chrome, but not with Firefox?
<gilberth> ldb: There wasn't a <SCRIPT type="application/lisp">.
<ldb> gilberth: it doesn't mean browsers can not have their extensions
<gilberth> Closure is foremost a CSS1 typesetter. If really wish to see modules, then there is the transport (HTTP, FTP, and local file system access), and HTML which is written in terms of a "CSS application".
<_death> gilberth: and so it's still possible to use a simpler browser if you don't visit websites making use of the newer stuff (often).. and so developing a simpler browser may still have value
<gilberth> ldb: Still, the greatest challenge was being Netscape-compatible. While browsing you won't find a single site that even serves correct HTML. I believe you underestimate that aspect. Implement some conforming say CSS2 renderer, and it'll be useless for day-to-day browsing.
son0p has quit [Ping timeout: 259 seconds]
<gilberth> The only value that I see is as a typesetting component for building your own GUI application. In fact, and I have said that for decades, I believe a newer CLIM should borrow the CSS typesetting model and not confuse display lists with formatting objects.
<gilberth> And I won't recommend to use Closure as a starting point. That code is ancient. Begins with that it uses integers for characters because Lisps were still using 7-bit or 8-bit character data types.
josrr has joined #commonlisp
<gilberth> What survived though is Closure-HTML and Closure-XML. Both are fine, though someone might want to update the former to HTML5 and check that my measurements of Netscape fit with the HTML5 spec. As they finally some 30 years later with HTML5 actually specified Netscape parsing. Hurrah!
wacki has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<ldb> There are independent HTML parsers and typesetting backends there, a CSS paged media typesetting program is much useful than a half baked browser
<gilberth> Closure-HTML is stand-alone it doesn't need the rest. As is Closure-XML.
ebrasca has quit [Remote host closed the connection]
dnhester` has quit [Ping timeout: 255 seconds]
Odin-LAP has joined #commonlisp
oneeyedalien has quit [Quit: Leaving]
kevingal has joined #commonlisp
ldb has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
ebrasca has joined #commonlisp
danse-nr3 has joined #commonlisp
dnhester` has joined #commonlisp
mgl has quit [Ping timeout: 260 seconds]
[[PSYCHIATRIST has quit [Quit: Connection closed]
thuna` has joined #commonlisp
bubblegum has quit [Read error: Connection reset by peer]
bubblegum has joined #commonlisp
synchromesh has quit [Read error: Connection reset by peer]
synchromesh has joined #commonlisp
bubblegum has quit [Ping timeout: 255 seconds]
bubblegum has joined #commonlisp
attila_lendvai has quit [Remote host closed the connection]
attila_lendvai has joined #commonlisp
lispmacs[work] has joined #commonlisp
<lispmacs[work]> I wanted to clone the repository for the lem project, but I keep getting an error part way through the clone
<lispmacs[work]> git clone https://github.com/lem-project/lem.git
<ixelp> GitHub - lem-project/lem: Common Lisp editor/IDE with high expansibility
<lispmacs[work]> "fetch-pack: unexpected disconnect while reading sideband packet"
<lispmacs[work]> wonder if others having same problem
danza has joined #commonlisp
<Bubblegumdrop> I just cloned it recently, sec will look
<Bubblegumdrop> origin https://github.com/lem-project/lem (fetch)
<ixelp> GitHub - lem-project/lem: Common Lisp editor/IDE with high expansibility
<Bubblegumdrop> lispmacs[work] git pull worked for me
<zyd> works fine for me
danse-nr3 has quit [Ping timeout: 256 seconds]
<lispmacs[work]> still having the problem. must be a clog in my Internet pipes
amb007 has joined #commonlisp
<ixelp> git - Github - unexpected disconnect while reading sideband packet - Stack Overflow
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
<Bubblegumdrop> oh man, this poor guy: Still does not find solution. Tried everything, even stupid things like reinstalling system.
<lispmacs[work]> trying reducing pack.window, for starters
<lispmacs[work]> same problem, just much slower to get there
<lispmacs[work]> looks like there are some buffer options to play with
<lispmacs[work]> wonder if I could just clone the last commit
<Bubblegumdrop> Try --depth=1 ?
<lispmacs[work]> yeah, trying it now
<lispmacs[work]> downloading super slow for some unknown reason
<lispmacs[work]> 35 KiB/s
<Bubblegumdrop> are you behind a firewall? honestly try downloading over tor lol
<Bubblegumdrop> do you have another machine you can try on?
<lispmacs[work]> I'm trying it now with torsocks
<lispmacs[work]> appears to be getting stuck at the same place
<Bubblegumdrop> your pipes must be clogged :/
<lispmacs[work]> but I'll give it a minute to see if it actually fails this time
<Bubblegumdrop> I was able to do a clean clone no problem
<Bubblegumdrop> oh, are you on AT&T? I read they're having sporadic outages today.
<lispmacs[work]> nope, failed again
<Bubblegumdrop> even through torsocks? That's pretty bizarre.
<lispmacs[work]> I don't think so, work ethernet through ACS, I believe
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<lispmacs[work]> trying disabling the core compression
<Bubblegumdrop> lispmacs[work] you know what you could do, is go to the github page and just download a zip ^^
<lispmacs[work]> compression didn't make a difference. trying to download the zip file
<Bubblegumdrop> also, just try another random repository
son0p has joined #commonlisp
wacki has joined #commonlisp
bjorkintosh has joined #commonlisp
ello has quit [Read error: Connection reset by peer]
ello has joined #commonlisp
msavoritias has quit [Ping timeout: 255 seconds]
manicennui has joined #commonlisp
NotThatRPG has joined #commonlisp
danza has quit [Quit: Leaving]
a51 has quit [Quit: WeeChat 4.2.1]
a51 has joined #commonlisp
a51 has quit [Quit: WeeChat 4.2.1]
a51 has joined #commonlisp
dra has quit [Quit: Leaving]
scymtym has quit [Ping timeout: 252 seconds]
akoana has joined #commonlisp
synchromesh has quit [Ping timeout: 256 seconds]
synchromesh has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
scymtym has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 29.1]
Irvise_ has joined #commonlisp
dnhester` has quit [Ping timeout: 256 seconds]
scymtym has quit [Ping timeout: 252 seconds]
tyson2 has quit [Read error: Connection reset by peer]
scymtym has joined #commonlisp
beach` has joined #commonlisp
NotThatRPG has joined #commonlisp
pfdietz has quit [Quit: Client closed]
Irvise has quit [Quit: ZNC 1.8.2 - https://znc.in]
a51 has quit [Quit: WeeChat 4.2.1]
beach has quit [Ping timeout: 260 seconds]
scymtym has quit [Remote host closed the connection]
mgl has joined #commonlisp
chomwitt has joined #commonlisp
jonatack has quit [Quit: WeeChat 4.2.1]
_cymew_ has quit [Ping timeout: 256 seconds]
jonatack has joined #commonlisp
notzmv has quit [Ping timeout: 264 seconds]
dnhester` has joined #commonlisp
greaser|q has quit [Changing host]
greaser|q has joined #commonlisp
greaser|q is now known as GreaseMonkey
yitzi has quit [Remote host closed the connection]
a51 has joined #commonlisp
traidare has quit [Ping timeout: 255 seconds]
scymtym has joined #commonlisp
mgl has quit [Ping timeout: 260 seconds]
notzmv has joined #commonlisp
pve has quit [Quit: leaving]
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pillton has joined #commonlisp
NotThatRPG has joined #commonlisp
<Bubblegumdrop> If I have a bunch of nested lists like '(((:|one| "one" :|two| "two" :|three| "three") (:|three| "three")) (:|three| "three"))
<Bubblegumdrop> is there a good way to find all sub lists that contain :|three| ?
<Bubblegumdrop> trivia pattern matcher? Is there a simple solution?
<Bubblegumdrop> I guess I could recursively dolist and (car (member ...))
<gilberth> No matter how deeply nested?
<Bubblegumdrop> yeah sometimes the depth is crazy deep
<Bubblegumdrop> I want to be able to pull out all matching :|three|s
amb007 has quit [Read error: Connection reset by peer]
<Bubblegumdrop> this seems like a pretty good use case for trivia/optima but that's a pretty hefty dependency
<gilberth> Hack: ,(block nil (subst-if nil (lambda (x) (when (and (consp x) (member 'foo x)) (return x))) '((a (b (quux bar foo))))))
<ixelp> (block nil (subst-if nil (lambda (x) (when (and (consp x) (member 'foo x)) (return x))) '((a (b (quux bar foo)))))) => (QUUX BAR FOO)
<Bubblegumdrop> interesting, I will look over subst-if
amb007 has joined #commonlisp
<gilberth> You need to say (lambda (x) (when ...) NIL)
<Bubblegumdrop> that's "return a match or nil"
<gilberth> But it will visit (BAR FOO) and (FOO) as well.
<gilberth> subst-if would subst when that lambda returns T, I want to make it look at what it sees and return to the outer block if happy and return NIL otherwise, so that subst-if continues.
<gilberth> Gross hack, that I use when lazy.
<Bubblegumdrop> I guess gross hacks are the way to go on this one. The input is pretty gross.
zxcvz has quit [Quit: zxcvz]
<Bubblegumdrop> https://github.com/comfyanonymous/ComfyUI/issues/612 this is a well known issue though
<ixelp> [Request] Human Readable Prompt Exportation · Issue #612 · comfyanonymous/ComfyUI · GitHub
<Bubblegumdrop> Thanks gilberth.
<gilberth> Otherwise a (labels ((aux (x) (and (consp x) (if (member 'foo x) "we win" (mapc #'aux x))))) (aux gross-data)) isn't that much longer.
<Bubblegumdrop> labels are so beautiful.
<Bubblegumdrop> labels is equivalent to flet except that the scope of the defined function names for labels encompasses the function definitions themselves as well as the body.
<Bubblegumdrop> I learned something new.
<Bubblegumdrop> Thank you for joining the Stable Diffusion 3 early preview waitlist.
tyson2 has joined #commonlisp
<aeth> you can always just recuse, but if it's really deep you're going to run out of call stack
<Bubblegumdrop> It's not that deep, probably 10-15 levels tops.
chomwitt has quit [Ping timeout: 246 seconds]
mgl has joined #commonlisp
shka has quit [Ping timeout: 268 seconds]
amb007 has quit [Ping timeout: 255 seconds]
amb007 has joined #commonlisp
ymir has joined #commonlisp
<aeth> if it's not deep and you know it's not going to be, then a recursive mapcar or similar is probably the clearest solution
<aeth> if consp mapcar the function itself else do the actual test
<Bubblegumdrop> Ah, that was exactly what I was going to ask. Thanks!
sjl has joined #commonlisp
<aeth> made slightly more complicated by the fact that your base case is also a list (member on the list)
<Bubblegumdrop> I could paste my code I have now if you're interested. I used LOOP :P
<Bubblegumdrop> recurisve mapcar was what I was looking for though
<aeth> ,(defun recursive-member (object) (and (consp object) (or (member :|three| object) (mapcar #'recursive-member object)))) ,(recursive-member (list 42 43 (list :|three|)))
<ixelp> (defun recursive-member (object) (and (consp object) (or (member :|three| object) (mapcar #'recursive-member object)))) => RECURSIVE-MEMBER, further (recursive-member (list 42 43 (list :|three|))) => (NIL NIL (:|three|))
<aeth> the final output might not quite be in the form you want depending on what you want
<gilberth> What's wrong with my AUX from above?
NicknameJohn has quit [Ping timeout: 256 seconds]
mulk has quit [Ping timeout: 272 seconds]
<aeth> ,(labels ((aux (x) (and (consp x) (if (member 'foo x) "we win" (mapc #'aux x))))) (aux (list 42 43 (list :|three|))))
<ixelp> (labels ((aux (x) (and (consp x) (if (member 'foo x) "we win" (mapc #'aux x))))) (aux (list 42 43 (list :|three|)))) => (42 43 (:|three|))
<gilberth> And?
<aeth> ,(labels ((aux (x) (and (consp x) (if (member 'foo x) "we win" (mapc #'aux x))))) (aux (list 42 43 (list 'foo 'foo))))
<ixelp> (labels ((aux (x) (and (consp x) (if (member 'foo x) "we win" (mapc #'aux x))))) (aux (list 42 43 (list 'foo 'foo)))) => (42 43 (FOO FOO))
<aeth> ,(labels ((aux (x) (and (consp x) (if (member 'foo x) "we win" (mapc #'aux x))))) (aux (list 42 'foo (list 'foo 'foo))))
<ixelp> (labels ((aux (x) (and (consp x) (if (member 'foo x) "we win" (mapc #'aux x))))) (aux (list 42 'foo (list 'foo 'foo)))) => "we win"
<aeth> doesn't seem to be correctly behaved?
dra has joined #commonlisp
mulk has joined #commonlisp
<gilberth> "we win" is evaluated each time (member 'foo x) is true. What's wrong about that?
<aeth> ah, yes, ,(labels ((aux (x) (and (consp x) (if (member 'foo x) (print "we win") (mapc #'aux x))))) (aux (list 42 43 (list 'foo 'foo))))
<ixelp> (labels ((aux (x) (and (consp x) (if (member 'foo x) (print "we win") (mapc #'aux x))))) (aux (list 42 43 (list 'foo 'foo)))) ↩ "we win" => (42 43 (FOO FOO))
<aeth> though only once even though FOO appears twice in that sublist
<aeth> it's just side effectful
<gilberth> Bubblegumdrop: Wanted to find every list containing that :|three|. Not the :|three|'s itself. So what's wrong?
sjl has quit [Quit: leaving]
<gilberth> He didn't say that he wants to find a sublist twice. And he didn't say what he wants to do with the sublist.
szkl has quit [Quit: Connection closed for inactivity]
Alfr has quit [Remote host closed the connection]
Alfr has joined #commonlisp
<gilberth> Hence I put just "we win" there. A placeholder for the reader to fill in.
pfdietz has joined #commonlisp
benkard has joined #commonlisp
mulk has quit [Ping timeout: 264 seconds]
benkard is now known as mulk
tyson2 has quit [Remote host closed the connection]
wacki has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<Bubblegumdrop> Thanks friends :)
Alfr has quit [Ping timeout: 268 seconds]
amb007 has quit [Ping timeout: 256 seconds]
blackshuck has joined #commonlisp
amb007 has joined #commonlisp
mulk has quit [Ping timeout: 272 seconds]
mulk has joined #commonlisp
amb007 has quit [Ping timeout: 255 seconds]
blackshuck has quit [Quit: Using Circe, the loveliest of all IRC clients]
Alfr has joined #commonlisp
brokkoli_origin has quit [Remote host closed the connection]
ymir has quit [Ping timeout: 260 seconds]
brokkoli_origin has joined #commonlisp
azimut has quit [Quit: ZNC - https://znc.in]
azimut has joined #commonlisp
attila_lendvai has quit [Ping timeout: 268 seconds]
amb007 has joined #commonlisp
josrr has quit [Remote host closed the connection]
ymir has joined #commonlisp
dino_tutter has quit [Ping timeout: 260 seconds]
ymir has quit [Remote host closed the connection]
mgl has quit [Ping timeout: 268 seconds]
ymir has joined #commonlisp
ymir has quit [Remote host closed the connection]
ymir has joined #commonlisp
akoana has quit [Quit: leaving]
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
ymir has quit [Ping timeout: 260 seconds]
josrr has joined #commonlisp