Shop OBEX P1 Docs P2 Docs Learn Events
Opinions on a new programming language - Page 2 — Parallax Forums

Opinions on a new programming language

24

Comments

  • Spiral_72Spiral_72 Posts: 791
    edited 2011-02-15 11:10
    This has turned into a pretty popular thread :)

    Alright, this is painful. I've copied down each suggestion and researched each.....so far up to reply #22 I think.

    __$WMc%__: I downloaded Just BASIC and an evaluation PureBasic 4.5. Both seem about the same. PureBASIC is a little more powerful of the two I think (Don't know about Liberty). The commands are very similar to QBASIC I used, but the syntax is sometimes completely different..... more like C syntax sometimes than BASIC. I think I'll use this just to get the routine done with the PING, but I don't know if it's an answer to problems..... Just/Pure Basic is just compatible with Windows.

    My notes so far. You can agree or disagree if ya want..... this is just what I've found and my opinions.

    Perl:
    open source
    established over 20? years
    Cross-platform
    Database, graphics, CGI, Web, Applications
    Powerful
    High learning difficulty

    Python:
    open source
    established over years
    cross platform
    Easy to read
    Graphics
    Applications (?)
    Medium learning difficulty

    Visual Basic Applications (VBA) or .NET
    Microsoft
    I dunno, it doesn't seem like what I want. seems like it's mainly for functions inside applications instead of programming

    Visual Basic:
    Programming in VB is a combination of visually arranging components or controls on a form, specifying attributes and actions of those components, and writing additional lines of code for more functionality.
    Probably costs (?)
    Windows only
    Drag and drop programming
    Slow??
    I dunno, I don't think so.

    Processing:
    Java based
    No details yet

    Visual C++
    Microsoft, expensive (supposedly a free / individual license is available)

    C++ (Borland or whatever the correct name is)
    Powerful
    High difficulty in learning


    I also have another thing to consider, but maybe I'm complicating things. What would look good on a resume?

    On a resume, .NET seems the most popular and some variant of C (Visual C(whatever variant) ) is second to most popular.

    At the moment my choices are between: (Borland) C++, Python and Perl
    C++ I have some experience with however applicable it is. Python I've tried to learn on several occasions, and Perl I have no experience with at all.

    I may use Just / Pure BASIC just because it's so familiar and easy to work out ideas with the real programming done in one of the three choices listed above.
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-02-15 11:12
    I may be a bit biased though, because all the programming I've done, Assembly first, then GW\QBASIC then C++ was coded one line at a time.... This Visual thing is very strange to me. Drag and drop commands??? Huh?

    Maybe I've got it wrong and am just showing my ignorance.


    I really appreciate all the ideas. This is research, and hopefully it will help someone else too!
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-02-15 11:17
    potatohead wrote: »
    Well, there is a case for just continuing with DOS. Just put it in a virtual machine, while you explore other options.

    Correct me if I'm wrong: Virtual machine is an XP compatibility mode right? In that case I still don't have direct access to the COM port do I?

    Just to let you know where I coming from: My workhorse / programming / development system is a 1Ghz machine with a dual boot DOS/Windows 2000 :) I love it, it's an awesome machine..... just doesn't mean anything to anyone else.


    edit: More correctly 850MHz overclocked to 1GHz
  • ctwardellctwardell Posts: 1,716
    edited 2011-02-15 11:54
    Spiral_72 wrote: »
    This Visual thing is very strange to me. Drag and drop commands??? Huh?

    Don't worry about the "Visual" part.

    You can create forms visually, and there are some "drag and drop" type controls for database connectivity and such, but you really aren't forced to use them.

    All the "guts" are still programmed good'ole one line at a time style.

    You might want to look at downloading the express version of VB.Net to try it out.

    http://msdn.microsoft.com/en-us/vbasic/default

    I'm planning to come up with a spec for a sample project and doing solutions first in VB.Net and c#, maybe a VBA version run from Excel, and then I'll do Python as a learning experience for myself.

    Maybe I'll follow those with perl and ruby if python goes well.

    The pro M$ stance if you noticed it, comes from those products being what I use to earn a living...

    C.W.
  • $WMc%$WMc% Posts: 1,884
    edited 2011-02-15 16:58
    Spiral_72
    '
    I use a few different compliers. One is usally easier to do a small application then another.
    '
    I think having a choice of compliers on your desktop is the way to go.
    '
    If you want power take a look at PowerBasic.
    '
    www.PowerBasic.com
    '
    Be careful with this compiler. POKE something in the wrong address and you'll BLUESCREEN your PC in a heartbeat. Trust me.
    PowerBasic runs over Windows NOT under it.Very Powerful.
    Unless your really good with basic, this is something to grow into later.
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-02-15 20:01
    PowerBasic eh? I'll look it up. I'm actually pretty good with Basic.... I know that sounds conceited.

    I finally got the PC (Win7) receiving messages from the BS2!!! It only took three hours with Basic that scarcely resembles the Basic I'm used to, but the BS2 is sending 26 bytes which display on the PC screen in a "Console" window

    It's a first for me in Windows. Hooray.

    After all this, I do not plan to use Just/Pure/Power Basic primarily. It was an exercise only because I was tired of researching languages this afternoon. I'll pick one of the Basics and learn a primary language.
  • potatoheadpotatohead Posts: 10,261
    edited 2011-02-15 23:09
    No, you don't get direct access, but...

    I would use something like VMWare, so that the virtualization is complete. From there, the virtual com port can be mapped to the real one. The product of that is your program talking to the COM port as if it's a real port. I don't know how well serial applications work. I know people are doing serial, and a lot of other things on virtual machines.

    If you go down that road, you would need a faster box. I had a similar machine, running dual 1Ghz CPU's, and it ran Linux, after running Win2K for a long time. It was a great machine, that had solid legacy hardware support on it. These days i'm largely operating on 2Ghz plus laptops with multi-core CPU's. On some things they suck, but on most things they are pretty great.

    Anyway, it's probably better that you expand. Never a bad thing to do a skills update. But, if that's really painful, the virtual approach might just pay off, with the added benefit of your environment being portable. It's possible to copy it, for example, put it on another box, map the serial stuff, and your programs run never knowing the difference. Also possible to take snapshots, and if you really botch it, roll back to a prior config with no worries.

    I use this all the time for larger scale software testing, deployment, data import, and other ugly things that would be extremely painful on a real server.

    YMMV!
  • Dave HeinDave Hein Posts: 6,347
    edited 2011-02-16 08:22
    Spiral,

    I am about to embark on the same quest as you. I'm a C programmer, and am very comfortable writing C programs for DOS. About a year ago I wanted to write a program to access the serial port with a DOS program, and I found that Windows just doesn't allow it anymore. I took a short course on C++ and MFC library several years ago, and I understood some of it, but the concepts just didn't sink in at that time. I think the problem at that I was trying to learn both C++ and MFC at the same time. I now realize it would have been much better to learn C++ first, and then learn how to use the MFC library.

    Creating a Windows program is much different than writing a C DOS program. Everything is driven by messages in a Windows program, and its not a simple task to port a DOS program to Windows. It takes much more effort in Windows app to do something as simple as printing to a screen. My plan is to use the Qt development software instead of Microsoft's Visual Studio C++. It seems like the Qt approach is a little more striaght forward. Also, Qt programs can be ported to linux and Macs by just rebuilding for those platofrom. That's a big advantage over Microsoft Visual Studio.

    Dave
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2011-02-16 08:40
    I found Visual C++ almost a different language from C. There is no real advantage to it really, the only way you can get native compiled code is with a console application. If you want Winforms, it is automatically dotnet. I find C# syntactically closer to C than C++ is to C. Lack of true structures is annoying though.
  • David BDavid B Posts: 592
    edited 2011-02-16 09:25
    Naming a language is one thing; helping a newbie get started would go far beyond that.

    When I develop practically anything in code, I almost never start with a blank screen. My first action is always to try to find some existing code that's almost like I need to develop, then I modify the code for the current project.

    This idea could help anyone develop GUI codes if we were to use ctwardell's suggestion that each person who supported a particular language offer examples of his GUI code.

    We would need a repository where the GUI examples could be stored. The OBEX would not be quite right for this, as it is more for complete propeller code examples.

    If there was GUI "OBEX" stored somewhere, it could have folders for GUI code examples in Perl, Python, Visual Basic, Delphi (my favorite, which I can provide), C, C++, whatever. A readme file in each folder could provide tips for programming environment configuration, which also would be very helpful for a newbie to any of these languages.

    Is this a good idea? Can anyone help with a code repository?
  • davejamesdavejames Posts: 4,047
    edited 2011-02-16 09:26
    Spi,

    When I started my "parachute projec" (the one to make money after retiring/getting "RIFed"/whatever), I decided to take the plunge and use Visual Basic 2005.

    Why?

    Well, I initially thought: "basic - how hard could it be? After all I've worked with BASIC-80, Atari Basic, Forth, Pascal, C, C++, and some ATE test system specific languages. I mean, really - how hard could it be?"

    ...pause...pause...pause...

    Visual Basic ain't your daddy's BASIC. It is vastly powerful with features of C++ sprinkled about. And with that power comes complexity...and with complexity comes confusion. Again, it ain't BASIC as we once knew.

    All that said, I now have close to 4 thousand lines of code in my application and I actually understand the operation. I had a LOT of help from Forum members (especially Unsoundcode), but in the end, the app works and I can maintain it.

    With all the comments about the ".net" aspect of VB2005, once the app is "published", the end result package contains the required libraries.

    Yes - it's Windows oriented...and that brings me to this: http://www.realsoftware.com/realstudio/

    A Forum member pointed me to Real Basic as a means of producing cross-platform (Win, Linux, Mac) output. It costs ($300 for what I need) and it appears to be well supported. I have not persued it yet, but will in the future once the final buggies have been worked out in my prototype.

    Good luck,

    DJ
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-02-16 13:07
    davejames wrote: »
    ......it ain't BASIC as we once knew.
    DJ

    Man, that's an understatement! :) As a matter of fact it looks so much like the C++ I once knew that I wondered why I'd even bother with *Basic....... then the remainder of what you said is true according to what I've seen over the last week of research. It's vastly more powerful now.

    I haven't eliminated any of the three choices yet. I might even consider Visual Basic again. Learning a new language takes a huge amount of time.... I want to get the one that works best for what I want to do (obviously).
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-02-16 13:53
    I found this: http://www.awaretek.com/atesterea.html
    HA!HA!

    The results:
    C/C++ scores: 52005
    Java scores: 45350
    Python scores: 36150
    Lisp/Scheme scores: 34015
    Perl scores: 33975
    C# scores: 33255
    JavaScript scores: 31805
    Ruby scores: 29610
    Visual Basic scores: 27836
    PHP scores: 26300

    The funny thing, my three choices were the same it picked and in the same order, disregarding Java and Lisp (I don't even know what Lisp is.)

    Currently:
    #1 C/C++ Power, potential and speed, I don't think it's so easy to make GUI though
    #2 Python Power and potential and "pretty" fast, I think it's easier to make the GUI than C
    #3 Perl Power, potential and speed, probably the easiest for the GUI I think.

    + Some BASIC variant

    I'll have to verify the opinions first..... with the number of libraries available for the three choices, developing the GUI may not be that big of deal though.


    off to research some more <sigh>
  • davejamesdavejames Posts: 4,047
    edited 2011-02-16 14:29
    Spi - don't write off C++ to quickly...see attached.

    I whipped it up in just a couple minutes (took longer to start MS C++ 2005).

    And see this link for a description of LISP (LISt Processing):

    http://en.wikipedia.org/wiki/Lisp_(programming_language)

    DJ

    Hi_Spiral.PNG
    300 x 300 - 5K
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2011-02-16 15:21
    Haven't seen Tcl/Tk mentioned anywhere, or perhaps I missed it. I've written a fair amount of code with it on a Linux based system without much headache but it is available for other platforms.

    Tcl stands for "tool command language" pronounced "tickle"
    Tk stands for "tool kit"
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-02-16 15:22
    davejames wrote: »
    Spi - don't write off C++ to quickly...see attached.

    I whipped it up in just a couple minutes (took longer to start MS C++ 2005).

    And see this link for a description of LISP (LISt Processing):

    http://en.wikipedia.org/wiki/Lisp_(programming_language)

    DJ

    HAHAHA! That's awesome! Thanks man.... very cool.
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-02-16 17:12
    If anyone is interested:

    I have Python 2.5 and 2.7 installed. I don't really know what the difference is. Probably no difference as far as I'm concerned.

    At the moment I'm looking for a C++ compiler, editor and debugger package to try. I can download Microsoft's, but I'm looking for an alternative at the moment.

    I'll see about a Perl compiler / etc. too

    I've never heard of Tcl/Tk. I looked at the Wiki description. I'll need to read a bit more though.
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2011-02-16 17:13
    I found Visual C++ almost a different language from C. There is no real advantage to it really, the only way you can get native compiled code is with a console application. If you want Winforms, it is automatically dotnet.

    While Winforms are built on the .Net framework, you can still create native compiled GUI apps in Visual Studio.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-02-16 17:20
    Perl uses the same Tk GUI driver that Tcl uses. I think you'll have more options programming in Perl than in Tcl. For one, there's the huge CPAN code repository. Then there's the very active Perl Monks forum.

    -Phil
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-02-16 17:22
    C++ is C++ right? So if I write a program under windows, to make it work on Linux or anything else, I just compile it for that machine right?

    Does that hold true for Visual C++ too as long as I use "Native compiled GUI"? (Thank you Kevin Wood)

    Therefore, that means C++ can be used on any computer under any operating system, you just need the correct compiler right?
  • FranklinFranklin Posts: 4,747
    edited 2011-02-16 17:27
    Spiral_72 wrote:
    Therefore, that means C++ can be used on any computer under any operating system, you just need the correct compiler right?
    That's the theory but it seldom works in reality. Most compilers come with extra libraries that do the small and difficult stuff for you and these are not the same. If you wrote ONLY in the C++ code with no calls to libraries or functions it might work but never count on it.
  • schillschill Posts: 741
    edited 2011-02-16 17:43
    Spiral_72 wrote: »
    C++ is C++ right? So if I write a program under windows, to make it work on Linux or anything else, I just compile it for that machine right?

    Does that hold true for Visual C++ too as long as I use "Native compiled GUI"? (Thank you Kevin Wood)

    Therefore, that means C++ can be used on any computer under any operating system, you just need the correct compiler right?

    Things like UI libraries may be OS-specific.

    For the little bit of work I've been doing with Python (slowly finding time to learn it), I've been using 3.x. Is there much of a reason to stick with 2.x other than compatibility with more code (there are some "significant" differences between the two that require code modifications but I haven't had much trouble adapting)?
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-02-16 17:44
    I'm currently getting GCC from GNU, and the Eclipse and NetBeans IDE.

    I'll see about MS C++ now.... there's something they call 2010 Express. It looks like it's free to the individual with a (Free?) registration required after 30 days.

    Looking for a Perl compiler.
  • FranklinFranklin Posts: 4,747
    edited 2011-02-16 17:57
    I like ActiveState perl.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-02-16 19:14
    I'll second ActivePerl. It's what I use. Now, a word or two about Perl's OS cross-compatibility:

    1. Any Perl program that uses serial I/O and/or sound will have to be tweaked a little for each OS.

    2. Although the Tk GUI stuff runs without issue on Windows, OS/X, and Linux, it has not been ported to native OS/X, and needs to run under OS/X's X11 subsystem.

    -Phil
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2011-02-16 21:12
    Python 2.7 will have backported features from Python 3 that Python 2.5 won't have. Both Python & Tcl have an interactive shell, which Perl effectively lacks. All of the ActiveState language binaries are nice (Perl, Python, Tcl), and all have decent package managers pointing to their repos.

    Another Perl distro out there that I've been using, and have been preferring over ActivePerl is Strawberry Perl. A nice thing about it is that you can get it in .zip & portable forms, which you can run without installing anything. It also integrates very well with CPAN.

    As for C/C++, you can use the free version of Visual C++ Express, but it requires some work to get it set up for native development - you need to install the libraries, which can be gotten from the MS site, although that may have changed since I've last used the Express version. An fyi for anybody thinking of purchasing Visual Studio - the free versions, or Eclipse, Netbeans, etc., qualify you for upgrade pricing.
  • SRLMSRLM Posts: 5,045
    edited 2011-02-16 21:58
    I'd recommend doing the GUI in Python with the wxPython library for the GUI stuff and wxGlade as the GUI builder. I found it rather easy to do pretty much everything that I had to do, and easy to integrate the generated code from the GUI builder into my program. I have attached a program that I wrote in a couple solid days of programming. I don't know if it will run or not on your system (there are some PostgreSQL database stuff in there that might cause a hangup), but the library is cross platform.

    I've also done a similar GUI application in Java, way back in high school. It was easy enough to hand code all the GUI stuff, and Java is also cross platform.

    Finally, if you want C++ and open source GUIs you could use wxWidgets. I haven't tried that combination though. Also, I have had a hard time getting serial port code (although that is probably a lack of my own knowledge...).
  • siljamickesiljamicke Posts: 66
    edited 2011-02-17 05:58
    regarding MS 2010 editions, I installed visual c# 2010, and it increased my boot times to several minutes (netbook, sure, but before that it booted in a third of the time my desktop machine did...). I simply had to uninstall it. Go for previous versions, they are still available for free. I like visual c#, but with that said,i have no idea how easy it would be to access the serial port... You'll whip up a fancy gui in five minutes though.
    I found it easy to learn c# by reading a good java tutorial. O' Reilly books have yet to learn me anything. It goes straight from explaining basic stuff like how to open and close project files with the mouse, to esoteric stuff like delegates without the intermediate steps...
  • ctwardellctwardell Posts: 1,716
    edited 2011-02-17 07:19
    siljamicke wrote: »
    I found it easy to learn c# by reading a good java tutorial.

    True that. If you ever wondered where Microsoft got the idea for C#, or the whole .Net platform in general, look no further than Java. That said, I do like the .Net platform, and I guess instead of beating on MS for being so unoriginal, I'll just say 'Imitation is the sincerest form of flattery"...

    BTW, I've been working on throwing together some test hardware and hopefully I'll be able to post some more detail this weekend. The bad news, sort of, is that I don't have a BS2 or a Ping module, so my hardware will be using a Basic Atom and an SRF04. It should be fairly easy for someone to convert my sample though, and ideally it will look the same from the serial port interface point of view.

    C.W.
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2011-02-17 08:00
    Accessing the serial port from c# is quite easy, just remember to set everything up correctly, as the default constructor does not set up correctly for full eight bit communication. I stick with compiling for dotnet 2.0, which is a 20mb install, versus 200 for 3.5 and beyond.

    http://en.wikipedia.org/wiki/Cross-platform - “Write Once, Debug Everywhere"
Sign In or Register to comment.