summaryrefslogtreecommitdiffstats
path: root/2024/talks/mcclim.md
blob: 0f64f1bda4a790c8407d1840cb84f6d2a806088d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
[[!meta title="Elisp and McCLIM"]]
[[!meta copyright="Copyright © 2024 screwlisp"]]
[[!inline pages="internal(2024/info/mcclim-nav)" raw="yes"]]

<!-- Initially generated with emacsconf-publish-talk-page and then left alone for manual editing -->
<!-- You can manually edit this file to update the abstract, add links, etc. --->


# Elisp and McCLIM
he or e/em/eir (Spivak, male and neuter pronouns are fine) - IRC: screwlisp, Mastodon: @screwtape@mastodon.sdf.org liberachat: screwlisp MOO: lambda.moo.mud.org Name: screwtape Moo mail preferred

[[!inline pages="internal(2024/info/mcclim-before)" raw="yes"]]

The gist is demoing using McCLIM common lisp interface manager
implementation to make Sandewall 1978's lisp iconic example
scheduler app, but to drive it to and from emacs lisp via slime
and swank.

To start with, a beginner walkthrough on getting slime and
common lisp and mcclim, and configuring and using them with
emacs org-mode.

The default clim application-frame is made and its interactor
used.

A CLIM command is then defined to refer the default describe to
emacs lisp rather than the inferior lisp.

CLIM useage with no gui via slime / org-mode is demoed.

This is then used via emacs lisp.

CLIM's accepting-values is used to generate an anonymous gui
that accepts a value **into elisp**.

A small final discussion on integrating the clim scheduler back
and forth into org-agenda.

Bib:

```
      @article{sandewall1978programming,
        title={Programming in an Interactive Environment:
    the``Lisp''Experience},
        author={Sandewall, Erik},
        journal={ACM Computing Surveys (CSUR)},
        volume={10},
        number={1},
        pages={35--71},
        year={1978},
        publisher={ACM New York, NY, USA}
        }
    
        @inproceedings{strandh2002free,
        title={A free implementation of clim},
        author={Strandh, Robert and Moore, Timothy},
        booktitle={International Lisp Conference Proceedings},
        year={2002}
        }
    
        @article{fruhwirth2006guided,
        title={A Guided Tour of CLIM, Common Lisp Interface Manager},
        author={Fruhwirth, Clemens},
        journal={Lisp Pointers},
        year={2006}
        }
    
        @article{kochmanskimcclim,
        title={McCLIM Demonstration},
        author={Kochmanski, Daniel}
        }
    
        @inproceedings{kochmanski2020ecl,
        title={On ECL, the Embeddable Common Lisp (ELS keynote).},
        author={Kochmanski, Daniel},
        booktitle={ELS},
        year={2020}
        }
    
        @misc{beane2012quicklisp,
        title={Quicklisp},
        author={Beane, Zach},
        year={2012}
        }
    
        @misc{marsden2003slime,
        title={SLIME: The superior lisp interaction mode for emacs},
        author={Marsden, Eric and Gorrie, Luke and Eller, Helmut and others},
        year={2003},
        publisher={URL: https://common-lisp. net/project/slime/(visited on
    05/19/2017)}
        }
    
        @article{dominik2004org,
        title={Org mode manual},
        author={Dominik, Carsten},
        year={2004}
      }
```

**Q&A in LambdaMOO**:

As an experiment, screwlisp will also be taking
questions from LambdaMOO. Here's how to join:

1. Use `M-x telnet` to connect to `lambda.moo.mud.org 8888`. Alternatively, you can use a web-based client like https://mudslinger.net/play/ or rmoo.el (see rmoo.el note below)
2. `connect Guest` to connect as a guest. If that doesn't work, please ask in `#emacsconf-org` and we'll try to get you sorted out.
3. Agree to the terms by typing `YES`.
4. Teleport to where the speaker is by typing `@join screwtape`.

