Support > General Discussions

SBLisp

(1/2) > >>

Support:
In conjunction with Dave's VB/COM adventures I thought I would see how compatible Script BASIC is with Microsoft's Quick BASIC 4.5. I found a LISP in BASIC example and converted it to Script BASIC. (see attached)  I have a slight problem with it and could use another set of eyes.  If you solve the riddle and not a forum member, please send me an e-mail at support@scriptbasic.org and I will give you credit for the find.

Here is where I'm at.


--- Code: ---jrs@laptop:~/sb/sb22/sblisp$ scriba lisp.sb
Initializing Memory...
Initializing Lisp Environment...
LISP in BASIC v1.3 by Arthur Nunes-Harwitt
 0](+ 2 2)
ERROR: UNBOUND VARIABLE
ERROR: UNBOUND VARIABLE
ERROR: UNKNOWN APPLICATION
( ())
 0]

--- End code ---

Support:
I decided to install Steel Bank Common Lisp (SBCL) and Quicklisp library manager on my Ubuntu 12.04 LTS 64 bit development system. Here is a log of the install process.


--- Quote --- * SDL_gfx is now integrated into lispbuilder-sdl. There is no longer a need to explicitly use lispbuilder-sdl-gfx as functions in SDL_gfx will be called from lispbuilder-sdl if the SDL_gfx library is available.

--- End quote ---


--- Code: ---jrs@laptop:~/sb/sb22/sblisp/LeanLisp$ sudo apt-get install sbcl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  libkms1
Use 'apt-get autoremove' to remove them.
Suggested packages:
  sbcl-doc sbcl-source slime
The following NEW packages will be installed:
  sbcl
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 10.7 MB of archives.
After this operation, 50.2 MB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise/universe sbcl amd64 2:1.0.55.0-1 [10.7 MB]
Fetched 10.7 MB in 3s (2,691 kB/s)
Selecting previously unselected package sbcl.
(Reading database ... 1039868 files and directories currently installed.)
Unpacking sbcl (from .../sbcl_2%3a1.0.55.0-1_amd64.deb) ...
Processing triggers for man-db ...
Setting up sbcl (2:1.0.55.0-1) ...
jrs@laptop:~/sb/sb22/sblisp/LeanLisp$ sbcl --load quicklisp.lisp
This is SBCL 1.0.55.0.debian, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.

  ==== quicklisp quickstart 2014-02-01 loaded ====

    To continue with installation, evaluate: (quicklisp-quickstart:install)

    For installation options, evaluate: (quicklisp-quickstart:help)

* (quicklisp-quickstart:install)

