### Install and Start Test Service Source: https://franz.com/support/documentation/delivery.html Commands to install the service via command prompt and start it using the net utility. ```batch c: cd \Program Files\acl81\examples\ntservice\testapp start /wait testapp /install ``` ```batch net start MyService ``` -------------------------------- ### Configure Java VM startup command Source: https://franz.com/support/documentation/jlink-vars.html Example command line structure for starting the JVM when using jLinker socket connections. ```text java com.franz.jlinker.JLCommonSocket [-debug] [-lport lport] [-lhost lhost] [-jport jport] [-jhost jhost] [more] ``` -------------------------------- ### Start Allegro CL IDE on Linux Source: https://franz.com/support/documentation/installation.html Execute the binary from the installation directory to launch the IDE in the default browser. ```bash $ /usr/local/acl11.0/allegro ``` -------------------------------- ### Define FOO package and bar function Source: https://franz.com/support/documentation/packages.html Initial setup for the package and function used in the example. ```Common Lisp (defpackage :foo (:use :excl :cl)) (defun foo::bar (x) (1+ x)) ``` -------------------------------- ### Define flavor components and methods Source: https://franz.com/support/documentation/flavors.html Example setup for a flavor hierarchy with various :before, :after, and untyped methods. ```Lisp (defflavor foo () (foo-mixin foo-base)) (defflavor foo-mixin () (bar-mixin)) (defmethod (foo :before :hack) ...) (defmethod (foo :after :hack) ...) (defmethod (foo-mixin :before :hack) ...) (defmethod (foo-mixin :after :hack) ...) (defmethod (bar-mixin :before :hack) ...) (defmethod (bar-mixin :hack) ...) (defmethod (foo-base :hack) ...) (defmethod (foo-base :after :hack) ...) ``` -------------------------------- ### Initialize sequence variables Source: https://franz.com/support/documentation/ansicl/dictentr/reversen.htm Example setup for sequence variables used in reverse and nreverse operations. ```lisp (setq str "abc") _implementation-dependent_ (setq l (list 1 2 3)) _implementation-dependent_ ``` -------------------------------- ### Invoke Allegro CL with command-line arguments Source: https://franz.com/support/documentation/os-interface.html Example of starting the Lisp executable with specific arguments separated by the '--' delimiter. ```shell mlisp -qq -- foo -batch bar ``` -------------------------------- ### Execute Help Menu Example Source: https://franz.com/support/documentation/cg-application-help.html A test call to trigger the help menu example functionality. ```Common Lisp #+test (help-menu-example) ``` -------------------------------- ### Invoke Allegro CL with command-line arguments Source: https://franz.com/support/documentation/os-interface.html Example of starting the Lisp executable with arguments separated by the '--' delimiter. ```bash mlisp -qq -- foo -batch bar ``` -------------------------------- ### Run Clipboard Example Source: https://franz.com/support/documentation/cg-clipboard.html Executes the clipboard example functionality. ```Common Lisp #+run-example (run-clipboard-example) ``` -------------------------------- ### List Syntax Examples Source: https://franz.com/support/documentation/ansicl/subsecti/left-par.htm Basic examples of list representation using parentheses. ```lisp (a b c) ``` ```lisp (a b c . d) ``` ```lisp (cons 'a (cons 'b (cons 'c 'd))) ``` ```lisp (cons 'this-one 'that-one) ``` ```lisp (a b c d . (e f . (g))) ==(a b c d e f g) ``` -------------------------------- ### Directory Component Resolution Example Source: https://franz.com/support/documentation/pathnames.html An example showing how the :directory component list is resolved when :up is present. ```lisp (:absolute "foo" :up "bar") ``` ```lisp (:absolute "bar") ``` -------------------------------- ### Install Allegro CL on Linux and FreeBSD Source: https://franz.com/support/documentation/installation.html Use the tar command to extract the installation archive into a chosen directory. ```bash $ cd /usr/local $ tar jxf acl11.0-linux-x64.tbz2 ``` -------------------------------- ### Example Lisp Listener Output Source: https://franz.com/support/documentation/startup.html Example of output seen in the Lisp listener when calling the interface function after it has already started. ```text ^A1026 771990 :upper NIL 1^A ``` -------------------------------- ### Initialize sequences for map-into Source: https://franz.com/support/documentation/ansicl/dictentr/map-into.htm Example setup for testing map-into with two lists. ```lisp (setq a (list 1 2 3 4) b (list 10 10 10 10)) ``` -------------------------------- ### Loading a system setup file Source: https://franz.com/support/documentation/ansicl/dictentr/load.htm Shows a setup file that captures load-time pathnames and a function to load multiple modules relative to that path. ```common-lisp ;- - [Begin file SETUP]- - (in-package "MY-STUFF") (defmacro compile-truename () `',*compile-file-truename*) (defvar *my-compile-truename* (compile-truename) "Just for debugging.") (defvar *my-load-pathname* *load-pathname*) (defun load-my-system () (dolist (module-name '("FOO" "BAR" "BAZ")) (load (merge-pathnames module-name *my-load-pathname*)))) ;- - [End of file SETUP]- - (load "SETUP") (load-my-system) ``` -------------------------------- ### Build Example with Constructor Optimization Source: https://franz.com/support/documentation/delivery.html A complete example demonstrating the creation of a constructor file during the image build process. ```Common Lisp cl-user(1): (shell "cat closopt-example.cl") (in-package :cl-user) (defclass foo () ((base :accessor base :initarg :base) (val :accessor val :initarg :val))) (defun main (&rest args) (do-test) ) (defun do-test () (loop for i from 0 to 3 as data = (make-instance 'foo :base i :val (* i i)) sum (val data)) (dotimes (i 10) (time (loop for i from 0 to 200000 as data = (make-instance 'foo :base i :val (* i i)) sum (val data))))) (defun build () (with-open-file (st "closopt-example-pre.cl" :direction :output :if-exists :supersede) (format st "(preload-forms)~%") (format st "(excl::preload-constructors (list :cl-user :lisp))~%") (format st "(excl::precache-generic-functions (list :cl-user :lisp))")) (main) (compile-file "closopt-example-pre.cl") (generate-executable "sample" '(:trace :constructor :foreign "closopt-example.fasl" "closopt-example-pre.fasl") :allow-existing-directory t :include-compiler t :discard-compiler t )) 0 cl-user(2): :cl closopt-example ;;; Compiling file closopt-example.cl ;;; Writing fasl file closopt-example.fasl ;;; Fasl write complete ; Fast loading closopt-example.fasl cl-user(3): (build) ``` -------------------------------- ### List all packages example Source: https://franz.com/support/documentation/ansicl/dictentr/list-all.htm Demonstrates retrieving the list of packages before and after creating a new package to identify the change. ```Common Lisp (let ((before (list-all-packages))) (make-package 'temp) (set-difference (list-all-packages) before)) ``` -------------------------------- ### Displaying Startup Optimization Settings Source: https://franz.com/support/documentation/startup.html Example of the optimization and reader case mode information printed during startup. ```text ;; Optimization settings: safety 1, space 1, speed 1, debug 2 ;; For a complete description of all compiler switches given the ;; current optimization settings evaluate (EXPLAIN-COMPILER-SETTINGS). ;; -- ;; Current reader case mode: :case-sensitive-lower ``` -------------------------------- ### Displaying the Allegro CL Startup Banner Source: https://franz.com/support/documentation/startup.html Example of the banner printed when Allegro CL initializes. ```text International Allegro CL [enterprise] 8.1 [Linux (x86)] (Jul 18, 2007 13:20) Copyright (C) 1985-2007, Franz Inc., Oakland, CA, USA. All Rights Reserved. ``` -------------------------------- ### Sample initialization file Source: https://franz.com/support/documentation/startup.html A comprehensive example of a .clinit.cl file used to configure top-level variables, garbage collection, and custom aliases. ```lisp ;;; ;;; This file contains examples of user ;;; customizations which can be done via a ;;; $HOMEDRIVE/$HOMEPATH/.clinit.cl or C:\clinit.cl. (format *terminal-io* "~%; Loading home ~a~@[.~a~] file.~%" (pathname-name *load-pathname*) (pathname-type *load-pathname*)) ;;; Set a few top-level variables. (tpl:setq-default top-level:*history* 50) (tpl:setq-default top-level:*print-length* 20) (tpl:setq-default top-level:*print-level* 5) (tpl:setq-default top-level:*zoom-print-level* 3) (tpl:setq-default top-level:*zoom-print-length* 3) (tpl:setq-default top-level:*exit-on-eof* t) ;;; Display 10 frames on :zoom, (tpl:setq-default top-level:*zoom-display* 10) ;;; and don't print anything but the current frame on ;;; :dn, :up and :find (tpl:setq-default top-level:*auto-zoom* :current) ;;; Have the garbage collector print interesting stats. (setf (sys:gsgc-switch :print) t) (setf (sys:gsgc-switch :stats) t) ;;; To have all advice automatically compiled. (tpl:setq-default *compile-advice* t) ;;; Have packages print with their shortest nickname ;;; instead of the package name. (tpl:setq-default *print-nickname* t) ;;; Allow concise printing of shared structure. (tpl:setq-default *print-circle* t) ;;; Only print "Compiling" messages for files, not for individual functions, ;;; unless there is a warning or error. (tpl:setq-default *compile-verbose* t) (tpl:setq-default *compile-print* nil) ;;; Set up a top-level alias. (top-level:alias ("shell" 1 :case-sensitive) (&rest args) "`:sh args' will execute the shell command in `args'" (let ((cmd (apply #'concatenate 'simple-string (mapcar #'(lambda (x) (concatenate 'simple-string (write-to-string x :escape nil) "")) args)))) (prin1 (shell cmd)))) ;;; The following makes the source file recording ;;; facility compare only the names of pathnames, for ;;; the purposes of determining when a redefinition ;;; warning should be issued. (push #'(lambda (old new fspec type) (string= (pathname-name old) (pathname-name new))) *redefinition-pathname-comparison-hook*) ;;; Use the Composer package if it is available. (eval-when (eval compile load) (when (find-package :wt) (use-package :wt))) ``` -------------------------------- ### Parsing Namestrings Source: https://franz.com/support/documentation/ansicl/dictentr/parse-na.htm Examples demonstrating basic usage of parse-namestring, including parsing substrings with start and end arguments. ```Common Lisp (setq q (parse-namestring "test")) _true_ (parse-namestring "test") _xxx_)) _xxx_ :TYPE NIL :VERSION NIL), 0 (parse-namestring "test" nil nil :start 2 :end 4 ) ``` -------------------------------- ### Example of package creation and symbol management Source: https://franz.com/support/documentation/ansicl/dictentr/delete-p.htm Demonstrates creating multiple packages with dependencies and exporting symbols between them. ```lisp (setq *foo-package* (make-package "FOO" :use nil)) (setq *foo-symbol* (intern "FOO" *foo-package*)) (export *foo-symbol* *foo-package*) (setq *bar-package* (make-package "BAR" :use '("FOO"))) (setq *bar-symbol* (intern "BAR" *bar-package*)) (export *foo-symbol* *bar-package*) (export *bar-symbol* *bar-package*) (setq *baz-package* (make-package "BAZ" :use '("BAR"))) (symbol-package *foo-symbol*) _true_ (packagep *bar-package*) _true_ (packagep *baz-package*) _true_ (package-name *foo-package*) _:CONTINUE_ ``` -------------------------------- ### Non-well-formed tag example Source: https://franz.com/support/documentation/sax.html An example of an unclosed tag which is not well-formed. ```xml ``` -------------------------------- ### Example file for compilation Source: https://franz.com/support/documentation/compiling.html A sample file demonstrating various defining forms. ```lisp ;; file foo.cl begin (in-package :user) (defpackage :foo (:use :cl :excl)) (defmacro foom (x) x) (defun foo (y) (cons y y)) (defclass foo () ()) (defvar foo nil) ;; file foo.cl end ``` -------------------------------- ### Example Initialization File Content Source: https://franz.com/support/documentation/startup.html A sample .clinit.cl file demonstrating variable assignment and a common typo error. ```lisp (setq xx (firt '(1 2 3 4))) (setq yy 5) ``` -------------------------------- ### Representing a GUID Source: https://franz.com/support/documentation/ole.html The standard format for representing a GUID as a string. ```text {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} ``` -------------------------------- ### Defining Packages with defpackage Source: https://franz.com/support/documentation/ansicl/dictentr/defpacka.htm Examples demonstrating various package configuration options including nicknames, shadowing, and exports. ```common-lisp (defpackage "MY-PACKAGE" (:nicknames "MYPKG" "MY-PKG") (:use "COMMON-LISP") (:shadow "CAR" "CDR") (:shadowing-import-from "VENDOR-COMMON-LISP" "CONS") (:import-from "VENDOR-COMMON-LISP" "GC") (:export "EQ" "CONS" "FROBOLA") ) ``` ```common-lisp (defpackage my-package (:nicknames mypkg :MY-PKG) ; remember Common Lisp conventions for case (:use common-lisp) ; conversion on symbols (:shadow CAR :cdr #:cons) (:export "CONS") ; this is the shadowed one. ) ``` -------------------------------- ### Incorrectly nested XML example Source: https://franz.com/support/documentation/sax.html An example demonstrating improper element nesting. ```xml hello hello hello ``` -------------------------------- ### Correctly nested XML example Source: https://franz.com/support/documentation/sax.html An example demonstrating proper element nesting. ```xml hello hello ``` -------------------------------- ### Initialization Argument Precedence Examples Source: https://franz.com/support/documentation/ansicl/subsecti/rulesfor.htm Table-based examples showing how make-instance arguments affect slot values based on the defined rules. ```lisp (make-instance 'r) ``` ```lisp (make-instance 'r 'a 3) ``` ```lisp (make-instance 'r 'b 4) ``` ```lisp (make-instance 'r 'a 1 'a 2) ``` -------------------------------- ### Example File Mode Line and Configuration Source: https://franz.com/support/documentation/eli.html A complete example showing a file mode line combined with in-package and eval-when forms to configure the Lisp environment. ```lisp ;; -*- mode: fi:common-lisp-mode; package: mypack; readtable: myrt -*- (in-package :mypack) (eval-when (compile load ;; see note below eval) (setq *readtable* (named-readtable :myrt))) ; ... [rest of code] ``` -------------------------------- ### Well-formed tag example Source: https://franz.com/support/documentation/sax.html A simple example of a well-formed element with matching tags. ```xml ``` -------------------------------- ### Bundle Utility Examples Source: https://franz.com/support/documentation/other-programs.html Common operations for creating, listing, updating, and extracting files using the bundle utility. ```shell Creating a bundle file: % [acldir]/bin/bundle o file.bu [-d docstring] file1 file2 ... Listing the contents of a bundle file: % [acldir]/bin/bundle it file.bu To update a file's contents in a bundle: % [acldir]/bin/bundle io file.bu.in file.bu.out -R file1 file2 To extract all bundle members containing the string "ef-" in their names: % [acldir]/bin/bundle ix file.bu -e ef- ``` -------------------------------- ### CoClass Definition Example Source: https://franz.com/support/documentation/ole.html An example of an IDL CoClass definition for Internet Explorer. ```IDL [ uuid(0002DF01-0000-0000-C000-000000000046), helpstring("Internet Explorer Application."), helpcontext(0x00000000) ] coclass InternetExplorer { [default] interface IWebBrowser2; interface IWebBrowserApp; [default, source] dispinterface DWebBrowserEvents2; [source] dispinterface DWebBrowserEvents; }; ``` -------------------------------- ### start-ole Source: https://franz.com/support/documentation/ole_reference.html Initializes the OLE linkage. ```APIDOC ## start-ole &key verbose language locale ### Description Sets up the initial linkage with OLE and loads necessary DLLs. ### Parameters - **verbose** (boolean) - Optional - If true, prints progress messages. - **language** (symbol) - Optional - The language setting. - **locale** (symbol) - Optional - The locale setting. ``` -------------------------------- ### Subtypep Examples Source: https://franz.com/support/documentation/ansicl/dictentr/subtypep.htm Specific examples of subtypep usage with complex and array types. ```common-lisp (subtypep '(complex single-float) '(complex float)) ``` ```common-lisp (subtypep '(array single-float) '(array float)) ``` -------------------------------- ### GC Switch Configuration Examples Source: https://franz.com/support/documentation/gc.html Demonstration of setting GC switches and observing the resulting output in a Lisp environment. ```lisp cl-user(1): (gc :print) t cl-user(2): (setf (sys:gc-switch :stats) t (sys:gc-switch :verbose) t) t cl-user(3): (defconstant my-array (make-array (* 10 1000 1000))) scavenging(3)...expanding new space (207872K)...done ms cpu/real: 5/23, eff: 82%, new copy: 98096 + tenure: 0 + aclmalloc free: 1816 = 99912 Page faults: non-gc = 0 major + 336 minor, gc = 0 major + 82 minor my-array ``` ```lisp cl-user(1): (gc :print) t cl-user(2): (setf (sys:gc-switch :stats) t) t cl-user(3): (defconstant my-array (make-array (* 10 1000 1000))) gc(3): XN(207872K)-ms=5/23 E=81% N=98000 T+=0 A-=1816 pfu=0+335 pfg=0+82 my-array ``` -------------------------------- ### start-profiler Source: https://franz.com/support/documentation/index-s.html Initializes and starts the system profiler. ```APIDOC ## Function: start-profiler ### Description Starts the profiler tool to begin monitoring and collecting performance data for the Lisp process. ``` -------------------------------- ### Example restart output Source: https://franz.com/support/documentation/ansicl/dictentr/restart-.htm The visual output generated by the reporting format example. ```text :CONTINUE -- Return to command level ``` -------------------------------- ### Initialize Medication Instances Source: https://franz.com/support/documentation/cg-object-editor-and-class-grid.html Creates a list of medication instances to serve as sample product data. ```Common Lisp (defparameter *medications* (list (make-instance 'medication :drug-name "Lispitol" :drug-price "23.89" :drug-warnings "Associated with computer addiction.") (make-instance 'medication :drug-name "Franzeril" :drug-price "1.95" :drug-warnings "May give Bill Gates a headache.") (make-instance 'medication :drug-name "Objectifin" :drug-price "29.95" :drug-warnings "Sometimes leads to modularity.") (make-instance 'medication :drug-name "Dynamicine" :drug-price "299.00" :drug-warnings "May increase free time to kill.") (make-instance 'medication :drug-name "Parenthezol" :drug-price "123.45" :drug-warnings "Can reduce concern about syntax.") (make-instance 'medication :drug-name "Macrozine" :drug-price "14.89" :drug-warnings "Causes feelings of superiority.") )) ``` -------------------------------- ### nconc Usage Examples Source: https://franz.com/support/documentation/ansicl/dictentr/nconc.htm Basic usage examples for the nconc function. ```Common Lisp (nconc) ``` ```Common Lisp (setq foo (list 'a 'b 'c 'd 'e) bar (list 'f 'g 'h 'i 'j) baz (list 'k 'l 'm)) ``` -------------------------------- ### Specify init-file-names Source: https://franz.com/support/documentation/building-images.html Example of providing a list of strings for the :init-file-names argument. ```lisp (".clinit.cl" "clinit.cl") ``` -------------------------------- ### Variable Assignment Example Source: https://franz.com/support/documentation/ansicl/dictentr/letlet.htm A simple example of setting a variable using setq. ```common-lisp (setq a 'top) ``` -------------------------------- ### Example usage of lcm Source: https://franz.com/support/documentation/ansicl/dictentr/lcm.htm A simple example of calling lcm with a single integer. ```lisp (lcm 10) ``` -------------------------------- ### Initialize variables for shiftf example Source: https://franz.com/support/documentation/ansicl/dictentr/shiftf.htm Sets up initial values for x and y to demonstrate shiftf behavior. ```lisp (setq x (list 1 2 3) y 'trash) ``` -------------------------------- ### Set a variable example Source: https://franz.com/support/documentation/ansicl/dictentr/copy-rea.htm A simple example of setting a variable value. ```Common Lisp (setq zvar 123) ``` -------------------------------- ### Hello World hashbang script Source: https://franz.com/support/documentation/startup.html A complete example of a runnable Lisp script. ```lisp #! /usr/local/acl/mlisp -#! (format t "Hello World!~%") ``` ```shell $ chmod 755 hello_world.cl $ ./hello_world.cl Hello World! $ ``` -------------------------------- ### Example Allegro CL startup output Source: https://franz.com/support/documentation/eli.html The expected output in the *common-lisp* buffer upon successful initialization of the interface. ```text Allegro CL 11.0 Copyright (C) Franz Inc., Lafayette, CA, USA ;; Optimization settings: safety 1, space 1, speed 1, ;; debug 2. For a complete description of all compiler ;; switches given the current optimization settings ;; evaluate (EXPLAIN-COMPILER-SETTINGS). ;; Starting socket daemon and emacs-lisp interface... USER(1): ``` -------------------------------- ### Empty block example Source: https://franz.com/support/documentation/ansicl/dictentr/block.htm A minimal example demonstrating the syntax of an empty block. ```lisp (block empty) ``` -------------------------------- ### Non-well-formed XML document examples Source: https://franz.com/support/documentation/sax.html Examples of XML structures that violate well-formedness rules. ```xml document 4: document 5: hello document 6: no elements here. ``` -------------------------------- ### Print Startup Information Source: https://franz.com/support/documentation/startup.html Displays current system variables and compiler optimization settings. ```Common Lisp (excl:print-startup-info t nil) ``` -------------------------------- ### Creating lists with make-list Source: https://franz.com/support/documentation/ansicl/dictentr/make-lis.htm Examples demonstrating the creation of a list of a specific size and a list with a custom initial element. ```Common Lisp (make-list 5) _i.e._, () (make-list 0 :initial-element 'new-element) ``` -------------------------------- ### Well-formed XML document examples Source: https://franz.com/support/documentation/sax.html Examples of XML structures that satisfy the well-formedness criteria. ```xml document 1: document 2: document 3: hello hello hello ``` -------------------------------- ### Ask for List Examples Source: https://franz.com/support/documentation/gpt-ops.html Examples of calling the ask-for-list function to retrieve lists of strings. ```lisp gpt> (ask-for-list "List 2 colors.") ("Blue" "Red") gpt> (ask-for-list "Suggest 5 ways to cook shrimp.") ("Grilling" "Sautéing" "Steaming" "Boiling" "Baking") gpt> (ask-for-list "Name the New England States in alphabetical order.") ("Connecticut" "Maine" "Massachusetts" "New Hampshire" "Rhode Island" "Vermont") ``` -------------------------------- ### Initialize and Start CG/JS Application Source: https://franz.com/support/documentation/cgjs.html A typical sequence of forms to load CG, configure the server, and start the client. ```Common Lisp (require :cg) :pa cg-user (setf (cgjs-server-option :run-as-web-browser-server) t) (defun my-app-function () (make-window :foo :class 'text-edit-window)) (setf (cgjs-server-option :app-function) 'my-app-function) (initialize-cg) (start-cgjs-server) (start-cgjs-client) ``` -------------------------------- ### Network Machines Return Value Example Source: https://franz.com/support/documentation/windows-ops.html Example structure of the list returned by the network-machines function. ```lisp (("\\\\ADMIN" "") ("\\\\BEAST" "Samba 2.0.7") ... ("\\\\SOULCHEESE" "Masako's PC") ...) ``` -------------------------------- ### Start the IDE with browser configuration Source: https://franz.com/support/documentation/cgjs.html Configures whether the IDE launches in a web browser or as a desktop application, and manages local client connectivity. ```Common Lisp (defun start-ide (&key run-in-web-browser (start-local-client t)) ``` -------------------------------- ### XML version declaration examples Source: https://franz.com/support/documentation/sax.html Examples of XML version declarations used at the beginning of documents. ```xml ``` ```xml ``` -------------------------------- ### Slot-value Example Source: https://franz.com/support/documentation/prolog.html Example usage of the slot-value predicate to dynamically bind and read slot values. ```Prolog cl-user(38): (defparameter *inst* (make-instance 'foo)) *inst* cl-user(39): (?- (lisp ?i *inst*) (slot-value ?i a ?sv)) No. cl-user(40): (?- (lisp ?i *inst*) (slot-value ?i a 123) (slot-value ?i a ?sv)) ?i = # ?sv = 123 No. cl-user(41): (?- (lisp ?i *inst*) (slot-value ?i a ?sv)) No. ``` -------------------------------- ### Variable initialization example Source: https://franz.com/support/documentation/ansicl/dictentr/setfpset.htm Initializes variables x and y using setq and cons/list constructors. ```lisp (setq x (cons 'a 'b) y (list 1 2 3)) ``` -------------------------------- ### Configure start-local-client Source: https://franz.com/support/documentation/cgjs.html Sets the start-local-client option programmatically. ```Common Lisp (setf (ide:start-local-client (cg:cgjs-options (ide:current-project))) t) ``` -------------------------------- ### JLinker Example Directory Structure Source: https://franz.com/support/documentation/jlinker.html Lists the available example categories provided in the JLinker distribution. ```text applet/ examples of Java applets connected to Lisp. javabean/ examples of Java Beans connected to Lisp. servlet/ examples of Java servlets connected to Lisp. timecard/ a complete Lisp application using the Java AWT classes for the user interface. ``` -------------------------------- ### Start IDE in 8-bit Image Source: https://franz.com/support/documentation/cgide.html Load the IDE and start it within an existing 8-bit Allegro CL session. ```Common Lisp (require :ide) (start-ide) ``` -------------------------------- ### Usage examples of def-foreign-variable Source: https://franz.com/support/documentation/foreign-functions.html Examples demonstrating how to define and interact with foreign variables in the Lisp environment. ```lisp user(1): (ff:def-foreign-variable sigblockdebug) sigblockdebug user(2): sigblockdebug 0 user(3): (setq sigblockdebug 1) 1 user(4): (ff:def-foreign-variable (print-lso-relocation "print_lso_relocation")) print-lso-relocation user(5): print-lso-relocation 0 user(6): (setq print-lso-relocation 1) 1 user(7): ``` -------------------------------- ### Send SMTP email with authentication and security Source: https://franz.com/support/documentation/post-office-ops.html Examples demonstrating how to send emails using SSL with authentication or STARTTLS negotiation. ```Lisp (use-package :net.post-office) (defparameter *smtp-host* "localhost") (defparameter *smtp-user* "someuser") (defparameter *smtp-password* "somepassword") ;; ssl with authentication (let ((part (make-mime-part :text "This is a test message sent via Secure smtp server with authentication." :headers '(("From" . "Test User ") ("To" . "Recipient ") ("Subject" . "This is a test email"))))) (with-mime-part-constructed-stream (s part) (send-smtp-auth (list *smtp-host* :ssl t :method :sslv3+) *smtp-user* "jimmy@yahoo.com" *smtp-user* *smtp-password* s))) ;; with starttls negotiation (let ((part (make-mime-part :text "This is a test message sent possibly via a TLSv1 encrypted channel." :headers '(("From" . "Test User ") ("To" . "Recipient ") ("Subject" . "This is a test email"))))) (with-mime-part-constructed-stream (s part) (send-smtp (list *smtp-host* :starttls t) *smtp-user* "jimmy@yahoo.com" s))) ``` -------------------------------- ### Signal a winapi-error example Source: https://franz.com/support/documentation/excl-classes.html Example of a winapi-error condition triggered by a failed DLL load operation. ```lisp cl-user(17): (load "foo.dll") ; Foreign loading foo.dll. Error: loading "foo.dll" resulted in error (code 193) "%1 is not a valid Win32 application.". [condition type: winapi-error] ... ```