Attributes of an ideal MV DATABASIC editor

367 views
Skip to first unread message

David Knight

unread,
Oct 22, 2015, 1:33:39 AM10/22/15
to Pick and MultiValue Databases
In a recent thread which sadly got hijacked [oops, that was me, sorry]; one outcome was that many recognised a flaw in the 'progress' of DATABASIC was less that is was not "C-like' [or Java-like or whatever-like] but rather that developers wanted a sexier editor more like what they are used to.

Which got me thinking. What would the features/attributes of such an editor look like?

I'll kick that off [in no particular order]:

  • 'Intellisense' like syntactical checking as you type - not just syntax but:
  • For variables already used in this code and any referenced includes. For example, I still get caught with complex syntax like LOCATE in all it's forms
  • Cannot reference a variable until it has been initialised, equated.
  • Automatic checking of static vs dynamic array syntax. How many have accidentally referred to SOMETHING<var> instead of SOMETHING(var), or even SOMETHING(var1)<var2>.
  • Highlighting and 'collapsing' code to only show lines where similar dynamic or static arrays have been used in a file; including references in INCLUDE files.
  • Automatic pre-completion of language structure frameworks like BEGIN CASE .... END CASE
  • Close database-coupling such that if typing OPEN .... it will look in the MD for legal filenames....
  • Dictionary editing with intelligent building of v/comv & v/corr attributes, syntactically corrected. Both for F & A correlatives; again closely coupled to the database so it validates against actual values held there.
  • Compile/catalog/flash compile
  • Code optimisation assistance. eg: if a variable is not actually used. Suggest moving code out of loops etc.
  • Cut/Copy/Paste. [I realise that's an easy one, just including it since it covers copying & pasting from non-mv to an editor written in mv].

What does everyone else think should be in a suitable coding tool?

** You can safely ignore the rest of this post, this is just me musing **

Years ago I remember when dbase-II came out and it had a language that allowed you to build and distribute dbase-II database applications. They ran slow, because the language was interpreted by dbase-II runtime. Along came a thing called Clipper, which took dbase-II 'code' and compiled it to an executable which did not require dbase-II runtime, and thus was a freely distributable app. All good.

One of the craziest things I ever saw [which reminded me a snake swallowing its own tail] was an almost complete source code listing, using dbase-II code which created a dbase-II-like application which ran dbase-II code interpretively. If you compiled via Clipper and ran that [technically Clipper] code; what appeared looked like, worked like, and did pretty much everything that dbase-II did, including using it to write dbase-II compatible type applications which it could run!

Made my head hurt.

So I wonder if someone will write, using DATABASIC; an editor that edits DATABASIC code?

That is all....

[Oh, BTW before someone tells me, I know that most compilers are written in the language they compile. This is just one of the wonderful interesting geek-facts of the IT industry].


Simon Verona

unread,
Oct 22, 2015, 4:21:59 AM10/22/15
to Pick and MultiValue Databases
I think the model would be the visual studio or eclipse editors..

agree with most of your list but would add :-

1. Must be gui based - eg windows/java or web - point and click
2. auto indenting based on syntax.  
3. Autocomplete - so for example if I type in IF  and press enter without a then or else on the line, it should add an "END" statement automatically
4. colour code statements and variables 
5. ability to compile and catalog
6. link to help files, so if I click on a "locate" statement and choose help I go to the "locate" help page

Accuterm's WED does have some of this already - in fact it may be a good place to start.   Maybe Zumasys are the people to do this. 

Personally, I would pay for a decent editor... 

Whilst on the subject a good visual reporter in the same vein would work well - choose a file, see the dictionary list, choose the fields by point and click, add filters etc - which builds a SORT command and returns the result into a grid with XML/CSV/HTML export.   I'm about to embark on such a project myself.....   

Simon

David Knight

unread,
Oct 22, 2015, 5:23:21 AM10/22/15
to Pick and MultiValue Databases
Yup agree, could be a good place to start. Something inside of/added to Eclipse would be grand.

But - that means it lives 'outside' of mv; and I'm guessing that would mean building lots of to-and-fro stuff at the mv end to support mv stuff like reading files, includes, reading dictionaries calling subroutines to cause a complie and so on etc etc. So if I had to choose between the two; that is a tool outside of mv at higher cost because of all the mv stuff & pipes & goodness-knows-what OR something 'inside' mv which may not even be GUI but with better functionality; I'd choose the latter.

Straight after OP I went back & was coding & can agree totally with auto-indenting!! And yes, I'd like autocomplete; but I'd like it to go a little further, something like as soon as I type the beginning of a structure [IF..THEN... LOOP... READ ... etc etc] it automatically pops in the entire framework of that structure on successive lines, auto-indented and [new feature] auto-commented. What I mean is this. To make things more readable I'll typically do:

OPEN  blah blah  THEN

  stuff

  READ blah blah THEN

    stuff

    IF blah blah THEN

       stuff

    END     ;* if blah

    more stuff

  END       ;* read

  even more stuff

END         ;* open


OK, I know I could make it tighter & smaller with gosub's; but just take my point! Being that it can auto complete the structure AND also add a comment alongside the added framework such that you know to what beginning the end [or END ELSE] belongs. Same for other clause structures such as LOCKED and so forth.

Lastly in terms of a tool to allow point and click assembly of routines that essentially return JSON [as you know, that is similar to XML/CSV etc] that already exists:

Check the FREE MVS Toolkit available for d3/win v9.2 & above.

Also I'm pretty sure Accuterm has a tool, but I definitely know HOSTACESS does. HOSTACCESS will return data, an onscreen report etc. They are bundled utilities that come with the terminal emulator.

So don't go re-inventing the wheel!!

Lastly, yes; I'd pay for an editor; but it would have to be commercial justifiable; and therein lies the problem as many have said before. The market is now too small to make tools like this a commercial success; because if you divide the development cost + profit by the likely number of sales; the unit price is too much. So this has to be one of:

  • Labour of Love.
  • Community-built and driven [open source]
  • Leveraging a commercial or free-ware tool; so we are back at Eclipse again!
But I do like what you are thinking for an editor.

Kevin Powick

unread,
Oct 22, 2015, 10:31:11 AM10/22/15
to Pick and MultiValue Databases
Just to add a few more feature wishes (sorry for any repeats):
  • Compile/catalogue from within the editor with a visible output window
  • Open additional editor windows/tabs for subroutines and UDFs via an action (double click sub name?) in main editor window.  
  • Built in terminal/command line interface
  • And a big one, which is not possible without changes to the MV platform itself - Debugging features: Step-into, step-over, watch variables, etc.
I don't think such an editor should be part of a much bigger product such as Visual Studio.  It should, IMO, be an extension of already great, x-platform, inexpensive or free, programming editors such as Atom, SublimeText, Visual Studio Code, etc.

--
Kevin Powick 

Ian Harper

unread,
Oct 22, 2015, 12:39:33 PM10/22/15
to Pick and MultiValue Databases
I use Sublime Text 2 at home and I love it. It will do a lot of the basic features that have been mentioned in this thread (auto-complete code, auto-indent). It won't do any of that out of the box however. I wrote some plugins to accomplish that and I've posted them to github:
https://github.com/ianharper/Sublime-Text2-OpenQM-Syntax
Another Ian also has a Sublime Pick Basic language syntax highlighting package:
https://github.com/ianmcgowan/sublime-pickbasic

If you want your code to compile at the touch of a button you'll have to write a small script to run a program on your MV environment (for me it's a bash script running a compile and catalog program in QM).

