pfth - An ANS Forth Interpreter for the Prop

1356711

Comments

  • ctwardellctwardell Posts: 1,701
    edited 2012-11-05 - 14:22:57
    D.P wrote: »
    How about all the forths focus on the WIZ820io module, how about Ray's Logic PTP2 board and touch screen etc, so many "things" that end users actually want to use and control but it seems all the time is spent being able to download some ANS version of "Dinning Philosophers" in some ANS new prop language, getting it to "compile and run" and the developers call it success. Making gadgets that help people is success. Tachyon has a great start on this effort at the bottom of this page: https://docs.google.com/document/pub?id=1bEH0DfGmu99M1SqCbmlzl991Ssv2J5m6XWmkJX0XSl8

    Go ahead, flame on, I'm working on equipment so small organic farmers can feed all those who can't / won't be able to feed themselves without having to eat roundup et al.

    I have great respect for all of you who have spent consideral time and effort to gain mastery of your fields, just all the "standards" wars drive me nuts. If we all followed "the standards" Chip would never have created the Prop and we would all still be stuck in interrupt hell.

    Wow, now that's a novel way to make friends and solicit help.

    C.W.
  • D.PD.P Posts: 790
    edited 2012-11-05 - 14:35:49
    ctwardell wrote: »
    Wow, now that's a novel way to make friends and solicit help.

    C.W.

    Your comment makes no sense, I stated some observations, comment on the observations, just the data please. You must have missed the respect line and felt my desire to have so many of these brain cycles devoted to what I see as more crucial, that is the subjective part of which I am open to criticism. As far as friends I have facebook right? /sarc
  • prof_brainoprof_braino Posts: 4,312
    edited 2012-11-05 - 15:36:13
    Dave Hein wrote: »
    It has been interesting learning the internal workings of Forth, but I don't see much point in continuing work on an ANS Forth interpreter. It appears that Forth developers have little interest in standards and portability. I'll clean up a few more things in pfth, and post a final version in a day or two.

    I thought it was a good, interesting discussion. Your ANS forth fits Loopy's request for a standard forth. The question of making all forth fit a standard or the percieved need to conform to a standard is the point I was addressing. We don't say "68000 assembler doesn't conform to "assembler" because id doesn't support x86 instructions", and vice versa. Instead we say 68000 assembler does what 68000 assembler needs to do, and x86 assembler does what x86 assembler needs to do. Both are fine, but different.

    Same with forth. Forth on the prop might be optimize towards the prop (away from the standard) or away from the prop and more towards the standard. Both are valid, depends what you want to do. We might WANT to just recompile a program and have it work on a different processor, like Linux on the PC or Linux ion the Pi, but is a level lower than that, it more similar to assembler.

    It just a little different (in my eyes) than your model. But that's no reason to bail on your project. Its still cool and use full. AND I want to see if Loopy and implement the extensions so code that runs on you forth can also run on propforth. That would be totally. cool.
  • User NameUser Name Posts: 1,451
    edited 2012-11-05 - 15:56:54
    The beginner needs ALL the "Starting Forth" words to be supported to acquire enough knowledge to build off of. If anyone chooses to leave them out of their own personal version of Forth, that version is rather useless to new learners.

    I couldn't disagree more. But I certainly don't care to fight about it. Perhaps it has to do with what sort of beginner we are talking about. For a beginner to microprocessors and programming, perhaps what you say is true. For a beginner to Forth, no. Tachyon Forth is at least as assimilable as any other implementation, perhaps more so because there is less bloat. Define your own words if there is a specific deficiency.
  • Ron SutcliffeRon Sutcliffe Posts: 420
    edited 2012-11-06 - 03:04:54
    @David

    I am very sorry to here that, keep us posted on the final single cog version.
    Meanwhile I am going to revisit First & Third. This will be my third look at
    a tiny forth kernel. I still can't read Buzzards C, its more like BCPL than any C I know.
    I don't post to the Forth forums nowadays, but i did want to show support for your endeavours.

    Cheers

    Ron
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-11-06 - 03:22:24
    @User Name
    I presume rank beginner, you suggest otherwise.

    Can you objectively define 'bloat'. For instance, the word PAGE has been considered bloat by many posters here, but for me the word is making learning much easier. Learning Forth is very interactive and one must work through the examples until they get acclimated to RPN and accurately including white space. The sceen gets very cluttered and hard to read, so one types PAGE to begin another session of effort with a blank screen.

    In other words, for Forth - one man's bloat is another man's necessity. It is just not the same as the bloat the MS provides in Windows versus the lean-ness of Linux. Unlike other computer programming languages, Forth allows the user to discard or rename key words at will - a very confusing attribute.

    I have no difficulty with accepting that Tachyon Forth is quite useful for a user that is already quite comfortable with SPIN and PASM. It is a fast, interesting, and useful tool for such users.

    On the other hand, Parallax tries to reach people that are completely new to electronics and micro-controllers. And for them, a different and possibly more traditional approach is needed to get going. The lexicon of Fourth can be anything an individual creator wants it to be. It can either be very transparent by adhering to the same words that Forth has tried to preserve for decades; or it can become extremely opaque by using an alternative lexicon for nearly all and everything or tossing out much of what a new learner thinks they need to have a 'real' Forth language.

    BTW, TachyonForth is warmly welcomed to the Propeller platform.

    I have just tried to show that there are people that need a methodology provided for a much lower level than what Peter presumes. I personally don't think I could learn Forth by following his lead. He just looses patience with me.

    If anyone provides a new language for the Propeller - not just Forth - any language, then should realize that some of the people that are interested in it are going to be rank beginners. It just happens that in Forth, many of the most adept users and developers make lousy teachers.

    It is the same with the average native English teacher trying to teach English to beginners in Asia. Being highly adept in a language doesn't mean that one has the patience or is aware of the point of view of the beginner.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-11-06 - 03:36:07
    Dave Hein wrote: »
    It has been interesting learning the internal workings of Forth, but I don't see much point in continuing work on an ANS Forth interpreter. It appears that Forth developers have little interest in standards and portability. I'll clean up a few more things in pfth, and post a final version in a day or two.

    I am really sorry to hear this Dave. I suspect that we have both learned a great deal about what Forth is and why it has been set aside by much of mainstream computing.

    It seems the only safe thing to do with Forth is to shut up and just use it on your own. Flame wars usually occur between different languages or different hardware environment. Fighting over each and every word in a Forth lexicon is completely absurd. And of course, we seem to have some rather entreched 'minimalist' when Forth is brought into a small environment.

    On the one hand, I feel Forth is extremely powerful and useful. I also feel it is a very good educational topic. But it seems to tear apart its own world with all that power and utility.

    How odd! How very odd.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-11-06 - 03:50:45
    mindrobots wrote: »
    You, sir have been away from the American Public Education System for too long. Good teaching is to prepare your students for the standardized testing so your school district can rank higher in the state rankings. A secondary function is to make sure the little leave school with the proper ideology and mindset. Tools for investigative learning, experiential learning, synthesis of ideas and questioning the world have fallen off the list of goals in most places.

    I personally think "if you've seen one Forth, you've seen one Forth" is a classic! :0)

    Public education is not real learning in the truest sense. Much of it is baby-sitting. The American system has actually set the bar pretty low. If you graduate from high school, you can make change at a 7/11 or write down a phone message for someone else.

    If you don't graduate from high school, you have to move furniture or dig ditches for a living.

    Nearly all that the USA educational system offers could be finished by grade 9, but students are kept in school for another 3 years as child labor laws don't want them taking jobs away from older folks.

    Most of us would have benefted greatly and matured more by finishing school at grade nine and learning about work and responsiblities at a much younger age. But instead, the movie and music industries exploit high school and university as periods of self indulgence.

    Still, really teaching and teaching well is both personally and materially rewarding.

    Try to be part of something good, rather than accept something as necessarily bad. It is the only way for the world to not get worse, and possibly get better.
  • prof_brainoprof_braino Posts: 4,312
    edited 2012-11-06 - 05:17:32
    ... rank beginner, .... (versus) otherwise.... 'bloat'. ... the word PAGE ...In other words, for Forth - one man's bloat is another man's necessity.

    YES! This!


    I have just tried to show that there are people that need a methodology provided for a much lower level than what Peter presumes. I personally don't think I could learn Forth by following his lead. He just looses patience with me.

    YES! Good for Peter, and good for you for recognizing that! This is why I don't use Tachyon. It seems to me like the Reevers running with no shielding on their engines. Very cool, but very dangerous to a newcomer.
    If anyone provides a new language for the Propeller - not just Forth - any language, then should realize that some of the people that are interested in it are going to be rank beginners. It just happens that in Forth, many of the most adept users and developers make lousy teachers.

    I second my own nomination for Loopy to implement ANS compatibility extensions for prop forth, goal being the the same examples for Starting Forth that run on pfth also run identically on propforth. Then the next step would be to do the same for Tachyon, but that might be an advance exercise for later.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-11-06 - 05:54:23
    I am just trying to follow Dave Hein's lean and exit quickly. I have strong suspicions that Forth is addictive and may lead to extreme personality changes. Should I be encouraging newcomers to come hither?

    The problem is that I suspect it is already too late for me. I will always be a 'closet Forth enthusiast' with potential anti-social tendencies, maybe I will found a 12 step program to manage the propblem.
  • Dave HeinDave Hein Posts: 6,020
    edited 2012-11-06 - 06:19:10
    Loopy, I'm not exiting from Forth entirely. I've just lost motivation to continue to work on an ANS Forth interpreter. I encourage you to continue to master "Starting Forth". I think you are close to getting it. As I've said before, "Starting Forth" is an excellent tutorial, but it does require a Forth interpreter that supports the words used in the tutorial. There are a number of Forth interpreters that run under Windows/Linux/Mac that you can use for learning. You could also use pfth on the Prop, but it currently requires using SimpleIDE to load it. I'm working on making it stand-alone so you don't need SimpleIDE.

    As prof-braino said, you could also use PropForth, but you have to write the words you need yourself. I find that comment a bit surprising. That's like telling the student to write his own textbook, and then teach himself from it. I'm befuddled by the strong anti-standard view by Forth programmers. They'll let you run ANS forth on their interpreter, but they can't be bothered to write a single word to help you. It's like their finger tips will burn if they type a single ANS word on their keyboard.
  • potatoheadpotatohead Posts: 10,038
    edited 2012-11-06 - 06:51:44
    I for one am interested in running a full ANS-Forth for learning purposes, and thanks for producing one Dave.

    My interest is:

    1. Broadening my perspective. Forth has already done that. It's different. Really different.

    2. Potentially applying it to a project. Not sure whether or not that will happen at this point.

    3. Fun. Forth runs on a lot of stuff, new and old, and I have enjoyed the experience so far. I'm now able to knock out some words that do stuff, loop, branch, compute. One notable thing is it seems to move quick once a person begins to get it. Messy too, because one can just type it in and go! I suppose that goes with the syntax basically being a mandatory white space between words... One big hurdle that got me, until I read through the kernel code linked here is that every single thing is a word! It hit me when trying to figure out why comments didn't work until I put one white space after the begin comment character... Another is the obtuse little shortcut words. I would almost have preferred those be short three letter words, though that would increase the typing. I find I can memorize and associate those with concepts much quicker than I can just a character does X, but that's just me.

    Tachyon got me thinking about Forth, due to how Peter brought it up quickly. That's a nice skill to have.

    Making pfth stand-alone is a good idea. IMHO, that will serve to help people grok the language and build some stuff. Ideally, they can then go and parse whatever target Forth they have in mind so they can build on that.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-11-06 - 07:29:45
    @potatohead
    I am still learning how ot cleanup messes and retain a good image of what I want.

    FORGET is supposed to do the housekeeping for you, and maybe it works as it is supposed to in Tachyon Forth. In PropForth, they remove older versions of the same word when one uses 'saveforth', so FORGET may actually remove all traces of a redefined word and all the redefined words following it when used after 'saveforth'.

    I suppose some could use that feature to get rid of a word. First redefine it, then call 'saveforth' to remove the oldie. And then use FORGET to remove the newbie. Very weird. but useful.


    Then there is the possibliity of editing files for input, while using the console interface to merely confirm that the new words are properly accepted. Then later inserting the edited document via a cut and paste into a to be compiled version of the Forth image.

    In other words, once the basics of the language are mastered .... the next step is to become competent in managing your own dictionary in entirety.

    I am nowhere near that, but I can see that it is easily possible.

    Good luck.

    Today's new word == prop-blem - a dilemma specifically created by learning to use a Propeller.
  • potatoheadpotatohead Posts: 10,038
    edited 2012-11-06 - 08:02:36
    Yes, exactly. I'm not there either, though I have played with establishing a Forth environment.

    Interestingly, on the Apple Forth I tried their instructions were to duplicate the Forth before doing anything. Then work on that one however you want to, which is what I did. On that one, there are the blocks and screens, some of which have a purpose. The Forth came bare nubs, only the words needed for building others, and a few system specific things. From there, you either build your own, or load some that are supplied. They had a set of much nicer, extended words, graphics, etc... You load them, they get compiled right then and there, and the Forth is both bigger and more robust.

    I think the right approach on this is to learn the language, then build words you find necessary, then attempt the task at hand. If successful, archive that, then weed out the crap by putting the needed words into an input file. Then, start with vanilla Forth, whatever that is, and "build" the task or application. If that works well, then configure that Forth to run it, however that is done for the Forth being used.

    The thing to me about Forth is it hides a lot of stuff. Minimal. One needs to either build habits that work for many tasks, or if it's not a daily thing, keep documents that detail the meta info needed to apply Forth as intended. Other languages build a package, executable, etc... and they tend to be more self-documenting and or standard in this way, meaning fewer documents and bits of arcane info are needed. Forth is very lean, and this is intended as one literally builds a Forth to do what is needed. That *IS* the package in the end.

    At least that's my take on it so far.

    So then, something like Tachyon is aimed at Forthers who have those habits, or will build them so that coming up with code that does whatever needs to be done happens rather easily, with words and means that make sense to that person. IMHO, that quite literally means learning something about how Peter does things, so that his Forth makes sense, even though it might not make sense generally otherwise, due to how he did his Forth.

    This is true in more cases than not, from what I can tell. Forth is so lean and minimal, this kind of approach is going to happen a lot, particularly in the embedded space where extras really don't make sense.

    I don't think people build applications and such with Forth. What they do is bootstrap systems and get things done, and when they are done right, the environment is just finished! IMHO, a different mindset, but an enlightening one for me personally. Again, I've enjoyed this, and will continue to learn some. Forth will never replace SPIN + PASM or C, but I totally will get to a point where I can bring a Forth up for bootstrapping and such. Long journey for me still.

    Toward that end, a stand alone pfth makes a lot of sense. Start with that as a seed, get whatever it is done, "save forth" however that needs to happen, and the package is complete, task done, next.

    Maybe the biggest difference is being *IN* the environment doing stuff as opposed to maintaining this outside environment to build stuff that then does stuff when loaded. Executables vs a system. Forth is a little system. Damn cool, unless I have it horribly wrong!

    Re: save forth, operation of FORGET.

    Yeah. That's the hard part and kind of a dilemma. One needs to learn Forth to then understand how the Forth they are learning on does things! Precisely the point of pfth. I actually found it quite useful to run the old Apple Forth alongside the Propeller Forths. It highlighted where those differences are quickly! I didn't even know to identify them, nor what all of them were. (still don't, I am sure)
  • Ron SutcliffeRon Sutcliffe Posts: 420
    edited 2012-11-06 - 08:46:40
    Forget rwinds the dictionary from the last word that was added to the dictionary to the first occurance of the word you want to delete. Everything between is removed.

    Saveforth is applies only to Propforth. It saves the current state of the dictionary and includes the words added in the current session. Saveforth does not remove old duplicate words. upto verson 5.00

    Ron
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-11-06 - 09:54:12
    Loopy,

    You still have a misunderstanding of saveforth. On your "poking along" thread, I perpetuated a misunderstanding about saveforth compressing the dictionary in post #8, I have since deleted that misunderstanding, I am sorry for the confusion.

    Post#11 in that head has and actual example of using saveforth and forget and a better explanation off how saveforth reall works what it does ans the ONLY thing it does is in post#44 of that thread. Please review these and I think your saveforth and forget issues may clear up.

    I'm behind your learning process and what you are tackling but t times I'm unclear as to the motive and intent of you debate and comparisons. Neither PropForth nor Tachyon are ANS compliant and everyone agrees on that. If you want ANS compliant words, they can be added. As they stand , they are not compliant and the authors hav either things on their plates at the time or recurrent users as happy with them as they are. If the "community" wants compliance, they can provide compliant words.

    An analogy: if I'm learning to drive and my friend has a high-performance sports car and will loan it to me for my training. After struggling with the clutch and shift and big engine and also learning the rules of the road, I'm probably not going too suggest tit would be easier for me to learn to drive if it had an automatic and maybe a back seat so my driving instructor could ride along. I'm also not going to write to the manufacturer and tell them they should redesign their roadster so it has a covered utility bed since I'm planning on being a general contractor and need to carry stuff....oh yeah, a 1 ton trailer hitch would be nice to.

    Far fetched, maybe, but that's what some of your posts about ANS feature lacking in Tachyon and PropForth remind me of.

    I think everyone is trying to help you answer and understand you questions relating to the various Forths. If we can compare and contrat, we do for the ANS things we understand. Dave even wrote an ANS compliant Forth during the time these discussions have been going on.(YAY, Dave!!!!!!)

    What are you trying to achieve at the end of all this?

    • ANS compliant PropForth and Tachyon? Probably not going to happened unless you or someone interested in it with the time writes the words.
    • Better tutorial documentation? YES, Yes, yes - that is needed. I stated that and embarked on an interrupted journey to do that when I start using PropForthback with 4.x - 5.0 changed thing significantly and 5.3 is adding feature and changing things again. Now, I may have lost some of that beginner's innocence but I plan on trying if 5.3 is ever released and if it settles down some. Part of the problem with documenting Forths is that it is extendable and such a fungible (such a fun word to work into daily use!!) language that it never goes nailed down enough unless you have a standard.
    • A list of words and their alternates? Forth is probably on e of the few computer languages that would benefit from a thesaurus in addition to a dictionary! This is a great goal and something that would be useful but two of the three Forth in you study are quite volatile as far as words being added beyond the core.
    • Learning Forths? Well you're probably learning more about some Forth aspects than you imagined.

    It's fun to follow along because I'm learning too and good things are coming from it but it your goals were better understood, some folks may not get so frustrated by your persistence in some areas. I've lost you focus at this point and don't understand your sources of frustration.

    Please help us help you.
  • prof_brainoprof_braino Posts: 4,312
    edited 2012-11-07 - 07:12:19
    Dave Hein wrote: »

    As prof-braino said, you could also use PropForth, but you have to write the words you need yourself. I find that comment a bit surprising. That's like telling the student to write his own textbook, and then teach himself from it. I'm befuddled by the strong anti-standard view by Forth programmers. They'll let you run ANS forth on their interpreter, but they can't be bothered to write a single word to help you. It's like their finger tips will burn if they type a single ANS word on their keyboard.

    I seems to have a different understanding of "standard" than others. In my small experience, I have noticed that in regulated industries (medical, aviation, aerospace, nuclear) "standard" means "when we use these words we talk about this concept". So we all can be on the same page, regarding understanding. In practice, we can do what ever we need to do to get the job done. When we need to deviate from the standard, we have to tell folks what we did and why. So standard does NOT mean "obey these rules or you don't get to play" it means "give us a clue when you are doing something other than what we expect so you don't get somebody killed". There are OTHER rules that must ALWAYS be adhered to, these are governed by regulatory agencies and federal law, etc. But there is a clear difference between rules and regulations which MUST be obeyed, and standards which are a general yard stick.

    In the case of propforth, we say, quite clearly, this is not an ANSII forth, is not intended to be, and ANSII compliance will never be a main goal as part of the main development path. But users can do what ever they want. BOOM. Done. We have identified the differences (specific to prop architecture) and complied with governing laws and regulations (none).

    Be reasonable. Would you say since the Quickstart has an LED for "blinky LED", that therefore the prop protoboard is "suprising" because it doesn't include a blinky LED? And then demand that parallax add an LED to all protoboards to fit your whim? Silly. You would simply add one IF you wanted one.
    They'll let you run ANS forth on their interpreter, but they can't be bothered to write a single word to help you.

    Now this is truly funny. :) I might have mentioned this before in another post, but since you bring it up, please look at

    http://code.google.com/p/propforth/

    There are substantially more than a few words here to help you, although the actual helpfulness is in question. In particular, look at

    http://propforth.googlecode.com/files/ANSI%20Escape%20Sequences20120704-1652.f

    This is a fairly complete example of implementing a set of extensions to add a set of non-kernel functions, in this case for ANSII terminal emulation. I did this as an exercise to teach myself about ANSII terminals. So yes, maybe it is asking users to write their own book and teach themselves. Maybe that's how it works at first principles. You learned about forth by writing a kernel. But nobody is demanding that you tailor it to the prop (a reasonable request, but in the opposite direction of you efforts).

    RE: ANS compatibility extensions and propforth to pfth portability: I still think Loopy should go for it. This is how HE wants to learn, and he would become the expert.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-11-07 - 07:42:02
    Just take the original "Starting Forth Lexicon" (not the one with Chapter Three removed as that is merely a working paper) and list it in any order you like.

    Have that be the first of three columns.

    In the second column note which items have been renamed in your own version.

    In the thrid column note which items have been omitted in your own version.

    And in closing, just mention that GForth, SwiftForth, etc are available for FREE on regular PCs to study the complete "Starting Forth Lexicon" as intended if one uses the latest on line verson of "Starting Forth", which is free at Forth,Inc's web pages.

    Dave Hein is correct. Asking the student to start out by writting missing definitions is a chicken and egg dilemma. If they know how to write that much Forth, the exercise would be unneeded.

    Can we move on from all this proceedural stuff and just get on with enjoying learning what we can from what is available? It seems that the resources are adequate and nobody has to get deep into creating a lot of new documentation or adding a lot of work to their own and already ambitious development agendas.

    And if you can't see your way clear to creating a 3 columned comparitive listing, I will write up something that will ask the beginners to do it themselves.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-11-07 - 07:51:57
    @Mindbots

    Thankyou for your diligence about 'saveforth' and 'forget'. Not only is it helping learn these words. I now see how I can check a lot of things for myself. And with Forth, the enduser really has to check what is what if one is to have any hope of keeping it under gentle control.

    ANS Forth 94 is only important to me as a point of departure for the new learner. We certainly don't need to go back to Forth 79 or Forth 83 and there is really nothing after ANS Forth 94.

    Unlike Dave Hein, who feels strongly about what a standard is, I do see that standardization of Forth is quite a slippery slope when compared to other computer languages. WE in the Forth on Propeller community don't need to have a particular standard so much as a good starting point with a reliable text. That is all I personally have hoped to achieve.

    Outside of that, the visions and ambitions of anyone that writes a Forth for Propeller are really nothing that I feel the need to take sides with. And I merely started with PropForth as it seemed the easiest entry point at that point in time.
  • Dave HeinDave Hein Posts: 6,020
    edited 2012-11-07 - 08:16:34
    prof_braino, our views on standards are so much different it isn't worth discussing here. As far as helping Loopy implement some of the "Starting Forth" words for PropForth it might be good if you could show him a few examples. I'm not saying that we should do all his homework -- just provide a bit of guidance by posting a few samples of the "Starting Forth" words as implemented on PropForth.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-11-07 - 08:33:16
    potatohead wrote: »

    So then, something like Tachyon is aimed at Forthers who have those habits, or will build them so that coming up with code that does whatever needs to be done happens rather easily, with words and means that make sense to that person. IMHO, that quite literally means learning something about how Peter does things, so that his Forth makes sense, even though it might not make sense generally otherwise, due to how he did his Forth.

    This is true in more cases than not, from what I can tell. Forth is so lean and minimal, this kind of approach is going to happen a lot, particularly in the embedded space where extras really don't make sense.

    Actually, you have hit upon one of the pitfalls of a natural language. We all learn language and communications from those we are closest to, not from a standard or a book (Those things come much later in childhood).

    Peter pretty much wants to instruct others in Tachyon in a very natural way as he views. And there seems to be quite a loyal following of users that are willing to go along. And because they share enough common knowledge of PASM, SPIN, and programming in general it is working.

    So they feel there is no need to change it, AND they are probably right.

    But when someone tries to enter that community without enough prior knowledge and has looked at other approaches, Peter is upset and the whole community becomes upset. It almost has the feel of a tribal society. But my take is that the tribe is operating at a rather high level and doing no real harm, so let them enjoy themselves if they want to do it that way. At this point I am not concerned with the ultimate Forth on the Propeller, I am more concerned with 'What is Forth and can I use it on this?'

    Let us live and let live. Just don't barge in and tell others that they cannot find their own path into using Forth on the Propeller. We were all beginners once and I certainly have started very far behind. There are enough resources to go around and what may evolve is very dynamic and informative to all.

    If TachyonForthers want to view themselves as the high priest of Forth on the Propeller, I see no harm in it as long as rank beginners are not prevented from learning something in their own way. We have PropForth and pfth and whatever else may come or go.
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-11-07 - 08:55:00
    What if you think of ANS Forth the language standard - you can get a book on (American) English and learn the rules of (American) English grammar. All youse guys are gonna totally learn dis language, dontcha see? It's gonna be rad, y'all!

    Treat PropForth as a regional dialect - you may find some writing and papers prepared by early adopters but you probably can't buy a (serious) book on it like "American English Grammar for the Southerner" (please hold on the numerous potential jokes here). The people that speak the regional dialect may not think they talk funny and may think you talk funny instead. There's no real reason to teach the dialect, if you move into the region, you will catch on through assimilation.

    Finally, treat Tachyon as a technical Jargon for a specific field of study....even an advanced field of study...the only way to learn it is to work in the field and because the lead researcher is also out on the cutting edge still developing "jargon", it really is a small community that can fully understand it and use it. He's a helpful mate but the jargon just came about so he can express himself efficiently in his work and lab notes. He will help when he can and provide support where he can and maybe even change his jargon if it helps express the ideas but there's really no easy way to learn Jargon unless you experience it. It is the most living of living languages!!
  • potatoheadpotatohead Posts: 10,038
    edited 2012-11-07 - 08:59:54
    You know, I don't see it as upset.

    There are ways to frame questions that get at answers better than other ways. Really, that is the only challenge I see here. I don't want any of it personal. Just fun. And I find Forth fun on a few levels. It isn't productive for me yet, but that's me.

    I posted that as help. Some insight as to how others see things helps a lot when learning their Forth. Each one has a history of sorts, and that history tends to clarify how to deal with the language as implemented.

    BTW: (and please, for the love of all that is geeky and good don't let this start some war)

    A great example can be seen in C right now. There is some history behind our C efforts. There are decisions made that are more easily understood when that history and thinking process is examined.

    And there is GCC + that LLVM. Understanding that is similar, and hopefully gets at what I'm trying to say, not distracting.

    Now, when we start the "is better?" or, "is right vs wrong" discussions, it all gets ugly. Don't want to go there. Prefer options and understanding, and of course, that's just me.
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-11-07 - 09:10:17
    Actually, taking the Lexicon and matching and mixing to come up with synonyms and pointing out the traps of homonyms sounds like good geeky word fun! I can see myself sitting down in from of the television or fireplace for a good round of "3 Column Lexicon"

    [TABLE="class: grid, width: 421"]
    [TR]
    [TD]ANS
    [/TD]
    [TD]PropForth
    [/TD]
    [TD]Tachyon
    [/TD]
    [/TR]
    [TR]
    [TD]Children
    [/TD]
    [TD]: children Kids ;
    [/TD]
    [TD]: children BILLY_LIDS ;
    [/TD]
    [/TR]
    [TR]
    [TD]: kids children ;
    [/TD]
    [TD]Kids
    [/TD]
    [TD]: kids BILLY_LIDS ;
    [/TD]
    [/TR]
    [TR]
    [TD]: BILLY_LIDS children;
    [/TD]
    [TD]: BILLY_LIDS Kids;
    [/TD]
    [TD]BILLY_LIDS
    [/TD]
    [/TR]
    [/TABLE]

    Now you are portable across all languages provided the base definition in each language is functionally the same. If there are functional differences or no synonym exists, then the translating words get more complicated.

    If we make it a game, then we should be able to pick a word, go off and translate it with the assurance that nobody else has that word. You don't want everybody off translating the same words!
  • Dave HeinDave Hein Posts: 6,020
    edited 2012-11-07 - 14:22:49
    Meanwhile I am going to revisit First & Third. This will be my third look at
    a tiny forth kernel. I still can't read Buzzards C, its more like BCPL than any C I know.
    I was able to get First to run on the Prop. I interfaced it to filetest.c so I would have a small shell to run it from. It an XMMC program, similar to pfth. I also unobfuscated the source code so it is easier to understand. The source is contained in the attached zip file.

    You can build first to run under cygwin or linux by typing "gcc first.c -o first". Type "./first" and it will print a usage message. Type "./first demo1.1st" to run the first program. Type "./first third demo1.th" to run the demo1 third demo program. Type "./first thrid demo*.th" to run all of the third demo programs.

    You will notice some debug prints that print everytime Create is called, and after the end-of-file for each file. The EOF print shows the values of the various stack and memory indices. Use "-stdin" to use the stdin for input. I added a "bye" command to exit from standard input. There is also a "-init" command-line parameter that should be use if you want to re-initiialize the dictionary. This would be used to do something like "./first demo1.1st -init third demo1.th".

    When running on the prop you would use a similar syntax in the filetest shell. The main difference is that first is not reinitialized every time you run it, so you would do something like this:

    > first demo1.1st
    > first -init third demo1.th
    > first demo2.th demo3.th demo4
    > first demo5.th demo6.th -stdin

    I've learned quite a bit by working with first. The third program and the design document provide a lot of eduational information about building a first/third/fourth kernel. However, first is extemely slow. I think it demonstrates that its best to start with a kernel that contains a few more basic forth words.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-11-08 - 00:50:51
    In the 'for what it is worth' department.

    I have begun to write a HOWTO Learn Forth on the Propeller for the complete beginner

    And it is intended to have them start with "Starting Forth" on a regular personal computer or on any Forth on Propeller that chooses to support the "Starting Forth Lexicon" with exclusions of Chapter 3 and the word BLK in Chapter 9.

    Then they are guided to do their own survey of similarities, omissions, and renamed items between the 'Starting Forth Lexicon" and what the new mainstream Forth on the Propeller provides.
    .
    After that, it recommends learning Propeller aspects in depth -- i/o, cogs, and so on.

    And finally, it recommends learning how to retain modified Forth dictionaries according to personal preference.

    I'd say I am 2/3rd through this. So I may have something in a day or two.

    My goal is to provide something that eliminates all the need for debate about point of entry and frees all the Forth on Propeller developers to do as they wish.

    It will be up to the new user to self-evaluate which Forth on the Propeller best suits his or her abilities. And the new user will have to decide if they are a complete beginner, an old Forth user in need of review, or an expert Propeller user that feel they can cope with getting up to speed without these more basic presentations.

    The document does NOT claim that this is the only approach that will work. I merely hopes to offer one of the more painless ways to get started.

    I hope this will make it easy for everyone.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-11-08 - 01:01:30
    mindrobots wrote: »
    What if you think of ANS Forth the language standard - you can get a book on (American) English and learn the rules of (American) English grammar. All youse guys are gonna totally learn dis language, dontcha see? It's gonna be rad, y'all!

    Treat PropForth as a regional dialect - you may find some writing and papers prepared by early adopters but you probably can't buy a (serious) book on it like "American English Grammar for the Southerner" (please hold on the numerous potential jokes here). The people that speak the regional dialect may not think they talk funny and may think you talk funny instead. There's no real reason to teach the dialect, if you move into the region, you will catch on through assimilation.

    Finally, treat Tachyon as a technical Jargon for a specific field of study....even an advanced field of study...the only way to learn it is to work in the field and because the lead researcher is also out on the cutting edge still developing "jargon", it really is a small community that can fully understand it and use it. He's a helpful mate but the jargon just came about so he can express himself efficiently in his work and lab notes. He will help when he can and provide support where he can and maybe even change his jargon if it helps express the ideas but there's really no easy way to learn Jargon unless you experience it. It is the most living of living languages!!

    While Linguistic analogies can be interesting. The simple fact is the learner has to start somewhere and then go where they think they will get the most rewarding experience. All this speculation and analogy is just speculation and analogy.

    The ONE thing I have learned about natural language learning is that you keep learning more and more and books about learn language become less and less a part of your learning experience -- eventually you observe for yourself, ponder a solution, and resolve issues on your own.

    Forth is so similar to natural language learning in this way that trying to get into standardization and documentation is likely a huge quagmire. One just needs the benchmark to get started.

    The actual study of Linguistics often seems to raise far more questions that it answers and becomes a huge distraction. In the end, one is left with even a big mystery of what language really is.
  • Ron SutcliffeRon Sutcliffe Posts: 420
    edited 2012-11-08 - 01:08:31
    @David

    I missed your post re your work on the buzzard FIRST code, good to hear that you got it sorted. You have opened up Forth to others who may now decide to take a look at a Forth compiler. Thanks for your endeavours.

    BTW
    I am not a C programmer. Jazzed encouraged me to try C when Imagecraft first released C.

    Having spent more years than I care to remember using micro's AKA Signetics 2650...Z80 for controllers coded in ASM and Forth, C was a steep learning curve, but I did have a good mentor in Steve :) I use GCC a little but I am at home with Forth any Forth.

    @Prof RE The second link of your last post.
    I pointed out 2 bugs shortly after you put that code up on the Google site. You have fixed one, the other one is still there. You need to catch invalid hex code AKA G to Z etc See if you can spot the problem in you code.



    Ron
  • Ron SutcliffeRon Sutcliffe Posts: 420
    edited 2012-11-08 - 03:43:50
    David

    Your code is a breeze to follow. I need to sit down and digest. I don't see speed as an issue at this stage.

    Cheers

    Ron
  • prof_brainoprof_braino Posts: 4,312
    edited 2012-11-08 - 04:55:46
    I pointed out 2 bugs shortly after you put that code up on the Google site. You have fixed one, the other one is still there. You need to catch invalid hex code AKA G to Z etc See if you can spot the problem in you code.

    Sorry, this is off topic, and should not be in this thread. Please provide enough info so I can open an issue inthe google code site?
    If a "bug" cannot be reported to the extent that it can be reproduced, it usually cannot be considered a bug.
    If you found something, please explain what it is, and how to reproduce it, and why you think its a incorrect.

    Remember, propforth also works with base 63, for packing assembler code, and this is of course by design. Is this what you saw?

    In any case, issues are not "bugs" until we can identify a functional requirement that is violated, and we either either fix the requirement or the code.
Sign In or Register to comment.