unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Stumpwm & using Lisp in guix - particularly quicklisp
@ 2022-12-24  9:45 Paul Jewell via
  2022-12-24 21:20 ` Trev
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Paul Jewell via @ 2022-12-24  9:45 UTC (permalink / raw)
  To: help-guix@gnu.org

Good morning Guix,

I have a working stumpwm config which I use on my desktop gentoo 
installation, and I want to use the same configuration file under guix. 
Unfortunately I run into a problem as when stumpwm starts, it complains 
it can't find package "ql". Quicklisp is installed in my user home 
directory, but this is clearly not being seen by stumpwm. I also note 
that packages I can install through quicklisp are also packaged in guix 
(e.g. alexandria). When I start sbcl in a terminal, everything works as 
expected, and quicklisp is seen.

This leads me to some questions:

  * How do I configure stumpwm on my system so it looks in my home
    directory, and observes my .sbclrc file when starting?
  * What is the guix recommended way for working with lisp packages?
    Should I avoid using quicklisp, and instead use the provided
    packages in guix? I am unable to find any documentation (either
    official or blog posts etc) explaining this.

Many thanks!

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Stumpwm & using Lisp in guix - particularly quicklisp
  2022-12-24  9:45 Stumpwm & using Lisp in guix - particularly quicklisp Paul Jewell via
@ 2022-12-24 21:20 ` Trev
  2022-12-25  4:29 ` Felix Lechner via
  2022-12-25  7:41 ` Trev
  2 siblings, 0 replies; 8+ messages in thread
From: Trev @ 2022-12-24 21:20 UTC (permalink / raw)
  To: Paul Jewell, help-guix@gnu.org

