Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Interpreters

    lizpop 0.4.0

    Download button

    No screenshots available
    Downloads: 164  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Tetsu Takaishi | More programs
    BSD License / FREE
    April 6th, 2012, 12:37 GMT
    ROOT / Programming / Interpreters

     Read user reviews (0)  Refer to a friend  Subscribe

    lizpop description

    Scheme interpreter in Python

    lizpop is a scheme interpreter for Python.

    Installation

     Simply run python setup.py install.

     e.g.

      tar zxvf lizpop-0.3.1.tar.gz
      cd lizpop-0.3.1
      sudo python setup.py install

    Usage

    To run interactively:

     python -O -m lizpop.run

    To run a Scheme script in a file:

     python -O -m lizpop.run yourfile.scm

    For more info about command-line options:

     python -O -m lizpop.run -h

    Features

    Subset of Scheme R5RS

     See the Restrictions section for more details.

    Has interfaces to Python

     e.g.

     $ cat helloworld.py
     def hello(s="world"):
     return u"Hello %s!" % s.capitalize()

     $ python -O -m lizpop.run
     > (define *helloworld* (import "helloworld"))
     > (define hello (attr *helloworld* 'hello))
     > (hello "friends")
     "Hello Friends!"


     For more details, See the IFPY.rst file in this package.

    Regular Expression literal.

     The following literal is a Regular Expression Object.

     #/PATTERN/FLAGS
     PATTERN: Regular expression pattern
     FLAGS: Regular expression flags.
     i-- ignore case m-- multi-line s-- dot matches all
     u-- Unicode dependent L-- locale dependent x-- verbose


     Examples

     ;; A simple matching
     > (re-search #/(\d+):(\d+)/ "Aug 14") ;; not match
     #f
     > (re-search #/(\d+):(\d+)/ "Aug 14 08:30") ;; match
     < _sre.SRE_Match object at ... >

     ;; Get subgroup
     > (re-group (re-search #/(\d+):(\d+)/ "Aug 14 08:30") 1 2)
     ("08" "30")

     ;; Replace string
     > (re-gsub #/< (\/?)h\d >/i "< \\1H3 >" "< h1 >Features:< /h1 >")
     "< H3 >Features:< /H3 >"
     >


     For more info, run help procedure.

     e.g.
     > (help-list #/(^re-)|(regex)/)
     > (help re-match re-search re-group re-gsub)


    Supports multi-byte characters

     Only utf-8 encoding now.

    EML(EMbedded Lizpop)

     EML is a template language for embedding Lizpop code in text file.

     EML has the following simple specifications.

     %>STRING is added to the beginning of the input-port.

     Implicitly, < % is added to the end of the input-port.

     Note: These ideas are inspired by BRL ( http://brl.sourceforge.net/ ).

     To run EML, use -eml as command line option.

     e.g.
     python -m lizpop.run -eml yourfile.eml

     A simple example

     $ cat gcdlcm.eml
     < % (define numlist (map string->number *args*)) % >
     GCD of < % numlist % > is < %(apply gcd numlist)% >.
     LCM of < % numlist % > is < %(apply lcm numlist)% >.

     $ python -m lizpop.run -eml gcdlcm.eml -- 1533 37303 4307
     GCD of (1533 37303 4307) is 73.
     LCM of (1533 37303 4307) is 6602631.


     For more examples:

     please run (help load-eml) to see its help message.

     Note: `lizpop + apache2 + mod_wsgi`

     See the wsgi_sample/application.wsgi file included in this package.

    Help function

     Lizpop has a help-function, it displays documentation for the given procedures or macros.

     Usage:

     (help var ...)

     (help-list regex-pattern)

     e.g.

     > (help invoke)
     Procedure: (invoke OBJ MESSAGE ARGS ... )
     Invokes the OBJ's method named MESSAGE with ARGS ...
     .........................................................


     However, for now, the help documentation is provided only for the Python-Interface related functions.

     For more info, run (help) and (help help-list).

     Note:
     I'm not good at English. So help messages may include some errors or unnatural expressions in English.

    Restrictions

    Hygienic macros are not supported.

     define-syntax syntax-rules, and let-syntax are not implemented.

     Instead, traditional(non-hygienic) macros can be used.
     => run (help define-macro)

    Strings are not mutable.

     Lizpop strings are implemented as Python unicode-string objects which are immutable. so, string-set! and string-fill! don't work.

    call/cc and dynamic-wind are only partially implemented.

     Lizpop does not support full continuation.

     Lizpop's call-with-current-continuation is upward-only and non-reentrant. So, it can be used for non-local-exit, but cannot be used for co-routines or backtracking.

    Complex numbers and Fractional numbers are not supported.

    null-environment and scheme-report-environment are not implemented.

     For more info, run (help eval).


    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    scheme interpreter | Python interpreter | Python | scheme | interpreter

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM