Author Topic: FBSL Capabilities  (Read 8602 times)

0 Members and 1 Guest are viewing this topic.

Mike Lobanovsky

  • Guest
Re: FBSL Capabilities
« Reply #15 on: October 14, 2015, 07:47:33 AM »
And Patrice,

... And when i speak about hundred of child controls, i am speaking of hundred of different classes, like: listbox, combo, listview, tab control, marquee, spinner, input field, web field, rtf field, graphic field, OpenGL container, group field, etc. etc. etc.

You're making me feel sorta offended... :) FBSL ain't so simple as it might seem at a first glance. :)

But of course FBSL has its tiny, little, cosy (if a little buggy) MDI visual designer called FMFD and based on ported/enhanced Public Domain code written initially in BCX BASIC, to complement FBSL's default Eclecta IDE (wink-wink John ;) ):



And to tell you more, back at those ancient times when there was no Vista in view yet but only Longhorn, and FBSL didn't know assembly or C jitters and its fastest instrument was CallAbsolute(), I wrote a RAD for it called FBSL Script Factory in FBSL BASIC OOP. It needed only the above visual designer code to be added to it to become a near-perfect VB6 IDE replica. But then some BCX extremists accused me of stealing the visual designer's alleged GNU GPL code, which it of course wasn't, but I grew cold to the whole matter, so that the merger never happened and FSF was abandoned and forgotten:



Below is yet another sample executable that respawns > 4K of various (not all!) sorts of controls on 256 simultaneously visible forms. It uses the following somewhat longer script that's been created with the aid of FMFD visual designer under XP, hence the forms appearing a little smaller under Win 7 than they should have:

