Announcement

Collapse
No announcement yet.

PluriBASIC 64bit compilations

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

  • #21
    Hi All
    What's this Pluribasic ? is it another type of language?

    Comment


    • #22
      Originally posted by Arthur Gomide View Post
      I'm with you Brian!
      Thanks Arthur! please spread the word if possible.
      www.pluribasic.com

      Comment


      • #23
        Originally posted by Tim Lakinir View Post
        Hi All
        What's this Pluribasic ? is it another type of language?
        Tim, PluriBASIC is something like a compiler adapter...
        www.pluribasic.com

        Comment


        • #24
          We are at 55%

          So, i wanted to share a bit of what PluriBASIC offers. PluriBASIC currently offers functionality for database support. It can be accessed several ways. You can click here to test the CGI script produced by the code below. Also there is an attached picture of the ide compiling the code. Hopefully more people will jump in and support.

          Code:
          #COMPILE cgi
          '#COMPILER pbwin
          #COMPILER OXYGEN
          #PROJECT "nbson"
          #OPTIONS X32 developer
          '#options localtest
          #DIM ALL
          #DATABASE OPEN
          #TIMELIMIT 10
          
          ' Note: To configure a project with a valid FTP account, open the configuration window, go to the Projects tab, and fill
          '       all the apropriate fields for a new project. Make sure to enter valid FTP credentials. Use user attached to the database
          '       must have all privilleges inrder for this code to work.
          
          '       Once the project is configured, update the #PROJECT line above, with the
          '       name of the project you just created.
          
          TYPE USERDATA 'EXACT ALIAS "ABCD"
          ID        CONDITION AUTOINC NOTNULL PRIMARY AS LONG
          nombre    AS STRING
          EMAIL     AS STRING
          Password  AS STRING
          admin     AS LONG
          mSales(2) AS DOUBLE
          secret    AS STRING    
          END TYPE
          
          GLOBAL Usr AS USERDATA token
          
          FUNCTION PBMAIN() AS LONG
          
          LOCAL Result AS LONG
          
          ' Some testing statements.
          'Database.odbc = " ODBC"    
          'stdout Database.odbc    
          'Database.setAlias(Usr, "TABLE322")
          
          ' Test if database was properly initialized.
          PRINTBR IIF$(database.connected, "Connected to the database.", "Could not connect to the database.")
          
          ' Abort if not connected to the database.
          IF ISFALSE(database.connected) THEN
          TERMINATE
          END IF
          
          
          PRINTBR "Name of the table: " & Database.getAlias(Usr)
          
          PRINTBR "Dropping table to start from 0."
          IF database.deleteTable(Usr) THEN
          PRINTBR "Deleted."
          ELSE
          PRINTBR "Could not delete!"
          END IF        
          
          PRINTBR    
          STDOUT "Checking table existence..."    
          PRINTBR
          
          ' Make sure the table exists.
          IF ISFALSE(Database.tableExists(Usr)) THEN
          STDOUT "Table doesnt exist! creating it..."
          IF database.createTable(Usr) THEN
          STDOUT "Table created."
          ELSE
          STDOUT "Table could not be created. Aborting."
          TERMINATE
          END IF
          ELSE
          STDOUT "Table already exists"
          END IF
          
          Usr.id       = 0
          Usr.admin    = 1
          Usr.nombre   = "Brian Alvarez"
          Usr.email    = "[email protected]"
          Usr.password = "*******"
          Usr.secret   = "I once accidentally ate a bug while camping."
          
          ' insert the record on the database.
          ERRCLEAR
          PRINTBR
          
          IF database.insert(Usr) THEN
          STDOUT "Data inserted correctly."
          ELSE
          STDOUT "Error while inserting data."
          END IF        
          
          ' This captures errors like when not connected to the database.    
          IF ERR THEN
          'stdout database.ERROR
          END IF
          
          ' Search for the record.
          ' This statement overrides the conditional fields generated by PluriBASIC.
          PRINTBR "loading...."
          Result = Database.load(Usr, "where admin=1")
          
          IF Result THEN
          PRINTBR "load ok."
          Usr.nombre = "Jack ferrara Saenz"
          Usr.email  = "[email protected]"
          IF database.update(Usr) THEN
          PRINTBR "Updated a record!"
          ELSE    
          PRINTBR "UPDATE FAILED."
          END IF
          ELSE
          PRINTBR "COULD NOT LOAD Usr."
          TERMINATE
          END IF
          
          PRINTBR "Done with Update."            
          
          Result = Database.load(Usr, "where admin=1")
          IF Result THEN
          PRINTBR
          PRINTBR "==MANUAL LOAD METHOD==="
          STDOUT FORMAT$(Result) & " record(s) found."      
          ' loop trough all the records.
          DO WHILE Usr.id
          PRINTBR
          PRINTBR "Record #" & FORMAT$(Usr.id) & " retrieved correctly."
          PRINTBR Usr.admin
          PRINTBR Usr.nombre
          PRINTBR Usr.email
          PRINTBR Usr.password
          PRINTBR Usr.secret
          
          CALL database.next(Usr)
          LOOP
          PRINTBR "====================="
          ELSE
          PRINTBR
          STDOUT "No data loaded."                
          END IF
          
          ' This one generates a basic query based in the provided UDT variable.
          PRINTBR  
          PRINTBR "==FOR EACH STYLE 1==="    
          FOR EACH Usr WHERE "admin = 1"
          PRINTBR
          PRINTBR "Record #" & FORMAT$(Usr.id) & " retrieved correctly."
          PRINTBR Usr.admin
          PRINTBR Usr.nombre
          PRINTBR Usr.email
          PRINTBR Usr.password
          PRINTBR Usr.secret        
          NEXT Usr
          PRINTBR "====================="    
          
          ' These allows for more complex queries and joins.
          PRINTBR    
          PRINTBR "==FOR EACH STYLE 2==="  
          FOR EACH Usr IN QUERY "select * from USERDATA where admin=1"      
          PRINTBR
          PRINTBR "Record #" & FORMAT$(Usr.id) & " retrieved correctly."
          PRINTBR Usr.admin
          PRINTBR Usr.nombre
          PRINTBR Usr.email
          PRINTBR Usr.password
          PRINTBR Usr.secret                
          NEXT Usr
          PRINTBR "====================="
          
          PRINTBR
          STDOUT "Done. Press any key to end."
          
          WAITKEY$ ' waitkey$ does nothing when compiled for CGI script or PHP script.
          
          END FUNCTION
          Attached Files
          www.pluribasic.com

          Comment


          • #25
            A better formatted code picture.
            Attached Files
            www.pluribasic.com

            Comment


            • #26
              Originally posted by Tim Lakinir View Post
              Hi All
              What's this Pluribasic ? is it another type of language?
              In my understanding is a "wrapper" for PB that allows you to compile to 64bit and adds it's own built-in functions.

              Comment


              • #27
                It is something like that Shawn.

                Anybody else joins?
                www.pluribasic.com

                Comment


                • #28
                  Originally posted by Shawn Anderson View Post

                  In my understanding is a "wrapper" for PB that allows you to compile to 64bit and adds it's own built-in functions.
                  Can the wrapper translate code written in SDK style?

                  Comment


                  • #29
                    Originally posted by Mimmo Labate View Post
                    Can the wrapper translate code written in SDK style?
                    There are still tests to make, but i have made simple things and they work fine.

                    www.pluribasic.com

                    Comment


                    • #30
                      Hi Brian

                      I would like to see a more detailed development plan with dates etc please.

                      Do you have a current spec for PluriBASIC?

                      Please confirm that I can do 64 bit arithmetic which takes all advantages of 64 bit processing, especially speed. Can I do this processing in threads? Can I take advantage of multiprocessors? What is the size of the numbers that I can use?

                      Will this development mean that we no longer need a 64 bit PowerBasic compiler?

                      Is PluriBASIC a PBWIN only product or can it work with PBCC?

                      I am thinking of signing up if I can see that I might use PluriBASIC

                      Thanks for your insight and ideas

                      Kerry



                      [I]I made a coding error once - but fortunately I fixed it before anyone noticed[/I]
                      Kerry Farmer

                      Comment


                      • #31
                        Hello Kerry.

                        Thanks for your interest, I have posted information, details, features and even benchmarks but im not sure i am allowed to post links to there here.

                        I need to clarify that PluriBASIC is not a PowerBASIC product. Since PluriBASIC can compile 64 bit modules from PowerBASIC like source code,
                        I was kindly granted permission to promote it as a PowerBASIC tool, but this is not a replacement for PBWIN nor PBCC.

                        PluriBASIC can work with PBWIN and PBCC. In fact you can explicitly select the preferred compiler almost as usual:

                        Code:
                        #COMPILE EXE
                        #COMPILER PBWIN 10.04
                        #OPTIONS X32
                        But you need to own a license of PowerBASIC.

                        PluriBASIC also offers other options regarding compilers, as you can use, for example:
                        Code:
                        #COMPILE EXE
                        #COMPILER OXYGEN 0.26
                        #OPTIONS X64
                        or...

                        Code:
                        #COMPILE PHP
                        #COMPILER PLURIBASIC 6.0
                        #OPTIONS X32
                        or...

                        Code:
                        #COMPILE APK
                        #COMPILER PLURIBASIC 6.0
                        #OPTIONS X64
                        PluriBASIC supports Threads in a fahion like PowerBASIC. Can use THREADED variables too. It supports QUADS too. You would need to try it to know exactly if it fits your needs. There is still more testing required, specially with 64bit inline operators, but its not something impossible to complete.

                        Regarding the development of a 64 bit PowerBASIC compiler, i dont have authority or enough information about it to say anything, so i think it would be wise not to say anything.

                        If you want to help in the development of PluriBASIC, this is the best moment.





                        www.pluribasic.com

                        Comment


                        • #32
                          It is all going very well. I will definately have something ready to share with the supporters soon!
                          www.pluribasic.com

                          Comment


                          • #33
                            Hi Brian, according to my vision that has changed significantly over the years, especially over the past 10 years, I can say that the priority for a new 64-bit compiler is not to port all the arsenal offered to date from PB (CC and PBW) but have a basic, reduced core, which can easily extend its functionality simply by taking advantage of the great availability of existing libraries, in order to develop applications in practically any field. To explain what I mean, I refer to the language of the moment, python, especially in the field of deep and machine learning where, this language can easily access all the cores of the new and powerful processors (for example through the brand new OpenAPI, CUDA, etc .) as well as specific libraries in fields such as 2D, 3D graphics, computer vision, numerical calculation, linear algebra, etc. Thus extending its power by exploiting what the outside already exists which in itself is optimized and stable. You need the ability to write the wrapper to access these universes. According to their inclinations and experiences, each one will adapt the reduced set language that through existing libraries will be able to arrange what is necessary to work with vectors and matrices, manipulation of the pixels of an image, solve problems and simulations in the mathematical and financial fields. Without adding new instructions or extreme OOP extensions to the language that only add weight to the workload. So to be concise, you need everything you need to access the Windows API and build the types of data that allow you to easily write the "drivers" that allow you to use external libraries so as to have a practically universal language while having a small set of instructions. Indeed, it would be enough to be able to use header files, very often written in C language, without having to adapt them to our language. Here is what is really important today, in order to continue everyone in their own field to offer fast, reliable and supported solutions. With the possibility of easily adding further possibilities of use ...

                            Brian, I would like to hear your opinion but also that of the Boss, Adam Drake about what I have just written! Thanks in advance

                            Comment


                            • #34
                              Count me in for one Brian.

                              Good luck
                              [I]I made a coding error once - but fortunately I fixed it before anyone noticed[/I]
                              Kerry Farmer

                              Comment


                              • #35
                                Mimmo, I think being able to use other languages is also important. PluriBASIC also supports outputting code for Python, but it needs a really big chunk of attention. I would like to finish that as well, if the economy does not forbid me from doing so. You got a very good point on using external (stable) libraries instead of reinventing the wheel! That is one of my own drives.

                                Kerry, im going to send you a PM now. Thanks!
                                www.pluribasic.com

                                Comment

                                Working...
                                X