Shop OBEX P1 Docs P2 Docs Learn Events
New VB Development System for Propeller — Parallax Forums

New VB Development System for Propeller

PraxisPraxis Posts: 333
edited 2008-07-11 20:38 in Propeller 1
As a part time project I have been developeming a VB development platform for the Propeller.

This platform is based upon the Visual Studio 2008 IDE Shell.

All the usual VS2008 IDE features such as Object Browser, intellisense, code snippet, as you type syntax check etc will be supported along with an inbuilt Terminal Window.

Also supported is conditional compilation using #IF #ELSE #ENDIF etc.

Indentation is no longer required i.e. END IF, END CASE etc

DO LOOP instead of REPEAT.

This project will completed in phases:

1. VB to Spin translator.
2. VB to ByteCode compiler.
3. VB to Assembly with Large Memory Model.

The "In House" working title for this project is PropStudio, this is our internal name only and will not be the "release" name.

Progress to date (phase 1): Code parser completed but being revisited, code generator is work progress.

Still debating the merits of a FOR NEXT loop and Data Structures.

Any feedback or suggestion are welcome.

Included are a few screen shots.

Cheers

Post Edited (Praxis) : 7/11/2008 4:19:29 PM GMT
1280 x 771 - 85K
1280 x 771 - 90K

