
Show HN: The program code is in the URL - chkas
https://easylang.online/run/?code=%23%20Red%20ball%0A%23%20%0Afloatvars%0Arad%3D12%0Ax%3D50%0Ay%3D15%0Avx%3D1.5%0A%23%20%0Aon%20animate%0Amove%200%200%0Acolor%20111%0Arect%20100%20100%0Acolor%20700%0Amove%20x%20y%0Acircle%20rad%0Aif%20x%20%3E%20100%20-%20rad%20or%20x%20%3C%20rad%0Avx%3D-vx%0A.%0Ax%2B%3Dvx%0Aif%20y%20%3E%20100%20-%20rad%0Avy%3D-vy%0Aelse%0Avy%2B%3D0.1%0A.%0Ay%2B%3Dvy%0A.
======
zubairq
Great stuff. How do you monetize EasyLang?

~~~
chkas
Thanks. I don't. I don't intend to. And I don't have to.

~~~
zubairq
Can I do server side stuff with it too? If so I have some great uses for it

~~~
chkas
This language is not made for it. It is designed as a teaching and learning
language and has only arrays as data structures and no powerful string
functions. Also, the graphics builtins are not useful for other things than
simple canvas apps.

------
chkas
Just for demonstration:

[https://easylang.online/run/?code=%23%20Minesweeper%0A%23%20...](https://easylang.online/run/?code=%23%20Minesweeper%0A%23%20%0Alen%20cell%5B%5D%2056%0Alen%20cnt%5B%5D%2056%0Alen%20flag%5B%5D%2056%0A%23%20%0Asubr%20initvars%0Astate%3D0%0Aticks%3D0%0Aindx%3D-1%0A.%0Afunc%20getind%20r%20c%20.%20ind%20.%0Aind%3D-1%0Aif%20r%20%3E%3D%200%20and%20r%20%3C%3D%206%20and%20c%20%3E%3D%200%20and%20c%20%3C%3D%207%0Aind%3Dr%2A8%2Bc%0A.%0A.%0Afunc%20draw_cell%20ind%20h%20.%20.%0Ar%3Dind/8%0Ac%3Dind%20mod%208%0Ax%23%3Dc%2A12%2B2.5%0Ay%23%3Dr%2A12%2B14.5%0Amove%20x%23%20y%23%0Arect%2011%2011%0Aif%20h%20%3E%200%0A%23%20count%0Amove%20x%23%2B3%20y%23%2B2%0Acolor%20000%0Atext%20h%0Aelif%20h%3D-3%0A%23%20flag%0Ax%23%2B%3D4%0Acolor%20000%0Alinewidth%200.8%0Amove%20x%23%20y%23%2B3%0Aline%20x%23%20y%23%2B8%0Acolor%20600%0Alinewidth%202%0Amove%20x%23%2B0.5%20y%23%2B4%0Aline%20x%23%2B2%20y%23%2B4%0Aelif%20h%20%3C%3E%200%0A%23%20mine%0Acolor%20333%0Aif%20h%3D-2%0Acolor%20800%0A.%0Amove%20x%23%2B5%20y%23%2B6%0Acircle%203%0Aline%20x%23%2B8%20y%23%2B2%0A.%0A.%0Afunc%20open%20ind%20.%20.%0Aif%20ind%20%3C%3E%20-1%20and%20cell%5Bind%5D%3D0%0Acell%5Bind%5D%3D2%0Aflag%5Bind%5D%3D0%0Acolor%20686%0Acall%20draw_cell%20ind%20cnt%5Bind%5D%0Aif%20cnt%5Bind%5D%3D0%0Ar0%3Dind/8%0Ac0%3Dind%20mod%208%0Afor%20r%3Dr0%20-%201%20to%20r0%2B1%0Afor%20c%3Dc0%20-%201%20to%20c0%2B1%0Aif%20r%20%3C%3E%20r0%20or%20c%20%3C%3E%20c0%0Acall%20getind%20r%20c%20ind%0Acall%20open%20ind%0A.%0A.%0A.%0A.%0A.%0A.%0Afunc%20show_mines%20m%20.%20.%0Afor%20ind%20range%2056%0Aif%20cell%5Bind%5D%3D1%0Acolor%20686%0Aif%20m%3D-1%0Acolor%20353%0A.%0Acall%20draw_cell%20ind%20m%0A.%0A.%0A.%0Afunc%20outp%20col%20s%24%20.%20.%0Amove%202.5%202%0Acolor%20col%0Arect%2059%2011%0Acolor%20000%0Amove%205%204.5%0Atext%20s%24%0A.%0Afunc%20upd_info%20.%20.%0Anm%3D0%0Anc%3D0%0Afor%20i%20range%2056%0Anm%2B%3Dflag%5Bi%5D%0Aif%20cell%5Bi%5D%20%3C%202%0Anc%2B%3D1%0A.%0A.%0Aif%20nc%3D8%0Acall%20outp%20484%20%22Well%20done%22%0Acall%20show_mines%20-1%0Astate%3D1%0Aelse%0Acall%20outp%20464%208%20-%20nm%26%22%20mines%20left%22%0A.%0A.%0Afunc%20test%20ind%20.%20.%0Aif%20cell%5Bind%5D%20%3C%202%20and%20flag%5Bind%5D%3D0%0Aif%20cell%5Bind%5D%3D1%0Acall%20show_mines%20-1%0Acolor%20686%0Acall%20draw_cell%20ind%20-2%0Acall%20outp%20844%20%22B%20O%20O%20M%20%21%22%0Astate%3D1%0Aelse%0Acall%20open%20ind%0Acall%20upd_info%0A.%0A.%0A.%0Afunc%20start%20.%20.%0Acolor%20676%0Amove%200%200%0Arect%20100%20100%0Acolor%20353%0Afor%20ind%20range%2056%0Acnt%5Bind%5D%3D0%0Acell%5Bind%5D%3D0%0Aflag%5Bind%5D%3D0%0Acall%20draw_cell%20ind%200%0A.%0An%3D8%0Awhile%20n%20%3E%200%0Ac%3Drandom%208%0Ar%3Drandom%207%0Aind%3Dr%2A8%2Bc%0Aif%20cell%5Bind%5D%3D0%0An-%3D1%0Acell%5Bind%5D%3D1%0Afor%20rx%3Dr%20-%201%20to%20r%2B1%0Afor%20cx%3Dc%20-%201%20to%20c%2B1%0Acall%20getind%20rx%20cx%20ind%0Aif%20ind%20%3E%20-1%0Acnt%5Bind%5D%2B%3D1%0A.%0A.%0A.%0A.%0A.%0Acall%20initvars%0Acall%20outp%20464%20%22%22%0Atextsize%204%0Amove%205%203%0Atext%20%22Minesweeper%20-%208%20mines%22%0Amove%205%207.8%0Atext%20%22Long-
press%20for%20flagging%22%0Atextsize%206%0Atimer%200%0A.%0Aon%20mouse_down%0Aif%20state%3D0%0Acall%20getind%20floor%20%28%28mouse_y%20-%2014%29/12%29%20floor%20%28%28mouse_x%20-%202%29/12%29%20indx%0Aticks0%3Dticks%0Aelif%20state%3D3%0Acall%20start%0A.%0A.%0Aon%20mouse_up%0Aif%20state%3D0%20and%20indx%20%3C%3E%20-1%0Acall%20test%20indx%0A.%0Aindx%3D-1%0A.%0Aon%20timer%0Aif%20state%3D1%0Astate%3D2%0Atimer%201%0Aelif%20state%3D2%0Astate%3D3%0Aelif%20ticks%20%3E%203000%0Acall%20outp%20844%20%22B%20O%20O%20M%20%21%22%0Acall%20show_mines%20-2%0Astate%3D2%0Atimer%201%0Aelse%0Aif%20indx%20%3E%20-1%20and%20ticks%3Dticks0%2B5%0Aif%20cell%5Bindx%5D%20%3C%202%0Acolor%20353%0Aflag%5Bindx%5D%3D1%20-%20flag%5Bindx%5D%0Aopt%3D0%0Aif%20flag%5Bindx%5D%3D1%0Aopt%3D-3%0A.%0Acall%20draw_cell%20indx%20opt%0Acall%20upd_info%0A.%0Aindx%3D-1%0A.%0Aif%20ticks%20mod%2010%3D0%0Amove%2064.5%202%0Acolor%20464%0Aif%20ticks%20%3E%3D%202500%0Acolor%20844%0A.%0Arect%2033%2011%0Acolor%20000%0Amove%2066%204.5%0Atext%20%22Time%3A%22%20%26%20300%20-%20ticks/10%0A.%0Aticks%2B%3D1%0Atimer%200.1%0A.%0A.%0Acall%20start)

