<random-jellyfish>
I'm defining a test package for my :sl project: (defpackage system-lisp-test
<random-jellyfish>
:cl
<random-jellyfish>
(:use
<random-jellyfish>
:fiveam
<random-jellyfish>
:sl)
<random-jellyfish>
<random-jellyfish>
(:export :test-sl))
danza has joined #commonlisp
<random-jellyfish>
then I enter that package (in-package :system-lisp-test)
<random-jellyfish>
and if I try to define a test suite with (def-suite ...) it doesn't work
<random-jellyfish>
in sbcl if I do for example (def-suite my-suite ...) it says my-suite is unbound
<random-jellyfish>
in ecl it says def-suite function not found
<random-jellyfish>
it's as if fiveam is not used
<random-jellyfish>
even though I specify that the package has to :use it
<random-jellyfish>
am I missing something?
bpanthi977 has joined #commonlisp
<aeth>
Works for me. That is, defpackage, in-package, def-suite works for me
<aeth>
But the errors are the same! Annoyingly.
<aeth>
On a fresh SBCL, (foo bar) will complain that bar is an undefined variable before it complains that foo is an undefined function (so if foo is supposed to be a macro... you'll get an undefined variable first)
<random-jellyfish>
I'm getting these errors when I do (asdf:test-system ...)
<aeth>
So the problem is that you are somehow not USE-ing fiveam
<random-jellyfish>
I am :use-ing it in the package declaration
bpanthi977 has quit [Ping timeout: 248 seconds]
<aeth>
do you use Emacs+SLIME?
<random-jellyfish>
Emacs+Sly
<aeth>
Can you M-. on def-suite? or whatever the Sly equivalent to jump to definition.
<aeth>
Although that may only work if the file compiles successfully in the first place, hmm...
<random-jellyfish>
it won't work if I don't enter the system-lisp-test package from the repl
chomwitt has joined #commonlisp
<random-jellyfish>
if I do that M-. works
<aeth>
my defsystem's test-op's uiop:symbol-call is (uiop:symbol-call :fiveam :run (cl:intern (cl:symbol-name '#:my-package-name) '#:my-tests-name))
<aeth>
although the cl: prefix is probably unnecessary, and just a hint at how many tries it took to get this to work
<aeth>
oh, sorry, it's :fiveam :run!
<random-jellyfish>
yeah that might be the root of the problem in my case
<random-jellyfish>
funny thing is that if I do some C-c C-c magic in emacs+sly at some point I get it to work, but if I start with a clean sbcl I get to the same problem
<aeth>
there's a bunch of things going on
<aeth>
ASDF is magic, fiveam is magic, calling a symbol that doesn't yet exist is magic.
alfiee has joined #commonlisp
alfiee has quit [Ping timeout: 246 seconds]
<|3b|>
you might need to specify more dependencies in your .asd (or just use :serial), i suspect other things depend on package.lisp if nothing else
markb1 has quit [Ping timeout: 272 seconds]
<random-jellyfish>
:serial didn't fix it
markb1 has joined #commonlisp
ghodawalaaman_ has joined #commonlisp
<ghodawalaaman_>
Hello!
<ghodawalaaman_>
Good afternoon!
<beach>
Hello ghodawalaaman_.
alfiee has joined #commonlisp
<beach>
ghodawalaaman_: Are you new here? I don't recognize your nick.
<ghodawalaaman_>
yeah
<beach>
Great! Welcome!
<ghodawalaaman_>
beach: I am Guest75 some days ago we talked here
<beach>
Oh, I see.
<ghodawalaaman_>
I was talking from my school computer right now I am on my own computer
<ghodawalaaman_>
I have also customize the theme of nyxt btw :D
Oddity has quit [Remote host closed the connection]
alfiee has joined #commonlisp
alfiee has quit [Ping timeout: 246 seconds]
Oddity has joined #commonlisp
sellax is now known as sell
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
Guest47 has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
markb1 has quit [Ping timeout: 252 seconds]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
skeemer has quit [Ping timeout: 246 seconds]
jrx has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
markb1 has joined #commonlisp
contrapunctus has joined #commonlisp
alfiee has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
surabax has joined #commonlisp
alfiee has quit [Ping timeout: 268 seconds]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
veqq has quit [Ping timeout: 260 seconds]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
random-jellyfish has joined #commonlisp
random-jellyfish has quit [Changing host]
random-jellyfish has joined #commonlisp
skeemer has joined #commonlisp
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
alfiee has joined #commonlisp
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
alfiee has quit [Ping timeout: 248 seconds]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
markb1 has quit [Ping timeout: 245 seconds]
markb1 has joined #commonlisp
shawnw has quit [Ping timeout: 252 seconds]
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
vardhan has joined #commonlisp
contrapunctus has joined #commonlisp
vardhan_ has quit [Ping timeout: 252 seconds]
josrr has joined #commonlisp
markb1 has quit [Ping timeout: 248 seconds]
vardhan_ has joined #commonlisp
vardhan has quit [Ping timeout: 244 seconds]
markb1 has joined #commonlisp
<random-jellyfish>
in an asdf project I have to put (in-package my-project-package) at the beginning of each file?
Oddity has quit [Read error: Connection reset by peer]
<random-jellyfish>
I thought files are loaded in the order specified and we can use :depends-on for circular dependencies
<random-jellyfish>
I guess don't know how asdf works
<beach>
random-jellyfish: It has nothing to do with ASDF, but with how Common Lisp works.
<beach>
random-jellyfish: If you don't put an IN-PACKAGE form at the beginning of each file, then the current package is going to be the one used when that file is compiled.
<beach>
random-jellyfish: So it is recommended you always put an IN-PACKAGE form at the beginning of each file so that you know precisely what the package is when that file is compiled.
<beach>
random-jellyfish: And no circular dependencies are allowed between files to be compiled or loaded.
alfiee has joined #commonlisp
Oddity has joined #commonlisp
<beach>
random-jellyfish: The dependencies between files in an ASDF system tells ASDF in which order the files should be compiled and loaded.
<jrx>
defpackage depends-on state the *packages* needed by your package. ASDF defsystem declaration state which other system (or libraries) your program requires. And quicklisp knows where to find libraries.
<beach>
jrx: DEFPACKAGE does not have a DEPENDS-ON clause.
<beach>
jrx: And DEFSYSTEM is a definition and not a declaration.
<jrx>
beach: ... yes, I mean :use
alfiee has quit [Ping timeout: 245 seconds]
markb1 has quit [Ping timeout: 260 seconds]
<random-jellyfish>
makes sense
<random-jellyfish>
what if 2 functions depend on each other, each calling each other
<random-jellyfish>
each calling the other*
<random-jellyfish>
will the compiler tolerate that?
<random-jellyfish>
I could actually write an exercise to find out
<beach>
random-jellyfish: Sure. A function F does not have to be defined in order for another function G that calls F to be compiled.
<jrx>
mutual recursion, just be careful to use tail-recursion
<beach>
jrx: Why?
<jrx>
... or your stack will explode
<beach>
jrx: 1. That is true only if the recursion is deep. 2. Common Lisp does not guarantee the existence of tail-call merging.
<jrx>
... so it is necessary to disassemble
<beach>
If you don't care whether your program is portable, you can rely on that.
<beach>
jrx: Please be a bit more careful when you give advice. Recursion is often the only reasonable way to traverse a tree, and if the tree is balanced, the recursion won't be very deep.
<ixelp>
(defun is-even (x) (or (zerop x) (not (is-odd (1- x))))) ;Compiler warnings : ↩ ; In IS-EVEN: Undefined function IS-ODD ↩ => IS-EVEN and (defun is-odd (x) (not (is-even (1- x)))) => IS-ODD finally (is-even 20) => T
<beach>
random-jellyfish: As you can see, those two functions are mutually recursive.
<beach>
random-jellyfish: And you can also see that the compiler gave a warning, but no error, because IS-ODD was referred to (but not called) before it was defined.
<random-jellyfish>
yes, it still gives a warning
<beach>
random-jellyfish: No such warning will happen if the two are in a file.
bpanthi977 has joined #commonlisp
markb1 has joined #commonlisp
<beach>
random-jellyfish: Are you saying that the warning was unjustified? I find it helpful when I make typos due to increasing dyslexia.
<random-jellyfish>
it can be helpful at times, but if it doesn't show up when I build the project that's fine, I don't like unsolvable warnings in my logs
<beach>
random-jellyfish: Like I told you, if both functions are in the same file, there will be no warning.
<random-jellyfish>
yeah it's how it's supposed to be, I like that
msv has joined #commonlisp
bpanthi977 has quit [Ping timeout: 248 seconds]
markb1 has quit [Ping timeout: 244 seconds]
jrx has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.4)]
pranav has quit [Remote host closed the connection]
<random-jellyfish>
when I run! a test suite with fiveam I see that each sub-suite is being run twice, has anybody seen this before?
bpanthi977 has joined #commonlisp
apac has joined #commonlisp
vardhan_ has joined #commonlisp
<random-jellyfish>
Running test suite SL-MAIN-TEST
<random-jellyfish>
Running test suite SL-SYNTAX-TEST
<random-jellyfish>
Running test suite SL-SYNTAX-TEST
<random-jellyfish>
Running test suite SL-DATA-TYPES-TEST
<random-jellyfish>
Running test suite SL-DATA-TYPES-TEST
<random-jellyfish>
...
vardhan has quit [Ping timeout: 244 seconds]
decweb has joined #commonlisp
alfiee has joined #commonlisp
alfiee has quit [Ping timeout: 260 seconds]
bpanthi977 has quit [Ping timeout: 272 seconds]
markb1 has quit [Ping timeout: 252 seconds]
bpanthi977 has joined #commonlisp
jrx has joined #commonlisp
markb1 has joined #commonlisp
shawnw has joined #commonlisp
bpanthi977 has quit [Ping timeout: 248 seconds]
bpanthi977 has joined #commonlisp
<random-jellyfish>
it seems that if I put the sub-suites in separate files they are run twice
<random-jellyfish>
why that happens is beyond me
contrapunctus has left #commonlisp [#commonlisp]
bpanthi977 has quit [Ping timeout: 260 seconds]
alfiee has joined #commonlisp
eddof13 has joined #commonlisp
waleee has joined #commonlisp
eddof13 has quit [Client Quit]
alfiee has quit [Ping timeout: 268 seconds]
contrapunctus has joined #commonlisp
bpanthi977 has joined #commonlisp
alfiee has joined #commonlisp
jrx has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.4)]
<mwnaylor>
Is there a quick way to get sly to apply stickers to ALL the s-expressions contained within a larger s-expression? I'd like to have debugging sessions to work similar to what I've been able to do with instrumenting functions in elisp and Clojure.
alfiee has quit [Ping timeout: 252 seconds]
zxcvz has quit [Quit: zxcvz]
chomwitt has quit [Quit: WeeChat 3.8]
manwithluck has joined #commonlisp
vardhan_ has quit [Ping timeout: 244 seconds]
bpanthi977 has quit [Ping timeout: 260 seconds]
alfiee has joined #commonlisp
cage has quit [Remote host closed the connection]
cage has joined #commonlisp
cage has quit [Excess Flood]
cage has joined #commonlisp
alfiee has quit [Ping timeout: 252 seconds]
bpanthi977 has joined #commonlisp
random-jellyfish has quit [Ping timeout: 272 seconds]
X-Scale has quit [Ping timeout: 272 seconds]
alfiee has joined #commonlisp
alfiee has quit [Ping timeout: 252 seconds]
X-Scale has joined #commonlisp
bpanthi977 has quit [Remote host closed the connection]
bpanthi977 has joined #commonlisp
zwr has joined #commonlisp
McParen has joined #commonlisp
zwr has quit [Ping timeout: 252 seconds]
parjanya has quit [Ping timeout: 268 seconds]
JuanDaugherty has joined #commonlisp
zwr has joined #commonlisp
alfiee has joined #commonlisp
alfiee has quit [Ping timeout: 260 seconds]
Pixel_Outlaw has joined #commonlisp
SAL9000 has joined #commonlisp
Guest40 has joined #commonlisp
Guest40 has quit [Client Quit]
JuanDaugherty has quit [Quit: praxis.meansofproduction.biz (juan@acm.org)]
alfiee has joined #commonlisp
alfiee has quit [Ping timeout: 260 seconds]
dtman34 has quit [Ping timeout: 248 seconds]
dtman34 has joined #commonlisp
dtman34 has quit [Ping timeout: 260 seconds]
dtman34 has joined #commonlisp
attila_lendvai has joined #commonlisp
csos95 has joined #commonlisp
alfiee has joined #commonlisp
alfiee has quit [Ping timeout: 252 seconds]
istewart has joined #commonlisp
kurfen has joined #commonlisp
parjanya has joined #commonlisp
zwr has quit [Read error: Connection reset by peer]
brokkoli_origin has quit [Ping timeout: 260 seconds]
zwr has joined #commonlisp
akoana has joined #commonlisp
dra has joined #commonlisp
dra has quit [Changing host]
dra has joined #commonlisp
csos95_ has joined #commonlisp
alfiee has joined #commonlisp
alfiee has quit [Ping timeout: 252 seconds]
brokkoli_origin has joined #commonlisp
josrr has quit [Remote host closed the connection]
chsasank has quit [Read error: Connection reset by peer]
chsasank has joined #commonlisp
veqq has joined #commonlisp
McParen has left #commonlisp [#commonlisp]
chsasank has quit [Read error: Connection reset by peer]
chsasank has joined #commonlisp
alfiee has joined #commonlisp
alfiee has quit [Ping timeout: 260 seconds]
mishoo has quit [Ping timeout: 248 seconds]
varjag has joined #commonlisp
akoana has quit [Quit: leaving]
olivial has quit [Remote host closed the connection]
olivial has joined #commonlisp
olivial has quit [Remote host closed the connection]
olivial has joined #commonlisp
alfiee has joined #commonlisp
alfiee has quit [Ping timeout: 252 seconds]
Devon has joined #commonlisp
c-clop25 has quit [Ping timeout: 252 seconds]
shka has quit [Quit: Konversation terminated!]
Devon has quit [Ping timeout: 260 seconds]
chsasank9 has joined #commonlisp
alfiee has joined #commonlisp
chsasank has quit [Ping timeout: 252 seconds]
chsasank9 is now known as chsasank
alfiee has quit [Ping timeout: 260 seconds]
cage has quit [Quit: rcirc on GNU Emacs 30.1]
varjag has quit [Remote host closed the connection]
varjag has joined #commonlisp
wbooze has joined #commonlisp
varjag has quit [Ping timeout: 252 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
chsasank has quit [Read error: Connection reset by peer]
chsasank has joined #commonlisp
alfiee has joined #commonlisp
alfiee has quit [Ping timeout: 252 seconds]
attila_lendvai has quit [Ping timeout: 252 seconds]