Skip to content

Commit 34b6cc6

Browse files
committed
v250101.1
1 parent ff80267 commit 34b6cc6

23 files changed

+264
-55
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Introduction
2-
This is the Python version of **_EasyCoder_**, a high-level English-like scripting language suited for prototyping and rapid testing of ideas. It operates on the command line.
2+
**_EasyCoder_** is a high-level English-like scripting language suited for prototyping and rapid testing of ideas. It operates on the command line and a graphics module is under construction. This version of the language is written in Python and its runtime acts as a fairly thin wrapper around Python functions, giving good performance for general applications.
33

44
The JavaScript version of **_EasyCoder_**, which provides a full set of graphical features to run in a browser, is at
55

@@ -44,16 +44,16 @@ As you can guess from the above, the print command gives the line in the script
4444

4545
Here in the repository is a folder called `scripts` containing some sample scripts:
4646

47-
`benchmark.ecs` allows the performance of EasyCoder to be compared to other languages if a similar program is written for each one
48-
`tests.ecs` is a test program containing many of the EasyCoder features
49-
`fizzbuzz.ecs` is a simple programming challenge often given at job interviews
47+
`fizzbuzz.ecs` is a simple programming challenge often given at job interviews
48+
`tests.ecs` is a test program containing many of the EasyCoder features
49+
`benchmark.ecs` allows the performance of EasyCoder to be compared to other languages if a similar program is written for each one
5050

5151
## Graphical programmming
52-
**_EasyCoder_** includes a graphical programming environment that is in the early stages of development. A couple of demo scripts are included in the `scripts` directory. To run them, first install the Python `kivy` graphics library if it's not already present on your system. This is done with `pip install kivy`. Then run a script using `easycoder {scriptname}.ecg`.
52+
**_EasyCoder_** includes a graphical programming environment that is in the early stages of development. A couple of demo scripts are included in the `scripts` directory. To run them, first install the Python `kivy` graphics library if it's not already present on your system. This is done with `pip install kivy`. Then run your **_EasyCoder_** script using `easycoder {scriptname}.ecg`.
5353

54-
Graphical scripts look much like any other script but their file names must use the extension `.ecg` to signal to **_EasyCoder_** that it needs to load the graphics module. This allows the **_EasyCoder_** application to be used wherever Python is installed, in either a command-line or a graphical environment (but graphics will of course not be available in the former).
54+
Graphical scripts look much like any other script but their file names must use the extension `.ecg` to signal to **_EasyCoder_** that it needs to load the graphics module. Non-graphical applications can use any extension but `.ecs` is recommended. This allows the **_EasyCoder_** application to be used wherever Python is installed, in either a command-line or a graphical environment, but graphics will of course not be available in the former.
5555

56-
A couple of demo scripts are included in the `scripts` directory:
56+
A couple of demo graphical scripts are included in the `scripts` directory:
5757

5858
`graphics-demo.ecg` shows some of the elements that can be created, and demonstrates a variety of the graphical features of the language such as detecting when elements are clicked.
5959

-31.6 KB
Binary file not shown.
31.9 KB
Binary file not shown.
Binary file not shown.

doc/README.md

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,7 @@
1-
# The 'core' package
1+
# _EasyCoder_ packages
22

3-
There are three primary components to the language:
3+
'Packages' are components of the **_EasyCoder_** system that deal with specific groups of language features. Thos included or available from the repository are
44

5-
- Keywords
6-
- Values
7-
- Conditions
5+
{core}(core/README.md) contains all the language features needed to construct command-line applications to run on any computer equipped with Python.
86

