PDA

View Full Version : CH Interpreter



zak
15-12-2010, 18:41
the CH interpreter is usefull for learning c/c++, and with an external IDE it is a breeze. download the free version from here: (43 MB)
http://www.softintegration.com/download/software/release/Windows/chstandard-6.3.0.exe
write a classic c Myfile.c then run it from dos prompt like this:
ch Myfile.c , or better download a free IDE from here:
http://chscite.sourceforge.net/ChSciTEDoc.html
download chscite-1.5.5.exe :
http://sourceforge.net/projects/chscite/files/chscite%20binary%20for%20Windows/ChScite%201.5.5/
by using this ide just write the c code and press F5 , it will show the results at the bottom pane.
the ch package come with a full opengl/glut support with many examples ,you can run it from dos prompt like ch cube.c, but you can't run the opengl demos from within the ide until you make tiny change, just find the file "cpp.properties" in "C:\Program Files\ChSciTE" and change those lines:
command.go.subsystem.*.c=0
command.go.subsystem.*.ch=0
command.go.subsystem.*.cpp=0
to
command.go.subsystem.*=1.c=0
command.go.subsystem.*=1.ch=0
command.go.subsystem.*=1.cpp=0
so it will be able to open the dos window to run the gl examples, read the Faqs. i attach the modified file cpp.properties for convenience.
in the folder C:\Ch\toolkit\demos\OpenGL there is a huge number of opengl/glut examples including the whole redbook examples in "book_gl" folder.
here is how it looks like running an example from the ide

http://img707.imageshack.us/img707/1779/chopengl.png
it seems to me that any c code can be compiled and run using VC6 also can be run directly using ch without compiling. additional notes from the forum members here can enrich the subject more and more.

zak
15-12-2010, 20:21
as an additional proof for the benefit of this program, before 1 to 2 years i have ported a rotating Fan demo by Petr to vc++6, the c++ fan is working but needs corrections with lighting.
i was suspecious that it will work with ch interpreter, but it works, even much slower than thinbasic, so from here we can debug the c code. attached the fan.cpp example, and like the thinbasic code press space bar to run or stop the fan.
http://img153.imageshack.us/img153/3245/fanl.png

Petr Schreiber
15-12-2010, 21:35
Hi Zak,

I didn't know about this CH project, thanks for taking it to our focus.

The trick making the lighting nicer on spheres in TBGL is that face normals are not used, but it uses calculated "ideal" normals as sphere can be described mathematically quite easily.

On models there is different approach used, where I enumerate all triangles with shared vertex, take their face normals and make kind of average from them, again making much smoother look.

One step further would be using normal mapping. This feature is not present in TBGL, as it would not work on every piece of hardware as of now (but this will be cured by time flow).


Petr

danbaron
16-12-2010, 10:23
I never heard of Ch before, either.

The standard edition is free, and, the professional edition is $500.

Additionally, if I am correct, Ch is only an interpreter, not a compiler.

For instance, gcc, Visual C++ Express, and Pelles C, are all compilers, and are free.

I don't see any great advantage of an interpreter over a compiler. Maybe someone can correct my opinion.

Here are the differences between the standard and professional editions of Ch.

https://www.softintegration.com/products/features.html

I sure don't see $500 worth of difference, especially since as Zak showed, you can download a free IDE that works with the standard edition.

I don't dispute what Zak said, that the free version works good with the ChSciTe IDE.

But, my impression of "SoftIntegration", is that it is disingenuous. I think it misleads first by implying that it fully supports C++. If you look closely, you find that it only supports a subset of C++.

https://www.softintegration.com/support/faq/general.html

I think it misleads second by implying that C/C++ is superior to other languages. To me, anyone who believes that today, is some combination of ignorant and dumb.

https://www.softintegration.com/products/

And, I think it misleads third by implying that using an interpreter, makes C/C++ easier to learn than using a compiler. I'd like to know, for instance, if a compiler and interpreter use the same IDE, then, how does using the interpreter instead of the compiler, make learning C/C++ easier? To me, for a beginner, the IDE is what makes learning a language easier or harder, not whether the language is compiled or interpreted. Either way, when something is wrong, an error message is printed, correct?

It seems to me that the marketing of Ch is aimed at school administrators who are ignorant about computer programming. Those are the ones who have heard of C/C++, but not, thinBasic, Perl, Python, Ruby, Lua, etc. - all interpreted, and, all free. They are susceptible to believing that compilers are hard to use, but, interpreters are easy. They are the ones who are willing to spend lots of public money, to buy a product that may enable the lowest of students to print, "Hello, world".

"Ch is the most user-friendly interactive platform for bginners to learn computing and programming in C/C++."

https://www.softintegration.com/

Is it really?
And, we should believe them, when they demonstrate that they can't even spell, "beginners"?

I'm too tired now to denigrate "SoftIntegration" anymore. But, I want to emphasize that I'm not in any way disagreeing with what Zak wrote. Anytime you can get something useful for free, then, take it. But, don't let them sucker you into paying a fortune, for advertising slogans and air. (I wouldn't be so negative about "SoftIntegration", if I thought the price for the professional edition was reasonable for what the customer was getting. But, for $500, in this country, I think many would call such a transaction, a "rip-off".)

SoftIntegration - Our Founding Vision: One Language for All

------------------------

When, for instance, Aladdin asks for C help, I just use Pelles C. It is easy as can be.

http://www.pellesc.de/

zlatkoAB
22-12-2010, 09:18
I know for CH but i found one smaller
called CINT.

zak
10-03-2012, 09:39
i have recieved a post that version 7.0 now available for download, it is for the standard free version 55 MB
to try the examples look at demo folder. i prefer ch\demos\windows\hanoi.ch about graphical presentation of hanoi puzzle. all the OpenGL redbook examples and more are in the demos
if you have installed the IDE chscite (http://chscite.sourceforge.net/ChSciTEDoc.html) previously it will work the same with the new version without uninstalling and installing it again
huge third party ch related are here :
http://www.softintegration.com/products/thirdparty/