The big drawback here is that I can't figure out a good way to work on a Windows machine and connect via terminal to MV (like I do at work). In this situation wED (bundled with AccuTerm) is great at bridging the gap. Also there's a lot of MV conventions that aren't recognized by editors (like variable.naming and attribute mark syntax<1,2,3>).

Kevin Powick

unread,
Oct 22, 2015, 1:06:56 PM10/22/15
to Pick and MultiValue Databases

On Thursday, 22 October 2015 12:39:33 UTC-4, Ian Harper wrote:
I use Sublime Text 2 at home and I love it. It will do a lot of the basic features that have been mentioned in this thread (auto-complete code, auto-indent). It won't do any of that out of the box however. I wrote some plugins to accomplish that and I've posted them to github:
https://github.com/ianharper/Sublime-Text2-OpenQM-Syntax

That's great, Ian.  I'm going to load that one and give it a go.

Are you looking for feedback via the GitHub issue tracker?  If so, I'll post anything I find there.

Would it be ok if I mirror that repo over at FOSS4MV?


 
Another Ian also has a Sublime Pick Basic language syntax highlighting package:
https://github.com/ianmcgowan/sublime-pickbasic

I'll check out that one as well.

Thanks!

---
Kevin Powick

Ian Harper

unread,
Oct 22, 2015, 1:20:52 PM10/22/15
to Pick and MultiValue Databases
Go for it! If you have any questions let me know, I doubt I did a good enough job with the readme. I wrote it for myself and I've been meaning to revisit the project and make it more presentable.