[-- Attachment #1: Type: text/plain, Size: 2823 bytes --]

Paul Jewell via <help-guix@gnu.org> writes:

> Good morning Guix,
>
> I have a working stumpwm config which I use on my desktop gentoo 
> installation, and I want to use the same configuration file under guix. 
> Unfortunately I run into a problem as when stumpwm starts, it complains 
> it can't find package "ql". Quicklisp is installed in my user home 
> directory, but this is clearly not being seen by stumpwm. I also note 
> that packages I can install through quicklisp are also packaged in guix 
> (e.g. alexandria). When I start sbcl in a terminal, everything works as 
> expected, and quicklisp is seen.
>
> This leads me to some questions:
>
>   * How do I configure stumpwm on my system so it looks in my home
>     directory, and observes my .sbclrc file when starting?
>   * What is the guix recommended way for working with lisp packages?
>     Should I avoid using quicklisp, and instead use the provided
>     packages in guix? I am unable to find any documentation (either
>     official or blog posts etc) explaining this.
>
> Many thanks!

I have no experience with quicklisp and am new to Common Lisp in
general, but I do use guix and am getting happier with every hack I make
on stumpwm and I can tell you what has worked for me:

1. Use the supported asdf system that Guix uses to package lisp programs
and extensions.

2. Install your stumpwm, repl & extensions in the same profile, be that
profile your system or your home/user space.  This helps a sbcl find
everything.

3. If you want some divergent profile to pick up all the bits from your
system or home profile, make sure to include them all in that divergent
profile.  An example of this is I used to have stumpwm in my root system
because I wanted GDM/convenience.  I then wanted all other related 3rd
party scripts to be contained in my home profile.  To make this work I
had to declare all the same dependencies in my home profile as I had my
root system.

The source code is your best friend for learning how to
package/implement the asdf build system.  You can also check the
documentation for build systems in general:
https://guix.gnu.org/manual/devel/en/html_node/Build-Systems.html

For the most part I have been able to find everything I needed from the
official guix repository.  I have contributed back the things I could
not find wherever it seemed appropriate.  For everything else, I have my
own personal guix channel.  I do this to avoid the need for activating
guix shell over and over again.

I get that quicklisp is an expected way to manage 3rd party packages for
Common Lisp but after years of working with NPM & JavaScript, the idea
of quicklisp turns me off.  Rant over, I hope this helped!


-- 

Trev : 0FB7 D06B 4A2A F07E AD5B  1169 183B 6306 8AA1 D206

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 251 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Stumpwm & using Lisp in guix - particularly quicklisp
  2022-12-24  9:45 Stumpwm & using Lisp in guix - particularly quicklisp Paul Jewell via
  2022-12-24 21:20 ` Trev
@ 2022-12-25  4:29 ` Felix Lechner via
  2022-12-25  7:16   ` Paul Jewell via
  2022-12-25  7:41 ` Trev
  2 siblings, 1 reply; 8+ messages in thread
From: Felix Lechner via @ 2022-12-25  4:29 UTC (permalink / raw)
  To: Paul Jewell; +Cc: help-guix@gnu.org

Hi Paul,

On Sat, Dec 24, 2022 at 1:46 AM Paul Jewell via <help-guix@gnu.org> wrote:
>
> I want to use the same configuration file under guix.
> Unfortunately I run into a problem as when stumpwm starts, it complains
> it can't find package "ql".

I have used StumpWM with simple configurations. I used only CL modules
that were declared as prerequisites to StumpWM as it is packaged in
Guix.

StumpWM probably cannot see the Quicklisp packages you installed in
your home directory (and maybe also not those in your home profile)
because Guix generally uses absolute paths to make prerequisites
available to software like StumpWM.

It means you may have to jump through some hoops to use additional
prerequisites in a configuration that is loaded dynamically. In the
past, I have provided updated package definitions to myself for that
purpose. This is an area with which I am not very familiar, but the
restrictions you are experiencing make sense to me and also match my
own experience.

It's worthwhile to note that GNU Guile, on which Guix is based, was
originally conceived as an extension language that would provide
dynamic configuration modules to C programs. [1]

Somehow our functional package manager rendered one of Guile's
original design goals incompatible with Guix—but upon reflection I
probably would not want it any other way.

Sorry I cannot be more helpful.

Kind regards
Felix Lechner

[1] https://www.gnu.org/software/guile/docs/guile-tut/tutorial.html#Backend


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Stumpwm & using Lisp in guix - particularly quicklisp
  2022-12-25  4:29 ` Felix Lechner via
@ 2022-12-25  7:16   ` Paul Jewell via
  0 siblings, 0 replies; 8+ messages in thread
From: Paul Jewell via @ 2022-12-25  7:16 UTC (permalink / raw)
  To: Felix Lechner; +Cc: help-guix@gnu.org

Hi Felix,

Thanks for the response!

On 25/12/2022 04:29, Felix Lechner wrote:
> Hi Paul,
>
> On Sat, Dec 24, 2022 at 1:46 AM Paul Jewell via <help-guix@gnu.org> wrote:
>> I want to use the same configuration file under guix.
>> Unfortunately I run into a problem as when stumpwm starts, it complains
>> it can't find package "ql".
> I have used StumpWM with simple configurations. I used only CL modules
> that were declared as prerequisites to StumpWM as it is packaged in
> Guix.

I have now added the relevant quicklisp packages via guix in my system 
configuration file, and they are all loading correctly. I am still 
getting an error with SB-CLTL2 which didn't go away when I added 
sbcl-trivial-cltl2 to my configuration - I am still looking for this 
solution (i.e. - trying to identify which package I need to add to 
satisfy this requirement!).

> StumpWM probably cannot see the Quicklisp packages you installed in
> your home directory (and maybe also not those in your home profile)
> because Guix generally uses absolute paths to make prerequisites
> available to software like StumpWM.

That makes sense.

> It means you may have to jump through some hoops to use additional
> prerequisites in a configuration that is loaded dynamically. In the
> past, I have provided updated package definitions to myself for that
> purpose. This is an area with which I am not very familiar, but the
> restrictions you are experiencing make sense to me and also match my
> own experience.

I am keen to get my guix system into a state where I can adopt it fully 
on my laptop. I find the documentation quite terse though when it comes 
to explaining how guix does things. As a reference, I have no 
complaints, but when you start off I find it explains how to do 
something (often with several variants), but not why. Starting with 
someone else's configuration initially was probably more of a hindrance 
than a help, but I am past that now.

Once I get everything as I like it, I think I will make a patch to fill 
out the stumpwm section in the cookbook so others can find their way in 
more easily.

Best regards,
Paul




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Stumpwm & using Lisp in guix - particularly quicklisp
  2022-12-24  9:45 Stumpwm & using Lisp in guix - particularly quicklisp Paul Jewell via
  2022-12-24 21:20 ` Trev
  2022-12-25  4:29 ` Felix Lechner via
@ 2022-12-25  7:41 ` Trev
  2022-12-25  8:05   ` Paul Jewell via
  2 siblings, 1 reply; 8+ messages in thread
From: Trev @ 2022-12-25  7:41 UTC (permalink / raw)
  To: Paul Jewell, help-guix@gnu.org

Paul Jewell via <help-guix@gnu.org> writes:

> Good morning Guix,
>
> I have a working stumpwm config which I use on my desktop gentoo 
> installation, and I want to use the same configuration file under guix. 
> Unfortunately I run into a problem as when stumpwm starts, it complains 
> it can't find package "ql". Quicklisp is installed in my user home 
> directory, but this is clearly not being seen by stumpwm. I also note 
> that packages I can install through quicklisp are also packaged in guix 
> (e.g. alexandria). When I start sbcl in a terminal, everything works as 
> expected, and quicklisp is seen.
>
> This leads me to some questions:
>
>   * How do I configure stumpwm on my system so it looks in my home
>     directory, and observes my .sbclrc file when starting?
>   * What is the guix recommended way for working with lisp packages?
>     Should I avoid using quicklisp, and instead use the provided
>     packages in guix? I am unable to find any documentation (either
>     official or blog posts etc) explaining this.
>
> Many thanks!

I have no experience with quicklisp and am new to Common Lisp in
general, but I do use guix and am getting happier with every hack I make
on stumpwm and I can tell you what has worked for me:

1. Use the supported asdf system that Guix uses to package lisp programs
and extensions.

2. Install your stumpwm, repl & extensions in the same profile, be that
profile your system or your home/user space.  This helps a sbcl find
everything.

3. If you want some divergent profile to pick up all the bits from your
system or home profile, make sure to include them all in that divergent
profile.  An example of this is I used to have stumpwm in my root system
because I wanted GDM/convenience.  I then wanted all other related 3rd
party scripts to be contained in my home profile.  To make this work I
had to declare all the same dependencies in my home profile as I had my
root system.

The source code is your best friend for learning how to
package/implement the asdf build system.  You can also check the
documentation for build systems in general:
https://guix.gnu.org/manual/devel/en/html_node/Build-Systems.html

For the most part I have been able to find everything I needed from the
official guix repository.  I have contributed back the things I could
not find wherever it seemed appropriate.  For everything else, I have my
own personal guix channel.  I do this to avoid the need for activating
guix shell over and over again.

I get that quicklisp is an expected way to manage 3rd party packages for
Common Lisp but after years of working with NPM & JavaScript, the idea
of quicklisp turns me off.  Rant over, I hope this helped!

-- 

Trev : 0FB7 D06B 4A2A F07E AD5B  1169 183B 6306 8AA1 D206


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Stumpwm & using Lisp in guix - particularly quicklisp
  2022-12-25  7:41 ` Trev
@ 2022-12-25  8:05   ` Paul Jewell via
  2022-12-25 18:39     ` Trev
  2022-12-26 14:14     ` Paul Jewell via
  0 siblings, 2 replies; 8+ messages in thread
From: Paul Jewell via @ 2022-12-25  8:05 UTC (permalink / raw)
  To: Trev, help-guix@gnu.org

Hi Trev,

Thanks for the reply!

On 25/12/2022 07:41, Trev wrote:
> Paul Jewell via <help-guix@gnu.org> writes:
>
>> Good morning Guix,
>>
>> I have a working stumpwm config which I use on my desktop gentoo
>> installation, and I want to use the same configuration file under guix.
>> Unfortunately I run into a problem as when stumpwm starts, it complains
>> it can't find package "ql". Quicklisp is installed in my user home
>> directory, but this is clearly not being seen by stumpwm. I also note
>> that packages I can install through quicklisp are also packaged in guix
>> (e.g. alexandria). When I start sbcl in a terminal, everything works as
>> expected, and quicklisp is seen.
>>
>> This leads me to some questions:
>>
>>    * How do I configure stumpwm on my system so it looks in my home
>>      directory, and observes my .sbclrc file when starting?
>>    * What is the guix recommended way for working with lisp packages?
>>      Should I avoid using quicklisp, and instead use the provided
>>      packages in guix? I am unable to find any documentation (either
>>      official or blog posts etc) explaining this.
>>
>> Many thanks!
> I have no experience with quicklisp and am new to Common Lisp in
> general, but I do use guix and am getting happier with every hack I make
> on stumpwm and I can tell you what has worked for me:
>
> 1. Use the supported asdf system that Guix uses to package lisp programs
> and extensions.
>
> 2. Install your stumpwm, repl & extensions in the same profile, be that
> profile your system or your home/user space.  This helps a sbcl find


I have now gone down this path, and nearly everything is working as 
expected. The only problem I am tripping up with is sbcl-slime-swank is 
trying to (require 'sb-cltl2) and failing, even though I have added 
sbcl-trivial-cltl2 to my system configuration. It seems I am not the 
only person who has tripped over this issue, although the previous 
message thread [1] didn't link the problem to sbcl-slime-swank. When I 
comment out the code in my configuration which adds swank, I am up and 
running.

This is what I have included in my system configuration:

"stumpwm"
"sbcl-cl-ppcre"
"sbcl-trivial-cltl2"
"sbcl-alexandria"
"sbcl-clx-xembed"
"sbcl-clx-truetype"
"sbcl-stumpwm-ttf-fonts"
"sbcl-stumpwm-swm-gaps"
"sbcl-stumpwm-stumptray"
"sbcl-slime-swank"

although having looked in the source for the package definition for 
stumpwm, some of these are superfluous.

Do you use sbcl-slime-swank in your configuration, and if so, did you 
come across this problem with cltl2?


[1] https://www.mail-archive.com/help-guix@gnu.org/msg13498.html



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Stumpwm & using Lisp in guix - particularly quicklisp
  2022-12-25  8:05   ` Paul Jewell via
@ 2022-12-25 18:39     ` Trev
  2022-12-26 14:14     ` Paul Jewell via
  1 sibling, 0 replies; 8+ messages in thread
From: Trev @ 2022-12-25 18:39 UTC (permalink / raw)
  To: Paul Jewell, help-guix@gnu.org

Paul Jewell <paul@teulu.org> writes:

> Hi Trev,
>
> Thanks for the reply!
>
> On 25/12/2022 07:41, Trev wrote:
>> Paul Jewell via <help-guix@gnu.org> writes:
>>
>>> Good morning Guix,
>>>
>>> I have a working stumpwm config which I use on my desktop gentoo
>>> installation, and I want to use the same configuration file under guix.
>>> Unfortunately I run into a problem as when stumpwm starts, it complains
>>> it can't find package "ql". Quicklisp is installed in my user home
>>> directory, but this is clearly not being seen by stumpwm. I also note
>>> that packages I can install through quicklisp are also packaged in guix
>>> (e.g. alexandria). When I start sbcl in a terminal, everything works as
>>> expected, and quicklisp is seen.
>>>
>>> This leads me to some questions:
>>>
>>>    * How do I configure stumpwm on my system so it looks in my home
>>>      directory, and observes my .sbclrc file when starting?
>>>    * What is the guix recommended way for working with lisp packages?
>>>      Should I avoid using quicklisp, and instead use the provided
>>>      packages in guix? I am unable to find any documentation (either
>>>      official or blog posts etc) explaining this.
>>>
>>> Many thanks!
>> I have no experience with quicklisp and am new to Common Lisp in
>> general, but I do use guix and am getting happier with every hack I make
>> on stumpwm and I can tell you what has worked for me:
>>
>> 1. Use the supported asdf system that Guix uses to package lisp programs
>> and extensions.
>>
>> 2. Install your stumpwm, repl & extensions in the same profile, be that
>> profile your system or your home/user space.  This helps a sbcl find
>
>
> I have now gone down this path, and nearly everything is working as 
> expected. The only problem I am tripping up with is sbcl-slime-swank is 
> trying to (require 'sb-cltl2) and failing, even though I have added 
> sbcl-trivial-cltl2 to my system configuration. It seems I am not the 
> only person who has tripped over this issue, although the previous 
> message thread [1] didn't link the problem to sbcl-slime-swank. When I 
> comment out the code in my configuration which adds swank, I am up and 
> running.
>
> This is what I have included in my system configuration:
>
> "stumpwm"
> "sbcl-cl-ppcre"
> "sbcl-trivial-cltl2"
> "sbcl-alexandria"
> "sbcl-clx-xembed"
> "sbcl-clx-truetype"
> "sbcl-stumpwm-ttf-fonts"
> "sbcl-stumpwm-swm-gaps"
> "sbcl-stumpwm-stumptray"
> "sbcl-slime-swank"
>
> although having looked in the source for the package definition for 
> stumpwm, some of these are superfluous.
>
> Do you use sbcl-slime-swank in your configuration, and if so, did you 
> come across this problem with cltl2?

At the time of my trying swank I ran into some problem that I now cannot
recall.  It was probably related to this.  I got about 5 minutes in and
tried stumpwm+slynk and emacs-sly instead.  That worked out of the box
for me and I have not looked back.

A shame since swank/slime seems like the "it thing" when it comes to CL
REPLs.  I had already spent so much time troubleshooting/debugging other
things that evening that I had no patience left for swank left.

FYI Sly has cat ascii art in the REPL.  This amuses me as it feels like
a whimiscal piece of João Távora that you otherwise do not see much of.

>
>
> [1] https://www.mail-archive.com/help-guix@gnu.org/msg13498.html
>

-- 

Trev : 0FB7 D06B 4A2A F07E AD5B  1169 183B 6306 8AA1 D206


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Stumpwm & using Lisp in guix - particularly quicklisp
  2022-12-25  8:05   ` Paul Jewell via
  2022-12-25 18:39     ` Trev
@ 2022-12-26 14:14     ` Paul Jewell via
  1 sibling, 0 replies; 8+ messages in thread
From: Paul Jewell via @ 2022-12-26 14:14 UTC (permalink / raw)
  To: help-guix


On 25/12/2022 08:05, Paul Jewell via wrote:
> I have now gone down this path, and nearly everything is working as 
> expected. The only problem I am tripping up with is sbcl-slime-swank 
> is trying to (require 'sb-cltl2) and failing, even though I have added 
> sbcl-trivial-cltl2 to my system configuration. It seems I am not the 
> only person who has tripped over this issue, although the previous 
> message thread [1] didn't link the problem to sbcl-slime-swank. When I 
> comment out the code in my configuration which adds swank, I am up and 
> running.
>
> This is what I have included in my system configuration:
>
> "stumpwm"
> "sbcl-cl-ppcre"
> "sbcl-trivial-cltl2"
> "sbcl-alexandria"
> "sbcl-clx-xembed"
> "sbcl-clx-truetype"
> "sbcl-stumpwm-ttf-fonts"
> "sbcl-stumpwm-swm-gaps"
> "sbcl-stumpwm-stumptray"
> "sbcl-slime-swank"
>
> although having looked in the source for the package definition for 
> stumpwm, some of these are superfluous.
>
> Do you use sbcl-slime-swank in your configuration, and if so, did you 
> come across this problem with cltl2?
>
>
> [1] https://www.mail-archive.com/help-guix@gnu.org/msg13498.html
>
>
OK, so I have fixed this problem, following on from the hints in the 
message thread linked above. I defined SBCL_HOME as an environment 
variable, and pointed it at /run/current-system/profile/lib/sbcl (since 
I installed sbcl and stumpwm in the system configuration). I am not sure 
if the requirement to do this means there is a issue somewhere in 
sbcl-slime-swank which means it doesn't find sb-cltl2 (from 
sbcl-trivial-cltl2). I tried adding sbcl-trivial-cltl2 as an input, but 
this didn't resolve the problem, and I don't have enough guix knowledge 
yet to explore further.




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-12-26 14:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-24  9:45 Stumpwm & using Lisp in guix - particularly quicklisp Paul Jewell via
2022-12-24 21:20 ` Trev
2022-12-25  4:29 ` Felix Lechner via
2022-12-25  7:16   ` Paul Jewell via
2022-12-25  7:41 ` Trev
2022-12-25  8:05   ` Paul Jewell via
2022-12-25 18:39     ` Trev
2022-12-26 14:14     ` Paul Jewell via

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).