It is currently Wed Nov 25, 2020 3:24 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Lizard - Script language for symbolic calculations and more
PostPosted: Sun Nov 15, 2020 1:33 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jan 10, 2008 1:30 pm
Posts: 1319
Location: Germany, Glienicke
Preamble:
I worked on Lizard since 8 years. Lizard differs significantly from other script languages, as you can see in the features below.
Lizard is very similar to 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 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!
Please test Lizard at this early stage and give me feedback on the current features. I would also like to explicitly thank the following people who probably didn't even know that they helped me: Helle (ASM optimization), CSHW89 (idea and division algorithm)

Download:
Lizard - Symbolic computation script language (Version 0.3.8-0012)
Contains the Lizard.dll (x64 and x86), 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 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.

Here are some examples of the features (many more in the documentation):
  1. Code:
    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}
  2. Code:
    In(2) := {3*x - 2*x, a && True && b, Sin(Pi/6)}
    Out(2) = {x, a && b, 1/2}
  3. Code:
    In(3) := Sort( {-3, 2, -1, 0, 4}, Abs(#1) <= Abs(#2) & )
    Out(3) = {0, -1, 2, -3, 4}
  4. Code:
    In(4) := Select( {1, 2, 3, 4, y, 2.2}, #^2 < 6 & )
    Out(4) = {1, 2, 2.2}
  5. Code:
    In(5) := Replace( a+b+c+d, a+d -> x )
    Out(5) = b + c + x
  6. Code:
    In(6) := {a,b,c,d,e}[2..-2]
    Out(6) = {b, c, d}
  7. Code:
    In(7) := "Hello World!"[-1..1..-1]
    Out(7) = "!dlroW olleH"
  8. Code:
    In(8) := Table(i^2, {i, -3, 3} )
    Out(8) = {9, 4, 1, 0, 1, 4, 9}
  9. Code:
    In(9) := ToString('\0a\x03» ¬', BinaryFormat->"UTF16", Endianness->1)
    Out(9) = "aλ€"
  10. Code:
    In(10) := Sort({"NINO", "Nina", "Nino", "Ninu", "Niño"})
    Out(10) = {"Nina", "Nino", "NINO", "Niño", "Ninu"}

Have fun during testing.

ChangeLog
  • 0.3.8-0012: x86 support!, small bug-fixes, two more examples for pure basic implementation, new Lizard-functions: Floor, Ceil, Trunc, Order
  • 0.3.8-0002: First publication

_________________
ImageImage


Last edited by STARGÅTE on Sat Nov 21, 2020 2:17 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Lizard - Script language for symbolic calculations and m
PostPosted: Sun Nov 15, 2020 3:29 pm 
Offline
Always Here
Always Here

Joined: Sun Sep 07, 2008 12:45 pm
Posts: 5052
Location: Germany
Just tried to test it and ... failed.

I use PB 5.73B4 x86
Maybe your included dll is x64.


Top
 Profile  
Reply with quote  
 Post subject: Re: Lizard - Script language for symbolic calculations and m
PostPosted: Sun Nov 15, 2020 4:56 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Nov 05, 2006 11:42 pm
Posts: 4790
Location: Lyon - France
+1 :|
Quote:
Lizard kernel initialization failed!

_________________
ImageThe happiness is a road...
Not a destination


Top
 Profile  
Reply with quote  
 Post subject: Re: Lizard - Script language for symbolic calculations and m
PostPosted: Sun Nov 15, 2020 5:59 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jan 10, 2008 1:30 pm
Posts: 1319
Location: Germany, Glienicke
The Library is for 64-bit processors only, I will add a CompilerError. Some parts are written in directly in ASM, and it would take some time to add 32-bit version.
But in my opinion in today's life 32-bit is not needed, isn't it?

@infratec: You have no 64 operating system or just using PB x86?
@Kwai chang caine: You started it also in 32-bit mode, or is it another failure?

_________________
ImageImage


Top
 Profile  
Reply with quote  
 Post subject: Re: Lizard - Script language for symbolic calculations and m
PostPosted: Sun Nov 15, 2020 6:34 pm 
Offline
Always Here
Always Here

Joined: Sun Sep 07, 2008 12:45 pm
Posts: 5052
Location: Germany
I develop software for companies and ...

they use Win7, 8 and 10 and on some PCs cause of old database programs still WinXP.
To avoid different versions, I still compile only for x86 on windows.

Code is smaller, compatibility is higher, I can not measure any speed advantages.

For linux and OSX I use the 64bit compiler, because linux users always use the latest technology
and OSX users had no chance to decide :mrgreen:


Top
 Profile  
Reply with quote  
 Post subject: Re: Lizard - Script language for symbolic calculations and m
PostPosted: Mon Nov 16, 2020 8:11 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jan 10, 2008 1:30 pm
Posts: 1319
Location: Germany, Glienicke
@infratec:
I see. I will take a look, how the source code can be made compatible with x86.

_________________
ImageImage


Top
 Profile  
Reply with quote  
 Post subject: Re: Lizard - Script language for symbolic calculations and m
PostPosted: Mon Nov 16, 2020 9:35 pm 
Offline
Addict
Addict

Joined: Thu Jun 07, 2007 3:25 pm
Posts: 3965
Location: Berlin, Germany
Very impressive, and very well done! Image
Thank you so much for this!

_________________
Please excuse my flawed English. My native language is PureBasic.
Search
RSBasic's backups


Top
 Profile  
Reply with quote  
 Post subject: Re: Lizard - Script language for symbolic calculations and m
PostPosted: Thu Nov 19, 2020 6:22 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Nov 05, 2006 11:42 pm
Posts: 4790
Location: Lyon - France
Stargate wrote:
You started it also in 32-bit mode, or is it another failure?
Yes :oops:
I have W10 X64 but i continue to use PB X86 for be sure of the maximum compatibility with another persons, like say INFRATEC :wink:

_________________
ImageThe happiness is a road...
Not a destination


Top
 Profile  
Reply with quote  
 Post subject: Re: Lizard - Script language for symbolic calculations and m
PostPosted: Sat Nov 21, 2020 2:16 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jan 10, 2008 1:30 pm
Posts: 1319
Location: Germany, Glienicke
I am happy to present you a new version of Lizard, now supporting x86 processors!

Download:
Lizard - Symbolic computation script language (Version 0.3.8-0012, x64 and x86, Windows)

ChangeLog
  • 0.3.8-0012: x86 support!, small bug-fixes, two more examples for pure basic implementation, new Lizard-functions: Floor, Ceil, Trunc, Order

_________________
ImageImage


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye