Qbasicnews.com

General => General/Misc => Topic started by: v3cz0r on October 27, 2004, 02:18:16 AM



Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: v3cz0r on October 27, 2004, 02:18:16 AM
Ok, i wasn't going to say anything about this project until it was near to be released, but heck.. i just want to share something ;)

freeBASIC is a 32-bit compiler i've being working on in the last 2 months. FB's syntax is the most compatible possible with QB/PDS/VBDOS. Currently it's only for Windows, but the runtime library is portable (C code compiled with GCC) and all tools (assembler, linker, maker, etc) are from GNU, what means it will be piece-of-cake to recompile for Linux (x86 only tho).

Here are some examples (.BAS), generated code (.ASM) and executables (.EXE) that the compiler can currently parse and create: http://freebasic.bad-logic.com/downloads/freeBASIC_preview.rar (WinRAR is needed to extract).

A CPU with MMX support is needed to run the tests because the gfx lib used to update the screen (TinyPTC) was compiled to use MMX (also for Pentium Pro, but i guess VC++6 didn't gen any opcode incompatible with Pentiums MMX, not sure). Compiler can generate code compatible with 386's too, although the runtime library is currently being compiled for 686 CPUs, for max speed on modern boxes.

The tests include some gfx stuff and a linked-list done with pointers (oh yeah, it has pointers ;).

You can see in some examples it got support for unsigned data types too (and of course floating-point), including the BYTE type. There's support for var-len (up to 2GB) and fixed-len strings, user defined types (incl. unions), dynamic arrays (that can be passed to procs as in qb: "mysub myarray()"), etc, etc..

The GFX tests are using the TinyPTC library coz.. well, there's nothing easier around to use.. of course it's not the fasted alternative, using DX would give much better results and a QB-ish full screen ;), but the compiler still needs function pointers to access DX directly (damn COM interfaces).


freeBASIC will be released when it get to compile itself.. yes, that's right, the compiler was written 100% in QB (VBDOS to be exact, code is already 16k lines long). There are many runtime lib routines to implement, such as for files, console (including PRINT), some string functions and math. In some weeks i may release the version 0.01 for testing, we will see ;)


Peace..


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Nexinarus on October 27, 2004, 03:00:13 AM
Nice work man. You seem to have a tight system going already so far. What assembler do you use, masm?

What else is needed to compile itself? And also coding this in basic itself must be one big challenge, congrats on that.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Sterling Christensen on October 27, 2004, 03:10:04 AM
YOU ROCK! The syntax is everything I would want a 32 bit qb to be, ie not too different looking yet more capable than QB (pointer etc).

I didn't know GNU as could do intel syntax like that. For some reason I thought it was AT&T only.

I would be happy to help with the rest of the runtime library if it might speed things up. I'm pretty comfortable with C. I wouldn't mind being given the least fun parts to do, really - anything for this compiler.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: VonGodric on October 27, 2004, 06:43:56 AM
WOW.

You are going to make a history you know(not for the first time :lol: ) in qb world.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Jofers on October 27, 2004, 08:28:15 AM
Wow, v1c... the code is really nice.  I can't really give any judgements on speed, it's definately a step up from old man QB.  It sure as hell kicks the crap out of libertybasic, it's simple and the executables are small, too.

Have I ever said "you the man" to you before?  Because I've met the current reigning "the" man, and all he did was take 13 shots of whiskey without passing out, so I think you have some edge as the new "the man".

The only complaint I have is:  It definately, definately needs a better name.  I'll get back to you on that.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: na_th_an on October 27, 2004, 08:59:34 AM
Excellent work, man. This is good news.

But, as Jofers said... find a better name :P


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: wildcard on October 27, 2004, 10:13:20 AM
Great work, can't wait to see more.

Personally I like the name.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: potato on October 27, 2004, 10:34:31 AM
awsomaaaaaaa :o :o :o


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Plasma on October 27, 2004, 01:07:58 PM
Sweet.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Z!re on October 27, 2004, 01:16:24 PM
*gasp* :o

wow


Can't wait for it to be released :D


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Blitz on October 27, 2004, 01:17:57 PM
Yeah, it's bad ass. Also, unlike other qb compilers made recently. It optimizes expressions and redundant operations. If he fixed the DAG that is. If you finish it v1ctor, C is past for me.

Btw, i had nothing to do with the compiler.


Title: Re: freeBASIC (a 32-bit QB-syntax compatible compiler) previ
Post by: Neo on October 27, 2004, 02:39:55 PM
Oh, v1ctor, this is just plainly awesome! I already wanted something like this to happen ;) I'd leave anything if this is released :P It's the powerful combination of C + QB, including a SMART compiler... ;)

Quote from: "v1ctor"
The GFX tests are using the TinyPTC library coz.. well, there's nothing easier around to use.. of course it's not the fasted alternative, using DX would give much better results and a QB-ish full screen ;), but the compiler still needs function pointers to access DX directly (damn COM interfaces).

Maybe you can convert the FreeQB code to C++ before compiling, and compile it with a DX/OpenGL compatible C++ compiler (like VC++ 6.0). Because then you only need to specify you're using OpenGL32.LIB, GLU32.LIB, and GLAUX.LIB (/windows/system32/), and in the FreeQB code you only need to include OpenGL32.bi, Glu32.bi and Glaux.bi... :-?  It's just a thought :P


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: na_th_an on October 27, 2004, 02:47:29 PM
That would require the user to have VC++. Better make things standalone.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Neo on October 27, 2004, 02:53:40 PM
Maybe it's possible to include VC++ or any other suitable compiler?


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Blitz on October 27, 2004, 04:57:26 PM
you don't need to use vc or anything else, you can link any win32 lib you like to freebasic programs.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Jofers on October 27, 2004, 04:59:49 PM
The ideal would be to be able to download a standalone compiler.  And that would mean package free tools, like he's already done.  Relase that as a base, and also have an IDE project to go along with it.  I'm lazy, poor and untalented so I couldn't do it, but i'd be glad to document the runtime or something.

As for the name, hmm... you could always name it FreeBase (Free BAsic Sytax Evaluator), and have the satisfaction of knowing your compiler is a crack reference.  Or I guess you could use BASE instead of BASIC for anything really, to move away from all the other crappy "Letter/Word + BASIC" naming conventions.  QuickBase, FuBase, BarBase, etc.

If you wanted to move away from BASIC in general:
 it's really popular to name programming stuff after animals.
Lots of animals here:
http://www.oaklandzoo.org/atoz/atoz.html

If not an animal, maybe something mythical:
http://www.mythcreatures.50megs.com/

Personal fav from there is "Adaro" or "Pissed off Mermaid throwing Fish".

You could use a word generator.  Fantastic one here:
http://www.fantasist.net/wordgen.shtml

If you have a word, it shouldn't be too terribly hard to come up with an acronym for it, especially if it has a 'B'.  That's how everyone else comes upwith an acronym anyway.  That, or you could throw it on top of the convential "Basic".

But, circling back around to that:
If it's open source:  ShareBasic, PeerBasic, etc.  Or BeerBasic.  But if you made it yourself, there's always the ultimate:  VicBasic (Or VicBase! or Vic-on-a-Stick, VoaS for short!).


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Plasma on October 27, 2004, 05:20:49 PM
wtf is wrong with "freeBASIC"?


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Fling-master on October 27, 2004, 05:24:57 PM
Call it UBC. Just like UGL but the "BC" of course stands for "Basic Compiler".

FreeBasic is fine by me at any rate. :)

Now... there have been a lot of promises of new QB-like 32-bit compilers over the years... finish this one! :P I mean that seriously... the demo's are really showing promise in my opinion.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Blitz on October 27, 2004, 06:01:35 PM
As far as i've seen, it's pretty much as functional as qb. But much better.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: v3cz0r on October 27, 2004, 06:43:39 PM
Alright, thanks to anyone that replied, i hope you will be able to play yourselves with the real thing soon ;)

Let me try to answer some questions.. er


Quote from: "Nexinarus"
What assembler do you use, masm?


I started emitting code to MASM, but as it is only for Windows, not *really* free, and doesn't support any kind of high-level debugging definitions (nor NASM or FASM does), then i moved to GNU's binutils. GAS with intel syntax looks pretty much the same (inline ASM won't be too different than the usual), and it's the only assembler that allows high-level debugging, as it's the backend of GCC - GDB-Insight will be the debugger, it's completely visual, but a resource hog.. nothing is perfect.


Quote from: "Nexinarus"
What else is needed to compile itself? And also coding this in basic itself must be one big challenge, congrats on that.


Other than a bunch of rtlib routines not yet implemented, the compiler must support arrays on user type fields, as i used them in many modules. It needs DATA statements too, and it's not that simple to add, as it may seem to be.

Most difficult parts were implementing trees, hash tables and a DAG (not used yet) in QB w/o pointers, other than that, code is divided in 16 modules (the recursive-descent parser is sliced in 6 parts). There is a just a global struct shared between the modules, everything else is accessed using getters's and setter's.


Quote from: "Sterling"
I didn't know GNU as could do intel syntax like that. For some reason I thought it was AT&T only.


Me neither ;), i started looking for an assembler when i gave up using MASM and when reading the not-that-great-but-enough-for-open-source GAS' manuals i found the .intel_syntax directive. Code looks very close to MASM, the weird parts are in the data allocation, but inline ASM won't use that so..

Quote from: "Sterling"
I would be happy to help with the rest of the runtime library if it might speed things up. I'm pretty comfortable with C. I wouldn't mind being given the least fun parts to do, really - anything for this compiler.


Sure, i'll need help to implement the QB's GFX routines (SCREEN, PSET, LINE, etc), i was thinking about using SDL as it's portable.. but runtime can get really big, i remember seeing 200kb DLL's coming with apps using SDL, dunno.


Quote from: "Jofers"
... the code is really nice. I can't really give any judgements on speed, it's definately a step up from old man QB. It sure as hell kicks the crap out of libertybasic, it's simple and the executables are small, too.


I checked the code generated by PureBASIC, blitz3d, RealBASIC, iBASIC, PowerBASIC and some others commercial alternatives, only PB can gen better code in some compound statements, but when the DAG (Direct-acyclic Graph) module start to be used, code will look great (sub-expressions eliminated, better register usage, etc). RT lib is being written very modularized, so i think EXE's sizes won't be too big, as LD will link just the used objs.


Quote from: "Blitz"
Btw, i had nothing to do with the compiler.


Nah, if it wasn't Blitz pointing me out the right ways to do a real compiler, FB would be just a toy now :). You could have scanned the few hundred of pages of the Dragon Book for me, but.. j/k ;)

The web host is being paid by him too so.. i'll put some pr0n stuff there soon to attract more ppl, you know..


Quote from: "Neo"
Maybe you can convert the FreeQB code to C++ before compiling, and compile it with a DX/OpenGL compatible C++ compiler (like VC++ 6.0)


The emit/back-end module is say 99% independent of the front-end, it could be changed to emit C code later, but that's not my plan, while asm code won't ever be so good as the one a C optimizing compiler can generate, it will good enough when comparing with any commercial BASIC compiler - and hey, you will be able to use inline ASM if want more speed ;).

Using DirectX directly is a matter of adding function pointers, and i plan to do that after the compiler compiles itself. I don't want to include any closed-source tools, maybe some "abandonawares" from M$, like the resource editor.

What is really needed (and that's the hardest part coz doing by hand can be very error prone) is converting the C headers from Win API's and from any lib like OpenGL, to FB's syntax (that's QB/VB-like).. i guess it would be easier to reuse the include files that the VB community already translated from C.. or the ones that come with PowerBASIC, but then you have the copyright crap.. an automated tool would be better.. h2bi or such.


Quote from: "Jofers"
The ideal would be to be able to download a standalone compiler. And that would mean package free tools, like he's already done.


Yeah, exactly, it will come only with free/open-source tools, all currently from GNU: the assembler (AS), linker (LD) and archiver (AR, that's only need when creating static libs). I need yet to write a front-end to the compiler (FBC), i'm atm using batch files to call FBC, AS and LD, in that order.



Now about the name, heh.. it was going to be called uniBASIC, but there's already one with that name (a commercial one used in mainframes), so i changed to freeBASIC, as it will be open-src and there's just a "freebasic" listed on google that's a defunct project from 1998 or so. I can't change the name now as everything has a "FB" internally and the web site is being done with that name in mind ;)



In next weeks i'll add all string, math and memory routines missing in the run-time library, then add arrays on user def fields and try to get the compiler to compile itself, the first release will come next.. probably before xmas ;)


Again, thanks for all the feedback.. and, hey, someone now make an text-mode QB-ish IDE ;).. anyway, compiler reports error messages compatible with M$/VC++'s format, so any IDE or text-editor will be just fine.


Byez...


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: barok on October 27, 2004, 08:41:26 PM
whoah... this is SO awesome!!!  You have my full support v3cz0r!  It looks totally sweet.  Rock on!  I'll wait for the release with baited breath!  (I baited mine with cookies.)


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Jofers on October 27, 2004, 11:52:29 PM
... and it would really be so hard to click "search and replace" and then "replace all" in the source code?  Now you're just lazy :P


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: BinarySHOCK on October 28, 2004, 01:20:41 AM
Wow great job v1ctor! FreeBASIC will kick a** seems like you've got a lot of progress done in 2 months, can't wait i'll most definetly be using it, keep up the good work!


Title: Excelent work!
Post by: Ravyne on October 28, 2004, 03:43:41 AM
Really great work. Even though I've moved onto C++ mostly I'm glad to see that people are working to bring BASIC into this century. As a matter of fact I've been working on a BASIC myself lately, although I've thrown out the idea of QB compatibility and I'm targeting the .NET platform. Unlike VB I'm not aiming for Rapid Application Development, but a more general-purpose language. Think C++ but in friendly, BASIC form.

If you'd ever like to discuss language or compiler issues I'd be glad to chat.

Good luck!


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: wildcard on October 28, 2004, 05:27:06 AM
Quote from: "Jofers"
... and it would really be so hard to click "search and replace" and then "replace all" in the source code?  Now you're just lazy :P


C'mon whats more important? It being released or its name? I like the name and so do others, but above that we would like to actually get to use it. Now don't go asking him to waste his time replacing words  :P


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: KiZ on October 28, 2004, 06:10:10 AM
Sounds awesome, man!

And heres my simple question... Will the compiled exes be faster than they are currently?


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Nexinarus on October 28, 2004, 06:36:11 AM
Remembering when UGL came out, i recall the name was questioned a fair bit. Infact I remember when people was questioning your name jofers, during those odd days. Also questioning my name. The names fine.

Anyways v1c im impressed with the code output for the math, very nice.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Blitz on October 28, 2004, 06:37:04 AM
Of course, for starters it's uses flat mode, which gives access to more registers and 4 GB of memory directly. No segments that slows it down. Second, it has constant folding and and optimises expressions so that the same operation doesn't get performed more then once in a block. Expressions like
Code:
a = b + c
b = a - d
c = b + c
d = a - d


Will become
Code:
a = b + c
b = a - d
c = a
d = b


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: relsoft on October 28, 2004, 08:29:01 AM
Andre(v1ctor) my boy!!!

Okay, that's fractal zooming!!! And DJGPP aint that fast in zooming the mendel!!! :o

Fecking awesome!!!!

genius is an understatement. :*)

Hey, GNU can do Intel syntax?  So I could use intel syntax in mingw?
WOW!!!

And you decide to release this when I'm about to go on vacation?!!!  I hate you!!!! ;*)


Great job!!!


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Jofers on October 28, 2004, 09:45:26 AM
True, Nex, but if anyone names a project after me I'll rip their head off and shove it down what's left of their throat.

The only reason I would change the name is the connotation in using it.  FreeBasic just sounds like a little homemade compiler someone made in qbasic (http://www.geocities.com/SiliconValley/Heights/7052/freebas.html).  And while, yeah, I guess it is, it could easier to fool the cheap bastard who comes across it with a cooler name.

But I don't really care that much, I didn't know it existed until yesterday,  after all :).  In fact, I'm usually much more absent from this place, I was just getting some work done yesterday on qb45.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: relsoft on October 28, 2004, 09:51:54 AM
Women? :*)  

 :D


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Jofers on October 28, 2004, 10:24:21 AM
Nah, they don't exist here.  But much in the same manner as a nagging women, schoolwork and social responsibilities never end :D.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Neo on October 28, 2004, 12:09:36 PM
Quote from: "Blitz"
Code:
a = b + c
b = a - d
c = a
d = b

If you change b, then c <> a (because c = b + c). ;)


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Blitz on October 28, 2004, 12:17:14 PM
My fault, i wrote the code wrong.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Neo on October 28, 2004, 12:20:03 PM
No problem, I know what the idea behind it is. ;)

I just had to point out that mistake, sorry.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: v3cz0r on October 28, 2004, 06:38:14 PM
Quote from: "dark_prevail"
And heres my simple question... Will the compiled exes be faster than they are currently?


When the DAG module begins to be used (only after the compiler compiles itself), any common sub-expression will be eliminated inside a basic block, for example, there are loads of reloads when accessing arrays, that is easily "detected" when using Graphs to link the nodes.

But FB is not an optimizing compiler, speed will be enough to beat other BASIC commercial compilers like PB - that is the BASIC compiler that gens the best code (and i checked ALL them, believe me), but PB doesn't seem to do any kind of expression optimization, it does a bunch of hacks that are completely non-portable.. no wonder PB is just for Windows.


Quote from: "Nexinarus"
Anyways v1c im impressed with the code output for the math, very nice.


There are some simple optimizations to be added before the 1st release, like converting muls by power of 2 immediates to shifts, load after store and such.. i didn't add that yet as i was getting functions/subs to work in the last days and that took me a lot of time.


Quote from: "relsoft"
Hey, GNU can do Intel syntax? So I could use intel syntax in mingw?


Hmm, i really don't know, GCC will optimize even the inline asm block (saving or not the registers, etc), dunno if it's not dependent of AT&T syntax.. or you would have to switch back the syntax when closing the inline block, using the .att_syntax directive.


Quote from: "relsoft"
And DJGPP aint that fast in zooming the mendel!!!


Heh, not that much, GCC is awesome doing optimizations, even DJGPP using an outdated version, i guess.. bad thing about DJ is that it's does not run in flat-mode, segment overriding kills the performance on modern CPUs.


Quote from: "Ravyne"
If you'd ever like to discuss language or compiler issues I'd be glad to chat.


Sure, when the first release gets done it will be fully open-source, any contributions will be welcome.

I started this project coz i was tired of seeing each year new problems appearing when trying to code anything in QB.. bad DOS emulation, hardware less and less backward compatible and so on - i guess the next release of Windows will be even less suitable for DOS coding, but i don't blame M$.. more than a decade is over, ow..

I waited for somebody to make a free and *really* QB-compatible compiler, but as that didn't happen i thought.. hell, lets try it myself, heh.. i didn't think it would be at this stage so early, lets hope it will continue this way until the first public release.


And about the name.. call it just "FB", acronyms can be anything you want ;).


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: relsoft on October 29, 2004, 01:34:27 AM
Pete: FB express. :*)


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Blitz on October 29, 2004, 10:07:57 PM
Check this out, simple gui program with freebasic. It took us a long time to get it to work becuase we both suck at gui coding and v1ctor thought it was the compiler that was messing up. Turns out it wasn't. Sure, looks messy. Windows guis are messy. But look at the same code in C, it's even worse. Anyways, if you really look at it carefully it's not that bad. http://freebasic.bad-logic.com/downloads/winhello.zip

Code:
''
'' winhello.bas - Windows Gui example with freebasic
''
''
defint a-z
option explicit
option private

'$include:'kernel32.bi'
'$include:'user32.bi'
'$include:'gdi32.bi'


const null              = 0
const true              = -1
const false             = 0


declare function        WinMain     ( byval hInstance as long, _
                                      byval hPrevInstance as long, _
                                      szCmdLine as string, _
                                      byval iCmdShow as integer ) as integer

dim res as integer


                                 
                                 
    ''
    '' Entry point    
    ''
    res = WinMain( GetModuleHandle( null ), null, command$, SW_NORMAL )
    end res
   
   
   


'' ::::::::
'' name: WndProc
'' desc: Processes windows messages
''
'' ::::::::
defint a-z
function WndProc ( byval hWnd as long, _
                   byval message as long, _
                   byval wParam as long, _
                   byval lParam as long ) as integer
    dim rct as RECT
    dim pnt as PAINTSTRUCT
    dim hDC as long
   
    WndProc = 0
   
    ''
    '' Process message
    ''
    select case ( message )  
         
        case WM_CREATE            
            exit function
       
        ''
        '' Windows is being repainted
        ''
        case WM_PAINT
         
            hDC = BeginPaint( hWnd, pnt )
            GetClientRect hWnd, rct
           
            DrawText hDC,"Hello Windows from FreeBasic!", -1, _
                     rct, DT_SINGLELINE or DT_CENTER or DT_VCENTER
           
            EndPaint hWnd, pnt
           
            exit function            
       
        ''
        '' Window was closed
        ''
        case WM_DESTROY
            PostQuitMessage 0            
            exit function
    end select
   
    ''
    '' Message doesn't concern us, send it to the default handler
    '' and get result
    ''
    WndProc = DefWindowProc( hWnd, message, wParam, lParam )    
   
end function




'' ::::::::
'' name: WinMain
'' desc: A win2 gui program entry point
''
'' ::::::::
defint a-z
function WinMain ( byval hInstance as long, _
                   byval hPrevInstance as long, _
                   szCmdLine as string, _
                   byval iCmdShow as integer ) as integer    
     
     dim wMsg as MSG
     dim wcls as WNDCLASS    
     dim szAppName as string
     dim hWnd as long

     
     WinMain = 0
     
     ''
     '' Setup window class
     ''
     szAppName = "HelloWin"
     
     wcls.style         = CS_HREDRAW or CS_VREDRAW
     wcls.lpfnWndProc   = procptr( WndProc() )
     wcls.cbClsExtra    = 0
     wcls.cbWndExtra    = 0
     wcls.hInstance     = hInstance
     wcls.hIcon         = LoadIcon( null, IDI_APPLICATION )
     wcls.hCursor       = LoadCursor( null, IDC_ARROW )
     wcls.hbrBackground = GetStockObject( WHITE_BRUSH )
     wcls.lpszMenuName  = null
     wcls.lpszClassName = sadd( szAppName )
     
     
     ''
     '' Register the window class    
     ''    
     if ( RegisterClass( wcls ) = false ) then
        MessageBox null, "This program requires Windows NT!", szAppName, MB_ICONERROR              
        exit function
    end if
   
   

    ''
    '' Create the window and show it
    ''
    hWnd = CreateWindowEx( 0, _
    szAppName, _
                         "The Hello Program", _
                          WS_OVERLAPPEDWINDOW, _
                          CW_USEDEFAULT, _
                          CW_USEDEFAULT, _
                          CW_USEDEFAULT, _
                          CW_USEDEFAULT, _
                          null, _
                          null, _
                          hInstance, _
                          null )
                         

    ShowWindow   hWnd, iCmdShow
    UpdateWindow hWnd
     

    ''
    '' Process windows messages
    ''
    while ( GetMessage( wMsg, null, 0, 0 ) <> false )    
        TranslateMessage wMsg
        DispatchMessage  wMsg
    wend
   
   
    ''
    '' Program has ended
    ''
    WinMain = wMsg.wParam

end function


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: relsoft on October 30, 2004, 01:07:26 AM
Man we need templates for FB.

So I would assume you can do something like this?

Code:
pixelWidth=surface.ddpfPixelFormat.dwRGBBitCount\8
offset= x*pixelWidth + y*surface.lPitch
Poke(((BYTE *)surface.lpSurface)+offset, &colour, pixelWidth)


Woot!!! DX here I come!!!!


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: VonGodric on October 30, 2004, 07:09:43 AM
It's nice.
Have a question though, will there be FB version for dos too? That would be awesome


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Blitz on October 30, 2004, 07:44:27 AM
Why use poke when you have real pointers? FB already has real pointers, C style. :)
I don't think v1ctor will ever release a FB for dos. But since it's open source anyone can do that. It's just a matter of coding a runtime lib for dos. Shouldn't be anymore to it i think.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Blitz on October 30, 2004, 08:59:51 AM
Linked list example with pointers

Code:
defint a-z
'$include: 'user32.bi'

const MAXNODES = 10
const NULL = 0

type TNODE
id as short
prv as TNODE ptr
nxt as TNODE ptr
end type

type TLIST
head as TNODE ptr
tail as TNODE ptr
end type

dim list as TLIST
dim nodeTB(0 to MAXNODES-1) as TNODE
dim p as TNODE ptr

'' init list
list.head = varptr( nodeTB(0) )
list.tail = varptr( nodeTB(MAXNODES-1) )

p = NULL
for i = 0 to (MAXNODES-1)-1
nodeTB(i).id  = i
nodeTB(i).prv = p
nodeTB(i).nxt = varptr( nodeTB(i+1) )
p = varptr( nodeTB(i) )
next i

nodeTB(MAXNODES-1).id  = MAXNODES-1
nodeTB(MAXNODES-1).prv = p
nodeTB(MAXNODES-1).nxt = NULL


'' test it
dim res as string

p = list.head
do while( p <> NULL )
res = res + str$( p->id )
p = p->nxt
loop

MessageBox 0, res, "Result", MB_ICONASTERISK





Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: adosorken on October 30, 2004, 10:51:49 AM
With Windows XP now being the dominant OS and having mediocre-at-best support for DOS, I think the smart thing to do would be to abandon the old DOS-based QB and take up something like this instead. If its syntactic compatability is 100% on-par with QB, then there's no need to suffer with DOS anymore. If it were 5 years ago, I'd say great, do a DOS version as well, but as Microsoft is seeking to suffocate all DOS users, it's wiser to adapt to the changing times. I was hoping to have OBDS out by this time of the year, but oh well. :-?


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: barok on October 30, 2004, 02:59:01 PM
Like Adosorken said: If you can't beat'em, join'em.  All i want is it to be 100% compatible with qb syntax.  If that's done i'll be very happy.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Blitz on October 31, 2004, 12:41:25 AM
Another freebasic example, this time a simple opengl application. For anyone who might be interested. http://freebasic.bad-logic.com/downloads/gltest.zip

Code:
''
'' gltest.bas - Freebasic opengl example, uses glut for simplicity
''
''
defint a-z
option explicit

'$include: 'gl.bi'
'$include: 'glu.bi'
'$include: 'glut.bi'



declare sub         doMain           ( )


    ''
    '' Entry point
    ''
    doMain
   

   

'' ::::::::::::
'' name: doRender
'' desc: Is called by glut to render scene. cdecl is used becuase glut
''       callbacks expect the cdecl calling convention
''
'' ::::::::::::
defint a-z
sub doRender cdecl
    static rtri as single
    static rqud as single
   
    glClear GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT
    glPushMatrix
   
    glLoadIdentity
    glTranslatef -1.5, 0.0, -6.0
    glRotatef rtri, 0.0, 1.0, 0.0
         
    glBegin GL_TRIANGLES
        glColor3f   1.0, 0.0, 0.0
        glVertex3f  0.0, 1.0, 0.0
        glColor3f   0.0, 1.0, 0.0
        glVertex3f -1.0,-1.0, 1.0
        glColor3f   0.0, 0.0, 1.0
        glVertex3f  1.0,-1.0, 1.0
        glColor3f   1.0, 0.0, 0.0
        glVertex3f  0.0, 1.0, 0.0
        glColor3f   0.0, 0.0, 1.0
        glVertex3f  1.0,-1.0, 1.0
        glColor3f   0.0, 1.0, 0.0
        glVertex3f  1.0,-1.0,-1.0
        glColor3f   1.0, 0.0, 0.0
        glVertex3f  0.0, 1.0, 0.0
        glColor3f   0.0, 1.0, 0.0
        glVertex3f  1.0,-1.0,-1.0
        glColor3f   0.0, 0.0, 1.0
        glVertex3f -1.0,-1.0,-1.0
        glColor3f   1.0, 0.0, 0.0
        glVertex3f  0.0, 1.0, 0.0
        glColor3f   0.0, 0.0, 1.0
        glVertex3f -1.0,-1.0,-1.0
        glColor3f   0.0, 1.0, 0.0
        glVertex3f -1.0,-1.0, 1.0
    glEnd
   
    glColor3f 0.5, 0.5, 1.0
    glLoadIdentity    
    glTranslatef -1.5, 0.0, -6.0
    glTranslatef 3.0,0.0,0.0    
    glRotatef rqud, 1.0, 0.0, 0.0
   
    glBegin GL_QUADS
        glVertex3f -1.0, 1.0, 0.0
        glVertex3f  1.0, 1.0, 0.0
        glVertex3f  1.0,-1.0, 0.0
        glVertex3f -1.0,-1.0, 0.0
    glEnd    

    glPopMatrix            
    glutSwapBuffers
   
    rtri = rtri + 2.0
    rqud = rqud + 1.5
   
end sub



'' ::::::::::::
'' name: doInput
'' desc: Handles input. cdecl is used becuase glut callbacks expect the
''       cdecl calling convention
''
'' ::::::::::::
defint a-z
sub doInput cdecl ( byval kbcode as unsigned byte, _
                    byval mousex as integer, _
                    byval mousey as integer )
             
    if ( kbcode = 27 ) then
        end 0
    end if

end sub



'' ::::::::::::
'' name: doInitGL
'' desc: Inits OpenGL
''
'' ::::::::::::
defint a-z
sub doInitGL
   
    ''
    '' Rendering stuff
    ''
    glShadeModel GL_SMOOTH
    glClearColor 0.0, 0.0, 0.0, 0.5
    glClearDepth 1.0
    glEnable GL_DEPTH_TEST
    glDepthFunc GL_LEQUAL
    glEnable GL_COLOR_MATERIAL
    glHint GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST    

end sub



'' ::::::::::::
'' name: doReshapeGL
'' desc: Reshapes GL window. cdecl is used becuase glut callbacks expect
'        the cdecl calling convention
''
'' ::::::::::::
defint a-z
sub doReshapeGL cdecl ( byval w as integer, _
                        byval h as integer )
   
    glViewport 0, 0, w, h
    glMatrixMode GL_PROJECTION
    glLoadIdentity
   
    if  ( h = 0 ) then
        gluPerspective  80, w, 1.0, 5000.0
    else
        gluPerspective  80, w / h , 1.0, 5000.0
    end if
   
    glMatrixMode GL_MODELVIEW
    glLoadIdentity

end sub




'' ::::::::::::
'' name: doMain
'' desc: Main routine
''
'' ::::::::::::
defint a-z
sub doMain
   
    ''
    '' Setup glut
    ''
    glutInit 1, sadd( " " )    
   
    glutInitWindowPosition 0, 0
    glutInitWindowSize 640, 480
    glutInitDisplayMode GLUT_RGBA or GLUT_DOUBLE or GLUT_DEPTH
    glutCreateWindow "Freebasic <3 OpenGL"
   
    doInitGL
   
    glutDisplayFunc  procptr( doRender )
    glutIdleFunc     procptr( doRender )
    glutReshapeFunc  procptr( doReshapeGL )
    glutKeyboardFunc procptr( doInput )    
   
    glutMainLoop
   
end sub


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Plasma on October 31, 2004, 01:16:56 AM
Nice.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: marzecTM on October 31, 2004, 04:01:16 AM
and here an example with sdl and gl, in order to get rid of this crappy glut lib

http://ratatoskr.bad-logic.com/temp/sdltest.rar

my code is crappy, it's 7:58 over here and i did that shit at 4:00am so... don't blame me. i already translated sdl.h, sdl_keyboard.h sdl_mouse.h and sdl_video.h, i guess based on that we could do some sort of wrapper to emulate the old qb commands like screen line etc. i will continuing porting as v1c gets beyond that 2000 symbols barrier.

btw, the code is so ugly to
 a) show that fb can not only handle clean code
 b) better notice bugs that only show up when the code is badly written hehe....


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: VonGodric on October 31, 2004, 06:42:32 AM
That's really nice.

To those who need sdl.dll:
for win32: http://www.libsdl.org/release/SDL-1.2.7-win32.zip


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: barok on October 31, 2004, 11:12:03 AM
...that's done with freebasic?  Wow...  that's so awesome... it's actually fast... and is that a high resolution i see?


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Blitz on October 31, 2004, 11:15:24 AM
Yepp, it's done with freebasic. It uses opengl of course. But that's the thing, you can link any win32 lib that you use in C to freebasic. It's as functional as any other real compiler, not just a toy. Notice how the opengl and win gui example uses callbacks. Never seen that in basic before :)

Can you tell it's not qb code? I can't, except for cdecl and codeptr


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: barok on October 31, 2004, 11:22:51 AM
one last question:  will traditional libraries be compatible with fb?  (cosmox, rellib, gslib, etc. etc.)


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Blitz on October 31, 2004, 11:23:37 AM
Nope, becuase they're written for real mode dos and not windows.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: barok on October 31, 2004, 11:26:56 AM
I thought so.  Oh well... but then again, the ability to use any C library makes up for it though.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: adosorken on October 31, 2004, 11:29:11 AM
It's 1024x768 in 16 bit color according to the sourcecode. Very impressive for...let's face it...BASIC. :D Now let's see who the first person will be to run with this and make a game, eh? :)

Hey victor and Blitz...is the syntax finalized? If so, I'll start developing with this thing right away. :D

EDIT: By the way guys...masm32 is free...it's what I was using for OBDS. http://www.masm32.com/  Microsoft doesn't develop this though. :)


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Blitz on October 31, 2004, 12:22:38 PM
Just to make things clear, this is v1ctors project. I just beta testa and stuff.

Anyways, as far as i know. There are still lots of bugs to be sorted out. As it's just 2 months old and compilers are complex. Also, the symbol table can't handle more then 2000 symbols at the moment since the compiler is still in vbdos. And just gl.bi is over 800 symbols. But once it has compiled itself this limitation will be gone. If you want to help out with testing and stuff, ask v1ctor.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Jofers on October 31, 2004, 01:03:43 PM
Hmm... I don't think I could be much help in testing.  But I can document it, and I can make a nice website.  I figures if you make a documentation in a nice xml format, it wouldn't be difficult to get a nice thorough online reference like php or perldoc.  But I suppose that should wait for the release, and the completion of the base library.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: VonGodric on October 31, 2004, 03:50:55 PM
Hello again,
if you guys need a beta tester then I'm ready :wink:


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Sterling Christensen on October 31, 2004, 04:31:29 PM
Quote from: "marzecTM"
i guess based on that we could do some sort of wrapper to emulate the old qb commands like screen line etc.

That's what I've just started working on in C, I aim to support equivalents to stuff like DRAW, VIEW, WINDOW, and LINE STEP(x1, y1)-STEP(w, h) etc.

But for DRAW, I'll need to know what kind of string format freebasic uses.


Title: First impression...
Post by: ToohTooh on November 01, 2004, 07:30:22 AM
Hello, v3cz0r...

In http://forum.qbasicnews.com/viewtopic.php?p=81269#81269, wildcard referenced you as Victor. When even this was enough for me to recall your name, I went on to read and accessed your page: The name v1ctor and DOT com DOT br...

Oh, oldies... Weren't you the one who came up with pointers to functions, and a lot of cool stuff?.. They still survive somewhere in www.qb45.com, I suppose.

I bow to your QB passion, and experience...


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: adosorken on November 01, 2004, 07:38:37 AM
If VBDOS can only handle 2000 symbols, then why not just move on to a more modern version of VB for the thing? If you need a decent frontend, let me know...I don't know if it will be possible to finish OBDS, so if you'd like, I can retrofit its editor so you can have a good frontend for your compiler. :D

VBDOS....well, sucks.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Plasma on November 01, 2004, 10:52:39 AM
Quote from: "Blitz"
But once it has compiled itself this limitation will be gone.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: adosorken on November 01, 2004, 12:35:12 PM
I read that already, knucklehead. :evil: I was just offering an alternate (and frankly, better) solution. :D


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Plasma on November 01, 2004, 02:08:42 PM
Then you should have realized that they already have a better solution, which is compiling the compiler with itself once it gets advanced enough. There is no need for a newer version of VB.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: adosorken on November 01, 2004, 02:32:33 PM
It is more of a disadvantage to use a compiler to compile itself. It makes more sense to use an existing compiler to compile a new compiler. So the better solution is not the one they are using. But hey, what do I know, I'm just a hack, right? :roll:


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: VonGodric on November 01, 2004, 02:48:21 PM
Heh there uis the existing compiler: VBDos :lol:


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: aetherfox on November 01, 2004, 03:39:54 PM
Calm down guys,

Nek's right here, I think.

We aren't in the 70's where there weren't any options but to compile a compiler in the only existing compuiler which was compiled but compiling some compilable machine code.

Or something.

Why not use a proper, advanced and better compiler?  Maybe not something in the C range, but the newer VB's are perfectly fine, and you should have almost no work to do when porting what you alred have.

But, victor...props for a very very cool project.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Blitz on November 01, 2004, 03:43:24 PM
Nope, actually vb is too bulký. It's too much and does not have the features freebasic has. VB is quite different in someways. But freebasic on the other hand is qb on steriods. 100% compatible. Besides, any real compiler should be able to compile itself. If it can't, well then it's not very useful. And vb has royalties.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: adosorken on November 01, 2004, 03:50:46 PM
VB doesn't have royalties. I've been using it commercially for 4 years now and haven't ever paid a single royalty to Microsoft, nor have they asked for any (and they know I develop in both VB and VC). I don't see why VB would be considered "bulky", but hey...to each their own...


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: potato on November 01, 2004, 04:36:18 PM
Quote from: "barok"
one last question:  will traditional libraries be compatible with fb?  (cosmox, rellib, gslib, etc. etc.)


what if i tried my game (QB plus RelGFX pureQB routines)
?

Not complicated at all, it's ALL QB. would any regular SCreen 13 game work as is?


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Blitz on November 01, 2004, 05:11:27 PM
Yes, if it doesn't do any os specific stuff. Becuase it's not the same os. It will compile fine, but it will crash cuz you're doing dos stuff in windows.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: v3cz0r on November 02, 2004, 01:18:31 AM
Well it's being done in VBDOS because it's the closest to the compiler's syntax, meaning it will be easier to get FB to compile itself, ie: not a single source-code change - well, not 100%, there are two DEF SEG's that must be commented out.

2000 symbols are enough to get it to compile, there's no more than ~1000 procs/consts/etc being used at same time, as i divided everything in modules, i guess that will be okay, we will see.. if not, using VB just to get it compile will be the last resource.

When running as a win32 app, there will be no limits on number of symbols or whatever, arrays will be redimensioned if needed.


You will be able to use Rellib if Rel write a Windows port ;).


Btw, Stearling, read my PM :P


Everybody will be welcome to test it when it gets released, but please, make your bug reports the more descriptive you can ;)


If anyone want to talk about the project, join the #badlogic irc channel at irc.efnet.net.. cyaz


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: potato on November 02, 2004, 01:30:49 AM
it's relgfx, not the lib

it uses regular screen 13 GET and PUT, writing to an array buffer and putting the buffer onto the screen.

would that work?


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: barok on November 02, 2004, 03:33:04 AM
As long as it's pure qb i'm guessing it'll work... pure qb meaning any command you can use in qb without using a library.   this rocks, cuz it'll mean my game will be able to port directly to fb with no recoding anything, and not to mention the program'll get a nice speed and memory boost to boot. :D  Sometimes it's nice to make stuff in pure qb. ;)  

Also, are you improving some of the commands?  Like, what rel did for put ala superput? (allow transparency, clipping, maybe even drawing to a buffer, etc. etc.)


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Blitz on November 02, 2004, 06:50:15 AM
It will only work if it doesn't use any dos specific stuff. And most pure qb stuff uses very dos specific stuff to be "fast". Why would you need all that. In windows you have opengl, directx, sdl and 100s of other libs. Many libs use hardware acceleration.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: marzecTM on November 02, 2004, 07:34:29 AM
as v3c said: "hey why don't you port dqb" hehe....

all this funny screen, line, pset and stuff... hm, i already suggested to do that part with sdl. like doing a wrapper. dunno wheter this should get part of the runtimelib. i guess having something like an externel lib for qb compatibility would be neat too, since you could extend it yourself. like '$include: 'pureqb.bi' hehe...


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: potato on November 02, 2004, 09:21:58 AM
Quote from: "barok"

Also, are you improving some of the commands?  Like, what rel did for put ala superput? (allow transparency, clipping, maybe even drawing to a buffer, etc. etc.)


yeap, all of those. For things like trans. it just doesn't draw the pixel. For translucency it adds/subtracts the color value i think, and for clipping it just doesn't draw anything outside the bounds.

i think i'll try this soon


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Jofers on November 02, 2004, 01:45:46 PM
It's worth noting that Plasma is the one the that made Superput, from an assembly routine Rel modified for him from Rellib.  He also made that routine floating around that changes the memory segment QB uses for its drawing routines from &HA000 to any specified address.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: ShadowWolf on November 02, 2004, 05:36:54 PM
so what is the main thing keeping FB from compiling it self ?


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: KiZ on November 02, 2004, 05:46:05 PM
Quote from: "ShadowWolf"
so what is the main thing keeping FB from compiling it self ?


Wooo... but then you are into complicated paradoxical stuff... like what happens if you eat yourself.... Or those freaky Mobius strips... O_O


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Jofers on November 02, 2004, 06:21:33 PM
My guess would be an incomplete runtime.  QB's runtime library has around 1400 routines.

I mean, he probably won't be needing crap like DRAW and PLAY, but it's still a lot of stuff to write for.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: ShadowWolf on November 02, 2004, 09:04:58 PM
jofers ya but what i have seen so far of the test there already a pretty larg lexcon for the lang and the systex look complete
and all the runtime's arn't need to compile the compiler.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: v3cz0r on November 02, 2004, 09:23:26 PM
There are many QB intrinsic functions/statements that the compiler uses and that aren't implemented yet like PRINT, SWAP, READ, RESTORE, OPEN and such, i'll probably have them implemented this week, so the first tries to compile itself will be done soon..

Today i added arrays on type fields, a VBDOS feature that the compiler uses a lot and that is also needed to access some structs from C APIs/libs.. you can do now such as: a(b).c.d(e,f).h = 1234, it was painful to code, i've to say.. ow


Byez.....


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: barok on November 02, 2004, 09:32:46 PM
Quote from: "Jofers"
It's worth noting that Plasma is the one the that made Superput, from an assembly routine Rel modified for him from Rellib.  He also made that routine floating around that changes the memory segment QB uses for its drawing routines from &HA000 to any specified address.


So sorry Plasma!   :-?


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: ShadowWolf on November 02, 2004, 09:42:26 PM
v3cz0r this compiler can use any C lib right what about somthing like Allgro ?


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: adosorken on November 02, 2004, 09:48:38 PM
Bass.lib all the way. :D Bass + OpenGL = all you ever need for game development.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: ShadowWolf on November 02, 2004, 10:00:14 PM
OpenGl na don't want to get into that just yet pluse i already understand allgro if i can get away with using that i will.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: adosorken on November 02, 2004, 10:14:11 PM
I would imagine it'd support Allegro if it can link any standard import library. :D


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: v3cz0r on November 02, 2004, 11:28:59 PM
You can use any non-OO library, being it static or dynamic (DLL), but for that the C header with function prototypes and other declarations first have to be ported/translated to FB's syntax, what isn't an easy task.

An automated tool is hard to make, due the way some C headers are written (loads of macros, typedefs and such), this has to be done by hand. Someone doing that must have full knowledge of C and VB/FB and a lot of patience.. if we have luck, we can just use headers/include-files already translated to be used with VB/PB, with some edition and search&replace, that wouldn't take more than a couple of minutes to be done (that was the case with the Opengl header).


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: marzecTM on November 03, 2004, 03:39:26 AM
hey folks,

after finishing porting the sdl headers (well 85% of them) to fb i started writing a preprocessor for fb, since we all will need include guards at some stage (or coditional compiling). so here it is

http://ratatoskr.bad-logic.com/temp/pp.zip

it offers the following stuff:

*  include: 'FILENAME'
 * define SYMBOL
 * ifdef / ifndef  SYMBOL
 * else
 * endif

where SYMBOL is just a NAME like SDL_BI or something. anybody that knows the c/c++ preprocessor will feel at home. ifdef/ifndefs can be nested as much as you want. some restrictions:

SYMBOL can only be a single word, you can't give a SYMBOL a value (like for constants) use const instead.

hm can't think of any other restrictions at this point.

here's an example for an include guard

Code:

'$ifndef INCFILENAME_H_
'$define INCFILENAME_H_

do some declarations here ....

'$endif


well feel free to find other uses for the preprocessor. if anybody needs some additions to that just tell me, i'll see what i can do...

marzec


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: adosorken on November 03, 2004, 10:08:36 PM
Y'all realize that this is the future of QB, right? :D

You got my support. :) I hope more people see this and encourage its development and completion, then we can put the old MSDOS-based workhorse to rest at long last and be competative in the "real world" again. :D


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: BinarySHOCK on November 03, 2004, 10:13:48 PM
i couldn't agree with you anymore, well said :)


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: v3cz0r on November 04, 2004, 01:37:10 AM
Quote from: "marzecTM"
well feel free to find other uses for the preprocessor. if anybody needs some additions to that just tell me, i'll see what i can do...


How about macros??! j/k, good enough for now ;)


Just added DATA/READ/RESTORE stmts today, it was more complex than i thought, coz i didn't want to put DATA's contents at code segment, to not confuse the debuggers.. lets see if this weekend i can start trying to compile FB with FB.. i will then put the first version online, so ppl can download and test it, and others can help writing the runtime library.

As FB will be released as GPL (rt lib as LGPL), anyone will be allowed to do any changes they want, or add the compiler to other packages or such (an IDE for example), the only restriction is that a new release must be done as GPL too and the compiler's source-code if changed must be also distributed - or a link to the original sources must be included.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: barok on November 04, 2004, 02:30:37 AM
Possibly a weekend beta release?!?!  Awesome!!!  Like Adosorken said, this is THE FUTURE of qbasic!  All we need is someone to program the IDE...  I'm not qualified. ;)    

I posted this up at rpgdx, and some seemed pretty excited about it. (Mandrake said that when it was released he'd port gia over to it, as people would probably rather use qb rather than lua.)


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: adosorken on November 04, 2004, 03:13:35 AM
I would be willing to develop an editor for the project, although it depends on whether or not you want a full IDE (debugging capabilities, etc) or just a "pretty frontend". A full IDE is probably slightly out of my expertise, but GPL is no problem. :D

Speaking of which...marzec and I chatted on IRC awhile ago and I showed him Bass, which is cross-platform and can likely be used in FB with a header translation. I don't know if he's going to take it on or not, but if not, then I will gladly translate the Bass headers for use in FB.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Antoni Gual on November 04, 2004, 03:32:13 AM
V1ctor: Freebasic is great news!  

For the IDE it would be easy to adapt  Plasma's thing (I don't remember it's name)  It's Med IDE + key generator+config files for QB language.

The things to configure are just the calls to compiler and linker, and the error message parsing (to get the IDE highlight the error line) to start. Then it's possible to add syntax coloring (probably Plasma's would fit).
 
Only MED is shareware, it costs 30$ to get legal  Not the perfect solution, but a quick start while waiting for a  really useful custom IDE .


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: barok on November 04, 2004, 10:52:28 AM
I completely forgot about med!  IMO, it would be something that'd definately work.  I was going to replace qb with it, but i guess i couldn't take the change from the blue screen to the windowed screen. ;)


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: ShadowWolf on November 04, 2004, 05:30:21 PM
Mybe im underestmating the complexity of an Editor but it seems pretty simple a txt box and then a shell to the compiler.

you could throw somthing togather in VB6 pretty fast to acted as a tempary editor and if you had time you could make it pretty complex with systex checking. and you could put in all the little eye candy that a edit like DeV c++ has.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: adosorken on November 04, 2004, 05:33:41 PM
A proper editor is more than just a textbox. ;) For something like this, a proper editor might include syntax coloring and auto-indenting, plus all your standard edit controls. Syntax checking obviously takes longer to implement but it's so worth the effort. :D

I already have the working editor for OBDS, so all I'd need is the OK and I'd convert it for FB.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: barok on November 04, 2004, 06:31:12 PM
awesome!


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: ShadowWolf on November 04, 2004, 06:59:48 PM
adosorken isn't this going to be a open source project after the first release.  so if it's open source i don't think you need to wait for an ok but you simple can just do it.


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: adosorken on November 04, 2004, 07:05:37 PM
True, I didn't think of that...grr oh well. Well, I suppose I can work on it over the weekend, after DeskQueen's demo is released (in about an hour).


Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
Post by: Jofers on November 04, 2004, 07:49:07 PM
It's nice that people are willing to convert other IDEs out there to work with this new one.  However, if this is going to be popular, a nice, new IDE needs to be made from the ground up that everyone can get behind, an official complement to the compiler, that's modular and extendible.  It could have all those nice features, but being steamlined, simple (as in easy to pick up) and productive (as in not bloated with wizards and features and help screens).

...which makes me wonder if an FB community project is in order (*devilish grin*).  But that would have to wait for a compiler release.


Title: If all goes successfully well, then FreeBasic here I come!!
Post by: Adigun A. Polack on November 04, 2004, 08:23:53 PM
To v3cz0r:

Hello and an absolute pleasure!  Telling from your ever-awesome FreeBasic (FB) preview demos and the MASSIVELY HUGE number of replies and stuff, I can now safely confess personally that your FreeBasic project sure has outstandingly strong potential to become the Windows grand successor of what QB in DOS was like, period, end of the conversation.  For real!  :D  I must say, v3cz0r, it sure is a most fiery ambitious project that I will encourage you that it WILL become a success if done right, and so far, it is being done right!  :cool:=b !


And to Adosorken:

