Homebrewing an XYZ CNC Router

wrote:


The MOD thought it could write the software for Chinooks, was advised by Boeing that it would be a difficult task, ignored that advice and cost us all millions. The software was never written and the Chinooks are still not in service!
--
brightside S9

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Gary wrote:

Some people have strong opinions on how sophisticated a programming language Visual Basic is!
BugBear
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

I am informed that it has more sophistication than Ansii C which is the lingua franca of engineering these days.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
wrote:

Don't confuse "sophistication" (however you choose to define it) with "capability". After all, the machines that these "sophisticated" languages run on are actually programmed in a primitive instruction set.
Also, as you note, ANSII C (and C++,...etc.) is the lingua franca of engineering these days for a very good reason - it was *designed* to do that job, and that design is sound. VB wasn't, and isn't, which is why, whatever you might believe about how sophisticated or otherwise it might be, VB isn't ever going to be the lingua franca of engineering.
Regards, Tony
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Gary wrote:

VB is a very unsophisticated language, but it provides access to a truly massive library of functionality.
I suspect any sophistication lies in the stuff it can *call*.
Only programmers care about such distinctions, of course :-)
BugBear
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Thu, 27 Aug 2009 10:50:42 +0100, bugbear

...but they care about such distinctions for a reason - when they want to do something that (a) isn't provided in the support library and (b) isn't within the capability of the language, then its game over.
Regards, Tony
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

I will consult and get back to you on that.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
wrote:

...No comment.
Regards, Tony
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

I have consulted my acquaintance who uses C in both embedded and in PC applications, and who uses Visual Basic in PC applications and in Excel (for it was he who introduced me to Excel macros) and he suggested that I should ask you for examples of sophistication that you say are in the C language but that are not in Visual Basic, but without you resorting to unwise engineering wrinkles such as the conditional expression.
He says that Visual basic has Objects and that C does not, unless you take into account the little-known functions that can be provided as part of the definition of a struct.
Apparently, a C programmer relies on a large number of standard libraries, "stuff it can *call*" in fact!, especially the printf function which even has its own language interpreter built-in to deal with format strings.
It seems that one of the biggest sources of injecting viruses into PCs these days comes from the fact that Windows is written in C and that advantage can be taken by virus writers of array overflows on the stack, something that is not at all possible in Visual Basic that has array bounds checking built-in. So much for the superior sophistication of C!
Let us not take this too far, for it is drifting from model engineering, and I doubt my capability to win an argument against a software professional.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Gary wrote:

Functions as part of a structure definition, tell me more. I've not run across them in 18 years of C programming, but pointers to functions as part of a structure that I know about and have used before.

While true and the stack isn't the only place it can occur, that is something you have to be aware of when using the C language and it's simple to do. I've been programming in C for 18 years and do bounds checking but I've known many that can't be bothered and it does cause problems from time to time that could have been simply avoided.

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Sorry, but I'm not competent to answer that. Perhaps you in your turn have a more experienced guru to turn to?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Gary wrote:

I was hoping you might ask your acquaintance as you brought it up and he mentioned the capability. I don't personally know anyone I could ask but a quick google says you can't do it in C but can in C++. You can have pointers to functions in a C structure as I was aware of.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

I'm way out of my depth on this one and I'm not sure I'd understand what my guru is on about even if he did explain it to me. Is there a C based usenet newsgroup where you could ask this question and then report back?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Gary wrote:

Probably but I don't think it's important enough for me to do as I was happy with the result of google searching for "c structure function" and others had already asked the question and gotten the answer I mentioned above. Your guru doesn't need to explain it to you, all he would have to do is provide you with a C code snippet that shows a function in a structure that can be compiled with a C, rather than C++, compiler and you can post it in a reply.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
> > It seems that one of the biggest sources of injecting viruses into PCs these

I have (several times) used the ability to overflow (or wrap) in C (and assembler) to write efficient code that runs *much* faster. In the low level embedded world these things are often elegant solutions that you cannot do in a language designed for excel macros, and subsequently applied but people who are to lazy to learn how to do things the proper way.
Dave
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
wrote:

Gary -
Thats probably the smartest thing you have said on the subject so far.
Regards, Tony
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

'Yawn' --
Chris Edwards (in deepest Dorset) "There *must* be an easier way!"
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

John S.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Just like safety switches on machine tools, bounds checking is sometimes essential to protect the uneducated, sometimes a life-saving reminder for the educated and sometimes a pain in the butt that stops real work being done to no useful purpose.
Use them in moderation, with thoughtful design for their functionality rather than sprinkling them everywhere, and above all never rely on them.
-adrian
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

So what you are saying is that there is scope for a more sophisticated correction mapping than that which I posited?
Taking my cure from the VLT (very large telescope) which, ISTR, fires lasers at the sky to evaluate random shifts in the "seeing", and taking the cheap and getting-cheaper-by-the-day digital measuring systems at our disposal, and continuing to bear in mind the extensive computing facilities at our disposal, could we even conceive of a dynamic correction procedure based, say, on laser pointers?
Compare with the electronic correction in the EMU/ECU of your car, as opposed to the previous and crude vacuum and centrifugal advance/retard mechanisms for spark timing.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.