# Lizard

Symbolic computation script language- Libraries
- Sep 17, 2021
- Martin Guttmann

## Preamble

The idea of *Lizard* is very similar to that idea of the mathematical and scientific program *Mathematica*. Lizard should make it possible to carry out calculations, data analysis and much more with a small script without much code. At the moment I am only providing you with the Lizard.dll, its include file for *Pure Basic* as well as some examples and a detailed documentation on *Lizard*. The publication of the source code is planned and since I don't use a Win-API, nothing should prevent a compilation on Linux!

This library is primarily addressed to users of *Pure Basic*. However, in principle it is also possible to bind this DLL into another language.

Please test *Lizard* at this early stage and give me feedback on the current features.

## Download

Lizard - Symbolic computation script language (Version 0.4.2-0001)

Contains the Lizard.dll (Windows x64 and x86), the Lizard.so (Linux x64), the Lizard.pbi, some examples for the integration in Pure Basic and a detailed documentation for Lizard with many examples.

Lizard - Documentation (Documentation only, just for viewing)

## Features of Lizard

- Full support of symbolic expression.
- Support of arbitrary size integers.
- Support of real numbers with arbitrary precision.
- Support of rational and complex numbers.
- Full unicode character string and binary string support as well as unicode collation algorithm.
- Support of polymorphic or anonymous functions.
- Powerfull pattern matching engine for assignments and replacements.
- Support of named parameters in functions.
- High flexibility in work with subparts of strings, lists or general expressions.
- Numerous conversion functions, supporting different number formats and string formats under consideration of endianness and digit base.

## Details

In Lizard everything, really everything, is an expression consisting of a head and any number of arguments. That means also object types themselves, e.g. lists or well-known keywords such as If, And etc. are again just expressions and can also be used again as such. This makes Lizard very flexible and powerful, but on the deep level it is also slower than usual script languages, in which these things are clearly separated and differentiated.

## Examples

Here are some example codes of the features of Lizard and how the input and output looks like. You can find many more in the documentation above:
```
In(1) := {2^100, 8/12, 1/4.0, (-2.0)^0.4}
Out(1) = {1267650600228229401496703205376, 2/3, 0.25, 0.40775+1.25493*I}
```

```
In(2) := {3*x - 2*x, a && True && b, Sin(Pi/6)}
Out(2) = {x, a && b, 1/2}
```

```
In(3) := 123.456 ^ 6789
Out(3) = 1.889456296024e14199
```

```
In(4) := Calculate(Pi, 60)
Out(4) = 3.14159265358979323846264338327950288419716939937510582097494
```

```
In(5) := Sort( {-3, 2, -1, 0, 4}, Abs(#1) <= Abs(#2) & )
Out(5) = {0, -1, 2, -3, 4}
```

```
In(6) := Select( {1, 2, 3, 4, y, 2.2}, #^2 < 6 & )
Out(6) = {1, 2, 2.2}
```

```
In(7) := Replace( a+b+c+d, a+d -> x )
Out(7) = b + c + x
```

```
In(8) := {a,b,c,d,e}[2..-2]
Out(8) = {b, c, d}
```

```
In(9) := "Hello World!"[-1..1..-1]
Out(9) = "!dlroW olleH"
```

```
In(10) := Table(i^2, {i, -3, 3} )
Out(10) = {9, 4, 1, 0, 1, 4, 9}
```

```
In(11) := ToString('\0a\x03» ¬', BinaryFormat->"UTF16", Endianness->1)
Out(11) = "aλ€"
```

```
In(12) := Sort({"NINO", "Nina", "Nino", "Ninu", "Niño"})
Out(12) = {"Nina", "Nino", "NINO", "Niño", "Ninu"}
```

```
```

```
```