Basicprogramming(.org) > Community news and announcements
New Web-based BASIC-like language: https://easylang.online/
Ed Davis:
New Web-based BASIC-like language: https://easylang.online/
It is pretty cool. Lots of examples at their website (above). For instance, here is our old friend the mandelbrot:
--- Code: ---floatvars
for y% range 300
cy = (y% - 150) / 120
for x% range 300
cx = (x% - 220) / 120
n% = 0
x = 0
y = 0
while x * x + y * y < 4 and n% < 128
h = x * x - y * y + cx
y = 2 * x * y + cy
x = h
n% += 1
.
if n% = 128
color_red 0
else
color_red n% / 16
.
move x% / 3 y% / 3
rect 0.4 0.4
.
.
--- End code ---
It is pretty fun to play with!
B+:
Interesting, Python like and min. punctuation, reminds me of BestOf's stuff (who started calling himself "easylang").
Ed Davis:
--- Quote from: B+ on June 05, 2019, 12:44:10 PM ---Interesting, Python like and min. punctuation, reminds me of BestOf's stuff (who started calling himself "easylang").
--- End quote ---
Not to be argumentative - well, but I guess I am :-) - I don't really see much Python in it.
Python uses indentation for syntax, this uses ".". Python has lists and hashes, this does not.
This reminds me more of BASIC, what with the integer% and float# stuff.
And functions and subs look at least a little like BASIC:
--- Code: ---# compute the greatest common divisor
#
func gcd a b . res .
while b <> 0
h = b
b = a mod b
a = h
.
res = a
.
call gcd 120 35 r
print r
--- End code ---
I really don't like the "." syntax - much prefer the "end" style stuff, or even C's {}.
And it also has the infamous Fern, so it must be BASIC :-)
--- Code: ---floatvars
color 060
for i% range 200000
r = randomf
if r < 0.01
nx = 0
ny = 0.16 * y
elif r < 0.08
nx = 0.2 * x - 0.26 * y
ny = 0.23 * x + 0.22 * y + 1.6
elif r < 0.15
nx = -0.15 * x + 0.28 * y
ny = 0.26 * x + 0.24 * y + 0.44
else
nx = 0.85 * x + 0.04 * y
ny = -0.04 * x + 0.85 * y + 1.6
.
x = nx
y = ny
move 50 + x * 15 100 - y * 10
rect 0.3 0.3
.
--- End code ---
Aurel:
he he
it is freaking BASIC...
...sooooo is not dead ;D
B+:
--- Quote from: Ed Davis on June 05, 2019, 01:28:39 PM ---
--- Quote from: B+ on June 05, 2019, 12:44:10 PM ---Interesting, Python like and min. punctuation, reminds me of BestOf's stuff (who started calling himself "easylang").
--- End quote ---
Not to be argumentative - well, but I guess I am :-) - I don't really see much Python in it.
Python uses indentation for syntax, this uses ".". Python has lists and hashes, this does not.
This reminds me more of BASIC, what with the integer% and float# stuff.
And functions and subs look at least a little like BASIC:
--- Code: ---# compute the greatest common divisor
#
func gcd a b . res .
while b <> 0
h = b
b = a mod b
a = h
.
res = a
.
call gcd 120 35 r
print r
--- End code ---
I really don't like the "." syntax - much prefer the "end" style stuff, or even C's {}.
And it also has the infamous Fern, so it must be BASIC :-)
--- Code: ---floatvars
color 060
for i% range 200000
r = randomf
if r < 0.01
nx = 0
ny = 0.16 * y
elif r < 0.08
nx = 0.2 * x - 0.26 * y
ny = 0.23 * x + 0.22 * y + 1.6
elif r < 0.15
nx = -0.15 * x + 0.28 * y
ny = 0.26 * x + 0.24 * y + 0.44
else
nx = 0.85 * x + 0.04 * y
ny = -0.04 * x + 0.85 * y + 1.6
.
x = nx
y = ny
move 50 + x * 15 100 - y * 10
rect 0.3 0.3
.
--- End code ---
--- End quote ---
My opinion based on superficial look of one code sample, ha! the dots are like nothing... It does have a number of simple examples. I wonder about doing something more complex, say with image manipulation or alpha coloring.
BTW the elif and func are just like SmallBASIC.
Navigation
[0] Message Index
[#] Next page
Go to full version