9-
The core package contains all the keywords values and conditionals needed for general programming, and to build most command-line tools these are all that will be needed.
10-
11-
The core keywords are:
12-
13-
[add](core/keywords/add.md) [append](core/keywords/append.md) [assert](core/keywords/assert.md) [begin](core/keywords/begin.md) [clear](core/keywords/clear.md) [close](core/keywords/close.md) [create](core/keywords/create.md) [debug](core/keywords/debug.md) [decrement](core/keywords/decrement.md) [delete](core/keywords/delete.md) [divide](core/keywords/divide.md) [exit](core/keywords/exit.md) [file](core/keywords/file.md) [fork](core/keywords/fork.md) [get](core/keywords/get.md) [go](core/keywords/go.md) [gosub](core/keywords/gosub.md) [if](core/keywords/if.md) [import](core/keywords/import.md) [increment](core/keywords/increment.md) [index](core/keywords/index.md) [init](core/keywords/init.md) [input](core/keywords/input.md) [multiply](core/keywords/multiply.md) [negate](core/keywords/negate.md) [open](core/keywords/open.md) [pop](core/keywords/pop.md) [post](core/keywords/post.md) [print](core/keywords/print.md) [push](core/keywords/push.md) [put](core/keywords/put.md) [read](core/keywords/read.md) [replace](core/keywords/replace.md) [return](core/keywords/return.md) [script](core/keywords/script.md) [set](core/keywords/set.md) [split](core/keywords/split.md) [stack](core/keywords/stack.md) [stop](core/keywords/stop.md) [system](core/keywords/system.md) [take](core/keywords/take.md) [toggle](core/keywords/toggle.md) [truncate](core/keywords/truncate.md) [variable](core/keywords/variable.md) [wait](core/keywords/wait.md) [while](core/keywords/while.md) [write](core/keywords/write.md)
14-
15-
The core values are:
16-
17-
[arg](core/values/arg.md) [args](core/values/args.md) [cos/sin/tan](core/values/trig.md) [now](core/values/now.md) [today](core/values/today.md) [newline](core/values/newline.md) [break](core/values/break.md) [empty](core/values/empty.md) [date](core/values/date.md) [encode](core/values/encode.md) [decode](core/values/decode.md) [stringify](core/values/stringify.md) [json](core/values/json.md) [lowercase](core/values/lowercase.md) [uppercase](core/values/uppercase.md) [hash](core/values/hash.md) [random](core/values/random.md) [float](core/values/float.md) [integer](core/values/integer.md) [datime/datetime](core/values/datime.md) [element](core/values/element.md) [elements](core/values/elements.md) [property](core/values/property.md) [trim](core/values/trim.md) [keys](core/values/keys.md) [count](core/values/count.md) [index](core/values/index.md) [value](core/values/value.md) [length](core/values/length.md) [left](core/values/left.md) [right](core/values/right.md) [from](core/values/from.md) [position](core/values/position.md) [message](core/values/message.md) [timestamp](core/values/timestamp.md) [files](core/values/files.md) [weekday](core/values/weekday.md) [mem/memory](core/values/mem.md) [error](core/values/error.md) [type](core/values/type.md) [modification](core/values/modification.md)
18-
19-
The core conditions are:
20-
21-
[Back](../README.md)
7+
{graphics}(graphics/README.md) contains a growing selection of graphical language features, to construct applications that will run on a computer with a graphical user interface; Windows, Mac or Linux.

doc/core/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# The 'core' package
2+
3+
The core package contains all the keywords values and conditionals needed for general programming, and to build most command-line tools these are all that will be needed.
4+
5+
There are three primary components to the language:
6+
7+
- Keywords
8+
- Values
9+
- Conditions
10+
11+
The core keywords are:
12+
13+
[add](core/keywords/add.md) [append](core/keywords/append.md) [assert](core/keywords/assert.md) [begin](core/keywords/begin.md) [clear](core/keywords/clear.md) [close](core/keywords/close.md) [create](core/keywords/create.md) [debug](core/keywords/debug.md) [decrement](core/keywords/decrement.md) [delete](core/keywords/delete.md) [divide](core/keywords/divide.md) [exit](core/keywords/exit.md) [file](core/keywords/file.md) [fork](core/keywords/fork.md) [get](core/keywords/get.md) [go](core/keywords/go.md) [gosub](core/keywords/gosub.md) [if](core/keywords/if.md) [import](core/keywords/import.md) [increment](core/keywords/increment.md) [index](core/keywords/index.md) [init](core/keywords/init.md) [input](core/keywords/input.md) [multiply](core/keywords/multiply.md) [negate](core/keywords/negate.md) [open](core/keywords/open.md) [pop](core/keywords/pop.md) [post](core/keywords/post.md) [print](core/keywords/print.md) [push](core/keywords/push.md) [put](core/keywords/put.md) [read](core/keywords/read.md) [replace](core/keywords/replace.md) [return](core/keywords/return.md) [script](core/keywords/script.md) [set](core/keywords/set.md) [split](core/keywords/split.md) [stack](core/keywords/stack.md) [stop](core/keywords/stop.md) [system](core/keywords/system.md) [take](core/keywords/take.md) [toggle](core/keywords/toggle.md) [truncate](core/keywords/truncate.md) [variable](core/keywords/variable.md) [wait](core/keywords/wait.md) [while](core/keywords/while.md) [write](core/keywords/write.md)
14+
15+
The core values are:
16+
17+
[arg](core/values/arg.md) [args](core/values/args.md) [cos](core/values/cos.md) [count](core/values/count.md) [break](core/values/break.md) [empty](core/values/empty.md) [date](core/values/date.md) [datime/datetime](core/values/datime.md) [element](core/values/element.md) [elements](core/values/elements.md) [decode](core/values/decode.md) [encode](core/values/encode.md) [error](core/values/error.md) [files](core/values/files.md) [float](core/values/float.md) [from](core/values/from.md) [hash](core/values/hash.md) [index](core/values/index.md) [integer](core/values/integer.md) [json](core/values/json.md) [keys](core/values/keys.md) [left](core/values/left.md) [length](core/values/length.md) [lowercase](core/values/lowercase.md) [mem/memory](core/values/mem.md) [modification](core/values/modification.md) [message](core/values/message.md) [newline](core/values/newline.md) [now](core/values/now.md) [position](core/values/position.md) [property](core/values/property.md) [random](core/values/random.md) [right](core/values/right.md) [sin](core/values/sin.md) [stringify](core/values/stringify.md) [tan](core/values/tan.md) [timestamp](core/values/timestamp.md) [today](core/values/today.md) [trim](core/values/trim.md) [type](core/values/type.md) [uppercase](core/values/uppercase.md) [value](core/values/value.md) [weekday](core/values/weekday.md)
18+
19+
The core conditions are:
20+
21+
[Back](../README.md)

