phoe changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook> | Pastebin: <https://plaster.tymoon.eu/>
waleee has quit [Ping timeout: 256 seconds]
Guest74 has quit [Quit: Connection closed]
waleee has joined #commonlisp
taiju` has joined #commonlisp
waleee has quit [Ping timeout: 256 seconds]
nature has quit [Quit: leaving]
tyson2 has joined #commonlisp
occ has joined #commonlisp
random-nick has quit [Ping timeout: 256 seconds]
s-liao has quit [Ping timeout: 256 seconds]
s-liao has joined #commonlisp
trannus_aran has joined #commonlisp
trannus_aran has left #commonlisp [#commonlisp]
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
<dbotton> "SB-MOP:CLASS-SLOTS called on #<STANDARD-CLASS CLOG:CLOG-OBJ>, which is not yet finalized." What does not yet finalized mean?
<Bike> it means that its inheritance has not yet been finalized. it's a mechanism in place to let you define classes before defining their superclasses.
<Bike> you can use sb-mop:finalize-inheritance to ensure a class is finalized. or just make an instance of it.
<Bike> until the inheritance is finalized, the slots aren't fully defined. so finalization must take place at latest when you try to make an instance. but you also need finalization to introspect the slots like you're doing.
<dbotton> ah this is basically and abstract class in my system so that explains it
<dbotton> much appreciated
s-liao has quit [Quit: Client closed]
s-liao has joined #commonlisp
eugercek has quit [Remote host closed the connection]
eugercek has joined #commonlisp
<Bike> no prob
eugercek has quit [Remote host closed the connection]
jealousmonk has quit [Quit: ERC 5.4.1 (IRC client for GNU Emacs 27.1)]
Guest74 has joined #commonlisp
dre has quit [Quit: Leaving]
jealousmonk has joined #commonlisp
ec has quit [Quit: ec]
jealousmonk has quit [Remote host closed the connection]
occ has quit [Read error: Connection reset by peer]
pillton has joined #commonlisp
epony has quit [Ping timeout: 240 seconds]
s-liao has quit [Quit: Client closed]
tyson2 has quit [Remote host closed the connection]
Bike has quit [Quit: Lost terminal]
s-liao has joined #commonlisp
<beach> Good morning everyone!
aeth has quit [Ping timeout: 240 seconds]
aeth has joined #commonlisp
dre has joined #commonlisp
SR-71 has joined #commonlisp
jeosol has joined #commonlisp
jealousmonk has joined #commonlisp
semz_ has joined #commonlisp
semz has quit [Ping timeout: 240 seconds]
<Guest74> til, you can't use &optional in a loop for clause like in destructuring-bind, but it also doesn't care if there's not enough elements.
<Guest74> and of course the error The value NIL is not of type REAL when binding #:LOOP-LIMIT-15 gave me no clue what was wrong.
s-liao has quit [Quit: Client closed]
aeth has quit [Ping timeout: 240 seconds]
wacki has joined #commonlisp
aeth has joined #commonlisp
Oladon has joined #commonlisp
aartaka has joined #commonlisp
akoana has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
Devon has quit [Ping timeout: 256 seconds]
ritchie101 has joined #commonlisp
qiduo has joined #commonlisp
jealousmonk has quit [Quit: ERC 5.4.1 (IRC client for GNU Emacs 27.1)]
ritchie101 has quit [Quit: Client closed]
Oladon has quit [Quit: Leaving.]
dre has quit [Ping timeout: 240 seconds]
snits has quit [Ping timeout: 256 seconds]
<qhong> is there a way to detect if some thread has entered debugger?
pillton has quit [Quit: ERC (IRC client for Emacs 27.2)]
<qhong> SBCL-specific solution is acceptable
<jackdaniel> if you have control over the environment perhaps you could use the *debugger-hook* like
<jackdaniel> (defun my-hook (condition *old-hook*) (add-thread current-thread *dumdum*) (call-the-old-hook) (del-thread curren-thread *dumdum*)))
<jackdaniel> with all that thread-safety jazz and all
ritchie101 has joined #commonlisp
ritchie101 has quit [Client Quit]
rgherdt has joined #commonlisp
qiduo has quit [Quit: WeeChat 3.3]
qiduo has joined #commonlisp
dre has joined #commonlisp
silasfox has joined #commonlisp
Cymew has joined #commonlisp
dre has quit [Quit: Leaving]
MajorBiscuit has joined #commonlisp
Major_Biscuit has joined #commonlisp
MajorBiscuit has quit [Ping timeout: 256 seconds]
s-liao has joined #commonlisp
shka has joined #commonlisp
semz_ is now known as semz
pve has joined #commonlisp
karlosz has joined #commonlisp
rgherdt_ has joined #commonlisp
rgherdt has quit [Ping timeout: 272 seconds]
nworb has quit [Quit: You have been kicked for being idle]
karlosz has quit [Ping timeout: 272 seconds]
Dynom has joined #commonlisp
rgherdt_ has quit [Quit: Leaving]
rgherdt has joined #commonlisp
Guest49124124 has joined #commonlisp
cage has joined #commonlisp
s-liao has quit [Quit: Client closed]
s-liao has joined #commonlisp
cosimone has joined #commonlisp
s-liao has quit [Quit: Client closed]
s-liao has joined #commonlisp
Qwnavery has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
qiduo has quit [Quit: WeeChat 3.3]
szkl has quit [Quit: Connection closed for inactivity]
s-liao has joined #commonlisp
nature has joined #commonlisp
zbrown[m] has quit [Quit: Bridge terminating on SIGTERM]
Mrtn[m] has quit [Quit: Bridge terminating on SIGTERM]
yitzi has quit [Quit: Bridge terminating on SIGTERM]
opalvaults[m] has quit [Quit: Bridge terminating on SIGTERM]
saltrocklamp[m] has quit [Quit: Bridge terminating on SIGTERM]
loke[m] has quit [Quit: Bridge terminating on SIGTERM]
katco has quit [Quit: Bridge terminating on SIGTERM]
Gnuxie has quit [Quit: Bridge terminating on SIGTERM]
Duuqnd has quit [Quit: Bridge terminating on SIGTERM]
sp has quit [Quit: Bridge terminating on SIGTERM]
dieggsy has quit [Quit: Bridge terminating on SIGTERM]
Arcsech has quit [Quit: Bridge terminating on SIGTERM]
akater[m] has quit [Quit: Bridge terminating on SIGTERM]
miique has quit [Quit: Bridge terminating on SIGTERM]
CodeBitCookie[m] has quit [Quit: Bridge terminating on SIGTERM]
kakuhen has quit [Quit: Bridge terminating on SIGTERM]
char[m] has quit [Quit: Bridge terminating on SIGTERM]
seragold[m] has quit [Quit: Bridge terminating on SIGTERM]
linjian has quit [Quit: Bridge terminating on SIGTERM]
prov[m] has quit [Quit: Bridge terminating on SIGTERM]
bhyde[m] has quit [Quit: Bridge terminating on SIGTERM]
edmrk[m] has quit [Quit: Bridge terminating on SIGTERM]
Spawns_Carpet[m] has quit [Quit: Bridge terminating on SIGTERM]
luis` has quit [Quit: Bridge terminating on SIGTERM]
pranavats has left #commonlisp [Error from remote client]
Qwnavery has quit [Quit: WeeChat 3.4]
pranavats has joined #commonlisp
taiju` has quit [Ping timeout: 240 seconds]
s-liao has quit [Ping timeout: 256 seconds]
katco has joined #commonlisp
karlosz has joined #commonlisp
s-liao has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
pranavats has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
leo_song has quit [Read error: Connection reset by peer]
leo_song has joined #commonlisp
notzmv has quit [Ping timeout: 252 seconds]
<mfiano> I'm going to risk bringing up a subjective style question, so please forgive me. I have seen two camps regarding the use of p/-p predicate suffixes: those that apply the naming convention to predicate functions, and those that apply the naming convention to predicate functions, boolean function arguments, variables, slots, and everything. Why are there these two camps, and who is correct? :)
edmrk[m] has joined #commonlisp
Mrtn[m] has joined #commonlisp
dieggsy has joined #commonlisp
luis` has joined #commonlisp
akater[m] has joined #commonlisp
Gnuxie has joined #commonlisp
saltrocklamp[m] has joined #commonlisp
yitzi has joined #commonlisp
sp has joined #commonlisp
kakuhen has joined #commonlisp
CodeBitCookie[m] has joined #commonlisp
Arcsech has joined #commonlisp
Duuqnd has joined #commonlisp
loke[m] has joined #commonlisp
char[m] has joined #commonlisp
seragold[m] has joined #commonlisp
Spawns_Carpet[m] has joined #commonlisp
zbrown[m] has joined #commonlisp
prov[m] has joined #commonlisp
opalvaults[m] has joined #commonlisp
linjian has joined #commonlisp
miique has joined #commonlisp
bhyde[m] has joined #commonlisp
<phoe> ;; the obvious answer to the last question is "we are correct", independently of the value of "we" that someone has
<mfiano> :)
<jackdaniel> are there two camps though?
<jackdaniel> I remember that there was a rule when to use -p and when to use p
<mfiano> Yeah that is orthogonal though
<jackdaniel> and both are correct in different contexts
<phoe> jackdaniel: the question is whether to use (let ((foo ...)) ...) or (let ((foop ...)) ...)
<mfiano> The suffix is not the question. What it is appended to is the question.
<phoe> so, whether to use the suffix *at all* for boolean variables
<jackdaniel> I see, thanks
<jackdaniel> both are correct given that they are used consistently in the same module
<phoe> something like (let ((valid (data-valid-p data))) ...) versus (let ((validp (data-valid-p data))) ...) I guess
<mfiano> minion: luv
<minion> luv: Tutorial on Good Lisp Programming Style: http://www.norvig.com/luv-slides.pdf
* mfiano checks
s-liao has quit [Ping timeout: 256 seconds]
morganw has joined #commonlisp
<mfiano> No good advice there. It recommends only "-p" or "?", with consistency paramount. (not even "p", and not which constructs should be named)
s-liao has joined #commonlisp
s-liao has quit [Client Quit]
s-liao has joined #commonlisp
karlosz has quit [Ping timeout: 260 seconds]
<mfiano> They actually recommend a function called #'is-member-node-set
<phoe> welp
<mfiano> I think this style guide is pretty dated for modern code
Josh_2 has joined #commonlisp
s-liao has quit [Client Quit]
<mfiano> It says I can use the ?/! Scheme-isms as long as I'm consistent. I wonder how many CL readers of my code this would drive bonkers.
<Josh_2> Hey
<Josh_2> cl-str has both ? and -p
<phoe> yes
<phoe> it goes "why not both"
<qhong> jackdaniel: thanks for answering the debugger question!
<mfiano> Josh_2: That goes against the LUV slides
<jackdaniel> sure
<mfiano> They say to use one of the other, not both. Consistency is key.
<Josh_2> Personally I use ? when I am unsure whether I will get a result, and then -p for predicates
<qhong> Does Coalton have higher kinded types? I see it's "outside of scope of type classes", but is plain HTK possible?
<mfiano> It does not from what I remember it being a planned feature a while ago. Not sure if that has changed.
<qhong> Specifically, are we able to express recursion scheme in Coalton yet?
<qhong> Seem like I can't even define a type-level least fix point operator
<mfiano> Coalton does have HKTs it seems.
SR-71 has quit [Ping timeout: 240 seconds]
ogamita has quit [Ping timeout: 250 seconds]
<qhong> that's cool, I haven't discovered the interface through M-. yet
<qhong> How to make this work?: (define-type (<lfp> :f) (in (:f (<lfp> :f))))
<qhong> It current says: Kind mismatch between type #T7951 of kind * and kind * -> *
<mfiano> So the main takeaway from this discussion for me is that style conventions are less important in Lisp, because everyone has their own variations with the flexibility the language provides to map code to one's own thought processes.
<mfiano> Fine. I will ignore this issue.
<qhong> Adding (declare <lfp> ((* -> *) -> *)) doesn't work either
rotateq has joined #commonlisp
<mfiano> qhong: The recommended forum for help is the GitHub Discussions page. You're probably not going to find too many users here. It isn't a topic brought up often anyway.
<mfiano> Source: the README
<qhong> mfiano: sure
ogamita has joined #commonlisp
admich has joined #commonlisp
<admich> Hello
<phoe> hey
<rotateq> Hi admich :)
<admich> In slime with M-. on a generic function I obtain a xref buffer with links to the defined methods. How can I obtain also the link for the setf methods?
<jackdaniel> you may type in the modeline buffer (setf <the function name>)
SR-71 has joined #commonlisp
<admich> modeline? do you mean minibuffer?
<jackdaniel> yes, sorry
<admich> but when I type M-. the minibuffer doesn't ask nothing, the xref buffer appears instantly
<jackdaniel> then try it on empty line
<admich> jackdaniel: it works, thank you
<jackdaniel> sure
aartaka has joined #commonlisp
szkl has joined #commonlisp
attila_lendvai has joined #commonlisp
VincentVega has joined #commonlisp
VincentV` has joined #commonlisp
<VincentV`> Say, in sly, if I try to supply a value for a failed assertion, it just keeps prompting me to enter it again and again. Am I doing something wrong or is this a bug?
<VincentV`> (let ((y 0)) (assert (not (zerop y)) (y) "can't be zero, change
<VincentV`> it"))
<VincentV`> eval -> 0 in sly-db -> input for thread nn? -> input -> (input
<VincentV`> for thread nn? -> input)
VincentVega has quit [Ping timeout: 256 seconds]
VincentV` is now known as VincentVega
<VincentVega> ah, I had to type y, then the value
random-nick has joined #commonlisp
<VincentVega> I see a lot of code declaiming inline usage. Declaring it within a function seems cleaner, does declaim have some advantage (other than the case for multiple functions)?
<phoe> DECLAIM INLINE is required to make code inlineable locally via DECLARE
<phoe> otherwise the implementation is allowed to not record the necessary information for making code inlineable
<phoe> so (defun foo () 42) and then (defun bar () (declare (inline foo)) (foo)) might not work without a (declaim (inline foo)) before DEFUN FOO
<phoe> see the relevant clhs page
<phoe> clhs inline
<VincentVega> phoe: I see. Thanks for the explanation.
tfb has joined #commonlisp
notzmv has joined #commonlisp
epony has joined #commonlisp
s-liao has joined #commonlisp
iamFIREc1 has quit [Ping timeout: 240 seconds]
Devon has joined #commonlisp
tfb has quit [Quit: died]
iamFIREc1 has joined #commonlisp
igemnace has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
attila_lendvai has quit [Ping timeout: 272 seconds]
igemnace has joined #commonlisp
sheb has joined #commonlisp
sheb has quit [Remote host closed the connection]
qiduo has joined #commonlisp
Bike has joined #commonlisp
treflip has joined #commonlisp
s-liao has quit [Quit: Client closed]
admich has quit [Quit: ERC (IRC client for Emacs 27.2)]
xaltsc has joined #commonlisp
Guest49124124 has quit [Ping timeout: 256 seconds]
eugercek has joined #commonlisp
Cymew has quit [Ping timeout: 272 seconds]
antoszka has quit [Ping timeout: 240 seconds]
alanz has quit [Ping timeout: 240 seconds]
alanz has joined #commonlisp
antoszka has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
Devon has quit [Ping timeout: 240 seconds]
Devon has joined #commonlisp
<azimut> (quit -yes
ldb has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
pranavats has joined #commonlisp
antoszka has quit [Ping timeout: 240 seconds]
antoszka has joined #commonlisp
<VincentVega> Are there ways of defining read-only structs? Or at least a way to remove the slot accessor setf?
<VincentVega> (progn (defstruct G (w 0)) (fdefinition '(setf G/w))) errors out, so I guess it's something else.
<_death> you can specify :read-only t for the slot
<VincentVega> _death: gee, how did I miss that?
<VincentVega> thanks
<rotateq> the DEFSTRUCT macro would generate a (setf g-w) function
<VincentVega> rotateq: good catch, I have been using slash in my project and have gotten blind to it
<rotateq> :)
antoszka has quit [Read error: Connection reset by peer]
antoszka has joined #commonlisp
<rotateq> but of course with having `:read-only t` one can surely reset the slot (but not with the intended accessor obviously)
<VincentVega> with with-slots you mean?
<rotateq> yes also that (as it expands to symbol-macros)
<rotateq> with (setf slot-value)
ldb has quit [Remote host closed the connection]
ldb has joined #commonlisp
<VincentVega> I see, alright.
<mfiano> rotateq, VincentVega: slot-value is undefined behavior for structures
<mfiano> and thus, with-slots
<rotateq> good that you complement it :)
<VincentVega> actually, with-slots errors out on setf'ing read-only with-slots for me
<mfiano> That is implementation-specific behavior
<rotateq> you mean cause structs have not the metaclass STANDARD-CLASS ?
<VincentVega> gotcha
<mfiano> with-slots is not specified to even work
<rotateq> VincentVega: which implementation do you use?
<VincentVega> sbcl
<rotateq> okay
<VincentVega> (progn (defstruct H (u 0 :read-only t)) (with-slots (u) (make-H) (setf u 55)))
<mfiano> rotateq: Right. Same deal with conditions. slot-value is undefined for them too.
<rotateq> ahh ^^
<phoe> with-slots on condition objects works on all eight contemporary implementations that are used
<mfiano> Doesn't mean you should and that will always be the case.
<phoe> AFAIK same with structs
<mfiano> Write for the future, not for the now
IPmonger has joined #commonlisp
IPmonger has quit [Remote host closed the connection]
<mfiano> +
<mfiano> oops sorry
<Guest74> with encouragement from phoe: I will no use with-slots liberally with my structs :)
<Guest74> s/no/now/
<mfiano> I wonder why we even have a standard sometimes. People never learn.
torbo has joined #commonlisp
<phoe> right, who in their right mind would use package-local nicknames
<phoe> point me to the part of the standard that says a thing about them
<rotateq> i like using it writing special WITH-FOO macros (for classes)
<mfiano> That is completely orthogonal.
<Guest74> all kidding aside.  I usually just us (:conc-name nil).  What does with with-slots get you over that?
<mfiano> It's an de-facto standard extension. There is no CDR that says slot-value should work on all new implementations, or that existing implementations should not break your code.
<rotateq> mfiano: yes but i also see it's just `unspecified` so generates a hole
<phoe> Guest74: the fact that DEFSTRUCT does not define generic functions, so struct accessors can easily override each other that way if you are unlucky
<phoe> mfiano: OK, I might write such a CDR someday
<Guest74> phoe: unlucky how?
<phoe> Guest74: define two structures that each have :CONC-NAME NIL and a slot named BAR
<phoe> one of the implicitly defined accessors is going to overwrite the other
<rotateq> i more or less stopped using structs over half a year now
<Guest74> meh, all my libraries are not to be :use'd and say so in the readme.
<mfiano> Note that NIL has different semantics from "" though.
<ldb> "maybe string"
<phoe> more like, which package are the accessors interned in
<Guest74> rotateq: structs are great for 'records'.
<rotateq> Guest74: i thought it's just another word for it
<Guest74> was sort of my point.
<rotateq> okay :)
<_death> mfiano: different how?
<mfiano> mfiano: in regards to what?
<Guest74> phoe: I don't see the issue when everything is package prefixed.  If someone wants to circumvent that some how, all the damage is on them.
<mfiano> err _death :)
ldb has quit [Quit: ERC (IRC client for Emacs 27.2)]
<_death> mfiano: nm, phoe gave the clue
<mfiano> _death: With a struct in package A that :includes another defined in package B, conc-name NIL will clobber the accessors of package B's struct. conc-name "" will not
<torbo> Is there a good library to interact with Oracle from CL? I'm using CLSQL and running queries on Oracle 12c. There are results, but I notice that there are some junk characters in the column names in the output of clsql:query. I thought it may have been an encoding issue, but both the DB and the connection are both set to UTF-8. I've dug into the source code of clsql-oracle, and see that the junk in the string is being returned here:
<torbo> https://github.com/dxtr/clsql/blob/8061aae1ecb878954115c7aacd90685a65bf4107/db-oracle/oracle-sql.lisp#L725 I wonder if Oracle 12c uses a newer version of OCI than that supported by CLSQL.
<Guest74> mfiano: is that only if package A uses :conc-name nil? or both can use conc-name "".
<phoe> Guest74: what do you mean, package A or package B?
<phoe> this is only a question of DEFSTRUCT
<Guest74> I mean exactly what mfiano said.
<mfiano> Yes, phoe is correct, but it is even more confusing when extending structs across-package boundaries
<mfiano> conc-name NIL means to intern the accessors into the package of the included struct
<_death> :conc-name nil will use the same name as the slot's, whereas :conc-name "" will intern in the current package
<mfiano> That bit me hard a year ago.
<phoe> mfiano: not into the package of the included struct, but into the packages of the slots' names
<Guest74> where does conc-name nil intern then?
<mfiano> phoe: Fair hair split
<phoe> if you have a slot named BAR:BAZ then with :CONC-NAME NIL you will get an accessor named BAR:BAZ
<mfiano> clhs defstruct
<phoe> if you have a slot named BAR:BAZ then with :CONC-NAME "" you will get an accessor named XXX:BAZ where XXX is the name of *PACKAGE* at macroexpansion time
<phoe> or rather, XXX::BAZ
<phoe> "If :conc-name is nil or no argument is supplied, then no prefix is used; then the names of the reader functions are the same as the slot names. If a non-nil prefix is given, the name of the reader function for each slot is constructed by concatenating that prefix and the name of the slot, and interning the resulting symbol in the package that is current at the time the defstruct form is expanded."
<phoe> in particular, (defstruct (foo (:conc-name nil)) bar:baz) will define a function on a symbol from package BAR
<Guest74> So that would affect if someone :includes your struct?
<mfiano> Yes, and now imagine you want to extend a struct with single inheritance via :include from another package, and this new package is small so you blindly :conc-name NIL...boom
<Guest74> I'll have to think about this.  But usually if I use a struct it's an internal thing and never meant to be inherited.
tyson2 has joined #commonlisp
<mfiano> You will at least get warnings on SBCL saying your function definitions have been redefined.
<Guest74> but long story short, just using conc-name "" should prevent this shenanigans from any future possibilities?
<mfiano> This is only an issue if someone includes your struct and _also_ supplies :conc-name NIL instead of :conc-name ""
<mfiano> In the former case, they will monkey patch your package.
<mfiano> Which will more than likely break it
<Guest74> so them using nil will even break me using ""?  That's the only part I'm unsure of now.
<phoe> one second...
<_death> mfiano: I'm not sure about your issue there.. with :conc-name nil for both structures, the accessors will simply be extended
<phoe> "Moreover, astronaut has its own reader functions for components defined by the person structure."
<mfiano> I guess I have to provide an example
<phoe> OK, so ASTRONAUT defines its own readers for components from PERSON
<phoe> this means that if both PERSON and ASTRONAUT use :CONC-NAME NIL, then PERSON's accessors will get overwritten by ASTRONAUT's
ec has joined #commonlisp
<_death> phoe: the accessors for the included structure should work for both
rotateq has quit [Quit: ERC (IRC client for Emacs 27.2)]
<phoe> _death: "The difference between the reader functions person-name and astro-name is that person-name can be correctly applied to any person, including an astronaut, while astro-name can be correctly applied only to an astronaut. An implementation might check for incorrect use of reader functions."
<Guest74> Yes, I saw no conflict when reading that part.
<phoe> the way I read this passage is, if ASTRONAUT defines its own NAME function that clobbers PERSON's NAME, then this new function cannot really be applied to a PERSON
<_death> phoe: defstruct should know not to clobber it
lottaquestions_ has joined #commonlisp
<phoe> _death: "should" is the part that I am worried about; I can't find a passage in the spec that says so
antoszka has quit [Ping timeout: 240 seconds]
antoszka has joined #commonlisp
<Guest74> Now I'm a bit concerned.  I do use inheritance to make double buffered windows work seamlessly with clx.  I forget if I used conc-name nil though.
<Guest74> and knowing if "" prevents somebody from inheriting and clobbering my stuff seems useful.
<mfiano> Sorry for the confusion. I misremembered.
<_death> phoe: what about the last paragraph in :conc-name section
<phoe> _death: oh! let me read and understand that
jealousmonk has joined #commonlisp
<phoe> "no definition for R is generated by the definition of S2" - yes, that is the place
<phoe> this means that DEFSTRUCT ASTRONAUT does not generate a second DEFUN NAME
<Guest74> ah, well it's interesting non the less.
<phoe> mfiano: also this is UB, slot values in structs are not portably initialized to NIL
<mfiano> I know
<_death> a lot of code would break if an implementation chooses some other init value
<phoe> _death: a lot of code won't work on genera then
<mfiano> Trying to figure out how I was getting redefinition monkey patch warnings to no avail. I remember Xach was trying to debug it at the time is all I remember.
<wmblathers> Who, apart from Rainer and the occasional and dedicated genera-pirate, still uses genera?
<Guest74> but this exactly what the astronaut examples shows.
<_death> phoe: interesting.. but yeah, the conclusion is the same
<Guest74> i think you might have to :include and :use for there to be a clobberin?
<Guest74> Said in my best Thing voice.
<mfiano> Heh, I never :USE anything except :CL
nature has quit [Quit: Lost terminal]
<_death> phoe: a while ago, sbcl also changed semantics so that you can have unbound defstruct slots using &aux.. (defstruct (foo (:constructor make-foo (&aux bar))) bar)
<phoe> _death: welp
<Guest74> I usually don't :use, but I've taken to doing so for my ioctl-macros and some foreign code stuff.
<phoe> yes, 3.4.6 mentions that
nature has joined #commonlisp
form_feed is now known as \f
treflip has quit [Quit: ERC (IRC client for Emacs 27.2)]
euandreh has joined #commonlisp
torbo has left #commonlisp [ERC (IRC client for Emacs 27.1)]
ryanbw has quit [Quit: I'll be back.]
ryanbw has joined #commonlisp
trriplex has joined #commonlisp
ns12 has quit [Quit: bye]
ns12 has joined #commonlisp
trriplex has quit [Quit: Leaving]
<jackdaniel> wmblathers: Gary Palter said that he will release OpenGenera in a virtual machine. I've received some patches to ansi-tests from him recently-ish.
<jackdaniel> or was it Portable Genera? not sure
<White_Flame> under what license?
<jackdaniel> I don't know
<jackdaniel> oops, cl-bench not ansi-test
NotThatRPG has joined #commonlisp
<jeosol> Good morning all
<jeosol> In CLOS design classes, it is generally better to not use what I'll call duplicate slots in meaning, e.g., say time in months and days with the latter derived from the former. I need to compute time in days from the month value as a slot. It is one time computation but it seems is better not to have time-in-days and time-in-months given I already
<jeosol> have a large number of slots. Thoughts?
<jeosol> I mean designing CLOS class interface ... not design classes
<Guest74> how do you calculate time in days from time in months?
<jeosol> There are two dates, a start-date and end-date, so time in months is start-date - end-date in months, and I do the same for time-days
Major_Biscuit has quit [Ping timeout: 256 seconds]
morganw has quit [Remote host closed the connection]
<jeosol> For clarity, the differences are durations-in-months and durations-in-days
karlosz has joined #commonlisp
<jeosol> so the slots will be duration-in-months and duration-in-days with the former being easier to specify, e.g., 1 month, 2 months
<wmblathers> jackdaniel: That's interesting to know. I've seen hints at this on twitter, but I wonder what — if any — impact this would have on the larger CL ecosystem, apart from it being easier to verify this or that library runs as expected there.
notzmv has quit [Ping timeout: 250 seconds]
<jackdaniel> beats me, I've never used genera. that said it can't be worse than today software, can it? :)
<ecraven> who is Gary Palter? The owner of the OpenGenera IP?
notzmv has joined #commonlisp
<Guest74> if I read a signed-byte n as an unsigned-byte n, how much I do need to shift to get the proper signed value? (ash sb (/ n 2))?
<Guest74> -
<phoe> huh, I don't think it's a matter of just an ASH call
<Bike> lognot 1+, i think
<Bike> i can never keep it straight
<Guest74> wishful thinking on my part.
<phoe> lognot 1+, but only if the sign bit is set
<Guest74> hrm, that's not giving me anything I would expect.
<Bike> what i mean is, say you read -4 as an ub4, #b1100
<Bike> (ldb (byte 4 0) (1+ (lognot #b1100))) => 4
<Bike> (then negate that to get -4)
<scymtym> phoe: any objections to https://github.com/sharplispers/lparallel/pull/2 ?
<phoe> scymtym: looking
<Guest74> yeah, it's giving me a huge number, which is not what I'd expect.
<Guest74> maybe logandc1 sb 1?
<Guest74> nope, that doesn't work.
<Bike> what do you mean, a huge number? if you take only the low bits properly you'll get the magnitude
<phoe> scymtym: NIL is allowed as a type specifier, so avoiding it in DEFTYPE H-B-C-T is pointless
<phoe> such a handler will never be executed, that's right, but I can imagine user code that performs some sort of type operations on its own and ends up e.g. intersecting (AND ERROR WARNING) to get the type NIL
<Guest74> this is the number I've read for 64 bits 12884901894 . It should be some small number.
<phoe> Guest74: you are not supposed to do the LOGNOT if the sign bit is not set
<phoe> you only want to flip the negative numbers around
<Bike> yeah, that has the 32 most significant bits as zero
<Bike> did you mean to treat it as a 32 bit number? but even then, the top two bits are set, so it would be pretty big
<Bike> (format t "~64,'0b" number) to see it written out
<Guest74> hrm, maybe it's expecting  integer to be 32bits
szkl has quit [Quit: Connection closed for inactivity]
SR-71` has joined #commonlisp
kevingal has joined #commonlisp
<Guest74> ugh, I have dealing with c stuff.
SR-71 has quit [Ping timeout: 240 seconds]
<Guest74> s/have/hate/
Guest74 has quit [Quit: Connection closed]
<scymtym> phoe: right, i don't think NIL as a condition type is treated specially in lparallel, but i wanted to keep the behavior of not allowing NIL since the code previously did that
<phoe> scymtym: will it change if I file a bug that NIL is not allowed as a condition type? :D
morganw has joined #commonlisp
shka has quit [Quit: Konversation terminated!]
<scymtym> phoe: not sure what the best course of action is. i tend to think maybe lmj had a reason for disallowing nil, but i'm not sure what the reason could be
karlosz has quit [Quit: karlosz]
karlosz has joined #commonlisp
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 272 seconds]
attila_lendvai has joined #commonlisp
Lord_of_Life_ is now known as Lord_of_Life
orestarod has joined #commonlisp
SR-71` has quit [Remote host closed the connection]
Oladon has joined #commonlisp
snits has joined #commonlisp
rotateq has joined #commonlisp
aeth_ has joined #commonlisp
aeth has quit [Killed (NickServ (GHOST command used by aeth_))]
aeth_ is now known as aeth
hashfunc1e68 has joined #commonlisp
waleee has joined #commonlisp
<White_Flame> ecraven: as far as I know, he's the person hired to work on it
euandreh has quit [Ping timeout: 240 seconds]
<hashfunc1e68> i have a macro. in my macro is a `cond` expression. i get warnings from macro-expansions that will never happen (does that make sense?). is there a strategy to avoid this?
<phoe> hashfunc1e68: you mean "deleting unreachable code"?
<hashfunc1e68> phoe: that's partly what the compiler says
<hashfunc1e68> "caught WARNING: The function ARRAY is undefined ..."
<phoe> ...wait a second
<phoe> you are doing something wrong then
<hashfunc1e68> like it makes sense that it would generate that warning. but that branch of the cond isn't going to be executed
<phoe> why are you trying to call a function named ARRAY
<hashfunc1e68> it's in the `parenscript` library
<ecraven> White_Flame: so there are plans to make it available in some form?
<hashfunc1e68> phoe: specifying the first symbol in a list as ARRAY is just something that a macro is using to interpolate the rest of the list. it's not actually calling a function persay
<phoe> hashfunc1e68: I think it is - otherwise the compiler would not warn you about it
<phoe> show the code please? and the macroexpansion?
<hashfunc1e68> phoe: i just thought of something. maybe i need to `, the cond away
<hashfunc1e68> it's something that's known at compile-time
<phoe> I want to see the macroexpansion though, trust me :D
<hashfunc1e68> phoe: ok
aartaka has quit [Ping timeout: 272 seconds]
<White_Flame> ecraven: apparently, just kinda hearsay
<ecraven> still, good news ;)
<White_Flame> hashfunc1e68: since the language is an unevaluated source code literal, you could perform the cond at macroexpansion time instead of generating a runtime cond
<jackdaniel> composing rotation matrices with translation is a disaster (float aproximation wise) - is there some state of the art remedy for it or transformation must be kept separate and applied in turn?
aartaka has joined #commonlisp
<hashfunc1e68> White_Flame: would putting the backtick at location `(format ... be the best place to put it? (with the comma obviously being put before the cond expression). i struggle with finding the best backtick placement in forms
<White_Flame> hand-write the form you want to return
<phoe> hashfunc1e68: what is CREATE?
<White_Flame> wherever the beginning of that is is where your backtick goes
<White_Flame> so I'm pretty sure you want to generate (with-open-file ... (format str ...
<White_Flame> `(with-open-file ... (format str ... ,(cond ((eq a b) `(form to generate the parameter)))))
<White_Flame> hmm, and (format stream "~a" <string>) can also be replaced by (princ <string> stream), a bit more direct
<hashfunc1e68> White_Flame: the part i'm struggling with is nested backticks and commas. since i have ... (eq ',language 'html) ... and what not
<semz> jackdaniel: I'm far from an expert in that topic, but how are you representing your transformations right now? I'm a little surprised to hear that affine functions don't compose well.
<White_Flame> your output is (eq 'html 'html), so you need to shove the first HTML after the quote
<hashfunc1e68> phoe: CREATE is and implementation detail of a macro
<White_Flame> hence quote, then escape out to the variable value
<phoe> hashfunc1e68: no it's not
<phoe> the resulting macroexpansion calls it as a function
<phoe> so obviously it survives macroexpansion
jeosol has quit [Quit: Client closed]
<hashfunc1e68> phoe: it survives slime-expand-1, one round of macro expansion (not a recursive expansion). `ps` is the macro. `create` is an implementation detail of said macro
<phoe> I mean
<phoe> if the CL compiler emits a warning about an undefined function CREATE
<hashfunc1e68> in the context yes
<hashfunc1e68> the compiler is correct
<phoe> then CREATE survives the FULL macroexpansion
<phoe> and is called like a function in the resulting macroexpansion
<phoe> uhhh, sorry, not CREATE but ARRAY
<hashfunc1e68> White_Flame: i'm not quite wrapping my head around your last two messages tbh
<White_Flame> (eq '<lang> 'html)
<White_Flame> in order to shove that LANG value in there, you need a quote first, then escape out to the value of lang
<White_Flame> so `(eq ',lang 'html)
<White_Flame> quotes whatever the value of LANG is
<White_Flame> technically, it's `(eq (quote ,lang) 'html)
<_death> PS:CREATE is not a CL macro, it is a parenscript macro..
<White_Flame> which might be a bit more readable at the moment
jeosol has joined #commonlisp
<hashfunc1e68> White_Flame: i'm trying to wrap my head around how that relates to our conversation of nested backticks
<hashfunc1e68> *conversation about nested backticks
<White_Flame> oh, well it's the form you brought up
<White_Flame> and you're not actually nesting backticks, `,`, is still just 1 level deep
<White_Flame> (for various definitions of "nesting")
<White_Flame> it's when you have ``( ',@',foo) or whatever that really starts hurting neurons
<hashfunc1e68> White_Flame: ok, so is that where i'm going wrong? attempting to nest backticks? i thought that was the way to go.
<White_Flame> what exactly is going wrong again? was it a warning abotu unused COND branches?
<jackdaniel> semz: as a matrix of double floats. when you compose rotation with translation, then you mix mulitply relatively big floats with small ones
<hashfunc1e68> White_Flame: I'll repost it all again in a legible pastbin with all the details
<semz> Oh, as n+1 x n+1 matrices?
<jackdaniel> right
<jackdaniel> for now I'm just keeping matrices separate and apply them separately
<hashfunc1e68> White_Flame: https://pastebin.com/T9BxNPub
mrcom has quit [Quit: This computer has gone to sleep]
<White_Flame> with (ps (create ...)) saying create isn't known, that means PS isn't evaluating as a macro, so it's trying to evaluate the parameters for making a function call
<White_Flame> did you :use the parenscript package or just import individual symbols?
mrcom has joined #commonlisp
<hashfunc1e68> White_Flame: i used :use. `(defpackage :program (:use #:cl #:cl-who #:parenscript))` funny you should ask. package idioms is another thing i'm going to research today
<hashfunc1e68> these fricken backticks tho. are backticks read inside-out or outside-in? or is that even a valid question? idk i'm just trying to develop an intuition around all this
<White_Flame> it's just a list template
<White_Flame> equivalent to a normal quote, but can be escaped
<White_Flame> anyway, you don't have a PS around your HTML branch's CREATE
Brucio-61 has joined #commonlisp
<White_Flame> '(foo bar) == `(foo bar)
<White_Flame> `(foo ,(+ 1 2)) = (list 'foo (+ 1 2))
<White_Flame> (although `(foo bar) might differ in creating a list every time?)
<White_Flame> (whereas '(foo bar) is a literal piece of source code that's reused as data every time that expression is used)
igemnace has quit [Quit: WeeChat 3.4]
Dynom has quit [Quit: WeeChat 3.4]
<hashfunc1e68> White_Flame: ok i understand all the above. but the example you gave earlier ... ``( ',@',foo) ... i just cannot rationlize. when i slime-expand-1, i get ... (LIST 'SB-INT:QUASIQUOTE (LIST (LIST 'QUOTE (SB-IMPL::UNQUOTE-SPLICE (LIST 'QUOTE FOO))))) ...
<White_Flame> oh, that was literal nonsense :-P
<hashfunc1e68> i feel like if i understand that example, i'll "get it"
<hashfunc1e68> but it's actually not lol. it's perfectly valid code
<White_Flame> syntactically, yes :)
<hashfunc1e68> and i don't understand it haha. BUT if i can wrap my head around that, i think i'll be set in regards to quasiquotes
<White_Flame> if ,foo were BAR, then it'd evaluate to `(',@'bar), which would be a real mess of QUOTEs
aeth has quit [Ping timeout: 256 seconds]
aeth has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
kevingal has quit [Remote host closed the connection]
silasfox has quit [Quit: WeeChat 3.4]
<hashfunc1e68> White_Flame: ok. so assuming ,foo is BAR. does the reduction process (according to normal evaluation rules) go as follows? ... ``(',@',foo) => `(',@'BAR) => (''BAR) => ('BAR) => BAR
patrice has joined #commonlisp
<White_Flame> `(',@'bar) => `((quote . (quote bar))) => ((quote quote bar))
<White_Flame> no, wait, the latter is evaluated, so ((quote . bar))
<White_Flame> ,@'bar => . bar
<White_Flame> (when it's last in the list, otherwise spliced in which there's no standard syntax for)
<White_Flame> yep, repl confirms
<White_Flame> (let ((foo 'bar)) (eval ``(',@',foo))) => ((QUOTE . BAR))
Brucio-52 has joined #commonlisp
<hashfunc1e68> White_Flame: ok. ^ i'm gonna have to look at this a few times to see the patterns
<hashfunc1e68> White_Flame: thanks for the help
<White_Flame> liek I said, I just typed in random balanced nonsense :)
<White_Flame> also, this sort of thing might be more appropriate for #clschool
<hashfunc1e68> didn't even know that channel existed. i'll add it to the list
<hashfunc1e68> pun intended
aartaka has quit [Ping timeout: 272 seconds]
wacki has quit [Quit: Leaving.]
Brucio-52 has quit [Quit: Testing]
nature has quit [Ping timeout: 240 seconds]
Oladon has quit [Quit: Leaving.]
hashfunc1e68 has quit [Ping timeout: 256 seconds]
lottaquestions_ has quit [Ping timeout: 240 seconds]
tyson2 has joined #commonlisp
akoana has quit [Quit: leaving]
attila_lendvai has quit [Ping timeout: 240 seconds]
NotThatRPG has quit [Ping timeout: 240 seconds]
cosimone has quit [Quit: ERC (IRC client for Emacs 27.1)]
pve has quit [Quit: leaving]
patrice has quit [Quit: Leaving]
cage has quit [Quit: rcirc on GNU Emacs 27.1]
rgherdt has quit [Remote host closed the connection]
euandreh has joined #commonlisp
Guest74 has joined #commonlisp
random-nick has quit [Ping timeout: 240 seconds]
Bike has quit [Quit: Lost terminal]
yewscion has joined #commonlisp
anticomputer_ has joined #commonlisp
anticomputer has quit [Ping timeout: 240 seconds]
perrierjouet has quit [Ping timeout: 272 seconds]