Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 32

Thread: thinBasic Beta 1.8.6.0

  1. #21
    There seems to be a problem with the zip.

    Archive: /home/jrs/Downloads/thinBasic_1.8.7.0.zip
    [/home/jrs/Downloads/thinBasic_1.8.7.0.zip]
    End-of-central-directory signature not found. Either this file is not
    a zipfile, or it constitutes one disk of a multi-part archive. In the
    latter case the central directory and zipfile comment will be found on
    the last disk(s) of this archive.
    zipinfo: cannot find zipfile directory in one of /home/jrs/Downloads/thinBasic_1.8.7.0.zip or
    /home/jrs/Downloads/thinBasic_1.8.7.0.zip.zip, and cannot find /home/jrs/Downloads/thinBasic_1.8.7.0.zip.ZIP, period.
    Update

    I was able to extract the archive with the command line unzip utility. (the GUI archive manager didn't work this time)

    The save issue seems to have been fixed in 1.8.7.0 and ran the script as soon as I clicked on the green right arrow button.



    Last edited by John Spikowski; 04-05-2011 at 00:50.
    ScriptBasic Project Manager
    Project Site
    support@scriptbasic.org

  2. #22
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    Thanks again for your testing John.
    It is great to see thinBasic also works under Wine.

    I have to say I'm not an expert of *nix systems other than installed some VM with Ubuntu for testing. But for those willing to test thinBasic and have a look also under *nix systems, your tests are precious.

    Thanks again
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  3. #23
    Happy to help out where I can.

    As an added bonus of running under Wine, ODBC uses the native Linux (32/64) unixODBC library which allows you to use native MySQL, PostgreSQL, ... databases in conjunction with other native Linux applications.

    I'm overjoyed how well OxygenBasic / OpenGL runs under Wine. They have to be doing some the same native magic to run as well as it does. I haven't tried to use the O2h extension module for thinBasic yet but I will try to find time to give it a try.
    ScriptBasic Project Manager
    Project Site
    support@scriptbasic.org

  4. #24
    As promised, here is your OxygenBasic extension module example running under Wine. Under Ubuntu, thinBasic programs/scripts are displayed in the file browser/explorer using the thinBasic icon and if clicked, it runs as if I clicked on any other native executable.

    PerformSinCos.tbasic
    ' Test of loop optimization with Oxygen 
    uses "Console", "Oxygen" 
      
    dim T1        as quad 
    dim T2        as quad 
      
    dim p0,p1,p2 as dword 
    dim src as string 
      
    ' -- Prepare Oxygen script 
     
    src = " 
      
      function Calculate_basic(c as long) as long at #p1 
        local ic, jc as double 
        local i 
        ' 
        ' 
        'BASIC VERSION 
        ' 
        for i=1 to c 
          ic = sin(i) 
          jc = cos(i) 
        next 
      end function 
       
       
        ' 
         
     
      function Calculate_asm(c as long) as long at #p2 
        local ic, jc as double, i as long 
        ' 
        'ASSEMBLER VERSION 
        ' 
        ' 
        dim a=&c 
        mov eax,a 
        mov edx,[eax] 
        fld1 
        fld1 
        ( 
         fsincos 
         fstp  qword jc 
         fstp qword ic 
         fld1 
         faddp st(1),st(0) 
         fld st(0),st(0) 
         dec edx 
         jg repeat 
        ) 
        fcomp st(0),st(0) 
        ' 
      end function 
      
      sub finish() at #p0  
        terminate 
      end sub 
    " 
      
    o2_basic src 
    if len(o2_error) then 
      msgbox 0, o2_error : stop 
    end if 
    o2_exec 
     
     
    dim c as long=1000000 
     
    declare function Calculate_o2bas(c as long) as long at p1 
    declare function Calculate_o2asm(c as long) as long at p2 
    declare sub finish () at p0 
     
    printl "SPEED BENCHMARKS:" 
    printl ""  
    printl "Double precision Sin & Cos Test: loops=" & c 
    printl "" 
     
    doevents(off) 
      
    hirestimer_init 
      
    T1 = hirestimer_get 
    Counter c 
    T2 = hirestimer_get 
     
    printl "Script:     microSecs:" & $tab & FORMAT$(T2 - T1, "#,") 
      
    T1 = hirestimer_get 
    Calculate_o2bas c 
    T2 = hirestimer_get 
     
    printl "Compiled:   microSecs:" & $tab & FORMAT$(T2 - T1, "#,") 
     
    T1 = hirestimer_get 
    Calculate_o2asm c 
    T2 = hirestimer_get 
     
    printl "Assembler:  microSecs:" & $tab & FORMAT$(T2 - T1, "#,") 
     
    finish 
    waitkey 
      
    function Counter( MaxCount as long ) as long 
      local ic, jc as double,i as long 
      For i = 1 To MaxCount 
        jc = sin(i) 
        jc = cos(i)  
      Next 
    end function
    
    Last edited by John Spikowski; 06-05-2011 at 00:45.
    ScriptBasic Project Manager
    Project Site
    support@scriptbasic.org

  5. #25
    In an attempt to touch all bases, here is a COM example in thinBasic under Wine.

    uses "COM" 
     
    %MAX_NUMBER_OF_PARAMETERS   =   3 
     
    dim hXMLHTTP as dword 
    dim vParam(%MAX_NUMBER_OF_PARAMETERS) as variant 
    dim vResult as variant 
     
    hXMLHTTP = COM_CreateObject("MSXML2.XMLHTTP.3.0") 
     
    IF COM_Succeeded(hXMLHTTP) THEN 
        vParam(1) = "GET" 
        vParam(2) = "http://www.w3.org/Math/XSL/pmathml2.xml" 
        vParam(3) = 0 as boolean 
        if COM_Succeeded(COM_CallMethod(hXMLHTTP, "open", %MAX_NUMBER_OF_PARAMETERS, vParam(1), 0)) then 
            if COM_Succeeded(COM_CallMethod(hXMLHTTP, "send", 0, 0, 0)) then 
                if COM_Succeeded(COM_GetProperty(hXMLHTTP, "responseText", vResult)) then 
                    msgbox 0, vResult  
                end if 
            end if 
            COM_Release(hXMLHTTP) 
        end if 
    end if
    
    ScriptBasic Project Manager
    Project Site
    support@scriptbasic.org

  6. #26
    Hi John,

    Did you install thinBasic under Ubuntu/Wine?

    I had problems trying to run thimBasic scripts from Ubuntu but I think this is because I am trying to use the thinBasic I installed under Vista.

    Charles

  7. #27
    All I did was download the zip, extracted it and right click on the installer .exe saying run it as a Wine job. It went through the normal install dialogs. In my Applications -> Wine menu, thinAir is presented as an option and it would have put an shortcut icon on my desktop if I wanted. If I'm in the Nautilus file browser, thinBasic scripts show with their native Windows program icon and run with just a click.

    Sorry, I never used Vista before so I feel lucky.
    ScriptBasic Project Manager
    Project Site
    support@scriptbasic.org

  8. #28
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    I was thinking about creating a dedicated place where to talk about thinBasic test running under different environment. Placing those interesting posts under this thread ... they will soon fall into forget area.

    I will do it this evening (CET time) and that move some posts there.
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  9. #29
    Sharing an executable installed on another operating system, I know is asking a bit much. When thinBasic is installed in Windows, it makes various registry entries which will be invisible when accessing from Linux.

    I am optimistic however that there will not be many issues running thinBasic independently installed under Linux/Wine.

    Charles

  10. #30
    Wine emulates having a registry (text file) so as far as your application is concerned, it's happy. Without a registry, very few Windows applications would run under Wine.

    Take a peek at the system.reg, user.reg and userdef.reg text files in the ~/.wine directory.
    Last edited by John Spikowski; 07-05-2011 at 08:21.
    ScriptBasic Project Manager
    Project Site
    support@scriptbasic.org

Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. thinBasic Beta 1.8.2.x
    By ErosOlmi in forum thinBasic Beta testing
    Replies: 13
    Last Post: 21-06-2010, 10:10
  2. thinBasic Beta 1.8.1.x
    By ErosOlmi in forum thinBasic Beta testing
    Replies: 21
    Last Post: 17-06-2010, 18:24

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •