jackdaniel 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/> | offtopic --> #lispcafe
buoy49 has quit [Read error: Connection reset by peer]
kilimanjaro has quit [Ping timeout: 260 seconds]
jerme_ has quit [Ping timeout: 260 seconds]
banjiewen_ has quit [Write error: Connection reset by peer]
buoy49 has joined #lisp
banjiewen_ has joined #lisp
kilimanjaro has joined #lisp
EvW has quit [Ping timeout: 260 seconds]
jerme_ has joined #lisp
dbotton has joined #lisp
jonatack has quit [Ping timeout: 272 seconds]
jonatack has joined #lisp
random-nick has quit [Ping timeout: 256 seconds]
kiroul has joined #lisp
<White_Flame> Usersda: yeah, it's taking advantage of first-class functions
<White_Flame> you can do C in this manner, passing function pointers, too
<White_Flame> but it's much easier with an inline lambda syntax, which JS has now
<White_Flame> see also: greenspun's tenth rule
kir0ul has quit [Ping timeout: 264 seconds]
EvW has joined #lisp
Bike has quit [Quit: Lost terminal]
rpg has quit [Quit: Textual IRC Client: www.textualapp.com]
oxum has joined #lisp
jw4 has quit [Ping timeout: 268 seconds]
jw4 has joined #lisp
<Usersda> Thx @White_Flame
oxum has quit [Ping timeout: 256 seconds]
<Usersda> Hahaha OMG that's so true.
judson_ has joined #lisp
jw4 has quit [Ping timeout: 246 seconds]
jw4 has joined #lisp
perrier-jouet has joined #lisp
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
edgar-rft has joined #lisp
tfb has joined #lisp
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 246 seconds]
judson_ has joined #lisp
akoana has joined #lisp
EvW has quit [Ping timeout: 264 seconds]
taniguchisan has quit [Quit: WeeChat 2.3]
Fare has quit [Ping timeout: 264 seconds]
Usersda has quit [Remote host closed the connection]
wxie has quit [Remote host closed the connection]
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tfb has quit [Ping timeout: 260 seconds]
judson_ has joined #lisp
v0|d has quit [Remote host closed the connection]
v0|d has joined #lisp
dim has quit [Ping timeout: 240 seconds]
Fare has joined #lisp
<asarch> "This is SBCL 2.0.7, an implementation of ANSI Common Lisp."
Fare has quit [Ping timeout: 264 seconds]
dim has joined #lisp
OlCe has quit [Ping timeout: 240 seconds]
oxum has joined #lisp
flip214 has quit [Read error: Connection reset by peer]
adlai has left #lisp ["Adlai is not welcome on the Freenode IRC Network"]
oxum has quit [Ping timeout: 240 seconds]
flip214 has joined #lisp
oxum has joined #lisp
oxum has quit [Ping timeout: 258 seconds]
oxum has joined #lisp
dddddd has quit [Ping timeout: 268 seconds]
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dddddd has joined #lisp
toorevitimirp has joined #lisp
torbo has quit [Remote host closed the connection]
Jeanne-Kamikaze has joined #lisp
Fare has joined #lisp
skapata has quit [Ping timeout: 272 seconds]
msk has joined #lisp
skapata has joined #lisp
msk has quit [Client Quit]
miasuji has joined #lisp
judson_ has joined #lisp
space_otter has joined #lisp
oxum has quit [Ping timeout: 260 seconds]
mbomba has joined #lisp
tessier has quit [Quit: leaving]
meowphius has quit [Quit: Leaving]
Bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
Bhartrihari has joined #lisp
Bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
Bhartrihari has joined #lisp
lucasb has quit [Quit: Connection closed for inactivity]
jonatack has quit [Ping timeout: 256 seconds]
jonatack has joined #lisp
Lycurgus has joined #lisp
tfb has joined #lisp
Alfr_ has joined #lisp
dbotton has quit [Remote host closed the connection]
Alfr has quit [Ping timeout: 240 seconds]
<beach> Good morning everyone!
<Josh_2> Hey beach
<asarch> I have: (defparameter *food* '(tacos pizza beer bbq)), how can I know if 'tacos is actually in the list?
<asarch> find-if?
<Josh_2> member?
orivej has quit [Ping timeout: 256 seconds]
<asarch> Thank you!
<Josh_2> np
<beach> asarch: And be careful. Don't use DELETE on that literal list.
<asarch> Well, I just want to know if a value is actually on the list
<asarch> To store that value into the PostgreSQL cluster
<asarch> Thank you for the advice :-)
jonatack has quit [Ping timeout: 258 seconds]
<beach> I was pointing it out, since you used DELETE on a similar list before.
thmprover has joined #lisp
<asarch> Thank you
tfb has quit [Ping timeout: 272 seconds]
tamarindo has quit [Ping timeout: 240 seconds]
Fare has quit [Ping timeout: 264 seconds]
shifty has joined #lisp
ex_nihilo has joined #lisp
<asarch> Have a nice day guys
<asarch> See you later :-)
<asarch> Thank you for all
asarch has quit [Quit: Leaving]
Bhartrihari has left #lisp ["Disconnected: closed"]
Bhartrihari has joined #lisp
Lycurgus has quit [Quit: Exeunt]
Bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
Bhartrihari has joined #lisp
oxum has joined #lisp
jonatack has joined #lisp
oxum has quit [Ping timeout: 246 seconds]
narimiran has joined #lisp
kiroul has quit [Ping timeout: 258 seconds]
Bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
Bhartrihari has joined #lisp
aartaka_d has joined #lisp
thmprover has quit [Quit: ...and miles to go before I sleep.]
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aartaka has quit [Ping timeout: 260 seconds]
shoshin has quit [Quit: Ping timeout (120 seconds)]
shoshin has joined #lisp
hendursaga has quit [Ping timeout: 240 seconds]
hendursaga has joined #lisp
orivej has joined #lisp
hiroaki_ has joined #lisp
oxum has joined #lisp
hiroaki has quit [Ping timeout: 258 seconds]
oxum has quit [Ping timeout: 256 seconds]
skapata has quit [Remote host closed the connection]
tfb has joined #lisp
mbomba has quit [Quit: WeeChat 2.9]
tiwEllien has joined #lisp
Jeanne-Kamikaze has quit [Quit: Leaving]
cohnjalvin777 has joined #lisp
akoana has quit [Quit: leaving]
orivej has quit [Ping timeout: 260 seconds]
miasuji has quit [Ping timeout: 264 seconds]
gbr___ has quit [Ping timeout: 256 seconds]
tfb has quit [Ping timeout: 272 seconds]
shka_ has joined #lisp
mmohammadi9812 has quit [Read error: Connection reset by peer]
aartaka has joined #lisp
aartaka_d has quit [Ping timeout: 256 seconds]
mmohammadi9812 has joined #lisp
cohnjalvin777 has quit [Quit: WeeChat 2.9]
liberliver has joined #lisp
bilegeek has quit [Quit: Leaving]
mmohammadi9812 has quit [Ping timeout: 240 seconds]
mmohammadi9812 has joined #lisp
frgo_ has joined #lisp
frgo has quit [Ping timeout: 264 seconds]
gbr_ has joined #lisp
iissaacc has joined #lisp
russell-- has joined #lisp
aartaka has quit [Ping timeout: 256 seconds]
* russell-- has a loop macro question ... i want to traverse a list, but conditionally not advance to the next list element
<russell--> conditional on something not in the list
<beach> Then use FOR x = ... THEN ...
<beach> (loop for x = list then (if ... (cdr x) x) ...)
<russell--> i'll give that a try
madage has quit [Ping timeout: 240 seconds]
<flip214> ITERATE has generators: (iterate (generate x in list) (if ( ) (NEXT x)) https://common-lisp.net/project/iterate/doc/Generators.html#Generators
aartaka has joined #lisp
tfb has joined #lisp
ldbeth has joined #lisp
treflip has joined #lisp
<beach> russell--: Try for instance (loop for y in '(1 2 ... 20) for x = '(a b c d e f g h) then (if (zerop (mod y 3)) (cdr x) x) collect (cons (car x) y))
gaqwas has joined #lisp
gaqwas has joined #lisp
gaqwas has quit [Changing host]
edgar-rft has quit [Quit: Leaving]
decentyousername has joined #lisp
<ldbeth> good afternoon
<beach> Hello ldbeth.
<decentyousername> I was about to ask the following question: "I'm trying to write a constructor for an object with quite a few slots. Currently I'm specifying all slots manualle in the parameter list, but I had that's annoying during prototyping, because I might add or remove slots. So I had the ingenious idea of using &rest and using (apply #'make-instance 'class args) to create the object. But if the user doesn't specify a value for a slot, I w
<decentyousername> like to use a default argument." but then I realized I should probably just put the default value for a paramater inside a :default-initargs form.
<decentyousername> and good morning ldbeth
<decentyousername> and beach
<phoe> good morning
<decentyousername> and phoe
<beach> decentyousername: That or in an :INITFORM depending on your situation.
<beach> Hey phoe.
<ldbeth> I see some people write their own utils to make define classes as easy as define structs
<beach> ldbeth: Yes, and also very wrong most of the time then.
ldbeth has quit [Remote host closed the connection]
<decentyousername> beach: I thought one should use :default-initargs, because then #'post-initialize has he ability to access the arguments.
<beach> It must be highly unusual to want to have or not have initforms, initargs, readers, and writers exactly the same way for every slot in class.
ldbeth has joined #lisp
stux|RC has quit [Quit: Aloha!]
<beach> decentyousername: Like I said, depending on your situation.
<decentyousername> the only time I use :initform is for signaling an error.
pve has joined #lisp
stux|RC has joined #lisp
<decentyousername> It's nice how just formulating the question makes you sometimes find the answer. I was so focused on the constructor that I forgot that I could use the class definition to specify default args.
Cymew has joined #lisp
galex-713 has quit [Ping timeout: 272 seconds]
decentyo` has joined #lisp
decentyo` has left #lisp [#lisp]
decentyousername has quit [Remote host closed the connection]
decentyousername has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
galex-713 has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
tfb has quit [Ping timeout: 260 seconds]
ljavorsk has joined #lisp
oxum has joined #lisp
oxum has quit [Ping timeout: 246 seconds]
nefercheprure has joined #lisp
nefercheprure has quit [Client Quit]
tekipeps[m] has quit [Quit: Idle for 30+ days]
imode has quit [Ping timeout: 246 seconds]
imode has joined #lisp
hendursa1 has joined #lisp
hendursaga has quit [Ping timeout: 240 seconds]
tfb has joined #lisp
decentyousername has quit [Ping timeout: 272 seconds]
_whitelogger has joined #lisp
aartaka has quit [Ping timeout: 258 seconds]
ldbeth has quit [Remote host closed the connection]
treflip has quit [Remote host closed the connection]
dim has quit [Ping timeout: 246 seconds]
Lycurgus has joined #lisp
dim has joined #lisp
oxum has joined #lisp
oxum has quit [Ping timeout: 256 seconds]
madand_ has joined #lisp
Grauwolf_ has joined #lisp
madand has quit [Ping timeout: 272 seconds]
imode has quit [Ping timeout: 265 seconds]
knobo has quit [Ping timeout: 260 seconds]
easye` has joined #lisp
drot has quit [Ping timeout: 272 seconds]
knobo has joined #lisp
fe[nl]ix has quit [Ping timeout: 272 seconds]
Blkt has quit [Ping timeout: 272 seconds]
ioa has quit [Ping timeout: 272 seconds]
Grauwolf has quit [Ping timeout: 272 seconds]
cpt_nemo has quit [Ping timeout: 272 seconds]
easye has quit [Ping timeout: 272 seconds]
Yardanico has quit [Ping timeout: 272 seconds]
Yardanico has joined #lisp
drot has joined #lisp
fe[nl]ix has joined #lisp
Blkt has joined #lisp
gaqwas has quit [Remote host closed the connection]
ioa has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
tfb has quit [Remote host closed the connection]
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
cpt_nemo has joined #lisp
tfb has joined #lisp
aartaka has joined #lisp
hhdave has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
Lycurgus has quit [Quit: Exeunt]
hhdave has quit [Quit: hhdave]
hhdave has joined #lisp
supercoven has joined #lisp
hhdave_ has joined #lisp
hhdave_ has quit [Client Quit]
hhdave has quit [Quit: ERC (IRC client for Emacs 26.2)]
hhdave has joined #lisp
villanella has joined #lisp
<villanella> is it a good way to start learning common lisp if I'd like to get into elisp programming?
<beach> Sure, you can do that.
<beach> They are similar in many respects.
<beach> And sometimes I think Emacs Lisp is moving closer to Common Lisp.
<villanella> are the two languages somewhat close similar to how c and c++ are?
<aeth> Yes.
<beach> Hard to measure closeness that way, but I would say much closer than that.
<aeth> Emacs Lisp is basically an archaic Lisp, which based its design on the languages (Maclisp and Interlisp?) that Common Lisp was designed to replace.
<villanella> thanks both of you, it is nice to have a bit of guidance regarding this
<beach> Good luck!
<beach> Though I can't understand why 1. you would want Emacs Lisp to be your ultimate goal, and 2. If it is, why you would not learn it directly instead.
<villanella> yes I would like to be able to customize my Emacs configuration and eventually start building packages of my own. I am not learning it directly as I found a really interesting common lisp book which I particularly enjoy.
mmohammadi9812 has quit [Ping timeout: 260 seconds]
<beach> I see.
<beach> Which book?
mmohammadi9812 has joined #lisp
<villanella> It is called Practical Common LISP and can be found here: http://www.gigamonkeys.com/book/
<beach> Yes, it is well known. Good choice.
<villanella> Thanks :)
supercoven_ has joined #lisp
supercoven_ has quit [Max SendQ exceeded]
supercoven_ has joined #lisp
supercoven_ has quit [Max SendQ exceeded]
supercoven_ has joined #lisp
supercoven_ has quit [Max SendQ exceeded]
supercoven_ has joined #lisp
supercoven_ has quit [Max SendQ exceeded]
supercoven_ has joined #lisp
supercoven_ has quit [Max SendQ exceeded]
supercoven has quit [K-Lined]
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
rippa has joined #lisp
space_otter has quit [Remote host closed the connection]
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
dim has quit [Ping timeout: 260 seconds]
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
Aurora_v_kosmose has quit [Remote host closed the connection]
tfb has quit [Ping timeout: 260 seconds]
dim has joined #lisp
Aurora_v_kosmose has joined #lisp
emys has joined #lisp
nostoi has joined #lisp
gaqwas has joined #lisp
gaqwas has quit [Changing host]
gaqwas has joined #lisp
emys has quit [Ping timeout: 256 seconds]
emys has joined #lisp
nostoi has quit [Quit: Verlassend]
tfb has joined #lisp
tfb has quit [Client Quit]
iissaacc has quit [Ping timeout: 256 seconds]
iissaacc has joined #lisp
oxum has joined #lisp
achilles has joined #lisp
emys has quit [Ping timeout: 264 seconds]
jonatack has quit [Ping timeout: 260 seconds]
jonatack has joined #lisp
emys has joined #lisp
Cymew has quit [Ping timeout: 264 seconds]
ebrasca has quit [Remote host closed the connection]
niceplace has quit [Ping timeout: 256 seconds]
niceplace has joined #lisp
emys has quit [Ping timeout: 244 seconds]
aartaka has quit [Ping timeout: 264 seconds]
iissaacc has quit [Ping timeout: 260 seconds]
emys has joined #lisp
<dim> when learning a new programming language a huge part of the task is to do with learning APIs, either standard/core ones and/or also main librairies ; in that respect learning Emacs Lisp is totally different than learning Common Lisp
emys has quit [Ping timeout: 244 seconds]
emys has joined #lisp
aartaka has joined #lisp
miasuji has joined #lisp
igemnace has joined #lisp
emys has quit [Ping timeout: 272 seconds]
aartaka has quit [Ping timeout: 246 seconds]
asdflkj has joined #lisp
emys has joined #lisp
Grauwolf_ is now known as Grauwolf
emys has quit [Ping timeout: 256 seconds]
EvW has joined #lisp
Lycurgus has joined #lisp
easye` has quit [Quit: nick]
emys has joined #lisp
EvW has quit [Ping timeout: 244 seconds]
aartaka has joined #lisp
Bike has joined #lisp
EvW has joined #lisp
jw4 has quit [Quit: tot siens]
emys has quit [Ping timeout: 256 seconds]
jw4 has joined #lisp
easye` has joined #lisp
shifty has quit [Ping timeout: 258 seconds]
emys has joined #lisp
jw4 has quit [Ping timeout: 258 seconds]
jw4 has joined #lisp
easye` has quit [Ping timeout: 244 seconds]
frgo has joined #lisp
EvW has quit [Ping timeout: 264 seconds]
toorevitimirp has quit [Remote host closed the connection]
toorevitimirp has joined #lisp
easye has joined #lisp
frgo_ has quit [Ping timeout: 258 seconds]
miasuji has quit [Ping timeout: 264 seconds]
Lycurgus has quit [Quit: Exeunt]
orivej has joined #lisp
wsinatra has joined #lisp
emys has quit [Ping timeout: 272 seconds]
emys has joined #lisp
ljavorsk has quit [Ping timeout: 256 seconds]
Fare has joined #lisp
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #lisp
dim has quit [Ping timeout: 256 seconds]
dim has joined #lisp
emys has quit [Ping timeout: 265 seconds]
madage has joined #lisp
emys has joined #lisp
aindilis has joined #lisp
skapata has joined #lisp
emys has quit [Ping timeout: 264 seconds]
emys has joined #lisp
oxum has quit [Remote host closed the connection]
oxum has joined #lisp
OlCe has joined #lisp
dbotton has joined #lisp
lucasb has joined #lisp
dbotton_ has quit [Ping timeout: 258 seconds]
tfb has joined #lisp
sjl_ has joined #lisp
judson_ has joined #lisp
oxum has quit [Remote host closed the connection]
kiroul has joined #lisp
oxum has joined #lisp
mmohammadi9812 has quit [Ping timeout: 256 seconds]
mmohammadi9812 has joined #lisp
tfb has quit [Read error: Connection reset by peer]
tfb has joined #lisp
emys has quit [Ping timeout: 260 seconds]
orivej has quit [Ping timeout: 264 seconds]
achilles has quit [Remote host closed the connection]
emys has joined #lisp
Cymew has joined #lisp
EvW has joined #lisp
emys has quit [Ping timeout: 244 seconds]
dislocat` has joined #lisp
dislocated has quit [Ping timeout: 256 seconds]
zxcvz has joined #lisp
Nilby has quit [Ping timeout: 260 seconds]
Gerula has quit [Quit: Leaving]
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oxum has quit [Remote host closed the connection]
oxum has joined #lisp
emys has joined #lisp
galex-713 has quit [Ping timeout: 272 seconds]
pillton has quit [Read error: Connection reset by peer]
emys has quit [Ping timeout: 264 seconds]
wsinatra has quit [Read error: Connection reset by peer]
kaftejiman has joined #lisp
galex-713 has joined #lisp
wsinatra has joined #lisp
aartaka_d has joined #lisp
emys has joined #lisp
aartaka has quit [Ping timeout: 256 seconds]
Gerula has joined #lisp
Posterdati has quit [Ping timeout: 256 seconds]
emys has quit [Ping timeout: 244 seconds]
<jmercouris> you know how in let* you can access previously let bound values like (let* ((fish 1) (salmon (+ 1 fish))))
<jmercouris> is there some equivalent pattern or model for class slot values?
<jmercouris> the initform that is of a slot
<jmercouris> until now, the only reasonable way I can think of achieving this is via intialize instance
<hhdave> I've often wondered that myself. With functions the key parameters can refer to previous key parameters.
<hhdave> I always assumed that couldn't be done with slot initializers. Unless one implements an #'initialize-instance, which is what I tend to do
<hhdave> (like you said)
<phoe> initialize-instance it is; in DEFCLASS there's no way to access the previous slots' values
<jackdaniel> (defclass foo () ((a :initform #1=42) (b :initform #2=(+ #1# 3))))
<jmercouris> OK, that is technically possible
emys has joined #lisp
<phoe> be wary of double evaluation when doing this though
<jmercouris> don't worry, I am not going to do that :-D
<Bike> usually that kind of thing is done with initialize-instance :after methods yeah.
<Bike> stuff gets a little hairy when you factor in reinitialization, class changes, that kind of thing
shifty has joined #lisp
<phoe> I had to deal with this, yes - that's where all the different GFs come into place: initialize-instance, reinitialize-instance, shared-initialize, update-instance-for-*-class
galex-713 has quit [Ping timeout: 272 seconds]
Posterdati has joined #lisp
devon has joined #lisp
<jmercouris> I see, thanks for the feedback everyone
<Bike> imo it feels a little messy since you're kind of writing (setf (slot ...) parameter), rather than any kind of ahead of time specification, until you look at how CLOS works internally and see that's what it does even without custom methods
<devon> Hi all. In (let ((x (#+style AND #-style WHEN p v))) ...) ; Which would you write and why?
<phoe> in this case, AND
<phoe> WHEN is usually for side effects
<beach> devon: According to Norvig and PITMAN, WHEN is to be used only in a context where the value is not used.
<Bike> i'd write when, because i am afflicted by an evil heart
<beach> devon: So that suggests AND. However, if v is not a Boolean, then the same people advise against AND.
<Bike> oh. yeah, no, that's why i'd use when generally
<phoe> if you want to bind X to NIL, then you should either write it explicitly, (if p v nil), or use AND since that's a logical operation on booleans but then V is assumed to be a generalized boolean value, so either NIL or anything non-NIL
<beach> devon: So if v is not a Boolean, it should be (IF p v NIL).
<phoe> ^
<beach> devon: Now, if p is not a Boolean either, the advice is yet different.
<beach> devon: (IF (NULL p) NIL v)
<beach> All according to Norvig and Pitman. Not me.
judson_ has joined #lisp
EvW has quit [Ping timeout: 244 seconds]
<beach> So no point in disagreeing with me. Disagree with the highly experienced people Norvig and Pitman instead.
toorevitimirp has quit [Remote host closed the connection]
<devon> Grrr. Woof, woof!
<beach> devon: Does that make sense to you?
<phoe> devon: you're barking up the wrong cons tree
<devon> LOL, yes. I know KMP, haven't met Norvig.
<beach> Check out page 13 of the LUV slides by those two.
<beach> I can't pretend having even a fraction of their experience, so the relatively tiny programs I have written (compared to theirs) are not enough for me to disagree with them.
amb007 has quit [Read error: Connection reset by peer]
<beach> Indeed.
emys has quit [Ping timeout: 260 seconds]
amb007 has joined #lisp
luckless_ has quit [Ping timeout: 240 seconds]
<devon> I'd prefer (if (not (numberp x)) nil (cos x)) to what's on the slide.
<_death> I don't think these are hard and fast rules.. for example, PAIP doesn't always follow them
andinus has joined #lisp
ex_nihilo has quit [Ping timeout: 264 seconds]
<beach> I am not going to debate this issue any further.
<devon> I've often seen WHEN return a value. Thanks, y'all've been helpful.
<beach> Pleasure!
emys has joined #lisp
skapata has quit [Remote host closed the connection]
Steeve has joined #lisp
orivej has joined #lisp
amb007 has quit [Ping timeout: 260 seconds]
amb007 has joined #lisp
luckless_ has joined #lisp
emys has quit [Ping timeout: 264 seconds]
gaqwas has quit [Remote host closed the connection]
emys has joined #lisp
mokulus has joined #lisp
random-nick has joined #lisp
thmprover has joined #lisp
Mandus has quit [Ping timeout: 256 seconds]
oxum has quit [Remote host closed the connection]
troydm has quit [Ping timeout: 260 seconds]
Mandus has joined #lisp
emys has quit [Ping timeout: 246 seconds]
emys has joined #lisp
ex_nihilo has joined #lisp
ex_nihilo has quit [Read error: Connection reset by peer]
tfb has quit []
troydm has joined #lisp
ex_nihilo has joined #lisp
gaqwas has joined #lisp
gaqwas has joined #lisp
Cymew has quit [Ping timeout: 265 seconds]
ex_nihilo has quit [Quit: Leaving]
emys has quit [Ping timeout: 246 seconds]
<Xach> i have so many function bodies that start off with (when ...) and they are meant to return NIL if the precondition fails, something useful otherwise. i only learned about the WHEN side-effect style recently.
<Xach> I don't think it would look nearly as nice to do (and ... (progn ...))
oxum has joined #lisp
<beach> I don't think anybody suggested that.
emys has joined #lisp
liberliver has quit [Read error: Connection reset by peer]
hnOsmium0001 has joined #lisp
oxum has quit [Remote host closed the connection]
<beach> Also, often NIL is a special case, as in the base case of a recursion or something similar. It is good style to handle the base case first, so that the person reading the code does not have to keep that case fresh in memory while reading the rest of the code.
<beach> Therefore, code like that often turns into (IF <special-case> NIL ...) where ... may have to contain a PROGN.
<beach> For example, suppose we define a simple version of MAPCAR. It is not good style to write (defun mapcar (function list) (when list (cons (funcall function) (mapcar function (rest list))))), for more than the reason of using LIST as a Boolean.
<beach> Er, forgot (first list), you get the idea.
bitmapper has joined #lisp
<beach> Instead, we handle the special case first, as in (defun mapcar (function list) (if (null list) '() (cons (funcall function (first list)) (mapcar function (rest list)))))
entel has quit []
entel has joined #lisp
<beach> When a mathematician writes a proof by induction, the base case is always handled first, for the same reason.
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
Gerula has quit [Read error: Connection reset by peer]
emys has quit [Ping timeout: 244 seconds]
luckless_ has quit [Ping timeout: 240 seconds]
<Xach> beach: norvig and pitman and clhs seem to suggest it?
<Xach> beach: how else to interpret "when must be used only for side effect"?
<beach> I'm lost. What are they suggesting?
<Xach> beach: don't use WHEN for a return value
<beach> I agree. What made you think otherwise?
__jrjsmrtn__ has quit [Quit: Bye !]
<beach> It looked to me like you were suggesting that your function bodies returned the NIL (default value of WHEN) as a useful value.
<beach> But now, it seems you are agreeing with Norvig and Pitman.
dbotton_ has joined #lisp
<Xach> beach: i am describing a practice that i think is discouraged by norvig and pitman and described one alternative. when you wrote "i don't think anybody is suggesting that" i interpreted it to mean "nobody is suggesting you do not use WHEN for a return value"
<beach> I am sorry if I misunderstood.
emys has joined #lisp
<beach> I meant, nobody is suggesting using AND in this situation.
<beach> Because the first argument of AND would then not be a Boolean.
<_death> the luv also has pages 4 and 7... in PAIP for example there are functions whose body is (when ... (get ...)) .. Pitman uses (or (gethash ...) (setf (gethash ...) ...)) idiom in his conditions code, etc.
__jrjsmrtn__ has joined #lisp
luckless_ has joined #lisp
<beach> _death: Do you take that as an indication to ignore their advice on page 13?
<beach> That seems like the wrong thing to do if so.
dbotton has quit [Ping timeout: 260 seconds]
EvW has joined #lisp
<Xach> Hmm, I am trying to find the passage in CLHS on WHEN/UNLESS that I thought I remembered, and can't find it at the moment. But I thought it specifically mentioned using AND for value, WHEN for side-effect.
<_death> beach: no.. it's a good rule in general
<Xach> Perhaps it was just a crazy dream.
<beach> Xach: I have not seen anything like that, especially for general values, i.e. not only Booleans.
<Xach> It stuck firmly (but possibly incorrectly) in my mind because I learned about it so recently.
emys has quit [Ping timeout: 264 seconds]
notzmv has quit [Read error: No route to host]
notzmv has joined #lisp
emys has joined #lisp
gbr____ has joined #lisp
dbotton_ has quit [Ping timeout: 264 seconds]
oxum has joined #lisp
notzmv has quit [Read error: No route to host]
notzmv has joined #lisp
oxum has quit [Remote host closed the connection]
aartaka_d has quit [Ping timeout: 272 seconds]
oxum has joined #lisp
SN_ has joined #lisp
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
red-dot has quit [Ping timeout: 264 seconds]
SN_ is now known as red-dot
dbotton has joined #lisp
emys has quit [Ping timeout: 272 seconds]
Steeve has quit [Quit: end]
cosimone has joined #lisp
emys has joined #lisp
imode has joined #lisp
galex-713 has joined #lisp
entel has quit []
entel has joined #lisp
emys has quit [Ping timeout: 260 seconds]
judson_ has joined #lisp
entel has quit [Client Quit]
entel has joined #lisp
madage has quit [Ping timeout: 240 seconds]
izh_ has joined #lisp
emys has joined #lisp
madage has joined #lisp
mokulus has quit [Quit: WeeChat 2.9]
aartaka has joined #lisp
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
judson_ has joined #lisp
dbotton has quit [Ping timeout: 244 seconds]
judson_ has quit [Client Quit]
judson_ has joined #lisp
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #lisp
edgar-rft has joined #lisp
dbotton has joined #lisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
emys has quit [Ping timeout: 265 seconds]
emys has joined #lisp
dvdmuckle has quit [Ping timeout: 260 seconds]
dbotton has quit [Ping timeout: 272 seconds]
terpri has joined #lisp
terpri_ has quit [Ping timeout: 264 seconds]
madage has quit [Ping timeout: 240 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
niceplace has quit [Ping timeout: 240 seconds]
dbotton has joined #lisp
niceplace has joined #lisp
dvdmuckle has joined #lisp
madage has joined #lisp
mmohammadi9812 has quit [Ping timeout: 265 seconds]
emys has quit [Ping timeout: 272 seconds]
cosimone has quit [Quit: cosimone]
mmohammadi9812 has joined #lisp
emys has joined #lisp
izh_ has quit [Quit: Leaving]
oxum has quit [Remote host closed the connection]
zge has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
Lycurgus has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
devon has quit [Ping timeout: 256 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
EvW has quit [Ping timeout: 264 seconds]
shifty has quit [Ping timeout: 258 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
EvW has joined #lisp
amb007 has joined #lisp
aindilis has quit [Remote host closed the connection]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
cosimone has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
Fare has quit [Ping timeout: 264 seconds]
Lycurgus has quit [Quit: Exeunt]
Gerula has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
n3t has joined #lisp
n3t has left #lisp ["WeeChat 2.5"]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
shka_ has quit [Ping timeout: 265 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
bilegeek has joined #lisp
v0|d has quit [Read error: Connection reset by peer]
jw4 has quit [Read error: Connection reset by peer]
jw4 has joined #lisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
oxum has joined #lisp
<sjl_> Xach: are you thinking of the pitman/norvig style guide? https://courses.cs.northwestern.edu/325/readings/luv-slides.pdf
<sjl_> slide 13?
<sjl_> Oh, someone already mentioned that. I guess not. Sorry.
oxum has quit [Ping timeout: 240 seconds]
cosimone has quit [Ping timeout: 244 seconds]
<sjl_> There's something like that in CLtL2:
<sjl_> > As a matter of style, when is normally used to conditionally produce some side effects, and the value of the when form is normally not used. If the value is relevant, then it may be stylistically more appropriate to use and or if.
<sjl_> but I guess it didn't make it into the spec
hjudt has quit [Ping timeout: 260 seconds]
devon has joined #lisp
akoana has joined #lisp
hjudt has joined #lisp
villanella has quit [Quit: villanella]
Oddity_ has quit [Read error: Connection reset by peer]
zxcvz has quit [Quit: Leaving]
imode has quit [Ping timeout: 240 seconds]
dbotton has quit [Ping timeout: 272 seconds]
wsinatra has quit [Quit: WeeChat 2.9]
dbotton has joined #lisp
<Xach> I swear I saw it in a speclike place.
* Xach checks cltl2
<Xach> Aha
<Xach> > As a matter of style, when is normally used to conditionally produce some side effects, and the value of the when form is normally not used. If the value is relevant, then it may be stylistically more appropriate to use and or if.
<Xach> That's in 7.6
<Xach> (of cltl2)
catchme has joined #lisp
emys has quit [Quit: Leaving]
narimiran has quit [Ping timeout: 256 seconds]
amb007 has quit [Read error: Connection reset by peer]
dbotton_ has joined #lisp
amb007 has joined #lisp
dbotton has quit [Ping timeout: 264 seconds]
parjanya has joined #lisp
shifty has joined #lisp
dbotton_ has quit [Ping timeout: 258 seconds]
random-nick has quit [Ping timeout: 272 seconds]
dbotton has joined #lisp
parjanya has quit [Read error: Connection reset by peer]
torbo has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
kaftejiman has quit [Remote host closed the connection]
vzcx has quit [Quit: ERC (IRC client for Emacs 27.1)]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
torbo has quit [Read error: Connection reset by peer]
torbo has joined #lisp
easye has quit [Quit: disconnected]
easye has joined #lisp
skapata has joined #lisp
jprajzne has quit [Ping timeout: 260 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
markboston36 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
torbo has quit [Read error: Connection reset by peer]
markboston36 is now known as bostongeek36
torbo has joined #lisp
<bostongeek36> i am trying to install sbcl 2.10 from source but i am getting an error saying sh is not a valid command
<bostongeek36> ive installed both msys and cygwin
<bostongeek36> so im not sure what the issue is
amb007 has joined #lisp
<phoe> be sure that you are running from a msys terminal; sh should be defined there and available on the PATH
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
<bostongeek36> ah so you cant do it from cmd
<bostongeek36> oh i should of said this is on windows
<phoe> I guessed as much; there is no modern widespread OS that does not have sh defined by default
<bostongeek36> yeah :P
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
gbr____ has quit [Ping timeout: 260 seconds]
gbr_ has quit [Ping timeout: 256 seconds]
<bostongeek36> how do i tell make.sh where sbcl is installed it can't find it
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
torbo has quit [Read error: Connection reset by peer]
<bostongeek36> @phoe
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
torbo has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
shifty has quit [Ping timeout: 240 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
oxum has joined #lisp
<phoe> I need to run to sleep now
<phoe> maybe someone else will be able to help
amb007 has quit [Read error: Connection reset by peer]
<phoe> in the worst case, try #sbcl
amb007 has joined #lisp
igemnace has quit [Remote host closed the connection]
amb007 has quit [Read error: Connection reset by peer]
<bostongeek36> eh i just installed portacle
<White_Flame> bostongeek36: --xc-host='/path/to/sbcl'
<bostongeek36> bye all
<White_Flame> it's in the INSTALL docfile
bostongeek36 has quit [Remote host closed the connection]
amb007 has joined #lisp
oxum has quit [Ping timeout: 246 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
Nilby has joined #lisp
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
Fare has joined #lisp
amb007 has joined #lisp
_jrjsmrtn has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
jprajzne has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
__jrjsmrtn__ has quit [Ping timeout: 264 seconds]
pve has quit [Quit: leaving]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
sjl_ has quit [Ping timeout: 260 seconds]
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
hendursaga has quit [Ping timeout: 240 seconds]
hendursaga has joined #lisp
mmohammadi9812 has quit [Ping timeout: 256 seconds]
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
<Xach> portacle
Necktwi has quit [Ping timeout: 260 seconds]
gaqwas has quit [Ping timeout: 265 seconds]
iissaacc has joined #lisp
pillton has joined #lisp
torbo has quit [Read error: Connection reset by peer]
torbo has joined #lisp
EvW has quit [Ping timeout: 244 seconds]
mmohammadi9812 has joined #lisp
EvW has joined #lisp
grobe0ba has quit [Quit: ZNC 1.7.4 - https://znc.in]
dislocat` has quit [Remote host closed the connection]
imode has joined #lisp