Shop OBEX P1 Docs P2 Docs Learn Events
Why is the Propeller not programmed in BASIC? — Parallax Forums

Why is the Propeller not programmed in BASIC?

dazed&confuseddazed&confused Posts: 20
edited 2008-09-06 18:33 in Propeller 1
· How many BS1, BS2, & BSxxx stamp$' ·do you think Parallax would have sold if they were in Spin,or ASM;· I think not to many?????;The reason I liked the BS(xxx) is it's in PBasic$;·The lack of a good compiler in (PBasic$) will lead to·the Propeller's· lack of sales,$$$$; This will lead Parallax to change the Prop. once again.....If Parallax doesn't come out w/ a Basic$ compiler,I forsee the end of the Propeller skull.gifskull.gifskull.gifskull.gifskull.gifskull.gifskull.gifskull.gifskull.gifskull.gifskull.gifskull.gifskull.gif _%WMc$_!!!!!!!!!!!!!!!!!!!!

<subject line added by moderator>

Post Edited By Moderator (Paul Baker (Parallax)) : 9/6/2008 5:19:16 AM GMT

Comments

  • WhitWhit Posts: 4,191
    edited 2008-09-06 02:44
    The Prop is so powerful that it is worth learning at least Spin. It is also very inexpensive. Get a Propeller Proto Board and OBC Introdution to the Prop Protoboard. Better yet, get the Propeller Education Kit and start going through the Education Labs Give it an honest try and I think you will like it.

    I know I do.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+


    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
  • BTXBTX Posts: 674
    edited 2008-09-06 03:03
    dazed&confused

    I can't understand one thing, if you are able to program BS's in Pbasic.
    Why do you see the Spin language as a problem ?
    You can do amazing and powerfull things with propeller programming in Spin, with only a few hours reading the manual.
    If we suppose that you only knows about Pbasic programming, also, Spin is quiet easy to learn.

    My oppinion, about the Pbasic and Spin difference, is only more or less 120 minutes reading.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Regards.

    Alberto.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-09-06 03:25
    PBasic is not a good match to the Propeller. It has no subroutine/function calls (a GOSUB doesn't count). There are a lot of additional features it would need (like another number size and floating point constant expression support). It would need a number of new operators. Many of the specialized I/O statements would be a waste of memory unless they were actually needed in a specific program. There's not enough ROM to put them there which is where they'd need to be if they were included in every program. With subroutine / function calls, you'd need at least the limited scoping present in Spin.

    What I'm trying to say is that Parallax could have done a Basic for the Propeller, but it would require a complete redesign of the PBasic language as well as the required new compiler/assembler. There may eventually be a PBasic for the Propeller, probably done by a 3rd party, but it will either be done strictly for compatibility purposes and not appropriate for general Propeller programming or it will look very different from Stamp PBasic and minimally compatible with it.

    By the way, you need to add a subject to your thread. Use the pencil icon in the upper right corner of the first message in the thread.

    Post Edited (Mike Green) : 9/6/2008 3:50:19 AM GMT
  • ElectricAyeElectricAye Posts: 4,561
    edited 2008-09-06 05:04
    Cheer up, dazed,
    if you can work with the Basic Stamp, the obvious next step in your earthly evolution is to start work on the Propeller. Just settle down, take some deep breaths and be patient with yourself. Granted, approaching the Propeller isn't like starting out with the Basic Stamp. The documentation is scant, scattered, and not always correct. This Forum is probably the best tutor you could ask for, but it's not perfect, either. In any case, you need to take your time and not allow your frustrations to boil over into your family life. Don't kick the dog just because the Object Exchange has next to no comments accompanying the files. Trust me, if I can hack my way through the Object Exchange, anyone can.

    Best of luck,
    Mark

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    It might be the Information Age but the Eon of Ignorance has yet to end.
  • waltcwaltc Posts: 158
    edited 2008-09-06 05:31
    Dazed and Confused

    Here's my take, Parallax should have released a robust BASIC compiler for Prop when it was released not a one of a kind proprietary interpretive language tied to the chip. It would have made the chip more accessible.

    And a full blown BASIC isn't much harder to learn than Pbasic.

    As far as Pbasic on the Prop goes, Mike Green's comments say it all.

    And Spin? its here to stay and looks to be the defacto language for the Prop I and II. And if you want to program the Prop and have access to the code library that makes the Prop useful instead of a oddity - learn it.

    Otherwise if you want stay with BASIC or even Pbasic then check out the offerings for ARM or AVR chips.

    BTW I'm no fan of Spin but its the only game in town if you want to be productive on the Prop.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-09-06 06:00
    Hi dazed,·

    The creation of Spin and the Propeller·was an organic process, the chip molded the language and the language molded the chip in an iterative process. This winds up generating a unique language, and by taking this approach Chip wasn't wedged into designing the Propeller towards a completely defined goal. If you are always contorting towards an immovable goal rather than thinking whats the best way of doing something for this design, the chip suffers.

    BASIC is too high level language for the Propeller because·the amount of code necessary to run PBASIC would not fit into a single cog.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.

    Post Edited (Paul Baker (Parallax)) : 9/6/2008 6:28:00 AM GMT
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-09-06 06:23
    Spin is the native language of the Propeller, just as Italian is the native language of Rome. As Paul points out, Spin co-evolved with its hardware, much as a natural language co-evolves with its cultural milieu. You should not expect the Propeller to be naturally fluent in BASIC — just because that's the language you're comfortable with — any more than you, as an American tourist, would expect the average Roman to understand English. Think of learning Spin to program the Propeller — like learning Italian before a trip to Rome — as an opportunity to broaden your horizons. You'll be a better and more flexible programmer as a result. And, besides, it takes months for a native English speaker to learn Italian, and years to master it. It's a whole lot quicker to become conversant in Spin!

    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Still some PropSTICK Kit bare PCBs left!
  • potatoheadpotatohead Posts: 10,261
    edited 2008-09-06 18:04
    I'll second this.

    Plus, SPIN is pretty fast. On average, it's roughly equal to assembly language on older 8 bit micros, running at 1-2 MHZ. That's pretty damn sweet for a lot of things.

    I'm not a professional programmer by any means. Have worked in a number of languages and on a number of CPU platforms. (C, Pascal, BASIC, PERL, VB) (6809, 6502, x86)

    It didn't take but a coupla hours to start doing stuff in SPIN, and the assembly language environment is just sweet, for the most part.

    The two together is extremely versatile, robust and potent.

    On the Propeller, you've got a lot of options as to how you want to do things. Perhaps that's some of the initial problem? It kind of was for me early on.

    Don't know if you've worked with other languages or CPU's, but you really should. Once you see some success in one, the rest start to come easy. What happens is that you differentiate computing in the abstract from the specific elements required to accomplish it in whatever dialect and CPU you happen to be working with.

    Getting there is one of the bigger humps, but once there, it enables tinkering, playing, and just doing at a level that's fun and rewarding no matter what your experience and skill level happen to be.

    Looking back at when I first purchased one of these things, it really was a lark. I like smaller scale computing as a hobby and to get the occasional "real" thing done. The propeller seemed interesting, but it was very foreign.

    That's where the magic is! Seriously.

    If something like a cumbersome (and a BASIC like you are thinking of is cumbersome by comparison to the SPIN / PASM environment) BASIC had been the target, what would have happened is that I would have had some easier success early on. The same would have applied to C too, BTW. However, I then would have ended up hacking and compensating for that later on, and that's what a lot of people have trouble seeing about this chip.

    Go and get oldbitcollectors book, do the Education Labs (and those are just great fun and very educational), work through some stuff you find here, on the wiki and the object exchange.

    Won't take but a coupla days before you grok SPIN, and once you do, you will find it fast, easy and very, very flexible and potent.

    Parallax did the right thing with SPIN. To many, it just won't look that way at first, and there are some oddities that appear to be significantly refined with Prop V2. But, the overall package is well engineered and capable. It wouldn't have been as capable otherwise, IMHO.

    Truth is, this CPU is unique. That means the environment for it is going to be unique. That's why it does what it does.

    Get your favorite munchies, cup 'o Joe, shake it all off and just play for a bit. You will find that time worth it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!

    Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
  • MovieMakerMovieMaker Posts: 502
    edited 2008-09-06 18:33
    Maybe I am missisng something. But, my propeller runs Boebotbasic, femtobasic, and donglebasic. I have yet to master the BS2 part of it. But, it has many of the functions and it is made for the propeller.

    Don't give up. I have been hanging in there for about a month. I have really been a pest, but the guys have got me through all but my last hurdle. And I just only this morning asked the question.

    It is slowly, very slowly seeping into my brain. But, when I learn something it is a very nice pleasure.

    God Bless!
Sign In or Register to comment.