Aristo Tacoma ***TUTORIAL NUMBER 1 FOR PEOPLE -- ANYONE -- WANTING TO USE LISA GJ2 FIC3 -- THE F3 LANGUAGE -- TO DO SCIENTIFIC WORK Aristo Tacoma [[[This document is FREE and redistributable according to the www.yoga4d.org/cfdl.txt license. It is available at www.norskesites.org/fic3/tutor1s.txt. Please convert the filename tutor1s.txt to uppercase TUTOR1S.TXT before you open it with the B9 editor, which works consistently with max 8-size filenames, suffix .TXT, and all uppercase, and always in the folder boehmian inside the folder boehm. See norskesites.org/f3 or moscowsites.org/f3 for pointer to the setup page for the free Lisa GJ2 Fic3 language compiler for any suitable computer. It is written in January 2011. Any updates or corrections to the text would be indicated most briefly with an extra date, in the lines right after this paragraph. --Aristo ]]] ======================================================= TWENTY TIMELESS RULES FOR WRITING GOOD SCIENTIFIC ARTICLES AFTER THE 20TH CENTURY First published in January 2011 as part of www.norskesites.org/fic3/tutor1s.txt, and in printed form in second half of 2011 as part of a Big Art Booklet entitled "Tools of Metascience: the necessary extra education for everyone". By Aristo Tacoma. ======================================================= (( 1 )) Get the context right. Say that it is scientific. (( 2 )) Within that context, there are, generally speaking, but two things: theories and data (what we also call empirics, which come from observations). Say what thing you are talking about -- theory or data -- in each place. (( 3 )) Anything else (except core faith) can be MADE INTO a theory, by stating key assumptions and inviting the key notion in science, namely that only things which can be checked are scientific. That is, anything which is called 'fact', 'worldview', 'philosophy' etc can be analysed into independent propositions each of which can be phrased as a theory (which, according to the foundational texts by Karl Popper, can include simple statements such as, 'it is sunny weather today', not only complicated formulations with their deductions from first postulates and definitions with predictions). If something is not a theory, but which is a claim about something such as a 'pattern', 'law' or the like, it is either WITHIN a theory -- or it has nothing to do with science. (( 4 )) Be dialogic. Every thing said must be said with a spirit that more can be said about it, that definitions can be given, that alternative words can be used, that it is uncertain, that it is approximate, or that it is necessarily vaguely stated for it is so rich in content in reality that any attempt to be precise is nonsensical. The principle of open shared wonder about reality must pervade every paragraph, even every key word used, in the article. It is part of being dialogic that a scientific article can compare existing theories, further analyse earlier data reports for new interpretations in the light of changed assumptions -- and changed theories -- and any human being, no matter how famous, can have failed at several severe points, so hold no human being holy. Also, science is necessarily a vague concept and not the copyright of any set of institutions, and also cannot be used in phrases like, 'science holds it for obvious that ..'. Science is the process in human collective consciousness and shared field of meaning cosmically which aims at an inner light. You can contribute to it but it is not humanely possible to define science or arrogantly state its premises. It is part of being dialogic to invite alternative perspectives (which involves a different set of key assumptions, most of which are not made explicit, for only some of these can be given fresh attention at any time) on existing phenomena, or data. It is also part of being dialogic to be open to the possibility that a person's ego has interfered in severe ways with what this person earlier has published, even to the point of faking observation data. But it is also part of being dialogic that when a theory or some data is criticised, it is first stated in a manner which gives some positive attention to it, and any direct quotes which are used should not be called in for any other purpose than positive attention to meaningful features (ie, quotes which are included for the sake of illustrating the stupidity of a scientific writer rarely have a place in a scientific article). (( 5 )) Since all scientific work is approximate, since nothing said by humans is certain, there must be a spirit of evolution and shared togetherness and honesty in sharing and in acknowledging sources, and an overall wise language which is letting go of too big words. Any use of words like 'law', 'deduction', 'theorem', and even 'principle', must be either avoided or given a kind of apologetic justification -- why are so big words necessary here? In what way can we count on them being used here in a way which goes beyond the complications about infinities which characterised their over-eager usage in 20th century science and background formalism? (( 6 )) For others to be able in their scientific work to acknowledge you properly, you must get your key contributions to the generous flow of science published in a way which officially associates a definite fixed text with a year number and your name. It doesn't have to have any scientific context in itself, this official signature on a fixed text with a year. For it is always good for later work by scientists to be able to point out the beginnings of a new development in terms of theory or observations, and so it is generous to the order of this evolution in human consciousness to actually publish rather than merely to throw about hints of your work in private conversations; also, never try to make any conceptual understanding copyrighted yourself or try to drag others into promising secrecy about conceptual work. We must honor open dialogue. But you can wait talking about some more involved valuable pieces of work until you have it finished enough that you publish it, and then you can generously explain it, and also indicate that it has been published so as to help others both understand and also acknowledge it. (( 7 )) Acknowledge, for each new development in your own work, all key influences, no matter how unscientific they are, or how little prestige they involve, in a list after your article generally called ACKNOWLEDGEMENTS. Make it long enough to be complete enough to satisfy your conscience, but not so long that it is impossible to get through to the main points in it. Don't give lots of acknowledgements to works which are extremely well known unless there is some big point to it. (( 8 )) Where you make assumptions (also called 'ad hoc assumptions') in order to fill in the gaps e.g. between a very general theory and a concrete study you have just undertaken, gathering some data, state them as such. Not everything has to be right for your article to be a good piece of work that contributes to science. People have a right to be eclectic about your work. You have a right to be eclectic about other people's work. Intend wholeness, be open to the fact that you may have gotten several key points wrong, but make it possible for other people to then improve on these features. (( 9 )) Include a formalism where you like in order to illustrate some abstract features of a theory (but do not claim of a theory that it can be represented by or identified with a formalism). This can be an F3 formalism (that is to say, a program in the Lisa GJ2 Fic3 language). It can be short or long, and interesting only for its shape or for its performance on the computer or both; it can be used to make data sorted or to model some implications of a theory so as to check them in terms of consistency with predictions, so as to learn more about a theory. But a theory proper is always informal -- an item of meaning in valuable discourse. (( 10 )) If you take the approach of observing e.g. by means of synchronicities or in some other way, such as your claim to direct intuition of some phenomena, you must state both that you do this and that you are open to the clear possibility that you are getting mistaken perceptions, and also explain or at least indicate by a reference to earlier published work from your hand how it is that you have worked on intuitive observations (also what can be called neopopperian observations) in a way that has shown itself to be fruitful and have a sophistication that is trustworthy. When you build work upon intuitive observations made by other people who have published these, you should clearly indicate by concrete references in the acknowledgement section where these observations were first written about, what credentials for doing such these people have, and also explain why you have faith in these observations yourself. (( 11 )) Only work out and publish things which -- if you imagine it had great effect, directly or indirectly, on society -- are not only strictly speaking within what the laws of society permit, but also so overall, and by and large, conducive to righteousness. (( 12 )) As discussed by Carnap, Popper and others early in the 20th century, but phrased more musically here: it is more complicated to come to the point of view that a theory is confirmed than that it has been refuted, for few instances of disconfirmation can be enough to refute a theory but many instances of confirmation are generally necessary to confirm a theory, without there being any significant disconfirming instances. No theory is verified, and the word 'falsified' is also a bit too strong. (( 13 )) Avoid any notion, implicitly or explicitly, of 'et cetera' in trying to bridge the finite and the the infinite. If you say 'et cetera' or imply it somehow, do it within a prespecified clear range. For instance, if you have tested a program for a large set of numbers all within the range of up to two billion (about the 32-bit range, as it is also called by programmers), you could say, "I have tested it for 1, 10, 100, 1000, etc, within the two billion number range", but don't leave open ends. (Further writing about this issue in other works by this author going back to 2003.) (( 14 )) As an insightful consequence of understanding the point just given, when employing any form of deduction, then either clearly say that it is an informal line of reasoning starting with informal first propositions or informal axioms and informal definitions, reaching such things as informal theorems, or else employ the very simple and indeed simplistic primary form of stable formal logic which is called Boolean logic, which is always finite (and never calls in any infiniteness concept nor any dubvious "limit" concept as was used notoriously much in such complicated forms of fruitless paths of reasoning in the 20th century as in the integral calcalus of quantum theory and in the continuums of general relativity theory). In using boolean logic, you use such words as AND, OR, NOT, and IMPLIES, in phrases such as A IMPLIES B and D IMPLIES NOT Z. This can be used to clarify arguments which people tend to get emotional about. This can also be part of an F3 program. (( 15 )) Repeated observations which are recorded and analysed faithfully so as to note whatever there is BOTH of instances of confirmation of a theory, and instances of disconfirmation of a theory, can only in some cases be statistical. A prediction about a stellar event which happens only once pr millenium doesn't lend itself to such treatment. In general, it is easier to build good theories relating to phenomena where repeated observations can be made -- dispassionately -- also by other people than an elitist group possessing esotheric technology (thanks to a conversation with Joseph Agassi, one of the last students of Popper, for this point). When giving empirical data, always remember to be aware that you may have assumptions that more subtly affect the data than that which other assumptions you have suggest, and suggest this caution as best you can. Much later, it may be so that the theory you were working on has been chopped out and parts of it used to make a larger more fruitful and more confirmed theory, but that your data report is still interesting as seen apart from the theory part. That which you have observed but which is not repeatable in any obvious way can be called 'anecdotal', and this in on its own rather little in terms of instance of confirmation. (( 16 )) When looking for patterns in data -- statistically -- such as the effect on doing so and so on such and such a process -- be aware of interpretations along the lines that fluctuations of a relatively free nature (happening perhaps anyway) might be solely responsible for all the apparent effects. Compare an analysis of what would be expected by relatively free fluctuations generation (which in F3 is called RFFG) in terms of effects, to the effects that you yourself have measured. Don't be too assertative in what should be considered as 'significant' if the numbers in many ways are quite close. Leave open the point to readers. (( 17 )) Restrict the quantity of publications and the quantity of words and images and such in each publication to that which has a quality of good communication about at least fairly, in a broad sense, essential themes to humanity. If too much is published, it diminishes science as a whole. Publish bits you have done yourself under your own name and only when it is really very important do joint publications, and never so as to merely get your name attached to another's famous name. (( 18 )) Be aware of the danger of writing in ways which are 'fashionable', because it means it is not part of the standard English natural language but rather a feature which, since it is 'fashionable', will always pass out and seem strange when the article is read much later. Similarly, be aware when many people who are regarded as clever seem to all agree on points to the extent that they don't doubt them much, even though there are reasons to doubt them, so that you recognise a model monopoly where there is one, and can contribute to perceptions and intuitions where any such model monopoly (cfr my own writings about this, building on works by Stein Braten from the 1970s) is transcended (on may also say, to transcend 'paradigms', to use a word brought into the meta-science or the theory of science by Thomas Kuhn some decades ago). Yet, agreement may also be important for harmony when the agreement is over wise enough, and debated enough, points, so as to foster new developments without needless doubt. (( 19 )) A theory is a kind of map in the mind over something, if it is a theory with some correctness to it, and some connection to reality in some way, or over nothing at all, if it has nothing to it. But this map is not woven very much to any particular words. In order to compare theories, to recognise earlier forms of a theory that you are working on, for instance, you are wise in spending time with alternative formulations, and also alternative words, and so also when engaging in dialogue with people. It is not primarely about which words, but in the meaning that we informally, by the living context, associate with them, that is what a theory really is. And by getting a contact with theory in this sense of more or less abstract visualisation (acknowledging Albert Einstein for his focus on this word in particular, in his writings very early in the 20th century), it is more fun to engage in dialogue with others. However (as Alfred Korzybsky pointed out, after studying Aristotle, -- thanks to David Bohm for pointing this out to me) -- keep in mind that the map in mind is small compared to the terreign, which in general is more than it, different than it, and quite possibly in some essential way quite infinite. (( 20 )) In order to reach more unbiased research data so as to evaluate theories and the hypotheses or predictions we derive from them -- for instance about a way to cure a headache -- engage in collaborations with people where the factor of unknowingness is played upon to dismantle the intensity with which the ego in people can bias data. For instance, if the theory is that, say, vitamin so and so reduces headache, try to make two pills looking identical with real content only in one of them, the other ineffectual (this is also called placebo), and give the job to a researcher (which under some circumstances can be yourself, but it is probably more trustworthy when given to others) who has neutral labels on the pill boxes, with only you having the code to tell which of the pills are real vitamin pills. However, as pointed out above, there may be subtle effects -- in particular resonances, synchronicities and such things -- which even so lead to a biasing of data, despite a superficial unknowingness. For that reason, one must not state research results too certainly in ANY case. In particular, much research on what can be a result of mechanical forces from genes in people must be qualified by the possibilities, in a worldview inspired by supermodel theory by the undersigned, of holistic patterns establishing themselves by means of something which is neither mechanical (in this sense) nor really grounded on genes in the concrete sense a 20th century mainstream mechanical scientist could easily surmise. So, the principle of introducing open wonder in all scientific discourse must be practised as an art. BY EMPLOYING THESE TWENTY RULES FOR WRITING SCIENTIFIC ARTICLES, USING EDUCATED NATURAL LANGUAGE (WHERE SPELLING MISTAKES ACCEPTABLE WHEN TEXT IS MEANINGFUL) & ALSO ROBUST F3 PROGRAMS WHEREEVER SUITABLE, EACH ONE CAN CONTRIBUTE TO SCIENCE AND TO THAT EXTENT CALL HERSELF A 'SCIENTIST' WITH FULL RIGHT. THIS CAN ALSO INCLUDE, IN THIS CONTEXT, PHILOSOPHICAL DISCUSSIONS, AS PART OF THIS SCIENTIFIC ENTERPRISE. BUT A 'SCIENTIST' IS NOT SOMETHING ONE IS ALWAYS, AS A MATTER OF PROFESSION; AND THE WORD 'PHILOSOPHER' MUST BE CONSIDERED AN HONORARY TITLE GIVEN BY OTHERS TO PAST WRITERS WHO PROVED THEMSELVES SOMEWHAT WISER THAN MOST, NOT AT ALL SOMETHING ONE GOES AROUND CALLING ONESELF. FOR THAT REASON, ANY USE OF THE WORD 'SCIENTIST' WHATSOEVER MUST BE TENTATIVE AND ESPECIALLY SO WHEN IT CONCERNS ONESELF AND ONE'S FRIENDS. -- Aristo Tacoma, January, 2011, Oslo. ***WHAT'S THIS TUTORIAL ALL ABOUT? This is a tutorial beginning at the beginning for those who want to do programming in Lisa GJ2 FIC3, with a scientific angle (there are also other angles, e.g. the entertainment or gaming angle, as well economical and practical uses.) Note that an intro for beginners to do 2D gaming in Lisa GJ2 Fic3 already exists in printed form as a Big Art Booklet at the moment of writing this, with 3D gaming in preparation. Tutorial is being written early in 2011, with a second tutorial, doing 3D for scientific work, already being planned; and with likelihood, more such good stuff will come!!! In addition, there is a brief dictionary-like manual called F3DOCS.TXT as part of the language package, which is useful for reference in addition to the source for all high- level functions in F3 and various example programs. ***INTENDED AUDIENCE FOR THIS TUTORIAL: The reader that will gain the most from this tutorial has * a considerable interest in science or research in one or various fields * a considerable background in terms of studying the approach of science and a contact with the type of concepts typically applied * a willingness to apply fresh thinking to foundations relative to that which loosely can be called '20th century science' * Possibly an ambition to publish something along the lines of a theory or a theoretical discussion or a summary of empirics using both prose English and a bit (much or little) of essential good programming Lisa GJ2 Fic3 formalism, to clarify certain points * In contrast to certain other tutorials being planned at the moment also by myself, not any much background at all with programming is assumed * Some acquaintance with what this writer calls 'neopopperian science' will be good. *** Welcome to the learning of this programming language, Lisa GJ2 Fic3!!! It is possible to articulate thoughts, also portions of scientific theories, with great clarity using Lisa GJ2 Fic3, or F3, as is the short name of the same language (and the command to start it up). The way I see science -- which in its roots means, obviously, "knowing", a word-root related to roots of 'discern', 'conscience', 'consciousness' -- it is primarely an activity of meaning and informal language but it can call on a formal language to think more about certain implications of certain key points. In a way, then, if you have a theory which has a number of assumptions, postulates, definitions, deductions and such, you can 'abstract' out some features and work on getting an F3 program which in thought rhymes with these features. The two most obvious ways of doing this is, firstly, simply to show some most general features very simply by means of let's say a couple of pages or even less, even perhaps just a few lines of F3 code, with the intention that the reader of your theory should read also this F3 program -- and get smarter about what your theory is. In this sense, you will find that it is very easy to quote F3 programs inside a text intended for human reading, -- it is very easy to see -- what with all its uppercase and parantheses and indents and so forth -- what is an F3 program, in contrast to the surrounding text. It is also brief, generally positive (at times even funny) in its expressions, and by and large it is straightforward and uncluttered. The other obvious way is to make a program which is not merely intended to be viewed in terms of the program text -- its source -- but it is intended to be performed on the F3 compiler (which we also call 'interactive compiler'). Given that the program -- or one of them -- is called something like ABSTRCT1.TXT -- perhaps it has been typed in by the reader of your article from your article setting forth a theory -- it is started in this way. At a computer which has been correctly initialised, with ABSTRCT1.TXT in the current folder, type this: F3 then press ENTER. This activates the language. It is ready to compile your program, ABSTRCT1. So type this: :ABSTRCT1 IN then press ENTER again. This will read in, compile, then start the program, and with any good computer, this will happen in a moment. The program will then either be self-explanatory or the article with the scientific theory will tell the reader how to get going with the program, and how to get out of it so that other programs can be started (or the same program in a modified form). See www.norskesites.org/f3 on how to set up Lisa GJ2 Fic3 for all suitable computers. Since that may change but this tutorial concerns what is totally stable for always, namely the pure form of the F3 language, as it has existed now for a certain while and has proven itself robust by a not insignificant number of programs made in it, we will leave it to norskesites.org/f3 to talk about the present computers available and how to get it going there (a keyword is Dosbox, which involves a very handy shielding from the fluctuating world of all the networking computers, allowing a pure scientific focus on the structure of the program for all scientific use). In addition, other uses of F3 in science are possible, including, for instance, gathering some empirical data in the form of a list of numbers which are read in by a F3 program and then analyzed and synthesized as decided by the F3 functions you make inside that F3 program, with perhaps result being printed out as a series of numbers and/or a chart of sorts. It is then, in order to clarify to the reader how these results were generated, possible to include the F3 program in your article text. Implicitly, great use of the F3 language can also happen by means of searching on the internet by means of the Yoga6d dot org search engine approach, which utilizes (a somewhat hypercharged, specialised version of) Lisa GJ2 Fic3 in doing the look-up and the organising of its database over the world's sites, -- where you can get both creative stimuli and useful input for your thinking. This tutorial is written on the B9 editor which is also a program editor, being part of the Lisa GJ2 Fic3 language, and you may find that it is the best for writing your scientific article as well. For that reason, I'll speak just very slightly about B9 in next paragraph, but feel free to skip any section which conveys information you are already very well acquainted with! ***B9 In F3, B9 is both the name of a font and of a simple good writing tool and program editing tool, part of the Lisa GJ2 Fic3 language. You can use any editor you like as long as you keep lines within about 78 characters pr line, and use only what is called the 7-bit ascii alphabet in your programs. This consists of: ABCDEFGHIJKLMNOPQRSTUVWXYZ and abcdefghijklmnopqrstuvwxyz, the digits 0123456789, usual and some unusual extra characters, mostly . , : ; & - + * / \ [ ] | } ' ^ ? ~ @ < > ` { = " # & ! where the percentage notion of 1/100 in 20th century ascii has in general been replaced by a kind of branch pointing upward to the right (because of the way the percentage sign looked like a nonsensical division of zero by zero), namely this sign % (which then shows different in B9 from 20th century style editors, and where the suggestion is that percentage is written rather than symbolized). Since B9 is part of the F3 in principle any number of characters and any shape of them can be made to work with F3. The daring and courageous folks will one day venture into the program MAKEFONT (backup B9FONT .TXT first). Note that it is also possible for temporary purposes to replace some of the ordinary 7-bit ascii characters with other characters. Least used inside the F3 language proper are backslash (foldernames inside F3 can be specified by forwardslash, as when a filename like MYFOLDER/THISTEXT.TXT is used, even when used in a Dosbox context where backslash is used as in the command DIR MYFOLDER\THISTEXT.TXT), except for some purposes of division, and the vertical bar, the back-tick (like apostroph but tilted backwards), and the left-curly-bracket. So in some contexts it may make sense to use the in-built program MAKEFONT to make an alternative drawing for some of these characters which is typically stored under a separate fontname. Note that any use of MAKEFONT presupposes that you backup the main font matrix file B9FONT.TXT first, as it overwrites the existing file. You start up F3 in the way indicated with pointer in norskesites.org/f3 or moscowsites.org/f3. As this may vary here and there, I will not talk about how it is done here, except that it is normally, in Dosbox environments and similar, either the command F3 or something very similiar, and for purposes of ease of explanation, I will assume henceforth in this text it is simply the command F3 -- but in some contexts, then, it may be different, even started by a graphical menu somehow. So you type F3 and press ENTER. This command is normally the same as the somewhat longer command FIC3 FIC3 which is again normally the same as some series of lines like this: FIC3 :FIC3 IN What this means is the following: start the core program of F3, then get in the higher-level functions of F3. The first FIC3 is the core program of F3, in Dosbox possibly called FIC3.EXE, and the second FIC3 is the higher-level functions of F3, usually called FIC3.TXT. If the computer is reasonably fast, it will at once come up with a readiness to accept more -- namely your own program, or a call to one of the inbuilt programs, of which B9 is one. You can then either type B9 and press ENTER, or you can type at once the name of a new or existing file -- the .TXT is assumed, so don't type that -- and in the world of Lisa GJ2 Fic3, all filenames and all foldernames share the notion of lovely compactness: maximum 8 characters, normally uppercase or for most implementations, uppercase/lowercase do not matter, no blanks, an optional suffix like .TXT or (for images and 200 times 200 sized matrices, .GJP), and where the best notion is only to use ABCDEFGHIJKLMNOPQRSTUVUVWXYZ and digits 1234567890 in addition to dash (-) and hyphen (_). In some Dosbox implementations, but only in some contexts, it makes sense to specify which 'disk drive' somehow, as a letter going from A to Z followed by a colon prior to the filename. The Dosbox idea is eminently suited for scientific applications because it provides a kind of modelling ground or well-shielded safe playground for programming ideas where pure thought can be focussed on. In some cases, for some reasons, you may want to use another editor than B9; also in such cases that the computer is too slow to run the full B9 program at a speed which permits ease of working. In such a case, you may want to also open the manual F3DOCS.TXT which is always part of the Lisa GJ2 Fic3 package. This has many pages in it here and there that you should just skip -- they haven't been taken out perhaps because they refer to some slightly off-the-mainstream versions of F3 which still might be intact while writing this, but if you find a search function and look up functions in it, you may find some useful hints as to what these functions are and possibly how they are to be used; try for instance looking up B9-POP but look it up with two parentheses and a blank before it, like this: (( B9-POP And with luck that'll bring you to the right entry in the manual. If you want still further information on the function, then, when it is a high-level rather than a native function in F3, you can proceed to open FIC3.TXT, and also search there e.g. on B9-POP, or try using the phrase (LET B9-POP BE in order to get right to the exact definition. Though in some circumstances, it is best to look into example programs using a function to really get to see how it is being used. For each year, there are more and/or better F3 programs which are more enlightening as to how to make still more enlightening F3 programs!!! When you have started up B9, you can exit it by pressing on the ESC button. If nothing else is specified by a program made in F3, it is by convention often the ESC button that is necessary to exit it somehow, or else ESC might give a helpful menu overview or something. In order for your program to read off some such key-buttons such as ESC (for "escape") which are not part of the visible 7-bit character ascii set as indicated above, there is a range of so-called ascii numbers going from 1 to 31, where 32 is the space-bar, and all numbers from 33 to 126 can be used to pick out the visible ascii characters indicated above. In this list, for instance, 27, 8 and 10 correspond to ESC, backspace button and ENTER button. The manual, which is a textfile called F3DOCS.TXT and which you can open in B9 and search on, as indicated above, will explain how you can read of such 7-bit ascii visible and nonvisible characters by the functions KEY and KEYNUM and also whole lines by READLN and B9-READLN (when in graphical mode), proceeding to read the F1..F12 function keys and other function keys like PgUp and PgDn and arrows, and combinations of these with SHIFT, CTRL and/or ALT, by means of FKEYNUM and its related functions. To open the manual in B9, press F1 or press CTR-O (that is to say, press the CTR or CTRL button, hold it while giving a click on the O-letter-button), type F3DOCS, and press ENTER. (You can also type WORD instead of B9 to get it up.) Be careful that you say 'No' as for storing files which you did not intend to change, when you press Esc or open another file with F1 or CTR-O. To open a new or existing program you are working on, taking care not to open huge matrix files or the like which have the same name (check by typing DIR FILENAME outside of F3 if in doubt whether it is used already, usually with suffix .TXT, or with .* for all suffices), press F1 and type the name, like MYPROG1, and press ENTER and ENTER again to confirm. Type in something, then press F2 or CTR-S (that is, CTR or CTRL-button is pressed and kept pressed while you also give a click on the S-letter-button), to save it. Check the name carefully enough before confirming that the file is to be stored to just that name, -- you can always answer 'N' for No and give a temporary filename like TEST3 if in doubt. Then you exit, by ESC, and type DIR FILENAME.* to check what is already used, and to change name, type REN TEST3.TXT NEWNAME.TXT or else type COPY TEST3.TXT NEWNAME.TXT then possibly DEL TEST3.TXT unless, instead of DELeting it, you want it as backup. Backups are a good idea. To start F3 again, type F3 and press ENTER. You can then restart B9, but if you want to get out of F3 while it is in this text mode -- which sometimes is called 'interactive compilation' -- at once -- then you can type XO and press ENTER. In general, for DosBoxes, type EXIT to leave them fully, and, in general, for DosBoxes, type RESCAN if you use an editor that is somehow existing outside of the DosBox area when you modify a file outside of it, or do any other changes to any files within the F3 scientific working area or zone. I think you'll figure out the rest of B9 easily enough by playing around with it with ordinary playful English sentences. It is eminently simple, has few functions, but be aware that by learning certain combinations of them, you can do things which are surprisingly advanced. Note that in programming, we usually don't click CTR-W first, for this Wordwrap is best only for prose. Note also that CTR-C or copy can copy even a single lineshift, which can then be inserted repeatedly with CTR-V, in the middle of lines also, in contrast to CTR-Y which inserts whole blank lines between lines and CTR-R which remove the same. Note also that you can copy up to 270 lines from one file and insert into another file. Then note that you come to an in-built spreadsheet or business space calculator by pressing CTR-D, where you can go back and forth (ESC a couple of times to get back) while calculating numbers, and this spreadsheet can also be started by command SPC inside F3. This, like B9, are all written inside the FIC3.TXT as high-level functions. So, learn the rest of B9 by playing with it! Note about the B9 font that every character is fundamentally different from every other character in usually several ways, so that by getting familiar with the font, you are likely to be able to work very precisely in a relaxed way with it, for the digit 0 does not at all look like the letter O, nor does the digit 1 at all look like the letters L or l, or the letters i or I. Each character of the letter kind is grouped together from the more italic-like digit series, and every character is 'monospaced' in that it is easy to read programs for tinier characters are not pressed nearer each other. In addition, the bright green has proven to be conducive to relaxed, aware alertness in a playful manner during all sorts of computer work, in addition to leading to the pleasant experience of seeing white as pink by the afterglow processes in the retina of the eye afterwards. The mouse is not called on in B9 because to focus on the content of what is done textually, the keyboard has adequately many function buttons on it and so one can relax at the same time as one works hard and well. It is also so that the 768 times 1024 pixel size of the working area, or 3 times 4 in a somewhat prolonged square sideways, provides a sharp focus which doesn't float out in any direction so as to distract. It is then all adding up to provide a meditative focus for the scientist. : How can I find out what ascii number any letter has, quickly? / Answer: You go into F3, type KEYNUM and press ENTER. You then type the button, e.g. big letter A. It is now on the stack. To get the number out of the stack, type POP and press ENTER; or you can also type the left-parenthesis, and press ENTER. : What if I want to work out many characters, and also function keys? / Try the program KEYGRAPH. : How do I start it? / By going into F3, and type :KEYGRAPH IN and press ENTER: Then press this or that, and ESC to leave it. : But if I want to know what the ESC button is? / Then memorize it's 27. : What if a key button doesn't produce any output from keygraph? / Then it doesn't have a function inside F3. : What are all the numbers and stuff anyway? / It's just some flags as for whether or not shift, alt, ctrl buttons are pressed together with function keys; but when you press CTR and a letter, the simplest way to read it all in is by means of KEYNUM, where you memorize that A..Z is 1..26, when pressed with CTR. E.g., CTR-D is 4. : Can I use the FKEYNUM outside of graphical mode? / The KEYNUM and the KEY, and functions which use them, are the only ones really suitable for a text mode. : How do I make the simplest program in the text mode? And in the graphical mode? / The simplest program? Perhaps this one: }Hello world!} POP This one you can either type in, and it will print out this line Hello world! Type then XO to leave F3. Or, you can put a similar program into a file like HW1.TXT -- but then give it please a proper start and completion, in this way: (LET HW1 BE (( )) (( (( }Hello world!} => POP )) )) OK) (LET AUTOSTART BE HW1 OK) Then, having done with these formalities, you start up F3 and type :HW1 IN to start it. The simplest graphical program that does the same requires you to start up the graphics with the font B9, done in command GJ-ON, and then to wait until something like the ENTER is pressed, then go back to text mode by typing GJ-DONE. Since this is several lines, it is a good rule of thumb to do graphical programs at once through a text editor. So get into B9 and type in this program. This is like the HW1.TXT above, but a little more. Try it like this (although if you're in a hurry you can skip the (( and the )) and you can also skip the => and you can even write it more tighly, on a couple of lines, ignoring the two spaces I use for indent -- which you get by pressing the tabulator button, also called TABL, but you got to have the ( with the (LET and the ) with the OK) for these are melted into the function names, in contrast to double (( or )) when these double parentheses stand on their own -- the one big exception is ((DATA, which we will look into in a moment). So put this into a text file called e.g. HWGRAPH1 with the .TXT suffix, and we always use the folder BOEHMIAN or boehmian inside the folder BOEHM or boehm (depending on implementation, the uppercase lowercase may not matter), as the standard start folder. The reason for this standard folder has to do with a very vague inspiration to a MODIFIED understanding of the implicate order idea as launched by the scientist and philosopher David Bohm who was my mentor, through several key conversations (at his office at Birkbeck, especially) very early on. It also rhymes with the pleasant historical place Bohemia, and with interesting english words along those lines, including 'bohemian', which are suggestive of the slightly anarchistic freedom with which a scientist can come to grips with a programming language, wandering freely, with a fresh creative sense of irresponsibility within limits, so as to bring about something very novel and somewhat artistic. So, HWGRAPH1.TXT can be about this: (LET HWGRAPH1 BE (( )) (( (( GJ-ON )) (( }Hello world!} ; 100 ; 100 => B9-POP )) (( A-KEY )) (( GJ-DONE )) )) OK) (LET AUTOSTART BE HWGRAPH1 OK) : What are the numbers 100 and 100 all about? / They are the position within 1..1024 and 1..768 that tells of the x or horisontal and y or vertical, respectively. Try modifying them. : Can we get that text to jump around freely on the screen until I press the ENTER button? / Sure. Just do something like this: (LET HWGRAPH3 BE (( )) (( (( GJ-ON )) (( GOLABEL1: )) (( 100 => GOODPAUSE )) (( CLS )) (( }Hello world!} ; ^1024 FR GETV ; ^768 FR GETV => B9-POP )) (( KEYTOUCH => NOT = GOUP1 === )) (( GJ-DONE )) )) OK) (LET AUTOSTART BE HWGRAPH3 OK) : What does all this mean? / What does what mean? : Well, that 100 => GOODPAUSE for instance? / It means, have a wait 0.100 seconds, a tenth of a second, one hundred milliseconds, don't you know. : KEYTOUCH? / It means, tell whether any key is touched. Really it should normally be fetched (by KEY or KEYNUM) or else cleared (check in manual about MANUAL-CLEAR-KEYBUF -- I hope I spelled it correctly). : What is that GOLABEL1: thingy? / Come on, use your intelligence. It is a label, it tells the GOUP1 where to go to. It goes there when there is an absence of any confirmation from KEYTOUCH. This checking, by the way is written = and ===. It could be written in a larger way, which is more easy to read when there are many lines involved, and which is exactly identically compiled as the above: (LET HWGRAPH4 BE (( )) (( (( GJ-ON )) (( GOLABEL1: )) (( 100 => GOODPAUSE )) (( CLS )) (( }Hello world!} ; ^1024 FR GETV ; ^768 FR GETV => B9-POP )) (( KEYTOUCH => NOT (MATCHED (( GOUP1 )) MATCHED) )) (( GJ-DONE )) )) OK) (LET AUTOSTART BE HWGRAPH4 OK) : Well, but what does the ^ in front of the numbers do? / Ah, that is a good question. I thought you were going to ask the very much simpler question to answer, namely what does the whole phrase ^1024 FR GETV do, or the whole phrase ^768 FR GETV? : Well, what do they do? Provide free fluctuations? / Now your brain is switched on! : They do? / They do. Between 1 and the number given. But how this particular phrase works is a bit involved. First, any number which is given just like when you wrote 100 => POP : When did I write that? / Well, pretend you did write it. That prints 100 out on the monitor when in the text mode, for instance in the interactive mode -- you can just start up F3, type in 100 and then POP and you get 100 out. You have then used, very briefly, what is called the MAIN stack. It is like an internal table where you can put things on top of each other, one on top of another, and you pick the most recently put there off it first. For instance, when you wrote 100 200 300 POP you got 300, didn't you? : When did I write that? / Well, do it now. You get 300, right? : I do. / Then you type another POP, and you get 200. Then another POP, and you get 100. Got it? : Got it. / So that is LIFO last in first out and the alternative is FIFO first in first out and LIGHT3D.TXT has some use of FIFO while the stack structures in F3 at core is LIFO. So the MAIN stack can also handle texts, you did write }Hello world!} POP didn't you? : I did. That used a stack, too? / It did. You could have written }world!} }Hello} POPS POP all on one line like this: }world!} }Hello} POPS POP or even like this (you can use colon up front when there are no blanks inside your little texts): :world! :Hello POPS POP or inside a program, more beautifully punctuated, (( :world! ; :Hello => POPS => POP )) and in this case you also get Hello world! : What is the POPS? / It is POP with a blank after it, rather than a lineshift. This stuff is in text mode, and when doing graphics you always have to position things by pixel x and pixel y, the 1 to 1024 and 1 to 768 you know, so it is slightly more work but it gets more a personal expression then. You use B9-POP typically, there is no such thing as B9-POPS unless you make it yourself for a program which handles some kind of automatic spacing for what you write out. This can be done with a little bit variables, something you do with ((DATA, by the way. Where were we, just above? Oh yes, I was trying to get to what the ^768 and ^1024 are all about. You see there is a bunch of stacks: The MAIN stack The SIMPLE stack The RICH stack and the very exotic RETURN stack And let's not forget the highly important VARIABLE stack. When you are in the interactive mode, you can get a print-out on the monitor directly of what is on top of each of the primarily useful stacks by these words: STK SIMPLESTK RICHSTK VARSTK So when you want to put a number to the simple stack, you can prefix the number with a wave sign, like ~15, when you want it to go to the rich stack, which is also called the decimal number stack, you prefix it with a dollar sign, like $15902342.75, and when you want it -- finally -- to go to the variable stack, you prefix it with a hat sign, like ^32768. A way to remember this is that the wave look like a horisontal "s" while the hat looks like a "v" turned around fully, while richness and dollars are obvious associations, and easily imagined to involve decimals as cents (they are also used for trigonometry and for 3D in LIGHT3D.TXT which is discussed in next tutorial). Now some functions pick things of other stacks than the main stacks, and FR, then, picks it off the variable stack. It also outputs it there. That was in order to make it very fast, as both simple stack and variable stack has a speed the main stack doesn't try to compete with, since main stack must handle texts as well. In general, one uses variable stack for many purposes but the simple stack mostly for temporary storage inside one particular function of some local numbers by means of functions like N1 N2 N3 .. N11, and >N1 >N2 .. >N11. So the word GETV is one way you can fetch something off the variable stack and get it to the main stack. Another way is VARTOSTK. Look up the manual on such things. : That was a lot of explanation for a little phrase. / I know. Then again, it is very very rare that anything works along just those lines, and so a phrase like ^99999 FR GETV is just something one has got to become familiar with by repeated observations and by typing it in several times and having it around. There is another way to do the same as the above, but with a somewhat different and typically a bit more skewed distribution of numbers, and that is the phrase 99999 => FUNNYRFFG. : So I can make yet another version of the program above? / Yupp. Try it. Tell me, how do you think it would look? : Hm, like this? (LET HWGRAPH5 BE (( )) (( (( GJ-ON )) (( GOLABEL1: )) (( 100 => GOODPAUSE )) (( CLS )) (( }Hello world!} ; 1024 => FUNNYRFFG ; 768 => FUNNYRFFG => B9-POP )) (( KEYTOUCH => NOT (MATCHED (( GOUP1 )) MATCHED) )) (( GJ-DONE )) )) OK) (LET AUTOSTART BE HWGRAPH4 OK) / Yes, that's almost right. But you were a bit eager and too focussed on getting the complicated part right -- and you did get it right -- but it is in programming necessary to get all the stupid syntactical things right as well. See the completing line? It says HWGRAPH4 while your starting line says HWGRAPH5. That is enough to make it totally impossible for the computer to start it. So, fix it to (LET HWGRAPH5 BE (( )) (( (( GJ-ON )) (( GOLABEL1: )) (( 100 => GOODPAUSE )) (( CLS )) (( }Hello world!} ; 1024 => FUNNYRFFG ; 768 => FUNNYRFFG => B9-POP )) (( KEYTOUCH => NOT (MATCHED (( GOUP1 )) MATCHED) )) (( GJ-DONE )) )) OK) (LET AUTOSTART BE HWGRAPH5 OK) : Yes, I see. Can I really drop putting in arrows like => and such? / Yes. It is optional punctuation. But it may be helpful for you to know that the earliest forms of the language, when I called it Firth, didn't have any of this and the speed of programming was greatly increased by introducing -- though purely as a convention -- this stuff. : Is it always a convention? / Well, there are some cases where you have something a bit similar, which has got to be done right, though. And a good example is variables. You have two types of variables, put simply. One kind is created afresh as 11 new slots in the simple stack and named N1 to N11, and then dropped after the function is exited, so -- unless the simple stack is modified deliberately, these are local to each function. The other kind of variables are called global or common to the program, they are available as soon as you have done something like ((DATA YEAR-NUMBER 2011 YEAR-NUMBER < INCVAR )) but you cannot ignore the (( prefixing the ((DATA, nor can you skip the << prefixing the <>> => POP )) and here do please be aware that >>> is entirely necessary and very far from merely a convention. So you COULD write YEAR-NUMBER >>> POP instead, but the >>> is of a different category altogether: it means, go get the value of the variable whose address is now existing at the variable stack. : Repeat that please? / Try it as an experiment. Start up F3, then type ((DATA YEAR-NUMBER )) That creates the YEAR-NUMBER. Then give it a value, like 1000000 YEAR-NUMBER <