Xach 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>
Guest74 has quit [Quit: Connection closed]
ec has quit [Ping timeout: 276 seconds]
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 260 seconds]
Lord_of_Life_ is now known as Lord_of_Life
Alfr has quit [Remote host closed the connection]
Devon has quit [Ping timeout: 245 seconds]
jdz has quit [Ping timeout: 260 seconds]
Alfr has joined #commonlisp
jdz has joined #commonlisp
Alfr has quit [Remote host closed the connection]
asen has quit [Remote host closed the connection]
asen has joined #commonlisp
asen has quit [Read error: Connection reset by peer]
asen has joined #commonlisp
asen has quit [Client Quit]
peterhil has quit [Remote host closed the connection]
taiju has quit [Ping timeout: 245 seconds]
rgherdt has quit [Ping timeout: 245 seconds]
taiju has joined #commonlisp
peterhil has joined #commonlisp
random-nick has quit [Ping timeout: 260 seconds]
rgherdt has joined #commonlisp
taiju has quit [Ping timeout: 260 seconds]
peterhil has quit [Remote host closed the connection]
peterhil has joined #commonlisp
peterhil has quit [Remote host closed the connection]
peterhil has joined #commonlisp
<lagash> I think I recall ultralisp used it..
Devon has joined #commonlisp
rgherdt has quit [Ping timeout: 245 seconds]
antonv has joined #commonlisp
<antonv> Hi
srhm has joined #commonlisp
<antonv> How do you think, when accessing a CLOS object fields from multiple threads, is it necessary to synchronize on the object?
<antonv> sorry
<antonv> I mean, the application logic does not require synchronization.
<antonv> But can a CLOS object be broken somehow if a field is set from one thread and another field is set from another thread
<hayley> I don't believe so, but like most tricky parts of concurrency, don't count on it.
<hayley> To my knowledge, Bike's draft for concurrency in WSCL specifies that you can have data races on slots, but the only action that can completely "break" an object is CHANGE-CLASS.
<antonv> what is WSCL?
peterhil has quit [Remote host closed the connection]
antonv has quit [Ping timeout: 256 seconds]
<hayley> Well Specified Common Lisp. I wonder if the bot knows about it...
<hayley> minion: tell antonv about WSCL
<minion> antonv: WSCL: Well-Specified Common Lisp. Pronounce it as "whistle". A project to revise the Common Lisp standard in a non-controversial way. See https://github.com/s-expressionists/wscl
<hayley> Hoorah.
notzmv has joined #commonlisp
antonv has joined #commonlisp
taiju has joined #commonlisp
Guest74 has joined #commonlisp
antonv has quit [Ping timeout: 256 seconds]
Catie has quit [Quit: rcirc on GNU Emacs 29.0.50]
antonv has joined #commonlisp
gigamonkey has quit [Ping timeout: 264 seconds]
<antonv> hayley: that's interesting, although I can not find any concurrency info in the https://github.com/s-expressionists/wscl
<antonv> Anyways, probably it is safer to use a lock...
srhm has quit [Ping timeout: 245 seconds]
gigamonkey has joined #commonlisp
Oladon has joined #commonlisp
gigamonkey has quit [Ping timeout: 256 seconds]
sander has quit [Quit: So long! :)]
Spawns_Carpet[m] has joined #commonlisp
antonv has quit [Ping timeout: 256 seconds]
bitspook[m] has left #commonlisp [#commonlisp]
sander has joined #commonlisp
raeda has quit [Quit: Leaving]
waleee has quit [Quit: WeeChat 3.3]
gigamonkey has joined #commonlisp
gigamonkey has quit [Ping timeout: 260 seconds]
gigamonkey has joined #commonlisp
peterhil_ has joined #commonlisp
gigamonkey has quit [Ping timeout: 264 seconds]
<hayley> Hm, I don't think it is in that repository.
Inline has quit [Ping timeout: 264 seconds]
gigamonkey has joined #commonlisp
gigamonkey has quit [Remote host closed the connection]
gigamonkey has joined #commonlisp
gigamonkey has quit [Ping timeout: 256 seconds]
gigamonkey has joined #commonlisp
gigamonkey has quit [Ping timeout: 245 seconds]
Alfr has joined #commonlisp
gigamonkey has joined #commonlisp
<beach> Good morning everyone!
<hayley> I should mention that no implementation of Common Lisp actually implements that concurrency specification, but I think that "NN.1.2 Conflicts and Data Races" describes what you can do without racing.
philb2 has joined #commonlisp
Devon has quit [Ping timeout: 264 seconds]
philb2 has quit [Read error: Connection reset by peer]
philb2 has joined #commonlisp
philb2 has quit [Read error: Connection reset by peer]
philb2 has joined #commonlisp
philb2 has quit [Read error: Connection reset by peer]
philb2 has joined #commonlisp
philb2 has quit [Read error: Connection reset by peer]
cognemo has quit [Quit: ZNC 1.8.2 - https://znc.in]
cognemo has joined #commonlisp
Guest74 has quit [Ping timeout: 264 seconds]
s-liao has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
semz has quit [Ping timeout: 268 seconds]
igemnace has quit [Remote host closed the connection]
semz has joined #commonlisp
aartaka has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
s-liao has quit [Quit: Client closed]
nature has quit [Ping timeout: 264 seconds]
akoana has left #commonlisp [#commonlisp]
thomaslewis has left #commonlisp [#commonlisp]
Volt has joined #commonlisp
peterhil_ has quit [Remote host closed the connection]
Jing has quit [Remote host closed the connection]
Jing has joined #commonlisp
thomaslewis has joined #commonlisp
peterhil_ has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
VincentVega has joined #commonlisp
gigamonkey has quit [Ping timeout: 264 seconds]
s-liao has joined #commonlisp
gigamonkey has joined #commonlisp
gigamonkey has quit [Remote host closed the connection]
gaqwas has joined #commonlisp
shka has joined #commonlisp
attila_lendvai has joined #commonlisp
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
Inline has joined #commonlisp
Inline has quit [Remote host closed the connection]
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
Inline has joined #commonlisp
pve has joined #commonlisp
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
ym has joined #commonlisp
s-liao has quit [Quit: Client closed]
amk has quit [Ping timeout: 264 seconds]
amk has joined #commonlisp
karlosz has joined #commonlisp
rain3 has joined #commonlisp
phantomics has quit [Quit: Ex-Chat]
karlosz has quit [Quit: karlosz]
Oladon has quit [Quit: Leaving.]
rgherdt has joined #commonlisp
Inline has quit [Quit: Leaving]
s-liao has joined #commonlisp
s-liao has quit [Client Quit]
s-liao has joined #commonlisp
Devon has joined #commonlisp
VincentVega has quit [Read error: Connection reset by peer]
Inline has joined #commonlisp
Krystof has joined #commonlisp
lisp123_win has joined #commonlisp
<lisp123_win> Does anybody have a list of all the namespaces and their associated functions (e.g. (fdefinition symbol)) for symbols? E.g. classes have names, slots have names, macros have names, the list goes on
<beach> I don't have a complete list, but if you are collecting one, I can give you more entries. Also, there are namespaces without any accessors, like for types.
<beach> And FDEFINITION is not for symbols, its for global functions. They can also have names like (SETF <symbol>).
<beach> A namespace that has an accessor only in the MOP is the one for method combinations.
<beach> mop find-method-combination
<beach> Slots don't have a namespace like that. They just have a name associated with each instance.
Volt has quit [Quit: ]
<lisp123_win> Thanks Beach
<beach> Sure.
<lisp123_win> I will collate something and share back with some notes against them, like what you have above
s-liao has quit [Quit: Client closed]
s-liao has joined #commonlisp
<beach> There is one for compiler macros, and the accessor is COMPILER-MACRO-FUNCTION.
<beach> I suppose there is one for condition types that doesn't have an accessor unless the implementation uses classes for condition types. But perhaps every implementation does use classes.
<lisp123_win> I see - thanks
<Nilby> I thought there was a namespace diagram, but I guess I was thinking of this: ttps://sellout.github.io/2012/03/03/common-lisp-type-hierarchy
<Nilby> (s+ "h" *) ;(
s-liao has quit [Quit: Client closed]
s-liao has joined #commonlisp
<lisp123_win> Nilby: what's that?
<jackdaniel> add "h" in front of the url above
<Nilby> yes
<lisp123_win> Ah :)
McParen has joined #commonlisp
random-nick has joined #commonlisp
cosimone has joined #commonlisp
<lisp123_win> Hopefully that is a relatively complete list, I'll go and add all the accessors for these tonight / in the coming days
s-liao has quit [Ping timeout: 256 seconds]
<beach> It's not the same as what you asked about before.
<beach> Ordinary functions, generic functions, macro functions, and special operators all share a namespace.
<beach> And methods don't have a namespace like that.
<lisp123_win> Yes, but its a good starting point
<lisp123_win> But I will read through the CLHS to see what's missed
cosimone has quit [Quit: ERC (IRC client for Emacs 27.1)]
<lisp123_win> For example, since macros and ordinary functions share a namespace, you have to search for macro-function first when accessing
<lisp123_win> Fortunately classes and methods have excellent introspection (I'm loving the closer-mop library) :)
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
s-liao has joined #commonlisp
LoopMacro has quit [Ping timeout: 268 seconds]
<shka> jackdaniel: i managed to get flamegraphs out of the metering, was pretty easy modification to be made
<jackdaniel> shka: congrats!
<shka> a simple example https://i.imgur.com/GGeBGQo.png
tyson2 has joined #commonlisp
<shka> are you sure that you are ok with a fork?
<jackdaniel> yeah
<shka> ok, i will do that then, but perhaps next week
Lycurgus has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
lisp123_win has left #commonlisp [ERC (IRC client for Emacs 26.3)]
Lycurgus has quit [Quit: Exeunt]
s-liao has joined #commonlisp
azimut_ has joined #commonlisp
VincentVega has joined #commonlisp
azimut has quit [Ping timeout: 276 seconds]
Nselm has joined #commonlisp
lisp123w has joined #commonlisp
<lisp123w> beach: With Eclector, is there a way to get the top-level form number of a definition (e.g. the third form in the file was the defintion for ordinary function MY-FN)? I am assuming not
<beach> No, that's not the purpose of Eclector. It just reads. You need to do the rest yourself.
<lisp123w> That's what I thought. Thanks
Everything has joined #commonlisp
<yitzi> lisp123w: I use the source tracking of Eclector with a custom client to do that in common-lisp-jupyter. If understand your request.
<lisp123w> yitzi: Yes, I do that as well (using SBCL). Wanted to make it more portable
<lisp123w> SBCL returns the top-level form number when you introspect the symbol
<yitzi> I dont use SBCL internals, just Eclector since I need it to work for CMUCL inspection also.
<lisp123w> Oh nice. Could I re-use your code :)? Do you just read each line and determine whether its a function definition, macro definition etc.?
gaqwas has quit [Remote host closed the connection]
<yitzi> I make a complete source map. It does distinguish between what the forms are. It does subform number also. It is MIT licensed so do what you want! https://github.com/yitzchak/common-lisp-jupyter/blob/c5531f60da0ec288a187a55ba699e38548233819/src/cl-jupyter/utils.lisp#L147
<yitzi> does not distinguish
attila_lendvai has quit [Ping timeout: 268 seconds]
aartaka has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
McParen has left #commonlisp [#commonlisp]
igemnace has joined #commonlisp
s-liao has quit [Quit: Client closed]
<Xach> borodust: cl-flow update any time soon?
s-liao has joined #commonlisp
asen has joined #commonlisp
asen has quit [Read error: Connection reset by peer]
asen has joined #commonlisp
asen has quit [Max SendQ exceeded]
asen has joined #commonlisp
gxt has quit [Quit: WeeChat 3.3]
peterhil_ has quit [Remote host closed the connection]
gxt has joined #commonlisp
asen has quit [Read error: Connection reset by peer]
asen has joined #commonlisp
asen has quit [Max SendQ exceeded]
asen has joined #commonlisp
makomo has joined #commonlisp
asen has quit [Max SendQ exceeded]
asen has joined #commonlisp
asen has quit [Max SendQ exceeded]
asen has joined #commonlisp
asen has quit [Client Quit]
peterhil_ has joined #commonlisp
VincentVega has quit [Quit: ERC (IRC client for Emacs 27.2)]
amb007 has quit [Read error: Connection reset by peer]
VincentVega has joined #commonlisp
amb007 has joined #commonlisp
taiju has quit [Ping timeout: 260 seconds]
taiju has joined #commonlisp
s-liao has quit [Quit: Client closed]
VincentVega has quit [Remote host closed the connection]
VincentVega has joined #commonlisp
gaqwas has joined #commonlisp
attila_lendvai has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
Nselm has quit [Quit: Client closed]
phantomics has joined #commonlisp
Bike has joined #commonlisp
lotuseater has joined #commonlisp
tyson2 has joined #commonlisp
waleee has joined #commonlisp
Guest7426 has joined #commonlisp
robin__ has joined #commonlisp
robin has quit [Ping timeout: 264 seconds]
robin__ has quit [Client Quit]
robin has joined #commonlisp
shka has quit [Quit: Konversation terminated!]
shka has joined #commonlisp
cosimone has joined #commonlisp
yewscion has joined #commonlisp
nature has joined #commonlisp
bcasiello has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
VincentVega has quit [Read error: Connection reset by peer]
peterhil_ has quit [Ping timeout: 264 seconds]
peterhil_ has joined #commonlisp
peterhil_ has quit [Remote host closed the connection]
peterhil_ has joined #commonlisp
waleee has quit [Ping timeout: 268 seconds]
waleee has joined #commonlisp
yewscion has quit [Quit: Connection closed]
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
thomaslewis has joined #commonlisp
yewscion has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
Bike has quit [Quit: Connection closed]
Everything has quit [Quit: leaving]
karlosz has joined #commonlisp
tyson2 has joined #commonlisp
Bike has joined #commonlisp
<shka> jackdaniel: one more thing, it seems that profiling overhead is calculated to be equal 0 in metering
<shka> is that expected?
karlosz has quit [Quit: karlosz]
Inline has quit [Ping timeout: 245 seconds]
ym has quit [Ping timeout: 256 seconds]
thomaslewis has joined #commonlisp
<Guest7426> is there an easy way to tell how many bits are set in a bit array?
thomaslewis has left #commonlisp [#commonlisp]
<shka> Guest7426: yes
<shka> (reduce #'+ array)
<Guest7426> maybe I should clarify, which bits are set. by easy I mean some built in function.
<shka> i don't know any for this specific task, but reduce (or count) work fine
<Bike> there is no built in equivalent to logbitp. hopefully implementations optimize count calls appropriately
<Bike> er, logcount.
<Guest7426> I'm starting to think an integer would be better than a bit array.
<shka> i am looking for a system that implements reader macro for running shell programs
<shka> i can't remember the name
<shka> ok, got it
<shka> CLESH
<contrapunctus> ::notify Josh_2 I ran into some more Clack documentation today! :D https://jasom.github.io/clack-tutorial/posts/getting-started-with-clack
<Colleen> contrapunctus: Got it. I'll let Josh_2 know as soon as possible.
tyson2 has quit [Remote host closed the connection]
rain3 has quit [Ping timeout: 265 seconds]
<phantomics> Guest7426: are you asking for a function that would give #(1 3 6) in return for #(0 1 0 1 0 0 1)?
nature has quit [Read error: Connection reset by peer]
<Guest7426> sure, doesn't need to return an array though.
<Guest7426> though for this use case I think I should probably just write something that short circuits as soon as it finds more than one element, since for this case I only need to know when there's 1 or less elements.
<Guest7426> and then probably just use position.
<Guest7426> though I'm not even sure if any implementation has given any love to performance for bit arrays.
<phantomics> You can do this with the April library: (april-c "{⎕IO←0 ⋄ ⍸⍵}" #(0 1 0 1 0 0 1)) → #(1 3 6)
<Guest7426> like i said, that's all gobbledygook to me with characters I can't type.
<phantomics> Oh, you're the guy from yesterday, well that code snippet you can just paste in, it returns the indices of elements equal to 1
<shka> Guest7426: sbcl bit arrays are pretty good
<shka> BUT you should declare types
theothornhill has joined #commonlisp
<Guest7426> shka: that's the plan once this basic refactoring is done. Be interesting to see what the difference will be.
<shka> you can check assembly code to make sure it does what you want
<Guest7426> phantomics: I'm not going to add another dependency for something that just requires looping over an array and collecting indices.
<Bike> https://github.com/sbcl/sbcl/blob/master/src/compiler/generic/vm-tran.lisp#L515-L532 sbcl transforms count on simple-bit-vector appropriately
<phantomics> Then you could just do (let ((indices)) (loop :for i :across #(0 1 0 1 0 0 1) :for ix :from 0 :when (= 1 i) :do (push ix indices)) (reverse indices))
<Guest7426> sigh
<Guest7426> bike: that's interesting. Should be better than integers since I'll be going past most-positive-fixnum
<Bike> phantomics: i think guest just wants a count, not the positions. i'm sure that's even shorter in apl, of course
<phantomics> He said that (reduce #'+ ...) wouldn't work,he wanted to know which were set
gaqwas has quit [Remote host closed the connection]
gaqwas has joined #commonlisp
<jackdaniel> shka: that depends on the speed of your implementation/ machine :-)
<Bike> oh. hm. well, which do you want, guest? a list of positions is going to more expensive since it involves consing.
<shka> jackdaniel: oh, this is a fast computer i would say
<shka> rather beefy CPU
<Guest7426> if there was a built in function I'd use it and remember for next time. For this use case I just need to know if there is 1 or less.
<phantomics> So if just one is set, you want to know its position, otherwise return nil?
<shka> well, there is FIND
<shka> or POSITION
<shka> which both would do the trick in this case
aartaka has quit [Ping timeout: 256 seconds]
<Guest7426> which will both work if there is more than one bit set.
<phantomics> (let ((indices)) (loop :for i :across #(0 0 0 1 ) :for ix :from 0 :while (> 2 (length indices)) :when (= 1 i) :do (push ix indices)) (if (not (second indices)) indices))
<phantomics> This will return the position of the only 1 value or nil if there are more than 1
<Guest7426> i do not need you to write code for me.
<jackdaniel> shka: then the overhead of these few instructions may be very close to
<jackdaniel> 0
<shka> well, that's great
<phantomics> Not sure what you're asking for then, there's no inbuilt function I know of to get the first 1 index iff there's only one of them
<shka> well, there is position which will sort of do that, but without checking if there is one or more
<shka> Guest7426 said he wants to shortcircut some logic, and i think that simply calling POSITION or FIND is exactly what he wants in this case
<Bike> those should both be computable efficiently on the machine. the position through count leading zeroes and the count through logcount. i would just do count and then position.
<White_Flame> phantomics: since you're inside loop, juse do WHEN blah COLLECT IX, instead of push
cjb has joined #commonlisp
<White_Flame> (esp for the first example)
<phantomics> Right, the second is kind of hackneyed with that approach, have to assign the result anyway to apply the rest of the logic
aartaka has joined #commonlisp
frgo has quit []
pve has quit [Quit: leaving]
<phantomics> A question: my project has some tests that depend on float handling that happens differently in different CL implementations. In ABCL and Lispworks I might get 1.999999 from something that gives 2.0 in SBCL and CCL
lotuseater has quit [Read error: Connection reset by peer]
<phantomics> Does it make sense to mark a few tests that will run only in SBCL and other CLs whose floats work the same?
<phantomics> Otherwise I don't know if it'll be possible to get full test coverage in every impl, unless I try rebuilding the float operation primitives and that's a whole other can of worms
attila_lendvai has quit [Ping timeout: 260 seconds]
<shka> phantomics: it makes more sense to use epsilon IMHO
<shka> but i am not sure about this one
<shka> thing is, it is possible to swich reader to read in double-floats by default
<phantomics> Like check if it's within the range of X+/- epsilon?
<shka> yup, that's my gut feeling
<phantomics> Most of the differences are greater than the epsilon, unfortunately
<shka> but I am not 100% sure if this is the right choice
<shka> ok, then
<phantomics> All my tests are done in double floats already
<shka> wanted to ask about that
<Bike> you get different results? really? i can only think they just read/print floats differently
<shka> yeah, actually good point
<shka> i would expect double-floats to be the same
<shka> good night all
<phantomics> Night shka
<Bike> i mean there's very little chance they're not using ieee float64 for doubles
<Bike> binary64, rather
<Bike> but converting to and from decimal can gget weird
<phantomics> For instance: #(0.9999999999999998D0 -1.4999999999999998D0) is expected to be #(1.0 -1.5)
<phantomics> In SBCL, (expt 8.0d0 1/3) gives 2.0d0
<phantomics> In LW, it gives 1.9999999999999998D0
aartaka has quit [Ping timeout: 260 seconds]
<phantomics> In these cases, it is within the epsilon, but there was another case of a function inverter that went into an endless loop even with a comparison tolerance much higher than the epsilon
lotuseater has joined #commonlisp
aartaka has joined #commonlisp
theothornhill has quit [Ping timeout: 245 seconds]
<Bike> what about the actual bits? like, if you do integer-decode-float on the result in both implementations, do you get different results?
<phantomics> Let's see
<Bike> or use one of the libraries that gets the bits more directly, of course
<phantomics> Yes, different
shka has quit [Ping timeout: 265 seconds]
<phantomics> In SBCL: 4503599627370496 -51 1
<phantomics> In LW: 9007199254740991 -52 1
<Bike> Huh!
<Bike> i guess for expt they could be using different algorithms. I wanna say sbcl uses libc cbrt, but don't quote me on that
<phantomics> Just checked ECL, CCL and ABCL, they're the same as SBCL
aartaka has quit [Ping timeout: 260 seconds]
<Bike> oh, or i suppose if the 8.0d0 was read in differently... that seems unlikely, though, it's not a weird fraction
<semz> no chance, 8 is exactly representable as a float
<semz> 1/3 isn't though, that might be it
<phantomics> (integer-decode-float (expt 8.0d0 0.333333333333333d0)) is the same in all
* Alfr throws ternary floats at semz.
* semz takes the crucifix in hand
<phantomics> Coercing things to floats doesn't work, (integer-decode-float (expt 8.0d0 (coerce 1/3 'double-float))) has the same discrepancy between LW and others
thomaslewis has joined #commonlisp
ec has joined #commonlisp
theothornhill has joined #commonlisp
<phantomics> So if I use rationals for accuracy, I end up losing accuracy in this particular case
<Alfr> semz, no need for that. I haven't run across an implementation utilizing those--yet.
ec has quit [Client Quit]
X-Scale` has joined #commonlisp
X-Scale has quit [Ping timeout: 256 seconds]
theothornhill has quit [Remote host closed the connection]
theothornhill has joined #commonlisp
X-Scale` is now known as X-Scale
<Guest7426> I wonder why logical operators for integers dont have a - like bit and boole.
random-nick has quit [Read error: Connection reset by peer]
greaser|q is now known as GreaseMonkey
<Bike> "a -"?
<Guest7426> logand bit-and
<borodust> Xach: i'll take a look tmr
<lotuseater> hm maybe as "log" is the abbreviation for "logical" and not the whole word
<_death> Guest7426: as is often the case with names, historical.. log* are much older
<Guest7426> I wonder the reason. I guess because of high level stuff if they're older.
<_death> logand for example exists in LISP 1.5 (1958)
<_death> it also had logxor and logor (later changed to logior)
cosimone has quit [Quit: ERC (IRC client for Emacs 27.1)]
<lotuseater> and who likes it another way can go ahead and rename it :)
dre has joined #commonlisp
dre has quit [Remote host closed the connection]
Oladon has joined #commonlisp
dre has joined #commonlisp
<Guest7426> how?
ec has joined #commonlisp
<_death> you can develop your own language, and to make things confusing, use say "bit-and" instead of "logand"
<hayley> bit-conjunction
<lotuseater> Guest7426: (setf (fdefinition 'log-and) #'logand)
<Guest7426> that just sets the fdefintion
theothornhill has quit [Ping timeout: 260 seconds]
akoana has joined #commonlisp
lottaquestions has quit [Quit: Konversation terminated!]
<lotuseater> and?
blihp has joined #commonlisp
<Guest7426> try and use that with apply
<lotuseater> i did
makomo has quit [Quit: WeeChat 3.2]
_73 has joined #commonlisp
<_73> is a function tail recursive if the final expression is an if statement where both brances make a recursive call? For example is the local function `f` in this code tail recursive? http://dpaste.com/69QTXA49F
<Alfr> _73, yes. But you're in #CL, so the implementation of your choice may or may not overflow the stack running your code.
<Guest7426> ugh these nested arefs are driving me crazy. I'm trying to push to a list inside a vector of lists inside a vector and it pushes to all the lists.
<_73> Alfr: What about SBCL?
<Alfr> _73, in at least one implementation it may also depend on whether the defun is compiled and the optimization qualities chosen. ;)
asarch has joined #commonlisp
<Guest7426> should (push item (aref (aref outer-array inner-array-index) list-index)) work? or am i doing something stupid?
<_73> Alfr: Ill read this thanks
<_death> Guest7426: you probably initialized the elements of the outer array with the same inner array object
<Guest7426> thanks, that's gotta be it.
<Guest7426> for some reason i thought it would create a new array for each. guess I'll use initial-contents.
_73` has joined #commonlisp
<Guest7426> It's always something stupid.
<_death> (map-into (make-array 3) (lambda () (make-array 3 :initial-element nil)))
_73` has left #commonlisp [#commonlisp]
_73 has quit [Ping timeout: 264 seconds]
<lotuseater> Guest7426: and if you need such patterns more often use symbol-macros
<pjb> Guest7426: (let ((a (make-array '(3 3)))) (aref a 1 2) #|no more nested aref!|#) #| --> 0 |#
<Guest7426> lotuseater: obviously the same problem occurs with symbol macros when you do something stupid like i did.
<Guest7426> pjb: that takes more time when I'm iterating over each indice of the inner array.
<lotuseater> okay i think it's a process of trying :)
tyson2 has joined #commonlisp
<_death> Guest7426: maybe it depends on how you're iterating.. I think e.g. sbcl uses an underlying vector so that all the elements (which may be pointers or immediate objects) are contiguous memory, while an array of arrays is unlikely to be so local
<lotuseater> sometimes i like arr[p] for (aref arr p) especially when SETFing so you can do (setq arr[p] foo)
<_death> clhs row-major-aref
yewscion has quit [Ping timeout: 264 seconds]
lottaquestions has joined #commonlisp
<Guest7426> _death: but multdimensional array access is slower than simple aref.... i haven't tested row-major-aref.
asarch has quit [Quit: Leaving]
anddam has quit [Quit: WeeChat 3.3]
<Guest7426> but i'll be testing a whole bunch of stuff once the simple refactor implementation is done.
gaqwas has quit [Ping timeout: 264 seconds]
rgherdt has quit [Ping timeout: 265 seconds]
blihp has quit [Quit: Leaving]
anddam has joined #commonlisp
dre has quit [Quit: Leaving]
dre has joined #commonlisp
Guest7426 has quit [Quit: Connection closed]
rgherdt has joined #commonlisp
lotuseater has quit [Quit: ERC (IRC client for Emacs 27.2)]
s-liao has joined #commonlisp