MAGALANG

Magalang is a new language I am have been developing for righting mathematic algorithms and equations. Here is a line of code so far: x = 3 + 3 * (10 - 6) / 2; print x; y = x * 2; print y; z = x * y; print z; w = z + x / y; print w; sum = x + y + z + w; print sum;
12 Replies
anic17
anic174mo ago
So far this isn't very different from Python apart from the lack of parenthesis if the main purpose is to ease the process of algorithm implementation I'd add features such as easy function composition, recursion, numerical methods for integrals, etc. But for now I'm guessing it is just a prototype and it seems to be going in the right direction for me 👍
Nukecodez
Nukecodez4mo ago
yeah its still a prototype but it will have these adustments soon!
anic17
anic174mo ago
Sounds good
Nukecodez
Nukecodez4mo ago
thanks!
<Tim>
<Tim>4mo ago
The code you posted is literally valid Python2 code lol
<Tim>
<Tim>4mo ago
(just verfied it in the interpreter)
No description
anic17
anic174mo ago
didn't remember that versions prior to 3.0 supported functions without parenthesis
<Tim>
<Tim>4mo ago
only print
anic17
anic174mo ago
such a weird thing that Python had ngl If the purpose is to design a language oriented to developing mathmetical algorithms, you might as well add implicit variable multiplication: y = 2*x --> y = 2x y = 5*var --> y = 5var
<Tim>
<Tim>4mo ago
it's pretty standard imo. But I might have a different view on this as I learned programming with languages like batch and ruby that can do this ^^ php as well agreed, I like the idea
anic17
anic174mo ago
batch doesn't have a syntax where functions are defined this way. For example I learnt to code in C after batch and also did a bit of JS so seeing a different syntax is weird and if you could define a matrix type
a = [[3, 1, 2], [4, 7, 8], [9, 6, 1]]
b = [1, 0, -1]
c = b*a
a = [[3, 1, 2], [4, 7, 8], [9, 6, 1]]
b = [1, 0, -1]
c = b*a
would perform the matrix multiplication Just giving ideas and inspiration for future features your MAGALANG could have (I wonder from where this name comes, is it what I think xD)
Nukecodez
Nukecodez4mo ago
yeah the code so far is from a tutorial right now but I am planning on making changes to it!
Want results from more Discord servers?
Add your server