evanpeterjones has quit [Ping timeout: 252 seconds]
smasta has joined #lisp
pierpal has quit [Ping timeout: 250 seconds]
anewuser has joined #lisp
<fouric>
...and how would i find the most specific class of an object?
CuriousCain has quit [Quit: WeeChat 2.2]
<no-defun-allowed>
class-of?
Elephant454 has joined #lisp
<fouric>
aha, ty!
<Bike>
finding whether a generic function is applicable is actually kind of complicated.
<fouric>
oh, now i'm curious
<fouric>
why is that?
<Bike>
find-method finds, well, specific methods. with pjb's example, if you tried it with (#<class fixnum> #<class fixnum>) it would find no method, even though the method on integers is applicable to fixnums.
<Bike>
there's compute-applicable-method, which gives you a list of methods given a gf and arguments
<Bike>
however, even if there are applicable methods, they may not be enough to form an effective method, e.g. if there are :around methods but no primary methods
karlosz has quit [Quit: karlosz]
<fouric>
oh, hmmm
<Bike>
could i ask what you want to do in particular?
<fouric>
i was trying to implement something like Smalltalk's :doesNotUnderstand method
<fouric>
which gets called on an object when it doesn't understand a message that was sent to it
<fouric>
i wanted to do this for function/method calls
<fouric>
...and then reason i don't just invoke does-not-understand off the bat is because otherwise we'll recurse infinitely
<Bike>
what specifically does it mean to not understand, though?
<fouric>
actually
pierpal has joined #lisp
<fouric>
it means there's no applicable method, basically.
<fouric>
wait.
<Bike>
...right, so there's no need for the special check within no-applicable-method?
<fouric>
the check is meant to catch the specific does-not-understand
<fouric>
not the original method you called on the object
<Bike>
uh, what?
<fouric>
s/catch the specific/find/
<Bike>
you pass does-not-understand the generic function, not a method.
<fouric>
oh, that would be a bug
<fouric>
i'm sorry, i still confuse "generic function" and "method" with each other because in other languages they mean the same thing
<Bike>
okay. what do you intend to do with the thing passed to does-not-understand?
<fouric>
the idea is that every class defines behavior for do-not-understand
<fouric>
or, rather, a class either defines special behavior, or the normal CL machinery is used to signal that there's no applicable method
<Bike>
but like, what is an example of that behavior - what is done with the method?
<fouric>
it could just be printed out, or maybe logged to a file, or maybe the reason the function was called was because RPC, and a response needs to be sent back over the network instead of signalling a condition locally
<Bike>
for all of those things it seems like a better idea to get the generic function
<Bike>
actually, let me back up here
<Bike>
how would the system even get to no-applicable-method if there is a method matching the first argument?
<fouric>
it wouldn't, but in that case, wouldn't the method just be called on the object?
<fouric>
hang on, i think there's a miscommunication happening here
<fouric>
assume i don't entirely know what the code i wrote does
<Bike>
Okay. Let me explain what your code does.
<fouric>
thanks!
<Bike>
...oh, wait, it's searching for a does-not-understand method
<Bike>
urgh
<Bike>
let's back up another step here. the code you wrote is illegal. you can't specialize no-applicable-method on nothing like that, since it would override everything in the system.
<Bike>
you could define a custom generic function class to do this.
<Bike>
then if you do, you could have no-applicable-method call does-not-understand. if does-not-understand is a normal gf and not one of your custom gfs, no-applicable-method in the case of lacking a does-not-understand method would not go into your method and there would be no recursion.
<pjb>
Make does-not-understand a plain function, not a generic function. problem solved.
<Bike>
but in general i think you'll have to think this through more. multimethods and complex method combination make CL generic functions pretty distinct from the smalltalk object system...
cranes has quit [Remote host closed the connection]
Essadon has quit [Quit: Qutting]
<fouric>
Bike: it would override everything in the system, but only for classes that didn't have a does-not-understand method defined, and that should be OK, right?
<Bike>
it's not allowed by the standard
<fouric>
oh, whoops
<Bike>
i mean, consider if someone else wnated to do something like this, and you both tried to define an unspecialized :around
<Bike>
they'd collide
Ukari has quit [Remote host closed the connection]
Ukari has joined #lisp
<fouric>
i didn't even know you _could_ subclass generic-function
<fouric>
erm, standard-generic-function
<fouric>
i think you're right when you assert i need to think about this a bit more carefully
<fouric>
i don't quite understand how :before/:after/:around methods are combined with primary methods
<Bike>
more familiarity with clos and the mop might help.
<Bike>
that topic is particularly arcane, unfortunately
karlosz has quit [Quit: karlosz]
<fouric>
well, it seems like the MOP is built just for situations like this
<Bike>
indeed.
<fouric>
at least CL has a meta-object protocol at all
<fouric>
afaik this would be impossible in other languages
<Bike>
is how methods are combined
<fouric>
_most_ other languages at least
<fouric>
aha, thank you
paul0 has joined #lisp
karlosz has joined #lisp
wilfredh has quit [Quit: Connection closed for inactivity]
skelic2 has joined #lisp
Fare has joined #lisp
dddddd has quit [Read error: Connection reset by peer]
robdog has joined #lisp
amerlyq has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 258 seconds]
robdog_ has quit [Ping timeout: 264 seconds]
igemnace has quit [Quit: WeeChat 2.4]
notzmv has joined #lisp
caltelt_ has joined #lisp
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
Bike has quit [Quit: Lost terminal]
skelic2 has quit [Quit: Leaving]
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
Oladon has quit [Quit: Leaving.]
robdog has quit [Ping timeout: 268 seconds]
nalkri has joined #lisp
robdog has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
robdog has joined #lisp
gravicappa has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
esrse has joined #lisp
robdog_ has quit [Ping timeout: 264 seconds]
mooshmoosh has quit [Remote host closed the connection]
mooshmoosh has joined #lisp
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
didi has joined #lisp
sauvin has joined #lisp
torbo has joined #lisp
<didi>
Has anyone played with the idea of a function returning a variable number of values? For example, a matching function might return (values x) if I ask for a single match and (values x y z) if I ask for three matches.
<didi>
White_Flame: Thank you. But I'm asking more about uses and pitfalls.
robdog has joined #lisp
<White_Flame>
when receiving the values, you probably want to multiple-value-bind with &optional or &rest
<didi>
White_Flame: Thank you.
<White_Flame>
other than that, I don't think there's anything abnormal about it. It's supported by the language
<didi>
Cool.
<White_Flame>
SBCL might whine about optimization issues with the number of values not being fixed, depending on your speed setting, but it'll deal with it
robdog_ has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
cyraxjoe has quit [Ping timeout: 244 seconds]
robdog_ has quit [Ping timeout: 268 seconds]
cyraxjoe has joined #lisp
<didi>
SBCL compiler be crazy. I get lots of help from it.
<White_Flame>
yep, but if you set speed 3, it whines about every place it can't fully optimize
<didi>
Anyway, this variable number of values idea sounds intriguing. I'll try to use it.
<didi>
White_Flame: Indeed.
* White_Flame
has a (slow-body &body ..) to muffle that when necessary
<didi>
:-)
<White_Flame>
wrote it a long time ago, not sure how accurate it is for current versions: https://pastebin.com/Rmyazt4z
<pjb>
didi: there's no difficulty in writing such a function. But if the number of values is not known at compilation-time, then you will have to use multiple-value-list and cons a list!
<White_Flame>
multiple-value-bind and &rest, if used immediately and not passed around, has the possibility of not consing
<pjb>
White_Flame: watch the precondition!
zooey has joined #lisp
<pjb>
s/precondition/antecedent/
<slyrus__>
I'm looking for a lispy approach to "time travel" through a modestly-sized (read: small) data set, where I want to be able to see the "state of the (again, relatively small) world" at a particular point in time. Anyone have any suggestions?
<slyrus__>
beach has a library called Clobber that might be a good place to start, but I figured I'd see if others have dealt with this or similar problems before.
<White_Flame>
look up pure functional data structures
<White_Flame>
either that, or keep a changelist of undo/redo function objects that you can use to traverse time
rozenglass has joined #lisp
<White_Flame>
or if it's small enough, just deep copy on change :-P
robdog has joined #lisp
<White_Flame>
(looks like clobber probably takes the second approach)
<didi>
SBCL seems to not care about not receiving some values. (multiple-value-bind (x y) (values) x y) => NIL
<White_Flame>
" If there are more vars than values returned, extra values of nil are given to the remaining vars. " - clhs
didi has quit [Quit: O bella ciao bella ciao bella ciao, ciao, ciao.]
robdog has joined #lisp
didi has joined #lisp
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
troydm has quit [Ping timeout: 250 seconds]
torbo has quit [Remote host closed the connection]
CriticalCow has quit [Quit: leaving]
robdog has quit [Ping timeout: 268 seconds]
robdog has joined #lisp
Elephant454 has quit [Quit: ERC (IRC client for Emacs 26.1)]
Fare has quit [Ping timeout: 246 seconds]
<didi>
So... on which occasion would you use EQ?
robdog has quit [Ping timeout: 268 seconds]
<pjb>
never.
<pjb>
didi: use EQL.
<didi>
pjb: That's the conclusion I'm marching at.
gravicappa has quit [Remote host closed the connection]
ltriant has quit [Quit: leaving]
<White_Flame>
when performance is critical in inner loops, and you're guaranteed to not to be dealing with numbers or characters
<didi>
White_Flame: Hum. Interesting.
<White_Flame>
(unless the numbers are guaranteed to be fixnums, but even then I think ABCL doesn't guarantee that fixnums are EQ)
robdog has joined #lisp
vlatkoB has joined #lisp
Inline has quit [Quit: Leaving]
<verisimilitude>
You use EQ when you want to see if two objects are actually the same object.
robdog has quit [Ping timeout: 264 seconds]
<verisimilitude>
You can use EQ with SYMBOLs, say.
<didi>
verisimilitude: Thanks.
<verisimilitude>
You'll also be using EQ if you want to CATCH or THROW.
<pjb>
verisimilitude: like (eq 42 42) -> NIL even (let ((x 42)) (eq x x)) -> NIL is allowed.
<pjb>
verisimilitude: EQ is an operator that serves only to detect whether an implementation copies integers and characters or not.
<verisimilitude>
If you wanted to be mean, didi, you could write Common Lisp that behaves subtly differently between implementations based on whether objects that happen to be numbers or characters are ever EQ.
<verisimilitude>
I like EQ, pjb. It's an optimization.
<verisimilitude>
It's just a few machine instructions, at most.
<pjb>
same with eql.
<verisimilitude>
EQL is more complex, purely because it can't simply compare a combined tag and pointer value to arrive at its answer.
robdog has joined #lisp
<pjb>
verisimilitude: but forgetting about EQ frees some neurons for better things, and you don't have to think whether you can use it or not when you write code, and you don't have to ponder whether something special occurs with numbers and characters when you read it.
<verisimilitude>
You'll mostly be using EQL, though, didi. When in doubt between EQUAL and EQUALP, just use EQUALP if you're too lazy to look at the documentation.
pankajgodbole has joined #lisp
<verisimilitude>
Sure, but why are you using Common Lisp instead of something else, at that point, pjb?
<pjb>
In any case you don't use all the CL operators in all your programs.
<verisimilitude>
Don't tempt me.
la_mettrie has left #lisp ["WeeChat 2.2"]
robdog has quit [Ping timeout: 252 seconds]
zotan has quit [Ping timeout: 245 seconds]
lavaflow_ has quit [Read error: Connection reset by peer]
<shka__>
White_Flame: do you understand question "what is the fastest correct CSV parser for CL?"
<White_Flame>
it's a source of information to feed to your predicates :)
<jackdaniel>
as you have noted, "correct" doesn't have much sense, "practical" is better; and I daresay all published libraries are practical to some degree
<shka__>
i know that clicki exists, i know that parser exists, i just want to know if there is something faster cl-csv
<White_Flame>
cl-csv claims some performance tuning, and is in the recommended lists
<shka__>
cl-csv is rather slow
<jackdaniel>
as of "spped" you should benchmark it instead of asking. someone may tell you "this is the fastest" - how do you know it really is? maybe he didn't mbenchmark?
<White_Flame>
none of them claim high speed
<shka__>
though it works very well
<jackdaniel>
s/spped/speed/
<shka__>
just slowly ^_^
<shka__>
well, great, thanks for help
<shka__>
you saved me so much time :P
<splittist>
presumably a csv library has to deal with arbitrary csv, but your problem domain is narrower, so you could tune your own for higher performance (whatever that might mean)
juristi has quit [Quit: Konversation terminated!]
<shka__>
splittist: i actually need something general, but maybe i can investigate cl-csv performance
<shka__>
maybe there is something more to gain
<White_Flame>
I guess if you read-line, then have each field be a displaced-array into that line, that could work
<shka__>
cl-csv is pretty solid and feature complete
<jackdaniel>
csv parsing will be I/O bound in most cases
<shka__>
just not very fast
scymtym has joined #lisp
<shka__>
jackdaniel: not really the case for cl-csv as it seems
<White_Flame>
however, if you have quoted fields with embedded quotes, eg "foo \"bar\" baz", you'd still need to re-render that string
robdog_ has quit [Ping timeout: 252 seconds]
<jackdaniel>
shka__: compard to /what/?
<shka__>
what compared to what?
<White_Flame>
presumably copying out those fields is slow, but read-line might also be a performance pig. You'll have to profile
<shka__>
White_Flame: i profiled it
<jdz>
What about newlines in strings?
<White_Flame>
also if you have quoted fields with embedded newlines, that mucks with using read-line cleanly
<White_Flame>
jdz: yeah
<shka__>
CL-CSV::CHECK-AND-DISTPATCH takes up majority of time, dominating even the IO
<jdz>
Also the strings that are enclosed in double double quotes so that the double quotes inside don't have to be escaped?
<White_Flame>
but theoretically those could still used displaced strings
<jdz>
The value of using displaced arrays also should be measured.
<White_Flame>
jdz: hadn't seen that before. They don't use python-style triple double-quotes?
<shka__>
furthermore, even if i read the whole file into string and build stream on top of that, it does not improve performance dramaticly
<White_Flame>
right, there's a lot of decisions & copying to be done
<shka__>
indeed
<jackdaniel>
shka__: you claim that it is not I/O bound, so what is the bottleneck? I don't see cl-csv::check-and-dispatch symbol in said package
<jackdaniel>
in fact apropos yields nothing for this symbol
<White_Flame>
maybe disTpatch? ;)
<jdz>
White_Flame: yeah, I might be confusing that with escaping a character by doubling it.
<shka__>
i don't know why this is must be defmethod instead of defun
<White_Flame>
I don't think too many people have had need for high-performance csv reading; sounds like you've got a niche to fill
<shka__>
i guess
<shka__>
well, i will try to whip cl-csv into better performance
<White_Flame>
of course, some of the other libs on cliki might be faster for lack of abstracted features
<White_Flame>
even if not intentionally faster
<shka__>
yeah, but i like cl-csv, it does the right thing
<shka__>
it is just not speedy
<Jachy>
shka__: If python is much faster, you could always try burgled-batteries. ;)
<shka__>
not an option
<White_Flame>
you could compile a regex and see how fast it gets
<shka__>
i attempted that
<shka__>
it gets very, very, very fast ;-)
<shka__>
order of magnitude faster
<White_Flame>
yep, should be a pretty optimal state machine
<shka__>
but not sure is i can parse CSV with regexs in general case
<White_Flame>
you could do it field-by-field
beach has quit [Ping timeout: 258 seconds]
<White_Flame>
given that the regex should be able to give you the index of the last character of the match, from which you can parse the next field
rozenglass has quit [Ping timeout: 245 seconds]
<shka__>
hmmm
<shka__>
White_Flame: this sounds pretty reasonable
<White_Flame>
of course, if the field starts with a doublequote you'd probably still have to search for embedded quotes and perform a transform
<White_Flame>
after the regex extracted it
<shka__>
i will try to tune cl-csv first though, writing my own csv parser is considerable undertaking
gxt has joined #lisp
gxt has quit [Ping timeout: 244 seconds]
karlosz has quit [Quit: karlosz]
hhdave has joined #lisp
beach has joined #lisp
amerlyq has joined #lisp
schweers has joined #lisp
<scymtym>
is there an easy way to use gitlab.common-lisp.net's mandatory two-factor authentication without a phone or additional hardware?
spoeplau has joined #lisp
themsay has quit [Read error: Connection reset by peer]
themsay has joined #lisp
pankajgodbole has quit [Ping timeout: 246 seconds]
esrse has quit [Ping timeout: 268 seconds]
flamebeard has joined #lisp
ebrasca has joined #lisp
jmercouris has joined #lisp
flamebeard has quit [Remote host closed the connection]
froggey has quit [Ping timeout: 255 seconds]
heisig has joined #lisp
froggey has joined #lisp
akater has quit [Remote host closed the connection]
akater has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
dddddd has joined #lisp
<no-defun-allowed>
oathtool?
orivej_ has quit [Ping timeout: 246 seconds]
bpr_ has joined #lisp
<bpr_>
hi there
<beach>
Hello bpr_.
<beach>
bpr_: Are you new here? I don't recognize your nick.
<bpr_>
yup
<beach>
Great! What brings you to #lisp?
<bpr_>
emacs u know
<bpr_>
in first
<beach>
I see.
<bpr_>
but now many other things like dss systems and old software
<bpr_>
and u ?
nalkri is now known as OpDredd
paul0 has quit [Remote host closed the connection]
<scymtym>
no-defun-allowed: looking into it. thanks
ambrevar has joined #lisp
OpDredd is now known as nalkri
bpr_ has quit [Quit: Leaving]
robdog has joined #lisp
smasta has quit [Ping timeout: 246 seconds]
robdog has quit [Ping timeout: 259 seconds]
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
robdog_ has joined #lisp
smasta has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
smasta has quit [Ping timeout: 250 seconds]
robdog_ has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 258 seconds]
zotan has quit [Ping timeout: 245 seconds]
wigust has quit [Read error: Connection reset by peer]
wigust has joined #lisp
robdog has joined #lisp
robdog_ has quit [Ping timeout: 252 seconds]
robdog has quit [Read error: Connection reset by peer]
robdog has joined #lisp
m00natic has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
robdog has joined #lisp
zotan has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
robdog has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
flamebeard has joined #lisp
Fare has joined #lisp
robdog has joined #lisp
robdog_ has quit [Ping timeout: 252 seconds]
edgar-rft has quit [Quit: Leaving]
robdog has quit [Ping timeout: 264 seconds]
robdog has joined #lisp
ironChicken has left #lisp ["ERC Version 5.3 (IRC client for Emacs)"]
juristi[m] has joined #lisp
robdog has quit [Ping timeout: 240 seconds]
juristi[m] is now known as juristi
Lord_of_Life_ has joined #lisp
robdog has joined #lisp
Lord_of_Life has quit [Ping timeout: 252 seconds]
Lord_of_Life_ is now known as Lord_of_Life
robdog_ has joined #lisp
flamebeard has quit [Remote host closed the connection]
robdog has quit [Ping timeout: 252 seconds]
Fare has quit [Ping timeout: 272 seconds]
robdog has joined #lisp
robdog_ has quit [Ping timeout: 252 seconds]
Krystof has quit [Ping timeout: 268 seconds]
LiamH has joined #lisp
Essadon has joined #lisp
beach has quit [Ping timeout: 252 seconds]
<Xach>
Hmm, is this ok? (defun starts-with (subseq seq test) (and (<= (length subseq) (length seq)) (every test subseq seq))?
robdog_ has joined #lisp
<Xach>
I've done endless variations of a starts-with thing and I don't remember using this. (e.g. mismatch, :start and :end with string= and stuff, etc)
robdog has quit [Ping timeout: 252 seconds]
robdog_ has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
<_death>
looks ok to me
robdog_ has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
ambrevar has quit [Ping timeout: 244 seconds]
moldybits has joined #lisp
Bike has joined #lisp
drot has quit [Ping timeout: 245 seconds]
<Xach>
sometimes i "discover" great new terse ways to do things that don't work
<dim>
phoe: the reason why it fails is that Postmodern is using the PostgreSQL extended query protocol which works with a query at a time, with out-of-line parameters (good to avoid SQL injections)
<dim>
the trade-off is that you then need to make sure in the app that you're sending one query at a time using that protocol
<dim>
select E'\';' as ";"; is an example of a corner-case when parsing SQL queries from a file
<dim>
the result is a single value '; in a column named ;
sjl_ has quit [Quit: WeeChat 2.3-dev]
choiboi has quit [Read error: Connection reset by peer]
sjl_ has joined #lisp
Fare has quit [Ping timeout: 252 seconds]
<jackdaniel>
dim: did you see my yesterday's comment?
Jesin has quit [Quit: Leaving]
<dim>
I didn't, no, sorry
<dim>
I'm seeing it now! thanks
flamebeard has quit [Remote host closed the connection]
<jackdaniel>
sure, let me know if that helped
Jesin has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
flamebeard has joined #lisp
FreeBirdLjj has quit [Ping timeout: 252 seconds]
flamebeard has quit [Remote host closed the connection]
flazh has quit [Ping timeout: 245 seconds]
gxt has joined #lisp
m00natic has quit [Remote host closed the connection]
Zaab1t has joined #lisp
<dim>
There is no package with the name PGLOADER
<dim>
ok I'm not sure what gets into the binary I'm preparing
gxt has quit [Ping timeout: 245 seconds]
xantoz has quit [Ping timeout: 250 seconds]
<dim>
jackdaniel: http://paste.debian.net/1074118/ if you want to have a look, but don't allocate time for that, I was just curious about building pgloader with ECL that's all
<jmercouris>
why does (string-downcase nil) return "nil", is there a more sensible function that will actually return nil?
<dlowe>
strings designators (which include symbols) are converted to strings if they are not strings
<beach>
jmercouris: What is wrong with what it does?
<dlowe>
by any of the string-* functions
robdog has joined #lisp
<jmercouris>
I would like it to return nil when passed nil
<Bike>
why
<Bike>
string-downcase returns a string
<jmercouris>
since nil is not a string
<dlowe>
(and x (string-downcase x)) will do what you want
<jmercouris>
I know that
<beach>
jmercouris: You mean the lower-case symbol with the name "nil"?
<beach>
jmercouris: In what package?
<jmercouris>
however I feel like it should signal a condition or something
<dlowe>
so define string-downcase* :p
<Bike>
string-downcase on something it can't get a string for is an error
<Bike>
but it takes string designators for convenience
<jmercouris>
if I pass a not string to a function expecting a string...
<Bike>
if you pass string-downcase a symbol it will use the symbol-name
<dlowe>
it doesn't expect a string
<jmercouris>
well, I would say it is poorly named then, no?
<Bike>
no
<jmercouris>
why not symbol-or-string-downcase?
<Bike>
because that's long and silly
<Bike>
it's just a forgiving function, is all
<dlowe>
it compares as a string and always returns a string
<jmercouris>
string-downcase* it is :D
<Bike>
if you want to test whether something is a string and signal an error if it's not, you can do it yourself
<jmercouris>
of course, I just wanted to see if something else existed that I was missing
<Bike>
nope
<jmercouris>
and maybe there was some rational to this logic
<jmercouris>
rationale*
<Bike>
yes, it's a convenience thing
<jmercouris>
I do not find it convenient
<jmercouris>
but it is a matter of taste I guess
<Bike>
like passing symbols to funcall and apply and mapcar
* dim
AFK, have a good time folks
<jmercouris>
yes
<jackdaniel>
dim: as I've mentioned, ecl doesn't save image
<jackdaniel>
you need to point at the sources you want to build
<jackdaniel>
see examples/build/
nanoz has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
<jackdaniel>
there is asdf utility to build systems too, also see examples/asdf-with-deps
<jackdaniel>
to see how to use it
<jackdaniel>
minion: memo for dim: I've left some answers so please scroll up ;-)
<minion>
Remembered. I'll tell dim when he/she/it next speaks.
robdog has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
lavaflow_ has quit [Read error: Connection reset by peer]
ciaranb has quit [Read error: Connection reset by peer]
sauvin has quit [Read error: Connection reset by peer]
<pjb>
nil is a symbol like any other. there's no reason to make a special case of it.
<pjb>
If you really need that, write your own function.
<jmercouris>
will do
<jmercouris>
string-downcase*
<pjb>
(defun string-downcase⊥ (x &rest keys &key start end) (declare (ignore start end)) (when x (apply (function string-downcase) x keys)))
<pjb>
I prefer to use ⊥ to represent bottom.
<pjb>
But * is more ASCII than ⊥.
<jmercouris>
why apply function?
<jmercouris>
instead of just (string-downcase ...)?
<Bike>
the keys
schweers has quit [Ping timeout: 268 seconds]
<jmercouris>
the keys...????????
robdog has joined #lisp
<jmercouris>
oh the key arguments
<Bike>
the variable called "keys"
<Bike>
wasn't trying to be cryptic, srry
<jmercouris>
indeed!
<jmercouris>
no problem
robdog_ has joined #lisp
lucasb has joined #lisp
Fare has joined #lisp
hhdave has quit [Ping timeout: 245 seconds]
robdog has quit [Ping timeout: 252 seconds]
<shka_>
good evening
robdog_ has quit [Ping timeout: 252 seconds]
<shka_>
ok, so at turns out i was able to speed up cl-csv ×3 times
<shka_>
*as it turns out
<shka_>
which seems to be nice
flamebeard has joined #lisp
flamebeard has quit [Read error: Connection reset by peer]
<shka_>
hopefully my changes can be accepted into master so everybody can benefit from it
<jmercouris>
shka_: I use it, so that would be nice
<shka_>
i will discuss with maintainer if everything is fine, i was aggressive with my approach so it may be a little bit controversial.
<jmercouris>
how so? you wrote them an angry message :D?
<shka_>
no
<shka_>
declaim inline here and there, replaced few defmethod with defun, replaced one class with struct, changed few internal functions
zotan has quit [Ping timeout: 268 seconds]
robdog has joined #lisp
<shka_>
most of it is no big deal, but it is more rigid now
zotan has joined #lisp
<shka_>
so it may interfere with overall design
<shka_>
and not many people here seems to have some jumbo csv files
cage_ has joined #lisp
Fare has quit [Ping timeout: 252 seconds]
robdog has quit [Ping timeout: 252 seconds]
spoeplau has quit [Ping timeout: 245 seconds]
pankajgodbole has quit [Ping timeout: 272 seconds]
robdog has joined #lisp
Aruseus has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
ebrasca has quit [Remote host closed the connection]
<phoe>
dim: does it mean that I likely won't get a (postmodern:execute-file #p"/home/phoe/foo.sql")?
<phoe>
it doesn't make much sense to me - in order to execute a SQL file, I need to either parse and digest it, or drop all the way down to bash to execute "psql < foo.sql"
<phoe>
jmercouris: (check-type x string) (string-downcase x)
jmercouris has quit [Remote host closed the connection]
ym555 has joined #lisp
trafaret1 has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
robdog has joined #lisp
smasta has quit [Ping timeout: 272 seconds]
Zaab1t has quit [Quit: bye bye friends]
robdog has quit [Ping timeout: 252 seconds]
Achylles has joined #lisp
smasta has joined #lisp
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
Jesin has quit [Quit: Leaving]
Jesin has joined #lisp
parjanya has joined #lisp
robdog has joined #lisp
Achylles has quit [Ping timeout: 252 seconds]
robdog has quit [Ping timeout: 252 seconds]
nanoz has quit [Ping timeout: 268 seconds]
ciaranb has joined #lisp
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
<moldybits>
if obj is an instance of a class defined in package P, and i want to get or set the slot value, i have to (slot-value obj 'P::slotname). hm ...
robdog has quit [Ping timeout: 252 seconds]
<scymtym>
moldybits: you would normally use an accessor (whose name would normally be exported from P)
<scymtym>
i.e. for (defpackage #:p (:use #:cl) (:export #:name)) (in-package #:p) (defclass c () ((name :accessor name))) you would have something like (in-package #:p2) (p:name obj) (setf (p:name obj) value)
<moldybits>
i'm using my own setter so that i can store the modifications done to the object in a history list. i could :before all the setting accessors, or maybe there's even a way to do it for all of them, but that'd hide the magic. hm.
<moldybits>
one option would be to take whatever symbol is passed in an get the corresponding one in P.
<phoe>
moldybits: modification list sounds like a use case for :before on a setter
<phoe>
or rather, :afeter
<phoe>
s/afeter/after/
spoeplau has joined #lisp
<moldybits>
there's no way to :before all the slot setters of a class, is there?
<phoe>
moldybits: sounds like you want a metaclass then
<moldybits>
i don't know what those are. i'm reading keene's book, though. hopefully she'll cover it. :p
<phoe>
moldybits: you'll want to get into metaprogramming. see, in Lisp, classes are just objects like all other objects, and you can modify them like all other objects.
<phoe>
such as, you can modify an instance's slots so they record their setting history.
varjag has quit [Quit: ERC (IRC client for Emacs 26.1)]
Achylles has quit [Remote host closed the connection]
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
rtypo has joined #lisp
libertyprime has joined #lisp
didi has joined #lisp
vlatkoB has quit [Remote host closed the connection]
Fare has quit [Ping timeout: 272 seconds]
Jesin has quit [Quit: Leaving]
<didi>
Suppose I have a function that returns a variable number of values, so I will use VALUES-LIST to return accumulated values. I want to alleviate the creation of this intermediary list. How about using a construction like (defun fn () (let ((l (produce-result-list))) (declare (dynamic-extent l)) (values-list l)))?
vms14 has quit [Quit: Doing something with my shit life :D]
Josh_2 has quit [Ping timeout: 245 seconds]
robdog has joined #lisp
<Bike>
unlikely to work unless produce-result-list is inlined
<Bike>
since the code that produces the list is within that function, and wouyld need to know to allocate on the stack
<didi>
Bike: Interesting. So what about, instead of (produce-result-list) I have (loop ... collect (produce-single-item))?
ciaranb has quit [Ping timeout: 268 seconds]
<Bike>
depends on how smart the compiler is
robdog_ has joined #lisp
<didi>
I see. Thank you, Bike.
<Bike>
as an example, see the sbcl manual under 6.2, "At present, SBCL implements stack allocation for"
<didi>
Will do.
<Bike>
i'm not sure sbcl is smart enough
robdog has quit [Ping timeout: 252 seconds]
Jesin has joined #lisp
robdog_ has quit [Ping timeout: 252 seconds]
jmercouris has joined #lisp
<jmercouris>
best packages for Common Lisp development in Emacs?
<jmercouris>
I have slime, paredit, and smartparens already
<jmercouris>
I've also set-up (slime-setup '(slime-fancy slime-company slime-asdf slime-indentation slime-sbcl-exts))
pjb has quit [Ping timeout: 252 seconds]
pjb has joined #lisp
<spacedbat>
jmercouris: slime is venerable and good - it is actively developed
robdog has joined #lisp
<spacedbat>
some people swear by sly as an alternative
<spacedbat>
I think it shows promise, but I haven't tried it in a while
<spacedbat>
slime user here
<jmercouris>
Yes, I use slime...
<jmercouris>
as indicated above
<spacedbat>
check out sly, its a serious alternative
<spacedbat>
it doesn't have presentations, which I take some issue with
<jmercouris>
presentations?
robdog has quit [Ping timeout: 252 seconds]
jmercouris has quit [Remote host closed the connection]