Home Neural Nets Projects Software programming & code Professional & Resume Publications & reports
Howell-produced videos Blogs Cool stuff Crazy themes and stories Hosted sub-sites Neil Howell's Art
PROJECTS
major (1 active)
MindCode neural network Bill Lucas - Universal Force Randell Mills- hydrinos IceBreaker unchained (WWII) "Hope-to-do-soon" projects
Failures of thinking : Lies, Damned Lies, and Scientists Climate - Kyoto Premise fraud General relativity is a turkey? Quantum mechanics is a fools paradise? Robert Prechter - Socionomics
Economics & Markets : S&P500 1872-2020, 83y trend S&P500 P/E ratios vs Treasury rates Cryptos versus [currencies, rates] Robert Prechter - Socionomics Stephen Puetz - Greatest of cycles
Pandemics, health, Sun : Astro-correlates of health Influenza Corona virus Suicide
Life & [Pre,]-history : Civilisations and sun Steve Yaskell - sun & history Anthony Peratt -petroglyphs Galactic rays and evolution Stephen Puetz - Greatest of cycles
Astronomy, Earth, Climate : Ivanka Charvatova - solar inertial motion Climate and sun Solar modeling and forecasting SAFIRE - electric sun experiment Stephen Puetz - The Greatest of cycles
25Nov2020 This website has been substantially revamped, with changes to [page, menu, content, link]s. There will be problems with links - probably 10 or so webPages of 187 total still have to be corrected after coding changes and my mistakes messed them up.
Many of my web-postings will illustrate my [errors, inconsistencies, ignorance] and some may be upsetting. But I prefer to be seen as a fool than something that I am not? Huh?..., whatever...


QNial programming language - Howell's [descriptions, work, webPages, external links]

Table of Contents :

