Menu

Vocabularies in Flashforth

2023-05-20
2023-10-16
  • Fred Zelders

    Fred Zelders - 2023-05-20

    Any thoughts about vocabularies (definitions, current, context) in flashforth?

     
  • Mikael Nordman

    Mikael Nordman - 2023-05-21

    What is the need for vocabularies? For me they just add complexity. I have always found the vocabularies syntax confusing.

    FF is a bit different from "normal" Forths. FF does not allow redefinition of words. I think redefinition must be allowed in order to support vocabularies.

    In FF WORDS have an optional filter that help me find particular words in the dictionary.
    And in FF-shell I have #help which has the same optional filter.
    With these I can for example check which division words exist in the dictionary ( WORDS / ).
    And then check which parameters these use ( #help / ). This is one check I use a lot, I never remember which words needs which params.

    Now and then I have thought about expanding or ANSifying FF, but have not found the need for that. The current version is good enough for writing small applications.

    Dxforth pointed out a bug in .r and u.r ( do not print preceeding zeroes) that could be fixed, causing a small incompatibility with existing code. And he wanted redefinition of words.

    One problem is that when I updated FF to use the XC8 compiler so that new chips can be supported, that came with the PIC-AS (PIC18) which cannot warn for out of range relative branches. This makes any bigger changes to PIC18 FF very hard, impossible in practice.
    And PIC18 is the chip I nearly always use because I like the peripherals.

    The PIC-AS problem has been reported be me, and accepted by the XC8 compiler group at Microchip. The fix has been planned for a "future release". I have been waiting for the fix for over a year now. It may never appear since the C compiler does not see the problem, it has the optimizer that I guess can adjust the relative calls to absolute call and vice-versa.

     
    • Fred Zelders

      Fred Zelders - 2023-05-21

      Thank you for your thoughts Mikael. I can follow them.

      (N.B. A definition with preamble followed by a period (.) helps me to distinguish between the different 'collecions'. )

      Unforunately I'm not able to use FF-shell because I am a macOs user.

       
  • Bernard Mentink

    Bernard Mentink - 2023-10-12

    Fred: I use FF-shell.tcl fine in MacOS.
    Mikael: How did you add #help to FF-shell? Thanks.

     
    • Fred Zelders

      Fred Zelders - 2023-10-13

      How did you manage this Bernard?

       
  • Mikael Nordman

    Mikael Nordman - 2023-10-13

    Mikael: How did you add #help to FF-shell? Thanks.

    Well, with python code and manually creating the base_dictionary.py and user_dictionary.py files.

     
  • Bernard Mentink

    Bernard Mentink - 2023-10-13

    Hi Fred: I just installed the tcl-tk package with homebrew ..
    Then run by the command: wish ff-shell.tcl

    Note: tcl version 8.5 would not work, but 8.6 does.
    I have both versions on my machine, I think the 8.5 came from macos .... just use the homebrew version

     
    👍
    1

    Last edit: Bernard Mentink 2023-10-13
  • Fred Zelders

    Fred Zelders - 2023-10-14

    Yes! Now I am able to launch ff-shell.

    But ... Same problem as you: no access to actual usb port :-(

     
    • Bernard Mentink

      Bernard Mentink - 2023-10-16

      I only had that problem with the Leonardo board. The UNO works fine.

       
      👍
      1

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.