eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Lord_of_Life has quit [Ping timeout: 246 seconds]
Lord_of_Life has joined #commonlisp
pve has quit [Quit: leaving]
jolby has joined #commonlisp
Guest74 has joined #commonlisp
Guest74 has quit [Client Quit]
akoana has quit [Ping timeout: 252 seconds]
akoana has joined #commonlisp
matt``` has quit [Remote host closed the connection]
triffid has quit [Remote host closed the connection]
triffid has joined #commonlisp
epony has quit [Ping timeout: 272 seconds]
pranavats has left #commonlisp [Disconnected: Hibernating too long]
pranavats has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 252 seconds]
Lord_of_Life has joined #commonlisp
<char[m]>
Hello common lisp, Could someone please help me understand why macroexpand-all doesn't work for some forms such as (defun test () (+ 1 2))?
<char[m]>
It's not working for me on sbcl.
<kakuhen>
Is macroexpand-all even standard CL? Or is this some implementation-specific extension I'm not aware of
<kakuhen>
I would assume MACROEXPAND covers what you're trying to do
<char[m]>
yes, macroexpand-all is non-ansi extension implemented by a poop ton of implementations and there is trivial-macroexpand-all. Macroexpand doens't guarentee to expand everything; it only makes sure the car is not a macro. It could have deeper nested, unexpanded macros.
<char[m]>
What is most odd to me is that macroexpand-all is not expanding defun at all.
waleee has quit [Ping timeout: 255 seconds]
<kakuhen>
I guess this is a better question for #sbcl. I'm not getting consistent results across implementations (probably needless to say)
<Bike>
what i would have guessed is that it would choke on sbcl's named-lambda, which i think defun still expands into.
<kakuhen>
SBCL example indeed returns just `(DEFUN TEST () (+ 1 2))`. So I want to blame the implementation of DEFUN :P
<kakuhen>
curiously, the normal MACROEXPAND will expand everything.
<Nilby>
perhaps it's a compiler-macro and only really has side effects
<Bike>
defun is certainly a macro.
<char[m]>
It doesn't! that sb-int:named-lambda is left unexpanded.
<Bike>
the macro-function is right there. i couldn't tell you why macroexpand-all wouldn't expand it. sounds like it's not doing even basic stuff.
<char[m]>
That though. Maybe it is worth it to write a non-trivial-macroexpand-all
<Bike>
there's already a couple of those. agnostic-lizard is the one i remember
<Nilby>
there's also sb-walker:macroexpand-all and agnostic-lizard:macroexpand-all which both have the same results
<char[m]>
^ that is a question
<char[m]>
It is odd to me that agnostic lizard implementation would have the same behaviour.
<char[m]>
Obviously if I NIH the non-trivial-macroexpand-all it will work way better /s
<Bike>
i think the only way to make a reliable macroexpand-all would be to convince implementations not to use their own special operators, or at least to provide macroexpansions if they do. otherwise it's a bit of a crapshoot as things keep moving
<char[m]>
Bike: Do you mean like how 'sb-int:named-lambda is a macro unless it is inside (function ...), or are you referring to something else?
<Bike>
well, i mean that once it's inside function, there's no way for a code walker to walk into the lambda unless it knows particularly about sb-int:named-lambda, which is an extension (and an undocumented internal one, even)
<char[m]>
Bike: I'm having a bit of that problem too. I had to add a little #+sbcl.
jolby has quit [Quit: Client closed]
akoana has quit [Quit: leaving]
Lord_of_Life has quit [Ping timeout: 252 seconds]
Lord_of_Life has joined #commonlisp
epony has joined #commonlisp
bitmapper has joined #commonlisp
causal has quit [Quit: WeeChat 3.7.1]
pranavats has left #commonlisp [Disconnected: Hibernating too long]
pranavats has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
pranavats has joined #commonlisp
jealousmonk has quit [Remote host closed the connection]
dre has joined #commonlisp
ttree has quit [Ping timeout: 248 seconds]
igemnace has joined #commonlisp
dipper has quit [Remote host closed the connection]
<phoe>
CCL, CMUCL, LW don't have type errors there
heisig has joined #commonlisp
<beach>
Thank you!
<phoe>
LW has something called CONDITIONS:ARRAY-ERROR as the superclass of the signaled error, but not CL:TYPE-ERROR
<beach>
Good to know!
<phoe>
but, yes, LW signals a CONDITIONS:SUBSCRIPT-OUT-OF-BOUNDS which is a specialized condition type
<beach>
Excellent. I will fill that in.
azimut has quit [Ping timeout: 258 seconds]
dipper has joined #commonlisp
Dynom_ has joined #commonlisp
Dynom_ is now known as Guest5004
enzuru has quit [Ping timeout: 252 seconds]
enzuru has joined #commonlisp
dipper has quit [Ping timeout: 252 seconds]
dipper_ has joined #commonlisp
<mariari>
I've noticed CCL doesn't really trigger type errors unless you fill in object slots, in which case it checks (SBCL oddly doesn't)
cosimone has joined #commonlisp
<phoe>
what do you mean?
<beach>
mariari: It may vary according to the OPTIMIZE qualities.
<phoe>
which type errors, which objects, which slots?
<mariari>
I may very well vary according to optimize qualities, I never got around to trying, I mainly switch between SBCL and CCL when developing.
<mariari>
phoe: when one writes (defclass test-class () ((var :initarg :var :type keyword)))
<mariari>
(make-instance 'test-class :var 3), CCL errors on the default settings
<mariari>
[Condition of type CCL::BAD-SLOT-TYPE-FROM-INITARG], whereas SBCL just accepts it
<phoe>
yes, AFAIK you need higher safety in SBCL for this
<beach>
As I recall, SBCL only relatively recently added type checks for slots of instances of standard classes, and then only when certain OPTIMIZE qualities are hight.
<beach>
*high
<mariari>
It's just interesting given how signatures are checked more stringently in SBCL but class slots less so
<mariari>
with the default optimize qualities that is
<beach>
Yes, I find the combination of SBCL default OPTIMIZE qualities and its safety checks a bit unfortunate.
<beach>
Many newbies keep the default OPTIMIZE qualities and are then surprised that some things are not checked.
<mariari>
I really should play with tweaking my code more OPTIMIZE qualities wise, as I typically just go to CCL to debug, as by default it preserves all let values in the debug frames
<beach>
I set the OPTIMIZE qualities in my .sbclrc to (DEBUG 3) (SPEED 0) (SAFETY 3)
<beach>
But newbies don't think of doing that, for obvious reasons.
<phoe>
I don't DECLARE OPTIMIZE, I globally restrict the compiler policy to high debug/safety so that lisp code cannot set it any lower with e.g. (optimize (safety 0))
<phoe>
sb-ext:restrict-compiler-policy
<beach>
Intersting.
<beach>
*sigh*
<beach>
*Interesting.
<mariari>
I would put debug high, however I believe SBCL turns off TCO at what any debug higher than 1.
<beach>
I find that to be a good thing. Then I am forced to design algorithms that don't eat too much stack space.
<beach>
And I am sure my code will work on implementations without tail-call optimization.
<beach>
Also (SPEED 0) forces me to think more about algorithms and data structures and less about low-level tweaks.
<mariari>
For portability it is a good thing to have TCO disabled, yeah. Interesting, so you try to use it as a guide marker for structural efficiency gains
specbot has quit [Remote host closed the connection]
specbot has joined #commonlisp
specbot has quit [Remote host closed the connection]
minion has quit [Read error: Connection reset by peer]
specbot has joined #commonlisp
minion has joined #commonlisp
makomo has quit [Quit: WeeChat 3.6]
shka has quit [Ping timeout: 252 seconds]
shka has joined #commonlisp
ec has quit [*.net *.split]
triffid has quit [*.net *.split]
anticomputer has quit [*.net *.split]
gxt has quit [*.net *.split]
cosimone` has joined #commonlisp
cosimone has quit [Ping timeout: 252 seconds]
willfish has joined #commonlisp
hrberg has quit [Ping timeout: 276 seconds]
dim has joined #commonlisp
Guest5004 has quit [Ping timeout: 252 seconds]
Guest5004 has joined #commonlisp
random-nick has joined #commonlisp
frgo has joined #commonlisp
dipper has joined #commonlisp
dipper_ has quit [Ping timeout: 252 seconds]
jmdaemon has quit [Ping timeout: 255 seconds]
tasty has quit [Read error: Software caused connection abort]
tasty has joined #commonlisp
tasty has quit [Changing host]
tasty has joined #commonlisp
dre has quit [Ping timeout: 246 seconds]
minion has quit [Remote host closed the connection]
specbot has quit [Read error: Connection reset by peer]
specbot has joined #commonlisp
minion has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
phileasfogg has quit [Read error: Software caused connection abort]
rendar_ has quit [Read error: Software caused connection abort]
zephyr has quit [Read error: Software caused connection abort]
phileasfogg has joined #commonlisp
zephyr has joined #commonlisp
tychoish has quit [Read error: Software caused connection abort]
tychoish has joined #commonlisp
xantoz has quit [Read error: Connection reset by peer]
thuna` has joined #commonlisp
lisp123 has joined #commonlisp
<lisp123>
How big of deal is that a list is defined as being possibly nil
<lisp123>
hmmm scratch that
<lisp123>
(ignore me)
willfish has quit [Quit: WeeChat 3.6]
<pjb>
lisp123: note that in lisp, there's no abstract data type for list.
<lisp123>
pjb, thats where i was thinking
<pjb>
lisp123: (deftype list () `(or null cons))
<lisp123>
i was trying to create one
<pjb>
just chains of cons cells, or the empty list, denoted by nil.
<lisp123>
but concluded that (or null cons) was the best / only way
<pjb>
You could implement your own list type, where you'd define an empty list type and singleton.
semz has quit [Quit: ZNC 1.8.2+deb2build5 - https://znc.in]
semz has joined #commonlisp
rendar has joined #commonlisp
rendar has quit [Changing host]
rendar has joined #commonlisp
<pjb>
lisp123: in a way, in lisp, the empty list exists as (), and is only implemented as CL:NIL.
<lisp123>
(defclass list () ((car :initarg :car :accessor car) (cdr :initarg :cdr :accessor cdr))) doesn't really work
<pjb>
in scheme, () is an empty list by itself, there's no predefined nil symbol.
<pjb>
lisp123: (shadow '(list car cdr)) first
<lisp123>
almost would have to do (defclass list () ((value :initarg :value :accessor value))) and then let value be nil or cons
<thuna`>
Is there a way to force SBCL (and other implementations) to use "/path/to/file" as the source location?
<pjb>
(defclass empty-list (list) ())
<pjb>
thuna`: sb-ext:set-sbcl-source-location
<pjb>
lisp123: or indeed, you can abstract away the whole list with your last defclass.
<phoe>
pjb: also define methods for (SETF CAR) and (SETF CDR) that signal an error, and (warning, optimization) EMPTY-LIST can also be a singleton
<lisp123>
(defclass empty-list (list) ()) -> that works
<thuna`>
pjb: That reads like it sets the path for the sbcl code and not the one I'm compiling?
<thuna`>
Just to be clear, I'm not talking about the location of any implementation. I have an implementation, and I want the code I compile (using that implementation) to point to somewhere else
<pjb>
thuna`: the one you're compiling cannot be changed! You can read it while compiling using the variables *compile-file-pathname**compile-file-truename* and while loading with *load-pathname* *load-truename*.
<pjb>
thuna`: you can specify the file you compile by passing the path to (COMPILE-FILE path).
<thuna`>
Hmm
<pjb>
thuna`: you can also set *DEFAULT-PATHNAME-DEFAULTS*
<pjb>
to a pathname that is merged with the pathname you give to open, load, compile-file, etc.
<pjb>
So if you do (setf *default-pathname-defaults* #P"/my/sources/") (compile-file "foo") it will compile /my/sources/foo.lisp
<thuna`>
Alright, that sounds promising
<pjb>
with (setf *default-pathname-defaults* #P"/my/sources/foo.cl") (compile-file "bar") it will compile /my/sources/bar.cl
semz has quit [Quit: ZNC 1.8.2+deb2build5 - https://znc.in]
<Demosthenex>
hrm. so jexer and a turbovision port are available. jexer means java, the tv one is c++. wish i could find something closer to CL i could use for db forms
<Josh_2>
Mornin :sunglasses:
semz has joined #commonlisp
mrvdb- has joined #commonlisp
mrvdb has quit [Read error: Connection reset by peer]
lisp123 has quit [Ping timeout: 246 seconds]
<Demosthenex>
arg, claw conflicts with sbcl, so i can't even try to load the c++ lib :P
rdrg109_ has quit [Read error: Software caused connection abort]
Guest5004 has quit [Ping timeout: 252 seconds]
Guest5004 has joined #commonlisp
rdrg109_ has joined #commonlisp
cosimone` has quit [Read error: Connection reset by peer]
lisp123 has joined #commonlisp
<thuna`>
Sooo... just thinking out loud: If I add `:perform (compile-op :before (o c) (declare (ignore o c)) (setf *default-pathname-defaults* #P"/path/to/different/file"))' to the asdf recipe, would that set the source properly (as in, in /path/to/different/file as opposed to /path/to/original/file)?
<thuna`>
Of course, this would have to work for non-flat projects as well
<flip214>
does CL mandate whether (LET (...) (defun ...)) replaces the function (and therefore the let bindings around!) when the function body is EQUAL to the last definition? I'd guess yes, or is an implementation allowed to check a compile cache or so?
<beach>
That sounds undecidable in general.
<beach>
The LET binding would have to be evaluated to check that it contains the same value as last time, and run into the halting problem.
<beach>
So I can't imagine any implementation that would attempt anything like that.
<thuna`>
I think I can't put multiple :perform's in a single defsystem with the same operation and qualifier, right?
heisig has quit [Ping timeout: 248 seconds]
<Josh_2>
Is there a library around for interfacing with usb barcode scanners?
<Josh_2>
I think I just have to read a /dev/
<pjb>
thuna`: asdf already manages the paths for you.
<pjb>
flip214: LET DEFUN will produce a closure, not just a function. So even if the body is the same, a new closure need to be produced when evaluated.
<thuna`>
pjb: Well, the thing isI can't use the path asdf uses. I have the sources in a tmp directory, and after I compile them (using make/asdf) I move them to a non-tmp directory.
<thuna`>
is, I*
<pjb>
perhaps. But it's better to keep it simple.
specbot has quit [Remote host closed the connection]
minion has quit [Remote host closed the connection]
lisp123 has quit [Ping timeout: 246 seconds]
specbot has joined #commonlisp
specbot has quit [Remote host closed the connection]
<phoe>
if we are truly trying to be lispy, shouldn't *DEFAULT-PATHNAME-DEFAULTS* be named *PATHNAME-METADEFAULTS* instead?
specbot has joined #commonlisp
minion has joined #commonlisp
frgo has quit [Read error: Connection reset by peer]
frgo has joined #commonlisp
anticomputer has joined #commonlisp
ec has joined #commonlisp
gxt has joined #commonlisp
tyson2 has joined #commonlisp
triffid has joined #commonlisp
random-nick has quit [Ping timeout: 248 seconds]
eddof13 has joined #commonlisp
azimut has joined #commonlisp
<dipper>
hi
josrr has joined #commonlisp
<josrr>
Josh_2: The last time I used one of those, it behaved like a keyboard.
<beach>
Hello dipper.
<dipper>
hi good night beach
<Josh_2>
josrr: Seems that way
<josrr>
Josh_2: maybe read-line will suffice
<Josh_2>
Perhaps
<Josh_2>
Might just use RFID cards instead
<Josh_2>
Might not use anything. Although I certainly have a use for a nice CLIM interface
<pjb>
Reading devices may be surprising sometimes with the stream wrapping. It's not obvious that read-line will be ok. You may have to open it as a binary strea, and to read octet by octet.
dipper has quit [Remote host closed the connection]
<pjb>
or vice-versa, they may have problems with read-sequence, and read-line is better.
<Josh_2>
Well its only a "maybe" project atm
<Josh_2>
I would write a lisp program for managing memberships for a new business a family member may setup
<Josh_2>
depends on the popularity of the event. If its popular and theres plenty of money floating around then there is money for paying for RFID membership cards. Otherwise there is no point me wasting my time developing a CLIM app
<Josh_2>
Could use bios instead, but finger print scanners seem to be pretty slow
doyougnu has joined #commonlisp
<josrr>
Josh_2: if you decide on the barcode reader: the last time I used it, I did it in conjunction with a CLIM text-field gadget.
<Josh_2>
Thanks, thats good to know
<Josh_2>
Seems it easier to get membership cards that are RFID or the swipey kind rather than something with a barcode
skeemer has joined #commonlisp
Sauvin has quit [Ping timeout: 240 seconds]
azimut_ has joined #commonlisp
azimut has quit [Ping timeout: 255 seconds]
Sauvin has joined #commonlisp
eddof13_ has joined #commonlisp
minion has quit [Remote host closed the connection]
specbot has quit [Read error: Connection reset by peer]
minion has joined #commonlisp
skeemer has quit [Quit: Leaving]
minion has quit [Remote host closed the connection]
specbot has joined #commonlisp
minion has joined #commonlisp
frgo_ has joined #commonlisp
thuna` has quit [Ping timeout: 252 seconds]
tychoish- has joined #commonlisp
Guest5004 has quit [Ping timeout: 252 seconds]
_cymew_ has quit [Ping timeout: 255 seconds]
rendar has quit [Ping timeout: 252 seconds]
Cymew has quit [Ping timeout: 272 seconds]
frgo has quit [Ping timeout: 252 seconds]
tychoish has quit [Ping timeout: 252 seconds]
tychoish- is now known as tychoish
Guest5004 has joined #commonlisp
eddof13_ has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
cosimone has joined #commonlisp
<Josh_2>
Seems the RFID scanners work the same way, like a keyboard
causal has joined #commonlisp
causal has quit [Ping timeout: 246 seconds]
<Seok__>
is there a channel for cepl related stuff?
rendar has joined #commonlisp
rendar has quit [Changing host]
rendar has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<phoe>
maybe #lispgames
causal has joined #commonlisp
ttree has joined #commonlisp
<Seok__>
ok
azimut_ has quit [Read error: Connection reset by peer]
azimut has joined #commonlisp
x88x88x has quit [Read error: Software caused connection abort]
heisig has joined #commonlisp
heisig has quit [Client Quit]
x88x88x has joined #commonlisp
Seok__ has quit [Quit: Leaving]
skempf has quit [Read error: Software caused connection abort]
skempf has joined #commonlisp
doyougnu has quit [Ping timeout: 252 seconds]
eddof13 has joined #commonlisp
<Josh_2>
Bike: What is meant by this? "Clasp has the ability to save and restart from memory snapshots."
<Josh_2>
Or what does that mean in practice. Is it just the equiv of save-lisp-and-die?
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eddof13 has joined #commonlisp
<Bike>
Pretty much, yeah
<Josh_2>
aww
<Josh_2>
alright
* edgar-rft
wonders how Clasp saves from memory snapshots
n1to has joined #commonlisp
tyson2 has joined #commonlisp
n1to has quit [Quit: Leaving]
seok has joined #commonlisp
<Bike>
"Clasp can save to and restart from memory snapshots", if you like
eddof13 has quit [Ping timeout: 252 seconds]
tychoish- has joined #commonlisp
tychoish has quit [Ping timeout: 252 seconds]
tychoish- is now known as tychoish
seok has quit [Remote host closed the connection]
cosimone` has joined #commonlisp
cosimone has quit [Read error: Connection reset by peer]
rendar has quit [Ping timeout: 252 seconds]
leeb has quit [Read error: Software caused connection abort]
leeb has joined #commonlisp
causal has quit [Ping timeout: 252 seconds]
causal has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
eddof13 has joined #commonlisp
<yitzi>
Josh_2: Clasp uses slightly different terminology from other implementations b.c. the name "core" is used as a package name. What some implementations call a core, Clasp calls an image. What other implementations call an image Clasp calls a snapshot.
seok has joined #commonlisp
random-nick has joined #commonlisp
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
recordgroovy has quit [Remote host closed the connection]
Bung has joined #commonlisp
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
Bunggg has joined #commonlisp
Bung has quit [Remote host closed the connection]
Bunggg is now known as Bung
sedzcat has joined #commonlisp
Bung has quit [Quit: Leaving]
cage has joined #commonlisp
<Josh_2>
Thanks for the clarification yitzi :)
<Josh_2>
cosimone` has quit [Ping timeout: 252 seconds]
tyson2 has joined #commonlisp
igemnace has quit [Quit: WeeChat 3.7.1]
causal has quit [Ping timeout: 252 seconds]
josrr has quit [Remote host closed the connection]
eddof13 has quit [Ping timeout: 252 seconds]
* phoe
dances because the Wizards of SBCL have just fixed a bugticket he submitted
<ixelp>
GitHub - Shinmera/deploy: Deployment tools for standalone Common Lisp applications
pve has quit [Quit: leaving]
<phoe>
which has its How To section, with four properties you need to add to your system definition, and then you can call asdf:make
<euouae>
Wait, is this fasl? I mean compiled binaries
<euouae>
native binaries that is
<phoe>
no, this is actual executables
<phoe>
as in programs that you can run
<euouae>
nice, thank you for that library. I'll check it out.
tyson2` has joined #commonlisp
<euouae>
Ah, so I should had used (asdf:make :my-project/exe). It's a bit different than test-system which takes :my-project instead of :my-project/tests
tyson2 has quit [Ping timeout: 252 seconds]
<euouae>
But the deploy library seems useful for the purpose of targetting many OSes
<phoe>
and taking care of bundling shared libs too
akoana has joined #commonlisp
<euouae>
oh I see. So it works everywhere
<euouae>
What about a build system? Of course I can ask the users to launch sbcl to build it, but should I just use a makefile?
nij- has quit [Ping timeout: 255 seconds]
<phoe>
or you can order your build system to do two steps
<phoe>
step 1, pull all the dependencies, `(ql:quickload :my-system)`
<phoe>
step 2, generate the executable, `(asdf:make :my-system)`
<phoe>
which means doing something like sbcl --eval "(ql:quickload :my-system)" --eval "(asdf:make :my-system)" --quit
<phoe>
(speaking in unix terms)
<euouae>
Nice. Is there some approach here that is reasonable or do I hand-craft all of the .sh/bat files
<phoe>
there are github actions templates for testing and generating stuff
<euouae>
where?
<euouae>
I've never used a gh action, is there a central place for them?
attila_lendvai has quit [Ping timeout: 252 seconds]
<euouae>
Shinmera seems to have some good stuff eh?
<euouae>
I'll take a look at staple, thanks ixelp
<euouae>
err, thanks phoe
<phoe>
euouae: yes
<phoe>
and no problem,
<phoe>
:D
<euouae>
aah common lisp is so nice
<euouae>
I'm dusting off my parens
<euouae>
Does asdf:make always build optimized?
<phoe>
optimized *how*
<euouae>
Becuase what I have now seems to be a debug build
<euouae>
E.g. loaded with gdb I see C source code with `l`
jolby has quit [Quit: Client closed]
<phoe>
oh, yes - remove all FASLs by removing ~/.cache/common-lisp/ and then rebuild your code with the proper OPTIMIZE settings set globally before ql:quickloading anything
<euouae>
where is OPTIMIZE set?
<euouae>
is it asdf?
<phoe>
in your code!
<phoe>
or, rather, --eval "(declaim (optimize ...))" --eval "(ql:quickload ...)" and so on
<euouae>
Ah oh, declare optimize
<euouae>
got it
dipper has joined #commonlisp
<euouae>
So (declaim (optimize speed)) is giving me speed right?
<phoe>
yep; depending on how much performance you need at the cost of other things, you can tweak all the different optimize qualities from 0 to 3