morganw has quit [Remote host closed the connection]
azimut_ has joined #commonlisp
azimut has quit [Ping timeout: 240 seconds]
random-nick has quit [Ping timeout: 240 seconds]
taiju` has joined #commonlisp
zacque has joined #commonlisp
zacque has quit [Quit: Goodbye :D]
Tallund has quit [Quit: Client closed]
s-liao has quit [Ping timeout: 256 seconds]
ritchie101 has joined #commonlisp
qiduo has quit [Ping timeout: 256 seconds]
ritchie101 has quit [Ping timeout: 240 seconds]
ritchie101 has joined #commonlisp
s-liao has joined #commonlisp
Devon has quit [Ping timeout: 256 seconds]
Devon has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
akoana has joined #commonlisp
Devon7 has joined #commonlisp
Devon has quit [Ping timeout: 256 seconds]
notzmv has quit [Ping timeout: 260 seconds]
Devon7 has quit [Ping timeout: 250 seconds]
s-liao has joined #commonlisp
notzmv has joined #commonlisp
<dbotton>
all my symbol hacking using functions or macros to get slots was a waste, since events spawn new threads I am always in "common-lisp-user" in every new thread
<dbotton>
my point in that mess of a statement, is that not having the class type and the encapsulating package coupled offers some flexibility but also takes away too. While probably not realistic with out changing the core language to allow that, it is a drawback of CLOS imo.
<Guest7459>
I'm not sure how being in an unexpected by you package is a drawback of CLOS.
<Guest7459>
Maybe you should provide an environment for your threads?
<dbotton>
a solution, but not the one I will take, will just use mop to get the symbols
Oladon has joined #commonlisp
<dbotton>
I came across already a few times, with out that coupling you don't really have an "object" in the sense of many languages
<dbotton>
ie data and code coupled
<dbotton>
(I am not saying things should change as this is best solution for CL)
mon_aaraj has quit [Ping timeout: 272 seconds]
mon_aaraj has joined #commonlisp
Krystof has quit [Ping timeout: 256 seconds]
<beach>
Good morning everyone!
Bike has quit [Quit: Connection closed]
cjb has quit [Quit: rcirc on GNU Emacs 29.0.50]
<moon-child>
is it possible to make an anonymous package?
<beach>
I don't think so. Even MAKE-PACKAGE requires a name and registers it globally.
<aeth>
You can (make-package (gensym)) but of course it will have a name, some string like "G234"
<beach>
I don't see where it says that the package is made available globally. But the examples suggest that of course. Then, examples are not normative as I recall.
<beach>
It may be that there is a warning, and ASDF converts it into an error. Try putting (setf asdf:*compile-file-failure-behavior* :ignore) after (require '#:asdf) in your .sbclrc
<dirtcastle>
holycow, I'll remove the stumpwm and clone it again?
<holycow>
clone it to a different dir even, i don't know what you are fiddling with
<dirtcastle>
how to get cls? (ql:quickload "cls")
<holycow>
clx
<dirtcastle>
clx?
<dirtcastle>
i have that already
<dirtcastle>
are u telling me it won't work on ubuntu?
<dirtcastle>
lmao
<holycow>
i only said i needed to remove cl-clx-sbcl from apt THEN make sure clx is installed via quicklisp
<dirtcastle>
sudo apt remove cl-clx-sbcl
<dirtcastle>
not installed, so not removed
<holycow>
none of your pastes had the error messages. recompile and paste the full message, let's see
<dirtcastle>
ok it installed successful
<dirtcastle>
.ly
<dirtcastle>
thanks beach, holycow. looking forward to learning common lisp.
<beach>
Good luck.
<beach>
Hmm. Stuff like this should be easy. I wonder why it isn't so.
<holycow>
what, compiling stumpwm?
<beach>
Yeah.
<holycow>
yeah, really it should just be (ql:quickload :stumpwm) and then dump image with a one liner
jeffrey has joined #commonlisp
kingofcsu has joined #commonlisp
Cymew has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
spiaggia has joined #commonlisp
<Josh_2>
with SBCL I have declared the ftype of my function, I have speed 1, safety 3, debug 3, but I do not get a type-error when I pass the wrong type of argument to my function
<Josh_2>
Should I just use assert instead?
jeffrey has quit [Ping timeout: 256 seconds]
<moon-child>
I would use check-type rather than assert
<Josh_2>
oh I had to use declaim outside of the function to get a type-error
pillton has quit [Quit: ERC (IRC client for Emacs 27.2)]
zachel has quit [Quit: Quit: Leaving!]
zachel has joined #commonlisp
Guest491241242 has quit [Ping timeout: 256 seconds]
s-liao has quit [Ping timeout: 256 seconds]
pranavats has left #commonlisp [#commonlisp]
notzmv has joined #commonlisp
pranavats has joined #commonlisp
igemnace has joined #commonlisp
qiduo has quit [Quit: WeeChat 3.4]
Bike has joined #commonlisp
MCSH has left #commonlisp [ERC (IRC client for Emacs 27.2)]
tyson2 has joined #commonlisp
ec has quit [Ping timeout: 240 seconds]
ec has joined #commonlisp
Common-Lisp has joined #commonlisp
euandreh has quit [Ping timeout: 260 seconds]
s-liao has joined #commonlisp
heisig has joined #commonlisp
yewscion has joined #commonlisp
kevingal has joined #commonlisp
eugercek has joined #commonlisp
eugercek has quit [Read error: Connection reset by peer]
eugercek has joined #commonlisp
eugercek has quit [Read error: Connection reset by peer]
eugercek has joined #commonlisp
eugercek has quit [Read error: Connection reset by peer]
jeosol has quit [Quit: Client closed]
treflip has joined #commonlisp
eugercek has joined #commonlisp
eugercek has quit [Read error: Connection reset by peer]
Guest491241242 has joined #commonlisp
wacki has joined #commonlisp
euandreh has joined #commonlisp
eugercek has joined #commonlisp
mon_aaraj has quit [Ping timeout: 256 seconds]
Guest491241242 has quit [Ping timeout: 256 seconds]
euandreh has quit [Ping timeout: 240 seconds]
s-liao has quit [Quit: Client closed]
euandreh has joined #commonlisp
kingofcsu has quit [Quit: kingofcsu]
euandreh has quit [Ping timeout: 240 seconds]
waleee has joined #commonlisp
jeosol has joined #commonlisp
nature has joined #commonlisp
gxt has quit [Remote host closed the connection]
wyrd has quit [Remote host closed the connection]
wyrd has joined #commonlisp
gxt has joined #commonlisp
ec has quit [Quit: ec]
aartaka has joined #commonlisp
euandreh has joined #commonlisp
Guest491241242 has joined #commonlisp
brandflake11 has joined #commonlisp
kevingal has quit [Ping timeout: 250 seconds]
amb007 has quit [Ping timeout: 272 seconds]
amb007 has joined #commonlisp
axvr has quit [Remote host closed the connection]
sm2n has quit [Remote host closed the connection]
mcoll has quit [Remote host closed the connection]
sirufer has quit [Remote host closed the connection]
jasom has quit [Remote host closed the connection]
Schnouki has quit [Remote host closed the connection]
brown121407 has quit [Remote host closed the connection]
zoglesby has quit [Remote host closed the connection]
ggb has quit [Remote host closed the connection]
theothornhill has quit [Remote host closed the connection]
payphone has quit [Remote host closed the connection]
srhm has quit [Remote host closed the connection]
jasom has joined #commonlisp
Schnouki has joined #commonlisp
ggb has joined #commonlisp
payphone has joined #commonlisp
sirufer has joined #commonlisp
theothornhill has joined #commonlisp
sm2n has joined #commonlisp
zoglesby has joined #commonlisp
brown121407 has joined #commonlisp
srhm has joined #commonlisp
axvr has joined #commonlisp
mcoll has joined #commonlisp
ec has joined #commonlisp
domovod has joined #commonlisp
iamFIREcracker has joined #commonlisp
Guest491241242 has quit [Ping timeout: 256 seconds]
Dynom has joined #commonlisp
iamFIREc1 has quit [Ping timeout: 256 seconds]
morganw has joined #commonlisp
jealousmonk has joined #commonlisp
sirufer has quit [Remote host closed the connection]
theothornhill has quit [Remote host closed the connection]
Schnouki has quit [Remote host closed the connection]
mcoll has quit [Remote host closed the connection]
axvr has quit [Remote host closed the connection]
sm2n has quit [Remote host closed the connection]
zoglesby has quit [Remote host closed the connection]
jasom has quit [Remote host closed the connection]
brown121407 has quit [Remote host closed the connection]
ggb has quit [Remote host closed the connection]
payphone has quit [Remote host closed the connection]
srhm has quit [Remote host closed the connection]
jasom has joined #commonlisp
Schnouki has joined #commonlisp
ggb has joined #commonlisp
Schnouki has joined #commonlisp
Schnouki has quit [Changing host]
mcoll has joined #commonlisp
payphone has joined #commonlisp
brown121407 has joined #commonlisp
sm2n has joined #commonlisp
sirufer has joined #commonlisp
zoglesby has joined #commonlisp
theothornhill has joined #commonlisp
axvr has joined #commonlisp
wyrd has quit [Ping timeout: 240 seconds]
srhm has joined #commonlisp
wyrd has joined #commonlisp
domovod has quit [Quit: WeeChat 3.4]
brandflake11 has quit [Remote host closed the connection]
iamFIREc1 has joined #commonlisp
iamFIREcracker has quit [Ping timeout: 260 seconds]
thomaslewis has joined #commonlisp
dirtcastle has quit [Remote host closed the connection]
Catie has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
frgo has quit [Remote host closed the connection]
Desk has joined #commonlisp
Cball has joined #commonlisp
Desk has left #commonlisp [Killed buffer]
cage has joined #commonlisp
iamFIREcracker has joined #commonlisp
iamFIREc1 has quit [Read error: Connection reset by peer]
Cball has quit [Quit: Konversation terminated!]
yewscion has quit [Ping timeout: 256 seconds]
frgo has joined #commonlisp
heisig has quit [Quit: Leaving]
sndr has joined #commonlisp
sander has quit [Ping timeout: 256 seconds]
sndr is now known as sander
<dbotton>
Is there any documentation on using mop/closer mop? I find myself running in to symbol issues or forcing myself to be compiler dependent which means I am doing something wrong
<jackdaniel>
dbotton: the closest thing is a book "the art of the metaobject protocol"
<jackdaniel>
there is also a specification derived from the book with various improvements here: http://metamodular.com/CLOS-MOP/
<dbotton>
thank you, that is perfect
<dbotton>
and already see what I did wrong (and should already know better)
<jackdaniel>
you may find a website l1sp.org very useful for looking up symbols
<jackdaniel>
it has references to documents like the standard, the above mop specification, the sbcl manual etc etc
<dbotton>
are there any helper libs like I want to find the slot-name by string
<dbotton>
so that I can get the actual symbol
<dbotton>
so can properly set-value the slot regardless of *package*
<_death>
what if there are two slots, a::slot and b::slot
Cymew has quit [Ping timeout: 256 seconds]
<dbotton>
for now I assume compute-slots gives me the one exposed to the user world
<dbotton>
but I am somewhat ignoramt
<_death>
not sure I understand this answer
<_death>
what you can do is use strings like "A::SLOT" or "B::SLOT" to designate the slots
karlosz has quit [Quit: karlosz]
<_death>
then you can use read-from-string or your own limited version to map them into the right symbols
Desk has joined #commonlisp
<Guest7459>
dbotton: you don't use package prefixed accessors for your classes?
Desk has quit [Quit: rcirc on GNU Emacs 27.2]
<dbotton>
sure, but the issue here is I need to use slot-value in this case and I need the symbol for the slot
<dbotton>
I know the object and I know the name of the slot on the object
Desk` has joined #commonlisp
thomaslewis has joined #commonlisp
<dbotton>
I don't know the package of the object (and that is the issue I mentioned with CLOS, that I should even need that info)
Desk` has quit [Remote host closed the connection]
thomaslewis has left #commonlisp [#commonlisp]
<dbotton>
(but with out the package knowledge I can't even execute generic functions, that i trade off made by CLOS to not break CL as it stands)
thomaslewis has joined #commonlisp
<dbotton>
that is the long answer Guest7459
<Bike>
what happens if an object has two different slots named A::FOO and B::FOO? i.e., they have the same symbol-name "FOO", but different packages.
thomaslewis has left #commonlisp [#commonlisp]
<_death>
there's confusion here. objects don't live in packages, unless by "object" you mean symbol, which I doubt, because you want to use slot-value on it, which indicates to me that by "object" you mean an instance of standard-object. you say that you "know the name of the slot", but slots are named by symbols. I believe you know the name of a symbol that names a slot. but an instance can have multiple slots with the same symbol name, so
<_death>
it's ambiguous.
<dbotton>
_death I don't have access to package of the object and don't think I want to force the user of my API to know, I'd rather leave it a limitation
<Bike>
what is "the package of the object"?
<Bike>
like death said, that's not really a concept that makes sense
<dbotton>
the symbols I need are in a package
<dbotton>
the object is not
<dbotton>
but to use set-value
<dbotton>
I need the slot's symbol
<Bike>
you need the slot's name, which is a symbol, sure.
<Bike>
but you only have the name of the symbol, not the symbol itself, for some reason?
<Bike>
usually you'd just pass the symbol itself around.
<dbotton>
I have a string representing the nae
<Bike>
since, again, for example, you can have two symbols with the same name in different packages, and have both of those symbols name different slots in the same object.
<dbotton>
name, I need the symbol
<Bike>
so using a string is probably not the best idea. it is ambiguous.
<dbotton>
not a choice here
<Guest7459>
how do you get the name?
<dbotton>
A hash
<Guest7459>
is this user provided or something?
<Bike>
your slot name is a hash?
<dbotton>
I can force the info from the user
<dbotton>
here is the interface (defun data-load-plist (obj plist &key (upcase-key t))
<dbotton>
in this case I want the user to be able to pass their object and load its slots from a plist
<dbotton>
I don't want to force the use of the package name where the class is
<Bike>
...but then the plist keys would be symbols, no?
<dbotton>
no, strings or symbols, etc
amb007 has quit [Ping timeout: 256 seconds]
<dbotton>
dbi returns keywords
<Bike>
like, you have an object with slot A::FOO = 4 and B::FOB = 7, so your plist is (A::FOO 4 B::FOB 7)
amb007 has joined #commonlisp
<Bike>
why would you ever have strings?
<dbotton>
no :foo :fob
<Bike>
okay, sure?
<Bike>
those are still symbols.
<dbotton>
yes, I am also ok with "foo" or "fob"
<Bike>
i don't know why you'd want to do that, but if all your slot names are keywords, you could just do (intern "FOO" "KEYWORD")
<dbotton>
the current implementation works if *package* is where you did the defclass
alvaro121 has quit [Ping timeout: 240 seconds]
<dbotton>
No as the slot-names are not keywords
<dbotton>
they could be A::fob
<Bike>
Okay then, third time now - what happens if you have one slot named A:FOO and another named B:FOO? What would "FOO" as an indicator mean?
alvaro121 has joined #commonlisp
<dbotton>
will be limitation of API
<dbotton>
can only load distinct names
<dbotton>
Can't really fix that
<dbotton>
And unlikely a user of this api would care
<mfiano>
That seems like a strange restriction when you can just marshall symbols.
<Guest7459>
are you in control of all the classes this function works for?
<dbotton>
no
<dbotton>
nor the data
<Bike>
this is a really weird API, but whatever. if you want to search by symbol name you can do that.
<_death>
if you just want to find _some_, not necessarily the right one, slot that has the symbol name, you could (find name slot-definitions :key #'slot-definition-name :test #'string=) (or even string-equal if you want to allow more ambiguity and ignore case) .. but we're trying to tell you that's pretty bad
<Bike>
get a list of slots with mop:class-slots, then the slot name with mop:slot-definition-name, then the name of the symbol with symbol-name.
<Bike>
so yeah, what death said.
<dbotton>
right that is what I am working on now
<dbotton>
question was just if there was a function already
notzmv has quit [Ping timeout: 240 seconds]
<dbotton>
I know is bad :)
<dbotton>
But somethings in life are bad for you but taste so good worth it
<_death>
but it quite likely that you can do better without much pain
<dbotton>
In this case allowing a user to match database fields to controls on a graphical panel with common names is worth it
<dbotton>
I am a martyr :) I'll bare the pain for their panes
<_death>
no, the pain that you save from yourself will be amplified and inflicted on your users
<_death>
anyway :)
<mfiano>
This
<dbotton>
If someone does anything more complex they won't use this API
<_death>
it is possible that _you_ may want to grow this functionality in the future, but then get stuck with this decision
<dbotton>
Quick solutions only help at prototype stages in advanced projects, but they are valuable
<dbotton>
Over engineering can be an issue to, it makes an API unusable
<_death>
oh well
<dbotton>
Most APIs die from that alone, it solves all problems and so none
<dbotton>
A user hitting the limitation of this can easily put in the sweat and type out the nitty gritty
<Guest7459>
if you're using a plist, I'd probably just use reinitialize instance and force users to use initargs. but that may be to simple.
<dbotton>
and set each slot or control themselves
<_death>
everyone's free to live with their convictions.. in this channel at least ;)
amb007 has quit [Read error: Connection reset by peer]
<Guest7459>
s/to simple/to simple for some people/
amb007 has joined #commonlisp
<dbotton>
Doesn't work as most slots here actually contain controls and the api is called to set the value
<dbotton>
the slots that do not get the value directly