HandleVars == BJ ?

--Thanatos--

New Member
Reaction score
33
It's so damn short. >_>
So I guess we can replace GetHandleInt and etc with it's main use, isn't it ?
 

Waaaaagh

I lost all my rep and my title being a jerk
Reaction score
70
Umm... sure. I mean, I write my own functions... yes. I don't use handle attaching, just id storing. Just store H2! on the handle, and then write a function to get exactly what you stored (that's how I do it). I have a weird method I guess...

JASS:
...
call StoreInteger(GameCache(),I2S(H2I(timer)),"Unit1",H2I(unit))
...

function T_Unit1 takes timer t returns unit
    local integer i=GetStoredInteger(GameCache(),I2S(H2I(t)),"Unit1")
    if(i!=0)then
        return i
    endif
    return null
endfunction
 

Cohadar

master of fugue
Reaction score
209
So many hacks just to avoid my Ultra-Giga-Mega-Uber system
that does not have that "Unit1" issue.

EDIT:

also

I2S() equals:
Code:
for i=0 to NumberOfDigits
    tmpstring(i) = number mod 10
    number = number / 10
endfor
think about it...
 

Waaaaagh

I lost all my rep and my title being a jerk
Reaction score
70
Actually, I enjoy being able to attach Unit2 to the handle as well. So that, should I, say, use:

JASS:
function T_Unit2 takes timer t returns unit
    local integer i=GetStoredInteger(GameCache(),I2S(H2I(t)),"Unit2")
    if(i!=0)then
        return i
    endif
    return null
endfunction


I can have TWO UNITS! (Rather than only one)


I2S is extremely taxing, yes, but I enjoy its versatility, and therefore continue to use it.
 

Vexorian

Why no custom sig?
Reaction score
187
I2S is extremely taxing,

It isn't.

for i=0 to NumberOfDigits
tmpstring(i) = number mod 10
number = number / 10
endfor

you tend to jump into conclussions, do you?

It's so damn short. >_>

It isn't, it is full of nonsense including return bug which is impossible to read.

Umm... sure. I mean, I write my own functions... yes. I don't use handle attaching, just id storing. Just store H2! on the handle, and then write a function to get exactly what you stored (that's how I do it). I have a weird method I guess.

You got a terrible method.

--
I mean, any attempt to speed up handle vars by making the thing less readable or over-complicating everything is terrible. It is totally useless since gamecache will always be very slow, so much that removing a function call is not effective as an optimization, and besides, gamecache's ways require you to ship at least 2 functions which makes going low-level ineffective distribution-wise ...
 

Cohadar

master of fugue
Reaction score
209
So Vexorian what should we use for attaching "things" to handles ...

you tend to jump into conclussions, do you?

Yes I really do... I need to better myself...
I go bang my head some more:banghead:
 

Cohadar

master of fugue
Reaction score
209
Well I am using structs - HEAVILY
Abusing is better word.

But it does not help when you need to attach a handle to a timer.

So I made my little System where I use global recycling array for attaching structs , and I called it a system because it uses functions and
a moderately complicated hash algorithm to do it.

And people say oh it's just shitty recycling array I do it also...
Yes you do it biach, just 8192 times slower.


To Waaaaaaargh:
I will expand the system function set to allow attaching
up to 3 "things" on a handle.
If you say you need more than that...
I will find you and give you a very very slow death...
 

Waaaaagh

I lost all my rep and my title being a jerk
Reaction score
70
I use gamecache because of its infiniteness. Currently, I am working on a system that could need anywhere from 104+ handles attached to a single object. If your system does that... well then, I'll use it.
 

Cohadar

master of fugue
Reaction score
209
Are you sure you are not doing something really really wrong?

If you are sure you need 104+ attachments on a handle
will you please explain me what are you making
and what is it supposed to do,
It might help me to better my system,
and in the same time provide a nice solution for you.
 

Waaaaagh

I lost all my rep and my title being a jerk
Reaction score
70
Bag. It is an item, which you can drop other items into. All those items are held under reference of the bag item (And some people would want a bag with 100+ items (although I would never do that)). Also, I have to store handling information for the bag - The unit that currently owns it, and a few dummy units used for temporary item storage (like when I open up a move item menu in the bag). So, we get 104, if you store 100 items in the bag. Of course, you could just as easily store 40,000, or just 12. It really needs an infinite range.
 

Cohadar

master of fugue
Reaction score
209
Loool I already made that one, and it uses only one handle.

I will give you the code if you promise not to publish it.

I made it for my new map that I am currently working on
so I don't want it spreading around until I finish it.

When I finish the map I will publish the code as a system.
 

--Thanatos--

New Member
Reaction score
33
> I mean, any attempt to speed up handle vars by making the thing less readable or over-complicating everything is terrible. It is totally useless since gamecache will always be very slow, so much that removing a function call is not effective as an optimization, and besides, gamecache's ways require you to ship at least 2 functions which makes going low-level ineffective distribution-wise ...

Then, how the hell... I'm using these to attach structs to things. What should I doooo ?
 

Cohadar

master of fugue
Reaction score
209
Bag. It is an item, which you can drop other items into. All those items are held under reference of the bag item (And some people would want a bag with 100+ items (although I would never do that)). Also, I have to store handling information for the bag - The unit that currently owns it, and a few dummy units used for temporary item storage (like when I open up a move item menu in the bag). So, we get 104, if you store 100 items in the bag. Of course, you could just as easily store 40,000, or just 12. It really needs an infinite range.

http://www.thehelper.net/forums/showthread.php?p=507236#post507236

I hope this helps.

EDIT:

sorry for double-posting,
I didn't realize I was the last one on the thread
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top