Skip to content

Commit 9b48fc2

Browse files
committed
Doc
1 parent fd15dbd commit 9b48fc2

File tree

2 files changed

+95
-95
lines changed

2 files changed

+95
-95
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ <h2 id="ec-body">Notes</h2>
2222
<p>Almost all software becomes harder and harder to read the more time passes since it was written. After a few years, even the original author will have some difficulty in figuring out what was done, and anyone coming new to a project will have major trouble in all but the simplest of cases. So these notes are intended to provide a starting point.</p>
2323
<p>EasyCoder is a custom high-level scripting language that is itself written in JavaScript. So you can say quite correctly that any site using it is powered by JavaScript. At the time of writing it&#8217;s de rigeur to use a framework such as Angular or React, but after a few years these will become obsolete as newer technologies arrive. In any case, frameworks are not designed to make it easy to pick up a project; they&#8217;re intended to benefit developers who are writing new code. As such they are an implicit admission that the language itself (JavaScript) is not up to the job and requires extra features not provided by its authors.</p>
2424
<p>My preference is to use a better language, one that is designed to do the job without requiring a host of bolt-on extras. Since none were available I wrote my own and it&#8217;s called EasyCoder. I won&#8217;t provide a step-by-step tutorial (I have to leave you some work to do!) but just point you to where you can get the information you need.</p>
25-
<p>EasyCoder has/had its own website at <a href="https://easycoder.software">https://easycoder.software</a>, but this will only continue to exist as long as someone goes on paying the hosting fees. Once I&#8217;m no longer around they may well stop. For this and other reasons I created this static website on GitHub carrying a tutorial on the language and a complete programmers&#8217; reference manual. This will continue without any intervention from me. The URL is <a href="https://easycoder.github.io">https://github.com/gtanyware/EasyCoder</a>, and in the &#8220;codex&#8221; folder you&#8217;ll find all the files plus a zipped archive. It should be possible to place this on a server and run it up. Inside the Codex is a table of contents with a number of articles about building websites with EasyCoder. One of these explains the mechanism used here on Yorkshirewoman, where the home page contains just a boot script which loads the main script(s) that do all the work. With the help of the debugger in your browser you should be able to get familiar with the architecture, though in most cases all you will need is to know the script commands themselves, all of which are documented in the Codex.</p>
25+
<p>EasyCoder has/had its own website at <a href="https://easycoder.software">https://easycoder.software</a>, but this will only continue to exist as long as someone goes on paying the hosting fees. Once I&#8217;m no longer around they may well stop. For this and other reasons I created this static website on GitHub carrying a tutorial on the language and a complete programmers&#8217; reference manual. This will continue without any intervention from me. The repository is at <a href="https://github.com/easycoder">https://github.com/easycoder</a>, and in the &#8220;codex&#8221; folder you&#8217;ll find all the files plus a zipped archive. It should be possible to place this on a server and run it up. Inside the Codex is a table of contents with a number of articles about building websites with EasyCoder. One of these explains the mechanism used here, where the home page contains just a boot script which loads the main script(s) that do all the work. With the help of the debugger in your browser you should be able to get familiar with the architecture, though in most cases all you will need is to know the script commands themselves, all of which are documented in the Codex.</p>
2626
<p>And that&#8217;s all I have to say. I hope to be around for a few years yet, so do contact me if you would like to know anything. After that it&#8217;ll be out of my hands.</p>
2727
</div>
2828
</html>

resources/ecs/main.ecs

Lines changed: 94 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -2,110 +2,110 @@
22

33
script Main
44

5-
! div Tracer
6-
div Body
7-
div Main
8-
div Header
9-
div Sidebar
10-
div Document
11-
div Notes
12-
img Banner
13-
ul ButtonList
14-
li ButtonItem
15-
button HomeButton
16-
button IntroButton
17-
button ExamplesButton
18-
button AboutButton
19-
button PhilosophyButton
20-
button CodexButton
21-
hr Rule
22-
a ShowNotes
23-
module ShowdownModule
24-
module HomeModule
25-
module IntroModule
26-
module ExamplesModule
27-
module AboutModule
28-
module PhilosophyModule
29-
module CurrentModule
30-
variable Script
31-
variable ButtonStyle
32-
variable Message
33-
34-
! create Tracer
35-
! set attribute `id` of Tracer to `easycoder-tracer`
36-
create Body
37-
if mobile
5+
! div Tracer
6+
div Body
7+
div Main
8+
div Header
9+
div Sidebar
10+
div Document
11+
div Notes
12+
img Banner
13+
ul ButtonList
14+
li ButtonItem
15+
button HomeButton
16+
button IntroButton
17+
button ExamplesButton
18+
button AboutButton
19+
button PhilosophyButton
20+
button CodexButton
21+
hr Rule
22+
a ShowNotes
23+
module ShowdownModule
24+
module HomeModule
25+
module IntroModule
26+
module ExamplesModule
27+
module AboutModule
28+
module PhilosophyModule
29+
module CurrentModule
30+
variable Script
31+
variable ButtonStyle
32+
variable Message
33+
34+
! create Tracer
35+
! set attribute `id` of Tracer to `easycoder-tracer`
36+
create Body
37+
if mobile
3838
set the style of Body to `width:100%`
3939
else
4040
set the style of Body to `width:100%;max-width:1200px;margin:0 auto`
41-
42-
on message
43-
begin
44-
put the message into Message
45-
if Message is `hide`
46-
begin
47-
send `pause` to CurrentModule
48-
set style `display` of Body to `none`
49-
end
50-
else if Message is `restore`
51-
begin
52-
set style `display` of Body to `block`
53-
send `resume` to CurrentModule
54-
end
55-
end
41+
42+
on message
43+
begin
44+
put the message into Message
45+
if Message is `hide`
46+
begin
47+
send `pause` to CurrentModule
48+
set style `display` of Body to `none`
49+
end
50+
else if Message is `restore`
51+
begin
52+
set style `display` of Body to `block`
53+
send `resume` to CurrentModule
54+
end
55+
end
5656

