Announcement

Collapse
No announcement yet.

Latest BLOG article on Code project - The Myth about BASIC"

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Latest BLOG article on Code project - The Myth about BASIC"

    Check out my latest BLOG article on Code project: "The Myth about BASIC"

    Chris Boss
    Computer Workshop
    Developer of "EZGUI"
    http://cwsof.com
    http://twitter.com/EZGUIProGuy

  • #2
    Chris

    This is an excellent article - congratulations.

    BASIC is an a good compromise between hard to program but completely flexible low level languages and easy to program and inflexible (or purpose restricted) high level languages.

    PowerBasic is a Basic which is quite successful in offering tools to meet both the criteria of flexibility and purpose restricted - if you want to program it that way.

    I agreed with all your article and I lived through the same period as a professional programmer.

    It might have been useful to mention dBase as a basic with database features as part of the Basic development. It was a revolutionary product of its time and spawned a lot of copycat languages.

    And finally, I wish to object to your use of the word 'ancient'. What does that make me?

    [note this is the second time I have replied to this post. Either my first reply got lost or I failed to press the post button which is unlikely]
    [I]I made a coding error once - but fortunately I fixed it before anyone noticed[/I]
    Kerry Farmer

    Comment


    • #3
      Originally posted by Kerry Farmer View Post
      [note this is the second time I have replied to this post. Either my first reply got lost or I failed to press the post button which is unlikely]
      Have you read this post : http://forum.powerbasic.com/forum/cv...den#post748586

      (Just sayin' )

      Comment


      • #4
        Chris, I bet I have written previously in one of my reply to your discussion in this forum about a converter to other languages, kinda of converting PB to say C++ or Python
        and back. I think python is gaining ground as a new programming language, there is a big demand for python programmers, so the question is
        whether you have written a converter to Python? and how much would that converter cost?

        Comment


        • #5
          Python new??? It is only 2 years younger than PB.

          So far, Python is an interpreted only (currently) language. There were/are BASIC interpreters, but PB is a compiler.

          Different markets, but otherwise a reasonable question.

          Cheers,
          Dale

          Comment


          • #6
            If you want a program that can run on a Python interpreter, learn to program in Python.

            How would you propose converting PB datatypes to:
            Text Type: str
            Numeric Types: int, float, complex
            Sequence Types: list, tuple, range
            Mapping Type: dict
            Set Types: set, frozenset
            Boolean Type: bool
            Binary Types: bytes, bytearray, memoryview
            To say nothing of using Lambdas, NumbPy, MatPlotLib, SciPy etc,etc etc.

            Same goes for trying to convert Python to PB.

            There is a reason why the serious programmers among us learn and work with different languages, using the most appropriate for the circumstances.

            You want to run code on a Python interpreter? Here you go: https://www.w3schools.com/python/default.asp

            Comment


            • #7
              Yes, I am considering writing a transpiler (I think that is what they call it) to convert Basic (PB syntax) to other programming languages. I have purchased a number of books on writing compilers, etc. I have written script engines before. EZGUI 5.0 Pro has a number of scripting engines in it (Turtle Graphics, OpenGL scripting language, MCI scripting language). I wrote a compiler decades ago for the Commodore 64 too, but it was very simplistic.

              Chris Boss
              Computer Workshop
              Developer of "EZGUI"
              http://cwsof.com
              http://twitter.com/EZGUIProGuy

              Comment


              • #8
                Originally posted by Chris Boss View Post
                Yes, I am considering writing a transpiler (I think that is what they call it) to convert Basic (PB syntax) to other programming languages.
                Enquiring minds want to know:

                What other languages?
                What would it achieve?

                Comment


                • #9
                  I have other projects I am working on in the area of embedded microcontrollers. Micro-Python is popular. C is a primary language used. The problem is that I firmly feel that learning to code in too many different languages make turn on into a "Jack of all Trades, but Master of none". I have been coding in BASIC since the 1970/s and 1980's. BASIC has so many benefits. The problem is that it also limits one as well.

                  Now a Transpiler which is BASIC to say multiple languages like C and Python, would open up possibilities when coding for embedded.

                  I also would like to try my hand at writing a full blown compiler using LLVM as a backend. A number of programming languages use LLVM as a backend. LLVM is like a step up from Assembler, but it is designed for cross platform development.

                  Also I have no desire to recreate as complex a language as Powerbasic, but to concentrate on a small subset of code BASIC only.

                  Lastly, while I don't need to tackle the x86 platform, ARM is where I need to concentrate. ARM is core to embedded, as well as microcontrollers.

                  A good example of one platform I am interested in is the STM32 Nucleo boards. Better than an Arduino and only about $13 (US). You can prototype with the Nucleo boards and later if needed build your own board using the same STM chip alone on a custom board.

                  Just take a look at what they available: https://www.mouser.com/_/?Keyword=ST...ng%7c0&FS=True

                  Here is a data sheet of some of the boards: https://www.mouser.com/datasheet/2/3...r8-1848087.pdf

                  Chris Boss
                  Computer Workshop
                  Developer of "EZGUI"
                  http://cwsof.com
                  http://twitter.com/EZGUIProGuy

                  Comment


                  • #10
                    Originally posted by Chris Boss View Post
                    The problem is that I firmly feel that learning to code in too many different languages make turn on into a "Jack of all Trades, but Master of none". I have been coding in BASIC since the 1970/s and 1980's. BASIC has so many benefits. The problem is that it also limits one as well.

                    Now a Transpiler which is BASIC to say multiple languages like C and Python, would open up possibilities when coding for embedded.
                    Do you honestly think that you can write a transpiler without a deep knowledge of the target language?

                    Why not get a job translating documentation into Japanese, after all, you are pretty proficient in English

                    Comment


                    • #11
                      There is a difference between grasping the basic syntax of a language and researching a one to one correspondence between a BASIC command and the target language and becoming an expert on another language. My understanding of the command set of BASIC has not changed significantly over the years, but my grasp of how to use it to the full has.

                      Also I only want to target a subset of BASIC, not the entire language.

                      Chris Boss
                      Computer Workshop
                      Developer of "EZGUI"
                      http://cwsof.com
                      http://twitter.com/EZGUIProGuy

                      Comment


                      • #12
                        Create screens/forms external to the program.
                        Store values in a data dictionary including the number of screens, field lengths, positions, lengths.
                        Code:
                        #INCLUDE "ezgui.inc"
                        FUNCTION PBMAIN AS LONG
                         ezgui load(sdictionary$)
                         ezgui display(sform$)
                         ezgui unload(sdictionary$)
                        END FUNCTION
                        Any windows programming language can use EZGUI.

                        EZGUI handles all windows api calls so programmer spends
                        more time working on application than the interface.

                        Forms could be created with or without a visual designer.
                        Changing values in the data dictionary change the forms.
                        Pass all values using strings so any language will work.

                        Comment


                        • #13
                          Mike,

                          In theory any language could work with EZGUI, but the problem is that most either don't support an OLE string type or they support it but it isn't as easy to use as it is in PB. C supports OLE strings, but it is not the common string type most programmers use, so likely it would be better to support a different string type in EZGUI. Most EZGUI API calls pass strings and there is over 1000 such commands in EZGUI, so that is a lot of code to change.

                          Since C does support OLE strings, though not the normal string type programmers use, it may be the best choice for use with EZGUI.

                          Chris Boss
                          Computer Workshop
                          Developer of "EZGUI"
                          http://cwsof.com
                          http://twitter.com/EZGUIProGuy

                          Comment


                          • #14
                            Don't need routines to control forms. Just a routine to control the dictionary.

                            Comment

                            Working...
                            X