Code: OxygenBasic
  1. #Include <Include\Windows.inc>
  2.  
  3. #Define TBS_AUTOTICKS &H1
  4. #Define DTS_LONGDATEFORMAT &H4
  5.  
  6. #Define STC_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP BOr SS_NOTIFY
  7. #Define STC_EXTSTYLE WS_EX_STATICEDGE
  8. #Define CMD_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP BOr BS_DEFPUSHBUTTON
  9. #Define CMD_EXTSTYLE 0
  10. #Define SHP_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP BOr SS_BLACKRECT BOr SS_NOTIFY
  11. #Define SHP_EXTSTYLE WS_EX_TRANSPARENT
  12. #Define CHK_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP BOr BS_AUTOCHECKBOX
  13. #Define CHK_EXTSTYLE 0
  14. #Define OPT_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP BOr BS_AUTORADIOBUTTON
  15. #Define OPT_EXTSTYLE 0
  16. #Define FRM_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP BOr BS_GROUPBOX
  17. #Define FRM_EXTSTYLE WS_EX_TRANSPARENT
  18. #Define CMB_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP BOr CBS_DROPDOWN BOr CBS_HASSTRINGS
  19. #Define CMB_EXTSTYLE 0
  20. #Define LST_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP BOr LBS_NOINTEGRALHEIGHT
  21. #Define LST_EXTSTYLE WS_EX_STATICEDGE
  22. #Define REC_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP BOr ES_MULTILINE BOr ES_AUTOVSCROLL BOr ES_AUTOHSCROLL BOr ES_WANTRETURN
  23. #Define REC_EXTSTYLE WS_EX_STATICEDGE
  24. #Define VSB_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP BOr SBS_VERT
  25. #Define VSB_EXTSTYLE 0
  26. #Define HSB_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP
  27. #Define HSB_EXTSTYLE 0
  28. #Define SLD_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP BOr TBS_AUTOTICKS
  29. #Define SLD_EXTSTYLE 0
  30. #Define TXT_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_VSCROLL BOr WS_HSCROLL BOr WS_TABSTOP BOr ES_MULTILINE BOr ES_AUTOVSCROLL BOr ES_AUTOHSCROLL BOr ES_WANTRETURN
  31. #Define TXT_EXTSTYLE WS_EX_STATICEDGE
  32. #Define PRG_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP
  33. #Define PRG_EXTSTYLE 0
  34. #Define DAT_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP BOr DTS_LONGDATEFORMAT
  35. #Define DAT_EXTSTYLE WS_EX_CLIENTEDGE
  36. #Define UPD_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP
  37. #Define UPD_EXTSTYLE 0
  38.  
  39. Dim hwnds[], i, j, elem
  40.  
  41. Macro ComboAddString(s) = SendMessage(FbslControl, CB_ADDSTRING, 0, s)
  42. Macro ListAddString(s) = SendMessage(FbslControl, LB_ADDSTRING, 0, s)
  43.  
  44. LoadLibrary("riched20.dll")
  45.  
  46. For i = 0 To 255
  47.   hwnds[i] = FbslForm("Form #" & i,,, 535, 400)
  48.   FbslControl("Static", hwnds[i], "Label", 100 * (i + 1) + 1, 7, 15, 161, 41, STC_STYLE, STC_EXTSTYLE)
  49.   FbslControl("Button", hwnds[i], "Command", 100 * (i + 1) + 2, 183, 15, 161, 41, CMD_STYLE, CMD_EXTSTYLE)
  50.   FbslControl("Static", hwnds[i], "Shape", 100 * (i + 1) + 3, 359, 15, 161, 41, SHP_STYLE, SHP_EXTSTYLE)
  51.   FbslControl("Button", hwnds[i], "Check", 100 * (i + 1) + 4, 7, 71, 161, 41, CHK_STYLE, CHK_EXTSTYLE)
  52.   FbslControl("Button", hwnds[i], "Option", 100 * (i + 1) + 5, 183, 71, 161, 41, OPT_STYLE, OPT_EXTSTYLE)
  53.   FbslControl("Button", hwnds[i], "Frame", 100 * (i + 1) + 6, 359, 63, 161, 57, FRM_STYLE, FRM_EXTSTYLE)
  54.   FbslControl("ComboBox", hwnds[i], "", 100 * (i + 1) + 7, 7, 127, 169, 21, CMB_STYLE, CMB_EXTSTYLE)
  55.   ComboAddString("Some")("combobox")("strings")("added")("for")("your")("enjoyment")
  56.   FbslControl("ListBox", hwnds[i], "List", 100 * (i + 1) + 8, 183, 127, 169, 97, LST_STYLE, LST_EXTSTYLE)
  57.   ListAddString("Some")("listbox")("strings")("added")("for")("your")("enjoyment")
  58.   FbslControl("RichEdit20A", hwnds[i], "RichEdit", 100 * (i + 1) + 9, 359, 127, 161, 97, REC_STYLE, REC_EXTSTYLE)
  59.   FbslControl("ScrollBar", hwnds[i], "VScroll", 100 * (i + 1) + 10, 7, 159, 25, 65, VSB_STYLE, VSB_EXTSTYLE)
  60.   FbslControl("ScrollBar", hwnds[i], "HScroll", 100 * (i + 1) + 11, 39, 199, 137, 25, HSB_STYLE, HSB_EXTSTYLE)
  61.   FbslControl("msctls_trackbar32", hwnds[i], "", 100 * (i + 1) + 12, 7, 239, 169, 33, SLD_STYLE, SLD_EXTSTYLE)
  62.   FbslControl("Edit", hwnds[i], "Text", 100 * (i + 1) + 13, 183, 239, 169, 41, TXT_STYLE, TXT_EXTSTYLE)
  63.   FbslControl("msctls_progress32", hwnds[i], "", 100 * (i + 1) + 14, 359, 239, 161, 41, PRG_STYLE, PRG_EXTSTYLE)
  64.   SendMessage(FbslControl, PBM_SETPOS, 33, 0)
  65.   FbslControl("SysDateTimePick32", hwnds[i], "", 100 * (i + 1) + 15, 15, 295, 161, 65, DAT_STYLE, DAT_EXTSTYLE)
  66.   FbslControl("msctls_updown32", hwnds[i], "", 100 * (i + 1) + 16, 183, 295, 337, 65, UPD_STYLE, UPD_EXTSTYLE)
  67.   FbslControl("Static", hwnds[i], "This area has been intentionally left blank :)", 100 * (i + 1) + 17, 205, 295, 315, 65, STC_STYLE, STC_EXTSTYLE)
  68. Next
  69.  
  70. For Each elem In hwnds
  71.   Show(elem)
  72.   DoEvents
  73. Next
  74.  
  75. Begin Events
  76.   If CBMSG = WM_CLOSE Then
  77.     ExitProgram(0)
  78.   End If
  79. End Events

