Procedural Programming Software for Mac

Discussion in 'Mac Programming' started by jamesadrian, Jan 15, 2011.

  1. jamesadrian macrumors member

    Joined:
    Aug 18, 2010
    Location:
    Rochester, NY 14626
    #1
    I would like to start programming again. I have an iMac. I prefer a procedural programming language. I don't like object-oriented programming at all. A couple of years ago, I found it difficult to find a compiler or interpreter for Mac that wasn't either object oriented or huge and expensive. My experience is with Basic and Fortran, but that was 30 years ago. I don't want to write a 5000 page declaration at the top of every small program.

    I need something that will run an a Mac and can be exported to a PC and to Linux, if that is possible. I want to encode an encryption algorithm, so logical operations and arithmetic are important.

    I have a lot of experience with assembly language and machine code for special-purpose microprocessors.

    Can anybody recommend something that won't completely exhaust my patience or take me until I am 70 to learn?

    Thank you for your help.

    Jim Adrian

    jamesadrian@globalfreeenterprise.com
     
  2. subsonix macrumors 68040

    Joined:
    Feb 2, 2008
    #2
    I would go for C, it's pretty much ubiquitous and you can use the GCC compiler that comes on the install disk as part of the Dev tools, or download it separately if you want. Clang is another option that I think is also installed with the dev tools.
     
  3. ssmed macrumors 6502

    ssmed

    Joined:
    Sep 28, 2009
    Location:
    UK
    #3
    Your message may encourage spam

    I would edit your message to remove your email as this could be easily harvested and encourage increased spam to your address.
     
  4. jared_kipe macrumors 68030

    jared_kipe

    Joined:
    Dec 8, 2003
    Location:
    Seattle
    #4
    This is such a weird post. Almost seems like a trolling post.

    You have a lot of experience in assembly code but "a few years ago" you couldn't figure out Xcode and C??
     
  5. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #5
    I know plenty of smart old dogs that have a hard time learning new tricks. The transition to an IDE like Xcode for someone not used to it can be daunting.

    Anyhow, I was helping another used install fortran in another thread. The compiler used for fortran (gcc) also supports plain old C and is portable as mentioned above. http://forums.macrumors.com/showthread.php?t=1079902

    B
     
  6. jamesadrian thread starter macrumors member

    Joined:
    Aug 18, 2010
    Location:
    Rochester, NY 14626
    #6
    Thank you for this defense. You hit the nail on the head.

    Thank you all for your recommendations.

    Jim Adrian
     
  7. mox- macrumors newbie

    Joined:
    Oct 18, 2010
    #7
    Perl is the solution for you

    Good thing is that you will find it already installed on most of the Linux and Unix distributions including Mac OS X.
    ActiveState have a perl package for Windows PC called ActivePerl (search it on google)
     
  8. jiminaus, Jan 15, 2011
    Last edited: Jan 15, 2011

    jiminaus macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #8
    There is Chipmunk Basic available for Mac, Linux and Window from http://www.nicholson.com/rhn/basic. I've not used myself, so I can't speak of it.

    OK, I just checked it out. I don't recommend this.

    It was interesting to experience though. This is an "evolution" of Apple's Macintosh Basic. I used to be so jealous of this basic when I was stuck on my Commodore 64. Oh how times (and myself) have changed.
     
  9. jamesadrian thread starter macrumors member

    Joined:
    Aug 18, 2010
    Location:
    Rochester, NY 14626
    #9
    Now that I understand how difficult it is to install and use any interpreter or compiler and how terrible the instruction for these things are, I am looking for a company that will send me a complete and self-contained disk my mail and provide tech support by telephone for a price. I am not interested in reading twenty links and getting it wrong forty times and coming up with nothing.

    Are there still such companies for any language?

    Jim Adrian
     
  10. PoetCSW macrumors newbie

    Joined:
    Oct 26, 2009
    Location:
    Pittsburgh
    #10
    There are a few compilers, but the market for Mac OS X tools is unlike the Windows market. You won't find dozens of commercial compilers for the OS X, only a handful of expensive compilers like Absoft's Fortran.

    Jobs and Company have done all they can to limit the tool choices to Apple's Objective-C and a handful of scripting languages shipped with OS X. You could use AppleScript in a procedural manner and certainly Perl.

    Honestly, I do miss the variety of coding options available to Windows devs. Even Microsoft offers a range of languages, though C# dominates.

    Jobs is quoted as saying allowing Think Pascal and CodeWarrior to flourish under the old Mac OS was a mistake. He claims that third-party compilers somehow helped create bad software.

    You can use C, of course, since Objective-C merely uses a standard C compiler.

    FutureBASIC is still available, for feee, and it generates C code that is then compiled. Not an ideal solution, but it is one.
     
  11. subsonix macrumors 68040

    Joined:
    Feb 2, 2008
    #11
    Are you suggesting Applescript to create an encryption algorithm? Crazy. On any mac out of the box you have, Python, Perl, Ruby, Tcl, C, C++, Obj-c, Java, bash, and Applescript.

    James, if you have no realtime or special performance considerations you could do this in a scripting language as well. If you want to go with C, the easiest is just to install the developer tools included on the OS X install cd. It's literally a one click install.
     
  12. gnasher729 macrumors P6

    gnasher729

    Joined:
    Nov 25, 2005
    #12
    Where did you find that quote?
     
  13. balamw, Jan 16, 2011
    Last edited: Jan 16, 2011

    balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #13
    For technical programming IMHO it's very hard to beat MATLAB from the MathWorks. It comes in Mac/Windows/Linux versions and in an interpreted language similar in many ways to fortran. It's expensive though at around $2,000 per license and won't give you self-contained executable code without the optional compiler. ~$5K IIRC.

    For that you get the documentation, hand-holding and tech support you are looking for.

    I honestly don't get that. Since Mac OS is unix and gcc is available any language gcc supports is available on the Mac. C, C++, Objective C, pascal, fortran, ... Unlike MS, Apple supplies everything you need to write code with every Mac, and AppleScript is better integrated into the OS and Apps than scripting is in Windows.


    B
     
  14. ortuno2k macrumors 6502a

    Joined:
    Nov 4, 2005
    Location:
    Hollywood, FL
    #14
    Python is compatible with multiple platforms, and it' pretty easy to write code in.
     
  15. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #15
    If you aren't prepared to read the instructions to get a compiler / interpreter working then how do you think you will cope with learning to program and learning to use the plethora of libraries available for whichever language you choose (which are invariably poorly documented)?
     
  16. talmy macrumors 601

    talmy

    Joined:
    Oct 26, 2009
    Location:
    Oregon
    #16
    I had an old Fortran program I needed to compile. I downloaded g77 and had the program running. Maybe took me 15-20 minutes. That and all the programming resources preinstalled and in Xcode, what more do you need. All free.
     
  17. jamesadrian thread starter macrumors member

    Joined:
    Aug 18, 2010
    Location:
    Rochester, NY 14626
    #17
    On a recommendation, I spent three days trying to get Python to run on my iMac. By chance, I ran into somebody who pointed out something not said in the instructions. Too much was assumed. It may be fine for people who have not been away from programming for a while. But it is not fine for me. I am not lazy and I am not stupid.

    Is there any company that will sell a compiler in disk form and sell technical support?

    Jim Adrian
     
  18. jamesadrian thread starter macrumors member

    Joined:
    Aug 18, 2010
    Location:
    Rochester, NY 14626
    #18
    I want to thank PoetCSW and the others who have made suggestions. I will try most of them.

    Thank you for your help.

    Jim Adrian
     
  19. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #19
    Did you catch my MATLAB recommendation?

    http://www.mathworks.com/

    For other less specialized products it is very hard to compete with free. Even Microsoft has their free Visual Studio Express editions.

    B
     
  20. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #20
    Intel sell a commercially supported C/C++ compiler and a Fortran compiler for the Mac that integrates with Xcode nicely. They are pretty pricey though.

    $599 for http://software.intel.com/en-us/articles/intel-composer-xe/
     
  21. subsonix macrumors 68040

    Joined:
    Feb 2, 2008
    #21
    James, Python is pre-installed on all macs. You dont need to do anything.
     
  22. nick9191 macrumors 68040

    Joined:
    Feb 17, 2008
    Location:
    Britain
    #22
    C would seem a good choice. Procedural, and as mentioned it's pretty much ubiquitous.

    It also has one of the best books. The original edition of that book is over 30 years old, but it's never been more relevant. It's the Tolstoy of programming books.
     
  23. Flynnstone macrumors 65816

    Flynnstone

    Joined:
    Feb 25, 2003
    Location:
    Cold beer land
    #23
    I'll throw RealBasic into the mix.
    Pretty straightforward to install & use. It is OOPs though. But it is also crossplatform.
    Is an GUI style application the end result or crunching numbers (File in -> file out)?
     
  24. jared_kipe macrumors 68030

    jared_kipe

    Joined:
    Dec 8, 2003
    Location:
    Seattle
    #24
    Yeah, no kidding. This is what I was talking about when I said this seemed like a troll post.

    Open Terminal. Type:
    nano hello.py

    Inside nano Type:
    print "Hello, World"

    Press ctrl+o and then return, press ctrl+x

    Type:
    python hello.py

    Bask in your glorious python script.
     
  25. jamesadrian thread starter macrumors member

    Joined:
    Aug 18, 2010
    Location:
    Rochester, NY 14626
    #25
    I selected PureBasic from

    http://purebasic.com/index.php

    The cost was $106.05 (79 EUR)

    It downloaded and installed like a Mac application without any reference to the terminal or anything else that they didn't say themselves.

    It did require Xcode, which took 4 1/2 hours to download, but there was no configuration work or unexplained complications.

    Many of the other software sources assumed a lot about what I must know if I am interested at all in their product. If I were selling something, I would assume that the customer knows what I have told the customer and possibly something else also. I would not count on the something else for my sale.

    I now know that nano is an editor in the terminal and a I know few other things I didn't know when I asked my question.

    Thank you for all of your help and advice.

    Jim Adrian
     

Share This Page