Shop OBEX P1 Docs P2 Docs Learn Events
PropBasic users - PropBasic vs Spin? — Parallax Forums

PropBasic users - PropBasic vs Spin?

Q*bertQ*bert Posts: 59
edited 2010-05-20 15:56 in Propeller 1
So now that PropBasic has been out a while and its capabilities have been expanding, I'd like to know how some experienced PropBasic users feel about the compiler vs Spin.

My quickie take is:

- PropBasic has the advantage of being fast.

- Spin has the advantages of size and the OBEX.


Are there any other significant advantages one has over the other?

Is there anything you can do in Spin that you can't do in PropBasic (or vice versa.)

Comments

  • VonSzarvasVonSzarvas Posts: 3,523
    edited 2010-05-19 19:54
    In case you didn't see it... I asked something similar a while ago and received some useful replies:
    http://forums.parallax.com/forums/default.aspx?f=25&m=434987
  • RsadeikaRsadeika Posts: 3,837
    edited 2010-05-19 20:15
    I was waiting for PropBASIC to settle, but Bean unsettled everything with .97 LOL. I am still not sure about which is better SPIN or PropBASIC, each one has some advantages, but I am not ready to make a determination; I still have C in the back of my mind, as a possible choice. But, I must say the Obex is a real advantage, with all of the objects that are available.

    Ray
  • Q*bertQ*bert Posts: 59
    edited 2010-05-19 20:27
    Maxwin said...
    In case you didn't see it... I asked something similar a while ago and received some useful replies:
    http://forums.parallax.com/forums/default.aspx?f=25&m=434987

    Thanks for the link. As often as I check this board, I can't believe I missed that one!

    So it seems that I just asked almost exactly the same thing as Maxwin. Sorry... redface.gif
  • train nuttrain nut Posts: 70
    edited 2010-05-19 20:41
    Hi Guys

    I working on a rather large program that has quite a few subs.· What I found to be a drawback of Propbasic is that it is compiled to run in one cog.· therefore code space very quickly becomes a problem for large programs.· I tried and found I had to make most of my subs into tasks.· I have programmed for the BS2P40 and the Basic is nice.

    I personaly am sticking with spin as my choice of language.· The Obex is a blessing for us not to hot assembly programers.

    Ben
  • BeanBean Posts: 8,129
    edited 2010-05-19 20:45
    Ben,
    Use LMM mode. "PROGRAM Start LMM".

    Bean

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Use BASIC on the Propeller with the speed of assembly language.
    PropBASIC thread http://forums.parallax.com/showthread.php?p=867134

    March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    There are two rules in life:
    · 1) Never divulge all information
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    If you choose not to decide, you still have made a choice. [noparse][[/noparse]RUSH - Freewill]
  • JonnyMacJonnyMac Posts: 9,208
    edited 2010-05-19 21:48
    ObEx is a nice advantage to using Spin. That said, ObEx is like an all-you-can-eat buffet: lots of good stuff, lots of garbage, too. Since there is no "master programmer" vetting anything posted in ObEx beginners should be very careful; don't be lulled into thinking that just because something is in ObEx that it is quality code. With PropBASIC, you're pretty much forced to write everything yourself so there is that advantage of knowing exactly what's going with your program.

    At some point, perhaps, there will be an exchange area for PropBASIC libraries. That said, it will bring the same problems as ObEx: convenience at the risk of bad code.

    In then, PropBASIC, Spin, and PASM are tools -- learn what you can to give yourself as much flexibility as possible.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon McPhalen
    Hollywood, CA

    Post Edited (JonnyMac) : 5/19/2010 10:44:46 PM GMT
  • Tony B.Tony B. Posts: 356
    edited 2010-05-19 22:01
    Q*bert,

    I am very thankful to have PropBASIC! Having started in PBasic the move to Spin was a struggle for me. PropBASIC has allowed me to work in a familiar language and enabled me to move forward in my robotic pursuits by being able to switch to the Propeller chip. Also, Bean, Brad(BST IDE) and others have been available and more than willing to help. I think you should take a good look at PropBASIC

    Here is links to two of my robots http://forums.parallax.com/showthread.php?p=876789 and http://forums.parallax.com/showthread.php?p=894042

    Just to give context to my statements, I am not a professional programmer or engineer and would consider myself an advanced beginner with programming the Propeller chip. Also, I still study and continue to learn and stay familiar with Spin because it is Parallax's language and many resources are written in it.

    Tony
  • RsadeikaRsadeika Posts: 3,837
    edited 2010-05-19 22:36
    Not to change this thread to an Obex thread, I noticed that some of the objects have a five star rating. So, who is doing the rating?

    Ray
  • train nuttrain nut Posts: 70
    edited 2010-05-20 13:36
    Bean

    I have read about LMM however, has any speed comparisons been made between LMM Probasic and Spin?· I know that in LMM the cog has to wait for its turn in hub ram.· Another thing·any of the examples for tasks in the documentation have been for tasks written in Propbasic.· How do you call a Assembly routine as a task?· Probably obvious but now obvious to me.

    Thanks for the reply

    Ben
  • BradCBradC Posts: 2,601
    edited 2010-05-20 14:40
    train nut said...
    I know that in LMM the cog has to wait for its turn in hub ram.

    So does SPIN.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Are you suggesting coconuts migrate?"
  • JonnyMacJonnyMac Posts: 9,208
    edited 2010-05-20 15:56
    On the original topic... here's an advantage of PropBASIC versus Spin: experimenting with PASM code for inclusion in a high-level program. In PropBASIC I can define a subroutine and write in in PASM using the ASM..ENDASM block; the rest of the program (reporting, etc.) is high-level and easy. With Spin you to create an interface to a separate cog that also has to launched. For experimenting, this can be tedious. Right now I'm working on a project that will be in Spin, my experiments with the PASM sections I'm using PropBASIC as my tool.

    And, thanks to Brad, I can do the whole works, PropBASIC and Spin, in BST.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon McPhalen
    Hollywood, CA
Sign In or Register to comment.