Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : MMBASIC: Editor or Terminal?!
Page 1 of 3 | |||||
Author | Message | ||||
Poppy Guru Joined: 25/07/2019 Location: GermanyPosts: 486 |
Hi Ho, sorry for bothering with minor matters, but I really would like to know how you program your MMBASIC-Devices (CMM, orig.MM, DM) practically. I rather use the internal editor for CMM and Duinomites, having a separate setup with monitor and keyboard, doing it best for me. Actually I just do like the old way ... power on and start typing ... power off and finished. So how do you do it, probably there are some more Terminals than only Tera Term and MMEDIT??! Andre ... such a GURU? | ||||
panky Guru Joined: 02/10/2012 Location: AustraliaPosts: 1094 |
@poppy It sort of depends on what your doing and personal preferences - I don't do much at all these days with Maximite so for the Micromites, I tend to do program development using MMEdit with all the great features that offers but as the Chat window in MMEdit is so terribly slow, as my programs get more stable (fewer bugs), I tend to use GFXTerm and the inbuilt editor to fix single line errors with MMEdit open to make edit changes there as well. I use the MMEdit version as the master so if I want to download a complete new copy, I just disconnect of GFXTerm and Load and Run on MMEdit, closing the chat window when it opens and re-connecting GFXTerm. panky ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
KeepIS Guru Joined: 13/10/2014 Location: AustraliaPosts: 1345 |
As panky said, it depends. If you're programming over 8000 line of code, you are only doing that in an Editor, and preferably one that allows collapsing all functions and procedures to a definition heading, once you start getting to 30 or more functions and procedures it's really needed, get to over 100 and it's a must have. My main criteria for a terminal emulator is that it must support 132 columns wide, otherwise you can't edit even small programs easily in the MM Basic editor, I find that declaring certain GUI elements causes some long line lengths past 100 columns, that's after removing all spaces and no indent. The MM Basic editor will output 132 columns if set correctly. I use a wireless keyboard and LCD on a device with the inbuilt MM Basic editor, other times a Terminal emulator in final program testing, even with huge programs. Mike. It's all too hard. Mike. |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9052 |
For very small bits of code to test something, I write it directly in the editor. For anything serious, I use MMEDIT. The console is also INVALUABLE for debugging. If you have your code fall over with an error at the console, you can look up the MMEDIT code to see where the bug is, and then you can attempt to debug the code right there on the console using the built-in editor. If that fixes the problem, I then make the changes to the master code in MMEDIT and re-save. I change filename numbers whenever I make any serious modification to the code, that way, if the mod causes things to get worse, I can just roll the code back to the previous code version, and try again, without having to try to remember what I changed. This is just the way I do my code, but having that immediate-mode via the console, is a beautiful thing when developing. You can't do that with any of the other platforms. If the code runs into a bug, you have find the bug in the IDE, recompile and download again to see if that fixes it. I find development time is rather good(read: fast) in MMBASIC. Again - just my 2c. Whatever works for you, works for you. Smoke makes things work. When the smoke gets out, it stops! |
||||
JohnL Senior Member Joined: 10/01/2014 Location: SeychellesPosts: 128 |
WRONG! MMBasic is not the only interpretive language. There is at least one other far more powerful, arguably as easy or easier and far more popular and based on one of the currently most popular programming languages. It is also fully open source with many developers. Don't say something as a fact in a public forum if you are not 100% correct. I am not going to spoon feed you with an answer, do your own research first. Edited 2019-08-13 16:35 by JohnL |
||||
BrianP Senior Member Joined: 30/03/2017 Location: AustraliaPosts: 292 |
I think Grogs just left the M off ANY... |
||||
JohnL Senior Member Joined: 10/01/2014 Location: SeychellesPosts: 128 |
Sure, we understand Grogs enthusiasm, commitment and loyalty to MMbasic but should be careful not to mislead people in a public forum that may be looking for or considering different options. Apologies to OP if taking this off topic. Edited 2019-08-13 18:30 by JohnL |
||||
robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2285 |
ok, i'll take the bait. what other language is there that is interpreted, runs on a single-chip, and allows for editing on-the-device using an onboard editor and just a serial VT terminal attached? btw: something running on a Pi-zero'esque device doesn't really count as the zero (and other Pi's) lack ultra low-power operation. cheers, rob :-) |
||||
Poppy Guru Joined: 25/07/2019 Location: GermanyPosts: 486 |
Thanks Guys (still no Girls around?! ) You are right, it depends on the length of code, I do also find myself using notepad++ in case of massive typing ... enjoying mouse-controlling, highlighting and all in all more convenience, but for letīs say some fifty or hundred lines I still power on and go for it directly! Therefore I still have a separate desktop setup. But I think I should get some deeper into MMEDITing. Thanks for poking. Concerning BASIC there is no other language which can challenge it in being easy for beginners and "all purposely symbolic" ... or not?! I donīt know and without any specific nomination no one does! For a programmer each language is easy, it is only about the logic behind general programming the rest is learning vocabulary (Syntax) having some understanding of the "ghost in the machine"! Just take the best suiting language available for reaching your aim! Look a computer still is just a primitive transistor-box, but containing overwhelming many transistors ... I am not a "programmer", I just take the language I need for whatever I need it for, but only as deep as I actually need it. I always compare BASIC with Classic Latin, a good basis for going on learning other languages and as long as BASIC is powerful enough just to keep sticking on! See MMBASIC compared to C, C is quite easy but its style is so annoying (to me), therefore all jobs being easier done with MMBASIC are simply easier done! And the PIC32 is a PIC32! And I simply like BASIC, others would prefer more brackets in their code, just a matter of individual taste! The task always is just to get it done somehow and being personally satisfied with it. Some readings: https://archive.org/details/goingfrombasicto00trai https://archive.org/details/movingfromqbasic00perr Andre ... such a GURU? | ||||
Tinine Guru Joined: 30/03/2016 Location: United KingdomPosts: 1646 |
It's cool that others regard BASIC as a toy language because I like my competitors to struggle and end up delivering buggy code, way behind schedule. I literally had to learn to write code in the mid 80's but Turbo Pascal and I weren't able to get along. Discovered QB2 and wow, things started to happen but then took a huge leap when QB4.5 came around. Threaded P-code interpreter and "immediate mode". I was bailing my boss out of a serious situation involving Detroit's biggest auto maker. The project was a success and word got around. I was approached by a machine-tool manufacturer in Italy to develop a new range of control systems for them. Heck I was still trying to figure out why QB had all these different data types...I was winging it, all the way. I took the bull by the horns and formed a company and took up the offer. In less than 3 months, I had a $1M order. Progress was so rapid that the story in the industry was that I was merely a front for a team of programmers. The company grew and grew but I had to let go of the coding to run the business. With cash-flow being so healthy, I decided to hire a couple of real programmers from a big-name company and the one condition that they both had was that the code had to be converted to the c-language. I really didn't care and so I agreed. After a while, although there were K&R books floating around and I'd purchased the Watcom compiler....no c code was forthcoming...Both of the hard-core programmers were blown away with QB4.5 and couldn't come with a single reason to drop it. They have been BASIC programmers ever since. |
||||
BrianP Senior Member Joined: 30/03/2017 Location: AustraliaPosts: 292 |
As has been said many times by many members - use what works for you! |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9052 |
I'll bite too. PICAXE has no immediate-mode, you code in the IDE. Arduino has no immediate-mode, you code in the IDE. Even Great-Cow has no immediate-mode, you code in the IDE from what I have read of GCB. I may well be wrong with GCB, as I have not used it, only read about it. You cannot do ANY bug-fixing at any kind of console on the chip itself on those examples. If the code falls over, you have to work out why in the IDE. You can't just start asking the chip for values of things such as pins being currently high or low, or ADC values etc - or be told on the console what the error was and where it happened. I still remember all the head-scratching I used to do with PICAXE when I wrote bad code as I was learning, and trying to work out WHAT I did wrong, so I could fix it and re-upload the code and try again. You don't need to do that with MMBASIC. OK, cool. Please can you tell me what it is so I can go have a read? Happy to be proven wrong. Not wanting to upset anyone. JohnL included. Edited 2019-08-15 14:35 by Grogster Smoke makes things work. When the smoke gets out, it stops! |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3165 |
Good on you Grogs Geoff Graham - http://geoffg.net |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3649 |
hmm... well, an interpretive language need not have an immediate mode - though it's rather useful to have! Having got used to such a mode, I can imagine people being more than reluctant to go to a language implementation without it. John |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9052 |
I agree. I started with PICAXE. @ JohnL - If you can tell us the language you were referring to, I would be happy to read about it for myself. I don't require you to say anything about it, other then what it is called. Mr. Google will find it for me, if I have a reference point. But I have to say that I LOVE the immediate mode and the MMBASIC console for debugging purposes. Perhaps I AM biased. But there you go. EDIT: JohnL and JohnS.....confusing!!!! Sorry. Edited 2019-08-15 16:43 by Grogster Smoke makes things work. When the smoke gets out, it stops! |
||||
ceptimus Senior Member Joined: 05/07/2019 Location: United KingdomPosts: 130 |
I like to use (on the CMM) the built-in editor. For most things it's fine. I wish the cut-and-paste buffer were a little larger though: when I have to move around or copy large blocks of a program, I end up doing it four or five lines at a time. I don't mind compiled and cross-compiled languages, providing the compile-link-(upload)-run process is fast enough. I find the later Arduino IDE editions to be frustratingly slow under Windows, though they run plenty fast enough on exactly the same PC under Linux. I find the MPLAB X IDE and upload via a PicKit 3 to be rather snail-like no matter what O.S. I run it under. I also use C# from Visual Studio in Windows, and Go (Golang) using Visual Studio Code running in Linux. On a reasonably fast PC, both of those recompile and run fast enough that you might just as well be running an interpreted language. |
||||
Poppy Guru Joined: 25/07/2019 Location: GermanyPosts: 486 |
I agree! Fast scrolling within the editor sometimes inserts some random characters into the program-lines at the momentary cursorīs place. Does this also happen to you? Andre ... such a GURU? | ||||
KeepIS Guru Joined: 13/10/2014 Location: AustraliaPosts: 1345 |
Are you talking about the Editor itself when using a keyboard plugged into the MM device, or a Terminal program getting out of sync when talking to the inbuilt Basic editor via a serial com link. From memory, (poor lately), I only see this with a terminal program, depends on the program though, and not with direct keyboard to device editing / scrolling, don't know if it varies across devices thought, so I may be just lucky. Mike. It's all too hard. Mike. |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8567 |
Micropython seen here running on an esp32 has immediate mode but not an editor. HOWEVER since the python syntax uses the space character as part of the syntactical structure and does or doesn't need colon characters in apparently random places I personally think it is probably the most stupid language ever invented. What is wrong with begin/end (pascal), {} (C), for/next + if/endif etc. (Basic)? No lets define structure by using indents to maximise the potential for error - DUHHHHHH!!! |
||||
ceptimus Senior Member Joined: 05/07/2019 Location: United KingdomPosts: 130 |
Does this also happen to you? I've seen the odd random character inserted - not only when fast scrolling. I found it was because I was leaving the USB connected to my PC, and no terminal program like Tera Term was running. My theory is that the PC sends the occasional 'probe' signal via USB - maybe to check if a mouse is connected or similar, and that is sometimes picked up by the editor as a stray character. Since I have the Maximite powered via its barrel jack connector anyway, and I'm not really using the USB connection, I simply unplugged it and have had no further problems with random characters appearing. If you need to power via USB and don't use the terminal facility, it might be worth plugging the USB into something like a phone charger instead of a PC, and see if that makes a difference. Edited 2019-08-15 21:56 by ceptimus |
||||
Page 1 of 3 |
Print this page |