BYTE.com > Mr. Computer Language Person > 2004
Ch, Redux
By Martin Heller
October 18, 2004
(Ch, Redux
: Page 1 of 1 )
About three years ago, I looked briefly at Version 2.0 of the Ch language environment from SoftIntegration running on Windows 98, Windows NT, and Windows 2000. Overall, I liked it a lot as a C99 interpreter, especially for scientific and engineering programming. I thought it was pretty good as a shell, but not so great for debugging. It competes mainly with MATLAB and Mathematica, and tries to match MATLAB feature for feature.
This month, I tried Ch Professional Edition Version 4.7 on Windows XP SP2 and Xandros Linux 2.0. I also looked at the Ch Control System Toolkit 2.0, Ch SDK 4.7, and Embedded Ch SDK 4.7. The short summary remains the same as three years ago: I like it a lot as a C99 interpreter, especially for scientific and engineering programming; I think it is pretty good as a shell; it's not so great for debugging.
The core product is essentially as it was, only more so. In three years, SoftIntegration has released a bunch of toolkits and two SDKs along with half a dozen core product upgrades. The debugger, alas, remains the same.
The price has come down, however: Ch Standard Edition is now free. Ch Professional Edition is free for academic use, and $399 otherwise; to the functionality of Ch Standard Edition, the Professional Edition adds scientific numerical computing with computational arrays, advanced high-level numerical functions for linear systems based on LAPACK, differential equation solving, integration, non-linear equations, curve fitting, fast Fourier analysis, and 2D/3D graphical plotting.
Ch Language Features
There are several areas where the Ch language really impresses me with the way it is able to make the C99 program very much like the math. For instance, to solve a quadratic equation with complex roots, you just apply the quadratic formula with complex data types to solve for the two roots:
double complex a=1, b= -4, c=13, x1, x2;
x1 = -b +sqrt(b*b-4*a*c)/(2*a);
x2 = -b -sqrt(b*b-4*a*c)/(2*a);
Even better, you can compute with vectors and matrices in nearly the way you think of them mathematically, using first-class computational arrays, signified by the array keyword:
array double A[3][3]={{1,2,2},{4,4,6},{7,8,9}};
array double b[3]={5,6,8},x[3];
array double L[3,3],U[3,3];
x = A*b + 3*b; //vector & matrix multiplies
ludecomp(A,L,U); // LU decomposition
This is a lot like FORTRAN-90.
Page 1 of 1
BYTE.com > Mr. Computer Language Person > 2004
|