Yes, this was my fault in answering! The authors of the code for this issue were more accuratecfbsoftware wrote:The correct set range for the 1.6 version of BlackBox is {0..31}. Is that what is supported in this change?Ivan Denisov wrote: contains 122 symbols... it will be reduced to " {1..32}0X"
issue-#27 Adding SET conversion to Strings
-
Ivan Denisov
- Posts: 1704
- Joined: Tue Sep 17, 2013 12:21 am
- Location: Russia
Re: issue-#27 Adding SET conversion to Strings
- Josef Templ
- Posts: 2048
- Joined: Tue Sep 17, 2013 6:50 am
Re: issue-#27 Adding SET conversion to Strings
The discussion seems to be over and the result is stable and unambiguous.
Unless there are any objections I will lock it tomorrow.
- Josef
Unless there are any objections I will lock it tomorrow.
- Josef
Re: issue-#27 Adding SET conversion to Strings
The second entry here offers a link to the test version of blackbox-1.7-a1.059
I compared blackbox-1.7-a1.059 with the privious blackbox-1.7-a1.052
and I relize that the changes
- 20141027, center #24, fixing the name table handling in DevLinker
in Dev/Mod/Linker
and
- 20141027, center #25, fixing a bug in stack overflow handling
in System/Mod/Kernel
are exist in .052 but not in .059
Are change number #24 & #25 canceled and rollback to the original version? Why they are not avaiable in version .059?
I compared blackbox-1.7-a1.059 with the privious blackbox-1.7-a1.052
and I relize that the changes
- 20141027, center #24, fixing the name table handling in DevLinker
in Dev/Mod/Linker
and
- 20141027, center #25, fixing a bug in stack overflow handling
in System/Mod/Kernel
are exist in .052 but not in .059
Are change number #24 & #25 canceled and rollback to the original version? Why they are not avaiable in version .059?
-
Ivan Denisov
- Posts: 1704
- Joined: Tue Sep 17, 2013 12:21 am
- Location: Russia
Re: issue-#27 Adding SET conversion to Strings
Helmut, this branch is made a bit later than this issues were merged with master, so it does not include this changes.
You can see all the history here:
http://redmine.blackboxframework.org/pr ... r_page=100
Also there is 60 test version available already:
http://blackboxframework.org/unstable/i ... a1.060.zip
After merging this 27 branch with the master, this two issues will be united with this version automatically.
You can see all the history here:
http://redmine.blackboxframework.org/pr ... r_page=100
Also there is 60 test version available already:
http://blackboxframework.org/unstable/i ... a1.060.zip
After merging this 27 branch with the master, this two issues will be united with this version automatically.
Re: issue-#27 Adding SET conversion to Strings
I am afraid I have not yet learnt how to use these marvelous development tools (I do not mean this in a sarcastic way),
so could someone tell me how to read the latest proposal for the code for the SetToString function.
I am guessing that the "diff" Ivan posted earlier is now out of date.
Thanks
so could someone tell me how to read the latest proposal for the code for the SetToString function.
I am guessing that the "diff" Ivan posted earlier is now out of date.
Thanks
-
Ivan Denisov
- Posts: 1704
- Joined: Tue Sep 17, 2013 12:21 am
- Location: Russia
Re: issue-#27 Adding SET conversion to Strings
Current diff for all changes in issue #27.Robert wrote:I am afraid I have not yet learnt how to use these marvelous development tools (I do not mean this in a sarcastic way),
so could someone tell me how to read the latest proposal for the code for the SetToString function.
I am guessing that the "diff" Ivan posted earlier is now out of date.
The way to find it:
1. Choose branch in the repository mirror
2. Choose versions to compare
3. Press "View differences" button
Re: issue-#27 Adding SET conversion to Strings
Thanks Ivan
A cheeky optimisation might be to replace MAX(SET) by
Do this outside the loop. Don't worry that it is undefined for empty sets.
On second thoughts, what we already have is simpler!
OK - Lets lock this topic now!
If speed is important replace k + 2 <= MAX(SET) by k <= MAX(SET) - 2 so the subtraction takes place once at compile time rather than several times at run time.Josef Templ wrote:It is a much better formulation because it is faster for small sets ...
A cheeky optimisation might be to replace MAX(SET) by
Code: Select all
PROCEDURE [code] BitScanReverse* (set : SET) : INTEGER
0FH, 0BDH, 0C0H; (* bsr eax -> eax *)On second thoughts, what we already have is simpler!
OK - Lets lock this topic now!
Last edited by Robert on Tue Feb 10, 2015 4:33 pm, edited 1 time in total.
- Josef Templ
- Posts: 2048
- Joined: Tue Sep 17, 2013 6:50 am
Re: issue-#27 Adding SET conversion to Strings
> If speed is important replace k + 2 <= MAX(SET) by k <= MAX(SET) - 2 so the subtraction takes place at compile time rather than run time.
this is a simple and useful optimization. Thanks for the hint.
I have included it in issue-#27.
> A cheeky optimisation might be to replace MAX(SET) by
It is true that some useful bit operations are available at the assembly
language level that are not directly available at the
CP language level. However, I would not go to assembly level for the purpose
of set-to-string conversion unless it turns out to be really necessary.
And in that case a general purpose built-in (or library) function
should be made available for bit scans in both directions.
Currently, set-to-string conversion is a rarely used feature and most
probably not time critical.
- Josef
this is a simple and useful optimization. Thanks for the hint.
I have included it in issue-#27.
> A cheeky optimisation might be to replace MAX(SET) by
It is true that some useful bit operations are available at the assembly
language level that are not directly available at the
CP language level. However, I would not go to assembly level for the purpose
of set-to-string conversion unless it turns out to be really necessary.
And in that case a general purpose built-in (or library) function
should be made available for bit scans in both directions.
Currently, set-to-string conversion is a rarely used feature and most
probably not time critical.
- Josef