Any kind of community feedback or contributions are welcome.

Tony Gravagno

unread,
Oct 22, 2015, 1:44:40 PM10/22/15
to Pick and MultiValue Databases
Quick notes ( I need to bang out some code... ):


> "I know that most compilers are written in the language they compile."
That's true of some but not "most".

Visual Studio has long been thought of as Microsoft-only tool that doesn't apply to anything but .NET. But I'm glad that Visual Studio is recognized by some here as being an open platform for development, not just a language-specific one-shot tool C++, C#, or VB.NET. Similar to Eclipse and others, it's fully extensible to many other uses. It's bundled with language-specific implementations simply to facilitate efforts by developers using Microsoft-oriented languages.

More about Visual Studio Extensibility : Rather, a whole site dedicated to it :
http://www.visualstudioextensibility.com/overview/vs/

Over this last year there was a lot of fanfare about Roslyn, which is defined in this quote from the above link:
.NET Compiler Platform (formerly “Roslyn”): before the .NET Compiler Platform extensions had to use the code model provided by automation (EnvDTE.Project.CodeModel, EnvDTE.ProjectItem.FileCodeModel) which had limitations and inaccuracies parsing or modifying source code. The .NET Compiler Platform exposes to extensions the compiler APIs that Visual Studio uses for the C# and VB.NET languages. Requires Visual Studio 2015.

I wish I had more time to explore the .NET Compiler Platform to create the kind of MV BASIC editor that is being discussed in this thread.

Q&A about adding languages to Visual Studio:
http://stackoverflow.com/questions/4283072/how-to-create-a-new-language-for-use-in-visual-studio

Kevin mentioned Visual Studio Code (a rotten name for a product IMO). Here is a Q&A about custom language support for that platform:
http://stackoverflow.com/questions/30687783/create-custom-language-in-visual-studio-code
That points to VSCode docs where as recently as this month support for languages has been added. This is all still WIP. More info:
https://github.com/Microsoft/vscode-docs/blob/0.9.0/release-notes/latest.md

For anyone who wants a more MV-based solution, I maintain that the mvToolbox is one of the most powerful yet unappreciated tools in this industry, and it does many of the things requested in this thread:
http://mvtoolbox.com/

Regarding AccuTerm and improvements to wED, I posted the following a few years ago:
http://www.pickwiki.com/index.php/AccuTermKeywords

Finally, there are tools that will add functionality to other apps. For example when you mouseover text and right click you'll get a context menu from the other tool, not the one you're using (VS, Notepad++, Sublime, etc). With options like this it might be possible to hobble together a custom solution that satisfies most requirements, rather than trying in futility to find a single tool that provides all of them.

