fig educational language - 4.6
single-file program translator (python 2) uses pygame for graphics
Ian
(figosdev)
fig is a language designed to make it easier to learn programming. it is inspired by basic, python and logo.
with some of the lightest syntax requirements in history, and between 90 and 100 commands, fig uses the term window/vt by default:
and if pygame is installed and the "textmode" command is not added, it can do real graphics as well: https://zippy.gfycat.com/BigBabyishGrebe.webm -- the fig code for that animation is 24 lines long, less than 800 bytes.
Changes
fig is a language designed to make it easier to learn programming. it is inspired by basic, python and logo.
with some of the lightest syntax requirements in history, and between 90 and 100 commands, fig uses the term window/vt by default: https://i.imgtc.com/K2EvyXd.png
and if pygame is installed and the "textmode" command is not added, it can do real graphics as well: https://zippy.gfycat.com/BigBabyishGrebe.webm
the latest stable version of fig is 4.6. 4.7 is todays broken attempt to clean up after the "hello from the pygame community" text.
here is the fig program for the animation included in this post:
[code]#### license: creative commons cc0 1.0 (public domain)
#### creativecommons.org/publicdoma…
proginf = "doublespiral 2017 mn"
function rgbcolour r g b c
python
figcgapal[c] = (r, g, b)
fig
fig
v 1
c 400
w 3.14159 divby 2
for r 490 300 -.25
e w minus 0.00413367105263 swap e w # 3.14159 / 4 / (490 - 300)
for p -3.14159 3.14159 .003067958984375
e w cos times 380 divby 2 int
rc r divby 2 int
rd 256 minus rc rgbcolour rc rc rc 11
x p times 2 cos times e plus c int
y p times 2 sin times e plus r minus 50 int
m 6.28 plus 1.57 divby 108.503 divby 2
now v plus m swap now v
rc r divby 4 int mod 2
iftrue rc
now v int mod 2 times 11 pset x y now
y2 y minus 1 pset x y2 now
fig
next
now display
next
now display lineinput
[/code]
Links
Releases
fig educational language 4.6 — 11 Dec, 2018