I think that says it all and is especially why I am attracted to C while so wary of C++
Same here. I've just been deep inside the Catalina source code. Boy is there a lot of work needed behind the scenes to print "hello world".
Right now my little project is writing in C89 on a FPGA emulation of a range of Z80 CP/M computers. What is really clever is that one can write in the same language over many different platforms - on a propeller, on a FPGA emulation of a retrocomputer, on a real retrocomputer, and on a PC. The front end of C might be static, but behind the scenes it is still very much a hive of activity. There are programs like SDCC that can also port exactly the same code to very small microcontroller chips.
Well, I have to back-track a bit. The C Standard Library is over 600 pages long. But the other two books are short.
Catalina C certainly seems to have more depth of documentation for a new user at this point. And it all comes in the.zip file to install it. I really appreciate that... I don't really care whether new users take up Cataline C or Propeller GCC.
Anyone else realize that the various forms of C is one of its problems?
The real (economic) power of a language is when one can port a program to any platform with the least total cost...any rework is a cost...and the real cost of any program is the cost of maintainance over its lifetime.
I have always favored strongly typed languages like Pascal and ADA...the programming results are far more robust and cheaper to maintain long term.
The real strengths of C is it is easy to implement for a new hardware architecture and easy to learn..but the phase "Pay me know or pay me latter" comes to mind". What you save in upfront costs you pay later in maintainance costs.
Hmm. to me there's only one form of C. I write all my code as ANSI C, specifically C89, sticking to POSIX library interfaces where possible. The result is that my code works unchanged with GCC, IBM's AIX compilers (new and old), SGI MIPSPro, Solaris, Tru64, and some others I don't use myself. And the Intel compilers of course.
Catalina C certainly seems to have more depth of documentation for a new user at this point. And it all comes in the.zip file to install it. I really appreciate that... I don't really care whether new users take up Cataline C or Propeller GCC.
No language is perfect (look at English, yikes, as I'm a native hard for me to judge, but foreigners tell me it is relatively easy to learn, and for non-English speakers the irregularities can be mostly ignored, and that is why there are spell checkers).
I program mostly in C, BASIC, Tcl, and dabble in dozens of other languages. The amount of assembly language I write amounts to 10s of lines of code over the past 10 years, not counting compilers that I have written which I end up translating programming sequences to assembly).
Over my career I'd say Pascal was probably my favorite language, as if I got something to compile it normally ran, but then it was a pain to actually talk to hardware in Pascal, though other than Oberon or Delphi is basically dead these days.
Personally I think the last things the world needs is a new language and I much appreciate it when something new tries to follow conventions of previous languages, such as PHP looks really C like, except variables which are objects anyway.
Well, waiting a few years for GCC to get to V.98 has made Catalina C attractive. Why shouldn't I look at both?
I started with the BasicStamp over the BasicX because the documentation was better. It isn't that I can't learn GCC. It is the questions of "How do I learn GCC on the Propeller" and "Where are the best resources for doing so?"
While C seems to have had the intention of making itself easy to learn, C++ seems to be more about code obfuscation. I am not a big fan of OOP. Once you start hiding things in 'black box' code modules, people begin to depend on someone else doing these objects for them.
I cannot emphasize enough how important the right documentation is to Parallax's success. Andy LIndsay got it very right with the BasicStamp Manual, but it seems that kind of publishing effort is no longer feasible.. .....
I can learn without such, but you won't win the loyalty of new users without books that they keep returning to again and again as they enjoy getting more and more insight from such a reliable text.
Of course I could learn GCC in Linux on a PC. But that misses the point of wanting to master the Propeller in C with 8 cogs, 28 i/o pins, and 32Kb of ram.
Think about it. How many people did you recommend the BasicStamp Manual to and they decided for themselves from that text to buy and study the BasicStamp?
Ugh. These forums just aren't a very attractive place anymore. We have people blasting C in favor of Spin. We have people blasting PropGCC in favor of Catalina. This used to be a friendly place but doesn't seem to be anymore especially if you have anything to do with the C compiler teams. Not sure what to do. It's hard to get enthusiastic about anything anymore.
Don't be discouraged, David. Anytime you offer choices, you will have people picking sides, waving their banners, and sometimes talking trash to the other teams. The way to win converts is through continued improvement. So keep up the good work!
Ugh. These forums just aren't a very attractive place anymore. We have people blasting C in favor of Spin. We have people blasting PropGCC in favor of Catalina. This used to be a friendly place but doesn't seem to be anymore especially if you have anything to do with the C compiler teams. Not sure what to do. It's hard to get enthusiastic about anything anymore.
Sounds like the summer duldrums! I have to admit that I don't understand the dislike for C on this forum. While far from perfect it's extensive use and popularity makes it the most successful languages going. While gcc (I wrote gcc not GCC) is far from a "perfect" compiler or even the best out there but it's popularity makes it impossible to honestly state that it hasn't been a success.
Sounds like the summer duldrums! I have to admit that I don't understand the dislike for C on this forum. While far from perfect it's extensive use and popularity makes it the most successful languages going. While gcc (I wrote gcc not GCC) is far from a "perfect" compiler or even the best out there but it's popularity makes it impossible to honestly state that it hasn't been a success.
Yes, it has been a success everywhere but here. People here know better I guess. I can't even imagine what outsiders think when they stumble into these silly language wars. Probably they go looking for some other chip.
Yes, it has been a success everywhere but here. People here know better I guess.
People who have been here awhile learned -- and became productive with -- Spin/PASM first, before C came along for the Prop. It's all there was, but it's also an excellent choice for Prop programming. Given that background, there's little hope for making us like C, even though some of us have to use it from time to time. The objective of the GCC project isn't to get people who know the Propeller to switch to C; the objective is to get those who know C to switch to the Propeller. That's your audience. And once they're corralled, maybe they'll end up liking Spin, too.
Geez, guys, for a bunch of very intelligent people some of you have really thin skin. I don't see any "blasting" of one thing or another - all I see is some people being snarky with others for some reason that appears to be non-public, I see others honestly and without perceivable malice pointing out deficiencies in the C rollout and promotion business, etc., etc. There has been a phenomenal amount of great development by the two C development entities, each with it's own strengths and weaknesses. Choice is great, friendly competition is great, mutual respect for others' choices is great as well.
Peace to all.......
If I were them I wouldn't stick around with all of the infighting and contradictory advice given here.
This forum is pretty tame and civil, really. To see what the rest of the world is like, Google some pejorative or obscene comment that you never see here, such as:
"you're a f---ing idiot" <insert a computer language name here> forum
and see how many hits you get. (I got more than 4 million for "perl." )
This forum is pretty tame and civil, really. To see what the rest of the world is like, Google some pejorative or obscene comment that you never see here, such as:
"you're a f---ing idiot" <insert a computer language name here> forum
and see how many hits you get. (I got more than 4 million for "perl." )
-Phil
Computer language battles are almost as bad as battles over religion. Maybe they're the same actually. Very tiresome.
Computer language battles are almost as bad as battles over religion. Maybe they're the same actually. Very tiresome.
The problem with the Computer language wars is that no single language that's best for every situation. Add to that that the battles will actually cause changes to the language. After a very short period of time the battle becomes very repetitive and boring.
The problem with the Computer language wars is that no single language that's best for every situation. Add to that that the battles will actually cause changes to the language. After a very short period of time the battle becomes very repetitive and boring.
It's amazing that many people can't see that no single language is best for every application but insist on promoting their own favorite and denigrating others. As you say, they all have their strengths and also flaws. Just pick one that works for you. C certainly works for a great many people and Spin works well for the few of us in these forums.
David, when we get some P2 action again, C interest will pick up for sure. I know I'll be using it some. The larger memory space, combined with new features will give everybody some reason to pick up new toys.
The brief look a few of us got with Gcc on the "beast" design was spiffy!
Computer language battles are almost as bad as battles over religion. Maybe they're the same actually. Very tiresome.
True enough. But the objective of venting is to let off steam. That the forum provides an opportunity to do so is one of its virtues, IMO. The alternatives to that may be yet more destructive in the end. Ignoring what's posted here is a choice we can all make. It can ruin our day only if we let it.
When I close the lid on my iBook for the night, I also close the lid on all the sturm und drag that it displayed and -- possibly -- hosted, knowing that if I were in a room with any of my supposed forum "adversaries", they would be viewed as friends, we could share a drink, and toast our mutual interests. Do you imagine that prosecutors and defense attorneys, or opposing members of deliberative bodies, such as Congress or the British House of Commons are any different?
David, I hope we can meet someday. I know we have strong differences vis a vis computer languages, but the background of your avatar -- assuming it's reflective of your priorities -- tells me that we share common interests in the maritime world.
David, when we get some P2 action again, C interest will pick up for sure. I know I'll be using it some. The larger memory space, combined with new features will give everybody some reason to pick up new toys.
The brief look a few of us got with Gcc on the "beast" design was spiffy!
Ah.... yes!
The whole point of my learning GCC and SimpleIDE has been in anticipation of the Propeller2 arriving. I feel far behind with SPIN and PASM and am still playing catch up.
The flurry of inventive projects with new resources can be quite intense. So I am taking advanage of the current calm. There are going to be a lot of new features and opportunities to do new things.
++++++++++++
No single language is best, though learning to bit-bang in Assembler will vastly add to the scope of what one can do for themselves. There seems to be a portion of the C user population that expects someone else to create the 'driver' for them... they may wait forever to get support or jump around until they find the microcontroller that has driver support for their project (that can get expensive and is a big wrong-headed).
The biggest asset that C brings to the table is its potential to port new code into the Propeller with less initial effort that a complete conversion to another language.
I like C. I stick to ANSI C (C89) though, to be portable.
I like Catalina C. Great compiler.
I like GCC. See first line though. I don't use the gcc'isms. Because I don't need them and I like portability.
I like Spin. Had no problem "getting it" from the start.
I like Perl. I use it everywhere, although not on the Propeller..
I like pasm, although I have not written enough of it to call myself proficient. I'm still much better at 6502 assembly and the old minicomputer I used to program..
And I like a bunch of other programming languages, although these days my main tools are C and Perl.
There are a few programming languages I don't care for much, but I won't mention them here. Some of them I won't fault at all, it's just that they don't fit how I like to write. It's good that others may have no such issues with the same. But again no need to mention any.
And I would like to send thanks to the PGCC team, and to Ross H. for Catalina. Just to limit myself to C compilers.
I suspect being able to handle multiple languages (computer or spoken) actually makes one smarter, more aware of what is really going on.
My 'main problem' with GCC is there are an awful lot of sites on the web -- including Arduini -- that claim on can program in C/C++ and actually mean that they have no idea what the target is. Examples in search engines for C come up with C/C++ examples. The whole thing muddles the value of the searches and is pretty much forcing me to learn C++ even it I desire to only program in C.
This is part of a great trend of search engines to position items for inclusion in a search that are not directly related to what the user is searching. For instance, when I Googled "linear voltage regulators with enable", Google also provides me with listings for switching regulators without enable. I guess that adds more revenue from advertisers to the bottom line, but there is something a little sinister about this. And I suspect there are a lot of Arduino users that think they are learning C when in fact the library is obviously OOP which only C++ is supposed to provide.
And so, I guess just learn C and C++ will make me a bit smarter and a better author in C. We will see. (pun intended)
I like C. I stick to ANSI C (C89) though, to be portable.
I like Catalina C. Great compiler.
I like GCC. See first line though. I don't use the gcc'isms. Because I don't need them and I like portability.
I like Spin. Had no problem "getting it" from the start.
I like Perl. I use it everywhere, although not on the Propeller..
I like pasm, although I have not written enough of it to call myself proficient. I'm still much better at 6502 assembly and the old minicomputer I used to program..
And I like a bunch of other programming languages, although these days my main tools are C and Perl.
There are a few programming languages I don't care for much, but I won't mention them here. Some of them I won't fault at all, it's just that they don't fit how I like to write. It's good that others may have no such issues with the same. But again no need to mention any.
And I would like to send thanks to the PGCC team, and to Ross H. for Catalina. Just to limit myself to C compilers.
I've always been a computer language junkie. There are lots of languages that I've tried and liked and some that I don't like. However, I often find that there is at least one interesting feature even in languages I don't care for. I guess that's why I can't understand how some people can get so attached to one language that they consider every other one useless or fatally flawed.
I suspect being able to handle multiple languages (computer or spoken) actually makes one smarter, more aware of what is really going on.
My 'main problem' with GCC is there are an awful lot of sites on the web -- including Arduini -- that claim on can program in C/C++ and actually mean that they have no idea what the target is. Examples in search engines for C come up with C/C++ examples. The whole thing muddles the value of the searches and is pretty much forcing me to learn C++ even it I desire to only program in C.
This is part of a great trend of search engines to position items for inclusion in a search that are not directly related to what the user is searching. For instance, when I Googled "linear voltage regulators with enable", Google also provides me with listings for switching regulators without enable. I guess that adds more revenue from advertisers to the bottom line, but there is something a little sinister about this. And I suspect there are a lot of Arduino users that think they are learning C when in fact the library is obviously OOP which only C++ is supposed to provide.
And so, I guess just learn C and C++ will make me a bit smarter and a better author in C. We will see. (pun intended)
In the interest of full disclosure I need to point out that over all I like C! I should also mention that I like perl and in a lot of situations I can solve most problems that I come across with perl then C! I also run my perl scripts on very large fast machines with huge amounts of CPU and memory resources! Resources that the prop 1 or prop 2 could never hope to match!
All that said I think it's important to point out that as programming languages both C and C++ are well defined. While there may be different opinions at the margins and in edge conditions as a rule there is a very definite definition of what is and isn't C and C++. I don't care what vendors call what the language they claim to be C or C++!! For the record I don't think the language used by arduino is actually called C++ by the arduino people!
Well, Arduino is not C or C++ in the normal sense of ANSI C Standard or Standard Libraries. And I suspect that AVRstudio GCC is another instance of non-standard.
I have misplaced a certain amount of blame on Propeller GCC just because I embarked on a project to port what was supposedly Arduino compatible code.
SimpleIDE and the Simpletext and Simpletool libraries are reasonably simple.
+++++++++++++++++
It seems that both Arduino and AVRstudio use NON-standard AVR libraries that include several exotic architecture specific items.
I naively thought that the Propellerino library would make quick work of porting from generic AVR chips or Arduino. But I have been learning the hard way that porting Non-Standard GCC requires one master what the code did in the original device before getting it to adapt to the new one.
It is an interesting challenge and I continue to work on it, but jumping from Arduino to Propeller GCC may not be as easy as one might envision.
SimpleIDE and the Simpletext and Simpletool libraries are reasonably simple.
Those, of course, are also non-standard libraries like the ones the Arduino uses. If you want to write extremely compact code there may be no better choice although I think the simple_printf that comes with PropGCC is probably almost as small as the Simple Library print function and it works on other platforms as well as long as you stick to the subset of printf that it supports.
Those, of course, are also non-standard libraries like the ones the Arduino uses. If you want to write extremely compact code there may be no better choice although I think the simple_printf that comes with PropGCC is probably almost as small as the Simple Library print function and it works on other platforms as well as long as you stick to the subset of printf that it supports.
I can't understand why people don't simply restrict themselves to ANSI C - perhaps the most widely implemented of all computer languages.
Then you can run your programs on Arduinos, Propellers, or just about any other architecture ever developed.
Sometimes the answer is so simple that it seems to escape most people.
I can't understand why people don't simply restrict themselves to ANSI C - perhaps the most widely implemented of all computer languages.
Then you can run your programs on Arduinos, Propellers, or just about any other architecture ever developed.
Sometimes the answer is so simple that it seems to escape most people.
Ross.
I think the biggest problem is that both printf and scanf have huge numbers of options even in ANSI C and it may be difficult to create a compliant version that is small enough to use in LMM or CMM modes on the Propeller. I imagine the same is true of the Arduino since it only has 32k of code space. I realize that it is possible to implement these functions in 32k of code but there may be more to the user's program than just printf and scanf. The extra space taken by full implementations may, and often does, make the difference between a program fitting in hub memory or not.
Comments
Same here. I've just been deep inside the Catalina source code. Boy is there a lot of work needed behind the scenes to print "hello world".
Right now my little project is writing in C89 on a FPGA emulation of a range of Z80 CP/M computers. What is really clever is that one can write in the same language over many different platforms - on a propeller, on a FPGA emulation of a retrocomputer, on a real retrocomputer, and on a PC. The front end of C might be static, but behind the scenes it is still very much a hive of activity. There are programs like SDCC that can also port exactly the same code to very small microcontroller chips.
All good fun. Back to coding...
Catalina C certainly seems to have more depth of documentation for a new user at this point. And it all comes in the.zip file to install it. I really appreciate that... I don't really care whether new users take up Cataline C or Propeller GCC.
The real (economic) power of a language is when one can port a program to any platform with the least total cost...any rework is a cost...and the real cost of any program is the cost of maintainance over its lifetime.
I have always favored strongly typed languages like Pascal and ADA...the programming results are far more robust and cheaper to maintain long term.
The real strengths of C is it is easy to implement for a new hardware architecture and easy to learn..but the phase "Pay me know or pay me latter" comes to mind". What you save in upfront costs you pay later in maintainance costs.
You must be really enjoying the tutorials. ;-)
https://www.usenix.org/conference/hotdep12/workshop-program/presentation/holzmann
No language is perfect (look at English, yikes, as I'm a native hard for me to judge, but foreigners tell me it is relatively easy to learn, and for non-English speakers the irregularities can be mostly ignored, and that is why there are spell checkers).
I program mostly in C, BASIC, Tcl, and dabble in dozens of other languages. The amount of assembly language I write amounts to 10s of lines of code over the past 10 years, not counting compilers that I have written which I end up translating programming sequences to assembly).
Over my career I'd say Pascal was probably my favorite language, as if I got something to compile it normally ran, but then it was a pain to actually talk to hardware in Pascal, though other than Oberon or Delphi is basically dead these days.
Personally I think the last things the world needs is a new language and I much appreciate it when something new tries to follow conventions of previous languages, such as PHP looks really C like, except variables which are objects anyway.
Still miffed, jazzed?
So you have tutorials now? Great. Maybe Loopy will learn something.
I started with the BasicStamp over the BasicX because the documentation was better. It isn't that I can't learn GCC. It is the questions of "How do I learn GCC on the Propeller" and "Where are the best resources for doing so?"
While C seems to have had the intention of making itself easy to learn, C++ seems to be more about code obfuscation. I am not a big fan of OOP. Once you start hiding things in 'black box' code modules, people begin to depend on someone else doing these objects for them.
I cannot emphasize enough how important the right documentation is to Parallax's success. Andy LIndsay got it very right with the BasicStamp Manual, but it seems that kind of publishing effort is no longer feasible.. .....
I can learn without such, but you won't win the loyalty of new users without books that they keep returning to again and again as they enjoy getting more and more insight from such a reliable text.
Of course I could learn GCC in Linux on a PC. But that misses the point of wanting to master the Propeller in C with 8 cogs, 28 i/o pins, and 32Kb of ram.
Think about it. How many people did you recommend the BasicStamp Manual to and they decided for themselves from that text to buy and study the BasicStamp?
-Phil
Sounds like the summer duldrums! I have to admit that I don't understand the dislike for C on this forum. While far from perfect it's extensive use and popularity makes it the most successful languages going. While gcc (I wrote gcc not GCC) is far from a "perfect" compiler or even the best out there but it's popularity makes it impossible to honestly state that it hasn't been a success.
-Phil
Peace to all.......
This forum is pretty tame and civil, really. To see what the rest of the world is like, Google some pejorative or obscene comment that you never see here, such as:
and see how many hits you get. (I got more than 4 million for "perl." )
-Phil
The problem with the Computer language wars is that no single language that's best for every situation. Add to that that the battles will actually cause changes to the language. After a very short period of time the battle becomes very repetitive and boring.
David, when we get some P2 action again, C interest will pick up for sure. I know I'll be using it some. The larger memory space, combined with new features will give everybody some reason to pick up new toys.
The brief look a few of us got with Gcc on the "beast" design was spiffy!
When I close the lid on my iBook for the night, I also close the lid on all the sturm und drag that it displayed and -- possibly -- hosted, knowing that if I were in a room with any of my supposed forum "adversaries", they would be viewed as friends, we could share a drink, and toast our mutual interests. Do you imagine that prosecutors and defense attorneys, or opposing members of deliberative bodies, such as Congress or the British House of Commons are any different?
David, I hope we can meet someday. I know we have strong differences vis a vis computer languages, but the background of your avatar -- assuming it's reflective of your priorities -- tells me that we share common interests in the maritime world.
-Phil
Ah.... yes!
The whole point of my learning GCC and SimpleIDE has been in anticipation of the Propeller2 arriving. I feel far behind with SPIN and PASM and am still playing catch up.
The flurry of inventive projects with new resources can be quite intense. So I am taking advanage of the current calm. There are going to be a lot of new features and opportunities to do new things.
++++++++++++
No single language is best, though learning to bit-bang in Assembler will vastly add to the scope of what one can do for themselves. There seems to be a portion of the C user population that expects someone else to create the 'driver' for them... they may wait forever to get support or jump around until they find the microcontroller that has driver support for their project (that can get expensive and is a big wrong-headed).
The biggest asset that C brings to the table is its potential to port new code into the Propeller with less initial effort that a complete conversion to another language.
I like C. I stick to ANSI C (C89) though, to be portable.
I like Catalina C. Great compiler.
I like GCC. See first line though. I don't use the gcc'isms. Because I don't need them and I like portability.
I like Spin. Had no problem "getting it" from the start.
I like Perl. I use it everywhere, although not on the Propeller..
I like pasm, although I have not written enough of it to call myself proficient. I'm still much better at 6502 assembly and the old minicomputer I used to program..
And I like a bunch of other programming languages, although these days my main tools are C and Perl.
There are a few programming languages I don't care for much, but I won't mention them here. Some of them I won't fault at all, it's just that they don't fit how I like to write. It's good that others may have no such issues with the same. But again no need to mention any.
And I would like to send thanks to the PGCC team, and to Ross H. for Catalina. Just to limit myself to C compilers.
My 'main problem' with GCC is there are an awful lot of sites on the web -- including Arduini -- that claim on can program in C/C++ and actually mean that they have no idea what the target is. Examples in search engines for C come up with C/C++ examples. The whole thing muddles the value of the searches and is pretty much forcing me to learn C++ even it I desire to only program in C.
This is part of a great trend of search engines to position items for inclusion in a search that are not directly related to what the user is searching. For instance, when I Googled "linear voltage regulators with enable", Google also provides me with listings for switching regulators without enable. I guess that adds more revenue from advertisers to the bottom line, but there is something a little sinister about this. And I suspect there are a lot of Arduino users that think they are learning C when in fact the library is obviously OOP which only C++ is supposed to provide.
And so, I guess just learn C and C++ will make me a bit smarter and a better author in C. We will see. (pun intended)
In the interest of full disclosure I need to point out that over all I like C! I should also mention that I like perl and in a lot of situations I can solve most problems that I come across with perl then C! I also run my perl scripts on very large fast machines with huge amounts of CPU and memory resources! Resources that the prop 1 or prop 2 could never hope to match!
All that said I think it's important to point out that as programming languages both C and C++ are well defined. While there may be different opinions at the margins and in edge conditions as a rule there is a very definite definition of what is and isn't C and C++. I don't care what vendors call what the language they claim to be C or C++!! For the record I don't think the language used by arduino is actually called C++ by the arduino people!
I have misplaced a certain amount of blame on Propeller GCC just because I embarked on a project to port what was supposedly Arduino compatible code.
SimpleIDE and the Simpletext and Simpletool libraries are reasonably simple.
+++++++++++++++++
It seems that both Arduino and AVRstudio use NON-standard AVR libraries that include several exotic architecture specific items.
I naively thought that the Propellerino library would make quick work of porting from generic AVR chips or Arduino. But I have been learning the hard way that porting Non-Standard GCC requires one master what the code did in the original device before getting it to adapt to the new one.
It is an interesting challenge and I continue to work on it, but jumping from Arduino to Propeller GCC may not be as easy as one might envision.
I can't understand why people don't simply restrict themselves to ANSI C - perhaps the most widely implemented of all computer languages.
Then you can run your programs on Arduinos, Propellers, or just about any other architecture ever developed.
Sometimes the answer is so simple that it seems to escape most people.
Ross.