Search found 80 matches
- Mon Jul 06, 2020 1:55 pm
- Forum: Coding Questions
- Topic: Passing buffers & pointers between procedures
- Replies: 4
- Views: 931
Re: Passing buffers & pointers between procedures
Never mind that I don't know what the hell I am doing.....In the below procedure, I am doing a few things I need to do and filling the contents of *FileBuffer with the data from a photo off disk. I want this *FileBuffer to be available to my general save routine that saves more than just this buffe...
- Sat Jul 04, 2020 7:58 am
- Forum: Coding Questions
- Topic: Pointer to map element????
- Replies: 22
- Views: 2668
Re: Pointer to map element????
I like the pointer list idea, only added a 'stack'. -snip- [/code] it is exacly what i need :D I only add function Procedure.i ReturnElement(id) With range_mapper ForEach *range_task() If *range_task()\id = id \ptr(\count+1) = *range_task() DeleteElement(*range_task(),1) \count + 1 EndIf Next EndWi...
- Fri Jul 03, 2020 8:53 pm
- Forum: Coding Questions
- Topic: Pointer to map element????
- Replies: 22
- Views: 2668
Re: Pointer to map element????
I grew up in the era of sinclair zx spectrum where every byte and every tick of the processor mattered. That's why I want the programs to be as fast as possible. :) I couldn't afford it. It was only enough for a sinclair ZX81 with 1kB memory. It's still lying around somewhere. I was have all serise...
- Fri Jul 03, 2020 8:11 pm
- Forum: Coding Questions
- Topic: Pointer to map element????
- Replies: 22
- Views: 2668
Re: Pointer to map element????
Maybe it would be better to use something like a tree instead of a map or a list. Or a sqlite memory database. If you want to stick with your map, you could speed up the code from your first post by using some assembly. I don't know how important it is that things are really random. If you have 1 m...
- Fri Jul 03, 2020 8:02 pm
- Forum: Coding Questions
- Topic: Pointer to map element????
- Replies: 22
- Views: 2668
Re: Pointer to map element????
I have a small question. Is the map growing during the processing of differdnt sub-ranges or only shrinking? map is not growing on the contrary, map decreases with each completed job. once subrange scanned by client server remove map element from map and select new random number in range 0:mapsize(...
- Fri Jul 03, 2020 7:14 pm
- Forum: Coding Questions
- Topic: Pointer to map element????
- Replies: 22
- Views: 2668
Re: Pointer to map element????
Hum... You do not need a map for these tasks. A map will be useful for the last 10% staying to be treated. guys I am realy grateful to you for the solutions! let me try again first to explain the gist. We have a huge range. 1 client cannot solve such a range in a short time. Therefore, we divide th...
- Fri Jul 03, 2020 5:28 pm
- Forum: Coding Questions
- Topic: Pointer to map element????
- Replies: 22
- Views: 2668
Re: Pointer to map element????
I mean what kind of key to get the the map element. Like range("key") In this case "key" is the key. Are you using one of your hash values as a key ? key is just integer. 0,1,2,3.. and so on For ex at the beggining map has key 0,1,2,3,4,5,6,7,8,9 random number for ex 6, Server g...
- Fri Jul 03, 2020 5:20 pm
- Forum: Coding Questions
- Topic: Pointer to map element????
- Replies: 22
- Views: 2668
Re: Pointer to map element????
@Etayson, what kind of map keys are you using ? Hi, Willbert. Structure RangeStructure rb$ re$ isScan.b isBuzzy.b EndStructure Define NewMap range.RangeStructure(4096) The point of this map is give to clients random selected subranges (rb$,re$) When client scan this subranges he send to server answ...
- Fri Jul 03, 2020 4:57 pm
- Forum: Coding Questions
- Topic: Pointer to map element????
- Replies: 22
- Views: 2668
Re: Pointer to map element????
Hello, -snip- Hello, Olli. Due to map element deleted from map when i use algorithm above i need reindex array again after deleting element. Deleting elements need to select element only from elements that is not using yet. So i can`t keep already used element in map. When you have map 1000 0000 el...
- Fri Jul 03, 2020 4:40 pm
- Forum: Coding Questions
- Topic: Pointer to map element????
- Replies: 22
- Views: 2668
Re: Pointer to map element????
Example with Index -snip- [/code] Many thanks, but there is one thing about which I forgot to write: In general, all this is necessary to randomly select ranges .. as soon as a range is selected, this element is removed from the map. And again, a random element selected from the map and so on.. In ...
- Fri Jul 03, 2020 3:53 pm
- Forum: Coding Questions
- Topic: Pointer to map element????
- Replies: 22
- Views: 2668
Pointer to map element????
Hi, guys. Is there any way to get a pointer to the desired map element? Something similar to ChangeCurrentElement() What i mean. For ex. i have a map range() with 1000 000 elements (map has structure). i need in random way select element. For ex. currandnumber = 9872 Now i do like this: currandnumbe...
- Fri Jul 03, 2020 2:25 pm
- Forum: Assembly and C Programming in PureBasic
- Topic: secp256k1 elliptic curve functions
- Replies: 10
- Views: 11176
Re: secp256k1 elliptic curve functions
i was test a lot of public keys hashed by your hash function and result allways correct! Thanks again, Willbert!wilbert wrote:Glad to hear it is working for you
- Thu Jul 02, 2020 4:47 pm
- Forum: Assembly and C Programming in PureBasic
- Topic: secp256k1 elliptic curve functions
- Replies: 10
- Views: 11176
Re: secp256k1 elliptic curve functions
As i know need only RIPEMD-160 version. http://forums.purebasic.com/english/viewtopic.php?f=12&t=75640 Willbert, you are genius! I convert tested public key 0250863ad64a87ae8a2fe83c1af1a8403cb53f53e486d8511dad8a04887e5b2352 to address with your RIPEMD-160 hash function and result correct 1PMyca...
- Tue Jun 30, 2020 11:41 am
- Forum: Assembly and C Programming in PureBasic
- Topic: secp256k1 elliptic curve functions
- Replies: 10
- Views: 11176
Re: secp256k1 elliptic curve functions
You are right nobody didn`t yet implement RIPEMD-160 on PB. As i know need only RIPEMD-160 version. I'll try if I can create an asm implementation. That would be great. Thanks Wilbert! In this case, it will be possible to get the bitcoin address from the public key. And using sha3-256 Kessak, respe...
- Tue Jun 30, 2020 7:54 am
- Forum: Assembly and C Programming in PureBasic
- Topic: secp256k1 elliptic curve functions
- Replies: 10
- Views: 11176
Re: secp256k1 elliptic curve functions
If @Wilbert could write a library for the RIPEMD-160, that would be great. Hasn't anyone already implemented this ? RIPEMD-160 doesn't seem very complicated. RIPEMD160-MAC seems a bit more complicated. Are both required ? hi, Wilbert. You are right nobody didn`t yet implement RIPEMD-160 on PB. As i...