jackdaniel 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/>
epony has joined #commonlisp
prxq has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
tedwing has joined #commonlisp
<NotThatRPG> CL arrays don't have any slicing operator, do they?
<phoe> what exactly do you mean by slicing?
<nytpu> clhs subseq
<ixelp> CLHS: Accessor SUBSEQ
dlowe has quit [Ping timeout: 260 seconds]
jeosol has quit [Quit: Client closed]
random-nick has quit [Ping timeout: 252 seconds]
<NotThatRPG> phoe: taking, e.g., column or row from a 2D array.
<NotThatRPG> Looks like there's the `select` library for this purpose.
<NotThatRPG> Goodnight everyone!
NotThatRPG is now known as NotThatRPG_away
dlowe has joined #commonlisp
uics has quit [Remote host closed the connection]
pfd has quit [Quit: Client closed]
<aeth> I usually use multiple values for that sort of thing if you don't actually want a subsequence, especially for 2D
<aeth> does require using a library or writing your own small macros, though
Fare has quit [Ping timeout: 252 seconds]
dlowe has quit [Ping timeout: 252 seconds]
<char[m]> Hey Bike , is there an asdf system that loads the list-of ctype extension?
dlowe has joined #commonlisp
Oladon has joined #commonlisp
istewart has joined #commonlisp
azimut has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 260 seconds]
Lord_of_Life has joined #commonlisp
dlowe has quit [Ping timeout: 252 seconds]
morganw has quit [Remote host closed the connection]
hashfunc has joined #commonlisp
Krystof has quit [Ping timeout: 248 seconds]
avocadoist has quit [Quit: Konversation terminated!]
istewart has quit [Read error: Connection reset by peer]
avocadoist has joined #commonlisp
istewart has joined #commonlisp
dlowe has joined #commonlisp
tedwing has quit [Ping timeout: 260 seconds]
bilegeek has quit [Remote host closed the connection]
bilegeek has joined #commonlisp
bilegeek_ has joined #commonlisp
<jcowan> Slices share, however; subsequences do not.
bilegeek has quit [Ping timeout: 260 seconds]
dlowe has quit [Ping timeout: 255 seconds]
dlowe has joined #commonlisp
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #commonlisp
marsia has quit [Ping timeout: 252 seconds]
Noisytoot has quit [Quit: ZNC 1.8.2 - https://znc.in]
Noisytoot has joined #commonlisp
dlowe has quit [Ping timeout: 252 seconds]
Fare has joined #commonlisp
dlowe has joined #commonlisp
<aeth> jcowan: you can share on a per-variable/values level with symbol-macrolet
<aeth> since it will just expand to (aref ...) on the original
<jcowan> aeth: But it's not reified then
<Bike> char[m]: fraid not. everything's just in that one file
<char[m]> Maybe I could add it. Would you opposed to other extensions in a similar vein for hash-table and vector and so on? They could all share a system.
tyson2 has quit [Remote host closed the connection]
<aeth> jcowan: yes, good point
<Bike> char[m]: i would not be opposed.
<Bike> char[m]: i have not had much ability to use ctype for what i originally wanted it for (though i'm inching closer to that). if people want to use it to experiment with typing i'm all for that.
<char[m]> Awesome. I'll work on it at some point probably.
<char[m]> Isn't it used in implementations?
<beach> In SICL, yes.
<Bike> originally i wanted to use it for clasp, but i can't right now for boring reasons. so it's pretty much been staying where it is, i.e. a basically correct but not especially performant or extensible type system
<Bike> (still kind of extensible, but not as much as i'd like)
<char[m]> Seems pretty extensible to me. I have a somewhat working extension (that probably shouldn't be upstreamed). How would you it to be more extensible?
hineios5 has joined #commonlisp
<char[m]> It is sad you can't use it in clasp. Do you mean it is not performant because it makes heavy use of CLOS?
hineios has quit [Ping timeout: 268 seconds]
hineios5 is now known as hineios
<Bike> it's not performant because it doesn't cache anything (or at least i imagine that's the main problem)
<char[m]> What would you cache? ctype:specifier-ctype?
<Bike> mostly, but also the basic relations like subtypep or conjoin could be
<beach> char[m]: What are you using it for?
<Bike> as for extensibility, the API for introspecting on types needs some thought (or really any thought - the one that's there is basically just the slot accessors)
<Bike> for example it's kind of not easy to ask questions like "what is the upgraded array element type of this arbitrary (e.g. disjunction) type"
<Bike> plus the parser
<Bike> and i should probably have it use the client dispatch pattern rather than having a bunch of special files
<char[m]> beach: It is currently a bit of a secret until I get something really promising 🤐
<beach> Oh, hmm!
dlowe has quit [Ping timeout: 248 seconds]
zacque has joined #commonlisp
dlowe has joined #commonlisp
Oladon has quit [Quit: Leaving.]
Fare has quit [Ping timeout: 255 seconds]
hashfunc has quit [Ping timeout: 252 seconds]
hashfunc has joined #commonlisp
zacque has quit [Remote host closed the connection]
hashfunc has quit [Ping timeout: 252 seconds]
hashfunc has joined #commonlisp
dlowe has quit [Ping timeout: 260 seconds]
dlowe has joined #commonlisp
bilegeek_ has quit [Quit: Leaving]
tedwing has joined #commonlisp
hashfunc has quit [Remote host closed the connection]
tedwing has quit [Ping timeout: 252 seconds]
tedwing has joined #commonlisp
tedwing has quit [Ping timeout: 268 seconds]
istewart has quit [Quit: Konversation terminated!]
aartaka has joined #commonlisp
attila_lendvai has joined #commonlisp
Lycurgus has joined #commonlisp
zacque has joined #commonlisp
<zacque> Hi, question: Why does `(apply (car '((lambda (x) (= x 2)))) (list 2))` give type error? I'd expect it to return T
<beach> Because (car '((lambda (x) ...))) is not a function. So it can't be applied.
<zacque> How can I apply it as a function such that it returns T?
<beach> You would have to convert the lambda expression to a function, so you would have to use EVAL or COMPILE.
<beach> But if you need to do that, you are probably attempting something very wrong.
<beach> Where did this list ((lambda (x) (= x 2))) come from?
<zacque> Hmmm, right now, the lambda predicate is supplied by my own, I'm storing these predicates inside a list
<zacque> What I have in mind is to apply them one by one against a data until one that returns T
<beach> You are not storing predicates. You are storing lists.
<beach> If you construct the list to contain functions in the first place, you should be fine.
<beach> Like (list (lambda (x) (= x 2))) instead of '((lambda (x) (= x 2)))
<zacque> Ah, I see, no wonder I didn't get it to work
<zacque> Makes sense to me, thanks!
<beach> Pleasure.
dlowe has quit [Ping timeout: 260 seconds]
Lycurgus has quit [Quit: Exeunt: personae.ai-integration.biz]
dlowe has joined #commonlisp
azimut_ has joined #commonlisp
azimut has quit [Remote host closed the connection]
<beach> zacque: You can observe a similar difference between '((+ 1 2)) and (list (+ 1 2)).
<hayley> Has anyone got any favourite benchmarks? I'm aware of cl-bench, but am looking for more garbage collector-intensive programs, and perhaps parallel programs too.
aartaka has quit [Ping timeout: 248 seconds]
n0den1te has joined #commonlisp
pve has joined #commonlisp
<hayley> Hm, could be interesting to test a web server, but there's usually very little that survives between collections. My Regrind fuzz tester already has that kind of allocation behaviour.
<hayley> Although servers are typically somewhat sensitive to latency.
occ has quit [Ping timeout: 268 seconds]
<zacque> beach: Thanks!
<beach> Sure.
aartaka has joined #commonlisp
* hayley needs to ask for a license for one of the benchmarks she used. Whoops. Can't un-remember how that code works now.
uics has joined #commonlisp
ttree has quit [Ping timeout: 260 seconds]
<uics> O.o
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
dlowe has quit [Ping timeout: 260 seconds]
occ has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 264 seconds]
dlowe has joined #commonlisp
aartaka has joined #commonlisp
waleee has joined #commonlisp
<splittist> There are problems that can only be solved by staring out a train window or walking in the woods. There are problems that can only be solved at the keyboard and letting your fingers do the thinking. I wish I knew ahead of time which is which.
occ has quit [Ping timeout: 246 seconds]
attila_lendvai has quit [Ping timeout: 246 seconds]
occ has joined #commonlisp
Gleefre has joined #commonlisp
<jcowan> hayley: rather than a web-ized file server, a stateful app server might be the thing fwiw
<hayley> Sure, but what application? Shouldn't be too hard to interact with, since I need to automate that, but it should do interesting work.
_cymew_ has joined #commonlisp
<jcowan> well, an interpreter perhaps
random-nick has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
karlosz has joined #commonlisp
uics has quit [Remote host closed the connection]
uics has joined #commonlisp
<Shinmera> hayley: Kandria :)
<hayley> I've recorded pause times for Kandria and made some pretty graphs, but not sure how to automate it.
<Shinmera> how do you want to automate it?
<Shinmera> opening and closing it programmatically is easy enough.
<hayley> The ideal would be to run through some kind of recording of inputs, so that it does roughly the same work in each test, and have it print out "#.MOST-POSITIVE-FIXNUM ticks in 0.0001 seconds". Except maybe not the last part.
<Shinmera> hayley: you can use replays http://shirakumo.github.io/trial/capture.html
<hayley> Excellent. Is Kandria deterministic otherwise; could things get out of sync?
<Shinmera> physics steps are locked at 100 per second.
<Shinmera> it should be deterministic
<Shinmera> as far as gameplay is concerned
<Shinmera> well, assuming you always load the same save state, of course.
<hayley> Then it should be fine. Next question, for myself to figure out, is how to meaningfully combine measurements of pauses. Gil Tene says thou shall not take averages of percentiles.
<hayley> There was a joke about someone suggesting to add Minecraft to the DaCapo benchmarks (for Java). That someone denied having said it, but appears we can have video games in benchmark suites for CL.
aartaka has quit [Ping timeout: 260 seconds]
<Shinmera> well, Kandria only runs on SBCL, so
<hayley> Minecraft refused to run under Azul's JVM. And there was a bug report for OpenJ9 about poor performance there. Close enough!
aartaka has joined #commonlisp
<pjb> splittist: bring a laptop in your train voyage.
<hayley> https://github.com/eclipse-openj9/openj9/issues?q=minecraft but I'm getting off topic. Thanks, I'll have a see about making a Kandria demo to benchmark.
<ixelp> Issues · eclipse-openj9/openj9 · GitHub
<pjb> splittist: alternatively: https://www.youtube.com/watch?v=Fwpf750QNDM
<ixelp> 1 Hour in the train from Munich to Regensburg 4K - Train window view - Travel Cubed - YouTube
santiagopim has joined #commonlisp
aartaka has quit [Ping timeout: 248 seconds]
aartaka has joined #commonlisp
Krystof has joined #commonlisp
tedwing has joined #commonlisp
jmdaemon has quit [Ping timeout: 255 seconds]
quoosp has joined #commonlisp
Nilby has quit [Ping timeout: 252 seconds]
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
<zacque> I'm using let-over-lambda for a "static" variable for a function. Is it okay to return variable as in `(let (prop) (defun foo () prop))`? Will the client be able to modify `prop` value outside my designated closure function(s) as in Java/C?
pfd has joined #commonlisp
<hayley> I don't see how that could happen in Java or C. But the client cannot modify the value of PROP, no.
<hayley> All return values, not any kind of reference to the variable named PROP itself.
<zacque> What I've in mind is pass-by-reference semantics in those language
<hayley> Those languages do not use pass by reference (with the exception of taking a reference using prefix & in C).
<hayley> Would I write e.g. "static int prop; int foo() { return prop; }" in C, calling foo will return the value of prop at that time.
<zacque> I see, but in this case, PROP is a list...
<ixelp> Pascal Bourguignon's Usenet posts of interest
<pjb> places are not first class objects, but you can wrap them in closures that are first class objects.
<hayley> In that case, the value is a reference, but the function returns a value. Yes, a caller could modify the list.
<pjb> that said, conceptually, it might be better to think in terms of high order functions in general, rather than in terms of references to variables. You may do more than set a variable in a function parameter.
<hayley> http://metamodular.com/common-lisp-semantics.html may explain the situation; I am heading off to bed.
<ixelp> Common Lisp Semantics
<hayley> Hmm, no, wrong page. There was another specifically on uniform reference semantics.
<beach> zacque: You are confusing two things. Call by reference means that the function call does not evaluate the argument, and instead requires an l-value so that a reference to the storage where the object resides is passed instead.
<beach> zacque: Call by value means that the function call evaluates the argument before passing it to the function. It just so happens that the values in Common Lisp are (usually) references to memory. But that does not make it call by reference.
<ixelp> Uniform reference semantics
<beach> zacque: And, yes, the link(s) that hayley gave you.
uics has quit [Remote host closed the connection]
<zacque> Okay, I'm going through the links first
morganw has joined #commonlisp
<zacque> Okay, to sort out my mind, in the case of `(let (prop) (defun foo () prop))` where PROP is a list, I want to prevent my clients from modifying PROP, so I should instead return `(copy-list prop)`. This is because the value return by FOO is a reference to the actual value of PROP
<beach> zacque: It is not clear what you mean by "modifying PROP". It could either mean to change the value of the variable or to modify the object that is the value of that variable. I guess you mean the latter.
<phoe> zacque: in Lisp this is usually done via documentation rather than via copying
<phoe> tell the users that the list is immutable and if they mutate it then they are in UB zone
<hayley> The value is a reference to a list, which doesn't have anything to do with the variable named PROP anymore.
<zacque> beach: Ah, yes, the latter
<phoe> Lisp is full of things like that
<beach> zacque: I agree with phoe. If you can't trust your clients, you should find new ones.
<phoe> the first one I can think of is LAMBDA-LIST-KEYWORDS
<phoe> mutating any cons cell of that list is going to invoke nasal demons
<zacque> phoe: I see, thanks for your info
<beach> zacque: It is very common to see in documentation a phrase like "It is not specified whether a fresh list is returned. Do not modify the list being returned"
<phoe> another is SYMBOL-NAME of any symbol; mutating the strings returned by SYMBOL-NAME can transport you to Narnia
<hayley> Would I have "static int *prop; int *foo() { return prop; }" the return value is not related to the variable prop; modifying the value of prop will not affect values returned by foo before.
<hayley> "The value of prop" and "the CAR and CDR of the value of prop" are very different things still. I had a diagram for this, even.
<phoe> Lisp isn't C++ or Java where you absolutely have to divide your stuff into public and protected and private and have friends and nonfriends; it's sort of a trustful language that places the blame of abusing said trust on the user rather than the programmer
<phoe> s/blame/consequences/ even
<hayley> Hold my beer
<phoe> "The consequences are undefined if an instance of class PHOE is made to hold any beer."
<phoe> there look you're on your own now
<hayley> I don't have any beer, I don't drink. Stupid saying.
<zacque> Ah, I see, thanks!
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
<beach> zacque: Were the links useful to you?
<beach> zacque: Also, I recommend you join #clschool. This channel is not really meant for newbie questions, although they are tolerated to some extent.
<phoe> yeah, mostly when it's otherwise silent :D
<zacque> beach: Yes, the one given by hayley
<beach> zacque: Right.
<zacque> Ah, I'll ask in #clschool, thanks for pointing me to it
<beach> Sure.
tyson2 has joined #commonlisp
varjag has joined #commonlisp
uics has joined #commonlisp
varjag has quit [Read error: Connection reset by peer]
varjag has joined #commonlisp
cage has joined #commonlisp
n0den1te has quit [Quit: leaving]
aartaka has quit [Ping timeout: 260 seconds]
ldb has joined #commonlisp
zacque has quit [Remote host closed the connection]
aartaka has joined #commonlisp
dlowe has quit [Ping timeout: 252 seconds]
aartaka has quit [Ping timeout: 268 seconds]
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
aartaka has joined #commonlisp
ldb has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
aartaka has quit [Ping timeout: 268 seconds]
dlowe has joined #commonlisp
aartaka has joined #commonlisp
uics has quit [Remote host closed the connection]
Oladon has joined #commonlisp
quoosp has quit [Ping timeout: 246 seconds]
<Josh_2> Anyone have a problem with initializing seed with cl-isaac?
<Josh_2> I have a fresh ubuntu vps and it doesn't work...
<ixelp> INIT-SELF-SEED: invalid index · Issue #8 · thephoeron/cl-isaac · GitHub
<Josh_2> Not the same as that
<Josh_2> https://plaster.tymoon.eu/view/3648#3648 I am pretty sure I have had this issue before
<phoe> maybe a solution would be to replace (the ub64 ...) blocks with (ldb (byte 64 0) ...) to ensure trimming
<phoe> since I assume this is what is the desired behavior
<phoe> but yeah, it seems that the compiler promises are not being met
<phoe> so, bugs in cl-isaac
<Josh_2> Hmmmmmm I am using the binary version of sbcl 2.2.9, Is that compiled with --fancy :thinking:
<Josh_2> I am pretty certain I've had this problem with cl-isaac before
tevo has quit [Read error: Connection reset by peer]
tevo has joined #commonlisp
<Josh_2> I tried to compile sbcl from source but it crashed claiming I was missing zstd.h
<Josh_2> I have zstd installed on this vps so idk
robin_ is now known as robin
<phoe> zstd-dev?
tedwing has quit [Quit: leaving]
rogersm has joined #commonlisp
<Josh_2> libzstd-dev :sob:
<Josh_2> I got it now
avocadoist has quit [Quit: Konversation terminated!]
avocadoist has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
Fare has joined #commonlisp
<Josh_2> Okay I tried with compiled with --fancy and I still get the same cl-isaac error
<Josh_2> ah well bug report time
aartaka has quit [Ping timeout: 268 seconds]
aartaka has joined #commonlisp
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
_cymew_ has quit [Ping timeout: 248 seconds]
sjl has quit [Quit: WeeChat 3.6]
marsia has joined #commonlisp
rogersm has quit [Quit: Leaving...]
<NotThatRPG_away> Today's question: Doesn't it seem that ITERATE should have AVERAGING?
NotThatRPG_away is now known as NotThatRPG
<pjb> NotThatRPG: the point of iterate is to be extensible, so has it or has it not it doesn't matter, you can add it if it doesn't have it already.
<_death> isn't it already possible using its extension facilities? if you make it a "built-in" feature, it means new code that uses it is no longer compatible with old iterate versions
<NotThatRPG> _death: Yes, you are right. One could even have a small add-on library for such extensions (e.g., mean, medium, mode)
<NotThatRPG> In my copious free time! :-)
NotThatRPG is now known as NotThatRPG_away
_cymew_ has joined #commonlisp
uics has joined #commonlisp
<uics> Ehh life
avocadoist has quit [Quit: Konversation terminated!]
avocadoist has joined #commonlisp
waleee has quit [Ping timeout: 248 seconds]
<an_origamian[m]> <uics> "Ehh life" <- Let Hercules himself do what he may,
<an_origamian[m]> The cat will mew and dog will have his day.
aartaka has quit [Ping timeout: 268 seconds]
aartaka has joined #commonlisp
random-jellyfish has joined #commonlisp
tyson2 has joined #commonlisp
avocadoist has quit [Quit: Konversation terminated!]
avocadoist has joined #commonlisp
eddof13 has joined #commonlisp
uics has quit [Remote host closed the connection]
avocadoist has quit [Quit: Konversation terminated!]
avocadoist has joined #commonlisp
avocadoist has quit [Client Quit]
avocadoist has joined #commonlisp
avocadoist has quit [Client Quit]
avocadoist has joined #commonlisp
azimut_ has quit [Ping timeout: 255 seconds]
uics has joined #commonlisp
jmdaemon has joined #commonlisp
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
peterhil has quit [Ping timeout: 248 seconds]
attila_lendvai has joined #commonlisp
peterhil has joined #commonlisp
peterhil has quit [Max SendQ exceeded]
peterhil has joined #commonlisp
peterhil has quit [Max SendQ exceeded]
peterhil has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 28.2]
eddof13 has joined #commonlisp
aartaka has quit [Ping timeout: 252 seconds]
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
attila_lendvai_ has joined #commonlisp
attila_lendvai has quit [Ping timeout: 248 seconds]
Oladon has quit [Quit: Leaving.]
pve has quit [Quit: leaving]
zxcvz has joined #commonlisp
zxcvz has quit [Client Quit]
_cymew_ has quit [Ping timeout: 248 seconds]
dlowe has quit [Ping timeout: 252 seconds]
varjag has quit [Ping timeout: 255 seconds]
dlowe has joined #commonlisp
Fare has quit [Ping timeout: 252 seconds]
Oladon has joined #commonlisp
Fare has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
mfiano has quit [Quit: WeeChat 3.7.1]
Gleefre has quit [Remote host closed the connection]
uics has quit [Remote host closed the connection]
szkl has joined #commonlisp
mfiano has joined #commonlisp
mfiano has quit [Client Quit]
uics has joined #commonlisp
mfiano has joined #commonlisp
ttree has joined #commonlisp
mfiano has quit [Client Quit]
random-jellyfish has quit [Quit: Client closed]
mfiano has joined #commonlisp
quoosp has joined #commonlisp
uics has left #commonlisp [#commonlisp]
morganw has quit [Remote host closed the connection]