मैं लिस्प में एक शुरुआत कर रहा हूं, केवल रैकेट / स्कीम में कुछ दबंग के लिए DrRacket का उपयोग किया है। मुझे यह जानने में बहुत परेशानी हुई है कि विंडोज़ के लिए क्लोज़र सीएल के साथ एक .lisp फ़ाइल कैसे चलाएं। मैंने उबंटू के एसबीसीएल में एक .lisp फ़ाइल चलाने की कोशिश की (वर्चुअलबॉक्स पर चलने के साथ) सफलता के बिना।
मुझे यह उल्लेख करना चाहिए कि मैंने फाइलों को चलाने से संबंधित प्रश्नों पर ध्यान दिया है लेकिन मैं कोई प्रत्यक्ष समाधान नहीं देख पाया। कुछ .bat फ़ाइलों का उपयोग कर रहे हैं, कुछ क्लोज़र सीएल की छवि (या उन पंक्तियों के साथ कुछ) के साथ "एप्लिकेशन बना रहे हैं"।
Ubuntu में SBCL के लिए, मैंने कोशिश की है:
sbcl lisptest.lisp \ The python/forth way.
(load "lisptest.lisp")
(load lisptest.lisp)
(--load lisptest.lisp)
:cd C:\Temp
(:cd C:\Temp)
और अधिक। मैंने इसे नोटपैड ++ से चलाने की भी कोशिश की:
cmd /k C:\Temp\ccl-1.11-windows\ccl\wx86cl64.exe "$(FULL_CURRENT_PATH)"
जो है कि मैं आमतौर पर अजगर फ़ाइलों को कैसे निष्पादित करता हूं, लेकिन यह विधि सफल नहीं हुई है।
** मैं निश्चित रूप से Emacs और Slime (Emacs लिस्प की स्पष्ट पसंद है) का उपयोग करना सीखना शुरू करूँगा। लेकिन ज्ञान की खातिर, मैं कुछ टाइप करने के वैकल्पिक, बुनियादी-पाठ-संपादक तरीके की सराहना करूँगा, जो "हैलो दुनिया" जैसी कुछ तुच्छ चीजें हैं, जो मेरी टाइपिंग के बिना प्रिंट करने के लिए आरपीपीएल में टाइप करता है और इसके बजाय एक पाठ की व्याख्या (या संकलन) करता है। निर्देश के साथ फाइल करें।
आपकी सहायता के लिए धन्यवाद।
2 जवाब
आमतौर पर कार्यक्रमों में मदद होती है - क्या आपने उस पर गौर किया?
SBCL, उबंटू, शेल से:
एक आम लिस्प फ़ाइल:
$ cat test.lisp
(format t "Hello World~%~%")
SBCL मदद दिखाता है:
$ sbcl --help
Usage: sbcl [runtime-options] [toplevel-options] [user-options]
Common runtime options:
--help Print this message and exit.
--version Print version information and exit.
--core <filename> Use the specified core file instead of the default.
--dynamic-space-size <MiB> Size of reserved dynamic space in megabytes.
--control-stack-size <MiB> Size of reserved control stack in megabytes.
Common toplevel options:
--sysinit <filename> System-wide init-file to use instead of default.
--userinit <filename> Per-user init-file to use instead of default.
--no-sysinit Inhibit processing of any system-wide init-file.
--no-userinit Inhibit processing of any per-user init-file.
--disable-debugger Invoke sb-ext:disable-debugger.
--noprint Run a Read-Eval Loop without printing results.
--script [<filename>] Skip #! line, disable debugger, avoid verbosity.
--quit Exit with code 0 after option processing.
--non-interactive Sets both --quit and --disable-debugger.
Common toplevel options that are processed in order:
--eval <form> Form to eval when processing this option.
--load <filename> File to load when processing this option.
User options are not processed by SBCL. All runtime options must
appear before toplevel options, and all toplevel options must
appear before user options.
For more information please refer to the SBCL User Manual, which
should be installed along with SBCL, and is also available from the
website <http://www.sbcl.org/>.
ऊपर से स्क्रिप्ट विकल्प का उपयोग करना:
$ sbcl --script test.lisp
Hello World
क्लोज़र सीएल के लिए समान
$ ccl --help
usage: ccl <options>
where <options> are one or more of:
-h, --help : this text
-V, --version : print (LISP-IMPLEMENTATION-VERSION) and exit
-K, --terminal-encoding : specify character encoding to use for *TERMINAL-IO*
-n, --no-init : suppress loading of init file
-e, --eval : evaluate <form> (may need to quote <form> in shell)
-l, --load : load <file>
-T, --set-lisp-heap-gc-threshold : set lisp-heap-gc-threshold to <n>
-Q, --quiet : if --batch, also suppress printing of heralds, prompts
-R, --heap-reserve <n>: reserve <n> (default: 1610612736)
bytes for heap expansion
-S, --stack-size <n>: set size of initial thread's control stack to <n>
-Z, --thread-stack-size <n>: set default size of first (listener) thread's stacks based on <n>
-b, --batch: exit when EOF on *STANDARD-INPUT*
--no-sigtrap : obscure option for running under GDB
--debug : try to ensure that kernel debugger uses a TTY for I/O
-I, --image-name <image-name>
and <image-name> defaults to ccl.image
Any arguments following the pseudoargument "--" are
not processed and are available to the application as
the value of CCL:*UNPROCESSED-COMMAND-LINE-ARGUMENTS* .
ऊपर से लोड विकल्प का उपयोग करना
$ ccl --load test.lisp --eval '(quit)'
Hello World
  कोशिश करो
C:/path/to/ccl -l lisptest.lisp
इस के रूप में ही काम करना चाहिए
(load "lisptest.lisp")
यदि आप हमें विशेष रूप से बता सकते हैं कि कैसे विफल होता है, तो हम और अधिक मदद कर सकते हैं।
नए सवाल
common-lisp
आम लिस्प उत्पादन-शक्ति शक्ति के लिए लक्षित लिस्प प्रोग्रामिंग भाषा का एक मानकीकृत संस्करण है।