Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 38

Thread: Best robotics Language?

  1. Re: Best robotics Language?

    I have been developing software for over 20 years and I can tell you that you want to use a language that you can develop quickly in. Languages are broken up into basically two types. C and it's derivatives like C++, Java, C#, etc are typed languages. The other type is fairly new (less than 10 years old or so) and are called dynamic (no typing) languages such as Python, Perl, Ruby, etc. For example you can develop in Python about 20 times faster than you could in Java. (Google this and you will see many comparisons.) The execution time on Python will be slower than Java and much slower than C, but you can get something working in hours instead of weeks. These days with the fast CPU that are around speed is not really a consideration anymore.

    My preference is Python it is also very easy to learn especially if you already know another language. Within two weeks to a month you'll wonder why you never learned Python sooner. Perl and Ruby are also somewhat dynamic, but will be slower to learn.

    For those that don't know what 'typing' is in a language it's the definition of the data type such as char, int, float, etc. Typed languages requires you to declare a type for everything whereas dynamic languages often require no typing at all like Python or minimal typing as in Perl or Ruby. Not having to worry about typing will increase your code output tremendously.
    Last edited by cnobile; 06-19-2009 at 04:36 PM.

  2. #12
    Join Date
    Jul 2008
    Location
    Belgium
    Posts
    633
    Images
    2
    Rep Power
    66

    Re: Best robotics Language?

    I don't have much experience with high-level languages (i'm more of an embedded coder) but I do agree on the point you state about Python.

    The last project I finished at work required a GUI for Mac OSx, which is an OS I had never even seen(!), yet I wrote the entire thing in three 40h workweeks.
    Take into account the fact that I wasted about a week getting the correct dependencies before figuring out I needed an OS update, that frankly astounded me.

    The fact that no typecasting is necessary is indeed handy, yet confusing if you're used to working with 8-bit variables, especially when you're trying to average arrays ( well lists in this case) with variables lengths.

    All in all I'd say it's a very handy scripting language and recommend it as well.
    Artificial Intelligence is no match for Natural Stupidity

    "For a list of all the ways technology has failed to improve life, press three" - Alice Kahn

    Resistance is futile! (if < 1)

  3. #13
    Join Date
    Apr 2008
    Location
    Sacramento, CA, USA Area
    Posts
    5,341
    Rep Power
    181

    Re: Best robotics Language?

    I'm not anti-python by any means, but I think it's a stretch to declare that removing strict typing will increase code output THAT much. And then we need to talk about debugging time when the compiler does the wrong thing because the variable wasn't explicitly cast. (shobley's LCD problem that I helped him debug comes immediately to mind)

    I think languages that are tooo loose are major contributors to a lot of maintenance nightmares down the road... That said, it can get silly-strict in the opposite direction too...

    Welcome to the forum, btw!
    I Void Warranties�

  4. #14
    Join Date
    Feb 2009
    Location
    Mesa, AZ
    Posts
    351
    Images
    84
    Rep Power
    53

    Re: Best robotics Language?

    Quote Originally Posted by lnxfergy View Post
    Note my post in your project thread.

    All a PC has for interfacing with the world is ports: such as serial, parallel and USB. Note that serial and parallel ports (aka legacy ports) aren't found on many computers today, so you are stuck with USB->serial converters. You'll need an interface between outside electronics and your computer. Typically this is a microcontroller-based board that incorporates analog/digital input and output, pulse width modulation, etc. It then has some protocal that it can speak with your pc. Here's an example of communicating with an Arduino:
    http://forums.trossenrobotics.com/showthread.php?t=2096

    -Fergs
    When I try to click on this link, it says I don't have sufficient privilages to access this page. Same thing when I try to click on some of the tutorial pages on the left pane. Tried cut and pasting the link into a new browser window, no luck either. ???

  5. #15
    Join Date
    Apr 2008
    Location
    Sacramento, CA, USA Area
    Posts
    5,341
    Rep Power
    181

    Re: Best robotics Language?

    Moderator has insufficient privs too. I'll note this to Alex.
    I Void Warranties�

  6. #16
    Join Date
    May 2008
    Posts
    2,228
    Images
    155
    Rep Power
    132

    Re: Best robotics Language?

    I'm thinking its a page that disappeared when the new tutorial system was launched. Here's the Link I think: http://forums.trossenrobotics.com/tu...ed-robot-2096/

    -Fergs

  7. #17
    Join Date
    Feb 2009
    Location
    Mesa, AZ
    Posts
    351
    Images
    84
    Rep Power
    53

    Re: Best robotics Language?

    Quote Originally Posted by lnxfergy View Post
    I'm thinking its a page that disappeared when the new tutorial system was launched. Here's the Link I think: http://forums.trossenrobotics.com/tu...ed-robot-2096/

    -Fergs
    You could be right. This link works for me. Excellent tutorial!! Think I might try out Python over the next year and plan to order a Arduino Duemilanove which would share duties on a small tracked vehicle as well. This sound like a good start for Clyde v2?

  8. Re: Best robotics Language?

    Actually it's not a stretch. When you have strict typing in a language it affects almost everything you do in your code. You need to think about when you need or not need to cast variables, classes, methods, etc. But it's not just the typing issue that makes coding in python so fast. It's also the ease of determining scope (indentation), you don't need to type all those brackets or BEGIN and/or END statement like in Pascal or Ruby. Yes this may seem like a small thing, but it's all the small things in Python that together make Python so easy to code in and an extremely fast language to develop with.

    In general debugging Python is quite easy, because you can test things very easily on the python CLI. I use ipython myself. Python is an interpreted language there is no compiler so there is never an error in a variables interpretation. I'm not saying you could confuse yourself by using a variable, lest say, as a list then later thinking it's a dictinary (hash map), but these problems are usually brought about by bad or inexperienced programming anyway. Writing good OO code in any language realy takes experience and having personal integrity about what you write.

    I develop in C, Java, JavaScript, Perl, and Python, so I have experienced the worst of the issues with these languages. No languages is perfect or people wouldn't keep developing new ones.

    If you want to continue this train of thought it might be best to email me directly as I don't want this to turn into something it shouldn't and it's really irrelevant to the topic.

    Quote Originally Posted by Adrenalynn View Post
    I'm not anti-python by any means, but I think it's a stretch to declare that removing strict typing will increase code output THAT much. And then we need to talk about debugging time when the compiler does the wrong thing because the variable wasn't explicitly cast. (shobley's LCD problem that I helped him debug comes immediately to mind)

    I think languages that are tooo loose are major contributors to a lot of maintenance nightmares down the road... That said, it can get silly-strict in the opposite direction too...

    Welcome to the forum, btw!

  9. #19
    Join Date
    Apr 2008
    Location
    Sacramento, CA, USA Area
    Posts
    5,341
    Rep Power
    181

    Re: Best robotics Language?

    "bad or inexperienced" - or 96hrs on /4 off?

    Non-conventional scope - I've fired people for much less... Makes future maintenance into a nightmare.



    The upshot is that this is a religious question. You're wrong. I'm wrong. We're all wrong. Because there is no right answer...

    Let's compare the deep image processing and neural networking performance between python and hand-optimized assembler... Guess which one loses there? So we could just as easily decide that hand-optimized assember is the "best robotics language". Of course, you could mention python making external calls and loading said optimized assembler, but now we`re just getting silly 'cause I can do that in just about any modern language...

    There is no best tool in the toolbox. Your bestest hammer makes a crummy hex wrench and your favoritest hex wrench won't drive phillips screws to save its life.
    Last edited by Adrenalynn; 06-21-2009 at 02:11 AM. Reason: Malfunctioning keyboard - dead batteries. Needed to edit for readability
    I Void Warranties�

  10. #20

    Re: Best robotics Language?

    Interesting discussion, many things that I can't really understand the significance of. I was curious though, what is the general opinion of Forth? I've been somewhat involved with it in the past, and was fascinating about this particular interpreted flavor I used. It allowed you to write a short code word, then execute it, or even run a small program of words, while continuing to be "in contact" with the terminal to add more words, stop execution, start other words. The people working in it felt it offered a high degree of speed in development too. I, not being a programmer, could stand by and nod, but not really grasp some of the reasons they gave for this. Any thoughts, opinions?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. New to robotics, and trying to build a turret
    By Marauduer_Pilot in forum Arbotix, Microcontrollers, Arduino
    Replies: 13
    Last Post: 05-10-2010, 05:54 PM
  2. Discussion Programming Languages for Robotics
    By LinuxGuy in forum Software and Programming
    Replies: 27
    Last Post: 05-25-2008, 12:16 AM
  3. New To Robotics And Programming
    By El Espada in forum Robotics General Discussion
    Replies: 11
    Last Post: 01-08-2008, 11:33 PM
  4. Trossen Robotics System versus the competition?
    By Nammo in forum Software and Programming
    Replies: 10
    Last Post: 11-28-2007, 04:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •