thuna` has quit [Read error: Connection reset by peer]
reb has quit [Remote host closed the connection]
reb has joined #commonlisp
edgar-rft_ is now known as edgar-rft
DarthRedLeader has joined #commonlisp
<beach>
pkw: But you made it.
pestctrl has quit [Ping timeout: 272 seconds]
paddymahoney has quit [Ping timeout: 276 seconds]
<pkw>
i am here
<beach>
What brings your to #commonlisp?
<beach>
*you
* beach
has not finished his morning coffee yet.
paddymahoney has joined #commonlisp
DarthRedLeader has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.4)]
<pkw>
I like CLOS which is weird because I grew to hate OO in Java and C++
<beach>
I see. But CLOS is nothing like the traditional object-oriented languages.
<pkw>
I use SBCL which do you use ?
<beach>
Also SBCL. I think it is the most commonly used implementation here.
<pkw>
Yeah I think I am just scratching the surface of CLOS
<pkw>
I made a form abstraction for web stuff, that is basically an empty class that you instantiate with your specific forms.
<pkw>
And it just has a couple of methods that will go thru the sub-classes member vars and see if they are in form POST data.
<beach>
My theory is that traditional object-oriented languages create problems for large programs (as many people seem to complain about) because they confuse representation and encapsulation. In Common Lisp, classes are about representation and the package system is used for encapsulation. But people spend a lot of effort to avoid learning Common Lisp, so they probably think all object-oriented systems are the same.
<Pixel_Outlaw>
It makes me a bit sad that people trash OOP after only learning C++ and Java's notion of it.
<pkw>
I think you alluding a little to how easy it is to "paint yourself into a corner" so to speak. I talk about OO in java/c++ as being like overspecified.
<pkw>
Like needlessly overspecified.
<Pixel_Outlaw>
Apparently you can even pull OOP from closures in lambdas alone. :)
<Pixel_Outlaw>
Very annoying reality to the FP crowd.
<Pixel_Outlaw>
:}
<pkw>
Oh like how JS uses closures to do modules and encapsulation?
<pkw>
(or used to before they added stuff, i didn't keep up)
<Pixel_Outlaw>
I'm not versed in JavaScript but I have seen some classes done in pure R5RS scheme. :)
<beach>
Like the SICP book does.
<pkw>
I like how scheme has more recursion, but I like CL's practicality even more.
Lord_of_Life has quit [Ping timeout: 252 seconds]
Lord_of_Life has joined #commonlisp
<pkw>
I was happy never using OO/classes kind of stuff again, but just started using CLOS because it was there ...
<Pixel_Outlaw>
I think quite a few dialects do tail call optimization so you can do heavy recursion in CL too. But the spec itself doesn't mandate it so know that. I also like LOOP which is probably the most powerful looping construct I've seen in a language. Others may prefer the iteration library.
<Pixel_Outlaw>
*tail call elimination
<Pixel_Outlaw>
Sorry, implementations not dialects.
<pkw>
I like iterate !
<pkw>
I'm a little newer to CL so I try the new stuff.
<pkw>
I also use package-inferred-system :)
<pkw>
I also like trivia's pattern matching
<pkw>
I'm fine using TCO in implementations, i was talking to someone how the SPEC isn't for holding you back but more a foundation to build on.
<aeth>
I'd like if there was a way to force on TCO when the implementation supports it. As an OPTIMIZE or something. To ensure such code doesn't break even at e.g. (debug 3).
<Pixel_Outlaw>
I think Armed Bear might have issues with recursion thanks to the JVM.
<Pixel_Outlaw>
But it might have gotten worked around.
<pkw>
i wouldnt be surprised, clojure does that recur thing to get around it
<pkw>
(which works pretty well)
<aeth>
OPTIMIZE (inside of e.g. DECLARE) allows implementation-defined optimize qualities, and a portability library can reexport the implementation-specific symbol from an implementation-specific package so that it uses the same package portably.
<aeth>
So it wouldn't be impossible to have a portability library that would force on TCO inside of a function, if an implementation supports TCO.
<aeth>
(And that portability library, ofc
<aeth>
)
<pkw>
Could you write code that bombs out if TCO isn't available ? I could see that being helpful.
<aeth>
that is when (>= tail-call debug) tail-call overrides the possibility of debug disabling TCO
<aeth>
would be the way to do it
<aeth>
but you'd have to get implementations on board
<pkw>
Oh i guess your are talking "optimize" not "assert" (speaking loosely)
<pkw>
I only got as far as (declare (ignore var-123)) in using declare.
<aeth>
you can e.g. (declare (optimize (speed 3))) or (declare (optimize (debug 3))) or do similar things (not just inside of declares)
reb has quit [Remote host closed the connection]
<aeth>
iirc the syntax
reb has joined #commonlisp
<aeth>
so something like e.g. (declare (optimize (trivial-tail-declare:tail-call 3))) could in theory override a global (debug 3) that would otherwise disable TCO which could break that part of the program, if the implementations built such a mechanism. And then you could rely on it more often, within those implementations that did so
<aeth>
or, alternatively, 2 if you actually want it disabled at (debug 3) but otherwise expect it.
decweb has quit [Ping timeout: 276 seconds]
<aeth>
There may be another way to make it so you could rely on tail recursion (when the implementation supports both optimized tail recursion _and_ the workaround), though
triffid has quit [Remote host closed the connection]
triffid has joined #commonlisp
<pkw>
Would this so you could have like TCO only used in certain packages ?
<pkw>
Like I want my code to use TCO but i dont care what alexandria (for ex.) does.
<aeth>
only in certain areas, yes
<aeth>
I'm not sure it can be done at the package level, but you can override CL:DEFUN with a new DEFUN or e.g. write your own DEFINE-FUN that is just DEFUN that inserts the DECLARE automatically
<aeth>
or a bunch of other ways to do it
<aeth>
but it would be particularly interesting in a DSL
amb007 has joined #commonlisp
<pkw>
I barely use macros so I kinda store this stuff in my brainium for later when i need it or i have more context to understand it
<pkw>
Actually i think im ready to start using macros more.
<pkw>
(it's funny it makes my brain kinda go off on tangents when i consider the implications of the more meta stuff of lisp)
<beach>
Macros should be used only when functions won't work, which is to add new syntax (at the S-expression level) to the language.
<Pixel_Outlaw>
The nice thing about Common Lisp in my experience is that it lets you really explore ideas without too much friction I think it's a strength that it's fairly unopinionated and designed to grow with the programmer.
<aeth>
you rarely need macros... forcing DECLAREs/DECLAIMs (I've seen something similar to what I'm proposing multiple times, except to force a DECLAIM INLINE so you don't accidentally not do that... very easy to lose track of one... usually DEFINLINE or whatever)
<aeth>
forcing DECLAREs/DECLAIMs is one case
<aeth>
one of the more trivial cases
<Pixel_Outlaw>
I did find macros quite nice though when I wanted to express something like (dotimes* (x 6 y 21 ... z 5) ... )
<aeth>
This is because DECLARE is special syntax (as is DECLAIM, which must be top-level, but can be paired in a PROGN with a DEFUN and stay top-level)
<aeth>
special iteration constructs (without using higher order functions, which would require a LAMBDA) and special kinds of bindings are the other two common ones, in addition to custom variations of various DEFs
<Pixel_Outlaw>
It's also worth noting that when doing macros you don't have do do everything all at once inside the macro. You can have normal functions break down the lists outside the definition.
<aeth>
in particular, if you have ` inside of a ` it's just a game over of confusion. Always break it up. Use an internal LET, call another function, expand into another macro, do whatever.
<aeth>
but nested quasiquotes and unquotes stop being convenient once you have them nested
meaty has quit [Quit: touch grass]
<pkw>
I think i am fine not nesting quasiquotes :)
meaty has joined #commonlisp
pfdietz has quit [Quit: Client closed]
samedi has quit [Quit: Leaving]
Oddity has quit [Ping timeout: 276 seconds]
wacki has joined #commonlisp
easye has joined #commonlisp
shka has joined #commonlisp
Pixel_Outlaw has quit [Quit: Leaving]
shka has quit [Ping timeout: 260 seconds]
prokhor has joined #commonlisp
alcor has joined #commonlisp
reb has quit [Remote host closed the connection]
reb has joined #commonlisp
alcor has quit [Remote host closed the connection]
alcor has joined #commonlisp
pranav has joined #commonlisp
pve has joined #commonlisp
meaty has quit [Ping timeout: 255 seconds]
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
reb has quit [Remote host closed the connection]
reb has joined #commonlisp
reb has quit [Remote host closed the connection]
reb has joined #commonlisp
X-Scale has quit [Quit: Client closed]
amb007 has quit [Read error: Connection reset by peer]
contrapunctus has left #commonlisp [#commonlisp]
amb007 has joined #commonlisp
contrapunctus has joined #commonlisp
amb007 has quit [Remote host closed the connection]
amb007 has joined #commonlisp
reb has quit [Remote host closed the connection]
reb has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
wacki has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
contrapunctus has joined #commonlisp
awlygj has joined #commonlisp
mgl__ has joined #commonlisp
simendsjo has joined #commonlisp
mgl__ has quit [Ping timeout: 246 seconds]
wacki has joined #commonlisp
Artea has joined #commonlisp
m5zs7k_ has joined #commonlisp
kitaleth_ has joined #commonlisp
alcor` has joined #commonlisp
Demosthenex has joined #commonlisp
zlqrvx_ has joined #commonlisp
random-nick has joined #commonlisp
BierLiebHaber_ has joined #commonlisp
chrcav_ has joined #commonlisp
cross_ has joined #commonlisp
kagevf_ has joined #commonlisp
Artea_ has joined #commonlisp
alcor has quit [*.net *.split]
Artea has quit [*.net *.split]
Demosthe1ex has quit [*.net *.split]
m5zs7k has quit [*.net *.split]
chrcav has quit [*.net *.split]
cqst has quit [*.net *.split]
BierLiebHaber has quit [*.net *.split]
kitaleth has quit [*.net *.split]
zlqrvx has quit [*.net *.split]
cross has quit [*.net *.split]
kagevf has quit [*.net *.split]
kitaleth_ is now known as kitaleth
m5zs7k_ is now known as m5zs7k
alcor` is now known as alcor
alcor has quit [Changing host]
alcor has joined #commonlisp
<younder>
(defconstant +no-bindings+ '((t . t))) Keeps asking me if I want the old or the new value each time I compile the file. I had to make it defparameter to make it shut up.
<younder>
Seems to me the reason if that it is allocating a new '((t . t)) which is at a different address and thus not 'eql'. However if you knew that (equal old-value new-value) then you should always pick old. If the constant was expanded and you checked for 'eq' then that would always be the old eq. (assuming it is not recompiled)
<younder>
Thus the interruption is unnecessary.
Artea_ has quit [Remote host closed the connection]
<alcor>
younder: I remember asking about this a few weeks ago, and someone here (thanks!) recommended using alexandria:define-constant.
<alcor>
(To elaborate, the latter allows one to specify the equality predicate)
<younder>
I'll look into it alcor
kamafam has joined #commonlisp
JuanDaugherty has joined #commonlisp
Artea has joined #commonlisp
reb has quit [Remote host closed the connection]
reb has joined #commonlisp
<jackdaniel>
it is fine to use define-constant, but may lead to tricky issues
reb has quit [Remote host closed the connection]
reb has joined #commonlisp
gpiero has quit [Remote host closed the connection]
gpiero has joined #commonlisp
nickiminjaj has joined #commonlisp
Oddity has joined #commonlisp
wacki has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
reb has quit [Remote host closed the connection]
reb has joined #commonlisp
X-Scale has joined #commonlisp
wacki has joined #commonlisp
reb has quit [Remote host closed the connection]
reb has joined #commonlisp
zxcvz has joined #commonlisp
zxcvz has quit [Client Quit]
JuanDaugherty has quit [Quit: JuanDaugherty]
edgar-rft_ has joined #commonlisp
edgar-rft has quit [Ping timeout: 272 seconds]
mgl__ has joined #commonlisp
reb has quit [Remote host closed the connection]
reb has joined #commonlisp
edgar-rft_ is now known as edgar-rft
reb has quit [Remote host closed the connection]
reb has joined #commonlisp
yitzi has joined #commonlisp
reb has quit [Remote host closed the connection]
reb has joined #commonlisp
reb has quit [Remote host closed the connection]
reb has joined #commonlisp
wacki has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wacki has joined #commonlisp
yitzi has quit [Ping timeout: 276 seconds]
yitzi_ has joined #commonlisp
yitzi_ has quit [Remote host closed the connection]
yitzi has joined #commonlisp
reb has quit [Remote host closed the connection]
reb has joined #commonlisp
reb has quit [Remote host closed the connection]
reb has joined #commonlisp
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
oneeyedalien has joined #commonlisp
McParen has joined #commonlisp
cage has joined #commonlisp
cage has quit [Excess Flood]
cage has joined #commonlisp
chrcav_ has quit [Quit: leaving]
chrcav has joined #commonlisp
reb has quit [Remote host closed the connection]
reb has joined #commonlisp
mwnaylor has quit [Remote host closed the connection]
kamafam has quit [Read error: Connection reset by peer]
kamafam has joined #commonlisp
jrx has joined #commonlisp
rainthree has joined #commonlisp
<rainthree>
pkw: package-inferred-system might be a trap
<rainthree>
if after experimenting more with it you will also come to the conclusion that it is a trap, let me know
<pkw>
I like it so far.
<beach>
I still don't see what problem they solve. But I see problems they introduce.
<pkw>
I have this interesting perspective of only getting familiar with package-inferred-system
<pkw>
Like I was saying before since I am pretty new to CL i am taking it as an opportunity to embrace the newer stuff
<beach>
But you might want to be a tad selective about what new stuff you embrace, just so that you won't waste a lot of time. But maybe that's not very important to you.
<pkw>
it is not, learning languages is fun for me
<pkw>
Don't get me wrong I have already changed a lot of my defsystem layout, as i have been going. One think I like about CL so far is its pretty good for radical refactoring.
<pkw>
But I have a few non-trivial systems, using package-inferred-system and I am able to call into parent systems by namespace without headache so that's a pretty good start.
josrr has joined #commonlisp
<rainthree>
"All that glitters is not gold"
<rainthree>
it's amazing how many traps there are, how many bad books are out there, and so on.
<ixelp>
Quest4Knowledge Garbage Mainstream Education Deconspiration series #1 Piece-wise junk in calculus - YouTube
<beach>
rainthree: Watching now...
kamafam has quit [Read error: Connection reset by peer]
kamafam has joined #commonlisp
<beach>
rainthree: I see your point. But I personally have not studied this particular question to be upset about. Lots of others, though... :)
Perflosopher has quit [Ping timeout: 260 seconds]
mgl__ has quit [Ping timeout: 252 seconds]
<beach>
Some of my favorites are recent books about operating systems that contain lots of incorrect stuff, and (worse) that present everything as if it were "normal" without questioning it.
<beach>
But I have already talked about that here, so I won't repeat it, especially now that I have to go fix dinner for my (admittedly small) family.
Perflosopher has joined #commonlisp
<beach>
Oh, and algorithms written by respected authors who show a version of binary search that takes twice as much time as it should.
<beach>
*Oh, and books on algorithms...
shka has joined #commonlisp
simendsjo has joined #commonlisp
jonatack has quit [Ping timeout: 252 seconds]
johnjaye has quit [Ping timeout: 276 seconds]
JuanDaugherty has joined #commonlisp
jonatack has joined #commonlisp
<rainthree>
https://www.lrde.epita.fr/dload/papers/verna.07.imecs.pdf "We saw that because of static type safety constraints, it is not possible to implement binary methods in C++. In CLOS, the Common Lisp Object System[5] however, the issue simply does not exist"
Perflosopher4 has joined #commonlisp
Perflosopher has quit [Ping timeout: 255 seconds]
Perflosopher4 is now known as Perflosopher
wacki has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cdegroot_ has joined #commonlisp
cdegroot has quit [Ping timeout: 276 seconds]
jrx has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.4)]
oneeyedalien has joined #commonlisp
thuna`` has joined #commonlisp
qhong has joined #commonlisp
akoana has joined #commonlisp
oneeyedalien has quit [Quit: Leaving]
rainthree has quit [Quit: Leaving]
JuanDaugherty has quit [Quit: JuanDaugherty]
Akbar-Birbal has left #commonlisp [#commonlisp]
ym has joined #commonlisp
benjaminl has quit [Ping timeout: 260 seconds]
benjaminl has joined #commonlisp
mgl__ has joined #commonlisp
<pkw>
I am going to try the transducer library next. I have used them in clojure and they seem pretty cool.
wacki has joined #commonlisp
McParen has left #commonlisp [#commonlisp]
mgl__ has quit [Ping timeout: 248 seconds]
spdegabrielle has quit [Quit: Connection closed for inactivity]
awlygj has quit [Quit: leaving]
<aeth>
package-inferred-system seems to work increasingly well the more massive your system is (well, "systems" at this point)
<aeth>
which doesn't seem too common in Common Lisp
<aeth>
it is useful in my game engine (they're just inherently large things); it is not particularly useful elsewhere where I've used it.
<pranav>
What's your game engine aeth?
<aeth>
oh I don't like sharing it because it takes a very long time to do anything
<aeth>
and the internet does not move at that pace
<pranav>
I see.
amb007 has quit [Ping timeout: 276 seconds]
amb007 has joined #commonlisp
fitzsim has quit [Read error: Connection reset by peer]
simendsjo has quit [Ping timeout: 265 seconds]
kamafam has quit [Read error: Connection reset by peer]
mgl__ has joined #commonlisp
pve has quit [Quit: leaving]
Spawns_Carpeting has quit [Quit: ZNC 1.8.2+deb3.1+deb12u1 - https://znc.in]
ym has quit [Ping timeout: 255 seconds]
Spawns_Carpeting has joined #commonlisp
raynei has quit [Remote host closed the connection]
meaty has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 29.4]
char has joined #commonlisp
mgl__ has quit [Ping timeout: 255 seconds]
shka has quit [Ping timeout: 265 seconds]
wacki has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
akoana has quit [Quit: leaving]
alcor has quit [Ping timeout: 248 seconds]
char has quit [Ping timeout: 265 seconds]
char has joined #commonlisp
JuanDaugherty has joined #commonlisp
char has quit [Ping timeout: 252 seconds]
mwnaylor has quit [Ping timeout: 260 seconds]
amb007 has quit [Ping timeout: 244 seconds]
JuanDaugherty has quit [Quit: JuanDaugherty]
yitzi has quit [Remote host closed the connection]