santiagopim[m] has quit [Ping timeout: 240 seconds]
ecm has quit [Ping timeout: 244 seconds]
ey[m]2 has quit [Ping timeout: 244 seconds]
stargazesparkle has quit [Ping timeout: 246 seconds]
ey[m] has quit [Ping timeout: 246 seconds]
deselby has quit [Ping timeout: 246 seconds]
jeosol has quit [Quit: Ping timeout (120 seconds)]
X-Scale has quit [Ping timeout: 260 seconds]
Lolicon[m]1 has quit [Ping timeout: 244 seconds]
ey[m]1 has quit [Ping timeout: 240 seconds]
arichiardi[m] has quit [Ping timeout: 240 seconds]
exit70[m] has quit [Ping timeout: 240 seconds]
etimmons has quit [Ping timeout: 246 seconds]
jdormit[m] has quit [Ping timeout: 268 seconds]
chipk[m] has quit [Ping timeout: 268 seconds]
dmiles[m] has quit [Ping timeout: 244 seconds]
X-Scale` is now known as X-Scale
clone_of_saturn has joined #lisp
caret_ has joined #lisp
anticrisis_ has joined #lisp
jeosol has joined #lisp
yottabyte has quit [Ping timeout: 274 seconds]
Balooga has quit [Ping timeout: 274 seconds]
rvirding has quit [Ping timeout: 274 seconds]
rvirding has joined #lisp
saturn2 has quit [Write error: Connection reset by peer]
anticrisis has quit [Remote host closed the connection]
caret has quit [Remote host closed the connection]
stylewarning has quit [Ping timeout: 264 seconds]
drmeister has quit [Ping timeout: 264 seconds]
yottabyte has joined #lisp
Balooga has joined #lisp
entel has joined #lisp
drmeister has joined #lisp
vutral_ has quit [Quit: Connection closed for inactivity]
stylewarning has joined #lisp
attila_lendvai has quit [Ping timeout: 264 seconds]
hiroaki_ has joined #lisp
tessier has quit [Ping timeout: 272 seconds]
random-nick has quit [Ping timeout: 272 seconds]
hiroaki has quit [Ping timeout: 256 seconds]
thinkpad has quit [Ping timeout: 260 seconds]
thinkpad has joined #lisp
bilegeek_ has joined #lisp
bilegeek has quit [Read error: Connection reset by peer]
bilegeek_ has quit [Client Quit]
pillton has quit [Ping timeout: 260 seconds]
akoana has left #lisp ["Leaving"]
loke[m] has joined #lisp
quanta[m] has joined #lisp
santiagopim[m] has joined #lisp
zacts has joined #lisp
zacts has quit [Client Quit]
ey[m] has joined #lisp
nicktick has joined #lisp
hiroaki_ has quit [Ping timeout: 260 seconds]
tessier has joined #lisp
ecm has joined #lisp
Lolicon[m]1 has joined #lisp
ey[m]2 has joined #lisp
malaclyps_ has joined #lisp
chipk[m] has joined #lisp
ey[m]1 has joined #lisp
arichiardi[m] has joined #lisp
cairn has joined #lisp
deselby has joined #lisp
kaftejiman has quit [Remote host closed the connection]
susam has joined #lisp
Gnuxie[m] has joined #lisp
eymebolofscrumpe has joined #lisp
chipk[m] has quit [Ping timeout: 240 seconds]
malaclyps_ has quit [Ping timeout: 240 seconds]
deselby has quit [Ping timeout: 246 seconds]
cairn has quit [Ping timeout: 258 seconds]
arichiardi[m] has quit [Ping timeout: 240 seconds]
ey[m]1 has quit [Ping timeout: 246 seconds]
quanta[m] has quit [Ping timeout: 246 seconds]
eymebolofscrumpe has quit [Ping timeout: 260 seconds]
ecm has quit [Ping timeout: 260 seconds]
mmmattyx has quit [Quit: Connection closed for inactivity]
Gnuxie[m] has quit [Ping timeout: 244 seconds]
ey[m]2 has quit [Ping timeout: 246 seconds]
Lolicon[m]1 has quit [Ping timeout: 258 seconds]
loke[m] has quit [Ping timeout: 258 seconds]
susam has quit [Ping timeout: 260 seconds]
santiagopim[m] has quit [Ping timeout: 268 seconds]
ey[m] has quit [Ping timeout: 268 seconds]
judson_ has joined #lisp
aeth_ has joined #lisp
judson_ has quit [Client Quit]
aeth has quit [Disconnected by services]
aeth_ is now known as aeth
judson_ has joined #lisp
sjl has quit [Ping timeout: 264 seconds]
stargazesparkle has joined #lisp
<lotuseater>
if i type in SLIME (defmethod initialize-instance ...) there are shown at the bottom many keywords, what exactly affects that?
rogersm has joined #lisp
rogersm has quit [Ping timeout: 240 seconds]
dbotton has joined #lisp
nicktick has quit [Read error: Connection reset by peer]
phantomics has joined #lisp
jdormit[m] has joined #lisp
kaisyu[m] has joined #lisp
ThaEwat has joined #lisp
infra_red[m] has joined #lisp
ms[m] has joined #lisp
even4void[m] has joined #lisp
katco has joined #lisp
cairn has joined #lisp
santiagopim[m] has joined #lisp
exit70[m] has joined #lisp
deselby has joined #lisp
malaclyps_ has joined #lisp
dieggsy has joined #lisp
susam has joined #lisp
etimmons has joined #lisp
dmiles[m] has joined #lisp
backinaweek[m] has joined #lisp
loke[m] has joined #lisp
quanta[m] has joined #lisp
Gnuxie[m] has joined #lisp
MrtnDk[m] has joined #lisp
solideogloria[m] has joined #lisp
ey[m]1 has joined #lisp
ey[m] has joined #lisp
chipk[m] has joined #lisp
jonas[m]2 has joined #lisp
arichiardi[m] has joined #lisp
eymebolofscrumpe has joined #lisp
ey[m]2 has joined #lisp
ecm has joined #lisp
keizerrijk[m] has joined #lisp
Lolicon[m] has joined #lisp
mrcom has quit [Ping timeout: 265 seconds]
Nilby has joined #lisp
mrcom has joined #lisp
wxie has joined #lisp
pillton has joined #lisp
loli has quit [Quit: WeeChat 3.0]
rumbler31_ has quit [Ping timeout: 256 seconds]
loli has joined #lisp
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
joast has joined #lisp
<Bike>
i think slime just shows all keywords that are accepted by any initialize-instance method. possibly slot initargs as well?
Nilby has quit [Read error: Connection reset by peer]
Nilby has joined #lisp
todun has joined #lisp
todun has left #lisp [#lisp]
rumbler31 has quit [Read error: Connection reset by peer]
rumbler31 has joined #lisp
bjorkintosh has joined #lisp
python476 has quit [Ping timeout: 264 seconds]
v88m has quit [Ping timeout: 272 seconds]
rumbler31_ has joined #lisp
bitmapper has joined #lisp
v88m has joined #lisp
judson_ has joined #lisp
lucasb has quit [Quit: Connection closed for inactivity]
mrcom has quit [Ping timeout: 265 seconds]
Josh_2 has quit [Remote host closed the connection]
mrcom has joined #lisp
seok has joined #lisp
<seok>
if I compile a lisp program and give it to someone else, can they try to figure out what objects are internally by reading memory?
ebrasca has quit [Remote host closed the connection]
aeth has quit [Ping timeout: 240 seconds]
ralt has quit [Quit: Connection closed for inactivity]
<Bike>
Sure. Won't be easy though.
aeth has joined #lisp
<seok>
oh :o
<seok>
so i probably shouldnt make a variable with my ssn as string, compile, then ship it?
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Bike>
i don't think that's a good idea regardless of what programming language you're using, no
<Alfr>
seok, what problem are you trying to solve? Though it likely is better suited for the cafe.
<edgar-rft>
seok: hat sounds like a bad idea in *any* programming language, not only Lisp
<shinohai>
lol k
<seok>
uh ok
<seok>
idk im looking to ship a client with sensitive data
<seok>
wondering if theres a good way to do this
<Bike>
Same stuff you'd usually use to secure data. Encryption and so on.
<seok>
but if the client is shipped with encrypted variable, it would be have to be shipped with the key too
<seok>
in that case there's no point eh?
judson_ has joined #lisp
<Bike>
"and so on" includes the security practices surrounding such things
<seok>
is that a book
<Bike>
no
<Alfr>
seok, homomorphic encryption and that what you ship must only operate on the blobs. But I don't know of any efficient scheme or even if what you want to do is possible with what little we currently have.
<Bike>
of course we have efficient ways to send data securely
<Bike>
you could do some key exchange to establish a secure channel and then send your ssn or whatever that way
<seok>
yeah ssn was a dummy example xd
<Bike>
but this isn't really a lisp specific topic
<seok>
sorry :x i thought there might be a compile specific solution
<seok>
guess not
rogersm has joined #lisp
rogersm has quit [Ping timeout: 240 seconds]
dbotton has quit [Quit: This computer has gone to sleep]
adlai has left #lisp ["lurking leads to anaphora, and that leads to blindness; that, to reincarnation as a listener; stay human, humans!"]
clone_of_saturn is now known as saturn2
tinga has joined #lisp
miasuji has joined #lisp
ech has quit [Ping timeout: 240 seconds]
<tinga>
Hi. How do I bind a value in the top level of a package, so that changes to the code (reloading the file) can have it be a different value?
<tinga>
(defconstant foo 123) in SBCL will not allow foo to be defined anything else on subsequent loads.
mindCrime has quit [Ping timeout: 264 seconds]
<aeth>
tinga: defparameter or defvar
<tinga>
I feel like I'd be OK with setf not working on foo. There's defparameter for those, after all. But the SBCL behaviour seems to make it impossible to develop the program without a restart?
<tinga>
Ah, didn't know about defvar
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
scymtym has joined #lisp
<tinga>
Somehow ANSI Common Lisp decides to only introduce defvar way later.
gaqwas has quit [Ping timeout: 240 seconds]
<tinga>
Why is this false? I thought `equal` does structural equality?: (equal (make-array '(2 3) :initial-element "hi") (make-array '(2 3) :initial-element "hi"))
ech has joined #lisp
gaqwas has joined #lisp
gaqwas has joined #lisp
<tinga>
same for (equal (vector 1) (vector 1))
<Alfr>
tinga, it behaves like eq for arrays, except strings and bit-vectors.
Dizidentu has joined #lisp
<tinga>
Why?
<Alfr>
What why? The spec simply says so.
<tinga>
Why as in what's the reasoning behind it, what is it good for?
<Alfr>
tinga, have a look at equalp, tough it's not case sensitive for string. If that doesn't fit your bill, simply write your own predicate.
<tinga>
k, thanks
mrcom has quit [Read error: Connection reset by peer]
mrcom_ has joined #lisp
Dizidentu has quit [Quit: Connection closed]
orivej has quit [Ping timeout: 264 seconds]
<tinga>
How do I name variables (function arguments) that are never used? SBCL warns me even if I prefix them with an underscore.
<Bike>
you should use an ignore declaration.
<Bike>
(defun foo (x) (declare (ignore x)) nil)
Alfr_ has joined #lisp
<beach>
Good morning everyone!
<charles`>
Good morning to beach
<pfdietz>
Or an ignorable declaration. Or, if it's a required parameter to a method, a T specializer.
<pfdietz>
(defmethod foo ((x C) (y t)) x) ;; no warning
<pfdietz>
(defmethod foo ((x C) y) x) ;; warning
dbotton has joined #lisp
Alfr has quit [Ping timeout: 260 seconds]
<beach>
tinga: The question about the equality predicates comes up regularly. The short answer is that there is no universal solution and Common Lisp is proposing a few that are frequently used. But in the general case, you need to come up with your own.
<tinga>
Thanks
equwal has joined #lisp
<equwal>
Good morning!
<beach>
Hello equwal.
<tinga>
OK. I guess come up with your own would make most sence via CLOS; I was hoping for some standard protocol.
<tinga>
sense
<beach>
tinga: I suggest you read Kent Pitmans page on copying and equality.
<tinga>
OK thanks, will have a look
Stanley00 has joined #lisp
<equwal>
I'm not familiar with this, does it have a title?
aindilis has quit [Remote host closed the connection]
aindilis` has joined #lisp
vegansbane6 has joined #lisp
kaftejiman has joined #lisp
heisig has quit [Ping timeout: 264 seconds]
tfb has joined #lisp
OlCe has quit []
joaot has joined #lisp
OlCe has joined #lisp
rtypo has joined #lisp
rogersm_ has joined #lisp
catalinbostan has joined #lisp
rogersm_ has quit [Ping timeout: 240 seconds]
VincentVega has joined #lisp
Stanley00 has joined #lisp
<VincentVega>
Hmm, why does closer-mop:slot-definition-writers accept only a direct-slot-definition as an argument? What if I have a derived class and want to see writers for an inherited slot?
rozenglass has quit [Ping timeout: 272 seconds]
<jmercouris>
Hi everyone, I'm having a bit of an issue with GIR
<jmercouris>
I'm not sure what the rationale behind it is I am afraid
<jmercouris>
maybe the slots are referenced to the original object or something
<jmercouris>
s/object/class
<jmercouris>
and that way when you change something in a inherited class it updates in its descendants
<jmercouris>
purely a guess of course
<jmercouris>
my other guess is that this behavior is due to an implementation detail of CLOS within most implementations
<VincentVega>
hmmm
<VincentVega>
but walking up the inheritence tree won't give me the effective list of writers/readers of the derived class unless I manually merge and that's a bother
<jmercouris>
VincentVega: what is your ultimate goal in doing this
<jmercouris>
perhaps we can solve it another way
<VincentVega>
I am generating :before methods for writers of those slots which invalidate cache of other slots
<jmercouris>
hmmm
<jmercouris>
I don't think there is another way
<jmercouris>
because you need have access to all writers
<VincentVega>
yeah, I gotta have the wiretrs : )
<jmercouris>
maybe you could make an instance of an object and inspect that more easily than the classes
<jmercouris>
and then at runtime generate the new methods
<VincentVega>
i don't think it would even have to be runtime w/ eval-when :compile-toplevel, right?
<VincentVega>
but I will look for a more direct approach first
<jmercouris>
good luck, hopefully someone else has better ideas than me
<VincentVega>
thanks anyway : )
heisig has joined #lisp
karlosz has joined #lisp
Bike has joined #lisp
devon has joined #lisp
igemnace has quit [Ping timeout: 260 seconds]
IPmonger has joined #lisp
<mfiano>
jmercouris: I think you have a slight mistake
mrios22 has joined #lisp
<devon>
pjb: Earlier you mentioned a C to CL compiler…
<mfiano>
Ignore me. I would dig into GIR's hash table and see what it expects
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
bilegeek has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
rumbler31_ has quit [Ping timeout: 264 seconds]
<jmercouris>
mfiano: that is what I am doing, but it is not exactly the most cooperative interface...
aartaka_d has quit [Ping timeout: 265 seconds]
tfb has quit [Ping timeout: 264 seconds]
ebrasca has joined #lisp
akoana has joined #lisp
wsinatra has joined #lisp
<mfiano>
I feel your pain. Just looking at those APIs reminds me why I declined the offer...
aeth has quit [Ping timeout: 256 seconds]
aeth has joined #lisp
ym has joined #lisp
karlosz has quit [Quit: karlosz]
seok has quit [Quit: Connection closed]
mankaev has quit [Read error: Connection reset by peer]
pfdietz has quit [Ping timeout: 248 seconds]
rumbler31 has quit [Read error: Connection reset by peer]
rumbler31 has joined #lisp
rozenglass has joined #lisp
tfb has joined #lisp
mankaev has joined #lisp
bilegeek has quit [Quit: Leaving]
caret_ has quit [Quit: Leaving]
devon has quit [Ping timeout: 256 seconds]
caret_ 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]
dbotton has joined #lisp
tfb has joined #lisp
tfb has quit [Ping timeout: 246 seconds]
slyrus has quit [Ping timeout: 256 seconds]
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #lisp
rogersm_ has joined #lisp
Stanley00 has joined #lisp
rogersm_ has quit [Ping timeout: 240 seconds]
rozenglass has quit [Remote host closed the connection]
Iolo has joined #lisp
hendursaga has quit [Ping timeout: 240 seconds]
Stanley00 has quit [Ping timeout: 260 seconds]
lucasb has joined #lisp
Vultyre has joined #lisp
slyrus has joined #lisp
hendursaga has joined #lisp
leo_song has joined #lisp
tfb has joined #lisp
slyrus has quit [Remote host closed the connection]
hendursaga has quit [Remote host closed the connection]
villanella has quit [Ping timeout: 240 seconds]
hendursaga has joined #lisp
thinkpad has quit [Ping timeout: 265 seconds]
sauvin has quit [Ping timeout: 246 seconds]
thinkpad has joined #lisp
caret_ is now known as caret
varjag has quit [Quit: ERC (IRC client for Emacs 27.1)]
rozenglass has joined #lisp
caret has quit [Quit: Leaving]
caret has joined #lisp
caret has quit [Client Quit]
rozenglass has quit [Client Quit]
caret has joined #lisp
rozenglass has joined #lisp
Smoon has joined #lisp
rozenglass has quit [Remote host closed the connection]
rozenglass has joined #lisp
rozenglass has quit [Client Quit]
rozenglass has joined #lisp
matryoshka has quit [Read error: Connection reset by peer]
matryoshka has joined #lisp
rozenglass has quit [Client Quit]
rozenglass has joined #lisp
Vultyre has quit [Quit: Leaving]
kaftejiman_ has joined #lisp
bilegeek has joined #lisp
kaftejiman has quit [Ping timeout: 256 seconds]
tfb has quit [Ping timeout: 246 seconds]
rtypo has quit [Quit: WeeChat 3.0]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
tfb has joined #lisp
tfb has quit [Client Quit]
rogersm_ has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
rogersm_ has quit [Ping timeout: 256 seconds]
lottaquestions_ has quit [Remote host closed the connection]
lottaquestions_ 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
cage_ has joined #lisp
mmmattyx has joined #lisp
rumbler31_ has joined #lisp
thinkpad has quit [Ping timeout: 256 seconds]
thinkpad has joined #lisp
albus has joined #lisp
ex_nihilo has joined #lisp
albus has left #lisp [#lisp]
sjl has joined #lisp
amb007 has quit [Ping timeout: 264 seconds]
amb007 has joined #lisp
karlosz has joined #lisp
mankaev has quit [Ping timeout: 272 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
albusp has joined #lisp
mankaev has joined #lisp
ex_nihilo has quit [Quit: Leaving]
amb007 has quit [Read error: Connection reset by peer]
andreyorst` has quit [Quit: andreyorst`]
amb007 has joined #lisp
andreyorst has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
Alfr_ has quit [Remote host closed the connection]
Alfr_ has joined #lisp
waleee-cl has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
heisig has quit [Quit: Leaving]
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #lisp
Cymew has quit [Ping timeout: 264 seconds]
amb007 has quit [Read error: Connection reset by peer]
<Bike>
have you tried writing out what you want without using backquote? maybe that would make it more obvious.
<Bike>
i'm not sure what you want here, though.
<Bike>
i think the problem is that commas refer to the most recent backquote, and `,@expr obviously doesn't make sense on its own.
dbotton has joined #lisp
ljavorsk has quit [Ping timeout: 260 seconds]
<VincentVega>
I am writing a macro-writing macro and that's what I figured the problem distills to.
<pranavats>
VincentVega: Comma-at must occur within a sequence. What it does is that it splices a list into a sequence. When you write `,@expr there is nowhere to splice the value of expr.
<Bike>
what would `,@foo do? i mean like what would (let ((x '(1 2 3))) `,@x) evaluate to?
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<VincentVega>
Bike: well I would expect `(f ,`,@expr) to simplify to `(f ,@expr), there's a comma before the backtick
<VincentVega>
but I am obviously messing up the order in which these things simplify
<aeth>
VincentVega: if you have to nest multiple `s, don't do it directly imo. Either use a FLET or write a separate DEFUN that you call from inside of the DEFMACRO (if the latter, it needs to be in another file or in an EVAL-WHEN, though)
thinkpad has quit [Ping timeout: 256 seconds]
<VincentVega>
aeth: yeah, I have some nested backticks. OK, that sounds sensible.
<alandipert>
weird that `,@'(1 2 3) works fine
thinkpad has joined #lisp
<alandipert>
...for some definition of "works"
aeth_ has joined #lisp
aeth has quit [Disconnected by services]
andreyorst has quit [Ping timeout: 264 seconds]
<pranavats>
alandipert: I get the same error (not a well formed backquote expression) with the example you gave.
<alandipert>
pranavats ah, my fault, i was accidentally in elisp. in sbcl, same error
<VincentVega>
pranavats: ok, yes, that makes sense. But I wonder why `(f ,`,@expr) just wouldn't simplify to the working `(f ,@expr) _before_ splicing
<VincentVega>
because it does without the at symbol
<brandflake11>
Where note-list is always a list in the function
<Xach>
brandflake11: ok
<Xach>
what you wrote will do that so far, but you want more?
<brandflake11>
But, when I try to run the function, I get an error of the list included is not of type real
<brandflake11>
Xach: Okay, so what I did will work for defun?
<Xach>
brandflake11: sure.
<Xach>
brandflake11: and it will take exactly 5 arguments, the last of which must be a list.
<Xach>
brandflake11: but did you mean you wanted to slurp up all the trailing arguments after the fourth into a list?
<brandflake11>
Xach: Ahh, okay, it must be a different issue then. Thanks so much!
<brandflake11>
Xach: No, I wanted that argument to specifically mean a list
<Xach>
Ok
<Xach>
brandflake11: in a situation like this it would be helpful to see the code, and how you called the function, and the exact error you got when you called it
gzj has quit [Ping timeout: 240 seconds]
<brandflake11>
Xach: Okay, I didn't want to take advantage of the great help here, but I will put it on pastebin really quick!
<Xach>
how else are we to grow new lisp experts and dominate the world but through helping people understand things?
rumbler31 has quit [Read error: Connection reset by peer]
<brandflake11>
I define the function with defun, and when I run the second (events) function, it gives me the error of '(60 61 62) not being of type real
aartaka has joined #lisp
<Xach>
Hmm, I don't recognize those functions. what is PROCESS?
<brandflake11>
Xach: Oh, by the way, this is common music
<Xach>
Is it similar to LOOP?
rumbler31 has joined #lisp
<brandflake11>
Xach: Process is like loop, but helps with realtime processing of midi and audio data.
<brandflake11>
Xach: Yes, exactly, in fact you could replace it with loop
<Xach>
with LOOP, "for i from 0 to <x>", <x> should be an integer, not a list.
<brandflake11>
Xach: Oh, so it's an error in my loop!
<Xach>
If you wanted to loop once for each item in the list, it would be someting like "from i below (length note-list)"
<Xach>
but if you want to use an element and keep a counter, it would be (loop for i from 0 for note in note-list ...)
<Xach>
I don't know if that maps to PROCESS directly, though.
plxmon has left #lisp [#lisp]
<brandflake11>
Xach: It works, thanks so much!
<brandflake11>
Xach: Do you have any recommendation of becoming an expert at the (loop) function? It's syntax really gets to me sometimes!
<Xach>
brandflake11: the section in Practical Common Lisp is pretty good.
andreyorst_ has quit [Remote host closed the connection]
<Xach>
brandflake11: i usually stick to a small number of simple components and switch to something different when it gets very complex
Steeve has quit [Quit: end]
<brandflake11>
Xach: I'll look into that!
vaporatorius__ has joined #lisp
<brandflake11>
Xach: For loop, I try to just make C++ loop equivalents, since I'm a bit familiar with that, but I always get tripped up with the loop syntax being so different to lisp's
mmmattyx has joined #lisp
<Xach>
I think that's something to outgrow as you understand how to think directly in terms of LOOP.
orivej has quit [Ping timeout: 240 seconds]
<brandflake11>
Xach: Thanks so much for the advice and programming help!
dyelar has joined #lisp
<pranavats>
brandflake11: There are other iteration constructs in CL, —iterate and Series, to name just two—which are more lispier.
<Xach>
I haven't seen those used very much, but some people really like them.
<brandflake11>
pranavats: Are they part of a package? I don't seem to have it in my CL setup
<Bike>
those are not in the standard library, no
<pranavats>
Yes. Their packages are in quicklisp by the same name.
<pranavats>
I mean, systems.
<brandflake11>
pranavats: Ah, okay. I'll check them out later.
dbotton has quit [Quit: This computer has gone to sleep]
shka_ has quit [Quit: Konversation terminated!]
Alfr_ has quit [Remote host closed the connection]
Alfr_ has joined #lisp
<aeth>
brandflake11: LOOP's a bit weird because it accepts any package for its symbols, but that means that you can use keywords. So e.g. (loop :for i :from 0 :repeat 3 :do (print i))
<aeth>
I personally find that that makes it harder to make certain kinds of mistakes
<aeth>
It almost becomes like a plist. Almost. There are a few constructs where LOOP expects multiple keywords in a row, and OF-TYPE is optional for certain kinds of types (but only a few, so I always use the long form)
<aeth>
(And, of course, if it was really made up of plists, order wouldn't matter and you couldn't have duplicates.)
<brandflake11>
aeth: What do you mean by it accepts any package for its symbols? I'm not familiar with plist.
<aeth>
brandflake11: a plist is something like '(:foo 42 :bar 43 :baz 44)
<aeth>
It's very natural and Lispy and shows up all of the time, e.g. keyword arguments are plist tails
shka_ has joined #lisp
<aeth>
brandflake11: By "accepts any package" I mean (loop repeat 3) and (loop :repeat 3) both work, it doesn't care about the package the symbol is in. Almost every other macro will care. Third party macros typically use keywords.
<aeth>
(loop your-package::repeat 3) also works, which is probably what LOOP is doing because CL:REPEAT isn't a symbol
<aeth>
Packages are just namespaces for symbols
<brandflake11>
aeth: I see. That was a lot for me, so I am going to save this for later to see if I can come back and understand this better later. :) It's cool that you can use keywords like that in loop, I may use that to make it clearer for me!
dbotton has joined #lisp
<brandflake11>
aeth: And thanks for telling me about plists. That is very useful!
amerlyq has quit [Quit: amerlyq]
devon has joined #lisp
notzmv has joined #lisp
judson_ has joined #lisp
aeth has quit [Ping timeout: 240 seconds]
judson_ has quit [Client Quit]
aeth has joined #lisp
judson_ has joined #lisp
luni has joined #lisp
brandflake11 has quit [Quit: ERC (IRC client for Emacs 27.1)]
brandflake11 has joined #lisp
galex-713 has quit [Ping timeout: 264 seconds]
<dbotton>
I have been using a deftype of keywords for enums, but curious is there a better or more official way?
galex-713 has joined #lisp
<frodef>
dbotton: first question is, what do you need an "enum" for?
<frodef>
dbotton: right.. I probably don't quite understand the question, then. There's no more "official way" than (member ..), and I can't really think of anything more succinct.
[d] has quit [Excess Flood]
[d] has joined #lisp
<dbotton>
Ok thanks
<frodef>
dbotton: note that you don't have to name the type, unless it's being used "all over" I'd say that (member :ltr :rtl) is quite readable as it is.
<frodef>
s/name/deftype
narimiran has quit [Quit: leaving]
<dbotton>
That is good to know, thanks
VincentVega has quit [Quit: Connection closed]
rumbler31 has quit [Remote host closed the connection]
aartaka has quit [Ping timeout: 256 seconds]
rumbler31 has joined #lisp
wsinatra has quit [Quit: WeeChat 3.0]
Josh_2 has joined #lisp
shka_ has quit [Ping timeout: 272 seconds]
<Josh_2>
Joined IRC to get help with a problem, as I joined I solved my problem :P
VincentVega has joined #lisp
Aurora_v_kosmose has quit [Ping timeout: 240 seconds]
Aurora_v_kosmose has joined #lisp
<dbotton>
Is there a way to hint to slime/emacs that a certain deftype is the ideal parameter so auto complete would work for it?
<aeth>
dbotton: two kinds of enums... the enum equivalent in an idiomatic way are basically member types. The other kind of enum is a mapping of symbol->number, which can be done with e.g. a function with an ECASE of keyword->number. These are not mutually exclusive, of course, although the language won't check to make sure every branch in the ECASE is covered.
<aeth>
dbotton: I usually just do MEMBER types, but technically, the more correct way is probably '(and keyword (member ...)
<aeth>
)
<aeth>
Especially for long lists.
fangyrn has quit [Quit: Connection closed for inactivity]
<aeth>
If something's not a keyword, that will rule it out much faster, unless the implementation optimizes member types
<dbotton>
Nice
<aeth>
There are some other enums you could encounter, e.g. CFFI enums
catalinbostan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Inoperable has quit [Excess Flood]
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Inoperable has joined #lisp
dbotton has quit [Quit: This computer has gone to sleep]
pve has quit [Quit: leaving]
C-16 has joined #lisp
mindCrime has joined #lisp
C-16 has quit [Client Quit]
luckless has quit [Ping timeout: 240 seconds]
luckless_ has joined #lisp
notzmv has quit [Ping timeout: 240 seconds]
Vultyre has quit [Quit: Leaving]
judson_ has joined #lisp
skapata has joined #lisp
Alfr_ has quit [Remote host closed the connection]
Alfr_ has joined #lisp
mmmattyx has quit [Quit: Connection closed for inactivity]
ludston has joined #lisp
conjunctive has quit [Ping timeout: 246 seconds]
Nilby has joined #lisp
griffinbyatt has quit [Ping timeout: 246 seconds]
bytesighs has joined #lisp
griffinbyatt has joined #lisp
conjunctive has joined #lisp
copec has joined #lisp
ecm has quit [Ping timeout: 246 seconds]
quanta[m] has quit [Ping timeout: 246 seconds]
deselby has quit [Ping timeout: 246 seconds]
Lolicon[m] has quit [Ping timeout: 246 seconds]
MrtnDk[m] has quit [Ping timeout: 246 seconds]
ms[m] has quit [Ping timeout: 246 seconds]
miasuji has joined #lisp
<Bike>
putting in an (and keyword ...) won't speed anything up if the implementation doesn't simplify types somehow, and if it doesn't simplify types somehow type tests are probably going to be slow regardless
<Bike>
also even assuming the keyword type is checked first, for a member of the type it'll have to check a member anyway, so you'd just be speeding up testing on nonmebers at the expense of testing on members
deselby has joined #lisp
ecm has joined #lisp
quanta[m] has joined #lisp
Codaraxis_ has joined #lisp
Codaraxis has quit [Read error: Connection reset by peer]
RagnarDanneskjol has quit [Read error: Connection reset by peer]
splittist has quit [Read error: Connection reset by peer]
chewbranca has quit [Read error: Connection reset by peer]
RagnarDanneskjol has joined #lisp
alanz has quit [Read error: Connection reset by peer]
eschatologist has quit [Quit: ZNC 1.8.x-git-8-998e00fe - https://znc.in]
kilimanjaro has quit [Read error: Connection reset by peer]
johs has quit [Write error: Connection reset by peer]
mgsk has quit [Write error: Connection reset by peer]
selwyn has quit [Read error: Connection reset by peer]
splittist has joined #lisp
alanz has joined #lisp
chewbranca has joined #lisp
ms[m] has joined #lisp
selwyn has joined #lisp
eschatologist has joined #lisp
gjnoonan has joined #lisp
ffwacom has joined #lisp
johs has joined #lisp
madand has joined #lisp
kilimanjaro has joined #lisp
mgsk has joined #lisp
Lolicon[m] has joined #lisp
eymebolofscrumpe has quit [Ping timeout: 268 seconds]
malaclyps_ has quit [Ping timeout: 268 seconds]
dieggsy has quit [Ping timeout: 268 seconds]
etimmons has quit [Ping timeout: 268 seconds]
stargazesparkle has quit [Ping timeout: 268 seconds]
even4void[m] has quit [Ping timeout: 268 seconds]
jasom has quit [Ping timeout: 268 seconds]
phoe has quit [Ping timeout: 268 seconds]
beaky has joined #lisp
phoe has joined #lisp
<aeth>
Bike: So it's a bad idiom?
<aeth>
Because it seems about 50/50 when I see this kind of DEFTYPE
rvirding has quit [Read error: Connection reset by peer]
stylewarning has quit [Read error: Connection reset by peer]
<Bike>
seems pointless to me
stylewarning has joined #lisp
<Bike>
on sbcl it has no effect on typep speed that i can see, because it reduces (and keyword (member ...)) to (member ...) if all the objects are keywords
rvirding has joined #lisp
<aeth>
ah
surabax has quit [Quit: Leaving]
<frodef>
in general probably not a good idea to think of typespecs as procedures.
ecm has quit [Ping timeout: 260 seconds]
exit70[m] has quit [Ping timeout: 260 seconds]
Gnuxie[m] has quit [Ping timeout: 260 seconds]
loke[m] has quit [Ping timeout: 260 seconds]
jasom has joined #lisp
<Alfr_>
Isn't it possible to reduce every (and type-spec (member ..)) to (member ..) simply by only retaining the objects o which satisfy (typep o type-spec)? Or am I missing something here?
gzj has joined #lisp
aindilis has quit [Remote host closed the connection]
karlosz has quit [Quit: karlosz]
<frodef>
Alfr_: in principle I would think yes.
paul0 has joined #lisp
cage_ has quit [Quit: Leaving]
gingerale has joined #lisp
villanella has quit [Ping timeout: 260 seconds]
eymebolofscrumpe has joined #lisp
gzj has quit [Ping timeout: 264 seconds]
even4void[m] has joined #lisp
stargazesparkle has joined #lisp
HiRE has quit [*.net *.split]
matijja has quit [*.net *.split]
greeb has quit [*.net *.split]
ozzloy has quit [*.net *.split]
ozzloy has joined #lisp
ozzloy has joined #lisp
ozzloy has quit [Changing host]
azrazalea has joined #lisp
Papa has joined #lisp
Papa has quit [Max SendQ exceeded]
freshmaker666 has joined #lisp
freshmaker666 has joined #lisp
freshmaker666 has quit [Changing host]
mikecheck has joined #lisp
HiRE has joined #lisp
matijja has joined #lisp
SumoSud0 has joined #lisp
Papa has joined #lisp
etimmons has joined #lisp
dale has joined #lisp
malaclyps_ has joined #lisp
dieggsy has joined #lisp
moon-child has joined #lisp
loke[m] has joined #lisp
exit70[m] has joined #lisp
<aeth>
Alfr_: Also, I think that technically every type can become a MEMBER type because everything's finite...
<aeth>
I guess excluding SATISFIES
ecm has joined #lisp
ebrasca has quit [Read error: Connection reset by peer]
Gnuxie[m] has joined #lisp
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ebrasca has joined #lisp
<aeth>
Oh, the conses are infinite...
sjl has quit [Ping timeout: 246 seconds]
acolarh has quit [Ping timeout: 256 seconds]
Codaraxis__ has joined #lisp
gaqwas has quit [Ping timeout: 256 seconds]
rumbler31 has quit [Remote host closed the connection]
brandflake11 has quit [Quit: ERC (IRC client for Emacs 27.1)]
random-nick has quit [Ping timeout: 240 seconds]
rumbler31 has joined #lisp
gaqwas has joined #lisp
gaqwas has joined #lisp
gaqwas has quit [Changing host]
Codaraxis_ has quit [Ping timeout: 240 seconds]
random-nick has joined #lisp
karlosz has joined #lisp
rumbler31_ has quit [Ping timeout: 246 seconds]
gaqwas has quit [Ping timeout: 246 seconds]
acolarh has joined #lisp
johnjay has quit [Ping timeout: 272 seconds]
Smoon has quit [Remote host closed the connection]
<Bike>
and any class you can make fresh instances of, so standard objects, hash tables, restarts, whatever
<Bike>
but yes, you can collapse restart types like that pretty easily