<commit_before>szl
===
<NAME> <<EMAIL>>
:Author Initials: DK
:numbered:
:website: http://github.com/dimkr/szl

:toc:

Introduction
------------
+szl+ (pronounced "sizzle") is a scripting language inspired by
http://www.tcl.tk/[Tcl], shell and http://www.python.org/[CPython], which
follows four design principles:

1. There should be only *one, obvious way* to achieve a certain effect
2. Consistency:
- Every statement is a procedure call
- Everything is an object
- Every object is a string
3. Minimal, low-level standard library which leaves high-level logic to the user
4. One-liners are first-class citizens and *not* frowned upon

[quote, '<NAME>']
Great things are ... done by a series of small things brought together.

The +szl+ interpreter is designed as a library and exposes a high-level API. It
strives to provide reasonable performance at tiny code size, to make it
attractive as an embedded scripting engine integrated into other projects.

[NOTE]
The term "+szl+" refers to *both* the programming language and its official
interpreter, depending on the context.

This Document
-------------
This is a comprehensive manual, for the +szl+ user or for developers who wish to
extend +szl+ or integrate it into their projects.

[WARNING]
This manual may reflect a future state of +szl+.

Use Cases
~~~~~~~~~
+szl+ is especially useful when:

1. One needs a swiss knife, "shell on steroids" for automation or DevOps
   scripts, but shell scripting isn't powerful enough (because shell language
   lacks programming language features such as exceptions), while other
   languages are too powerful and require too much work to execute processes and
   read their output.
2. One needs a way to write a highly scalable and reliable server, but C APIs
   like +epoll+ make correct memory management and error handling (which affect
   scalability, security and reliability over time) hard to achieve in C,
   because memory management is manual and crash-prone, while errors cannot be
   handled using exceptions, because C lacks this feature. +szl+ wraps low-level
   interfaces like +epoll+, +timerfd+ and +signalfd+ with a simpler interface but
   with very little overhead, while providing automatic garbage collection,
   exceptions and complex data types useful for servers (i.e. dictionaries that
   map sockets to session data).
3. A systems person needs a quick n' dirty way to call C functions, without
   having to do native development during early research or the prototype phase:
   +szl+ allows interfacing with C code and data types via scripts!
4. One needs an embedded interpreter in a big software project, used as a logic
   layer, high-level glue between components written in different languages or
   as a scripting engine for advanced users (for example, in a console window of
   an action game).
5. A complex task is very hard or impossible to accomplish using nothing but
   traditional *nix tools (such as +sh+, +nc+, +tar+ and +cut+): +szl+
   implements sockets, string operations, compression, archiving and more, while
   maintaining the simplicity of shell scripting.
6. One needs an extremely lightweight scripting language, for quick development
   of programs that run on underpowered hardware, such as cheap Wi-Fi routers.
7. One wants to introduce non-technical people to programming, using an easy to
   learn scripting language with a simple syntax.

History
~~~~~~~
+szl+ began its life as a pet project: a clean-room, partial re-implementation
of http://jim.tcl.tk/[jimtcl], for self-education purposes.<commit_msg>Added a summary of szl advantages over shell<commit_after>szl
===
<NAME> <<EMAIL>>
:Author Initials: DK
:numbered:
:website: http://github.com/dimkr/szl

:toc:

Introduction
------------
+szl+ (pronounced "sizzle") is a scripting language inspired by
http://www.tcl.tk/[Tcl], shell and http://www.python.org/[CPython], which
follows four design principles:

1. There should be only *one, obvious way* to achieve a certain effect
2. Consistency:
- Every statement is a procedure call
- Everything is an object
- Every object is a string
3. Minimal, low-level standard library which leaves high-level logic to the user
4. One-liners are first-class citizens and *not* frowned upon

[quote, '<NAME>']
Great things are ... done by a series of small things brought together.

The +szl+ interpreter is designed as a library and exposes a high-level API. It
strives to provide reasonable performance at tiny code size, to make it
attractive as an embedded scripting engine integrated into other projects.

[NOTE]
The term "+szl+" refers to *both* the programming language and its official
interpreter, depending on the context.

This Document
-------------
This is a comprehensive manual, for the +szl+ user or for developers who wish to
extend +szl+ or integrate it into their projects.

[WARNING]
This manual may reflect a future state of +szl+.

Use Cases
~~~~~~~~~
+szl+ is especially useful when:

1. One needs a swiss knife, "shell on steroids" for automation or DevOps
   scripts, but shell scripting isn't powerful enough (because shell language
   lacks programming language features such as exceptions), while other
   languages are too powerful and require too much work to execute processes and
   read their output.
2. One needs a way to write a highly scalable and reliable server, but C APIs
   like +epoll+ make correct memory management and error handling (which affect
   scalability, security and reliability over time) hard to achieve in C,
   because memory management is manual and crash-prone, while errors cannot be
   handled using exceptions, because C lacks this feature. +szl+ wraps low-level
   interfaces like +epoll+, +timerfd+ and +signalfd+ with a simpler interface
   but with very little overhead, while providing automatic garbage collection,
   exceptions and complex data types useful for servers (i.e. dictionaries that
   map sockets to session data).
3. A systems person needs a quick n' dirty way to call C functions, without
   having to do native development during early research or the prototype phase:
   +szl+ allows interfacing with C code and data types via scripts!
4. One needs an embedded interpreter in a big software project, used as a logic
   layer, high-level glue between components written in different languages or
   as a scripting engine for advanced users (for example, in a console window of
   an action game).
5. A complex task is very hard or impossible to accomplish using nothing but
   traditional *nix tools (such as +sh+, +nc+, +tar+ and +cut+): +szl+
   implements sockets, string operations, compression, archiving and more, while
   maintaining the simplicity of shell scripting.
6. One needs an extremely lightweight scripting language, for quick development
   of programs that run on underpowered hardware, such as cheap Wi-Fi routers.
7. One wants to introduce non-technical people to programming, using an easy to
   learn scripting language with a simple syntax.

To sum up, +szl+ is a simple scripting language useful use as an alternative to
shell scripting and as a language for quick, safe system programming. Its safe,
consistent syntax contributes to clarity and prevents edge cases usually found
in shell scripts, like bad handling of input that contains spaces.

History
~~~~~~~
+szl+ began its life as a pet project: a clean-room, partial re-implementation
of http://jim.tcl.tk/[jimtcl], for self-education purposes.
{'fraction_non_alphanumeric': 0.0688823371750201, 'fraction_numerical': 0.0029482712409541678, 'mean_word_length': 4.171864171864172, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '558292', 'n_tokens_mistral': 1942, 'n_tokens_neox': 1881, 'n_words': 1088}