free Basic - just curious?

General discussion for topics related to the FreeBASIC project or its community.
pidd
Posts: 32
Joined: Nov 11, 2022 16:27

Re: free Basic - just curious?

Post by pidd »

codeWrapped wrote: Apr 20, 2024 15:57Also wondering if free Basic is actually being used professionally for building applications?
Basic is good to throw algorithm ideas together to test them before writing them in another language, it wouldn't surprise me if others do the same.

I've always found Basic the easiest language to spot and correct errors and also to throw things around (eg trial and error) when trying to do something you are unsure of. The trend is Python unfortunately which has so many traps to fall into. If I wanted to design an abhorrent language, I would start with Python*. If I wanted to design a really good language I would start with Basic.

Python lasted about 3 months, Basic has lasted my lifetime, in recent years I've mostly programmed in C and PHP but still go back to Freebasic when toying with ideas.

* yes, I know there are other strong contenders.

I've said this before - if you show someone a Basic program that doesn't know Basic, they can have a pretty good guess at understanding what it is doing without resorting to a manual. The only reason Basic is not more popular is snobbery because the B stands for beginners which is nothing to do with the language itself, it could have been called anything.
Lost Zergling
Posts: 539
Joined: Dec 02, 2011 22:51
Location: France

Re: free Basic - just curious?

Post by Lost Zergling »

Also wondering if free Basic is actually being used professionally for building applications?
I work in administration. Previously, I was on Notes/Domino technologies (in the 2000s). Basic is a language that I greatly appreciate for its versatile side, as to my opinion, it is not confined to non-professional use. In addition to the syntax (VB style) that I am used to, FB offers access to pointers, typing, and object capabilities, which makes it a very powerful language. With a little effort, it can certainly be used for modeling, but much more by improving its performance with a few pointers where it is really useful. I use it professionally, as a complementary tool but particularly useful to my work. My opinion is that the relationship between the versatile side and the power is really excellent: we can go down to the pointer level without losing the syntactic ease of structured programming on standard algorithms.
An absolutely crucial point for me in the context of my work is technological independence, and FreeBasic is a language which does not depend on an organization likely to be able to claim technical achievements: this is a fundamental point for me.
Compared to Notes/Domino, I lacked the "ForAll" and documentary-type access to the data, so I invested time in the lzle tool (viewtopic. php?t=26551), a sort of 'software glue' that can be used as a datastructure, an instruction set, a containerization tool or memory management tool (it is not up to date and could still be significantly improved to manage rotating caches, but I'm a little short of time, and its current performance is enough for me).
On the graphical interface side, I only use a very limited tool (Tiny Dialog) a Wrapper concocted by the coding superman D.J. Peters, because this tool (unfortunately no longer maintained and difficult to find) is simple to integrate and above all has a capacity of original ergonomic optimization, which makes it possible to design coherent 'click & go' type application functionalities (applications in assisted mode which can offer lots of functionalities in a few clicks) (creation, editions and launch of cascade settings, nothing to do with GooglePlay)
Add to this, the possibility of doing macros, inserting c code, bidding, etc.
You get a professionally consistent tool.
dodicat
Posts: 7987
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: free Basic - just curious?

Post by dodicat »

Hi Lost Zergling.
(Notes/Domino technologies)
I used to enjoy a game of dominoes, but the village pub has been closed for a few years now.
Here is my set:

Code: Select all


Sub setdice(i() As Any Ptr,size As Long) 'create images
    Type v
        As Long x,y
    End Type
    Dim As v p(1 To 7)
    Redim i(0 To 6)
    Dim As Long sz=size,dt=sz/12
    p(1)=Type(sz/4,sz/4)
    p(2)=Type(sz/4,sz/2)
    p(3)=Type(sz/4,3*sz/4)
    p(4)=Type(3*sz/4,sz/4)
    p(5)=Type(3*sz/4,sz/2)
    p(6)=Type(3*sz/4,3*sz/4)
    p(7)=Type(sz/2,sz/2)
    
    For n As Long=0 To 6
        i(n)=Imagecreate(sz,sz,Rgb(200,200,200))
        Select Case n
        Case 1
            Circle i(1),(p(7).x,p(7).y),dt,0,,,,f
        Case 2
            Circle i(2),(p(1).x,p(1).y),dt,0,,,,f
            Circle i(2),(p(6).x,p(6).y),dt,0,,,,f
        Case 3
            Circle i(3),(p(1).x,p(1).y),dt,0,,,,f
            Circle i(3),(p(7).x,p(7).y),dt,0,,,,f
            Circle i(3),(p(6).x,p(6).y),dt,0,,,,f
        Case 4
            Circle i(4),(p(1).x,p(1).y),dt,0,,,,f 
            Circle i(4),(p(3).x,p(3).y),dt,0,,,,f 
            Circle i(4),(p(4).x,p(4).y),dt,0,,,,f 
            Circle i(4),(p(6).x,p(6).y),dt,0,,,,f 
        Case 5
            Circle i(5),(p(1).x,p(1).y),dt,0,,,,f 
            Circle i(5),(p(3).x,p(3).y),dt,0,,,,f 
            Circle i(5),(p(4).x,p(4).y),dt,0,,,,f 
            Circle i(5),(p(6).x,p(6).y),dt,0,,,,f 
            Circle i(5),(p(7).x,p(7).y),dt,0,,,,f 
        Case 6
            For z As Long=1 To 6
                Circle i(6),(p(z).x,p(z).y),dt,0,,,,f 
            Next z
        End Select
    Next
End Sub

Var size=50
Var k=2,y=5
Var h=size/2
Screenres 7*size+16,size*2*7+8*10,32
color ,rgb(100,50,0)
cls
Dim  As Any Ptr f()
setdice f(),size 
For n As Long=0 To 6
    For m As Long=n To 6
        Put(k,y),f(n),Pset
        Put(k,size+2+y),f(m),Pset
        k+=size+2
    Next
    y+=2*size+10
    k=h
    h+=size/2
Next
For n As Long= Lbound(f)To Ubound(f)
    Imagedestroy(f(n))
Next
Sleep
 
Post Reply