libera/#commonlisp - IRC Chatlog
Search
14:00:57
rotateq
I don't know how it's about you, but I often realized with myself how much the urge of perfection can be a curse. :/
14:13:39
Equill
rotateq: I feel it. Took a *lot* of work to get myself to internalise that "good enough" really can be.
14:16:18
Equill
It probably helped when I looked at the quest for perfection as an asymptote, and realised that it's often a question of when the delta is small enough. It wasn't much of a step from there to think in more practical terms, and realise that the smart approach is to accept "good enough" as when the delta is small enough that your *customers* don't notice or care about the difference.
14:17:42
Equill
I concluded that perfection should always be what you *aim* for, but it's not only OK to not reach it, but it should be a pleasant surprise when you actually do.
14:18:32
rotateq
But I often feel like I can't ever understand many things *really* deeply and that frustrates me too.
14:20:24
Equill
Again, it's a case of accepting that there just isn't enough time to understand everything as deeply as you feel you should. Then it's a question of how deep it's worth diving down any given rabbit-hole.
14:20:44
Equill
Then again, it's well enough for me to speak: I *still* have more hobbies than I have time for them :)
14:21:16
rotateq
Yes of course, as I can't prove everything in the kind of maths I do myself, or doing every physics experiment and and and ...
14:23:31
rotateq
I was wondering if the new James Webb telescope has again some CL running on it like the scheduling system on Hubble. But as I read they completely used "standardized" things by IBM.
14:24:56
rotateq
So the question still remains how they debug and reprogram parts that fail as it runs, like in the talk about "debugging from 60 million miles away" having a CL REPL on board to connect to.
14:32:13
pjb
rotateq: usually, it's just done by having two partitions. When there's a bug, they upload a new system image (or more probably in these cases, a patch to build a new system image) in the other partition, and reboot.
14:33:17
rotateq
I have no favorite Android system. ^^ But ok, could update my Lineage OS, my camera doesn't initialize since a few days now.
14:33:53
pjb
rotateq: of course, if the problem is just in a program, they may just upgrade the specific executable. They usually have persistent memory organized as a MS-DOS file system.
14:34:40
rotateq
Ah okay. Came across again at HAL/S, we talked about it some time ago and you told me it has the capability of reading 2D-equations. ^^
14:35:15
rotateq
As I heard even on FPGAs it's possible that they change parts of themselves as they run.
15:56:15
rotateq
It's so exhausting, one mentions "and with CLOS you missed really something more in getting the idea of OOP" and instantly it's called 'scary' and such. I shouldn't care.
15:59:14
rotateq
Then I looked and just thought: so when using :allocation :class for a slot it seems to be it, even with following a sane update protocol for all made instances.
16:37:13
phoe
Online Lisp Meeting #13 starting in 20 minutes: https://www.twitch.tv/TwitchPlaysCommonLisp
16:48:07
etimmons
exciting! I'm hoping to put together one in a couple months. (and would probably request this time as well)
17:44:40
minion
lisp123, memo from phoe: individual hash tables for functions will be faster and individual caches can be easily removed this way
17:46:50
lisp123
My latest theory is that the expressivity and freedom offered by Lisp (by providing building blocks that can be combined vs. a restrictive dogmatic language like others) makes it difficult for many to program in
17:47:31
lisp123
And that's one of the reasons why other languages became more popular. They are "easier" to get something done - whereas there seems to a curse in lisp where many keep striving for perfection
17:48:10
lisp123
(well at least for me - i feel some times I'm spinning wheels and not progressing fast enough)
17:48:56
cage
dbotton: found them! Seems a very nice project CLOG, thanks for writing it and showing to us :)
17:49:23
phoe
The Common Lisp Omnificent GUI - Online Lisp Meeting #13, 11.01.2022 - https://youtu.be/SeYK7Id3cd8 + https://youtu.be/pkQ-WlzQudw
17:51:13
cage
dbotton: i wonder if was possible to attach clog lambda function (so to say) to canvas event (like mouse clicking)
17:52:53
sveit_
hi. I am confused about inheritance of metaclasses, and I was wondering if someone could explain what is going on. More specifically, the following code gives an error in SBCL:
17:53:09
sveit_
(defclass a () () (:metaclass closer-mop:funcallable-standard-class)) (defclass b (a) ()) (make-instance 'b)
17:53:50
sveit_
the definition of class b seems clear, what is the "right" way to fix this and make b inherit the metaclass as well? and why does it not do so "automatically"?
17:55:10
phoe
I was curious if there is some way to automatically inject the proper metaclass based on stuff like in https://github.com/phoe-trash/value-semantics-utils/blob/main/src/always-bound-class.lisp#L20-L33
17:55:41
Equill
lisp123win: you may have a point there. I've seen senior Java developers look *scared* at the mention of Lisp. I suspect the fear of freedom (and the responsibility of choice that comes with it) is a factor. But I've also come to see functional and procedural/imperative programming as transform-oriented and register-oriented respectively, and the underlying mindsets are just wildly different.
17:55:54
sveit_
i see. if you don't mind, can you explain (1) the rationale behind such a decision and (2) can I signal to some part of MOP that when inheriting from 'a one should inherit the metaclass?
17:56:47
Equill
Some people are just much more comfortable with the idea of rephrasing the problem to suit the machine, than phrasing it in terms of what you do to the data on its way through.
17:57:56
dbotton
cage yes and no, the canvas is just a bitmap so there are limits to what you can do out of the box.
17:58:05
yitzi
sveit_: I don't think that the metaclass has to be the same, just compatible according to validate-superclass.
17:58:27
phoe
;; Equill: whereas lisp people are comfortable with doing both, always at the same time, while also adding tons of abstractions along the way
17:58:52
jackdaniel
yitzi: but the expectation here is that sveit_ want's to make an instance of funcallable-standard-class, not standard-class
17:59:40
Equill
Less imperative than it used to be, but that's more to do with switching from cl-who to html-template :)
18:00:49
jackdaniel
sveit_: I can't speak on behalf of the standard authors, but I rationalize it this way, that when the reader sees (defclass foo …) they assume standard class
18:01:44
sveit_
yitzi, jackdaniel: yes, jackdaniel is right with what I want; (defclass a () () (:metaclass closer-mop:funcallable-standard-class)), and inheriting from 'a means your metaclass becomes closer-mop:funcallable-standard-class (and in general 'a metaclass)
18:01:49
Bike
sveit_: for one thing, the metaclass can affect the way inheritance works. the system can't be sure what classes a new class inherits from until it knows the metaclass and makes an instance of it.
18:02:21
Equill
phoe: I love having macros available for when I need to call on them, but apparently I just don't build anything big enough to actually need them.
18:02:44
lisp123
Equill: I did A LOT of Microsoft Excel (5 - 10 years daily), which is not a programming language in any way, but it made "transform-oriented" much more natural to me. So Lisp felt natural from day 1 and since I dislike too much of an imperative style
18:02:55
Bike
e.g. just yesterday phoe sent me some code with a metaclass that made it so that (defclass foo () ... (:metaclass ...)) would result in foo inheriting from a FOO-OBJECT class instead of STANDARD-OBJECT
18:03:26
sveit_
I guess my case is also special since funcallable-standard-class seems to be a strict superset of standard-class, so it would not break anything to force children of b to have a's metaclass in this case. i suspect (given how big MOP seems to be, although i know very little of it) that somehow i can encode this fact
18:03:35
Equill
lisp123win: that makes sense. And it _is_ programming, just in more of a declarative idiom. But you also have my sympathy for having to spend so much time in it :)
18:04:10
Bike
although i guess by superset you mean that it seems to be standard-class with some extra stuff
18:04:43
Bike
under the hood, this is not necessarily the case; a standard instance (i.e. instance of a standard-class) may be represented differently and incompatibly from a funcallable standard instance
18:05:20
sveit_
Bike: exactly, so in this case it seems (and in my case it is essential) that inheriting from 'a (i.e. being a subclass of 'a) means your metaclass becomes that of 'a (or a child of it's metaclass).
18:05:52
Bike
in this case it is important you keep the metaclass, yes. but as i mentioned above, it is not possible to determine inheritance before knowing the metaclass, in general.
18:07:05
Bike
also, even if that were not the case, you could have a situation with multiple inheritance in which the superclasses have different metaclasses.
18:07:44
lisp123
Equill: I actually don't mind it at all :-) What does suck is Microsoft's closed APIs so its very difficult to do anything significant programmatically outside of VBA
18:08:50
Equill
lisp123win: that was a pretty hostile design decision, but I'll spare you my grumbling about what they were like pre-Satya Nadella :)
18:08:50
sveit_
Bike: thanks, I understand the default behaviour better now. Is there a way to modify it in this case? :) of course I am also interested more generally if I can let MOP know some special precedence of metaclasses in special cases
18:09:52
lisp123
Equill: We are getting off topic, but its not much better these days. Today I tried renaming a file, but that feature is only available if I save on One Drive and not locally
18:11:38
Bike
sveit_: again, the usual procedure is that the system figures out the metaclass based on :metaclass or the default, and then makes an instance of it, passing in the specified list of direct superclasses. you're talking about doing it in the opposite order, and there's no way for the system to understand that it should do something different with the metaclass when it does that before dealing with the
18:11:53
Bike
sveit_: easy way out is to define a macro that does defclass with a :metaclass specified for you.
18:13:11
jackdaniel
(defmacro define-class (name super &rest args) `(defclass ,name ,super ,@args (:metaclass ,(class-name (class-of (find-class (first super)))))))
18:22:14
pl
There was even in older days a lisper here who used ECL to build commercial, custom Excel extensions with those APIs
18:26:04
sveit_
Bike: i would have guessed there would be a more "CLOSY" way of doing it by specializing initialize-instance with an :around method or something of the sort.
18:28:55
Bike
sveit_: but like, what would you be initializing? the new class. and in order to make the new class, you need to know its class, i.e. the metaclass.
18:29:42
jackdaniel
and check for the key metaclass, if not supplied then you may change the default value
18:30:11
jackdaniel
that said you'd need to specialize on something, and as bike says, the class is already a metaobject (or nil)
18:30:51
jackdaniel
when it is nil then you can't really specialize, when it is /something/ then what you are doing is redefining the class, so that's not a good way of doing things
18:38:26
sveit_
I see, thanks for the explanation. that's too bad, it seems a bit inelegant from the design perspective (surely /sometimes/ it makes sense to inherit the metaclass, and from my perspective it seems actually that if one is inheriting from some non-standard metaclass almost always you want to either have the same or a child metaclass of at least one of the parents)
22:08:00
etimmons
I was going to merge #56, but Travis doesn't seem to be running (and it doesn't look like it ran on the latest master commit either)
22:23:36
etimmons
I don't see any reason the rebase would have changed that, but I'll double check the tests locally before merging
22:30:03
fe[nl]ix
at this point, I'm inclined towards switching to Github actions, but I need to work on a way to setup CI easily on Github
22:40:38
etimmons
I realized I pointed you at 40ants/ci earlier. But An easier place to start might be https://github.com/40ants/setup-lisp
22:42:37
etimmons
It uses Roswell, which I have feelings about. But might be a good starting point if you're looking to do things the GitHub way and want to make a custom action