freenode/#lisp - IRC Chatlog
Search
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
16:43:03
zmagii
beach: I have file.lisp opened in Emacs, it shows SLIME in the status bar. How can I run the code?
16:45:45
beach
So you can do (load "file.lisp") and then evaluate calls to functions defined in the file.
17:02:24
dbotton
Is it valid in a let* to rebind same symbol multiple times, ie (let* ((a 5) (a 4))) ?/
17:06:18
dbotton
So if I create a CLOS object then rebind the variable it will persist till end of scope
17:07:55
pranavats
A let* is equivalent to nested lambdas with variable names as an argument and applied to their values.
17:09:41
deselby
OpusModus Convention, second day streaming now! https://www.youtube.com/watch?v=2wqU8Ki622M
17:10:20
pranavats
dbotton: Where ... represents the body. So yes, a would still be bound to 5 in the outer lambda.
17:22:07
beach
dbotton: That's not clear. If the first binding is never used, the compiler can remove it, and then the GC can reclaim the object.
17:25:02
pranavats
dbotton: Then maybe it's preferable to just use nested let forms and make sure to use the shadowed binding in the outer let.
17:26:31
Alfr_
dbotton, why do you not want that thing to be collected in the first place? It's quite an unusual ask, if you ask me.
17:26:45
dbotton
Here is code snip - https://github.com/rabbibotton/clog/blob/main/tutorial/09-tutorial.lisp
17:33:12
Alfr_
dbotton, your (create-form-element f1 :submit :value "OK") might get collected, like beach said.
17:38:05
dbotton
The actual Lisp side after creating the elements on the browser side are not needed. In fact unless I actually need to set a property or event or need request a property value the Lisp side no longer matters
17:38:39
nwoob
mfiano: I commented out loading of theme in .emacs and now without theme syntax highlighting loooks like this https://ibb.co/nsHt6SV
17:40:32
Alfr_
dbotton, you may wish to have a look at LTK's with-widget macro. I think it deals with the same problem for using tcl/tk.
17:45:15
beach
"standard object" is what you typically get when you instantiate a class defined using DEFCLASS.
17:57:56
shka_
but thing with CL (or any other lisp, really) is that there is barely a syntax to highlight
17:58:13
charles`
rainbow delimiters (not default faces) greatly enhance syntax highlighting for lisp
18:00:33
charles`
the problem with highlighting builtin functions is the almost everything becomes highlighted. there is nothing to differentiate, builtin macros like loop, if, and let should be highlighted
18:01:29
shka_
after years of programming i just accepted that I am getting information overload way quicker then i would like to admit
18:12:13
nwoob
shka_: so if I want to look for documentation of a particular buitin function how do i do that inside emacs?
18:16:44
scymtym
SLIME has C-c C-d h for looking up symbols in the specification. more generally, C-c C-d KEY looks up different things in the specification
18:17:52
scymtym
shka_: McCLIM got *support for icons*. your are probably just seeing the default one
18:22:25
scymtym
shka_: based on https://techfak.de/~jmoringe/presentation-clouseau/slides.html#/slide-slide%3Anames
18:28:00
charles`
it seems that basically you want all functions to be colored, and all non function symbols to be colored a different color
18:32:39
charles`
I believe that is what you are going to need. You will need regexes to identifiy all macro forms where you can define variable, let, destructuring bind, multiple value bind, loop and select variable names, then a regex to select function names, maybe also in flet and labels
18:35:04
charles`
You can use M-x regex-builder to test the regex since emacs-lisp regex is not pcre
20:33:48
xificurC
Reading the iterate docs I hit into this: "There is one crucial difference between using a the form and actually declaring the variable: explicit declarations are always placed in the generated code, but type information from a the form is not turned into an actual declaration unless you tell iterate to do so using iterate:declare-variables". What
20:43:14
Alfr_
xificurC, (iter (for (the fixnum i) :below 7)) would not expand to something declaring i to be a fixnum, whereas (iter (for (the fixnum i) :below 7) (declare (iterate:declare-variables))) would.
20:47:09
Alfr_
xificurC, but in iterate's case the iterate macro walks its body forms and in some places treats the THEs specially, mainly providing appropriate initial values instead of nil and declaring the types.
20:47:53
xificurC
Alfr_ yes I read that but didn't completely grok it. Re-reading the fourth time it seems to suggest it is merely a type-check, but if the type doesn't match the consequences are undefined
20:52:04
Alfr_
xificurC, the special operator is more like a promise to the compiler that what form returns is of that type. I don't think there's a requirement to type check. And yes, it's ub when you break your promises.
20:52:33
aeth
xificurC: afaik, in general, THE counts as a type declaration of sorts and so should behave similarly to DECLARE. It will check, ignore, or assume the type. Only the last one is problematic.