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/> | News: ELS'22 this Monday (2022-03-21), see https://european-lisp-symposium.org
pjb has quit [Ping timeout: 260 seconds]
aeth has quit [Ping timeout: 240 seconds]
random-nick has quit [Ping timeout: 246 seconds]
aeth has joined #commonlisp
Common-Lisp has joined #commonlisp
zacque has joined #commonlisp
taziotoninzo20 has joined #commonlisp
Common-Lisp has quit [Client Quit]
Common-Lisp has joined #commonlisp
taziotoninzo20 has quit [Client Quit]
euandreh has quit [Ping timeout: 260 seconds]
masinter has joined #commonlisp
euandreh has joined #commonlisp
knusbaum- has joined #commonlisp
knusbaum has quit [Ping timeout: 276 seconds]
Guest52 has quit [Quit: Client closed]
Guest74 has quit [Quit: Connection closed]
yauhsien has joined #commonlisp
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
yauhsien has quit [Ping timeout: 276 seconds]
Inline__ has joined #commonlisp
Bike has quit [Quit: Connection closed]
Inline has quit [Ping timeout: 276 seconds]
jeffrey has quit [Quit: Client quit]
poselyqualityles has joined #commonlisp
Inline has joined #commonlisp
specbot has quit [Remote host closed the connection]
Inline__ has quit [Ping timeout: 276 seconds]
minion has quit [Read error: Connection reset by peer]
Brucio-61 has quit [Read error: Connection reset by peer]
Brucio-61 has joined #commonlisp
minion has joined #commonlisp
specbot has joined #commonlisp
Oladon has quit [Quit: Leaving.]
akoana has joined #commonlisp
jeosol has joined #commonlisp
ec has quit [Ping timeout: 240 seconds]
waleee has quit [Ping timeout: 260 seconds]
poselyqualityles has quit [Ping timeout: 240 seconds]
poselyqualityles has joined #commonlisp
Bike has joined #commonlisp
poselyqualityles has quit [Ping timeout: 246 seconds]
Oladon has joined #commonlisp
Bike has quit [Quit: sleep]
<beach> Good morning everyone!
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
NotThatRPG has joined #commonlisp
semz_ has joined #commonlisp
semz has quit [Ping timeout: 240 seconds]
igemnace has quit [Remote host closed the connection]
semz_ is now known as semz
igemnace has joined #commonlisp
Madsy has quit [Ping timeout: 256 seconds]
yauhsien has joined #commonlisp
<contrapunctus> Bike: I thought SBCL did compile-time type-checking at safety level 3 🤔️
yauhsien has quit [Ping timeout: 246 seconds]
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wyrd has quit [Quit: leaving]
siganon has joined #commonlisp
yauhsien has joined #commonlisp
yauhsien has quit [Remote host closed the connection]
siganon has quit [Quit: Leaving]
yauhsien has joined #commonlisp
yauhsien has quit [Ping timeout: 256 seconds]
tyson2 has quit [Remote host closed the connection]
akoana has quit [Quit: leaving]
yauhsien has joined #commonlisp
Cymew has joined #commonlisp
<zacque> Can I define a function that does more checking when it's `(declaim (optimize (debug 3) (speed 0)))` then ignore the checkings when `(declaim (optimize (speed 3)))`?
<zacque> The rationale is that some checkings are expensive and only useful for development purposes
<zacque> So when it's ready for release, I'll want them to be turned off
kevingal has quit [Remote host closed the connection]
masinter has quit [Ping timeout: 276 seconds]
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
<beach> There is no portable way to determine the OPTIMIZE settings.
<|3b|> zacque: many implementations let you query the current declarations (and trivial-cltl2 lets you use that without implementation specific code), so you can write a macro that expands differently depending on debug/speed
<Nilby> zacque: it's probably stabler engineering practice to conditionalize on something else, but you could use (uiop:get-optimization-settings)
<|3b|> yeah, i'd tend to make a separate flag, since i usually only specify optimize on specific functions as needed rather than globally
yauhsien has quit [Ping timeout: 256 seconds]
masinter has joined #commonlisp
<|3b|> (and also so you can run your checks with release declarations in case they have some unexpected effect on behavior, or turn on debugging to debug the checks)
<zacque> |3b| Nilby: Thanks, both `declaration-information` from trivial-cltl2 and `(uiop:get-optimization-settings)` seem to do the job
<zacque> Nilby: What do you mean by "conditionalize on something else"? Do you mean on some specific feature?
<zacque> |3b|: How do you make a separate flag for both release and debug modes?
<zacque> Is that what you mean?
hashfunc5e9 has joined #commonlisp
<|3b|> either something on *features*, or a global flag that macro looks at to determine if it is release or debug (or some continuum in between if you want multiple debug levels)
<|3b|> like (defvar *debug-mode* t) (defmacro debug-only-assert (&rest x) (when *debug-mode* `(assert ,@x)))
yauhsien has joined #commonlisp
aartaka has joined #commonlisp
<|3b|> though might be better to put the flag in a different package so you can configure it before building more easily
* Nilby agrees with |3b|
<Shinmera> aeth: The point was that I would be present to help and answer stuff during the jam week.
<Shinmera> you know, so people actually get started with it at all
<|3b|> if you have huge/complicated projects, might instead use a function instead of a simple flag, so it could be extended to do things like only debug certain packages or files
<zacque> Wow, I'm mind blown
<zacque> It opens up a whole lots of possibilities on how I can write my CL projects
<|3b|> read-time conditional (like #+my-debug(assert ..) ) might be easier to use when you don't wrap your tests in a macro like that, but if you do use it inside a macro you need to recompile both macro and call sites for changes to take effect
<|3b|> though you can manually check *features* inside the macro instead for something in between
<zacque> Huh? To "use a function instead of a simple flag", I think it works something ike #+#.(foo arg1 arg2 arg3)?
<zacque> Oh, I misunderstood #+my-debug(assert ..), where my-debug is a feature
<|3b|> for "use function instead of flag" i mean (defmacro debug-only-assert (&rest x) (when (debug-mode) `(assert ,@x)))
ttree has quit [Ping timeout: 250 seconds]
<zacque> I see
<|3b|> and debug mode could do anything. return a flag, check a config file, look at *package* or *compile-file-pathname*, etc
<zacque> I see I see
<|3b|> you also can call function in reader conditional, with increased flexibility from function but still with limitations of running at read-time (and also with more typing, so i'd tend to just go to a real macro for this sort of thing)
<zacque> That's a smart combination of *features* flag + global variable + defmacro
<zacque> I see
<zacque> For debug mode, does that mean you need to set the flag/*debug-mode* before loading the system?
<zacque> It seems like you set the value in a wrapper system, then use it to load the main system?
<|3b|> oops, in "and debug mode could do anything" that should have been "debug-mode", the function called by the macro.
<zacque> By system, I meant the `DEFSYSTEM`
<zacque> I see
<|3b|> but yeah, you would probably want to split the debug flag and macros into a separate system so you could configure it more easily before loading the main code
<|3b|> so for normal use the main system would depend on the debug system and get default settings. if you want other settings you could manually load the debug system, configure it, then load the main system
<|3b|> (or you could make the debug system check some config file, or whatever you like)
<zacque> Hmmm, sounds like a chore that can be automated away by extending ASDF
<|3b|> yeah, that's another option
<rotateq> I've seen it sometimes in an .asd file that an `:around-compile` option can be specified.
<rotateq> May that be something that fits?
<|3b|> though that does remind me of something else to watch out for with read/compile-time debug toggles like that... if you are configuring it outside the source, you might need to force recompilation of files when you toggle it
Oladon has quit [Quit: Leaving.]
<jdz> zacque: I'd suggest avoiding a "debug mode" as such. If there's a chance of wrong arguments being passed to a function, it will happen in both debug and production modes. A better approach would be to add proper error handling and logging.
* |3b| assumed this was more for things like "i'm not sure if my complicated tree structure is working right, so verify the entire tree on every op"
<zacque> Ya, that's what I've in mind ^
WBarends has joined #commonlisp
<zacque> But you have a point as well
<|3b|> "i'm not sure if my user-supplied input is valid" should probably stay in production even if expensive (and be more than just an assert anyway). fast checks after you already validated the user input could go either way, though i'd tend to leave those in until they show up in profiles
jeosol has quit [Ping timeout: 250 seconds]
<jdz> |3b|: Good point. I'd still suggest using a logging library with custom log-levels which can be changed at runtime (or on application startup) so that the checks can be turned on even in "production" code.
pillton has joined #commonlisp
WBarends has quit [Client Quit]
<|3b|> things like check-type can even be an optimization, so might want them even if you are fairly confident about the input at that point :)
<Nilby> how to tell Nilby's dead #34 : there's no more commented out debug code
<|3b|> yeah, runtime toggle is also a good option for a lot of (even most?) cases
treflip has joined #commonlisp
<|3b|> checking a global is pretty fast, and wouldn't be surprised if you could replace it with something faster if needed
hashfunc5e9 has quit [Remote host closed the connection]
pfd has quit [Quit: Client closed]
Major_Biscuit has joined #commonlisp
treflip` has joined #commonlisp
treflip` has quit [Remote host closed the connection]
treflip has quit [Ping timeout: 246 seconds]
shka has joined #commonlisp
pjb has joined #commonlisp
treflip has joined #commonlisp
Brucio-61 has quit [Ping timeout: 240 seconds]
scymtym has quit [Ping timeout: 248 seconds]
masinter has quit [Ping timeout: 240 seconds]
Brucio-61 has joined #commonlisp
scymtym has joined #commonlisp
zacque has quit [Quit: Goodbye :D]
psf has quit [Ping timeout: 248 seconds]
psf has joined #commonlisp
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
yauhsien has quit [Ping timeout: 246 seconds]
rogersm has joined #commonlisp
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
<seok> what options do I have for mobile development?
<seok> I think mocl only exports a library, can ECL be written in pure CL and compiled ?
aeth has quit [Ping timeout: 256 seconds]
aeth has joined #commonlisp
yauhsien has joined #commonlisp
Brucio-61 has quit [Quit: Application exit]
scymtym has quit [Remote host closed the connection]
<pjb> seok: mocl was sold by wukix but it doesn't exist anymore apparently.
<pjb> seok: so currently, the only option AFAIK is Lispworks.
<Nilby> seok: ECL can run on android and supposedly iOS. if you wanted to compile one of the other free lisps on mobile you'd probably need ECL and most of typical C toolchain. commercial lisps have mobile versions. i run sbcl fine on a linux phone. i got part way with sbcl on android and termux with ecl and gcc/clang but gave up. if you like configuring toolchains, probably all the pieces are there.
scymtym has joined #commonlisp
<pjb> Well, and ecl, of course.
frgo has quit []
Brucio-61 has joined #commonlisp
gxt has quit [Ping timeout: 240 seconds]
<phantomics> I'm curious about something: does anyone know approximately how to figure out the CPU overhead of allocating and GCing things in memory - in particular, arrays? For instance, if I create an array within a function that's only used within that function, what will the overhead of creating and GCing it be depending on its size?
gxt has joined #commonlisp
<beach> phantomics: It is impossible to say anything general about that. If the compiler can prove that the array has dynamic extent, the GC may not be invoked at all.
<beach> phantomics: Also, it depends on the GC algorithm used. Copying algorithms don't touch the garbage, so GC will not depend on the size then.
<phantomics> Ok
<beach> phantomics: Creating an array is usually proportional to its size, because the elements have to be initialized.
<phantomics> Some CLs don't automatically initialize, I think SBCL is that way now. If you don't set an initial value you'll see random stuff in the elements that was in those memory locations before
<beach> That would be nasty, because you can then have elements of the wrong type. And it would be contrary to the standard, as I recall.
<lonjil> phantomics: how are you creating arrays such that SBCL behaves like that? Not something I've observed.
<phantomics> (make-array 100 :element-type '(unsigned-byte 8)) for example
<beach> Oh, you are right.
<beach> It is undefined behavior.
<beach> That's very nasty.
<phantomics> LispWorks has done that every time I've tried it, you just make an array without an initial element or contents
<beach> And I am sorry to hear that SBCL relies on such behavior.
<lonjil> My copy of SBCL seems to always zero-initialize in that case.
<phantomics> The content is whatever was in there before, so it'll be aligned with the type you specify
<lonjil> Maybe it depends on speed and safety settings in use?
<Nilby> it's only zero if you look at it
<beach> phantomics: What does it mean that it is "aligned with the type", and how can it be guaranteed that something specific was there before?
<jackdaniel> beach: using the array that is not initialized is an undefined behavior
<phantomics> beach: I mean that it'll be 8-bit ints if you specify that as the type. You're just using memory locations that have stuff already in them, so whatever was in there will be "interpreted" as ints or floats or whatever the type of the array was
<lonjil> I just tried it with speed=3 and safety=0 and I'm still only getting zero initialized arrays from SBCL.
<phantomics> It's more efficient to not auto-initialize as long as you know what you're doing
<beach> jackdaniel: Yes, I just realized that from reading MAKE-ARRAY. I would have said a case for WSCL, but if some implementations don't initialize, that's bad.
<phantomics> If I'm going to run a function that fills the array with values anyway, I'd rather avoid the CPU overhead of setting everything to a default value
<beach> phantomics: That doesn't work for arrays of type T.
<phantomics> Yeah, I'm not sure about t-type arrays, I know they can hold memory locations or actual values with flags if they fit inside the word size
<beach> phantomics: Because then, what was there before could very well be interpreted as an object that in fact does not exist.
<jackdaniel> I don't think that it's bad - there is no need to do a tedious work of initializing allocated memory if it is going to be filled in a moment regardless
contrapunctus has left #commonlisp [#commonlisp]
<jackdaniel> but putting aside whether it is bad or good - it is conforming behavior
<phantomics> Maybe the t-type elements could point to random memory locations? I wonder if some kind of exploit could be done based on that
<beach> phantomics: Then the system will likely crash if this object is used, or worse, it will NOT crash and silently give the wrong answer.
<phantomics> Then a t-type array should have default values always assigned, but typed arrays don't need to
<beach> phantomics: That depends. A character array could very well have tagged characters in it. And that would not be guaranteed by random contents.
<phantomics> Tagged characters? How does that work?
<|3b|> yeah, would have to be careful with fixnums if they are stored tagged too
<beach> Exatly.
<beach> Exactly.
<jackdaniel> phantomics: immediate type has a value encoded directly in the "pointer"
<|3b|> though implementations might choose to store them without tags instead
<jackdaniel> unused bits of the pointer are used as a tag
<jackdaniel> i.e 0001 may mean fixnum, 0002 may mean character etc
<phantomics> Ok, and this can happen in arrays of type 'character and 'fixnum? Not just t?
<beach> Yes.
<jackdaniel> the takeaway of this is: always initialize your arrays before using them
<beach> jackdaniel: It is one of many issues that means that a conforming Common Lisp implementation an be unsafe.
<beach> jackdaniel: That's what I meant by "bad".
<phantomics> I see, it may need to be limited to the more restrictive numeric types and I suppose base-char
<jackdaniel> beach: I understand your position; I don't want to get into a discussion whether performance of correct programs is a valid tradeoff for safety of incorrect ones
<beach> jackdaniel: I understand.
<phantomics> jackdaniel: maybe using a compiler flag to enable skipping allocation would be the best tradeoff
<phantomics> skipping initialization that is
<lonjil> I wonder how difficult it would be to elide the initialisation in the most trivial case of make-array being immediately followed by a loop setting every index.
<beach> I guess it could be a WSCL issue if we require initialization in "safe code".
<jackdaniel> phantomics: if we talk about opinions, then not initializing array when safety is <2 (or <3) is fine and programs that don't do that contain bugs
<beach> lonjil: I think there are many cases where that would be possible.
<jackdaniel> a more sophisticated compiler will have policies that enable/disable certain optimizations depending on optimize values
<beach> phantomics: Common Lisp has the concept of "safe code" and it is well defined.
<beach> phantomics: No need for any additional flags.
<phantomics> lonjil: you could do that in a constrained case where you recognize that someone is looping over the length of the array and setting every row-major-aref, but if you mix it up even a little bit, i.e. by running a function on the array that fills it, the heuristics for determining that would get impossibly complicated
yauhsien has quit [Remote host closed the connection]
<|3b|> from looking at sbcl commits, it might just be dynamic-extent arrays where it is safe to not initialize
<jackdaniel> there is also interesting dillema regarding initialization values. say that upgraded array element type is some kind of a structure (because why not?) - what is the prototype of the initialization value?
<jackdaniel> it is easy for numbers, 0 seems like an obvious choice
<phantomics> APL has a strange concept of "array prototypes", where the array prototype depends on the first element in the array
<lonjil> I just tried doing prin1 on a dynamic-extent uint8 array that I had not initialised, and indeed there are random numbers and also I ended up in the debugger because it crashed into something that looked like a string pointer.
<phantomics> If the first element is a number, the prototype is 0, if a character, it's #\Space
<phantomics> But if the prototype is a nested array, for example the vector #(1 2 3), the prototype is #(0 0 0)
<lonjil> (this at safety 0, to note)
<lonjil> oh, of course, prin1 returns its argument, which is bad if that argument is dynamic-extent
<phantomics> So there a concept of an array type where if a nested array is the first element, the type becomes an array of the same shape containing "empty" values
<|3b|> lonjil: yeah, was just about to ask if you let that return escape the extent :)
<lonjil> added a nil after it inside the let form and now it just prints out a nice random array of ints :)
<lonjil> array is 16 long, and interestingly, the last 4 elements are always 0 so far
<phantomics> Interesting, can you get any random values with t-type arrays? The last 4 elements probably reflect whatever data was there before
<lonjil> no, this was an uint8 array
<Nilby> "a nice random array of ints" omg it's my password
<phantomics> Now see if you can use these arrays to get into a root shell
<jackdaniel> tangentially related - usually display servers offer a window and don't bother with initializing its pixel buffer - the application is expected to do that repeatedly on window exposed event
<jackdaniel> s/window exposed/"window exposed"/
<|3b|> hmm, it does seem to be4 breaking on uninitialized fixnum arrays though
<phantomics> Yeah, hence when a program is malfunctioning its window will end up holding whatever was in the space before you clicked on it
<Nilby> jackdaniel: yes, sometimes even between kernel boots :)
<jackdaniel> Nilby: what do you mean?
<Nilby> i've seen sometimes a graphics card can retain images between between kernel boots, and then you can see some previous screen
<jackdaniel> oh, interesting
<Nilby> usually the power has to be kept on though
<jackdaniel> it is similar with dumb framebuffer screens
<jackdaniel> things are "on" until you replace or erase them (or power-cycle)
contrapunctus has joined #commonlisp
<phantomics> So you reboot the machine and graphics remain in the GPU RAM?
<Nilby> yes. i imagine it probably applies to all/most sub systems that have buffers
jmdaemon has quit [Ping timeout: 248 seconds]
<phantomics> Neat
<Nilby> unless it performs specific time consuming (in the case of 16GB graphcis cars) reset
* |3b| wouldn't be surprised if main ram survived some forms of reboot, just that the kernel gives you 0 pages so you can't see it
<phantomics> How did you see it? Is there a reliable way to get a card to show the last image in memory after a reboot?
<|3b|> (also wouldn't be surprised if some reboots did a quick mem check that wiped some or all of it though)
<jackdaniel> perhaps "allocate buffer and without't initializing it - display"
<Nilby> it depends on the kernel and drivers and boot loader. the most reliable way is probably in the boot loader
<Nilby> it also of course depends of firmware, but firmware is notoriously bad
<Nilby> i've been "suprised" to see the previous contents of memory after reboot on many devices over the years
<|3b|> these days, OS/drivers should be preventing you from seeing old contents because they should also be preventing you from seeing current contents :)
<jackdaniel> there are 0 trust systems, why can't we have 0 security systems again? :)
<empwilli> there's a name for that: https://en.wikipedia.org/wiki/Cold_boot_attack
<empwilli> *a name for these types of attacks
<Nilby> cold boot attack on the previous universe is fun
Lord_of_Life_ has joined #commonlisp
random-nick has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 276 seconds]
Lord_of_Life_ is now known as Lord_of_Life
rogersm has quit [Read error: Connection reset by peer]
treflip` has joined #commonlisp
treflip` has quit [Remote host closed the connection]
treflip has quit [Ping timeout: 240 seconds]
yauhsien has joined #commonlisp
Oddity has quit [Ping timeout: 240 seconds]
yauhsien has quit [Ping timeout: 256 seconds]
pillton has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
aeth has quit [Ping timeout: 246 seconds]
aeth has joined #commonlisp
treflip has joined #commonlisp
lisp123 has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
<pjb> beach: it seems to be difficult to have make-array return an array of random elements, since that would mean that those random elements (that were dead before), are now live objects. I think it's a necessity to have the array memory cleared. The implementation dependent part is that the bit pattern used may either correspond to no object, or to an object of type different than element-type (eg. 0 or nil). For big arrays, the memory
<pjb> can be new page that are set to zero with copy-on-write allocation.
<pjb> Now, granted, the memory can be managed with something else than a garbage collector.
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 256 seconds]
pfd has joined #commonlisp
Bike has joined #commonlisp
tyson2 has joined #commonlisp
dec0d3r has joined #commonlisp
lottaquestions has quit [Quit: Konversation terminated!]
pranavats has left #commonlisp [Error from remote client]
Inline__ has joined #commonlisp
Inline has quit [Ping timeout: 276 seconds]
Inline__ is now known as Inline
Major_Biscuit has quit [Quit: WeeChat 3.4]
kevingal has joined #commonlisp
lisp123 has joined #commonlisp
pfd has quit [*.net *.split]
gxt has quit [*.net *.split]
azimut has quit [*.net *.split]
anticomputer has quit [*.net *.split]
wirv has quit [*.net *.split]
lisp123 has quit [Ping timeout: 240 seconds]
patrix has joined #commonlisp
anticomputer has joined #commonlisp
azimut has joined #commonlisp
NotThatRPG has joined #commonlisp
wirv has joined #commonlisp
gxt has joined #commonlisp
shka has quit [Quit: Konversation terminated!]
shka has joined #commonlisp
waleee has joined #commonlisp
yauhsien has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
patrix has quit []
patrix has joined #commonlisp
patrix has quit [Client Quit]
patrix has joined #commonlisp
Inline has quit [Ping timeout: 276 seconds]
patrice has joined #commonlisp
MajorBiscuit has joined #commonlisp
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
yauhsien has quit [Ping timeout: 246 seconds]
kevingal has quit [Ping timeout: 250 seconds]
ec has joined #commonlisp
wmblathers has quit [Quit: Leaving...]
pranavats has joined #commonlisp
perro has quit [Ping timeout: 260 seconds]
johnjaye has quit [Ping timeout: 256 seconds]
kevingal has joined #commonlisp
Guest74 has joined #commonlisp
yauhsien has joined #commonlisp
Guest52 has joined #commonlisp
Oladon has joined #commonlisp
cage has joined #commonlisp
cage has quit [Remote host closed the connection]
cage has joined #commonlisp
lisp123 has joined #commonlisp
Bike has quit [Quit: Connection closed]
lisp123 has quit [Ping timeout: 246 seconds]
palter has quit []
frgo has joined #commonlisp
ttree has joined #commonlisp
kpoeck has joined #commonlisp
masinter has joined #commonlisp
Cymew has quit [Ping timeout: 246 seconds]
waleee has quit [Ping timeout: 260 seconds]
Guest74 has quit [Quit: Connection closed]
patrice has quit [Quit: Leaving]
kevingal has quit [Remote host closed the connection]
rogersm has joined #commonlisp
<aeth> Shinmera: btw, any chance of releasing a Portacle Flatpak on Flathub? It's quickly becoming the "official" way to distribute Linux apps because of its integration into KDE Plasma and Gnome. It does have a GNU Emacs as the sole search result for "Lisp" right now, but that's it.
<Shinmera> No
<Shinmera> I have no plans for portacle at all.
<Shinmera> It is, as it stands, defunct and unmaintained.
<aeth> oh
<Shinmera> I no longer have the luxury of time, nor the will, to spend on it, and it seems so far nobody else does either.
<aeth> that's unfortunate
<aeth> I'm not sure what the easiest way to get an SBCL binary is, then.
<aeth> looks like 2.2.3 is provided for AMD64... http://www.sbcl.org/platform-table.html
<Demosthenex> sbcl, in flathub?
<Demosthenex> i'm on freebsd. i can do pkg, ports, or roswell just autoinstalled a binary... seems there are plenty available
<aeth> Demosthenex: would be nice, too, but Flathub is more for graphical stuff
<Demosthenex> aeth: i haven't an opinion on flat{hub,pak}, only that's the context you asked in
<aeth> I was just thinking about how to get SBCL on a Steam Deck when I get one... it's an Arch Linux fork where / is read-only (you can make it not read only, but OS updates will wipe out anything you change)
<Demosthenex> fun
<aeth> you can install to /home via pacman, I think, but that doesn't seem like the easiest path.
<Demosthenex> and just scp up a big honking static binary isn't enough?
<aeth> the easiest path would probably be the .tar.bz2 atm
<aeth> from the site, if that's kept up to date
Bike has joined #commonlisp
<aeth> I could personally do things more sophisticated, but if it's too hard then (1) nobody would copy what I'm doing and (2) I'd probably just see one version as good enough and never update it
rtoy has joined #commonlisp
knusbaum has joined #commonlisp
knusbaum- has quit [Ping timeout: 276 seconds]
dec0d3r has quit [Quit: Leaving]
Guest52 has quit [Ping timeout: 252 seconds]
yauhsien has quit [Remote host closed the connection]
MajorBiscuit has quit [Quit: WeeChat 3.4]
jcowan has joined #commonlisp
<jcowan> What would be a good term for arrays of zero dimensions?
tyson2 has joined #commonlisp
<jcowan> "Empty array" makes sense for an array with zero elements, analogous to empty list.
<jackdaniel> null array?
<jackdaniel> "the cave"
<Demosthenex> doesn't array automatically infer at minimum one dimension?
<jackdaniel> Demosthenex: no ,)
<jcowan> A zero-dimensional array has one element
<Bike> degenerate?
<jcowan> That could also be used for empty arrays
<Demosthenex> hrm. i mean you have an atom, an array of atoms, arrays of arrays of atoms, etc... increasing in dimensions
<Demosthenex> that's why i said an array implied at least one dimension
<jackdaniel> n-dimensional arrays are not arrays of arrays
<jcowan> And "scalar" could mean either a zero-dimensional array or a non-array. In APL these are the same thing, but not in CL.
<Demosthenex> how about something catchy, like nullray
<jackdaniel> "the cave"!
<Bike> the caaaaave
<jcowan> "the" implies there is only one, but that is not the case
<jackdaniel> is the cave empty of dragons the same thing as the cave empty of knights?
<jcowan> In CL, yes
<jcowan> I mean no
<jcowan> they are not the same
<jackdaniel> this is certainly interesting, but does it have any practical value? (i.e do you use such arrays for something)?
* jcowan feels like Painted Jaguar
<rotateq> jcowan: in APL we call those enclosed or scalar arrays
<Demosthenex> is there a use case for storing data in a zero dimension array?
orestarod has joined #commonlisp
<rotateq> oh sry :D i didn't read all before writing ^^
<jcowan> Well, the inner product of an array with m dimensions and one of n dimensions has m+n-2 dimensions, so the inner product of two vectors has 1+1-2 = 0 dimensions.
<rotateq> Demosthenex: yes sure, and for consistency terms
<jackdaniel> oh, that's indeed something practical, thanks
<jcowan> enclosed arrays really are arrays of arrays
<Demosthenex> jcowan: that's a neat case. but yeah, what would they be called?
<jackdaniel> 0-dimensional array sounds unambiguous
<jcowan> It is, it's just verbose
<jackdaniel> but 'the cave' is catchy
<Demosthenex> it's a mouthful
<jcowan> a cave, perhaps
<jcowan> vs. the empty list
<Demosthenex> 0.0
<jcowan> (which is unique0
<jcowan> )
<jackdaniel> x^0 may be indeed 1, unless x = 0
<rotateq> (make-array nil ...)
rogersm has quit [Quit: Leaving...]
<jcowan> and if you supply an initial content of 3, you get a ZDA whose sole element is 3
<Demosthenex> ha! ZDA!~
<Demosthenex> that's it
<jcowan> You can also do this with #0A3
<jackdaniel> oab it is then
<rotateq> yes :)
<jcowan> oab?
<jackdaniel> (downcase 0-O A-A 3-B)
<rotateq> so 3 and #0A3 are totally not the same, as #() and #2A() aren't
lisp123 has joined #commonlisp
<jcowan> Right, or for that matter #(3) and 3, or "x" and #\x
lisp123 has quit [Ping timeout: 240 seconds]
Dynom has joined #commonlisp
<rotateq> Demosthenex: or even more useful when you have nested arrays, so for example a 2×2 matrix and on the place of an element sits another enclosed array
treflip has quit [Quit: goodnight]
ns12 has quit [Quit: bye]
pfd has joined #commonlisp
ns12 has joined #commonlisp
ec has quit [Quit: ec]
kpoeck28 has joined #commonlisp
aeth has quit [Ping timeout: 240 seconds]
aeth has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
waleee has joined #commonlisp
johnjaye has joined #commonlisp
tyson2 has joined #commonlisp
poselyqualityles has joined #commonlisp
kpoeck has quit [Quit: Client closed]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 250 seconds]
rtoy has quit [Quit: rtoy]
jmdaemon has joined #commonlisp
Oddity has joined #commonlisp
taziotoninzo20 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
pfd has quit [Quit: Client closed]
kpoeck28 has quit [Quit: Client closed]
notzmv has joined #commonlisp
MajorBiscuit has joined #commonlisp
kpoeck has joined #commonlisp
morganw has joined #commonlisp
rtoy has joined #commonlisp
yauhsien has joined #commonlisp
taziotoninzo20 has quit [Quit: Konversation terminated!]
taziotoninzo20 has joined #commonlisp
NotThatRPG has quit [Ping timeout: 246 seconds]
pranavats has left #commonlisp [#commonlisp]
taziotoninzo20 has quit [Quit: Konversation terminated!]
Dynom has quit [Quit: WeeChat 3.5]
<aeth> jcowan: I call them 0D because that's short... you could also call them "point arrays" because geometrically, 0D is a point
<aeth> jcowan: you could also call them pseudo-boxes or array-boxes or something because they are box-like
<jcowan> Cool
<rotateq> Data sitting on the tip of a needle.
<aeth> the main application in CL would probably be boxing DOUBLE-FLOATs
Brucio-61 has quit [Ping timeout: 248 seconds]
<aeth> jcowan: "scalar arrays" is probably less ambiguous than "point arrays" (because a 3D point could be represented as e.g. #(1 2 3))
scymtym has quit [Ping timeout: 248 seconds]
<aeth> still somewhat ambiguous because it's a scalar array, not an array of scalars, and programmers probably aren't used to seeing that
<rotateq> Or that it should be called "array of rank 0" so not to confuse things.
<aeth> but e.g. #0A(#C(1d0 2d0)) helps you realize that #0A is a "point" from a geometric perspective (assuming that the datum can be graphed in some way)
<rotateq> yes :)
<aeth> a bit unclear with #0A(1d0) because it's a point on a number line instead of on a 2D graph, which is really what people are trained to visualize when they visualize maths
pranavats has joined #commonlisp
<aeth> but even e.g. (make-array nil :initial-contents (make-your-object-that-represents-something)) is a point on a number line in at least one sense: its memory address.
<aeth> at least two if the object is sortable in some way
tyson2 has joined #commonlisp
<aeth> (note that either the sortable key (if mutable) or the memory address (depending on the implementation's GC) could change)
<aeth> (but that's basically like moving the point A on a number line)
philb2 has joined #commonlisp
cross_ has quit [Remote host closed the connection]
philb2 has quit [Read error: Connection reset by peer]
Brucio-61 has joined #commonlisp
philb2 has joined #commonlisp
philb2 has quit [Client Quit]
cage has quit [Quit: rcirc on GNU Emacs 27.1]
scymtym has joined #commonlisp
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 256 seconds]
NotThatRPG has joined #commonlisp
<pjb> aeth: (type-of (aref #0A(1d0))) #| --> cons |#
<pjb> aeth: (type-of (aref #0A1d0)) #| --> double-float |#
NotThatRPG has quit [Read error: Connection reset by peer]
<pjb> aeth: you can insert spaces: (aref #0A 1d0) #| --> 1.0D0 |#
NotThatRPG has joined #commonlisp
MajorBiscuit has quit [Ping timeout: 276 seconds]
kpoeck has quit [Quit: Client closed]
cosimone` has quit [Remote host closed the connection]
akoana has joined #commonlisp
masinter has quit [Ping timeout: 256 seconds]
Guest74 has joined #commonlisp
abrantesasf has joined #commonlisp
abrantesasf has quit [Remote host closed the connection]
abrantesasf has joined #commonlisp
abrantesasf has quit [Remote host closed the connection]
Brucio-61 has quit [Ping timeout: 246 seconds]
scymtym has quit [Ping timeout: 272 seconds]
masinter has joined #commonlisp
aartaka has quit [Ping timeout: 276 seconds]
poselyqualityles has quit [Ping timeout: 276 seconds]
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shka has quit [Ping timeout: 246 seconds]
NotThatRPG has joined #commonlisp
cosimone has joined #commonlisp
<aeth> pjb: my bad
<aeth> naturally, the literal syntax isn't very useful for 0D arrays
<aeth> for writing them, anyway
Guest74 has quit [Quit: Connection closed]
Oladon has quit [Quit: Leaving.]
cosimone has quit [Remote host closed the connection]
cosimone has joined #commonlisp
sander is now known as sndr
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lisp123 has joined #commonlisp
matt` has joined #commonlisp
matt` has quit [Remote host closed the connection]
lisp123 has quit [Ping timeout: 240 seconds]
orestarod has quit [Ping timeout: 240 seconds]
yauhsien has quit [Remote host closed the connection]
cosimone has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
Common-Lisp has quit [Ping timeout: 246 seconds]
john_A has joined #commonlisp
john_A has quit [Quit: Client closed]
hhdave_ has joined #commonlisp
hhdave has quit [Ping timeout: 250 seconds]
hhdave_ is now known as hhdave
Oladon has joined #commonlisp
masinter has quit [Ping timeout: 240 seconds]
yauhsien has joined #commonlisp
Guest74 has joined #commonlisp
masinter has joined #commonlisp