-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchangelog.txt
More file actions
228 lines (195 loc) · 11.4 KB
/
changelog.txt
File metadata and controls
228 lines (195 loc) · 11.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
/// Change log of the DevScript jar file ///
1.9.13:
- The "import" command got very few love the last updates:
- The class of the imported .jar file only has to extend the "Library" class and does not need to be named "CustomLibrary"
BUT that means I have to use a third party library :(
- Relative paths (*/lib.jar for example) can either be:
The folder of a script file that is being executed
OR the folder of the script host, if no file is being loaded
- The editor now looks a little more fancier with some additional options to rerun scripts or terminate a script without closing the window
- Added some additional commands to resize the console window or to clean the window
- gui.clear
- gui.setSize [sizeX] [sizeY]
- gui.fullscreen [$true/$false]
(The command "clearConsole" is still available but will be removed in future releases by the "gui.clear" command)
- Started to make some plans to implement a simple graphics library to control java awt elements ;)
- Try statements can now have a catch block that executes when an error occured so you actually know when something went wrong!
Example:
try {
awdawdsdaw;
} catch ex {
println "The exception was: " $ex;
}
- Added error handling tutorial/examples for try/catch stuff and more examples
- Added a small welcome message for the GUI editor to prevent confusion
1.9.12:
- DevScript can now property handle the null variable $null. (="undefined")
- Added an explanation for the "wait" command
- Added an overloaded command "push [value] [array] [index]" to insert values at a specified index into an array
- Added some tips (On how to create "classes", for example) and improved the tutorials
- The variable PI should now be recognized as an actual number
- More examples
- Fixed a profanity in an error message
- Division by zero now throws a readable error message (It previously resultet in "Infinity" which was not recognized as a number before, causing confusing errors
- Added an ascii raycast example to show off the script capabilities (Take a look! Examples -> demos -> raycast)
- Added a snake game as example
- Fixed an issue where 0.000 == 0 would return false
- Added a "keyPressed" event function to the devscript editor library so you can create simple games.
- Improved performance
- More minor fixes
1.9.11:
- Fixed try command issue with loops
- Added sqrt function (Square root)
- Added sin, cos and tan commands (They obviously act like sin, cos and tan functions in math, arguments in degrees)
- Added PI constant as variable
1.9.10:
- You can add an array element by adding any value to an array ($array + "newElement") <- This will add a new element to an array. A short version for the "push" command
- You can concatenate two arrays using the "+" command now
- You can use a tenary command for shorter if statements:
println ($condition ? "Condition is true" "Condition is false")
- Enhanced if statements. Instead of writing this:
if $condition {
println "true";
} {
println "false";
}
It will now look like this:
if $condition {
} else {
}
Also elseif is now possible which wasn't even a thing before 1.9.10. The new if- command is compatible with the old version!
More info: file > Examples > tutorials > Variables and conditionals
- You can use "?" as array index to let DevScript choose a random entry for you:
colors = [black blue gray white];
print $colors[?];
- You can now use \n and \t inside Strings
- You can also now put line breaks and tabs using the $n and $t variables. Example:
println "this is one line" $n "this is another line";
println "before tab" $t "after tab";
- Provided more examples and better tutorials
- Fixed an error where the "applicationListener" listener was not fired properly when a script was finished.
- MASSIVELY improved the performance. Prepare for LIGHTNING SPEED AND EFFICIENCY!
- Removed the "dict" data type
- You can now access dictionary (aka. "objects") properties with the standard "." notation.
Instead of this (Even worse with nested objects):
dict = (createdict);
set $dict variable "some-variable";
println (get $dict variable);
Your script will now look like this:
dict = (new-object {});
dict.variable = "cool";
println $dict.variable;
More info under file > Examples > tutorials > Objects in the DevScript GUI Editor
1.9.9:
- Added the option to add custom properties to commands using the Property.of(name, data) function
1.9.7:
- Added Option to make commands not case sensitive.
Process.setCaseSensitive(true/false);
If true, the command 'println Test' is the same as 'PrInTLN Test'
- Code cleanup
1.9.6:
- Added error stream to "exec" command
1.9.5:
- Added optional "setup(Process process)" function to libraries. Fired once, when the library is imported. When a process is running. Useful to set up listeners etc.
- Added "executeEventFunction()" to libraries. Use this function to fire functions in a running process.
- Fixed a bug where the Process would throw an error if you tried to import custom libraries with the "import" command
- Custom Libraries can now only have one Process attached which is now accessible in CustomLibrary not only through commands anymore.
1.9.4:
Added linux and mac Support for the "exec" Command.
This command can now execute Shell commands on a linux or mac os device.
1.9.3:
Added an application listener to fire when the script finishes.
Example:
onexit = {
println "Program finished";
};
The script will now print "Program finished" once it -well- finishes.
This function needs to be placed in the main function.
Useful if you want to work with sockets.
1.9.0:
- This big Update gives you an Editor GUI! It runs, if you run the program without arguments. However, if you specify arguments inside the
command line this will happen: -e or --execute: Loads this script into the editor. -f or --file Loads the file into the editor.
To launch the jar file without a GUI, you need to put an --nogui argument.
Example: java -jar devscript_1.9.0.jar --file "path_to_file" --nogui -> Executes the file inside the command line
java -jar devscript_1.9.0.jar --execute "println foo;" -> Opens the editor window with "println foo;" as the content.
- Easier input setting. Before 1.9.0, it is very complicated to implement a custom InputStream. This update provides an abstract
com.devscript.raw.ApplicationInput class, to make it easier to create inputs other than the System.in: process.setInput(new ApplicationInput() {...});
1.8.3:
- New Command: use [STRING]; This command replaces the location of the command with code from the given string as the first argument.
This command is especially useful, if you want to include code from a separate file without creating a whole new library.
- New Command: long [ANY]; This command casts a given value into java.lang.Long.
- New Command: [STRING] % [STRING]; Modulo command.
- New Command: readFileLines [OBJ]; Reads the file and returns an array containing all the lines.
- Arithmetic operators (+, -, *, /, %) are now able to handle Long.MAX_VALUE values and java.lang.Integers, java.lang.Floats and java.lang.Long not just Strings
as numbers before. (println ((int 10) + 4); is now possible)
- The random command now returns only floating points with 4 decimals and the issue with scientific notation is fixed.
- Floating point notation supports now both US ('.') and European (',') notation.
1.8.2:
Fixed issues with the commands: <, <=, >, >= that contain the "long string" braces: <>
The following commands have been changed (similar to bash):
< "lt" (less than)
> "gt" (grater than)
<= "lteq" (less than and equal)
>= "gteq" (grater than and equal)
The help command can also differenciate between libraries.
Operator commands like +, - * / can now handle Long values (UPDATE: Not really XD)
1.4.0: (beta):
Added a feature to get array indices easier and without command. $arrayExample[0]; <- This returns the index 0 of the variable arrayExample.
use at own risk, not fully debugged and without 2d array support.
1.5.0 (stable): DEPRECATED
Fully debugged functionality for easier array index access.
arrayExample = [["Inner array"] "This" "is" "an" "example"];
Now you can safely use the $arrayExample[1] (= "This") to get indices of arrays and the command "index $arrayExample 1"; is now deprecated.
They also work with higher dimensional arrays like in java, for example: $arrayExample[0][0] (= "Inner array")
To change an index of an array, use the "->" command. Look at the example below:
array = ["old" "someValue"];
newValue = "new";
$newValue -> $array[0];
The arrow will "shift" the given DataContainer in argument 0 ($newValue) into the second DataContainer $array[0]. Easy and clear, huh? And without confusing command syntax.
Also fixed a major issue, with variables declared outside the process.
1.5.1 (stable):
Added a java function to get the libraries (getLibraries() as ArrayList<Library>) , which include all the native commands,
and also your custom ones, if you added some as separated libraries.
You also have now the ability to name libraries to be able to distinguish between them.
But be careful!: Multiple libraries may have the same name!
1.6.0 (beta):
Added some more commands and dictionary support. Look at the example below:
dict = (createdict);
set $dict "key" "value";
println (get $dict "key"); -> value
1.6.1 (stable):
Minor performance improvements
Working on a bug, where the main block references (!) are not nulled after execution (WTF?!)
1.6.2 (stable)
Added various commands to cast values into java.lang.String, java.lang.Float and java.lang.Integer
1.7.0 (stable raw)
Improved performance and less data usage by passing raw data instead of creating DataContainers first, which where really unnessesary.
Removed commands: "->"
Also removed the abillity to pass by reference :8
1.7.1 (beta)
Added "large strings". Use < at the Start of a large String and terminate it with >.
Inside a large String you can place ANY character like ", \" or whatsoever.
However if you want to place a > without terminating the string, or <, use the escape character: \>
Large Strings can also get wrapped like braces. <"This is a large String? <This gets ignored> Now lets terminate the String>
In other words, large Strings make the use of special characters possible without escape characters (Except \< of course).
1.7.2 (stable)
Fixed an issue, where the process would throw an error while trying to access the
variable $null
1.7.3 (stable)
Fixed an issue, were you where not able to set any value of an array after the 1.7.0 update.
Added the command: === (Since you can't use < or > anymore, because they are keywords)
Example:
array = [2 2 3];
1 === $array 0; #Set the value 1 to the $array with index 0#
This also works with arrays with multiple dimensions
array = [[1 2] [2 4]];
3 === $array 1 0; #Set the value 3 to the index 0 from the inner array with index 1 from the $array (Read again, but slow!)#
1.8.0 (beta)
Added the option for functions to return values. With the command return "arg1";
If you don't pass any arguments for the return command, the returned value will be null (Similar to Java (?))
Example:
add = {
return ($0 + $1);
};
println (call $add 1 1);
-> 2