There is another REPL on the shell command line. This is a bash script that decorates a piece of code using a regular C ++ template and call compiler. It has several additional libraries to make it work like AWK and handle FP ranges / expressions. Not sure if this is easy to embed. Link I know that soon he will have built-in processing of large memory tables (db-like). Examples from the docs:
// Classic pipe. Alogorithms are from std:: scc 'vector<int>{3,1,2,3} | sort | unique | reverse' {3, 2, 1} // Assign 42 to 2..5 scc 'vint V=range(0,9); range(V/2, V/5) = 42; V' {0, 1, 42, 42, 42, 5, 6, 7, 8, 9} // Find (brute force algorithm) maximum of `cos(x)` in interval: `8 < x < 9`: scc 'range(8, 9, 0.01) * cos || max' -0.1455 // Integrate sin(x) from 0 to pi scc 'auto d=0.001; (range(0,pi,d) * sin || add) * d' 2
source share