Comments

  • jazzedjazzed Posts: 11,803
    edited 2008-07-11 15:20
    Excellent [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • TimmooreTimmoore Posts: 1,031
    edited 2008-07-11 16:13
    I dont know whether you are using the visual studio preprocessor or your own, if you are using the visual stufio one then 2 comments from using the visual studio preprocessor with spin.
    1. Watch out for "var //= 2" type statements, the preprocessor if not careful with remove from //= 2 since this is a c/c++ comment
    2. Watch out for #0 type statements in enums, the preprocesor will remove them as anything starting # is preprocessor stuff
  • hippyhippy Posts: 1,981
    edited 2008-07-11 16:35
    This platform is based upon the Visual Studio 2008 IDE Shell.

    Does that mean one has to have VS2008 to use it, or is this a standalone application ?

    Looks good so keep up the good work.

    I think you'll have to include FOR-NEXT because that's what "VB" programmers will be expecting. Shouldn't be that hard I'd have thought, "FOR a = b TO c { STEP d }" maps to "REPEAT a FROM b TO c { STEP d }".

    I'd include WHILE-WEND as well if not already supported. Likewise being able to specify numbers in both Spin and VB styles, $123, &h123 and I'd also allow 0x123 etc.

    Another "gotcha" to watch out for is where logical NOT sits in the precedence order. It's not where other languages have it.

    One thing I pondered over was how to handle pointers, ByVal or ByRef, or allow both ...

    VAR
      long myVar[noparse][[/noparse] 100 ]
    PUB Main
      Increment( @ myVar )
    PRI Increment( ptrToLong )
      long[noparse][[/noparse] ptrToLong ]++
    
    --- VB ---
    
    Sub Increment( ByVal ptrToLong As Long )
      long[noparse][[/noparse] ptrToLong ]++ 
    
    Sub Increment( ByRef ptrToLong As Long )
      ptrToLong++ 
    
    
    
  • AleAle Posts: 2,363
    edited 2008-07-11 16:44
    Not to rain on your parade... but how about something portable ?, btw : I hate VB.

    OTOH: There are few tools out there, that all are welcome !. Great work !
  • PraxisPraxis Posts: 333
    edited 2008-07-11 17:39
    hippy said...

    Does that mean one has to have VS2008 to use it, or is this a standalone application ?

    Hi hippy this is a standalone application.

    Your point about FOR:NEXT is why I keep coming back to it, WHILE:WEND I had not considered.
    For $123 is the format and as I like the 0x123 format myself I will include it in.

    ByRef or ByVal, that is the subject of some debate here.

    @Ale, you hate VB, OMG...... just for that I will port the C# version of this project over to VB.NET, poetic justice.
    Just kidding[noparse]:)[/noparse]

    Thanks for the input guys.
  • StefanL38StefanL38 Posts: 2,292
    edited 2008-07-11 18:25
    hello Praxis,

    indention is no longer required. In my Opinion this is a great step - BACK !

    The propIDE forces everybody to indent their code. So a minimum of formatting standard is there for every single *.SPIN-File
    regardless of who wrote it.

    Without indention it offers the possability of writing confusing formatted code
    and who wants to type more characters than nescsessary ?

    The coding is so efficient i would like to have all programming languages this way.

    What could be improved about the PropIDE are searchfuntcions

    best regards

    Stefan
  • PraxisPraxis Posts: 333
    edited 2008-07-11 18:50
    StefanL38 said...

    The propIDE forces everybody to indent their code. So a minimum of formatting standard is there for every single *.SPIN-File regardless of who wrote it.

    Hi StefanL38,

    I agree and disagree, let me explain that;

    Yes I agree that code should be indented to improve readability however I disagree with the idea that code has to rely on indentation for correct function, 1 space plus or minus can cause some headaches. Anyone miss braces??

    Now with this development platform to indent or not to indent is up to the user and will not cause programming errors with wrong indentation.

    Cheers
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-07-11 19:59
    Praxis said...
    Anyone miss braces??
    Oh heavens no! Nor do I miss WEND, ENDIF, or NEXT. Most of my PC programming is done in Perl, which is quite — um — "bracing". For me, Spin's syntax is a breath of fresh air by comparison: compact, intuitive, and easy on the eye without any excess wordiness or syntactical fol de rol. Good programmers will always indent to make their code more readable, so why not make it part of the syntax and save some terminators and vertical screen space in the process? (I suppose this means I should switch to Python for my PC stuff, doesn't it? smile.gif )

    Nonetheless, some of the wisest words I ever heard came from a Norwegian salmon fisherman: "Taste and comfort cannot be discussed." Language syntax is as much a matter of taste as anything. I'm sure you'll find a good supply of like-minded users who share your syntactical comfort zone.

    -Phil

    Addendum: There are some areas where Spin can be awkward, though. To alleviate a couple of these, you might consider including inline array constructors and shorthand pointer dereferencing:

    ptr := @words(37, b * 5, string("abc")) 'Assign the address of an inline array to ptr.
    
    ltr_b := ptr:[noparse][[/noparse]2].[noparse][[/noparse]1] 'Letter "b" is ptr, word 2, byte 1.
    
    
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Still some PropSTICK Kit bare PCBs left!

    Post Edited (Phil Pilgrim (PhiPi)) : 7/11/2008 8:18:49 PM GMT
  • PraxisPraxis Posts: 333
    edited 2008-07-11 20:18
    Hi Phil.

    Yes I agree it's a case of whatever floats your boat and personaly I am noplussed either way.

    I like SPIN but it does have a learning curve and I notice that even "seasoned" spin coders post the ocasional "I didn't know that etc" comment.

    In another current thread about marketing, Ken Gracey indicates that 66% or propeller users are hobbyists and educational users.

    Now I am willing to bet of that 66% more than some have some hands on with basic or are likely users of a basic development language that would have a lower learning curve than spin.

    My idea is "do you spend all your time learing the tools or using the tools".

    Anyway with the VS2008 IDE platform, it is realy easy to "plug in" another language, python anyone?

    Cheers

    Post Edited (Praxis) : 7/11/2008 8:25:59 PM GMT
  • jazzedjazzed Posts: 11,803
    edited 2008-07-11 20:28
    You have the beginnings of a nice VB comfort zone product for people who use VB.
    I hope you can finish it so that people who want to use VB syntax can use it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • PraxisPraxis Posts: 333
    edited 2008-07-11 20:38
    Hi jazzed,

    As I indicated this is a part time "fun" project for me but I am thinking about kicking it over to one of my staff to put some full time effort into it.
Sign In or Register to comment.