Skip to content

Provides a deeper coverage of Basics #277

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

sgharms
Copy link

@sgharms sgharms commented Apr 11, 2025

I was unable to "Get Started" quite as quickly as I might have hoped once I had Medley running. I'd like to cover a mental model for thinking about what Medley is and cover the core use cases one is likely to encounter in basic introductory Lisp use (developer ergonomics like copy and paste; handling interrupts). I'm basing these basic skills on Tourtzky's Gentle Introduction... and Anderson et al's Essential Lisp).

I do not have all the answers.

It might be the case that my style is incompatible with the voice of this page.

Nevertheless, I believe this will accelerate any progress on initiatives to flesh this page out.

Addenda:

  • Update a workflow mode model per @nbriggs commend. Use a metaphor of branches, and then a "merge" to the base SYSOUT a la git-based workflow
  • Talk about command history and command recall. The intuitive "up arrow" taught by CLISP or SBCL is not supported out of the box

@sgharms sgharms closed this Apr 11, 2025
@sgharms sgharms reopened this Apr 11, 2025
@sgharms
Copy link
Author

sgharms commented Apr 11, 2025

I meant to make this a DRAFT PR, but I don't seem to have the ability to get to that UI now :-/ . Should not be merged without additional work (e.g. see TODO markers).

@nbriggs nbriggs marked this pull request as draft April 11, 2025 17:44
@nbriggs
Copy link
Contributor

nbriggs commented Apr 11, 2025

While one might release a complete system as a sysout, that's not the way that most people would share reusable smaller pieces of code (e.g., look at the things in "lispusers"). You expect your running Medley image to be long-lived - you can logout and restart from where you left off - continue your development, debug your functions, and so on - but at some point you're highly likely to want to save your sources in an organized way, throw away system state that is no longer useful, and start over from a clean system image (e.g., back to a full.sysout). You save your sources using the file package, where you create (a list of) file commands that direct the file package what things to save on the (source) file, initial values of variables, and so on. There are, of course, tools (functions) that help you do this. See section 17 of the IRM. This is how the source files for Interlisp are managed, and the library packages, and the lispusers packages. You don't ever edit the (not quite plain) text file using a text editor - you edit the structure of your code in the running system and then have the file package save anything that changed, you might compile that file, you might also have the system run the compiled code rather than the interpreted code in your running image - and so on around the exploratory development loop as you've described.

@masinter
Copy link
Member

i sent @sgharms an invite to the Interlisp organization and the website group.
@abhikhasnain1 has been working on a rewrite of the Medley primer.

@pamoroso
Copy link
Contributor

@sgharms Thanks for sharing your perspective on approaching Medley.

@sgharms
Copy link
Author

sgharms commented Apr 11, 2025

@nbriggs Fabulous. I don't know how I missed the IRM in earlier clonings of repos, but I'm definitely integrating it into my thought process now. Thanks for the anthropological context you provided.

@sgharms
Copy link
Author

sgharms commented Apr 11, 2025

@abhikhasnain1 Let me know if I can be helpful to other initiatives you have underway.

@nbriggs
Copy link
Contributor

nbriggs commented Apr 17, 2025

Re: "Use a metaphor of branches, and then a "merge" to the base SYSOUT a la git-based workflow"
That really isn't the mental model that I'd expect people to work with. Saving a sysout is more like SBCL's "save-lisp-and-die" functions: except it doesn't die, and since it's an image of a virtual machine memory state it's not limited to being restarted on the same hardware that you created the image on. Calling '(LOGOUT)` is conceptually close to "save-lisp-and-die" -- it saves the virtual machine state in a file typically named "lisp.virtualmem" (which is identical in format to the result of calling SYSOUT or MAKESYS, modulo the amount of cleanup done before exit/after resume)

@sgharms
Copy link
Author

sgharms commented Apr 17, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants