Skip to content
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

Query: is the source code for the demonstrations from your presentation available? #76

Open
rpgoldman opened this issue Jan 20, 2023 · 5 comments
Assignees
Labels
question Further information is requested

Comments

@rpgoldman
Copy link

Sorry to drop an issue for a simple question. I'm interested in using Eclector, but thought it would be easier to learn if the source code for one or more of the demonstrations was available. Are the examples anywhere?

Thanks!

/cc @scymtym

@scymtym scymtym added the question Further information is requested label Jan 21, 2023
@scymtym scymtym self-assigned this Jan 21, 2023
@scymtym
Copy link
Member

scymtym commented Jan 21, 2023

I'm not sure which examples you are referring to. The slides for the presentation are available online.

Could you link to the specific slides containing the examples you are interested in? You can copy the URL of the slide currently being displayed like this: https://s-expressionists.github.io/Eclector/presentation-slides/slides.html#/slide-slide%3Aextensibility%3Asandboxing.

@rpgoldman
Copy link
Author

@scymtym Thank you very much for the quick response! I am interested in re-animating the redshank emacs lisp library, which did some refactorings for common lisp code. Unfortunately, it mostly does this by operating on the strings, which is very difficult. But if I want to operate on the code in CL instead of Emacs-lisp, I can't be destroying the ancillary information like comments. Eclector seems perfect for this.

A couple of things seem of interest to me:

  1. The lisp-style command line application/console linter (the McCLIM one would be good, but it is much more complicated because it dynamically maintains the read, and has UI code): https://s-expressionists.github.io/Eclector/presentation-slides/slides.html#/slide-slide%3Ademos%3Alisp.style
  2. The syntax highlighting demo https://s-expressionists.github.io/Eclector/presentation-slides/slides.html#/slide-slide%3Ademos%3Ahighlighting-1

As an aside, protocol.lisp-server also sounds very interesting. I should read over that, since it might make things easier to use lsp-mode in emacs. But that is a matter for some more research.

@scymtym
Copy link
Member

scymtym commented Jan 22, 2023

I see.

The lisp-style command line application/console linter

This one uses a lot more than just Eclector. From the top of my head:

  • A "model" of symbols and packages so that reading does not intern
  • A way to read files (multiple expressions) instead of just individual expressions
  • Parsing on the s-expression level (see https://github.com/scymtym/s-expression-syntax but that library is not yet ready for general consumption)
  • Source tracking across character syntax and s-expression syntax levels

So the linter demo would be difficult to reproduce with just the stable, published part of the software stack.

The syntax highlighting demo

I could make this code available in a branch in the Eclector repository. However, I would say that parse results produced by Eclector are not at the most useful level for highlighting. Ideally, information obtained by parsing the s-expression representation would be used, like in these demonstrations: https://techfak.de/~jmoringe/semantic-highlighting-2.png, https://techfak.de/~jmoringe/semantic-highlighting.ogv, https://techfak.de/~jmoringe/semantic-highlighting-2.ogv.

@rpgoldman
Copy link
Author

Thank you very much! Anything you could provide would be helpful. You might try either putting these examples in a branch, adding an examples subdirectory, or even adding an eclector-examples repo to the s-expressionists group.

I'd welcome anything that would not be too much trouble to you.

I think for a refactoring server to SLIME or SLY, it would be OK to have read intern things, since presumably this code is going to be read anyway.

Local refactoring could also manage, at least initially, by parsing only a one-s-expression subset of the file. In this case redshank already has code to find the relevant s-expression, it's just that now it functions without talking to the host lisp.

Anyway, it wouldn't be absolutely necessary to me to have a working linter or highlighter example -- I'd be happy just to have the code that shows how that example interacted with Eclector. The Eclector documentation is great, but it's a little overwhelming, especially in this age of TL;DR!

Thank you again for your attention and patience.

@scymtym
Copy link
Member

scymtym commented Jan 22, 2023

Anything you could provide would be helpful. You might try either putting these examples in a branch, adding an examples subdirectory, or even adding an eclector-examples repo to the s-expressionists group.

I have a few unpushed examples in the examples directory that I plan to push after the current batch of changes.

That said, I checked the branch that I prepared for the online lisp meeting presentation and it is actually still current in terms of the syntax highlighting example.
You can find that example in examples/highlight/ in the online-lisp-meeting branch.
The file examples/highlight/interface.lisp has the high-level interface.
examples/highlight/render/ansi-text.lisp and examples/highlight/render/html.lisp are probably self-explanatory.

Thank you again for your attention and patience.

Sure

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

No branches or pull requests

2 participants