5757
BuildPage:
58-
create Header in Body
59-
if mobile
60-
set the style of Header to `text-align:center`
58+
create Header in Body
59+
if mobile
60+
set the style of Header to `text-align:center`
6161
else
6262
set the style of Header to `margin:0 2em;text-align:center`
63-
64-
create Banner in Header
65-
if not mobile set the style of Banner to `width:50%;margin:0 auto`
66-
set attribute `src` of Banner to `resources/img/banner.png`
67-
68-
create Rule in Body
69-
70-
create Main in Body
71-
if not mobile
72-
begin
73-
set style `display` of Main to `flex`
74-
end
75-
76-
if mobile
77-
begin
78-
create Document in Main
79-
create Sidebar in Main
80-
end
81-
else
82-
begin
83-
create Sidebar in Main
84-
set the style of Sidebar to `width:250px;margin-right:2em`
85-
create Document in Main
86-
set the style of Document to `flex:1`
87-
end
63+
64+
create Banner in Header
65+
if not mobile set the style of Banner to `width:50%;margin:0 auto`
66+
set attribute `src` of Banner to `resources/img/banner.png`
67+
68+
create Rule in Body
69+
70+
create Main in Body
71+
if not mobile
72+
begin
73+
set style `display` of Main to `flex`
74+
end
75+
76+
if mobile
77+
begin
78+
create Document in Main
79+
create Sidebar in Main
80+
end
81+
else
82+
begin
83+
create Sidebar in Main
84+
set the style of Sidebar to `width:250px;margin-right:2em`
85+
create Document in Main
86+
set the style of Document to `flex:1`
87+
end
8888

89-
rest get Script from `/resources/ecs/showdown.ecs`
90-
run Script with Document as ShowdownModule
91-
rest get Script from `/resources/ecs/home.ecs`
92-
run Script with ShowdownModule as HomeModule
93-
rest get Script from `/resources/ecs/intro.ecs`
94-
run Script with ShowdownModule as IntroModule
95-
rest get Script from `/resources/ecs/examples.ecs`
96-
run Script with ShowdownModule as ExamplesModule
97-
rest get Script from `/resources/ecs/about.ecs`
98-
run Script with ShowdownModule as AboutModule
99-
rest get Script from `/resources/ecs/philosophy.ecs`
100-
run Script with ShowdownModule as PhilosophyModule
89+
rest get Script from `/resources/ecs/showdown.ecs`
90+
run Script with Document as ShowdownModule
91+
rest get Script from `/resources/ecs/home.ecs`
92+
run Script with ShowdownModule as HomeModule
93+
rest get Script from `/resources/ecs/intro.ecs`
94+
run Script with ShowdownModule as IntroModule
95+
rest get Script from `/resources/ecs/examples.ecs`
96+
run Script with ShowdownModule as ExamplesModule
97+
rest get Script from `/resources/ecs/about.ecs`
98+
run Script with ShowdownModule as AboutModule
99+
rest get Script from `/resources/ecs/philosophy.ecs`
100+
run Script with ShowdownModule as PhilosophyModule
101101

102-
alias CurrentModule to HomeModule
103-
send to HomeModule
102+
alias CurrentModule to HomeModule
103+
send to HomeModule
104104

105-
create ButtonList in Sidebar
106-
set the style of ButtonList to `margin-left:0px;padding-left:0px;list-style-type:none`
107-
108-
put `width:100%;height:2em;margin-bottom:0.5em;font-size:110%` into ButtonStyle
105+
create ButtonList in Sidebar
106+
set the style of ButtonList to `margin-left:0px;padding-left:0px;list-style-type:none`
107+
108+
put `width:100%;height:2em;margin-bottom:0.5em;font-size:110%` into ButtonStyle
109109

110110
create ButtonItem in ButtonList
111111
create HomeButton in ButtonItem

0 commit comments

Comments
 (0)