<paulapatience>
When should a function return nothing, i.e., end in (values)?
notzmv has quit [Ping timeout: 246 seconds]
occ has joined #commonlisp
<bike>
when it's called for effect, often
<aeth>
whether or not it returns (values) or NIL is up to the style
<aeth>
for practical purposes, there's no difference between (values) and NIL unless you do multiple-value-call, multiple-value-list, and maybe one other, because a missing value (including the 0/first value) will implicitly turn into NIL
<aeth>
but you generally want to do one of the when it would "cons" and you don't need the return value because you're using it for the side effect
<aeth>
s/one of the/one of them/
<aeth>
e.g. if your function ends in SETF, it will implicitly return the value, which could lead to unnecessary consing if e.g. a double-float
<aeth>
For clarity, a missing value implicitly turns into NIL except in a handful of places. The REPL is one of those places, btw, so it does cause a difference for something designed to be used interactively at the REPL.
ezakimak has quit [Ping timeout: 250 seconds]
<paulapatience>
Ah, I hadn't thought about consing. Thanks for all the advice.
<aeth>
consing is just the most obvious downside of relying on implicitly returning the final form's return value rather than NIL or (VALUES) depending on your style
<aeth>
assuming it's a useless value
random-nick has quit [Ping timeout: 264 seconds]
zombieface has joined #commonlisp
waleee has quit [Ping timeout: 240 seconds]
waleee has joined #commonlisp
zombieface has quit [Quit: Leaving]
ezakimak has joined #commonlisp
bjorkint0sh has joined #commonlisp
bjorkintosh has quit [Ping timeout: 260 seconds]
markb1 has quit [Remote host closed the connection]
waleee has quit [Ping timeout: 260 seconds]
iosevka has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
zombieface_ has joined #commonlisp
yewscion has joined #commonlisp
cmack has quit [Ping timeout: 246 seconds]
ldb has joined #commonlisp
iosevka has quit [Remote host closed the connection]
CodeGerrard has joined #commonlisp
CodeGerrard has quit [Client Quit]
iosevka has joined #commonlisp
parjanya has quit [Remote host closed the connection]
occ has quit [Ping timeout: 246 seconds]
chrcav has quit [Ping timeout: 260 seconds]
chrcav has joined #commonlisp
knusbaum has quit [Ping timeout: 252 seconds]
nimiux has quit [Server closed connection]
nimiux has joined #commonlisp
notzmv has joined #commonlisp
occ has joined #commonlisp
bilegeek has joined #commonlisp
iosevka has quit [Remote host closed the connection]
jryans has quit [Server closed connection]
jryans has joined #commonlisp
azimut has quit [Ping timeout: 240 seconds]
azimut has joined #commonlisp
mm007emko has joined #commonlisp
Oladon has quit [Quit: Leaving.]
rgherdt has joined #commonlisp
AkashaPeppermin4 has joined #commonlisp
akasha has left #commonlisp [#commonlisp]
msavoritias has joined #commonlisp
ldb has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
pjb has quit [Ping timeout: 240 seconds]
bilegeek has quit [Quit: Leaving]
shka has joined #commonlisp
zombieface_ has quit [Quit: Leaving]
thollief has joined #commonlisp
bendersteed has joined #commonlisp
jeffrey has joined #commonlisp
scymtym has joined #commonlisp
<habamax>
\
LW has joined #commonlisp
LW has quit [Client Quit]
m5zs7k has quit [Ping timeout: 250 seconds]
m5zs7k has joined #commonlisp
dcb has quit [Quit: MSN Messenger 4.0.0]
pranavats has left #commonlisp [Error from remote client]
dino_tutter has joined #commonlisp
pranavats has joined #commonlisp
habamax has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.2)]
jackdaniel has quit [Server closed connection]
jackdaniel has joined #commonlisp
azimut has quit [Ping timeout: 240 seconds]
notzmv has quit [Ping timeout: 246 seconds]
Perflosopher has quit [Ping timeout: 260 seconds]
pve has joined #commonlisp
notzmv has joined #commonlisp
mgl has joined #commonlisp
Perflosopher has joined #commonlisp
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 246 seconds]
habamax has joined #commonlisp
Lord_of_Life_ is now known as Lord_of_Life
karlosz has quit [Quit: karlosz]
doyougnu has joined #commonlisp
occ has quit [Ping timeout: 246 seconds]
pve has quit [Ping timeout: 246 seconds]
pve has joined #commonlisp
karlosz has joined #commonlisp
mfiano has quit [Server closed connection]
mfiano has joined #commonlisp
<rendar>
# starts special characters reading, but what about i leave '#' alone? is that valid lisp?
<hayley>
It isn't.
<beach>
No, # is a macro character that dispatches to more characters.
<rendar>
ok
<jackdaniel>
rendar: you may define your own readtable and fill # with something else (but tinkering with the standard-read-table on that would be non-conforming)
<jackdaniel>
nasal daemons et al
<rendar>
well, i understand that readtable supports 2 kind of characters, single chars, like '(' and special ones like '#{'
<jackdaniel>
no, it is that the readtable reads the character and if it has a special funciton associated with it, it handles control to it
<jackdaniel>
as it happens, the character # has a function that reads the next character
<jackdaniel>
and then decides based on a separate list for characters associated with #
<jackdaniel>
this simple approach is godesend when it comes to tinkering with syntax, but is awful if you want to write a parser that does not implement common lisp reader fully
<jackdaniel>
that's why you can't use regexps and such to parse common lisp code without fail
<beach>
Why would you try to parse Common Lisp code with anything other than READ? :)
<hayley>
What if you're impatient and want to SKIM the code?
<jackdaniel>
because implementing read is a pita
<jackdaniel>
and not everyone wants to pull whole common lisp to general purpose tools
<jackdaniel>
there's also an argument that having a turing-complete parser is a poor taste, but c++ programmers with their template system will probably not raise it
<ogamita>
paulapatience: I explicitely use (values) for functions designed to be used as REPL _commands_.
<ogamita>
paulapatience: for example, (list-thread) displays a nice table of threads. It would be ugly to have the REPL print a result whatever it would be in addition.
<ogamita>
paulapatience: on the other hand, some commands such as uptime or date also return a value (this is discutable, since using them as function would still have the side effect of printing their output).
Brucio-61 has joined #commonlisp
<ogamita>
rendar: you can use # alone if you escape it: (let (( \# 42 )) |#|) #| --> 42 |#
<ogamita>
(depending on your definition of "alone").
<ogamita>
rendar: actually, the readtable really has a single concept of reader macros. The dispatching reader macros are just a special kind of reader macro. You could implement your own kind of reader macro that could dispatch on more than one character, or on something else than character.
<ogamita>
implementation of set-symbol-reader-macro is left as an exercise for the reader (you).
<rendar>
thanks but its still quite too advanced for me
<ogamita>
rendar: try it! This is how you learn.
<rendar>
ok
<rendar>
:)
Brucio-61 has quit [Ping timeout: 260 seconds]
Brucio-61 has joined #commonlisp
dino_tutter has quit [Ping timeout: 246 seconds]
<ogamita>
Note that you could write things like: (!foo arg…) and !foo could read as a function name or a lambda expression.
<ogamita>
So these symbol reader macros could be used also to compute at read-time the function to call.
jonatack2 has quit [Read error: Connection reset by peer]
jonatack2 has joined #commonlisp
scymtym has joined #commonlisp
dino_tutter has joined #commonlisp
zest has quit [Read error: Connection reset by peer]
pve has quit [Ping timeout: 246 seconds]
waleee has joined #commonlisp
karlosz has quit [Quit: karlosz]
oneeyedalien has joined #commonlisp
tyson2 has joined #commonlisp
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
szkl has quit [Quit: Connection closed for inactivity]
oneeyedalien has quit [Quit: Leaving]
oneeyedalien has joined #commonlisp
habamax has quit [Remote host closed the connection]
mariari has quit [Ping timeout: 252 seconds]
mariari has joined #commonlisp
mm007emko has quit [Quit: Client closed]
jurassic_[m] has joined #commonlisp
<jurassic_[m]>
!help
Krystof has quit [Ping timeout: 252 seconds]
<jurassic_[m]>
oops
attila_lendvai has joined #commonlisp
karlosz has joined #commonlisp
dcb has quit [Ping timeout: 246 seconds]
Equill has joined #commonlisp
dcb has joined #commonlisp
triffid has quit [Remote host closed the connection]
kurfen_ has quit [Ping timeout: 240 seconds]
kurfen has joined #commonlisp
igemnace has quit [Remote host closed the connection]
<Equill>
There was a discussion in the Fediverse about Quicklisp's release schedule having slowed down significantly, most likely due to Zach simply getting overwhelmed by the ever-increasing workload. That led to a discussion about possible improvements, and thence to https://www.sysc.at/display/Wikipages/ASDF_Systems_on_Syscat_-_an_introduction
igemnace has joined #commonlisp
dcb has quit [Quit: MSN Messenger 4.0.0]
<Equill>
If anybody has any insights, feedback or other input, it'd be very welcome. Short version: I'm exploring ideas for taking it a few steps further, by implementing it on that thing I've been building forever (Restagraph/Syscat) and possibly turning it into more of a protocol.
<jackdaniel>
Equill: the perceived problem seems to be of a person not having enough time to curate to systems (and quicklisp big proposition over, say, asdf-install is human curation indeed), while the proposed solution is another technology stack
<jackdaniel>
I don't see the step between the problem and the solution
<Equill>
Your summary is accurate enough; I glossed over a few steps in between.
<mfiano>
The snapshot model without versioning wasn't chosen because it was simple
<jackdaniel>
(it is also worth noting that atgreen came up with one more solution in this area)
<mfiano>
The global lisp image poses a problem without some significant extension work to be had.
<mfiano>
If it were to be assumed portable
<jackdaniel>
it is called ocicl if I recall correctly
<mfiano>
As did etimmons with CLPM
* jackdaniel
gave feedback, social duty fullfilled \o/ time to (/me checks another buffer) continue refactoring ecl compiler
<Equill>
Thanks, jackdaniel!
<jackdaniel>
sire
<jackdaniel>
sure*
<Equill>
I thought OCICL rang a bell. I'll take another look over that project.
<mfiano>
The thing that I don't see brought up is the implications of a versioning constraint
<Equill>
What implications, in particular?
<mfiano>
In Common Lisp, we have 1 namespace, namely the global package-name's. We transfer to each other the state of the lisp universe for people to load into their images. If we start mixing versions in the lisp image without explicit support for this in a portable manner, well, I don't see it being pretty.
<Equill>
Ah, I see what you mean. It's always a possibility, but this approach could increase the likelihood, relative to QL's more coherent snapshots.
oneeyedalien has quit [Quit: Leaving]
<Equill>
Does ASDF's versioning not count as a portable manner? Or is it as I suspect, that this isn't yet in sufficiently widespread use?
<cdegroot>
(one tip, as a relative bystander: look at what "the other awesome image-based language" has done - Smalltalk/Squeak/Pharo)
<mfiano>
ASDF systems are orthogonal and agnostic to any packages they may load
jmiven has quit [Quit: reboot]
<mfiano>
If some transitive dependency brings in foo v1, you are stuck with it, even if you need foo v1.0.1-patch
attila_lendvai has quit [Remote host closed the connection]
<Equill>
cdegroot: I haven't looked at Smalltalk in years, so that sounds like a worthwhile tip.
jmiven has joined #commonlisp
attila_lendvai has joined #commonlisp
<cdegroot>
I've spent zero thought on this, but the problem space smells very similar.
<Equill>
mfiano: yes, I've lived that nightmare, with an ancient version of py-snmp. In general, though, that's the libary/dll-hell issue. It's a concern, for sure.
<Equill>
Good point: I'll mention that issue on the page.
attila_lendvai has quit [Read error: Connection reset by peer]
<mfiano>
Even if the language supports it, which CL does not, it is usually limited to libraries, not applications. One can argue that all CL code is application code though, since we are developing the state of a Lisp image, often with concurrent projects running simultaneously.
<cdegroot>
Probably out of scope and I hate to say it, but I really dig what Javascript has done here: do away with the global namespace and these versioning problems vanish.
<jackdaniel>
if we are talking about global namespace issue, then there are two solutions that come to mind
<mfiano>
please not rename-package
attila_lendvai has joined #commonlisp
<jackdaniel>
one are "first-class global environments" specified by beach (not adopted by any finished implementation I think)
<jackdaniel>
and modules that are known from pre-cl lisps and from scheme
<mfiano>
Ah yes. back to good ol require
<jackdaniel>
the latter would be a rather drastic measure
<jackdaniel>
you could manage modules with some better protocol, the key thing is the containment of the environment and its exports
<beach>
mfiano: I suspect jackdaniel is not talking about REQUIRE.
<mfiano>
Yes. The point I was making though is "we aren't there yet". we have an idea (and maybe a full specification?), but we do not have a full implementation, not to mention the wildfire that is PLN, needed to build such a "quicklisp killer" on top of.
<mfiano>
I know he is not.
<jackdaniel>
sure, I'm just mentioning solutions I know of that could potentially address the versioning problem
<mfiano>
Portability, even if by de-facto standards and implementations thereof, is a pre-requisite for the discussion of a solution, me thinks.
<beach>
When I wrote the paper about first-class global environments, I investigated existing module solutions, and the ones I found all impose a hash-table lookup on every function reference. The solution in the paper avoids that overhead for literal function references, and the overhead is present only for computed function references.
<mfiano>
I don't think |3b| ever imagined his quick proof of concept sbcl PR/spec would be so widely adopted. Thanks jack/ECL for picking that up :)
<jackdaniel>
first was abcl I think, and after ecl phoe pulled the cart
<jackdaniel>
but sure, I always enjoy the praise
* jackdaniel
gleams
<mfiano>
Maybe we need FCGE to be implemented by a complete and conforming implementation. Someone familiar with that might get a head start on propagating the idea by doing so.
<Equill>
Portability is also definitely an issue, too.
<beach>
If we stick to the protocol for run-time environments, and avoid the compilation environment, then the protocol that Bike recently finalized is a pretty good specification, so if implemented, it would be portable.
<beach>
It is also very simple.
<Equill>
What protocol is that?
* Equill
should probably be in here more consistently
<beach>
Let me see if I can find the repository...
<ixelp>
GitHub - s-expressionists/Clostrum: First Class Global Environments
<Equill>
Thanks! Now I have a *lot* of reading to do.
<jackdaniel>
isn't clostrum the implementation of first class global environments? I thought that you've said some new protocol?
<jackdaniel>
s/said/meant/
<jackdaniel>
s/protocol?/protocol./
<beach>
jackdaniel: I just meant that Bike simplified it a lot lately.
<jackdaniel>
I see
ldb has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
dino_tutter has quit [Ping timeout: 245 seconds]
<jackdaniel>
the exception in cl that allows function names as (setf foo) is annoying
<ldb>
making grep files hard?
<jackdaniel>
no, such irregularities are simply a source of bugs
<jackdaniel>
(and extra complexity for a minute feature)
kabriel has quit [Server closed connection]
skempf has joined #commonlisp
dino_tutter has joined #commonlisp
occ has quit [Ping timeout: 246 seconds]
awkravchuk has joined #commonlisp
<awkravchuk>
Hey guys, I got a question for CLPM experts. Is it possible to specify two sources in clpmfile (say, quicklisp & ultralisp) and have all of the packages installed from one (quicklisp), but one specific package from other (ultralisp)? I'm trying to use :source specifier in :project clause, but CLPM keeps stubbornly install *everything* from one of those sources, depending on which specified first
euandreh has joined #commonlisp
ldb has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
Oladon has joined #commonlisp
karlosz has quit [Quit: karlosz]
bendersteed has quit [Quit: bye]
pve has joined #commonlisp
attila_lendvai_ has joined #commonlisp
cage has joined #commonlisp
attila_lendvai has quit [Ping timeout: 246 seconds]
<cmack>
I'm using |3b| 's fork of cl-egl and trying to use "eglSwapBuffersWithDamageEXT" but I'm receiving an error from CFFI stating the string isn't found. Running either `eglinfo` or egl:query-string reports that my device should support the extension...Does anyone with khronos-based api experience know if I'm missing something? Or could I have found a bug in the CFFI generator of cl-egl?
awkravchuk has joined #commonlisp
<Shinmera>
Do you need egl?
<Shinmera>
Or would something like glfw also work
yewscion has quit [Read error: Connection reset by peer]
<jackdaniel>
it is probably about wayland backend for mcclim
<jackdaniel>
(and wayland runs on egl)
<cmack>
I'm preferring to use egl right now. Yes, it's part of my mcclim work. Wayland doesn't have to run on egl but that that is the buffer I'm working on / preferring at the moment.
<Shinmera>
aight.
chrcav has quit [Ping timeout: 246 seconds]
chrcav has joined #commonlisp
azimut has joined #commonlisp
igemnace has quit [Remote host closed the connection]
<cmack>
Thanks I may compare notes with glfw source... but a cursory search shows they don't use eglSwapWithDamage