Look, I saw your replies about the FB project, and I must *no less than* agree on what you have said, even about the famous BASS library being translated into this monstrous mammoth of a compiler.  ^-^ !  Man, as far as I can honestly remember about the BASS library, it is a .DLL based one created by none other than Ian Luck himself that has the ability to play back musics in .MOD, .S3M, .XM formats as well as play so many .WAV-based and .MP3-based sound effects at a time, among loads of editing features within them all, and so many more.  It was already used in the development of DS4QB, DS4QB2, and DS4QB++, and now, I believe that it is apparently being developed for FB, too!  AWESOME!!  ;)

Quote from: "As according to one of your replies, you actually"
Y'all realize that this is the future of QB, right? :D


No bull about that, man!  I am with you.  d=:wtnod:=b



Next, I go over to v3cz0r once again:

v3cz0r, for sound, since FB promises to be 100% compatible with QB, will you be using the standard “Play”, “Beep”, and “Sound” commands to emulate the PC speaker in some way, shape, or form?  I know that this is not gonna even be an easy feat at all, but, if you can, that’ll be good.  :)  In addition, for sound, I have an idea, man.  Look, in addition, using the BASS library, if you would create some all-new, FB-exclusive commands like:

_________________________________________________
• ModPlayback (a command that plays back *any* .S3M, .MOD, .XM, .IT, or .OGG music file.)