doc/core/keywords/set.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
## Syntax:
22
`set {variable}`
3-
`set the elements of {variable} to {value}`
4-
`set element/property {name} of {variable} to {value}`
3+
`set [the] elements of {variable} to {value}`
4+
`set element/property {name} of {variable} to {value}`
5+
``set [the] encoding to `utf-8`/`base64` ``
56

67
## Examples:
78
`set Flag`
89
`set the elements of ThisVariable to 10`
910
`set element 5 of MyList to NewValue`
1011
``set property `name` of MyProperties to `first` ``
11-
``set property `age` of MyProperties to Age``
12+
``set property `age` of MyProperties to Age``
13+
``set the encoding to `base64` ``
1214

1315
## Description:
1416
`set` is a heavily used command in **_EasyCoder_**. Here in the core package it does the following, as listed in the Syntax above:
@@ -19,6 +21,8 @@
1921

2022
-- Sets an element or a property of a [variable](variable.md), providing it was intialised appropriately. Elements can be added to a variable that is intialised as JSON list, for example as ``put json `[]` into MyList``. Properties can be set on a variable that is initialised as a JSON object, for example as ``put json `{}` into MyProperties``. Note that this has nothing to do with the indexing of variables using [index](index.md). Each of the elements of such a variable can be treated as either a JSON list or as a JSON object, and either can be used for different elements of the same variable.
2123

24+
-- Sets the encoding to be used by the [encode](../values/encode.md) and [decode](../values/decode.md) value handlers. The encoder options are `utf-8` and `base64`. The default is `utf-8` if none is set by the script.
25+
2226
Next: [split](split.md)
2327
Prev: [script](script.md)
2428

doc/core/values/arg.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Syntax:
2+
`arg {n}`
3+
4+
## Examples:
5+
`print arg N`
6+
`print arg 2`
7+
8+
## Description:
9+
Gets the value of the `{n}`th command-line argument.
10+
11+
Next: [args](args.md)
12+
Prev: [weekday](weekday.md)
13+
14+
[Back](../../README.md)

doc/core/values/args.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## Syntax:
2+
`[the] args`
3+
4+
## Examples:
5+
`print the args`
6+
7+
## Description:
8+
Gets the command-line arguments as a JSON-formatted array.
9+
10+
Next: [cos](cos.md)
11+
Prev: [arg](arg.md)
12+
13+
[Back](../../README.md)

doc/core/values/cos.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Syntax:
2+
`cos {value} radius {radius}`
3+
4+
## Examples:
5+
`print cos 45 radius 100`
6+
`print cos Angle radius Radius`
7+
8+
## Description:
9+
Gets an integer value being the cosine of the given angle (in degrees), multiplied by the given radius. See also [sin](sin.md) and [tan](tan.md).
10+
11+
Next: [datime](datime.md)
12+
Prev: [args](args.md)
13+
14+
[Back](../../README.md)

0 commit comments

Comments
 (0)