Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 194285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T16:34:55+00:00 2026-05-11T16:34:55+00:00

Given a simple program such as the following, how would you: compile it as

  • 0

Given a simple program such as the following, how would you:

  1. compile it as a seperate image file to be loaded by the implementation, and what command line arguments would you use to load it?

  2. Compile it as a standalone binary that can be loaded and run as is.

    Note: I tried adding “:prepend-kernel t” when saving the application only to have the follow error thrown.

    Error: value NIL is not of the
    expected type REAL. While executing: 
    CCL::<-2, in process Initial(0).
    
  3. How would you supress the welcome message?

    The Program

    (defun main ()
      (format t "This is the program.")0)
    

Edit

Hate to answer part of my own question, but I found it none the less.

After the function has been loaded type the following to compile it:

(ccl:save-application "app")

This creates an image file. To load it by passing it to the implementation type (note: the ‘ccl’ binary is in my system path);

ccl -I app

To run a top level function pass it as a parameter

ccl -I app --eval (main)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T16:34:56+00:00Added an answer on May 11, 2026 at 4:34 pm

    See the Clozure Common Lisp documentation under Saving Applications

    Compiling and Loading Lisp files

    You can compile a file named /foo/bar.lisp by calling

     (compile-file "/foo/bar.lisp")
    

    This will create a fasl (FASt Load) file, which contains native code.

    You can load the compiled file, the fasl file, with the function LOAD. LOAD and COMPILE-FILE are standard Common Lisp functions.

    Creating applications

    A few definitions:

    • CCL kernel: the part of CCL which provides low-level runtimes services like memory management.
    • Image: a saved dump of the Lisp heap
    • Application: CCL kernel + image. This can be in one file.

    You can save an application by calling a CCL specific function:

    (save-application "/foo/bar-image" :toplevel-function #'main)
    

    This will save an image, that you can run using the CCL kernel from a command shell:

    ccl -I /foo/bar-image
    

    To save an executable that includes the kernel use this from Lisp:

    (save-application "/foo/bar-app"
                      :toplevel-function #'main
                      :prepend-kernel t)
    

    You can call this executable as usual with /foo/bar-app from a command shell.

    In Clozure Common Lisp you can check

    *command-line-argument-list*
    

    for the list of provided command line arguments.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 87k
  • Answers 88k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The code could be converted verbatim, but there's a much… May 11, 2026 at 5:37 pm
  • Editorial Team
    Editorial Team added an answer I usually start by killing my internet connection, otherwise I… May 11, 2026 at 5:37 pm
  • Editorial Team
    Editorial Team added an answer Update: C# 8.0 New Feature: Beginning with C# 8.0, an… May 11, 2026 at 5:37 pm

Related Questions

As a pet-project, I'd like to attempt to implement a basic language of my
Often I find myself interacting with files in some way but after writing the
Given a string like this: <a href=http://blah.com/foo/blah>This is the foo link</a> ... and a
I am struck by the ambition and creativity of Charles Simonyi's efforts to establish
I've been wondering about how hard it would be to write some Python code

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.