RE: C interpreter

  • From: "Sina Bahram" <sbahram@xxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Fri, 23 Jul 2010 03:33:00 -0400

Oh, I think it's useful.

I must say, I loved this line:

With C however the playing field is far less esoteric (to my knowledge). The 
important concepts that an imperative language like C
contributed to the world 


C is by far one of the more esoteric languages ever to come into existence, 
*grin*. The idioms used in that language are enough to
boggle the mind of anyone who has studied the basics of human psychology, how 
people learn, how humans communicate (both to devices
and other humans), etc, etc.

Const pointers to non-const fields which are structs that have inlined arrays 
so as to avoid a pointer reference, which by the way
double inside of a union as a c-style string which is actually a pointer to 
itself as a form of optimizing the memory packing of,
blah, blah, blah, blah.

And I didn't make that above thing up ... Haha, it's inside of most Linux 
kernel structures.


But I'm not giving you a hard time or anything. The esoteric comment just 
caught my fancy.

Oh, and I do agree, eventually, if you're going to be a hard core leet c haxor, 
then sure, process is important, but interpreters
are useful for exploration.

Take care,
Sina



________________________________

From: programmingblind-bounce@xxxxxxxxxxxxx 
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Kerneels Roos
Sent: Friday, July 23, 2010 3:27 AM
To: programmingblind@xxxxxxxxxxxxx
Subject: Re: C interpreter


Hi. I can not imagine learning something like C by using an interpreter similar 
to the Python interpretor for example. With Python
it makes some sense since Python has list comprehensions like:
[x for x in range(10) if x % 2 == 0]

which will produce a list of even numbers, and things like array / list slices 
and even regular expressions.

To test these things  on the fly an interpreter makes sense, or even small 
functions which you can just copy and paste into the
interpreter and then test them out there.

With C however the playing field is far less esoteric (to my knowledge). The 
important concepts that an imperative language like C
contributed to the world of programming languages are, and hence what you want 
to learn from studying C are things like:
variables and constatns
arrays
structs
the concept of functions
conditional statements
loop constructs
pointers
bit wise operations
input and output

To me it makes much more sense to make use of code files and a compile, run, 
debug cycle to learn how al those work. Especially if
one is learning to program for the first time.

Some of those concepts require a bit of setup code first, so would one have to 
type that into the interpreter then first every time?

I would advise you to stick to files and compiling and running your code -- 
that's how C works. Also, with an interpreter you can
get way different errors than with a compiler. At the end of the day your goal 
is to use a compiler, why not start with that from
square one?

Hope this helps.



On Thu, Jul 22, 2010 at 7:27 PM, Øyvind Lode <oyvind.lode@xxxxxxxxx> wrote:


        Ch is both a C and C++ interpreter apparently.
        I'll download it and have a look.
        

        -----Original Message-----
        From: programmingblind-bounce@xxxxxxxxxxxxx
        
        [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Arthur 
Pirika
        Sent: 22. juli 2010 18:29
        To: programmingblind@xxxxxxxxxxxxx
        
        Subject: Re: C interpreter
        
        I've been meaning to try that, also. I've heard it's good though, and
        wouldn't mind a c++ interpreter, if such a thing even exists? lol.
        
        Arthur
        ----- Original Message -----
        From: "Øyvind Lode" <oyvind.lode@xxxxxxxxx>
        To: <programmingblind@xxxxxxxxxxxxx>
        Sent: Friday, July 23, 2010 3:56 AM
        Subject: C interpreter
        
        
        > Hi all:
        >
        > Does someone know a good C interpreter?
        > I'm trying to learn C and I would like a C interpreter to assist me.
        > It would be much faster to type some C statements in the interpreter 
and
        > get
        > the output instantly...
        >
        > I know it is very important to also learn to know your compiler, but 
for
        > fast testing of code I think an interpreter is useful.
        > I found one called Ch interpreter.
        > Have someone here used Ch?
        >
        > __________
        > View the list's information and change your settings at
        > //www.freelists.org/list/programmingblind
        >
        >
        
        __________
        View the list's information and change your settings at
        //www.freelists.org/list/programmingblind
        
        
        __________
        View the list's information and change your settings at
        //www.freelists.org/list/programmingblind
        
        




-- 
Kerneels Roos
Cell/SMS: +27 (0)82 309 1998
Skype: cornelis.roos






__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind

Other related posts: