PDA

View Full Version : First impressions of the Propeller



Tom Bampton
02-01-2007, 03:19 PM
I have a tendency to forget about anything that is not immediately pertinent. This can lead to seemingly simple questions being difficult to answer, the most common with me being "what have you worked on ?" ... hell if I know, all I know is what I'm currently working on, and that's usually heavily NDA'd. Thus, I thought it might be useful to write up my first impressions of the Propeller before they suffer the effects of my selective memory.

Background

For the purposes of perspective, some background is in order. I am a professional programmer by "day" - I work from home, so "day" does not always mean the same as "when the sun is up" - and dabble with electronics as a hobby.

I have been keeping an eye on Parallax since I first stumbled across them a few years ago because I knew that eventually they would release a product that interested me. That happened when the Propeller shipped. I almost wet myself when I first read about it. It seemed like it could be the holy grail that would allow me to create some of my more insane pointless ideas, of which I have many. Of course, there's no such thing as a holy grail, but there is such a thing as a big time saver ... and that is how I see the Propeller.

In reading this post, it is worth keeping a couple of things in mind: Although I am not one for thinking inside the box (http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=11648), I would be foolish to deny that I have a lot of preconceived notions towards development tools. I intend everything that I say here as constructive criticism, it is not intended to cause offense.

So, without further ado ...

Spin

Let's get the most controversial thing out of the way first. Judging from these forums, Spin is a lot like marmite. You either love it or hate it. Personally, I am hovering somewhere in the middle, perhaps edging towards the hate it camp. As an aside, I love marmite, I wonder if there's any correlation?

I can completely understand and agree with why Spin exists. I believe that it was entirely the right choice to make. However, I don't like the choices you made with the language. Changing operators that are standard across many languages (e.g. <=) work differently fills me with much hate. I realize that a lot of the weirdness with the operators was likely done to simplify writing the parser, but it still annoys me.

The whitespace thing is also irritating. Personally, I prefer to lay out my code however I wish. I do not like it when a language forces me to lay it out in a specific way by making whitespace part of the language. Yes, I know Python does this, and I don't use Python because of it. I realize that your choice in whitespace was more to make it simpler for those that struggle with curly braces, and this is fine. I still don't like it, though http://forums.parallax.com/images/smilies/wink.gif

There is really not much point in arguing about Spin syntax. It's unlikely to change now and at the end of the day it doesn't stop you writing code. I'm sure it's also been discussed to death before.

One thing that I would like, though, is a reference for the byte code. There are two reasons for this. The first, is I could then write my own compiler and have it work the way I prefer. The second is that since the Spin interpreter is already on the chip, it would be useful to be able to use it for other things. I am currently thinking along the lines of a script-ish interpreter, but it could be useful for any number of interesting things.

Parallax Asm

Ah! Now we're talking! I haven't looked all that much at it yet, but from what I've seen it looks well thought out and awesome. I'd prefer it if there was more cog RAM, but 512 words just means I get to be more creative.

I don't really have much to say here. You should take that as a good sign. I am most vocal when I'm annoyed and things I like I say little about.

The Propeller Tool

As the development environment is where you will spend most of your time, it has to feel right. The Propeller tool feels very solid and well tested, and this is a good thing. However, the editor itself feels wrong. It doesn't really matter how good the rest of it is, if the editor doesn't feel right then you've lost me. This is a pet peeve of mine, and I am more then happy to give up syntax highlighting and other nice things for an editor that feels right.

Not constraining the cursor to the text forces me to use the mouse often. I can't stress enough how irritating that is. When I am working, I touch the mouse maybe once or twice an hour. The propeller tool forces me to use the mouse once or twice every few seconds, which slows me down tremendously. There really, really needs to be an option for this.

The behavior of the home key is also a little odd. It has become pretty much standard that the first press of home moves the cursor to the first non-whitespace character on the line (unless it was already there), and the second moves it to the beginning. The prop tool just moves it straight to the beginning.

The behavior of ctrl + arrow is also odd. The cursor never ends up where I expect it to. I find myself frequently pressing ctrl+right arrow, typing something, swearing, hitting undo a few times and then fiddling with the arrow keys til it's where i want it.

Whilst I can see why you use the Parallax font, the inability to change it really irks me. For example, unless I have it set to a huge size, an m looks like an n, and I prefer my code in a smallish font for the largest view of the code possible. An option to change the font would fix all those problems. Yes, I know that then things like circuit diagrams in the spin files would look entirely broken, but my code would look the way I want it to and that is all I care about.

The standard on Windows dialogs is for the affirmative button to be on the left of the cancel button. You have them the other way round, which is the Mac standard. For an application that is not cross platform, I find this incredibly bizarre and mildly irritating.

As far as the non-editor related parts of the prop tool go, I find your UI layout extremely strange. The lack of any project management is also irritating. To be honest, I'm not sure that you could make me happy on that front unless it worked more like a traditional IDE.

That, however, is significant work that I doubt is going to happen any time soon, if ever. I would much prefer the assembler / compiler to be separated into external command line executables first. I have looked at Cliff's (sorry, forgot surname) propasm and I think that's a great start. I have some fairly mental plans in this area and propasm will be an excellent reference when the time comes to implement them.

The Propeller Overall

I really like how quick it was to get something running. I felt like I did when I first learnt to code many years ago. I knew the prop was going to be fun, but I was not expecting that feeling. In a rush of nostalgia, my first thoughts after running the VGA Text demo were how easy it would be to simulate the color clash that the Spectrum was famous for.

None of the issues I have prevent me from doing what I want to do, and overall the Propeller is an awesome MCU. I would like to thank everyone involved with the development of the Propeller for all their hard work bringing it to market. I believe that the future holds many exciting things and the prop is only going to go from strength to strength.

Finally, does anyone know what happened to January ? I seem to have misplaced it.

rokicki
02-01-2007, 03:37 PM
Just some quick responses:

Spin definitely reflects some unusual choices. However the language itself is so very simple that
it is probably fairly easy to write a third-party compiler for it, and change the syntax arbitrarily.
(Whether this is a good idea or not, I will not say.) If you search the forums, there has been a
pretty thorough decoding of the byte codes. What you will find however is that the interpreter
reflects the language strongly. I suspect you might like the "large memory model" threads as a
more natural candidate for a target for something like, say, C.

That said, Spin is pretty cool.

I generally edit my programs in Emacs (even when developing for the Propeller), so just use
whatever editor you want.

I also find no logic in the cursor movement, especially when editing; backspace does strange
things and it's just really tough sometimes to put the cursor where you want. This is another
reason I use emacs. http://forums.parallax.com/images/smilies/smile.gif

But the chip itself is really cool, and I think we have just barely touched the surface of what
is possible with respect to tools, language paradigms, and the like. The greatest thing for me
is how easy it is to integrate other people's code ("objects")---they usually just work, with
no concern for scheduling or interrupts or anything. And so much is provided for you, with
keyboard, mouse, TV, VGA, and all sorts of other examples. You can spend the time doing
your stuff and not decoding keyboard mapping, and that's really nice.

Anyway, welcome, and please keep asking the tough questions and we'll all have fun with this
cool little chip.

Gadgetman
02-01-2007, 03:46 PM
January was cancelled because of lack of interest.

Either that, or someone sneezed to hard...

One good thing about Spin and the syntax rules is that it forces everyone to write the same way.
This means that when you download an object here, you don't have to learn someone else's idiosyncrazies to understand what is happening.
(I must sometimes take over other people's code, and it's a (expletive)... to put it nicely... )

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don't visit my new website...

Max Wooden
02-01-2007, 03:48 PM
Is this the famous http://forums.parallax.com/images/smilies/tongue.gif Tom Bampton from GarageGames forums? Good to see you messing with the prop, I'm sure you'll do some crazy things with it!

Max "Bob" Wooden

Tom Bampton
02-01-2007, 03:52 PM
@rokicki,

I searched for info on the byte code the other day and couldn't find anything. Maybe I wasn't looking hard enough, I'll try searching again. I was expecting the byte code to be tightly coupled with the language, but I don't think that is really a problem.

I had actually considered knocking up a C compiler before I got the props, but in the end decided that the prop's architecture was not really that well suited to C. I think that the prop requires a different way of thinking and new(ish) solutions to old problems. I'll dig out the threads you mention and consider rethinking that, but my gut says that C is not the right approach.

I totally agree on just scratching the surface. Tough questions are the only questions worth asking ;)

@Gadgetman,

I agree there. But, I'm not really one to use other peoples code as-is. If I do then it's usually more as a reference. I prefer to understand everything that is going on and just treating things as a black box doesn't really aid that any.

@Max,

Oh goddamnit. There I was, thinking it was nice to be posting somewhere where nobody knows me, and you go and spoil that ;)

T.

Max Wooden
02-01-2007, 03:56 PM
Haha, you can't escape! So what sort of projects do you have planned? I totally want to see TGE and the prop some how combined into a project. :D

rokicki
02-01-2007, 03:58 PM
To find the threads, use search.parallax.com and not the forum search gadget.

Search for "decode.py". That's got the good stuff.

Tom Bampton
02-01-2007, 04:04 PM
Max,

Funny you should say that. I was joking about Torque MCU edition a couple of weeks back, so knowing me it'll probably happen ;) Gary Preston and I have been working on something ... interesting. Not really ready to talk about it in any kind of detail yet since it's still a little bit up in the air. We are currently just messing around figuring out what the prop is capable of. What I will say though is that it is game related, it has a "lot" of memory, and it'll probably have 2 props and a PIC (currently just has the one prop, though).