To generate a Table Of Contents (ToC) from the "id"s web-page sections :
$ grep "A id" "$d_Qroot""QNial - Howells web-page.html" | sed 's/A id="\(.*\)"> */\t
  • /"

    The QNial programming language - a short description

    "... QNial is the child of a beautiful marriage between the LISP and APL programming languages. ..."
    That's how I tend to see QNial. Many times I've left her, only to come back again out of frustration with other languages.

    Thorough descriptions of QNial are available, including : Therefore, I will only provide summary comments on this web-page, mostly related to my own library of programs, and how I prefer to setup my work.

    My magical relationship with QNial started in ?March 1985?. I'm not a computer [programmer, engineer, scientist] by background, I'm just a hacker of the old style :
    "... A hacker is someone who spends 8 hours coding something that can be done with a pen and pencil in 20 minutes, and comes out of this very happy. ..." (who said this?)
    So when my monthly subscription of "Computer Language" magazine arrived, it didn't take long to fall in love : QNial was the centerfold of that issue!!! Already smitten by LISP, and in need of APL-like capabilities, this was my baby!

    I've used QNial as my preferred programming language since 1985, and while upgrades to modern operating systems have luckily been available, the basic language and capabilities remain the same. One exception is the old spooky conceptual problems with null under different [dimensions, contexts], which I don't miss, but which carried critical lessons I just couldn't seem to remember adequately when I needed them.

    Many thanks to Michael Jenkins (a co-inventor of QNial along with ?Trenchart?-Moore of IBM) and John Gibbons, a consultant in Sydney, Australia. They prvided a 64-bit version of QNial, which allowed me to work on my 64 computers and the Raspberry Pi.

    Does anybody else use QNial? Not many, but I couldn't care less. Nor do I care if there are no more full-time professionals developing QNial and updating it. But if YOU need to adopt widely-avaiable systems with great [consultant, baby-sitting] support at [dirt cheap price, constant availability], QNial may not be for you? Handing off projects, and later maintenance may be problematic if you are not doing the coding. But if you are doing conceptual [research, development] then QNial may still be a great tool even if you ultimately migrate your system to standard [language, application]s. I understand that a co-founder of tQNial, Michael Jenkins, has long done that, and QNial is promoted as a prototyping language.

    Qnial is very quick to get working for yoou, but in my experience years to get good at, even if I'm not not where I'd like to be. But it's advantages become quickly apparent, and one reason I kept coming back was the frustrating lack of LISP-like capabilities in most other languagges, albeit much has changed over the decades.

    Of course, one does have to work with other languages depending on the project, which is also a good thing as there is a lot to learn out there, which also provides occasional ideas for the QNial capabilities that I build.


    Selected strengths of QNial over most languages

    It seems to me that QNial has essentially all of capabilities of [LISP, APL], with the exception of a compiler, so it always runs in interpreted mode rather than executable. One can also critize : I have on occasion build simple object-oriented capabilities, which were cute but not so sueful, and for my purposes However, there are probably [LISP, APL] capabilities that are missing which I am not aware of.

    [Random, selected] features that do come to mind, and which I use often : I can't love any computer language that doesn't have at least these feature (bash excepted, if though she's tough on me.)

    [Random, selected] features that do come to mind, but which I DON'T use : Refer to the QNial [manuals, descriptions] for more details that you may notice, and which are important for your work.


    Bash scripting and QNial - a great hybrid programming environment

    Bash [regular expression, piping, other] capabilities, and the enormous [number, diversity, power, speed] of Unix commands, along with the QNial "host" command to run shell programs, make for an awesome preferred programming environment for me. Obviously I'm not big on [windows, GUI interfaces, etc] as I do not create user applications. To get my work done [quick, efficient]ly, I avoid all that stuff as much as possible, so I use the terminal. A few key windowing applications are exceptions : [Genie text editor, LibreOffice [word processing, spreadheet], browser, etc].

    I extensively use Unix [grep, sed], but not awk and many other great tools. As for awk, I always get the impression that QNial-native is the best approach, but I'm sure that some situations would benefit. I'm pretty sure that I will not take the time to learn awk in the future?

    A big disadvantage of the [QNial, bash, Unix command] hybrid is that some of my coding is often operating system dependent. I'm fine with that, as my programs aren't targeted to others. So why don't I use Python? Whatever - the devil you [know, like]...

    I have not compiled QNial's regular expression capabilities, but now that I am far more comfortable with a hybrid of [QNial, bash scripts], there isn't quite the same incentive to go back and re-compile. (... I'm lazy)

    A hidden advantage of the [QNial, Unix command, bash] hybrid is that it allows me to make much more [format-aligned, readable, verifiable] coding. As an example (granted, this is ugly, but it illustrates the point) :



    Now it is much easier to see [meaning, typing, concept] errors than in the normal format :

    sed_backtracks := link ';s|\"\.\.\/\.\.\/\.\.\/\.\.\/|\"[\#=; backtrack ;=\#]|;s|\"\.\.\/\.\.\/\.\.\/|\"[\#=; backtrack ;=\#]|;s|\"\.\.\/\.\.\/|\"[\#=; backtrack ;=\#]|;s|\"\.\.\/|\"[\#=; backtrack ;=\#]| ;


    Selected list of Howell's major QNial programming projects

    Besides augmenting [strings.ndf, fileops.ndf, other] files (described in a section below) - I've added many operators that have come in handy for my [work, projects]. Here is a [random, scattered, incomplete] selection of my major QNial-based projects : Nothing I do is ever "complete", as there are always far more ways to [improve, augment] capabilities, and to introduce new concepts.

    Howell's handy utilities

    These quick-and-dirty utilities don't classify as major programming projects for me, but they might be of interest. Note that with recent restructuring of my [directories, web-[menu, page]s, many loaddefs will not be pointing in the right direction. Again, with ongoing code changes, older operators will often not work, but should be quickly adaptable. The first 3 files listed below are of particular general interest. [fileops, strings].ndf have been partially updated to my new approach to operator symbolism, to help reduce confusion when selecting operators. In several cases, I've migrated entirely to bash scripts, but the old QNial code still has lessons to offer. :

    Near-complete list of Howell's QNial [ndf files, operators]

    The operators, and at time special data, are extracted from my Qnial directory with a simple bash script that takes advantage of my simple formatting convention for ndf files. Click to see the almost-full list of my Qnial [program, operator]s. The list is currently far from complete, as I have not put the formatting in all ndf files that builds the list, but at least almost-all files are listed. Some files are still in directories other than QNial, but I now try to minimize that for simplicity and tracking.

    Note that not all operators are of my own creation, but were provided with the standard QNial package. I have [modified, augmented] a few of those. Fileops.ndf and strings.ndf are good examples.

    A near-full list of my bash scripts is also available (see also my Linux [command, script] list).

    As a WARNING over the last year (Oct2020), I have made big changes to my directory structures, but changes to filepaths etc are only being made as I use programs. Furthermore, I almost invariably [update, improve] the programs, while I don't get arround to updating all of the program dependencies that I'm not using at the time. So these issues may be a bit of mess for some of the programs. Another point to make is that I far too often neglect checks (notably to make sure that files exist), which is a bad habit! Oh well, when I go too far, I put checks in again for a while, but normally things work fine with only occasional frustration.


    Debugging, tracking loaddefs, etc

    QNial provides awesome tools for tracking the execution of programs. These are described in the QNial documentation, but here I point out only a few simple items that I frequently use.

    I use the following flags often. They are defined in "setup.ndf" so are available throughout my QNial programs.
    flag_break := o ; % stop execution to test an operator or the local environment ;
    flag_debug := o ; % include additional output to help track where loaddef errors occur ;
    If you use my programs, it may help to set flag_debug := l before loaddefing them, as this will give you an idea of the contents, and will make it much more clear where problems occurred during loaddefs.

    flag_break - requires the placement of a conditional break at key points in the code, from which you can follow an operator's execution, and simply view results at each step, or type in exression to check variable status etc. An example is :


    Quirks of QNial

    solitary atoms - the standard 'picture' view does NOT show that these are solitaries (ist of one element). This creates confusion and non-obvious coding errors!

    Automated lists of [sections, operators, etc]

    I want to be able to automatically document my programs to be able to keep track of [files, sections, operators, data, etc]. This is provided by Integrated Develeopment Environments, but to keep things really simple only " line are required prior to the definition of each [expression, operator]. Example :

    #] file_delete IS OP p_name - delete a file

    Note that the comment "delete a file" is a short description only, on the same line as the "#] " which is used to automatically extract the comments. Output of a unix command goes to the terminal, which I copy and paste near the top of the .ndf file as a kind of "Table of Contents" (example) :

    #****************************
    # List of operators, generated with :
    # $ cat "$d_Qndfs""file_ops.ndf" | grep "^#]" | sed 's/^#\]/ /'
    #
    +-----+
    file [exist, size, dateTimeStamp, extract] cart ???
    file_delete IS OP p_name - delete a file
    file_exists IS OP p_type p_name - returns true if a [directory, filepath] exists
    file_size IS OP p_name - returns the filesize
    file_dateTimeStamp IS OP filePath - return the dateTimeStamp of the file (long integer(
    dir_extract IS OP filePath - extract the path (directory) from a filepath
    dir_extract IS OP filePath - extract the path (directory) from a filepath
    pName_extract_dirBaseExtn IS OP pName - extract [path, base, extension] from a path-file name
    ...


    Tracking progress when loading a program

    QNial provides detailed tracking of progress as a program (.ndf file) is loaded, as per :

    qnial> loaddefs (link d_Qndfs 'website urls.ndf') 1
    # loaddefs link d_Qndfs 'website urls.ndf' - test all links of a website, list faulty links
    # www.BillHowell.ca 26Sep2020 initial, based on initial "$d_bin""website urls.sh"
    # 03Oct2020 added stuff
    # 06Oct2020 augmented for <A HREF etc, problems [f_html_reformat, sub_mrkHead_midl_tail]
    # bash isn't fun to use for more complex capabilities, so you see "bash-in-QNial"
    # (python is another option, but I can't stand lower languages)
    # /run/media/bill/PROJECTS/Qnial/MY_NDFS/website urls.ndf

    # output list of failures : non-existent [internal, external, menu, pagePosn] urls ;
    ...

    Note that each line of an .ndf file is output according to the "1" at the end of the command "loaddefs (link d_Qndfs 'website urls.ndf') 1". As errors occur during the loading, they are clearly indicated.

    However, in most cases I find the terminal output to be much too verbose, and I prefer to have a single line of terminal output as each [expression (IS), operator(IS OP)] is loaded. That way, any error messages appear immediately after the operator involved.

    For that purpose, I've defined the "add_ISOP_debug" operator to automatically place a "loaddef debug" line just before the carefully formatted comments as described above. For the example above, it produces :

    IF flag_debug THEN write 'loading file_delete' ; ENDIF ;

    #] file_delete IS OP p_name - delete a file

    Now, the loaddef terminal comments can be activated by setting flag_debug to "l" (truth), or deactivated by "o" (false).

    As long as the "??-comments"are provided, an .ndf file can be simply formatted by entering the command : qnial> add_ISOP_debug (link d_Qndfs 'filename.ndf')
    A backup-file is created from the original file "filename' with a new name consisting of the date-time stamp "YYMMDD HHhMMm" where YY is the year, MM the month, etc. For example, if the original file was dated "13:45 26Jan1918", the backup file would be named "180126 13h45m filename.ndf".

    the Generally these are implemented as conditionals, such as :
    IF flag_break = l THEN Break ; ENDIF ;
    IF flag_debug = l THEN write 'loading point in program>' ; ENDIF ;
    IF flag_print = l THEN (... coding for printout ...) ; ENDIF ;

    At any time, the programmer can set the flags to o or l to control the information.

    Faults occur normally during searches, and most often (for me anyways) these must not stop execution! This is set in setup.ndf.
    settrigger o ;

    The QNial "watch" operator provides awesome QNial debugging power!!
    X gets count 5;
    watch !x 'write ''X changed to: '' X'

    ?????2020 initial posting
    Directory of available files for this webpage

    Copyright © 2007 through 2020
    All website content is owned by William Neil Howell of Alberta, Canada, except when it isn't.

    Permission is granted to copy, distribute and/or modify Howell's content under either:
    GNU Public License The GNU Free Documentation License; with no Invariant Sections, Front-Cover Texts, or Back-Cover Texts.
    Creative Commons License Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
    It is expected that reusers of this web-site will:
  • Acknowledge William Neil Howell and/or the specific author of web-site content,
  • Provide a link or reference back to the specific web-page carrying the content that is being used,
  • Allow any modifications made to the content to also be reused under the terms of either of the two standard licences (GNU or Creative Commons).