February 16, 2006, 1:43 pm
You can't expect that one will not be encouraged by such a line.
C# is very much like Java in that the CLR is like the Java VM. There are a
lot of advocates that claim that VM languages like Java or C# can process
data faster than C, I have yet to see it in practice or hear a reasonable
explanation as of how.
Re: C# for higher level robotics?
The only question is does it process data fast enough
for the application in question? Otherwise it makes
sense to use the language and OS you are expert at.
There is always the option of inline assembler?
One reason I like Java is, in theory, it will run on any
system that supports its VM. I guess that is not the case
with c# as I suspect M$ would not support Linux :)
I see the programming language and the OS as the bottle
neck for hobby robotics where the enthusiasts is not
a professional programmer.
I have even spent some time learning to program Windoze
from assembler which was my language of choice with DOS
as it is the easiest language to learn.
However the Windoze environment is hundreds of more times
complex to learn than assembler which would call its APIs.
And tutorials are rather scant to find...
http://flatassembler.net/examples.php
FASMCam
size: 2 kilobytes
This application shows how to access webcam in Windows.
Written by Marcus Araujo.
--
JC
Re: C# for higher level robotics?
"JGCASEY" wrote
<snip>
I don't think either, but as .NET is a "standardized" framework, it is
possible that someone implements it in other platforms, well at least that
was MS dream a few years ago. I'm not sure, but I've heard rumors that there
is already a .net implementation for unix or linux.
You have to forget about the machine. Programming for windows is basically
learning how to interface with all the different APIs and their models. Big
no no for assembler. In all my years of windows development, I can count in
one hand all the times I had to use assembler (within delphi) to accomplish
something.
I learned programming using COBOL, REXX and Assembler for mainframes, and
I've been changing languages since then, but honestly, C# caught me by
surprise. IMO, it gets the best features of java, c++ and even delphi (ask
Mr Hejlsberg). If it proves to be fast enough (note that fast enough <>
faster) for robotic purposes, we may observe a good inflow of people
migrating to C#.
Regarding your comment on assembler being the easiest language to learn, it
may be true that it has the easiest sintax to learn, but assembler is one of
those languages where if you don't know the tricks AND the hardware
architecture underneath you, you don't do anything.
Cheers
Padu
Re: C# for higher level robotics?
...
There are a few die hards who program Windows from Assembler
although I think it is more a religion as I doubt that they
are very productive in terms of actual practical applications.
Although I think PowerBasic was written in assembler and does
have an inline assembler as part of the package.
Very true. Without the hardware specs it is difficult to decode
exactly what is going on. Unfortunately modern hardware is designed
for a complex multitasking multimedia machine which requires years
of study and practice to program and isn't really a hobby project
for anyone who isn't an advanced software expert like yourself.
Cheers,
John
Re: C# for higher level robotics?
This isn't an either-or scenario. What you write your main code in, and
what you write optimized algorithms in, needn't and probably shouldn't,
be the same. Writing some routines that compare bits in an array needn't
be a tough task, even in Assembler. Your application has only to pass
the routine the array of bits.
An expert in the .NET CLR can tweak the compiled code, but it might
actually be easier to write things like bit comparison routines in
straight C. Compile it as a DLL, and call it from your C#, Visual Basic,
or Word macro code as needed.
-- Gordon
Re: C# for higher level robotics?
Well, I doubt that either... it is one more layer... so I can't see how
implementing the same algorithm in the two environments, how a JITted one
could be faster (assuming both compilers and runtimes are making good
optimizations). Although with new processor speeds and optimizations of the
VM's or CLR's, my hope is that it becomes less and less of an issue.
I've been programming in Delphi for the past 10+ years of my life, and going
to C# is proving to be as painless as possible, even pleasurable.
Cheers
Padu
Site Timeline
- » RC Servo help
- — Next thread in » General Robotics Forum
-

- » Re: C# for higher level robotics?
- — Previous thread in » General Robotics Forum
-

- » evoMUSART 2013: First CFP (with correct dates)
- — Newest thread in » General Robotics Forum
-

- » Heat pump refrigerant change to R-22 substitute
- — The site's Newest Thread. Posted in » General Metalworking
-

- » DCC sound question
- — The site's Last Updated Thread. Posted in » Model Railroad Forum
-


Subject






