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>
White_Flame has quit [Remote host closed the connection]
White_Flame has joined #commonlisp
rito_ has quit [Ping timeout: 268 seconds]
lisper29 has joined #commonlisp
lisper29 is now known as vibs29
huckleberry has quit [Quit: disconnected]
vibs29 is now known as lisper29
eddof13 has joined #commonlisp
jstoddard has quit [Quit: ERC (IRC client for Emacs 27.2)]
<Spawns_Carpeting> how can I apply a function passed into a function on a variable?
<Spawns_Carpeting> for some reason I am getting an error "undefined function 1"
<Spawns_Carpeting> the variable the function is working on is 1
<Spawns_Carpeting> https://bpa.st/FAAA
<Spawns_Carpeting> i tried using funcall as well
<hayley> (funcall fn e)?
<hayley> The same goes for (funcall p e)
<Spawns_Carpeting> oh yeah it does work, i must have messed it up by putting a quote on the p
<Spawns_Carpeting> thanks
waleee has quit [Quit: WeeChat 3.3]
waleee has joined #commonlisp
trocado has joined #commonlisp
random-nick has quit [Ping timeout: 256 seconds]
rotateq has quit [Quit: ERC (IRC client for Emacs 27.2)]
alcaeus has joined #commonlisp
alcaeus has quit [Remote host closed the connection]
amb007 has quit [Ping timeout: 250 seconds]
lisper29 has quit [Quit: Leaving]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
taiju has quit [Ping timeout: 240 seconds]
fazz234234368 has quit [Quit: Connection closed]
jpl01 has joined #commonlisp
Jach has quit [Remote host closed the connection]
<hobo> say I wanted to hack at croatoan. I'd like to fork/clone the repo on github and have my current project use that one instead of what quicklisp has. what's a good way of going about doing that?
<trocado> clone into local-projects or somewhere else where adsf can find it and run (ql:register-local-projects)
eddof13 has quit [Quit: Textual IRC Client: www.textualapp.com]
<trocado> actually ql:*local-project-directories* will show you the expected directories
eddof13 has joined #commonlisp
rgherdt_ has quit [Ping timeout: 245 seconds]
<hobo> does asdf use local projects first over distributions?
<dbotton> hobo, yes
<hobo> perfect
<hobo> thank you, trocado and dbotton
<dbotton> if it previously compiled a version from a distribution you may need to clear out the old one first
<dbotton> at least I have noticed that on occasion
<dbotton> (asdf:system-source-directory 'your-stuff) to see directory that your-stuff is being pulled from
<hobo> awesome, thank you
taiju has joined #commonlisp
Oladon has quit [Quit: Leaving.]
jpl01 has quit [Remote host closed the connection]
atgreen has joined #commonlisp
green__ has quit [Ping timeout: 250 seconds]
asen has joined #commonlisp
pjb has quit [Remote host closed the connection]
asen_ has joined #commonlisp
asen has quit [Read error: Connection reset by peer]
beach` is now known as beach
<ns12> Does anyone know how I can configure ASDF to ignore a single directory in /usr/share/common-lisp/source/? I want to ignore /usr/share/common-lisp/source/cl-asdf/ because it contains a version of ASDF that is older than the one bundled in my version of SBCL.
<mfiano> That seems like attacking the wrong problem.
kotshie has joined #commonlisp
<ns12> I want to ignore it otherwise ASDF will always complain: WARNING: You are using ASDF version 3.3.5 (probably from (require "asdf") or loaded by quicklisp) and have an older version of ASDF 3.3.4 registered at #P"/usr/share/common-lisp/source/cl-asdf/asdf.asd".
<mfiano> Instead, figure out why it is there. Also from what I understand, ASDF will refuse to ever downgrade itself.
<ns12> mfiano: It's there because the administrator has installed it. The administrator has installed it because it is used by other people. Only I have an upgraded version of SBCL that happens to bundle a newer version of ASDF.
<mfiano> I think that is an unfortunate mistake of theirs. Perhaps worth discussion.
<ns12> mfiano: Who does "theirs" refer to? The authors of ASDF?
<mfiano> The administrator
karlosz has quit [Ping timeout: 256 seconds]
<ns12> mfiano: I don't think it's a bad decision. In Ubuntu 20.04, SBCL is version 2.0.1, which bundles an old version of ASDF. cl-asdf in Ubuntu 20.04 is version 3.3.4, which is newer than the one bundled in SBCL 2.0.1 (which is why cl-asdf was installed by the administrator). I have SBCL 2.1.9, which bundles ASDF 3.3.5.
tyson2 has quit [Remote host closed the connection]
Oladon has joined #commonlisp
<mfiano> I think it's always a mistake to install ASDF systems globally, especially ASDF.
<ns12> What's the recommended method then?
<beach> Good morning everyone!
waleee has quit [Ping timeout: 268 seconds]
<mfiano> If you need to upgrade asdf, do it locally as to not interfere with other users. Besides, other users may very well expect their code to behave as it would on the consumers of the code's machines, ie; what SBCL ships.
<ns12> mfiano: Okay. From what I understand, you suggest two methods: (1) use the ASDF that comes with SBCL, or (2) let each user manually add ASDF to their ~/common-lisp/ directory.
<mfiano> You can check the ASDF manual on how to modify the ASDF registry's search path per-user. Then you can install your new asdf there for yourself.
<mfiano> As for 1) I suggest that as the default, so users can opt-in to upgrading.
<ns12> mfiano: Thank you. I have already read the manual. I didn't find anything obvious for modifying the registry search path to exclude /usr/share/common-lisp/source/cl-asdf/, hence my questions.
<ns12> Okay. I will try to convince the administrator to uninstall cl-asdf.
<mfiano> There may be a solution if you cannot convince them, but I don't know how.
<ns12> Alternatively, I could just disregard ASDF's warning message, since it has no material effect on the execution of programs.
<mfiano> Or you could muffle the specific condition that is signalled from your sbclrc
<mfiano> But I think that is just ignoring the problem and may do more harm than good.
<ns12> beach: Good morning!
<Spawns_Carpeting> is "let" in common lisp implemented as a macro that expands to a lambda?
<ns12> mfiano: Thank you. I will experiment with ASDF's registry search path configurations a little more.
<Bike> Spawns_Carpeting: not usually, no
<ns12> Spawns_Carpeting: Isn't that an implementation detail?
<Spawns_Carpeting> I suppose it would be ns12
<Bike> it would be an implementation detail
<Spawns_Carpeting> i am curious if impling it as a macro is common though
<mfiano> ns12: Sure
<Nilby> ns12: It's probably on debian, where if I remember right sbcl requires cl-asdf so you probably can't get rid of it, but you can just run sbcl with --no-sysinit and load your own asdf and quicklisp.
<Spawns_Carpeting> i am asking because I am at the point of implementing let inside of my personal lisp (which is not common lisp exactly but follows a little bit)
<Bike> Spawns_Carpeting: it is not common. common lisp has more complex semantics about variable binding than scheme, so the macro definition would not be as straightforward.
<mfiano> I don't think it is common
<mfiano> I wouldn't want to see that implementation when I macroexpand-all
<Spawns_Carpeting> do you think I should try to do what scheme does for my language then?
<Spawns_Carpeting> simple is a goal just for the sake of not getting stuck and giving up
kotshie has quit [Quit: kotshie]
notzmv has quit [Ping timeout: 240 seconds]
<ns12> Nilby: What does --no-sysinit do? SBCL man page says "Do not load a system-wide initialization file". But the default /etc/sbclrc file is essentially blank.
<Bike> Spawns_Carpeting: i don't see any reason not to.
<Alfr> ns12, make sure the directory is not listed in asdf:*central-registry* that's always searched before the source-registry is consulted.
semz has quit [Ping timeout: 245 seconds]
<ns12> Alfr: asdf:*central-registry* is NIL since I am not using that method to add search paths.
<Spawns_Carpeting> thats strange to have sbclrc blank
<ns12> mfiano: "I wouldn't want to see that implementation when I macroexpand-all" - Why not? Is it because of inefficiency?
<Alfr> ns12, just wanted to mention it, in case that asdf you want to get rid of advertises itself using that method. But since it's nil, all is well. :)
<ns12> Spawns_Carpeting: My /etc/sbclrc only contains two lines:
<ns12> ;;; -*- lisp -*-
<ns12> ;;; System-wide startup file for sbcl
<mfiano> ns12: Personal preference. I think the LET syntax is easier to read, and Common Lisp is different than Scheme.
<Spawns_Carpeting> mine sets some variables and then loads "/etc/common-lisp/gentoo-init.lisp"
<Spawns_Carpeting> the comment says it sets up ASDF2
<ns12> Nilby: https://packages.debian.org/bullseye/sbcl lists no cl-asdf dependency. Perhaps it was in an older version of Debian?
<beach> We hit an interesting issue when we tried to implement LET with LAMBDA, namely that (let ((&rest 234) (x 345)) ...) is not the same as ((lambda (&rest x) ...) 234 345)
<Spawns_Carpeting> is defun implemented as a lambda?
kotshie has joined #commonlisp
<Spawns_Carpeting> i was thinking in my lisp/scheme thing it would be a lambda set to a symbol
<beach> Spawns_Carpeting: DEFUN is essentially (setf (fdefinition <name>) (lambda (...) ...))
<Spawns_Carpeting> thats about what I was thinking yeah, thats pretty darn cool
<beach> But I don't know what you mean by "set to a symbol".
<Nilby> ns12: Yes, that was probably for an older version.
<ns12> Nilby: Ah too bad. That means I can't use the --no-sysinit method, since it gives no effect when the system-wide initialization file does not do anything.
semz has joined #commonlisp
<Nilby> I guess the asdf is probably probably coming from the sbcl contrib
s-liao has joined #commonlisp
trocado has quit [Ping timeout: 240 seconds]
<Nilby> ns12: I guess asdf won't downgrade, so you can just do the typical wanring muffling
miique has quit [Ping timeout: 268 seconds]
Oladon has quit [Quit: Leaving.]
<Nilby> I wonder how many people use the complicated asdf configuration file setup
dre has joined #commonlisp
eddof13 has quit [Quit: Textual IRC Client: www.textualapp.com]
Oladon has joined #commonlisp
eddof13 has joined #commonlisp
asen_ has quit [Read error: Connection reset by peer]
asen_ has joined #commonlisp
karlosz has joined #commonlisp
dec0d3r has joined #commonlisp
Bike has quit [Quit: Lost terminal]
dec0d3r has quit [Quit: Leaving]
aartaka has joined #commonlisp
alfonsox has joined #commonlisp
taiju has quit [Read error: Connection reset by peer]
taiju has joined #commonlisp
jealousmonk has quit [Quit: ERC (IRC client for Emacs 27.1)]
taiju has quit [Ping timeout: 240 seconds]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eddof13 has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
notzmv has joined #commonlisp
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aartaka has joined #commonlisp
kakuhen has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
atgreen has quit [Read error: Connection reset by peer]
dre has quit [Quit: Leaving]
atgreen has joined #commonlisp
s-liao has quit [Quit: Client closed]
<ns12> How do I download the IRC logs for this channel?
<jackdaniel> I think that tymoon.eu doesn't have option to download logs
<jackdaniel> Shinmera: is that correct? ^
trocado has joined #commonlisp
<mfiano> whitequark does
trocado has quit [Ping timeout: 256 seconds]
<ns12> mfiano: https://libera.irclog.whitequark.org/commonlisp/index/ gives 401 Authorization Required.
<ns12> Perhaps I am using the wrong protocol?
atgreen has quit [Ping timeout: 240 seconds]
<Shinmera> jackdaniel: It does, though you need to manually iterate over time regions. https://irclog.tymoon.eu/api/chatlog/get?server=libera&channel=%23commonlisp&format=rendered
<Shinmera> Using the from/to arguments to the above.
<mfiano> ns12: Then wget -mpk -np http://libera.irclog.whitequark.org/commonlisp/
<jackdaniel> Shinmera: I see, thanks
taiju has joined #commonlisp
karlosz has quit [Quit: karlosz]
attila_lendvai has joined #commonlisp
amk has quit [Ping timeout: 250 seconds]
amk has joined #commonlisp
gaqwas has joined #commonlisp
rgherdt_ has joined #commonlisp
karlosz has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
pranavats has joined #commonlisp
gaqwas has quit [Remote host closed the connection]
taiju has quit [Ping timeout: 252 seconds]
Oladon has quit [Quit: Leaving.]
unixlisp has joined #commonlisp
epony has quit [Quit: QUIT]
epony has joined #commonlisp
karlosz has quit [Quit: karlosz]
asen_ has quit [Quit: Leaving]
<unixlisp> That is what someones want from CLOS: (create-instance 'foo nil (:slot0 (list 0))) (:slot1 1))) (create-instance 'bar foo (:slot1 2))) (g-value bar :slot0) => (0) implemented in KR more than 30 years ago.
<unixlisp> (create-instance 'foo nil (:slot0 (list 0)) (:slot1 1)) (create-instance 'bar foo (:slot1 2))
<phoe> huh?
<phoe> what's 'foo, what's NIL in that context?
<unixlisp> instance
<phoe> I don't get it - where was the class FOO defined? are we using classes at all?
<phoe> why is NIL in that syntax?
<phoe> which code is that from?
<jackdaniel> phoe: kr is a mambo jumbo used by garnet to microoptimize instance access in early 90' - whether it did optimize it is questionable. either way I wouldn't engage in this discussion (based on prior experience)
<phoe> jackdaniel: oh! thanks for the context
<unixlisp> phoe: foo bar both are prototype, there are no class/instance difference.
<phoe> unixlisp: oh, so a prototype-based object system
<unixlisp> yeah
<unixlisp> (eq (g-value foo :slot0) (g-value bar :slot0)) => T
pve has joined #commonlisp
pjb has joined #commonlisp
<unixlisp> unlike class, values of slots may be inherited.
<phoe> I now know of KR, COrbit, and sheeple as prototype object systems available in CL - whereas sheeple is available in QL for sure
<unixlisp> they are all usable.
scymtym has quit [Ping timeout: 256 seconds]
<beach> But they are distinct from CLOS, so I think "That is what someones want from CLOS" is a strange thing to say.
<beach> I mean, CLOS is a thing. It has documentation, and a specification. So it makes no sense to "want <something> from CLOS" that is not in that specification.
<unixlisp> yes. It does not exit in CLOS.
scymtym has joined #commonlisp
<unixlisp> different OO model.
<beach> I think we knew that.
<hayley> Well, the designers of CLOS weren't very Self-ish.
<beach> Heh.
Algernon69 has joined #commonlisp
<unixlisp> That kind of OO prototype-based has a very early root in AI: Actor, Frame, etc.
rotateq has joined #commonlisp
aartaka has quit [Ping timeout: 268 seconds]
s-liao has joined #commonlisp
srji has quit [Quit: leaving]
Inline has joined #commonlisp
srji has joined #commonlisp
cosimone has joined #commonlisp
cage has joined #commonlisp
<phoe> is there any kind of ARRAY-OPERATIONS or similar trick that I can use to "rotate" a 2D array by 90/180/270 degrees?
<phoe> Example behavior that I am thinking of, #2A((1 0 0) (2 0 0) (3 0 0)) → #2A((0 0 0) (0 0 0) (1 2 3))
<jackdaniel> fun fact: this is one of the excercises in ansi common lisp (pg book)
<phoe> :(
<phoe> I know, I'd simply like to avoid reinventing the wheel
<phoe> jackdaniel: pjb: I forgot to note that I'm looking for a pre-existing operator (or composition of them) in order to reuse it, rather than writing my own
* phoe investigates mathstats
<pjb> Well, the CL version is: https://termbin.com/rz7x ; the previous one was the emcs lisp version.
<jackdaniel> phoe: I'm not certain it has it, but exported symbols include degrees (and most importantly, the function transpose-matrix)
<phoe> jackdaniel: judging by the docs alone, degrees are useful for conversion between radians and degrees (these functions are available) and... nothing more? hm
<MichaelRaskin> Degrees are also useful for making sense when printed out
<phoe> also, transposition is useful, but only for the 180° case (unless I miss some simple trick)
<jackdaniel> 90° + reflection I believe
<phoe> oh wait, yes - I transposed across the wrong diagonal in my mind
<phoe> ...still, I need a reflection operator now :D
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 240 seconds]
Lord_of_Life_ is now known as Lord_of_Life
rito_ has joined #commonlisp
taiju has joined #commonlisp
varjag has joined #commonlisp
igemnace has quit [Quit: WeeChat 3.4]
mingus has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
Algernon69 has quit [Ping timeout: 268 seconds]
VincentVega has joined #commonlisp
trocado has joined #commonlisp
trocado has quit [Ping timeout: 252 seconds]
Jing has quit [Remote host closed the connection]
Jing has joined #commonlisp
Jing has quit [Client Quit]
random-nick has joined #commonlisp
gaqwas has joined #commonlisp
<mfiano> phoe: You would need to know if that matrix is composed of column or row vectors.
<phoe> mfiano: I think the only thing that is going to differ in that case is the sign of the degree integer
<mfiano> You really don't want to be using degrees for such computations.
<mfiano> It also depends if you want to do a local space rotation or not
<phoe> mfiano: I think you're overcomplicating my problem
<phoe> for 2D arrays the four possibilities for the rotation I am thinking of is #2A((1 2 3) (4 5 6) (7 8 9)) and #2A((7 4 1) (8 5 2) (9 6 3)) and #2A((9 8 7) (6 5 4) (3 2 1)) and #2A((3 6 9) (2 5 8) (1 4 7))
<mfiano> Well to answer your question, for a 2D array/matrix rotation it is just multiplying a rotation matrix denoting a rotation around the Z axis by an Euler angle, but your existing matrix.
<phoe> for more dimensions you need to specify the axis
<mfiano> s/but/by/
<mfiano> Right, a 2D has a hard-coded Z axis for the matrix to multiply yopurs by
<mfiano> Not that matrix multiplication is not comutative though - order is important.
<mfiano> Note*
<phoe> yes, a 3D array will have three axes that you can make 90° rotations in, and so on
<phoe> might be tricky to get this working for an arbitrary number of arrays, but it should be doable
<mfiano> I think you mean a 4x4 2d array
<mfiano> A series of axis rotations in N-space requires a 2D array of size NxN. If you want to encode position, scale, and rotation, it's N+1xN+1. The former is a rotation matrix. The latter is a transformation matrix.
<mfiano> The algorithm is very simple though.
<phoe> no, I actually mean a 3D array - it's possible to do a rotation of e.g. a Rubik's cube by 90° in three axes
<ck_> maybe this is a joke going over my head, but mfiano is talking about linear algebra and phoes question sounds to me like a different kind of rotation
<phoe> I think so, too
<mfiano> Maybe I am confused then. a Rubik's cube is a 3-dimensional object fwiu
<jackdaniel> just wait, with time there'll be the 4th dimension
winning-luser has joined #commonlisp
ldb has joined #commonlisp
<mfiano> Your question is asking about a 2D, and provides examples of a 3 dimensional rotation about the Z axis.
<mfiano> But as to not confuse either of us any more, I will leave it at that.
mingus has quit [Ping timeout: 260 seconds]
<phoe> oh - I understand what you mean now
Inline has quit [Ping timeout: 240 seconds]
puchacz has joined #commonlisp
<puchacz> hi, what's the best and portable way to create variables when experimenting in REPL please? defparameter creates a special, and I can accidentally interfere with (let ...) forms in my program, whereas setq gives warnings in sbcl.
<puchacz> like say in Matlab, you can write x = []; y = 7; etc.
<phoe> defparameter + earmuffs
<ldb> unixlisp: you can have a try on CommonORBIT which is a message passing style OOP package implemented in CL. Some paid Lisps still provide Zetalisp style Flavors, that is also message passing based.
<puchacz> phoe - and eye blinders...
<phoe> puchacz: (defvar *foo* ...)
<mfiano> puchacz: sbcl has defglobal, and there is a portable interface with the global-vars system in quicklisp
<phoe> or s/defvar/defparameter/
<mfiano> if you want a true toplevel non-special global
<puchacz> mfiano - yes, this is what I want
<puchacz> thanks guys, trying
<puchacz> oki, this #<SYSTEM global-vars / global-vars-20141106-git / quicklisp 2020-07-15>
<puchacz> cheers
<mfiano> Yes, check the readme. It is pretty useful.
<mfiano> i would recommend following their advice and using a new earmuff style though
<mfiano> i think the readme suggests -foo-, but i use =foo=
<puchacz> they say (setf -y- 6)
<jackdaniel> I wouldn't have thought that merging two numbers with two ranges will give me so much headache, do I miss something obvious? here is the code: https://plaster.tymoon.eu/view/2806#2806
<mfiano> yeah hyphen. i use #\= because it stands out more in a kebab-case language
<hayley> I think SBCL uses double earmuffs, and I did something similar once.
<phoe> Online Lisp Meeting #13 announced - https://www.reddit.com/r/lisp/rr7ffe/
Inline has joined #commonlisp
<puchacz> ouch "An attempt to rebind a global variable properly results in a compiler error." - not like Matlab
<phoe> jackdaniel: could you give some example input and output?
<phoe> puchacz: that's why earmuffs are suggested
<puchacz> how do I use earmuffs:)  ?
<jackdaniel> sure: (merge-branches 1 2 3 8 6 20) -> (1 20)
<jackdaniel> because 1 and 2 are adjacent to the range 3, 8 and the range 3, 8 and the range 6, 20 overlap
<phoe> *foo* ; the asterisks at the beginning and end are called earmuffs in the Lisp world
<puchacz> ah
<puchacz> and they look like special variables, so better to use =foo= or -foo- indeed
<phoe> yes
<jackdaniel> and, for example (merge-branches-1 0 2 5 9 10 20) will yield (nil nil) because they can't be merged into a single range
<jackdaniel> all arguments are always integers
<mfiano> It would be pretty disastrous if you didn't use these markings and in some LET binding you tried re-using a dynamic variable as a lexical one...
s-liao has joined #commonlisp
<puchacz> yes
<puchacz> cheers :)
voltron has joined #commonlisp
<phoe> jackdaniel: let me check if I understand this correctly - in (merge-branches 1 2 3 8 6 20) the actual input are numbers 1 and 2, and ranges [3..8] and [6..20]?
<jackdaniel> yes
<phoe> I'm trying to understand the API
<phoe> OK - and the numbers are some sort of indexes into the respective ranges?
<jackdaniel> no, it is just after constructing a tree this (sub-)function tries to reduce it by connecting adjacent leafs
<puchacz> guys, can I use it like this? (define-symbol-macro setg global-vars:define-global-parameter)
<jackdaniel> each node stores values COMMON and MERGED
<puchacz> setg is shorter than the whole name
<phoe> puchacz: nope
<phoe> `(defmacro setg (&rest stuff) `(global-vars:define-global parameter ,@stuff))
<jackdaniel> MERGED is a single number (not adjacent with MERGED) and MERGED is two numbers representing the range
<puchacz> phoe: no first quote I take?
<jackdaniel> s/MERGED is a single/COMMON is a single/
<jackdaniel> so when two nodes are to be merged there are two ranges and two numbers (that potentially may connect both ranges) i.e [1..4] 5 6 [7..8]
<phoe> puchacz: you'll need the first quote
<phoe> jackdaniel: OK, so the first number is not adjacent to the first range, and the second number is not adjacent to the second range
<puchacz> phoe: why? isn't it a normal macro to be put in a file somewhere?
<puchacz> the quote before `(defmacro ...) looks weird
<jackdaniel> exactly
trocado has joined #commonlisp
<phoe> puchacz: you want (setg -foo- 42) to expand into (gv:d-g-p -foo- 42)
<jackdaniel> I mean - the function seems to work fine (and I'll test it further later), just this algorithm is quite lengthy
<phoe> puchacz: if you don't quote it, then your macroexpander function will execute that code
<phoe> and you most likely do *not* want that
<jackdaniel> I would have thought (given the problem description) that it is enough to solve it with a nested loop and voila :)
<puchacz> phoe - you put quote before (defmacro
<phoe> oh wait
<phoe> oh goodness, I did not notice it
<phoe> yes, this one is not necessary :D sorry
<puchacz> sure:)  thanks
<phoe> jackdaniel: are the numbers or ranges nullable? it seems so from the source code
<puchacz> IF sbcl was not so loud about warnings, could I just use setf / setq?
<phoe> puchacz: it's undefined behavior in standard CL, and generally not advised
<puchacz> oki
<jackdaniel> yeah, they are
<phoe> OK, that's one source of complication
<mfiano> puchacz: Yes, it is undefined behavior. You're lucky SBCL does the right thing but warns you about the problem. Other implementations may do anything else at all
<phoe> they usually do the right thing™, whatever it means, for compatibility with older lisps
<mfiano> I guess "expected" is a better term
<phoe> sure
<unixlisp> ldb: CORBIT is very early, I have played with it, but have not found the applications about it. KR is intuitive, interesting and has a big GUI application available.
tyson2 has joined #commonlisp
voltron has quit [Ping timeout: 256 seconds]
<ns12> Hi, why is it MAKUNBOUND instead of MAKEUNBOUND? Isn't it weird that "E" is missing?
<beach> ns12: For hysterical raisins.
<ns12> From which Lisp did Common Lisp inherit this weird spelling?
<ldb> ns12: it's because maclisp uses that name
<engblom> I is it possible to make a truly standalone binary? Now I have compile by first doing (ql:quickload :foo)(asdf:make :foo) and it will create a binary. However this binary still somehow depennds on sbcl as when sbcl updates I have to recompile.
<ldb> for SBCL you need to attach the "kernel" to executable
<beach> engblom: No, you will always need the operating system to run it, unless you are using Mezzano or Movitz.
<VincentVega> ns12: Haven't you ever heard of the great tribal African leader and a philosopher Makunbo Und?
<engblom> beach: I meant a standalone that is not dependent on if sbcl is installed or updated.
<random-nick> but calling it MAKE-UNBOUND would make it sound like a constructor function
<random-nick> like MAKE-INSTANCE
<engblom> ldb: How do I attach the kernel when compiling?
<beach> engblom: Then there is an option to SBCL for creating such a thing.
<ns12> VincentVega: ???
<VincentVega> unixlisp: could you please check your pms?
<ldb> engblom: set :executable option to t when save-lisp-and-die
<ns12> random-nick: Makes sense. At least a little sense.
<beach> ns12: Be grateful they did not also import "haulong" and "haipart".
<ns12> What is that?
<beach> More MacLisp functions.
<VincentVega> ns12: beach is referring to the great chinese revolutionists
<ns12> beach: I see. Those are funny spellings. https://www.maclisp.info/pitmanual/bits.html#15.5.1
<beach> ns12: Just like MAKUNBOUND, yes.
<pjb> That said, it's not justified on the length of the symbol name: (length "MAKEUNBOUND") #| --> 11 |# this would not take more space than MAKUNBOUND or less than MAKE-UNBOUND.
<ldb> but would make less typing
<ldb> people didn't have tab completion that time
<pjb> ldb: makunbound is more pronounceable than makeunbound.
<ns12> It's the second decade of the 21st century and yet SBCL has no tab completion.
<pjb> ns12: use emacs+slime for that!
<pjb> or rlwrap.
<pjb> It's the 5th decade of unix, each tool does what it does, and doesn't try to do what the other tools do.
<ns12> I don't use Emacs. I have been programming lisp for years without Emacs.
<pjb> whatever
<engblom> ns12: What do you use?
<ldb> ns12: use McCLIM's Listener for that!
<ldb> unless you don't use unixs
<ns12> engblom: In /bin/sh, I type "sbcl", then I press the Enter key.
Inline has quit [Ping timeout: 240 seconds]
<ldb> holy morries
<ns12> ldb: Is McCLIM's Listener suitable for daily use? Or is it still in beta or something like that?
<ldb> It's close enough to what you can get on a Lisp Machine, and way better than /bin/sh
<beach> ns12: SBCL doesn't do that because it relies on other modules for it, like SLIME.
<beach> ns12: That's just sane modularity and code factoring.
<jackdaniel> ugly as the algorithm is, it does the job it seems -- https://imgur.com/SdpGLqS.png
<ns12> I have tried rlwrap before, but it doesn't really do "tab completion" since it doesn't know about Common Lisp. For example, if I type "MAKUNB", rlwrap is not going to magically insert "MAKUNBOUND" when I press Tab ...
<ns12> jackdaniel: What's that? The McCLIM Listener?
<jackdaniel> well, tentatively yes, but the prime feature of this screenshot is the visualisation of the new fast generic function dispatch for ecl
<jackdaniel> (i.e minimizing the optimal split if it is possible to merge branches)
<ldb> ns12: there's one more thing you can try if you don't get GUI, (ql:quickload "linedit")
gaqwas has quit [Remote host closed the connection]
Inline has joined #commonlisp
<ns12> ldb: I don't use quicklisp either... I'm starting to think that I am highly unconventional. Anyway, in Guix it is "guix install sbcl-linedit".
<ns12> Then in the REPL, do something like (asdf:load-system :linedit).
<ns12> Further instructions: https://github.com/sharplispers/linedit
<unixlisp> There is an old sbcl-readline, also cl-readline, cl-repl or use LEM.
* ldb donno a reason for using guix/nix execpt to use Haskell
lottaquestions has quit [Remote host closed the connection]
<ns12> ldb: I use Guix mostly for the Common Lisp libraries ...
puchacz has quit [Quit: Client closed]
lottaquestions has joined #commonlisp
unixlisp has left #commonlisp [#commonlisp]
ldb has quit [Quit: ERC (IRC client for Emacs 27.2)]
unixlisp has joined #commonlisp
<phoe> basic unit tests included, but please expand on them
<phoe> jackdaniel: I assume that a number X is equivalent to a range [X..X]
<phoe> and this is possibly optimizable further, e.g. to bail out of MERGE-RANGES early if the outer loop fails to merge anything
miique has joined #commonlisp
<jackdaniel> thanks, I'll consider replacing the code I have
<phoe> sure - I basically tried to throw out a lot of assumptions like "number1 is not adjacent to range1" and so on, then treated all numbers as ranges, then tried to merge ranges in a loop
<phoe> the "throw out a lot of assumptions" step is dangerous though
<phoe> so please check if this code still does what you want
<jackdaniel> I'm more concerned whether it doesn't cons more and is slower - these assumptions were used among other things to optimize it
<phoe> (and I threw them out because I though they're unnecessary, in the end we're just merging ranges here)
<beach> ns12: It is amazing that you don't absolutely hate programming in Common Lisp, or in any language for that matter. I can't imagine why anyone would make choices that slow down the development by as much as you must endure on a daily basis.
trocado has quit [Ping timeout: 240 seconds]
<phoe> jackdaniel: oh! that's a possibility with my code - %MERGE has a single LIST call, MERGE-RANGES has a COPY-SEQ call, MERGE-RANGES-AND-NUMBERS has a MAPCAR and a LIST call
<beach> It drives me crazy when I forget to start a CLIM application in a separate thread, thereby depriving me of the minibuffer display of the lambda list for the operators that I use.
<engblom> 15:43 * ldb donno a reason for using guix/nix execpt to use Haskell
<jackdaniel> beach: use (clim:find-application-frame 'frame-name) instead of (clim:run-frame-top-level …)
<jackdaniel> as a side benefit if the application frame is already started, then unless explicitly told it will raise it instead of creating another one
<beach> jackdaniel: I just meant that I forget to type :NEW-PROCESS T.
<engblom> I use nixos, not because of nix itself, but because now I have a single configuration file I can copy a new system whenever I update to a new computer and in a few minutes I have an identical setup.
<_death> beach: maybe make it T by default?
<ns12> beach: I normally have three terminal windows open when I program in Common Lisp. In one window is an SBCL REPL that I use for evaluating small snippets. In another window is Vim where I write Common Lisp. The third window is for running code using "sbcl --script ...".
<beach> _death: Yes, that's anther thing I keep forgetting.
<beach> ns12: So why don't you have Vim do the TAB completion for you?
<ns12> beach: It is the REPL (first window) that has no good tab completion.
<Xach> phoe: email i guess, or github
<beach> ns12: So why don't you run the REPL through the Vim equivalent of SLIME so that Vim can do the TAB completion for you?
unixlisp has quit [Remote host closed the connection]
Bike has joined #commonlisp
<ns12> beach: Is there such a thing? Many years ago, the Vim equivalents of SLIME were all buggy. Nowadays, I think they are all still in beta. I will look again, but I'm not optimistic.
waleee has joined #commonlisp
<beach> ns12: Well, I was assuming that you would choose tools that are adapted to the task at hand. I am not using Vim so I don't know what is available. But if it doesn't have an equivalent, it is perhaps not the right tool for Common Lisp programming.
nature has joined #commonlisp
<beach> ns12: I mean, it seems a bit strange to choose a tool that doesn't have a decent REPL and then complain that SBCL is not filling in the gaps of the tools you have chosen.
<ns12> Actually, I feel pretty comfortable with my current setup. I have used Emacs + SLIME in the past but it is just not for me. I really tried to like it.
unixlisp has joined #commonlisp
<beach> ns12: You can use whatever tools you like, but to complain about SBCL not doing something that is not its job seems a bit strange then.
<ns12> I am comparing SBCL to something like CLISP, which comes with line editing keybindings out of the box.
<beach> I am sorry to hear that it does that.
<Xach> there is a library linedit that adds line editing
<ns12> beach: Interesting opinion. Why do you think that?
Inline has quit [Ping timeout: 240 seconds]
<beach> ns12: Like I said, modularity and code factoring. That should be a separate tool or module, independent of the Common Lisp implementation.
<beach> ns12: Already there is way too much duplicated effort between different Common Lisp implementations, and to add GUI-like features to each one would make the situation even worse.
<jackdaniel> given that the standard mentions repl, debugger and even editing (with a function ed) it is a shame that most implementations provide very primitive tooling
<jackdaniel> perhaps in the future they could be packaged with portable libraries though, that would make all satisfied I suppose
<Xach> I found out why I couldn't reach quicklisp.org a few days ago - my ISP had blocked my hosting provider for some unrelated malicious SIP attacks originating from my hosting company's subnet. Resolved now.
<Xach> It truly affected only me (and any Lispers who share my small ISP)
<VincentVega> ns12: slimv, even ~5 years back, had a decent REPL and I don't remember running into trouble. It was all actually a quite streamlined setup. I did switch to emacs later though (but without minding this particular purpose).
<ns12> Thanks. I'll take a look at slimv again.
aartaka has joined #commonlisp
<ns12> jackdaniel: Unfortunately, ED does not work out of the box in SBCL.
<jackdaniel> my point exactly
<ns12> It seems to require setting *ED-FUNCTIONS* before ED can be used ...
<jackdaniel> but there are hooks
<_death> Xach: wow.. how did you figure out that this was the issue?
<Xach> _death: I emailed my ISP and said "why can't I reach my colocated server from my home connection?" and they found and fixed the problem.
<jackdaniel> so in principle you coild augument the implementation with better tooling (i.e prepackaged)
<Xach> (I used to work there, but I did not need to use any inside connections to resolve it.)
s-liao has quit [Quit: Client closed]
<_death> Xach: a black swan in bofh lake
<unixlisp> cl-repl is fancy.
<ns12> jackdaniel: ED does seem to work in CLISP for files and user-defined functions.
unixlisp has quit [Remote host closed the connection]
unixlisp has joined #commonlisp
unixlisp has quit [Remote host closed the connection]
unixlisp has joined #commonlisp
unixlisp has quit [Remote host closed the connection]
unixlisp has joined #commonlisp
unixlisp has quit [Remote host closed the connection]
unixlisp has joined #commonlisp
epolanski has joined #commonlisp
voltron has joined #commonlisp
<phoe> jackdaniel: if you'd like me to optimize this, what are the types of the numbers in your situation? ub32?
<phoe> or something else?
unixlisp has quit [Remote host closed the connection]
unixlisp has joined #commonlisp
unixlisp has quit [Remote host closed the connection]
unixlisp has joined #commonlisp
unixlisp has quit [Remote host closed the connection]
<jackdaniel> phoe: I'll manage, thanks
<phoe> OK - I think that you can use MERGEABLEP and %MERGE on your own and then control what and how gets consed on your own; maybe even update %MERGE to use VALUES rather than LIST
<phoe> this should give you zero allocation
<jackdaniel> I don' t consider my version unacceptably ugly, I was womdering whether I dont miss some obvious algorithm
unixlisp has joined #commonlisp
attila_lendvai has quit [Ping timeout: 252 seconds]
unixlisp has quit [Remote host closed the connection]
unixlisp has joined #commonlisp
unixlisp has quit [Remote host closed the connection]
unixlisp has joined #commonlisp
unixlisp has quit [Remote host closed the connection]
<phoe> after re-reading it twice I don't think you missed anything
unixlisp has joined #commonlisp
unixlisp has quit [Remote host closed the connection]
unixlisp has joined #commonlisp
unixlisp has quit [Remote host closed the connection]
unixlisp has joined #commonlisp
unixlisp has left #commonlisp [#commonlisp]
Algernon69 has joined #commonlisp
rotateq has quit [Ping timeout: 250 seconds]
waleee has quit [Ping timeout: 240 seconds]
voltron has quit [Ping timeout: 256 seconds]
_73 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
nij- has joined #commonlisp
<nij-> Hello! I find myself repeatedly pouring the slot values out from instances. I can write a macro to resolve that. But just curious if such macro has been built-in to CL? Like this: https://bpa.st/LEMQ
<beach> clhs with-slots
<nij-> Brilliant! Thanks :)
<beach> But you should not use slot values in the first place.
<beach> Slots are implementation details, and it is better to use slot accessors, and...
<yitzi> clhs with-accessors
<beach> Exactly.
<nij-> Gotcha beach. And yitzi: Wow even better! Thanks :)))
<yitzi> There is a WITH-SLOTS, but stay away from it unless you have good reason. As beach points out.
<nij-> So beautiful.
<beach> nij-: Slot names are used basically so that the same slot is identified when you want to supply more information about a slot in a subclass, and so that the same slot is referred to when the class is redefined.
<beach> nij-: For all application code, it is better to use slot accessors.
<beach> nij-: Accessors have the additional advantage that they can be replaced by "calculating" generic functions without any changes to client code.
<beach> nij-: And you can use them in mapping functions, etc, etc.
<yitzi> And the :before, :after and :around methods are useful if you are doing network comms, serialization or some strange slot allocation strategy.
<yitzi> All probably rare examples, though. :)
<beach> The main argument is that slots are implementation details and should be "visible" unless absolutely necessary, like for the cases I mentioned above.
<beach> er
<beach> should not be visible
* beach is exhausted after a long day of doing silly admin tasks.
jealousmonk has joined #commonlisp
attila_lendvai has joined #commonlisp
<nij-> Thanks :) I'm educated!
<beach> Great!
voltron has joined #commonlisp
taiju has quit [Ping timeout: 240 seconds]
taiju has joined #commonlisp
treflip has joined #commonlisp
attila_lendvai has quit [Ping timeout: 240 seconds]
nij- has quit [Ping timeout: 250 seconds]
ajoberstar has joined #commonlisp
euandreh has quit [Ping timeout: 250 seconds]
rotateq has joined #commonlisp
euandreh has joined #commonlisp
attila_lendvai has joined #commonlisp
trocado has joined #commonlisp
tyson2 has joined #commonlisp
gaqwas has joined #commonlisp
gaqwas has quit [Remote host closed the connection]
lisper29 has joined #commonlisp
alfonsox has quit [Remote host closed the connection]
attila_lendvai has quit [Ping timeout: 268 seconds]
jstoddard has joined #commonlisp
NotThatRPG has joined #commonlisp
trocado has quit [Ping timeout: 268 seconds]
Lycurgus has joined #commonlisp
waleee has joined #commonlisp
Lycurgus has quit [Quit: Exeunt]
cosimone has quit [Ping timeout: 250 seconds]
trocado has joined #commonlisp
trocado has quit [Ping timeout: 240 seconds]
varjag has quit [Read error: Connection reset by peer]
voltron has quit [Remote host closed the connection]
gaqwas has joined #commonlisp
Oladon has joined #commonlisp
treflip has quit [Quit: good night]
amb007 has quit [Ping timeout: 250 seconds]
voltron has joined #commonlisp
amb007 has joined #commonlisp
winning-luser has quit [Quit: Leaving]
Algernon69 has quit [Ping timeout: 250 seconds]
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
waleee has quit [Ping timeout: 240 seconds]
waleee has joined #commonlisp
alcaeus has joined #commonlisp
NotThatRPG has quit [Read error: Connection reset by peer]
ajoberstar has quit [Ping timeout: 245 seconds]
azimut has quit [Ping timeout: 276 seconds]
NotThatRPG has joined #commonlisp
<alcaeus> Hi all, what's the best way to sum elements of a sublist for a setf statement? Currently I'm using "(setf x (eval `(+ ,@(subseq l 0 4))))" It works, just checking for good form.
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
<NotThatRPG> alcaeus: EVAL is to be avoided whenever possible. Suggest you use REDUCE here instead.
<alcaeus> NotThatRPG Thank you!
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<NotThatRPG> alcaeus: NP
attila_lendvai has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<Alfr> alcaeus, how about? (reduce #'+ sequence-here :start 0 :end 4)
<Alfr> alcaeus, just be weary when your (sub-)sequence has less than 2 elements, then you really want to read its description carefully.
amb007 has quit [Ping timeout: 256 seconds]
attila_lendvai has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
epolanski has quit [Quit: Connection closed for inactivity]
gaqwas has quit [Remote host closed the connection]
trocado- has joined #commonlisp
<alcaeus> Alfr: That makes a lot more sense than using subseq, thanks. Also my problem calls for exactly 4 elts so I will spend some time with the hyperspec per your suggestion.
foxfromabyss has joined #commonlisp
<foxfromabyss> Hello :) I am sorry if this is an easily google-able question, but here is it: i created a lisp project with `quickproject`, and want to add a dependency to the project. do I do that manually to the .asd file? Would love to know what the most popular way is
<rotateq> in you DEFSYSTEM form you can have a keywords option with :depends-on
<rotateq> or do you mean depending on project files?
<trocado-> foxfromabyss: I edit the .asd file
karlosz has joined #commonlisp
Josh_2 has joined #commonlisp
<Josh_2> Evening
<rotateq> hey Josh_2
<Josh_2> I need to configure my deployed lisp system using a human readable file, is there a library around for this?
<rotateq> what do you have upto now?
<Josh_2> Nothing, I am just using globals within my image, but I need to configure those globals with a human readable file
<Josh_2> Certain info like port numbers, domain names, api keys etc etc need to be either configured from like a .json or something
<Josh_2> or xargs perhaps and just saved within bknr
<Josh_2> I guess I can just use a plist and export/import as json
<Josh_2> Was just hoping a tool already existed for this, save me reinventing the wheel
paul0 has quit [Remote host closed the connection]
paul0 has joined #commonlisp
<foxfromabyss> trocado- thanks :P rotateq i was referring to :depends-on keyword(not sure if the term is correct) makes sense, thanks!
dlowe has joined #commonlisp
<NotThatRPG> Josh_2: Yes, it seems like there should be a config file parser library out there somewhere, but I don't know of one off-hand.
<rotateq> yay
<Josh_2> I assume asdf:system-relative-pathname requires a system that can be found by asdf in order to convert the path from relative to absolute?
<phoe> yes
<phoe> the path you provide is relative to the system, but the path of the system itself is (AFAIK) absolute and the path returned by asdf:s-r-p is (AFAIK) also absolute
<Josh_2> Alright, what can I use that is not relative to an asdf system? Ofcourse "../" would normally work, but bknr doesn't like it
<Josh_2> I need relative to a deployed image
waleee has quit [Ping timeout: 252 seconds]
<Josh_2> I could always just use an absolute path when deploying on linux
waleee has joined #commonlisp
amb007 has quit [Ping timeout: 250 seconds]
amb007 has joined #commonlisp
<foxfromabyss> what's the difference between .asd and package.lisp, as far as dependencies go? do I need to keep both updated at the same time?
trocado- has quit [Ping timeout: 260 seconds]
aartaka has quit [Ping timeout: 245 seconds]
<dlowe> asd(f) files contain the system definition - instructions on how to build a particular system. package.lisp usually contains package definitions - namespaces used by the program
<dlowe> the system name doesn't have to be the same as the package name but it's a lot less confusing that way
<NotThatRPG> Josh_2: When you say "deployed image," do you mean a lisp core image?
gaqwas has joined #commonlisp
lisp123 has joined #commonlisp
<Josh_2> I mean a deployed executable that goes to my customers
azimut has joined #commonlisp
<foxfromabyss> i see i see, thanks
<_73> Is it possible to use a lambda as a predicate when denoting a type with DEFTYPE? I was expecting SATISFIES to be able to take a lambda as an argument but it doesn't seem to work. http://dpaste.com/CFPFAF8K7
dlowe has quit [Remote host closed the connection]
<lisp123> I am experimenting with a style of CLOS where I make each of the slots their own classes. E.g. if (defclass something ((A ..) (B ..) (C ..))) then A, B and C are also their own classes. Seems to work relatively well. However I am seeing some duplicate code across methods implementing for A, B and C. So I am thinking of a SOMETHING-COMPONENT protocol to group these methods. Has anyone gone down this road?
<phoe> (deploy:data-directory) handles this for you if you use deploy
<phoe> lisp123: you are describing mixins
<lisp123> (and in my example, I would actually write SOMETHING as (defclass something (a b c) ()))
<Josh_2> I do not have to worry about foreign libraries
<Bike> _73: No
<phoe> Josh_2: sure, but deploy isn't just about foreign libraries, it's about actually managing stuff from inside deployed images
<Bike> _73: that would entail TYPEP compiling functions at runtime (in a compiling implementation), which would be kind of silly
<lisp123> phoe: Yes and No I think. Yes in the sense you are absolutely right. No in the sense that I am thinking less about adjacent concepts that can be "mixed-in" and more about seperating all the 'essential' slots of a class into their own. And then grouping them when needed by a 'something-component' protocol
<Josh_2> Perhaps roswell would be more useful
<_73> Bike: ok thanks now I know what the problem is. I will need to spend time thinking about why.
<lisp123> So A could be (defclass A (something-component) ((A :initarg :a :accessor A)))
<lisp123> So just wondering if others have used protocol classes like 'something-component' in my example to group together components of a class which have been separated out from it during the definition process
<phoe> lisp123: uhhh, what's the difference between "separating all behaviors of a class into their own and later assembling concrete classes from them" and "separating all behaviors of a class into mixins and later assembling concrete classes from them"
<phoe> from what I read, you *are* describing mixins
<Josh_2> Slots are already instances of a class
<Josh_2> problem solved :P
<phoe> mixins are protocol classes, they are used to group together components of a class which have been separated out from it during the definition process
<phoe> like it's literally s/component/mixin/g from what I see
<lisp123> phoe: Okay so if you have three mixins, A, B & C, is it common to define ANOTHER protocol called 'something-component' which all three mixins inherit from to show that they will be mixed in later into SOMETHING?
<phoe> sure, it is - even if just to prevent them from being directly instantiated
<lisp123> Great, ok sounds like I am not doing anything too crazy :P
<phoe> oh wait, scratch that - I misunderstood what you are doing
<phoe> if all of your mixing inherit some class then all concrete classes will *also* inherit that class
<lisp123> Oh okay, does it make sense now?
<phoe> s/mixing/mixins/
<phoe> do you want that to happen?
<lisp123> I don't mind. I just want to be able to group all the components of a class (defined in their own classes), so that I can write methods that apply to all of them
<lisp123> But not sure if I'm overinventing here
<phoe> it'll work, just remember that if A is an indirect instance of SOME-COMPONENT then (defclass concrete-thing (a b c) ()) (make-instance 'concrete-thing) is an indirect instance of SOME-COMPONENT
<phoe> so your methods are also going to work for concrete things.
<lisp123> Makes sense and I would need to be careful about that - I guess that only applies for BEFORE/AFTER/AROUND yes?
<phoe> no, for all methods
<lisp123> But if I have a method defined on concrete-thing, that will take precedence right
<phoe> if you have a method that applies to a SOME-COMPONENT then every CONCRETE-THING is a SOME-COMPONENT
<phoe> yes
<lisp123> So unless I didn't define that method
<phoe> but something seems off for me, but I'd need to take a look at your inheritance tree
<lisp123> It does seem a bit off, let me play around with it and come back with an example
<phoe> and why do you want to define methods for your mixins only that do *not* apply to concrete things that have these things mixed in
<phoe> these are the weird parts
<lisp123> Basically, if I have A, B and C. I can create A from B, B from A, C from B, etc. So once I have a few basic functions that generate A->B, B->C, C->A for example, the rest can be built on the top of that
<phoe> What do you mean, create A from B?
<lisp123> A can be an english version of a sentence. B can be an equivalent in Japanese or French
<lisp123> (not that simple, but basically they are separate objects that can be mechanically transformed to each other)
<lisp123> I kinda see your point though, let me have a think
<lisp123> on whether it makes sense to group them into a class to begin with
<lisp123> The main reason for grouping was to do the transformations once off and store the results in slots
<phoe> huh - a sentence should not keep its own translations in slots
<phoe> unless you want to have N-1 slots if you have N languages
<phoe> if anything, an abstract sentence can keep a hashtable from languages into strings, or something like that
<phoe> but that's already OO design sort of stuff
<lisp123> hmm let me consider this hash table approach further
<lisp123> Makes sense from a memoizing calculation perspective
lisper29 has quit [Quit: Leaving]
aeth has quit [Ping timeout: 240 seconds]
<lisp123> phoe: thanks for the help. i didn't really consider hash tables vs. storing in slots until now, that could quite useful later on (depending on performance and the computational intensity of each transformation)
trocado has joined #commonlisp
aeth has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 27.1]
<phoe> lisp123: no problem
lisp123 has quit [Quit: Leaving...]
trocado has quit [Ping timeout: 240 seconds]
azimut_ has joined #commonlisp
azimut has quit [Ping timeout: 276 seconds]
_73 has quit [Remote host closed the connection]
voltron has quit [Remote host closed the connection]
rito_ has quit [Quit: Leaving]
VincentVega has left #commonlisp [ERC (IRC client for Emacs 27.2)]
karlosz has quit [Quit: karlosz]
trocado has joined #commonlisp
_73 has joined #commonlisp
varjag has joined #commonlisp
<foxfromabyss> yet another stupid question, probably not very Common Lisp related, but still. I created a new project with `quickproject`, but when I try to load the project via `ql:quickload :project_name` that fails with "SYSTEM NOT FOUND". the project is located in `~/quicklisp/local-projects/project_name`, but the `ql:list-local-projects` returns nil :/ out
<foxfromabyss> of ideas what is wrong at this point to be honest
<foxfromabyss> what might I be doing wrong? :)
<phoe> foxfromabyss: does (quicklisp:register-local-projects) help?
<foxfromabyss> phoe, tried that already, forgot to mention. sadly, no
<foxfromabyss> i know for a fact that it worked like 2 hours ago, but i've already set up a fresh projects with nothing in it and it still doesn't work
huckleberry has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<phoe> foxfromabyss: what is the name of the ASD file?
<foxfromabyss> project_name
<foxfromabyss> `project_name`
<phoe> does the system name and the filename match? like, does project_name.asd contain (defsystem project_name ...)?
<foxfromabyss> * `project_name.asd`
<foxfromabyss> yes, everything matches
<foxfromabyss> i haven't changed anything after it's been spewed out by the quickproject
<phoe> is it the underscore in the project name?... I don't think so
<foxfromabyss> no, it's actually called `hexagoner`
<foxfromabyss> but i've omitted it for simplicity
<Xach> foxfromabyss: hi
<Xach> foxfromabyss: that sounds pretty weird!
<_death> are you sure that it refers to system hexagoner
<Xach> foxfromabyss: what do you get from ql:*local-project-directories*?
<foxfromabyss> @_deathow do I check that?
<foxfromabyss> _death  do I check that?
<_death> what is the exact error message
<foxfromabyss> oh, i think i know what the issue is
<foxfromabyss> ```
<foxfromabyss> CL-USER> ql:*local-project-directories*
<_death> also, I missed your remark about list-local-projects
<foxfromabyss> (#P"/usr/lib/quicklisp/local-projects/")
<foxfromabyss> ```
<foxfromabyss> sorry for the borked markdown
<phoe> oh, that would be the reason
<phoe> you do not have ~/quicklisp/local-projects/ in there
<foxfromabyss> well yes, but why would it be like that. I don't think i have changed anything
<phoe> what's your OS?
<foxfromabyss> arch
<phoe> how did you install quicklisp?
<foxfromabyss> from AUR
<phoe> that's the reason
<phoe> arch people try to outsmart lispers and set their own local-projects dir
<foxfromabyss> is this a very-not-canonical way?
<phoe> well, I have learned to distrust linux distro maintainers when it comes to anything CL - be it arch or debian or whoever
<phoe> I get my implementations from roswell and I download quicklisp straight from the official website
<phoe> no chance for pathname or version incompatibility this way.
<zbrown[m]> I mean, that's generally a good practice for all programming languages except maybe the system C
<foxfromabyss> makes sense :P
<foxfromabyss> I would honestly love to stick it into the package manager somehow, but i guess i can live without that as well
<zbrown[m]> (see: `asdf`)
<foxfromabyss> any hints/tips/advices on where to stick `quicklisp.lisp` ?
<foxfromabyss> thanks a lot for the help by the way, really appreciate ti
<foxfromabyss> *it
<foxfromabyss> > any hints/tips/advices on where to stick `quicklisp.lisp` ?
<foxfromabyss> directory wise i mean
<Josh_2> Is there a lisp -> json that will pretty print json? Instead of all the json being on a single line, there are newlines between elements in the object?
<Josh_2> jonathan outputs with no newlines which makes using it for a config file kinda hard
<Josh_2> foxfromabyss: Pretty sure you dont have to touch that, just follow the install instructions on the website
<Josh_2> perhaps quicklisp.lisp is the file, one sec
<foxfromabyss> i mean, i think i have to keep it around(?)
<Josh_2> oh right yes, just put it anywhere and then follow the instructions
<_death> foxfromabyss: you can delete it after installing quicklisp
<foxfromabyss> i see i see, thanks!
<Josh_2> Perhaps I will have no config file at all and will just have it as a program within my image
igemnace has joined #commonlisp
gaqwas has quit [Remote host closed the connection]
trocado has quit [Ping timeout: 240 seconds]
nature has quit [Quit: leaving]
tyson2 has quit [Remote host closed the connection]
<phoe> Josh_2: jzon does
<Josh_2> Thanks phoe
robin has quit [Remote host closed the connection]
robin has joined #commonlisp
foxfromabyss has quit [Quit: Client closed]
mrmr has joined #commonlisp
pve has quit [Quit: leaving]
varjag has quit [Quit: ERC 5.4.1 (IRC client for GNU Emacs 29.0.50)]
gaqwas has joined #commonlisp
Oladon has quit [Quit: Leaving.]
waleee has quit [Ping timeout: 268 seconds]
tyson2 has joined #commonlisp
waleee has joined #commonlisp
gaqwas has quit [Ping timeout: 256 seconds]
igemnace has quit [Remote host closed the connection]
trocado has joined #commonlisp
rotateq has quit [Ping timeout: 245 seconds]
random-nick has quit [Ping timeout: 250 seconds]
perrierjouet has quit [Ping timeout: 268 seconds]
igemnace has joined #commonlisp
trocado has quit [Ping timeout: 240 seconds]