Is there any desire to make such a language self-hosted on the prop?....browser based IDE.
Yes there is. I have a proof of concept Spin compiler running in the browser. Forum member msrobots took that and wrapped up in a "web app" IDE which I believe he had served up from a Propeller.
Is there any desire to make such a language self-hosted on the prop? Keyboard + VGA being one option, but perhaps even better would be something like a prop + ESP8266 acting as a web server for a browser-based IDE.
Propbasic isn't even interactive on the Prop, it has to be compiled on the PC so I'm guessing that until that happens that it's not likely that you'd have a chance of self-hosting. Anyway, self-hosting with only 32k RAM and 32 I/O total takes up too much in the way of resources. Even with Tachyon which is interactive and capable of fully self-hosting with its filesystem and network servers I still haven't even bothered to implement this myself as I see it of limited usefulness. Give me a bluetooth/serial or network connection and a tablet/phone/PC and that's all we need.
My attempt at an interactive self-hosted basic was called PE-BASIC (Propeller Embedded BASIC).
It is written in PropBASIC with source code.
Here is the link to it.
My attempt at an interactive self-hosted basic was called PE-BASIC (Propeller Embedded BASIC).
It is written in PropBASIC with source code.
By using PropBASIC compiler directives it can support serial terminal, PS2 keyboard and TV, or even the spinnerette with telnet.
Does that meant that PE-BASIC compiles to PASM as well because that kind of optimization might consume all the memory just for the compiler part or is it just interpreting tokens? Did you manage to implement a local filesystem at all?
I have toyed with the idea of adding a Basic compiler on top of Tachyon that would compile to Tachyon's fast and compact bytecodes. Since all the stand-alone infrastructure is there already it wouldn't have to try to reimplement these layers. What do you think about working on an interactive Basic coded this way?
So how come you didn't called it something more colorful like "Bean Basic"
PE-BASIC is an interpreter.
No file system, just reads and writes to EEPROM (memory dump).
If you have a 64K EEPROM you can save 5 different programs on it.
I think "Bean BASIC" will have to wait for something more spectacular...
Thanks for the links. That web IDE is slick! I remember several years ago a few members toying with the idea. I thought it was really cool. It's nice that Parallax also saw the value in it and that headway is being made. I'll slowly chug my way through that thread when I get the time.
@Peter Jakacki
I don't think it necessarily has to be interactive, or I guess even compiled on the Prop if we're talking about a browser-based IDE (even though I did say "self-hosted" in my post). I presume the compiler for the IDE Heater linked to is written in javascript, is that correct?
But if we do want propbasic compiled on the prop itself, how impractical is it? IIRC, Dave Hein wrote a prop-based SPIN compiler, so it's not completely out of the realm of possibility, I'd think. Also, if lots of the code directly translates to pasm/LMM pasm, then we're talking about something like a macro assembler, no? Hub ram might be tight, but that could be addressed with some SPI SRAM.
Ok, cool! Then perhaps this can work with a prop + esp8266 acting as a web server. Maybe use the largest i2c eeprom possible (atmel has a 2mbit device - could the prop use that for booting?) for file storage, or an SD card. This would be a very flexible and easy to use way to program the prop! This wouldn't even use up any more pins than usual. In fact, if you use the esp8266 as a bootloader, then if you really wanted to, you could forego attaching an eeprom directly to the prop.
Comments
My somwhat broken installation of msrobots IDE can be seen here: http://the.linuxd.org/lab/editor17/editor17.html
This is the forum thread about it: http://forums.parallax.com/discussion/152711/a-propeller-webtool-framework-for-compiled-languages/p21 with code attached at the last post there.
Propbasic isn't even interactive on the Prop, it has to be compiled on the PC so I'm guessing that until that happens that it's not likely that you'd have a chance of self-hosting. Anyway, self-hosting with only 32k RAM and 32 I/O total takes up too much in the way of resources. Even with Tachyon which is interactive and capable of fully self-hosting with its filesystem and network servers I still haven't even bothered to implement this myself as I see it of limited usefulness. Give me a bluetooth/serial or network connection and a tablet/phone/PC and that's all we need.
It is written in PropBASIC with source code.
Here is the link to it.
http://forums.parallax.com/discussion/123678/pe-basic-version-0-16-july-11-2011/p1
By using PropBASIC compiler directives it can support serial terminal, PS2 keyboard and TV, or even the spinnerette with telnet.
Bean
Does that meant that PE-BASIC compiles to PASM as well because that kind of optimization might consume all the memory just for the compiler part or is it just interpreting tokens? Did you manage to implement a local filesystem at all?
I have toyed with the idea of adding a Basic compiler on top of Tachyon that would compile to Tachyon's fast and compact bytecodes. Since all the stand-alone infrastructure is there already it wouldn't have to try to reimplement these layers. What do you think about working on an interactive Basic coded this way?
So how come you didn't called it something more colorful like "Bean Basic"
No file system, just reads and writes to EEPROM (memory dump).
If you have a 64K EEPROM you can save 5 different programs on it.
I think "Bean BASIC" will have to wait for something more spectacular...
Bean
Thanks for the links. That web IDE is slick! I remember several years ago a few members toying with the idea. I thought it was really cool. It's nice that Parallax also saw the value in it and that headway is being made. I'll slowly chug my way through that thread when I get the time.
@Peter Jakacki
I don't think it necessarily has to be interactive, or I guess even compiled on the Prop if we're talking about a browser-based IDE (even though I did say "self-hosted" in my post). I presume the compiler for the IDE Heater linked to is written in javascript, is that correct?
But if we do want propbasic compiled on the prop itself, how impractical is it? IIRC, Dave Hein wrote a prop-based SPIN compiler, so it's not completely out of the realm of possibility, I'd think. Also, if lots of the code directly translates to pasm/LMM pasm, then we're talking about something like a macro assembler, no? Hub ram might be tight, but that could be addressed with some SPI SRAM.
The Spin compiler used in the browser is written in C++. It is the same OpenSpin as used by PropellerIDE. https://github.com/parallaxinc/OpenSpin
We simply compile that into Javascript using Emscripten https://kripken.github.io/emscripten-site/
My original experiment with OpenSpin in the browser is here: http://the.linuxd.org/lab/spine.html
Just hit the buttons at the bottom of the page to see it compile the Spin source.