Code:
ModPlayback (musicfile, channel, repeat)

    musicfile = any music track in .S3M, .MOD, .XM, .IT, or .OGG that you want to play.

    channel = any channel that you want the music to be played on.

    repeat = lets you know whether or not you want the music to repeat itself after it is being played in its entirety.  Call “True” for music repeat, but call “False” for no repeat.[/list]
    _________________________________________________
    • ModFade (a command that fades in/out any .S3M, .MOD, .XM, .IT, or .OGG music file.)

    Code:
    ModFade (channel, fadespeed)

      channel = any channel that the music is playing.

      fadespeed = the speed at which you want the track on the channel you want to be faded in or out in its entirety.  Call a negative number anywhere down to -255 in order for the music to be faded out (lower numbers here mean faster fade-outs!), but call a positive number up to 255 if you want the music to be faded in (higher numbers here mean faster fade-ins!).[/list]
      _________________________________________________
      • ModSetVolume (a command that sets the volume of any .S3M, .MOD, .XM, .IT, or .OGG music file that is playing.)

      Code:
      ModSetVolume (channel, volume)

        channel = any channel that the music is playing.

        volume = changes the volume of the channel (0 = mute; 255 = LOUD!!).[/list]
        _________________________________________________
        • ModPauseMusic (a command that pauses any .S3M, .MOD, .XM, .IT, or .OGG music file that is playing.)

        Code:
        ModPauseMusic (channel)

          channel = any channel that you want the music to be paused at.[/list]
          _________________________________________________
          • ModResumeMusic (a command that resumes any .S3M, .MOD, .XM, .IT, or .OGG music file that is has been paused through ModPauseMusic.)

          Code:
          ModResumeMusic (channel)

            channel = any channel that you want to resume the music from where it was last paused.[/list]
            _________________________________________________
            • ModStopMusic (a command that *instantly* stops any .S3M, .MOD, .XM, .IT, or .OGG music file that is playing once it is used.)

            Code:
            ModStopMusic (channel)

              channel = any channel that you want the music to stop.[/list]
              _________________________________________________
              • ModSeekPattern (a command that simply seeks the pattern of any .S3M, .MOD, .XM, .IT, or .OGG music file you want to play and then plays it from *that* spot on.)

              Code:
              ModSeekPattern (musicfile, channel, checkpattern, repeat)

                musicfile = any music track in .S3M, .MOD, .XM, .IT, or .OGG that you want to play.

                channel = any channel that you want the music to be played on.

                checkpattern = any target pattern that you want to start the music on (VERY difficult, but *most* useful if you know some music-tracker stuff in the song you want to play!  Check out some music trackers like ModPlug Tracker and ScreamTracker to help you pinpoint the exact spot of the pattern you want the track to start for this command.  :D )

                repeat = lets you know whether or not you want the music to repeat itself after it is being played in its entirety.  Call “True” for music repeat, but call “False” for no repeat.[/list]
                _________________________________________________

                ........and instantaneous, flawless .WAV and .MP3 sound effects support for somewhere between 24 and 1,028 channels, then that would put FB _way_ over the top in the sounds department!!  :cool:  Downright challenging stuff — like having the BASS library initializations all set up and all of that — but hey, if you want to add it all, man, then GO FOR IT!!!  ;)=b !!



                To you both, v3cz0r and Ado, I wish you so truly well on the whole FB enchilada, and I SURE HOPE THAT IT ALL BECOMES A BRIGHTLY BLAZING SUCCESS.  Period.

                Talk to you later.  :king:



                GIVING YOU THE HELPING HAND ON THE IDEAS OF FREEBASIC,

                (http://img61.imageshack.us/img61/2493/AAPname.gif)
                Adigun Azikiwe Polack
                One of the Founders of “Aura Flow”
                Continuing Developer of “Frantic Journey”
                Current Developer of “Star Angelic Slugger”
                Webmaster of the “AAP Official Projects Squad (http://dhost.hopto.org/aapproj/)”



                ______________________________________
                (http://img77.exs.cx/img77/109/NewQBCPCbanner.jpg) (http://dhost.hopto.org/aapproj/qbcpc/)
                T H E • T H I R D • C A L I B E R • N O W • B E C O M E S • E V E N • M O R E • T H R I L L I N G ! ! !  :D !!

                Continuing to encourage even more positive originality than ever before, this original compo currently has EXCLUSIVE challenges in QB programming based on Gradius and even our old-school favorite console called the Atari 2600, plus a whole lot of other very exciting new stuff now!!!  ;*) !

                Yo, got game for the QuickBASIC Caliber Programming Compo 2004/2005?  Then I just challenge you to please visit http://dhost.hopto.org/aapproj/qbcpc/.  That means YOU, pal!  ;)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 04, 2004, 08:49:21 PM
                Incorporating Bass directly into FB might be an interesting idea, but I think some people might find it a bit limiting...its license prevents it from being used commercially without paying a license fee. I can easily see FB becoming used for commercial products. :D


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: barok on November 04, 2004, 09:17:55 PM
                Yes...  this would most definately be used for commercial use!!! Especially if it would have support for a few higher screen resolutions and music/sound support without using libs... (hint hint!) Utopia!!!

                Definately, freebasic will have it's own community!  But why not just do a bit of a work with the current communities?  All we need to do is rename all the websites to freebasic whatever.  e.g.

                FreeBasicNews.com
                FreeBasic.com
                FBTK.com
                FBNZ.com
                FB45.com

                heh... j/k. ;)


                Title: Using BASS in FB commercially is pretty risky indeed, Ado.
                Post by: Adigun A. Polack on November 04, 2004, 09:21:12 PM
                To Adosorken again:

                Oh man.  Well, if FB were to be truly used for commercial products indeed, you *would* have to fork over a huge license fee for that to even happen safely.  :(  So technically, man, I guess that if the whole BASS library were to be implemented in FB and that it were to be used for creating no more than just freeware programs through the compiler itself, then that is playing it totally safe right there.  On it all here, it is kind of a toss-up and an even bigger challenge right there that must be pondered and thought through both carefully and cleverly if the sound capabilities in FB were to even pay off richly.

                You are on to something, man.  See you as this thing gets closely explored.  ;)



                (http://img61.imageshack.us/img61/2493/AAPname.gif)
                - Adigun Azikiwe Polack
                One of the Founders of “Aura Flow”
                Continuing Developer of “Frantic Journey”
                Current Developer of “Star Angelic Slugger”
                Webmaster of the “AAP Official Projects Squad (http://dhost.hopto.org/aapproj/)”


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: barok on November 04, 2004, 10:15:44 PM
                why not do the same thing with a different sound lib?


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 04, 2004, 10:25:09 PM
                I personally believe that half of the power in something like FB comes in the form of developer choice. Being able to choose from a wide variety of APIs is much preferrable to having one like this built-in. Think of it this way...how many people using QB actually still use PLAY or SOUND? :D However, it might be interesting to still use both commands...PLAY could use the standard MPU401 interface, and SOUND could be used as always. It'd make for interesting things. :D


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 04, 2004, 10:55:13 PM
                @pollack mister 30kb posting strikes back hehe....

                well, i really don't like the idea of introducing new runtimelib features like sound and graphics commands, i would want the language and runtimelib to be as small as possible. i guess it's not really hard to do

                '$include: 'bass.bi'

                the only thing that needs to be ported to fb is the headerfiles so...

                and if someone writes a wrapper for that lib, there's also no need to do the initstuff yourself if you prefer to use the lib at such an easy-to-use level

                BTW,

                i just finished the first version of the preprocessor, intended to be used in conjunction with freebasic.

                http://ratatoskr.bad-logic.com/ppbasic.rar

                it's a small handy preprocessor that allows

                * including files ( '$include: 'filename.bi' )
                * setting defines ( '$define DEFINE_NAME )
                * conditionals ('$ifdef/ifndef DEFINE_NAME {'$else } '$endif )

                with this limited command set you are able to implement include guards (necessary if an includefile gets included several times, you don't have to care about duplicate definitions anymore) and conditional compilation ( for example if you have os specific stuff within functions and the like )

                i hope it's usefull to some extend. testing would be appreciated

                i may release some further versions including the following addons

                * '$elseif branches for conditionals
                * value assignement to defines and replacement in source ('define DEFINE_NAME value)
                * macros (just maybe really just maybe....)

                any other ideas can be posted here or on forum.bad-logic.com->projects


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: barok on November 04, 2004, 11:39:08 PM
                Oh, i see what you mean.  Yeah, your completely right.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: ShadowWolf on November 04, 2004, 11:59:23 PM
                i have to agree with most of the post so far incressing QB already larg run time would only limmit FB that's why Libs exist to extend the lang dynamicly.  

                the only run times that should be support are most of the orignal QB runtimes for backwards compatiblity.  

                just run the qb primative gfx's command though a wraper of some kind you most likely could writte a wraper for Peek and poke as well at least some of it i.e. where the program attamps to change the screen to 13h and where it attampts to write to vedio memorey.

                well this is my meaningless opinion for what ever it worth  :D  but in the end i could careless i'm just happy FB exists


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 05, 2004, 12:01:51 AM
                Such things are so easily accomplished through the use of TinyPTC. :D


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Z!re on November 05, 2004, 12:29:50 AM
                Quote from: "v3cz0r,  Jan 20, 2004"
                you gotta be a really persistent bitch to finish a compiler (rtmlib etc).. that's not me, no sir  :P

                Source: http://forum.bad-logic.com/viewtopic.php?t=59


                Hehe, I hope you're more of a persistent bitch now then =)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: v3cz0r on November 05, 2004, 02:20:38 AM
                Heh, oh yeah, i'm sorta ;) Stills, ppl will have to help finishing the rtlib, i'm not going to add any of QB's GFX statements (but Stearling said he will do that..). Sound too, if nobody codes SOUND/PLAY/BEEP, we will have to live with Midi's, Mod's, Mp3's and such ;)

                And sorry, but i don't want to add any new statement/intrinsic function, like for Mod/sound playing for example. That makes the runtime lib hard to write (and thus to debug and fix), porting to other OSes becomes complex, name clashes start to happen with old code and the documentation becomes tedious to write and to read, as it can get really huge.

                With people porting/translating including files and using portable libs (if that matters), doing '$include: 'somelib.bi' and then calling the lib's routines would be the same as having them as intrinsic functions.. but then the responsibility of fixing its bugs would be of the lib's author, not mine ;)


                About the IDE/Editor, i dunno, any with support for VB could be used, setup is not that hard, as most have support for M$'s error messages, that's the format FB reports errors.

                Having debug support inside a custom-made IDE can be quite hard, as only GDB (GNU's debugger) can process the debug info that will be included on the exe's (stabs format, not coff). Dev-C++ seems to integrate GDB into the IDE, but i've no clue how to do that atm.. If we had something like that, it would be like tracing code in QB, would be great..


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: barok on November 05, 2004, 03:04:05 AM
                no qb gfx statements?  Well, as long as SOMEONE puts them in, i'm happy.  (so you better sterling, or i will...) ;)  So long as i see PUT, Poke and Out, i'm satisfied.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 05, 2004, 03:08:30 AM
                Honestly speaking, it cannot be called 100% QB compatible without...well, everything represented. :D I had implemented screenmode emulation in OBDS, so all the screenmodes that QB handles natively were working...some better than others but regardless...they worked. :D I am hoping that whoever writes a wrapper for these will be able to also emulate these legacy modes, as there's a whole ton of software on the Internet that uses them, and it'd be really cool to see these old sources compiled and running with FB. :D

                I'll start on a proper editor for this on Saturday...tomorrow's swamped with work again, so that's out. :(


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 05, 2004, 03:35:49 AM
                i guess implementing those legacy videomodes will be a pain in the ass. since i'm not involved in writing this crap i really don't care...

                on the other hand: why would people need peek and poke (despite the fact that in a win32 environment they would be pretty useless)? why would anybody use put anymore? believe it or not but all those nifty c-libs like sdl and the like are so easy to handle, it would take you about 3 days if you are a newbie to get a sprite on the screen really. and from there on you'll never go back to the qbasic statements.

                i have to acknowledge that some basic stuff like screen, pset, point, line, circle, etc. would be great for newbies to start of tough...

                hm... maybe you're right and i suck hehe...

                (v3c, get on irc the hell...)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: barok on November 05, 2004, 04:07:48 AM
                because if you guys don't put in poke and peek then it won't be 100% qb compatible? ;)  

                There are lots of nifty things on the internet that use poke and peek extensively. (look at toshi's pure qb demo contest)  If that's not reason enough i don't know what is. ;)   it'd just be nice to have a win32 version of some programs that just so happen to use poke and peek.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: relsoft on November 05, 2004, 04:33:48 AM
                Quote from: "v3cz0r"



                You will be able to use Rellib if Rel write a Windows port ;).


                If anyone want to talk about the project, join the #badlogic irc channel at irc.efnet.net.. cyaz


                Oh hell, why not!!! That would be the first thing I'd do when I get my hands on the actual compiler. :*).  As a wrapper to DX/GL perhaps.

                BTW, Inline asm?  Needs it for a fast enough sampling stuff like water fx.


                Barok: You can do poking and peeking with FB's pointers.

                Like:

                Say P is a pointer to a surface,

                Calculate the offfset(linear) and dp a *P = color. Same as poke or c = *P same as peek. Easier and better.

                Here's and example I made in C last night. Dos though but the only thing not portable are the calls to mem.h

                http://quickhost.qbtk.com/download.php?id=311

                And considering it can support OGL, I don't see the need to do low level stuff with FB unless you need something that GL does not support.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 05, 2004, 04:52:50 AM
                Quote from: "barok"
                because if you guys don't put in poke and peek then it won't be 100% qb compatible? ;)  

                There are lots of nifty things on the internet that use poke and peek extensively. (look at toshi's pure qb demo contest)  If that's not reason enough i don't know what is. ;)   it'd just be nice to have a win32 version of some programs that just so happen to use poke and peek.


                i'd have to look at those demos, but i guess that the use of peek and poke there would not work in a win32 environment, cause of protected mode and other stuff related to the os. so i doubt that v3c will include those commands

                def seg = &HA000
                  poke 320& * y + x, 4
                def seg

                won't work in win32. also the segment layout used in realmode is not valid for protected mode, so def seg would be a problem, since it allows to define the segment peek and poke will read/write from/to. in pm you only have one segment in userspace so... and with the introduction of pointers in FB i see no futher use for peek and poke


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: relsoft on November 05, 2004, 04:58:27 AM
                Well poke could be done really. But in a lil different syntax


                like:

                Code:
                Poke8 lpsurface,offset, char
                Poke16 lpsurface,offset, word
                poke32 lpsurface,offset, dword


                l


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Neo on November 05, 2004, 06:08:45 AM
                ;)

                Wow, Rel that piece of code looks awesome! (Btw, why don't you use inline assembly :roll:).

                Also, maybe the FB preprocessor should parse the QB's POKE calls to Poke8 calls. That way it will be 100% QB compatible.

                Anyway, I agree that all QB commands should be included in the FB package, to make it 100% compatible with already existing programs.

                Btw, can you also use part of QBMCX's syntax? That'll prevent me from converting all my programs (hehe ;))


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: relsoft on November 05, 2004, 06:16:16 AM
                Quote from: "Neo"


                Wow, Rel that piece of code looks awesome! (Btw, why don't you use inline assembly :roll:).



                Can't.  This proggie is for a bunch of Comp Sci students for their project defense.  So I need to code in C/C++ only. I get paid for it.  This is perfect. I'm learning C/C++ and getting paid for it. ;*)


                Btw, do you know how to allocate the torus array inside a function?  Like the load_torus func?


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Neo on November 05, 2004, 06:22:21 AM
                I'll take a more closer look at your code :)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: relsoft on November 05, 2004, 06:25:48 AM
                Thanks!!!

                I also used new since I don't know how to farmalloc multiple structures.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Neo on November 05, 2004, 06:39:57 AM
                Heh, my compiler moaned on the keyword new :) I selected a "C-Style program" and it didn't compile. #1: new is for C++. #2: My compiler doesn't support far :(

                Oh well. Anyway, AFAIK, you can't create structures with malloc.

                { code removed because it didn't work after some tests ;) }

                Hmn, there must be a simpler way, I read about it somewhere. Too bad I don't have time now, I'll have to look it up some time :(

                Quote from: "Rel"
                Can't. This proggie is for a bunch of Comp Sci students for their project defense. So I need to code in C/C++ only. I get paid for it. This is perfect. I'm learning C/C++ and getting paid for it. ;*)

                Awesome! :P


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 05, 2004, 08:12:22 AM
                Although I think that all of QB's syntax should be maintained, I'm not suggesting that it become a straightjacket. :D Certain statements/functions should simply be wrapped to other functions. But if that doesn't seem plausible, then it's not going to be 100% QB compatible.

                But actually, is it really necessary to be 100% compatible? I mean honestly, aren't there better ways of doing certain things nowadays? FB is already leaps and bounds beyond QB. It might be more work than it's worth to shoot for 100% compatibility. I shot for about 95% compatibility with OBDS. :D There's just certain things that are probably not worth the effort when going from DOS to Windows.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Blitz on November 05, 2004, 09:19:24 AM
                In my opinion, a languages power is not defined but how many commands it has. It's what you can do with the commands you have. With pointers there are endless possibilities. A languages should be small, tight and fast. And you should be able to link with the os standard lib format. If you can do that there's nothing you can't do. This is what C is, and exactly what FB is.

                Including 100s of commands is lame and ugly. This is what darkbasic and blitxbasic does. Powerbasic, a powerful compiler. But it couldn't be linked with the os standard lib format, that's why it never got very popular. Nah, link with whatever lib you want and you got what you need.

                Oh and i can assure you that emulating the dos adress space will never happen. FB is not a emulator, it's a qb like dialect. And when you do OS specific stuff like poking into the video memory your no longer doing qb stuff. So, 100% qb compatible does not mean 100% dos hack compatible.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Z!re on November 05, 2004, 11:46:11 AM
                Simply put, victor is aiming for 100% QB SYNTAX compatibility, not 100% QB compatibility (Call absolute anoyone?, defseg and poke/peek anyone?)


                Anyways, it sounds better and better by the day, I hope we'll see a test version soon.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 05, 2004, 11:58:05 AM
                OMG 7HI$ IS TEH FUTURE M$ CAN SUXOR MY 817CH3$ IM PROGGING DOOM3FB NOW BUT 1 N33D S0M30N3 70 PU7 IN DRAW V3CZOR CAN U PUT IN DRAW??

                ...

                Aaanyways, I gots to agree with vic and his PR rep Blitz.  One of the bottlenecks with other basic compilers is you always have to include some rediculous runtime for a HUGE executable size, and if you have some giant base graphics interface it discourages using new and updated routines in libararies and learning more advanced interfaces like DX and OGL and such - also you have to wait for a new compiler release to get faster graphics.

                Besides - PLAY, SOUND, BEEP, DRAW, WINDOW, CIRCLE are all routiens that don't translate well to something like Windows where everything is virtualized and you can't just tap right into the hardware.  You would either have to use some severly restricting and oversimplified graphics wrappers or port your code to the new commands anyways.  Your programs will be easy enough to port if you programmed them well (IE, not depending on a string of GOTOs and PUTs and such, but rather putting tasks in subroutines, and removing your main code from the hardware).

                Oh yeah... just one question:  FB seems to be 100% procedural like it's predecessor in spirit, but will there be means to "fake" OO programming?  Like throwing self-referencing functions into structures, or hack object support like with C++ or PHP/Perl/Javascript?


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: v3cz0r on November 05, 2004, 12:50:16 PM
                First, i (v1ctor) never said it was going to be *100%* compatible, i said "the most compatible possible", what is quite different.

                I said that i wasn't going to write the QB GFX stuff, doesn't mean FB won't have them - hey, that's the spirit of open-source, anybody will be able to contribute writing any missing "feature", if i (as the project maintainer) accept the changes - later, if you guys don't agree with my ideas, you can even fork the project, it's up to you, that's the joy of OSS.

                Wanting a QB program with loads of DEF SEG's and CALL ABSOLUTE's to work without a single source-code change is like wanting to compile with VC++/GCC a C source with loads of DOS int calls, ASM blocks and absolute far addresses, it ain't going to happen, so we can say VC++ sucks? nah..

                "Emulating" DEF SEG would screw up PEEK and POKE at the point that it would be faster running a 16-bit QB's executable on a DOS emulator.. that isn't what i want, sorry. C'mon, are we programmers or what, changing 3 or 4 lines of code commenting/deleting unsupported statements or exchanging them with new ones won't kill anyone.. i had to rewrite FB's symbol table module 2 or 3 times in these last 2 months, and it's 2K+ lines long and hey, i still alive.. i think..


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 05, 2004, 01:29:10 PM
                .... or are you?  I see dead people (they walk around like regular people, they don't know they're dead).

                and I'm obviously not a real programmer.  I mean, I'm posting on a forum dedicated to an archaic 1988 interpreter that serves more purpose as a toy than a tool, while I pander for, nay, demand features in my new toy but throwing forth no effort to actually participate, or compensate in any way, shape or form.
                -----
                EDIT:  I lied.  I was bored doing some graphics for QB45 so I decided to play with an FB icon/logo:

                (http://www.betterwebber.com/stuff/icons.gif)

                Buut, after I finished one I got sick of it, and added some mascots (Cuby, since he's the closest thing to a QB mascot, and Jesus, because he's everyon'e favorite party guy).  I guess I could draw anything if you picked it, really, so there you go..


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: VonGodric on November 05, 2004, 03:02:18 PM
                Quote from: "Jofers"
                .... or are you?  I see dead people (they walk around like regular people, they don't know they're dead).

                and I'm obviously not a real programmer.  I mean, I'm posting on a forum dedicated to an archaic 1988 interpreter that serves more purpose as a toy than a tool, while I pander for, nay, demand features in my new toy but throwing forth no effort to actually participate, or compensate in any way, shape or form.
                Hey!
                Relax, it's gonna change soon, beside some people here on the forum know more about programming and stuff then even people who work for big companies as a proffession programmers. And that says smth!

                (not talking about myself)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: ShadowWolf on November 05, 2004, 03:37:32 PM
                a backwords compatibly lib could easily made as a LIB after FB is released so we can compile some of the classic pure qb games.

                when i made the post about peek i wasn't think a true peek and poke just a wraper for it most people used peek to write directly to vedio mem so simple having a presdo peek command act as a linear pixle plot command and use def seg as a check to make shure the peek is being used that way if it isn't then peek doesn't work and error message can pop up.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 05, 2004, 04:07:33 PM
                yeah, that peek and poke would definitely suck since it would involve a lot of boundschecking...


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: v3cz0r on November 05, 2004, 04:10:36 PM
                Jofers, what can i say.. heh

                But forget Jesus, FB's mascot is a horse, goshdamnit! ;) Check out my bad design at: http://freebasic.bad-logic.com/ , 5 minutes of CorelDraw (see, the "A" is smiling, i think i will ® that).


                Heh..


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Nexinarus on November 05, 2004, 04:27:54 PM
                Haha Jofers nice images. Likes the Angelo/wetspot one ;). Jesus one is comical. i did some touch ups...

                (http://www.hybd.net/~mms/fb/angelo-horse.png)

                (http://www.hybd.net/~mms/fb/epic-horse.png)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 05, 2004, 04:40:22 PM
                Heh, I can see I'm not needed then.  Nice design :)  If you need that put to markup, I can probably help out.  I've been needing somesort of image for BASIC programming for QB45.  That all depends on if I even end up using BASIC (We're making QB the only language for starters until we pick up the pace).  I guess I'll have to find some kind of visual representation of C now :P

                EDIT:  Haha.  Jesus on horseback.  I put Cuby on his shoulder and we have a winner :)
                EDIT 2:  Actually, now we have a winner:
                (http://www.betterwebber.com/stuff/icons2.gif)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: barok on November 05, 2004, 04:47:43 PM
                your right, it doesn't need graphical functions or poke or peek.  Wouldn't mind seeing a lib that can allow old qb graphical program to run though. ;)  after all, who'd need poke peek pset put or any of that stuff when there's allegro?

                still, my wishlist is now a lib that'll support qb graphical commands and poke/peek.  Just so i can see Frontier as win32. :D

                I never get tired of that demo. :D


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: v3cz0r on November 05, 2004, 05:31:08 PM
                Didn't see that OOP question, well, when function pointers were added, things will be more close to fake-OO, like you can do with C, now about real classes with inheritance and function overloading/overhiding, won't be too simple to add - nor a simple PRINT is easy to add anyway.


                Leave my horse logo alone, damnit. Btw, it was borrowed from clipart.com, please, don't tell them.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 05, 2004, 05:51:46 PM
                Well, it would pretty jerk to ask you to put in true java-like objects.  Pretty badass as far as the pointers go (and props on translating varptr).

                Okay, we'll leave the horse alone.  That's kind of mean to the Jesus Crab, though:
                (http://www.betterwebber.com/stuff/icons3.gif)

                But I'm serious about the documentation and/or website markup offer.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Neo on November 05, 2004, 06:07:18 PM
                Quote from: "relsoft"
                Btw, do you know how to allocate the torus array inside a function?  Like the load_torus func?


                According to scorp, this small example should work:
                Code:
                #include <stdio.h>
                #include <windows.h>  
                 
                void GetPtr(int *inp) // this looks more like a constructor of a class :P
                {  
                void *a=malloc(4*100); // alloc some space .. for what ever
                for (int i=0;i<400;i++)
                {
                // do your MOJO..
                ((unsigned char*)a)[i]=rand()%0xFF;
                printf("%i",((unsigned char*)a)[i]);
                }

                // hack hack hack -- remember this is very wrong :P
                memcpy(inp,&a,4);
                }  
                   
                void main (void)  
                {  
                int fakeptr; // place to stash an adress to while the compiler isn't looking
                int* anewptr; // the actual pointer that will be used afterwards

                GetPtr(&fakeptr); // a ~Ctor function on a struct ?!?!?!?!?!?!?? ( better use classes next time )
                memcpy(&anewptr,&fakeptr,4); // copy the adress back into an actual pointer so it can be used as a pointer

                // \/ \/  further checkupsforscrewups :P
                if (IsBadReadPtr(anewptr, 4)) printf("\nfark\n");

                printf("\n",anewptr);

                for (int i=0;i<400;i++)
                printf("%i",((unsigned char*)anewptr)[i]);

                if (!IsBadReadPtr(anewptr, 4)) free(anewptr);  
                getchar();  
                }


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 05, 2004, 09:20:15 PM
                ok,

                i just finished to include the define value feature:

                '$define A_DEFINE &Ha000

                var = A_DEFINE * 324 + 7/A_DEFINE

                that would translate into:

                var = &Ha000 * 324 + 7/A_DEFINE

                i don't know why this would be needed since fb offers the const statement... but oh well. there you have it

                if someone encounters a bug or something, post here or on forum.bad-logic.com


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: v3cz0r on November 06, 2004, 12:21:09 AM
                Quote from: "marzecTM"
                i don't know why this would be needed since fb offers the const statement... but oh well. there you have it


                Er, how about this:

                '$define bar integer

                dim foo as bar

                That could be useful somehow ;)

                You can't define types with Const's, that's a sad life's fact.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: relsoft on November 06, 2004, 07:19:25 AM
                Andre(v1c): Defines would be cool. Macros too.  

                Neo: I figured the farmalloc allocation with structures with marzec's help. And I'll try to see if I coulf returns a stucture pointer from a fucnction in load_torus.

                Let's discuss my probs on the gen. prog forum.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: VonGodric on November 06, 2004, 10:14:03 AM
                Have a question, will FB support threads? It'be cool.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: ShadowWolf on November 06, 2004, 11:11:53 AM
                Vongodric i guss it would it can handle Win32 API so registering a thred shoudn't be that.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Blitz on November 06, 2004, 11:12:24 AM
                Again, such things is os related.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Z!re on November 06, 2004, 11:21:05 AM
                Let's face it, FB would be for Windows and Linux, or you plan on anything else?

                Both support threads, and it would really be cool to have threads to work with.



                Also, how does memory work?, will i be able to create 16MB Arrays?, and/or will there be things like C's malloc()?


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: v3cz0r on November 06, 2004, 11:46:31 AM
                Threads would be simple to do in Windows, calling 2 or 3 kernel32 functions and it's done, as all subs/functions are STDCALL by default in FB and rt lib doesn't access global vars. Now for other OSes, i've never done that, other than fork() on Linux :P


                You can allocate arrays up to 2GB, being them static or dynamic. Even if static, the .exe won't be great than a couple of KB's, as space for non-initialized vars is just reserved at compile-time and allocated by the OS when loading the executable.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 06, 2004, 01:50:55 PM
                threads are already easily supported in the sdl port. sdl offers some neat functions to make threading:

                * easy to handle
                * plattformindependend (except for mac iirc)

                so.... get the sdl header files and check out the sdl documentation


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Z!re on November 06, 2004, 02:49:15 PM
                What will FRE return?

                And what does the arrays use?, I'm guessing XMS?


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 06, 2004, 03:14:34 PM
                it's a 32-bit protected mode compiler, thus there is no need for xms/ems or the like. it's just like every other win32 app, you simply use all the mem the os gives you. that's it, no xms, no ems

                on the FRE i'm not sure, to lazy to look up what it did

                @v3c (since you're not on mirc)
                '$define bar integer
                dim var as bar

                giving

                dim var as integer


                works already. '$define does the following:

                *it registers the SYMBOLNAME
                * it registers the VALUE of the symbol if provided, were the value
                  is the first token after the SYMBOLNAME (tokens are delimited by space and tab)
                * it then checks every token in the source wheter is a SYMBOLNAME (things SYMBOLNAME*234+13/SYMBOLNAME work too, cause that token would be tokenized again, with operators as delimiters, thus giving my SYMbOLNAME on it's own)

                so there you go...


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: v3cz0r on November 06, 2004, 11:04:15 PM
                Just to show how creating threads is simple in Windows, here is it: http://freebasic.bad-logic.com/downloads/fb_threads.zip

                Code is no more than:

                Code:
                declare sub mythread cdecl ( byval num as integer )

                dim shared threadsRunning as integer

                dim i as integer

                '' create and call the threads
                threadsRunning = 0
                for i = 0 to THREADS-1
                if( beginthread( @mythread(), 0, byval i ) <> -1 ) then
                threadsRunning = threadsRunning + 1
                end if
                next i

                '' wait all threads to finish
                do while( threadsRunning > 0 )
                Sleep 100
                loop


                '':::::
                sub mythread cdecl ( byval num as integer )
                dim i as integer

                for i = 0 to SECS-1
                print "Hello from thread: " + str$( num ) + " (" + str$( SECS-i ) + " sec(s) left)"
                Sleep 1000
                next i

                threadsRunning = threadsRunning - 1

                end sub


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 07, 2004, 03:00:04 AM
                and here threading in fb with sdl

                Code:
                '$include: 'sdl.bi'
                '$include: 'kernel32.bi'

                declare function threadproc cdecl ( byref datas as byte ) as integer

                dim shared threadRunning as integer
                dim threadid as unsigned integer


                if(SDL_Init(SDL_INIT_EVERYTHING)) then
                  print "error: couldn't init SDL"
                  end
                end if

                threadRunning = 1

                threadid = SDL_CreateThread(@threadproc, byval 0)
                if(threadid=0) then
                  print "error: couldn't create thread"
                  end
                end if

                print "threadid is:" + str$(threadid)

                call Sleep(3000)

                threadRunning = 0
                SDL_WaitThread threadid, byval 0

                SDL_Quit


                function threadproc cdecl ( byref datas as byte ) as integer
                while ( threadrunning=1 )
                  print "i'm in the thread"
                wend
                end function


                see http://ratatoskr.bad-logic.com/fb/ for the sdlthr.bas file and http://ratatoskr.bad-logic.com/fb/sdl/sdl.rar for the needed includefiles

                and now, sleep...


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: relsoft on November 07, 2004, 03:44:11 AM
                Since you're all offline:

                5 minutes work with FB and no prior experience with TinyPTC.

                http://quickhost.qbtk.com/download.php?id=313

                Code:

                defint a-z
                '//Plasma using y*xwidth +x addresing
                '//Relsoft 2004
                '//Uses the superhot FB compiler

                '$include: 'tinyptc.bi'

                const SCR_WIDTH = 320
                const SCR_HEIGHT = 200
                const SCR_SIZE = SCR_WIDTH*SCR_HEIGHT

                const PI = 3.141593

                redim shared buffer( 0 to SCR_SIZE-1 ) as integer
                redim shared Lsin1( -1024 to 1024) as integer
                redim shared Lsin2( -1024 to 1024) as integer
                redim shared Lsin3( -1024 to 1024) as integer
                redim shared Lcols(2, 255) as integer



                    dim frame as long
                    dim col as integer
                    dim i as integer
                    dim ofs as long
                    dim rot as integer
                    dim counter as long
                    dim pixel as integer

                if( ptc_open( "freeBASIC v0.01 - plasma test (relsoft)", SCR_WIDTH, SCR_HEIGHT ) = 0 ) then
                end -1
                end if

                    for i = -1024 to 1024
                        Lsin1(i) = SIN(i / (128)) * 256      'Play with these values
                        Lsin2(i) = SIN(i / (64)) * 128       'for different types of fx
                        Lsin3(i) = SIN(i / (32)) * 64        ';*)
                    next i

                    for i = 0 to 255
                        Lcols(0,i)=  abs(INT(128 - 127 * SIN(i * PI / 32)))
                   Lcols(1,i)=  abs(INT(128 - 127 * SIN(i * PI / 64)))
                   Lcols(2,i)=  abs(INT(128 - 127 * SIN(i * PI / 128)))
                next i

                    counter = 0

                    do
                      counter = counter + 1
                      rot = 64 * (((counter AND 1) = 1) OR 1)
                      FOR y = 0 TO SCR_HEIGHT-1
                          FOR x = 0 TO SCR_WIDTH-2
                              rot = -rot
                              col = (Lsin3(x + Rot) + Lsin1(x + Rot + Counter) + Lsin2(y + Rot)) and 255
                              pixel = Lcols(0,col) shl 16 or  Lcols(1,col) shl 8 or Lcols(2,col)
                              buffer( y * SCR_WIDTH + x ) = pixel
                          NEXT x
                      NEXT y
                    ptc_update varptr( buffer(0) )

                    loop


                ptc_close



                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: VonGodric on November 07, 2004, 07:54:50 AM
                Cool!

                marzecTM -you could put the exe file too of your demo :wink:


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 07, 2004, 10:21:47 AM
                wow pretty kwel rel

                @van: it's up search the http://ratatoskr.bad-logic.com/fb/ folder (sdlthr.exe), though as you may have read in the sourcecode nothing big really happens hehe....


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Neo on November 07, 2004, 10:38:40 AM
                Quote from: "relsoft"
                Since you're all offline:

                5 minutes work with FB and no prior experience with TinyPTC.


                Heh, my first (and only) Allegro program so far was a Plasma as well ;)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: v3cz0r on November 07, 2004, 07:13:40 PM
                Really nice rel.. i liked the "superhot" comment ;)

                It would be twice as fast if you didn't use dynamic arrays, ie, do

                Code:
                  dim shared buffer( 0 to SCR_SIZE-1 ) as integer
                   ...


                instead.

                FB stores multi-dimensional arrays in row-major order, so (a,0) gens better code than (0,a) with 2d arrays, you could also declare Lcols() as:

                Code:
                type RGB
                r as ubyte
                g as ubyte
                b as ubyte
                a as ubyte
                end type

                dim shared Lcols(255) as RGB


                And access to buffer() could be done as a pointer, so the whole thing would look like:

                Code:
                defint a-z
                '$include: 'tinyptc.bi'

                const SCR_WIDTH = 320
                const SCR_HEIGHT = 200
                const SCR_SIZE = SCR_WIDTH*SCR_HEIGHT

                const PI = 3.141593

                type RGB
                r as ubyte
                g as ubyte
                b as ubyte
                a as ubyte
                end type

                dim shared buffer( 0 to SCR_SIZE-1 ) as integer
                dim shared Lsin1( -1024 to 1024) as integer
                dim shared Lsin2( -1024 to 1024) as integer
                dim shared Lsin3( -1024 to 1024) as integer
                dim shared Lcols(255) as RGB


                    dim frame as long
                    dim col as integer
                    dim i as integer
                    dim ofs as long
                    dim rot as integer
                    dim counter as integer, cdir as integer
                    dim pixel as integer

                if( ptc_open( "freeBASIC v0.01 - plasma test (relsoft)", SCR_WIDTH, SCR_HEIGHT ) = 0 ) then
                end -1
                end if

                    for i = -1024 to 1024
                        Lsin1(i) = SIN(i / 128) * 256      'Play with these values
                        Lsin2(i) = SIN(i / 64) * 128       'for different types of fx
                        Lsin3(i) = SIN(i / 32) * 64        ';*)
                    next i

                    for i = 0 to 255
                        Lcols(i).r = cint(abs(INT(128 - 127 * SIN(i * PI / 32))))
                   Lcols(i).g = cint(abs(INT(128 - 127 * SIN(i * PI / 64))))
                   Lcols(i).b = cint(abs(INT(128 - 127 * SIN(i * PI / 128))))
                next i

                    counter = 0
                    cdir = 1

                    dim p as integer ptr
                    do
                counter = counter + cdir
                      if( (counter < 1) or (counter > 4096) ) then
                cdir = -cdir
                      end if
                     
                      rot = 64 * (((counter AND 1) = 1) OR 1)
                     
                      p = @buffer(0)
                      FOR y = 0 TO SCR_HEIGHT-1
                          FOR x = 0 TO SCR_WIDTH-1
                rot = -rot
                              col = (Lsin3(x + Rot) + Lsin1(x + Rot + Counter) + Lsin2(y + Rot)) and 255
                             
                              *p = Lcols(col).r shl 16 or Lcols(col).g shl 8 or Lcols(col).b
                              p = p + len( integer )
                          NEXT x
                      NEXT y
                   
                ptc_update varptr( buffer(0) )
                loop

                ptc_close


                (Btw, to compile the code above you need the last version, coz i had to fix some bugs)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: KiZ on November 07, 2004, 07:51:56 PM
                Everything is sounding so amazingly great, just one mini suggestion:

                It would be good if you could include an icon when compiling the exe to make them look more like windows exes, now that they are 32bit, in the same way that you can assign an icon into a program in VB.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 07, 2004, 08:42:22 PM
                Well, now that it seems that this little program is fleshing out, I might as well inquire:

                Has anyone done some speed tests with it?  You know, the usual memory handling, calculation, etc suite?  It would be nice to have a benchmark with other non-basic compilers, seeing as none of 'em have come close to GCC thus yet.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: v3cz0r on November 07, 2004, 09:29:57 PM
                It's a 2 months old qb-compatible compiler made by just one person and do you want to compare it with GCC? Nor PowerBASIC that is being hacked in ~10 years can come close to the optimizations done by a modern C compiler.. but yeah, freeBASIC gens better code than FreePascal with complex expressions, for example.. I know you asked about C, screw you :P

                If you can fit a horse logo into a 16x16 icon, i'll add them to the Exe's ;)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: ShadowWolf on November 07, 2004, 11:20:42 PM
                v3cz0r relax once you have this thing open source there will be lots of people slowly improving the code generation after a couple year who knows.

                if there any programming community out there that has the insain drive to push somthing to it's limmit's it's the qb community.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: relsoft on November 08, 2004, 12:19:10 AM
                Hahaha!! I just tried to do C convention pointer last night. LOL

                I know what's wrong now.

                Before:

                p = p + 1

                Now:
                 p = p + len(type)

                Or would this work?

                inc = len(type)
                p = p + i

                How about structures?

                 p  = p + len(typename) ?

                BTW,  Made a tinyPTC wrapper last night. More like a  Rellib using TinyPTC.

                And since you're not on the badlogic channel:

                T! = frame
                x = Cos(t! *. 6)

                Subscript out of range.

                Line(H,V, diag)
                rects
                Putpixel
                PUT/GET

                all works now. Will optimize using pointers later tonight.

                Joe: Speed wise, on a non-scaled window, 20(prolly more) 64 * 64 on full speed on my comp( 233 cyrix)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: v3cz0r on November 08, 2004, 12:42:19 AM
                Hey, nice.. i could use that as a QB gfx implementation by now.. LINE, PSET and stuff.

                Yeah, there's no pointer arithmetics, you must do by hand: p = p + len( integer ) for example.


                Btw, here's an app with the fb icon: http://freebasic.bad-logic.com/downloads/ptc_test-fbicon.zip (horse didn't look that bad :P)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: relsoft on November 08, 2004, 12:49:17 AM
                v1c: Get your arse at badlogic(efnet) now. wanna talk something. Not much time, I'm on a luchbreak. :*)

                Really not much yet as I was watching Irobot when I made this:
                (I'll convert this using pointer notation later)
                Autoclipping already supported.


                Code:

                '//TinyPTC relGFX style
                '//Relsoft 2004
                '//v3cz0r is da man!
                '//
                defint a-z
                '$include: 'tinyptc.bi'

                declare sub cls(byref buffer())
                declare sub put_pixel(byref buffer(), byval x as integer, byval y as integer, byval col as integer)
                declare sub draw_line(byref buffer(), byval x as integer, byval y as integer, byval x2 as integer, byval y2 as integer, byval col as integer)
                declare sub draw_line_h ( byref buffer(), byval x1 as integer, byval y as integer, byval x2 as integer, byval col as integer)
                declare sub draw_line_v ( byref buffer(), byval x as integer, byval y1 as integer, byval y2 as integer, byval col as integer)
                declare sub draw_rect_fill(byref buffer(), byval x1 as integer, byval y1 as integer, byval x2 as integer, byval y2 as integer, byval col as integer)
                declare sub draw_rect(byref buffer(), byval x1 as integer, byval y1 as integer, byval x2 as integer, byval y2 as integer, byval col as integer)
                declare sub put_solid (byref buffer(), byval x as integer, byval y as integer, byref sprite())
                declare sub put (byref buffer(), byval x as integer, byval y as integer, byref sprite())
                declare sub get_sprite( byref buffer() as integer, byval x1 as integer, byval y1 as integer _
                                        , byval x2 as integer, byval y2 as integer, byref sprite() as integer)
                declare function size_of_image(byval x1 as integer, byval y1 as integer, byval x2 as integer _
                                               , byval y2 as integer)

                option explicit

                const SCR_WIDTH = 320
                const SCR_HEIGHT = 240
                const SCR_SIZE = SCR_WIDTH*SCR_HEIGHT


                const PI = 3.141593

                const SPR_WID = 64
                const SPR_HEI = 64
                const SPR_SIZE = SPR_WID * SPR_HEI


                dim shared buffer( 0 to SCR_SIZE-1 ) as integer
                dim shared Lcos(0 to 359) as single
                dim shared Lsin(0 to 359) as single
                'dim shared sprite(0 to (SPR_SIZE - 1) + 2) as integer
                redim shared sprite(0 to size_of_image(0,0,SPR_WID - 1, SPR_HEI -1)) as integer

                    dim frame as long
                    dim col as integer
                    dim i as integer
                    dim j as integer
                    dim offs as long
                    dim rot as integer
                    dim counter as long
                    dim pixel as integer
                    dim xptr as long ptr
                    dim x as integer
                    dim y as integer
                    dim x1 as integer
                    dim y1 as integer
                    dim x2 as integer
                    dim y2 as integer
                    dim t as single
                    dim angle as integer


                    dim r as integer
                    dim g as integer
                    dim b as integer


                if( ptc_open( "freeBASIC v0.01 - RelGFX win demo(Relsoft)", SCR_WIDTH, SCR_HEIGHT ) = 0 ) then
                end -1
                end if

                    for i = 0 to 359
                        Lcos(i) = cos ( i * PI /180)
                        Lsin(i) = sin ( i * PI /180)
                    next i

                    sprite(0) = SPR_WID
                    sprite(1) = SPR_HEI

                    for y = 0 to SPR_HEI -1
                        for x = 0 to SPR_WID -1
                            r = abs(INT(128 - 127 * SIN(x * PI / 16)))
                            g = abs(INT(128 - 127 * SIN(y * PI / 32)))
                            b = abs(INT(128 - 127 * SIN((x+y) * PI / 16)))
                            put_pixel buffer, x, y , r shl 16 or  g shl 8 or b
                        next x
                    next y
                    get_sprite buffer(), 0, 0, SPR_WID -1, SPR_HEI -1, sprite()
                    counter = 0
                    frame = 0
                    angle = 0
                    do
                      frame = (frame + 1) and &h7fffffff
                        angle = (angle + 1) mod 360
                        x = (Lcos(angle) * (SCR_WIDTH  \ 2 ) )
                        y = (Lsin(angle) * (SCR_HEIGHT \ 2 ) )

                        cls buffer()
                        put buffer(), x+ ((SCR_WIDTH  \ 2) - 32), y+ ((SCR_HEIGHT \ 2) - 32), sprite()
                        put buffer(), -x+ ((SCR_WIDTH  \ 2) - 32), y+ ((SCR_HEIGHT \ 2) - 32), sprite()
                        put buffer(), x+ ((SCR_WIDTH  \ 2) - 32), -y+ ((SCR_HEIGHT \ 2) - 32), sprite()
                        put buffer(), -x+ ((SCR_WIDTH  \ 2) - 32), -y+ ((SCR_HEIGHT \ 2) - 32), sprite()
                        ptc_update varptr( buffer(0) )

                    loop


                ptc_close


                private sub put_pixel(byref buffer(), byval x as integer, byval y as integer, byval col as integer)
                        buffer(y * SCR_WIDTH + x) = col
                end sub

                private sub cls(byref buffer())
                    dim offset as long
                    for offset = 0 to  SCR_SIZE -1
                        buffer( offset ) = 0
                    next offset
                end sub

                private sub draw_line(byref buffer(), byval x as integer, byval y as integer, byval x2 as integer, byval y2 as integer, byval col as integer)

                dim i as integer
                dim slope as integer
                dim eterm as integer
                dim dx as integer
                dim dy as integer
                dim sx as integer
                dim sy as integer
                dim notclip as integer
                dim temp as integer


                const scrxmax = SCR_WIDTH  - 1
                const scrymax = SCR_HEIGHT - 1


                I = 0
                Slope = 0
                Eterm = 0

                IF (X2 - X) > 0 THEN
                     SX = 1
                ELSE
                     SX = -1
                END IF
                Dx = ABS(X2 - X)


                IF (Y2 - Y) > 0 THEN
                     SY = 1
                ELSE
                     SY = -1
                END IF
                Dy = ABS(Y2 - Y)

                IF (Dy > Dx) THEN
                        Slope = 1
                        temp = x
                        x = y
                        y = temp

                        temp = dx
                        dx = dy
                        dy = temp

                        temp = sx
                        sx = sy
                        sy = temp

                END IF
                Eterm = 2 * Dy - Dx

                FOR I = 0 TO Dx - 1
                   IF Slope = 1 THEN
                     NotClip = (((Y < 0) + (X < 0) + (Y > scrxmax) + (X > scrymax)) = 0)
                     IF NotClip THEN  buffer(x * SCR_WIDTH + y ) = col
                   ELSE
                     NotClip = (((X < 0) + (Y < 0) + (X > scrxmax) + (Y > scrymax)) = 0)
                     IF NotClip THEN buffer(Y * SCR_WIDTH + X ) = col
                   END IF

                   WHILE Eterm >= 0
                      Y = Y + SY: Eterm = Eterm - 2 * Dx
                   WEND
                   X = X + SX: Eterm = Eterm + 2 * Dy
                NEXT  I
                     NotClip = (((X2 < 0) + (Y2 < 0) + (X2 > scrxmax) + (Y2 > scrymax)) = 0)
                     IF NotClip THEN buffer(Y2 * SCR_WIDTH + X2 ) = col

                end sub



                private sub draw_line_h ( byref buffer(), byval x1 as integer, byval y as integer, byval x2 as integer, byval col as integer)

                const SCR_X_MAX = SCR_WIDTH - 1
                const SCR_Y_MAX = SCR_HEIGHT - 1

                dim wid as integer
                dim offset as long
                dim counter as integer
                dim temp as integer


                if (y < 0) or (y > SCR_Y_MAX)  then exit sub

                if (x1 > x2) then
                temp = x1
                x1 = x2
                x2 = temp
                    end if

                if x1 > SCR_X_MAX then exit sub

                if x2 < 0 then exit sub

                if x1 < 0 then
                x1 = 0
                if (x2 - x1) < 0 then exit sub
                end if

                if x2 > SCR_X_MAX then
                x2 = SCR_X_MAX
                if (x2 - x1) < 0 then exit sub
                end if

                wid = (x2 - x1) + 1
                if wid <= 0  then exit sub


                offset = y * SCR_WIDTH + x1

                for counter = 0 to  (wid - 1)
                   buffer( offset ) = col
                   offset = offset + 1
                next counter

                end sub

                private sub draw_line_v ( byref buffer(), byval x as integer, byval y1 as integer, byval y2 as integer, byval col as integer)

                const SCR_X_MAX = SCR_WIDTH - 1
                const SCR_Y_MAX = SCR_HEIGHT - 1

                dim hite as integer
                dim offset as long
                dim counter as integer
                dim temp as integer


                if (x < 0) or (x > SCR_X_MAX)  then exit sub

                if (y1 > y2) then
                temp = y1
                y1 = y2
                y2 = temp
                    end if

                if y1 > SCR_Y_MAX then exit sub

                if y2 < 0 then exit sub

                if y1 < 0 then
                y1 = 0
                if (y2 - y1) < 0 then exit sub
                end if

                if y2 > SCR_Y_MAX then
                y2 = SCR_Y_MAX
                if (y2 - y1) < 0 then exit sub
                end if

                hite = (y2 - y1) + 1
                if hite <= 0  then exit sub


                offset = y1 * SCR_WIDTH + x

                for counter = 0 to  (hite - 1)
                   buffer( offset ) = col
                   offset = offset + SCR_WIDTH
                next counter

                end sub


                private sub draw_rect_fill(byref buffer(), byval x1 as integer, byval y1 as integer, byval x2 as integer, byval y2 as integer, byval col as integer)

                const SCR_X_MAX = SCR_WIDTH - 1
                const SCR_Y_MAX = SCR_HEIGHT - 1

                dim hite as integer
                dim wid as integer
                dim offset as long
                dim xcounter as integer
                dim ycounter as integer
                dim temp as integer


                    if (x1 > x2) then
                temp = x1
                x1 = x2
                x2 = temp
                    end if

                if x1 > SCR_X_MAX then exit sub

                if x2 < 0 then exit sub

                if x1 < 0 then
                x1 = 0
                if (x2 - x1) < 0 then exit sub
                end if

                if x2 > SCR_X_MAX then
                x2 = SCR_X_MAX
                if (x2 - x1) < 0 then exit sub
                end if

                wid = (x2 - x1) + 1
                if wid <= 0  then exit sub


                if (y1 > y2) then
                temp = y1
                y1 = y2
                y2 = temp
                    end if

                if y1 > SCR_Y_MAX then exit sub

                if y2 < 0 then exit sub

                if y1 < 0 then
                y1 = 0
                if (y2 - y1) < 0 then exit sub
                end if

                if y2 > SCR_Y_MAX then
                y2 = SCR_Y_MAX
                if (y2 - y1) < 0 then exit sub
                end if

                hite = (y2 - y1) + 1
                if hite <= 0  then exit sub

                    offset = y1 * SCR_WIDTH + x1

                for ycounter = 0  to  (hite - 1)
                   for xcounter = 0  to  (wid  - 1)
                       buffer( offset + xcounter ) = col
                        next xcounter
                        offset = offset + SCR_WIDTH
                next ycounter

                end sub

                private sub draw_rect(byref buffer(), byval x1 as integer, byval y1 as integer, byval x2 as integer, byval y2 as integer, byval col as integer)
                    draw_line_h buffer(), x1, y1, x2, col
                    draw_line_v buffer(), x1, y1, y2, col
                    draw_line_h buffer(), x1, y2, x2, col
                    draw_line_v buffer(), x2, y1, y2, col
                end sub

                private function size_of_image(byval x1 as integer, byval y1 as integer, byval x2 as integer, byval y2 as integer)
                dim s as integer
                dim temp as integer
                if x1 > x2 then
                temp = x1
                x1 = x2
                x2 = temp
                end if
                if y1 > y2 then
                temp = y1
                y1 = y2
                y2 = temp
                end if
                s = ((x2 - x1) + 1) * ((y2 - y1) + 1) + 2
                size_of_image = s

                end function

                private sub put_solid (byref buffer(), byval x as integer, byval y as integer, byref sprite())


                const SCR_X_MAX = SCR_WIDTH - 1
                const SCR_Y_MAX = SCR_HEIGHT - 1

                dim owid as integer
                dim ohei as integer
                    dim wid  as integer
                dim hei  as integer
                    dim wcounter as integer
                dim hcounter as integer
                dim offset  as long
                dim soffset as long
                dim htemp as integer
                dim wtemp as integer




                if (x > SCR_X_MAX) then exit sub
                if (y > SCR_Y_MAX) then exit sub
                owid = sprite(0)
                ohei = sprite(1)
                wid = owid
                hei = ohei

                    soffset = 2

                if y < 0 then
                y = -y
                soffset = soffset + (wid * y)
                hei = hei - y
                if hei <= 0 then exit sub
                y = 0
                end if

                if  (y + hei) > SCR_Y_MAX then
                htemp = (y + hei) - SCR_HEIGHT
                hei = hei - htemp
                if hei <= 0 then exit sub
                end if

                if x < 0 then
                x = -x
                soffset= soffset + x
                wid = wid - x
                if wid <= 0 then exit sub
                x = 0
                end if
                if  (x + wid) > SCR_X_MAX then
                wtemp = (x + wid) - SCR_WIDTH
                wid = wid - wtemp
                if (wid <= 0) then exit sub
                end if

                offset = y * SCR_WIDTH + x

                for hcounter = 0 to (hei - 1)
                for wcounter = 0 to (wid - 1 )
                       buffer( offset + wcounter) = sprite(soffset + wcounter)
                next wcounter
                offset = offset + SCR_WIDTH
                soffset = soffset + owid
                next hcounter


                end sub

                private sub put (byref buffer(), byval x as integer, byval y as integer, byref sprite())


                const SCR_X_MAX = SCR_WIDTH - 1
                const SCR_Y_MAX = SCR_HEIGHT - 1

                dim owid as integer
                dim ohei as integer
                    dim wid  as integer
                dim hei  as integer
                    dim wcounter as integer
                dim hcounter as integer
                dim offset  as long
                dim soffset as long
                dim htemp as integer
                dim wtemp as integer
                dim pixel as integer




                if (x > SCR_X_MAX) then exit sub
                if (y > SCR_Y_MAX) then exit sub
                owid = sprite(0)
                ohei = sprite(1)
                wid = owid
                hei = ohei

                    soffset = 2

                if y < 0 then
                y = -y
                soffset = soffset + (wid * y)
                hei = hei - y
                if hei <= 0 then exit sub
                y = 0
                end if

                if  (y + hei) > SCR_Y_MAX then
                htemp = (y + hei) - SCR_HEIGHT
                hei = hei - htemp
                if hei <= 0 then exit sub
                end if

                if x < 0 then
                x = -x
                soffset= soffset + x
                wid = wid - x
                if wid <= 0 then exit sub
                x = 0
                end if
                if  (x + wid) > SCR_X_MAX then
                wtemp = (x + wid) - SCR_WIDTH
                wid = wid - wtemp
                if (wid <= 0) then exit sub
                end if

                offset = y * SCR_WIDTH + x

                for hcounter = 0 to (hei - 1)
                for wcounter = 0 to (wid - 1 )
                            pixel = sprite(soffset + wcounter)
                       if pixel <> 0 then buffer( offset + wcounter) = pixel
                next wcounter
                offset = offset + SCR_WIDTH
                soffset = soffset + owid
                next hcounter


                end sub


                private sub get_sprite( byref buffer() as integer, byval x1 as integer, byval y1 as integer _
                                        , byval x2 as integer, byval y2 as integer, byref sprite() as integer)

                const SCR_X_MAX = SCR_WIDTH - 1
                const SCR_Y_MAX = SCR_HEIGHT - 1

                dim hite as integer
                dim wid as integer
                dim offset as long
                dim soffset as long
                dim xcounter as integer
                dim ycounter as integer
                dim temp as integer



                    if (x1 > x2) then
                temp = x1
                x1 = x2
                x2 = temp
                    end if

                if x1 > SCR_X_MAX then exit sub

                if x2 < 0 then exit sub

                if x1 < 0 then
                x1 = 0
                if (x2 - x1) < 0 then exit sub
                end if

                if x2 > SCR_X_MAX then
                x2 = SCR_X_MAX
                if (x2 - x1) < 0 then exit sub
                end if

                wid = (x2 - x1) + 1
                if wid <= 0  then exit sub


                if (y1 > y2) then
                temp = y1
                y1 = y2
                y2 = temp
                    end if

                if y1 > SCR_Y_MAX then exit sub

                if y2 < 0 then exit sub

                if y1 < 0 then
                y1 = 0
                if (y2 - y1) < 0 then exit sub
                end if

                if y2 > SCR_Y_MAX then
                y2 = SCR_Y_MAX
                if (y2 - y1) < 0 then exit sub
                end if

                hite = (y2 - y1) + 1
                if hite <= 0  then exit sub

                    sprite(0) = wid
                    sprite(1) = hite

                    soffset = 2
                    offset = y1 * SCR_WIDTH + x1

                for ycounter = 0  to  (hite - 1)
                   for xcounter = 0  to  (wid -1)
                       sprite( soffset + xcounter )= buffer( offset + xcounter )
                        next xcounter
                        offset = offset + SCR_WIDTH
                        soffset = soffset + wid
                next ycounter

                end sub


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: v3cz0r on November 08, 2004, 01:14:48 AM
                Whoa, and some ppl say i code too fast ;)

                Runs fine here, i barely can see the sprites moving, heh.. if tinyPTC could run in full-screen..


                Btw, just found another bug: if an argument has the same name and type as a shared var, fb is accessing the shared var, not the arg.. will fix that later.. another day, another bug.

                (and that cos( T! * . 6 ) thing, problem is that there is a space between the dot and the digit.. as QB can parse that, i added that "feature" too.. you need the new version tho)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: barok on November 08, 2004, 01:25:25 AM
                I agree with shadow fox... if there is any community out there that is crazy about pushing things to the limits, it's the qb community.  We'll (well, maybe people like rel or plasma ;)) eventually make freebasic one of THE most powerful compilers out there!  :lol:


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 08, 2004, 03:14:06 AM
                Well, duh, It's not going to "compare" compare... I just want a meter guage at FB's speed :)  When I say no BASIC compiler in the past has compared to GCC, I mean that they compare closer to good ol' QB (and in a few cases, actually lose) :)

                I made an ico file with a few formats (winXP, 256, 16 color) for 48x48, 32x32, 16x16 I also replaced the white background with a circle to make it look more like an icon and less like  thumbnail:
                (http://www.betterwebber.com/stuff/Horse.ico)
                http://www.betterwebber.com/stuff/Horse.ico

                It shows up as 16x16 XP format in firefox 1.0rc...


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: barok on November 08, 2004, 11:02:33 AM
                It looks really cool Jofers!


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: KiZ on November 08, 2004, 12:59:16 PM
                That looks cool, but i was maybe suggesting allowing the users to include their own icon when they compile the program.... or did you understand that?


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: v3cz0r on November 08, 2004, 01:55:27 PM
                Well, it's Windows, you can include whatever resource you want into an executable, but as LD (GNU's linker) is not a Windows-only app, it doesn't handle .res (Windows' compiled resource files) directly, so you need:

                1) create a resource script file (.rc), by hand or using a resource editor (M$ has a free one, i'll probably include it)

                2) compile the .rc to .res using a resource compiler, like GNU's windres (will be included too)

                3) convert the .res to .obj, using GNU's res2coff (ditto), so ld (GNU linker) can load it

                An IDE like VB does all that behind your back, but the process isn't that hard to do by hand.


                That icon looks better than mine Jofers, and i used the original in vector format.. CorelDraw sucks.. or it was just me, dunno.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 08, 2004, 03:53:40 PM
                Your icon was a wierd resolutoin, like 31x25.  I made about 5 images: 48x48 /w anti-aliasing, 32x32 /w anti-aliasing, 16x16 /w anti-aliasing, 32x32 /w 256colors, and 16x16 /w 16 colors, and stuffed them all into one ico file with some crappy free icon utility. 48x48 is the standard for "big" icons in Windows, 32x32 for normal, and 16x16 for those really tiny ones in the top left corner.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: na_th_an on November 08, 2004, 04:16:23 PM
                This sound pretty interesting.

                Once it's released, I offer myself to write an adaptation for Allegro (I mean, the .BI files and stuff).


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Sterling Christensen on November 08, 2004, 06:41:31 PM
                It seems there's another freebasic (http://www.geocities.com/SiliconValley/Heights/7052/freebas.html).

                That's a geocities page that belongs to a "Rick Elbers" (touchwind [AT] geocities.com) and it's the first google result for "freebasic" (but this qbasicnews forum thread is #3 and catching up fast :D)

                So it looks like the name is (or *was*) taken, sort-of. The page looks abandoned and it's clear they weren't even close to a prototype let alone a release.

                Here (http://www.uni-giessen.de/faq/archiv/compilers.free.basic/msg00000.html) is an alt.lang.basic.compiler FAQ that mentions "the FreeBasic project" and links to the above geocities page, but it's 5 years old.

                So I think it's safe to assume the name is ok to use, but I think you might want to mention (maybe in a FAQ entry or something) that it's not the same freebasic... or is it?

                Both old and new were to be/are originally written in qb (although C++ and xbasic were being pursued as well, apparently), and the original freebasic project was free/open, so anybody is free to revive it...

                v3cz0r, is that why you picked the name freebasic, or is this just a coincidence? :lol: Is there any connection between the old and new freebasic?


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: v3cz0r on November 08, 2004, 07:07:50 PM
                Yeah, i saw that, it's a defunct project, i wouldn't call vapoware as software so... And no, i've nothing to do with them and you can be sure that site will the listed on Google's results in the +10th page soon ;)

                As i said in this same thread, i tried other names, all taken.. [somenamehere]BASIC seems to be really common :P


                Allegro would be awesome, there are a quite a lot of headers to translate, iir.. anyway, any contribution is welcome.


                Only QB file stuff is missing to get the compiler to compile itself.. marzec wrote the rtlib for it, now i got add them to the parser.. i tried compiling some modules already (that don't use any file functions), parsing was okay and assembler didn't complain.. lets see if i can get it running til this weekend..


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: na_th_an on November 08, 2004, 07:25:18 PM
                Excellent job :) As soon as the first beta is released, I'll be working on Allegro.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 08, 2004, 07:55:15 PM
                I could throw down a header or two for something, if there's brute manual labor to be neaded...  It's just a bunch of SUB declarations and CONSTs, right?


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: na_th_an on November 08, 2004, 08:09:53 PM
                There's a lot of "inline" functions and defines. That's the tricky part, I guess. We could organize a small team to port Allegro. It would be nifty that another team would port SDL.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: ShadowWolf on November 08, 2004, 08:35:11 PM
                Doesn't allegro have a bunch of macro's i.e. END_OF_MAIN

                well anyway allegro would be kick ass to have also getting the winsock header converted would be nice to if it isn't already done.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 08, 2004, 08:42:52 PM
                Yeah - it might be beneficial to get the fundamentals complete before you tackle a bunch of game libraries.


                Quote from: "Vic"
                As i said in this same thread, i tried other names, all taken.. [somenamehere]BASIC seems to be really common :P

                YOU SEE?  YOU SEE WHAT I HAVE FRUITLESSLY WARNED YOU ABOUT??  DO YOU? *points*


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: ShadowWolf on November 08, 2004, 08:52:06 PM
                getting the compiler complete isn't the problem it's the macro's how would you handle somthing like that .

                but if you did get it done then you have a cross platform gaming lib for two builds of FB a linux version and a windows version.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 08, 2004, 09:48:44 PM
                i'll convert the winsock headers, they'll be up at 3:00 approx. will add the example from beej's guide, so nevermind translating this stuff.

                btw. see http:/ratatoskr.bad-logic.com/fb/ for freebasic related stuff like the preprocessor (need to write a doc) and the sdlheaders. if you want to use sdl with freebasic you at least need the sdl.dll and sdlmain.lib sdl.lib all available from http://www.libsdl.org

                night

                edit: just noticed, the winsock.h contains a bunch of defines used as constants plus some macros (SET shit... nargh), i'm really not going into writing them as basic constants by hand, so you'll need to use the preprocessor in order to translate the defines hehe, yeah smells like microsoft politics doesn
                t it? hehe... dunno how i should handle the set macros since they involve some pointer stuff to... hm v3c implement pointer arithmetics...


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Nexinarus on November 08, 2004, 09:51:45 PM
                You would tackle macros by... using macros. If v3ct0r releases FreeBasic without macros I will personally gaurantee i will kick his ass. So theres nothing to worry about.

                Im working on porting headers at the moment too, most of my probels at the moment is all C headers are complex as they only work by them including other headers and so on, so you have to take in to consideration 10 other headers just to port one header.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: ShadowWolf on November 08, 2004, 10:26:42 PM
                marzecTM i wonder if the Powerbasic community has done a winsock header translation.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 08, 2004, 11:41:09 PM
                Powerbasic has some winsock include files in here:

                http://www.powerbasic.com/files/pub/pbwin/pbdll16/dns.zip

                but they use wee tiny function statements and call integers with "%" in the front, or some other wierd convention I don't understand.

                EDIT:  There is what seems to be a slightly less muddled, but equally unusable visual basic include here:
                http://www.thevbzone.com/modWINSOCK.bas


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: ShadowWolf on November 09, 2004, 12:34:00 AM
                man the powerbasic code looks a little waked pluse i think it's for win 3.1 api a little dated don't you think.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: relsoft on November 09, 2004, 04:52:47 AM
                v1c cool!!!!

                BTW, is the inline ASM already implemented?

                Guys: Transucency 32-bit style. :*) Still bruteforce and tinyptc. :*)

                http://quickhost.qbtk.com/download.php?id=314



                Context has been perfect for FB.  I can be able to make a highlighter with it editing a built- in highlighter adnd you can make shortcuts with it like:

                1. F9 = compile prog
                2. F10 = run prog


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: aetherfox on November 09, 2004, 09:42:15 AM
                Jeez, this is turning out to be better than i thought!

                Whats the headway on that IDE?

                And when's the first official release?

                And whats going to happen with the website?


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: barok on November 09, 2004, 10:05:55 AM
                Rel, you are wetting my throat for freebasic...

                Seriously, those plasmas and demos you're making are SO awesome!!!  They look great even full screen!  I can't wait for freebasic!!!  

                And everything else aetherfox said. ;)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 09, 2004, 10:34:01 AM
                Quote from: "na_th_an"
                There's a lot of "inline" functions and defines. That's the tricky part, I guess. We could organize a small team to port Allegro. It would be nifty that another team would port SDL.


                SDL is already ported...


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: na_th_an on November 09, 2004, 10:42:27 AM
                Heh - do you seriously think that I was gonna read 8 pages of threads ;)

                Good news, tho'.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 09, 2004, 11:05:02 AM
                eight posts above...


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: KiZ on November 09, 2004, 12:09:09 PM
                Is it ye old

                WAIT &h3da, 8
                WAIT &h3da, 8, 8

                gonna work?

                ( i know its for anti - flicker, but i use it for delays as well)
                or are we going to have to think up our own delay routines? If so, will the new TIMER have a decent enough accuracy for very small delays? Or maybe will you be introducing a new TIMER function?


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 09, 2004, 12:22:32 PM
                No, and the millisecond timer object comes standard with the win32 api, as well as a getTicks function in SDL.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 09, 2004, 01:28:48 PM
                if somebody wants to do some demos with sdl, ask v3c wheter he gives you the last  version of the compiler (won't run with the here available version). i'd really appreciate having somebody else doing some demos as i'm pretty busy with other stuff

                the url to the sdl headers:
                http://ratatoskr.bad-logic.com/fb/sdl

                url to sdl (you'll need sdl.lib and sdlmain.lib to link to your files, plus sdl.dll in the system32 dir or in the path where your executable of the demo lies )

                http://www.libsdl.org


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: na_th_an on November 09, 2004, 02:35:16 PM
                Quote from: "marzecTM"
                eight posts above...
                May I ask you forgive my life?  8)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: aetherfox on November 09, 2004, 02:53:17 PM
                Please, please, please and pretty please with a cherry on top make sure this has good documentation.

                It's just sad that the majority of community and open sourced products have poor documentation, which really puts most new people off.

                WEBSITE!!!


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 09, 2004, 03:07:02 PM
                Quote from: "na_th_an"
                Quote from: "marzecTM"
                eight posts above...
                May I ask you forgive my life?  8)


                you shall be forgiven son .. hehe nm


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: barok on November 09, 2004, 05:00:06 PM
                nm as in "nevermind, he is not forgiven?"  or as in "nevermind, your forgiven?" ;)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Antoni Gual on November 09, 2004, 05:22:45 PM
                Quote from: "aetherfox"
                Please, please, please and pretty please with a cherry on top make sure this has good documentation.


                This thread is becoming huge, also there is people porting libraries, doing an IDE, a preprocessor, we have examples scattered at sites around the world. Also there is a thread running at Bad Logic and probably there are more elsewhere.
                I suggest to centralise all info in a separate forum an gather all downloads in a single site, before this thread grows to 400 posts and all of us get lost. ..V1ctor? Wildcard? Blitz?


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 09, 2004, 05:52:24 PM
                i guess v3c is in charge of that decision so go catch him on irc if you can hehe :)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: ShadowWolf on November 09, 2004, 07:41:26 PM
                Antoni gual mybe your over reacting a bit  Fb core systex and lexicon is QB so you can pretty much cut and past the QB help file
                for most of it's information and example's and edit the information where needed.  

                the Header translations are just that translation the core C libs are still the same so documation on thouse libary's are still good although they would be in C but you could workout how to use them. or somone could run though the documation and edit the Code for FB.

                the only thing that need any real documation is on the use of command line compiling everything else can be grab from other source's although it be nice to have all this is in the IDE help section.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: wildcard on November 09, 2004, 08:13:54 PM
                Quote from: "Antoni Gual"
                This thread is becoming huge, also there is people porting libraries, doing an IDE, a preprocessor, we have examples scattered at sites around the world. Also there is a thread running at Bad Logic and probably there are more elsewhere.
                I suggest to centralise all info in a separate forum an gather all downloads in a single site, before this thread grows to 400 posts and all of us get lost. ..V1ctor? Wildcard? Blitz?


                Theres no problems with several threads here, or doing a sep forum(I've contacted v3cz0r to see what he thinks, as its his baby). I'll setup the stuf asap.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: v3cz0r on November 09, 2004, 09:11:45 PM
                Well, about the forum, as i told wildcard by PM, i'll create a forum at fb's site as soon the first release is done - in 1-2 weeks, i hope..

                I didn't think there would be so many replies when i posted this msg, heh.. ow..


                Anyway, there's no IDE being done that i'm aware, Context (mentioned by Rel) is a freeware text editor, you can find it here: http://www.context.cx/


                About Winsock, well, the easiest header to reuse would be the one i wrote for DSOCK, but i can't mess with that currently.. compiling the compiler is taking all my free time :P


                Just found another problem when compiling the compiler: i need support for temp array descriptors, to be able to pass arrays on fields by descriptor to functions (as arrays on fields don't have descriptors, duh).. ow, ow.. more work to do..


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: v3cz0r on November 10, 2004, 12:52:29 AM
                OK, got the bitch to compile.. these are the the stats of the compilation:

                C:\prg\code\BAS\freeBASIC\src>wc compiler\*.bas
                files:18 lines:19522 bytes:452982

                C:\prg\code\BAS\freeBASIC\src>wc compiler\*.asm
                files:18 lines:86201 bytes:1736191

                (~86k lines of asm code off ~20k lines of bas sources)

                It runs fine until i try to compile something ;).. gotta fix the runtime lib routines that i did code but didn't test.. arf.. wish me luck :P


                Byez...


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 10, 2004, 01:00:41 AM
                Woo hoo!  I'd loan you my lucky clover, but alas, you're in South America.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: barok on November 10, 2004, 02:10:16 AM
                If you want i can shoot you a rabbit and send you it's foot.   It might smell by the time it gets to you though.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: relsoft on November 10, 2004, 02:55:47 AM
                Ahem, v1c:

                32-bit fulscreen tinyptc is faster than win mode.  Even in 640 * 480, the blitters run at almost full speed. ;*)

                Now, if I could asm the inner-loops, this would be Rellib in FB.

                Take your time. you have PM


                BTW, I'll prolly be able to finish FB's highlighter in a week.  Too many keywords to find and group.  

                And I did forget that I was to write a Lensflare tute for QBexpress.  Sorry Pete, will do it tonight.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: aetherfox on November 10, 2004, 10:33:53 AM
                OMG.

                I was in the process of finishing off my programmer's editor...this is exactly like mine!!!

                Thats not fair.

                I hate when this happens.

                ARRRGGGGHHHH.

                I really think freebasic needs a dedicated IDE.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 10, 2004, 02:34:18 PM
                *nods*  This might have to be my contribution (...and I won't quit until I have a contribution to brag about).


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 10, 2004, 02:36:50 PM
                I'd do the IDE, but frankly, I don't really have the time to dedicate to such a large project, unfortunately. If it were six months ago, sure...but not now. :(


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Blitz on November 10, 2004, 02:50:55 PM
                In my opinion, you should move it over to badlogic forum, as that's the ofrum v1ctor will use i guess. I don't think you're going to setup another one? Are you ?


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 10, 2004, 04:55:23 PM
                what would really be needed is a debugger, and since v3c said he'll include debugsymbols in the asm source soon, i guess insight is the choice (a gui for the gdb)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 10, 2004, 05:09:07 PM
                A proper IDE contains a debugger, so it was assumed already. :D


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: aetherfox on November 10, 2004, 05:36:19 PM
                Yeah, obviously...it's not really Integrated then is it?

                I really think it's gotta be worth its weight in...bytes.  You don't want such a powerful compiler hiding behind some ugly IDE.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Blitz on November 10, 2004, 05:44:29 PM
                IDE isn't important, get ultraedit and you've got syntax highlighting, that's all you need. I never use IDEs, i pick a compiler for it's power.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 10, 2004, 06:47:20 PM
                jupp master ;)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: ShadowWolf on November 10, 2004, 08:11:16 PM
                blitz a good IDE is just iceing on the cake somthing with a a good Help search fucation.  mybe some pre syntex checking and debuging opations would be pretty cool.  

                pluse mybe templates and some other built in tools.

                but i guss this isn't need i would be happy with notepad and comand line. but making an IDE is somthing somone else can do later on mybe even with FB it's self the only thing i sugested is having only one offical IDE that way things could be standerized
                abit.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 10, 2004, 10:11:54 PM
                Yeah.  Most people are command-line-phobics.  People in my hall were astounded when they found out I was doing my java homework from the commandline, and not with netBeans for something like that.  And that's Java, which is about as difficult to compile as eating a delicious sandwich, for lack of a witty metaphor.  

                I know that when I started QB nearly a decade ago, I would've browned my pants at the thought of programming without my happy blue IDE.

                My only wish is documentation.  And I mean language documentation.  BASIC lacks any kind of standard, like what C has, with most compilers just copying some loose form of QB (I've yet to see one compiler's code work with another).


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Plasma on November 10, 2004, 10:31:41 PM
                Nice, easy-to-use IDEs attract noobs. Which is probably why there is a QB "community" in the first place. However, the most important part of a compiler is the compiler. Worry about the IDE later.

                As far as standards go, BASIC does have a few.

                ANSI Standard for Minimal BASIC (X3.60-1978)
                ANSI Standard for Full BASIC (X3.113-1987)
                ISO Standard for Minimal BASIC (ISO 6373:1984 Data processing - Programming languages - Minimal BASIC)
                ISO Standard for Full BASIC (ISO/IEC 10279:1991 Information technology - Programming languages - Full BASIC)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 10, 2004, 11:34:25 PM
                ....aaand which ones does FreeBasic follow?

                Everyone is a "noob" once, as moronic as that word is, and I guess in the cosmic sense we're all "noobs".  I swear, it's the like "B" in BASIC stands for "beginner" or some dumb thing.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Plasma on November 10, 2004, 11:43:33 PM
                I haven't personally used FB, but if it's 99% compatible with QB syntax, then it should follow all of them.

                In case I was unclear before, noobs are a good thing when you're trying to get a large user base.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 10, 2004, 11:57:04 PM
                i guess as long as fb is not compatible with qb, there's hardly a chance to beat qb on that sector, cause it's things like PSET, BEEP and the like that makes qb attractive for beginners and it don't think that v3c will add all of this to the runtimelib on his own...


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: ShadowWolf on November 11, 2004, 12:48:17 AM
                marzecTM writting a wraper to handle QB basic primative GFX fucations would be a jock to do.  or simple just use somthing like Rel wraper for TinyPTC.  

                so have a simplistic GFX lib for beginners will attracted beginners to FB as long as it get's include with one of the release packages and there good Instruction on how to use it i.e. idoted proof. also good documantion on using the command line compiler is going to be need.

                And a IDE is a must later on to get complete programming newbies into the FB community you wouldn't belive how many people are scared to use Command line.


                also the new FB community that will form will most likely be made up of the QB community at first then we could steal people from the PowerBasic community , DarkBasic and blitzBasic  communitys at the same time getting people in from our base Qb community.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: BinarySHOCK on November 11, 2004, 02:02:10 AM
                Ya prolly like 85% of the base qb qmunity :P

                i'd say a good IDE is a must later on aswell, i tend to prefer compilers that have them, altho i'm not scared of the command line by any means (use it quite frequently actually) ;)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: L_O_J on November 11, 2004, 06:15:41 AM
                ummm for the IDE ,why not just modify DevC++ IDE ? I mean it open source and very mature IDE (although for C++).


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 11, 2004, 09:59:11 AM
                My problem with dev-c++ is that it's a little too featureful.  Too bloated, with projects and wizards and tabs and frames and whatnot.  A syntax-colored notepad with *one* row of buttons, but all the same features should be a goal, with may be a thin compiler message frame at the bottom that can be removed.  The more fluff there is the more that can confuse the user.  Besides, an FBasic ide could be nifty (Think, GUI)

                It's not a *bad* idea, though, but I can be fanciful and stingy about the ide while no one's actually working on it.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 11, 2004, 01:10:35 PM
                devc++ is buggy as hell, i would stay away from that. if nobodies writing an ide, i guess i'll do it with a friend of mine, the minimum requierments aren't really hard to implement so...

                but maybe there's a vb guru out there that is able to do that in a day or something heh..


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 11, 2004, 01:26:31 PM
                Sign me up.  But use either C++, Java, or FBasic, because VB and related products have the negative tendency to be hopelessly Windows-dependent.

                Also don't make some crap program with the idea of getting all the basic stuff in.  As an open source project, it should have a goal of being readable and more importantly modular and extendable.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 11, 2004, 03:16:58 PM
                i would use gcc and some gui lib like wxwidgets or stuff...

                about modularity, what do you have in mind?


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: relsoft on November 12, 2004, 01:52:00 AM
                Context.  da purfect editor. :*)
                Or MED. :*)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 12, 2004, 10:27:22 AM
                Making a Windows-specific IDE to start with is not a bad thing. I don't know why people automatically assume that similar/identical programs cannot be made in other environments just because they're "Windows-specific". Any developer worth their salt can develop a clone in another environment. Look, for example, at Winamp and XMMS: they're so friggin alike it's not even funny, yet they're both native to their own platforms. Those of you who whine about Windows-specific stuff have "coder's slack"...a communicable coder's disease in the form of lazyness which spreads around programmers who believe themselves to be too busy to do any real work. :D


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 12, 2004, 11:17:06 AM
                Yeah, if you're coding something like C++.  If it's VB, then you have a problem.  That's not whining, that's reality.  If you're plopping elements on a VB frame, and running a few events to make the code colored and buttons work, then it would probably be easier to rewrite the program than to port it.  

                Personally, I'm all for using FB.  I mean, if the compiler is in FB, than if the IDE ever needs to be cross platform, it will be.  Plus, basic is something everyone on this board can understand (hopefully.  If not, well, there's a messageboard for that :P).

                By modular, I just mean encapsulating things into subroutines and files instead of throwing down everything in some big ol' file with kilobytes and kilobytes of code resembling Aramaic to people other than the programmer.  

                Let's say Bob wants to add syntax checking.  All he should have to do is add a few lines to Jim's code, and then make a file with all the routines he needs for his extension to work.  That would mean having the part of the code that interprets the syntax separated from the syntax highlighting, so that it can be used by others.  Just an example.

                Or maybe I'm just getting too used to PHP and Java projects :P


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 12, 2004, 12:44:45 PM
                You're getting too used to PHP and Java projects. :D

                One problem I have always had with certain types of people is how they honestly believe that developing a project in VB is "simple". No offense Jofers, but you make it sound like a novice task to develop a program in VB. While much of the grunt work is cut out, there's still plenty of code to write. Whether or not said project is portable or not is relatively immaterial. In addition, writing generic code may work for portability reasons, but writing platform-specific code will help you make the most of whatever program you're writing. This is why I'd rather write code in MSVC rather than mingw...MSVC will make the most of the code you write, because it's heavily optimized for the Windows platform and mingw is not.

                Any loser can slap together a few controls on a form in VB6 and call it an application, but it takes a genuine programmer to develop a legitimate VB application. That, like developing a nice game in QB to begin with, is a challenge in and of itself. But one thing I hate is when a person rags on a VB application, then shows up with a half-assed broken C++ application with a quarter of the functionality "but hey...it's in C++! It's automatically bettar!" That kind of blind elitism is what divides programming communities.

                You use the tool that's suited for the job. Let's face it...nothing is more suited for GUI-based applications in Windows than Visual Basic. Thusly, nothing's more suited for an editor than Visual Basic for that reason.

                Anyways...rant over, back to work on GGA'04. :D


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: ShadowWolf on November 12, 2004, 02:53:33 PM
                VB by far is the best suit lang for writting a IDE in. that's what it was desgined for after all fast appilcation programming.

                doing the same thing in C is messy at best and takes longer. so what that you have to have VB runtimes installed and VC code is compiled tighter because in the end thouse two thing don't really matter for an IDE.

                it's not like your programming some thing that need to take a crap load of CPU power and you need the fast code excation as possible. it's an Editor with some extra's.  and the vb6 runtimes well who care's about having the runtime package being installed with the IDE it's only a few extra megs.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 12, 2004, 03:02:07 PM
                Technically speaking, there's no tighter code than VB6. The code is exceedingly granular, making the smallest EXEs possible for a high level language. VC (or virtually any C/C++ compiler for that matter) cannot produce the kind of tight granular executables that VB can. I have had this argument (and won this argument) with countless people over the years. :D

                (Anyone seen that horrible freeware IDE for VS.net? I've never seen such a poorly designed IDE...you need a 1GHz computer just to RUN the bloody thing! I deleted it so fast that I don't even remember what it's called anymore!)

                Anyways...freeBASIC is featured in the latest V Planet update.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 12, 2004, 04:31:42 PM
                wow a language flamewar? let me take part, vb6 simply sucks, vb7 has much more of a real programming language. that vb outperforms any of the available win32 c/c++ compilers? i doubt that *grin*

                but writing an ide in vb maybe a good choice, cause you can really do that fast (here a click there a click finished.. j/k :)) but concerning portability it's a bad choice...

                writing the thing with fb is also not the best thing, cause you'd have to port the win32 api or mfc what wouldn't work cause of it's oo roots. (fb doesn't support linking c++ stuff cause of name mangling)

                thus i'd prefer using c, either vc or mingw c , where mingw c is imho better, cause it's standard compliant, where vc really sucks ass sometimes. and if you know your math in c and you got a decent gui lib one's at least as fast as in vb...

                my two cents...


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 12, 2004, 05:02:51 PM
                When I said VB6 is as tight as it gets, I'm talking about granularity. Unless you're coding in assembly, you're not going to find anything tighter than VB6...end of story. :D Why? Because virtually all its "real" routines are contained inside the runtime library! So the EXE ends up being tiny. :D

                VB6 0wnz j00 @ll. :D

                [/leetspeek]

                *ahem* anyways...about that FB thing... ;)

                By the way, what's the status on FB now?

                PS: no one was flaming. :P


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: aetherfox on November 12, 2004, 06:30:47 PM
                Frankly I don't see what the whole cross-platform argument is here.  The majority (I'm talking the huge majority) of people who will use freebasic will be Windows users.  The few people who will be Linux users will most likely have dual boot.  So why waste your time writing proper cross-platform code in a language that makes it about as hard as it can be to write GUI applications as possible?  It would have half the functionality, probably not be sexy looking.

                VB was designed for this task, and for the Windows user, nothing else could be better.  C/C++ was not designed for GUI dev.

                Nek, I agree with you.  All people think they have done something great when they write a half-assed program in C++ and think its better than a functional and fully featured VB one simply because its C++.

                I think the official IDE should definatley be written in VB, and I go as far as to say it would be downright stupid not to.
                If someone has the urge to write an IDE that will work in Linux, Windows, Mac, Solaris, X, Y and Z, then by all means, go ahead, but don't hamper progress for the proper one.  It's an open source project, so write your own one on the side.

                As for the argument about the executables...well almost every computer has the runtime library.  VB produces puny runtimes...I wrote a text encryption program and encapsulated it into only 40kb.  That is really small.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Plasma on November 12, 2004, 07:10:22 PM
                FB roxors your boxors (http://www.phatcode.net/public/basstest.zip).


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: v3cz0r on November 12, 2004, 08:12:16 PM
                Heh, nice, i love chiptunes, but, now, gimme that bassmod.bi, you!!!1 ;)


                See rel, now your FB gfx demos can have music playing in the background :)


                Anyway, FB compiled in VBDOS can compile the 32-bit version of itself, but that 32-bit version can't yet re-compile itself, if you know what i mean, hmm.. added some debugging support, so lets see if it helps..


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 12, 2004, 09:06:17 PM
                i shall kneel down and praise the almighty vb...

                wtf? oh yeah, just because the exe is small it's good hehe. you never read the compiler manual do you? have a look at the gcc manual and proof me that you can make tinier exes then it does with vb


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 12, 2004, 10:15:25 PM
                Nice v1c.  Plasmer:  I wish my sound card was working :(

                Wow.  I did not expect my comments to churn either some existing dispute over Visual Basic or some assumptions of assumptions of assumptions of the language, or whatever.  So, uh, lemme pass a few things on to you guys:

                1) I never said anything bad about VB other than the fact that it's not cross-platform, and can't be ported easily, which is not opinion but fact.  Well, maybe the latter is opinion, but it's a valid opinion.  That doesn't make it a children's language, nor does it make it an limited language.  I have and still use Visual Basic when I need to, really, I'm better at it than C++.  I haven't even presented a half-assed C++ program as superior, I'm waiting until later to do that.  It's like calling Ghandi a bigot, I'm really not concerned with language preference.

                2) The reason I suggested C, Java, or FB is because FB's runtime is portable, which means it has the potential to be cross-platform in the future.  If that turns out to be true, you'd have to rewrite the entire IDE if it wasn't portable.  AethorFox pointed out that a majority of users will be Windows-based, and his point is duly noted.  Marzec pointed out that FB is not yet ready for GUI programming, also duly noted.

                3) Really, I'm not the boss of you.  Really!  You can make it in MATLAB, and there's not a darned thing I could do about it.  When I make a suggestion, you don't have to follow it, so you don't have to protest it.  "Thanks, but I'm still doing it with [insert language here] because [insert reason here]" would've sufficed.  ;)  But somewhere that just turned oogly.

                4) Clean code is still a good idea, if you use VB or anything else.  I don't know how that got thrown back at me.

                5) If you've been reading closely, I've been describing conTEXT with syntax checking.  Really, it's a good editor, as Rel says.  But much in the vein of Google, things are much cooler when branded.

                Blah.  I leave the forum for a day, and a flame-war gets started.  Just when I think I'm out, they keep pulling me back in...

                AAAnyways, when is Wildcard going to make a FB forum already?  I'm back in the mood for some:
                Quote from: "Jofers"
                pander for, nay, demand features in my new toy but throwing forth no effort to actually participate, or compensate in any way, shape or form.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 12, 2004, 10:25:42 PM
                Hehehe Jofers...tis the nature of "language loyalty" man :D Well, everyone has their loyalties I reckon. :)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 12, 2004, 10:41:39 PM
                ha i again forgot about the smilies :) ;) or whatever. should start to use them, hey jofers nothing was meant seriously. no flamewar here... peace and stuff


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: ShadowWolf on November 12, 2004, 11:32:30 PM
                v3cz0r so you got vbdos beta version to compile the 32bit version of the compiler yet the 32bit  compiler can't compile the it's own source ?

                man that's waked.  most likely somthing small and stuped that causing the problem


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: relsoft on November 13, 2004, 02:34:57 AM
                Nice Plaz!!!

                Check this out...

                http://quickhost.qbtk.com/download.php?id=318


                v1c: Trig + floats work like hot knife on butter. :*)


                Title: Let me be the very first to say something about this demo.
                Post by: Adigun A. Polack on November 13, 2004, 03:41:43 AM
                To Richard Eric M. Lope (Relsoft):

                Well my man, I have just checked out your latest creation today at 1:20-1:25am EST — called your moving water trail graphics demo — for the current FreeBasic (FB) project.  At first, it did not even show up clearly on a Laser monitor from 1992, so I had to temporarily switch monitors to a Pionex one (I currently have two working computer monitors at hand here), and that second one showed the thing more clearly and it came up with something that goes like this:

                (http://img50.exs.cx/img50/3647/RelWater.png)

                WOW!!!  Are you the king or what!?  :D !!  That demo is not just awesome, it is PHENOMENAL, I must say!!!  Man, if you would implement some sort of a RelLib-like wrapper even as soon as FB finally releases with an IDE, I’d be in a game-programming heaven already myself!!  ;)=b !

                Great having you here this morning, Eric, and catch you around again!!  Peace!!!  :cool:



                WISHING YOU MY HEARTY CONGRATULATIONS ON THIS EXCELLENT LITTLE GEM OF A DEMO,

                (http://img61.imageshack.us/img61/2493/AAPname.gif)
                Adigun Azikiwe Polack
                One of the Founders of “Aura Flow”
                Continuing Developer of “Frantic Journey”
                Current Developer of “Star Angelic Slugger”
                Webmaster of the “AAP Official Projects Squad (http://dhost.hopto.org/aapproj/)”


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: relsoft on November 13, 2004, 07:14:40 AM
                AAP: I am almost sure I could pull off Rellib in FB.  Whether that's learning how to do DX or even in TinyPTC as an external lib for FB.

                Now, if FB would just support Intel ASM..... ;*)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: aetherfox on November 13, 2004, 07:57:26 AM
                Hmm Rel that demo runs waaaaaaaay to fast for me.  The water trails are almost impossible to see.

                But...sexay movement and what I CAN see looks awesome.

                WC, cheers for the forum, this makes life a little easier.

                Vic, whats happening with the compiler and its accompanying doc?

                Anyone taken on the task of IDE yet?

                And lastly, I've given upon the capitalisation of my name, people here just don't get it, but at least spell it right: A E T H E R F O X.

                If you were wondering, its .:: æthérFòx ::..  But then I stopped caring...aetherfox, aetherFox, Aetherfox, AetherFox, aefox, ae, fox, avi, avinash will all suffice :P


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: relsoft on November 13, 2004, 08:00:05 AM
                Yeah, it's tinyPTC not enabling Vsynch.

                I guess the FB just compiles tight code. very fast.

                The asm code it generates with the put_pixel code I made is like how I'd do it if I code in ASM.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 13, 2004, 11:26:25 AM
                Plus, with QB generating 286 code, you just kinda leaped forward 3 cpu generations :)

                So rel, interested in finishing DW3 now ;)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: TheBigBasicQ on November 13, 2004, 01:47:22 PM
                3 or is it 4 :-?


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Z!re on November 13, 2004, 03:42:27 PM
                4, isn't it?... from 286 (or actually 8086 with good 'ol QB) to 686...  :D


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Anonymous on November 13, 2004, 04:23:12 PM
                well it only compiling with the .arch i386 directive.but you could change that.


                also rel doesnt the ASM victor using support intel syntax


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: v3cz0r on November 13, 2004, 06:26:53 PM
                Running in protected-mode does all the difference, the 32-bit version of FB can compile the openGL example that Blitz wrote in half the time than the vbdos' compiled version takes..


                Btw, 32-bit version can't yet recompile its 20k lines of code, more debugging do to, ow..


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: aetherfox on November 13, 2004, 06:42:34 PM
                You're getting there, good job.

                Rel...anychance of sticking some VSync in there somewhere?  That screenie looks gorgeous...


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 13, 2004, 08:54:17 PM
                That reminds me...I've yet to really give FB a good look-over, but...does it support console applications? Since all the problems with the KOQB'04 engine on certain video cards, I'm really looking into doing it as a win32 fullscreen console app rather than the QB textmode version.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Plasma on November 13, 2004, 09:03:16 PM
                yes.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 13, 2004, 10:27:34 PM
                Certain video cards have trouble with screen 0?  Man, what a lousy video card.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 13, 2004, 10:56:29 PM
                It seems that NVIDIA cards with MX chipsets have a problem with setting the video palette at entries 16-31 in textmode. I've seen the problem on my own GF4 MX4400, and someone with a GF2 MX440 (I believe this was the card) also reported the same problem. Other people have also reported problems with this (this is because the BMP routines of Useless Sock use this console palette trick). It works fine on my own NVIDIA TNT2 Pro 64 though, and on most other video cards that have been reported.

                It's annoying as hell though....c'mon, it's TEXTMODE!!!!!! :evil:  :evil:  :evil:


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: relsoft on November 14, 2004, 01:45:33 AM
                Quote from: "aetherfox"
                You're getting there, good job.

                Rel...anychance of sticking some VSync in there somewhere?  That screenie looks gorgeous...


                Haven't made a windowed mode for h2o yet but here's another one:

                http://quickhost.qbtk.com/download.php?id=319


                Title: Random naive questions
                Post by: dilettante on November 14, 2004, 02:39:27 AM
                I didn't want to pollute a pristine forum with a new thread, so...

                I don't see a lot of discussion about ActiveX or general COM support.  Is this a future addition, not part of the FreeBASIC vision at all, or have I just missed it?

                Is this compiler primarily targeted at game development?  Lots of talk about graphics and sound, darned little about file I/O, database access, or IPC mechanisms above the Winsock level.

                Are we looking at a simple "component model" based on static library linking and regular classless Win32 DLLs?


                Please don't take any of these questions as deprecating the accomplishment.  To begin with it sounds like a wonderful achievement in itself.  I also understand the desire to have (essentially) a 32-bit QB/PDS, and I can relate to considerations of possible ports to Linux and/or the BSDs down the road.  For the rest of my list, there is always the future.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 14, 2004, 05:30:21 AM
                Well, it's being discussed by a bunch of QB fans, who have sort of taken a compiler meant for quick business applications and turned it into a gaming tool.  You can expect a lot of games on the horizons.

                But it can take in, like you said, any classless DLL if the header is in FB, so you can do pretty much anything (that doesn't require objects :D).  There are some file IO routines in the runtime (obviously, because FB compiled itself), but I'd need to check it out before I give any assessment.

                Rel, that demo is gorgeous.  You need to start entering some of those coding contests, and show 'em that 2d demos are still cool :D


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: KiZ on November 14, 2004, 09:36:43 AM
                Quote from: "relsoft"
                Haven't made a windowed mode for h2o yet but here's another one:

                http://quickhost.qbtk.com/download.php?id=319


                :P My jaw is still hanging off my mouth. That is so damn beautiful. I actually mean Beautiful, man!

                Whats that effect called? And where did you learn to do that!?


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Marcade on November 14, 2004, 10:07:38 AM
                Wow V1ctor. And I thought DSock was the greatest thing ever happened to QB .. but if you actually finish this, I guess it will take it's place.

                You really must love QB. :-X

                Anyway. What I noticed while running relsoft's extremely pretty demo was, my CPU going to 100%

                One of my biggest problems with the old QB45 is that when I run a program, it takes 100% of the CPU, no matter what it's doing.

                How is this going to be in FreeBASIC? (I guess it will not do that). Are you planning to implement some other features around CPU usage?

                And I also strongly agree with .. (forgot the person's nick) .. about the documentation thing. Good documentation is very important. :o


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Blitz on November 14, 2004, 10:39:42 AM
                It's just a normal windows application. Windows determines how much cpu power it should get. So really, it has nothing to do with freebasic.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: aetherfox on November 14, 2004, 10:45:49 AM
                That would be me, bitchin about the documentation over and over.

                MAKE IT GOOD.

                Now, Rel.  That demo.
                What? How? When? Why? Who?

                That was unreal.  Absolutely amazing.
                Start programming in an FPS counter, like if the user presses Space the counter comes alive in the corner.

                dark_prevail had the correct line of questions.

                You need to write a series of tutorials on graphical effects specifically for FreeBASIC.  I'm talking this magical one, the one you did before (h2o), plasmas, fire etc.  It will be really good, and it will also get people accustomed with interfacing with graphics through FB.

                Good job.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 14, 2004, 10:47:58 AM
                I can probably assist with documentation. Documentation is an obsession for me, kinda like it was for Nazi Germany. :D


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 14, 2004, 11:11:37 AM
                While I wouldn't say it's a Nazi obsession, a good documentation goes a long way with me as well.  If you need qboho for fb, gimme a ring.

                Hell, it's been long overdue for me to replaced the IE-only character sets in qboho with nice unicode and a cgi backend.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: v3cz0r on November 14, 2004, 01:39:54 PM
                Quote
                I don't see a lot of discussion about ActiveX or general COM support. Is this a future addition, not part of the FreeBASIC vision at all, or have I just missed it?


                I don't plan adding any support for COM and ActiveX, for that you must add Variant data types, what means the compiler would be dependent on the Win API (ole32 dll's), and i don't want that, sorry.

                Quote
                Is this compiler primarily targeted at game development? Lots of talk about graphics and sound, darned little about file I/O, database access, or IPC mechanisms above the Winsock level.


                Well, it's BASIC, games are the first target, i guess.. but as a the compiler won't have any new intrinsic functions to do only expecific tasks and as you can use any shared/static 32-bit library (non OO only), you can for example use MySQL or such db, if the C headers are ported. File statements will be the same as in QB.


                Quote
                Anyway. What I noticed while running relsoft's extremely pretty demo was, my CPU going to 100%


                That's 'coz Rel is doing everything in software (tinyptc also blits to screen w/o using hardware accel, just MMX). That opengl test for example, takes only 2% of CPU time here, as rendering is being done by the gfx card.


                Docs? I suck at writing (laziness kills), don't count on me..


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: KiZ on November 14, 2004, 02:07:12 PM
                Quote from: "adosorken"
                I can probably assist with documentation. Documentation is an obsession for me, kinda like it was for Nazi Germany. :D


                Hell, id have to agree with ya there. I cant stop writing full techincal documentations for silly little programs. Its obsessive for me too :D


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: dilettante on November 14, 2004, 05:26:09 PM
                Quote from: "v3cz0r"
                I don't plan adding any support for COM and ActiveX, for that you must add Variant data types, what means the compiler would be dependent on the Win API (ole32 dll's), and i don't want that, sorry.


                Yes, I avoided the "V" word on purpose.

                Believe me, I understand and support your concerns about portability.  It just about kills the thing for serious adoption on Windows though, nearly everything but base services is ActiveX based.

                I'd love to see it added later, but I imagine it would fork the project pretty seriously if someone were to add it later on.  Too bad it can't be done modularly, like using a sort of ActiveX adapter library.  Impractical without at least simple object support though (oops, the "O" word now).

                Please understand I'm not criticizing, just trying to think aloud where the community can hear me.  Personally I'd love a compiler like this that could generate native OpenBSD executables.  The OBSD world seriously lacks a tool like this and has to fall back on clunky ports and emulation layers.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: relsoft on November 15, 2004, 04:30:23 AM
                Joe, Dark and Aetherfox:

                Got the idea from this:

                http://www.gaffer.org/java/rose.html

                Don't know his exact equations though, but I can see its just 3dlines on planes rotated together and additive blended. So I worked my own from there. :*)

                Joe: Re: DW3, I will answer that come QBexpress, if you could wait. As if you haven't waited for like and eternity. :*)

                Let's see if PTC is fast enough to do an optimized, raytracer...


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Marcade on November 15, 2004, 09:02:57 AM
                Quote from: "relsoft"
                Joe, Dark and Aetherfox:

                Got the idea from this:

                http://www.gaffer.org/java/rose.html

                Don't know his exact equations though, but I can see its just 3dlines on planes rotated together and additive blended. So I worked my own from there. :*)

                Joe: Re: DW3, I will answer that come QBexpress, if you could wait. As if you haven't waited for like and eternity. :*)

                Let's see if PTC is fast enough to do an optimized, raytracer...


                That's one darn pretty rose.

                From what I can see it, it's a simple cube circling around in the middle with that additive blending and then slowly moving outwards.

                Very pretty.

                /edit

                Crap I just figured out you can move all the cubes from that java rose with your mouse.  :o


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: aetherfox on November 15, 2004, 09:45:43 AM
                Woah!

                This kind of stuff confuses me.

                Rel, send me an email on avinashvora at gmail dot com when and if you decide to write some tutorials on this, I would greatly appreciate it.

                That rose thing looks awesomely sexy.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Marcade on November 15, 2004, 04:13:52 PM
                Blah. I tried to recreate that rose effect in QB in Screen 13.

                I created (well ripped) a 3D turning cube from some where. I created an anti-aliased line routine using wuline specifications .. I created that the cube grows and whatever .. I even created that pixels on the screen fade out ..

                .. but I still don't get the nice effect the original has; it looks like crap.

                Spent hours trying to figure out how to get it as pretty but darned it just won't work nice ..

                 :evil:  :evil:


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: ShadowWolf on November 15, 2004, 06:25:55 PM
                yo after this compiler is done what improvment to code generation by the compiler could be done ???


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 16, 2004, 02:24:01 AM
                Well, it's open source, so really "anything you want", maybe with the exception of packaging porn or viruses.  I mean, you could still do that but it's discouraged.

                But on a more serious note, I'm positive there are optimizations to be made.  I mean, it's a fairly new compiler, about 3 times as fast as VBDOS in the compiler program benchmark, which is currently the only existing FB benchmark (;)).


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: dilettante on November 16, 2004, 03:03:09 AM
                Almost certainly a lame comment, but...

                Is it going to be worth checking out on all the various Win32 OSs at some point, both NT and 9x?


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: ShadowWolf on November 16, 2004, 01:41:53 PM
                I was thinking more along the lines of what Optimzation stuff has already been add and what does the Compiler leands it self to for other optimzation tecniques like Interprocedural Analysis or Function inlining.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Blitz on November 16, 2004, 02:47:50 PM
                None, it's not a optimising compiler. But it generates good code. So it beats amny other basic compilers, such as powerbasic for one. And if he ever finished the DAG module then it will remove redudant instructions which will make it more effecient. It will also do strength reduction i guess.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: ShadowWolf on November 16, 2004, 03:03:19 PM
                no i mean how easly does the compilers source code leand to adding things like Interprocedural Analysis , Function inlining, or Complex Branch Optimization.  what i mean to add somthing like this would it mean reworking half the compiler or could these things be done modularly to the intermided language


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: relsoft on November 17, 2004, 04:41:14 AM
                v3cz0r!!!! Pat yourself on the back!!!!

                I just was able to get PTC to work with MingW and FB goes in toe to toe with it in terms of speed. And that's with Memset for clearing the buffer.

                In fact I can't notice much speed difference on full screen vsynch off, on this 233mhz comp. Kudos my friend!!!!

                BTW, you got mail. Reports, etc.

                Marcade & Aetherfox:

                http://rel.betterwebber.com/junk.php?id=25

                That's another one in CPP.

                You have to pass the points to the sine functions inside the loop to produce this fx. I don't know about the rose though...


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Blitz on November 17, 2004, 10:26:28 AM
                It has a full compiler pipeline. lexer -> parser -> AST -> intermediate code -> basic blocks -> machine code.

                Between the basic block stage and machince code, a lot of higher level optimisation could be done pretty easly. Adding a DAG will do a huge difference, then once could also add flow graphs for loop optimisations and such. That's where the best optimisation can be done.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: ShadowWolf on November 21, 2004, 01:40:35 AM
                over a week and no news on the compiler. oh well


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 21, 2004, 01:51:00 AM
                If he spent all day posting news about it, he'd never get the thing coded. :D Let the man work! :D :D


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: v3cz0r on November 21, 2004, 03:08:37 AM
                Quote from: "ShadowWolf"
                over a week and no news on the compiler. oh well



                Eh? Did you check the other topics on this forum? I doubt it..


                Compiler development is going fine, but i need some time, i can't code that fast.. maybe til the end of this month there will be the release, no promises this time, sorry.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: aetherfox on November 22, 2004, 02:43:39 PM
                This isn't some puny minigame that it's going to be speedily completed.

                Teams of programmers spend months if not years developing compilers...and here we have one guy doing a momumental effort as a lone wolf.

                For how far he's gotten in such a short time?  He deserves a cookie.  I mean it's as fast as MingW...it's as simple as QB...it's as portable as...well, a bag...and nearing the power of C.  This stuff doesn't happen overnight.  There are loads of people here shitting their pants everyday that this compiler doesn't have a public release.

                vic, did I mention I love you :P.

                PS: I'm going to kick some serious ass if anyone makes a gay joke.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 22, 2004, 04:23:09 PM
                So, anyways, two bikers walk into a bar, and one turns to the other...

                oh... wait, nm...


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: DrV on November 22, 2004, 08:32:14 PM
                freeBASIC?!?! w000000t!

                I'd be glad to help with writing almost anything...  I'm hopefully getting broadband inet in a few days, so maybe I'll be on more often.  I can hack C, BASIC, and x86 ASM.  I'll prolly do a Linux port if no one beats me to it (and if I can get my stinkin' Linux partition to boot...  the hdd with the bootloader crashed:()

                I'm going to try to convince everyone to write portable code if possible... use wrappers for OS-specific functions and use the rtlib whenever possible... please!  Hopefully this language can start out clean and weed out all this darn platform-specific stuff.


                For the ASM generation, note that in Win32 when calling DLL procs (including those in system libs like kernel32, etc.) you can speed things up by using 'CALL [__imp__MessageBoxA@0]' instead of 'CALL _MessageBoxA@0'.  If you use the latter, the linker will just insert code like this:
                Code:
                _MessageBoxA@0:
                jmp [__imp__MessageBoxA@0]



                Oh... can't forget my obligatory English usage correction:
                Quote from: "barok"
                whoah... this is SO awesome!!!  You have my full support v3cz0r!  It looks totally sweet.  Rock on!  I'll wait for the release with baited breath!  (I baited mine with cookies.)


                No, no, you're waiting with _bated_ breath.  :P


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 22, 2004, 08:55:37 PM
                write the ide plz, uh and have fun porting it hehe...


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: barok on November 22, 2004, 09:44:45 PM
                Quote from: "DrV"

                No, no, you're waiting with _bated_ breath.  :P


                Bah, what's it to you? ;)  

                Actually, i've only heard that saying: i've never seen it written on paper.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Z!re on November 22, 2004, 11:14:44 PM
                So, what does bated mean anyways?...


                Did you know?: this topic has over 5000views... forum record?


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: relsoft on November 23, 2004, 12:15:51 AM
                Oh, it's gonna get bigget once Mr. Chinchilla releases the Compiler.  A dedicated IDE would also be cool.

                Nek? Anyone up for it?


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Fling-master on November 23, 2004, 01:07:41 AM
                I would volunteer as I've done some stuff with IDE's in the past, but I'm swamped with projects at the moment... I think aetherfox has expressed some interest in it though... he keeps asking stuff about the IDE so I get the impression he's just itching to do it. :P


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: barok on November 23, 2004, 01:16:02 AM
                Quote from: "Fling-master"
                I would volunteer as I've done some stuff with IDE's in the past, but I'm swamped with projects at the moment... I think aetherfox has expressed some interest in it though... he keeps asking stuff about the IDE so I get the impression he's just itching to do it. :P


                is that your way of saying that you won't do it? ;)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: ShadowWolf on November 23, 2004, 01:27:55 AM
                IS Masm32 Editor opensource if it is use that it's pretty clean looking and i would guss would be easy to convert over for FB but then again i have no idea what i'm talking about.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Fling-master on November 23, 2004, 02:12:33 AM
                Quote from: "barok"
                is that your way of saying that you won't do it? ;)

                I though I was pretty clear in saying that I wasn't going to do it lol. I was just suggesting something. ;)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: barok on November 23, 2004, 02:15:35 AM
                heh... you were clear, but i wasn't.  I meant "does this mean your too lazy to do it?"  except i wasn't clear.  :lol:


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 23, 2004, 02:35:16 AM
                I'll be more than willing to work with someone on an IDE for this. I can't think of anyone better than aetherFox, frankly. Whaddya think, aeth?

                ShadowWolf: which masm32? the old Microsoft one (not opensource, and did it even have an IDE?) or the newer masm32 (opensource but no "standard" IDE)?


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Plasma on November 23, 2004, 03:01:49 AM
                There is no "opensource" MASM. MASM32 is just Microsoft's MASM with a bunch of extra stuff included.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 23, 2004, 05:33:13 AM
                if you can download it somewhere for free it's open source hehe...


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: urger on November 23, 2004, 11:25:56 AM
                Quote
                if you can download it somewhere for free it's open source hehe...


                No....That just makes it free software.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 23, 2004, 11:58:15 AM
                ow... smartass :)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: ShadowWolf on November 23, 2004, 01:41:27 PM
                http://www.masm32.com/mlicence.htm

                this licencing says masm32 is freeware

                http://www.masm32.com/masmmyth.htm


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 23, 2004, 03:43:34 PM
                freeware isn't open source.  You can't do jack diddly with a binary, unless you want to deal with disassembled code, which is harder than making a new one.

                MASM itself is open source.  But does that include an IDE?


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: ShadowWolf on November 23, 2004, 03:57:08 PM
                i didn't say the ide was open source i said if it was open source why not convert it. also doesn't hurt to send a email to ask right.

                or you could rip the editor stly it self.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 23, 2004, 04:46:47 PM
                Why bother? It makes more sense to create a new one specifically for this. Otherwise, you have to spend extra time learning the existing system, making tremendous changes to suit the needs of a completely different system, etc etc etc. It's far more work than its worth, and the end result is often quite lackluster anyways.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Plasma on November 23, 2004, 05:33:06 PM
                Quote from: "Jofers"
                freeware isn't open source.  You can't do jack diddly with a binary, unless you want to deal with disassembled code, which is harder than making a new one.

                MASM itself is open source.  But does that include an IDE?


                MASM is not open source.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: dilettante on November 23, 2004, 08:49:24 PM
                I Don't Know's on third.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: dilettante on November 23, 2004, 08:55:42 PM
                Quote from: "Z!re"
                So, what does bated mean anyways?...


                Did you know?: this topic has over 5000views... forum record?


                A form of unaspirated "abated," from 'bated.  "Bated breath" means "holding my breath."

                Did you know there is NO such expression as "honing in" either?

                It's HOMING in, as in seeking a beacon, as in homing pigeons heading home, etc.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 23, 2004, 09:43:15 PM
                Quote from: "Plasma"
                MASM is not open source.

                Yes, m'am.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: aetherfox on November 24, 2004, 05:24:19 PM
                Well, about the IDE.

                I really don't mind doing it, even though I'm the IDE designer of the QuickerBasic project, I'd be happy to help on this.  Nek, yeah thats awesome, we'll start it.

                I'm assuming VB6.  I have VB2005, and frankly, I'm hugely disappointed.  I won't be using it.  The only good thing is the sexy IDE.  The language has gone to the dogs.  Namespaces? Encapsulation? OOP? Completely new keywords and stuff? System.class? AAARRRGGGHHH.  VB lost it's simplicity, and so it lost it's charm, IMHO.  VB6 for me.

                Anyway, even if I wanted to, VB.NET is a new language to learn, and that will take a lot of time.  The VB6 project converter with the beta version of vb2005 is real dodgy, nothing apart from horribly simple stuff works for me.

                Vic, have you created anything in the compiler to help it interface with the IDE?  I have never ever coded debugging into an IDE, I don't really know how to approach it, and I hope Nek, with his exp. from QBDS knows.  As far as syntax highlighting goes, thats easy peasy, and with some effort I could design something plugin, ie, the syntax is not hard-coded.  Kind of like ConText's system.

                Can't think of anything else to say.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 25, 2004, 09:01:48 AM
                I sorta agree with the VB2005 thing, and frankly, it actually makes no sense to code something in VB2005 since it's expireware anyways and the .net framework you need for it is beta code. And yeah...the newer .net VB has really gone in a different direction and it really is learning a whole new language. I dunno about anyone else here, but I don't have that kind of time. VB6 would work out fine, nothing beats VB for GUI applications.

                As far as the editor window, have no fear. :) Even though syntax highlighting is very easy, I have an even easier way of doing it, which I used in both QuickPower and OBDS. The only thing with OBDS is that the whole thing was integrated to the extreme, so the editor, compiler, and debugger were all in the same EXE.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: VonGodric on November 26, 2004, 12:11:35 AM
                The ide would be great, but it doesn't matter in what it is done, though I'd personally prefere some more portable language then VB. Btw does FB support also "default arguments" in function/sub declaration list? like you can do in c++?

                void blabla(int x, int i=10, float=12.0); ?


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: v3cz0r on November 26, 2004, 12:40:19 AM
                Quote
                Btw does FB support also "default arguments" in function/sub declaration list? like you can do in c++?

                void blabla(int x, int i=10, float=12.0); ?


                It does since last week, for numeric values (int or fpoint), sub blablah( byval x as integer, byval i as integer = 10, byval f as single = 12.0 ), sub can be called as: blablah x, blablah x, y, blablah x, , z, blablah x, y, z


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 26, 2004, 02:12:18 AM
                Quote from: "VonGodric"
                though I'd personally prefere some more portable language then VB

                When VB comes out for Linux...oh wait, that's never going to happen. :D

                And anyways, it's being developed for Windows first, so might as well take advantage. Later on, perhaps the same IDE can be developed using the KDE toolkit or something like Qt3.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: VonGodric on November 26, 2004, 06:30:17 AM
                Note: I don't know what I'm talking about...

                But dev-cpp (so is dev-pascal) is open source and as a editor, it is very good. Maybe it'be possible to modify the source(with permitions from developers) to support FB syntax?

                Though the damn thing is done is Delphi and I personlally don't know anything about it. After all why to reinvent the wheel?


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 26, 2004, 06:58:02 AM
                Quote from: "adosorken"
                Quote from: "VonGodric"
                though I'd personally prefere some more portable language then VB

                When VB comes out for Linux...oh wait, that's never going to happen. :D


                no? have a look at mono...


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: aetherfox on November 26, 2004, 08:49:29 AM
                What? what's mono?

                94% of people use Windows as their operating system (or something like that.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: wildcard on November 26, 2004, 09:19:00 AM
                Quote from: "aetherfox"
                What? what's mono?

                94% of people use Windows as their operating system (or something like that.


                I'm guessing its http://www.mono-project.com/about/index.html.

                Nice stat but not really a reason to not allow for non windows development. If you are going to write an IDE might as well write it in FB and then it will be as portable as FB..


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 26, 2004, 09:24:15 AM
                fb is not portable, there's not a single basic compiler for linux that could translate fb, so that's a big problem, the only thing that might work is to rewrite the runtimelib (altough most of it is from the clib) and then compile the asm file that's produced on win on linux. maybe that will work, but it will be a pain i guess...

                edit: me stupid that's what i could do... check for a linux port of fb hehe...


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: na_th_an on November 26, 2004, 11:36:19 AM
                aetherFox: That's what I meant when I was talking about the portability of VB.NET. It is a bummer learning new stuff, but as I told you, if you know how to code OO it is just the same but with VB syntax. The .NET stuff will be runable on almost every OS very soon, so I'd go for VB.NET (I'm not saying VB 2005, but VB7, the prev. version). The newest version of many famous commercial programs are now running in the .NET framework, guess why.

                Also, I would like to talk about the future. Note what a pain in the ass is for us QBers to realize that our games don't work on most computers 'cause DOS16 is a dead and unsupported platform. DOS32 died recently. WIN16 died even before DOS16 did, WIN32 will die as well. You better use the .NET framework, that way you are sure that new CPUs and new OSs will run it. At least for longer than WIN32 code.

                I think that there's a point which makes Linux and Unix based OSs strong: you know that you will be able to compile your own code for every new version and target every supported processor. That doesn't happen with VB6.

                VB6 is fabulous if you have to code a visual program FAST, the results are great, stable and easy to manage, but note that WIN32 will not last forever. And your VB6 code will be uncompilable in the future.

                We don't want a forum 10 years in the future where the general claim is "someone writes a VB-compatible compiler for 128 bits micros!" :D


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 26, 2004, 12:35:01 PM
                It is wiser to start with what is currently supported. Whatever happens in the future isn't going to do us any good in the present. It makes no sense to code something that is designed for the future if it cannot be used effectively today. People with low-end computers are going to have a hard time running a .net-based IDE. It's no secret that you need a modern computer to run .net applications properly. So while Win32 is the dominant platform, it makes the most sense to stick with it for now. When things change, we'll accomodate said changes. But until then, it's not worth it. I don't know about the rest of you, but my time is extremely limited and I have to make the most of it, so I'm going to code in what works now rather than what is predicted to work later.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: VonGodric on November 26, 2004, 12:45:17 PM
                and in 20 yeras: someone please write a VB.net compotable compiler and parser...


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: aetherfox on November 26, 2004, 12:54:34 PM
                I have to agree with Nek.  While I agree with your point and we have had this conversation in detail before, I would still push for VB6, Nath.  The reason is simply as Nek stated it: time.  All of us have real lives, and not enough of us know VB.NET.  Now while in the future I want to be accustomed to it, at the moment, I simply do not have to time.  Hence it's not a matter of how useful the IDE will be two years down the road, the matter is how useful making the IDE will be now.

                VB8 comes with a VB6 project converted.  While (at least insofar for me) it's not that great in it's beta stage, I have no doubt it will be worked upon.  Rewriting a project for VB.NET shouldn't then be too hard a task.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 26, 2004, 02:22:41 PM
                Quote from: "aetherfox"
                VB8 comes with a VB6 project converted.  While (at least insofar for me) it's not that great in it's beta stage, I have no doubt it will be worked upon.  Rewriting a project for VB.NET shouldn't then be too hard a task.

                Even as such, I found that it does a pretty good job, converting roughly 80% of a project on average (this is based on converting about 25 of my own projects). So it's definately got some ability, and it can only improve. :D


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: na_th_an on November 26, 2004, 03:18:03 PM
                Well, I was just stating my point. At college the taught us that it's better thinking in the future rather than thinking in the past. But we can't fight against little spare time.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 26, 2004, 03:51:28 PM
                doing it the way ado wants it to be... hm that's how you create bad software. i wonder why everybody wants to use vb. isn't there any alternative? like say c/c++, there's plenty of gui editors for various gui libraries including the vc buildin mfc editor (which is of course tedious to use and pretty crappy). doing it fast != doing it well


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 26, 2004, 04:23:50 PM
                Nice flamebait attempt, marzecTM. Too bad I ain't fallin' for it.

                If you feel you can do a better job in C++, then by all means, what do us experienced VB coders know...feel free, go right ahead and try. We'll see you in 2008 when you've reached beta status. :rotfl:

                na_th_an: it's always wise to plan for the future, which is exactly what we're doing anyways. No one's got any guarantee that mingw is going to be around forever or will update with the changes to Windows, but we DO know that Microsoft's compilers always stay with their operating systems, so writing this in VB6 and then porting it to VB.NET later will be a sure thing. But for the time being, .net is still in its infancy and Win32 will be supported for at least the next 5 years, as consumer-level 64-bit processors are still also in their infancy...and those that exist have "legacy" support for 32 bit applications anyways. :D

                Doing it fast != doing it well.
                Doing it right = doing it right.
                Doing it fast has nothing to do with either doing it well or doing it right. Just because C++ coders take three years to make a proper app doesn't mean us VB coders have to take the same amount of time. You can deal with the miniscule low-level crap like setting up a window, constructing/deconstructing objects, and manually handling messages...the rest of us will let the compiler handle the grunt work while we build the application itself. :P

                OH marzecTM, one last thing...the next time you insult my abilities, I may just get offended. :P


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 26, 2004, 05:04:42 PM
                all i wanted to say is that coding an app the fastest and most comfortable way possible results most often in a bad piece of software, this was neither an attack on you or your abilities nor was it meant to harm any vb coder. i find it funny that if one mentions c/c++ in front of a vb coder he/she instantaniously feels like having to say that c/c++ is crap and one needs at least 10 man years to develop a full application. what a piece of crap... but hey feel  free to feel offended...


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 26, 2004, 05:12:20 PM
                I find it funny that one mention of someone writing software in VB to a C++ coder prompts them to whine about how bad the software is going to end up being. :D Besides, I never said anything about C++ being crap. It has its place, as does every language. GUI applications are just where C++ has to take a back seat to VB, and everyone knows it, even if they don't want to admit it.

                On a side-note...the language one is most comfortable with is the language in which they write the BEST software, not the worst. I have no idea how you came up with the idea that writing a program in one's most comfortable language would somehow make it bad, when common sense says otherwise. :???:

                And PS: don't take what I say too harshly, as I'm probably a little edgy right now. Rhiannon and I are both very sick so my patience is pretty thin right now. :D


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: na_th_an on November 26, 2004, 05:19:21 PM
                There is some kind of VB hating community which I don't understand. VB is the best compiler for GUI applications. And you can make a lot with it. That VB is simple and almost everyone can code shit on it doesn't make everyone code shit on it. Talented programmers can create great programs using any compiler. VB is no exception. Then only difference I can see between coding the IDE in VB and C++ is that you take 10 times less in VB, as long as you are a great coder. And Nek & Aetherfox know what they have between their hands.

                The first version of FB was coded in VBDOS. That comes to show that it's not the tools, it's the artist what matters ;)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 26, 2004, 05:38:58 PM
                The same kind of thing exists everywhere. In the indie RPG communities, there is great hatred for creators who use RPG makers like RM2K3 rather than actually coding their own RPG. In RPG Maker communities, there is great hatred for RPG Maker users who use default resources rather than either making or ripping other's work off, and there's a LOT of hatred in RM2K circles for the default combat system...all the "elites" think people should spend countless months developing a proprietary "events" system (which is completely unexpandable and exceptionally difficult to debug). PASCAL zealots hate the C communities but laugh at the BASIC communities, C communities hate the BASIC communities but see the PASCAL communities as something of patronized children (and thus inferior to themselves), BASIC communities hate the C communities but get on the good side of ASM communities because they know that most their languages are slow, ASM communities just hate everybody but themselves, and since they have no rivals, they fight amongst each other.

                It's just plain and simple human nature I suppose. But as I've been saying for years...the compiler is immaterial...it's what the coder can do with the compiler that makes the difference.

                Oh, I almost forgot...Conservatives hate the Liberals because Liberals believe that self-responsibility is better and Conservatives believe in total and absolute external control, and Liberals hate the Conservatives because the Conservatives are simply wrong. :D


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: dilettante on November 26, 2004, 07:30:02 PM
                I'd vote for VB6 for many of the reasons expressed.

                Heck, I use it for plenty of non-GUI applications as well, from CGI EXEs to compiler front-ends to data cleansing filters.  So I'm plenty biased, sue me!

                I'm more concerned about the ability to port FB to non-Windows platforms.  Ouch,  I thought that was the main reason FB's Noble Creator (no, that's not sarcasm, quite the contrary) was sacrificing ActiveX and other Windows productivity technologies.

                Maybe the answer would be to take some halfway decent existing U/Li/BSD-nix Basic compiler and construct an intermediate "bootstrapping" compiler comparable to the PDS/VBDOS level?

                Of course you have to worry about the myriad executable formats in the *nix world too...

                Portability continues to be a be-atch as you start thinking it through.


                You know, everyone pisses and moans about Windows and VB6, but look at the range of years worth of systems from Win95 to Me and NT 4.0 to Server 2003 I can deploy my VB6 code to without recompilation.  There's some real stability here, matched and exceeded only by DOS I suspect.  Thank you Raymond Chen http://www.joelonsoftware.com/articles/APIWar.html http://weblogs.asp.net/oldnewthing/ and company.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 26, 2004, 07:46:45 PM
                XP presents a few minor problems with VB6, but most of which can easily be solved with the latest VS service pack. The only problem I've yet to see go away is in regards to VB's resource editor...VB application resources in XP get mangled and thrown around like rag dolls. I've had to rewrite portions of some of my games because of it. However, for this type of thing, such problems aren't an issue...it's not like this would use any of the techniques I used in the games I wrote back in the heyday of Windows 98. :D

                When it comes to Linux though, I'm up for assisting IDE development as well, as I'm somewhat familiar with a few GUI toolkits in Linux. The only thing I can't really stand about Linux development (I can list things all day about things I hate in Linux in general) is the lack of consistency. Hell, the *nix world is a trough of inconsistency. I've been hoping for an easy-to-use Linux compiler for ages now, but since one's never appeared, I've pretty much told *nix to go screw itself. If freeBASIC is eventually ported to *nix, then not only will I personally embrace *nix and begin the long process of bringing more decent apps to the *nix world, but I'll convince others to do the same. :D

                In the meantime though...let's kick ass in Windows. :D


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 27, 2004, 12:20:19 AM
                Quote from: "dilettante"

                I'm more concerned about the ability to port FB to non-Windows platforms.  Ouch,  I thought that was the main reason FB's Noble Creator (no, that's not sarcasm, quite the contrary) was sacrificing ActiveX and other Windows productivity technologies.

                Maybe the answer would be to take some halfway decent existing U/Li/BSD-nix Basic compiler and construct an intermediate "bootstrapping" compiler comparable to the PDS/VBDOS level?

                Of course you have to worry about the myriad executable formats in the *nix world too...

                Portability continues to be a be-atch as you start thinking it through.


                porting fb to linux should be pretty "easy", you just need to do the following:

                * compile fb on win32, and grab the asm files
                * rewrite the win32 portions of fb's runtimelib for linux and compile
                * assemble and link the files from win32 (asm)  with the fb rtl and some additional stuff like the clib on linux, there you go

                about that myriads of executable formats, there's really just 2-3 that are used today, in fact it's only one that dominates the linux world called ELF. so i really don't see a problem at that point.

                btw, v1c hand over the asm files and the fbrtl source code so i can port that crap to linux heh...


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: dilettante on November 27, 2004, 02:32:42 AM
                Yeah, I see even OpenBSD supports ELF now (as of 3.4 I think) so that's no problem.  It's the most conservative of the BSDs so pretty much all of them must have it.

                Gee, if you're gonna hack the asm source that's fine.  But then I assume FB will recompile itself for the final cut, which means changing the compiler (in FB) to generate the proper OBJs for the target platform.

                I guess one could build *nix FBs in FB on Windows given a cross-linker, or would you just compile on Win32 and then link over on the target *nix?


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: relsoft on November 27, 2004, 04:26:57 AM
                Quote from: "marzecTM"
                doing it the way ado wants it to be... hm that's how you create bad software. i wonder why everybody wants to use vb. isn't there any alternative? like say c/c++, there's plenty of gui editors for various gui libraries including the vc buildin mfc editor (which is of course tedious to use and pretty crappy). doing it fast != doing it well

                wxwidgets for Dev CPP. Never tested it but it seems to have lots of users.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: aetherfox on November 27, 2004, 10:03:28 AM
                Rel: I tried that program, it didn't work for me, but it's got a heck of a following...people seem to think it can beat every other GUI driven program (VB, Delphi etc).

                The VB/C++ argument: Look, I've said this already...me (and every VB programmer I know, Nek included) DONT HATE C/C++.  Quite the opposite.  C is possibly one of the most powerful languages designed, but that doesnt mean its good at everything.  Stop being so full of yourself and wake the fuck up.  VB was designed to make GUI applications.  The only reason it was written is to make GUI coding less of a pain because its a fxcking pain in C.

                And for your information, it's actually the C community that bitch at VB: "Urr you aren't uberhax0r like me! I is teh k1ng w1th teh 1337 sk1lls at C."

                As for portability of the IDE: f uck it.  I could not give less of a shit.  If you want to write one for Linux, thats absolutely dandy, but I couldn't care less.  Stop tormenting us with all this crap about that it won't work on Linux, because I don't care.  I'm not going to partake in any project thats going to sacrifice functionality to please a few crying dodderheads.

                And on the subject of portability, I don't think its wise to pester Vic with a trivial issue like that now.  Let it get stable and completely functional and backed on Windows, then think about other platforms.

                Footnotes:
                This is NOT flaming.  You'd know if I was flaming.
                Nek semi-apologized about his bluntness.  I don't.  This whole thing is getting annoying.  You are a big boy, you can hold the tears in.

                I am NOT a Linux hater.  Not even close.  I have lots of problems with the OS, but I support the cause.  I better not get crap for this.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Z!re on November 27, 2004, 10:11:25 AM
                I agree fully...

                Theres nothing i hate more then C coders who go:
                "But it's better, cause it's portable" (Insert OMG, WTF, LOL, various 1337speak, and random bullshit)

                I just wanna stab them with a blunt spoon...


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 27, 2004, 10:21:05 AM
                Agreed, aeth. I don't hate C/C++, I use it virtually every day as it is. What I hate is the C/C++ community, in their never-ending arrogance and blatant egocentricism.

                For the IDE: I said it from the beginning that it's better to take advantage of the Windows platform, since it's what we're all starting with. Also, doing it quickly can only be an advantage...it would be great to have a working IDE ready to go when v1ctor's ready for the official release. I don't forsee any real difficulties with the IDE with the exception of an integrated debugger. The rest is easy street. :D


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 27, 2004, 10:50:06 AM
                then i'd say start coding and stop flaming eh?

                incredible how poor selfconfidence you got, all i was pointing out is that it may be hard to port, period. nothing else, i didn't say vb is crap nor did i say basic coders are script kiddies or something like that, so plz shut the fuck up now and start coding...

                edit: in fact i even pointed out that you could port it to linux when written with vb.net... strange you are


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 27, 2004, 11:53:29 AM
                I also mentioned how VB6 can be easily ported to VB.NET. :P Thusly, said VB.NET port could later be ported to Linux through the .net implementation there.

                However, you did mention that my strategy was "how bad programs are written", which was pretty lame on your part. :P Perhaps if you thought about it for a moment rather than jumping down my throat the first mention of VB you saw, you would have understood that we're already thinking of the future and potentially porting this sucka over to linux at a later time. I think your first assumption of a VB coder IS "skript kiddiez", and you know what assuming does, right? :D Try to see things from their own vantage point rather than a single point...it'll get you much further in life. :D

                Now shut the fuck up yourself and get back to coding, beotch! :D :D I already started on my part anyways...


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 27, 2004, 12:33:24 PM
                ow, as i stated about 2 million times earlier, i was not bitching about vb but about rapid software developement. most often rapid developement produces bad software, cause the design phases are to short, the design revision phases are to short, and most of the time is spent on the implementation hacking togheter something "that just works, but nobody knows how and why". an ide is not a small project, so it definetly needs design if you want to manage it easily later on. that was my whole point. no word against vb, no word against vb coders. and i really don't care what you assume i assume....


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: aetherfox on November 27, 2004, 12:33:42 PM
                Argh fuck why is there a swear filter?  It completely takes away what I want to put across.

                Simply put marzec or whatever you name is, you have got to make a serious check on what you think about us.  After having the audacity to blatantly give us shit about being script kiddies, you tell US to...START CODING?

                ARE YOU F U CKING OUT OF YOUR MIND?

                And what the hell is this shit about self confidence?  And that horrific grammar and spelling.

                Somebody please, slap him.

                Nek, I agree, doing it fast could only be good.  In fact, I would go so far as to say, initially, sacrifice deep functionality just to get a bare-bones working IDE ready for Vic's release.  I doubt that will happen, but yeah.

                Admins my apologies I got out of hand but he definately deserved that.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 27, 2004, 12:35:23 PM
                ow, as i stated about 2 million times earlier, i was not bitching about vb but about rapid software developement. most often rapid developement produces bad software, cause the design phases are to short, the design revision phases are to short, and most of the time is spent on the implementation hacking togheter something "that just works, but nobody knows how and why". an ide is not a small project, so it definetly needs design if you want to manage it easily later on. that was my whole point. no word against vb, no word against vb coders. and i really don't care what you assume i assume.... and stop that smilie war.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 27, 2004, 12:47:18 PM
                Quote from: "marzecTM"
                an ide is not a small project, so it definetly needs design if you want to manage it easily later on. that was my whole point.

                I know. I've done it twice already. It's probably the most complex program I've ever developed (save for, perhaps, the httpd or the IM daemons I've coded in the past). Point taken, but already understood. Next time though, try to be a bit more choosey with your words. It's easy to offend people on the Internet, because no one can really tell the intention of your message.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: dilettante on November 27, 2004, 01:47:43 PM
                I hope Mr. Vic doesn't let all of our BSing distract him too much.

                It's his project and his goals, and all I really hope for is a snappy 32-bit QB clone that runs under Windows.

                Anything past that is gravy, I can live with Notepad or something marginally better if I have to.  Heck, I write VB6 using Notepad and a "make" utility for some non-GUI projects.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Blitz on November 27, 2004, 02:11:43 PM
                Th compiler is already fully functional.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: red_Marvin on November 27, 2004, 03:08:01 PM
                Gentlemen, isn't this project too important for the future of
                QB programming to start arguing about the IDE?

                Correct me if I'm wrong, but is'nt the IDE the thing that lets you
                load/save/edit the source and sen the right parameters to the
                compiler?

                Then there could be more than one IDE developed x in VB and
                y in C/C++. Heck, if anyone feels like it one in asm or COBOL!

                Can the participants of argument agree on this:
                Each programming language has its own uses.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 27, 2004, 03:13:06 PM
                We've finished arguing now. :D


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 27, 2004, 07:06:02 PM
                Awesome.  I'll intervine.

                I'm a little weary of people who are saying things like "This is beacon of a new age in qb programming!  FB is the future of things to come in all flavors programming!!  FB heralds a new dawn of humanity, with Saint Victor as our Savior and light, for your is the power and the glory of the lord."  

                Come on, guys, it's just a compiler A damned cool feat for one guy, but I'm taking a shot for every time some guy feels the need to publically associtate Victor with "the future", don't kill me here :)

                Aaaanyway, I have .NET but I don't have vb6.  That's probably a problem if I want to pitch in code here and there (not now of course, but probably in a month or two when my load lightens up and I can get some stuff in on qb45).  Is VB4 completely out of the question?  I don't even have the free one on nate's site, I have a legally purchased cd from a shrinkwrapped, store-bought edition of it :D, the first one for win95.  I'm too lazy to pirate, it's too much clicking and leaving your computer on and virus cleaning.

                I gots marzec 100% on the rapid software thing, just to pitch in and fuel the flames


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: dilettante on November 27, 2004, 07:37:09 PM
                A lot changed from VB4 to VB5.  A bit more did from VB5 to VB6.

                VB2 and VB4 are the only ones I've never used.  Maybe somebody else can chime in and say whether VB4 is good as a "target" language for an IDE.  The biggest issue may be using some sort of OCX beyond a textbox or RichEdit control for the main editing "canvas."  I'm pretty sure VB4 can use OCXs in 32-bit mode.

                I'm not sure about tools to back-port project, form, bas, etc. files though.

                You have the same issues with ".Net" of course:  Which .Net?

                Maybe the initial goal should be a quick IDE thrown together in VB6 or something, followed by a port to FB, followed by enhancements?

                The porting would be a pain though, having to build GUI elements with stone knives and bearskins.  There is a reason why ActiveX (and the VBX component model before it) became so popular.  FB will be more like coding in C (er, or QB).  :wink:


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 27, 2004, 08:48:53 PM
                on porting/doing the ide in fb: well yeah it will be a pain in the ass as it is like doing it in plain c without any editor etc. but i thing in the future on of the biggest library needs for fb would be a gui library that comes with a codegenerating editor but that's future talk.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 27, 2004, 11:31:35 PM
                Well, with the addition of function pointers working with structures it becomes a lot easier to make a GUI library (or port an existing one).  It wouldn't be truly convenient without objects, though, as windows-based programming tends to be.  But at least with function pointers you can make event handling a little more usable.

                But porting from vb?  Naah.  It'd be easier to port from C or Java or Delphi or the like.  But what about some of the other procedural basics?  Like Blitz, Pure and PowerBasic.  And yes, I'm aware of the fact that those cost money, I'm brainstorming :)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: relsoft on November 28, 2004, 12:23:19 AM
                Quote from: "dilettante"
                I hope Mr. Vic doesn't let all of our BSing distract him too much.

                It's his project and his goals, and all I really hope for is a snappy 32-bit QB clone that runs under Windows.

                Anything past that is gravy, I can live with Notepad or something marginally better if I have to.  Heck, I write VB6 using Notepad and a "make" utility for some non-GUI projects.


                The compiler can make a real 3d game already. :*)

                v1c is working like crazy to make it noob friendly.  That is prolly the reason you don't see him often here.

                It's like:

                *rel gets a new ver
                *3 days after, v1c implements about 30 new kewords
                *rel reports bugs
                *v1c replys he has already implemented it.

                If that ain't fast, I don't know what fast it.

                BTW, never use notepad to code in FB. FB's error report would put in the line number and col number where the error occurs.

                I use Context as it allows me to have function keys.  Say if I wan't to run I'd just press F10, compile and run = F9, etc.  It's just like the QB ide.  It also defaults its highlighter to VB on BAS files but you can make your own highlighter for FB if you want.

                For the IDE, unless it would be freakin' slow on my 233, I'd go with VB.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: ShadowWolf on November 28, 2004, 03:44:41 AM
                rel so what's keeping FB 32bit version from compiling it self ?


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Dr_Davenstein on November 28, 2004, 04:28:49 AM
                Sorry, but probably us humans!  :lol:


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on November 28, 2004, 06:06:59 AM
                the 32-bit version can compile itself since 2 weeks now iirc, the thing is that there's some minor bugs that need to be fixed and as there's a new bug every day it's kind of tedious he..


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: aetherfox on November 28, 2004, 09:46:09 AM
                Whoever said that the IDE is not important or insignificant is terribly wrong.

                Would you code VB in a notepad? (i know someone said that, but thats retarded dude :P)  The IDE is the single most important thing aside from a functional compiler, and I think maybe just as important.  Without a functional IDE, your whole idea of making it newbie friendly has just been shat on.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Marcade on November 28, 2004, 10:56:07 AM
                I think if someone makes a (good) IDE in VB it will never be ported to FB .. No need for it then .. ?


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: v3cz0r on November 28, 2004, 11:10:02 AM
                Quote from: "ShadowWolf"
                rel so what's keeping FB 32bit version from compiling it self ?


                Eh? Read the other topics: http://forum.qbasicnews.com/viewtopic.php?t=7260

                Compiler can't be compiled with any other BASIC than itself, due the size and the new statements/functions used (Enum's, Union's, pointers, etc).


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: ShadowWolf on November 28, 2004, 08:09:33 PM
                hmm i wonder why i never saw that post. oh well


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 28, 2004, 11:36:48 PM
                Unless FB is going to handle GUI elements sometime soon, I don't think that making the IDE itself in FB is a very wise idea. Sure, you can make a RHIDE wanabe or something that resembles the original QB IDE, but it's going to take you ages to accomplish and it's probably gonna be supbar anyways. :D

                Jofers, I can send you a burned copy of VB6 if you'd like.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Hard Rock on November 28, 2004, 11:46:03 PM
                Quote

                If you feel you can do a better job in C++, then by all means, what do us experienced VB coders know...feel free, go right ahead and try. We'll see you in 2008 when you've reached beta status

                Im sure if someones wanted to they  could knock up a C++ IDE in 2 weeks. Basically Notepad with syntax highlighting and a compile button.... and some other sutff. Without much work.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: oracle on November 29, 2004, 01:04:55 AM
                Wow guys, I step out for three weeks and look at what happens ;)

                Best of luck to this project. If it is needed, someone could send me a copy to test on a variety of Linux boxes.

                See you guys around ;)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Nexinarus on November 29, 2004, 02:51:38 AM
                Quote from: "adosorken"
                Unless FB is going to handle GUI elements sometime soon, I don't think that making the IDE itself in FB is a very wise idea. Sure, you can make a RHIDE wanabe or something that resembles the original QB IDE, but it's going to take you ages to accomplish and it's probably gonna be supbar anyways. :D


                Oh emacs, so fun.

                Anyways Winapi is alreayd supported with FB so GUI app's can be created. Only other GUI lib's I know of are gtk and wxWidgets.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 29, 2004, 03:08:30 AM
                WinAPI is supported, of course, but like in C it's a pain in the butt.  So would Qt or wxWidgets even work?  Never used them, but they're C++ libs, no mention of support for C, and objects in the examples.

                Hmm... If you can create a set of GUI routines in a separate custom, focused lib, you can always port that separately from the program.

                So that the program could do something like this:

                winHandle = createWindow(width, height, etc)
                radioHandle = addItem(winHandle, Gui.RADIO, "Hi", 10, 10)
                setEvent radioHandle, Gui.CLICK, myfunction

                I don't know.  I like that interface for GUIs.  I'm also a Javascript whore.  But whatever.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: aetherfox on November 29, 2004, 03:47:19 PM
                An IDE is more than just Notepad with syntax highlighting.

                What about interfacing with the compiler for debugging/syntax checking?
                What about having an in-built line by line syntax checker, ala qbide?
                What about having options for the compiler and having an excellent frontend?
                What about having formatting options?
                What about having shortcuts and macros? (like type _sc_Line to get ------------------------- or whatever)
                What about having an MDI? (I hate this, but people have some fetish with it).

                Thats what I could come up as fast as I typed that.  There's plenty more.

                I'm not going to rejoin the language argument.  Me and Nek have decided to go VB6, and therefore it really doesnt matter what anyone else has to say about that.

                However, it will be fairly inconvenient if Nek changes on me :P


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 29, 2004, 04:05:33 PM
                Um, yeah, we know that.  I'm not even involved that much, but for the record, "Well, I and this guy are using this, so you can **** yourself" is a rather poor way to approach a group project, and really, if you want to go it alone or solely with Nek, I'd recommend someone else pick it up in the platform of choice and have a sort of friendly ide race.

                It'd be nice if everyone could relax for a second, and pretend this IDE, or the language, api and platform used isn't as important as you'd guess from this thread.  If there's a split on using fb, c, or vb, there's nothing stopping anyone from using all three and comparing when they're finished... hobbies are like that.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: adosorken on November 29, 2004, 04:31:43 PM
                There is no platform of choice. Everyone's got their own idea as to what to use.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 29, 2004, 04:42:22 PM
                Right.  If you want to make an IDE in C, make it in C.  If you want to team up with someone doing it in VB, do that.  But stop sitting here fighting over it.  All possible thoughts have been expressed.

                Van Godric's already started one in C++.  It's really primitive.  I guess now would be as fine a time any for people to either:

                1) announce a project
                2) sign up for one.

                Nek and AetherFox apparently have started one in VB.  Van Godric in C++.  Shoot.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: relsoft on November 30, 2004, 04:17:37 AM
                Quote from: "adosorkenJofers, I can send you a burned copy of VB6 if you'd like.[/quote


                Rel needs as burned copy of MSVC. :*)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: aetherfox on November 30, 2004, 03:25:52 PM
                Rel: If you have learned C++ in the newer format (compulsory namespaces etc) then head over to lab.msdn.microsoft.com and download the Beta 1 of MSVC2005 for absolutely nothing.  I haven't been able to get it to compile older compliant code, but maybe I didn't look hard enough.  It's very nice interface-wise.  And its free...

                Have you tried Dev-C++?  Bloodshed released a beta version of Dev-C++ 5.  I like it...
                I have MSVC6 on my Visual Studio 6 CD, but I don't know how I could just take that out of the entire installation...what kind of connection are you on?

                Jofers: What I was going to say is meaningless, you contradicted yourself enough to validate my point.  I guess I should be saying thanks...but no.

                Nek: Email me or something, you haven't been on MSN while I'm on.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on November 30, 2004, 04:21:58 PM
                Yeah, I can see where I misinterpreted it.  I've been posting here on breaks from my work, and I've been pretty tired lately.  At the time I thought you were blowing somebody off for suggesting c++, so I suggested that he start his own project.  Goes to show what 3 hours of sleep a night brings you.  I didn't contradict myself though, and I've never actually understood how such an act proves anything, so... no.

                I think I heard rel mention using mingw and conTEXT for c++ stuff.  *shrug*  I'm not really sure where you can get it from.  I only have Studio too.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: relsoft on December 01, 2004, 03:03:00 AM
                Aeth:

                http://rel.betterwebber.com/junk.php?id=25
                http://rel.betterwebber.com/junk.php?id=26

                Both are made in MingW / Devc++

                As to the Microsoft distributed MSVC pack, It won't install on my system. It says error installing .Net.  That's why I had to use MingW.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: aetherfox on December 01, 2004, 06:55:26 AM
                Rel:

                The reason you are getting an error for .NET is because MS Visual Studio 2005 runs on .NET 2.0, which is still currently in beta stages, so Windows Update won't download it for you.  You have to download it separately from the Microsoft site.  It's a fairly hefty download, but it works fine and it hasn't screwed my system up or anything...

                Jofers:

                From what I read of the end of your post, you said you dont understand how contradiction validates the opposing point...is that what you meant?  Contradiction is kind of the last thing you want to do when debating over something...

                Anyhow, is there any news on the size of the runtime lib, if any?


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on December 01, 2004, 08:07:20 AM
                Contradiction messes up your argument.  It doesn't make your opponent's any more valid.  I'm still not sure what the debate was, though.

                ...

                ...So, anyways, while the circumcision of puppies does constitute important theological tradition, it's unscrupulous nature makes it a bygone of modern civilization.  You're just wrong, man.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: aetherfox on December 01, 2004, 05:25:35 PM
                :|  Thats gotta be your new low...how could you talk about puppies like that?

                F uc ker.  You should be sent to hell for that.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Z!re on December 01, 2004, 07:07:33 PM
                Am I the only one who don't have a f'ing clue about whats going on?



                 :???:


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: barok on December 01, 2004, 07:31:59 PM
                people!  If you two insist on fighting, do it right.... in a ring with gloves.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: marzecTM on December 01, 2004, 11:36:00 PM
                nice thread 40% language bashin...


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on December 02, 2004, 04:41:18 AM
                I can sink lower.  I almost did, but as a human being there are limits to throwing curveballs.  I probably crossed it too, that was edited from a most definately more unpleasant form of the act.

                So Victor, your real name is Andre?  By calling you v1c all the time, have I been doing the equivalent of calling a Tim Johnson "John"?


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: relsoft on December 02, 2004, 04:49:18 AM
                It his Surname I guess. :*)


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Jofers on December 02, 2004, 04:57:33 AM
                I suppose, 'Lo.


                Title: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: aetherfox on December 02, 2004, 05:30:29 AM
                Chuckles.

                I was joking in my last couple of posts.

                When the webmaster of the official site gets some free time, I think that the entire repository of examples should definately go up there.


                Title: Re: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: TheAdventMaster on August 17, 2007, 01:15:57 PM
                F*** awesome.


                Title: Re: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Radical Raccoon on August 17, 2007, 02:32:52 PM
                ...three years later.


                Title: Re: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: anarky on September 05, 2007, 10:36:24 PM
                It his Surname I guess. :*)

                It is, I believe. hence the email, av1ctor...


                Title: Re: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: DrV on September 06, 2007, 12:10:56 PM
                Welcome again to three years ago...  :-\


                Title: Re: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: Dr_Davenstein on September 06, 2007, 10:38:09 PM
                Yeah! Thanks Pritchard!  :D


                Title: Re: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: BadMrBox on September 07, 2007, 02:09:15 PM
                Let's do the timewarp again! ::)


                Title: Re: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
                Post by: bush2 on May 31, 2009, 07:37:07 AM
                As far as i've seen, it's pretty much as functional as qb. But much better.