I'd love to create a new editor for MV. As indicated in the other thread I've looked at Antlr for parsing MV BASIC. The result of that would be a syntax tree that can be used with editors to get many of the features we want. I'm actually not as in-tune with parser/lexer sciences as I'd like to be. Never had the need. As I've lamented many times in these groups, it would be neat to pursue this with the goal of creating something useful, but I'm discouraged from pursuing for-profit projects like this, as they just lead to an uphill battle against frugal Luddites, and few people in this industry value the open source model, so I wouldn't bother to create a project for it at FOSS4MV, GitHub, or PickWiki. With similar sentiments from many people, including those at the MV DBMS providers, it's simply not worth the time to do stuff like this - at least not until the culture/industry changes and we start to get new people in the community. I SO wish it were different. (That's a topic for a thread of its own: Industry Apathy)

Didn't I say "quick"? Ugh.
T

Bro Cope

unread,
Oct 22, 2015, 2:47:06 PM10/22/15
to mvd...@googlegroups.com
Thanks for the good rep, Tony.  My website is not really current.  I had a lot of programs for it, but my ISP was purchased and the new ISP would not allow me to put a Pick database on the machine.  So it is basically just an electronic boat anchor at this point.

If anyone is interested, and is willing to work with me should adjustments need to be made, send me an email at cgc...@DMCons.com.  At this point, I am basically giving it away to whoever wants it.  I've made my fortune on other things, and would just like the mvToolbox to be appreciated.

Thanks,
Bro Cope




From: Tony Gravagno <bacj8...@snkmail.com>
To: Pick and MultiValue Databases <mvd...@googlegroups.com>
Sent: Thursday, October 22, 2015 1:44 PM
Subject: [mvdbms] Re: Attributes of an ideal MV DATABASIC editor

--
You received this message because you are subscribed to
the "Pick and MultiValue Databases" group.
To post, email to: mvd...@googlegroups.com
To unsubscribe, email to: mvdbms+un...@googlegroups.com
For more options, visit http://groups.google.com/group/mvdbms


Doug Averch

unread,
Oct 22, 2015, 3:01:03 PM10/22/15
to Pick and MultiValue Databases
U2logic recently ported our Eclipse based editor for Universe and Unidata to QM and D3.  We pretty much do everything you ask except code completion with the workaround of using templates built-in to Eclipse.  Using our Continuous Compile technology, you can see all of your compile errors as you type which is what Java and other Eclipse IDE editors do.  There are hundreds of features that we could go into but we recommend a trial first to see if Eclipse IDE and U2logic are a good fit for you.

Our documentation is not fully up to speed using D3 at http://www.u2logic.com/pdfs/XLr8Installation.pdf.  However, our Java programmer made this comments:
  • The install guide MVSPGuide/MVSP.chm indicates that users and accounts have to be enabled for MVSP before use and users have to be given a MVSP password. All access to D3 from Eclipse is thru the MVSP user. User MVSP is enabled out of the box for MVSP but needs a password. This is set with the :MVSP.PASSWORD command in the MVSP account. By logging as DM and a logto MVSP (can't login directly to MVSP) you can run MVSP.MENU and MVSP.PASSWORD to confirm everything is setup correctly.
  • In Eclipse setup the MV Server with a name or your choice, host, port 9000, user, passwd and db type of D3. The user should be "mvsp" and the password the one setup using the MVSP.PASSWORD command.
  • In Eclipse setup an MV Account under the server using the name MVDEMO (DM should work also). Click the "Apply and Test Access" button and if all is well a dialog will appear showing the result from a successful TIME command on the server.
  • You should then be able to add and access other D3 accounts.
We offer free trials and all you have to do is send us your installation id after your have loaded U2logic plug-ins into Eclipse.

Regards,
Doug
Message has been deleted

Jan Van Schalkwyk

unread,
Oct 22, 2015, 7:04:13 PM10/22/15
to Pick and MultiValue Databases
Hi,

Used Notepad++ for years and recently switched to sublime text 3:

I highlighted the items that it caters for below in RED

All you need it dual screens. One to code and one to compiler - no brainer

Ian McGowan

unread,
Dec 9, 2015, 6:28:23 PM12/9/15
to Pick and MultiValue Databases
On Thursday, October 22, 2015 at 9:39:33 AM UTC-7, Ian Harper wrote:
Another Ian also has a Sublime Pick Basic language syntax highlighting package:
https://github.com/ianmcgowan/sublime-pickbasic
 
Can't take credit for that, forked from https://github.com/JacobBennett/sublime-pickbasic with good intentions to personalize, but never got around to it.

My latest workflow is to have a 3-pane setup in iTerm/tmux with a TCL session running https://github.com/ianmcgowan/SCI.BP/blob/master/STACK (to make compiling a 3-character operation), a long-lived emacs session for editing code, and a small unix window for misc stuff. The idea of compiling from within the editor seems nice, but then you have to switch over and run the code from an MV session anyway.

I'd love to see how other people code in MV - http://www.watchpeoplecode.com/ anyone?

rwal

unread,
Jun 6, 2016, 8:07:51 PM6/6/16
to Pick and MultiValue Databases
Just throwing it out here.

Many years ago we came up with an application development environment we called Freedom. It was pick platform independent and it made use of the ability to capture
keystrokes; including escape and escape sequences. As part of this, we created a full screen editor with the ability to compile the source you're working on, full string
search capabilities, the ability to zoom into other source, copy and paste. I still use it. Is this aprorpriate here?

Wjhonson

unread,
Jun 7, 2016, 12:46:21 PM6/7/16
to mvd...@googlegroups.com
*Search and display for every instance of ....
*Jump to referenced subroutine, internally and externally (and jump back, so it has to push location)
*push out to command line, and drop back into code where you left off
*Integrate HELP function into editor



-----Original Message-----
From: rwal <rw...@shaw.ca>
To: Pick and MultiValue Databases <mvd...@googlegroups.com>
Sent: Mon, Jun 6, 2016 5:07 pm
Subject: [mvdbms] Re: Attributes of an ideal MV DATABASIC editor

Ross Ferris

unread,
Jun 7, 2016, 9:27:01 PM6/7/16
to Pick and MultiValue Databases
I'll stick with our Visage editor, which adds

* syntax highlighting / colourisation
* easily (un)comment blocks of code
* code completion, including "knowledge" of "published" subroutine parameters etc
* undo/redo
* like all of Visage, operates over HTTP/S, so forgiving of poor connection quality

though some of the features I like best about it are the surrounding infrastructure which allows you to :

* clearly define all parameters for a subroutine & assign defaults (when "published" as part of a library, these gets included in code completion)
* maintain a list of CALLed subroutines so that when you "dump" a program or subroutine, you also take latest version of dependant routines
* slots to at least remind you that you should document the purpose of the program


If Visage isn't available, I'll use WED, and when all else fails if you are using D3 then UP does a reasonable job

rwal

unread,
Jun 8, 2016, 8:02:09 PM6/8/16
to Pick and MultiValue Databases
Well, except for that help function (we were old school programmers after all 'documentation? we don't need no stinking documentation!' We had the search/display/replace
and jump to external entities (as long as the file names were known). As well, the ability to run tcl stuff and linux commands (we were kind of fond of the linux environment).

Ross Ferris

unread,
Jun 8, 2016, 10:02:31 PM6/8/16
to Pick and MultiValue Databases
The "We don't need no documentation" attitude is one of the biggest problems our niche faced - similar to not actually having dictionary definitions for a file. Sure, you COULD work that way, but made it more difficult for the next guy, with the result that many systems that grew up without any structure were replaced because it was just so damned hard to support them, and more often than not by non-MV systems, because the "mainstream" guys had all of the supporting infrastructure around their products.

Sorry, way OT
Reply all
Reply to author
Forward
0 new messages