P2 and C
System
Posts: 45
This discussion was created from comments split from: Propeller 2 Objects: a process to involve community and share code.
Comments
C is of interest to Parallax and many Propeller 2 customers. With our current in-house team sitting at 16 people plus the community, we have to ensure that what we offer is done correctly, rather than supporting many languages which all lack documentation and inhibit traction being developed with any one of them. Initially, we're focusing on Spin2/PASM2 and MicroPython.
This can change in time as we progress, of course. We'll recognize, feature, and answer calls about the C compiler tools to the best of our abilities, which are quite limited. With time, we can also figure out the best way to work with the providers of the C tools to bring these efforts forward for a self-sustaining model. But this development process isn't one we can fund at this time; we're just trying to get to the starting point, which requires completion of our contract with ON and a production order ($). Trying to do it all, right now, is a recipe for disaster.
I am confident that any of you who could peek more closely into Parallax would come to similar conclusions on your own. Yet please put your comments here, call me and tell me how to go about things anytime (916) 625-3010 or send a message kgracey@parallax.com.
Ken Gracey
BlocklyProp is built on it, and you have piles of C/C++ tutorials on learn.parallax.com. Don't you want all that to run on P2 also?
Also, several of those things already exist in FlexC right now.
I mean this feels REALLY backwards to me. C/C++ should be a first class citizen and supported. Even more than Spin2/PASM2. I'm just completely baffled.
I saw that and I don't agree and think they need to re-evaluate things.
Chip is piloting a loaded 747 with just enough fuel to safely land at the nearest airport -- burning some vapors but floating in at a 10-to-1 glide path. Aboard the jet is the Parallax team, our educational customers, the P2 community, Parallax and whatever else exists (like those 2,900 P2 chips). When the 747 lands, it can refuel and go to new places. Asking Parallax to point the 747 at a different airport will be one which is further away than the nearest one, which would be a certain cause for trouble. Specifically, the plane could crash and all of the humans, the chips, the potential.....scattered! But if we land, we can pick up more passengers, cargo, fuel, and invest our retained earnings.
C/C++ is among the many first-class citizens who didn't get on the first flight. But they're still alive and can board the plane in the future, after the current fuel is used up. Even better, it's possible these first-class citizens might even take flight sooner than we think! Maybe we'll come up with a solution to get behind FlexC and other tools, more than just featuring them on our site.
We're in more agreement than you can imagine. But we (at least within Parallax) can't rally around every single effort right now. In time, we can widen our scope. Stick with us.
Ken Gracey
Would like to address the question about BlocklyProp.
The reason the P2 exists -- aside from all of your contributions, the creativeness of Chip, and because of P1 success -- is because we have worked to develop an educational market with Arduino, BASIC Stamp, and P1 (mostly in BlocklyProp). This market is responsible for revenue generation. And in the last year or two, Python (MicroPython) has been endorsed (by those who make standards) as the language of choice for education. Educators often care about language first, then tutorials, hardware, etc. Since March 1st, I have personally trained 400+ educators on simple Python programming (using the micro:bit, on a cyber:bot). Part of the rationale behind that effort is the plan to support MicroPython on the P2 as our educational language. We've been creating customers for the P2.
Part of Parallax thinks like a business and gives customers exactly what they want today (our educational business); part of it is so creative it designs things for customers we don't even know yet and looks much further forward (Chip and P2 community). No matter what commercial success may/may not come from P2 applications, we must be able to use it for educational purposes.
With Python being the text-based language for education, a block-based programming environment would likely generate Python code. I do not foresee expanding BlocklyProp for P2 at the moment. Our customers who use BlocklyProp haven't exhausted the limits of that tool yet (but I agree it would be a fun get-running-and-demo way to use the P2 out of the box!).
Ken Gracey
I do not quite understand this sentence.
Eric has invested a lot of time to make Fastspin compatible to Spin2. Normally you can simply load the code from PNUT or PropTool into flexGUI and it works. I write all my objects so that they work with both platforms.
And most importantly, you can use the same Spin2 objects with flexC, without any translation, you just embed them. No idea what C programmers miss.
I hope next Wednesday it will be clearer to everyone how good this flexGUI system is.
Andy
I wasn't aware that the same code would run under FlexGUI and Prop Tool, but this is fantastic. Same for the integration so Spin2 into FlexC. That's why we're running the Early Adopter meetings; whatever isn't clear at this time shall be.
If you'd like to submit your Spin2 objects we'd be happy to host them for download.
Ken Gracey
Let's be constructive since negativity gets us nowhere.
What does it mean for Parallax to support C, in your view? I have a vision of what it means and maybe I'm wrong. Is it this:
- being able to answer the incoming tech requests
- having direct control over the programming environment so customer input is quickly incorporated
- supporting (testing, revising) C libraries
- parallel code support along with Spin2 and MicroPython (some examples in all three languages?)
Please tell me exactly what you'd envision as a customer, maybe a perspective other than the insider you are.
Ken Gracey
Not really. We have one internal C programmer, and that's Andy. However, Andy's primary role is in educational content development. As I mentioned above, that's what keeps the Parallax aircraft flying. At some stage we will turn his attention to MicroPython and the P2. SimpleIDE is not being revised since we don't understand the source code behind the tool. To shift his attention means we don't pursue MicroPython for education. With MicroPython we have a tremendous advantage of being able to rely on the open-source Mu editor.
Leaving Spin2 for later doesn't achieve anything. Not only is it the primary goal from Chip, most of our P1 production projects used Spin.
We're resource-constrained and can only do so much without losing our bearing, personal health and economic viability. If there's a way to get this done by reshuffling what we can, and bringing the community into the support mix, we're all in. Can FlexGUI become a for-sale and supported product from Eric with more visibility from Parallax? Maybe he focuses on libraries and the IDE, and you focus on support?
Ken Gracey
In the meantime let's do what we can as a community to support C on the P2. That means agreeing on standards (like what goes in propeller2.h), some common library functions, and helping out with documentation and code. I could certainly use help on fastspin, and I'm sure Ross would appreciate input for Catalina. We have a fantastic community here that can do a lot together.
OK, not to start a language war but I do want to correct something here: there's nothing special about Spin2 with regards to the P2 hardware. Don't get me wrong, Spin2 is a nice language and Chip has done a good job designing it. But the unique features of Spin2 (e.g. multiple return values, the SEND := mechanism) are not hardware specific, and the hardware specific features (various built-in functions and inline assembly) are easily added to other languages. As proof I offer the BASIC and C dialects in fastspin. There's nothing you can do in Spin2 that you can't do in those languages. If you think I'm wrong, please provide a counter-example.
That's the spirit -- one which Eric has always demonstrated! We can get behind this effort, make it visible and help it grow.
Ken Gracey
Andy
This lends lots of power and cross-code usefulness (or whatever you'd call it). I'm hoping Eric can demo some of these features next Wednesday.
Also, let's start new threads for C - the purpose of this thread was to establish a process to submit (and for us to post) Spin2 objects.
ModEdit: Thread split!
Ken Gracey
This is correct.
OBEX isn't working anymore, but the GitHub is!
Do you want us to open up a repo for C libraries?
Ken Gracey