rokicki,

Aha! Therein lies my fatal error ;) Thanks man, will do that.

T.

Max Wooden
02-01-2007, 04:07 PM
Yea I remember your joke on the Torque MCU and actually thought jeez he needs to buy a prop.

Jamesx
02-01-2007, 04:53 PM
Regarding the lack of cursor constraint in the IDE editor



Tom said...
Not constraining the cursor to the text forces me to use the mouse often. I can't stress enough how irritating that is. When I am working, I touch the mouse maybe once or twice an hour. The propeller tool forces me to use the mouse once or twice every few seconds, which slows me down tremendously. There really, really needs to be an option for this.



I just wanted to voice strong agreement with this point. This is really annoying. There must be an upside, or the designers wouldn't have done it this way. But, for the life of me I cannot figure out what it is. As Tom suggests, maybe there could be an option to turn this 'feature' off.

Jim C

Tom Bampton
02-01-2007, 06:01 PM
Hey rokicki ... thanks for the pointers. I've just spent the last 5 mins cackling insanely http://forums.parallax.com/images/smilies/wink.gif

T.

Gadgetman
02-01-2007, 09:00 PM
You're from GarageGames?

Any chance of a Hydra-edition MoMKit?
(I can dream, can't I?)

http://forums.parallax.com/images/smilies/smile.gif

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don't visit my new website...

Bergamot
02-02-2007, 12:22 AM
"You either love it or hate it. Personally, I am hovering somewhere in the middle"

This makes no sense :)

Tom Bampton
02-02-2007, 12:40 AM
Gadgetman,

Yes to the former, no comment to the latter http://forums.parallax.com/images/smilies/wink.gif

Bergamot,

It only makes no sense if you think inside the box http://forums.parallax.com/images/smilies/wink.gif

T.

crgwbr
02-02-2007, 12:54 AM
Bergamot said...
"You either love it or hate it. Personally, I am hovering somewhere in the middle"

This makes no sense :)
Philosophically speaking, Bergamot is correct.· If you either love it or hate it you can not hover in the middle; however (if you add an else clause, ie: you love it hate it,·else hover in the middle) the statment would say absolutly nothing at all.· :-)

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life

rokicki
02-02-2007, 01:04 AM
Perhaps Tom was using you to mean "not me" as opposed to "one". Perhaps his "hover" is a statistical
average, and he's simply an uncollapsed wavefunction. Certainly it's an interesting turn of phrase.

Tom Bampton
02-02-2007, 01:33 AM
I am many things. Sane is not one of them.

:)

bambino
02-02-2007, 01:44 AM
I don't know you guys, but I sure needed a laugh this morning.

Sanity, on an insane day, is truly dangerous!!!!!!

Paul Baker
02-02-2007, 02:26 AM
crgwbr said...

Bergamot said...
"You either love it or hate it. Personally, I am hovering somewhere in the middle"

This makes no sense :)
Philosophically speaking, Bergamot is correct.· If you either love it or hate it you can not hover in the middle; however (if you add an else clause, ie: you love it hate it,·else hover in the middle) the statment would say absolutly nothing at all.· :-)


It's quantum emotion, exisiting in two emotional states at once. Just like Schrödinger's Cat is both alive and dead. http://forums.parallax.com/images/smilies/smile.gif·

Hehe, just realized Tomas (Rokicki) said the same thing.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker (mailto:pbaker@parallax.com)
Propeller Applications Engineer
[/url][url=http://www.parallax.com] (http://www.parallax.com)
Parallax, Inc. (http://www.parallax.com)

Post Edited (Paul Baker (Parallax)) : 2/1/2007 7:31:54 PM GMT

asterick
02-02-2007, 02:28 AM
Tom Bampton said...
@rokicki,

I searched for info on the byte code the other day and couldn't find anything. Maybe I wasn't looking hard enough, I'll try searching again. I was expecting the byte code to be tightly coupled with the language, but I don't think that is really a problem.

I had actually considered knocking up a C compiler before I got the props, but in the end decided that the prop's architecture was not really that well suited to C. I think that the prop requires a different way of thinking and new(ish) solutions to old problems. I'll dig out the threads you mention and consider rethinking that, but my gut says that C is not the right approach.

I totally agree on just scratching the surface. Tough questions are the only questions worth asking ;)



You can also go here: www.sublab.net/spin.html (http://www.sublab.net/spin.html)

I think rokicki was referring to my python 'decompiler'. I think it was named something else though. It's in the parallax stuff folder on gear's SVN repo.

rokicki
02-02-2007, 02:50 AM
Oops, you're right, it's 'disasm.py'. Oh well.