Lately, I've been working a bit on integrating Mateo's original techniques for getting C to compile for the CE devices. After cleaning [many] things up from ZDS (most notably the makefile (http://pastebin.com/raw.php?i=7fH9942Z)), and integrating all kinds of nice things together, I have a working online C "IDE" :)
Features include:
- State saving when you build (via local storage mainly),
- Proper C syntax highlighting
- Code folding, Naive autocompletion, Auto indenting and other CodeMirror goodies.
- Inlined warnings and errors from ZDS
- Direct .8xp creation and download
- Support of multi-user live collaborating
Screenshots: (the one on the left is a bit outdated)(https://i.imgur.com/yo6jqYA.png) (https://i.imgur.com/6bpTWAm.png) (https://i.imgur.com/ulLPQAu.png) (https://i.imgur.com/qo0T0Hy.png)
(https://i.imgur.com/rUZaEqQm.png) (https://i.imgur.com/Q2sbJHe.png) (https://i.imgur.com/rUZaEqQ.png)
It will be publicly released when it's a bit more tested and the TODO List is done, but I'll also wait for Mateo to finish with his include files that'll be
much nicer that what the IDE is currently using :P
What's happening behind the scenes is: Page <=> AJAX <=> PHP+Bash workers/dispatchers <=> ZDS CLI tools (via the Makefile) run with wine + ConvHex.
Of course, the wine bottle is isolated from the rest of the actual Linux FS, and it's running from a restricted user account (no, you can't #include "/etc/passwd" ;)) Chrooting may take place if needed, that will be determined by further tests...
I believe most parts (i.e things not directly tied to TI-Planet's architecture) will become open-source since developer-oriented tools should always be released that way.
Via: https://tiplanet.org/forum/viewtopic.php?f=10&t=17279
Wow, sounds really cool. Unfortunately I only have a ti 84 plus se. I might eventually get a ce, but not for now. I tried to get sdcc to program the 84 plus se, but I couldn't manage to. I don't(forgot to put this in but this is too big of a distinction so I just changed it) have linux, don't really know any commands like that or anything... An online c compiler for the preious versions as well would be nice. But I still think this is really nice and could lead to some really nice programs, as asm is too anoying for me too learn. Don't really feel like it, especially as I don't have any good editors for it.
Promoted to front page news. Nice stuff right there Adriweb. :)
Man! This is great!
Now all I have to do is learn C and start making apps, or games... for the CE!
Very great Adriweb. I knew that Mateo was working on tools to ease C developement on that calculator so I am glad that more tools are being made. :)
Cool! Where can i get a link to the editor?:p
Now what we need is a community emulator to make development easier. Open-source ideally to allow everyone to contribute, but I can settle with the opposite if it means I'll be able to emulate my calculator earlier. Hopefully someone with the skills and time can get this rolling.
Quote from: DJ Omnimaga on October 02, 2015, 08:53:18 PM
Now what we need is a community emulator to make development easier. Open-source ideally to allow everyone to contribute, but I can settle with the opposite if it means I'll be able to emulate my calculator earlier. Hopefully someone with the skills and time can get this rolling.
Don't forget about https://github.com/TI-Planet/ti_jsemu_wrapper
But which still legally requires the user to have either a non-expired demo or a valic license of the SmartView. Unfortunately for most of the TI community, pretty much only teachers have that.
(I must be part of the few exceptions...)
Indeed, plus TI-Smartview emulation doesn't emulate undocumented instructions. For example it doesn't run Pacman. Also the JS wrapper doesn't let us transfer files. Hence the need for a full emulator like Wabbitemu or jsTIfied.
Update (even though it's not public yet... :P) :
- Added some standard headers to the template
- Header for common types as well
- Better handling of multiple codes/programs (unique ids in localStorage etc.)
- Support of multi-user live collaborating (see screenshot)
(https://i.imgur.com/rUZaEqQm.png) (https://i.imgur.com/rUZaEqQ.png)
oooo... Maybe this'll get me to try to learn C...
Awesome. My only concern, though, is since it's hosted on TI-Planet, then will the latency or lag issues that sometimes occurs when browsing the site in North America/Asia on some ISPs due to distance cause issues when live-editing code together, like in online multiplayer games?
The real-time DB thing is CDN'ed so that should not be an issue.
Ah, that's good then. Could it be possible to have mirror servers in multiple parts of the worlds if that's not too expensive, such as one in North America and the other in Europe?
Well, they apparently don't say where their servers are, but I suppose at least in Europe, Asia and NA.
That's basically what a CDN is, DJ.
Oh, I thought CDN refered to "CanaDiaN" :P
Also question: Will the C compiler remain free? Because I think I recall somebody suggesting the possibility of premium TI-Planet membership features being added to the compiler once it's 100% complete. I hope that essential development features won't be part of that :(
Quote from: DJ Omnimaga on October 19, 2015, 02:53:35 AMWill the C compiler remain free? Because I think I recall somebody suggesting the possibility of premium TI-Planet membership features being added to the compiler once it's 100% complete. I hope that essential development features won't be part of that :(
Yes, it will be free. The non-TI-Planet related parts will even be open-source.
The fact that I mentioned the real-time multi-user feature may be for premium only is because Firebase is free only for projects that are relatively small (max 100 simultaneous connections). If our thing gains enough attention, it may simply not work anymore because of many people using it thus going over the limit. So... that's the reasoning behind it. We'll see how it goes, I guess.
But nothing is set in stone yet anyway.
Ah I see now. That sucks. I hope that it isn't too expensive to run either if more than 100 people decide to use it. You could always put a warning that to make math programs the user should consider using TI-BASIC instead for the time being, so that game programmers won't get shut out by 100 quadratic solver programmers or something.
One thing I'll also do is to disable by default the multi-user feature anyway, and the person using it will have to enable it first (and, like Google Docs, I'll try to make it so that you decide with who you share it), so at least we won't use the connections while it's only a one-person code/project.
The next tier for unlimited connections would be $49/month (https://www.firebase.com/pricing.html), so nope.
Anyway, the premium things on TI-Planet are when there's potentially availability/money-related issues involved, it's not as if we liked restricting features for no reason :P
Oh wait, since it's 100 connections and not 100 people total who can use it total for life, then I guess you might be safe. I doubt there will be that many people using it at once (except maybe in June during the BAC?)
Quote from: DJ Omnimaga on October 19, 2015, 03:46:51 AMOh wait, since it's 100 connections and not 100 people total who can use it total for life, then I guess you might be safe. I doubt there will be that many people using it at once.
Well, at first, probably not. But then again, I don't know how popular it
can get eventually. Also the database will have to be flushed from time to time (because that as well isn't unlimited) - so for the same reason, we could have some way of only permanently saving premium things. Well I don't know yet, I haven't really given it much though yet.
Quote from: DJ Omnimaga on October 19, 2015, 03:46:51 AM(except maybe in June during the BAC?)
I doubt the noob-wave during the BAC will be interested in making C programs :P But it might increase temporarily with some being just curious.
Perhaps the only way to not get flushed after a certain period of time without Premium privileges could be to make front page news or something?
Some more updates recently :
(times relative to earlier today)
- Cleanup + better user list CSS (adriweb committed 19 hours ago)
- Redirect after login (adriweb committed 21 hours ago)
- Updated builders (new proj ID regex compatibility) (adriweb committed 21 hours ago)
- userID, userName, userAvatar from phpBB. (adriweb committed a day ago)
- types.h => stdint.h (with include guard) (adriweb committed 7 days ago)
- More stdbool.h fixes (adriweb committed 7 days ago)
- Apparently fix the 7-letter max in convhex (=> 8 max) (adriweb committed 8 days ago)
- Better template.c regarding headers etc. (adriweb committed 8 days ago)
- Uncommented the startup part in CE.h (adriweb committed 8 days ago)
- Fix stdbool.h according to the standard (adriweb committed 8 days ago)
- Fix missing setjmp header extension. (adriweb committed 8 days ago)
- Better includes ; updated template (adriweb committed 9 days ago)
- lowercase include filenames (adriweb committed 9 days ago)
- Cleaned-up the ZILOG folder
Also, tonight I've coded something quite useful:
- Cmd/Ctrl+Mouseover on a variable/fonction : tooltip showing the definition of the thing in question
- Cmd/Ctrl+click sur une variable/fonction : jump to the thing's definition
Quite useful for functions parameters too.
Screenshot of the mouseover thing :
(https://i.imgur.com/Q2sbJHe.png)
(originally posted here (https://tiplanet.org/forum/viewtopic.php?p=191614#p191614) and on the post above it)
Cool! Is it already publicly available or do we have to wait? :P
I'll answer with a question: have there been any front page news about this compiler being public on the three major sites of the community ? :)
Before general opening, some important server-side backend stuff remains to be done.
The parts of the compiler which are not specific to the TI-Planet infrastructure will be open-sourced.
Indeed, there are still several important items on the TODO list... But be patient, hopefully things will get done ASAP (which is hard because I have other pressing matters at the same time)
This makes me real excited. :D
A wild
@Scipi appeared! O.O
By the way do you program in C normally? You could probably port some of your old games to the 84+CE :P
Also great update
@Adriweb :)
@Lionel Debroux This topic was flagged as front-page news when it got started, but there wasn't another news afterwards.
Quote from: DJ Omnimaga on November 03, 2015, 04:19:21 AM
By the way do you program in C normally? You could probably port some of your old games to the 84+CE :P
I normally do C++. But I can work with C ^_^
That's cool :D. You should showcase some of your stuff here again :walrii:
Just wondering, has there been any updates for this,
@Adriweb ?
Maybe a public release?
Not yet (minor stuff recently, not worth mentioning)
What mainly remains to be done before a public release (both website and source-codes) is, among other things (but that's the majority) :
- Permissions-related code, to handle who owns which projects and what they can do with it (view/edit/delete...), if it's shared (and if so, with who) etc.,
Program renaming (right now it's hardcoded) (Done)
- Actually refactor the C compiler PHP bridge into an subclass instance of a project builder class (think OOP, and actually it may be implementing an interface actually, of a "builder"), so that later on, more project types (than just C) could be added in without having to recode everything.
- Handle multiple-files projects correctly (this one's going to take some time for the user-side/GUI point-of-view :( so the GUI side may not be available right away, to not delay more the release)
Improve the current makefile to be less hardcoded and support said multifile projects (Done)
- GUI overhaul to take into account the points above (probably later on, to not delay more the release)
- Don't enable live multi-users collaboration by default.
- Improve the default C project template (and possibly make several ones depending on what kind of thing the user wants to make, like a homescreen thing, a graph thing, a 8bpp game...)
- Finalize our "documentation" (which is rather a "how to make ZDS happy and compile your code" mini-guide)
- More server-side stuff to automate folder cleaning
- More testing
That's just the TODO list, there are also things in a WISH list...
Some stuff done recently :
- Feature to change the program name (varname)
- Default template updates
- Click on people's avatar to jump on their cursor
- Optimization of the build process (faster now)
- Auto save/load project settings (browser localStorage)
- Ctrl+mouseover on a base 10 number -> display in hex. ; If click -> change in code (WIP, currently has a char-eating bug)
- Highlight of the current editing line
- Minor misc things
(https://i.imgur.com/JRsbgZXm.png) (https://i.imgur.com/JRsbgZX.png)
(source (https://tiplanet.org/forum/viewtopic.php?f=10&t=17279&p=192511#p192511))
I swear I posted here earlier... but I am shocked at the large mount of stuff that still needs to be done. I'm glad it's coming along nicely, though. Will there be a feature to bulk-save like in SourceCoder? In Token we have to manually save each source code file one by one.
Quote from: DJ Omnimaga on November 21, 2015, 06:47:47 AMI swear I posted here earlier... but I am shocked at the large mount of stuff that still needs to be done.
Turns out I've been working a lot tonight and almost all of the todo list is done :)
I'll post when it's actually done.
Quote from: DJ Omnimaga on November 21, 2015, 06:47:47 AMI'm glad it's coming along nicely, though. Will there be a feature to bulk-save like in SourceCoder? In Token we have to manually save each source code file one by one.
Hmm, sure, but right now, while multi-file projects are working, it's not fully embedded into the same window/"virtual tab", so you'll have to open multiple window/tabs, and saving happens as you build, both on the server and locally.
Once the front-end is more polished, it will all be integrated nicely and such a bulk-saving will be there, yes.
Good to hear :)
Also, I wonder if there will be a lite interface for those with limited bandwidth caps (perhaps not as lite as CW Lite interface at https://codewalr.us/index.php?wap2 but you get the idea)? Because on older computers, TI-Planet can get a bit laggy sometimes, especially scrolling, and web-based IDE's with syntax highlighting can do the same with large code.
oh yes, I always found it hard to visit ti planet because of the backgrounds. Anyways, thats great! If I really wanted to build something, I could compile the source, yes?
The TI-Planet background can be disabled by clicking "Theme: Light" in the top left corner of the root (portal) page. I'm among the users who disable this background, for readability purposes :)
As I was saying, almost all of the todo-list is done, so a public beta should be coming pretty soon.
(https://i.imgur.com/Qu0R6yO.png)
(this will be beautified later ^^)
Interface improved, and some minor backend stuff.
(https://i.imgur.com/BkBG3mv.png)
We're getting closer to a public beta...
Awesome. You should make a separate topic and link to it when the beta comes out so I can add it to the front page :)
Looking good :) Still waiting for the time where you accidently leak the link >:D (if you even have it on a public server)
It is on a public server, and there will soon be nothing to leak: we hope to open public beta-testing by the end of the week :)
The estimation I gave in the comments of the ticalc.org news item where Kerm performed blatant unsollicited, off-topic advertising of his closed-source infrastructure remains valid. But I'm not blaming you for not reading ticalc.org, or noticing that part of my comment :)
Well to be fair, ticalc had no news for 7 months, so a lot of people probably stopped checking regularly. They should check again more frequently, though, because they're back in business (for now at least).
No comment about the advertising, other than the fact it's always a good move to clarify things publicly, sometimes, in case there is confusion (eg Ndless authorship or CW goals).
Now has an integrated chat as well, for even better multi-user live collaboration :)
(https://i.imgur.com/3ujDqWsm.png) (https://i.imgur.com/3ujDqWs.png)
Woah nice initiative. I remember one site that had that but I forgot its name. I'm glad that group-editing is available too. Hopefully there won't be too much lag when a file is being edited by someone in France and USA simultaneously. :P
That's quite a cool feature :)
Quote from: DJ Omnimaga on November 23, 2015, 07:25:54 AM
Woah nice initiative. I remember one site that had that but I forgot its name.
Google drive has it too.
Yeah, I'm trying to have the same kind of multi-user feature as Google Drive has. At least in the basics, it's obviously not as good.
Although I do plan to have the same kind of sharing options in the future (private / unlisted / unlisted / specific people can edit, etc. etc.)
Are you going to add other editors like an image editor etc too btw?
The "Online C Compiler" is in the process of being restructured into a more general Project Builder, which will eventually have more editors, so that this C thing for the ez80 will just be one of the possible things.
All these should hopefully be made in beautiful OOP to have a nice modular architecture, especially to easily add more types in the future :)
On top of my head, I can think of adding a TI-Basic IDE (using my tivars_lib, since it's ready and usable) as a project type in the builder, for instance, and it should not be very hard, once the rest of the project builder's core is done (todo list...).
Since it's going to be open-source, I'd welcome anyone wanting to add some type of editor (image, sprites, etc.). With several editors, it could easily become the most complete TI-related online editor suite :)
Oh that is pretty cool :)
If only it would be possible to add the js wrapper to it and send files to it :P
Heh, I'll do my best to integrate open-source community emus if/when one gets done, especially for the CE :)
For the z80, I should probably ask SirCmpwn and/or jacobly some news about z80e / OpenTI, see if that can be embedded in a way that would work.
Having real-time source-level debugging would be quite awesome :)
Image and sprite editors would definitively be a big plus. And yeah I am curious if z80e would be useable?
Latest updates :
- Improved stability of multiuser features
- Secured multiuser features (auth tokens on firebase and associated rules)
- major improvements on the toolchain side:
- Better Makefile
- Linkcmd re-done from scratch
- Architecture redesign regarding sections (header, startup, code, data, text)
- Startup code initializing main safeRAM areas (where the BSS is => no need to initialize all globals to {0} for instance!)
- Workaround regarding ZDS's unsafe use of the IY index register (the OS uses it...), with a _OS( expr ) wrapper
- A lot more standard functions now work as expected (for instance, malloc/free)
- Compatibility with Cesium libraries
- Integrated static analysis with a cppcheck pass (in the background while the compiler is busy)
(Huge thanks to Mateo for his Cesium/Toolchain/Libs work (https://tiplanet.org/forum/viewtopic.php?p=190859#p190859) !)
1st message from cppcheck (static analysis) and second one from ZDS (compiler) :
(https://i.imgur.com/ldZz2g7m.png) (https://i.imgur.com/ldZz2g7.png)
Public beta soon ! :)
Great work! Did the multiuser stability issues involve lag?
Nah, there never was lag, even with users across the world (well, France, USA, and Canada, at least).
It was boring AJAX [a]synchronicity issues preventing stuff being loaded correctly.... as well as security issues with expired tokens refreshing :P (well, stuff would refuse to load, rather)
I see, AJAX can be annoying for that. Just remember the many bugs that OmnomIRC, SAX and WalrusIRC had in the past, where they stopped sending or loading stuff or randomly stopped working. >.<
I have finished the complete server-side rewrite (modularized in OOP), and after some testing, I have now opened the builder in public beta* :)
TI-Planet's Project Builder : https://tiplanet.org/pb/
A separate topic will soon announce everything there is to know.
(https://i.imgur.com/u9X2hiW.png) (https://i.imgur.com/GKHpk6H.png)
* That means there may be bugs, and you're encouraged to report them :)
There is no warranty for the program, to the extent permitted by applicable law. Except when otherwise stated in writing the copyright holders and/or other parties provide the program "as is" without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. the entire risk as to the quality and performance of the program is with you. Should the program prove defective, you assume the cost of all necessary servicing, repair or correction.
In no event unless required by applicable law or agreed to in writing will any copyright holder, or any other party who modifies and/or conveys the program as permitted above, be liable to you for damages, including any general, special, incidental or consequential damages arising out of the use or inability to use the program (including but not limited to loss of data or data being rendered inaccurate or losses sustained by you or third parties or a failure of the program to operate with any other programs), even if such holder or other party has been advised of the possibility of such damages..
Sweet :) I'll be testing this out. Have to create a ti-planet account first though :P
EDIT: Wow that looks sweet :D Nice job
It is indeed currently restricted to users being logged-in, so far.
We have yet to decide if that's going to change.
For project types without a server backend doing the work (contrary to the C Compiler type), but just stuff client-side, it can't really hurt to not require users to be logged in...
An example of that would be a Basic editor, I guess - no need for a backend, as I would make it work with an emscriptened version of tivars_lib_cpp (https://github.com/adriweb/tivars_lib_cpp).
Edit: news delayed for a beta2 release with a bit more features for beginners especially.
Awesome adriweb. Let the beta-testing begin. Since some of us don't know C, perhaps if someone knows how to make CE programs he could give us access to his projects or a simple program so that we can at least test the compiler features for bugs. :)
You can copy/paste the source code included in the .zip files from Crystann/Mandragore/Androides for example.
Unfortunately, giving you access to one of these projects would mean giving you both read+write permissions on the project.
We're missing a "read-only" permission together with a clone button.
That's why there will be a beta2 together with a news. ;)
Actually, not directly, since the headers have changed since then.
there's no ce.h anymore, but there's :
#include <startup.h>
#include <ti84pce.h>
that has to be there in the main.c file.
In other files, if this is the case, only ti84pce.h is needed (do not put startup!)
Anyway, the next beta version will provide a better UX for beginners especially, while this beta1 is more to be able to test the technical parts of if, so for more advanced users who may want to try things on their own.
Quote from: critor on December 02, 2015, 11:41:13 AM
You can copy/paste the source code included in the .zip files from Crystann/Mandragore/Androides for example.
Unfortunately, giving you access to one of these projects would mean giving you both read+write permissions on the project.
We're missing a "read-only" permission together with a clone button.
That's why there will be a beta2 together with a news. ;)
That will be good. :) Also wow I didn't remember that C was so cryptic compared to HP PPL and what I saw of Lua. I checked the Hello World code the other day and it looked more confusing and there were plenty of ASM stuff at the bottom. Is the use of ASM really necessary in order to program games in C for the TI-84 Plus CE?
Whoa! A public beta! I might get to learning some C, now that it can be compiled for a calc...
DJ: the template for C programs will evolve (and multiply), and less ASM code might be part of the standard templates, but a bit of ASM glue will remain necessary e.g. for some OS functions whose calling convention is non-C and which have not (yet) been wrapped.
Unicorn: yeah, learning C would probably be useful, as making Mandragore ( https://ti-pla.net/a328137 , http://www.ticalc.org/archives/files/fileinfo/465/46590.html ), Androides ( https://ti-pla.net/a335066 , http://www.ticalc.org/archives/files/fileinfo/465/46591.html ) and the even better Crystann ( https://ti-pla.net/a353827 , http://www.ticalc.org/archives/files/fileinfo/466/46607.html ) was much easier in C than in ASM.
Some of the inconveniences critor (mainly, Adriweb helped) experienced in the making of these games can be lifted and are in the process of being lifted, but the limitations due to Zilog's horrible compiler will remain.
So in order to program in ez80 C, should people learn ez80 ASM first?
critor didn't learn eZ80 ASM for making these three games, so no, not necessarily, of course.
That is good. Otherwise I was gonna say that we need Axe CE >.<
Perhaps more so than a platform-specific language with fairly cryptic syntax, we need Lua, Python (implemented by e.g. Micro Python) and JS (implemented by e.g. Duktape) on the TI-eZ80 series :)
Technically, they could run much better on the TI-eZ80 series than on the TI-Z80 series. But Zilog's horrible compiler can get in the way of simply building the programs...
Surprise! The Project Builder (but also TI-Planet's archives) now embeds a much improved version of WebCEmu, based on current developments (lots of nice work from Jacobly and Mateo, regarding LCD / SPI / DMA etc.)
The interaction with the browser (especially for the display of the screen, but also the emulation infinite loop) is now written in such a way that there is no need for threading anymore, which simplifies a lot of things, and allows not to encounter weird behaviour (slowness in particular) in recent Chrome versions for example, with these APIs JS being a little too new ... And consequently, the speed of emulation is also closer to the real thing.
In addition, WebCEmu is now built in WebAssembly format, which makes it both faster and smaller :)