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>
s-liao has joined #commonlisp
amb007 has quit [Ping timeout: 240 seconds]
pranavats has left #commonlisp [Error from remote client]
pranavats has joined #commonlisp
<madnificent> I'm moving from structs to classes because the class hierarchy helps me out. Is there some trick to print these classes similar to how structs are printed? It doesn't need to be readable.
<hayley> I had a DEFINE-TUPLE macro that would define a class and define a method which prints the slots like a struct. Probably could use a separate macro though.
<madnificent> hayley: I was hoping something could use introspection for this.
<hayley> e.g. (defclass something () ((%a ... :reader a))) (define-printer something :a a) would suffice.
amb007 has joined #commonlisp
<hayley> If one is using objects in an object-oriented (or protocol-oriented) way, then introspecting slots probably isn't the right approach.
<madnificent> hayley: Why? This sounds like it could bind to the superclass of all the classes I'm now defining. It could be overridden by any of the subclasses.
<hayley> Well, what are you introspecting then? What do you want to print out?
<madnificent> The slots that were defined in the subclass so I can print those out by default.
hayley has left #commonlisp [#commonlisp]
<madnificent> That wasn't the moment to have a connection dropped. Come back.
waleee has quit [Ping timeout: 268 seconds]
waleee has joined #commonlisp
karlosz has joined #commonlisp
perrierjouet has joined #commonlisp
igemnace has quit [Quit: WeeChat 3.4]
jstoddard has quit [Quit: ERC (IRC client for Emacs 27.2)]
igemnace has joined #commonlisp
<Josh_2> Perhaps you could grab the class slots from the class and its superclass then remove the difference and display what remains
<Josh_2> you could do that at class definition time I believe
aeth has quit [Ping timeout: 256 seconds]
<Josh_2> Or perhaps you can just use c2mop:class-direct-slots
aeth has joined #commonlisp
<madnificent> Josh_2: that would be very reasonable.
<madnificent> Hmmm, any trick to print recursively with some indentation for the properties?
taiju has quit [Ping timeout: 250 seconds]
yottabyte has joined #commonlisp
jgart has joined #commonlisp
<madnificent> welcome jgart !
pranavats has left #commonlisp [Error from remote client]
<jgart> heyooooooo
<jgart> I'd like to rewrite this app in common lisp: https://git.genenetwork.org/jgart/binderlite/src/branch/master/app.py
<jgart> What should I use to replace the flask part?
pranavats has joined #commonlisp
<jgart> And the jinja templates, I guess djula?
<madnificent> I'd pick hunchentoot for the flask part though I tend to sprinkle a tiny layer on top of it to make such route definitions more trivial to read.
<madnificent> There are Common Lisp web frameworks but I'm unsure what the most mature thing is right now.
<jgart> do you have an extant repo that can serve as an example of that?
<jgart> so I can do some reading and get ideas on how that would look
<jgart> or any repo in the wild would do
amb007 has quit [Ping timeout: 256 seconds]
amb007 has joined #commonlisp
<jgart> madnificent, what's your workflow for lisp currently? emacs and slime or sly?
<madnificent> Sure thing, though I think the community will have a different preference than what I enjoyed with this. Anyhow, a use of it is at https://github.com/mu-semtech/mu-cl-resources/blob/master/framework/call-specification.lisp and sources that allow you to write defcall are at https://github.com/mu-semtech/mu-cl-support/tree/3031e08070605c67f6610748a15026901c8f58e7
<madnificent> jgart: I use emacs + slime but if I'd start now I guess I'd use sly instead. I suspect I'll shift when I have some brain-space to just try something out.
<madnificent> People that used both seem to prefer Sly (either that, or those that do are more vocal about it than those that don't)
<Catie> I made the switch to Sly recently, it was very easy to do
NotThatRPG is now known as NotThatRPG_away
<jgart> madnificent, Catie thnx!
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<madnificent> Catie: any differences I should read about or resources that helped you?
<Catie> I have not gotten really far into the differences yet, but there are three things that immediately jump out at me: C-r when you're on the repl line does a backward-search of _history_, not of the buffer; C-c C-u no longer clears the repl input; and you get a special notation for referencing past results of evaluation, not just the last three with *, **, and ***
<Catie> Also it shows ASCII art of cats at startup! This isn't an important difference, but it is something I think is really fun
<madnificent> hehe. Thanks
Lycurgus has joined #commonlisp
rgherdt_ has quit [Ping timeout: 240 seconds]
rgherdt_ has joined #commonlisp
Algernon69 has joined #commonlisp
<yottabyte> what is the difference between reduce and apply?
<yottabyte> second question: what's the difference between (reduce '+ '(1 2 3)) and (reduce #'+ '(1 2 3))?
Algernon69 has quit [Ping timeout: 260 seconds]
<Catie> Reduce takes a function of two arguments and applies it down the list you give it. Apply applies a function to a list, so the list must be of suitable structure for the lambda-list of the function
<Catie> For the second question, they're technically different, but in that specific case they're functionally equivalent
<Catie> I think a better way of phrasing it is that reduce accumulates the result of several applications of a function, but apply only uses the function once
Lycurgus has quit [Quit: Exeunt]
<Catie> This shows apply and reduce, and equivalent forms that could replace them: http://ix.io/3K02
<jgart> reduce reduces a list by applying a function to each pair in the list. It moves to the next pair after getting the result (return value) from the first application (0 + 1) -> 1 + 2 -> 3 + 3 -> 6
<jgart> Am I correct in thinking of it that way?
<Catie> Yeah, absolutely! "Pairwise" is the word I was looking for, you nailed it!
<jgart> sometimes reduce can take a default value (0 for example)
<jgart> pairwise, yes
<Catie> I was really spinning my wheels there, thank you
<yottabyte> I see
<yottabyte> does ' vs #' look in the function namespace, so #' is better?
<Catie> Yeah, sharpsign-quote is a reader macro that expands to (FUNCTION ...), whereas plain quote is a reader macro that expands to (QUOTE ...). Most -- but not all -- places where you can pass a function using sharpsign-quote you can also use plain quote, but it's generally best not to mix up their usage like that
<Bike> (reduce (lambda (x y) `(+ ,x ,y)) '(1 2 3 4 5)) => (+ (+ (+ (+ 1 2) 3) 4) 5). this did not occur to me before now
<jgart> A convoluted hello world program in guile: (reduce string-append "" '("world" "hello "))
<jgart> the universe is made of atoms and pairs
<jgart> and some other datastructures...
amb007 has quit [Ping timeout: 268 seconds]
s-liao has quit [Quit: Client closed]
amb007 has joined #commonlisp
waleee has quit [Ping timeout: 256 seconds]
waleee has joined #commonlisp
taiju has joined #commonlisp
s-liao has joined #commonlisp
alcaeus has left #commonlisp [ERC (IRC client for Emacs 27.2)]
perrierjouet has quit [Quit: WeeChat 3.4]
Alfr is now known as Guest3054
Guest3054 has quit [Killed (strontium.libera.chat (Nickname regained by services))]
Alfr has joined #commonlisp
perrierjouet has joined #commonlisp
leo_song_ has joined #commonlisp
notzmv has quit [Ping timeout: 268 seconds]
leo_song has quit [Ping timeout: 268 seconds]
taiju has quit [Ping timeout: 268 seconds]
leo_song_ has quit [Ping timeout: 256 seconds]
leo_song has joined #commonlisp
waleee has quit [Ping timeout: 240 seconds]
leo_song has quit [Ping timeout: 256 seconds]
leo_song has joined #commonlisp
<beach> Good morning everyone!
leo_song_ has joined #commonlisp
leo_song has quit [Ping timeout: 240 seconds]
leo_song_ has quit [Ping timeout: 268 seconds]
leo_song has joined #commonlisp
semz has quit [Ping timeout: 260 seconds]
leo_song has quit [Read error: Connection reset by peer]
leo_song has joined #commonlisp
semz has joined #commonlisp
leo_song has quit [Read error: Connection reset by peer]
leo_song has joined #commonlisp
Bike has quit [Quit: sleep]
tyson2 has quit [Remote host closed the connection]
alfonsox has joined #commonlisp
notzmv has joined #commonlisp
taiju has joined #commonlisp
taiju has quit [Read error: Connection reset by peer]
taiju has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
elderK has joined #commonlisp
taiju has quit [Read error: Connection reset by peer]
taiju has joined #commonlisp
taiju has quit [Ping timeout: 240 seconds]
jealousmonk has quit [Quit: ERC (IRC client for Emacs 27.1)]
s-liao has quit [Ping timeout: 256 seconds]
pranavats has joined #commonlisp
taiju has joined #commonlisp
<beach> I am trying to read MIDI messages from /dev/midi1 on Linux. If I open the file with an :ELEMENT-TYPE of 'CHARACTER and an :EXTERNAL-FORMAT of :LATIN-1, things work as I expect.
<beach> But if I open with :ELEMENT-TYPE '(UNSIGNED-BYTE 8), and I read using READ-BYTE, nothing is read. I am no doubt doing something wrong, but what? This is SBCL. Any hints?
<beach> I need to vanish for a while. I'll read up when I get back.
<jackdaniel> beach: perhaps a code snippet would help to spot the issue if any
taiju has quit [Ping timeout: 256 seconds]
taiju has joined #commonlisp
<beach> Oh, I should mention that the second technique works if I read from a file.
<beach> So maybe it's just a buffering issue.
<beach> Ah, yes it is.
<beach> Sorry for the noise.
<beach> If I push enough keys, I get the input.
<beach> So how do I get SBCL not to buffer the input?
miique has quit [Read error: Connection reset by peer]
* beach checks the SBCL manual for clues.
<jackdaniel> glance over the source code seems to indicate that with-open-file (and open) doesn't expose the necessary argument (inner implementation-specific have buffer-p arg though) - apparently buffering is "temporarily disabled" for io streams
<jackdaniel> (also for bivalent streams)
<jackdaniel> beach: ^
<beach> I see. Thanks. Let me see if I can interpret what you are saying to make things work.
<jackdaniel> good luck
<beach> Thank you.
aartaka has joined #commonlisp
<beach> I think I'll just take the easy way out and use the :LATIN-1 technique. At least for now.
Jing has joined #commonlisp
taiju has quit [Ping timeout: 268 seconds]
x88x88x has quit [Remote host closed the connection]
taiju has joined #commonlisp
elderK has quit [Quit: Connection closed for inactivity]
x88x88x has joined #commonlisp
taiju has quit [Ping timeout: 256 seconds]
winning-luser has joined #commonlisp
random-nick has joined #commonlisp
alfonsox has quit [Remote host closed the connection]
taiju has joined #commonlisp
karlosz has quit [Quit: karlosz]
aartaka has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
cranium has joined #commonlisp
Algernon69 has joined #commonlisp
rain3 has joined #commonlisp
Algernon91 has joined #commonlisp
Algernon69 has quit [Ping timeout: 245 seconds]
aartaka has quit [Ping timeout: 250 seconds]
aartaka has joined #commonlisp
s-liao has joined #commonlisp
rotateq has joined #commonlisp
cage has joined #commonlisp
gaqwas has joined #commonlisp
szkl has joined #commonlisp
cranium has quit [Quit: Leaving]
cosimone has joined #commonlisp
aartaka has quit [Ping timeout: 252 seconds]
aartaka has joined #commonlisp
gaqwas has quit [Remote host closed the connection]
s-liao has quit [Quit: Client closed]
treflip has joined #commonlisp
pve has joined #commonlisp
s-liao has joined #commonlisp
<phoe> sigh
<phoe> TIL that PNGLOAD, IMAGO, and ZPNG have mutually incompatible internal image representations
<phoe> either I create code that copies between these, or I decide on the One True Format™ and fork'n'modify two of them
<jackdaniel> then you'll decide that you want to go faster and work on 16bit argb, or 8bit greyscale, more fun to come
Lycurgus has joined #commonlisp
<phoe> nope, argb only for me
<phoe> "nope" as in "I won't need any other modes" but also as in "nope nope nope nope nope nope I'm not touching that stuff"
<phoe> s/argb/argb 8bpp/
Lord_of_Life has quit [Ping timeout: 240 seconds]
<mfiano> And also, opticl wraps pngload to put it in its own internal image representation.
Lord_of_Life has joined #commonlisp
<jackdaniel> and then you have mcclim that probably wraps opticl to revert the internal representation back to what pngload has ,) (I don't remember, but hey, that's not impossible!)
<mfiano> lol
attila_lendvai has joined #commonlisp
voltron has joined #commonlisp
* jackdaniel wonders how many people tought: "time for a new library trivial-image-representations" :)
<Lycurgus> i was gonna try to select the best current macclim to use but decided just to talk to a squeak socket for gui from lisp
<Lycurgus> s/mcclim/CLIM/
<phoe> I'll just write methods that operate on both imago and vecto representations - I need a concrete operation, composition of an imago image onto the vecto canvas
<phoe> all other transformations can happen on the imago side, so I'm kinda lucky - I won't need to copy anything this way
<random-nick> isn't the purpose of opticl to unify image representations?
<jackdaniel> random-nick: perhaps it is, but when you communicate with something else (i.e some kind of a display server), then you need to pick a compatible representation either way
<mfiano> yes it is, but when you...oh nevermind
<mfiano> OpenGL particularly expects a 1D array, even better a static-vector.
<mfiano> opticl uses varying ranks
<jackdaniel> Lycurgus: wow, first time I've heard of using smalltalk as a display server for lisp programs
<Lycurgus> yes, but if you were to look at statements I've made over the years it would be clear I deplore monoglossy
<Lycurgus> (in computing)
<Lycurgus> it fell out naturally
<Lycurgus> i don't wanna be bothered with lisp gui crap and headless lisp is actually the norm
<Lycurgus> and there's an excellent squeak actors pkg, and I actually learned smalltalk before C
<Lycurgus> also it's a natural
varjag has joined #commonlisp
igemnace has quit [Remote host closed the connection]
nij- has joined #commonlisp
Lycurgus has quit [Quit: Exeunt]
VincentVega has joined #commonlisp
Algernon91 has quit [Ping timeout: 268 seconds]
gaqwas has joined #commonlisp
ebrasca has joined #commonlisp
gaqwas has quit [Remote host closed the connection]
psf has joined #commonlisp
s-liao has quit [Quit: Client closed]
igemnace has joined #commonlisp
VincentV` has joined #commonlisp
VincentVega has quit [Ping timeout: 245 seconds]
foxfromabyss has joined #commonlisp
Alfr has quit [Killed (zirconium.libera.chat (Nickname regained by services))]
Alfr has joined #commonlisp
<foxfromabyss> Hello. When I try to evaluate this in Sly/SLIME https://pastebin.com/yt72qtZy, I get `The variable HELLO-WORLD is unbound.`
<foxfromabyss> not sure why. Using the `sketch` library
<foxfromabyss> Would really appreciate the help
<phoe> foxfromabyss: show me your DEFPACKAGE HEXAGONER
<phoe> very likely you do not import/use the sketch package, which means that DEFSKETCH gets treated as a function, which means that it evaluates its arguments, which means that HELLO-WORLD is attempted to get evaluated, which fails with an unbound variable error
<foxfromabyss> that is true
<foxfromabyss> `(defpackage #:hexagoner  (:use #:cl #:sketch))`
<phoe> oh, so you have it used
<foxfromabyss> i've just added `#:sketch`
<foxfromabyss> but the problem persists even after syncing the repl
<phoe> recompile all of your code
<phoe> as in, reevaluate DEFPACKAGE and then DEFSKETCH
tyson2 has joined #commonlisp
<jackdaniel> defpackage will scream about defsketch being already interned in the package
<phoe> s/defpackage/uiop:define-package/ and it'll stop screaming
<foxfromabyss> okay I am feeling dumber by the second. `(defpackage #:hexagoner  (:use #:cl #:sketch))` results in `The name "SKETCH" does not designate any package.` Do I have to `ql:quickload :sketch` manually?
<phoe> oh! yes, you should
<phoe> your ASDF system definition should have it as a dependency
<phoe> if you aren't using ASDF for your code, then you need to quickload Sketch manually
s-liao has joined #commonlisp
<foxfromabyss> well the `hexagoner.asd` has `:depends-on (#:sketch)`
<foxfromabyss> is this not sufficient?
<phoe> that should be enough
<phoe> (ql:quickload :hexagoner) should load Sketch then
<foxfromabyss> oh i see !
<foxfromabyss> everything works now, many-many thanks :D the build system is a bit confusing to me
<phoe> ASDF manages systems which mostly consist of files which mostly consist of Lisp forms, packages manage symbols which are used for naming things in the Lisp image
winning-luser has quit [Quit: Leaving]
<foxfromabyss> i think part of the confusion for me comes from the difference between system and package
<phoe> yes, that's the main confusion point I've seen in people learning Lisp system-building
<phoe> a system is a collection of files, a package is a collection of symbols - and both have some metadata associated with them
<madnificent> like many other packaging systems on other platforms, this is something that could probably use some polish. i only have a vague clue on how some js code we are running is converted into single image.
<madnificent> if graphically-minded people arrive here at some point, it'd be cool to have a simple graphic explaining this. it's not hard, just confusing for new users.
<foxfromabyss> i see i see! Thanks for the help and for the link :)
<jackdaniel> module is a dll, system is a package, package is a namespace, namespace is a hash table :) /half jokingly/
<phoe> foxfromabyss: what kind of graphic are you thinking of?
<_death> bart simpson graphic
<foxfromabyss> when you are talking about packages vs systems?
<madnificent> jackdaniel: such renaming jokes add to the confusion of newcomers :P
<foxfromabyss> or in which context
<phoe> foxfromabyss: yes, yes - just, do you have any ideas of how it could/should look?
<jackdaniel> that's why I have added that it is a "half joke" - I've tried mapping Lisp names to something used by /virtually everybody except lispers/ ;p
<foxfromabyss> i mean, i honestly just get 2 separate trees in my head. the system tree is a file tree while the symbol tree is a .. let's say library or AST(very wrong usage here but i can't remember anything better) tree
<foxfromabyss> inb4 i misunderstand the concepts still :D
<madnificent> jackdaniel: no one in our company uses DLLs (except maybe for games, who knows?). But anyways, it's a joke probably better left separate from someone new trying to understand. :P Because fo system -> package; package -> namespace. The double mapping.
<madnificent> foxfromabyss: the picture I see in my head is indeed also something like that. Some picture of files and folders in the ASD corner. Some packages (perhaps as boxes?) with parens and symbols thrown in.
<madnificent> A package is most akin to a dictionary/index but I don't know how to express that.
<jackdaniel> I believe in newcomer's intelligence to ignore remarks explicitly dubbed as a joke. on the other hand describing pictures in ones head may indeed bring some confusion ;] /me gets back to work
<rain3> beach: "I myself recently discovered a marvelous feature in a programming language that I had purposely avoided for the past 10 years, simply because 10 years ago, a colleague (who did not know the feature) explained to me that it was no good. We were both victims of our own minds." What feature is that?
<madnificent> jackdaniel: good luck with the work :) i wouldn't be able to resist to try and parse it, which is why i chose to mention it. more important things!
<madnificent> jackdaniel: agree on the picture thing btw.
<foxfromabyss> madnificent that's roughly what I envision as well, but a bit more SERIOUS represenation via the trees
Jing has quit [Remote host closed the connection]
Jing has joined #commonlisp
<beach> rain3: CLOS.
<rain3> okay, thank you
xaltsc has quit [Read error: Connection reset by peer]
<beach> Sure.
<beach> But that was a while ago now. :)
igemnace has quit [Quit: WeeChat 3.4]
voltron has quit [Ping timeout: 250 seconds]
kdlv has quit [Quit: The Lounge - https://thelounge.chat]
unixlisp has joined #commonlisp
<unixlisp> phoe: your 2D array "rotation" interface looks like this: https://github.com/tinwatchman/2d-array-rotation (clockwise, js).
<phoe> unixlisp: I know what it looks like. I'm going to add it to ARRAY-OPERATIONS soon-ish.
<unixlisp> What is the result of the image after rotating array?
<phoe> the image being rotated by N * 90° where N is a non-negative integer
<unixlisp> oh.
nature has joined #commonlisp
Inline has joined #commonlisp
Inline has quit [Remote host closed the connection]
Inline has joined #commonlisp
ldb has joined #commonlisp
<ldb> pong
<phoe> pong successful
Algernon91 has joined #commonlisp
unixlisp has left #commonlisp [#commonlisp]
Algernon666 has joined #commonlisp
Algernon91 has quit [Ping timeout: 250 seconds]
treflip has quit [Quit: bye!]
pjb has quit [Read error: Connection reset by peer]
s-liao has quit [Quit: Client closed]
miique has joined #commonlisp
srji has quit [Quit: leaving]
srji has joined #commonlisp
pjb has joined #commonlisp
Bike has joined #commonlisp
azimut_ has quit [Quit: ZNC - https://znc.in]
azimut has joined #commonlisp
_73` has joined #commonlisp
_73` has quit [Remote host closed the connection]
_73 has quit [Ping timeout: 240 seconds]
<Xach> phoe: what are you doing with radial gradients?
waleee has joined #commonlisp
<ck_> maybe flipping some wigs is in the cards?
<Xach> RIP
<phoe> Xach: I'm trying to programmatically generate board game tiles, and these have circular drop shadows. These are doable with radial gradients.
<Xach> phoe: cool
Algernon91 has joined #commonlisp
Algernon666 has quit [Read error: Network is unreachable]
<phoe> the next thing I'll do is hacking vecto to accept IMAGO images for superimposition over the vecto canvas
<phoe> since there's raster PNGs that I need to add there, too
<Xach> I don't think that would be too hard, the internal structure is pretty straightforward.
<phoe> yes, it isn't a big problem
<Xach> phoe: please share any cool pictures you make
<phoe> the only question is how to structure this code - would you mind a VECTO/CONTRIB system that depends on IMAGO and implements this functionality?
<Xach> Hmm
<phoe> that's some elements of a tile from a boardgame called Neuroshima Hex
<phoe> one of my old boardgame loves
<phoe> and I want to use vecto to programmatically generate tiles for it
<Xach> Have you looked at vectometry? That's what I use 99% of the time now.
<Xach> phoe: I almost think a system named something like vecto-imago would be the way to (ima)go
<phoe> Xach: I haven't
<phoe> Xach: OK, I'll make a vecto-imago then
<Xach> phoe: vectometry has a pretty good toolbox for manipulating points, angles, colors, and rects as objects rather than loose collections of component values.
<Xach> like (setf shrunk (contract rect 10)) and such
<phoe> ooh
<phoe> I'll check it out once it's time to stop happy hacking and clean up my code
<phoe> but anyway! is there anything left to be done with my radial gradient PR?
<Xach> Merging it
<phoe> thanks
cranium has joined #commonlisp
Algernon91 has quit [Ping timeout: 268 seconds]
Algernon666 has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
azimut has quit [Ping timeout: 276 seconds]
ldb has quit [Quit: ERC (IRC client for Emacs 27.2)]
_73 has joined #commonlisp
<_73> is it possible to compile a package from another package in the same system? For example I have a test package TEST-PACK that is testing the package PACK. Whenever I recompile TEST-PACK I also want to recompile PACK.
<beach> Why would you want to recompile PACK if it hasn't changed?
<beach> And you probably mean "system" rather than "package".
<_73> PACK is changing quite often in my case
<beach> If it changes it will automatically be recompiled if TEST-PACK depends on it.
<beach> No other action is needed.
<_73> the problem must be in my system architecture then. hmm
<beach> (defsystem #:test-pack :depends-on (#:pack) ...)
<beach> But seriously, rename them to SYSTEM.
<beach> Unless you seriously mean "package" of course. But then, you don't recompile packages, you define them.
<beach> _73: Does that make sense to you?
* _73 is trying to reproduce the problem
gaqwas has joined #commonlisp
<cranium> You are aware of 1. the distinction between the terms package and system 2. the best practice of defining your tests as a separate ASDF system?
sukaeto has quit [Quit: WeeChat 1.6]
<cosimone> hello, this is probably going to sound like a stupid question, but i'm going to ask anyway: when compiling a defun with slime+ccl with optimization (C-- C-c C-c), it doesn't seem to make a difference (no warnings about missed optimization opportunities, etc.). with sbcl, it works as intended. do i need some additional setup in slime, ccl or both?
<Bike> i don't think ccl is ever as verbose about notes as sbcl is
<cosimone> uhm... i see
<cosimone> is anyone here aware of some way to have more verbosity during compilation, by any chance?
<cosimone> it's not a big deal, since i can use multiple implementations, but it would be nice anyway
<Bike> What I mean is that I don't think CCL actually has the same equipment to produce optimization notes that SBCL does
treflip has joined #commonlisp
thomaslewis has joined #commonlisp
<Catie> Oh yeah, I've never gotten optimization notes from CCL
thomaslewis has left #commonlisp [#commonlisp]
tyson2 has quit [Remote host closed the connection]
nij- has left #commonlisp [#commonlisp]
cosimone has quit [Remote host closed the connection]
Lycurgus has joined #commonlisp
<Xach> and notes for sbcl do not apply to other implementations
cosimone has joined #commonlisp
<cosimone> i see, i didn't know that
Inline has quit [Remote host closed the connection]
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
winning-luser has joined #commonlisp
Inline has joined #commonlisp
Inline has quit [Remote host closed the connection]
Inline has joined #commonlisp
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
pjb has quit [Read error: Connection reset by peer]
gaqwas has quit [Remote host closed the connection]
thomaslewis has joined #commonlisp
<_73> I was able to reproduce the problem: http://dpaste.com/GTQ4KDN7V
<hobo> does anyone know of a terminal emulator whose interaction is done in lisp?
<random-nick> if emacs lisp counts, term.el
thomaslewis has left #commonlisp [#commonlisp]
<hobo> like a lisp REPL but a terminal emulator also?
<Xach> hobo: i think mezzano includes one
<cranium> you mean a command line where you type in lisp commands? You have your terms confused, that is on the shell. There are multiple shells that allow you to enter lisp forms.
<hobo> cranium: oops, yes. thank you
<random-nick> oh, I thought you mean interaction with the spawned process
<beach> _73: You didn't mention a problem before.
<cranium> hobo, if you're familiar with unix shells: https://github.com/SquircleSpace/shcl
<random-nick> mezzano doesn't have a terminal emulator, just regular command line windows (the difference being, they don't implement the terminal control protocols that terminal emulators do)
<beach> _73: You must re-run your (asdf-load-system ...)
<_73> beach: I want to know if there is a way I can force the package I am testing, in this case SCRATCH-PACK to be recompiled whenever I recompile the test package, in this case `SCRATCH-TEST-PACK`.
<beach> _73: Please use the right terminology.
<cranium> _73, you know the difference between packages and systems?
<Xach> random-nick: hmm, i thought https://github.com/froggey/Mezzano/blob/master/gui/xterm.lisp was a full emulator
amb007 has quit [Ping timeout: 256 seconds]
amb007 has joined #commonlisp
<hobo> cranium: awesome. this is what I'm looking for exactly. thank you
<varjag> is there any way to get command line args in a ccl app saved with save-application?
amb007 has quit [Read error: Connection reset by peer]
<varjag> ccl:*unprocessed-command-line-arguments* doesn't appear to work
<random-nick> Xach: oh, I didn't know about that, looks like it's used for the telnet client
<beach> _73: What is recompiled is "systems" not "packages". To recompile your system, do your (ql:quickload :scratch-test-sys) again. Then the system scratch-sys should be recompiled automatically.
<random-nick> the other applications use the simpler widget I think
<_73> when I compile a file that defines a package with `sly-compile-file` it is still improper to say I am compiling the package?
<beach> _73: I think you may still be confusing packages and systems.
<cranium> beach: see the dpaste link they posted above.
amb007 has joined #commonlisp
<beach> _73: You are supposed to recompile the system. Notice that it is one system that depends on the other system. Recompiling a single file containing a package definition is not going to do it.
<Xach> _73: it would be more common to say you are recompiling a file
<beach> cranium: What am I supposed to see?
<cranium> I thought you hadn't seen it.
<cranium> sorry.
<beach> Oh, OK. Yes, I saw it.
<cranium> _73: I think one solution is to run (asdf:test-system "scratch-test-sys").
<_73> yes thanks for the help I know what I need to now
<beach> cranium: I suggested quickload since that's the technique already used.
Inline has quit [Remote host closed the connection]
Inline has joined #commonlisp
Inline has quit [Remote host closed the connection]
Inline has joined #commonlisp
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
Inline has quit [Excess Flood]
Inline has joined #commonlisp
Inline has quit [Remote host closed the connection]
Inline has joined #commonlisp
Inline has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
azimut has joined #commonlisp
Guest1191 has joined #commonlisp
Guest1191 has quit [Remote host closed the connection]
Inline__ has joined #commonlisp
Algernon91 has joined #commonlisp
Lycurgus has quit [Quit: Exeunt]
Inline__ is now known as Inline
Algernon666 has quit [Ping timeout: 252 seconds]
jstoddard has joined #commonlisp
<varjag> ok there's ccl:*command-line-argument-list*
karlosz has joined #commonlisp
winning-luser has quit [Quit: Leaving]
karlosz has quit [Quit: karlosz]
varjag has quit [Read error: Connection reset by peer]
jealousmonk has joined #commonlisp
foxfromabyss has quit [Ping timeout: 256 seconds]
varjag has joined #commonlisp
jealousmonk has quit [Remote host closed the connection]
<Josh_2> Good afternoon
jealousmonk has joined #commonlisp
karlosz has joined #commonlisp
<cranium> A question: How was the in-browser interactive code highlight etc. here generated: https://s-expressionists.github.io/Eclector/presentation-slides/slides.html#/slide-slide:errors:recovery
Oladon has joined #commonlisp
<cranium> or interactive-ish :)
<cranium> ouch nevermind, it's mentioned during the representation video (42:00 in https://www.youtube.com/watch?v=3Yvv2XVBi58)
<cranium> *presentation
treflip has quit [Quit: good night!]
<Josh_2> Can someone suggest a command line args parser library to me?
<Catie> I've recently been made aware of Adopt, I'm told it's very feature-rich and easy to use
<Josh_2> This is the one I was thinking of, thank you Catie
<Catie> Nice!
sukaeto has joined #commonlisp
rain3 has quit [Ping timeout: 245 seconds]
theothornhill has joined #commonlisp
travv0 has left #commonlisp [#commonlisp]
<hobo> wow, Adopt is pretty neat.
<varjag> i use command-line-arguments
amb007 has quit [Read error: Connection reset by peer]
<NotThatRPG_away> Thoughts about Adopt vs. Didier's CLON?
amb007 has joined #commonlisp
NotThatRPG_away is now known as NotThatRPG
Devon has joined #commonlisp
_73 has quit [Remote host closed the connection]
<jackdaniel> Didier's CLON is a pleasure to work with and it has a comprehensive manual
<jackdaniel> I've never used adopt so I can't comment on the "vs." part :)
<Josh_2> Adopt seems to work well
<Josh_2> drakonis: thats giving me a 403
<Josh_2> 503*
<Alfr> Josh_2, just-getopt-parser is one I sometimes like to use instead, certainly to as fancy as adopt.
<Alfr> s/to as/not as/
rain3 has joined #commonlisp
aartaka has quit [Ping timeout: 240 seconds]
<drakonis> linking to the github mirror should work
miique has quit [Ping timeout: 250 seconds]
<Josh_2> do I have to build sbcl manually to enable core compression?
<Josh_2> 2.2.0 released today
<cranium> ":compression
<cranium> This is only meaningful if the runtime was built with the :sb-core-compression feature enabled."
<Josh_2> Ye
<Josh_2> I think I am just using the prebuilt linux binary from sbcl.org
<engblom> For simplicity assume I have something like: (defun mypush (item list) (push item list)). How could I modify it so it alters the original list and not a copy of it?
<Josh_2> push does modify the list
<White_Flame> you need to store the list in something, then pass that container
<White_Flame> however, the "proper" way is to return the list and let the caller either save it or not
epolanski has joined #commonlisp
<engblom> Josh_2: Assume I had (defvar foo '()) and then called (mypush foo "bar"). That would not modify foo.
<Josh_2> What White_Flame said
<White_Flame> also, a "list" is not a thing in Lisp other than a usage policy of cons cells
rain3 has quit [Ping timeout: 256 seconds]
<White_Flame> so there's no passable identity for the list itself as a mutable thing
<White_Flame> hence the container
<Josh_2> How do I build sbcl with core compression?
<Josh_2> I cannot give my customer a 100mb binary :joy:
<drakonis> oh, new sbcl release, neat.
<White_Flame> engblom: however, as a "place" is a syntactic thing, and macros deal with syntax, you can implement (defmacro mypush (item place) `(push ,item ,place))
Oladon has quit [Quit: Leaving.]
<cranium> Josh_2: See the INSTALL file or so, iirc it's explained in a straightforward fashion.
<theothornhill> Is The Art of the Metaobject Protocol transferrable to other languages? As in, Is the investment into reading and understanding it going to help understand other systems? Or is too outdated/lisp-specific?
<theothornhill> I do want to read it, but not sure if it'll take too much effort for too little gain...
<jackdaniel> theothornhill: eulisp has metaobject protocol and it is significantly different from common lisp
<jackdaniel> I wouldn't be surprised if one of schemes has such extension too; mop rather doesn't make much sense for statically typed languages
<random-nick> I think there's a OOP system with a MOP for perl too
<jackdaniel> learning mop gives you also an interesting insight for how oop is implemented "behind the scenes"
<random-nick> but I've heard on the internet that AMOP might be hard to understand if you don't have preexisting CL knowledge
<theothornhill> jackdaniel: right! That is more in line of what I was hoping for. CL knowledge isn't the problem :)
<jackdaniel> well, examples are in common lisp. but nothing too fancy
<random-nick> actually now that I think of it, that might be an alan kay quote?
notzmv has quit [Ping timeout: 240 seconds]
<theothornhill> I'm just thinking that most of my reading on common lisp usually yields insights into the other systems I work with on a daily basis, and I'm hoping that to be true with this as well
<Josh_2> theothornhill: you should read the practical examples
<random-nick> alan kay did say something similar, according to the last paragraph of this wikipedia article: https://en.wikipedia.org/wiki/The_Art_of_the_Metaobject_Protocol
<theothornhill> Josh_2: You mean the exercises?
<Josh_2> Yes
<Josh_2> There are a few chapters in the middle which demonstrate the MOP, this is the most important bit imo
<Josh_2> unless you are going to implement your own ofcourse
<theothornhill> Thanks!
cage has quit [Quit: rcirc on GNU Emacs 27.1]
thomaslewis has joined #commonlisp
<Josh_2> Closed club centric? epic ;)
jstoddard has quit [Quit: ERC (IRC client for Emacs 27.2)]
euandreh has quit [Ping timeout: 245 seconds]
thomaslewis has left #commonlisp [#commonlisp]
Algernon91 has quit [Read error: Connection reset by peer]
<Josh_2> new sbcl compiled using --fancy
aartaka has joined #commonlisp
<Josh_2> https://plaster.tymoon.eu/view/2813#2813 adopt is pretty easy
karlosz has quit [Quit: karlosz]
thomaslewis has joined #commonlisp
karlosz has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
<Spawns_Carpeting> would you guys be interested in a string util library for common lisp that implements the "s.el" library for emacs lisp?
SAL9000 has quit [Ping timeout: 250 seconds]
<Spawns_Carpeting> the api i mean
SAL9000 has joined #commonlisp
Algernon91 has joined #commonlisp
Devon has quit [Read error: Connection reset by peer]
nij- has joined #commonlisp
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
Algernon91 has quit [Ping timeout: 250 seconds]
<Xach> Spawns_Carpeting: It looks interesting, but I don't think I'd personally use it - I think I would use built-ins or roll my own for most of that functionality.
<Josh_2> Hmm, my saved lisp image is throwing a condition saying "dont know how to REQUIRE sb-posix"
<Josh_2> Spawns_Carpeting: https://github.com/vindarel/cl-str
aartaka has quit [Ping timeout: 240 seconds]
<kakuhen> Spawns_Carpeting: I would use it if it offers something that the "str" package on Quicklisp doesn't, and if it's easy-to-use
<Josh_2> If it offers something str doesn't, then I think it would be better to just make a PR for str
<Spawns_Carpeting> Xach: I can understand that for sure. that's actually my motivation for writing it, so far I've just been adding stuff that I needed for writing little scripts
<Spawns_Carpeting> i've been trying to do my scripting tasks in CL
nij- has left #commonlisp [#commonlisp]
<edgar-rft> Spawns_Carpeting, two thoughts: 1) many of that functions already exist in Common Lisp under a very similar name, and 2) regular expressions in Emacs are built-in by default, in Common Lisp you need another non-trivial external library (CL-PPCRE or similar) to make these functions work.
<edgar-rft> On the other hand, for *learning* how string manipulations work in Common Lisp it would be a great exercise to port that library.
<Spawns_Carpeting> yeah thats my other goal, is to help learn lisp
<Spawns_Carpeting> i do need to require cl-ppcre for some of the stuff
Inline has quit [Remote host closed the connection]
<Josh_2> I would say whatever doesn't exist in str you should implement and then make a PR
hyperdash has joined #commonlisp
hyperdash has left #commonlisp [ERC 5.4.1 (IRC client for GNU Emacs 27.2.50)]
<Josh_2> Now I need to figure out why I can't use sb-posix on my sbcl build :cry:
<edgar-rft> sb is a margerine brand here :-)
Devon has joined #commonlisp
Inline has joined #commonlisp
euandreh has joined #commonlisp
<Catie> Is it POSIX compliant?
miique has joined #commonlisp
attila_lendvai has quit [Ping timeout: 268 seconds]
<rotateq> Spawns_Carpeting: Maybe you can have a read on that: https://stevelosh.com/blog/2021/03/small-common-lisp-cli-programs/
<etimmons> Anyone here use Windows regularly? I'm nearing completion on a PR for osicat that should fix iterating over directory contents, add sym/hard link support, allow modification of environment variables, and export some low-level win32 APIs. I rarely use Windows myself, so it'd be great if there's someone else who could look it over for usefulness and correctness
Algernon91 has joined #commonlisp
SAL9000 has quit [Ping timeout: 250 seconds]
Algernon666 has joined #commonlisp
<rotateq> etimmons: Was nearly before asking "What is this Windows you talk about?" :)
SAL9000 has joined #commonlisp
Algernon91 has quit [Ping timeout: 260 seconds]
<NotThatRPG> rotateq: You mean "What are these windows you talk about?" ;-)
<etimmons> rotateq: Yeah, that's how I normally feel. But enough folks out there use windows (/me shudders) that I feel it's worth having things actually support it. My current goal is to get cl-tar working well on Windows, which requires some low-level file-system APIs that the standard doesn't provide
varjag has quit [Quit: ERC (IRC client for Emacs 28.0.50)]
<etimmons> I probably /could/ ignore symlinks on Windows, but my understanding is that more things have finally started using them
<etimmons> Even the git installer prompts you nowadays if you want to use symlinks when checking out repos
SAL9000 has quit [Ping timeout: 268 seconds]
SAL9000 has joined #commonlisp
<rotateq> Right NotThatRPG :D
<rotateq> Yes of course, do you use SBCL for that?
<dbotton> Anyone know if regarding this quote from Let over Lambda if the source is real or a joke? "Common Lisp does away with spaghetti stacks and only provides lexical closures[MACARONI]."
<dbotton> pg 73
<rotateq> Let me see.
<dbotton> either way had me laughing
<etimmons> rotateq: SBCL is my primary implementation and what I'm using to test this. But these changes should work on any implementation where CFFI works
<rotateq> Sounds good.
<rotateq> dbotton: Seems to be the title of an article by Guy Steele :D
<Catie> Oh yeah no, I looked up that article when I saw it, it's real
<rotateq> The future is now. ^^
notzmv has joined #commonlisp
john-a-carroll has joined #commonlisp
Everything has joined #commonlisp
<theothornhill> Where can I read more on this pattern? https://paste.sr.ht/~theo/49647c1a71046a7e0a874c41c58c66c441e515ba
<rotateq> Can you be more specific please? :)
<theothornhill> defuns using a common let bound table
<rotateq> yes this data is just scoped for those DEFUNs
<theothornhill> i understand how that works, but is this common? I've seen similar things around in sbcl code, but not in libraries
<Catie> I use it from time to time
<rotateq> so when one function is called and may change something for the hash-table, the other one can see it too
<rotateq> yes why not? i don't know your former background, but you could see it as some kind of declaring "private"
<theothornhill> Right, so it's a good way to avoid having to name global vars?
<theothornhill> That makes sense
<Catie> Not necessarily to avoid naming them, but to restrict their scope
<rotateq> yes and no :) depends what you want to achieve ^^
<theothornhill> Catie: I see. And the lifetime of the table in this case is the same as the image?
<Catie> Correct, it has indefinite extent
<Catie> As long as it's referenced in the functions named in the DEFUN forms, it can't be garbage collected. If someone has more in-depth knowledge about specific implementations, please correct me, but I believe as long as the DEFUN'd functions exist then the table will as well
pve has quit [Quit: leaving]
<theothornhill> That makes sense
john-a-carroll has quit [Ping timeout: 256 seconds]
<NotThatRPG> I believe in at least some implementations, non-top-level DEFUNs may be significantly less efficient than top level ones. But my memory of when and in what context I was told this, alas, is gone.
<Catie> It's really cool! There's a bit about it in Practical Common Lisp, and if I recall correctly an entire chapter in Let Over Lambda about it
<theothornhill> Nice. Didn't get to that book yet. Does this pattern have a name? I mean, it looks a little like a closure, but it isn't right?
<Catie> NotThatRPG: That wouldn't surprise me at all, probably something about "eval in a null lexenv"
<Catie> No it is. That's a lexical closure
<theothornhill> Thanks
<Catie> Any time!
<rotateq> theothornhill: Pretty advanced stuff in this book.
miique has quit [Ping timeout: 240 seconds]
<theothornhill> great book so far!
frodef has joined #commonlisp
<rotateq> Yes I don't know where you are at your journey.
<theothornhill> well, me neither, since it only feels like the rabbit hole gets bigger and bigger. But I've been at it for a couple of years now
<theothornhill> or did you mean in the book, hehe
<rotateq> The basics are much. :) But you will profit from it in the long run.
<rotateq> No I meant in general. How long is it now?
<Catie> Common Lisp is the gift that keeps on giving
<rotateq> Ah okay good couple of years.
<rotateq> Catie: Recently I have been with a newer friend who's now in IT business for some years in the movies (Matrix Resurrection) and when we waited to buy the tickets, he told on with his newer Docker experiences and the that C# is the thing he knows upto now with which one can do "every" paradigma and that it won't get cryptic.
<theothornhill> I tumbled into lisp when listening to James Gosling talking about Simula 67 during the 50 year anniverary of Simula in Oslo, so the niche stuff hit me pretty hard
<rotateq> But sometimes I like giving people the red pill, taking it they have to themselves as I did some day in the past.
Inline has quit [Remote host closed the connection]
<rotateq> Ah cool, I associate this name with creation of Java also (like Steele's).
<theothornhill> That's right
<rotateq> "We were after the C++ programmers ..."
<theothornhill> gosmacs also
<Catie> rotateq: I'm very impressed by your friend's optimism, and I truly hope he gets to hold onto it
<rotateq> Catie :)
Inline has joined #commonlisp
<drakonis> guy steele's involvement in java was very limited though
<drakonis> he came on board after java was designed
<theothornhill> "designed"
<drakonis> for a lack of a better word.
<rotateq> Okay, hope he got enough money for the pain.
<drakonis> looks like it was for writing the spec
<rotateq> So what he perfectly fits. :)
<theothornhill> He talks about that a bit in his talk in sussmans 60th(?) anniversary
<edgar-rft> java first was signed, then unsigned, but finally they gave up, so java got designed
gaqwas has joined #commonlisp
nature has quit [Quit: leaving]
<rotateq> edgar-rft: as always you back us up with humor and i like it. plus truth
phantomics has joined #commonlisp
Krystof has quit [Ping timeout: 256 seconds]
ebrasca has quit [Remote host closed the connection]
theothornhill has quit [Ping timeout: 240 seconds]
<phoe> (incf edgar-rft)
<White_Flame> good java roast
<rotateq> phoe: maybe now would be your chance asking about array-oriented things as phantomics joined again
<phantomics> have a question about arrays phoe?
<rotateq> White_Flame: Good Java beans roasted for good coffee.
<rotateq> instantly triggered :D i mentioned you this week about it
<phoe> rotateq: I think I am good for the time being
<phoe> i implemented my solution imperatively, I'll try learning me some array-oriented programming another time :D
<rotateq> Okay I just remembered.
<phoe> yes, thank you
* rotateq likes acting as kind of gluon with spin 1ℏ
theothornhill has joined #commonlisp
gaqwas has quit [Ping timeout: 268 seconds]
cosimone has quit [Ping timeout: 240 seconds]
<phoe> I really like vecto gradient architecture
Jing has quit [Remote host closed the connection]
<phoe> now that I have both coordinate and domain functions I can make gradients of all sorts of shapes and values
<phoe> I'll try making a hexagon-shaped gradient tomorrow
Jing has joined #commonlisp
theothornhill has quit [Remote host closed the connection]
tyson2 has quit [Remote host closed the connection]
trocado has joined #commonlisp
<phantomics> Quick question: has anyone used CL to talk to Arduino devices over USB? I'm having inconsistent results sending and receiving serial messages. In some cases I can get CL to do the same things I can do with the Arduino IDE's serial monitor, but in other cases it doesn't work
thomaslewis has joined #commonlisp