Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 38

Thread: Tbo2

  1. #11
    There is a very good guide here which shows you how to install OpenGL and SDL2 for Rust, primo. I used it today and have managed to get some OpenGL examples running on my computer.
    Attached Images Attached Images
    Operating System: Windows 10 Home 64-bit
    CPU: Intel Celeron N4000 CPU @ 1.10GHz
    Memory: 4.00GB RAM
    Graphics: Intel UHD Graphics 600

  2. #12
    At 65, Rust doesn't sound like the right direction for me.
    ScriptBasic Project Manager
    Project Site
    support@scriptbasic.org

  3. #13
    Thank you matthew very much for the link and info, i will try it, just now i have tried a wrapper for OpenGL https://github.com/glium/glium
    i have tried the first demo described in tuto-01-getting-started.md:
    https://github.com/glium/glium/tree/master/book
    don't know what to do but i have guessed to write cargo build and she have downloaded several things and after 20 seconds i have my-project.exe in a new target folder and when we run it it display a blue windows. so at least something. will try the other examples later.

    @John, i thought i am 66 yo and said to myself "i'm older than him by a year" , i have consulted google and she direct me to this site http://birthdayscan.com they say i'm approx 63.5 y. so i am happy my age is smaller than 66. Eros should make a function for calculating the years from x1 to x2.
    i am using Script Basic in testing the codes from old books available by hundreds from archive.org it is a nice language merging the old style with the new style, i use it with geany ide.
    Last edited by primo; 07-07-2018 at 09:22.

  4. #14
    i am using Script Basic in testing the codes from old books available by hundreds from archive.org it is a nice language merging the old style with the new style, i use it with geany ide.
    One of the features I like about Script BASIC is I can use code gems from the past including MSQB and dress it up with modern UIs or add functionality with popular open source C libraries. (SQLite, cURL, ODBC, SDL, IUP, ...)
    ScriptBasic Project Manager
    Project Site
    support@scriptbasic.org

  5. #15
    John, just one question: i can't execute lines with multi statements such as
    20 LET A=4:Let I=0:Let R=0 even it is a classic Basic habit, something i mess ?
    i saw your version : 20 SPLIT "4,0,0" BY "," TO A,I,R
    and it is good enough to replace the previous version.
    i have installed IUP GUI iup_win32-b9.zip and the provided examples are enough for me to go on with.

  6. #16
    I don't think multiple statements per line came about until Quick BASIC.

    The SPLIT also works as a one line replacement for DATA/READ.
    Last edited by John Spikowski; 07-07-2018 at 19:35.
    ScriptBasic Project Manager
    Project Site
    support@scriptbasic.org

  7. #17
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    @John I get the point with the DLL sizes. The beauty of Rust is you can tweak it down as much as you like.
    Rust even allows you to ommit the standard library altogether.

    Earlies, I tried Rust, saw it does hello world at 134kB, laughed and left.

    Then I came back and realised the bigger EXE size was just my misunderstanding. I can create 4kB "hello world" in Rust.
    I did not do much promotion of Rust for module creation here yet. For a reason - I want to dig deeper in it and I think the great point for others to jump in would be once the "Rust 2018" milestone is reached.

    To not further hijack this thread - this is my last comment on Rust here for now. My apologies, dear Charles!

    @Matthew Thanks for the examples!


    I am mostly interested in Oxygen in form of module for thinBASIC, giving me a JIT hand for easy performance boost.
    If there would be easy tutorial for newcomers, with case studies, it would add a lot of value for our community.

    I did used Oxy for this in the past, when I return back, I usually find out my old code does not work and I scratch my head what changed.
    Instead of diving to change logs, releasing "Boosting ThinBASIC with Oxygen in 20XX" yearly would be fantastic. What do you think John, Charles?


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  8. #18
    O2 JIT is very cool for creating virtual DLLs. thinBasic should use Charles's DLLC dynamic FFI functionality to interface with APIs on the fly.
    ScriptBasic Project Manager
    Project Site
    support@scriptbasic.org

  9. #19
    Hi Petr,

    I'm intrigued by immutability. Do you find it useful in RUST?

  10. #20
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Hi Charles,

    thanks for the question, I find the concept of mutability very useful. It gives the programmer more control over what happens with variables.
    BASICally speaking, you can for example prevent passing the variable byRef, otherwise potentially causing it to be changed by other function.

    By default, Rust variables are immutable. If you do this:
    let answer = 42;
    answer = 13;
    
    ...Rust will fire you an easy to understand error, because you are trying to modify immutable variable answer.

    If you want total freedom (=default behaviour in most programming languages), you may opt for *mut* keyword, which enables the ability to change the value:
    mut let answer = 42;
    answer = 13;
    
    The 3rd approach is to create immutable variable, and change it explicitly, with overshadowing using let statement:
    let answer = 42;
    let answer = 13; // Means, "I know it is immutable, but I really need to change the value and I know what am I doing"
    
    It is well described here, along with differences between constants and immutable variables: https://doc.rust-lang.org/book/secon...utability.html

    You may remember me being happy from OpenCL/CUDA, because it completely changed my way to design algorithms. With Rust, I am experiencing the same mind twist.
    At first it seems like mountain of strange rules and obstacles, but in the end, you can see the ray of genius light and can only applaud the authors for challenging the obvious (like Rust did with allowing object oriented design - without classes, without garbage collector).


    Petr
    Last edited by Petr Schreiber; 08-07-2018 at 09:15.
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

Page 2 of 4 FirstFirst 1234 LastLast

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
  •