; Fetching #<URL "http://beta.quicklisp.org/client/quicklisp.sexp">
; 0.82KB
==================================================
838 bytes in 0.00 seconds (818.36KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/client/2014-07-04/quicklisp.tar">
; 220.00KB
==================================================
225,280 bytes in 0.24 seconds (901.64KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/client/2014-01-28/setup.lisp">
; 4.96KB
==================================================
5,078 bytes in 0.00 seconds (4958.98KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/asdf/2.26/asdf.lisp">
; 194.07KB
==================================================
198,729 bytes in 0.19 seconds (1016.08KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/dist/quicklisp.txt">
; 0.40KB
==================================================
408 bytes in 0.00 seconds (398.44KB/sec)
Installing dist "quicklisp" version "2014-07-14".
; Fetching #<URL "http://beta.quicklisp.org/dist/quicklisp/2014-07-14/releases.txt">
; 252.74KB
==================================================
258,806 bytes in 0.80 seconds (317.11KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/dist/quicklisp/2014-07-14/systems.txt">
; 173.53KB
==================================================
177,697 bytes in 0.19 seconds (918.16KB/sec)

  ==== quicklisp installed ====

    To load a system, use: (ql:quickload "system-name")

    To find systems, use: (ql:system-apropos "term")

    To load Quicklisp every time you start Lisp, use: (ql:add-to-init-file)

    For more information, see http://www.quicklisp.org/beta/

NIL
* (ql:system-apropos "vecto")
#<SYSTEM adw-charting-vecto / adw-charting-20120909-http / quicklisp 2014-07-14>
#<SYSTEM cl-aa / cl-vectors-20130312-git / quicklisp 2014-07-14>
#<SYSTEM cl-aa-misc / cl-vectors-20130312-git / quicklisp 2014-07-14>
#<SYSTEM cl-glfw-opengl-apple_specular_vector / cl-glfw-20130615-git / quicklisp 2014-07-14>
#<SYSTEM cl-paths / cl-vectors-20130312-git / quicklisp 2014-07-14>
#<SYSTEM cl-paths-ttf / cl-vectors-20130312-git / quicklisp 2014-07-14>
#<SYSTEM cl-vectors / cl-vectors-20130312-git / quicklisp 2014-07-14>
#<SYSTEM com.elbeno.vector / vector-20130128-git / quicklisp 2014-07-14>
#<SYSTEM lispbuilder-sdl-cl-vectors / lispbuilder-20140113-svn / quicklisp 2014-07-14>
#<SYSTEM lispbuilder-sdl-cl-vectors-examples / lispbuilder-20140113-svn / quicklisp 2014-07-14>
#<SYSTEM lispbuilder-sdl-vecto / lispbuilder-20140113-svn / quicklisp 2014-07-14>
#<SYSTEM lispbuilder-sdl-vecto-examples / lispbuilder-20140113-svn / quicklisp 2014-07-14>
#<SYSTEM org.middleangle.foreign-numeric-vector / fnv-20140713-git / quicklisp 2014-07-14>
#<SYSTEM sb-vector-io / sb-vector-io-20110829-git / quicklisp 2014-07-14>
#<SYSTEM static-vectors / static-vectors-1.6 / quicklisp 2014-07-14>
#<SYSTEM static-vectors/test / static-vectors-1.6 / quicklisp 2014-07-14>
#<SYSTEM vecto / vecto-1.4.7 / quicklisp 2014-07-14>
* (ql:quickload "vecto")
To load "vecto":
  Install 5 Quicklisp releases:
    cl-vectors salza2 vecto zpb-ttf zpng
; Fetching #<URL "http://beta.quicklisp.org/archive/salza2/2013-07-20/salza2-2.0.9.tgz">
; 15.16KB
==================================================
15,525 bytes in 0.03 seconds (541.47KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/zpng/2011-12-03/zpng-1.2.1.tgz">
; 38.81KB
==================================================
39,743 bytes in 0.16 seconds (242.57KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/zpb-ttf/2013-07-20/zpb-ttf-1.0.3.tgz">
; 43.82KB
==================================================
44,869 bytes in 0.12 seconds (368.21KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/cl-vectors/2013-03-12/cl-vectors-20130312-git.tgz">
; 30.63KB
==================================================
31,364 bytes in 0.12 seconds (264.04KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/vecto/2014-01-13/vecto-1.4.7.tgz">
; 61.75KB
==================================================
63,236 bytes in 0.10 seconds (630.14KB/sec)
; Loading "vecto"
[package zpb-ttf].................................
[package salza2]..................................
[package zpng]....................................
[package net.tuxee.paths].........................
[package net.tuxee.aa]............................
[package net.tuxee.aa-bin]........................
[package net.tuxee.vectors].......................
[package vecto]..........
("vecto")
* (ql:add-to-init-file)
I will append the following lines to #P"/home/jrs/.sbclrc":

  ;;; The following lines added by ql:add-to-init-file:
  #-quicklisp
  (let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
                                         (user-homedir-pathname))))
    (when (probe-file quicklisp-init)
      (load quicklisp-init)))

Press Enter to continue.


#P"/home/jrs/.sbclrc"
* (quit)
jrs@laptop:~/sb/sb22/sblisp/LeanLisp$

--- End code ---

To find out what's available in Quicklisp, use:


--- Code: ---* (ql:system-apropos "xml")
#<SYSTEM bknr.xml / bknr-datastore-20131111-git / quicklisp 2014-07-14>
#<SYSTEM cl-html5-parser-cxml / cl-html5-parser-20140713-git / quicklisp 2014-07-14>
#<SYSTEM cl-libxml2 / cl-libxml2-20130615-git / quicklisp 2014-07-14>
#<SYSTEM cl-libxml2-test / cl-libxml2-20130615-git / quicklisp 2014-07-14>
#<SYSTEM cl-rdfxml / cl-rdfxml-20140713-git / quicklisp 2014-07-14>
#<SYSTEM cl-xmlspam / cl-xmlspam-20101006-http / quicklisp 2014-07-14>
#<SYSTEM cxml / cxml-20110619-git / quicklisp 2014-07-14>
#<SYSTEM cxml-dom / cxml-20110619-git / quicklisp 2014-07-14>
#<SYSTEM cxml-klacks / cxml-20110619-git / quicklisp 2014-07-14>
#<SYSTEM cxml-rng / cxml-rng-2008-11-30 / quicklisp 2014-07-14>
#<SYSTEM cxml-rpc / cxml-rpc-20121013-git / quicklisp 2014-07-14>
#<SYSTEM cxml-stp / cxml-stp-20120520-git / quicklisp 2014-07-14>
#<SYSTEM cxml-stp-test / cxml-stp-20120520-git / quicklisp 2014-07-14>
#<SYSTEM cxml-test / cxml-20110619-git / quicklisp 2014-07-14>
#<SYSTEM cxml-xml / cxml-20110619-git / quicklisp 2014-07-14>
#<SYSTEM hu.dwim.perec+hu.dwim.quasi-quote.xml / hu.dwim.perec-20140713-darcs / quicklisp 2014-07-14>
#<SYSTEM hu.dwim.quasi-quote.xml / hu.dwim.quasi-quote-20130813-darcs / quicklisp 2014-07-14>
#<SYSTEM hu.dwim.quasi-quote.xml+cxml / hu.dwim.quasi-quote-20130813-darcs / quicklisp 2014-07-14>
#<SYSTEM hu.dwim.quasi-quote.xml+hu.dwim.quasi-quote.js / hu.dwim.quasi-quote-20130813-darcs / quicklisp 2014-07-14>
#<SYSTEM hu.dwim.util.flexml / hu.dwim.util-20140713-darcs / quicklisp 2014-07-14>
#<SYSTEM pithy-xml / pithy-xml-20101006-git / quicklisp 2014-07-14>
#<SYSTEM s-xml / s-xml-20120909-cvs / quicklisp 2014-07-14>
#<SYSTEM s-xml-rpc / s-xml-rpc-20101006-http / quicklisp 2014-07-14>
#<SYSTEM s-xml.examples / s-xml-20120909-cvs / quicklisp 2014-07-14>
#<SYSTEM s-xml.test / s-xml-20120909-cvs / quicklisp 2014-07-14>
#<SYSTEM sexml / sexml-20140713-git / quicklisp 2014-07-14>
#<SYSTEM sexml-objects / sexml-20140713-git / quicklisp 2014-07-14>
#<SYSTEM xfactory / cl-libxml2-20130615-git / quicklisp 2014-07-14>
#<SYSTEM xfactory-test / cl-libxml2-20130615-git / quicklisp 2014-07-14>
#<SYSTEM xml-emitter / xml-emitter-1.0.2 / quicklisp 2014-07-14>
#<SYSTEM xml-mop / xml-mop-20110418-git / quicklisp 2014-07-14>
#<SYSTEM xml-render / cl-typesetting-20130420-git / quicklisp 2014-07-14>
#<SYSTEM xml.location / xml.location-20140713-git / quicklisp 2014-07-14>
#<SYSTEM xml.location-and-local-time / xml.location-20140713-git / quicklisp 2014-07-14>
#<SYSTEM xml.location-test / xml.location-20140713-git / quicklisp 2014-07-14>
#<SYSTEM xmls / xmls-1.5 / quicklisp 2014-07-14>
#<SYSTEM xmls-test / xmls-1.5 / quicklisp 2014-07-14>
#<SYSTEM xmls-tools / xmls-tools-20110320-http / quicklisp 2014-07-14>
#<SYSTEM xoverlay / cl-libxml2-20130615-git / quicklisp 2014-07-14>
#<SYSTEM zaws-xml / zaws-20121125-git / quicklisp 2014-07-14>
*

--- End code ---

Support:
We were able to get the SBLisp Scheme (Lisp) interpreter working and could use some help beta testing. I have created a SBLisp Bitbucket Repository to get a copy of the current source and eventually documentation. A good resource for Scheme is the MIT/GNU Scheme Project.

FYI: The link to the SBLisp Bitbucket site can be found in the News section at the top right corner of the forum.


--- Code: Scheme ---jrs@laptop:~/sb/sb22/sblisp$ scriba lisp.sbInitializing Memory...Initializing Lisp Environment...LISP in BASIC v1.3 by Arthur Nunes-Harwitt0](define factorial (lambda (n)2](if (<= n 0)3]13](* n (factorial (- n 1))))))FACTORIAL0](factorial 8)403200](quit)Bye!jrs@laptop:~/sb/sb22/sblisp$  

Support:
I'm only posting milestones here about SBLisp. If you want to follow the action with Lisp in BASIC then head on over to the OxygenBasic Forum. Charles (O2 author) is creating his own version of Lisp he calls LeanLisp. Mike (FBSL author) and I have converted a QB 4.5 Scheme based version of Lisp in both SB and FBSL which we are co-developing.

Support:
A few changes going on with the SBLisp project you should be aware of.

[*] Mike Lobanovsky  (FBSL author) has taken the project lead.
[*] SBLisp is an abbreviation for Scheme BASIC Lisp
[*] Mike (for the most part) and I have fixed some bugs and added a couple new features to SBLisp
[/list]

SBLisp is a Scheme based version of Lisp written in traditional BASIC. Current supported languages are Script BASIC and FBSL.

Navigation

[0] Message Index

[#] Next page

Go to full version