geekmaster / szl Goto Github PK
View Code? Open in Web Editor NEWThis project forked from dimkr/szl
A lightweight, embeddable scripting language
Home Page: http://dimakrasner.com/szl
License: MIT License
This project forked from dimkr/szl
A lightweight, embeddable scripting language
Home Page: http://dimakrasner.com/szl
License: MIT License
_ ___ ___| | / __|_ / | \__ \/ /| | |___/___|_| Overview ======== szl is a tiny, embeddable scripting engine inspired by Tcl and shell. It's a balanced mix of their key features: szl combines the simplicity of shell scripting with the power of a dynamic, Tcl-like type system, minimalistic syntax and programming language features missing in the shell, like exceptions. szl comes with a rich standard library that includes bindings for permissively-licensed libraries. Therefore, it can run processes, parse text with transparent Unicode support, manipulate data structures like dictionaries, operate on binary data, interface with C code through scripts, multiplex non-blocking I/O at scale, call REST APIs and much more, at a fraction of the memory and size footprint of other scripting languages, while achieving reasonable efficiency. szl can be used both as a standalone (either interactive or non-interactive) interpreter or as part of other projects, via the libszl library. ___________________________________ / \ | >>> $global msg {Hello, world!} | | Hello, world! | | >>> $load zlib | | >>> $zlib.crc32 $msg | | 3957769958 | | >>> [$exec {uname -s}] read | | Linux | | >>> [$open /bin/gunzip rb] read 9 | | #!/bin/sh | | >>> $map i [$range 1 4] {$+ $i 3} | | 4 5 6 | \___________________________________/ For more information, see the user manual at http://dimakrasner.com/szl. Building ======== On Debian (http://www.debian.org) based distributions: $ apt-get install git gcc make pkg-config zlib1g-dev libcurl4-gnutls-dev libarchive-dev libssl-dev libffi-dev valgrind Then: $ git clone --recursive https://github.com/dimkr/szl $ cd szl $ make $ make install Under some CPU architectures (most notably, x86_64 and ARMv7), -fPIC is required to produce shared libraries: $ make clean $ CFLAGS="-fPIC" make By default, szl is built with core functionality built-in to the interpreter, while a big part of the standard library resides in dynamically-loaded shared objects. This way, the memory consumption of szl scripts that don't use the entire standard library is lower. However, in some use cases (for example, when szl is embedded into another project), this is undesirable. To build szl as a single executable file, with all extensions linked statically into the interpreter: $ STATIC_ALL=1 make In addition, built-in extensions can be chosen individually, e.g.: $ STATIC_CURL=1 STATIC_FFI=1 make To embed szl into other projects, use the API defined in szl.h and link with libszl. Running ======= To run an interactive interpreter: $ szlsh Or, to run a script: $ szlsh $path Or, to run a one-liner: $ szlsh -c $snippet Documentation ============= To build the user manual: $ cd doc; make szl.html To build the API documentation: $ cd doc; make api_docs Credits and Legal Information ============================= szl is free and unencumbered software released under the terms of the MIT license; see COPYING for the license text. For a list of its authors and contributors, see AUTHORS. The ASCII art logo at the top was made using FIGlet (http://www.figlet.org/).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.