p_l changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | ASDF 3.3.4
<solrize> is there something like setf that destructures a list? like (destructuring-setf (a b) (1 2)) sets a to 1 and b to 2
<solrize> destructuring-bind makes temporary bindings
<solrize> i guess i can use it though, and set from the values
<Bike> and hide it in a macro if you want
<Bike> but there's no standard operator, no
<solrize> thanks. emacs lisp-mode doesn't seem to understand destructuring-bind so it indents the stuff inside it way too much. but that's ok
<solrize> i'll post the whole code once i'm done if you guys are willing to look at it
<Bike> you could (setf (values a b) (values-list list)), too, probably
<solrize> oh i didn't know about values, let me look that up. thanks
ljavorsk has quit [Ping timeout: 256 seconds]
<buffergn0me> solrize: Weird. Mine indents destructuring-bind normally even with lisp-indent-function being the default 'lisp-indent-function. Emacs 26.2
<solrize> buffergn0me, i expect your emacs and mine do the same thing
<solrize> (destructuring-bind (a b) (2 3)
<solrize> (+ a b))
<solrize> i hopd that the (+ a b) would be indented less
dddddd has quit [Ping timeout: 256 seconds]
<solrize> *hoped
<aeth> solrize: it should be, do you have SLIME? SLIME will indent it properly, but maybe only if SLIME is loaded so it knows it's a &body form
<aeth> SLIME indents &body differently than &rest
<aeth> and since that's an &body instead of an &rest (in most implementations, at least) then that will be correctly indented, unless the implementation used &rest
<solrize> i should probably use slime... i've hard of it
<solrize> heard
<solrize> hmm it's not in melpa?
<aeth> it is, and I have it installed through Emacs's package manager, I think.
<solrize> looking again thanks
<solrize> yeah i see it there, i'm figuring out why my emacs isn't finding it
EvW1 has quit [Ping timeout: 260 seconds]
<buffergn0me> solrize: What is your Emacs version?
<buffergn0me> The standard lisp-mode than comes with 26.2 does the correct indentation
<solrize> 26.1
<solrize> had to refresh package-list. hmm slime is an available obsolete package.
<buffergn0me> You know what? It does not. I have SLIME minor mode and it does something to override lisp-indent-function in a very sneaky and probably bad way.
terpri has quit [Remote host closed the connection]
<solrize> slime indents destructuring-bind better but isn't communicating with inferior-lisp properly... looking into it
terpri has joined #lisp
terpri has quit [Remote host closed the connection]
terpri has joined #lisp
<buffergn0me> solrize: You can add the MELPA package repository to get more recent versions of SLIME and other Emacs packages, here is what I do: https://oneofus.la/files/melpa.el
nicktick has joined #lisp
nicktick has quit [Changing host]
nicktick has joined #lisp
<solrize> hmm ok thanks, meanwhile using older version and investigating how to connect it to inferior lisp... it seems to want to connect to a socket
<pjb> solrize: how do you call a number
<pjb> ?
<solrize> pjb what do you mean?
<pjb> (2 3) is not a valid form.
<solrize> '(2 3) sorry
<pjb> ok.
<solrize> was looking at the indentation not what happens when you execute it
<solrize> it's a perfectly valid s-expression, just don't try to run it
<pjb> solrize: indentation may be shifted when the form is invalid. Perhaps not in this case, but it happens (purposefully).
wxie has quit [Ping timeout: 258 seconds]
shifty has quit [Ping timeout: 256 seconds]
_whitelogger has joined #lisp
bitmapper has quit [Ping timeout: 272 seconds]
zaquest has joined #lisp
buffergn0me has quit [Ping timeout: 260 seconds]
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wxie has joined #lisp
yyyyyy has joined #lisp
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
karswell has quit [Read error: Connection reset by peer]
Fare has joined #lisp
Kundry_W_ has quit [Remote host closed the connection]
buffergn0me has joined #lisp
SGASAU has quit [Remote host closed the connection]
orivej has joined #lisp
SGASAU has joined #lisp
SGASAU has quit [Remote host closed the connection]
kark has joined #lisp
SGASAU has joined #lisp
yyyyyy has quit [Ping timeout: 260 seconds]
nicktick has quit [Remote host closed the connection]
Fare has quit [Ping timeout: 244 seconds]
wxie has quit [Ping timeout: 244 seconds]
Lycurgus has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
pjb` has joined #lisp
Kundry_Wag has joined #lisp
pjb has quit [Ping timeout: 260 seconds]
pjb` has quit [Client Quit]
pjb has joined #lisp
ralt has quit [Quit: Connection closed for inactivity]
nicktick has joined #lisp
turona has quit [Ping timeout: 265 seconds]
davepdotorg has joined #lisp
turona has joined #lisp
Lycurgus has quit [Remote host closed the connection]
pjb has quit [Ping timeout: 265 seconds]
pjb has joined #lisp
carleos has quit [Ping timeout: 272 seconds]
buffergn0me has quit [Ping timeout: 244 seconds]
shifty has joined #lisp
toorevitimirp has joined #lisp
<beach> Good morning everyone!
epony has quit [Quit: reconf]
epony has joined #lisp
_whitelogger has joined #lisp
terpri has quit [Remote host closed the connection]
terpri has joined #lisp
davepdotorg has quit [Ping timeout: 256 seconds]
Bike has quit [Quit: sleep]
Kundry_Wag has quit [Remote host closed the connection]
Bourne has quit [Ping timeout: 264 seconds]
Kundry_Wag has joined #lisp
_whitelogger has joined #lisp
SGASAU has joined #lisp
<solrize> beach, ok though atm i'm not using LOOP and i generally have avoided it so far
<beach> You should not avoid it.
<solrize> to iterate is human; to recurse, divine ;)
<beach> Only of you have to, like for trees and stuff. For linear structures you absolutely should not use recursion in Common Lisp.
<solrize> what about e.g. "while" ?
<beach> What about it?
<solrize> instead of loop
<beach> I don't understand. (loop while <condition> do <form>*)
<solrize> oh there is no function while
<beach> No, and there couldn't be. It would have to be a macro or a special operator, not a function.
<solrize> well there is no while builtin like the one in emacs lisp or in scheme
<solrize> so loop while is how that's done
<beach> LOOP is the preferred iteration mechanism and it can handle many typical looping constructs, including WHILE.
<solrize> yeah it just adds a lot of syntactic hair that lisp mostly avoids
<beach> What?
<solrize> generally lisp avoids having complicated syntax.... LOOP is an exception to that
<beach> Yes, but I would not qualify that as "syntactic hair". It is a highly convenient macro.
<solrize> i will have to read about it, just changing my "while" to "loop while" is throwing errors
<beach> Errors are not "thrown" in Common Lisp. They are "signaled". THROW is an operator that does something entirely different.
<beach> (loop while <condition> do <form>) should work.
<solrize> oh i see, i needed "do"
<solrize> thanks
karlosz has quit [Quit: karlosz]
<beach> Anytime!
karlosz has joined #lisp
Fare has joined #lisp
wxie has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 265 seconds]
patlv has quit [Quit: patlv]
pjb has quit [Ping timeout: 272 seconds]
<solrize> ok here's the problem i'm messing with: https://groups.google.com/forum/message/raw?msg=comp.lang.lisp/Jvrp-MYaRLg/GHyx5KarAAAJ
<solrize> here's my solution: https://kate.hackyon.org/~phr/bellied.lisp
terpri_ has joined #lisp
<solrize> any thoughts?
terpri has quit [Ping timeout: 240 seconds]
<beach> Is n-max the same in each iteration?
<beach> If so, there is no point in passing it as an argument.
<beach> And the entire recursive function looks like it would be better expressed with iteration.
<beach> Some stylistic problems: LOOP keywords should usually be first on a line.
<beach> BELLIED looks like a predicate. Predicates are usually named with a `p' at the end.
<beach> So BELLIEDP I guess.
<solrize> the recursive version is axel's
<solrize> i.e. the one in google groups
<beach> I don't know Axel.
<beach> I take it you are not Axel, then?
<solrize> axel made the google group posting with some different versions of the function and asked for suggestions
<solrize> my version is https://kate.hackyon.org/~phr/bellied.lisp this one is mine
<beach> Got it.
<solrize> i'll change bellied to bellied-p
<solrize> changed
<beach> OK, more stylistic things: An IF without an `else' clause is better expressed with WHEN.
<beach> No need to have a newline after SETF. Vertical space is a precious resource.
<solrize> you mean where i set the two components of current?
<solrize> (setf (run-start current) i (run-length current) 0)
<beach> Yes.
<solrize> is there a way to set both components other than a new make-run ?
<solrize> and is that preferable?
<solrize> yeah i went and di that
<solrize> keep the gc from getting bored :)
<solrize> s/di/did/
wxie has quit [Ping timeout: 272 seconds]
<beach> Hard to say. I don't think I would have bothered with a struct here. But I don't understand the problem. I am just reading the code superficially.
<solrize> yeah the struct means using 2 variables instead of 4
<solrize> i figured that keeps stuff cleaner
<beach> You should put the DO LOOP keyword first on the line before (IF.
<solrize> you mean DO (IF ... ) ?
<beach> Yes, and it should be indented so that it is aligned with FOR.
<beach> But SLIME will do that for you if you have the slime-indentation contribution.
<beach> Looks good.
<solrize> thanks!
<beach> Oh, no need for newline after PROGN either.
heisig has joined #lisp
<solrize> ok
<beach> Sorry, I need to go. I trust that other #lisp participants will help you if you need it.
<solrize> thanks very much
<solrize> i'll post that version
<solrize> https://kate.hackyon.org/~phr/bellied.hs here's my haskell version
buffergn0me has joined #lisp
davepdotorg has joined #lisp
abhixec has joined #lisp
pjb has joined #lisp
SGASAU` has joined #lisp
ArthurStrong has quit [Quit: leaving]
davepdotorg has quit [Ping timeout: 272 seconds]
yankM has quit [Ping timeout: 240 seconds]
SGASAU has quit [Ping timeout: 264 seconds]
terpri_ has quit [Remote host closed the connection]
terpri_ has joined #lisp
Necktwi has joined #lisp
sauvin has joined #lisp
shifty has quit [Ping timeout: 258 seconds]
narimiran has joined #lisp
toorevitimirp has quit [Ping timeout: 258 seconds]
Archenoth has joined #lisp
gravicappa has joined #lisp
Fare has quit [Quit: Leaving]
terpri_ has quit [Remote host closed the connection]
terpri_ has joined #lisp
pjb has quit [Ping timeout: 265 seconds]
<luis> beach: we've recently added slime-indentation to slime-fancy and made slime-fancy the default so it should be on for most people these days
frgo_ has quit [Read error: Connection reset by peer]
JohnMS_WORK has joined #lisp
orivej_ has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
dale has quit [Quit: My computer has gone to sleep]
<beach> luis: Oh, good to know! Thanks!
yyyyyy has joined #lisp
xantoz has quit [Ping timeout: 272 seconds]
xantoz has joined #lisp
random-nick has joined #lisp
Necktwi has quit [Ping timeout: 246 seconds]
Kundry_Wag has joined #lisp
Necktwi has joined #lisp
Kundry_Wag has quit [Ping timeout: 264 seconds]
dalz has joined #lisp
remix2000 has joined #lisp
varjag has joined #lisp
davepdotorg has joined #lisp
davepdotorg has quit [Ping timeout: 265 seconds]
SGASAU` has quit [Remote host closed the connection]
SGASAU` has joined #lisp
ljavorsk has joined #lisp
<solrize> is there a way to set the maximum stack depth? in clisp if that matters i don't see anything about it on clisp.org
<no-defun-allowed> I don't believe so, but what are you doing that blows the stack?
pve has joined #lisp
wxie1 has joined #lisp
ralt has joined #lisp
<solrize> someone wrote a tail recursive function that clisp doesn't optimize
<no-defun-allowed> What function?
<beach> Tail recursion is usually a bad idea compared to iteration.
<beach> solrize: But if you really want to execute it, use a different Common Lisp implementation that optimizes tail calls.
<solrize> https://kate.hackyon.org/~phr/bellied.lisp yeah it's the one that the guy posted on comp.lang.lisp
<solrize> this is the same thing as earlier
<solrize> bellied-checker-helper
<beach> Why do you want to execute it? You made a better version.
Kundry_Wag has joined #lisp
<solrize> just trying it out
<no-defun-allowed> You could rewrite that as a loop, but if you're lazy, (compile 'bellied-checker) will compile that function and hopefully perform the tail call elimination.
<solrize> it works in sbcl
<phoe> Common Lisp implementations do not have to perform TCO
<solrize> hey yeah, using compile does the TOR
<phoe> so the fact that it works in SBCL doesn't say anything about it needing to work in CLISP
Necktwi has quit [Ping timeout: 240 seconds]
<solrize> TRO
<solrize> yeah i mean clisp did the TCO after using compile
<no-defun-allowed> You could probably write bellied-checker-helper using a LOOP quite easily.
<beach> no-defun-allowed: solrize already did.
<solrize> there's already a loop version
<phoe> I see no problem then
<no-defun-allowed> Indeed you did. My bad.
<solrize> np
Kundry_Wag has quit [Ping timeout: 260 seconds]
pjb has joined #lisp
<solrize> the loop version is very imperative
<phoe> it is, yes
<phoe> CL is a multi-paradigm language and iteration is best done in an imperative way rather than via tail calls
<solrize> that sounds single paradigm to me ;)
<solrize> i still want to check out the iterate package
<buffergn0me> LOOP also does not have enough parentheses, DO is better
<solrize> heh
<solrize> https://kate.hackyon.org/~phr/bellied.hs here's my haskell version
liberliver has joined #lisp
davepdotorg has joined #lisp
Cymew has joined #lisp
davepdotorg has quit [Ping timeout: 246 seconds]
dddddd has joined #lisp
wxie1 has quit [Ping timeout: 256 seconds]
<buffergn0me> I had to go to comp.lang.lisp to look this up, because I had no idea from the code what was going on
<buffergn0me> This pot-bellied number nonsense is just a distraction
<buffergn0me> This is a variation of the popular "longest consecutive sequence" interview question
<solrize> buffergn0me, yeah i put a cll link further up
<buffergn0me> I read my news the old-fashioned way, from a Usenet server. Also I missed the link
<buffergn0me> There is no need to do so much consing in your Haskell version
<buffergn0me> Fill a 1000 element array such that index i corresponds to i+1000 integer, the contents of index i is a boolean to indicate that i+1000 is bellied or not
yankM has joined #lisp
<buffergn0me> Then do the "longest consecutive sequence" algorithm the best way you know how. Should be linear time with constant space if I remember correctly from when I did it last time
<solrize> i wrote the haskell version the simplest possible way. maybe the compiler can eliminate some consing
pjb has quit [Ping timeout: 256 seconds]
<solrize> simplest way i saw, anyway
<solrize> i'm not sure but i think it may run in constant space
<solrize> if the maximumBy can be optimized for strictness
<solrize> i'm not good at examining GHC Core to tell how much consing is really going on
<buffergn0me> Maybe I am not reading gby right. How many [[a]] is it going to make?
<solrize> buffergn0me, it will make however many, but the thing is it's lazy evaluation, so they won't necessarily all be in memory at the same time
<solrize> it's like iterators in python
<solrize> it yields them one by one, rather than consing up a list and returning it
<buffergn0me> But I think maximumBy has to examine all of them?
<solrize> maximumBy reads them one at a time and keeps a running maximum. if nothing else needs them then they can be gc'd as it goes along
<solrize> or the compiler can sometimes completely eliminate the intermediate lists
<solrize> (same as C more or less)
<aeth> solrize: Imo, Common Lisp is more of a language for writing functional and/or declarative languages than it is one itself.
<buffergn0me> I would be very surprised in this case, there are not many intermediate things to fuse
<solrize> interesting i hadn't thought of it that way
<solrize> buffergn0me, yeah i don't know
<solrize> it's doable in principle, i think, but asking a bit much in practice
<solrize> i know there's something called foldr/build fusion which is very good at eliminating intermediate lists, so you can often speed up code by writing in that style, but i've never really understood it
<solrize> aeth i find CL pretty practical if a bit old fashioned, but if i were writing a compiler i'd almost surely use haskell
<buffergn0me> Well, the problem is it can eliminate the intermediate steps, but not the produce-list consume-list on the ends
kpoeck has joined #lisp
<solrize> [0..9999] produces the list, and maximumBy which is a fold, consumes it
<aeth> solrize: I suppose it depends on what kind of language you're writing and what languages you know. If you are writing a language in the Lisp family, then the easiest "compiler" would probably be to compile to CL or Racket.
<buffergn0me> What I am wondering about is, is there a way to do longest consecutive sequence on bit patterns efficiently?
<buffergn0me> Find the longest consecutive run of 1s
<buffergn0me> You can represent the problem as an 8999 long bit vector
<solrize> aeth, fair point, but that compiler could be written in haskell?
<solrize> i've never done anything really substantial in CL
<solrize> on bit patterns, like you have a long bit vector in machine words in memory?
<solrize> yeah i guess so, have some 8-bit lookup tables
<aeth> solrize: maybe in Yale Haskell! https://github.com/haskell-lisp/yale-haskell
<solrize> haha
<solrize> yeah that was the original haskell implementation
<solrize> i don't know if ML existed then
<solrize> it must have hmm
<p_l> ML is significantly older than Haskell
<p_l> (ML is also older than Miranda)
buffergn0me has quit [Ping timeout: 244 seconds]
<p_l> if Miranda had nicer license, there is huge chance Haskell wouldn't happen
shangul has joined #lisp
<solrize> they finally fixed the miranda license a few months ago ;)
<p_l> in that time enough scots drunk enough alcohol to replace it thrice, so a bit late ;)
<solrize> haha
<p_l> the amount of haskell in glasgow-edinburgh belt is way high
<solrize> even the lispers there use -fglasgow_exts ;)
<solrize> is that where you're from?
davepdotorg has joined #lisp
shifty has joined #lisp
davepdotorg has quit [Remote host closed the connection]
davepdotorg has joined #lisp
<p_l> nope, just spent 4.5 year in Aberdeen University
<solrize> heh
<solrize> zzz
<solrize> may try to do an SQL version of that problem tomorrow ;)
toorevitimirp has joined #lisp
nicktick has quit [Remote host closed the connection]
karlosz has quit [Quit: karlosz]
Lord_of_Life has quit [Ping timeout: 260 seconds]
Lord_of_Life_ has joined #lisp
Lord_of_Life_ is now known as Lord_of_Life
v88m has quit [Ping timeout: 246 seconds]
shifty has quit [Ping timeout: 246 seconds]
shifty has joined #lisp
v88m has joined #lisp
luckless has joined #lisp
ft has quit [Ping timeout: 256 seconds]
amerigo has joined #lisp
sdumi has quit [Ping timeout: 264 seconds]
sdumi has joined #lisp
orivej_ has quit [Ping timeout: 256 seconds]
orivej has joined #lisp
davepdotorg has quit [Remote host closed the connection]
pjb has joined #lisp
Bourne has joined #lisp
orivej has quit [Read error: Connection reset by peer]
shifty has quit [Ping timeout: 265 seconds]
shifty has joined #lisp
davepdotorg has joined #lisp
orivej has joined #lisp
<splittist> Silly question: I have an extended function name (i.e. it could be (setf foo) ) in a vrbl. I want to funcall (or equivalent) the function of that name. How do I do that?
<Shinmera> use fdefinition
<jackdaniel> splittist: (funcall #'(setf cursor-visibility) t)
<splittist> Shinmera: thanks!
Kundry_Wag has joined #lisp
davepdotorg has quit [Remote host closed the connection]
davepdotorg has joined #lisp
corpix has quit [Remote host closed the connection]
<jackdaniel> how cruel, my heart is broken :)
Kundry_Wag has quit [Ping timeout: 256 seconds]
jeosol has quit [Remote host closed the connection]
Bike has joined #lisp
sdumi has quit [Ping timeout: 260 seconds]
davepdotorg has quit [Remote host closed the connection]
davepdotorg has joined #lisp
pjb has quit [Ping timeout: 244 seconds]
<solrize> wow
<solrize> that almost looks like partial application ;)
<phoe> what exactly
<phoe> (setf (cursor-visibility) t) === (funcall #'(setf cursor-visibility) t) in most cases
milanj has joined #lisp
Kundry_Wag has joined #lisp
gxt has quit [Ping timeout: 240 seconds]
ft has joined #lisp
dalz has quit [Remote host closed the connection]
scymtym has quit [Remote host closed the connection]
Kundry_Wag has quit [Ping timeout: 260 seconds]
gxt has joined #lisp
ljavorsk has quit [Ping timeout: 264 seconds]
shifty has quit [Ping timeout: 240 seconds]
shifty has joined #lisp
<splittist> but (let ((n '(setf cursor-visibility))) (funcall n t)) => ...
heisig has quit [Quit: Leaving]
<phoe> (let ((n (fdefinition '(setf cursor-visibility)))) ...)
<phoe> or #'
<phoe> you can't funcall a list
<phoe> but that's not partial application though
<phoe> that's a regular function call
<splittist> phoe: exactly. Hence my thanks to Shinmera. It compiles, so I'll ship it.
davepdotorg has quit [Remote host closed the connection]
sdumi has joined #lisp
ft has quit [Remote host closed the connection]
RedMallet has joined #lisp
Josh_2 has quit [Remote host closed the connection]
solrize has quit [Ping timeout: 260 seconds]
Josh_2 has joined #lisp
scymtym has joined #lisp
solrize has joined #lisp
Kundry_Wag has joined #lisp
<phoe> Would there be interest in a CI service that runs tests on the Quicklisp-provided software?
<phoe> Like, basically, a server that pulls bleeding-edge versions of software from the Quicklisp list and goes (asdf:test-system) on them
<phoe> and *somehow* parses the results
<Xach> phoe: yes
yyyyyy has quit [Remote host closed the connection]
yyyyyy has joined #lisp
Kundry_Wag has quit [Ping timeout: 265 seconds]
X-Scale` has joined #lisp
<phoe> Xach: probably the biggest requirement for that is the thing we've discussed previously - a yes/no answer from ASDF:TEST-SYSTEM that tells us whether a test suite has succeeded or not
<phoe> or rather, whether anything has gone wrong or not
X-Scale has quit [Ping timeout: 260 seconds]
<jackdaniel> phoe: cl-test-grid does that (it takes the last ql release though, you'd need to create a local "early" distribution)
[X-Scale] has joined #lisp
<phoe> jackdaniel: perfect
rogersm has joined #lisp
[X-Scale] is now known as X-Scale
<Xach> taking the last ql dist has a huge amount of value too. i only test on sbcl on linux. more testing would help improve libraries and implementations.
<Xach> "test" in the build sense
<Xach> so even running test suites on the latest would increase information
<phoe> well obviously, yes, software needs to build in order to be testable
<jackdaniel> I think that some folks run cl-test-grid on regular basis
X-Scale` has quit [Ping timeout: 260 seconds]
<phoe> yes, I see that
<jackdaniel> and results are publicly available
<jackdaniel> as some folks can see, I'm running it mainly for regression testing before a new release
<phoe> yes
* phoe thinks
davepdotorg has joined #lisp
<pve> was there some conclusion in the discussion of getting a yes/no from asdf:test-system? (i missed it)
<phoe> pve: nope
<jackdaniel> it was implicit: I've tried to convey the information, that cl-test-grid gets the yes/no from the test-system
<jackdaniel> with some custom curation which varies between libraries afair
davepdotorg has quit [Remote host closed the connection]
davepdotorg has joined #lisp
gko has joined #lisp
monokrom has joined #lisp
davepdotorg has quit [Remote host closed the connection]
corpix has joined #lisp
davepdotorg has joined #lisp
SGASAU` has quit [Quit: ERC (IRC client for Emacs 26.3)]
<phoe> a daily test run on multiple implementation would likely spam the existing infrastructure with a lot of information
<phoe> I don't think it's a good idea to post regular runs there
SGASAU has joined #lisp
<pve> am I wrong in thinking that the least amount of work would be needed if the major testing libraries were patched with a "we're running asdf:test-system now"-mode, which would result in them returning something like :success or :failure?
nowhere_man has joined #lisp
<pve> or is ad-hoc parsing etc the way to go?
<phoe> pve: depends on the systems' TEST-SYSTEM method - if they directly invoke the test framework, then that'd work
<pve> perhaps they could signal success with a condition?
<Xach> so when i was last thinking about this, i was thinking about something not directly inside the test framework
<Xach> but that for each project, you could have a file to load. if the file loaded without a non-local transfer of control, things "passed"
<Xach> that would allow people to add things that were important to them to third-party libraries that might not have the tests they wanted
<Xach> you could have more than one file
dmc00 has joined #lisp
kpoeck has quit [Remote host closed the connection]
solrize has quit [Changing host]
solrize has joined #lisp
corpix has quit [Quit: corpix]
yankM has quit [Ping timeout: 256 seconds]
pjb has joined #lisp
Kundry_Wag has joined #lisp
<pve> now I don't know anything, but would something like this work:
corpix has joined #lisp
<phoe> pve: hmmmm
jw4 has quit [Read error: Connection reset by peer]
jw4 has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
<_death> if you do that, why not unconditionally signal a condition that may contain more information about the run.. basically it's a hook
rpg has joined #lisp
<pve> yes of course, I was just trying to keep it simple
heisig has joined #lisp
EvW has joined #lisp
yyyyyy has quit [Ping timeout: 260 seconds]
<easye> What's the current hotness for paste bots now that paste.lisp.org is no more?
<easye> selwyn: thanks. I thought Shinmera has a pastebot, but didn't have the URI.
<selwyn> no problem
<easye> Of course it works with EWW. Thanks Shinmera!
orivej has quit [Quit: No Ping reply in 180 seconds.]
Necktwi has joined #lisp
orivej has joined #lisp
bitmapper has joined #lisp
pjb has quit [Ping timeout: 272 seconds]
EvW has quit [Ping timeout: 252 seconds]
amerigo has quit [Quit: Connection closed for inactivity]
shka_ has joined #lisp
Aurora_v_kosmose has quit [Quit: brb]
<luis> with-upgradibility drives me mad!
toorevitimirp has quit [Remote host closed the connection]
patlv has joined #lisp
<luis> *upgradability
rixard has quit [Read error: Connection reset by peer]
<luis> It breaks M-. so badly. :-(
rixard has joined #lisp
ljavorsk has joined #lisp
cosimone has joined #lisp
EvW has joined #lisp
dalz has joined #lisp
elflng has quit [Ping timeout: 240 seconds]
<phoe> luis: the question is, (how) do we fix it
davepdot_ has joined #lisp
terpri_ has quit [Remote host closed the connection]
davepdotorg has quit [Ping timeout: 256 seconds]
<_death> by making a pull request and hoping for the best
terpri has joined #lisp
<phoe> what is supposed to go in that pull request though
<_death> use defun*/... directly into of this macro, whose sole purpose is to substitute names for other names
<_death> *instead of
frgo has joined #lisp
JohnMS_WORK has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
elflng has joined #lisp
jw4 has quit [Read error: Connection reset by peer]
jw4 has joined #lisp
ayuce has joined #lisp
terpri has quit [Remote host closed the connection]
terpri has joined #lisp
davepdot_ has quit [Remote host closed the connection]
terpri has quit [Remote host closed the connection]
terpri has joined #lisp
ahungry has joined #lisp
davepdotorg has joined #lisp
Aurora_v_kosmose has joined #lisp
<jmercouris> is there a difference between something in my sbclrc and something in my source?
<jmercouris> for example: "(pushnew "/opt/local/lib/" cffi:*foreign-library-directories* :test #'equal)" in my sbcl rc vs. directly in the source
<phoe> jmercouris: yes, there is a difference of when the statement will be executed
RedMallet has quit [Quit: WeeChat 2.8]
<jmercouris> OK
<jmercouris> that's true
<jmercouris> let me post my practical question, one moment please
davepdotorg has quit [Ping timeout: 272 seconds]
pjb has joined #lisp
<jmercouris> so I find myself having to push a foreign library TWICE
<jmercouris> otherwise my program cannot find it
<jmercouris> please note that I am pushing these paths because I am using Shinmera's deploy and trying to make an app bundle
<jmercouris> (at-init ...) macro in cl-cffi-gtk, well, it doesn't find things
<phoe> non-toplevel EVAL-WHEN is meaningless
<jmercouris> here is that macro
<jmercouris> Yes, I know, this is not my source code, I also was thinking what is the point of that
<phoe> oh! it is toplevel then
<jmercouris> is it though? I didn't look at the macro transformation
<phoe> it expands into a PROGN
<jmercouris> ah, yes
<jmercouris> I'm not even sure why cl-cffi-gtk does this at-init business
<jmercouris> anyways, it circumvent's deploy's loading of foreign libraries
<jmercouris> I'm not sure how to proceed from here, but cffi:*foreign-library-diretories* is normally NIL within the at-init body
<jmercouris> whereas it should obviously not be...
shangul has quit [Ping timeout: 265 seconds]
<jmercouris> should I modify deploy? or modify cl-cffi-gtk, or patch or whatever
<jmercouris> and why must I modify the foreign-library-directories twice???
<phoe> how do you build your stuff
<jmercouris> that is what makes the least amount of sense to me
<phoe> does your build system run the lisp RC file before starting to build your software?
<jmercouris> I just do (asdf:make :xyz)
davepdotorg has joined #lisp
<jmercouris> I run SBCL normally, so yes it will load my sbclrdc
<jmercouris> s/sbclrdc/sbclrc
shangul has joined #lisp
davepdotorg has quit [Remote host closed the connection]
davepdotorg has joined #lisp
jonatack has quit [Quit: jonatack]
<jmercouris> it seems unless I add the foreign library directories WITHIN the at-init, it doesn't work
<jmercouris> I tried declaring it as a top level within the glib package, but NOTHING
<phoe> is that variable rebound somewhere?...
<jmercouris> appears no
<jmercouris> I grepped for cffi:*foreign-library-directories*
<jmercouris> is there any logical reason why someone would load foreign libraries NOT at the top level?
<jmercouris> any reason why I should not just move all of these out of this at-init macro?
<phoe> no idea
<jmercouris> Dieter Kaiser has both blessed and cursed me simultaneously
<jasom> I remember that some implementations will work fine without something like that, but others will not reload the library automatically when loading from an image
<jasom> IIRC ccl and sbcl do it opposite, but I don't remember which does which
<Bike> this at-init thing uses a lambda that's run at initialization time, and the forms in there won't be top level
<Bike> so there's a reason
<jasom> also this may have changed. Also they shouldn't be doing a define-foreign-library in the at-init, just the loading of the foreign library
<jmercouris> there may not be a logical reason
<jmercouris> but probably a reason
<jmercouris> so I did the following: https://pastebin.com/v2mgajZg
<jmercouris> and it loads almost all of the libraries, but fails at libcairo...
<jmercouris> strange strange
<jmercouris> does exist: lrwxr-xr-x 1 root admin 16 Oct 28 2019 libcairo.dylib -> libcairo.2.dylib
<jmercouris> dlopen(libcairo.dylib, 10): image not found.
<jmercouris> perhaps I will see if the foreign-library-paths are yet again reset
rippa has joined #lisp
<luis> phoe: yeah, what _death said. use defun* and defgeneric* directly.
<phoe> luis: if it means anything, I can give you a thumbs-up on the MR when you submit it.
<luis> :D
<phoe> I don't think I can write much myself - I suffer from a writer's block at the moment. I can't stand looking at my book anymore, and that's troublesome, because review PRs and issues are waiting to be merged.
<phoe> And I have no idea how to proceed, since a deadline for passing it to Apress is already established. :(
rozenglass1 has quit [Ping timeout: 272 seconds]
<jmercouris> passed, or established?
<phoe> established - 22nd of May
<phoe> that's roughly in a week
<splittist> but I'm waiting until I read the book to actually use conditions properly!
theseb has joined #lisp
<phoe> I could use someone to help me handle the reviewer remarks
<phoe> it's basically been a sprint for me, and I guess I'm exhausted after it
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
davepdotorg has quit [Remote host closed the connection]
<jmercouris> list of marks?
<jmercouris> what is it? mostly grammatical fixes and wording?
<luis> jmercouris: *foreign-library-paths* is a lousy mechanism because dlopen() doesn't know about it so libcairo.dylib can't find its dependencies
<jmercouris> luis: I use rpaths within libcairo.dylib
<jmercouris> luis: so it CAN find its dependencies
<phoe> mostly, yes, though there are also some related to content
davepdot_ has joined #lisp
<jmercouris> this cl-cffi-gtk is driving me crazy
<jmercouris> deploying it is a nightmare, even getting it to run properly on macOS took weeks
<jmercouris> it literally felt like blind incantations
<jmercouris> phoe: how about this, I go through and fix grammatical things, and you figure out cl-cffi-gtk issue for me :-D?
orivej has quit [Ping timeout: 256 seconds]
<luis> jmercouris: hmm. interesting. didn't know about that mechanism, is there a man page describing it?
<jmercouris> luis: not that I know of, but you can read more about it here: https://www.mikeash.com/pyblog/friday-qa-2009-11-06-linking-and-install-names.html
<jmercouris> I even wrote a little tool to update these paths
<jmercouris> son of a potato, I need to know why cl-cffi-gtk is doing this nonsense
davepdot_ has quit [Remote host closed the connection]
davepdotorg has joined #lisp
rpg has joined #lisp
<jmercouris> the docstring is wholly unhelpful
FreeBirdLjj has joined #lisp
scymtym_ has joined #lisp
davepdot_ has joined #lisp
scymtym_ has quit [Remote host closed the connection]
scymtym has quit [Ping timeout: 260 seconds]
scymtym has joined #lisp
FreeBirdLjj has quit [Ping timeout: 260 seconds]
<jmercouris> as far as I can discern the at-init is because: It is used to reinitialize the libraries when the dumped image is loaded. (Works only on SBCL for now).
<jmercouris> as jasom hinted
<jmercouris> however why this when-top level nonsense? the at-init macro ensures only calling after sb init hooks
<jmercouris> THE PLOT THICKENS FURTHER
davepdotorg has quit [Ping timeout: 265 seconds]
<phoe> jmercouris: I can't do mac things though
<jmercouris> I believe in you phoe
<jmercouris> you must believe in yourself
<jmercouris> can you remove this at-init nonsense from the codebase?
<jmercouris> I'm just kidding of course, I'm trying to sound like morpheus or something
<jmercouris> sbcl at init hooks run before anything else I take it?
__jrjsmrtn__ has joined #lisp
<jmercouris> "A list of function designators which are called in an unspecified order when a saved core image starts up, after the system itself has been initialized."
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jmercouris> *init-hooks* SBCL
_jrjsmrtn has quit [Ping timeout: 256 seconds]
shifty has quit [Ping timeout: 256 seconds]
rozenglass1 has joined #lisp
rpg has joined #lisp
frgo_ has joined #lisp
frgo has quit [Ping timeout: 240 seconds]
<DavdL[m]> Hello ! I had a question about quicklisp. Is it possible to choose which version of a lib I want to use ? I think it's not possible, but then, why ? Could someone explain to me?
sdumi has quit [Ping timeout: 258 seconds]
<phoe> DavdL[m]: It is, but it's not obvious
<phoe> Quicklisp has a concept of a "dist" which is a whole snapshot of the Lisp world taken at a given time and distributed together
<phoe> So if you are using a dist from e.g. December 2019, then you are using software as it was when the dist was created in Dec 2019
<phoe> The easiest way to control versions of single libraries is to clone them into ~/quicklisp/local-projects/ - ASDF systems from there override the ones downloaded by Quicklisp
<phoe> so you can download a bleeding edge FOOBAR and store it at ~/quicklisp/local-projects/foobar/
<phoe> And when you go (ql:quickload :foobar), this bleeding-edge version will be loaded
<phoe> When you go (ql:quickload :bazquux) and system BAZQUUX depends on FOOBAR, it will use that newer version of the library, too
<DavdL[m]> Ok! Thank you for the explanation :)
sdumi has joined #lisp
<phoe> no problem!
<phoe> feel free to post any questions you have here
<DavdL[m]> Sure, will do.
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
davepdot_ has quit [Quit: Leaving...]
EvW has quit [Ping timeout: 244 seconds]
orivej has joined #lisp
Cymew has quit [Ping timeout: 272 seconds]
EvW has joined #lisp
<jackdaniel> oh oh, some polish words in unicode names: #\LATIN_SMALL_LETTER_S_WITH_OGONEK :-)
<jackdaniel> literally "ogonek" means "little tail"
<phoe> it's an international term!
remix2000 has quit [Quit: remix2000]
<phoe> ǫbvįǫųsly̨ thęsę ąrę thę bęst
efm has quit [Read error: Connection reset by peer]
EvW has quit [Ping timeout: 260 seconds]
<MichaelRaskin> I am not able to suppress perceiving it as «little fire/flame» instead of «little tail» anyway
efm has joined #lisp
<phoe> Russian folk do not need to worry themselves about ogonkis
<selwyn> Ǭ_Ǭ
<phoe> they have отнег рговлемз though
* phoe afk
catern has joined #lisp
<jmercouris> their λ looks so strange to me
<jmercouris> what was the rationale for changing its shape...
terpri has quit [Remote host closed the connection]
jeosol has joined #lisp
terpri has joined #lisp
jonatack has joined #lisp
terpri has quit [Remote host closed the connection]
terpri has joined #lisp
rogersm_ has joined #lisp
sdumi has quit [Ping timeout: 246 seconds]
gko has quit [Ping timeout: 256 seconds]
dale_ has joined #lisp
dale_ is now known as dale
sdumi has joined #lisp
rogersm_ has quit [Remote host closed the connection]
rogersm_ has joined #lisp
rogersm_ has quit [Remote host closed the connection]
pjb has quit [Ping timeout: 246 seconds]
yankM has joined #lisp
jayspeer has joined #lisp
remix2000 has joined #lisp
EvW1 has joined #lisp
pjb has joined #lisp
karlosz has joined #lisp
bitmapper has quit []
milanj has quit [Read error: Connection reset by peer]
milanj has joined #lisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
akoana has joined #lisp
theBlackDragon has quit [Remote host closed the connection]
<theseb> Why is progn considered a special form? I don't see any deviations from the standard eval rules with it
theBlackDragon has joined #lisp
<beach> Maybe that it preserves top-level-ness.
<phoe> ^
<phoe> you do not get that with standard function calls
<theseb> beach: by "preserve top level-ness" does that mean..."ignore local environment" ?
<phoe> nope, it means "preserve toplevelness"
<phoe> clhs 3.2.3.1
<specbot> Processing of Top Level Forms: http://www.lispworks.com/reference/HyperSpec/Body/03_bca.htm
<phoe> some forms, when they are toplevel, are processed in a special way
<theseb> ok thanks
<Bike> i suppose that that's it, though. versus (defun progn (&rest args) (first (last args)))
<phoe> yes
<Bike> ah, no, wait, that wouldn't preserve multiple values.
<_death> it also doesn't need to hold on to the intermediate values
<Bike> yeah, but that's just an efficiency concern, not semantics.
<Bike> you could define progn like this and then have a smart enough inliner to handle it efficiently
<Bike> other than the values thing and top level thing
rogersm_ has joined #lisp
Bourne has quit [Ping timeout: 272 seconds]
<beach> Yeah, definitely values.
rogersm_ has quit [Ping timeout: 246 seconds]
<pjb> theseb: note that the notion of special form is rather useless: it CAN be implemented as a macro!
<theseb> Bike: what do you mean by holding on to values?
<Bike> (progn (values 1 2)) => 1, 2
<Bike> whereas (identity (values 1 2)) => 1
<pjb> theseb: also, any CL macro CAN actually be implemented as a special form by your implementation!
<pjb> theseb: also, any CL function call CAN actually be open-coded, which is like being a special form!
<Bike> lisp has a multiple value return mechanism. it should be explained somewhere around the evaluation semantics you're presumably reading.
<theseb> pjb: in my understanding one of the purposes of macros is to implement special forms
<theseb> at least some of them
<Bike> i would not describe it that way.
<phoe> very no
<phoe> it's the other way around
<pjb> theseb: however, the CL implementation still has to have some fundamental constructs. Note that more than the specified special forms are needed as fundamental constructs. For example, (setf gethash), apply, etc.
<phoe> special forms are special 'cause they cannot be implemented with standard macros
<pjb> phoe: no.
<phoe> and standard functions
<pjb> phoe: any special form CAN be implemented with standard macros.
<pjb> phoe: it's up to the implementation.
<theseb> phoe: i was thinking about your clarification about lisp not being a mystical magical software silver bullet....i still think you're right.....I think Brook's "No Silver Bullet" principle is also right....software seems to have "essential complexity" you can't get rid of....kinda reminds me of the Halting theorem....basically we may never be able to get Moore's law type improvements in software development...i can't see it
<pjb> phoe: the implementation can do very special things!
<phoe> pjb: how does one implement multiple-value-call
<Bike> that is not what the halting theorem means, and moore's law is already coming to an end because it's pretty hard to make transistors smaller than an atom.
<pjb> phoe: then you can use your imagination to find an implementation of m-v-c.
amer has quit [Quit: amer]
<pjb> phoe: hint: all CL implementation DO implement it!
<Bike> but not as a macro, so that's a completely pointless thing to say.
<_death> but it could be implemented as a macro
<theseb> Bike: yes..i know all about the Halting Theorem...i'm just saying the No Silver Bullet feels similar in flavor to the Halting Theorem....they both address limitations and complexity in some sense
<Bike> you could implement (multiple-value-call f ...) as `(apply f (apply append ,@(mapcar (lambda (form) `(multiple-value-list ,form)) ...)))
<Bike> and make multiple-value-list a special operator instead
<pjb> Bike: the CL implementation can trivially define a macro, expanding to implementation specific things.
<Bike> theseb: you should try to quantify any similarity so that this analogy has value more than a feeling.
<_death> special operator is like calling something an axiom.. but clhs also allows implementors to use other axioms and treat the operator as a theorem
<theseb> Bike: ok you asked for it...;)... One way to characterize the Halting Theorem is in terms of Gregory Chaitin's or Kolmogorov's definition of complexity..."You can't get a 20 lb theorem from 10 lbs of axioms!"....being able to bang out extremely complex programs with some magic bullet seems unlikely because it either...1. Suggests a way to violate Kolmogorov complexity or 2. Our brains are acting very "trans-computational" and doi
<theseb> ng things that violate the Church-Turing thesis ;)
<Bike> you're conflating perceived complexity with actual complexity in your first point.
<Bike> but i didn't actually mean for you to try to explain it here. it is off topic, after all
kpoeck has joined #lisp
buffergn0me has joined #lisp
kingragworm has joined #lisp
kingragworm has quit [Remote host closed the connection]
<theseb> Does anyone have any feel good CL stories where some team created an awesome DSL to handle a very complex problem that blew the pants off the competition?
<theseb> That would be inspiring
sauvin has quit [Read error: Connection reset by peer]
<theseb> it be some sort of consolation since i can't have that lisp is a "silver bullet" anymore
<_death> Paul Graham has a story like that
<theseb> Viaweb!
<theseb> that's one
<theseb> definitely
<p_l> was OPS5 originally in Lisp?
<p_l> also, I think in ECLM/ELS in Amsterdam (2012) there was a presentation on using DSL and a compiler written in CL to generate much more efficient Cuda/OpenCL code
<p_l> also, original roomba being programmed using DSL in CL
_heisig has joined #lisp
heisig has quit [Ping timeout: 256 seconds]
amerigo has joined #lisp
cosimone has quit [Quit: Quit.]
izh_ has joined #lisp
<White_Flame> theseb: Idunno, it's kind of just a normal everyday occurrence
<White_Flame> instead of some singular special story
<theseb> White_Flame: that's good
milanj has quit [Quit: This computer has gone to sleep]
Bourne has joined #lisp
_heisig has quit [Quit: Leaving]
rogersm has quit [Quit: Leaving...]
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
izh_ has quit [Quit: Leaving]
rogersm has joined #lisp
rogersm has quit [Client Quit]
rogersm has joined #lisp
rpg has joined #lisp
bitmapper has joined #lisp
nowhere_man has quit [Read error: Connection reset by peer]
nowhere_man has joined #lisp
sdv has joined #lisp
jayspeer has quit [Quit: ERC (IRC client for Emacs 26.3)]
rogersm has quit []
rogersm has joined #lisp
<bitmapper> what happened to mocl
<phoe> it exists: https://wukix.com/mocl
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
sdv has left #lisp [#lisp]
abhixec_ has joined #lisp
abhixec_ has quit [Client Quit]
pjb has quit [Ping timeout: 240 seconds]
narimiran has quit [Ping timeout: 264 seconds]
Bourne has quit [Ping timeout: 272 seconds]
SGASAU has quit [Ping timeout: 260 seconds]
efm has quit [Ping timeout: 256 seconds]
sstc has joined #lisp
efm has joined #lisp
PuercoPope has joined #lisp
PuercoPope is now known as PuercoPop
PuercoPop is now known as Guest86914
rogersm has quit [Remote host closed the connection]
Guest86914 is now known as PuercoPop
Kundry_W_ has joined #lisp
Kundry_Wag has quit [Ping timeout: 265 seconds]
pve has quit [Quit: leaving]
pjb has joined #lisp
kpoeck has quit [Remote host closed the connection]
karayan has quit [Remote host closed the connection]
karayan has joined #lisp
CrazyEddy has quit [Ping timeout: 256 seconds]
ahungry has quit [Remote host closed the connection]
chipolux_ has joined #lisp
sstc has quit [Quit: WeeChat 2.8]
chipolux has quit [Ping timeout: 256 seconds]
remix2000 has quit [Quit: remix2000]
deselby has joined #lisp
Lord_of_Life has quit [Ping timeout: 240 seconds]
Lord_of_Life_ has joined #lisp
dalz has quit [Remote host closed the connection]
Lord_of_Life_ is now known as Lord_of_Life
pjb has quit [Ping timeout: 246 seconds]
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Bourne has joined #lisp
amerigo has quit [Quit: Connection closed for inactivity]
ljavorsk has quit [Ping timeout: 256 seconds]
rpg has joined #lisp
frgo_ has quit [Remote host closed the connection]
frgo has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
gravicappa has quit [Ping timeout: 260 seconds]
Kundry_W_ has quit [Ping timeout: 258 seconds]
shka_ has quit [Ping timeout: 265 seconds]
anticrisis has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 260 seconds]
efm has quit [Ping timeout: 265 seconds]
efm has joined #lisp
random-nick has quit [Ping timeout: 265 seconds]
rgherdt has quit [Ping timeout: 256 seconds]
shifty has joined #lisp
pjb has joined #lisp
wxie has joined #lisp
Bourne has quit [Read error: Connection reset by peer]
<moon-child> how come (*) and (+) are usually well-defined (to multiplicative and additive identities), but (/) and (-) produce an error?
yottabyte has joined #lisp
<yottabyte> has anyone gotten drakma to work with windows 10 here? when I try e.g. (drakma:http-request "http://www.lisp.org/index.html") I get https://pastebin.com/MNLZeyS3
<yottabyte> I tried to do some searching and it seems to be a CL+SSL error, but all I did was quickload drakma
<aeth> moon-child: probably because / and - are actually two functions, depending on the lengths of the arguments provided, i.e. 1 argument vs. 2 or more arguments
<aeth> moon-child: where / with 1 arg does inverse and - does negation
<moon-child> aeth: hmmm
<Bike> what would you expect (/) or (-) to return
<moon-child> otoh, they still have well-defined identities, that are consistent for both forms
<moon-child> (/ 1) = 1; (/ x 1) = x
<aeth> if they were defined like + and * then there would be no difference with (- and +) or (* and /) for 0 and 1 arg calls and there would need to be separate functions for negation and inverse
<pjb> moon-child: note that: (/ x) = 1/x
<pjb> moon-child: the mathematical principle, is that (op) returns the neutral element for op. What is the neutral element of / or of - ?
<pjb> moon-child: (- (-) x) = x (- x (-)) = x solve for (-) !!!
<aeth> (/ x) is (/ 1 x) instead of the "expected" x if it were just an extension of / for 2+ args and (- x) is (* -1 x) instead of the "expected" x if it were just an extension of - for 2+ args.
<Bike> (/ 4) isn't the same as (/ 4 1), see
<moon-child> pjb: ahh, I see. So it's not because there are separate forms, but because parameter order matters
theseb has quit [Quit: Leaving]
<pjb> moon-child: well, at least for neutral elements. an operation can be anti-commutative, but the neutral element should still commute.
<aeth> or I suppose you could define (- x) as (- 0 x) instead so it parallels / more. That is, (- x) is (- (+) x) and (/ x) is (/ (*) x)
<pjb> aeth: (- x) IS defined as (- 0 x)!
<pjb> aeth: just as (/ x) IS defined as (/ 1 x)!
<moon-child> pjb: right, yes
<pjb> and note that here, 0 is (+) and 1 is (*)1
<moon-child> (re. commutativity)
<pjb> s/)1/)!/
EvW1 has quit [Ping timeout: 240 seconds]
entel has quit [Quit: Connection closed for inactivity]
ft has joined #lisp
smazga has quit [Ping timeout: 256 seconds]
hiredman_ is now known as hiredman
SGASAU has joined #lisp
slyrus_ has joined #lisp
dnm has joined #lisp
karayan has quit [Ping timeout: 260 seconds]
slyrus has quit [Ping timeout: 260 seconds]