<jcowan>
Nice! Copying this to #interlisp, which is the only (AFAIK) surviving image-based Lisp env
<holycow>
hi jcowan thanks for your email earlier
<holycow>
i will get back to you shortly. what are your hours normally?
<holycow>
oh there is #interlisp now? neat!
taiju has quit [Ping timeout: 264 seconds]
<jcowan>
holycow: 1300-0400 UTC; I'm in NYC
<holycow>
ah! okay, i will keep that in mind. thank you kindly.
rogersm has quit [Read error: Connection reset by peer]
rogersm has joined #commonlisp
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 264 seconds]
Lord_of_Life_ is now known as Lord_of_Life
Guest-liao has joined #commonlisp
taiju has joined #commonlisp
stacksmith has quit [Quit: WeeChat 3.0.1]
random-nick has quit [Ping timeout: 260 seconds]
aeth_ has joined #commonlisp
aeth has quit [Killed (NickServ (GHOST command used by aeth_))]
aeth_ is now known as aeth
akoana has left #commonlisp [Leaving]
aeth has quit [Read error: Connection reset by peer]
aeth has joined #commonlisp
waleee has quit [Ping timeout: 264 seconds]
hendursaga has quit [Remote host closed the connection]
hendursaga has joined #commonlisp
hubvu has quit [Ping timeout: 252 seconds]
travv0 has quit [Ping timeout: 260 seconds]
victor has quit [Ping timeout: 264 seconds]
travv0 has joined #commonlisp
hubvu has joined #commonlisp
victor has joined #commonlisp
molson has quit [Ping timeout: 252 seconds]
igemnace has quit [Quit: WeeChat 3.3]
nature has quit [Ping timeout: 258 seconds]
beach` is now known as beach
<beach>
Good morning everyone!
Bike has quit [Quit: sleepin']
myrrh has joined #commonlisp
Nilby has quit [Ping timeout: 264 seconds]
dec0d3r has joined #commonlisp
aartaka has joined #commonlisp
dec0d3r has quit [Remote host closed the connection]
semz has quit [Ping timeout: 258 seconds]
semz has joined #commonlisp
<lisp123>
Good morning Beach!
jealousmonk has quit [Quit: ERC (IRC client for Emacs 27.1)]
mrcom_ has quit [Quit: This computer has gone to sleep]
mrcom has quit [Quit: This computer has gone to sleep]
mrcom has joined #commonlisp
mrcom_ has joined #commonlisp
Catie has quit [Quit: rcirc on GNU Emacs 29.0.50]
<CodeBitCookie[m]>
Good Morning Everyone!
<CodeBitCookie[m]>
beach: good morning beach
<CodeBitCookie[m]>
I have a small question about SBCL. The #freenode_#sbcl:matrix.org is a bit inactive. If anyone doesn't mind here goes:
<CodeBitCookie[m]>
I love how SBCL creates large executables for portability. My question is how portable? I mean, can it run on any computer that can run C?
<hayley>
An SBCL executable is only portable to other machines with the same operating system and instruction set.
<CodeBitCookie[m]>
And thats all the requirements?
<CodeBitCookie[m]>
A leading question I am having is Cross-platform Compilation. Can anyone point me to a link or article where this is explained? Thanks
<CodeBitCookie[m]>
Obviously I am talking, in Common Lisp. Not necessarily SBCL but yeah.
srhm has quit [Read error: Connection reset by peer]
srhm has joined #commonlisp
Guest-liao has quit [Quit: Client closed]
<beach>
CodeBitCookie[m]: It is usually pretty simple. Creating an executable is just a matter of putting the right bytes in the right order. It doesn't matter which platform the compiler runs on, so output for any other platform can be produced in a straightforward (but not necessarily simple) way.
<CodeBitCookie[m]>
So any pointers?
<beach>
CodeBitCookie[m]: The code generator obviously needs some kind of description of the target processor and such, but that is also independent of the platform it is running on.
srhm has quit [Read error: Connection reset by peer]
<CodeBitCookie[m]>
Ohhhh, in my ASDF system?
<beach>
CodeBitCookie[m]: It is so straightforward that I don't think there is an article for it.
srhm has joined #commonlisp
<beach>
CodeBitCookie[m]: No, ASDF is not involved. The compiler has to be configured to generate code for a specific target machine/OS, etc. But whether that configuration is for the same target as the compiler is running on is unimportant.
<beach>
CodeBitCookie[m]: A file compiler is a "simple" program in that it mostly takes bytes from an input file and produce bytes in an output file (for Common Lisp, it's a bit more complicated than that), so the compiler can produce an executable for any platform it has been configured for.
<beach>
CodeBitCookie[m]: Does that make sense to you?
<beach>
CodeBitCookie[m]: If not, feel free to ask more questions.
<CodeBitCookie[m]>
hmmm, so if I'm not mistaken, my Implentation is my Compiler?
<beach>
For Common Lisp? Well, sort of. The compiler is a significant part of any Common Lisp implementation, because the Common Lisp standard requires the compiler to be present at run time.
<beach>
For more traditional languages like C, the compiler is just a file translator. Then you have other tools like the linker to produce an executable from several object files produced by the compiler.
<hayley>
I wonder how much more memory you would need in order to store enough of the state of the compiler, so that you could develop on x86-64 and dump an image for RISC-V.
<beach>
Not very much I think.
vats has quit [Ping timeout: 260 seconds]
vats has joined #commonlisp
Guest-liao has joined #commonlisp
<beach>
CodeBitCookie[m]: Maybe you need to read up on what compilers do?
gxt_ has quit [Ping timeout: 276 seconds]
gxt_ has joined #commonlisp
gxt_ has quit [Ping timeout: 276 seconds]
gxt_ has joined #commonlisp
shka has joined #commonlisp
flip214 has joined #commonlisp
igemnace has joined #commonlisp
flip214 has quit [Ping timeout: 258 seconds]
<beach>
Another way of putting it is that a compiler running on some platform P does not use any information about P in order to generate code. It uses only information provided to it in the form of data structures.
gxt_ has quit [Ping timeout: 276 seconds]
flip214 has joined #commonlisp
vats has quit [Ping timeout: 260 seconds]
vats has joined #commonlisp
gxt_ has joined #commonlisp
dec0d3r has joined #commonlisp
flip214 has quit [Read error: Connection reset by peer]
flip214 has joined #commonlisp
Cymew has joined #commonlisp
Spawns_Carpeting has quit [Ping timeout: 260 seconds]
vats has quit [Ping timeout: 258 seconds]
vats has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
<CodeBitCookie[m]>
beach: I am understanding now. I will read up more on it. Thanks, will come back in a few hours to clear my doubts if that's okay.
gaqwas has joined #commonlisp
wyrd has quit [Quit: Reconnecting]
wyrd has joined #commonlisp
aartaka has joined #commonlisp
<CodeBitCookie[m]>
beach: Oh, I didn't need a lot of hours, I remembered now that compilers don't matter, we just need to be able to use a Docker container or Nix or maybe even wine for windows so that we could compile easily. Thanks and forgive my bad memory.
<CodeBitCookie[m]>
(Is still wrong)
<CodeBitCookie[m]>
* (Is still wrong?)
makomo has joined #commonlisp
<pjb>
CodeBitCookie[m]: try: irc://irc.libera.chat#sbcl everything has moved from freenode to libera.chat
<pjb>
CodeBitCookie[m]: if you want portable lisp object files, the only implementation providing that is clisp: you can compile a clisp program to .fas files on linux/680x0 and run it on ms-window/x86; this is also the reason why the byte order for binary files (when the element-type is bigger than an octet), is little-endian even on big-endian machines with clisp.
dtman34 has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
dtman34 has joined #commonlisp
<pjb>
CodeBitCookie[m]: lisp executable images are large because they contain a compiler, a linker, a library, your application and its dependencies, data and resources, and other cruft that couldn't be garbage-collected before saving the image because you kept references to it.
* beach
obviously misunderstood the entire issue. :(
<pjb>
CodeBitCookie[m]: basically, take a small unix program use ldd on it recursively, and sum the size of all the shared libraries, plus gcc and ld…
<pjb>
beach: not really. The initial message was full of misconception; giving explanations on the various topics mentionned should draw a map that will help make the things clearer.
<beach>
Thanks.
<flip214>
I think it's awesome that I can distribute SBCL images with a complete HTTPS server, application code, dynamic loading of subservices (using the compiler), a debugger, etc, compressed with zlib level 1 in a single ~30MB file.
<pjb>
CodeBitCookie[m]: now, the trick with executable images, is that they are saved from the memory of a program running on the host machine, usually. Cross compiling would involve saving an image, not by copying the (whole) memory of the running program, but by generating a new memory for the new processor, as beach explained.
<flip214>
yeah, libc and a few external dependencies exist, but compared to a typical application stack in C++ or Java....
<pjb>
There could be a way to do it perhaps more economical, by using an interpreter. Then we have to cross-compile only the interpreter in the new (bootstrap) image, and the rest of the code saved would be lisp sources (sexps). Then the bootstrap image would load on the target system and use the now native interpreter to interpret a compiler for this new target, to compile the rest of the image.
<pjb>
Assuming cross-compilation is "costly", involving multiple environments, and stuff…
<White_Flame>
the size of an sbcl executable is smaller than a JVM & its libraries, and all in one file
<pjb>
flip214: you can still compile and link unix program statically. This may require some work.
<White_Flame>
I tend to compare it to the JRE footprint
<White_Flame>
since that's what a lot of people have been familiar with. Boomer example, I know :-P
<pjb>
Compare program sizes with Firefox… :-)
<White_Flame>
the nodejs executable is 35MB on my machine, and that's somewhat comparable as well
mrcom_ has quit [Read error: Connection reset by peer]
<White_Flame>
I should start using that example instead ;)
mrcom has quit [Read error: Connection reset by peer]
edgar-rft has quit [Quit: Leaving]
attila_lendvai has joined #commonlisp
pve has joined #commonlisp
dtman34 has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
dtman34 has joined #commonlisp
gaqwas has quit [Ping timeout: 260 seconds]
mrcom has joined #commonlisp
mrcom_ has joined #commonlisp
Qwnavery has joined #commonlisp
vats has quit [Remote host closed the connection]
Guest-liao has quit [Quit: Client closed]
attila_lendvai has quit [Ping timeout: 252 seconds]
dec0d3r has quit [Remote host closed the connection]
<CodeBitCookie[m]>
beach: flip214 pjb White_Flame : Thanks everyone for the help. I think I understood all of it and this was super helpful. Thanks you. :D
<CodeBitCookie[m]>
s/Thanks/Thank/
<beach>
Sure. Sorry I misunderstood your problem. Wouldn't be the first time for me. :(
<CodeBitCookie[m]>
beach: No problem at all, You still kind of explained a point that was important to me. No time is wasted and no knowledge is extra. Thanks
wyrd has quit [Quit: leaving]
cosimone has joined #commonlisp
random-nick has joined #commonlisp
<lisp123>
Any way to get the file name where a symbol is defined/used? I'm reading through SLIME (since it has this information), but wondering if somebody already solved this before
<lisp123>
I could brute force get it by reading all lisp files and creating a hash table of all symbols...sounds inefficient
<pjb>
Think about what you're asking…
<flip214>
lisp123: where a symbol is used is not stored.
<pjb>
Also the REPL.
<flip214>
your implementation might remember where a _function_ for that symbol was set up.
<flip214>
(or a special, a compiler-macro, etc.)
<pjb>
But indeed, if the implementation doesn't do it (does M-. works?), your "brute force" algorithm is not a bad idea.
<pjb>
lisp123: only that, reading lisp files is not what load or compile-file does…
<pjb>
load and compile-file evaluate what they read. And this can change everything.
asdf-troubles has joined #commonlisp
<lisp123>
Let me remove the "/used" from "define/used", that came out wrong. So just definitions
<flip214>
and Lisp code can create symbols programmatically - (INTERN (FORMAT NIL "SYM~d" (RANDOM 5)))
<pjb>
lisp123: also, CL is a lisp-2 (actually, lisp-∞). So there's not a single definition attached to a symbol!
<lisp123>
pjb: Yes agree. So to be more specific, I'm only interested in functions/macro definitions --> So I could extract all these from an image, and then do a plain text search of defun symbol / defun macro...sounds very basic but could work
<asdf-troubles>
hi there :)
<pjb>
Theorically, M-. could detect what kind of reference is being done to foo: (let ((foo (foo (the foo foo)))) foo) Depending on what foo you type M-. on, it should be able to jump to one of the other def forms above, or to the foo binding in the let.
<lisp123>
(basically I'm tired of specifying which test suite my tests should be linked to, rather they infer them from the file name)
igemnace has quit [Remote host closed the connection]
<pjb>
lisp123: it's not clear what the problem is.
<lisp123>
pjb: yes, confirming it works via M-.
<lisp123>
Just tried it
<pjb>
lisp123: when it works with M-. you can look in slime/swank what the implementation specific API is to do it.
<lisp123>
pjb: No problem. Since I organise code by file names also, I want my test suites to match the file name where the functions are located in. So if I can get that info, I don't have to type it in :)
<pjb>
lisp123: right, but when you write test suites, don't you start by creating a file where to write them?
<lisp123>
pjb: Thanks! That worked really well. I tried searching on my end but didn't get to that function, I got to 'slime-edit-definition' and got stuck
<pjb>
lisp123: M-. also works in emacs lisp ;-)
<pjb>
and C-x C-e: slime-edit-definition body is (slime-postprocess-xrefs (funcall slime-find-definitions-function name)) So move after slime-find-definitions-function and type C-x C-e to see the current binding.
asdf-troubles has quit [Quit: Client closed]
<lisp123>
pjb: Yes, I save them in their own file, usually mirroring the file structure of the main program (e.g. filename-test.lisp). I just didn't want to write a line at the top of each test file to manually set the value of filename :D
X-Scale` has joined #commonlisp
<pjb>
You mean, to load the source file?
<lisp123>
No, just to use as part of the name of the test
X-Scale has quit [Ping timeout: 258 seconds]
<pjb>
Instead define asd systems, system "foo" in foo.asd system "foo.test" in foo.test.asd and "foo.test" :depends-on "foo" ; and that's all.
<pjb>
lisp123: oh, for the report. Ok.
<lisp123>
So I organise the test suites by filename, and then the name of the test is the name of the function I'm testing, with a counter for each test
<pjb>
Let me see how I did it.
X-Scale` is now known as X-Scale
<pjb>
lisp123: right to report the path, I used the path of the test file (load-time-value *load-truename*), not the path of the tested file.
<pjb>
I guess if you assume swank (you can add :depends-on "swank" in the test system), you can use (swank:find-definitions-for-emacs (symbol-name tested-function)) and find the :file inthere.
<lisp123>
pjb: Thanks!
<lisp123>
(reading into load-time-value and *load-truename* now)
mrcom has quit [Read error: Connection reset by peer]
mrcom_ has quit [Read error: Connection reset by peer]
Guest-liao has joined #commonlisp
pranavats has joined #commonlisp
<lisp123>
pjb: Do you have a Stack Overflow Account? I'm want to put the above as a Q&A there, I can draft up an answer for you to post if you have an account
mingus_ has joined #commonlisp
mingus has quit [Ping timeout: 265 seconds]
mrcom_ has joined #commonlisp
mingus_ is now known as mingus
<pjb>
lisp123: I don't use stackoverflow often enough.
Nilby has joined #commonlisp
<pjb>
You may answer yourself, I don't mind.
X-Scale` has joined #commonlisp
<lisp123>
pjb: Great, thanks, I'll put a note to credit you on the answer. Just want to save down some of this knowledge for others in the future :-)
X-Scale has quit [Ping timeout: 265 seconds]
X-Scale` is now known as X-Scale
Guest-liao has quit [Ping timeout: 256 seconds]
Guest-liao has joined #commonlisp
Guest-liao81 has joined #commonlisp
Guest-liao has quit [Quit: Client closed]
mrcom has joined #commonlisp
ec_ has joined #commonlisp
tyson2 has joined #commonlisp
wyrd has joined #commonlisp
Bike has joined #commonlisp
zacque has joined #commonlisp
Nilby has quit [Ping timeout: 258 seconds]
peterhil has quit [Ping timeout: 260 seconds]
<pjb>
lisp123: :-)
peterhil has joined #commonlisp
hendursaga has quit [Remote host closed the connection]
hendursaga has joined #commonlisp
vats has joined #commonlisp
vats has quit [Client Quit]
vats has joined #commonlisp
vats has quit [Client Quit]
vats has joined #commonlisp
vats has quit [Client Quit]
vats has joined #commonlisp
Inline has quit [Quit: Leaving]
sonny has joined #commonlisp
Inline has joined #commonlisp
peterhil has quit [Ping timeout: 260 seconds]
jealousmonk has joined #commonlisp
nature has joined #commonlisp
Qwnavery has quit [Quit: WeeChat 3.3]
peterhil has joined #commonlisp
Bike has quit [Ping timeout: 258 seconds]
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
vats has quit [Ping timeout: 252 seconds]
peterhil has quit [Ping timeout: 264 seconds]
pranavats has joined #commonlisp
vats has joined #commonlisp
random-nick has quit [Ping timeout: 260 seconds]
makomo has quit [Ping timeout: 265 seconds]
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
paule32 has quit [Read error: Connection reset by peer]
Guest39 has joined #commonlisp
Bike has joined #commonlisp
nature has quit [Remote host closed the connection]
peterhil has joined #commonlisp
nature has joined #commonlisp
<loke[m]>
Anyone know of an existing library that can use MOP to serialise arbitrary class instances to sexps? There are a few that serialise to byte arrays, but I'd like something that generates a sexp.
lance has joined #commonlisp
tyson2 has joined #commonlisp
<Bike>
loke[m]: make-load-form-saving-slots? or do you want custom behavior for user slot definition classes or something?
<Bike>
i guess it's difficult to process the initialization form
lance is now known as hobo
<loke[m]>
Bike: Yeah, I need something where I can WRITE the output to a file, and then load it back in using READ (followed by a deserialisation)
<loke[m]>
Something like hu.dwim.serializer but that writes to a sexp instead of a byte array.
<beach>
loke[m]: We do that for AST classes in SICL.
<beach>
Check out Code/Cleavir/Input-output in the SICL repository.
<Bike>
it doesn't work out the slots automatically, though.
<beach>
I didn't know that was a requirement.
<beach>
In fact it doesn't refer to slots at all, which is the right thing.
<beach>
It refers only to accessors and initargs.
<beach>
The #\[ character is used, so that an instance is written as [<class-name> :initarg1 <value1> :initarg2 <value2>...]
<loke[m]>
So the reader uses a custom readtable?
<beach>
The reader macro for #\[ does (apply #'make-instance (read-delimited-list #\])
<loke[m]>
Oh I see.
<beach>
Just one macro character.
<loke[m]>
In this case, that wouldn't work, because not all slots have initargs.
<beach>
Well, it works if they have initforms.
<beach>
And every slot should have one or the other, or else the slot should be computed from the others, so that will work too.
<beach>
loke[m]: We are doing nothing but encoding good interface practice here. Slots are implementation details and should not appear. The true interface to a class is its initargs and its accessors.
<loke[m]>
beach: problem is, I'm serialising objects that I have no control over. In this case there are slots without initforms nor initargs.
<beach>
This way, you can also change the slots of your class between writing and reading. As long as the modified class respects the interface, it is fine, even if that means ignoring some initargs or using them to compute other slots rather than initialize slots.
<beach>
I am sorry to hear that. Sorry I can't help then.
peterhil has quit [Ping timeout: 265 seconds]
<beach>
Look, I am in a rotten mood, so I am not going to elaborate on what I think of this code you are using. I'll go do something else.
makomo has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
Nilby has joined #commonlisp
Guest-liao81 has quit [Quit: Client closed]
tyson2 has joined #commonlisp
sonny has quit [Remote host closed the connection]
amb007 has quit [Read error: Connection reset by peer]
raeda has quit [Quit: Leaving]
amb007 has joined #commonlisp
peterhil has joined #commonlisp
molson has joined #commonlisp
Cymew has quit [Ping timeout: 260 seconds]
Guest39 has quit [Quit: Client closed]
wyrd has quit [Remote host closed the connection]
wyrd has joined #commonlisp
phantomics has quit [Ping timeout: 240 seconds]
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
myrrh has quit [Read error: Connection reset by peer]
edgar-rft has joined #commonlisp
myrrh has joined #commonlisp
peterhil has quit [Ping timeout: 264 seconds]
phantomics has joined #commonlisp
waleee has joined #commonlisp
myrrh has quit [Remote host closed the connection]
myrrh has joined #commonlisp
tyson2 has joined #commonlisp
myrrh has quit [Ping timeout: 252 seconds]
peterhil has joined #commonlisp
varjag has joined #commonlisp
zacque has quit [Quit: Goodbye :D]
slyrus has quit [Ping timeout: 258 seconds]
stacksmith has joined #commonlisp
<stacksmith>
Good morning
<hobo>
hello
<edgar-rft>
how many stacks have you forged today?
<stacksmith>
Sadly none. I haven't seen a stack in days. I am ashamed.
notzmv has quit [Ping timeout: 245 seconds]
<edgar-rft>
don't feel sad, you can easily make a stack with DEFVAR, PUSH an POP :-)
<hobo>
you could make a DSL with your IRC nick too!
<lisp123>
edgar-rft: lol
<pjb>
loke[m]: that said, when you're considering OODB, you indeed want to save the slots, and not the interface. But even in this case you may want to indicate that some slots are computed and not to be saved. (or the values bound to those slots may need special treatment, different than sexp serialization).
<loke[m]>
pjb: yes. For binary serialisation I usually use conspack which allows me to customise this.
<pjb>
loke[m]: otherwise, using the MOP you can get the list of slots or direct slots in a class, and get or set their values (or bound status and unbind them), so you may store the data. Just mind to apply the usual algorithm to deal with circular structures.
<pjb>
loke[m]: of course, one difficulty will be if you have amongst the reachable values, say, structure objects. Then there's no MOP of them (unless the implementation implements structure objects as standard objects).
vats has quit [Ping timeout: 265 seconds]
vats has joined #commonlisp
waleee has quit [Ping timeout: 252 seconds]
waleee has joined #commonlisp
vats has quit [Ping timeout: 260 seconds]
vats has joined #commonlisp
peterhil has joined #commonlisp
Psybur has joined #commonlisp
ec_ has quit [Ping timeout: 276 seconds]
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
ec_ has joined #commonlisp
vats has quit [Ping timeout: 265 seconds]
vats has joined #commonlisp
peterhil has quit [Ping timeout: 260 seconds]
waleee has quit [Ping timeout: 258 seconds]
tfeb has joined #commonlisp
attila_lendvai has joined #commonlisp
tfeb has quit [Quit: died]
hobo has quit [Quit: restart]
lance has joined #commonlisp
lance is now known as hobo
notzmv has joined #commonlisp
Spawns_Carpeting has joined #commonlisp
Spawns_Carpeting has quit [Client Quit]
seere has joined #commonlisp
Spawns_Carpeting has joined #commonlisp
random-nick has joined #commonlisp
ec_ has quit [Ping timeout: 276 seconds]
ec_ has joined #commonlisp
waleee has joined #commonlisp
MichaelRaskin has joined #commonlisp
tyson2 has joined #commonlisp
vats has quit [Ping timeout: 265 seconds]
vats has joined #commonlisp
gaqwas has joined #commonlisp
Guest19 has joined #commonlisp
akoana has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
random-nick has quit [Ping timeout: 260 seconds]
waleee has quit [Ping timeout: 258 seconds]
waleee has joined #commonlisp
random-nick has joined #commonlisp
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
tyson2 has joined #commonlisp
makomo has quit [Ping timeout: 265 seconds]
johnjay has quit [Ping timeout: 258 seconds]
Guest19 has quit [Ping timeout: 256 seconds]
holycow has quit [Remote host closed the connection]
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
<drmeister>
If you have a function that shouldn't return anything - is it good form to return (values)?
<GreaseMonkey>
drmeister: i'd say yes to that
<GreaseMonkey>
it's explicit, and if something really insists on getting a single value out of it then they get nil
Guest19 has joined #commonlisp
<GreaseMonkey>
...also in a repl (at least in SBCL) it doesn't print anything as the result
shka has quit [Ping timeout: 260 seconds]
<stacksmith>
when a function always returns the same number of values
<stacksmith>
SBCL generates smaller code..
cage has quit [Remote host closed the connection]
<stacksmith>
When optimizing anyway.
saturn2 has quit [*.net *.split]
rdrg109 has quit [*.net *.split]
mfiano has quit [*.net *.split]
sm2n has quit [*.net *.split]
luna-is-here has quit [*.net *.split]
jcowan has quit [*.net *.split]
mzan has quit [*.net *.split]
borodust has quit [*.net *.split]
samebchase has quit [*.net *.split]
jcowan has joined #commonlisp
samebchase has joined #commonlisp
mfiano has joined #commonlisp
rdrg109 has joined #commonlisp
luna-is-here has joined #commonlisp
saturn2 has joined #commonlisp
<White_Flame>
presumably this is for a function that _always_ should return nothing, though
borodust has joined #commonlisp
sm2n has joined #commonlisp
mzan has joined #commonlisp
paule32 has joined #commonlisp
cosimone has quit [Quit: ERC (IRC client for Emacs 27.1)]
Spawns_Carpeting has quit [Quit: WeeChat 3.3]
attila_lendvai has quit [Ping timeout: 260 seconds]
Guest19 has quit [Quit: Client closed]
vats has quit [Ping timeout: 260 seconds]
rgherdt has quit [Ping timeout: 260 seconds]
pve has quit [Quit: leaving]
tyson2 has joined #commonlisp
wyrd has quit [Ping timeout: 276 seconds]
vats has joined #commonlisp
notzmv has quit [Remote host closed the connection]
wyrd has joined #commonlisp
notzmv has joined #commonlisp
Qwnavery has joined #commonlisp
ec_ has quit [Quit: ec_]
Qwnavery has quit [Quit: WeeChat 3.3]
gaqwas has quit [Ping timeout: 265 seconds]
varjag has quit [Ping timeout: 260 seconds]
lisp123 has quit [Remote host closed the connection]
saturn2 has quit [Quit: WeeChat 1.0.1]
clone_of_saturn has joined #commonlisp
clone_of_saturn is now known as saturn2
johnjay has joined #commonlisp
skeemer has joined #commonlisp
<skeemer>
underhello all, i am studying common lisp, and i still don't think i quite understand how external packages work (coming from python/ruby/perl)... so basically from what i understood in common lisp lingo we talk about "systems", and a common package manager for these systems is "quicklisp" which works more or less like "pip" (sorry for the simplification here)... but then i have the impression that irun quicklisp while i am in
<skeemer>
slime, but how do i include a package i downloaded/installed with quicklisp in my project to use?
Oladon has joined #commonlisp
<Oladon>
I've got a strange issue... I'm using feature flags (SBCL) to differentiate between local development and production, but just recently my code is always running the production version, even when run from SLIME. Yet when I print out *features*, the prod flag isn't there. I've got: #+rpanytime-prod (format t "PRODUCTION MODE!!~%") -- any ideas?
<defaultxr>
skeemer, you'll want to include it in the :depends-on list in your project's asdf system definition. check out "quickproject" for a way to quickly create a project skeleton
<skeemer>
defaultxr, thanks a lot
<pjb>
skeemer: there's no notion of project in the language either.
<pjb>
skeemer: there's a lisp image, which is the memory of the lisp process (when running on a posix system).
<pjb>
skeemer: in the lisp image, there are lisp objects. all the lisp values are lisp objects.
random-nick has quit [Quit: quit]
<skeemer>
pjb, yeah that's quite different actually from other "common" languages
<pjb>
skeemer: some of those objects are symbols; symbols may have a home package; packages have symbol that are interned in them, symbols that are imported from other packages; some symbols present in a package can be exported from the package; and a list of packages they use, which means, that the exported symbols from the used packages are visible in the using package.
<skeemer>
thanks a lot pjb
<pjb>
skeemer: when reading, symbol names are interned in the current package bound to the CL:*PACKAGE* variable.
<pjb>
now, symbols, interned or not (symbols without a home package are "uninterned" symbols), can be used to name lisp objects.
<pjb>
for example, we could use the symbol CL-USER::DOUBLE to name the function (lambda (x) (+ x x))
vats has quit [Ping timeout: 265 seconds]
<defaultxr>
Oladon, you might be inadvertently loading the compiled version of your code. feature flags are tested at compile time, not run time, so to ensure that they are tested again, you need to recompile
<pjb>
But the lisp objects are otherwise independent from packages.
<pjb>
skeemer: now, lisp objects can be created by evaluating expressions, which can be done from files by loading them, or by compiling them.
<Oladon>
defaultxr: Ah, hrm... that would indeed make sense, and I'm using Quicklisp to load it. I'll go see if there's a way to force Quicklisp to recompile it.
<pjb>
skeemer: lisp files may have to be compiled or loaded in a specific order for dependencies between them. eg. if a function uses a macro, the macro should be defined at compilation time, before the function is compiled.
<Oladon>
Thanks defaultxr!
<pjb>
skeemer: to help ordering the files compiling and loading, we use a system definition that describes the dependencies between the file. asdf is one such system definition system. Before it there was others similar.
<defaultxr>
no prob!
<pjb>
skeemer: of course, to be able to load files they must be present on your local disk, so you need to download and install them. quicklisp helps doing that.
<pjb>
skeemer: for this, asdf systems also specify dependencies between systems. When using quicklisp to load a system, if it has as dependency a system that is not present on the local disk, quicklisp downloads it and install it, then compiles and loads the dependency (using asdf).
<pjb>
skeemer: so, what you call a project can be anything really, but the simpliest is to map it to the notion of asdf system. But sometimes a project can have multiple systems. It's as you wish, you can organize your components with subcomponents, defining a system for each component.
johnjay has quit [Ping timeout: 265 seconds]
<pjb>
skeemer: asdf also let you define asdf components as subsystems, in the asdf system defintion file.
<pjb>
skeemer: there's a lot of freedom, so you can organize your things as you wish, depending on the complexity of your projects.
Krystof has quit [Ping timeout: 258 seconds]
johnjay has joined #commonlisp
<pjb>
skeemer: slime is used as an IDE. But if you want to compile and deploy an executable, you might prefer to do that from a script or a makefile, not from an interactive lisp image. Then quicklisp will be used without slime.
<pjb>
the file generate.lisp and generate-hw.lisp contain a lisp script used to compile and save executable lisp images (or an executable elf binary in the case of ecl, which doesn't generate lisp images).
<pjb>
skeemer: see the Makefile.
vats has joined #commonlisp
<pjb>
skeemer: of course, you can also use (asdf:load-system :hw) or (ql:quickload :hw) to load the hello word program in an interactive lisp image.