Xach changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook>
perrierjouet has joined #commonlisp
ec_ has joined #commonlisp
lucerne has quit [Quit: Ping timeout (120 seconds)]
lucerne has joined #commonlisp
gioyik has joined #commonlisp
Yehowshua has joined #commonlisp
<Yehowshua> pzmq provides binding to the zmq C library. I'm trying to install pzmq with `(ql:quickload "pzmq")`, and ql eventually invokes clang which complains in can't find zmq headers. I know where the zmq header are...
<Yehowshua> any insight on how to point lisp to where they are?
<moon-child> perhaps you do not have zmq headers
<moon-child> you may need to install a 'zmq development libraries' package. This depends on your operating system
gioyik has quit [Ping timeout: 276 seconds]
<Yehowshua> I definetlyl have the headers
<moon-child> oh, sorry, you wrote 'I know where teh zmq header are', and I misread that as 'I don't know...'
<Yehowshua> lisp calls clang, I want to add an option to lisps's call of clang to piont lisp to where the headers are
<Yehowshua> ah
<Yehowshua> fixed it - on mac apple silicon, hombrew was placing the libs and headers in the wrong place
<Yehowshua> I fixed it manually with symbolic links
<Yehowshua> although still wish I could somehow pass prefix options to clang
<Yehowshua> in lisp
Guest92 has joined #commonlisp
gioyik has joined #commonlisp
ec_ has quit [Ping timeout: 276 seconds]
srhm has quit [Read error: Connection reset by peer]
srhm has joined #commonlisp
Yehowshua has quit [Ping timeout: 256 seconds]
gioyik has quit [Ping timeout: 276 seconds]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 268 seconds]
gioyik has joined #commonlisp
<Guest92> how can I use asdf in a --script?
<Guest92> I have (require "asdf") in my sbclrc
gioyik has quit [Ping timeout: 276 seconds]
random-nick has quit [Ping timeout: 265 seconds]
<Alfr> Guest92, sbcl's --script toplevel-option implies --no-userinit
<Guest92> I see that
<Guest92> and --no-sysinit
gioyik has joined #commonlisp
gioyik has quit [Ping timeout: 276 seconds]
Guest85 has joined #commonlisp
<akoana> I use something like sbcl --noinform --quit --eval '(load "file.lisp")'
<akoana> in a bash script
<akoana> (so .sbclrc is read)
taiju has joined #commonlisp
gioyik has joined #commonlisp
akoana has left #commonlisp [#commonlisp]
dre has joined #commonlisp
gioyik has quit [Ping timeout: 276 seconds]
<Guest92> what.. does this mean
<Guest92> (ql:add-to-init-file)
<Guest92> oops
<Guest92> The value of LPARALLEL.KERNEL::WORKER-COUNT is 0, which is not of type (INTEGER
<Guest92> 1
<Guest92> 4611686
<Guest92> 018427387903).
<moon-child> I would like a 4611686018427387903-core system!
<Guest92> haha
<Jach> It's a type error, the worker-count should be > 0.
<Guest92> what do I do about it?
<Guest92> I don't know where to look for threading issues, or how I would prevent them... since I"m not doing any threading so far as I'm aware
<Jach> Set it to a number > 0? Maybe it's a bug in lparallel if it's supposed to detect and set it itself, I'm not very familiar with the library.
<Alfr> Guest92, I don't think ql:add-to-init-file uses lparallel; more context would be helpful.
<Guest92> it doesn't
<Guest92> that was the prevoius paste I failed to copy what I mean tto copy
<Guest92> that's unrelated
<Guest92> I'm running a `sbcl --script file.lisp` and getting this error
<Guest92> when I run this script on my machine no problem, but I move it up to my cloud environment and it explodes with this error
brettgilio has joined #commonlisp
<Alfr> Guest92, and why the hell do you assume that we magically know the contents of file.lisp ?!
<Guest92> I don't but its not doing a whole mess of a lot
<Jach> It might be helpful if you put it in a pastebin anyway.
<Guest92> ....working on it
<Guest92> that's the whole file
<Jach> Are prodfile and devfile the same?
<Guest92> no they're different paths
<Guest92> I changed those to protect the identities of the innocent ;)
<Guest92> but the file does in fact exist
<Jach> Their differences might be why it works locally and not on the cloud?
waleee has quit [Ping timeout: 268 seconds]
<Guest92> no
<Guest92> because I'm creating the file
<Guest92> its the same file
<Guest92> the present value of the file is
<Guest92> main←{⍳10}
<Guest92> not much to go wrong there
<Alfr> Guest92, I don't know april, but I suspect something calls (lparallel:make-kernel 0).
<Guest92> its valid APL and april-f calls main
<Guest92> ok I'll ask phantom
<Jach> ..That's what I meant =P Does (member :sb-thread *features*) return non-nil on the cloud SBCL?
tyson2 has quit [Remote host closed the connection]
gioyik has joined #commonlisp
gioyik has quit [Ping timeout: 276 seconds]
recordgroovy has quit [Ping timeout: 268 seconds]
recordgroovy has joined #commonlisp
Oladon has joined #commonlisp
IPmonger has joined #commonlisp
IPmonger has quit [Remote host closed the connection]
<lotuseater> Guest92: indeed the signaling with lparallel conditions comes from that ^^
<Guest92> lotuseater what do I do?
<lotuseater> how do I shall tell you?
<Jach> Guest92: where I was going with that question was to see if you got a build of sbcl that doesn't have threads enabled, which wouldn't be good.
karlosz has joined #commonlisp
<Jach> So in the meantime you could in your script just redefine (defun cl-cpus:get-number-of-processors () 2) which should at least let things progress until something else errors
<Guest92> I'm not able to find cl-cpus
<Guest92> I tried to do a (ql:quickload cl-cpus) and it fails in sbcl
<lotuseater> provide the lib names as keywords, symbols or strings
<lotuseater> (ql:quickload :cl-cpus)
<Guest92> ah, yes
d4ryus has quit [Ping timeout: 265 seconds]
<Guest92> I found my problem, and that does indeed fix the issue
<lotuseater> good
<lotuseater> and the quickload generic function can of course also take a list of multiple lib names
<lotuseater> (ql:quickload '(:lib1 :lib2 ...))
<lotuseater> ok, `systems`
pranavats has left #commonlisp [#commonlisp]
d4ryus has joined #commonlisp
<beach> Good morning everyone!
<lotuseater> Good morning beach. :)
lisp123 has joined #commonlisp
doyougnu has quit [Ping timeout: 252 seconds]
<phantomics> Hey Guest92, looks like April's multithreading is causing some issues
<Guest92> hey phantomics is ⍣≡ implemented?
<phantomics> Probably not, do you have an example of use?
<Guest92> power limit?
<moon-child> phantomics: f⍣g⊢y repeatedly applies f to y until y g f y. ⍣≡ is the idiomatic case where g is match, and corresponds to a fixed point
<Guest92> its repeate until the previous result matches this result
<Guest92> yes fixed point
<Guest92> someone in aplfarm tried out a power limit and it is infinit
<phantomics> Oh, should work, let me check, there were issues with float comparison
<Guest92> {⍵{2÷⍨⍵+⍺÷⍵}⍣≡⍵}123456789
<Guest92> 11111.11106
<Guest92> in tryapl.org
<moon-child> fwiw spec only has f⍣k
<phantomics> Does ⌊1_000_000_000×2○⍣=1 work? I've only done fixpoints with = IIRC
<Guest92> VALUE ERROR: Undefined name: _000_000_000
<Guest92> ⌊1 _000_000_000×2○⍣=1
<Guest92> ⌊1000000000×2○⍣=1
<Guest92> 739085133
dtman34 has quit [Ping timeout: 260 seconds]
<moon-child> phantomics: yes, it does work
<moon-child> Guest92: he means in april
<Guest92> oh
<phantomics> April supports _s anywhere in a number for spacing
<phantomics> But {⍵{2÷⍨⍵+⍺÷⍵}⍣≡⍵}123456789 doesn't work, even when I change the ≡ to a =
<phantomics> I'll look into that
<lotuseater> infinite power limit sounds quite like it is powered by a dyson sphere :)
<lotuseater> beach: If you want to hear a funny comment about language design, yesterday someone in #clojure stated "Oh it's such a `cool` feature that elisp has implicit progn in the else-branch of IF."
Oladon has quit [Quit: Leaving.]
<beach> lotuseater: No great expectations on the language there. :)
Bike has quit [Quit: Lost terminal]
<lotuseater> Yes I thought so too. Like the other with "something like pattern matching 100% doesn't belong in a library, it's a built-in feature" like as if the clojure core.match wasn't a lib or such features weren't switched on by a macro
notzmv has quit [Ping timeout: 268 seconds]
<beach> I see.
<lotuseater> Okay not important, hope you're allright.
<beach> Excellent thank you. I am currently working out the very last steps of SICL bootstrapping. Hope you are fine too.
<lotuseater> Oh and that so early in the morning. :)
semz has quit [Ping timeout: 268 seconds]
<beach> Well, by "currently" I meant "the past few days", and I'll continue later.
pranavats has joined #commonlisp
<beach> Working on SICL is a strange experience sometimes, and I don't know whether people creating other Common Lisp implementations have this experience, but most of the SICL code has been executed, which means that it has been somewhat tested. Yet, we still do not create an executable file.
dtman34 has joined #commonlisp
karlosz has quit [Quit: karlosz]
notzmv has joined #commonlisp
<lotuseater> Sounds good.
dtman34 has quit [Ping timeout: 252 seconds]
<lisp123> beach: Will you be try to create the executable from multiple implementations (SBCL / LispWorks / CCL / CLISP) or just SBCL?
semz has joined #commonlisp
<beach> Ultimately, we will test the bootstrapping procedure on several existing Common Lisp implementations, but I don't expect any problems with SICL code itself since it uses only standard Common Lisp plus CLOSER-MOP.
<hayley> There shouldn't be any problems bootstrapping from any other implementation.
<beach> Right.
<beach> However, some Common Lisp implementations have limitations that might be problematic.
<beach> In the past, we exposed a problem with SBCL immobile space (is that what it is called), and we do generate a huge number of funcallable standard objects.
<lotuseater> Like don't have the possibility to make executables in LispWorks with the "free" version. ^^
<lisp123> That's interesting to hear (and great that all implementations getting some love)
<beach> No, the executable I am talking about is a SICL executable file created by writing bytes to disk. What the Common Lisp implementation does not matter.
<beach> s/does/does, does/
<lotuseater> lisp123: and don't forget, the moment when you bootstrap SICL with SICL :P
<lisp123> lotuseater: That is the end game :) Like collecting all the infinity stones
<hayley> "How many layers of metacircularity are you on?" "Like zero dude" "You are like a Python implementation, watch this"
recordgroovy has quit [Ping timeout: 260 seconds]
<lotuseater> yes when i hear end game that comes to my mind too. yielding the infinity implementation gauntlet to rule the universe
recordgroovy has joined #commonlisp
d4ryus has quit [Ping timeout: 252 seconds]
<lotuseater> or to fight the crabs even more effectively .. reducing half at one snap
d4ryus has joined #commonlisp
fengshaun has quit [Ping timeout: 268 seconds]
lisp123 has quit [Read error: Connection reset by peer]
lisp123 has joined #commonlisp
fengshaun has joined #commonlisp
taiju has quit [Ping timeout: 268 seconds]
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 260 seconds]
Nilby has joined #commonlisp
nature has quit [Ping timeout: 265 seconds]
taiju has joined #commonlisp
dtman34 has joined #commonlisp
lisp123 has joined #commonlisp
waleee has joined #commonlisp
fitzsim has quit [Ping timeout: 250 seconds]
lisp123 has quit [Ping timeout: 252 seconds]
gaqwas has joined #commonlisp
gioyik has joined #commonlisp
Cymew has joined #commonlisp
lisp123 has joined #commonlisp
taiju has quit [Ping timeout: 240 seconds]
taiju has joined #commonlisp
karlosz has joined #commonlisp
amb007 has quit [Ping timeout: 268 seconds]
amb007 has joined #commonlisp
shka has joined #commonlisp
rain3 has joined #commonlisp
gioyik has quit [Quit: WeeChat 3.1]
rgherdt has joined #commonlisp
Guest85 has quit [Ping timeout: 256 seconds]
Guest92 has quit [Ping timeout: 256 seconds]
gaqwas has quit [Ping timeout: 268 seconds]
lisp123 has quit [Ping timeout: 268 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
pve has joined #commonlisp
cranium has joined #commonlisp
asarch has joined #commonlisp
hendursa1 has joined #commonlisp
hendursa2 has joined #commonlisp
hendursaga has quit [Ping timeout: 276 seconds]
hendursa1 has quit [Ping timeout: 276 seconds]
taiju has quit [Ping timeout: 268 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
asarch has quit [Quit: Leaving]
_Posterdati_ is now known as Posterdati
ln43 has joined #commonlisp
ln43 has quit [Ping timeout: 260 seconds]
cosimone has joined #commonlisp
cosimone has quit [Client Quit]
karlosz has quit [Ping timeout: 268 seconds]
kakuhen has quit [Quit: Leaving...]
taiju has joined #commonlisp
lisp123 has joined #commonlisp
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
santiagopim has joined #commonlisp
lisp123 has quit [Ping timeout: 265 seconds]
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
tfeb has joined #commonlisp
amb007 has joined #commonlisp
tfeb has quit [Read error: Connection reset by peer]
random-nick has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
dilated_dinosaur has quit [Quit: Leaving]
trevlif has joined #commonlisp
<trevlif> Hey, I had a quick qn
<trevlif> How do I do (setf (last *list*) 3) or something like that?
trevlif has quit [Read error: Connection reset by peer]
<hayley> (setf (car (last list)) 3)
Everything has left #commonlisp [#commonlisp]
attila_lendvai has joined #commonlisp
yitzi has joined #commonlisp
X-Scale` has joined #commonlisp
X-Scale has quit [Ping timeout: 252 seconds]
X-Scale` is now known as X-Scale
dilated_dinosaur has joined #commonlisp
X-Scale` has joined #commonlisp
X-Scale has quit [Ping timeout: 265 seconds]
tyson2 has joined #commonlisp
X-Scale` is now known as X-Scale
trevlif has joined #commonlisp
<trevlif> Sorry, I got disconnected
<jackdaniel> (setf (a:last-elt list) 3)
cuz has joined #commonlisp
cuz has quit [Remote host closed the connection]
cuz has joined #commonlisp
waleee has quit [Quit: WeeChat 3.2.1]
Bike has joined #commonlisp
<trevlif> jackdaniel: thanks, is that a custom package? "a:"
<trevlif> Is there a way without a library?
<hayley> I suppose it is Alexandria with a package-local nickname.
<hayley> My prior suggestion was (setf (car (last list)) 3) which doesn't require a library.
<trevlif> hayley: Thanks! that did it
<lotuseater> nice :) I had also get used to that LAST returns a list rather than the element alone
<hayley> I recall the book Land of Lisp did mention that exact use-case for LAST returning the last cons cell, funnily enough.
<jackdaniel> if you want to push to the back of the list, then last comes handy
<jackdaniel> (rplacd (cons <elt> nil) (last list))
<Cymew> I might be weird, but I actually think "(setf (car (last list)) 3)" is clearer than last-elt as it forces you to think through the procedure in details. There are a few gotchas in that one.
<jackdaniel> you may open code most setf expansions too to better understand low-level operations
selwyn has joined #commonlisp
hendursa2 has quit [Quit: hendursa2]
hendursaga has joined #commonlisp
selwyn has quit [Read error: Connection reset by peer]
Lycurgus has joined #commonlisp
pranavats has left #commonlisp [#commonlisp]
VincentVega has joined #commonlisp
Spawns_Carpeting has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
Spawns_Carpeting has joined #commonlisp
didi has joined #commonlisp
<didi> If something is EQ+, it has to be EQ too, right? i.e., if (EQL a b), or (EQUAL a b), or (EQUALP a b), it is also true that (EQ a b), isn't it?
<Bike> what? no.
<didi> Oh...
<Bike> What would be the point of having all the different equality operators?
<Bike> The converse is true, though
<Bike> If (eq a b), (eql a b) and so on
<didi> Bike: Thank you.
lisp123 has joined #commonlisp
mingus has quit [Quit: Lost terminal]
pranavats has joined #commonlisp
sm2n_ is now known as sm2n
lisp123 has quit [Ping timeout: 252 seconds]
Inline has joined #commonlisp
fitzsim has joined #commonlisp
cuz has quit [Ping timeout: 260 seconds]
nature has joined #commonlisp
lisp123 has joined #commonlisp
cuz has joined #commonlisp
selwyn has joined #commonlisp
selwyn has quit [Remote host closed the connection]
selwyn has joined #commonlisp
nick3000 has joined #commonlisp
mingus has joined #commonlisp
doyougnu has joined #commonlisp
perrierjouet has quit [Quit: WeeChat 3.2]
perrierjouet has joined #commonlisp
aeth_ has joined #commonlisp
aeth has quit [Killed (NickServ (GHOST command used by aeth_))]
aeth_ is now known as aeth
makomo has quit [Ping timeout: 252 seconds]
CrashTestDummy2 has joined #commonlisp
CrashTestDummy has quit [Ping timeout: 260 seconds]
<rain3> how to make asdf automatically load files specified in (uiop:define-package ... (:use-reexport #:HERE ) for systems with :class :package-inferred-system ? it is not right to have to add an extra (:import-from #:HERE)
cranium has quit [Quit: Leaving]
<_death> can you elaborate? your question is unclear to me
<rain3> yes, 1 sec
makomo has joined #commonlisp
<rain3> that code with duplication, works. If I remove the duplicate code (the :import-from form) , asdf won't load the files any more
<rain3> _death: have you used :package-inferred-system ?
<_death> it should
<rain3> yes it should...
<_death> yes
<_death> maybe if you create a minimal test-case..
<rain3> yes I will make one
ec_ has joined #commonlisp
<rain3> strange, in a minimal test case it seems to work fine
<_death> that's the beauty of the method.. now try to eliminate the differences
perrierjouet has quit [Quit: WeeChat 3.2]
perrierjouet has joined #commonlisp
<rain3> I think one the :use-reexport ed file failed to compile and instead of telling me that it failed to compile it said 'that package doesn't exist' and only after adding :import-from it would tell me 'that file doesn't compile'
<rain3> s/one//
<_death> that would be strange
Lycurgus has quit [Quit: Exeunt]
<rain3> yeah who knows, I am using an older sbcl on windows. I hope the issue has vanished
<_death> well, if you still have the failing case, you can look deeper.. as a rule giving up in debugging is bad..
raeda_ has quit [Quit: Leaving]
raeda has joined #commonlisp
ec_ has quit [Ping timeout: 276 seconds]
<rain3> it seems the failing case is gone for now, if it appears again I will continue investigating
yitzi has quit [Remote host closed the connection]
ec_ has joined #commonlisp
cage has joined #commonlisp
Oladon has joined #commonlisp
ec_ has quit [Ping timeout: 276 seconds]
ec_ has joined #commonlisp
Yehowshua has joined #commonlisp
perrierjouet has quit [Quit: WeeChat 3.2]
Yehowshua93 has joined #commonlisp
perrierjouet has joined #commonlisp
Yehowshua has quit [Ping timeout: 256 seconds]
Guest8 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
Yehowshua93 has quit [Quit: Client closed]
VincentV` has joined #commonlisp
VincentVega has quit [Ping timeout: 240 seconds]
Inline has quit [Quit: Leaving]
ec_ has quit [Ping timeout: 276 seconds]
Inline has joined #commonlisp
ec_ has joined #commonlisp
selwyn has quit [Read error: Connection reset by peer]
azimut_ has joined #commonlisp
azimut has quit [Ping timeout: 276 seconds]
Oladon has quit [Quit: Leaving.]
cuz has quit [Ping timeout: 240 seconds]
Guest8 has quit [Quit: Client closed]
Guest2 has joined #commonlisp
<rain3> the issue popped again, I finally managed to make a minimal failing test
Guest2 has left #commonlisp [#commonlisp]
ec_ has quit [Ping timeout: 276 seconds]
amb007 has quit [Read error: Connection reset by peer]
ec_ has joined #commonlisp
amb007 has joined #commonlisp
<_death> so, what is the conclusion?
<_death> your defsystem-depends-on should have "asdf-package-system"
<rain3> ok. adding it doesn't fix this issue; if "asdf-package-system" should be added, the manual should be updated to specify that https://common-lisp.net/project/asdf/asdf/The-package_002dinferred_002dsystem-extension.html
amb007 has quit [Ping timeout: 268 seconds]
<_death> let me try it
amb007 has joined #commonlisp
waleee has joined #commonlisp
<_death> everything seems ok here (sbcl HEAD, linux)
<_death> as for "asdf-package-system", maybe it's no longer needed..
<_death> what does (asdf:asdf-version) give you
<rain3> "3.3.4.5"
cuz has joined #commonlisp
<_death> so it seems you're using a version that's not the one bundled with sbcl
<_death> (which is 3.3.1)
<rain3> ok I removed the newer asdf, now I am using "3.3.1" . same thing happening , any idea what's the quickest way to compile sbcl for windows 32 bit ? maybe moving to a newer version will fix this
cuz has quit [Ping timeout: 265 seconds]
<_death> hmm no idea.. github actions seem to build for 64-bit windows
<_death> why if you import-from :cffi instead of depends-on it
<_death> *what
cuz has joined #commonlisp
ec_ has quit [Ping timeout: 276 seconds]
srhm has quit [Read error: Connection reset by peer]
srhm has joined #commonlisp
gaqwas has joined #commonlisp
<rain3> doesn't make a difference, the issue remains
didi has left #commonlisp [O bella ciao bella ciao bella ciao, ciao, ciao.]
<rain3> so maybe it's got to do with :cffi and *features*
<rain3> I'll try tomorrow to compile sbcl
<rain3> thank you for the help
<_death> well, you could try with something that's not cffi.. maybe it does have something to do with this specific system
<_death> (I mean with cffi)
ec_ has joined #commonlisp
CptKirk has joined #commonlisp
<CptKirk> Can somone please remind me the quicklisp default asd project creation?
<CptKirk> or how to find the quicklisp docs
<_death> quickproject?
<CptKirk> (describe 'ql:quickproject) is an error
<_death> it's not part of quicklisp.. https://xach.com/lisp/quickproject/
<CptKirk> quickproject doens't exist?
<CptKirk> ah, need to quickload it
Nilby has quit [Ping timeout: 268 seconds]
hineios has quit [Ping timeout: 268 seconds]
<rain3> _death: with :alexandria instead of :cffi, the issue is gone (in the minimal example. but in the non-minimal project other related issues seem to pop up)
cuz has quit [Remote host closed the connection]
cuz has joined #commonlisp
<CptKirk> I'm very confused... I had a (defpackage #:my-package (:use #:cl #:april #:str)) now that doesn't work for some reason. So I used quickproject to define something for me with the (depends-on ...) property set, and when I (asdf:load-system my-system) I still can't seem to do anything
<CptKirk> none of the functions are defined, none of the dependencies are met... idk what I'm doing wrong
<CptKirk> I'm in the repl trying anything I can think of (apropos 'aoc-15) (aoc-15:day 2015 1) (day 2015 1)
<CptKirk> I don't understand anything that's happening
<Bike> where's the definition of the aoc-15 package?
<Bike> or rather what is the definition, since presumably it's in package.lisp
<Bike> if you've tried loading it before in the same image you may need to force? try (asdf:load-system whatever :force t)
<CptKirk> I found a fix. I'll paste it, and please tell me what is the "right way"
<CptKirk> So I defined a package within the system. Then from the slime repl I had to "in-package" that package name
<CptKirk> then I could call (day 2015 1)
<CptKirk> or (day1)
<CptKirk> is there a slime command to completely reset the state of the session?
<Bike> slime-restart-inferior-lisp
ec_ has quit [Ping timeout: 276 seconds]
<Bike> Okay, so what's going on here is that your "solutions" package does not _export_ the given symbols
<Bike> so from another package you can't do solutions:day. but you can do solutions::day
<CptKirk> I see
<CptKirk> how do I export?
<Bike> put (:export #:day ...etc...) in the defpackage
<CptKirk> so here's why I wanted to try that. I can no longer (asdf:load-system "aoc-15")
<CptKirk> component not found
<Bike> packages are not closely related to systems
<Bike> particularly, nothing you do to your defpackage form is going to change how asdf loads the system
<CptKirk> why can't I load my system after slime-restart-inferior-lisp?
selwyn has joined #commonlisp
<CptKirk> do I need to specify my full path?
<CptKirk> or add it to ~/quicklisp/local-projects?
<Bike> have you done anything special with your asdf configuration?
<Bike> if not, probably put it in local projects, yeah
<Bike> and do (ql:register-local-projects)
<CptKirk> no, I did the quickproject from the slime repl, then I did asdf load. then I messed around, and then slime-restart. now I can't asdf-load
<lotuseater> yeah when you symlink the .asd file to the local-projects dir you can ql:quickload the system
<Bike> okay. i think quickproject might add it to the configuration, and it's not doing that now. so do local projects instead, probably.
<lotuseater> check where you are in the load path
<Bike> what load path?
<lotuseater> never mind
<lotuseater> but when slime is reset i would assume the path gets set to default as a sideeffect so asdf can't see it anymore with a relative path string
ec_ has joined #commonlisp
<CptKirk> ok, I `ln -s /path/to/aoc-15.asd ./aoc-15.asd` in my local-projects
<CptKirk> works now
<CptKirk> but now I'm running into an april issue
<Bike> lotuseater: these are system names. where are paths involved?
<CptKirk> until I manually compile `day1` the apl functions are not defined
<lotuseater> Bike: i thought for the file name path of the asd file
<Bike> CptKirk: I know basically nothing about april, but is that not because you don't execute the april-load until day1 is called?
<CptKirk> @phantomics The variable APRIL-WORKSPACE-COMMON::|day1| is unbound.
<CptKirk> [Condition of type UNBOUND-VARIABLE]
<CptKirk> yes, while technically that's not correct, I also need to figure out how to load the april file dynamically because I'm constantly working in that file
<CptKirk> instead of needing to constantly recompile the file as well as reevaluate the form
<CptKirk> I wonder if its because its in the `solutions` package if there's something wrong with the namespace reference
<pjb> CptKirk: Note: (package-name (defpackage :foo)) #| --> "FOO" |# (asdf:component-name (asdf:defsystem :foo)) #| --> "foo" |#
<pjb> CptKirk: by default, package names are uppercase strings, while system names are lowercase strings!
<pjb> they have nothing in common.
selwyn has quit [Read error: Connection reset by peer]
<pjb> CptKirk: of course you can do (package-name (defpackage :|MixedCase|)) #| --> "MixedCase" |# but this doesn't work for system names that remains in lowercase: (asdf:component-name (asdf:defsystem :|MixedCase|)) #| --> "mixedcase" |#
<pjb> For systems, you have to use a string: (asdf:component-name (asdf:defsystem "MixedCase")) #| --> "MixedCase" |#
<pjb> This may also pose problem when trying to find the asd file, since some file systems are case-sensitive, and some are not…
rain3 has quit [Ping timeout: 260 seconds]
<pjb> CptKirk: Should we assume ⍝ is a reader macro that switch to APL syntax? and that APL is case sensitive? when you do (defun day1 …) above, what is actually read, assuming the default *readtable*, is (CL:DEFUN SOLUTIONS:DAY1 …) On the other hand, when you read day1←{…} I suppose that what is read there is SOLUTIONS:|day1| an entirely different symbol.
<CptKirk> no
<CptKirk> ⍝ is a comment in apl
<pjb> CptKirk: So depending on where you read the symbol, and what (READTABLE-CASE *READTABLE*) setting you have at the time of reading, you will want to use uppercase or lowercase and perhaps force the case using |day1| or |DAY1A|.
<CptKirk> ;;;; filename
<CptKirk> ⍝ filename
<CptKirk> i'm just trying to dump the whole project in one paste
<pjb> Oh, so just a different file.
<CptKirk> yes
<pjb> *readtable* can be different when reading different files.
<CptKirk> it isn't an error reading so far as I can see
<CptKirk> `The variable APRIL-WORKSPACE-COMMON::|day1| is unbound.` This makes me think that this is somehow relative to the package its in
<CptKirk> When I compile with C-c C-c, it works just fine
<CptKirk> its only when trying to (asdf:load-system "aoc-15) (solutions:day1)
<CptKirk> that I get this error
<CptKirk> I can manually compile and call, then it works
<pjb> This should be explained in the April documentation…
pve has quit [Quit: leaving]
<CptKirk> I don't think your projects organization is described in aprils docs. This seems to be a problem with how my project is arranged more than anything
hineios has joined #commonlisp
<CptKirk> but the APRIL-WORKSPACE-COMMON is a package
<pjb> Also, if just loading april switches to an apl readtable, this is bad. Switching readtables should be done explicitely, at run-time, not at load time…
<CptKirk> and that's the default package for the default april "workspace"
<CptKirk> I don't know what that menas
<CptKirk> you mean `april:april-load`
ec_ has quit [Ping timeout: 276 seconds]
<CptKirk> yes I know that's not the right way to do things with `(eval '(april-load #P"file"))` but at the same time, I've said this a few times now, when I'm working in the loaded file, its rather annoying to have to not only recompile the input file, but also reevaluate the expression which uses the names exported from the compilation
<CptKirk> so I put it in the eval block for development
<CptKirk> I would move this somewhere else once `day1` actually returns the correct solutions
<CptKirk> I don't actually need to dynamically compile the APL input for the program to run, I just need it for development
<CptKirk> if you know of any alternative development patterns for this sort of thing, I'm all ears
Lycurgus has joined #commonlisp
<pjb> CptKirk: I mean (asdf:load-system "aoc-15) (solutions:day1) ; the aoc-15 system loads the april system.
<CptKirk> yes, I understand that much
<pjb> CptKirk: you should provide an APL REPL..
<CptKirk> ?
<pjb> (apl-repl) RET and then you can enter apl expressions at the REPL, without havint to reload a file.
<pjb> s/int/ing/
ec_ has joined #commonlisp
<pjb> Possily, if you want to reload a file, you can also do it with an apl command.
<CptKirk> so compile the repl, pass the file read in to the repl function
<CptKirk> that's interesting
<CptKirk> well no it isn't because the repl would only accept single line expressions
<CptKirk> Which means multi-line functions would break the repl
<pjb> Why should it accept only single line expressions? a lisp repl can take multiple lines.
<pjb> (until the sexp parentheses are closed).
yitzi has joined #commonlisp
<pjb> This can also be done with stranger syntax, by repeating reading until a syntactically complete expression is read.
<CptKirk> @pjb because ⋄ and newlines end expressions, and that isn't the case in lisp
<CptKirk> only parens end expressions
<moon-child> CptKirk: there's no reason you can't have an apl repl that accepts multi-line expressions
<pjb> It's a matter of user interface there. Things are different in a bare terminal, than eg. in emacs with slime.
<CptKirk> no there isn't... but I don't think this is a useful approach to wanting to dynamically load the file with april
<pjb> In emacs, we can edit multi-line input without sending it (ie. using C-RET to insert a new line without sending the input to the swank process).
<pjb> This can also be simulated in a bare terminal with an simple editing layer.
<CptKirk> moon-child and also it was difficult enough that Dyalog didn't add EXPERIMENTAL multiline expressions in the REPL until version 18
nature has quit [Ping timeout: 252 seconds]
<pjb> ie. a repl input can be performed in a editing text box…
<Bike> it kind of sounds to me like you want to load the apl file with the system
<Bike> like as a component of the asd rather than a manual load call
<CptKirk> yes, but while developing, I need to reload the apl file
<CptKirk> also, please tell me how I would do it as a component of the asd?
<pjb> For asdf, you could define a specific class of apl file, with a specific function to compile and load them.
<Bike> you'd have to define a custom component type. people do it with grovel files and stuff. i haven't done it enough to know the details.
<CptKirk> oh interesting
<pjb> check the asdf manual.
<CptKirk> yes, I'd be happy to load the file once
<pjb> it's done for example, to compile C libraries.
<CptKirk> but during development, I need to reload the file as I make changes
<Bike> if you just want a C-c C-k equivalent I'd look at defining an emacs shortcut
<Bike> or whatever editor you're using, i guess i don't know if you're using slime
<pjb> Not only once, but it would reload it when needed because of changes on the file or its dependencies.
<CptKirk> oh really?
<CptKirk> if it reloads files on change,that'd be a good approach
<pjb> And indeed, Defining an C-c C-k (or C-c C-l) in apl-mode hooked to april could be nice.
<pjb> CptKirk: Yes, asdf = make basically. asd file = makefile.
<Bike> asdf doesn't have anything like watching for filesystem changes, far as i know. you'd still have to hit the reload command somewhere
<CptKirk> but it isn't "hooked to april" its "hooked to my lisp code" because that's where april is called
<pjb> Bike: it still compare file system dates between dependencies.
<CptKirk> which is the problem
<pjb> clhs file-write-date
<CptKirk> not only do I need 3 buffers open, one for apl to edit, 1 for lisp to recompile, and one for slime, its annoying
<CptKirk> It would be great to just save my apl file and I can call the function in slim
<CptKirk> slime*
<CptKirk> which is what I'm trying to do now
<CptKirk> but unfortunately it only works when I manually compile the form
<CptKirk> 3 buffer workflow is not a happy place
<Bike> well, if you make the apl file part of the system, you could just use the asd system reload function and get both the apl and the lisp reloaded.
<CptKirk> :components ((:module "mod"
<CptKirk> :components ((:file "bar")
<CptKirk> (:file"baz")
<CptKirk> (:file "quux"))
<CptKirk> :perform (compile-op :after (op c)
<CptKirk> (do-something c))
<CptKirk> :explain (compile-op :after (op c)
<CptKirk> (explain-something c)))
<CptKirk> is this what you're talking about?
<Bike> the definitions to make it work are here https://github.com/cffi/cffi/blob/master/grovel/asdf.lisp
<Bike> phantomics or someone might be interested in doing the work, since it seems like a useful way to use april
ec_ has quit [Ping timeout: 276 seconds]
tubal_cain has joined #commonlisp
<CptKirk> This would be really cool
<CptKirk> Then I could specify the files, their workspaces, and have all those names aviailable on load
<CptKirk> then the solutions would just be like... `(defsol ws.day1)` which would be a macro to call the function day1 in workspace ws using april
<CptKirk> cool
<CptKirk> I'll have to experiment with this approach
mortemeur has joined #commonlisp
<CptKirk> how does that file get loaded and definitions available before asdf finishes loading?
<Bike> the grovel/asdf.lisp file? that's what :defsystem-depends-on does
ec_ has joined #commonlisp
<Bike> it tells asdf to load the cffi-grovel system before even starting to deal with the example-software system definition
<CptKirk> oh def-system-depends-on is the entry point to define those asdf::grovel-file
<CptKirk> asdf::cffi-grovel-file
<Bike> i don't think it's in the asdf package, but yeah, you get the idea
<CptKirk> (setf (find-class 'asdf::cffi-grovel-file) (find-class 'grovel-file))
<Bike> why would you do that
<CptKirk> I didn't, they did :P
<CptKirk> :components
<CptKirk> ((:file "package")
<CptKirk> (:cffi-grovel-file "example-grovelling")
<CptKirk> (:cffi-wrapper-file "example-wrappers")
<CptKirk> (:file "example")))
<Bike> oh, well, dang. there you go then
<CptKirk> so they can define that
<Bike> i figured it was doing something else for keywords
tubal_cain has quit [Quit: Leaving]
<CptKirk> it seems like the setf is defining the component type
<CptKirk> but I don't understand this part
<CptKirk> :defsystem-depends-on ("cffi-grovel")
<CptKirk> there is no file "cffi-grovel"
<CptKirk> but there is an `(in-package :cffi-grovel)` in `asdf.lisp`
<Bike> cffi-grovel is an asdf system
<Bike> :defsystem-depends-on ("cffi-grovel") tells asdf to find and load the system named cffi-grovel
<Bike> and to emphasize this again: asdf does not know or care about packages
<Bike> usually packages have about the same names as the system defining them, but that's not required and asdf doesn't care either way
<CptKirk> oh so this whole extension to asdf thing is an external system
<CptKirk> damn
<Bike> depends on whta you mean by "external"
<CptKirk> I mean
<Bike> it's still, like, part of cffi
<CptKirk> I don't know what I mean by anything
<phantomics> Just read the chat here, getting asdf integration for April is something I'll look into
<CptKirk> I'm just flailing trying to say stuff to find answers to my brain confusion
<Bike> that's fine
<Bike> don't worry be happy
<CptKirk> I see there are multiple .asd files in the root folder
nature has joined #commonlisp
srhm has quit [Quit: Konversation terminated!]
srhm has joined #commonlisp
Lord_of_Life has quit [Quit: Laa shay'a waqi'un moutlaq bale kouloun moumkine]
Lord_of_Life has joined #commonlisp
srhm has quit [Read error: Connection reset by peer]
srhm has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 27.1]
molson__ has joined #commonlisp
Lord_of_Life has quit [Quit: Laa shay'a waqi'un moutlaq bale kouloun moumkine]
Lord_of_Life has joined #commonlisp
mariari has quit [Quit: WeeChat 3.2]
mortemeur has quit [Read error: Connection reset by peer]
<CptKirk> @bike it appears that this works because the output of the files in question are lisp source files
<CptKirk> i don't think the output of april is a lisp source file
<Bike> isn't it? i thought it was an apl-to-lisp compiler. but even if it isn't, i think you can tell asdf to do arbitrary things to "load" a file
molson_ has quit [Ping timeout: 268 seconds]
<Bike> i see asdf itself defines a java-source-file component type, though it doesn't seem to do much
<CptKirk> it is not a transpiler, it is a compiler
<CptKirk> the output is a compilation
<Bike> okay. still don't think it should be a problem.
mortemeur has joined #commonlisp
ec_ has quit [Ping timeout: 276 seconds]
ec_ has joined #commonlisp
<phantomics> Bike: April doesn't produce Lisp files, it directly compiles and evals code. Do you know if asdf extensions can be used to do things that compile Lisp code directly rather than producing Lisp code that is fed to asdf?
<Bike> I am reasonably sure that you can tell asdf to do literally anything in as a "load" action.
<Bike> (or a "compile" action, or whatever)
<Bike> strike "in"
<Bike> so you could for example just have it call this april-load function kirk is using, probably
<phantomics> Ok, looking into that
<Bike> https://common-lisp.net/project/asdf/asdf.html#Creating-new-operations i think what you would do is something like (defmethod perform ((op load-op) (component april-file)) ...)
<Bike> but, again, i have not done this myself
<phantomics> Thanks, that helps
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
khrbt has quit [Ping timeout: 268 seconds]
khrbt has joined #commonlisp
cosimone has joined #commonlisp
<CptKirk> ok I'm getting super peeved. I just created a blank quickpackage:make-package and it can't compile
<CptKirk> oh... I needed quickproject
<CptKirk> `(quickproject:make-project #P"/mnt/c/d/aoc/cl" :name "apl-load" :depends-on '(april))
<CptKirk> `
<CptKirk> ok I did use quick project... jesus can't keep these names straight
<CptKirk> so I made the project, I symlinked to the local-projects folder just as I did before
<CptKirk> (asdf:load-system "apl-load") and get a compile error
<CptKirk> I'm lost
<Bike> well, "compile error" sounds like asdf found the system fine
<Bike> and there's just a problem in your source file
<CptKirk> I didn't do anything yet
<Bike> what's the error?
<CptKirk> COMPILE-FILE-ERROR while
<CptKirk> compiling #<CL-SOURCE-FILE "apl-load" "package">
<CptKirk> [Condition of type UIOP/LISP-BUILD:COMPILE-FILE-ERROR]
<Bike> christ, asdf, why are you like this
<CptKirk> I have literally not even opened the files at this point
<CptKirk> and that's the same invocation I used when defining "aoc-15" earlier
amb007 has quit [Read error: Connection reset by peer]
<Bike> okay. what does package.lisp look like?
Lord_of_Life_ has joined #commonlisp
<CptKirk> ;;;; package.lisp
<CptKirk> (defpackage #:apl-load
<CptKirk> (:use #:cl))
amb007 has joined #commonlisp
<CptKirk> I have changed nothing after running quickproj
<Bike> alright. seems fine. i don't know why asdf decided to choke on that.
Lord_of_Life has quit [Ping timeout: 252 seconds]
selwyn has joined #commonlisp
<CptKirk> ;;;; apl-load.asd
<CptKirk> (asdf:defsystem #:apl-load
<CptKirk> :description "Describe apl-load here"
<CptKirk> :author "Your Name <your.name@example.com>"
<CptKirk> :license "Specify license here"
<CptKirk> :version "0.0.1"
<CptKirk> :serial t
<CptKirk> :depends-on (#:april)
<CptKirk> :components ((:file "package")
<CptKirk> (:file "apl-load")))
<CptKirk> both files are present
<CptKirk> ;;;; apl-load.lisp
<CptKirk> (in-package #:apl-load)
<CptKirk> that's the other files contents
Lord_of_Life_ is now known as Lord_of_Life
<Bike> Well, I don't know. Did you do (ql:register-local-projects)?
<CptKirk> COMPILE-FILE-ERROR while
<CptKirk> compiling #<CL-SOURCE-FILE "apl-load" "package">
<CptKirk> [Condition of type UIOP/LISP-BUILD:COMPILE-FILE-ERROR]
<etimmons> CptKirk: what is your current *package* ?
<CptKirk> after running it, that's still the error
mortemeur has quit [Read error: Connection reset by peer]
<CptKirk> how do I check that?
<Bike> enter *package* in your repl
<CptKirk> common-lisp-usear
<CptKirk> oh goodness... so aoc no longer loads
<CptKirk> what did I doooo!!?!?! X(
<etimmons> Hmmm, there goes that idea. But I'm surprised ASDF isn't giving you any other information than what you've copied
<Bike> asdf sometimes gives stupid errors when compile-file fails.
selwyn has quit [Remote host closed the connection]
selwyn has joined #commonlisp
<CptKirk> oh ok. I added the defsystem-depends-on
<CptKirk> and the depends on can't be loaded for no reason
<CptKirk> and it works
<CptKirk> *magic*
yitzi has quit [Quit: Leaving]
<CptKirk> nice, I got the pattern working for creating a new component and then doing stuff with it
cuz has quit [Ping timeout: 268 seconds]
ec_ has quit [Ping timeout: 276 seconds]
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
ec_ has joined #commonlisp
gaqwas has quit [Ping timeout: 252 seconds]
cuz has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<CptKirk> Error while trying to load definition for system #1=aoc-15 from
<CptKirk> pathname /mnt/c/d/aoc/cl/aoc-15.asd:
<CptKirk> The value
<CptKirk> #<ASDF/USER::APRIL-FILE #1# "15.apl">
<CptKirk> is not of type
<CptKirk> (OR (VECTOR CHARACTER) (VECTOR NIL) BASE-STRING PATHNAME
<CptKirk> SYNONYM-STREAM FILE-STREAM)
amb007 has quit [Read error: Connection reset by peer]
<CptKirk> how am I meant to interpret this error?
waleee has quit [Ping timeout: 252 seconds]
<CptKirk> what type is #<...?>
amb007 has joined #commonlisp
waleee has joined #commonlisp
cuz has quit [Ping timeout: 260 seconds]
<CptKirk> ok, so its an instance of a class
<CptKirk> so how do I get the value from #1#?
akoana has joined #commonlisp
<phantomics> It would be an asdf class method
<phantomics> You have an april-file object type?
<CptKirk> yes
<CptKirk> it inherits from cl-source-file
<CptKirk> i'm looking for members/methods for that, but i really don't know what I'm doing
<CptKirk> like I found some, but I don't see any user docs
fengshaun has quit [Quit: bibi!]
cosimone has quit [Remote host closed the connection]
cosimone has joined #commonlisp
ec_ has quit [Ping timeout: 276 seconds]
Spawns_Carpeting has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
Spawns_Carpeting has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
mortemeur has joined #commonlisp
amb007 has joined #commonlisp
frgo has quit [Remote host closed the connection]
<Bike> CptKirk: #1=aoc-15 ... #1# means that the #1# is also aoc-15. like #<ASDF/USER::APRIL-FILE aoc-15 "15.apl">
frgo has joined #commonlisp
<CptKirk> oh
ec_ has joined #commonlisp
<Bike> what this error means is that asdf expects something to be either a string, a pathname, or a file stream, but you gave it an april-file object instead
<CptKirk> so (slot-value file 'name) doesn't work
<CptKirk> because its a user level symbol
<CptKirk> how do I refer to the... is it 'file:name?
<Bike> what?
<Bike> i have no idea what you're trying to do here. what is the "file"?
<CptKirk> bleh
<CptKirk> (defmethod component-pathname ((f april-file))
<CptKirk> (progn (print (slot-value f 'file:name))
<CptKirk> (call-next-method)))
<Bike> okay, so april-file is your class, right? just use the reader you defined.
<CptKirk> I didn't define a reader?
<CptKirk> I'm inheriting from a class
<CptKirk> (defclass april-file (cl-source-file)
<CptKirk> ())
<Bike> okay. so look at this page here. See how, next to name, it says "Accessors: component-name"
<CptKirk> oh
<Bike> that means that component-name is a function you can use to get the name
<Bike> it's more usual to use access functions like that than to use slot-value
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<CptKirk> (defmethod component-pathname ((f april-file))
<CptKirk> (progn (print (component-name 'name))
<CptKirk> (call-next-method)))
<CptKirk> ?
<CptKirk> ah this worked
<CptKirk> (defmethod component-pathname ((f april-file))
<CptKirk> (progn (print (component-name f))
<CptKirk> (call-next-method)))
amb007 has quit [Ping timeout: 260 seconds]
amb007 has joined #commonlisp
shka has quit [Ping timeout: 265 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<CptKirk> I don't know how you're supposed to just know HOW to use something from someone giving you a picture of it
Spawns_Carpeting has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
Spawns_Carpeting has joined #commonlisp
selwyn has quit [Read error: Connection reset by peer]
dra has joined #commonlisp
mariari has joined #commonlisp
copec has quit [Remote host closed the connection]
copec has joined #commonlisp
Xach has quit [Ping timeout: 265 seconds]
Xach has joined #commonlisp
rgherdt has quit [Ping timeout: 260 seconds]
ec_ has quit [Ping timeout: 276 seconds]
mortemeur has quit [Ping timeout: 268 seconds]
taiju has quit [Ping timeout: 268 seconds]
ec_ has joined #commonlisp
dra_ has joined #commonlisp
dra has quit [Ping timeout: 260 seconds]
dra_ has quit [Remote host closed the connection]
taiju has joined #commonlisp
ec_ has quit [Ping timeout: 276 seconds]
Lycurgus has quit [Quit: Exeunt]
keir has joined #commonlisp
cosimone has quit [Ping timeout: 252 seconds]
ec_ has joined #commonlisp
ec_ has quit [Client Quit]
VincentV` has quit [Remote host closed the connection]
beach` has joined #commonlisp
beach has quit [Ping timeout: 252 seconds]