-
Sep 4th, 2023, 07:18 PM
#1721
Re: TwinBasic
1) Yes, it has been lifted, along with most other similar limits.
2) There's a lot of bugs with running, especially when running them in 64bit VBA, and Property Pages aren't supported for in-project UCs (.tbcontrol, same as .ctl, as opposed to ocx)
3) The Printer object is completely unimplemented at this point, but it's an announced feature for v1, so can be expected very likely before the end of the year. If you want to print, you'll need a solution such as BSPrinter (has been tested to work in tB according to their page), or doing it manually through Windows APIs/COM interfaces.
4) Collection performance blows VB6 out of the water on most operations, some being thousands of times faster, and matches it on the rest. And this is without compiler optimization (early tests of that show it beating VB6, but it can't optimization code with classes/objects yet)
5) Lines of code themselves aren't a limitation... my ucShellBrowse control works perfectly, for instance, and that's 50k lines with a dependency on tbShellLib, my oleexp replacement that's also covering large swathes of the Windows API base, clocking in at 167k lines, nearly every one going into the global namespace. But larger projects do raise the odds something in it will be unimplemented or hit a bug (of which there are still quite a few, being in beta and all).
Check out these Collection benchmarks Wayne posted in the Discord channel:

removal all items via index position (backwards, sequential), 60000 items. 2607ms 1ms
removal all items via index position (random), 60000 items. 2270ms 43ms
(the last two couldn't fit on my screen for the screenshot)
Last edited by fafalone; Sep 4th, 2023 at 07:42 PM.
-
Sep 5th, 2023, 03:15 AM
#1722
Re: TwinBasic
There's something wrong with the VB6.Col For Each test...
...which traditionally works pretty fast (as the test below shows, when enumerating 1Mio entries)
Code:
Private Sub Form_Click()
Cls
Dim i As Long, Col As New Collection, T, V
T = Timer: i = 0
For i = 1 To 10 ^ 6
Col.Add i
Next
Print "Col Add:", CLng((Timer - T) * 1000) & "msec"
T = Timer: i = 0
For Each V In Col
i = i + 1: If i <> V Then Stop
Next
Print "For Each:", CLng((Timer - T) * 1000) & "msec"
End Sub
Olaf
-
Sep 5th, 2023, 04:30 AM
#1723
Addicted Member
Re: TwinBasic
 Originally Posted by fafalone
1) Yes, it has been lifted, along with most other similar limits.
2) There's a lot of bugs with running, especially when running them in 64bit VBA, and Property Pages aren't supported for in-project UCs (.tbcontrol, same as .ctl, as opposed to ocx)
3) The Printer object is completely unimplemented at this point, but it's an announced feature for v1, so can be expected very likely before the end of the year. If you want to print, you'll need a solution such as BSPrinter (has been tested to work in tB according to their page), or doing it manually through Windows APIs/COM interfaces.
4) Collection performance blows VB6 out of the water on most operations, some being thousands of times faster, and matches it on the rest. And this is without compiler optimization (early tests of that show it beating VB6, but it can't optimization code with classes/objects yet)
5) Lines of code themselves aren't a limitation... my ucShellBrowse control works perfectly, for instance, and that's 50k lines with a dependency on tbShellLib, my oleexp replacement that's also covering large swathes of the Windows API base, clocking in at 167k lines, nearly every one going into the global namespace. But larger projects do raise the odds something in it will be unimplemented or hit a bug (of which there are still quite a few, being in beta and all).
Check out these Collection benchmarks Wayne posted in the Discord channel:
removal all items via index position (backwards, sequential), 60000 items. 2607ms 1ms
removal all items via index position (random), 60000 items. 2270ms 43ms
(the last two couldn't fit on my screen for the screenshot)
Thanks for the info fafalone, really helpful! I'm getting more and more anxious to try this, and your answers on points 1 and 2 are a great help for some design decisions I have to take now.
-
Sep 5th, 2023, 05:24 AM
#1724
Re: TwinBasic
 Originally Posted by Schmidt
There's something wrong with the VB6.Col For Each test...
...which traditionally works pretty fast (as the test below shows, when enumerating 1Mio entries)
Code:
Private Sub Form_Click()
Cls
Dim i As Long, Col As New Collection, T, V
T = Timer: i = 0
For i = 1 To 10 ^ 6
Col.Add i
Next
Print "Col Add:", CLng((Timer - T) * 1000) & "msec"
T = Timer: i = 0
For Each V In Col
i = i + 1: If i <> V Then Stop
Next
Print "For Each:", CLng((Timer - T) * 1000) & "msec"
End Sub
Olaf
Well spotted. Indeed, there was a copy-paste bug in the for-each test causing the results to also be affected by the cost of forward-index retrieval. After fixing the bug, the VB6 and tB versions of that test now look to perform similarly.
-
Sep 5th, 2023, 11:22 AM
#1725
Re: TwinBasic
 Originally Posted by Erwin69
Thanks for the info fafalone, really helpful! I'm getting more and more anxious to try this, and your answers on points 1 and 2 are a great help for some design decisions I have to take now.
For number 2, Property Pages for UCs are also planned for V1 so aren't too far off, and I'm sure much work will go into fixing all the major bugs before then too.
-
Sep 5th, 2023, 11:45 AM
#1726
Addicted Member
Re: TwinBasic
 Originally Posted by fafalone
For number 2, Property Pages for UCs are also planned for V1 so aren't too far off, and I'm sure much work will go into fixing all the major bugs before then too.
Well, I'm still some way off that 256 controls limit, but to avoid potential problems going forward, I was considering a redesign of part of the UI by combining a number of controls (treeview, listview, label, combo, splitter bar, frame, picturebox) into a UC, which then could be repeated a number of times. (Think of the app having several tabs with a similar view on each tab, but covering different topics.) But if I can avoid spending time on that, I have more time for other things that increase functionality.
-
Sep 11th, 2023, 02:05 AM
#1727
Re: twinBASIC programming
twinBASIC status update:
twinBASIC Update: September 10, 2023
Highlights include a global search IDE addin sample, addin extensibility access to the filesystem, and a discussion about inheritance in twinBASIC.
nolongerset.com/twinbasic-update-september-10-2023
-
Sep 14th, 2023, 03:40 AM
#1728
Re: TwinBasic
 Originally Posted by Erwin69
Well, I'm still some way off that 256 controls limit
I hit that limit regularly. Creating controls arrays of all the labels normally gives me sufficient space but it is another good reason to migrate to TB.
PS. At this point in the conversation, Niya would normally appear.
https://github.com/yereverluvinunclebert
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
-
Sep 14th, 2023, 02:06 PM
#1729
Re: TwinBASIC programming
 Originally Posted by VB6 Programming
This is an interesting picture, where BASIC was everything at Microsoft, and now almost everything doesn't exist, one by one being abandoned.
BASIC FOR DOS
qbasic
vb6
vba
vb.net
ACCESS VB
asp
-
Sep 17th, 2023, 05:50 AM
#1730
Re: TwinBasic
Find details of the latest twinBASIC releases at...
twinBASIC-programming-Beta-releases
-
Sep 18th, 2023, 03:45 AM
#1731
Re: twinBASIC programming
twinBASIC status update:
twinBASIC Update: September 17, 2023
Highlights include inline editor widget support for tB IDE addins, a sample TODO addin, keyboard shortcut registration, and a preview of a UserControl Builder addin.
nolongerset.com/twinbasic-update-september-17-2023
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|