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

Buildapp & cl-launch? #408

Open
rbugajewski opened this issue Jul 19, 2021 · 3 comments
Open

Buildapp & cl-launch? #408

rbugajewski opened this issue Jul 19, 2021 · 3 comments

Comments

@rbugajewski
Copy link

Is there a reason why Buildapp and cl-launch aren’t listed (but similar tools like Roswell are)?

@vindarel
Copy link
Collaborator

vindarel commented Jul 19, 2021

Hello, yes, because:

  • to build executables, they seem deprecated by asdf:make which does it portably
  • they look superseded by Roswell
  • (buildapp might have --dispatched-entry unique to it)
  • they look old and have poor doc
  • the State of CL of 2015 says "kill cl-launch, use Roswell" https://borretti.me/article/common-lisp-sotu-2015
  • this list doesn't aim to list every available tool or library
  • I didn't feel the need for them and we didn't receive PRs with explanations.

Best,

@rbugajewski
Copy link
Author

Thank you very much for this detailed explanation!

@vindarel
Copy link
Collaborator

For Common Lisp, look into cl-launch. It's meant to abstract over the details of scripting and building executables across different CL implementations. roswell I find to be way too opinionated in how it does things.

For cl-launch "scripts", you can add something like exec cl-launch -Q -sp ${name-of-package} -r main -- "$@" to the top of the file for your script so that you can run it from the command line with cl-launch your-script.lisp (just make sure you have a main function that is a command line interface). To build an executable with cl-launch, you can run something like cl-launch -o ${name-of-binary} -d ! -Q -r main -L ${your-script}.lisp.

Some caveats I've found with using cl-launch is that the command line options can be very finnicky and complicated, and for some reason I haven't gotten it to work with building an ECL executable. But it's overall the simplest and most portable solution I've found for running CL code as scripts and building executables.

https://www.reddit.com/r/lisp/comments/zwtfak/writing_scripts_in_lisp/j1x6xws/

To answer myself:

to build executables, they seem deprecated by asdf:make which does it portably

cl-launch allows to build a binary from the command line. Might be useful, easier to do for some,

AND it gives a shebang line to run files as scripts (and do it portably across implemenetations, otherwise we can do it with a SBCL shebang line).

they look superseded by Roswell

but Roswell has its own way to do things (it uses its own Quicklisp directory etc).

they look old and have poor doc

still applies.

I didn't feel the need for them and we didn't receive PRs with explanations.

I might see a need…

@vindarel vindarel reopened this Dec 28, 2022
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

No branches or pull requests

2 participants