Skip to content

Commit 60cbeec

Browse files
author
Florian Thake
committed
TeaScript 0.10.0 Release, changed license to AGPL-3.0
1 parent 5a018d1 commit 60cbeec

36 files changed

+3494
-497
lines changed

CONTRIBUTING.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
This is the contributor license agreement. If you are looking for the usage license, see COPYRIGHT.TXT
2+
3+
## TeaScript C++ Library Contributor License Agreement
4+
5+
By contributing content to this repository (TeaScript-Cpp-Library) (i.e., submitting a pull request for inclusion in this repository):
6+
- You warrant that your material is original and owned by you.
7+
- With your contribution(s) you grant a sublicensable, irrevocable, perpetual, worldwide, non-exclusive, royalty-free and fully paid-up copyright and trade secret license to reproduce, adapt, translate, modify, and prepare derivative works of, publicly display, publicly perform, sublicense, make available and distribute your contribution(s) and any derivative works thereof under license terms of Florian Thake’s choosing.
8+
- For the avoidance of doubt, I, Florian Thake, have the right, but no obligation whatsoever to utilize any contribution.
9+
10+
## Important
11+
I don't want waste your work and time. So, please before you start to program major changes / extensions or whatever, reach out to me first.
12+
I am most likely not accepting major changes or extensions which we have not agreed before hand.

COPYRIGHT.TXT

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,34 @@
11
Except where otherwise noted all files included are copyrighted by Florian Thake.
22

3-
Copyright (c) 2023 Florian Thake <support |at| tea-age.solutions>. All rights reserved.
3+
Copyright (c) 2023 Florian Thake <contact |at| tea-age.solutions>.
44

55

6-
See included LICENSE.TXT for usage conditions and permissions.
6+
All source files of the TeaScript C++ Library are dual licensed.
7+
This copy is licensed under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3
8+
See included LICENSE.TXT or <https://www.gnu.org/licenses/>.
9+
If you cannot or don't want use this AGPL version,
10+
you can ask for a different license via the contact information below.
11+
12+
13+
Additionally:
14+
15+
All files marked with
16+
SPDX-License-Identifier: AGPL-3.0-only
17+
are licensed under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3
18+
19+
See included LICENSE.TXT or <https://www.gnu.org/licenses/>.
20+
21+
22+
All files marked with
23+
SPDX-License-Identifier: MIT
24+
are licensed under the MIT License.
25+
See included MIT_LICENSE.TXT
726

827

928
Florian Thake
1029
TeaAge Solutions
1130
https://tea-age.solutions
1231

13-
Email: support |at| tea-age.solutions
32+
Email: contact |at| tea-age.solutions
1433
Alternative: tea.age.solutions |at| email.de
1534

Known_Issues.txt

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@ Beside feature incompleteness there are the following known issues which will be
2626
For convert i64 to f64 you can either use to_f64 or simply add 0.0 for f64 promotion.
2727

2828

29-
4.) [PLATFORM: any]
30-
Actually only the last statement/expression inside an expression formed with parantheses will be evaluated!
31-
(a := 4, b := 5) // the assignment to a will not be done!
32-
This is because actually parenthesis with more than one expression are reserved for build tuples.
33-
But tuples are not implemented yet.
29+
4.) [PLATFORM: any] : Solved! (Tuples are implemented now.)
3430

3531

3632
5.) [PLATFORM: Windows]
@@ -65,4 +61,15 @@ Beside feature incompleteness there are the following known issues which will be
6561

6662
8.) [PLATFORM: Linux]
6763
CoreLibrary function clock_utc() will return UTC time _without_ leap seconds.
64+
65+
9.) [PLATFORM: Linux]
66+
The readline functionality (e.g. for the REPL) lacks history and nice editing support as it is present on Windows.
67+
68+
10.) [PLATFORM: any]
69+
Accessing nested tuples via index must be surrounded with parenthesis like this:
70+
(tup.0).1 // access index 1 of the tuple at index 0 of the tuple 'tup'.
71+
note: tup.0.1 is parsed to ID: tup, dot-op, f64( 0.1 ) which results only in index 0 of tup.
6872

