Suggestions for 100% Open source development on the Prop?
Nick McClick
Posts: 1,003
I've been asked by a few folks to put together a guide on 100% OSS development for the Prop. I've come up with a few things & wanted to see if there are better suggestions out there;
Is there a better OSS solution that I'm missing? Also, are there any OSS IDE's?
- Windows
Write code in your favorite text editor, use Propellent to compile and load. - Linux
Install wine, python, and pyserial. Then use loader.py (here) with Propellent to compile and load - Mac
Install wine, python and pyserial. Then use loader.py as above.
Is there a better OSS solution that I'm missing? Also, are there any OSS IDE's?
Comments
-Phil
@Phil - what Eric said. It isn't that important to me, but many developers put a lot of value in having the code freely available.
-Phil
It doesn't matter what Parallax does on Open Source tools. It will never be open enough for many people. Homespun is this close -><- to being open source.
And it was written by Michael Park (mpark) who also wrote homespun. So I guess Michael may be happy to release Homespun source if someone wanted to embed it into an IDE.
I am not sure where Brad (bst) stands on the Open Source either.
However, since both of these guys will do mods/fixes, I don't really see any need to modify it - I would rather they do anything if they can as they do know how to test thoroughly.
bst also integrates with PropBasic IIRC. What does Catalina do (Homespun?)?
I'm sure PropellerJVM can be compiled with Propellent with a little work.
I seriously doubt that Sphinx will ever compile PropellerJVM.
PropellerJVM open source components:
- Java open source Jikes compiler thanks to IBM.
- Javelin open source linker by Parallax.
- Large open source class library from Parallax and users.
- Open source Propeller booter, runner, interpreter from Parallax.
- PropellerJVM MIT open source by me based on Peter's Spin code.
- Full support of Javelin feature set plus.
- Twice the Javelin performance, twice the program memory, half the price.
- User interest: 0.5%
Still there will be many users who will not be satisfied.The catalina IDE I am writing is open source. So this is vb.net code (vb.net is free, though ? fits the definition of open source), and the IDE runs Catalina, which is open source, which in turn runs Homespun, which is open source.
Windows is not open source, but Linux is, so you could debate how far you take the definition.
I guess a principle is that nothing should be secret. No "included DLLs" where you can't see the source of those. I like the idea of openness.
One reason I'm using C rather than Spin is that Catalina allows programs bigger than the propeller memory. I've tried looking at the idea of "Big Spin" and in the past come up against some core pieces of code that appear to be secret. So Big Spin remains unwritten but Big C exists now, and I guess that to me is an example of where keeping things open source is better.
Maybe we can get Michael to let Homespun go just so Propeller can be open truly source. If Sphinx could run on a PC I might consider that an alternative.
I have "Big Ugly Spin" working There are restrictions such as: Single COG spin but multi-cog PASM, DAT sections unusable except for PASM, VAR works fine. Objects work. Certain features not functional: string operator, ? random, ^^ square-root, |<, and |>. Runs from EEPROM.
Big C is nice... until you get stuck with the ANSI C89 keyword 'FILE' not working. Hopefully Ross will be online soon!
Big Ugly Spin sounds interesting. And I presume it is open source?
If so, maybe 1) it could be one answer to GG's problem of open source code and 2) it could become a very useful tool for all those people who have run out of propeller memory. @Jazzed, I'd love to brainstorm this some more, but I don't want to hijack this thread. Would you be ok starting a new thread to talk about your work?
Happy? Umm, no . Homespun, being my first attempt, is a disaster area internally and is unfit for human consumption. I tried to learn from my mistakes and took a different approach in Sphinx. It's not perfect but at least I can tolerate the idea of others looking at its source.
Hey, no peeking!
I guess I've had situations where my code has been torn apart in a public forum too. I see it as a positive experience, especially when someone takes 20 lines of code and shrinks it to one line.
But is that the reason it is kept secret? The following is trawling through my probably leaky and inaccurate memory banks, but my understanding was that there is a secret core of code that parallax only has been willing to release to a few people. Maybe that is right, maybe not? I don't think the reason was for protecting IP - I think it was more that if there were 100 badly written compilers out there it might reflect poorly on parallax.
I'm thinking what it would take to write a Big Spin compiler. Drilling down into the details, you can pull functions out of local memory or out of external memory and feed them through the spin interpreter, and that will work fine if the functions are small and self contained. But once you start to have global variables, and huge arrays that you might want to explicitly put in either local or external memory, you need access to the nuts and bolts of the compiler.
Maybe there is a compromise - open source but any final product has to have the ok from parallax?
At the moment, the solutions are either reverse engineering or going to a completely different language. Or learning Delphi.
I'd re-check that if I were you. I'm not aware of Parallax releasing the compiler code to anybody. The Delphi wrapper around the binary blob that is Propellent is not really of any use in any case. It's all about the compiler.
On the source front, I'm with Michael. My code is an absolute dogs breakfast and hardly fit for my consumption let alone anyone elses.
In the absence of any form of communication or information, I'm assuming Parallax have started their own cross platform tool effort so I'd be expecting a compiler complete with source in a common language prior to the release of the Prop-II.
Delphi's not hard. If you can pick up C, PASCAL is a doddle.
I answered this in the Catalina thread - you need to move your FILE declaration.
Ross.
Perhaps you may consider releasing the source to those of us who are interested in continuing the development and or modification of homespun.
Besides anything written for dotnet (unless obfuscated) can easily be peeked at:)
@Michael (mpark), having peeked at reverse engineered homespun source, I'm not sure where the unfitness of it is (other than the part I can't reverse engineer). I actually like the idea that every byte-code has its own class. Some things appear a little odd, but we all do that sometimes.
You really should reconsider your position and let the community take up where you've stopped. As far as I'm concerned Homespun is a success and with a little massaging can be a good universal open-source Spin compiler that would satisfy the open source definition and 98% of people who care about that.
BTW, Sphinx is a nice accomplishment and may serve the community well, but I can't run Sphinx on my PC.
I posted the Big Ugly Spin source once (Spin32), but removed it. The current code is limited mainly because I wanted to run it from EEPROM which is what makes it Ugly. It shouldn't be too hard to move everything to external memory and allow at least normal STRING and DAT features.
After all my SDRAM hardware work is done, ZOG/Catalina are running, and there are some great demos, I'll start another thread to explore Big Ugly Spin further. I agree: let's not further pollute this thread.
I thought at one stage Ken offered to release the compiler source to anyone who "really" wanted to re-create it in a better language??? I would have to do it in VB6 but currently no time - and it locks us into windoze. Does VB.net lock us into windoze? I do not know java and I am not good at C. Are these the 3 languages of choice???
Of course it does provide something of a reference for ones own implementation.
As such I would say any kind of MS BASIC is out but C# would be OK as there is mono for non-windows platforms.
Assuming it is possible to get hold of the compiler core source code (which seems less likely given the comments above from the authors of homespun and BST), ideally one would want a platform independant language.
I'm a Basic programmer and I have gravitated to dialects of Basic that are similar to C, so I'm also happy with C (albeit on the steep part of the learning curve, as RossH will attest to!) so I'm looking at Java with hopefully a very unbiased viewpoint. I thought I would check out some of the building blocks:
Graphics and text and basic I/O http://www.dgp.toronto.edu/~mjmcguff/learn/java/
Serial port http://webcache.googleusercontent.com/search?q=cache:rjgxWW6v0bcJ:www.captain.at/howto-java-serial-port-javax-comm-rxtx.php+java+serial+port&cd=1&hl=en&ct=clnk&gl=au&client=firefox-a (this is a cached file, the website is down)
Opening and closing files http://www.devdaily.com/java/edu/pj/pj010004/
Differences between java and c http://www.programmersheaven.com/2/FAQ-JAVA-Differences-Between-JAVA-And-C-CPP
Comments:
1) programming graphics in java is 100x simpler than vb.net.
2) The serial port would need a dll installed and this would be machine dependant but it appears there are options for linux, mac and windows.
3) file access seems straightforward. Some of the syntax for java seems to have crept into vb.net
4) Java vs C. To my Basic eyes they look almost the same, but that webpage explains the differences.
I am now thinking not just open source, but whether it would be possible to have the same language for the compiler as is run on the propeller?
I'm going to check out how easy it is to write a java applet. I am wondering if you could have the 'compiler' running as an applet on a web browser page?