Skip to content

Commit 8658e92

Browse files
committed
250508.1
1 parent a5ae705 commit 8658e92

File tree

8 files changed

+71
-2
lines changed

8 files changed

+71
-2
lines changed
Binary file not shown.

easycoder/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
from .ec_timestamp import *
1010
from .ec_value import *
1111

12-
__version__ = "250507.2"
12+
__version__ = "250508.1"

easycoder/ec_program.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def __init__(self, argv):
4646
self.compiler = Compiler(self)
4747
self.value = self.compiler.value
4848
self.condition = self.compiler.condition
49+
self.graphics = None
4950
self.processClasses()
5051
self.externalControl = False
5152
self.running = True

easycoder/ec_timestamp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from datetime import datetime
33

44
def getTimestamp(t):
5-
tz = pytz.timezone('Europe/London') # Localize this!
5+
tz = pytz.timezone('GB') # Localize this!
66
dt = datetime.fromtimestamp(t)
77
# print(f'{dt} + {tz.dst(dt).seconds}')
88
return int(t) + tz.dst(dt).seconds

test.ecs

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
script Benchmark
2+
3+
variable Start
4+
variable Finish
5+
variable N
6+
variable M
7+
variable Array
8+
variable Dictionary
9+
10+
! debug step
11+
12+
print `FOR loop counting to 500,000`
13+
put now into Start
14+
put 0 into N
15+
while N is less than 500000 increment N
16+
put now into Finish
17+
take Start from Finish giving N
18+
print N cat ` seconds`
19+
20+
print `Compare 500,000 long integers for equality`
21+
put now into Start
22+
put 0 into N
23+
while N is less than 500000
24+
begin
25+
if N is 1234567890 begin end
26+
increment N
27+
end
28+
put now into Finish
29+
take Start from Finish giving N
30+
print N cat ` seconds`
31+
32+
print `Allocate and initialize a 500,000 element array`
33+
put now into Start
34+
set the elements of Array to 500000
35+
put 0 into N
36+
while N is less than 500000
37+
begin
38+
index Array to N
39+
put N into Array
40+
increment N
41+
end
42+
put now into Finish
43+
take Start from Finish giving N
44+
print N cat ` seconds`
45+
46+
print `Allocate and initialize a 5000 element dictionary`
47+
put json `{}` into Dictionary
48+
put now into Start
49+
put 0 into N
50+
while N is less than 100
51+
begin
52+
put 0 into M
53+
while M is less than 50
54+
begin
55+
set property N cat ` ` cat M of Dictionary to M
56+
increment M
57+
end
58+
increment N
59+
end
60+
put now into Finish
61+
take Start from Finish giving N
62+
print N cat ` seconds`
63+
exit

test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from easycoder import Program
2+
3+
Program('test.ecs').start()

test.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Hello, world!
2+
I'm back!

0 commit comments

Comments
 (0)