To say something, start with `"` and omit the ending quotation mark, like this: `"Hello everyone!`. To say something to a specific person, start with a backtick (`` ` ``) and the person's nick, then your message, like this: `` `sachac I made it to LambdaMOO``. Use `help communication` to learn more about other communication tools, such as `:` for emoting and `whisper` for sending private messages.

rmoo.el note: You may need to define process-kill-without-query if it doesn't exist on your computer. Here's a use-package declaration that might be a good starting point. If your version of use-package doesn't support `:vc` yet, you can check out the code from https://github.com/toddsundsted/rmoo and add it to your load-path, or use `M-x telnet` for now.

```
(use-package rmoo
	:vc "https://github.com/toddsundsted/rmoo"
	:init
	(unless (fboundp 'process-kill-without-query)
		(defun process-kill-without-query (process &optional flag)
			(set-process-query-on-exit-flag process nil)
			t))
	:config
	(rmoo-worlds-add-new-moo "LambdaMOO" "lambda.moo.mud.org" "8888"))
```

You can also ask questions via BigBlueButton, Etherpad, or IRC, and the host will try to make sure your question gets to the speaker. Enjoy!

About the speaker:

I'm screwlisp from the lispy gopher climate, a weekly Wednesday
000UTC podcast (non-radio show) on aNONradio.net powered by sdf.org;
(also the lesser-known Friday 1400UTC show, Zhen House Zhen Bonkwave.

We are fortunate to have many great people in our live chat that
happens in LambdaMOO during the shows. Last week, we shared Rog's
new writing on his current personal emacs modes with his decades
of emacs useage. (Roger Crew). That's not what this talk is about
though, though we often deal with emacs and McCLIM, which **are** what
this talk is about. I have many friends who picked those up in some
small part thanks to the show.


# Discussion

- Q: I would love to see the GUI interacting with the scheduling stuff
  you were working on initially, if I didn't miss it somewhere
  earlier.
  - A: Will do a follow-up video
- Q:Or any other GUI stuff you've worked on in the past that you'd
  be comfortable showing?
  - A:[https://toobnix.org/a/screwtape/video-channels](https://toobnix.org/a/screwtape/video-channels)
- Q: Are we going to get a McCLIM LambdaMOO client?
  - A: You're right, I should make that into a client for Common Lisp.
- Q: is the expression being returned directly eval-able is elisp / ielm?
  - screwlisp: Yes I didn't think this ahead
  - screwlisp: Like I've just said, you have to call (slime-eval-sync)
  - screwlisp: After which you can get it out of your kill-ring, because it has syncronised -> to be there
  - screwlisp: I was going to ask you if you had a way for me to do that
- Q: i wonder if there's a presentation type for readable output that is returned to elisp?
  - most of the time i assume the expression type will be readable on the other end, but CL has readtables and other things that would need translation
- similar to the multiple package-archive options with emacs there is also UltraLisp which tracks upstream more closely, but can cause fun-to-debug package conflicts in some situations
  - screwlisp: I guess I should try that, basically melpa right, I occasionally use person quicklisp dists
- screwlisp: 40ants has often done things I want to do
- lol @ either it will be faster or you will be smug about it running slowly
  - screwlisp: Old computer challenge ;)
- we did see a little bit of that
- https://toobnix.org/c/screwtape_channel/videos
- Is the MOO McCLIM app still going?
  - yes
  - telnet lambda.moo.mud.org 8888, connect Guest, Y, then @join screwtape
  - maybe something like this would work for slime eval assuming we still want to use emacs while CLIM window is open: (slime-eval-async '(cl:+ 2 2) (lambda (x) (print x)))
  - the second arg is a continuation so can bind it, insert in a buffer, etc
  - I think most emacs users use scratch buffer
- thanks for the talk! great intro. look forward to IELM talk next :P
- Thank you! 😊
- Thanks for the talk, it was super interesting
- May the source be with everyone
- I use ielm as a repl but not a power user... sometimes I know I want to do more than a few M-: 
- (lazy-eval 'thanks)
- screwlisp: "Yeah, I forgot now but during the talk there were a few tiny bits where it was different to slime that tripped me up
- thanks for the talk screwlisp, always good to see lisp history being explored. i'll have to check out lambdamoo again
- screwlisp: Quite a few people hang around during the Wednesday show (000UTC, anonradio.net)
- screwlisp: Probably not a coincidence a lot of my emacs useage is the same as yduJ's who is normally there
- what emacs mode/tool were you using to access the moo?
  - I dusted off rmoo.el, but it could definitely use some modernization =)
  - I went for the quick M-x telnet instructions for Guest
- screwlisp: Can @request your nick with an email address


[[!inline pages="internal(2024/info/mcclim-after)" raw="yes"]]

[[!inline pages="internal(2024/info/mcclim-nav)" raw="yes"]]