lotuseater has quit [Quit: ERC (IRC client for Emacs 27.2)]
zacts has joined #commonlisp
edgar-rft has joined #commonlisp
atgreen has joined #commonlisp
Bike has quit [Quit: Lost terminal]
green__ has joined #commonlisp
atgreen has quit [Ping timeout: 255 seconds]
atgreen has joined #commonlisp
green__ has quit [Ping timeout: 265 seconds]
green__ has joined #commonlisp
lisp123 has joined #commonlisp
atgreen has quit [Ping timeout: 265 seconds]
atgreen has joined #commonlisp
green__ has quit [Ping timeout: 268 seconds]
lisp123 has quit [Ping timeout: 265 seconds]
zacts has quit [Ping timeout: 246 seconds]
green__ has joined #commonlisp
atgreen has quit [Ping timeout: 268 seconds]
atgreen has joined #commonlisp
green__ has quit [Ping timeout: 255 seconds]
green__ has joined #commonlisp
<jcowan>
"Rubout handling" has to do with unparsing in reverse as you remove characters from the input stream, as older Lisp systems did
atgreen has quit [Ping timeout: 268 seconds]
green__ has quit [Ping timeout: 258 seconds]
<moon-child>
oh my
tyson2 has quit [Remote host closed the connection]
dsk has joined #commonlisp
zacts has joined #commonlisp
asarch has joined #commonlisp
zacts has quit [Ping timeout: 246 seconds]
waleee has quit [Ping timeout: 246 seconds]
zacts has joined #commonlisp
prxq has joined #commonlisp
prxq_ has quit [Ping timeout: 265 seconds]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 268 seconds]
<beach>
Good morning everyone!
kakuhen has quit [Quit: Leaving...]
torbo has quit [Remote host closed the connection]
raeda has joined #commonlisp
Bike has joined #commonlisp
kakuhen has joined #commonlisp
zacts has quit [Ping timeout: 246 seconds]
amk has quit [Ping timeout: 240 seconds]
amk has joined #commonlisp
luna-is-here has quit [Ping timeout: 268 seconds]
taiju has quit [Ping timeout: 255 seconds]
dsk has quit [Ping timeout: 255 seconds]
taiju has joined #commonlisp
peterhil has joined #commonlisp
peterhil_ has quit [Read error: Connection reset by peer]
caz has quit [Killed (copper.libera.chat (Nickname regained by services))]
Guest356 has joined #commonlisp
cjb has quit [Quit: rcirc on GNU Emacs 28.0.50]
<asarch>
How could you create the kernel on a system without any Lisp at all?
pjb has joined #commonlisp
<beach>
"kernel"?
<beach>
asarch: I think you need to be more precise about the context.
cjb has joined #commonlisp
zacts has joined #commonlisp
<beach>
asarch: Are you still there?
<asarch>
Yes, I am
<beach>
Can you give some more context please?
<asarch>
Ok. You get a new job and in the company's server there is no any Lisp (CLisp, SBCL, etc) at all. How would you compile the source code of SBCL in that situation?
<beach>
You install a binary first.
<asarch>
Is there a way to do a cross-compile for the kernel? (Maybe you at your home with your PC...)?
<beach>
What is this "kernel" that you talk about?
Inline has quit [Quit: Leaving]
<beach>
And why would you cross compile rather than install a binary?
<asarch>
Kernel, the image you load when you do sbcl at prompt?
<beach>
Strange use of the word, but OK.
<beach>
The simplest thing is to install a binary.
<moon-child>
beach: cross compiling and installing a binary don't seem mutually exclusive to me. Any binary you install will have been compiled at some point; maybe by a cross compiler, maybe by a native one
<pjb>
The second simpliest thing, is to compile clisp, then compile sbcl with clisp.
lisp123 has joined #commonlisp
Bike has quit [Quit: Connection closed]
<moon-child>
pjb: sbcl can be bootstrapped; I seem to recall hearing (maybe from beach?) that lispworks and allegro cannot be meaningfully bootstrapped in such a fashion. Which does make it an interesting question (if not a practical one, since lw and acl are not open source)
lisp123 has quit [Ping timeout: 252 seconds]
<asarch>
I mean, the image not the kernel (From Common Lisp Recipes, 16. Developing and Debugging: The main idea of developing in C OMMON L ISP is that the whole system is one “image” that you continuously modify until it fits your needs.)
<moon-child>
yeah, from the els paper: 'Rhodes claims that Allegro, Lispworks, [...] are only possible to build using older versions of the same system, and only using image-based techniques'
<moon-child>
asarch: many lisp compilers have the ability to save the in-memory image to a standalone binary. This is what sb-ext:save-lisp-and-die does in sbcl, for instance
<asarch>
Is this image cross platform?
<moon-child>
no
<asarch>
I see
zacts has quit [Quit: zacts]
cjb has quit [Quit: rcirc on GNU Emacs 28.0.50]
<beach>
moon-child: The scenario asarch describes doesn't seem to involve generating an executable file for a new architecture. It sounds to me like asarch just needs a Common Lisp system on a machine that currently has none installed.
<beach>
If the scenario is that there are no binaries available for the particular architecture of that server, then the problem is greater, of course.
<beach>
asarch: An image contains instructions for a particular processor and a particular operating system (for system calls etc). That's why it is not cross platform.
<beach>
asarch: Am I describing your scenario correctly?
<beach>
asarch: Or, perhaps you are just interested in how the SBCL maintainers generate those binaries the first time?
<asarch>
I thought it was something a la Squeak images
<asarch>
I was reading that chapter of the book and I thought it was something like that
<asarch>
(I was planning to build an image from my Debian 10 Buster for AMD64 to use it with CL-REPL on my Android-based cellphone)
<asarch>
And then I wondered about how the image is built for the first time
<beach>
That's totally different from what you first described.
<beach>
asarch: An executable file is just a sequence of bytes, so you can create it on any operating system using any language.
<beach>
asarch: You just have to instruct the cross compiler about the architecture you are building for.
Guest356 has quit [Quit: Reconnecting]
Guest356 has joined #commonlisp
<asarch>
Then I thought "what about with WebAssembly?"
<moon-child>
webassembly is a particular architecture that can be targeted as easily as any other
<moon-child>
(though I don't know of any extant common lisp compilers targeting it; one would have to be written)
<asarch>
A full environment of SBCL compiled to run from a web browser
<moon-child>
as I recall, some sbcl developers attempted to influence the design of webassembly to make it more amenable to running lisp (something to do with multiple values, maybe?), but their input was not heeded
<moon-child>
(something similar happened with .net and apl about 20 years ago)
zacts has joined #commonlisp
<asarch>
The good news is that the new Linux distro, Windows 11, will support Android apps out of the box (they say) so you could use CL-REPL with no problem at all
<zacts>
is Windows 11 based on Linux?
<asarch>
Didn't know it?
<zacts>
nope
<asarch>
Well, not Linux at all, Android
<zacts>
interesting
<asarch>
Isn't, it?
robin has quit [Remote host closed the connection]
shka has joined #commonlisp
lisp123 has joined #commonlisp
zacts has quit [Quit: zacts]
gaqwas has joined #commonlisp
CrashTestDummy3 has joined #commonlisp
domovod has joined #commonlisp
CrashTestDummy2 has quit [Ping timeout: 252 seconds]
silasfox has quit [Ping timeout: 265 seconds]
amb007 has quit [Ping timeout: 255 seconds]
amb007 has joined #commonlisp
domovod has quit [Ping timeout: 256 seconds]
cmack has joined #commonlisp
svillemot has quit [Quit: WeeChat 3.0]
svillemot has joined #commonlisp
attila_lendvai has joined #commonlisp
<pjb>
asarch: Android as as much a linux system as GNU.
<pjb>
asarch: the CL language doesn't really impose image-based development. It's not even offering any guarantee to help supporting it. (eg. no source (sexp) tracking utility, function-lambda-expression and documentation can return NIL at any time, etc). Even writing the required tools would require to go metalinguistic (have a look at ibcl). But foremost, ecl. (ecl is not image based, its compiler produces elf object files).
<pjb>
(and other implementations, such as clicc, mocl, etc (lispworks for ios/android))…
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
derelict has quit [Ping timeout: 250 seconds]
lisp123 has quit [Ping timeout: 268 seconds]
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
gaqwas has quit [Ping timeout: 268 seconds]
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
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
theBlackDragon has quit [Ping timeout: 255 seconds]
theBlackDragon has joined #commonlisp
rt has joined #commonlisp
rt is now known as robin
CrashTestDummy2 has joined #commonlisp
kakuhen has quit [Ping timeout: 240 seconds]
CrashTestDummy3 has quit [Ping timeout: 252 seconds]
kakuhen has joined #commonlisp
Duuqnd has joined #commonlisp
lisp123 has joined #commonlisp
gioyik has quit [Quit: WeeChat 3.1]
domovod has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
peterhil has quit [Ping timeout: 265 seconds]
OlCe has joined #commonlisp
Tomte has joined #commonlisp
pve has joined #commonlisp
hendursa1 has joined #commonlisp
hendursaga has quit [Ping timeout: 244 seconds]
cmack has quit [Ping timeout: 255 seconds]
CrashTestDummy3 has joined #commonlisp
CrashTestDummy2 has quit [Ping timeout: 252 seconds]
Th30n has joined #commonlisp
asarch has quit [Quit: Leaving]
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 256 seconds]
gpiero has quit [Quit: Quitting...]
Lord_of_Life_ is now known as Lord_of_Life
selwyn has joined #commonlisp
silasfox has joined #commonlisp
gpiero has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
silasfox has quit [Ping timeout: 268 seconds]
lisp123 has quit [Ping timeout: 255 seconds]
lotuseater has joined #commonlisp
<lotuseater>
good morning everyone :)
<beach>
Hello lotuseater.
<lotuseater>
Hi beach nice that you're writing. :) Don't worry I have no silly questions atm. ^^
<beach>
Whew! :)
CrashTestDummy2 has joined #commonlisp
CrashTestDummy3 has quit [Ping timeout: 255 seconds]
<lotuseater>
I thought about constructing a LET-like macro named ILET for defining lexical immutable symbols by looking at the macro body if there are none of '(DECF INCF SETQ SETF) in the body paired with the symbol name. okay actually I did that some weeks ago
lisp123 has joined #commonlisp
<lotuseater>
Was about two years ago around 2 months I stumbled into the CL world that i wrote a macro HLET* where it wasn't needed that the dependent symbols are given in linear order. It looked for references of symbols and sorted this topologically and that worked. :)
<beach>
It is not enough to look at the body code for those operators.
<lotuseater>
ha yes of course, and looking on the endexpansion would be too late
peterhil has quit [Ping timeout: 265 seconds]
<moon-child>
I suppose you could make ILET refuse to bind anything dynamic
lisp123 has quit [Ping timeout: 252 seconds]
<moon-child>
lotuseater: and on the topic of macros, it's possible that a macro expansion could generate code like (when nil (setf x ...)), which _is_ ok, but which it's not possible in the general case to reject statically
<beach>
Catching situations like that requires solving the halting problem.
<moon-child>
yes
<beach>
So usually, you go with the conservative approximation.
<moon-child>
if you would like a high-quality conservative implementation of immutability, haskell is probably a better choice than cl
<moon-child>
(or perhaps coalton)
Jach has quit [Ping timeout: 246 seconds]
atgreen has joined #commonlisp
<moon-child>
imo, 'gradual typing' has largely proven itself to be a failure
<lotuseater>
oh damn, the Halting Problem o_O so wait to when quantum computers ship out in hobby editions
<lotuseater>
moon-child: try to guess where both macro ideas come from
<beach>
As I recall, quantum computing doesn't pretend any additional computational power over Turning machines.
<lotuseater>
yes static typing locks one out I learned, not even in prototyping, but could of course by powerful with a good mathematical based type system (so there is no void type)
<lotuseater>
beach: yes and no, in a sense, but as always I can be wrong. We'll see.
<moon-child>
yes; quantum computers are algorithmically faster than traditional computers at certain, but there's nothing they _can_ do that an ordinary turing machine can't
<beach>
Right.
<moon-child>
and the strong form of the church-turing hypothesis says that hypercomputation can't be realised
<lotuseater>
nice
<lotuseater>
even quantum mechanics must follow the rules of logic and mathematics (mostly)
Jach has joined #commonlisp
<kakuhen>
what's wrong with gradual typing
Duuqnd has quit [Read error: Connection reset by peer]
<kakuhen>
i come from a mathematics background so i'm not too acquainted with the wisdom in computer stuff
<lotuseater>
kakuhen: I think he meant not wrong in general, but sometimes a barrier :)
Duuqnd has joined #commonlisp
OlCe has quit [Remote host closed the connection]
<lotuseater>
I have a similar background or such intrinsic in other things
<moon-child>
kakuhen: I'm going to bed now, so not going to stick around and chat, but: it devolves into dynamic typing
<kakuhen>
that's a useful summary anyway, thanks!
<lotuseater>
sleep well moon-child, see you
<moon-child>
night
<lotuseater>
are there also some video conferences the next weeks? I saw videos from the Common Lisp study group, they do much topics of interests.
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
ahc has joined #commonlisp
ahc has quit [Quit: Client closed]
OlCe has joined #commonlisp
tyson2 has joined #commonlisp
kakuhen has quit [Quit: Leaving...]
peterhil has joined #commonlisp
silasfox has joined #commonlisp
derelict has joined #commonlisp
derelict has quit [Ping timeout: 240 seconds]
amb007 has quit [Ping timeout: 268 seconds]
amb007 has joined #commonlisp
silasfox has quit [Ping timeout: 265 seconds]
green__ has joined #commonlisp
atgreen has quit [Ping timeout: 268 seconds]
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
yitzi has joined #commonlisp
random-nick has joined #commonlisp
duuqnd_ has joined #commonlisp
Duuqnd has quit [Ping timeout: 240 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
duuqnd_ has quit [Ping timeout: 252 seconds]
green__ has quit [Ping timeout: 255 seconds]
Duuqnd has joined #commonlisp
lisp123 has joined #commonlisp
lotuseater has quit [Ping timeout: 240 seconds]
lisp123 has quit [Ping timeout: 246 seconds]
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
Bike has joined #commonlisp
green__ has joined #commonlisp
atgreen has joined #commonlisp
green__ has quit [Ping timeout: 252 seconds]
silasfox has joined #commonlisp
lisp123 has joined #commonlisp
waleee has joined #commonlisp
dsk has joined #commonlisp
silasfox has quit [Remote host closed the connection]
silasfox has joined #commonlisp
derelict has joined #commonlisp
atgreen has quit [Ping timeout: 252 seconds]
silasfox has quit [Remote host closed the connection]
silasfox has joined #commonlisp
lisp123 has quit [Ping timeout: 252 seconds]
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #commonlisp
sixtyfour has joined #commonlisp
<sixtyfour>
Greetings, I'm having trouble loading cl-png through quicklisp
<sixtyfour>
it says "Symbol "%ARRAY-DATA-VECTOR" not found in the SB-KERNEL package."
<jackdaniel>
sixtyfour: perhaps your sbcl is outdated? (or quicklisp distribution)
<sixtyfour>
jackdaniel: I'm on the latest version of SBCL and quicklisp
<_death>
it uses sbcl internals, which have changed.. so you can (i) work to fix it (ii) switch to a different library (maybe one that doesn't make use of FFI)
<Xach>
cl-png needs to be updated. there's an open issue.
<sixtyfour>
Ah I see, I'll try to see if I can hack something together
<sixtyfour>
I wanted to try Anders Hoff's weir library, but it depends on cl-png
<_death>
it looks like it uses cl-png for 16-bpp images and zpng for 8-bpp
dsk has quit [Ping timeout: 240 seconds]
dsk has joined #commonlisp
sixtyfour has quit [Ping timeout: 255 seconds]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 252 seconds]
attila_lendvai has quit [Ping timeout: 268 seconds]
<francogrex>
a lot of unable to do inline fixnum arithmetic, because of the integer/fixnum thing there
aeth has quit [Ping timeout: 252 seconds]
aeth has joined #commonlisp
<jackdaniel>
that only means, that a certain optimization can't happen
<jackdaniel>
if your type is required to be integer then you can't do anything about it
<jackdaniel>
sbcl tells you that if /you could/ guarantee that these integers are fixnums, then it would be able to apply a certain optimization
<jackdaniel>
francogrex: ^
lisp123 has joined #commonlisp
lisp123 has quit [Client Quit]
<francogrex>
jackdaniel: ok, i am sure i cannot guarantee that the output of the arithmetic operations will be fixnum (actually i can guarantee that they will not be :( )
<francogrex>
i though there would be a way for optimized integer operations without using fixnums
<jackdaniel>
they are optimized
<jackdaniel>
the compiler complains that it can't optimize them *more*
<aeth>
some notes are inherently unfixable, but you probably still want optimized code to be optimized so you can just hide the remaining notes in a LOCALLY
<francogrex>
aeth: isn't that like burying head in the sand?
<aeth>
well, no, sometimes SBCL complains that the problem isn't... an easier to optimize problem
<aeth>
Especially when there's division. Like, thanks, if I was solving a different problem, it would really work out.
<aeth>
(I guess that sort of thing is in hopes that you can factor it by hand or something)
<aeth>
Other times it's because there's a slow path in the code
<aeth>
You could experiment with TYPECASE and having a fast path and a slow path, but the slow path will then always complain (unless moved to a separate function entirely)
<francogrex>
ok i see
MichaelRaskin has quit [Read error: Connection reset by peer]
MichaelRaskin has joined #commonlisp
cage has joined #commonlisp
<aeth>
That being said, depending on the problem, you could make your own "bignum" out of a fixed-size array of numbers that are all known to be of a fixed size and thus fully optimizable. Definitely doable for simpler things (especially if you just want the bits of an integer, or just want to add). Probably not doable if you want to use all of the features of a bignum (writing your own EXPT, division, etc., is
<aeth>
not easy and will be slow)
<aeth>
so it probably doesn't fit that program
selwyn has quit [Read error: Connection reset by peer]
zacts has joined #commonlisp
lisp123 has joined #commonlisp
domovod has quit [Ping timeout: 255 seconds]
francogrex has quit [Ping timeout: 255 seconds]
zacts has quit [Quit: zacts]
<lisp123>
I assume I can't have generic functions & functions named by the same symbol in the same package?
<Bike>
a symbol can be bound to at most one global function, if that's what you mean
<beach>
lisp123: What would that mean? How would the system know which one you refer to when you say (NAME ...)?
<lisp123>
beach: Yeah that's what I was thinking. Was hoping for the system to try the global function after exhausting all generic function options
<beach>
Just define a default method then.
<beach>
... i.e. a method that does not specialize to any of its parameters.
<lisp123>
So what I have is, an accessor function for a CLOS slot (which from reading online is a generic function), say object-slot-name --> I want to then write a function called object-slow-name to generate the value to populate this slot
<lisp123>
Thanks for your suggestion, that could be very helpful :D (glad I asked)
<jackdaniel>
if you just want to "fix" unbound slots, then define a method slot-unbound
jhi has joined #commonlisp
<lisp123>
jackdaniel: thanks, looks useful
Tomte has quit [Quit: Leaving]
<jcowan>
pjb: That's why I want to get the Common Lisp in Medley updated to the ANS, so that all those tools *will* be vaailable. "Develop in Medley, deploy in SBCL!" Only you can't quite, yet.
Th30n has quit [Quit: WeeChat 3.2]
<beach>
jcowan: Medley looks like a nice project. How far along is it?
notzmv has quit [Ping timeout: 258 seconds]
notzmv has joined #commonlisp
selwyn has joined #commonlisp
mingus has quit [Ping timeout: 255 seconds]
<beach>
jcowan: And, how do you separate the Interlisp and the Common Lisp environments?
mingus has joined #commonlisp
silasfox has quit [Ping timeout: 255 seconds]
silasfox has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 255 seconds]
amb007 has joined #commonlisp
<jcowan>
Interlisp is in the (slightly magic) IL: package from a CL standpoint.
<beach>
I see.
<jcowan>
e.g. IL: is case-sensitive but all standard symbols are uppercase (you need your CAPS LOCK key)
<jcowan>
Medley will boot and run file, and you can start either a CL or IL REPL. The main problem with CL is that it is basically CLtL1. Some work (nobody yet knows how much) was done to add CLtL2 facilities.
<beach>
Ouch. Yes, I see. So you might use PCL for CLOS.
<jcowan>
Indeed.
<jcowan>
CL has NLAMBDA (elsewhere known as FEXPR) pseudo-functions, which look like macros to CL; I'm not sure if the reverse is true. But IL isn't that big a language: the Interlisp teams in the past worked on tooling, not on embiggening the library.
<beach>
I see, so getting full ANSI Common Lisp is a bigger problem than getting the Interlisp environment to work.
<_death>
jcowan: eh, I don't remember needing to upcase when typing e.g., (il:logout)
<_death>
jcowan: ah, I'm guessing it was calling interlisp stuff from CL mode
silasfox has quit [Ping timeout: 252 seconds]
citizenajb has joined #commonlisp
<cheers>
beach: How close is SICL to being completed? totally fine if you don’t have an exact estimate
<cheers>
(or an estimate at all, really)
<cheers>
asking because i recall you discouraging someone from using it yet
<jcowan>
_death: Yes, in the CL Exec (REPL) you are using the CL readtable instead of the IL readtable. If you start an IL Exec then nil should not work but NIL will.
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
lisp123 has quit [Ping timeout: 252 seconds]
Colleen has quit [Excess Flood]
Colleen has joined #commonlisp
amb007 has joined #commonlisp
silasfox has quit [Ping timeout: 268 seconds]
lisp123 has joined #commonlisp
pjb has quit [Remote host closed the connection]
lisp123 has quit [Ping timeout: 252 seconds]
attila_lendvai has joined #commonlisp
lisp123 has joined #commonlisp
OlCe has quit [Ping timeout: 240 seconds]
IPmonger has joined #commonlisp
IPmonger has quit [Remote host closed the connection]
dsk has quit [Ping timeout: 240 seconds]
waleee has joined #commonlisp
gaqwas has joined #commonlisp
<Posterdati>
hi
<Posterdati>
please help, how is it possible to simulate a button click on a webpage using drakma?
lisp123 has quit [Remote host closed the connection]
IPmonger has joined #commonlisp
IPmonger has quit [Remote host closed the connection]
nirved has joined #commonlisp
nirved has quit [Client Quit]
<shka>
Posterdati: this depends on the webpage
<shka>
and i hate to say it
<shka>
but sometimes it is just impossible
<Posterdati>
is what I feared
<Posterdati>
thanks!
yitzi has quit [Quit: Leaving]
<jcowan>
How common is it to use (disembodied, not on a symbol) plists rather than alists?
<shka>
jcowan: depends on the context
<jcowan>
As for example?
lisp123 has joined #commonlisp
<shka>
if by "using" you mean using getf, it is reasonably common if you have function with &rest argument
<shka>
because it is handier to write (function :a 1 :b 2 :c 3)
<shka>
then, for instance
<shka>
(function '((:a . 1) (:b . 2 ) (:c . 3)))
<jcowan>
Agreed, but isn't that what &key is all about? When do you need to process them yourself?
<shka>
yes, but sometimes you don't know ahead of time what keys are getting passed
<shka>
especially for generic functions
<shka>
(defgeneric fun (&rest all &key &allow-other-keys)
<shka>
but that's besides the point
<jcowan>
Actually I think it is the point, but okay.
<shka>
i think that this kind of use case is the most common for the plists
<shka>
it is from what i noticed used less often for actually long term storing of dictionaries
<shka>
i guess because it is handier to iterate and modify alists
<shka>
and dicts offer O(1) read and write
<shka>
*hash-tables
<shka>
sorry
<shka>
no dicts :D
<shka>
jcowan: those this answer your question?
<jcowan>
"Dicts" in Scheme-to-be are a generic interface to key-value stores, including HAMTs, alist, and hashtables.
<shka>
yeah, sorry about that
<jcowan>
np
<shka>
my language slipped
<jcowan>
Allowing plists as a kind of dict means that () can be either an empty alist or an empty plist, you don't know which.
<shka>
could be also false boolean :-)
<shka>
in cl, that is
<shka>
because no distinct boolean type
<shka>
anyway, i hope that this explains everything
tyson2 has joined #commonlisp
<Bike>
i think disembodied plists are uncommon now but used to be way more common.
<AnimalClatter>
If I recall correctly, Common Lisp Recipes makes the point that plists have a simplicity and readability that would lend themselves to, e.g., a config file
<jcowan>
But it looks to me that using plists as generic k/v stores doesn;t make much sense
Inline has quit [Remote host closed the connection]
Inline has joined #commonlisp
silasfox has joined #commonlisp
Inline has quit [Read error: Connection reset by peer]
<mfiano>
jcowan: I would say it is very common, moreso than alists.
<jcowan>
it = pkists?
<mfiano>
Yes
Inline has joined #commonlisp
<mfiano>
In combination with #'APPLY for example, especially if you want to override just a single key/value (earlier ones take precedence)
<mfiano>
Which avoids the linear search (just push a new pair)
<jcowan>
equally true of alists
<mfiano>
A lot of the Common Lisp API makes use of APPLY'ing functions to plists though
<mfiano>
(apply #'make-instance my-plist :allow-other-keys t) for example
<jcowan>
right
<mfiano>
or (apply #'some-func :a "new-value" '(:a "a" :b "b" :c "c")
<jcowan>
But itd still specialized to keyword args
Inline has quit [Remote host closed the connection]
<mfiano>
They make complex DSL's lighter and easier to parse in my experience too.
dtman34 has joined #commonlisp
lotuseater has joined #commonlisp
Inline has joined #commonlisp
pjb has joined #commonlisp
attila_lendvai has quit [Ping timeout: 252 seconds]
Duuqnd has quit [Remote host closed the connection]
shka has quit [Ping timeout: 258 seconds]
Inline has quit [Remote host closed the connection]
lisp123 has quit [Remote host closed the connection]
cage has quit [Ping timeout: 245 seconds]
kakuhen has joined #commonlisp
lisp123 has joined #commonlisp
jeosol has quit [Quit: Connection closed]
AnimalClatter has quit [Quit: WeeChat 3.0.1]
silasfox has quit [Ping timeout: 255 seconds]
silasfox has joined #commonlisp
gaqwas has quit [Ping timeout: 268 seconds]
PuercoPop has quit [Remote host closed the connection]
jeosol has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
silasfox has quit [Ping timeout: 265 seconds]
amb007 has quit [Ping timeout: 255 seconds]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 255 seconds]
amb007 has joined #commonlisp
NotThatRPG has joined #commonlisp
jmhimara has joined #commonlisp
<lotuseater>
How can I specialize the element type of an array after initializing?
<NotThatRPG>
Is there a CL library that has an equivalent of the Unix "find" utility? Or something like the (admittedly kind of scary) perl find library?
<NotThatRPG>
lotuseater: I don't think you can do that.
<Xach>
NotThatRPG: i don't know of one
<NotThatRPG>
@xach: Given the mismatches in the various CL interfaces to the file system, that isn't entirely surprising, but it is kind of disappointing.
<lotuseater>
NotThatRPG: also good to know ^^
<NotThatRPG>
lotuseater: I think that would be a CHANGE-CLASS kind of thing to do...
<lotuseater>
ha yes I could try when it comes to that. there's no #'(setf array-element-type) in default
<Bike>
there is no way to do that. adjust-array is how you change arrays, but there's no defined behavior for changing element type
<lotuseater>
but not defined doesn't directly mean not possible
<Bike>
it means not possible in a conforming program
<lotuseater>
yes okay thx :)
<Bike>
and in general implementations won't allow it
<Bike>
as far as i know
<lotuseater>
NotThatRPG: did you work through the circle-ellipse problem sometime?
<Xach>
NotThatRPG: i've been using wild-inferiors to look through file trees but not in very complicated ways
<lotuseater>
so expanding at compiletime and throw an error if it won't be specialized by pushing some value
<NotThatRPG>
lotuseater: You mean for CHANGE-CLASS. I did once upon a time have a real use for CHANGE-CLASS, but I can't for the life of me remember what it was.
<Xach>
change-class can be pretty handy
<NotThatRPG>
@xach: Not tasty, but it works: (uiop:run-program (format nil "find ~a -type f -name \"*run-all.lisp\" -print" (namestring (asdf:system-relative-pathname "shop3" "examples/"))) :output :lines)
<lotuseater>
circle-ellipse is of much usecase ^^
<Xach>
NotThatRPG: (directory (system-relative-pathname "shop3" "examples/**/*run-all.lisp")) is what I'd use
<NotThatRPG>
@xach: that is much neater! thanks!
<lotuseater>
xach: I once asked friends "so can your Java (or another blub) change classes in such a way at runtime?" :D
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<pve>
NotThatRPG: there is also cl-fad:walk-directory
<NotThatRPG>
pve: Would that work? I have stopped using CL-FAD because it isn't able to identify when a directory entry is a file or a subdirectory (because it is too trusting of the form of CL pathnames).
<pjb>
Bike: I beg to differ. adjust-array lets you change the element-type, with the constraint that: If element-type is supplied, the consequences are unspecified if the upgraded array element type of element-type is not the same as the actual array
<pjb>
element type of array.
<pjb>
So (let ((a (make-array 3 :element-type '(integer 3 10) :initial-element 10))) (adjust-array a (array-dimensions a) :element-type '(integer 10 100))) #| --> #(10 10 10) |# is perfectly conforming AFAICS.
<pjb>
(let ((a (make-array 3 :element-type '(integer 3 10) :initial-element 10))) (adjust-array a (array-dimensions a) :element-type '(integer 100 200))) #| --> #(10 10 10) |# might also be, until the printer tries to read the elements.
<pve>
NotThatRPG: i guess you could double check in the function given to walk-directory with better definition of what a directory is, and then call walk-directory recursively
<pjb>
lotuseater: so (let ((a (make-array 3 :element-type '(integer 3 10) :initial-element 10))) (adjust-array a (array-dimensions a) :element-type '(integer 10 100)))
<NotThatRPG>
pve: I will have a look, thanks. I should probably double-check UIOP and make sure it does not have such a beast in it.
<pve>
NotThatRPG: or write your own walk-directory, it should be like 10 lines..
amb007 has quit [Ping timeout: 255 seconds]
amb007 has joined #commonlisp
<pve>
NotThatRPG: uiop at least has a definition for how to identify directories, it's what I use in my own walk-directory
<NotThatRPG>
pve: uiop:collect-sub*directories looks like it will do the job.
<NotThatRPG>
pve: Yes, that's right, because it can't be done in pure CL, and i think CL-FAD is pure CL.
atgreen has joined #commonlisp
<NotThatRPG>
pve: Even the superhuman Fare could not make symlinks work consistently across lisps, though!
<pve>
NotThatRPG: I meant uiop:directory-pathname-p, no idea if it consistently
<pve>
*works
<NotThatRPG>
pve: Alas, no: "Note that this does _not_ check to see that pathname points to an actually-existing directory. "
<NotThatRPG>
(from the directory-pathname-p docstring).
<lotuseater>
thx pjb :)
<pve>
NotThatRPG: and symlinks will break it somehow?
<NotThatRPG>
pve: We may be in IOLIB territory here.
<NotThatRPG>
pve: If I recall correctly, CCL either always or never follows symlinks.
<NotThatRPG>
There's a longstanding ASDF bug related to this, that I don't believe we can fix.
lisp123 has joined #commonlisp
<pve>
NotThatRPG: can you help me understand what exactly causes the problem (it's a bit late here)? If I symlink a directory into another directory foo and then walk-directory foo, it walks into the symlinked directory and finds its files like I would expect
<pve>
on ccl
<pve>
are you saying it might not work on sbcl?
<NotThatRPG>
If I recall correctly (and I could be wrong), there is no way to tell CCL *not* to follow the symlinks.
<pve>
ohh, and find has an option to not follow symlinks?
<NotThatRPG>
Yes, and I think there are ways that aggressively following symlinks can cause a mess in some ASDF link farms.
lisp123 has quit [Remote host closed the connection]