jackdaniel 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> | Pastebin: <https://plaster.tymoon.eu/>
NotThatRPG_away has quit [Quit: Textual IRC Client: www.textualapp.com]
Josh_2 has quit [Read error: Connection reset by peer]
Josh_2 has joined #commonlisp
attila_lendvai_ has joined #commonlisp
attila_lendvai has quit [Ping timeout: 256 seconds]
<dipper_> **hi**
<pjb> dipper_: single stars are enough for dynamic: *hi*
<thuna`> Is this guaranteed to return? https://0x0.st/olHv.txt
causal has quit [Quit: WeeChat 3.7.1]
<dipper_> thanks I want try does it have code format in irc like #begin_src in emacs
<pjb> I don't know the pathname-utils package.
<thuna`> dipper_: Absolutely not
<dipper_> ok, it realy hard to read code snippet in there
Catie has quit [Quit: sQuit]
<dipper_> really
<thuna`> dipper_: You can paste it into a .lisp buffer
<pjb> for example, I'd be more confident with: (loop for pathname = directory then (make-pathname :directory (butlast (pathname-directory pathname)) :default pathname) until (= 1 (length (pathname-directory pathname))) finally (return pathname))
<pjb> since this reduces the length of a list by 1 at each iteration.
<pjb> But this wouldn't go up to the "root" unless (eq (first (pathname-directory pathname)) :absolute)
<thuna`> Yeah, that's what I was going to say
<thuna`> Also, here's pathname-utils reference: https://quickref.common-lisp.net/pathname-utils.html
<pjb> thuna`: the problem is what assumptions you want to do?
<pjb> thuna`: for example, on a unix file system, repeating cd .. should eventually lead you to the root, where /../ = /
<thuna`> Well, I don't want to make any assumptions, other than that <PATHNAME> is a valid pathname, since I do TRUENAME at the start.
<pjb> thuna`: but it's also possible, even on unix, to have extensions where /.. points to a network namespace!
<thuna`> But is it possible for /../../..--- to go on forever?
<thuna`> Wouldn't it end at some point?
<pjb> truename assumes that the pathname exists, and you can access it too.
<pjb> thuna`: I just told you. On normal unix systems, it will end. If you have some extensions such as network file systems, it may not (I assume, you'd have to check it).
<pjb> It would be better to not make such an assumption and do something else.
<pjb> What do you really want?
<thuna`> I want to check DIRECTORY and all its parent directories for a specific file
<pjb> For example, remember that a pathname has a host and a device. They are used eg. on MS-Windows.
<pjb> C:/foo/bar/ = (make-pathname :device "C" :directory '(:absolute "foo" "bar"))
<pjb> thuna`: also, pathnames have :up and :back (which are different, notably when you have symlinks).
<thuna`> Right, but that's why I assumed that after enough :UP directory components the pathname would stop changing
<pjb> (merge-pathnames (make-pathname :directory '(:relative :up)) #P"/Users/pjb/tmp/") #| --> #P"/Users/pjb/" |#
<pjb> (merge-pathnames (make-pathname :directory '(:relative :back)) #P"/Users/pjb/tmp/") #| --> #P"/Users/pjb/" |#
<pjb> thuna`: let's say that in general, you should reach the root, so yes.
<thuna`> It seems like (looking at the documentation of PATHNAME-UTILS:PARENT), if the original pathname is absolute, it should eventually stop.
<thuna`> "If the pathname is a directory-pathname, it returns a pathname that points to the parent thereof, if possible. Specifically, if the directory is relative and empty, :up is inserted. If it is absolute and empty, the same pathname is returned. If it is not empty, then the last component of the directory is removed. If the pathname is a file pathname, this is equivalent to TO-DIRECTORY."
<pjb> But to be safe, you could bound the number of iteration with (length (pathname-directory pathname))
<pjb> (loop repeat (length (pathname-directory pathname)) for pathname …)
<thuna`> Hmm, the documentation doesn't make it clear how TO-ABSOLUTE works
<thuna`> Oh, it literally changes it from :relative to :absolute
pve has quit [Quit: leaving]
<thuna`> Hmm, should I use UIOP/PATHNAME:ENSURE-ABSOLUTE-PATHNAME...
jolby has quit [Quit: Client closed]
<pjb> truename already does that.
<thuna`> But it checks if the file exists, no?
ttree has quit [Ping timeout: 248 seconds]
KaitoDaumoto has quit [Read error: Connection reset by peer]
seletz has joined #commonlisp
seletz has quit [Ping timeout: 260 seconds]
attila_lendvai_ has quit [Ping timeout: 256 seconds]
dipper_ has quit [Remote host closed the connection]
dipper_ has joined #commonlisp
Oladon has quit [Quit: Leaving.]
karlosz has quit [Quit: karlosz]
<dipper_> (+ 1 2)
get_in_the_fucki has joined #commonlisp
<thuna`> 3
<aeth> (+ 1 2)
<aeth> believe it or not, still 3 in most implementations
<thuna`> I mean, the standard doesn't specify what `sum' means
<aeth> in SBCL, '⑿ => |(12)|
<aeth> I'm kind of disappointed that it doesn't become '(12)
<thuna`> #\PARENTHESIZED_NUMBER_TWELVE is a character??
<aeth> I'm guessing that someone used it once for bullet points and now it has to exist forever in Unicode because of that.
<aeth> well, technically I think bullet points are unnumbered and this would be for numbered lists; same role, though
<White_Flame> while digits can be surmised, I guess the various parens aren't parens to the reader
<aeth> too bad unicode doesn't have a (defun character
<kakuhen> ✪
jeosol has quit [Ping timeout: 260 seconds]
bilegeek has joined #commonlisp
thuna` has quit [Remote host closed the connection]
bitmapper has quit [Quit: Connection closed for inactivity]
jeosol has joined #commonlisp
waleee has quit [Ping timeout: 256 seconds]
Oddity has quit [Ping timeout: 256 seconds]
mariari has quit [Quit: WeeChat 3.7.1]
mariari has joined #commonlisp
seletz has joined #commonlisp
seletz has quit [Ping timeout: 260 seconds]
tyson2 has quit [Remote host closed the connection]
Fare has joined #commonlisp
<dipper_> hi
<dipper_> I want to ask use .cl or .lisp as file suffix
<White_Flame> .lisp is by far the common one
<dipper_> eh.... same in pcl
<White_Flame> ?
<dipper_> practical common lisp
<White_Flame> oh you mean the book uses .lisp in its file naming style?
<dipper_> yes
<White_Flame> yeah, .cl is extraordinarily uncommon
<White_Flame> I don't know what its history is, maybe for lisp machines that supported CL later in life, or maybe a DOS 8.3 thing
<dipper_> may be just a good format style
<White_Flame> or just people who acknowledge the existence of other lisps ;)
<dipper_> ok
Fare has quit [Ping timeout: 260 seconds]
Fare has joined #commonlisp
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 256 seconds]
Lord_of_Life_ is now known as Lord_of_Life
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
<mfiano> Hi all. In my design notes (no actual code) yet, I need to implement a utility macro, or rather re-implement one that exists in serapeum, NEST. I don't want to use the existing one because I'm aiming for zero dependencies in this small tool, and that particular macro depends on trivia to do pattern matching. I thought there might be a nice way to do this without pattern matching. I would like
<mfiano> some help on how to go about doing this. Example in out forms: (nest (foo 1 2) (bar 3) 4) => (foo 1 2 (bar 3 4)). That is, each form of BODY is wrapped inside the preceding form.
<mfiano> (serapeum also depends on about 30 other libraries, transitively, so it is out of the question for this particular use-case)
<mfiano> I guess the one edge case to consider, is what happens when there are adjacent atoms. Do they all get added to the preceding form?
ttree has joined #commonlisp
<mfiano> Well, I think I'll skip writing another, probably poorer, implementation of this macro, and instead, write a couple ad-hoc functions for the one macro expansion in this design that will benefit from it.
<mfiano> Thanks anyway :)
count3rmeasure has joined #commonlisp
igemnace has joined #commonlisp
aartaka has quit [Ping timeout: 268 seconds]
aartaka has joined #commonlisp
count3rmeasure has quit [Ping timeout: 260 seconds]
akoana has quit [Quit: leaving]
azimut has joined #commonlisp
igemnace has quit [Remote host closed the connection]
aartaka has quit [Ping timeout: 268 seconds]
dipper_ has quit [Remote host closed the connection]
dipper_ has joined #commonlisp
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
ttree has quit [Ping timeout: 260 seconds]
ahc has joined #commonlisp
bilegeek has quit [Remote host closed the connection]
bilegeek has joined #commonlisp
rgherdt has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
enzuru has quit [Quit: ZNC 1.8.2 - https://znc.in]
enzuru has joined #commonlisp
ahc has quit [Quit: Client closed]
aartaka has quit [Ping timeout: 268 seconds]
aartaka has joined #commonlisp
bilegeek has quit [Quit: Leaving]
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
shka has joined #commonlisp
dipper_ has quit [Remote host closed the connection]
dipper_ has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Hibernating too long]
pranavats has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
pve has joined #commonlisp
mariari has quit [Quit: WeeChat 3.7.1]
pranavats has left #commonlisp [Error from remote client]
mariari has joined #commonlisp
<splittist> mfiano: our pleasure
aartaka has quit [Ping timeout: 240 seconds]
aartaka has joined #commonlisp
cage has joined #commonlisp
dipper_ has quit [Remote host closed the connection]
dipper_ has joined #commonlisp
rgherdt_ has joined #commonlisp
rgherdt has quit [Read error: Connection reset by peer]
aartaka has quit [Ping timeout: 268 seconds]
nij- has joined #commonlisp
nij- has left #commonlisp [#commonlisp]
dipper_ has quit [Remote host closed the connection]
dipper_ has joined #commonlisp
lisp123 has joined #commonlisp
random-nick has joined #commonlisp
nij- has joined #commonlisp
<lisp123> off topic but lots of good material on parsing algorithms here https://news.ycombinator.com/item?id=33662534&ref=upstract.com
random-nick has quit [Ping timeout: 260 seconds]
Oddity has joined #commonlisp
<emacs-dwim> mfiano: You mean do this? <https://plaster.tymoon.eu/view/3529#3529>
<beach> Wow, who wrote that? The indentation is completely off.
nij- has left #commonlisp [Using Circe, the loveliest of all IRC clients]
<lisp123> beach, that's honestly the worst indenting I have seen and I don't mind non-standard indentation
<lisp123> must be an issue with copy/pasting into the pastebin
<beach> One hopes.
pranavats has joined #commonlisp
seletz has joined #commonlisp
seletz has quit [Ping timeout: 268 seconds]
Bung has joined #commonlisp
aartaka has joined #commonlisp
Oddity has quit [Ping timeout: 260 seconds]
<emacs-dwim> For some reason in emacs: (setf (default-value 'tab-width) 2 (default-value 'indent-tabs-mode) t).
<emacs-dwim>
<beach> Are you using TABs in source code? I recommend against that.
<emacs-dwim> I think it came from a bad merge of a win32 .emacs with my standard .emacs. Blubs often have tab indentable nesting.
cosimone has joined #commonlisp
seletz has joined #commonlisp
Bung has quit [Quit: Leaving]
seletz has quit [Ping timeout: 260 seconds]
Lucretia has joined #commonlisp
<Lucretia> I'm following dbotton's tutorial, have slime installed, but the M-C-x key combination isn't working. I'm on kde plasma. M-x works. I've just set "Alt and Meta are on Alt" option in the kb options
<Lucretia> still not working
mcparen has joined #commonlisp
<mcparen> hi
<beach> Hello McParen.
<phoe> Shinmera: this looks like a ton of SIMD
<phoe> is this from the recent SBCL improvements?
<Shinmera> it's no simd at all
<phoe> uh, sorry, s/SIMD/SSE/
<Shinmera> but it is a lot of type propagation and inlininng.
<mcparen> I'm looking for a name of a "list with an index", where i can select the next item, the previous item, get the current item, and so on. is there a known name for such a structure?
<phoe> McParen: array?
<phoe> or rather, a vector?
<Shinmera> doubly linked list?
<beach> I think McParen wants the concept of a "cursor" too, for the current item.
<Shinmera> that can be just the cell for the doubly linked list.
<phoe> it's hard to say without the information of what operations you want to optimize for: can you insert new data into that structure? if yes, at the beginning, at the end, close to the Nth element for some N? how about deletion? do you need constant-time access to every element?
<beach> Yes, it can, but the question I think is whether such a combination has a name.
<mcparen> beach, that is what i'm looking for, or more precisely, i'm looking for the appropriate name for such a construct
<mcparen> yes
<beach> McParen: I know of no well established name for such a thing. But I know a few libraries that can implement such a thing.
<phoe> if you implement your doubly-linked list as a list of doubly-linked conses, then you get cursors kinda for free
<mcparen> phoe: it should be able to insert, delete and replace every item in the list, but most importantly i just want a pointer to a "current element" which i can move.
<mcparen> phoe, do you have an example how to do that?
<phoe> (defstruct dcons car cdr cir)
<phoe> where CAR is the "value" place, CDR is the next element, and CIR is the previous element
<phoe> the issue is to keep the CDR and CIR links consistent all the time
<phoe> with singly linked lists where is no consistency to keep, but doubly linked lists have backreferences and these need special care
<mcparen> That sounds interesting, at the moment i just have a list wrapped in a class and a counter, which i then increment, decrement, etc. I'm not sure if that is the sensible way to do this.
<beach> McParen: If you want a highly optimized implementation, then have a look at flexichain.
<beach> But Flexichain can do much more. It can insert and delete elements at arbitrary positions, and much more.
<mcparen> beach: I guess at the moment I am just looking for how to correctly name such a construct of an "indexed sequence".
<beach> OK.
igemnace has joined #commonlisp
<mcparen> i'll look into flexichain.
<Nilby> McParen: Perhaps you're thinking of associative arrays https://wikipedia.org/wiki/Associative_array of which there are many many different ways to implement depending on what you want it optimized for. Doubly linked lists have a number of bad features.
<mcparen> I've searched around and on several places the concept of a list with and index is named an "iterator", but I'm not sure that this is correct.
<beach> I think "iterator" is a much more general concept.
<mcparen> yes
<emacs-dwim> What about: xor optimized doubly-linked lists?
<phoe> what are those
<emacs-dwim> If you know which direction you came from, you can xor the next & previous pointers.
<beach> McParen: "indexed sequence" sounds good.
<phoe> mfiano: do you have your DLL implementation anywhere public now?
<beach> McParen: It seems everyone is suggesting an implementation strategy, even though all you want is a name.
<phoe> mfiano: thanks
<phoe> beach: welp, probably
<mcparen> beach: indexed sequence is obvious, but it also can be confused with a vector, which also is an indexed sequence.
<beach> phoe: Also better than a doubly linked list would be two lists, one containing the prefix, and the other the reverse of the suffix.
<beach> McParen: I fully understand.
<beach> McParen: How about "cursor sequence" then.
<emacs-dwim> (defmethod print-object ((object (eql 'some-symbol)) stream)) ;; breaks sbcl's compute-effective-method & sly backtracing overflows the stack
<phoe> beach: nice, although then traversal from either end would suffer
<phoe> emacs-dwim: you are doing undefined behavior
<phoe> emacs-dwim: you are in violation of point 19 of
<phoe> clhs 11.1.2.1.2
<specbot> Constraints on the COMMON-LISP Package for Conforming Programs: http://www.lispworks.com/reference/HyperSpec/Body/11_abab.htm
<emacs-dwim> I thought you'd know that!
<mcparen> beach: implemntation suggestions are good, i dont think my current implementation (list + counter) is very robust.
<beach> McParen: It is especially not very efficient in terms of performance.
<phoe> emacs-dwim: I have a love-hate relationship with clhs 11.1.2.1.2
<phoe> I got stung by it enough times that I even memorized the chapter number
<beach> phoe: But we haven't been given a complete list of operations yet, so we don't know whether traversal is one such operation.
<phoe> beach: OK, that works
<beach> phoe: If moving the cursor arbitrarily is an operation, then a list (simply our doubly lniked) should not be used at all.
<beach> I invented Flexichain to handle a very large subset of operations fairly well, given that there is some concept of spacial and temporal locality of operations.
<beach> Then I invented Cluffer for the special case where the sequence is an editor buffer.
<mcparen> beach: what i have is a list of widget objects in a list (or tree), an Im looking for how to keep track of which widget is slected, to be able to select the next, previous, etc.
igemnace has quit [Remote host closed the connection]
<contrapunctus> phoe: urgh, struggling to understand both the linked code and point #19... «19. Defining a method for a standardized generic function which is applicable when all of the arguments are direct instances of standardized classes.» ...why is it a problem?
<phoe> because the implementation may have a method that you are overwriting
<phoe> and/or the implementation may depend on that method not being defined
<phoe> and/or the implementation may ignore the method dispatch in that case and do something else
<phoe> imagine (defmethod print-object ((object cons) stream) ...)
<contrapunctus> Right, makes sense now...
<contrapunctus> Thanks
<phoe> if you do (defmethod print-object ((object cons) stream) (format stream "(~S . ~S)" (car object) (cdr object))) then only CCL seems to do the funny thing in practice
<phoe> most other implementations simply ignore it
<phoe> and all of this is fine by the standard since it's undefined behavior
<phoe> EQL specializers are a bit more funky, but still, an implementation can depend on the fact that you will not violate point 11.1.2.1.2.19
<phoe> and IIUC that is what SBCL does up there until it crashes and burns because its method dispatch for symbols broke
<beach> McParen: If all you want is previous/next, then the best implementation is probably two lists, one with the reversed prefix and one with the suffix. Then you can move one CONS cell from one list to the other to implement previous/next.
<beach> McParen: The "cursor" would then be located between the last element of the prefix (the first element of the reversed prefix) and the first element of the suffix.
<beach> McParen: Inserting or deleting an element at the cursor is also easy. Just push or pop an element from one of the lists.
<beach> McParen: So if you sequence is (a b c d e f g) and the cursor is between c and d, then the two lists would be (c b a) and (d e f g). Moving the cursor backward would be moving the first element of the first list to the beginning of the second list, giving (b a) and (c d e f g).
<beach> Moving forward is the reverse operation of course.
<mcparen> beach: thanks, I'll look into that. do you have a suggestion how such a construct could be properly named (other than "iterator" or "cursor sequence")?
<beach> Nope.
<beach> Sorry.
<mcparen> okay.
aartaka has quit [Ping timeout: 268 seconds]
<phoe> a book, I guess
<phoe> you flip pages to the left or to the right
pranavats has left #commonlisp [Error from remote client]
aartaka has joined #commonlisp
<beach> Not bad.
z4kz has quit [Ping timeout: 260 seconds]
shka has quit [Quit: Konversation terminated!]
shka has joined #commonlisp
attila_lendvai_ has joined #commonlisp
<mcparen> beach: I think your suggestion to name the structure "cursor-list" could be right: https://hackage.haskell.org/package/cursor-0.3.2.0/docs/Cursor-List.html
<Shinmera> I'd probably call it a "head" and the structure a "tape". You know, like the original turing machine.
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
<ski> McParen : the name for a structure, with a focus, and cheap (usually `O(1)') movement around the focus, is "zipper"
<mcparen> ski: that also looks good, thanks.
<ski> the original paper is "The Zipper" (Functional Pearl) by Gérard Huet in 1997 at <https://www.st.cs.uni-saarland.de/edu/seminare/2005/advanced-fp/docs/huet-zipper.pdf>
tyson2 has joined #commonlisp
<ski> this is also related to taking derivatives of data structures ("The Derivative of a Regular Type is its Type of One-Hole Contexts" by Conor McBride in 2007-10-11 at <http://strictlypositive.org/diff.pdf>) (and to the theory of "combinatorial species" (lists, cycles, trees, graphs, partitions, ..) in general, pioneered by André Joyal)
<ski> (if `List(X)' (`= 1 + X + X^2 + X^3 + ... = 1 / (1 - X)', figuratively speaking) is the set of (finite) lists with elements in the set `X', then `d List(X) / d X' (the set of one-hole contexts in lists) (= `1 / (1 - X)^2') is `List(X)^2', iow you keep a pair of two lists around)
tibfulv has quit [Remote host closed the connection]
tibfulv has joined #commonlisp
seletz has joined #commonlisp
pranavats has joined #commonlisp
alendvai__ has joined #commonlisp
seletz has quit [Ping timeout: 268 seconds]
attila_lendvai_ has quit [Ping timeout: 260 seconds]
mcparen has quit [Remote host closed the connection]
kstuart has joined #commonlisp
Oddity has joined #commonlisp
kstuart has quit [Quit: Client closed]
alendvai__ has quit [Ping timeout: 268 seconds]
Bung has joined #commonlisp
dipper_ has quit [Remote host closed the connection]
Lycurgus has joined #commonlisp
<lisp123> I do something that is space-inefficient - i store a list together with an array of its elements
cage has quit [Ping timeout: 256 seconds]
<lisp123> but that's because my lists are usually created from arrays, so the processing cost of making the array is zero
<lisp123> it helps when having to convert back to the array
<Shinmera> There we go, the 3d-vectors rewrite passes all tests now.
<lisp123> I use Zippers too, they are quite good when modifying lists in the middle
<lisp123> ski, thanks for the links, time to read a bit more into this
aartaka has quit [Ping timeout: 268 seconds]
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
seletz has joined #commonlisp
<Nilby> Shinmera: That's quite an extravagant bit of metaprogramming. Looks quite nice. That template style and the type dispatching seems like it could work for other things too.
cage has joined #commonlisp
seletz has quit [Ping timeout: 256 seconds]
nij- has joined #commonlisp
liveuser has quit [Quit: Leaving]
Lucretia has left #commonlisp [Konversation terminated!]
Bunggg has joined #commonlisp
Bung has quit [Remote host closed the connection]
Lycurgus has quit [Quit: Exeunt https://tinyurl.com/4m8d4kd5]
<Shinmera> Yeah, I'll probably factor it out into a library.
<Shinmera> Want to dogfood it some more first, though.
nij- has left #commonlisp [Using Circe, the loveliest of all IRC clients]
igemnace has joined #commonlisp
<Nilby> cool, i'm on a dogfood diet, but your dogs seem to eat pretty well, they get a whole game engine to chow on
lisp123 has quit [Ping timeout: 256 seconds]
waleee has joined #commonlisp
szkl has joined #commonlisp
<Shinmera> :)
<Shinmera> Next step is docs and then rewriting 3d-matrices in the same manner
<Shinmera> .... and then 3d-quaternions
<Shinmera> .... and then 3d-transforms. Though I hope the latter two at least won't prove very challenging
<Nilby> meta-meta-programming: (mapcar #'have-shinmera-update-with-fast-terse-macros (nice-3d-math-libs))
Bunggg has quit [Remote host closed the connection]
<Shinmera> I mean, Idk if this was faster to do than the first version. Probably not.
Bunggg has joined #commonlisp
mcparen has joined #commonlisp
<Nilby> oh, I was guessing the resulting code was a little faster
<Shinmera> oh that it is yes
<Shinmera> I was talking about the time taken to write the code :)
<Nilby> i'm sure it'll pay off since a bunch of things will likelly use it
<emacs-dwim> Shinmera: Might as well get the whole projective Geometric Algebra working. Sedenions aren't associative under plain multiplication; but the "sandwich product" *is* associative. Then the library would work for multivectors in 4d or the even grades of 5d projective GA. This projective basis works nicely for 4d objects because translations and rotations are the same operations (translations are rotations about an ideal at infinity).
<Shinmera> the libraries are called 3d-*, so :v
seletz has joined #commonlisp
<Nilby> too bad y'all meat creatures are stuck in 3d :P
<emacs-dwim> Then 4d-projective GA. That simplifies 3d operations, and gives nice symmetry between objects and operations.
<Shinmera> Feel free to implement it. I have other stuff to do in the meantime, most of which involves avoiding thinking about maths
<emacs-dwim> beach: I found that my tabs come from: org-mode converts the spaces into tabs when closing src blocks.
<Nilby> shinmera's gotta work on work on cloning themself, not hanging around in the sadly empty higher dimensions, and watching out for gimbal lock
seletz has quit [Ping timeout: 268 seconds]
<yottabyte> how do people typically do language interop? I want to call a lisp program from java, do people usually return json, for example?
<yottabyte> because I can go lisp objects to json then from json to java objects
<emacs-dwim> Nilby: gimbal lock doesn't happen in GA. It's an artifact of «mumble».
<mfiano> LA :)
<beach> emacs-dwim: Ouch! I see.
<Nilby> yottabyte: It depends on requirements. You could use ABCL to reduce object conversion overhead. You could link ecl or sbcl with a jvm and use native calls. You could use one of the many RPC things like gRPC or XML-RPC or json rpc.
Alfr has quit [Quit: Leaving]
thuna` has joined #commonlisp
<yottabyte> I've tried java ABCL interop before, I think it has other overhead which seemed to make it infeasible honestly. it was cool though
Alfr has joined #commonlisp
mcparen has left #commonlisp [#commonlisp]
Alfr has quit [Remote host closed the connection]
Alfr has joined #commonlisp
<Nilby> yes, unfortunately ABCL is a bit slower than the others. maybe better for driving java then the other way. probably the easiest as far as getting it working is one of the rpcs, but the native calls are of course likely faster. i know the grpc is activly used.
denis` has joined #commonlisp
<denis`> so i am using asdf + emacs to run unit tests for my project. In test file, i have renamed a test (so the old name doesnt exist anymore); but asdf:test-system *still* has it loaded, and tries to run it. How do I remove stale functions?
epony has quit [Ping timeout: 268 seconds]
random-nick has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
<phoe> denis`: the easiest way is to restart your lisp image
aartaka has joined #commonlisp
<phoe> anything else would probably depend on your test framework, since every one has a different way of storing runtime information about tests
<emacs-dwim> ski: Makes me wonder if fractional-order derivatives would also apply to data-structure. On the problem of various definitions that all work in their own ways - for fractional-derivatives - but same for fractional-iteration in general: Since there can be (infinitely) many functions that, when applied n times, reach the destination - would it be useful to define some "action" in order to apply a stationary-action principle, similar t
<emacs-dwim> how sum-over-paths integral is used in quantum-mechanics.
<Nilby> denis`: maybe asdf:clear-system and/or delete-package of your test package
* Nilby thinks if you restart your image you lose the game
Alfr has quit [Remote host closed the connection]
Alfr has joined #commonlisp
<denis`> okey restarting *inferior-lisp* did it
Alfr has quit [Remote host closed the connection]
Alfr has joined #commonlisp
Alfr has quit [Remote host closed the connection]
Alfr has joined #commonlisp
euandreh has quit [Ping timeout: 256 seconds]
jmdaemon has quit [Ping timeout: 260 seconds]
Alfr has quit [Remote host closed the connection]
<ski> emacs-dwim : not clear to me what it would mean to remove "half an element" (e.g.) from a data structure
count3rmeasure has joined #commonlisp
count3rmeasure has left #commonlisp [#commonlisp]
<ski> .. not having looked into fractional derivatives much, i wonder whether considering (left vs. right) adjunctions / galois connections (being basically a kind of lower resp. upper approximations to inverses) would be useful in this regard (regaining uniqueness for each of the two kinds, as opposed to a single unique solution)
causal has joined #commonlisp
aartaka has quit [Ping timeout: 268 seconds]
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
Alfr has joined #commonlisp
aartaka has joined #commonlisp
Alfr has quit [Remote host closed the connection]
denis` has quit [Ping timeout: 252 seconds]
eddof13 has joined #commonlisp
seletz has joined #commonlisp
Alfr has joined #commonlisp
seletz has quit [Ping timeout: 268 seconds]
aartaka has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
Alfr is now known as Guest5442
Alfr has joined #commonlisp
Alfr has quit [Remote host closed the connection]
Josh_2 has quit [Remote host closed the connection]
Guest5442 has quit [Ping timeout: 260 seconds]
Alfr has joined #commonlisp
Alfr is now known as Guest8221
Guest8221 has quit [Killed (cadmium.libera.chat (Nickname regained by services))]
Alfr has joined #commonlisp
Alfr has quit [Remote host closed the connection]
Alfr has joined #commonlisp
Alfr has quit [Remote host closed the connection]
Alfr has joined #commonlisp
cognemo has quit [Quit: ZNC 1.8.2 - https://znc.in]
cognemo has joined #commonlisp
sedzcat has joined #commonlisp
aartaka has quit [Ping timeout: 248 seconds]
aartaka has joined #commonlisp
sedzcat has quit [Client Quit]
sedzcat has joined #commonlisp
sedzcat has joined #commonlisp
sedzcat has quit [Changing host]
cosimone has quit [Remote host closed the connection]
sedzcat has quit [Quit: sedzcat]
sedzcat has joined #commonlisp
sedzcat has quit [Client Quit]
sedzcat has joined #commonlisp
Bunggg has quit [Remote host closed the connection]
Bunggg has joined #commonlisp
cosimone has joined #commonlisp
Alfr has quit [Quit: Leaving]
dipper_ has joined #commonlisp
cosimone` has joined #commonlisp
cosimone has quit [Ping timeout: 240 seconds]
tyson2 has quit [Remote host closed the connection]
mcparen has joined #commonlisp
Bunggg has quit [Remote host closed the connection]
Bunggg has joined #commonlisp
euandreh has joined #commonlisp
prokhor_ has quit [Read error: Connection reset by peer]
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
Bike has quit [Ping timeout: 260 seconds]
eddof13 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
sedzcat has quit [Quit: sedzcat]
sedzcat has joined #commonlisp
attila_lendvai has joined #commonlisp
seletz has joined #commonlisp
seletz has quit [Ping timeout: 240 seconds]
NotThatRPG has joined #commonlisp
Lucretia has joined #commonlisp
<Lucretia> Hi, following dbotton's tutorial and I've hit a blocker with part 3, hello-package asdf stuff, https://pastebin.com/kGQdpX7g - I've no clue what's wrong. https://pastebin.com/nKFdK0kc (source)
<phoe> Lucretia: you need to put your ASDF:DEFSYSTEM inside a file called hello-sys.asd
<Lucretia> it is
<phoe> and then everything else that you have, put that in a file called hello.lisp
<Lucretia> it is
<phoe> uh, wait
<phoe> why is that a single file in your pastebin then
<phoe> you should have two files, not one
<Lucretia> well, I couldn't really be bothered to create two
<Lucretia> ls ~/common-lisp/hello-sys/
<Lucretia> hello.lisp hello-sys.asd
<phoe> okay, with this sort of structure, it should work
<phoe> as long as the ASD file contains just the DEFSYSTEM form and the lisp file contains DEFPACKAGE, IN-PACKAGE, and other stuff
<Lucretia> they do
<phoe> good, then things should work
seletz has joined #commonlisp
<Lucretia> try this: https://pastebin.com/aLDccvk7
<phoe> LGTM
<phoe> (ql:quickload :hello-sys) should work now
aartaka has quit [Ping timeout: 256 seconds]
<Lucretia> it doesn't, I get that error
<Lucretia> oh hang on
<Lucretia> missed it
<Lucretia> no, still errors
* phoe needs to afk
seletz has quit [Ping timeout: 256 seconds]
<Lucretia> typo
<Lucretia> fixed.
<Lucretia> thanks
aartaka has joined #commonlisp
<NotThatRPG> Is there any way to print the space consumed by a single data structure?
<NotThatRPG> (easy to see that this might be very hard to do)
<NotThatRPG> I have a table that is growing over time and i would like to gather info about it.
attila_lendvai has quit [Ping timeout: 268 seconds]
<Shinmera> Not portably, no.
<Shinmera> You could try cloning it and checking ROOM, but that's going to be very inaccurate.
morganw has joined #commonlisp
overclucker_ has joined #commonlisp
<Nilby> For sbcl there's sb-ext:primitive-object-size. There are internalish things for other implementations
<Nilby> sometimes careful averaging of agregate room results is close
mcparen has left #commonlisp [#commonlisp]
overclucker has quit [Ping timeout: 248 seconds]
cage has quit [Quit: rcirc on GNU Emacs 27.1]
tevo has quit [Ping timeout: 268 seconds]
molson_ has quit [Remote host closed the connection]
molson__ has joined #commonlisp
molson__ has quit [Read error: Connection reset by peer]
lechner has quit [Ping timeout: 256 seconds]
molson has joined #commonlisp
lechner has joined #commonlisp
nij- has joined #commonlisp
jolby has joined #commonlisp
FareTower has joined #commonlisp
Josh_2 has joined #commonlisp
nij- has left #commonlisp [Using Circe, the loveliest of all IRC clients]
<pjb> Lucretia: could you link dbotton's tutorial?
<pjb> Lucretia: you could use: shar hello.lisp hello.asd to get an shell archive containing both files that you could paste. This is no more complicated than: (cd /tmp ; shar hello.lisp hello.asd )|tb --> https://termbin.com/wavv
<pjb>
<pjb> alternatively: for f in hello.lisp hello.asd ;do printf '----8<----8<----8<-----(%s)----8<----8<----8<----\n' "$f" ; cat "$f" ; end | nc termbin.com 9999 | tr -d '\000' # the last part from nc is in my tb script.
akoana has joined #commonlisp
<edgar-rft> every Common Lisp object needs some space - that's why the universe expands
Bunggg has quit [Quit: Leaving]
junkrunner has joined #commonlisp
tyson2 has joined #commonlisp
seletz has joined #commonlisp
seletz has quit [Ping timeout: 256 seconds]
jmdaemon has joined #commonlisp
molson_ has joined #commonlisp
molson has quit [Read error: Connection reset by peer]
Krystof has quit [Ping timeout: 268 seconds]
karlosz has joined #commonlisp
tevo has joined #commonlisp
<White_Flame> NotThatRPG: you can also glean the size from the disassembly, seeing how far it moves the bump allocator
<White_Flame> (depending on how simply/immediately the allocation happens)
waleee has quit [Ping timeout: 256 seconds]
igemnace has quit [Remote host closed the connection]
rgherdt_ has quit [Remote host closed the connection]
aartaka has quit [Ping timeout: 240 seconds]
molson_ has quit [Read error: Connection reset by peer]
seletz has joined #commonlisp
pfd has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
seletz has quit [Ping timeout: 256 seconds]
eddof13 has joined #commonlisp
Bung has joined #commonlisp
chrcav has quit [Ping timeout: 260 seconds]
chrcav has joined #commonlisp
Inline has joined #commonlisp
molson has joined #commonlisp
Krystof has joined #commonlisp
Inline has quit [Client Quit]
Bung has quit [Quit: Leaving]
karlosz has quit [Quit: karlosz]
notzmv has quit [Ping timeout: 240 seconds]
ttree has joined #commonlisp
cosimone` has quit [Read error: Connection reset by peer]
tyson2 has joined #commonlisp
eddof13 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
<NotThatRPG> Thanks White_Flame -- this is a very long-lived data structure, though -- the tree that is built by Monte Carlo Tree Search -- so tracking its expansion would be tricky. So I was hoping to periodically stop and scan it. For now I'm doing that with bespoke code
waleee has joined #commonlisp
sedzcat has quit [Quit: sedzcat]
cuz has joined #commonlisp
cuz has quit [Remote host closed the connection]
cuz has joined #commonlisp
cuz has quit [Remote host closed the connection]
morganw has quit [Remote host closed the connection]
cuz has joined #commonlisp
cuz-nw has joined #commonlisp
cuz has quit [Remote host closed the connection]
<White_Flame> NotThatRPG: yeah, it's hard for any sort of standard utility to measure the size of a tree, not knowing what data counts
<White_Flame> you can hit symbols in the tree, and include the size of the symbol object, traverse slots to its package, hit every other symbol in there, etc
cuz has joined #commonlisp
<jcowan> What's the usual way of dealing with pathspecs that are not representable as strings due to encoding issues?
<jcowan> (a Posix pathspec can contain arbitrary bytes other than NUL and /, and a Windows pathspec can contain arbitrary unsigned 16-bit values with a number of additional exceptions)
<pjb> jcowan: the implementation may have some escaping mechanism to be able to generate namestrings (and phyisical pathnames) for them.
<jcowan> Are there any such implementations today?
<pjb> Lucretia: oh, it's a clog tutorial. Ok.
shka has quit [Ping timeout: 268 seconds]
<Lucretia> it's a lisp+clog tut
<pjb> right.
<Lucretia> I've started to copy his docs into md
<Lucretia> done the first three so far
<Lucretia> branch on my gh
cuz-nw has quit [Remote host closed the connection]