73+
11.) [PLATFORM: any]
74+
the 'debug' operator displays a dot (.) instead of the name for tuple elements
75+
although the element itself is displayed correct.

LICENSE.TXT

Lines changed: 643 additions & 38 deletions
Large diffs are not rendered by default.

NO_WARRANTY.TXT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ in a non backwards compatible or a non upgradeable way without prior notice with
1515

1616
If you encounter bugs or problems, have feature wishes or any other question you may try to contact:
1717

18-
support |at| tea-age.solutions
18+
contact |at| tea-age.solutions
1919

2020

2121
Florian Thake

demo/dir.tea

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/opt/TeaAgeSolutions/TeaScript/bin/TeaScript
2+
/*
3+
* SPDX-FileCopyrightText: Copyright (C) 2023 Florian Thake, <contact |at| tea-age.solutions>.
4+
* SPDX-License-Identifier: MIT
5+
* see included file MIT_LICENSE.txt
6+
*/
7+
8+
// this script prints all files of given dir (or current working dir if invoked without arguments)
9+
10+
not is_defined arg1 and (def arg1 := ".")
11+
12+
def cur := readdirfirst( arg1 )
13+
println( "file listing of %(cur.path): ")
14+
if( not cur.valid ) {
15+
if( cur.error > 0 ) {
16+
println( "error: %(cur.error)" )
17+
}
18+
}
19+
repeat {
20+
if( not cur.valid ) { stop }
21+
22+
if( cur.is_file ) {
23+
println( "file: %(cur.name), size: %(cur.size), last modified: %(cur.last_modified)" )
24+
} else if( cur.is_dir ) {
25+
println( "dir: %(cur.name), last modified: %(cur.last_modified)" )
26+
}
27+
28+
cur := readdirnext( cur )
29+
}

demo/double_linked_list.tea

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
#!/opt/TeaAgeSolutions/TeaScript/bin/TeaScript
2+
/*
3+
* SPDX-FileCopyrightText: Copyright (C) 2023 Florian Thake, <contact |at| tea-age.solutions>.
4+
* SPDX-License-Identifier: MIT
5+
* see included file MIT_LICENSE.txt
6+
*/
7+
8+
// This is a demo script for showing a double linked list with the help of named tuples.
9+
10+
// NOTE: If you need a list, using an index based tuple together with the following helper functions is a common alternative:
11+
// _tuple_append, _tuple_insert, _tuple_remove, _tuple_swap + the ordinary other tuple functions.
12+
13+
14+
// factory function for a new node with payload data
15+
func create_node( data )
16+
{
17+
def node := _tuple_create() // empty tuple
18+
def node.prev := _tuple_create() // empty tuple
19+
def node.next := _tuple_create() // empty tuple
20+
def node.data := data
21+
node
22+
}
23+
24+
25+
// insert a new node with given data right after the given node.
26+
func insert( node @=, data )
27+
{
28+
def new := create_node( data )
29+
30+
if( node.next ) { // checks for not empty tuple
31+
new.next @= node.next
32+
node.next.prev @= new
33+
}
34+
node.next @= new
35+
new.prev @= node
36+
37+
void
38+
}
39+
40+
41+
// create the head of the list
42+
43+
def head := create_node( 1 )
44+
45+
// insert some data....
46+
insert( head, 4 )
47+
insert( head, 3 )
48+
insert( head, 2 )
49+
50+
// iterate over the list and print the data
51+
def cur @= head
52+
repeat {
53+
if( cur ) { // checks for not empty tuple
54+
println( cur.data )
55+
cur @= cur.next
56+
} else {
57+
stop
58+
}
59+
}
60+
61+
// NOTE: for longer running scripts it could be necessary to manual cleanup the list
62+
// after it is not needed anymore due to the cyclic references formed by prev/next.
63+
// But for short running scripts like this it is not necessary.
64+
65+
println( "END!" )

0 commit comments

Comments
 (0)