Search Results
37 projects are found.
-
bordeaux-threads
2018-07-11
Bordeaux Threads makes writing portable multi-threaded apps simple.
download 13822 -
bt-semaphore
2018-07-11
A simple semaphore class for bordeaux-threads inspired by SBCL's semaphore.
-
chanl
2017-12-27
Communicating Sequential Process support for Common Lisp
-
green-threads
2014-12-17
A lightweight threading / cooperative multitasking library.
-
patron
2013-04-20
A compact thread pool implementation.
-
portable-threads
2018-01-31
Portable Threads
-
thread-pool
2012-01-07
thread-pool is library that allows asynchronous function execution from a static thread pool.The usage of this library allows programmers to control the number of threads used in a process and avoid the thread creation overhead when new asynchronous computation are needed.Therefore thread-pool may increase overall performance in a multi-thread program. Licence: BSDDependencies: Bordeaux-Threads, arnesiHome page: https://github.com/kiuma/thread-pool. Topics: system programming thread concurrency
-
cl-threadpool
2018-02-28
Implementation of a thread pool
-
single-threaded-ccl
2015-06-08
Create a single-threaded CCL image, so you can fork
-
thread.comm.rendezvous
2012-10-13
Rendezvous thread synchronization
-
trivial-main-thread
2018-08-31
Compatibility library to run things in the main thread.
-
log4cl
2019-01-07
Log4CL is high performance extensible logging library for Common Lisp Home page: https://github.com/sharplispers/log4cl Previous (abandoned) home page: https://github.com/7max/log4cl Status Library is maintained by sharplispers at https://github.com/sharplispers/log4cl. Features Modeled after Log4J with the familiar concepts such as log categories, appenders and layouts No dependencies other then Bordeaux-threads High performance implementation that minimizes consing, with benchmarking showing it faster then log4j in most cases. Buffered and un-buffered stream appenders, console appender, file appender and daily rolling file appender with configurable name are all implemented. Auto-flushing of buffered appenders by background thread. Automatic naming of log categories, so that a log statement that does not specifically name a logger, appearing in a function SOME-PACKAGE:FOO inside of a local flet function BAR, will automatically log into the category SOME-PACKAGE:FOO:BAR Appenders, layouts, and most everything else is implemented via CLOS, and can be easily changed/extended/customized. Automatic log category naming is also implemented via CLOS and can be specialized per-package, so packages can implement their own custom naming options. Easy/abbreviated configuration function for interactive REPL work, with several pre-defined "sane" configurations, as well as traditional log4j like configuration via properties file, with option to auto-reload on changes. Pattern layout, with several enhancements, such as options to modify separator and case (including invert) of log categories, for example one can print log category FOO:BAR:BAZ as foo--bar--baz Multiple logging hierarchies support, with each having an completely independent configuration with regards to log levels and appenders, suitable for example for virtual hosts. Extensive test suite with over 400+ assertions. Tested on SBCL, CCL, CLISP and LispWorks A quick-start guide is provided in README.md file
download 5151 -
slime
2019-01-07
SLIME is the Superior Lisp Interaction Mode for Emacs. This is an ILISP-like development environment intended for maximum integration with CMUCL (also works with SBCL, OpenMCL and work is ongoing on Lispworks and current CVS version of CLISP and CLISP 2.32 on Linux; there is also support packaged separately for Scheme48, called SLIME48).SLIME is now stable and released. Please download the latest version from its home page. Documentation is included there. NOTE: slime-2.0 is too old for use with current versions of SBCL. Fetch slime from CVS.Want to try SLIME? Check out the SLIME-HOWTO or read about the SLIME Features. You can also check out some SLIME Tips.Users are invited to post feature suggestions on this page. Ability to pin certain things (arglist info, debugger, repl) into dedicated frames for nice multi-window operation -- Zach Make the slime faces inherit from the standard font-lock faces when appropriate (eg making the REPL output face inherit from font-lock-comment-face) -- Brian Note: Although it is possible to connect to a Lisp on a remote machine, we haven't yet figured out what does and doesn't work without a shared filesystem. Maybe this can be made tramp-aware? -- Rahul Jain Clear *use-dedicated-output-stream* before connecting works for me so far. -- ngps Autodetection of LINEDIT (or other random REPL wrappers) and calling LINEDIT's UNINSTALL-REPL before running SWANK. I tried to add something in slime-maybe-start-lisp in slime.el to do so, but comint-proc-query was uncooperative and kept hanging. -- James A. Crippen Some REPL conveniences, such as ILISP's C-z P (set package). The SLIME equivalent of the latter is SLIME-REPL-SET-PACKAGE, anything else? Some way to get a REPL in the current debugger frame, for more serious playing around I second the motion. It would be very useful to keep a record of what was evaluated and what printed, sort of like a ... read-eval-print loop! It's amazing that this crucial feature of Lisp was discarded in the SLIME model; its absence really detracts from usability. Drew McDermott -- 2005-12-09. I would also very much like this feature! -Lars Rune Nøstdal Working symbol-completion when you enter expressions in the mini-buffer "Getting ILISP working was a nightmare. Getting SLIME working was a breeze, even though I had to check it out of CVS" (Steve Jenson, saladwithsteve.com) If your connection to ssh forwarded swank server doesnt work, try to (setf swank::*use-dedicated-output-stream* nil) Maybe: Visit a file "through" the lisp process: slime instructs lisp process to open the file and squirt it across connection back to an emacs buffer. When buffer is saved in emacs, squirt back to lisp process. Potentially very nice for long-lived lisp server processes (provided your slimeswank is a secure channel!), and skirts the whole path-translations thing: the only correct path is the path the lisp process uses i.e. you're not doing C-xC-f emacs-file-path, you're doing C-cC-xC-f (or something saner) CL-file-path. (obviously, you'd provide tab completion for CL-file-path, too ;-) ) See the variable `file-name-handler-alist' for how you might want to do this. How about unified directory access! I know there are some packages out there, but it would be wonderful to have this come with slime. It would be nice to have it as a part of the development environment. It's hard for me to switch between different implementations of CL otherwise. (for example, (:cd "dir") doesn't work when using SLIME with OpenMCL...) Update: I found directory functionality by typing a comma then entering 'cd' into the minibuffer. SLIME RULES! It would be nice if I could have fixed Emacs windows for different SLIME buffers. Like, if I evaluate something and the debugger pops up, I never know where it's going to be (I usually have several Emacs frames and windows open). I would like to say "this will be the REPL window, and I want nothing else there" -- another window for the debugger, another for Lisp code etc. - You can kind of do this with the Emacs Code Browser, if you tell it the repl is a compilation window. It provides a fixed and togglable compilation window at the bottom of the first frame. To add a note about using the standard font-lock faces, the keywords from the appropriate mode should also be used. That is, SLIME should use the lisp-mode-font-lock-keywords-... variables. I have diffrerent ones for Common Lisp, Scheme, and Emacs Lisp, so it would be nice to have this customizable for SLIME. Or better yet, since Emacs's default keywords for Lisp are pretty ELisp-centric maybe SLIME should provide its own set of Common Lisp--centric font-lock keywords, leaving the user to decide whether to copy those for Emacs's Lisp-mode or not. -- James A CrippenSounds a good idea to me. Can you post the code you use somewhere so we can use it as a basis? -- Luke GorrieSome responses..A "Recent Changes" popup: Can you elaborate a bit? The ChangeLog file + the mailing list is supposed to fill this role, but feedback about the effectiveness would be appreciated. -- Luke GorrieIt might be nice to just add a link to the latest ChangeLog in CVS, like so Latest ChangeLog. Stick that on the project home page. -- James A Crippen Good idea. ChangeLog and mailing lists are now linked.Re: "Recent Changes Popup": Especially with the daily ChangeLog diff on the list, this is a solved problem for me at least. I suspect that people following the CVS, but not the list deserve to lose (like I did...). OTOH: I can imagine having a busy month, then updating SLIME, and not noticing all the new goodies. ;) So in the bells and whistles department, SLIME offering to show it's own ChangeLog since last update would be kind of neat -- but definitely not a priority.As far as using slime remotely: if you have a shared filesystem but not with identical mountpoints, the patch included in this mail provides you with a M-x slime-replace-prefix function which causes a few uses of filenames to be translated (but only in the emacs->lisp direction).The full cygwin-windows cycle is translated by these hooks, working for any cygwin mountpoint. --ReiniUrbanThere is the beginnings of MP (threading) support in SLIME CVS. See the mailing list for detailsSlime DistributionsInformation, for fetching the source distribution, is available at the Slime homepage.For fetching Slime via cvs, information is available, also, at the Slime homepage.Debian packagesSlime has got an official Debian package.It is under the non-free section of Debian mostly because of the license of one file (xref.lisp). So, should it stay on CLiki.net? -- alceste@NOSPAM.muvara.orgMac OS X A fink package for Mac OS X (10.3) is also available in fink's unstable tree.Slime is available in MacPorts, current port is based on 20110419 CVS snapshot.
download 3257 -
hunchentoot
2017-12-27
Hunchentoot is a HTTP server based on USOCKET and BORDEAUX-THREADS. It supports HTTP 1.1, serves static files, has a simple framework for user-defined handlers and can be extended through subclassing.
download 2189 -
beirc
2015-05-05
beirc is a CLIM IRC client Application using the cl-irc library as a backend, initially written by Gilbert Baumann, now maintained by Dave Murray and others.Source code and screen shots are available at common-lisp.net/project/beirc.Beirc requires the newest CVS version of cl-irc and McCLIM, as well as Max-Gerd Retzlaff's tab-layout-pane . Note also that beirc currently requires a lisp that supports multiple processes. The developers are using multithreaded SBCL on x86/linux and OpenMCL on ppc/darwin. CMUCL on x86 could work, as well. (More details are available in the table below. If you get beirc running on a system not noted there, please add it.)Warning: The sound support in beirc is currently very experimental. It works on ACL, probably works on SBCL, and almost certainly only on Unix variants. FeaturesCustomizable variablesThese can be set in the .beirc.lisp file in your home directory (although this too can be changed in variables.lisp): *hyperspec-base-url* Set to url (as a string) of your local copy of the Hyperspec and specbot's clhs query answers will be rewritten appropriately. *default-fill-column* The maximum width in characters of the message column (as distinct from the name column and the timestamp column). Defaults to 80. *timestamp-column-orientation* The position of the timestamp column on the screen. Either :right (the default) or :left. *default-nick* Your nick, as a string. *default-web-browser* The command (as a string) to run your web browser. Should work out-of-the-box. *auto-join-alist* An alist mapping an irc server name (as a string) to a list of channels (each a string) to automatically join on connecting. *nickserv-password-alist* An alist mapping an irc server name (as a string) to the password (as a string) to send to the NickServ authentication bot. *default-sound-player* A string naming a program (or a program and command-line arguments) that will read sound files from standard input and play them. Used for rudimentary sound support. *sound-for-my-nick* A filename (string) that specifies a file to be played (by *default-sound-player*), when your nick is mentioned. Could be NIL instead. Commands /Connect server nick /Identify Identify yourself to the NickServ service. /Join channel /Focus nick Display messages from nick in bold. /Unfocus nick Stop displaying messages from nick in bold. /Ignore nick Don't display any messages from nick, past or future. /Unignore nick Display messages from nick again. /Nick string Change nick to string. /Me stuff Do stuff. /Msg nick message Send message to nick. /Reload Reload the user init file. /Part message Leave the channel with message. /Close window[,window2...] Close the list of windows. If any of these windows refers to a channel, leave each channel. /Whois nick Perform a WHOIS query on nick. /Topic [:Topic new topic] If executed without keyword arguments, shows the current channel topic. If passed the :Topic keyword argument, sets the current channel topic to new topic. /Op nick Give channel operator status to nick. /Deop nick Remove channel operator status from nick.. /Ban Nick nick Set channel mode +b (ban) to nick!*@*. /Ban Hostmask hostmask Set channel mode +b (ban) to hostmask. /Kick nick Kick nick from the current channel. /Names Display the list of users on the current channel. /Away message Set away status to message. /Quit message Disconnect from the server with message and terminate beirc. /Disconnect message Disconnect from the server with message. /Switch Timestamp Orientation Sets orientation of timestamps to the left column if they are in the right column and vice versa. Mouse InteractionThere's an awful lot of it. Many items are displayed as clickable CLIM presentations, including nicks, URLs, tabs for servers and channels, etc., allowing easy access to basic commands. Documentation for whatever you're about to do by clicking is provided, as in other CLIM apps, in the lowest, black pane; this gives you an idea of what, if anything, will happen when your Left, Middle or Right click occurs.Working SystemsThe following Hardware/OS/Lisp Implementation combinations are known to run beirc (somewhere, at least): Hardware Platform OS OS Version Lisp Implementation Intel x86 Debian GNU/Linux 3.1, kernel 2.6.13 Multithread SBCL 0.9.5 Intel x86 Mandriva GNU/Linux 3.1, kernel 2.6.12 Allegro CL 8.0 PowerPC G4 OS X 10.4.2 OpenMCL 0.14.4-pre-050807a Wish List /list command, or users pane a la XChat. Working help. Some hints about keystrokes (this is really at least partly a McCLIM issue). A pony. The moon. On a stick. "IRC clients should show a diff on topic change."OdditiesThings that should probably be fixed, once we know what causes them. URL handling for URLs that appear in the chat as () does not work. AFAICT, the url is forwarded to the browser together with the opening paren, causing failure. Would be nice to have auto-identify, the same way we have auto-join. Use of help command causes error. Error: attempt to call `#:STREAM44679' which is an undefined function. List of commands that you get on right click should be listed alphabetically (or possibly even in nested menus, since the list is so long). There are many ways to cause the system to fail with completion errors. These should be trapped. Some of this is more McCLIM problems than BEIRC proper, I figure.Old bugs: The box-adjuster-gadget does not work for me (rpg). It comes active, but is unable to adjust the size of the windows. Seems not to happen for others (antifuchs) with different setups (possibly more up-to-date CLX than the version included with ACL?). This seems to be a problem with the setting of min-height in the space-requirement for the tab-layout-pane. I have not yet been able to track down where this is set. fixed: There were exact pixel sizes coded in as :height and :width. By default, any window settings are copied into :min-height and :min-width. Being a little more careful about the difference between :height (resp. width) and :min-height, seems to have fixed things up.
-
blackbird
2016-05-31
A promise implementation for Common Lisp.
-
cacle
2017-12-27
Extensible cache services for Common Lisp
-
calispel
2017-08-30
Thread-safe message-passing channels, in the style of the occam programming language.
-
cl-async
2019-01-07
Asynchronous operations for Common Lisp.
-
cl-async-future
2015-01-13
A futures implementation for Common Lisp. Plugs in nicely to cl-async.
-
cl-gtk2
2012-09-09
CL-GTK2 is a Common Lisp GUI library that provides access to the Gtk+ cross-platform GUI library in idiomatic Lisp style.CL-GTK2 should portably work in most modern Lisps that support CFFI and MOP (works at least in SBCL, Clozure CL on Linux and Windows). Current version is 0.1.1 released on 2009.12.30.cl-gtk2 blog contains news on development of CL-GTK2. There is also a common-lisp.net website, with more documentation.CL-GTK2 is ASDF-installable (install the :CL-GTK2-GTK, :CL-GTK2-CAIRO and :CL-GTK2-GTKGLEXT systems).Requirements: FFI with callbacks (via CFFI) Threading (via Bordeaux-Threads) Weak references (weak hash-tables) and finalizers (via Trivial-Garbage) CLOS Metaobject Protocol (via Closer-MOP) Features: Provides Gtk+ API in a Lispy way (Almost) Complete Gtk+ API Objects and classes are mapped into CLOS objects and classes Gtk+ objects are garbage collected Error in objects' signal handlers are restartable Provides some higher-level abstractions over Gtk+ facilities: Calling code in GUI thread (call-within-main-loop, call-within-main-loop-and-wait) Displaying progress-bar for long-running code (with-progress-bar) Displaying errors (with-gtk-message-error-handler) Examples: Source code Screenshot (defun run () (let ((output *standard-output*)) (gtk:within-main-loop (let ((window (make-instance 'gtk:gtk-window :type :toplevel :window-position :center :title "Hello world!" :default-width 300 :default-height 100)) (button (make-instance 'gtk:button :label "Hello, world!")) (counter 0)) (gobject:g-signal-connect button "clicked" (lambda (b) (declare (ignore b)) (format output "Hello, world!~%") (setf (gtk:button-label button) (format nil "Hello, world! (clicked ~D times)" (incf counter))))) (gtk:container-add window button) (gtk:widget-show window :all t))))) (run) (defun demo-class-browser () (let ((output *standard-output*)) (gtk:within-main-loop (let* ((window (make-instance 'gtk:gtk-window :window-position :center :title "Class Browser" :default-width 400 :default-height 600)) (search-entry (make-instance 'gtk:entry)) (search-button (make-instance 'gtk:button :label "Search")) (scroll (make-instance 'gtk:scrolled-window :hscrollbar-policy :automatic :vscrollbar-policy :automatic)) (slots-model (make-instance 'gtk:array-list-store)) (slots-list (make-instance 'gtk:tree-view :model slots-model))) (let ((v-box (make-instance 'gtk:v-box)) (search-box (make-instance 'gtk:h-box))) (gtk:container-add window v-box) (gtk:box-pack-start v-box search-box :expand nil) (gtk:box-pack-start search-box search-entry) (gtk:box-pack-start search-box search-button :expand nil) (gtk:box-pack-start v-box scroll) (gtk:container-add scroll slots-list)) (gtk:store-add-column slots-model "gchararray" (lambda (slot) (format nil "~S" (closer-mop:slot-definition-name slot)))) (let ((col (make-instance 'gtk:tree-view-column :title "Slot name")) (cr (make-instance 'gtk:cell-renderer-text))) (gtk:tree-view-column-pack-start col cr) (gtk:tree-view-column-add-attribute col cr "text" 0) (gtk:tree-view-append-column slots-list col)) (labels ((display-class-slots (class) (format output "Displaying ~A~%" class) (loop repeat (gtk:store-items-count slots-model) do (gtk:store-remove-item slots-model (gtk:store-item slots-model 0))) (closer-mop:finalize-inheritance class) (loop for slot in (closer-mop:class-slots class) do (gtk:store-add-item slots-model slot))) (on-search-clicked (button) (declare (ignore button)) (gtk:with-gtk-message-error-handler (let* ((class-name (read-from-string (gtk:entry-text search-entry))) (class (find-class class-name))) (display-class-slots class))))) (gobject:g-signal-connect search-button "clicked" #'on-search-clicked)) (gtk:widget-show window))))) (demo-class-browser) Gtk GTK binding
-
cl-mpi
2018-07-11
CL-MPI provides portable, CFFI-based Common Lisp bindings for the Message-Passing Interface (MPI). It was written by Marco Heisig.CL-MPI enables parallel programming in Common Lisp using a message-passing model on either a distributed cluster of machines, or a single multicore machine. It has been successfully tested with SBCL, CCL and ECL, and fot the MPI implementations MPICH, OpenMPI and IntelMPI.CL-MPI can also be used to provide "true" multiprocessing for some Common Lisp implementations which have no native threading capabilities.Homepage: http://github.com/marcoheisig/cl-mpiLicense: MIT
-
cl-opengl
2019-01-07
Common Lisp bindings to OpenGL.
-
clsql
2016-02-08
Common Lisp SQL Interface library
-
clsql-fluid
2017-08-30
Common Lisp SQL Fluid Connection Pools
-
conium
2018-08-31
Conium is a portability library for debugger- and compiler-related tasks in Common Lisp.It is fork of swank-backend and differs from swank in the following regards: The swank frontend has been removed, leaving a Lisp library rather than a socket server. The swank-loader has been removed. Conium always uses ASDF instead of a manual load script. Code related to threads has been removed. (Use bordeaux-threads instead.) Code related to the MOP has been removed. (Use closer-mop instead.) Code related to gray streams has been removed. (Use trivial-gray-streams instead.) Code related sockets has been removed. (Use usocket, iolib, or in Hemlock's case, the connection API instead.) The package SWANK-BACKEND has been renamed to CONIUM. It is currently being maintained by David Lichteblau and retains its original public domain status.Downloadgit clone git://gitorious.org/conium/conium.gitsystem programming
-
hu.dwim.logger
2015-12-18
Generic purpose logger utility.
-
hu.dwim.util
2017-10-19
Various utilities, this is the most basic system that only introduce a small number of external dependencies.
-
iolib
2018-02-28
I/O library.
-
jpl-queues
2010-10-06
A few different kinds of queues, with optional multithreading synchronization.
-
meta-sexp
2010-10-06
meta-sexp is a META parser generator using LL(1) grammars with s-expressions. meta-sexp uses in-memory string vectors, instead of commonly used streams, for efficiently stepping backward and forward through the input. It is tested on SBCL but should be portable to other implementations as well.meta-sexp is implemented using sevaral transformation methods. Therefore, besides builtin grammar transformators coming with meta-sexp by default, you are allowed to add your own transformation methods too.Project is released under BSD license and currently maintained by Volkan YAZICI.(Tarball comes with the latest .git source tree. Feel free to play with it.)Inspired by src/parser.lisp of core-server project at http://labs.core.gen.tr/.Idea is based on the META language discussed in `Pragmatic Parsing in Common Lisp' paper of Henry G. Baker [ACM Lisp Pointers 4, 2 (Apr/Jun 1991), 3-15]Quick IntroductionIn most of the time, you'll need to define your own parsers using CREATE-PARSER-CONTEXT methods and DEFRULE, DEFRENDERER macros. create-parser-context ((input string) &key start end attachment) create-parser-context ((input string-stream) &key buffer-size start end attachment)defrule (name (&rest args) (&optional attachment) &body body) defrenderer (name (&rest args) (&optional attachment) &body body)In a rule or renderer body, if supplied, ATTACHMENT argument will get bound to ATTACHMENT keyword given to CREATE-PARSER-CONTEXT.In some certain situations, you may also need to use DEFATOM too. See atoms.lisp for DEFATOM examples.Here is a tiny example: (defrule integer? (&aux (sign 1) d (num 0)) () (:? (:or (:and "-" (:assign sign -1)) "+")) (:+ (:assign d (:type digit?)) (:assign num (+ (* num 10) (- (char-code d) #.(char-code #\0))))) (:return (* sign num))) (integer? (create-parser-context "+123")) ==> 123 (integer? (create-parser-context "-123")) ==> -123 (defrule in-wonderland? () () "META-SEXP" (progn (format t "META-SEXP in Wonderland!") (meta (:type space?) "in Wonderland!")) (:return t)) (in-wonderland? (create-parser-context :data "META-SEXP in Wonderland!")) META-SEXP in Wonderland! ==> T (in-wonderland? (create-parser-context :data "META-SEXP in Fooland!")) META-SEXP in Wonderland! ==> NIL Here's a complete example with renderers and attachments. (defrenderer internal-link! (label &optional text) (attachment) (format attachment "<a href='~a'>~a</a>" label (if (empty-char-accum-p text) label text))) (defrule internal-link? (&aux (ref (make-char-accum)) (text (make-char-accum))) () "[[" (:+ (:not (:or "]]" (:type (or white-space? newline?)))) (:char-push ref)) (:? (:* (:type (or white-space? newline?))) (:+ (:not "]]") (:char-push text))) "]]" (:render internal-link! ref text)) (defrule wiki-markup? (&aux c) (attachment) (:* (:or (:rule internal-link?) (:and (:assign c (:read-atom)) (write-char c attachment)))) (get-output-stream-string attachment)) (wiki-markup? (create-parser-context "foo bar [[ref text]] and [[just-ref]] here." :attachment (make-string-output-stream))) ==> "foo bar <a href='ref'>text</a> and <a href='just-ref'>just-ref</a> here." What's the role of ATTACHMENT slot given to CREATE-PARSER-CONTEXT (or specified as a keyword while making an instance of PARSER-CONTEXT class)? Think it as a state storage unit between passes to defined rules and renderers. (For instance, in our above example, ATTACHMENT used as a common output stream.) Yes, it is possible to let this problem get solved by the programmer, e.g. via global variables. But this approach yields to another problem: thread safety. Anyway, that was the best that I can come up with; if you have any other ideas, I'd be happy to hear them.Available Type Checkers These functions (and types) are routines introduced using DEFATOM and operates on character codes. In case of need, you can add your own type checkers. (See source for examples.)ALNUM? ALPHA? GRAPHIC? ASCII? BIT? DIGIT? EXTENDED? LOWER? NEWLINE? SPACE? TAB? UPPER? WHITE-SPACE?Available Transformation Directives (:ICASE FORM FORM ...) Process supplied FORMs case-insensitive.(:CHECKPOINT FORM FORM ...) If form returns NIL, cursor will be back-positioned to its old location :CHECKPOINT keyword was used.(:AND FORM FORM ...) (:OR FORM FORM ...) (:NOT FORM) Besides its normal behaviour, (:NOT ...) expressions automatically get encapsulated in (:CHECKPOINT ...) clauses.(:RETURN VAR VAR ...) Returns supplied variables using VALUES function.(:RENDER RENDERER ARG ARG ...) Calls specified RENDERER (that is defined with DEFRENDERER) with supplied arguments.(:? FORM FORM ...) May appear once. (Similar to `?' in regular expressions.)(:* FORM FORM ...) May appear none or more. (Similar to `*' in regular expressions.)(:+ FORM FORM ...) Must appear at least once. (Similar to `{1,}' in regular expressions.)(:TYPE TYPE-CHECKER) (:TYPE (OR TYPE-CHECKER TYPE-CHECKER ...)) Checks type of the atom at the current position through supplied function(s).(:RULE RULE ARG ARG ...) (:RULE (OR RULE RULE ...) ARG ARG ...) Tests input in the current cursor position using specified type/form. If any, supplied arguments will get passed to rule.(:ASSIGN VAR FORM) (:ASSIGN (VAR VAR ...) FORM) Assigns returned value of FORM to VAR, and returns assigned value. (Latter form expands into MULTIPLE-VALUE-SETQ.)(:LIST-PUSH ITEM-VAR LIST-ACCUM) (:CHAR-PUSH CHAR-VAR CHAR-ACCUM) (:CHAR-PUSH CHAR-ACCUM) Pushes supplied ITEM-VAR/CHAR-VAR into specified LIST-ACCUM/CHAR-ACCUM. If :CHAR-PUSH is called with only one argument, current character gets read and pushed into supplied accumulator. (You can use MAKE-LIST-ACCUM and MAKE-CHAR-ACCUM functions to initialize new accumulators. Moreover, you'll probably need EMPTY-LIST-ACCUM-P and EMPTY-CHAR-ACCUM-P predicates too.)(:LIST-RESET LIST-ACCUM) (:CHAR-RESET CHAR-ACCUM) Resets supplied accumulators. (:EOF) Returns true when reached to the end of supplied input data.(:READ-ATOM) Reads current atom at the cursor position.(:DEBUG) (:DEBUG VAR) Prints current character and its position in the input data. If VAR is supplied, its current value gets printed. If a form doesn't start with any of the above keywords, there're three possiblities remaining: This can be a character. This can be a string. (Expand it into character list form and return to 1st step.) Treat as a custom form. (Will get evaluated as is.) When you're in the third situation, to be able to get your META s-expressions compiled again, use META keyword. (See the second example in the Quick Introduction.)Introducing New TransformationsEvery transformation process issued by meta-sexp is controlled by TRANSFORM-GRAMMAR methods.(defgeneric transform-grammar (ctx in-meta directive &optional args) (:documentation "META grammar transformation methods."))To introduce a new transformation directive, just create a new TRANSFORM-GRAMMAR method with related lambda list specializers. For instance, consider how :AND and :NOT directive transformations are implemented:(defmethod transform-grammar (ctx (in-meta (eql t)) (directive (eql :and)) &optional args) `(and ,@(mapcar #'(lambda (form) (transform-grammar ctx t form)) args))) (defmethod transform-grammar (ctx (in-meta (eql t)) (directive (eql :not)) &optional args) (transform-grammar ctx t :checkpoint `((not ,(transform-grammar ctx t (car args))))))Also pay attention how meta-sexp handles unrecognized transformation directives:(defmethod transform-grammar (ctx in-meta directive &optional args) "The most unspecific transformation method." (declare (ignore args)) (cond ((and in-meta (consp directive) (keywordp (car directive))) (transform-grammar ctx t (car directive) (cdr directive))) ((and (not in-meta) (consp directive) (eql 'meta (car directive))) (transform-grammar ctx t :and (cdr directive))) ((consp directive) (mapcar #'(lambda (form) (transform-grammar ctx nil form)) directive)) (t directive)))With similar patterns, you can introduce new transformation directives to meta-sexp.References ALIW project uses meta-sexp to parse the common wiki syntax that is adopted by the most popular wiki projects. (e.g. wikipedia, trac, moin moin.)
-
pileup
2015-07-09
A portable, performant, and thread-safe binary heap / priority queue.
-
portableaserve
2015-09-23
Portable AllegroServe is a fork of the AllegroServe webserver, adapted to work with other CL implementations, not only with Allegro CL. So far the following implementations are supported, to varying degrees: CMU Common Lisp Steel Bank Common Lisp GNU clisp (only single-threaded operation) OpenMCL Xanalys Lispworks MCL Scieneer Common Lisp (slightly broken as of 2004-02-29) Corman Common Lisp (with non-standard install method, might be broken as of 2004-02-29) Allegro Common Lisp portableaserve.sf.net For SBCL, there is a Portable Allegroserve Enhanced Version for SBCL,
-
quux-hunchentoot
2018-04-30
Thread pooling for hunchentoot
-
stmx
2018-10-18
STMX is an actively maintained, high-performance concurrency library providing Transactional Memory for Common Lisp.Home page and downloads: http://github.com/cosmos72/stmx Main features Extremely intuitive to use and to write correct, thread-safe concurrent code Brings database-style transactions to Common Lisp by introducing transactional memory High performance implementation, benchmarked to exceed 7 millions transactions per CPU core per second on commodity PC hardware Support for hardware memory transactions (requires 64-bit SBCL and CPUs with Intel TSX instructions - currently Core i5 4570, Core i7 4670, Core i7 4770 and some others). They increase STMX performance up to almost 40 millions transactions per CPU core per second Removes the need for traditional locks, mutexes and conditions - writing correct concurrent code with them is well known to be hard Transactional code is intrinsically deadlock-free: if two transactions conflict one of them will be re-executed Automatic commit and rollback: if a transaction completes normally it will be committed, if it signals an error it will be rolled back Transactions are composable: they can be executed in a larger transaction, either in sequence (all-or-nothing) or as alternatives (try them until one succeeds) Offers freedom of choice between blocking and non-blocking transactional functions: given either behaviour, it is trivial to transform it into the other. Features transactional versions of popular data structures: hash tables, red-black trees, stack, fifo Includes transactional data structure for multicast publish/subscribe Creating new transactional data structures is easy Extensive test suite Tested on SBCL, ABCL, CCL, CMUCL and ECL. Very simple to install with Quicklisp A quick-start guide and installation instructions are provided in README.md fileLicense: LLGPL What STMX is NOT In order not to confuse programmers - less experienced ones in particular - and to avoid rising unrealistic hopes, the author himself stated the following about STMX: it is NOT a quick hack to automagically transform existing, slow, single-threaded programs into fast, concurrent ones. No matter how much transactions can help, writing concurrent code still requires careful design and implementation - and testing. And refactoring takes time too. it is NOT for optimization-focused programmers trying to squeeze the last cycle from their Common Lisp programs. STMX records an in-memory transaction log containing all reads and writes from/to transactional memory, then later (during commit) validates the transaction log against the latest data present in transactional memory and finally copies the transaction log onto the transactional memory while holding locks. STMX is quite optimized, but this machinery comes at an obvious performance cost with respect to hand-made, highly optimized locking code (but a good reality check is to ask yourself how many people have the skill and patience to write such code without bugs). it is NOT supposed to be used for all data structures in a Common Lisp program. STMX is intended only for the data accessed concurrently by multiple threads while being modified by at least one thread. And even in that case, transactional memory is not always needed: it depends on the kinds of modifications. it is NOT a serialization or persistence framework. Rather, messing with metaclasses and playing (allowed) tricks with slots contents as STMX does, quite likely does not mix well with serialization or persistence libraries such as CL-STORE, because they typically need full control on the slots of the objects to be serialized and de-serialized. it is NOT a million dollar library from some deep-pocket company. At the moment, it is the work of a single person.
-
telnetlib
2014-12-17
telnetlib is a networking library for doing Telnet. It is ported from Python's telnetlib library and quite useful for writing automatical scripts. ;; -*- MODE: LISP -*- ;; ;; Brian Jiang (brianjcj AT gmail.com) ;; 2007-11 ;; ;; TelnetLib ;; ========= ;; In our ordinary work, we often write some automatically scripts ;; which login in the server to run some commands and performce some ;; actions based on the result of the commands. In this case, a telnet ;; client library will be very helpful. Such a library is very handy ;; in Perl, Python and Ruby. But I googled it a lot and failed to find ;; one in Common Lisp. So I decided to port the Telnetlib from Python ;; to Common Lisp. Why port from Python? Because I am more familiar ;; with Python and have use its TelnetLib before :-) ;; ;; The functionality of this library is almost the same as Python's ;; one. But the interface is a little different. ;; Supported Lisp implementations ;; ============================== ;; - SBCL ;; - LispWorks ;; - Allegro CL ;; - CLISP ;; ;; TelnetLib also supports other Lisp implementations (require USOCKET ;; and FLEXI-STREAMS) . But I have never done any testing for them. ;; Testing: ;; -------- ;; TelnetLib has been tested in following environment: ;; - sbcl-1.0.11-x86-linux ;; - LispWorks in Windows XP ;; - Allegro CL in Windows XP ;; - CLISP 2.43 in Linux ;; - CLISP 2.41 in Windows XP ;; ;; But it failed in sbcl-1.0.9 in Windows XP. Error occurs ;; when writing the socket stream. ;; Library Dependency ;; ================== ;; For SBCL, LispWorks, Allegro CL and CLISP, it only depends on ;; CL-PPCRE. ;; For other Lisp implementations, USOCKET and FLEXI-STREAMS (to ;; set the external-format) are also required. ;; Known Problem ;; ============= ;; Don't work well when telent localhost. It seems it is due to the process/thread ;; schedule mechanism. Will try to fix it in the future. ;; How to use it ;; ============= ;; Export functions/macros: ;; ------------------------ (defun open-telnet-session (host &optional port)...) (defun close-telnet-session (tn)....) (defmacro with-telnet-session ((tn host &optional port) &body body)....) (defun set-telnet-session-option (tn &key (remove-return-char nil r-r-c-p) (debug-on nil debug-on-p) (char-callback nil char-callback-p) (option-callback nil option-callback-p) (sb-option-callback nil sb-option-callback-p))...) (defun peek-available-data (tn &optional block-read)....) (defun read-available-data (tn &optional block-read).... (defun read-until (tn str &key (timeout 600) case-insensitive-mode)....) (defun read-until-2 (tn strings &key (timeout 600) case-insensitive-mode)....) (defun read-until-2-ind (tn strings &key (timeout 600) case-insensitive-mode)....) (defun expect (tn regexp &optional (timeout 600))....) (defun format-tn (tn control-string &rest format-arguments)....) (defun write-ln (tn str)....) (defun write-ln-crlr (tn str)....) ;; Example: ;; -------- (defun example-1 () (with-telnet-session (tn "202.38.33.94") (set-telnet-session-option tn :remove-return-char t) (read-until tn "ogin:") (write-ln tn "brianjcj") (read-until tn "assword:") (write-ln tn "abcdefg12") (read-until tn ">") (format-tn tn "~A~%" "pwd") ;; stupid demo :-) (read-until tn ">") (write-ln tn "cmd1") (read-until-2 tn (list "Done." "Error" "Pending.") :case-insensitive-mode t) (read-until tn ">") (write-ln tn "cmd2") (expect tn (cl-ppcre:create-scanner "OK\|NO" :case-insensitive-mode t)) (read-until tn ">") (write-ln tn "cmd3") (expect tn "Done\|Try later.") (read-until tn ">") (write-ln tn-vmap "unload testci") (case (read-until-2-ind tn (list "Please confirm (" "has not been loaded yet")) ((0) (read-until tn *prompt*) (sleep *rest-time*) (write-ln tn "Y") (read-until tn *prompt*)) ((1) (read-until tn-vmap *prompt*))) (write-ln tn "exit") (loop until (eof tn) do (read-available-data tn t)) )) (defun example-2 () (with-telnet-session (tn "202.38.33.94") (set-telnet-session-option tn :char-callback nil) (princ (read-until tn "ogin:")) (write-ln tn "brianjcj") (princ (read-until tn "PassWord:" :case-insensitive-mode t)) (write-ln tn "zaq12WSX") (princ (read-until tn ">")) (write-ln tn "ls") (princ (read-until tn ">")) (write-ln tn "cmd1") (princ (expect tn "Done\|Error")) (princ (read-until tn ">")) (write-ln tn "cmd2") (princ (read-until-2 tn (list "OK." "Try again" "Later.") :timeout 10)) (princ (read-until tn ">")) (write-ln tn "cmd3") (princ (read-until-2 tn (list "Right" "Wrong") :timeout 10 :case-insensitive-mode t)) (princ (read-until tn ">")) (write-ln tn "cmd4") (princ (expect tn (cl-ppcre:create-scanner "Right\|Wrong" :case-insensitive-mode t))) (princ (read-until tn ">")) (write-ln tn "exit") (loop until (eof tn) do (princ (read-available-data tn t))) ))
-
trivial-dump-core
2017-02-27
trivial-dump-core: Wrapper that allows the saving of the current lisp image as a "core" or as an "executable" across implementations.