Search found 30 matches
- Sat Oct 11, 2025 11:29 pm
- Forum: Feature Requests and Wishlists
- Topic: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries
- Replies: 17
- Views: 2544
Re: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries
You can use #PB_Event_FirstCustomValue only once. That's clear.
But you can do something like that:
; You can use this in each file:
CompilerIf Not Defined(CustomEvents, #PB_Enumeration)
Enumeration CustomEvents #PB_Event_FirstCustomValue
EndEnumeration
CompilerEndIf
; You can use the ...
- Fri Oct 10, 2025 6:20 pm
- Forum: Feature Requests and Wishlists
- Topic: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries
- Replies: 17
- Views: 2544
Re: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries
The issue with needing unique events is that it needs a unified approach. Because different hypothetical libraries assumed they were the only ones running they did not provide a way for other code to know what events were used. They could of provided a parameter to there own routines that ...
- Fri Oct 10, 2025 3:20 pm
- Forum: Feature Requests and Wishlists
- Topic: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries
- Replies: 17
- Views: 2544
Re: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries
There must be a reason why this question raises up from time to time by new users (including me some years ago). And also, why after explaining the way it is done now is questioned.
I'm actually a long-time user, though I'm not very active on the forum.
The reason is that this problem still hasn ...
I'm actually a long-time user, though I'm not very active on the forum.
The reason is that this problem still hasn ...
- Thu Oct 09, 2025 6:29 pm
- Forum: Feature Requests and Wishlists
- Topic: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries
- Replies: 17
- Views: 2544
Re: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries
Why not just modify each library to use a named enumeration in a common module?
Everything else that had been suggested tries to avoid modifying the libraries to be consistent. I think that is a recipe for disaster. Why not just fix the inconsistencies where they occur?
What catastrophe are ...
- Thu Oct 09, 2025 7:01 am
- Forum: Feature Requests and Wishlists
- Topic: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries
- Replies: 17
- Views: 2544
Re: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries
Here's a simple and simplified demonstration that this can be done at the compiler level:
#RegExp = 0
CreateRegularExpression(#RegExp, "\h*(\#?\w+)|(?:\r\n|$)" )
Global NewMap Compile_Constant()
Compile_Constant( LCase("#PB_Event_FirstCustomValue") ) = 65536
Global CompileCode$ = "Enumeration ...
#RegExp = 0
CreateRegularExpression(#RegExp, "\h*(\#?\w+)|(?:\r\n|$)" )
Global NewMap Compile_Constant()
Compile_Constant( LCase("#PB_Event_FirstCustomValue") ) = 65536
Global CompileCode$ = "Enumeration ...
- Thu Oct 09, 2025 6:23 am
- Forum: Feature Requests and Wishlists
- Topic: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries
- Replies: 17
- Views: 2544
Re: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries
The compiler would only need to redefine the constant at EndEnumeration so that #PB_Event_FirstCustomValue increments by #PB_Compiler_EnumerationValue it's an easy fix
Enumeration #PB_Event_FirstCustomValue
#Library1_Event1
#Library1_Event2
#Library1_Event3
EndEnumeration
Enumeration #PB ...
- Thu Oct 09, 2025 4:11 am
- Forum: Feature Requests and Wishlists
- Topic: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries
- Replies: 17
- Views: 2544
Re: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries
It's how you would do it in the compiler so that the constant increments automatically.
#pb_compiler_Enumeration increments as enums are added so you can do the same to the include files to resolve the issue via find and replace where ever #pb_event_first_customvalue is
#PB_Compiler ...
- Thu Oct 09, 2025 1:20 am
- Forum: Feature Requests and Wishlists
- Topic: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries
- Replies: 17
- Views: 2544
Re: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries
there is #PB_Compiler_EnumerationValue so that could be used like this, assuming your compiling the libs or modules
Enumeration #PB_Event_FirstCustomValue ; the first time this combination is called #PB_Event_FirstCustomValue = 65536
#Library1_Event1
#Library1_Event2
#Library1_Event3 ...
- Wed Oct 08, 2025 4:14 pm
- Forum: Feature Requests and Wishlists
- Topic: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries
- Replies: 17
- Views: 2544
Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries
Hello! Is there any solution to eliminate conflicts between custom events in different independent libraries?
The authors of various libraries cannot know which libraries the final application developer will use in their product. Therefore, using #PB_Event_FirstCustomValue in a library's ...
The authors of various libraries cannot know which libraries the final application developer will use in their product. Therefore, using #PB_Event_FirstCustomValue in a library's ...
- Sun May 25, 2025 8:27 pm
- Forum: Applications - Feedback and Discussion
- Topic: Radix Tree algorithm
- Replies: 2
- Views: 3295
Re: Radix Tree algorithm
Very useful, it's short and readable (except the Russian comments, for me).Somehow the UTF8 BOM is missing in the version that I downloaded directly from github, I had to manually select UTF8 in the IDE, and then to copy & paste the raw version manually into the editor. Because it would be ...
- Sat May 17, 2025 9:43 pm
- Forum: Applications - Feedback and Discussion
- Topic: Radix Tree algorithm
- Replies: 2
- Views: 3295
Radix Tree algorithm
Once I needed the implementation of the Radix Tree algorithm, but I did not find it under a free license, so I wrote my own option. This is absolutely free, do everything you want with him.
Github link: https://github.com/webarion/RadixTree
Github link: https://github.com/webarion/RadixTree
- Thu Jan 16, 2025 9:18 am
- Forum: General Discussion
- Topic: RadixTree license from IDE
- Replies: 16
- Views: 8285
Re: RadixTree license from IDE
Then the result of squint3.3.pbi is different from the rest:
113930 keys in squint3.3.pbi
100000 keys in RadixTree.pb
100000 keys in Map
Link to test code: https://drive.google.com/file/d/16kSK7P ... drive_link
- Wed Jan 15, 2025 10:22 pm
- Forum: General Discussion
- Topic: RadixTree license from IDE
- Replies: 16
- Views: 8285
Re: RadixTree license from IDE
Do you have a procedure for displaying the number of words recorded? For example, in Map this can be done through MapSize, and RadixTree also has something similar. I didn’t find anything similar with you, maybe I didn’t guess it myself.
- Wed Jan 15, 2025 9:56 pm
- Forum: General Discussion
- Topic: RadixTree license from IDE
- Replies: 16
- Views: 8285
Re: RadixTree license from IDE
Squint will tell you it's allocated size with squint\size()
Thanks for the advice! I'll watch this. But, unfortunately, I don’t yet know how to truly compare the memory occupied by the structures of these three algorithms. Your development has this tool, other versions do not have such a tool ...
- Wed Jan 15, 2025 12:03 pm
- Forum: General Discussion
- Topic: RadixTree license from IDE
- Replies: 16
- Views: 8285
Re: RadixTree license from IDE
I tested three algorithms and got the following result:
; For 100000 words (minimum of 20 tests):
; squint3.3.pbi
; Write Keys, Time: 183ms.
; Read Key, Time: 647ms. (1000000 cicles)
; Memory by resource monitor: 23676Kb (difference before adding and after adding)
; RadixTree.pb
; Write Keys ...
; For 100000 words (minimum of 20 tests):
; squint3.3.pbi
; Write Keys, Time: 183ms.
; Read Key, Time: 647ms. (1000000 cicles)
; Memory by resource monitor: 23676Kb (difference before adding and after adding)
; RadixTree.pb
; Write Keys ...