Skip to content

vedatechnologiesinc/meria

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Meria

Overview

Marie is a tiny collection of Lisp utilities with external dependencies. LispWorks only.

Components

Each section or component is built to improve efficiency and usability for developers working in Lisp environments that can be selectively used depending on the task at hand. You can explore all the functions listed in the table for more details.

Common Utilities

FUNCTIONARGSDESCRIPTION
CURRENT-ISO-8601-DATE (f)N/AReturns the current date and time in ISO 8601 format.
CURRENT-CUSTOM-DATE (f)N/AReturns the current date and time in a custom format, including microseconds and GMT offset.
DEBUG-PRINT (f)TEXT STREAMDisplay TEXT to STREAM prefixing it with the the current date and time.
DEBUG-PRINT* (f)TEXT STREAMDisplay TEXT to STREAM prefixing it with the the current date and time sans the new line.

OS Utilities

FUNCTIONARGSDESCRIPTION
NUMBER-OF-PROCESSORS (f)N/AReturns the number of processors available, platform-dependent.

Stack Utilities

FUNCTIONARGSDESCRIPTION
*STACK-LIMIT* (v)CURRENT-STACK-LENGTHLimits how big the stack is allowed to get by default. This should be a real, T (always extend), or NIL (never extend)
WITH-STACK-EXTENSIONS (m)LIMIT USE-STACK-LIMIT FORMSControls stack extensions in LispWorks, applying a stack limit if specified.

Config Utilities

FUNCTIONARGSDESCRIPTION
CONFIG-DIRECTORY (f)NAMEAccept NAME as argument and returns the path to the default configuration and storage directory.
CONFIG-FILE (f)NAMEAccept NAME as argument and returns the location of the config file of NAME on the disk.
CONFIG-FILE-EXISTS-P (f)NAMEAccept NAME as argument and returns true if the config file exists.
READ-CONFIG-FILE (f)NAMEAccept NAME as argument and reads the configuration file.
*DEFAULT-CONFIG*N/AReturn the default configuration port ‘127.0.0.1’
READ-CONFIG (f)NAMEAccept NAME as argument and returns the most proximate configuration.
CONFIG-VALUE (f)NAME INDEXAccept NAME as argument and returns the value associated with an INDEX in the config.

Server Utilities

FUNCTIONARGSDESCRIPTION
START-HTTPD (f)NAME PORT ADDRESSStarts an HTTP SERVER on the specified ADDRESS and PORT.
STOP-HTTPD (f)SERVERStops the HTTP SERVER.

Threads Utilities

FUNCTIONARGSDESCRIPTION
ShOW-THREADS (f)NONEPrints a list of running threads.
ShOW-THREADS-NAMES (f)NONEPrints a list of the names of the running threads.
FIND-THREADS (f)QUERYFinds threads matching the QUERY.
DESTORY-ThREADS (f)QUERYDestroys threads matching the QUERY.
DESTROY-OThER-ThREADS (f)QUERYDestroys threads not matching the QUERY.

Utilities

FUNCTIONARGSDESCRIPTION
NOTIFY (f)TITLE SUBTITLE MESSAGEDisplays a system notification.
TIME-NOTIFIY^@ (m)ARGSTimes the evaluation of ARGS and displays a notification after evaluation.
SLOTS (f)OBJECTReturns the slot names of the OBJECT.
READ-FILE (f)FILE-PATH SYSTEM-NAMEReads contents from a file at the given path.
UNIQUE-IDS (f)PATHReturns a unique ID for the PATH based on the current date and an MD5 hash of the path.

Usage

Clone this repo to ~/common-lisp:

mkdir -p ~/common-lisp
cd ~/common-lisp
git clone https://github.com/vedatechnologiesinc/meria

You can then load it with QL:QUICKLOAD.

(ql:quickload :meria)

To print the symbols exported:

(marie:syms :meria)

About

A tiny collection of Lisp utilities with external dependencies. LispWorks only.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors