phoe changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <http://cliki.net/> <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.14, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 246 seconds]
undiscovered has joined #lisp
verisimilitude has joined #lisp
orivej has quit [Read error: Connection reset by peer]
orivej has joined #lisp
notzmv has quit [Ping timeout: 246 seconds]
notzmv has joined #lisp
Kundry_Wag has joined #lisp
orivej has quit [Ping timeout: 268 seconds]
jmercouris has quit [Remote host closed the connection]
robotoad has quit [Quit: robotoad]
orivej has joined #lisp
Kundry_Wag has quit [Ping timeout: 258 seconds]
notzmv has quit [Ping timeout: 250 seconds]
akoana has left #lisp ["Leaving"]
phoe has joined #lisp
xrash has quit [Ping timeout: 272 seconds]
xrash has joined #lisp
phoe has quit [Ping timeout: 252 seconds]
dale has quit [Quit: dale]
pfdietz has quit [Ping timeout: 250 seconds]
eddof13 has quit [Quit: eddof13]
Kundry_Wag has joined #lisp
robotoad has joined #lisp
Kundry_Wag has quit [Ping timeout: 272 seconds]
Kundry_Wag has joined #lisp
KingRiver has joined #lisp
Kundry_Wag has quit [Ping timeout: 250 seconds]
iovec has joined #lisp
undiscovered has quit [Quit: WeeChat 2.3]
hectorhonn has joined #lisp
<hectorhonn> morning everyone
igemnace has joined #lisp
Essadon has quit [Quit: Qutting]
lisperinmove has quit [Remote host closed the connection]
notzmv has joined #lisp
notzmv has quit [Client Quit]
notzmv has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 258 seconds]
gxt has quit [Quit: WeeChat 2.3]
sjl has quit [Quit: WeeChat 2.2-dev]
Kundry_Wag has joined #lisp
gxt has joined #lisp
Kundry_Wag has quit [Ping timeout: 268 seconds]
pjb has quit [Ping timeout: 252 seconds]
esrse has joined #lisp
KingRiver has quit [Read error: Connection reset by peer]
KingRiver_ has joined #lisp
robotoad has quit [Quit: robotoad]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 245 seconds]
robotoad has joined #lisp
Oladon has joined #lisp
pjb has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 258 seconds]
space_otter has joined #lisp
ahungry has joined #lisp
dddddd has quit [Remote host closed the connection]
iovec has quit [Quit: Connection closed for inactivity]
yangby has joined #lisp
pfdietz has joined #lisp
amerlyq has joined #lisp
metallicus has joined #lisp
metallicus has quit [Remote host closed the connection]
<beach> Good morning everyone!
Lord_of_Life has quit [Ping timeout: 246 seconds]
Lord_of_Life has joined #lisp
<ahungry> howdy
Kundry_Wag has joined #lisp
marvin2 has quit [Ping timeout: 246 seconds]
Kundry_Wag has quit [Ping timeout: 268 seconds]
KingRiver_ has quit [Ping timeout: 250 seconds]
Necktwi has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 250 seconds]
orivej has quit [Ping timeout: 245 seconds]
gravicappa has joined #lisp
Necktwi has quit [Quit: leaving]
gehn has joined #lisp
gehn has left #lisp ["Leaving"]
sjl has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 250 seconds]
robdog has quit [Ping timeout: 268 seconds]
karlosz has joined #lisp
Kundry_Wag has joined #lisp
karlosz has quit [Quit: karlosz]
Kundry_Wag has quit [Ping timeout: 258 seconds]
xkapastel has quit [Quit: Connection closed for inactivity]
KingRiver_ has joined #lisp
Bike has quit [Quit: Lost terminal]
CrazyEddy has quit [Ping timeout: 268 seconds]
hiroaki has quit [Ping timeout: 272 seconds]
_whitelogger has joined #lisp
jprajzne has joined #lisp
nowhere_man has quit [Ping timeout: 252 seconds]
yangby has quit [Quit: Go out for a walk and buy a drink.]
nowhere_man has joined #lisp
xrash has quit [Ping timeout: 258 seconds]
ahungry has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 272 seconds]
shrdlu68 has joined #lisp
<hectorhonn> does anyone know of a good commentary or blog post on loop vs map?
<shrdlu68> "vs"?
<beach> versus
<verisimilitude> LOOP is a macro and MAP is a function.
<no-defun-allowed> map works best if you just have one function to "map" over, or you don't mind a small lambda
<verisimilitude> So, if you know what you're doing ahead of time, LOOP is in all likelihood going to be more efficient.
<shrdlu68> Yes, I'm trying to understand why "versus".
<beach> hectorhonn: Use whichever is more convenient for the situation.
<verisimilitude> LOOP is also more general, being able to traverse hash tables and non-structures.
<verisimilitude> Also, LOOP is cooler.
<no-defun-allowed> loop executes entire expressions, which may be more wordy for simple things, but loop is probably less consy and faster than, say map + remove-if-(not) and related functions
<no-defun-allowed> i wrote a test program which would try to buy low and sell high on one share over 100 days
<hectorhonn> that means other than convenience, there is no particular reason to choose one over than the other right?
<no-defun-allowed> it's not great though, usually about 10%ish profit over 100 days but you don't need an awful lot to win apparently
<hectorhonn> all right, got it. thanks!
<verisimilitude> No, hectorhonn.
<verisimilitude> Again, LOOP is a macro and MAP is a function.
<verisimilitude> So, if you know what you're doing ahead of time, use LOOP; in all likelihood, you will use LOOP more than MAP.
<no-defun-allowed> >loop is probably less consy and faster than map with remove-if and other higher order functions, and works on expressions instead of functions
<no-defun-allowed> okay, not exactly a quote but those are the two big points IMO
CrazyEddy has joined #lisp
<verisimilitude> Furthermore, LOOP permits doing more than traversing lists and whatnot, such as maintaining multiple numbers and other things.
<no-defun-allowed> also true, map would require the likes of reduce or remove-if(-not) to further process results
terpri has quit [Ping timeout: 268 seconds]
<no-defun-allowed> oh dear, that stuff about buying was directed for #lispcafe, please ignore that
<sindan> if it's down to preference I go to great lengths to use map*, I think they are prettier. That said, loop does more, more elegantly, when more is needed.
<no-defun-allowed> yeah, use map for the small things where you just need to call a function with each element, or you don't mind a small lambda to do it
robotoad has quit [Quit: robotoad]
Kundry_Wag has joined #lisp
nicdev has quit [Ping timeout: 250 seconds]
Kundry_Wag has quit [Ping timeout: 246 seconds]
angavrilov has joined #lisp
trittweiler has joined #lisp
KingRiver_ has quit [Remote host closed the connection]
KingRiver_ has joined #lisp
scymtym has quit [Ping timeout: 245 seconds]
<hectorhonn> i think loop is nicer when there is some "state" to keep when progressing from one element to another. using map in that case would need an extra let clause.. just my 2c
Inline has quit [Quit: Leaving]
asarch has quit [Quit: Leaving]
<sindan> yes, one nice side effect of loop (for me anyway) is that one avoids having to name variables that will do boring stuff. The code looks neater.
kajo has quit [Ping timeout: 252 seconds]
megalography has joined #lisp
<aeth> You use loop for things like conditional collect where you can't really use map like ":when foo :collect foo :into foos" because the alternative to that is remove after map
<aeth> Similar reasons to use loop include conditional append (like above) and multiple return values (e.g. to build several lists at once)
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 246 seconds]
status402 has joined #lisp
varjag has joined #lisp
status402 has quit [Client Quit]
status402 has joined #lisp
omilu has quit [Read error: Connection reset by peer]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 268 seconds]
ramus_ has quit [Ping timeout: 250 seconds]
status402 has quit [Read error: Connection reset by peer]
status402 has joined #lisp
esrse has quit [Quit: 좋은 주말~]
shrdlu68 has quit [Ping timeout: 240 seconds]
robdog has joined #lisp
scymtym has joined #lisp
Kundry_Wag has joined #lisp
iovec has joined #lisp
shrdlu68 has joined #lisp
Kundry_Wag has quit [Ping timeout: 268 seconds]
hhdave has joined #lisp
hhdave has quit [Client Quit]
hhdave has joined #lisp
marvin2 has joined #lisp
jello_pudding has joined #lisp
kajo has joined #lisp
phoe has joined #lisp
CrazyEddy has quit [Ping timeout: 250 seconds]
robdog has quit [Remote host closed the connection]
schweers has joined #lisp
robdog has joined #lisp
hectorhonn has quit [Quit: Page closed]
amerlyq has quit [Quit: amerlyq]
CrazyEddy has joined #lisp
Kundry_Wag has joined #lisp
shrdlu68 has quit [Ping timeout: 244 seconds]
Kundry_Wag has quit [Ping timeout: 258 seconds]
ramus has joined #lisp
Kaisyu has quit [Quit: Connection closed for inactivity]
undiscovered has joined #lisp
Odin- has joined #lisp
KingRiver_ has quit [Ping timeout: 244 seconds]
<shka__> hello
<phoe> hey
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
space_otter has quit [Remote host closed the connection]
robdog has quit [Remote host closed the connection]
igemnace has quit [Quit: WeeChat 2.3]
kajo has quit [Ping timeout: 258 seconds]
atgreen_ has joined #lisp
atgreen has quit [Ping timeout: 246 seconds]
jello_pudding has quit [Ping timeout: 268 seconds]
Kundry_Wag has joined #lisp
amerlyq has joined #lisp
orivej has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
froggey has quit [Ping timeout: 244 seconds]
shifty has quit [Ping timeout: 246 seconds]
dddddd_ has joined #lisp
dddddd_ is now known as dddddd
verisimilitude has quit [Remote host closed the connection]
kajo has joined #lisp
m00natic has joined #lisp
flip214 has quit [Read error: Connection reset by peer]
flip214 has joined #lisp
jmercouris has joined #lisp
<jmercouris> I'm having an error using cl-dbi
<jmercouris> looking here at the api for cl-dbi: https://github.com/fukamachi/cl-dbi
<jmercouris> I don't understand why it won't let me run multiple sql statements in one query
<jmercouris> I guess it has something to do with the sqlite driver
<jmercouris> however is there not a way to do what I want? or will I have to split apart my queries by semicolon or something...
<shka__> not sure what you are doing currently
<shka__> maybe you could paste that, please?
<jmercouris> sure
<shka__> jmercouris: hm, so i would try to add those semicolons
<jmercouris> the semicolons exist in the file
<shka__> ok, good
<jmercouris> if I run the file by itself, all is ok
<shka__> then i am not sure anymore
<jmercouris> aka sqlite3 database.db < file.sql
<jmercouris> so the only thing I can think of doing is splitting the string by semicolon and executing one query at a time..
<jmercouris> however that seems very dumb and I feel like it should be possible to execute multiple queries...
status402 has quit [Read error: Connection reset by peer]
status402_ has joined #lisp
Kundry_Wag has joined #lisp
<jmercouris> anyone have any criticism for how I could improve my function?
Kundry_Wag has quit [Ping timeout: 246 seconds]
gxt has quit [Ping timeout: 272 seconds]
<jmercouris> I guess it must be perfect then :)
<jmercouris> I know that I'm doing two passes over the list and I could have done it more intelligently, I'm just thinking about stylistic changes
kajo has quit [Ping timeout: 272 seconds]
iovec has quit [Quit: Connection closed for inactivity]
robdog has joined #lisp
bexx2 has quit [Quit: ups]
zigpaw has quit [Ping timeout: 246 seconds]
froggey has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
SqREL has joined #lisp
orivej has quit [Ping timeout: 272 seconds]
orivej_ has joined #lisp
<shka__> jmercouris: usually, it is easier to use trace instead of explicit debug prints
<jmercouris> what makes you think of that?
<jmercouris> I didn't show any code with print did I?
<jmercouris> well at any rate, I will heed your advice since you are a more experienced developer than I
<shka__> jmercouris: there is a format
<jmercouris> oh, I am just doing that for the user
<shka__> ok then
<jmercouris> so that they know which scripts are being ran
<shka__> in that case, it may be a good idea to introduce new dynamic variable for stream to print such messages
<jdz> jmercouris: What if there's an SQL string with a semicolon in it?
<jmercouris> jdz: well, shit :D
<jdz> That's how SQL-injections are born!
<jmercouris> I don't think we'll be doing SQL injections on our own database, but yeah
<jmercouris> this is for a set of files within our source tree for performing migrations
<jmercouris> if a user has access to these files, then the server is already fully compromised...
<jdz> It's not very nice when somebody thinks they're just putting some SQL in some files, and suddenly program crashes.
<jmercouris> how would that happen?
<jmercouris> if you were storing text that had a semicolon in it?
<jmercouris> for example?
<jdz> Program trying to execute invalid SQL?
<jmercouris> I see the problem you are describing
<jmercouris> however I still don't see how I can use cl-dbi to execute the contents of a SQL file
atgreen_ has quit [Ping timeout: 240 seconds]
<jdz> Send the whole file?
<jmercouris> That's when it complains
<jmercouris> jdz: see this previously posted error: https://gist.github.com/jmercouris/2fb0215b5c9cc06db0400923b4a190b0
<jmercouris> "SQL string contains more than one SQL statement."
<jmercouris> I'm not sure if this is a problem specific to the Sqlite driver and I won't have problems on postgres or mysql, however cl-dbi doesn't seem to have a "execute-queries" or something like that
<jdz> Yes, that's an SQLite error. So you can use a real database, or have each SQL statement in a separate file.
<jmercouris> =sqlite3 database.db < file.sql= works just fine
<jmercouris> sqlite is definitely a real database, not sure what you mean
<jdz> In this case sqlite is processing the file itself.
<jdz> Of course it should know how to parse SQL queries.
<jmercouris> anyways, it seems to be either a limition of the sqlite driver implemented for cl-dbi
<jmercouris> or there is something that I am missing
<jmercouris> in the api
matijja has joined #lisp
makomo has quit [Read error: Connection reset by peer]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 272 seconds]
status402_ has quit [Ping timeout: 258 seconds]
gxt has joined #lisp
makomo has joined #lisp
status402 has joined #lisp
Kundry_Wag has joined #lisp
Essadon has joined #lisp
Essadon has quit [Max SendQ exceeded]
Essadon has joined #lisp
xkapastel has joined #lisp
iovec has joined #lisp
ggole has joined #lisp
rippa has joined #lisp
eddof13 has joined #lisp
atgreen_ has joined #lisp
eddof13 has quit [Ping timeout: 268 seconds]
random-nick has joined #lisp
Inline has joined #lisp
status402 has quit [Quit: status402]
status402 has joined #lisp
orivej_ has quit [Ping timeout: 258 seconds]
varjag has quit [Ping timeout: 240 seconds]
varjag has joined #lisp
FreeBirdLjj has joined #lisp
warweasle has joined #lisp
Bike has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Grauwolf has joined #lisp
JetJej has joined #lisp
status402 has quit [Remote host closed the connection]
Josh_2 has quit [Remote host closed the connection]
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
jmercouris has quit [Remote host closed the connection]
dale_ has joined #lisp
dale_ is now known as dale
Jesin has quit [Quit: Leaving]
sjl_ has joined #lisp
Jesin has joined #lisp
milanj has joined #lisp
Kundry_Wag has joined #lisp
Mr-Potter has joined #lisp
atgreen_ has quit [Ping timeout: 258 seconds]
Kundry_Wag has quit [Ping timeout: 268 seconds]
matijja has quit [Ping timeout: 258 seconds]
cage_ has joined #lisp
Inline has quit [Remote host closed the connection]
fortitude_ has quit [Remote host closed the connection]
amerlyq has quit [Quit: amerlyq]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
Lord_of_Life_ has joined #lisp
FreeBirdLjj has quit [Ping timeout: 246 seconds]
igemnace has joined #lisp
Lord_of_Life has quit [Ping timeout: 268 seconds]
Lord_of_Life_ is now known as Lord_of_Life
Inline has joined #lisp
Kundry_Wag has joined #lisp
LiamH has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
atgreen has joined #lisp
akoana has joined #lisp
runejuhl has quit [Ping timeout: 246 seconds]
robotoad has joined #lisp
Mr-Potter has quit [Ping timeout: 244 seconds]
plugd has joined #lisp
dyelar has quit [Quit: Leaving.]
plugd has quit [Ping timeout: 246 seconds]
akoana has left #lisp ["Leaving"]
Mr-Potter has joined #lisp
francogrex has joined #lisp
<francogrex> is it possible to have a function that doesn't return anything?
<beach> Sure.
<francogrex> not even nil
<beach> (defun fun () (values))
<francogrex> ok!
<francogrex> beach: if something like (defun fun () (if x y (values)))
Kundry_Wag has joined #lisp
<francogrex> and how to handle (defparameter parameter (fun)) ?
dyelar has joined #lisp
dyelar has quit [Remote host closed the connection]
<francogrex> parameter could be bound or unbound
<beach> Oh, if such a function is called in a context where a value is needed, then NIL is used.
SqREL has quit [Remote host closed the connection]
<beach> But you can check that FUN returns no values like this: (multiple-value-list (fun))
<Inline> that would be (defun fun () (when x y))
dyelar has joined #lisp
<beach> Inline: That is not the same.
dyelar has quit [Client Quit]
Kundry_Wag has quit [Read error: No route to host]
<Inline> if has 2 two branches, when 1
<beach> And the IF in the example has 2 branches.
<Inline> so when you don't return anything from the second branch in an if, does that not correspond to when then ?
<beach> No, WHEN is defined to return NIL if the condition is false.
<Inline> ah
<Inline> ok
<beach> francogrex: Just like if you have a FUN2 that returns more than one value, and you do (defparameter parameter (fun2)) then only the first return value of fun2 is used.
<francogrex> beach I am not sure it's the same thing i have i.e.(values)
<francogrex> (multiple-value-list (r% "glm" :formula "aes ~ complaints+country+vaccine" :family "poisson" :offset (r% "as.matrix" (r% "log" (r% "subset" sub :select "doses"))) :data sub))
<francogrex> my function sstarts with (r% ... still returns no value
<beach> I am afraid I can't really follow what you are saying.
<beach> What is not the same thing as what?
<beach> If the call to r% returns no values, then you will have an empty list.
<francogrex> well that's the funny thing
<beach> But then, you have nested calls to r% so it is hard to tell what is going on.
<francogrex> (multiple-value-list (r%..)) returns also no value
<beach> And how do you know that?
<sjl_> (multiple-value-list (if nil 1 (values))) => NIL
<sjl_> NIL is the empty list
<sjl_> (multiple-value-list (when nil 'foo)) => (NIL)
<beach> francogrex: (multiple-values-list (multiple-values-list (values))) => (NIL)
<sjl_> a list of one element: NIL
<beach> OK, I'll be quiet.
<francogrex> * (multiple-value-list (r% "glm" :formula "aes ~ complaints+country+vaccine" :family "poisson" :offset (r% "as.matrix" (r% "log" (r% "subset" sub :select "doses"))) :data sub))
<francogrex> *
<sjl_> clhs multiple-value-list
<sjl_> multiple-value-list always returns a list. If your REPL isn't printing anything, something is very wrong.
<beach> francogrex: Again, I don't know what that means. sjl_ seems to want to help you, so I'll be quiet.
<francogrex> R% names a compiled function:
<francogrex> Lambda-list: (&REST RCL::ARGS)
<francogrex> Derived type: (FUNCTION * (VALUES T &OPTIONAL))
<francogrex> Documentation:
<francogrex> Apply the first argument to rest in the R environment (returns r-pointer)
<francogrex> Source file: c:/emacs/zscripts/c-embed/rcl/high-level.lisp
<francogrex> sjl_: ok maybe it's a problem of the REPL
<sjl_> wait
<sjl_> is this emacs lisp, not common lisp?
<francogrex> with (multiple-value-list (fun)) i get the NIL
<francogrex> common lisp sbcl
<francogrex> but with (multiple-value-list (r% ...)) i get the prompt , no values!!!
<sjl_> Right. Then I'm as confused as beach. (multiple-value-list (...)) returns nil when (...) returns zero values.
<sjl_> this is in the normal SBCL REPL? Not Slime or anything?
<francogrex> normal REPL, but i am using *inferior-lisp* (emacs) to sbcl
<francogrex> maybe I should try it in shell directly
<sjl_> I don't know what that means, but if it's a REPL it should be reading the form, eval'ing it, and printing the result (which is NIL).
<sjl_> Try loading your project in a normal SBCL REPL straight in a shell and evaluating that form. That will help narrow things down.
<francogrex> ok
shka_ has joined #lisp
orivej has joined #lisp
<francogrex> same thing in shell
<sjl_> ... can you screenshot it? There must be something fundamental that's not getting communicated here.
<francogrex> hence my question is there another possibility than (values) that a function returns nothing?
<sjl_> If you're running (multiple-values-list ...) at an SBCL REPL and not getting anything printed at all (or an error signaled) something is very, very wrong.
<sjl_> no matter what ... is
<francogrex> * (multiple-value-list (r% "glm" :formula "a ~b+c+d" :family "poisson" :offset (r% "as.matrix" (r% "log" (r% "subset" sub :select "expo"))) :data sub))
<francogrex> ;R! Error in glm.fit(x = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, :
<francogrex> ;R! NA/NaN/Inf in 'y'
<francogrex> ;R! Calls: <Anonymous> -> eval -> eval -> glm.fit
<francogrex> *
<sjl_> Okay, so yes, you're getting an error.
<francogrex> the error is not a lisp error
<francogrex> it is the reason why the (r% ) is not returning a pointer
<francogrex> maybe I need to lok at the src files?
anewuser has joined #lisp
<sjl_> It doesn't matter what r% returns. Having (multiple-value-list ...) around it means that a list WILL be returned, unless an error is signaled and you bail out of the debugger.
dyelar has joined #lisp
<francogrex> yes so (multiple-value-list (/ 2 0)) is that case you talk about but here it is not the same
<sjl_> and if a list is returned, the REPL should be printing it. So if you're not hitting a debugger and selecting an ABORT restart or something, something is very strange.
parjanya has quit [Ping timeout: 252 seconds]
<francogrex> indeed
<francogrex> i will try another implementation
runejuhl has joined #lisp
hhdave has quit [Quit: hhdave]
<scymtym> if the implementation's REPL establishes an ABORT restart, the behavior could be caused by code like (multiple-value-list (handler-bind ((error #'abort)) (/ 2 0)))
kajo has joined #lisp
<sjl_> true. I'd hope a library wouldn't do that.
xrash has joined #lisp
<francogrex> ok thanks anyway I will investigate based on your comments
francogrex has quit [Quit: ERC (IRC client for Emacs 25.3.1)]
ggole has quit [Quit: ggole]
w37 has quit [Remote host closed the connection]
igemnace has quit [Ping timeout: 246 seconds]
atgreen has quit [Ping timeout: 250 seconds]
m00natic has quit [Remote host closed the connection]
eddof13 has joined #lisp
schweers has quit [Quit: ERC (IRC client for Emacs 26.1)]
atgreen has joined #lisp
terpri has joined #lisp
sauvin has quit [Read error: Connection reset by peer]
dmiles has quit [Ping timeout: 246 seconds]
jello_pudding has joined #lisp
mathrick has quit [Ping timeout: 264 seconds]
dmiles has joined #lisp
mindCrime has joined #lisp
refpga has joined #lisp
refpga has quit [Client Quit]
refpga has joined #lisp
atgreen has quit [Ping timeout: 250 seconds]
<pjb> minion: memo for francogrex: Have a look at https://pastebin.com/ms4FqNf4
<minion> Remembered. I'll tell francogrex when he/she/it next speaks.
mathrick has joined #lisp
gxt has quit [Ping timeout: 244 seconds]
MichaelRaskin has joined #lisp
littlelisper has joined #lisp
eddof13 has quit [Quit: eddof13]
littlelisper has left #lisp [#lisp]
eddof13 has joined #lisp
Lycurgus has joined #lisp
gravicappa has quit [Ping timeout: 246 seconds]
mrcom has quit [Read error: Connection reset by peer]
shifty has joined #lisp
random-nick has quit [Ping timeout: 268 seconds]
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
Arcaelyx has joined #lisp
xrash has quit [Ping timeout: 272 seconds]
eddof13 has quit [Quit: eddof13]
dale has quit [Quit: dale]
SqREL has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
dale has joined #lisp
SqREL has quit [Ping timeout: 258 seconds]
random-nick has joined #lisp
asarch has joined #lisp
<asarch> In the McCLIM example, how would you fix this "circular dependency"? http://paste.scsys.co.uk/582739
<asarch> caught STYLE-WARNING: undefined function: COLOR-SLIDER-DRAGGED
gxt has joined #lisp
<no-defun-allowed> It should only occur in the REPL.
<no-defun-allowed> A file is a compile unit, so all functions will be defined "before" they are compiled.
<jackdaniel> asarch: maybe pass it as a symbol?
Zaab1t has joined #lisp
eddof13 has joined #lisp
mr_noobs has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
X-Scale has quit [Ping timeout: 245 seconds]
SqREL has joined #lisp
<asarch> (load "color-editor.lisp") doesn't work either
X-Scale` has joined #lisp
makomo has quit [Quit: WeeChat 2.2]
<jackdaniel> did you try (load (compile "color-editor.lisp")) ;?
<jackdaniel> these files are meant to be compiled
SqREL has quit [Ping timeout: 258 seconds]
<no-defun-allowed> jackdaniel: did you mean compile-file?
<jackdaniel> yes
<jackdaniel> s/yes/perhaps<cowmeme>/
<asarch> D'oh!
<asarch> Ok, ok
xrash has joined #lisp
varjag has joined #lisp
Lycurgus has quit [Quit: Exeunt]
<no-defun-allowed> jd: https://i.imgflip.com/1qstj6.jpg
<shka_> gosh
<shka_> please, no memes
cage_ has quit [Remote host closed the connection]
fiveop has joined #lisp
jack_rabbit has quit [Ping timeout: 264 seconds]
scymtym has quit [Ping timeout: 260 seconds]
fiveop has quit [Client Quit]
fiveop has joined #lisp
mrcom has joined #lisp
<no-defun-allowed> He said <cowmeme>.
<pfdietz> asarch: you can suppress undefined function style warnings if you provide a (declaim (ftype ...)) at the top level, I believe.
<pfdietz> It sort of acts like a function prototype declaration in C.
milanj has joined #lisp
<pfdietz> Alternately, you can make it a generic function, and stick the defgeneric in some early loaded file.
<pfdietz> Although SBCL no longer warns about defmethods without defgenerics.
scymtym has joined #lisp
jello_pudding has quit [Quit: Leaving]
slyrus_ has quit [Quit: Leaving]
fiveop has quit []
anewuser has quit [Ping timeout: 245 seconds]
shifty has quit [Ping timeout: 250 seconds]
Kundry_Wag has joined #lisp
SqREL has joined #lisp
SqREL has quit [Ping timeout: 268 seconds]
mnx has joined #lisp
<Xach> RIP
atgreen has joined #lisp
verisimilitude has joined #lisp
mnx has left #lisp [#lisp]
* sjl_ looks ruefully at "minutes lost wondering why method isn't getting called before noticing one-character typo in name" tally, sighs
<verisimilitude> Shouldn't you get a warning for that?
<verisimilitude> Or an error, depending?
<sjl_> <pfdietz> Although SBCL no longer warns about defmethods without defgenerics.
Mr-Potter has quit [Read error: Connection reset by peer]
orivej has quit [Ping timeout: 258 seconds]
<sjl_> (defgeneric send-message (database value)) (defmethod send-mesage ((database foo) value) ...) does not warn in recent SBCL versions.
<verisimilitude> Oh, that's a misspelling in a DEFMETHOD.
<sjl_> yep
<verisimilitude> I can see why that wouldn't warn, yeah.
<verisimilitude> Ada's system for preventing just this manner of thing comes to mind; you can use the overriding keyword to cause a compilation error if the subprogram doesn't actually override something or not overriding to do the opposite.
hiroaki has joined #lisp
<verisimilitude> I suppose I'd rather have a superfluous warning when purposefully doing this, since it would also cover this case.
Kundry_Wag has quit [Remote host closed the connection]
mindCrime has quit [Ping timeout: 245 seconds]
Bike has quit [Ping timeout: 256 seconds]
<pjb> The other solution is 1- respect the Lysoff substitution principle, 2- to use next-method-p and call-next-method when appropriate, 3- to use method combinations when appropriate, 4- not care whether there's other methods or not, since methods can be added or removed dynamically.
angavrilov has quit [Remote host closed the connection]
<aeth> pjb: 4 can be problematic.
<aeth> Failing early can be good. e.g. It would be nice to see if a CLEANUP method exists before the program runs instead of at the very end.
anewuser has joined #lisp
<aeth> Well, not really before the program runs. Right at the start before anything is really started is often good enough.
LiamH has quit [Quit: Leaving.]
<pjb> aeth: already, with CL you have multiple dispatch, and multiple inheritance. So it doesn't make much sense to expect to "override" or not a method.
<pjb> asarch: I can't load your file because there's no defpackage or in-package.
<pjb> asarch: for example, if I use CL and CLIM, there's: Using #<Package "COMMON-LISP"> in #<Package "FOO"> would cause name conflicts with symbols inherited by that package: interactive-stream-p clim-lisp-patch:interactive-stream-p
<pjb>
Zaab1t has quit [Quit: bye bye friends]
<aeth> pjb: What I mean is that some APIs are simply "if it implements #'bar it's okay" but if #'bar is only called at the end, or at least hours in, it could take you quite some time to realize that something's missing!
<pjb> asarch: when I define a package, and the *application-frame* variable, there's no error.
<pjb> aeth: Granted, API should be defined studily. This is why I have some doubt about using generic functions in APIs…
<pjb> sturdily
SqREL has joined #lisp
sjl_ has quit [Ping timeout: 240 seconds]
Arcaelyx has quit [Read error: Connection reset by peer]
SqREL has quit [Ping timeout: 258 seconds]
rumbler31 has joined #lisp
<aeth> pjb: I'm not sure there's a better solution than calling a #'cleanup method at the end of an unwind protect if it's a framework (with inversion of control: i.e. it is in charge of the control flow) that wraps everything in an unwind-protect.
<aeth> And that cleanup could have just about anything, including freeing foreign data if CFFI-wrapped libraries are used, other calls to cleanup, resetting globals, etc.
Bike has joined #lisp
<aeth> The main drawback, of course, is that that method is essentially by definition called exactly once at the very end, so if it's missing it will take some time to find out when ideally you want to verify that it's there before init.
Arcaelyx has joined #lisp
ebrasca has quit [Remote host closed the connection]
eddof13 has quit [Quit: eddof13]
robotoad has quit [Quit: robotoad]
yvy has joined #lisp
hiroaki has quit [Ping timeout: 245 seconds]
eddof13 has joined #lisp
eddof13 has quit [Client Quit]
Lycurgus has joined #lisp
eddof13 has joined #lisp
mrcom has quit [Read error: Connection reset by peer]
mrcom has joined #lisp
rozenglass has joined #lisp
random-nick has quit [Ping timeout: 240 seconds]
rumbler31 has quit [Remote host closed the connection]
<pjb> aeth: you can check that things have happened in finalize methods for your objects. This is implementation dependent, but for checks it's good enough (just develop with an implementation that have them).
<pjb> I clicked on paste it! Wait…
<pjb> When you click on paste it, it doesn't go to the new page!
<asarch> That paste site is for Perl code for people at perl.irc.net :-P
<asarch> Sorry
<pjb> Anyways, as you can see, this code has no problem.
<asarch> Thank you
<asarch> Thank you very much :-)
<asarch> I owe you a couple of beers!
<pjb> Nope. the question is why you didn't give us your complete code?
<pjb> You're asking about an non-existent problem. Why?
<pjb> When you have a problem you should extract a minimum example demonstrating this problem, but the key word here is "minimal": ie. it must not be smaller. If we cannot load the code to debug it, how can we help?
<pjb> It's better to give too much that not enough.
<pjb> So why did you cut out your defpackage form?
<pjb> And what about this *application-frame* variable? Where did you define it? Why is it not in your paste?
akoana has joined #lisp
akoana has left #lisp [#lisp]
Lycurgus has quit [Quit: Exeunt]
iovec has quit [Quit: Connection closed for inactivity]