Skip to content

igorhvr/bedlam

Folders and files

NameName
Last commit message
Last commit date
Sep 2, 2019
Oct 3, 2018
Jan 30, 2025
Jan 30, 2025
Sep 18, 2014
Dec 13, 2021
Mar 15, 2025
Mar 15, 2025
Oct 24, 2024
Oct 3, 2018
Sep 3, 2009
Dec 13, 2021
Oct 3, 2018
Oct 3, 2018
Oct 3, 2018
Feb 12, 2014
Mar 11, 2025
Oct 3, 2018
Mar 15, 2025
Jul 16, 2020
Oct 3, 2018
Oct 24, 2024
Jul 23, 2019
Jul 23, 2019
Sep 3, 2009
Oct 3, 2018
Aug 19, 2019
Jul 23, 2019
Oct 3, 2018
Sep 3, 2009

Repository files navigation

Bedlam is a set of Scheme libraries for SISC conveniently packaged together.

To use this code you should simply do (replace the directory entry below by the place where you decompressed bedlam):

   (begin (define iasylum-bedlam-location "/base/bedlam/") (load (string-append iasylum-bedlam-location "iasylum/init.scm")))

under SISC 1.16.6 or later.

Another option is simply including jars/bedlam-bundle.jar and the other .jar files in lib in your project and using the BedlamBundleInit java class.

Finally, docker images are provided. See docker/ and docker-ubuntu/.

Why?

   This was developed during years and supports several production deployments of SISC. Sisc is a great Scheme implementation and having a big glob of wrappers and general scheme utilities to use in multiple projects has proved very useful.

What is supported?

   * XML through the sxml (http://okmij.org/ftp/Scheme/xml.html#SXML-spec) library ( some easy-to-grasp included in ./docs/sxml-tutorial.html ).

   * Basic job scheduling support using Quartz (http://www.quartz-scheduler.org/) to schedule Scheme Closures for execution using crontab-like notation.

   * jcode - an alternative FFI for Java that is  really easy to use.
Two examples (of use of jcode):
     http://github.com/igorhvr/bedlam/blob/master/iasylum/email.scm
     http://github.com/igorhvr/bedlam/blob/master/iasylum/excel.scm

   * Alex Shinn's: implementation of a pattern-matching library (see match.pdf inside for details on how to use it), irregex (http://synthcode.com/scheme/irregex/ ) excelent regular expressions & SRE library, and fmt (for formatting things to strings - beware that it as it stands fails for huge exact numbers).

   * SRFI-88 (keyword objects / http://srfi.schemers.org/srfi-88/srfi-88.html) support (reference implementation used - no self-evaluation property of keyword objects).

   * SRFI-89 (optional and named parameters / http://srfi.schemers.org/srfi-89/srfi-89.html) support.

   * A simple queue implementation (based on java.util.concurrent.ConcurrentLinkedQueue). Also experimental code to use the hornetq queuing service.

   * Basic support for i18n (retrieving messages from bundles).

   * Excel parsing and spreadsheet generation in Scheme (used Apache Poi - http://poi.apache.org/ - underneath) - including list->spreadsheet, for-each-excel-sheet-data and converting excel's Dates to Scheme dates.

   * Access database reading using the Jackcess library.

   * Misc utilities for dealing with jdbc in postgresql and java.(result-set->iterator; etc). MySql support is also included.

   * Clojure: embedded interpreter, utilities for easily running clojure code inside strings.

   * Javascript: utilities to run js code with embedded Javascript interpreter (Rhino); object Notation (http://www.json.org/) parser, generator and utilities: json-read, json-write, scheme->json, json->scheme.

   * Memoize functionality.

   * Simple logging facilities.

   * A packrat parser (ported from PLT Scheme).

   * Password generation module (ported from PLT Scheme).

   * Dorai Sitaram's Schelog embedding of Prolog in Scheme http://www.ccs.neu.edu/home/dorai/schelog/schelog.html

   * Aubrey Jaffer's Slib (http://people.csail.mit.edu/jaffer/SLIB) library which brings a LOT of functionality to scheme.

   * Olin Shivers' let-optionals (low-level / define-macro).

   * Sparse arrays and sparse vectors taken from Chicken Scheme (as-is).

   * Debugging facilities - you can stop in the middle of execution of a function and get hold of a REPL with local variables you specify (taken from a mailing list post).

   * Very easy to use JMX support (making creating of interfaces and all that mess unnecessary to expose beans).

   * A few other misc utilities (small things like a log where you are able to specify a base, a loop macro, each-for, a version of for-each with swapped arguments, and many others) and examples scattered.