Sll is a simple yet powerful programing language intended for beginner as well as advanced software developers.
The documentation is located here.
The SL Programing Language
License: MIT License
Sll is a simple yet powerful programing language intended for beginner as well as advanced software developers.
The documentation is located here.
Add mapping object (ex. <"a" 0 2 [1 3 4]>
) as well as object types, printing functions, assembly functions, optimizer funtions, etc.
Cache results from functions such as ($)
or (:)
when it is known that no change to the source array/string is made.
Add typed arrays (src/sll/lib/typed_array.sll
) and matching functions in src/sll/api/typed_array.c
. This would speed up array functions as well as decrease memory requirements. Could be linked with #3.
Change the build process to build files directly instead of combining them into one file
Add an operator ((!!)
) which allows converting an object into a boolean value.
Replace priting empty strings with nothing and replacing printing single character strings with printing a single character.
Add bit shifting operators (<<
and >>
)
Optimize a call to a single-use or fast function by inlining it. For example:
(<- (,,, a b c (@@ (* a b c))) 1 2 3)
Would be optimize into:
(, (= a 1) (= b 2) (= c 3) (* a b c))
(Wait for #43)
Remove the public stack API and replace it with internal automatic stacks which would resize when needed.
I don't understand anything about the examples, why is it so weird of a language?
Add a global option (ex. sll_option_set
) to make src/sll/error.c
use colors depending on the command line option
Add instruction counting to the VM to allow users to accuratly test the speed of their program.
Add a module url.sll
with function such as split
, request
, etc.
Add an operator to allow casting objects between different types.
The sll_api_file_open
does not handle correctly the x
or +
file mode. Extend sll_api_file_open
to modes like x
or a+
(fopen modes)
Implement an operator ((***)
), which will return the value returned by return ((@@)
) or nil
.
It is similar to calling a single-use function ((<- (,,, |# code #|))
)
Add the restrict
keyword to function definitions and declarations to help with program performance.
(+ 2 3 4 5)
with 14
. This would apply to every mathematical operator.(+ 10 2 a 5 b)
should be replaced with (+ 12 a 5 b)
.Cleanup stack if function does not use all of the passed arguments. Insert zeros (SLL_ACQUIRE_STATIC(int_zero)
) if function requires more arguments than are passed.
Implement accurate time sleeping functions (Currently sll_api_time_sleep(1)
sleeps for 1.04 seconds)
Before entering another function save the current used variables on stack.
Remove useless clean-up code in the parser in locations where it is obvious that no new variable scopes have been created.
This is the following code to remove:
if (n_l_sc.m){
free(n_l_sc.m);
}
Replace UINT16_MAX and UINT32_MAX with their type equivalent SLL_MAX_xxx.
sll_array_join
sll_array_push
sll_array_pop
sll_array_shift
sll_array_unshift
sll_array_remove
sll_array_remove_multiple
sll_array_clone
sll_array_resize
sll_array_count
sll_array_count_multiple
sll_string_join
sll_string_remove
sll_string_replace
sll_string_title_case
sll_string_count
sll_map_join
sll_map_add
sll_map_remove
sll_map_clone
sll_map_keys
sll_map_values
Unless an internal function would be marked as needed, an empty call to that function would be removed.
Implement a comma ((,)
) operator which would execute every statement and return the last one
Implement memory reference operator ((%%)
)
List of operations to be implemented:
sll_operator_inc
I
F
C
S
A
H
M
sll_operator_dec
I
F
C
S
A
H
M
sll_operator_add
I I
I F
I C
I S
I A
I H
I M
F F
F C
F S
F A
F H
F M
C C
C S
C A
C H
C M
S S
S A
S H
S M
A A
A H
A M
H H
H M
M M
sll_operator_sub
I I
I F
I C
I S
I A
I H
I M
F I
F F
F C
F S
F A
F H
F M
C I
C F
C C
C S
C A
C H
C M
S I
S F
S C
S S
S A
S H
S M
A A
A *
H I
H F
H C
H S
H A
H H
H M
M *
sll_operator_mult
I I
I F
I C
I S
I A
I H
I M
F F
F C
F S
F A
F H
F M
C C
C S
C A
C H
C M
S S
S A
S H
S M
A A
A H
A M
H H
H M
M M
sll_operator_div
I I
I F
I C
I S
I A
I H
I M
F I
F F
F C
F S
F A
F H
F M
C I
C F
C C
C S
C A
C H
C M
S I
S F
S C
S S
S A
S H
S M
A A
A *
H I
H F
H C
H S
H A
H H
H M
M I
M F
M C
M S
M A
M H
M M
sll_operator_floor_div
I I
I F
I C
I S
I A
I H
I M
F I
F F
F C
F S
F A
F H
F M
C I
C F
C C
C S
C A
C H
C M
S I
S F
S C
S S
S A
S H
S M
A A
A *
H I
H F
H C
H S
H A
H H
H M
M I
M F
M C
M S
M A
M H
M M
sll_operator_mod
I I
I F
I C
I S
I A
I H
I M
F I
F F
F C
F S
F A
F H
F M
C I
C F
C C
C S
C A
C H
C M
S I
S F
S C
S S
S A
S H
S M
A I
A F
A C
A S
A A
A H
A M
H I
H F
H C
H S
H A
H H
H M
M I
M F
M C
M S
M A
M H
M M
sll_operator_and
I I
I F
I C
I S
I A
I H
I M
F F
F C
F S
F A
F H
F M
C C
C S
C A
C H
C M
S S
S A
S H
S M
A A
A H
A M
H H
H M
M M
sll_operator_or
I I
I F
I C
I S
I A
I H
I M
F F
F C
F S
F A
F H
F M
C C
C S
C A
C H
C M
S S
S A
S H
S M
A A
A H
A M
H H
H M
M M
sll_operator_xor
I I
I F
I C
I S
I A
I H
I M
F F
F C
F S
F A
F H
F M
C C
C S
C A
C H
C M
S S
S A
S H
S M
A A
A H
A M
H H
H M
M M
sll_operator_inv
I
F
C
S
A
H
M
sll_operator_shr
I I
I F
I C
I S
I A
I H
I M
F I
F F
F C
F S
F A
F H
F M
C I
C F
C C
C S
C A
C H
C M
S I
S F
S C
S S
S A
S H
S M
A I
A F
A C
A S
A A
A H
A M
H I
H F
H C
H S
H A
H H
H M
M I
M F
M C
M S
M A
M H
M M
sll_operator_shl
I I
I F
I C
I S
I A
I H
I M
F I
F F
F C
F S
F A
F H
F M
C I
C F
C C
C S
C A
C H
C M
S I
S F
S C
S S
S A
S H
S M
A I
A F
A C
A S
A A
A H
A M
H I
H F
H C
H S
H A
H H
H M
M I
M F
M C
M S
M A
M H
M M
sll_operator_len
I
F
C
S
A
H
M
sll_operator_dup
I
F
C
S
A
H
M
sll_operator_access
S I
A I
M *
sll_operator_access_range
S I I
A I I
M * *
sll_operator_access_range_step
S I I I
A I I I
M * * *
sll_operator_cast
I I
I F
I C
I S
I A
I H
I M
I K
I V
F I
F F
F C
F S
F A
F H
F M
F K
F V
C I
C F
C C
C S
C A
C H
C M
C K
C V
S I
S F
S C
S S
S A
S H
S M
S K
S V
A I
A F
A C
A S
A A
A H
A M
A K
A V
H I
H F
H C
H S
H A
H H
H M
H K
H V
M I
M F
M C
M S
M A
M H
M M
M K
M V
sll_operator_bool
I
F
C
S
A
H
M
sll_operator_compare
I I
I F
I C
I S
I A
I H
I M
F I
F F
F C
F S
F A
F H
F M
C I
C F
C C
C S
C A
C H
C M
S I
S F
S C
S S
S A
S H
S M
A I
A F
A C
A S
A A
A H
A M
H I
H F
H C
H S
H A
H H
H M
M I
M F
M C
M S
M A
M H
M M
sll_operator_equal
I I
I F
I C
I S
I A
I H
I M
F I
F F
F C
F S
F A
F H
F M
C I
C F
C C
C S
C A
C H
C M
S I
S F
S C
S S
S A
S H
S M
A I
A F
A C
A S
A A
A H
A M
H I
H F
H C
H S
H A
H H
H M
M I
M F
M C
M S
M A
M H
M M
Symbols:
I
: IntF
: FloatC
: CharS
: StringA
: ArrayH
: HandleM
: MapK
: KeysV
: Values*
: Any typeThe sll__add_debug_data
function stores a local address (__func__
passed via the fn
parameter) to the debug data structure.
Generate Clean-Up Code (SLL_ASSEMBLY_INSTRUCTION_TYPE_DEL
and SLL_ASSEMBLY_INSTRUCTION_TYPE_LOAD_DEL
) at the end of every major control path (SLL_OBJECT_TYPE_FOR
, SLL_OBJECT_TYPE_WHILE
, SLL_OBJECT_TYPE_LOOP
, SLL_OBJECT_TYPE_RETURN
and SLL_OBJECT_TYPE_EXIT
)
The sll_add_string
function does not free the string argument if it does not add it to the list.
Convert the build system to the C language. (#24)
Optimize printing integers and floats to printing strings
Create a proper documentation of sll and publish it to github pages
Add a new CLI option (-U
) to allow users to update their local SLL instalation.
sll_array_create
and sll_string_create
should use buffers to speed up adding/removing/replacing items and and accessing subarrays (#3)
Extend the time api to allow for sleeping (sll_api_time_sleep
and sll_api_time_sleep_nanos
functions). The functions would use a function called sll_platform_sleep
. This api would be avaible via time.sll
Add Test Coverage metrics in build_sll_test
Add operators for breaking out of loops ((@)
) or jumping to the beginning of a loop ((<<<)
).
Also rename the exit function ((@)
) to ((@@@)
).
Optimize printing by combining neightbouring strings
Some files include non-used header or do not include headers that are used (ex. src/sll/vm.c
does not include sll/gc.h
)
Implement tail call optimization by jumping to a function instead of calling it and returning.
Test to reduce the size of the untested code and prevent bugs.
Add a new command line option to enable users to execute a sample of code directly from the command line.
Add new module named json.sll
with functions for parsing and stringifying.
Add an operator (($$)
) to quickly check for a zero-handle (which indicates an error).
The PRINT_INT_SIGN
macro does not print the sign when v
is equal to 0.
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.