[attachment deleted by admin]

Aurel

  • Guest
Re: FBSL Capabilities
« Reply #16 on: October 14, 2015, 08:25:12 AM »
I know somethig about FBSL and i can say that is really very good...
BUT one thing i dont get it ..how is possible or why thinBasic is much
popular than FBSL?  even is not better from my point of view.

Patrice Terrier

  • Guest
Re: FBSL Capabilities
« Reply #17 on: October 14, 2015, 09:04:49 AM »
ThinBasic, while having a much larger audience will also never attract the professionnal market.

The only p-code generator i know, that is used by more than hundred thousands programmers and running in many well known large companies world-wide is WinDev.

Perhaps, because of their young nice looking programming team (see the attached pictures) :o

...



[attachment deleted by admin]

Mike Lobanovsky

  • Guest
Re: FBSL Capabilities
« Reply #18 on: October 14, 2015, 09:21:49 AM »
Hi Aurel,

Probably FBSL never enjoyed  strategically planned publicity as an outwardly marketable product. Since v3 emerged, we had a few organizations that've been using it in-house, and we still have a couple of them that keep on generating a small but steady income for the devs. Otherwise, even though FBSL has been free for all to use for personal and educational purposes including teaching for a fee, its use in commercial environments was expressly forbidden unless licensed. Not so now; you can use v3.5 for any purpose, hehe, including virus writing but totally at your own risk without our commitment to improve the language or rescue your business. :)

In contrast to that, thinBasic has been free for any use from its very start though it remains completely closed-source just like us. Now that it also enjoys Charles' brilliant OxygenBasic add-on, thinBasic is a really, really cool product and its Tiobe share is Eros' and Charles' well-deserved reward. It is also an appreciation of late BZ' indirect contrib to the common cause of thinBasic's emergence. :)

Mike Lobanovsky

  • Guest
Re: FBSL Capabilities
« Reply #19 on: October 14, 2015, 09:53:26 AM »
Patrice,

Java is a byte-code (a.k.a. p-code in Windows parlance) compiler, JavaScript is a direct line-by-line interpreter with transparent JIT compilation possibilities in some extensions, just like Eros' thinBasic coupled with Charles' O2 extension.

Bare Lua is IIRC a byte-code compiler too. LuaJIT is a JIT compiler to native machine code with occasional fallbacks to byte-code interpretation.

FBSL BASIC is currently a byte-code compiler with fallback to direct interpretation in loop frame code (like e.g. For i = 0 To 255 Step 4) while its DynC and DynAsm are 100% JIT compilers to native machine code.

OxygenBasic is a 100% JIT and static machine code compiler.
« Last Edit: October 14, 2015, 10:00:41 AM by Mike Lobanovsky »

Patrice Terrier

  • Guest
Re: FBSL Capabilities
« Reply #20 on: October 14, 2015, 10:25:31 AM »
No need to argue, facts are speaking by themselves.  8)

...

Mike Lobanovsky

  • Guest
Re: FBSL Capabilities
« Reply #21 on: October 14, 2015, 10:43:05 AM »
But I'm not arguing at all! :D

I'm argumenting my POV with October 2015 Tiobe data which clearly shows that these days the total of interpreters and jitters in the world's top 10 preferred PLs outweighs the total of preferred static compilers (C++ included) by a significant amount of pro's. 8)

JRS

  • Guest
Re: FBSL Capabilities
« Reply #22 on: October 14, 2015, 12:56:38 PM »
Quote
Indeed i think i am more of a perfectionist.

And a damn good one at that.  8)
I recommend you for graphics to all my client/friends.