Forth as an academic exercise is a fine idea. Being exposed to it will cause students to think about computing in ways they might not given more common approaches.
A couple of them may catch the fever and go on to make great use of it too. IMHO, exposure with that intent is a good thing.
Forth as a primary academic focus isn't a good idea. There just isn't enough mind share out there to warrant more than some minor, thought provoking exposure.
Not sure how the topic morphed from iPad to Forth, but while we are there I'll toss in my 2centavos
Forth probably reached its high water mark in the early 90s, when a number of NASA projects were using it, and it ended up being part of the device configuration of Mac Nubus based machines. I have a fondness for stack oriented machines from my first HP35 calculator to Novix CPUs and Echelon's Neuron (having worked for both companies).
I understand the power of a simple parser (ie all keywords separated by space), and the power of using an interpreter (yesterday I was debugging some Tcl programs).
... here it is BUT, I've never understood why Forth kept to the RPN notation in the language, which it actually violates a lot as the programs gets bigger. Sorry other than maybe Germans (I am descended from them) or an SNL sketch, not many other languages have a whole sentence followed by a NOT
To me the ideal small interpreter language would use a subset of an existing syntax, like C and keep it interpreted, for simplicity spaces between keywords is fine. The parser would handle a line at a time and would read more like a natural language or normal programming language. So when I get infinite time I'll get right to work on it.
Just as an exercise, I compiled openspin within an iOS project, with very few changes to the code. Not able to link the built code yet, as I first need to change the command-line interface parts of the code to work within the confines of an iOS device. I'll probably mod the code to compile whatever spin source code is in a text view, just as an initial test. Not sure yet how I"ll get the executable to my Prop boards, but it's a start. I figure this is simple test of the concept, but it's definitely not an example of the desired C coding for Propeller on iOS...
BTW: Dmitry Kovba has developed a number of iOS apps that feature online compilers for a number of traditional computer languages (C, C++, Pascal, COBOL, Java, Visual BASIC, Pyhton, Ruby, Basic, etc...). Looks like the actual compile takes place via a server and you purchase "compiles". Here's his C app on iTunes: https://itunes.apple.com/us/app/c-programming-language/id499545918?mt=8. Interesting apps, though the executables created are not very transportable. But, they do give an idea of a possible programming experience on iOS or any other like devices.
The problem is that parallax wants to play with something intentionally designed by its maker to not allow those kinds of things. Kind of weird, but I see why they want to make something work.
Of note, apple is proud to have sold 170 million iPads in 3.5 years, which is the number of PCs sold in sixty days, even now, though reading the press you would think the last pc sold some time ago. Apple's recent tablet market share has gone from 92 to 32%, not sure what it is in the schools.
My Children's elementary is going with bring your own device, whatever it is, and relying on web experiences. I'm not sure how that will work, sometimes its good to have some lockdown at the school.
Why are California schools buying iPads? They rank near the bottom nationally so it would be nice if they spent money on core improvements for reading, math and science first. Even teaching microcontrollers and robotics isn't useful unless kids get the fundamentals of arithmetic, reading and writing. The exception to this is that these programs provide smart and successful children a jailbreak from the ghetto of low performing and low expectation schools.
I like getting cool tech to kids, it doesn't solve bigger problems. If the school is decent, then why not strive to do more?
The "dongle" in my case would be a Raspberry Pi. Cheap and readily available. And with the great advantage that it carries the possibility of exposing students to programming on the Pi and the eventual realization that there can be a world outside their iPAD gardens:)
+1 to this. The crazy stuff you can do with a Pi would thrill educators - especially with all of the press Pi's are getting. A Pi + a Prop board = POWERFUL stuff.
Ken, if Parallax decides to go with a hosted/browser solution, I'd be more than happy to help coding and/or testing. The hosted/browser stuff is in my wheelhouse.
I think the browser approach is probably the best way to go, that way it is pretty universal, as it will run on most anything. WiFi would be nice, but maybe not necessary, you could go wired Ethernet to the Prop and just have a gateway between WiFi and all the little Props spinning around.
We actually have some experience trying to host the language on the device and it serving a web page. While the device was no speed demon (60 MHz ARM7), the bottleneck in the system is really the browser. With all the rendering and overhead browsers have to support, it is a really KLUNKY interface. This has not gotten much better even with PCs running much faster, and tablets have no where near that performance.
So you don't want to edit in a browser, but find some native thingy for the editor. The IDE should probably be running native as well. Then drag and drop an application to a web-server connected Prop.
Sparkfun sent me a news mail today which linked to this info https://www.sparkfun.com/news/1295
It refers to Matlab having an interface to the Sparkfun Bot and Ardunio interfaces
If you watch the video with the lady with the blue hair they do have a download
capability. In the demo it is running on a windows machine and I would guess
there is a Mac version also.
One question Parallax may want to ask Matlab is do they plan on a Propeller
interface and if not why not. Also might be a good fact finding project to ask
both Sparkfun and Matlab if they would share info on including an ipad in the
mix of a development platform.
I got to thinking about it and went to Matlab Mobile http://www.mathworks.com/mobile/
and found it interesting that there method of supporting the iPad is to use the cloud to
execute Matlab on another computer, your desktop say. The ipad is a display device
which it is good at.
At first I thought great idea the cloud run's the compiler on my more capable desktop or
laptop. Then I thought if the cloud can run apps on my computer what keeps it from running
evil apps when it is not busy compiling my Propeller C code.
Still concept is something to brainstorm about.
I mention this as brainstorming thoughts for the thread. Not trying to say Matlab and
a Prop C compiler are the same but if Parallax can get some feedback from
Sparkfun and Matlab on difficulties and cost it would be worth it.
I had an idea once for a device that would use an iPad and Bluetooth. The communication required enrollment into the Apple MFI program so that you could purchase their authentication chips. At that time the chips were about 50 cents, maybe still the same. I spoke to Roving Networks about their modules that were promoted as being very easy to implement with your own processor for serial communication to the iPad. I got enrolled in the MFI program but did not have my hardware ready within a year so I didn't order the auth chips or Roving Eval boards in time, and Apple kicked me out. The second time I applied that had more stringent terms and wanted a more rigorous financial assessment of my business to get approved, so I bailed on filling out more forms. I was told that by Roving that their eval board would include test code for the iPad and you would be immediately communicating. For Parallax, going this route may be simple and easy to get past the hurdles, but Apple has the right to approve or reject the final product that gets released with MFI status that allows it to receive the auth chips.
For more Roving Networks info, see the Development Tools tab on the link and check out RN42APL-EVAL.
You know, if that got setup in a way where somebody could submit either a single file, or zip archive, a reference build environment would be available to everybody. Set up a subdomain sub domain and an email address.
Anybody running on just about anything can either submit the file or zip archive through a browser, or email.
The system returns a binary and log files, etc... Maybe have the browser method return a page with links to download, and the email system return the data as attachments.
From there, the problem just becomes getting the executable onto the dev board, and we have a number of methods posted here for that purpose.
I particularly like the email submit option for the version history one gets for free. If a user sends anything via browser or email that does not make sense, they get a sample project, links to documents and whatever else we can think of to put into a get started care package. They see that, can resubmit it to see that it does build and execute, and then they can follow that example for their own code.
This resource would be very handy outside of education and it would serve as the reference authority implementatation. Better still, have the subdomainsub domain numbered to indicate versions, with the main name always pointed to current, release stable, etc...
If somebody wants to build with an older tool chain, they can email to that one specifically, etc...
Use iPad, Droid, Apple 2, so long as it can send an email, things are golden. Email also gets around lots of fiddly browser things. Honestly, most email turn around is on the order of seconds to a coupla minutes tops. Plenty fast enough for many uses, and those who want faster can browse, or run something that is not locked down, such as a pi.
The Espruino is totally open source and runs om many different embedded boards, I have it on an STM32F4 Discovery. I'm going to try and build it for the Prop II dev board. So far it builds under propgcc but needs Prop support adding.
No sure about the Tessel put it does need a board with a lot more FLASH and RAM.
Should Parallax be worrying about the up and coming rush of ultra simple ultra cheap embedded boards with JavaScript and WEB based IDE?
Should Parallax be looking at JS on the PII ?
dgately
Just as an exercise, I compiled openspin within an iOS project,
That reminds me of weird idea I had the other day...
It is now possible to compile C and C++ programs into JavaScript which can then be run in your browser. Sounds crazy but it works very well and the resulting code can be within a factor of 4 the speed of compiling to native code.
Damn thing will even compile C++ using the Qt GUI library to run in the browser!
So here is the plan:
Build the Open Source Spin Compiler with emscripten. Use the resulting JS output as the compiler in a web page based IDE.
That just leaves the "minor" issue of getting the binary propeller program up to a server and out to a Propeller. At least that can be done from Chrome via a serial link directly.
As I side note about the stupid educators and the desire to ipadize everything they do. I imagine if they decided to teach metal or wood working in school, like us kids had back in the day, they would want the iPad to do it all!
Whilst they are at it why don't they close down all the sports halls and sell off the playing fields. Just let the Jocks work out on the iPads:)
Hmmm. Well, when you think about school kids, I think the following factors are important:
1. Simplicity. They need to see results of work almost immediately with minimum of technical barriers and complexity.
2. Fluency. The language for computing must be simple or common and easy to learn enough of within a single 45 minute class. This means a block language, basic, Java, logo or simplified C. One way to simplify C is to use lots of functional C++ objects but get rid of cumbersome things like header files for the core program and forward declarations. This has made arduinosuccessful.
3. Teachability. The language must be something teachers know or can adapt to fast. US teachers will not adapt to forth or spin in any numbers.
4. Error checking. Immediate feedback on incorrect syntax and code hinting ala visual studio or flash.
5. Availability. It would be nice to use common available technology. Hence the request to consider iPad. (iPad is a poor platform for this, though but it is available)
...when you think about school kids, I think the following factors are important:...
I could not help but giggle, when I think of school kids I imagine everything has to be:
1) Very cheap.
2) Very simple.
3) Rugged, water proof, fire proof, tamper and vandal proof.
4) Very heavy or bolted down so that it does not go missing.
5) Conversely, cheap enough to be disposable, it won't last a term anyway.
You can tell what kind of school I went to can't you?
I suspect that Parallax is very much on track with offering C to educational institutions. And to survive in business on have to maintain an inniative by giving the customer what it wants.
I do see that a lot of instituions are also frustrated with keeping clean OSes when every kid has his own computer.. too much junk creeps in and distracts the educational process. Hense, some think that a device with tigher limitations is better. But the truth is that going to plain vanila Linux and reinstalling the OSes frequently (via Lan boot or once a semester reloads) is a viable option.
Then there is the perception that Ipads are the future, so some intitutions want to be on the gravy train. It is easier to sell parents a line about 'future potential'. And the school has a prestige buzz going about using all Ipads. Most teachers that are sincere about teaching have seen this stuff time and time again and knows that it has little to do with the underlying syallabus, but while businesses have to give customers what they want, teachers have to give their bosses what they want.
Forth can easily survive with 'walled garden' devices. And there is GForth that installs in WIndows, Apple and Linux for free... with very good documentation and a complete text. There is also a deeper document written for eForth that explains how to create your own Forth on any microcontroller with adequate resources of speed and ram.
Sure, you can use an interpreted Basic on the Propeller and side-step teaching Forth.. it that is what the educators really desire.
But regardless of Parallax chooses to provide.. it is all about gaining the iniative, keeping the iniative, and regaining the inative in the marketplace.
I am a little bit wary that providing services for the Ipad will do none of these three, though it may not loose an iniative either. I don't think the Apple Ipad has any real educational value except as a motivation perk. And I suspect that students can junk it up with games and apps that have nothing to do with school just as easily as any other hand held device.
So I would focus mainly on [a] how committed are the educators to their computer education, what can the serious student really afford, [c] what OSes offer the most educational resourse for the least cost, and [d] what are the core course requirments within each nation's computer curriculm.
Spending capital, blood, sweat, and tears to catch up with the lastest wave of popularity may be heart-breaking. Waiting for an open-source solution to port your app to an Apple product is likely to never happen.
+++++++++++++++
But I still feel that Forth on the Propeller offers a lot of what sincere educators are looking for in terms of a useful educational venue that will lead to eventually coding in PASM while learning the features and quirks of the Propeller. I suspect that Basic might just do what it has always done best... teach the basics and no more.
I am using pfth with the source code to finally learn to read, write, and modify PASM code. It can be much more empowering that Spin or Basic on the Propeller to learning to eventually program at that final goal, assembly language.
Just another (hybrid) solution:
In case of an embedded environment could the upper ROM be used?
For instance, suppose to have an embedded C (basic) compiler offering enough features to be fit for the purpose and a 64k EEPROM. On boot prop loads the compiler, and serial to wifi (or bluetooth is you have android). You paste the code (forth way). The code is compiled and loaded in the upper eeprom (or maybe RAM?). Then prop reboots using the upper eeprom or RAM.
On reboot you are back to the compiler prompt.
You can do it again, or load from upper eeprom.
Not as interactive as forth, but it would work out of the box...
The image loader part already exists (for program update from SD), ad it works pretty well.
Must be seen if ipad has a terminal program suited for the task, and if the serial transmit needs a line delay, if it is configurable in the terminal.
I realize a lot of people feel that Forth is now a deadend, no longer useful language... so they feel there is no reason to included it in a curriculum.
But, the whole reason I am using and studying Forth on the Propeller is as a case study of a real PASM application.
In other words, here you have Forth working on the Propeller with its own interactive editor and file system in a rather compact amount of code. It demonstrates to the student how small a truly useful OS can be, AND it allows the student to learn PASM while interactively investigating what the code does.
++++++++++++++++++++
In other words, what is NOT to like about a language that HELPS you learn to INTERACTIVELY use an assembly language with its hardware.
Dave Hein even has a demo of ported ANS FORTH code that has the Propeller playing Chess.
=====================
So I am not saying you just teach Forth on the Propeller. You study how Forth is installed and coded in PASM on the Propeller to learn PASM.
That is indeed a worthwhile bit of course work. Students walk away with some real computing skills to carry into their careers.
Are there alternatives to studying a small OS? Well there is MINIX, but it is huge in comparison. How much can a teacher teach in one school year and still reach 90 percent of the classroom?
Sure, a school has to teach C.. just because everyone expects C on the student's resume. But competent assembly language programmers are valued more than yet another C programmer.
++++++++++++++
The fact that it is immediately possible to deploy on an Ipad is just another plus to add to a list of several pluses.
Javascript looks like it may be interesting, though if it's "crammed" into 256K of Flash and 32K RAM, it is a bit bigger than a Forth Kernel . I'd be willing to pair down the language even further. While JS gives up classes, I wonder if the objects still create the bloat of most object oriented languages.
At least for a while a small micro ($1 range) will have 8-16K of memory and could be a target for a Forth like Kernel. My answer as to why Forth is not used much there anymore, is that the industry has coalesced around a couple of different CPU architectures, and there are good cross-compile tools for them. While it is interesting to be able to develop code natively on these small platforms, between cheap netbooks, or tablets with keyboards and these cross-compilers, the need to develop on the target is not a requirement anymore. As most have some in circuit download (no more windowed UV erasable flash), and in all my code I still have a small monitor in case JTAG is not handy so I can poke around at registers and memory.
I think the browser approach is probably the best way to go, that way it is pretty universal, as it will run on most anything.
This approach was discussed several times and probably has lots of merit. In fact, it seems to be what's being used for Arduino. I'm not certain this was brought up in the prior pages of this thread http://codebender.cc or not.
The challenge for Parallax, at this stage, is to be able to determine what kind of model is the right one to use in our design. It would be very helpful if we had a contact in Apple who could provide some guidance on which solutions are most practical within their iOS and framework. Then, once we know we've got the right design concept in mind we could proceed to find developers to do the work. Considering that any solution will likely require new hardware in addition to expensive iPad development I wouldn't want Parallax to wander into this effort aimlessly with several dartboard solutions.
The complexity and truth is that the goals of the project change based on the solutions which are available, and at what kind of cost and capability.
A few years ago I built an experiment with the Spinneret. I created a very simple Spin LED blinker, complied it with the prop dll tool (can't remember the name), sent the resulting file to the Spinneret'/SD card, used the file to program another Propeller. Part of the experiment is documented in the Spinneret forum.
I also build a proof of concept where two internet ready devices, anywhere in the world, can send message to each other through a central host. This is documented in the Propeller forum.
It would be very helpful if we had a contact in Apple who could provide some guidance on which solutions are most practical within their iOS and framework.
I don't mean to be rude but "boo" to that idea. I'm sure Apple would love to suggest a way to make a really slick and polished solution, that works on Apple devices only of course. They would not suggest a solution that is of general use to everybody.
I do like the "Editor in the browser, compiler in the cloud" idea. That is an interface that is of general use, Apple or otherwise, but it still leaves the issue of how to get the compiled binaries down to the students Propellers and how to get the terminal output back to the browser.
"Cloud" of course could be a far away remote server run by Parallax. Or it could be a machine local to the school or classroom.
I don't mean to be rude but "boo" to that idea. I'm sure Apple would love to suggest a way to make a really slick and polished solution, that works on Apple devices only of course. They would not suggest a solution that is of general use to everybody.
I do like the "Editor in the browser, compiler in the cloud" idea. That is an interface that is of general use, Apple or otherwise, but it still leaves the issue of how to get the compiled binaries down to the students Propellers and how to get the terminal output back to the browser.
Great input, we welcome the "boo" comments and I don't take any offense. What I take away from your point is that a browser-based idea should run on devices other than Apple. I agree, but I know anything we do with Apple to the extent we are discussing is not going to share much technology compatibility with other tablets.
Could compiled binaries be transferred over WiFi from device to Propeller, with some app to display data on the iPad over the same communication means?
A few years ago I built an experiment with the Spinneret. I created a very simple Spin LED blinker, complied it with the prop dll tool (can't remember the name), sent the resulting file to the Spinneret'/SD card, used the file to program another Propeller. Part of the experiment is documented in the Spinneret forum.
I also build a proof of concept where two internet ready devices, anywhere in the world, can send message to each other through a central host. This is documented in the Propeller forum.
My point is, it can be done.
Mike, using your example, might it be possible to:
- write code on an iPad
- have it be sent with all libraries, header files and related C stuff to a server
- have it returned to a piece of hardware (Propeller Activity Board, with a W5x00 chip) and programmed over a wired connection to a router
Is that what you're suggesting? I'm trying to picture a block diagram.
For SPIN why not put both the editor and the compiler in the browser?
Then you could upload the image to a WiFi server with a target address and the server can take over to download via XBee.
Someone might be able to port Roy's openspin to Javascript. Maybe that's impossible?
Are you suggesting to use something like a Spineret to actually program the target Propeller? In other words, the tablet sends an HTTP request to the Spineret and it talks to the target Propeller over a serial connection? Actually, that would limit the number of Propeller boards this would work with since most don't have PropPlug connectors these days but instead have the FTDI chip directly on them.
Actually, that would limit the number of Propeller boards this would work with since most don't have PropPlug connectors these days but instead have the FTDI chip directly on them.
I've wanted to see the PropPlug connectors make a comeback.
While the onboard FTDI is nice for one-off users, all those USB Serial enumerations get out of hand when you have multiple boards.
It seems like in a classroom scenario it would really be a pain.
Are you suggesting to use something like a Spineret to actually program the target Propeller?
I guess I didn't think this through completely. You'd need a Wi-Fi version of the Spineret for the tablet to talk to it directly over Wi-Fi. In fact, it would be best if it implemented Wi-Fi Direct to avoid the need for an access point or router between the tablet and the Propeller Wi-Fi dongle.
I've wanted to see the PropPlug connectors make a comeback.
While the onboard FTDI is nice for one-off users, all those USB Serial enumerations get out of hand when you have multiple boards.
It seems like in a classroom scenario it would really be a pain.
C.W.
I've been an internal advocate of keeping USB FTDI hardware on each board, unless it's a consumable item (like a Propeller Project Board) where we shouldn't force the customer to buy the same thing over and over again. For boards we consider more like development tools, where you only need one of them, I always insist it be present.
The big drawback is the one you mentioned: USB serial enumerations! I have to admit we hadn't taken that important detail into account very often.
A good point for us to carefully consider, ctwardell. Thank you for bringing it back to the surface.
I think cloud based editors are a good idea, and I think they have a purpose for team collaboration and will serve educational purposes. If Parallax wants to make a cloud based editor then this will be good for customers with no other choice.
...
However, I've been working for the last 8 months on a Plugin to QtCreator (one of the best C/C++ IDEs that exists - cross platform, free, open source, and extensible) to give it the ability to download programs to microcontrollers and visualize data.
It saddens me to see a lot of work going into reinventing the wheel for the coding experience and no work going into visualizing data. I believe working with microcontrollers will be far easier when students have access to fast and responsive tools that allow them to see visually what the data looks like and visually interact with their microcontrollers.
Earlier this year I was taking a course in school called Mechatronics where you build a robot from scratch to accomplish some goal. All students in the class used Arduino and almost all of the students suffered greatly because of the lack of any ability to graph the output of their microcontroller (I knew Qt so I wrote a simple GUI to visually interact with my robot).
It is very difficult to monitor the values of all the different sensors you have when they are just being displayed in text form that scrolls as fast as possible in a serial terminal.
And... It is even more difficult to control the robot to do some specific task through a serial terminal by just typing commands...
The development experience is greatly improved when you have access to tools which help you get your work done more quickly. I know View Port is an example of a great development tool. But, I don't plan to charge for my work (because it won't be popular if I do) and will release all the source (because I used open source software in the first place). Additionally, I don't plan to lock my code into only being able to work with the propeller, or Arduino. I'm trying to make it work for all microcontrollers that have a serial port.
I have some demo stuff up for my work from a few months ago here: https://code.google.com/p/propino/ if you want to take a look. Note, I've switched my code to being a QtCreator plugin for the last two months and I haven't updated the repo yet.
...
All in all, I suppose a browser based editor will please students who are locked into using an iPad. But, for anyone who can install a desktop IDE, will they use the browser tool if the desktop IDE offers a much better experience? http://codebender.cc basically offers the same experience as Arduino in your browser, except you're completely out of luck in you need to do anything at all the designers didn't foresee.
Comments
A couple of them may catch the fever and go on to make great use of it too. IMHO, exposure with that intent is a good thing.
Forth as a primary academic focus isn't a good idea. There just isn't enough mind share out there to warrant more than some minor, thought provoking exposure.
Forth probably reached its high water mark in the early 90s, when a number of NASA projects were using it, and it ended up being part of the device configuration of Mac Nubus based machines. I have a fondness for stack oriented machines from my first HP35 calculator to Novix CPUs and Echelon's Neuron (having worked for both companies).
I understand the power of a simple parser (ie all keywords separated by space), and the power of using an interpreter (yesterday I was debugging some Tcl programs).
... here it is BUT, I've never understood why Forth kept to the RPN notation in the language, which it actually violates a lot as the programs gets bigger. Sorry other than maybe Germans (I am descended from them) or an SNL sketch, not many other languages have a whole sentence followed by a NOT
To me the ideal small interpreter language would use a subset of an existing syntax, like C and keep it interpreted, for simplicity spaces between keywords is fine. The parser would handle a line at a time and would read more like a natural language or normal programming language. So when I get infinite time I'll get right to work on it.
BTW: Dmitry Kovba has developed a number of iOS apps that feature online compilers for a number of traditional computer languages (C, C++, Pascal, COBOL, Java, Visual BASIC, Pyhton, Ruby, Basic, etc...). Looks like the actual compile takes place via a server and you purchase "compiles". Here's his C app on iTunes: https://itunes.apple.com/us/app/c-programming-language/id499545918?mt=8. Interesting apps, though the executables created are not very transportable. But, they do give an idea of a possible programming experience on iOS or any other like devices.
dgately
Of note, apple is proud to have sold 170 million iPads in 3.5 years, which is the number of PCs sold in sixty days, even now, though reading the press you would think the last pc sold some time ago. Apple's recent tablet market share has gone from 92 to 32%, not sure what it is in the schools.
My Children's elementary is going with bring your own device, whatever it is, and relying on web experiences. I'm not sure how that will work, sometimes its good to have some lockdown at the school.
Why are California schools buying iPads? They rank near the bottom nationally so it would be nice if they spent money on core improvements for reading, math and science first. Even teaching microcontrollers and robotics isn't useful unless kids get the fundamentals of arithmetic, reading and writing. The exception to this is that these programs provide smart and successful children a jailbreak from the ghetto of low performing and low expectation schools.
I like getting cool tech to kids, it doesn't solve bigger problems. If the school is decent, then why not strive to do more?
+1 to this. The crazy stuff you can do with a Pi would thrill educators - especially with all of the press Pi's are getting. A Pi + a Prop board = POWERFUL stuff.
We actually have some experience trying to host the language on the device and it serving a web page. While the device was no speed demon (60 MHz ARM7), the bottleneck in the system is really the browser. With all the rendering and overhead browsers have to support, it is a really KLUNKY interface. This has not gotten much better even with PCs running much faster, and tablets have no where near that performance.
So you don't want to edit in a browser, but find some native thingy for the editor. The IDE should probably be running native as well. Then drag and drop an application to a web-server connected Prop.
https://www.sparkfun.com/news/1295
It refers to Matlab having an interface to the Sparkfun Bot and Ardunio interfaces
If you watch the video with the lady with the blue hair they do have a download
capability. In the demo it is running on a windows machine and I would guess
there is a Mac version also.
One question Parallax may want to ask Matlab is do they plan on a Propeller
interface and if not why not. Also might be a good fact finding project to ask
both Sparkfun and Matlab if they would share info on including an ipad in the
mix of a development platform.
I got to thinking about it and went to Matlab Mobile http://www.mathworks.com/mobile/
and found it interesting that there method of supporting the iPad is to use the cloud to
execute Matlab on another computer, your desktop say. The ipad is a display device
which it is good at.
At first I thought great idea the cloud run's the compiler on my more capable desktop or
laptop. Then I thought if the cloud can run apps on my computer what keeps it from running
evil apps when it is not busy compiling my Propeller C code.
Still concept is something to brainstorm about.
I mention this as brainstorming thoughts for the thread. Not trying to say Matlab and
a Prop C compiler are the same but if Parallax can get some feedback from
Sparkfun and Matlab on difficulties and cost it would be worth it.
Tom
I had an idea once for a device that would use an iPad and Bluetooth. The communication required enrollment into the Apple MFI program so that you could purchase their authentication chips. At that time the chips were about 50 cents, maybe still the same. I spoke to Roving Networks about their modules that were promoted as being very easy to implement with your own processor for serial communication to the iPad. I got enrolled in the MFI program but did not have my hardware ready within a year so I didn't order the auth chips or Roving Eval boards in time, and Apple kicked me out. The second time I applied that had more stringent terms and wanted a more rigorous financial assessment of my business to get approved, so I bailed on filling out more forms. I was told that by Roving that their eval board would include test code for the iPad and you would be immediately communicating. For Parallax, going this route may be simple and easy to get past the hurdles, but Apple has the right to approve or reject the final product that gets released with MFI status that allows it to receive the auth chips.
For more Roving Networks info, see the Development Tools tab on the link and check out RN42APL-EVAL.
You know, if that got setup in a way where somebody could submit either a single file, or zip archive, a reference build environment would be available to everybody. Set up a subdomain sub domain and an email address.
Anybody running on just about anything can either submit the file or zip archive through a browser, or email.
The system returns a binary and log files, etc... Maybe have the browser method return a page with links to download, and the email system return the data as attachments.
From there, the problem just becomes getting the executable onto the dev board, and we have a number of methods posted here for that purpose.
I particularly like the email submit option for the version history one gets for free. If a user sends anything via browser or email that does not make sense, they get a sample project, links to documents and whatever else we can think of to put into a get started care package. They see that, can resubmit it to see that it does build and execute, and then they can follow that example for their own code.
This resource would be very handy outside of education and it would serve as the reference authority implementatation. Better still, have the subdomainsub domain numbered to indicate versions, with the main name always pointed to current, release stable, etc...
If somebody wants to build with an older tool chain, they can email to that one specifically, etc...
Use iPad, Droid, Apple 2, so long as it can send an email, things are golden. Email also gets around lots of fiddly browser things. Honestly, most email turn around is on the order of seconds to a coupla minutes tops. Plenty fast enough for many uses, and those who want faster can browse, or run something that is not locked down, such as a pi.
Bean, Jazzed, brucee, That language is JavaScript. The embedded controllers are the Espruino http://www.espruino.com/ and the Tessel http://www.tessel.io/
The Espruino is totally open source and runs om many different embedded boards, I have it on an STM32F4 Discovery. I'm going to try and build it for the Prop II dev board. So far it builds under propgcc but needs Prop support adding.
No sure about the Tessel put it does need a board with a lot more FLASH and RAM.
Should Parallax be worrying about the up and coming rush of ultra simple ultra cheap embedded boards with JavaScript and WEB based IDE?
Should Parallax be looking at JS on the PII ?
dgately
That reminds me of weird idea I had the other day...
It is now possible to compile C and C++ programs into JavaScript which can then be run in your browser. Sounds crazy but it works very well and the resulting code can be within a factor of 4 the speed of compiling to native code.
This is all done with an open source tool called "emscripten" check it out here: https://github.com/kripken/emscripten/wiki
Damn thing will even compile C++ using the Qt GUI library to run in the browser!
So here is the plan:
Build the Open Source Spin Compiler with emscripten. Use the resulting JS output as the compiler in a web page based IDE.
That just leaves the "minor" issue of getting the binary propeller program up to a server and out to a Propeller. At least that can be done from Chrome via a serial link directly.
As I side note about the stupid educators and the desire to ipadize everything they do. I imagine if they decided to teach metal or wood working in school, like us kids had back in the day, they would want the iPad to do it all!
Whilst they are at it why don't they close down all the sports halls and sell off the playing fields. Just let the Jocks work out on the iPads:)
1. Simplicity. They need to see results of work almost immediately with minimum of technical barriers and complexity.
2. Fluency. The language for computing must be simple or common and easy to learn enough of within a single 45 minute class. This means a block language, basic, Java, logo or simplified C. One way to simplify C is to use lots of functional C++ objects but get rid of cumbersome things like header files for the core program and forward declarations. This has made arduinosuccessful.
3. Teachability. The language must be something teachers know or can adapt to fast. US teachers will not adapt to forth or spin in any numbers.
4. Error checking. Immediate feedback on incorrect syntax and code hinting ala visual studio or flash.
5. Availability. It would be nice to use common available technology. Hence the request to consider iPad. (iPad is a poor platform for this, though but it is available)
1) Very cheap.
2) Very simple.
3) Rugged, water proof, fire proof, tamper and vandal proof.
4) Very heavy or bolted down so that it does not go missing.
5) Conversely, cheap enough to be disposable, it won't last a term anyway.
You can tell what kind of school I went to can't you?
I wonder if they are any better now a days?
I do see that a lot of instituions are also frustrated with keeping clean OSes when every kid has his own computer.. too much junk creeps in and distracts the educational process. Hense, some think that a device with tigher limitations is better. But the truth is that going to plain vanila Linux and reinstalling the OSes frequently (via Lan boot or once a semester reloads) is a viable option.
Then there is the perception that Ipads are the future, so some intitutions want to be on the gravy train. It is easier to sell parents a line about 'future potential'. And the school has a prestige buzz going about using all Ipads. Most teachers that are sincere about teaching have seen this stuff time and time again and knows that it has little to do with the underlying syallabus, but while businesses have to give customers what they want, teachers have to give their bosses what they want.
Forth can easily survive with 'walled garden' devices. And there is GForth that installs in WIndows, Apple and Linux for free... with very good documentation and a complete text. There is also a deeper document written for eForth that explains how to create your own Forth on any microcontroller with adequate resources of speed and ram.
Sure, you can use an interpreted Basic on the Propeller and side-step teaching Forth.. it that is what the educators really desire.
But regardless of Parallax chooses to provide.. it is all about gaining the iniative, keeping the iniative, and regaining the inative in the marketplace.
I am a little bit wary that providing services for the Ipad will do none of these three, though it may not loose an iniative either. I don't think the Apple Ipad has any real educational value except as a motivation perk. And I suspect that students can junk it up with games and apps that have nothing to do with school just as easily as any other hand held device.
So I would focus mainly on [a] how committed are the educators to their computer education, what can the serious student really afford, [c] what OSes offer the most educational resourse for the least cost, and [d] what are the core course requirments within each nation's computer curriculm.
Spending capital, blood, sweat, and tears to catch up with the lastest wave of popularity may be heart-breaking. Waiting for an open-source solution to port your app to an Apple product is likely to never happen.
+++++++++++++++
But I still feel that Forth on the Propeller offers a lot of what sincere educators are looking for in terms of a useful educational venue that will lead to eventually coding in PASM while learning the features and quirks of the Propeller. I suspect that Basic might just do what it has always done best... teach the basics and no more.
I am using pfth with the source code to finally learn to read, write, and modify PASM code. It can be much more empowering that Spin or Basic on the Propeller to learning to eventually program at that final goal, assembly language.
In case of an embedded environment could the upper ROM be used?
For instance, suppose to have an embedded C (basic) compiler offering enough features to be fit for the purpose and a 64k EEPROM. On boot prop loads the compiler, and serial to wifi (or bluetooth is you have android). You paste the code (forth way). The code is compiled and loaded in the upper eeprom (or maybe RAM?). Then prop reboots using the upper eeprom or RAM.
On reboot you are back to the compiler prompt.
You can do it again, or load from upper eeprom.
Not as interactive as forth, but it would work out of the box...
The image loader part already exists (for program update from SD), ad it works pretty well.
Must be seen if ipad has a terminal program suited for the task, and if the serial transmit needs a line delay, if it is configurable in the terminal.
I realize a lot of people feel that Forth is now a deadend, no longer useful language... so they feel there is no reason to included it in a curriculum.
But, the whole reason I am using and studying Forth on the Propeller is as a case study of a real PASM application.
In other words, here you have Forth working on the Propeller with its own interactive editor and file system in a rather compact amount of code. It demonstrates to the student how small a truly useful OS can be, AND it allows the student to learn PASM while interactively investigating what the code does.
++++++++++++++++++++
In other words, what is NOT to like about a language that HELPS you learn to INTERACTIVELY use an assembly language with its hardware.
Dave Hein even has a demo of ported ANS FORTH code that has the Propeller playing Chess.
=====================
So I am not saying you just teach Forth on the Propeller. You study how Forth is installed and coded in PASM on the Propeller to learn PASM.
That is indeed a worthwhile bit of course work. Students walk away with some real computing skills to carry into their careers.
Are there alternatives to studying a small OS? Well there is MINIX, but it is huge in comparison. How much can a teacher teach in one school year and still reach 90 percent of the classroom?
Sure, a school has to teach C.. just because everyone expects C on the student's resume. But competent assembly language programmers are valued more than yet another C programmer.
++++++++++++++
The fact that it is immediately possible to deploy on an Ipad is just another plus to add to a list of several pluses.
At least for a while a small micro ($1 range) will have 8-16K of memory and could be a target for a Forth like Kernel. My answer as to why Forth is not used much there anymore, is that the industry has coalesced around a couple of different CPU architectures, and there are good cross-compile tools for them. While it is interesting to be able to develop code natively on these small platforms, between cheap netbooks, or tablets with keyboards and these cross-compilers, the need to develop on the target is not a requirement anymore. As most have some in circuit download (no more windowed UV erasable flash), and in all my code I still have a small monitor in case JTAG is not handy so I can poke around at registers and memory.
Added:
Look, I applaud all of Dave Hein's efforts, so what I have to say is not to sell him short.
Discussing forth in this thread is off topic though. Parallax has not shown any interest in it. When they do, I'll shut up.
This approach was discussed several times and probably has lots of merit. In fact, it seems to be what's being used for Arduino. I'm not certain this was brought up in the prior pages of this thread http://codebender.cc or not.
The challenge for Parallax, at this stage, is to be able to determine what kind of model is the right one to use in our design. It would be very helpful if we had a contact in Apple who could provide some guidance on which solutions are most practical within their iOS and framework. Then, once we know we've got the right design concept in mind we could proceed to find developers to do the work. Considering that any solution will likely require new hardware in addition to expensive iPad development I wouldn't want Parallax to wander into this effort aimlessly with several dartboard solutions.
The complexity and truth is that the goals of the project change based on the solutions which are available, and at what kind of cost and capability.
I also build a proof of concept where two internet ready devices, anywhere in the world, can send message to each other through a central host. This is documented in the Propeller forum.
My point is, it can be done.
I do like the "Editor in the browser, compiler in the cloud" idea. That is an interface that is of general use, Apple or otherwise, but it still leaves the issue of how to get the compiled binaries down to the students Propellers and how to get the terminal output back to the browser.
"Cloud" of course could be a far away remote server run by Parallax. Or it could be a machine local to the school or classroom.
One should be able to get communication from the "compile server" to the Propellers via some ethernet to serial converters. Perhasp Moxa's
http://www.moxa.com/product/Serial_Device_Servers.htm
Great input, we welcome the "boo" comments and I don't take any offense. What I take away from your point is that a browser-based idea should run on devices other than Apple. I agree, but I know anything we do with Apple to the extent we are discussing is not going to share much technology compatibility with other tablets.
Could compiled binaries be transferred over WiFi from device to Propeller, with some app to display data on the iPad over the same communication means?
Mike, using your example, might it be possible to:
- write code on an iPad
- have it be sent with all libraries, header files and related C stuff to a server
- have it returned to a piece of hardware (Propeller Activity Board, with a W5x00 chip) and programmed over a wired connection to a router
Is that what you're suggesting? I'm trying to picture a block diagram.
Thanks,
Ken Gracey
Then you could upload the image to a WiFi server with a target address and the server can take over to download via XBee.
Someone might be able to port Roy's openspin to Javascript. Maybe that's impossible?
I've wanted to see the PropPlug connectors make a comeback.
While the onboard FTDI is nice for one-off users, all those USB Serial enumerations get out of hand when you have multiple boards.
It seems like in a classroom scenario it would really be a pain.
C.W.
I've been an internal advocate of keeping USB FTDI hardware on each board, unless it's a consumable item (like a Propeller Project Board) where we shouldn't force the customer to buy the same thing over and over again. For boards we consider more like development tools, where you only need one of them, I always insist it be present.
The big drawback is the one you mentioned: USB serial enumerations! I have to admit we hadn't taken that important detail into account very often.
A good point for us to carefully consider, ctwardell. Thank you for bringing it back to the surface.
which appears to be a way to port Chrome Packaged Apps to iOS and Android mobile devices. This would make Chrome Packaged Apps virtually universal.
-Phil
...
However, I've been working for the last 8 months on a Plugin to QtCreator (one of the best C/C++ IDEs that exists - cross platform, free, open source, and extensible) to give it the ability to download programs to microcontrollers and visualize data.
It saddens me to see a lot of work going into reinventing the wheel for the coding experience and no work going into visualizing data. I believe working with microcontrollers will be far easier when students have access to fast and responsive tools that allow them to see visually what the data looks like and visually interact with their microcontrollers.
Earlier this year I was taking a course in school called Mechatronics where you build a robot from scratch to accomplish some goal. All students in the class used Arduino and almost all of the students suffered greatly because of the lack of any ability to graph the output of their microcontroller (I knew Qt so I wrote a simple GUI to visually interact with my robot).
It is very difficult to monitor the values of all the different sensors you have when they are just being displayed in text form that scrolls as fast as possible in a serial terminal.
And... It is even more difficult to control the robot to do some specific task through a serial terminal by just typing commands...
The development experience is greatly improved when you have access to tools which help you get your work done more quickly. I know View Port is an example of a great development tool. But, I don't plan to charge for my work (because it won't be popular if I do) and will release all the source (because I used open source software in the first place). Additionally, I don't plan to lock my code into only being able to work with the propeller, or Arduino. I'm trying to make it work for all microcontrollers that have a serial port.
I have some demo stuff up for my work from a few months ago here: https://code.google.com/p/propino/ if you want to take a look. Note, I've switched my code to being a QtCreator plugin for the last two months and I haven't updated the repo yet.
...
All in all, I suppose a browser based editor will please students who are locked into using an iPad. But, for anyone who can install a desktop IDE, will they use the browser tool if the desktop IDE offers a much better experience? http://codebender.cc basically offers the same experience as Arduino in your browser, except you're completely out of luck in you need to do anything at all the designers didn't foresee.