Sam, I know what you mean but I do think " Standard C is a JOKE" maybe a bit over the top.
When you are working at the lowest levels, down at the hardware registers and dealing with interrupts etc, then obviously whatever language one uses one will find it very non-portable. That is a symptom of the vast array of hardware we have available, all different, not the language as such.
A little higher up and things start to look much better.
Example: In 1996 I helped a company rewrite an embedded system in C that was originally many 10s of thousands of lines of x86 assembler so that they could adopt a new Motorola 68000 based hardware platform and the PSOS operating system.
That code is still in use, now on Power PC and ARM based platforms and Linux. In the between it was used on PowerPC and VxWorks OS. During all that time it also ran on MSDOS and Windows such that it could be tested, debugged and used in system simulations.
I'm very sure I could get it compiled and running on the Prop using ICC or Catalina and putting a little effort into the lower level hardware abstraction layer.
So the standardization of C has been anything but a joke for me and many others in that situation.
It has been successfully compiled with all manner of C compilers.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
> The myth of STANDARD C.................?????????????????????? Standard C is a JOKE..............
A standard is definded. If vendor X claims to be standard, then he has to be. If he isn't he can't claim it. C99 is a well defined standard. And vendor X or Y can verify it against the test sites by Dinkumware (Plauger).
> A program written in Standard C under MSC would not compile under Borland or under Watcom or under
> GCC or under ............
Didn't I say to stay away from the MS-Smile?
I once was employed for a company and developed under MS-C++. Later, I worked as a freelancer for them and did my work with Metrowerks C++ on a Mac at home. When things were running as wanted, I tested it with MS-C++. Guess what when things didn't work? MS did not adhere to the standard. Same for Watcom vs. MS. I was able to prove EVERY SINGLE issue with the standard (Plauger books, Stroustrup, $whatever).
> Even a program written in MSC 4 would not compile under MSC 6 without a lot of changes and rewriting.
Smile! I said MS-Smile!
> Each controller has registers and memory maps and and and and and that make it impossible to compile a program
> written for one microcontroller to run on another without TONS of changes and customization and fiddling etc.
You've got to learn about abstraction and encapsulation to handle these tasks efficently. Hacking doesn't help! It only fixes.
Also, I have problems understanding why this sould be a problem of C compared to SPIN. Except you show me other platforms where SPIN is running on ...
Nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.: YADRO
Sam. Gee, you don't have to yell [noparse]:)[/noparse] Many programmers know how to get around the all problems you mention (except using the right CPU for the job [noparse]:)[/noparse]. Then again there are those who can barely keep themselves out of some kind of a spaghetti knot. The reason you trust your product only to those with adequate knowledge and experience is to avoid creating something that will eventually become a big PITA. A one semester C programming class is definitely not enough [noparse]:)[/noparse] There many programmers who know so much though or their ego is so inflate, they need to have their heads forcefully extracted from certain body cavities. Most programmers are unfortunately heavy ladened with ego and various amounts of testosterone.
I wonder what the original poster thinks of all this [noparse]:)[/noparse]
But heater it was your time to waste however you like
These threads are always entertaining!· Hey, maybe we should have a new section in the forum, called: Language Bashing· :-P· Here's a new twist to this thread:
I'm really curious: how many languages do you all here *really* know?
The definition of "know" is: you are versed in, and fast enough in, the language that you could apply for a job as a professional programmer trainee using that language as the only one in your toolbox.·
Scenario: This job you would get based solely on your skill with that language, no other factors.· Before applying for the job, you'd have 2 weeks of say 2 hours to brush up, or about 30-40 hours of practice.· At your interview, your future employer would give you a test of 25 simple programming tasks, language applicability, and syntax. This test would take about 2 hours.· You'd have to score 80%·(20 out of 25)·(And, yes, I have both taken and given such tests.)
Think about it, be honest, and give only ONE number --- and when the line between a language and a derivative isn't clear, just count them as different.· (e.g. I counted VB and VBA as different.)
OS'es don't count, but scripting languages do.·You don't need to list the names of the languages, just give the number.·
And if your honest answer is 0 or 1, please don't be afraid to post that! It's one of the reasons we're here helping each other ---
After all, we all started at some point!
My answer is: 34
(I started programming in 1972, '73, or maybe '74? - and I love learning new languages [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (CounterRotatingProps) : 7/4/2009 12:04:13 AM GMT
Added: I've been messing with Verilog which would be my 18'th but have not "mastered it" although I have written a single HUB/COG Propeller (not cycle accurate) simulation with it that works [noparse]:)[/noparse]. Learning and knowing more than a dozen computer programming and scripting languages is not out of the question. Anything requires a few minutes of refresh time if you haven't looked at it in several months. It's not like a final essay exam with a pen and a blue book. It's all like riding a bicycle though. Once you know it, you don't have to learn it again beyond a quick and ready reference.
Heh, I find it funny how the original poster was so vague with his post, and it exploded into what it has... it'd be nice if he'd come back and explain. There may be a perfectly good reason he needs to use C... if it's just the fact that he's afraid of Spin, IMO he should reconsider, or at least give Spin a try. On the other hand, if he has lots of well standardized/abstracted code that he understands well (probably wrote himself) which would port really easily, I can see that being a completely valid point. Another reason may be a boss says it must be in C (for a good or bad reason, but they're the boss). Or maybe the Prop is a stepping stone to a new product, which will need to be more powerful and outgrow the Prop in two years, so they don't want to have to rewrite the code when they go to a faster micro. As usual, there's many valid options, and if C was never one of them, quite a few people would have wasted their time making those C compilers.
C on a propeller? Why not BDS C on heater's Z80 CP/M emulation?
Going off on a slight tangent here, I've had to put my propeller hobby on hold while I get my real-world wireless mesh working running on CP/M on a Z80. My entire water system on my property depends on this working and the existing system has just been destroyed in a small storm with uprooted trees, so I'm in a bit of a panic now as I've got only a few months to get it working. And I guess when there is a deadline, you fall back on the languages you are most comfortable with. I suppose those are the ones you 'really' know. For me, totally honestly, just 4.
I'm not going to include Spin yet. I'm still on the steep part of the learning curve. The very first problem I came across in spin was a long vertical line that started above the top of the screen and went below the bottom, and was part of an IF statement. Well, I just wanted a little branch to come off that with a new IF statement, but it wouldn't work. Sometimes it would jump to above the screen. Sometimes it would put a kink in the line so it wasn't straight anymore. Yes, the answer is to not put in 1 tab or 2 tabs or 1 space or 3 spaces but exactly two spaces. Not something I could find in the manual either. But I'm through the steep part of the curve and away flying now. And once I can turn a pump on wirelessly from 2km away and over a hill via multiple hops on solar powered repeater nodes (which is very close now), I'll have some spare time to come back to the triblade and the zicog as I think this is only a small step away from running C.
And so I have finally reached the conclusion *grin* - yes, you can run C on the Propeller.
If you're just a hobbyist and want to have a life outside of playing with micros, SPIN makes sense, its learning time isn't anywhere as bad C, especially when it comes to microcontrollers.
Personally I'm not all than enamored by SPIN but it does the job.
Heck you don't need C unless you're going program for other micros. But even then there are BASIC and Pascal compilers for those micros(PIC, AVR) that are popular with hobbyists.
If dialects are counting and scripting languages: about 15.
Mastered languages: None.
I'm not Stroustrup or any other one of that kind. And with any language, there's always something left to learn.
And if people have problems to match 10 levels of braces, their real problem is to get structure and divide a big task into smaller ones. 10 levels, that's braindead! It starts to get sick at 4 or 5.
Nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.: YADRO
It all boils down to what Parallax can and cannot provide for free. While Parallax has been always commited to providing an excellent free IDE for their 3 chips, they seem to not be able to find anyone that wants to provide good support in C for free.
And so, either you are willing to buy C or you are willing to SPIN and PASM. Parallax has struggled to keep the cost of C down while having good quality. But that is just the way the world is.
It does seem that those that have gone the distance and learned C tend to not want to learn other languages. Yet in microcontrollers there really tends to be great benefits to learn to program at the machine language level because resources are so limited.
And so, I begin to wonder if the the C programer expects to use all the C libraries that are really beyond the resources of the microcontroller. There seems to be a bit of unreality creeping in to the equation.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ain't gadetry a wonderful thing?
> Yet in microcontrollers there really tends to be great benefits to learn to program at the machine language level because resources are so limited.
And the machine language is ASM. And I never voted against that.
In fact, I design in C. debug, see where the bottle-neck is (or know it in advance) and program that part in ASM.*) And for a reminder and clarity, each C-line is within the ASM, followed by the ASM-code.
And no, it isn't whise to drag in every library available for the smallest task. Some are simply too expensive (space-wise).
*)
And as a reminder:
Good algorithms and a well tuned data-flow is what makes speed. Not ASM, C, SPIN, ...
Nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.: YADRO
CounterRotatingProps: About 19 is the answer I came up with.
That's the number of distinct languages I have used in :
1. Paying professional work on major projects.
2. Non-trivial academic exercises.
3. Extensive hobby projects.
I could bump that up by counting more dialects or smaller experimental diversions to other languages.
I'd knock it down to almost zero for claiming mastery[noparse]:)[/noparse]
Strange thing is I have had a long career designing and coding in all kinds of fields, embedded systems, process control, military communications, aerospace, CAD/CAM, on-line WEB stores etc. etc. In all of this rarely has anyone been overly concerned about my mastery of the language(s) that they are using or want to use on a given project. Never have I been subjected to such a test of language proficiency.
Rather jobs have been landed on the basis of long technical discussions at interview about the project in hand, getting into it's purpose, it's design, it's future direction etc.
I did tell one interviewer straight out that I have zero experience of the language and real-time OS in use at his company. "No worry" he says "You'll pick it up" and he offers me the contract as team leader for one year.
This is why I have said here that these language debates are "over blown".
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Yes, precisely one of the reasons I ask how many languages do we know. (And please keep the answers coming! This is actually very interesting IMO)
My experience has been that the more languages you have in your toolbox, the less you care about being an evangelist for any one in particular. Generally speaking that is. The exception is when a new language comes out that is really cool for whatever reasons, then there's good cause to be excited about it. E.g. PERL in the early days, PYTHON - even now, Ruby, and lately keep your eye out for "IO" a very very cool, easy to use message-based OOP (which is built in C/C++ ... I'm hoping some great soul ports it to the Propeller [noparse]:)[/noparse]
> Rather jobs have been landed on the basis of long technical discussions at interview about the project in hand,
> getting into it's purpose, it's design, it's future direction etc.
Exactly - the language is only a tool, not an end in itself (unless, of course, you are in a compiler-building shop [noparse]:)[/noparse]
These language bashing threads are sort of silly. Think about it this way: what sense is there in fighting over "which is better, a screwdriver or a hammer?" If you read between the lines and analyse the points of discussion here, we're really talking about which is the more appropriate tool for the job. "A philips screwdriver or a slotted one?" hmmm, well "what kind of screws are we using?"...
So the question of "C" or "Spin" really should be "What MC are we using, and what tools and skills are the most common *currently*?"
If Propeller, Then (at least for now) SPIN handsdown. IF AVR, then C, etc. etc.
> rarely has anyone been overly concerned about my mastery of the language
Please recall that the def. of "known" in my query was not 'mastery' rather more 'entry-level trainee.' If I were to have said mastery, that would probably be defined as being able to write a compiler for that language into p-code from scratch. (If that were the case, I'd have to drop my 34 down to 0.5 [noparse]:)[/noparse]
Loopy Byteloose> It does seem that those that have gone the distance and learned C tend to not want to learn other languages
Loopy, I'm not sure that's so true, if you consider the context I mention here to heater. Maybe that's the case initially, but many of us are forced to learn other languages, or at least be able to read them enough to maintain, interface to, or whatnot. Maybe it's like Steve (jazzed) said: "Most programmers are unfortunately heavy ladened with ego and various amounts of testosterone" --- ego and hormones are language neutral. [noparse]:)[/noparse]
> If I were to have said mastery, that would probably be defined as being able to write a compiler for that language into p-code
> from scratch. (If that were the case, I'd have to drop my 34 down to 0.5 [noparse]:)[/noparse]
Does that count for an extra bonus? I did that!
Also poked around in the USCD-Pascal's p-machine. Squezed out about 0,3% more speed by using the additional 65SC02 op-codes. On my Apple ][noparse][[/noparse]. Hahaha! Those were the days.
Also wrote about 4..5 interpreters for my own or commercial languages. One of them built a parse-tree that wasn't destroyed, but was then used to execute the code. Three had an source-level-debugger with single-step, var-trace, breakpoints, ... They were written in Pascal, Modula-2, C and C++
And a parser (the code-generator was missing) for Newton-Script. But the project slowly died because the one wanting do make the garbage-collection didn't finish. He still has my book about garbage-collection.
Nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.: YADRO
Don't ask me!
Maybe for educational purposes? I wouldn't use it for real programming. It's a perfect language to learn programming, but for real live it is to restrictive. Compared to Pascal a big step forward. I worked with JPI-Modula and an other one. Don't remember. One of them had an akward editor (can't use a different one, because he made part of the parsing I guess) that was a PITA to use.
BTW:
Compiler-writing is no big sience. It was only obfuscated by some authors ("The Dragon Book", or by Rechenberg (IIRC) and later by all the table-driven compiler evangelists).
You need to draw a syntax-diagramm. If that works, all is coded the same way. The ultimate book is by N. Wirth "Compilerbau" (compiler construction; you know With, the father of Pascal and Modula). I think you can find it online now as PDF and in English. It's stone old and incedibly small but you don't need to know more. Should anybody be interested in that subject, this is *absolutely* the book to start with! I'll never ever give my copy away, and I have thrown away hundreds of programming-books!
For writing an compiler, I'd only use an OO-Language, makes live much easier. I'd even pick C++ for that.
Now try that in SPIN. (Sorry).
Nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.: YADRO
perhaps the compiler writing isn't rocket-science, but you have to really understand *how* the language works under the hood to convert its syntax into something meaningful
remember this one:
(void far *) somePointer ; //?
- and tables have to be filled first [noparse]:)[/noparse])
Now that we have a Spin compiler native to the Propeller, here's a link to a thread for a compiler-compiler that does run native on the Propeller and produces Spin code. It can compile itself (using a laptop to compile the Spin) and should work with Sphinx. This Meta2 compiler-compiler was used years ago to bootstrap a Pascal compiler on a small business computer (8-bit, 64K byte).
I designed a scripting language called "Alias" (ya, bad name) in 1999. The point of the language was to let hardware engineers write utilities and tests for new hardware bring-up/checkout and was included in the separate embedded diagnostic system for a line of network switches. Would have just used an existing language like TCL or PERL, but it would have made the image too big. The whole system was designed to run in less than 256KB. One of the nice features of Alias was any routine written by the user could automatically be converted to a C function with a "morph" command and quickly plugged in to the user interface.
I've thought about learning Ruby which look like a nice OOP language, but it seems a little bloated. I've used Python, but haven't bothered because the syntax looks a little odd ... to me at least. I took a few Pascal classes long ago, but I think it's rather awkward and don't count it in my list of languages.
As far as "mastered it" goes ... I used the phrase in quotes before for a reason. One does not need to know everything to "master" something. Having a solid working knowledge that can produce results and avoid pitfalls is my definition of mastering. A PhD "may" have a different definition. Socrates of course could make any master look like a fool (strong motivation for his eventual fate no less), but at least most of us learned some need for humility and avoiding hubris from him and his student [noparse]:)[/noparse]
both Ruby and Python are pieces of cake, and "IO" is even easier!
Right, Ruby's fat. But Spin shares Python's indentationism (is that a word??) Python can be made pretty skinny, but it has tons and tons (did I say tons) of librarys and modules. Both are Very Cool Languages. VCL is higher up than OOP
But look at IO:
Dog := Object clone
Dog bark := method("woof!" print)
CounterRotatingProps said...
> ... these language debates are "over blown".
My experience has been that the more languages you have in your toolbox, the less you care about being an evangelist for any one in particular.
Exactly - the language is only a tool, not an end in itself (unless, of course, you are in a compiler-building shop [noparse]:)[/noparse]
These language bashing threads are sort of silly. Think about it this way: what sense is there in fighting over "which is better, a screwdriver or a hammer?" If you read between the lines and analyse the points of discussion here, we're really talking about which is the more appropriate tool for the job. "A philips screwdriver or a slotted one?" hmmm, well "what kind of screws are we using?"...
So the question of "C" or "Spin" really should be "What MC are we using, and what tools and skills are the most common *currently*?"
If Propeller, Then (at least for now) SPIN handsdown. IF AVR, then C, etc. etc.
EXACTLY........... Thank goodness someone else thinks the way I do................(I used the screw driver metaphor in a previous post)
······ SPIN is the·perfect tool for the Propeller ...........I am not saying it is better or worse than C I am just ······ saying that it is the right tool for the propeller.............
·······By the way my number is 23.....but many are sooooo old they are not even in use anymore (anyone remembers Prolog or ModulaII????)
······ By the way I have been programming in C and C++ for 25 years now and I love them VERY MUCH. But like I have said repeatedly:
·······"Horses For courses"............and a good rider can ride whichever horse is given to him/her......the course might be a challenge ······ but the horse riding itself should not, regardless of the temperament of the horse.
heater said...
Sam, I like this part: "...wind the clock back 40 years and remain content to use the propeller as a supped up 6806 or Z80"
You may know I've wasted an inordinate amount of time on my hobby project of writing a z80 emulator for the Prop[noparse]:)[/noparse]
And I admire and applaud your work..............it is people like you that make me feel like I am not getting enough
hours in my day...........how can you do such stuff and still sleep eat and live the rest of your life ???????????????
I should have not had those children and also the wife while I am thinking about it.....
I am always amazed at what people on this forum have and are achieving..............
Nick Mueller said...
For writing an compiler, I'd only use an OO-Language, makes live much easier. I'd even pick C++ for that.
Now try that in SPIN. (Sorry).
SPIN was never designed for that purpose and never claimed to be able to do that kind of work......SPIN is a language for programming a microcontroller so that you can control I/O projects. · It is not a data base, it is not a general purpose programming language. SPIN is the· means to get a very powerful Parallel processing multitasking microcontroller to do its job. It allows the user of this device to tell it how to do its job and it does that VERY WELL............if you want to write compilers then SPIN is not the right tool....... · If you want to control a process and use the fabulous propeller to do it then the best tool to accomplish this job is SPIN (+PASM in certain cases). · I think the problem is that some people are not able to distinguish between a microcontroller and a computer. And the propeller being such a wonderful and powerful chip is partly to blame.... it is not helping since its capability and power is in a way blurring the delineation between the two............ · · · Sam
The z80 emulator is small fry compared to many other projects going on around here. A little here and a little there and it eventually gets done. Helps not to have a TV in the house. I'm sure a lot of people spend more time playing sudoku or filling in crossword puzzles than I do dinking with my little hardware/software hobby projects. The wife "understands" up to a point. Fortunately my son can get into it as well.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Comments
When you are working at the lowest levels, down at the hardware registers and dealing with interrupts etc, then obviously whatever language one uses one will find it very non-portable. That is a symptom of the vast array of hardware we have available, all different, not the language as such.
A little higher up and things start to look much better.
Example: In 1996 I helped a company rewrite an embedded system in C that was originally many 10s of thousands of lines of x86 assembler so that they could adopt a new Motorola 68000 based hardware platform and the PSOS operating system.
That code is still in use, now on Power PC and ARM based platforms and Linux. In the between it was used on PowerPC and VxWorks OS. During all that time it also ran on MSDOS and Windows such that it could be tested, debugged and used in system simulations.
I'm very sure I could get it compiled and running on the Prop using ICC or Catalina and putting a little effort into the lower level hardware abstraction layer.
So the standardization of C has been anything but a joke for me and many others in that situation.
It has been successfully compiled with all manner of C compilers.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
A standard is definded. If vendor X claims to be standard, then he has to be. If he isn't he can't claim it. C99 is a well defined standard. And vendor X or Y can verify it against the test sites by Dinkumware (Plauger).
> A program written in Standard C under MSC would not compile under Borland or under Watcom or under
> GCC or under ............
Didn't I say to stay away from the MS-Smile?
I once was employed for a company and developed under MS-C++. Later, I worked as a freelancer for them and did my work with Metrowerks C++ on a Mac at home. When things were running as wanted, I tested it with MS-C++. Guess what when things didn't work? MS did not adhere to the standard. Same for Watcom vs. MS. I was able to prove EVERY SINGLE issue with the standard (Plauger books, Stroustrup, $whatever).
> Even a program written in MSC 4 would not compile under MSC 6 without a lot of changes and rewriting.
Smile! I said MS-Smile!
> Each controller has registers and memory maps and and and and and that make it impossible to compile a program
> written for one microcontroller to run on another without TONS of changes and customization and fiddling etc.
You've got to learn about abstraction and encapsulation to handle these tasks efficently. Hacking doesn't help! It only fixes.
Also, I have problems understanding why this sould be a problem of C compared to SPIN. Except you show me other platforms where SPIN is running on ...
Nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.:
YADRO
You may know I've wasted an inordinate amount of time on my hobby project of writing a z80 emulator for the Prop[noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
I wonder what the original poster thinks of all this [noparse]:)[/noparse]
But heater it was your time to waste however you like
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propalyzer: Propeller PC Logic Analyzer
http://forums.parallax.com/showthread.php?p=788230
These threads are always entertaining!· Hey, maybe we should have a new section in the forum, called: Language Bashing· :-P· Here's a new twist to this thread:
I'm really curious: how many languages do you all here *really* know?
The definition of "know" is: you are versed in, and fast enough in, the language that you could apply for a job as a professional programmer trainee using that language as the only one in your toolbox.·
Scenario: This job you would get based solely on your skill with that language, no other factors.· Before applying for the job, you'd have 2 weeks of say 2 hours to brush up, or about 30-40 hours of practice.· At your interview, your future employer would give you a test of 25 simple programming tasks, language applicability, and syntax. This test would take about 2 hours.· You'd have to score 80%·(20 out of 25)·(And, yes, I have both taken and given such tests.)
Think about it, be honest, and give only ONE number --- and when the line between a language and a derivative isn't clear, just count them as different.· (e.g. I counted VB and VBA as different.)
OS'es don't count, but scripting languages do.· You don't need to list the names of the languages, just give the number.·
And if your honest answer is 0 or 1, please don't be afraid to post that! It's one of the reasons we're here helping each other ---
After all, we all started at some point!
My answer is: 34
(I started programming in 1972, '73, or maybe '74? - and I love learning new languages [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (CounterRotatingProps) : 7/4/2009 12:04:13 AM GMT
Added: I've been messing with Verilog which would be my 18'th but have not "mastered it" although I have written a single HUB/COG Propeller (not cycle accurate) simulation with it that works [noparse]:)[/noparse]. Learning and knowing more than a dozen computer programming and scripting languages is not out of the question. Anything requires a few minutes of refresh time if you haven't looked at it in several months. It's not like a final essay exam with a pen and a blue book. It's all like riding a bicycle though. Once you know it, you don't have to learn it again beyond a quick and ready reference.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propalyzer: Propeller PC Logic Analyzer
http://forums.parallax.com/showthread.php?p=788230
Post Edited (jazzed) : 7/4/2009 3:46:16 AM GMT
keep those answers coming!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
But, you'd be a fool not to use Spin for some things, seeing as the interpreter is built into the ROM...
On the other hand, C is a million times more portable.
I truly believe that C compilers will be much more relavent for Prop 2, when we can port over MP3, JPG, and who knows what else...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
DogP
> I wonder what the original poster thinks of all this [noparse]:)[/noparse]
Maybe something like, 'what kind of a virtual landmine did I just step on?' [noparse]:)[/noparse])
I'm smelling sand in the wind...
Sand trap ahead !
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Going off on a slight tangent here, I've had to put my propeller hobby on hold while I get my real-world wireless mesh working running on CP/M on a Z80. My entire water system on my property depends on this working and the existing system has just been destroyed in a small storm with uprooted trees, so I'm in a bit of a panic now as I've got only a few months to get it working. And I guess when there is a deadline, you fall back on the languages you are most comfortable with. I suppose those are the ones you 'really' know. For me, totally honestly, just 4.
I'm not going to include Spin yet. I'm still on the steep part of the learning curve. The very first problem I came across in spin was a long vertical line that started above the top of the screen and went below the bottom, and was part of an IF statement. Well, I just wanted a little branch to come off that with a new IF statement, but it wouldn't work. Sometimes it would jump to above the screen. Sometimes it would put a kink in the line so it wasn't straight anymore. Yes, the answer is to not put in 1 tab or 2 tabs or 1 space or 3 spaces but exactly two spaces. Not something I could find in the manual either. But I'm through the steep part of the curve and away flying now. And once I can turn a pump on wirelessly from 2km away and over a hill via multiple hops on solar powered repeater nodes (which is very close now), I'll have some spare time to come back to the triblade and the zicog as I think this is only a small step away from running C.
And so I have finally reached the conclusion *grin* - yes, you can run C on the Propeller.
That's great - and you probably know them well, right?· (Sorry to hear about the storm damage! Hurricane season here... oh oh)
>the conclusion *grin* -· yes, you can run C on the Propeller.
Ah, but what about C++ ?
... no no no, I didn't really ask that
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Personally I'm not all than enamored by SPIN but it does the job.
Heck you don't need C unless you're going program for other micros. But even then there are BASIC and Pascal compilers for those micros(PIC, AVR) that are popular with hobbyists.
I'm comfortable with one language: C++ (a year of heavy classes at school helped...).
Mastered languages: None.
I'm not Stroustrup or any other one of that kind. And with any language, there's always something left to learn.
And if people have problems to match 10 levels of braces, their real problem is to get structure and divide a big task into smaller ones. 10 levels, that's braindead! It starts to get sick at 4 or 5.
Nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.:
YADRO
And so, either you are willing to buy C or you are willing to SPIN and PASM. Parallax has struggled to keep the cost of C down while having good quality. But that is just the way the world is.
It does seem that those that have gone the distance and learned C tend to not want to learn other languages. Yet in microcontrollers there really tends to be great benefits to learn to program at the machine language level because resources are so limited.
And so, I begin to wonder if the the C programer expects to use all the C libraries that are really beyond the resources of the microcontroller. There seems to be a bit of unreality creeping in to the equation.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ain't gadetry a wonderful thing?
aka G. Herzog [noparse][[/noparse] 黃鶴 ] in Taiwan
And the machine language is ASM. And I never voted against that.
In fact, I design in C. debug, see where the bottle-neck is (or know it in advance) and program that part in ASM.*) And for a reminder and clarity, each C-line is within the ASM, followed by the ASM-code.
And no, it isn't whise to drag in every library available for the smallest task. Some are simply too expensive (space-wise).
*)
And as a reminder:
Good algorithms and a well tuned data-flow is what makes speed. Not ASM, C, SPIN, ...
Nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.:
YADRO
That's the number of distinct languages I have used in :
1. Paying professional work on major projects.
2. Non-trivial academic exercises.
3. Extensive hobby projects.
I could bump that up by counting more dialects or smaller experimental diversions to other languages.
I'd knock it down to almost zero for claiming mastery[noparse]:)[/noparse]
Strange thing is I have had a long career designing and coding in all kinds of fields, embedded systems, process control, military communications, aerospace, CAD/CAM, on-line WEB stores etc. etc. In all of this rarely has anyone been overly concerned about my mastery of the language(s) that they are using or want to use on a given project. Never have I been subjected to such a test of language proficiency.
Rather jobs have been landed on the basis of long technical discussions at interview about the project in hand, getting into it's purpose, it's design, it's future direction etc.
I did tell one interviewer straight out that I have zero experience of the language and real-time OS in use at his company. "No worry" he says "You'll pick it up" and he offers me the contract as team leader for one year.
This is why I have said here that these language debates are "over blown".
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Yes, precisely one of the reasons I ask how many languages do we know. (And please keep the answers coming! This is actually very interesting IMO)
My experience has been that the more languages you have in your toolbox, the less you care about being an evangelist for any one in particular. Generally speaking that is. The exception is when a new language comes out that is really cool for whatever reasons, then there's good cause to be excited about it. E.g. PERL in the early days, PYTHON - even now, Ruby, and lately keep your eye out for "IO" a very very cool, easy to use message-based OOP (which is built in C/C++ ... I'm hoping some great soul ports it to the Propeller [noparse]:)[/noparse]
http://www.iolanguage.com/
> Rather jobs have been landed on the basis of long technical discussions at interview about the project in hand,
> getting into it's purpose, it's design, it's future direction etc.
Exactly - the language is only a tool, not an end in itself (unless, of course, you are in a compiler-building shop [noparse]:)[/noparse]
These language bashing threads are sort of silly. Think about it this way: what sense is there in fighting over "which is better, a screwdriver or a hammer?" If you read between the lines and analyse the points of discussion here, we're really talking about which is the more appropriate tool for the job. "A philips screwdriver or a slotted one?" hmmm, well "what kind of screws are we using?"...
So the question of "C" or "Spin" really should be "What MC are we using, and what tools and skills are the most common *currently*?"
If Propeller, Then (at least for now) SPIN handsdown. IF AVR, then C, etc. etc.
> rarely has anyone been overly concerned about my mastery of the language
Please recall that the def. of "known" in my query was not 'mastery' rather more 'entry-level trainee.' If I were to have said mastery, that would probably be defined as being able to write a compiler for that language into p-code from scratch. (If that were the case, I'd have to drop my 34 down to 0.5 [noparse]:)[/noparse]
Loopy Byteloose> It does seem that those that have gone the distance and learned C tend to not want to learn other languages
Loopy, I'm not sure that's so true, if you consider the context I mention here to heater. Maybe that's the case initially, but many of us are forced to learn other languages, or at least be able to read them enough to maintain, interface to, or whatnot. Maybe it's like Steve (jazzed) said: "Most programmers are unfortunately heavy ladened with ego and various amounts of testosterone" --- ego and hormones are language neutral. [noparse]:)[/noparse]
Cheers
Howard
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
> from scratch. (If that were the case, I'd have to drop my 34 down to 0.5 [noparse]:)[/noparse]
Does that count for an extra bonus? I did that!
Also poked around in the USCD-Pascal's p-machine. Squezed out about 0,3% more speed by using the additional 65SC02 op-codes. On my Apple ][noparse][[/noparse]. Hahaha! Those were the days.
Also wrote about 4..5 interpreters for my own or commercial languages. One of them built a parse-tree that wasn't destroyed, but was then used to execute the code. Three had an source-level-debugger with single-step, var-trace, breakpoints, ... They were written in Pascal, Modula-2, C and C++
And a parser (the code-generator was missing) for Newton-Script. But the project slowly died because the one wanting do make the garbage-collection didn't finish. He still has my book about garbage-collection.
Nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.:
YADRO
LOL - and Viele Gr
Don't ask me!
Maybe for educational purposes? I wouldn't use it for real programming. It's a perfect language to learn programming, but for real live it is to restrictive. Compared to Pascal a big step forward. I worked with JPI-Modula and an other one. Don't remember. One of them had an akward editor (can't use a different one, because he made part of the parsing I guess) that was a PITA to use.
BTW:
Compiler-writing is no big sience. It was only obfuscated by some authors ("The Dragon Book", or by Rechenberg (IIRC) and later by all the table-driven compiler evangelists).
You need to draw a syntax-diagramm. If that works, all is coded the same way. The ultimate book is by N. Wirth "Compilerbau" (compiler construction; you know With, the father of Pascal and Modula). I think you can find it online now as PDF and in English. It's stone old and incedibly small but you don't need to know more. Should anybody be interested in that subject, this is *absolutely* the book to start with! I'll never ever give my copy away, and I have thrown away hundreds of programming-books!
For writing an compiler, I'd only use an OO-Language, makes live much easier. I'd even pick C++ for that.
Now try that in SPIN. (Sorry).
Nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.:
YADRO
perhaps the compiler writing isn't rocket-science, but you have to really understand *how* the language works under the hood to convert its syntax into something meaningful
remember this one:
(void far *) somePointer ; //?
- and tables have to be filled first [noparse]:)[/noparse])
> Now try that in SPIN. (Sorry).
You are forgiven, but SinTax no more! ;-P
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Hmmm ...
http://forums.parallax.com/showthread.php?p=692011
I've thought about learning Ruby which look like a nice OOP language, but it seems a little bloated. I've used Python, but haven't bothered because the syntax looks a little odd ... to me at least. I took a few Pascal classes long ago, but I think it's rather awkward and don't count it in my list of languages.
As far as "mastered it" goes ... I used the phrase in quotes before for a reason. One does not need to know everything to "master" something. Having a solid working knowledge that can produce results and avoid pitfalls is my definition of mastering. A PhD "may" have a different definition. Socrates of course could make any master look like a fool (strong motivation for his eventual fate no less), but at least most of us learned some need for humility and avoiding hubris from him and his student [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propalyzer: Propeller PC Logic Analyzer
http://forums.parallax.com/showthread.php?p=788230
both Ruby and Python are pieces of cake, and "IO" is even easier!
Right, Ruby's fat. But Spin shares Python's indentationism (is that a word??) Python can be made pretty skinny, but it has tons and tons (did I say tons) of librarys and modules. Both are Very Cool Languages. VCL is higher up than OOP
But look at IO:
Dog := Object clone
Dog bark := method("woof!" print)
>> Dog bark
woof!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thank goodness someone else thinks the way I do................(I used the screw driver metaphor in a previous post)
······ SPIN is the·perfect tool for the Propeller ...........I am not saying it is better or worse than C I am just
······ saying that it is the right tool for the propeller.............
·······By the way my number is 23.....but many are sooooo old they are not even in use anymore (anyone remembers Prolog or ModulaII????)
······ By the way I have been programming in C and C++ for 25 years now and I love them VERY MUCH. But like I have said repeatedly:
·······"Horses For courses"............and a good rider can ride whichever horse is given to him/her......the course might be a challenge
······ but the horse riding itself should not, regardless of the temperament of the horse.
····· Sam
hours in my day...........how can you do such stuff and still sleep eat and live the rest of your life ???????????????
I should have not had those children and also the wife while I am thinking about it.....
I am always amazed at what people on this forum have and are achieving..............
Sam
·
work......SPIN is a language for programming a microcontroller so that you can control
I/O projects.
·
It is not a data base, it is not a general purpose programming language. SPIN is the·
means to get a very powerful Parallel processing multitasking microcontroller to
do its job. It allows the user of this device to tell it how to do its job and it does that VERY
WELL............if you want to write compilers then SPIN is not the right tool.......
·
If you want to control a process and use the fabulous propeller to do it then the
best tool to accomplish this job is SPIN (+PASM in certain cases).
·
I think the problem is that some people are not able to distinguish between a microcontroller
and a computer. And the propeller being such a wonderful and powerful chip is partly to blame....
it is not helping since its capability and power is in a way blurring the delineation between the two............
·
·
·
Sam
The z80 emulator is small fry compared to many other projects going on around here. A little here and a little there and it eventually gets done. Helps not to have a TV in the house. I'm sure a lot of people spend more time playing sudoku or filling in crossword puzzles than I do dinking with my little hardware/software hobby projects. The wife "understands" up to a point. Fortunately my son can get into it as well.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.