Rob PIke did it again! How does he do it? Everything he make is cool as fuck
pkg.go.dev/robpike.io/ivy > Ivy is an interpreter for an APL-like language. It is a plaything and a work in progress. It's a calcultator with apl syntax without math symbol. Pretty fun to use, could became my everyday calculator bignum with vectors and multidimensional arrays support
> Talks (old, but can be used as a language reference)
From the demo
# Operator precedence is unusual. # Unary operators operate on everything to the right. # Binary operators operate on the item immediately to the left, and everything to the right. 2*3+4 # Parsed as 2*(3+4), not the usual (2*3)+4. 2**2+3 # 2**5, not (2**2) + 3 (2**2)+3 # Use parentheses if you need to group differently.
# Inner product is written with a . between the operators. # This gives dot product: multiply corresponding elements and add the result. 1 2 3 4 +.* 2 3 4 5
# More rolls of a die. ?10 rho 6 # Remember a set of rolls. x = ?10 rho 6; x
I CAN'T WAIT UNTIL ROB PORTS IVY TO PLAN9 AND MAC OS!!!!
Owen Rivera
this wtf
yeah lets break basic laws of math lol what a great calculator
Luis Garcia
It's already there retard. Also there's a iOS and android port with limited functionality > PLAN9 It's Plan 9, with a space
Programming is not math tho. List does that too and with this alternative associativity you tend to use less parentheses and reason in forms like subject op S*(expression) which is nicer once you get used to It's not so hard to get to the new convention, just like you would do ti Polish or reverse-Polish notation
Nolan Collins
>laws of math you're retarded and a mathlet
Evan Lopez
it looks pretty based It's like a calculator on steroid with support for > vectors, > matrices > complex numbers > user defined operators > file i/o > bignum > rational infinite precision (no 0.1 + 0.2 != 0.3 problem) > high irrational precision (but not infinite)
It's technically a APL repl, but since it seems to focus only on numeric features it's more akin to an APL-syntax calculator
If you are doing data exploration and/or you can formalize your problem in vectors and matrices, then ivy could be the tool you are looking for
you can also save envs and load them to continue what you are doing