pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
SaganMan has quit [Quit: WeeChat 1.6]
SaganMan has joined #lisp
fikka has joined #lisp
nowhere_man has joined #lisp
beardio has joined #lisp
Ukari has joined #lisp
energizer has joined #lisp
fikka has quit [Ping timeout: 276 seconds]
beardio has quit [Remote host closed the connection]
SaganMan has quit [Quit: WeeChat 1.6]
beardio has joined #lisp
SaganMan has joined #lisp
beardio has quit [Remote host closed the connection]
beardio has joined #lisp
beardio has quit [Remote host closed the connection]
johnvonneumann_ has quit [Remote host closed the connection]
johnvonneumann_ has joined #lisp
beardio has joined #lisp
beardio has quit [Remote host closed the connection]
beardio has joined #lisp
Guest34 has quit [Remote host closed the connection]
pierpal has quit [Read error: Connection reset by peer]
fikka has joined #lisp
vlatkoB has joined #lisp
nika has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
schjetne has joined #lisp
kmurphy4 has quit [Quit: kmurphy4]
Pixel_Outlaw has quit [Quit: Leaving]
energizer has quit [Quit: ZNC 1.6.3+deb1 - http://znc.in]
schjetne has quit [Ping timeout: 240 seconds]
Mutex7 has joined #lisp
fikka has joined #lisp
quazimodo has quit [Ping timeout: 240 seconds]
SaganMan has quit [Ping timeout: 268 seconds]
energizer has joined #lisp
earl-ducaine has quit [Read error: Connection reset by peer]
<beach>
Good morning everyone!
<beardio>
*morning*
<phoe>
heyyyy
<beach>
beardio: Are you new here? I don't recognize your nick.
<beardio>
yeppers
earl-ducaine has joined #lisp
<beach>
beardio: What brings you to #lisp?
schjetne has joined #lisp
<beardio>
I use Emacs as an editor, started teaching myself lisp, bought ANSI common lisp and Land of Lisp. Came here to learn, while I work thru the exercises.
Quetzal2 has joined #lisp
<beach>
Great! Welcome!
<beardio>
thank you
schjetne has quit [Ping timeout: 256 seconds]
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #lisp
andrei-n has joined #lisp
zmt01 has joined #lisp
zmt00 has quit [Ping timeout: 245 seconds]
Naergon has joined #lisp
Patzy has quit [Quit: WeeChat 2.1]
Patzy has joined #lisp
igemnace has joined #lisp
gigetoo has quit [Ping timeout: 240 seconds]
nickenchuggets has quit [Read error: Connection reset by peer]
rippa has joined #lisp
AndreasO has joined #lisp
AndreasO has quit [Client Quit]
fikka has quit [Ping timeout: 240 seconds]
smurfrobot has quit [Remote host closed the connection]
jinkies has quit [Remote host closed the connection]
schjetne has joined #lisp
macdavid313 has quit [Ping timeout: 256 seconds]
* akkad
finds a ton of hangs in slime on 26 now
fikka has joined #lisp
Kevslinger has joined #lisp
schjetne has quit [Ping timeout: 260 seconds]
gigetoo has joined #lisp
andrei-n has quit [Ping timeout: 265 seconds]
damke_ has joined #lisp
xaotuk has joined #lisp
beardio has quit [Ping timeout: 240 seconds]
d4ryus1 is now known as d4ryus
andrei-n has joined #lisp
pjb has joined #lisp
bendersteed has joined #lisp
makomo has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
shka_ has joined #lisp
random-nick has joined #lisp
fikka has joined #lisp
schjetne has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
nickenchuggets has joined #lisp
nickenchuggets has joined #lisp
nickenchuggets has quit [Changing host]
schjetne has quit [Ping timeout: 256 seconds]
smurfrobot has joined #lisp
xaotuk has quit [Ping timeout: 248 seconds]
Oladon has quit [Quit: Leaving.]
voidlily has quit [Ping timeout: 276 seconds]
smurfrobot has quit [Ping timeout: 260 seconds]
orivej has quit [Ping timeout: 248 seconds]
fikka has joined #lisp
smurfrobot has joined #lisp
igemnace has quit [Read error: Connection reset by peer]
igemnace has joined #lisp
fikka has quit [Ping timeout: 245 seconds]
igemnace has quit [Client Quit]
igemnace has joined #lisp
voidlily has joined #lisp
schjetne has joined #lisp
fikka has joined #lisp
<makomo>
i need some advice regarding interpreter design. i have a "component" (concept of the object language, the one i'm interpreting) which stores variables within it. a component has multiple "processes" which contain code to be executed
<makomo>
i.e. "component" just has a hash table storing pairs (variable-name, variable-value)
<makomo>
i would like to be able to use arbitrary lisp expressions as arguments for certain instructions within the code of a process
<makomo>
and these expressions might contain references to these variables
<makomo>
putting all of the safety issues aside for a moment, what's the best way to evaluate this expression (which can be an arbitrarily complex lisp expression), but within a context where the variables within the component are bound
<makomo>
so for example, say we have a component with the variable a = 1 and we're executing the instruction '(format t "~a" (sqrt a)) within a process of this component
nickenchuggets has quit [Read error: Connection reset by peer]
<makomo>
i disect the instruction, get to the argument '(sqrt a) and somehow EVAL this but within such a context so that a is bound to 1
<phoe>
EVAL uses a null lexical environment
<makomo>
right, which is why for a prototype i generated code around this expression of mine
<phoe>
I think your best bet is to construct an anonymous function form (lambda () (let (...) ...))
<makomo>
i.e. just a let with bound values
schjetne has quit [Ping timeout: 276 seconds]
fikka has quit [Ping timeout: 240 seconds]
<phoe>
then COMPILE and FUNCALL it
<phoe>
this gives you lexical variables which is what you seemingly need
<makomo>
what i did was (eval `(let (,@bindings) ,expr))
<makomo>
this looks like a hack, but why exactly is this "wrong"?
<phoe>
hm
<makomo>
i.e. why would i prefer a lambda and COMPILE
<makomo>
is it really a hack?
<phoe>
not really a hack since you need it anyway
<phoe>
some kind of runtime evaluation
<makomo>
yeah, that's what i'm thinking too. there's no way to get around it
<makomo>
exactly
<phoe>
EVAL should work just as well in that case
bbobb has joined #lisp
fikka has joined #lisp
isBEKaml has quit [Quit: Leaving.]
lumm has joined #lisp
d4ryus has quit [Quit: WeeChat 2.1]
smurfrobot has quit [Remote host closed the connection]
<makomo>
nirved: i've read lots of LoL, but i don't think that chapter covers what i asked
Guest38 has joined #lisp
<phoe>
you basically need to be able to generate code at runtime
<phoe>
and for this, either COMPILE or EVAL is needed
<makomo>
yeah, exactly
d4ryus has joined #lisp
<makomo>
i just thought there might be a "prettier" way, but then again i'm not sure why i feel so wrong about it
fikka has joined #lisp
<pjb>
In general code changes less often than data, so a compiled function is usually more efficient.
<pjb>
If you consider translating to compiled functions, then it may be more efficient to avoid the hash-table for storing the component fields.
Mutex7 has quit [Quit: Leaving]
<pjb>
Also consider that if you have less then 5 fields (or 35 in clisp), a a-list is faster than a hash-table!
<makomo>
pjb: in this case i'm generating code from data though. upon every evaluation i generate the LET that binds the symbols to their current values
<makomo>
or did i misunderstand
<makomo>
pjb: oh so you mean, if i consider compiling instead of interpreting?
<pjb>
That's the point. with eval you have to generate a new let form. But if the body doesn't change, it's not efficient.
<pjb>
Well, we already discussed it, there's no clear-cut distinction between interpretation and compilation.
<makomo>
yup, i see what you meant. so basically convert the process' code into a function?
<pjb>
But in a way, yes, we could say that I'd nudge you toward a transpiler. It's usually easier than a pure interpreter.
<pjb>
Yes.
<makomo>
i usually hear the opposite, i.e. that an interpreter is easier
<pjb>
For example, perhaps you could implement your components as clos objects.
<makomo>
maybe that goes just for the first few steps and after that it just becomes a pain because of "issues" like the above?
<makomo>
pjb: i was thinking of that!
<pjb>
With the MOP, you can do it dynamically, adding/removing slots at run-time.
<makomo>
yes! :D
<makomo>
that would be beautiful
<pjb>
Then the code generated would just use with-slots…
fikka has quit [Ping timeout: 240 seconds]
<makomo>
right now i have 2 classes, one describes the component's class, the other describes the instance of this class
<pjb>
Yes.
<makomo>
glad to know i'm not alone in my thinking
<makomo>
i've always wondered about the circularities that arise
<makomo>
i jumped straight to appendix C :-)
<makomo>
but i have yet to understand it fully
<makomo>
pjb: although, i wouldn't need ability to add/remove slots at runtime in my case, i think. i would convert the component's description into a DEFCLASS and then instantiate a component by using MAKE-INSTANCE
<makomo>
the ability*
lumm has quit [Quit: lumm]
<pjb>
Well, it depends if your "interpreter" is interactive or not, and whether it's possible to redefine the components.
karswell_ has quit [Ping timeout: 240 seconds]
<makomo>
true, but in that case, wouldn't it just reeval the DEFCLASS and redefine the class? i can't redefine components within a simulation so there's no danger of having to update objects of the old class
fikka has joined #lisp
<makomo>
i.e. once the simulation ends, no instances of this class are stored anywhere anymore. redefining the class at that point should be easy right?
fikka has quit [Ping timeout: 240 seconds]
<makomo>
pjb: one thing that's problematic and that's stopping me from implementing a compiler is that these processes are like little threads which use cooperative scheduling
<makomo>
if i were to represent a process' code as a lisp function, how would i suspend and later on resume the function
<makomo>
i would need something like coroutines but that doesn't exist within lisp (there are libraries though) :^(
Negdayen has quit [Ping timeout: 256 seconds]
<makomo>
within the interpreter, i keep an "instruction pointer" into the list of the process' instructions
<makomo>
any advice regarding that?
<pjb>
makomo: the lisp function doesn't need to match the structure and control flow of your source function.
smurfrobot has joined #lisp
fikka has joined #lisp
<makomo>
that's true, i could generate some ifs or use a tagbody to jump to the point where i was suspended
<pjb>
If you use cooperating scheduling, then you would generate the lisp code in such a way that the function would exit each time it wants to relinquish the cpu.
<makomo>
pjb: and what about resuming?
<makomo>
something like what i said above, with a tagbody?
<pjb>
Yes. You would enter the function multiple times. It can keep track of the state in a closure.
<pjb>
Perhaps you could directly use arnesi to deal with those details.
<makomo>
mhm. it would be interesting to compare the two in performance
<pjb>
On the other hand, in this situation, I would consider generating lower level code to a virtual machine.
<makomo>
hm why? then i'm back to writing a VM which i wanted to avoid. i'm rewriting a C++ project, and i want to take advantage of being able to transform the component models into lisp and compile that
fikka has quit [Ping timeout: 276 seconds]
<makomo>
instead of compiling into some bytecode and implementing my own VM
<makomo>
i could probably do both and compare though, but i'm interested in why you would use a VM
<pjb>
makomo: notice that you can also use threads in CL.
<pjb>
Are you in a situation where you have a lot of coroutines?
<makomo>
well, the models aren't that big usually, i.e. the number of processes is usually less than, say, 20
skeuomorf has joined #lisp
<pjb>
I find it easier to implement the semantics in a VM when the control flow is very different. You can run the VM step by step whenever you want, and do other things in between two steps.
<pjb>
makomo: with that number of coroutines, you can easily map them to threads.
<makomo>
hm, that's an interesting idea
<pjb>
Then either synchronize them to avoid parallelism, or let them lose to benefit from multi-core.
<pjb>
(but coroutines may assume exclusion).
<makomo>
what does "exclusion" mean in this context?
<makomo>
mutual exclusion?
<pjb>
yes.
<makomo>
mhm
damke has joined #lisp
<pjb>
If you have i:=i+1 in one coroutine and i:=i-1 in the other, coroutines knowing they can't run at the same time, since they're scheduling cooperatively, you don't have any problem. But if you translate it to threads running on multicore, then you can have inconsistents updates of i.
EvW has joined #lisp
<makomo>
yup
<pjb>
Where one thread computes i+1, the other i-1, and one of the two gets to update last.
macdavid313 has joined #lisp
<pjb>
In that case, you want to synchronize the threads so only one of them runs at a given time.
<pjb>
This is easy to do in your implementation of yield.
smurfrobot has quit [Remote host closed the connection]
<pjb>
The advantage of using threads still, is that you have a stack and a PC for each one of them.
<makomo>
exactly, i was about to say the same thing
<makomo>
hm very cool
damke_ has quit [Ping timeout: 244 seconds]
lumm has joined #lisp
<makomo>
so there are 3 options, (1) a coroutines library, (2) threads and (3) do it manually by generating appropriate code and keeping track of state, basically replicating what (1) does for me
<pjb>
Yep.
<makomo>
and since this gets compiled into lisp, any ideas on what (and how) debugging facilities to provide
<pjb>
There's cl-cont too, it may suit you better than arnesi.
<makomo>
i've seen both before but never used them. i'll have to give it a go
<makomo>
on the topic of debugging -- providing stepping functionality to execute every coroutine until it yields would be trivial
<makomo>
however, providing debugging functionality to step over individual instructions within a process (i.e. on just on "yield boundaries") would take some effort and would require special support from the compiler right?
<makomo>
i.e. not just on "yield boundaries"*
<makomo>
the compiler in this case being my component compiler
andrei-n has quit [Ping timeout: 268 seconds]
<makomo>
it would have to add special code to do a "special yield" after every instruction so that we can inspect the component's state and what not
<makomo>
these yields wouldn't be used to let another coroutine run, they would just pause the execution of the current coroutine for debugging purposes
fikka has quit [Ping timeout: 256 seconds]
<pjb>
For debugging, you can "instrument" the generated code. Ie. insert debugging code.
<pjb>
This is what I do in cl-stepper, in that case, by shadowing and re-implementing the standard special operators or main macros.
schjetne has joined #lisp
<pjb>
Indeed, those would be kinds of yields. yield-to-debugger/tracer
<makomo>
great!
<makomo>
pjb: thanks a lot for the discussion and the helpful comments :-)
<pjb>
you're welcome!
pierpal has joined #lisp
robotoad has quit [Quit: robotoad]
damke has quit [Read error: Connection reset by peer]
damke has joined #lisp
<beach>
Currently, I use the term "code object" for an object that contains native instructions to be executed, but also information for the debugger and the garbage collector such as a mapping from values of the program counter to a register map, to source location, to live variables and where they are located, etc. But I am not happy with the term "code object", so I am looking for a shorter name. Any suggestions?
robotoad has joined #lisp
myrkraverk has quit [Ping timeout: 276 seconds]
<Bike>
"routine"? but really it seems fine to me.
<beach>
OK.
myrkraverk has joined #lisp
<beach>
Several functions can share the same code object, so that a single code object is created as the result of loading a FASL file.
Guest38 has quit [Remote host closed the connection]
<beach>
I guess it's the word "object" that I don't like. Perhaps "code descriptor" instead?
<Bike>
it's not just a descriptor, is it? it has the actual instructions
<beach>
It does, yes.
mrcom_ has quit [Quit: This computer has gone to sleep]
schjetne has quit [Ping timeout: 265 seconds]
<beach>
OK, I'll keep "code object" for now.
<Bike>
i think sbcl uses the same term for a similar thing
fikka has joined #lisp
<_death>
pile-of-code, food-for-machine-thought, machbeef, soylent-biege.. or just program
damke_ has joined #lisp
EvW has quit [Ping timeout: 260 seconds]
pjb has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 276 seconds]
hhdave has joined #lisp
damke__ has joined #lisp
damke has quit [Ping timeout: 244 seconds]
pjb has joined #lisp
damke_ has quit [Ping timeout: 244 seconds]
hhdave_ has joined #lisp
shangul has joined #lisp
<phoe>
bobby
<phoe>
block of bulked binary ynstructions
hhdave has quit [Ping timeout: 265 seconds]
hhdave_ is now known as hhdave
<shangul>
bee boo
schjetne has joined #lisp
damke__ has quit [Ping timeout: 244 seconds]
damke__ has joined #lisp
EvW has joined #lisp
trittweiler_ has joined #lisp
skeuomorf has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
schjetne has quit [Ping timeout: 265 seconds]
wxie has joined #lisp
damke has joined #lisp
fiveop has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
damke__ has quit [Ping timeout: 244 seconds]
damke_ has joined #lisp
damke has quit [Ping timeout: 244 seconds]
wxie has quit [Ping timeout: 268 seconds]
damke has joined #lisp
DemolitionMan has joined #lisp
Folkol has joined #lisp
hhdave has quit [Quit: hhdave]
damke_ has quit [Ping timeout: 244 seconds]
Kevslinger has quit [Quit: Connection closed for inactivity]
fikka has joined #lisp
damke_ has joined #lisp
TCZ has joined #lisp
surya has quit [Read error: No route to host]
damke has quit [Ping timeout: 244 seconds]
damke__ has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
damke_ has quit [Ping timeout: 244 seconds]
bendersteed has quit [Ping timeout: 256 seconds]
TCZ has quit [Quit: Leaving]
scymtym has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
damke__ has quit [Ping timeout: 244 seconds]
EvW has quit [Ping timeout: 255 seconds]
zaquest has quit [Ping timeout: 256 seconds]
robotoad has quit [Quit: robotoad]
damke__ has joined #lisp
damke has joined #lisp
gigetoo has quit [Ping timeout: 256 seconds]
gigetoo has joined #lisp
damke__ has quit [Ping timeout: 244 seconds]
damke_ has joined #lisp
<fiveop>
When I run slime and start to edit a common lisp file, the editor freezes in certain situations with the message "error in process filter: progn: Wrong number of arguments: (0 . 1), 2". It does not happen before I run M-x slime .
<fiveop>
What did I update, but shouldn't have? Or what should I update that I did not?
varjag has joined #lisp
<beach>
I have seen more reports of new problems with recent Emacs and SLIME.
damke has quit [Ping timeout: 244 seconds]
<beach>
Don't know what to do about it, though.
<_death>
(setq debug-on-error t) and debug..
<fiveop>
thanks
<fiveop>
I googled it and it seems to happen with other emacs packages as well. But in my case slime seems to be the culprit
<drmeister>
That is the original cl-jupyter by Fredrick Peschanski
<drmeister>
We have been working on it for a year and added jupyter widgets support.
<drmeister>
I am submitting a pull request to Fredrick with our changes to cl-jupyter that add hooks for jupyter widgets, Tab completion and Shift-Tab completion today.
<drmeister>
So soon you should be able to get it from the URL above and from github.com/clasp-developers/cl-jupyter-widgets
<drmeister>
Give it another week and this should be in place.
Kundry_Wag has quit [Remote host closed the connection]
TCZ has quit [Quit: Leaving]
Kundry_Wag has joined #lisp
TCZ has joined #lisp
damke_ has quit [Ping timeout: 244 seconds]
fikka has joined #lisp
cage__ has quit [Remote host closed the connection]
Kundry_Wag has quit [Ping timeout: 240 seconds]
<drmeister>
We are also adding widgets for molecular visualization and plotting.
fikka has quit [Ping timeout: 265 seconds]
beardio has quit [Remote host closed the connection]
beardio has joined #lisp
lnostdal has quit [Ping timeout: 248 seconds]
cage_ has joined #lisp
quazimodo has quit [Ping timeout: 268 seconds]
schjetne has joined #lisp
quazimodo has joined #lisp
smurfrobot has joined #lisp
megalography has quit [Ping timeout: 240 seconds]
smurfrobot has quit [Ping timeout: 245 seconds]
orivej has quit [Ping timeout: 240 seconds]
<random9899>
what does GC invariant lost mean ?
<beach>
random9899: That your implementation has a defect.
smurfrobot has joined #lisp
nowhere_man has joined #lisp
TCZ has quit [Quit: Leaving]
smurfrobot has quit [Ping timeout: 260 seconds]
pierpal has quit [Ping timeout: 255 seconds]
siraben has quit [Ping timeout: 248 seconds]
<p_l>
or that someone set it a bomb (likely a broken foreign library scribbled over something)
<drmeister>
phoe: Thank you - we will switch to that.
<phoe>
drmeister: the API is trivial (pun indented) enough for you to be able to make the switch painlessly.
fikka has quit [Ping timeout: 256 seconds]
random-nick has quit [Read error: Connection reset by peer]
fikka has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
hjek has left #lisp [#lisp]
les` has quit [Ping timeout: 276 seconds]
les has joined #lisp
fikka has joined #lisp
lumm has quit [Quit: lumm]
fikka has quit [Ping timeout: 256 seconds]
nickenchuggets has joined #lisp
random-nick has joined #lisp
karswell_ has quit [Ping timeout: 256 seconds]
skidd0 has joined #lisp
pierpal has quit [Ping timeout: 265 seconds]
fikka has joined #lisp
schjetne has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
megalography has quit [Ping timeout: 256 seconds]
lumm has joined #lisp
dented42 has joined #lisp
smurfrobot has joined #lisp
rpg has joined #lisp
megalography has joined #lisp
fikka has joined #lisp
lumm has quit [Ping timeout: 256 seconds]
Xof has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
pierpal has joined #lisp
himmAllRight has joined #lisp
schjetne has quit [Ping timeout: 260 seconds]
epsyloN has quit [Quit: ZNC 1.6.3+deb1 - http://znc.in]
<drmeister>
What does it take to get quicklisp/asdf to find a system in the ~/quicklisp/local-projects/cl-jupyter-widgets/ directory?
lumm has joined #lisp
fikka has joined #lisp
<drmeister>
I'm rearranging things and I always just put the directory like foo in ~/quicklisp/local-projects/foo and define a ~/quicklisp/local-projects/foo/foo.asd file.
<drmeister>
I'm doing that now and I keep getting this:
<rpg>
drmeister: If all of the files are in source, then the :pathname option should be given to the system, rather than put in :components.
<drmeister>
I'll give that a try.
<drmeister>
random9899: What was that for?
<rpg>
Just to confirm: the asd file is in ~/quicklisp/local-projects/cl-jupyter-widgets/ and lisp files are under ~/quicklisp/local-projects/cl-jupyter-widgets/src/
<rpg>
right?
<drmeister>
rpg: Yes - that is what I'm trying at the moment.
DemolitionMan has joined #lisp
<drmeister>
~/quicklisp/local-projects/cl-jupyter-widgets/cl-jupyter-widgets.asd and ~/quicklisp/local-projects/cl-jupyter-widgets/src/* <--- all source files.
<rpg>
OK, my fix is likely necessary, but not sufficient... ASDF wouldn't have found the source files, but that's a later problem than it not being able to find the defsystem.
lumm has quit [Ping timeout: 245 seconds]
<rpg>
drmeister: There aren't any logical pathnames involved, are there?
<drmeister>
Same error when I move :pathname "src" into the defsystem and out of :components
<drmeister>
Here is the directory structure...
lumm has joined #lisp
<rpg>
drmeister: Right -- that's a problem, but it isn't your problem (yet).
<drmeister>
random: Doesn't quicklisp do that automagically for ~/quicklisp/local-projects?
<rpg>
drmeister: I'm pretty sure that this is not a problem with your .asd file.
<random9899>
drmeister: and in my quicklisp there were no output-translation from local-projects to .cache/common lisp either....
<rpg>
drmeister: Have you restarted lisp after installing this system? The reason I ask is that I believe that ASDF eagerly searches for system definitions. But.... I thought it offered a continue restart that would re-initialize. I'm afraid I don't know much about how the Quicklisp wrapper for ASDF works.
<drmeister>
random9899: Hmmm, I'll be surprised - I have many local-projects directories because clasp has many updated asdf/quicklisp systems that contain implementation specific changes. They all "just work".
<drmeister>
How annoying
<random9899>
hmmm, that's strange then
<drmeister>
rpg: I've been shutting clasp down and starting it up with every change I make.
<drmeister>
I'm going to wipe out the cache and try again.
<skidd0>
newbie question: I'm trying to play with a quicklisp package in slime. I've compiled the (ql:quickload "package") and then tried to compile an example (defun ...) but the slime repl says that non of the example's functions are defined (the functions that should be compiled from the "package"). Am I doing this wrong?
<rpg>
drmeister: I'm pretty sure that means that the problem is in quicklisp's search, and not in ASDF's search.
<skidd0>
random9899: I did a (ql:quickload :croatoan)
<skidd0>
then a used slime to compile the example function
<random9899>
and then copy-pasted the example defun into your repl i assume
<skidd0>
and the repl got mad
<skidd0>
not straight into the repl, no
<skidd0>
pasted into a file
<skidd0>
then slime compiled that to the repl
<skidd0>
which spat back the errors
<skidd0>
saying nothing was defined
<random9899>
skidd0: you have to be in the package :croatoan too
<skidd0>
oh
<rpg>
drmeister: sorry LIST-LOCAL-PROJECTS
<skidd0>
so that's the (:in :croatoan)>
<skidd0>
?
<skidd0>
very new to lisp, sorry
<random9899>
skidd0: do (in-package :croatoan) in a fresh repl and then copy-paste your example again
<skidd0>
do i need to also quickload?
<random9899>
skidd0: yes
<skidd0>
or does in-package handle that
<skidd0>
ah
<rpg>
drmeister: I think you could also try quicklisp-client::write-asdf-manifest-file "/tmp/manifest.txt" and see what system files QL knows of.
<random9899>
you load it, then switch to that package in order to be able to use it's symbols
<random9899>
otherwise if you do your example from top-level then you have to change most of the symbols to croatoan::blah
<random9899>
and you have to know which ones exactly
<White_Flame>
if you do (use-package :croatoan), then that will import all public symbols into CL-USER for you to use, too
<skidd0>
i just got a croatoan does not designate any package
<random9899>
cause not every symbol comes from croatoan some are just cl, it might also use other packages so other namespaces maybe involved
<skidd0>
i see
<rpg>
drmeister: If these tests reveal that QL isn't finding your system definition, I'd suggest you poke into the guts of Quicklisp-client:LIST-LOCAL-PROJECTS Try tracing ENSURE-SYSTEM-INDEX inside that. That will show what directories QL is looking in. I'm afraid that's all I can come up with.
<drmeister>
Thank you - that is very helpful.
<random9899>
drmeister: try my init too
<rpg>
I *think* this is a QL bug (or, I suppose it could be a clasp bug) rather than an ASDF bug, but if you find otherwise, feel free to contact me. I'm going out for a while...
<drmeister>
I am currently recompiling quicklisp/setup.lisp Clasp's compiler is a bit slow.
<random9899>
drmeister: the begin of only ofc....
<skidd0>
so the order is (ql:quickload :croatoan) then (in-package :croatoan) then (defun ..ex..)?
<skidd0>
cuz the (in-package :croatoan) is saying that it does not designate any package
<random9899>
skidd0: or (ql:quickload :croatoan) then (use-package :croatoan) then your (defun....)
<skidd0>
oh i'll try that
<Xach>
drmeister: I have Ideas
<random9899>
skidd0: right it might say that cause not every system is a package, some systems are just compositions of packages
<skidd0>
well now it's saying there are name conflicts
<drmeister>
random9899: Thank you - I will. This isn't a completely naive system. I've been using quicklisp successfully for years. It's just today - while I try to separate out some code that should be different systems that I ran into this problem of quicklisp not finding things that I thought it should find
<drmeister>
Hi Xach
pierpal has quit [Read error: Connection reset by peer]
<skidd0>
but, i also did not see a new croatoan terminal thing. I'll look into that myself though. Thank you!
<random9899>
and the system name does no reflect the package name at all....
<random9899>
so in that case you lookup package.lisp
<skidd0>
and find the name
<drmeister>
Hmmm, it lists this... #P"/Users/meister/quicklisp/local-projects/cl-jupyter-widgets/nglview/nglview.asd"
<skidd0>
and use that with in-package
<rpg>
drmeister: There's no listing for cl-jupyter-widgets.asd in that list of local projects, so that search is failing.
<skidd0>
?
<Xach>
drmeister: in some cases the automagic scanning can't work, but (ql:register-local-projects) can. Are you able to load it after you do (ql:register-local-prjects)?
<drmeister>
That is a system definition file that must be over riding the one I want.
<random9899>
yes skidd0
<skidd0>
cool, thank you again
<drmeister>
Xach: I am - sorry to be a bit slow - I'm following some trains of my own thought first.
<random9899>
aaah, there's ncurses stuff out there eheh
<drmeister>
I'm separating several asdf systems that were all in the same directory hierarchy. I think I better move out all of the directories that contain .asd files and then try again.
<Xach>
drmeister: please don't
<skidd0>
random9899: i'm using croatoan for the ncurses stuff
<Xach>
drmeister: you may of course do what you like, but it will take more time than if you try what I ask
<skidd0>
i'm trying, currently, to get around an issue with read-char
<rpg>
drmeister: there aren't any symlinks involved, are there?
<Xach>
drmeister: then please try (asdf:find-system "cl-jupyter-widgets")
<drmeister>
(ql:register-local-projects) done
<drmeister>
Then (asdf:find-system "cl-jupyter-widgets") --> #<system "cl-jupyter-widgets">
asarch has joined #lisp
<drmeister>
But this is after I renamed cl-jupyter-widgets/nglview/nglview.asd to cl-jupyter-widgets/nglview/nglview.asd.backup
<drmeister>
FYI
<Xach>
drmeister: yes, just like how if you throw salt over your shoulder you will not have bad luck
<drmeister>
I could change it back if you think that would be illuminating.
<random9899>
change it back and try again.....
<Xach>
nglview.asd has no impact on cl-jupyter-widgets.asd in any way
<drmeister>
Ok.
<Xach>
there is no conflict or shadowing or any other effect
<drmeister>
Ok, I am following your lead here.
<drmeister>
What did (ql:register-local-projects) do? Did it save any state in the quicklisp directories?
<Xach>
drmeister: automagic scanning works by comparing top-level timestamps of an index file and the top-level directory. it does not detect "deep" changes.
<drmeister>
Ok
<Xach>
drmeister: register-local-projects forces a full check of all subdirectories regarless of index file state.
<random9899>
aha
<Xach>
it is the thing to try if magic does not magic
<drmeister>
Ok. So if I run into trouble like this again - would you recommend invoking (ql:register-local-projects) ?
<skidd0>
okay i'm back again.. so I compiled the (defun test1 ...), it worked. but! when I (test1) in the repl, it's undefined
bbobb has quit [Quit: bbobb]
<random9899>
skidd0: you always say compiled, what's that ?
<skidd0>
uh
<skidd0>
my understanding is
voidlily has quit [Remote host closed the connection]
<skidd0>
SLIME takes a region of code from a file im writing in
<skidd0>
and compiles it with the REPL
<skidd0>
so it's "in the repl"
<skidd0>
like i can normally compile a (defun ...)
<skidd0>
then call that (fun) in the REPL
<skidd0>
and see it work
Inumedia has joined #lisp
Inumedia has quit [Changing host]
Inumedia has joined #lisp
Inumedia has joined #lisp
gigetoo has quit [Ping timeout: 268 seconds]
gigetoo has joined #lisp
<Inumedia>
Hi, I'm trying to understand a two-line segment from example code that isn't quite making sense to me (coming from C-Style world), https://pastebin.com/cJR50ZpK could someone explain what the :key does and how the second line modifies b?
voidlily has joined #lisp
<White_Flame>
what language is that? this channel is for Common Lisp specifically
<Inumedia>
Ah, sorry, it has the file extension .lsp, I assumed it was Common Lisp.
zazzerino has quit [Remote host closed the connection]
* drmeister
is a man of science.
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<drmeister>
Xach: What is your opinion on ~/quicklisp/local-projects/cl-jupyter-widgets.asd or ~/quicklisp/local-projects/src/cl-jupyter-widgets.asd where all of the source files are under ~/quicklisp/local-projects/src/* ?
pierpal has joined #lisp
schjetne has joined #lisp
smurfrobot has joined #lisp
vlatkoB has quit [Remote host closed the connection]
Inumedia has quit [Quit: Page closed]
<skidd0>
random9899: my issue was that calling (test1) wasn't in the package. calling (de.anvi.croatoan:test1) works
<skidd0>
the debugger says that TEST1 is not external, but I can [continue] use symbol anyway, and it'll work
<skidd0>
thanks man
smurfrobot has quit [Ping timeout: 256 seconds]
<MichaelRaskin>
you can put :: to explicitly access non-external symbol
megalography has quit [Ping timeout: 260 seconds]
<skidd0>
oh sweet, good to know
<skidd0>
thanks
<skidd0>
i'm running into an issue now that the SLIME repl doesn't like that the terminal/screen croaton makes uses colors. Iguess slime's repl's "terminal" in emacs doesn't use color
<skidd0>
but, running sbcl in it's own normal terminal then loading the test1 file and evaluating it works
Jesin has joined #lisp
<random9899>
skidd0: if it's external you can use <package>:test1 otherwise you have to use <package>::test1
<random9899>
skidd0: or import it via (in-package :cl-user) (import '<package>::test1)
<skidd0>
and to make it external, i have to :export
<skidd0>
the symbol
<skidd0>
which would mean (:export :test1)?
<random9899>
ya but not you usually, the symbol provider has todo it
<skidd0>
right
jmercouris has joined #lisp
<skidd0>
in the package
<random9899>
other than you import it first and the reexport it
<skidd0>
which, since i'm defining the test1 myself, means i have to export it?
<skidd0>
hey while i'm here, are there any common pitfalls new lispers fall into?
<random9899>
many
<skidd0>
specifically, i'm trying to avoid writing lisp in the pythonic way i'm used to
megalography has joined #lisp
<random9899>
there are many pitfalls i think
<skidd0>
i want to write lisp in a lisp way
<skidd0>
well whaat's the biggest one you fell into when you were a newbie
<skidd0>
?
<skidd0>
perhaps this is to early to ask, for me
<skidd0>
as i'm still barely dipping my toes in the kiddie pool
<skidd0>
i don't want to get scared of the deep end
<MichaelRaskin>
Well, every time you use setf/setq you might want to ask yourself if it should be setq or let/let*
<random9899>
there's also pure set
<skidd0>
okay, and that's because let defines a var in a scope
smurfrobot has joined #lisp
<skidd0>
and setf can be on globals?
<skidd0>
\/specials?
<random9899>
setq == quotes the argument
<jmercouris>
any common lisp project management software out there?
andrei-n_ has quit [Quit: Leaving]
<MichaelRaskin>
Nope
<random9899>
setq bla value == setf 'bla value
<MichaelRaskin>
Nope
<MichaelRaskin>
setf doesn't need that quote
<MichaelRaskin>
And setq doesn't add it
xaotuk has joined #lisp
<MichaelRaskin>
setq is a special form that directly sets the value in a simple variable
<random9899>
is that the same in all lisps ?
<MichaelRaskin>
setf is a macro that can be taught to set more interesting locations, like (setf (elt l 3) 0)
<MichaelRaskin>
I don't think so, Scheme uses set!
<_death>
it's more like (set 'bla value), except that since lexical variables were introduced it's not
<MichaelRaskin>
And Common Lisp set… well, read the Hyperspec page of it. When you feel you are ready to read it once again, read it again. If you want to use it — well, maybe it does fit your use case.
<random9899>
ya i thought that too, that setq == set quote, but it's a special form
<MichaelRaskin>
But it is deprecated
<_death>
some lisp dialects also had setqq, which quoted both arguments
<MichaelRaskin>
I mean set is deprecated
<MichaelRaskin>
setq and setf are fine
<MichaelRaskin>
By the way, let*/let can create a dynamic-extent binding for a special variable
smurfrobot has quit [Ping timeout: 265 seconds]
<MichaelRaskin>
So you can use let* to temporarily change globals
<random9899>
so what's the difference betweeen declare special and declare dynamic-extent in a let/let* then ?
xaotuk has quit [Ping timeout: 245 seconds]
<random9899>
wait, dynamic-extent in a lexical scope will make it's stack in-place rewritable ?
<drmeister>
Xach random9899 rpg - thank you - I'm up and running now.
<random9899>
cool drmeister
<random9899>
so stack won't grow
<random9899>
no consing
pierpal has quit [Read error: Connection reset by peer]
smurfrobot has joined #lisp
pierpal has joined #lisp
Quetzal2 has quit [Quit: ?? Bye!]
smurfrobot has quit [Ping timeout: 245 seconds]
schjetne has quit [Ping timeout: 265 seconds]
<aeth>
(setf (elt l 3) 0) is understating what setf can do. You can define your own setf in three ways. defun (setf foo), defsetf foo, and define-setf-expander. And defsetf is elaborate. You can take in multiple values, e.g. (setf (foo 42) (values 1 2 3 4))
cage_ has quit [Quit: Leaving]
<random9899>
i never got to defsetf or define-setf-expander yet
<random9899>
someday i might tho
norfumpit has quit [Quit: norfumpit]
Mutex7 has joined #lisp
norfumpit has joined #lisp
<aeth>
I use it for array stuff. You can make fairly elaborate accessors (reader/writer pairs). The reader (the function) returns multiple values. The setf sets when given multiple values. So you can say (setf (array-row-of-4 foo 42) (array-of-4 bar)) and that will set (foo 42 i) where i is 0 through 3 with the first four elements of bar.
<aeth>
(It doesn't actually have to be a row of length 4 or an array of length 4... They'll just take/set the first four.)
pierpa has joined #lisp
loli has joined #lisp
smurfrobot has joined #lisp
<aeth>
Unfortunately, it doesn't seem to work with &rest so you can't have an arbitrary number of values
smurfrobot has quit [Ping timeout: 276 seconds]
<random9899>
and why is that ?
mrcom_ has joined #lisp
smurfrobot has joined #lisp
robotoad has quit [Read error: Connection reset by peer]
robotoad has joined #lisp
<aeth>
I'm not sure. Putting in a printf in the middle, it always is (#:new1 #:new2) no matter how many values are fed in. At least in SBCL. And in CCL (#:G25710 #:G25711)
smurfrobot has quit [Ping timeout: 260 seconds]
ZombieChicken has joined #lisp
<aeth>
CLISP won't even compile it. Same with ECL.
shka_ has quit [Ping timeout: 268 seconds]
vhost- has quit [Ping timeout: 240 seconds]
Jesin has quit [Quit: Leaving]
robotoad has quit [Quit: robotoad]
robotoad has joined #lisp
jmercouris has quit [Ping timeout: 268 seconds]
hhdave has joined #lisp
schjetne has joined #lisp
hhdave has quit [Client Quit]
varjagg has joined #lisp
varjagg has quit [Remote host closed the connection]
varjag has quit [Read error: Connection reset by peer]
kmurphy4 has quit [Quit: kmurphy4]
random-nick has quit [Ping timeout: 240 seconds]
vhost- has joined #lisp
xrash has joined #lisp
xrash has quit [Remote host closed the connection]
robotoad has quit [Quit: robotoad]
anon has joined #lisp
anon has joined #lisp
anon has quit [Changing host]
anon is now known as Guest53082
johnvonneumann_ has quit [Ping timeout: 240 seconds]
mflem has quit [Read error: Connection reset by peer]
ricky___ has joined #lisp
ricky___ is now known as ricky____
<ricky____>
hello, all. can anyone tell me why this let form returns NIL? `(defparameter instruction-map (let (ht (make-hash-table)) ht))`
<beardio>
is it possible to sort a list '(a n b h l k e)...I know sort on a list of integer with the predicate #'<, I am trying to figure out how for characters