background preloader

Picolisp

Facebook Twitter

Wiki: 99problems. Ninety-Nine Lisp Problems Based on a Prolog problem list by werner.hett@hti.bfh.ch.

Wiki: 99problems

The original is HERE. Work in progress! Until now, only about half of the problems are solved. Another possibility, of course, would be translating the Prolog solutions to Pilog ;-) Working with lists P01 (*) Find the last box of a list. : (my-last '(a b c d)) -> (d) P02 (*) Find the last but one box of a list. : (my-but-last '(a b c d)) -> (c d) P03 (*) Find the K'th element of a list. The first element in the list is number 1. : (element-at '(a b c d e) 3) -> c P04 (*) Find the number of elements of a list. P05 (*) Reverse a list. P06 (*) Find out whether a list is a palindrome. A palindrome can be read forward or backward; e.g. P07 (**) Flatten a nested list structure. Transform a list, possibly holding lists as elements into a `flat' list by replacing each list with its elements (recursively). PicoLisp Reference. Abu@software-lab.de Perfection is attainednot when there is nothing left to addbut when there is nothing left to take away(Antoine de Saint-Exupéry) (c) Software Lab.

PicoLisp Reference

Alexander Burger This document describes the concepts, data types, and kernel functions of the PicoLisp system. This is not a Lisp tutorial. Please take a look at the PicoLisp Tutorial for an explanation of some aspects of PicoLisp, and scan through the list of Frequently Asked Questions (FAQ). Introduction PicoLisp is the result of a language design study, trying to answer the question "What is a minimal but useful architecture for a virtual machine?

". First of all, PicoLisp is a virtual machine architecture, and then a programming language. PicoLisp has been used in several commercial and research programming projects since 1988. In a nutshell, emphasis was put on four design objectives. Simple The internal data structure should be as simple as possible. Unlimited Dynamic Practical The PicoLisp Machine The Cell. PicoLisp Application Development. Abu@software-lab.de (c) Software Lab.

PicoLisp Application Development

Alexander Burger This document presents an introduction to writing browser-based applications in PicoLisp. It concentrates on the XHTML/CSS GUI-Framework (as opposed to the previous Java-AWT, Java-Swing and Plain-HTML frameworks), which is easier to use, more flexible in layout design, and does not depend on plug-ins, JavaScript, cookies or CSS. A plain HTTP/HTML GUI has various advantages: It runs on any browser, and can be fully driven by scripts ("@lib/scrape.l"). To be precise: CSS can be used to enhance the layout. For basic informations about the PicoLisp system please look at the PicoLisp Reference and the PicoLisp Tutorial. The examples assume that PicoLisp was started from a global installation (see Installation). Static Pages You can use PicoLisp to generate static HTML pages.

Hello World To begin with a minimal application, please enter the following two lines into a generic source file named "project.l" in the PicoLisp installation directory. Wiki: home. A Radical Approach to Software Development If some programming languages claim to be the "Swiss Army Knife of Programming", then PicoLisp may well be called the "Scalpel of Programming": Sharp, accurate, small and lightweight, but also dangerous in the hand of the inexperienced.

Wiki: home

Less is more! - The maxim is: Keep it simple, and the programmer in control! Short answer: Because PicoLisp has two characteristic features, which are not found to that extent in other languages: An integrated database Equivalence of code and data These two features, and how they are used in combination, make it worth to take a closer look at PicoLisp. Besides this, PicoLisp is a very simple and succinct, yet expressive language. Integrated Database Database functionality is built into the core of the language. Database entities are first class objects. It is possible with PicoLisp to build large multi-user databases, distributed across many machines or in a cloud. Equivalence of Code and Data.