freenode/#lisp - IRC Chatlog
Search
3:37:48
charles`
flip214: by ignore package nickname I didn't mean "not have to type it", I meant "change the package definition to not have a nickname without changing the source code" and before or while ASDF is loading it.
3:42:04
fiddlerwoaroof
I _believe_ there's an ASDF extension somewhere that has some sort of file-local package nicknames
3:46:22
fiddlerwoaroof
But, I don't know the context, so I'm not sure what the best thing to tell you is
3:48:37
charles`
basically I have two packages that have names CL-BASE64 and BASE64; I need both because they are dependencies for different dependencies. CL-BASE64 has nickname BASE64. I just need to remove that.
3:52:49
fiddlerwoaroof
I'd be inclined to force one system in this case and then add a bit of code to emulate the other one to the BASE64 package
3:53:58
charles`
It isn't that simple. cl-base64 and base64 have differently named functions and cl-base64 has some functions that base64 doesn't have at all
3:54:51
fiddlerwoaroof
Yeah, what I'm thinking is take the one with the more complicated to implement function, and then write your own code to implement the missing names
3:59:23
charles`
so track down the package that is using it as a dependency and tell them that they should use a different package
3:59:25
fiddlerwoaroof
The problem is that their transitive dependencies, which means you'd have to figure out how to modify the dependency list
3:59:57
charles`
wouldn't I have to modify the package that uses base64 as a dependency to use cl-base64 functions
4:03:21
fiddlerwoaroof
load cl-base64 first, delete the package nickname using normal lisp code and then load your own system
4:04:23
fiddlerwoaroof
I'm actually surprised this happens, I thought quicklisp requires that all systems be loadable in the same image
4:05:06
charles`
they can load just fine. I just have to enter the debugger and manually ignore the BASE64 nickname
4:05:54
charles`
also perhaps the problematic nickname was added after already being added to quicklisp
4:09:45
fiddlerwoaroof
This is really why package nicknames should not be used in libraries, especially generic terms like "base64"
4:13:20
aeth
"unique nickname" would be a bit of a contradiction because it doesn't scale to large communities, but reasonable nicknames could work
4:15:51
fiddlerwoaroof
aeth: I'd generally say, if you're writing an application, use global nicknames as much as you want
4:16:10
fiddlerwoaroof
Where application is defined as "code not intended to be used as the dependency of another system"
4:16:35
aeth
An example of a reasonable nickname would be e.g. firefox for firefox-browser or something like htat, although that's an application.
4:17:19
aeth
And the larger the framework/engine, the more likely it will behave like an "application" by your view, though, imo
4:20:16
fiddlerwoaroof
As long as your dependencies obey the contract of "not defining package nicknames"
4:22:29
aeth
fiddlerwoaroof: I'd argue that a game engine would be wrong to use "game" and a web framework would be wrong to use "web"... however, they could in their documentation (or even in a project autogenerator) use that as the default for the *user* and *their* project, rather than for a library.
4:23:08
aeth
Although I guess you might want to run several websites or several game servers together in one image.
4:36:26
fiddlerwoaroof
What I mean by "end user" is "system that is never depended on by any other systems"
4:40:26
beach
There is not much to understand. It's just a protocol with a bunch of generic functions that look like the standard ones, but with an additional environment parameter, so find-class, find-package, fdefinition, etc.
4:40:49
aeth
You'd ideally want first-class global environments if you want to run multiple server things of the same type (games, websites, app servers, etc.) on one image
4:41:20
aeth
Otherwise, there are too many global variables in the language to be sure that they won't interfere with each other in unexpected ways.
4:42:32
beach
Is this going to be a "Let's define an improved version of Common Lisp with fewer global variables" discussion?
4:45:59
fiddlerwoaroof
beach: I'd rather just define a way to "fork" the common lisp environment so that changes in one part can't directly affect changes in the other
4:46:19
fiddlerwoaroof
The only thing you'd need then is a protocol to pass data between the two sides
4:48:22
fiddlerwoaroof
Docker containers are just namespaces for all the global resources: PIDs, ports, etc.
4:48:36
aeth
beach: No. You don't need to remove the globals if you have different global environments so COMMON-LISP:*FOO* can refer to different things depending on the environment.
4:48:45
fiddlerwoaroof
Most of them bundle an entire OS image inside the namespace, but there's no necessity for that
4:49:08
aeth
It already can refer to different things depending on the thread in most implementations... so my concern probably isn't as big of a problem as I think.
4:49:27
fiddlerwoaroof
A docker container can be a single executable, as long as it has no dependencies
4:52:33
charles`
fiddlerwoaroof: in your example you used SB-KERNEL:SIMPLE-PACKAGE-ERROR. isn't that specific to sbcl? is there a portable way?
4:58:26
fiddlerwoaroof
It might be cleaner to have a system :cl-base64-patch that depends on cl-base64 and has a single file, that clears the nickname
4:59:20
fiddlerwoaroof
Or fork cl-base64 to local-projects and modify it (which is what I usually do)
5:04:40
charles`
patch method doesn't work for me because I'm not using cl-base64 it is another dependency that is using it
5:55:03
charles`
I've found that the path of least resistance is to not use the library that depends on base64
5:56:07
charles`
I still think, as a community, something should be done about cl-base64, not only does it use a generic nickname, the git repository and maintainer are not accessible.
6:17:16
beach
charles`: The only way that will happen is if someone decides to work on it. There is no community decision process that will make it happen in any other way.
6:18:57
fiddlerwoaroof
charles`: my suggestion would still work, you just have to put the system that depends on cl-base64 as the dependency of the system with the patch
6:20:26
aeth
charles`: or create a superior library with a compatible API and get the library that uses cl-base64 to switch
9:12:36
beach
OK, so here is some food for thought to break the silence... How hard would it be to create a Linux/BSD/whatever "desktop" in Common Lisp?
9:12:37
beach
That would involve the window manager (we have two of those I think), a workspace manager, and a bunch of little gadgets like the volume control and stuff like that. And could it be done incrementally, so that one could gradually replace existing gadgets?
9:13:35
beach
I am asking because I am tired of the existing "desktops" and I don't see myself improving them, given the language used.
9:16:05
beach
But either way, the display server would have to be isolated from the rest so that it could be easily replaced.
9:17:37
mfiano
No, infact he recommends people to use other libraries, as cl-who has a lot of bugs and he can't recommend using it (from an email discussion I had with him a few years ago), which is why his book, Common Lisp Recipes, recommends alternatives.
9:38:53
ralt
beach: stumpwm is clearly the one that has a community. writing new modules is not too hard.
9:40:26
beach
Thanks. I don't see the volume control as a contributed module of the window manager, though. Am I wrong?
9:41:25
beach
ralt: No I meant, is the window manager the right place for such a module? I wouldn't think so.
9:44:38
ralt
an example I like is pinentry support: https://github.com/stumpwm/stumpwm-contrib/tree/master/util/pinentry
9:45:44
ralt
it starts a server in a thread, and whenever gpg-agent or ssh-agent is trying to grab a key, it hits that server, which draws a new x11 window to ask for your password, and replies to gpg/ssh-agent
9:49:09
pranavats
beach: There's also EXWM which allows one to manage X windows using Emacs, in case you are interested in extending "desktop" using Elisp.
9:52:34
beach
So if everything is done with the keyboard, how do I get applications like the one that lets me slide little pictures of my monitors to determine their relative position? I think I am saying that I am not sure that all mouse-based applications should be banned.
10:00:30
frodef
Spinner apparently won't do the syntax ((:sometag :someattr value) <content>), only (:sometag :someattr value <content>), which means source code formatting/indenting is not great at all...
10:27:12
VincentVega
Hi, all! Is there a way define a setf which would work like this https://pastebin.com/bB8kHwSu ? I was thinking of defining a slot named approximate-x but that seems hackish since I don't really need an extra slot, just the setf capability.
10:31:47
flip214
Is there an easier way than my own DEFCLASS* so that the accessors by default modify an object referenced by a special variable? Like with HUNCHENTOOT:HEADERS-IN* and similar.
10:35:07
flip214
they read and write _a_ class instance still, just a "default" instance if none is given
10:35:48
shka_
i wonder though, would it be possible to run every application in the same lisp process?
10:37:05
flip214
https://github.com/edicl/hunchentoot/blob/d684a9002665ca91477e98a5c777ead202c14306/request.lisp#L399
11:09:32
flip214
devon: can you make it a symbol-macro that expands to a SETF clause that you can trace or just define to an (ERROR ...) clause?
11:22:44
jackdaniel
shka_: something like this? https://files.mastodon.social/media_attachments/files/105/340/120/234/953/787/original/5754ea8397d70ba2.mp4
11:23:18
jackdaniel
n.b there is "clim window manager", it is called doors. I haven't used it myself though
11:24:00
jackdaniel
there is a warning, that it is still a sketch, but I saw a video and it seems to work