• 0

    posted a message on Instance Maps.
    I am assuming the instances in wow are on one big region on a seperate server.

    Like: one server for Eastern Kingdoms, one server for Kalimdor, one for Outland and one for instances. In that effect there is probably one big map in the .wdb files that contains ALL the instances. Similarly, this might also be the reason (or at least ONE of the reasons) why they don't allow coords in instances... Cuz then we'd know more about the implementation.

    This all conjecture though. I don't really KNOW anything :p.

    But if I'm right, Instancemaps simply keeps track of where on the 'Big Instance Map' the map of a certain instance is.
    Posted in: Lua Code Discussion
  • 0

    posted a message on LibMindReader
    Just realized a glaring nono in my code. I often use a var called type (to contain the type of a spell or buff, like 'hot' and 'rez' and such). Naturally, this'll block the usage of the type() Lua-function...

    My fault for not prefixing my vars like I'm used to in my day-to-day programming.
    Posted in: General AddOns
  • 0

    posted a message on LibMindReader
    Hmm, then i can replace non-recursive calls to my _ClearTable() function with wipe() instead. No other tablefunctions in there that are redundant? :p (sorry for using you as a question target).

    BTW: After congesting all this input and applying it to MindReader and BeneCast AND once BeneCast has reached a stage where I am satisfied with it's stability I'll ask for some advice again.

    I AM also glad to hear that my shortnamed-shortcut-locals to certain long-named globals are a sound idea performancewise.
    Posted in: General AddOns
  • 0

    posted a message on LibMindReader
    Quote from Azethoth
    Hey can this lib mindread whats going on in the old AceHook-2.1 lib? Because that would be awesome. That is the kind of code I would love to see a lib for that lets you figure out whats going on. Not that you don't KNOW whats going on ... hooking of stuff ... its just that you cannot actually simulate whats going on in your brain because the code recalls itself with shifting paramaters over and over again till you lose track by the 5th time you flow through a particular function yet again. It is like someone liked function overloading in C++ (and who would not) then decided what they need to do in lua is take all the overloaded functions and shove them into one function instead of just splitting them out into multiple functions.

    I like to pick on this code because I think its a good candidate for a "Lua Tricks" book and therefore unsuitable as production code.

    PS: I am sorry AceHook-2.1, it's just that you are so easy to pick on...;-p


    Well, my BreadCrumbs idea could help with that. But you'll have to add the crumbs to a local version of AceHook yourself. BreadCrumbs will then allow you to track the path the code has made throughout the addon by tracking the crumbs it dropped.

    I just made MindReader first since I need it the most.
    Posted in: General AddOns
  • 0

    posted a message on LibMindReader
    One disclaimer though. I do not intend (not since the lib was officially rejected by you anyway :p) to publish my 'HandyHelper'-lib).

    1. ok, I will move the table recycling out of the lib. I see why it'd be A Bad Idea.

    2. I'll conceed to overusing the new()-table recycling ftion there. My reasoning was that, while I wasn't going to release the table I might still be using a recycled one instead of creating another new record. I'll change that.

    The 'using a table as an index' is actually a bug you found! That was supposed to be 'sname' :D. I know I should avoid using tables as indices. Which is also why I convert the tables to their internal IDs first whenever I need to keep track of which table was used where (mostly in the avoiding cross-links throughout the tree).

    3. Well since I "came onboard" WoWAce after the big move to Curse all the documentation is scattered all over. I found a lot of help on http://old.wowace.com, but if a decent "how to make a library and what it all does" exists I haven't found it. Plus one learns a lot from viewing other ppl's code.

    Now, I'm no fool, I figured it was for some upgrading purpose seeing as how up top we find
    mr.embeds = mr.embeds or {} -- what objects embed this lib
    but I didn't wanna go ahead and make stupid assumptions. Simply adding it seemed the smartest thing to do.

    4. Again, LibHandyHelper needs work. Your suggestions are valued. The wrapper functions are not used and are an ugly heritage of the old BeneCast. I really just wanted to get rid of them (I think BeneCast 10 uses only one or two of them and after I threw those out the wrappers were gonna get the boot (if that reassures you :)).

    5. Since I don't use metatables (I do know what they are in any case, the matter is just a bit too complex for me at my current state of Lua-knowledge to implement) and I intend to move the recycling functions to my own addons this pitfall is avoided. Thanks for the warning in any case...

    And as for wipe... nice

    6. I thought next() was faster so I went with that. I'll use pairs() where possible. The check on nil is a relic from before I explicitly found it said in the Lua docs that setting to nil = deleting.

    Follow Up Question: If I loop through a table w pairs() and I delete (set to nil) a member will the iterator mess up or properly hand me the next member as if I hadn't deleted anything?

    7. I don't agree on the uselessness of isnil. It adds readability to code that would be needlessly obfuscated (for my feeble brain that is) in the places that I employ it.

    ----------------
    Overall my aim is to eventually attain the standards that are set by who I hope to be allowed to call 'peers' (even if merely someday). With that, those tips are golden. Even if you couldn't resist adding every foul word that is used for describing less than optimal code. I'm actually a programmer IRL as well, but in other languages of course. I have had less time then I'd have liked to get to know the "Lua intrinsics". I DO know short circuit evaluation and I use it liberally unless, again, it inhibits readability. I'd rather have 4 lines of code that makes sense at a glance than 2 that requires 10 seconds of wondering what the hell it does.

    - Glad you see a future for LibMindReader. I'll continue polishing it until you one day recommend it to a fellow dev!

    - LibHandyHelper... well, it's a bit Leeroy-ish I know. But the table copy and searching functions have proven quite the timesaver and helped keeping code readable.
    Posted in: General AddOns
  • 0

    posted a message on PitBull 2.0
    I'm trying to convince BeneCast 10 into attaching to PitBull. Am I correct that, to get the unit frame of a certain unit I'll have to use something like
    function BeneCast.SnapTo.PitBull:GetUnitFrame(unit)
    	for frame in PitBull:IterateUnitFramesForUnit(unit) do
    		return frame;
    	end
    end


    Of course I don't like it much because I don't know if I'll be attaching to the correct unit frame if the iterator returns >1 frame... Any assistance?? Tips? Is there a god? Is CKKnight him/her?
    Posted in: Unit Frames
  • 0

    posted a message on RDBMS (for AceDB-3.0)
    Quote from Pastamancer
    Yeah, thre are dfinintely two different discussions going on. I can split the thread if you want to get back on-topic.


    Nah, I have my feedback. Let 'em have it. I just posted it so that ppl might enhance the ongoing discussion with the aspect of evaluating the need of an abstracting data-layer in favor of simplifying things. Not to go 'hey! get off my lawn!' on them :).
    Posted in: Addon Ideas
  • 0

    posted a message on Hiding/Removing the Action Bar
    This post led me to:

    /script CreateFrame("Frame","HMB") HMB:RegisterEvent("PLAYER_ENTERING_WORLD") HMB:SetScript("OnEvent",function() MainMenuBar:Hide() end)


    It's a macro you hit once on startup.

    Or you can add the following to your addon:
    CreateFrame("Frame","HMB")
    HMB:RegisterEvent("PLAYER_ENTERING_WORLD")
    HMB:SetScript("OnEvent",function()
      MainMenuBar:Hide()
    end)
    Posted in: Addon Ideas
  • 0

    posted a message on RDBMS (for AceDB-3.0)
    Hmm, the whole point of my suggestion was actually not about speed or memory footprint but about
    - simplifying maintaining multiple indexes of a certain table
    - help keep data relational by providing a simlple framework to trigger on data

    The way I brought it and the suggestion itself (SQL) may have been flawed and been hiding said point, but that's what it was.
    I too find that machines today are fast enough to process the extra layer of abstraction and that memory is sufficient for storing the overhead.

    But you got yrself a nice discussion going on. Don't mind me :p.
    Posted in: Addon Ideas
  • 0

    posted a message on LibMindReader
    I would blame my narrow view of disbelief upon the, apparently incorrect, assumption that people were blessed with the same faulty memory my brain is equipped with. As such I assumed (another nono of course) that this Lib would be widely accepted, praised and I would be welcomed into the WoWAce pantheon of dev-gods.

    Now, with my dreams shattered, I am alone instead of many. Cast down from my fantasy into the barren truth of reality. I suppose I have to thank you, Arrowmaster and Phanx, for this.

    Yet, this is not the first time this has happened. And according to Battlestar Galactica (reimagined series of course) lore 'all this has happened before, and it will happen again'. See you in the official thread of my next crackpott idea.

    All kidding aside:
    Okay, so not ALL devs will use this. Even if only one other than me uses it it will have been worth posting it here. Please don't slag an idea because you personally don't see yourself using it.

    Adding to that:
    I am a pretty verbose developer. I write my code with the intention that I may forget what I wrote where or what a certain var meant. So I put it in places I expect myself to look and I name my variables very descriptive. Regex-expressions have always been very 'chinese' to me (although I do comprehend their power I do not master it).

    With that I invite anyone to overview my code and point out:
    - glaring mistakes
    - extreme inefficiencies
    - things that can be done by using a certain, pre-existing, library
    advice like 'write t instead of tablevar' won't help though.
    Posted in: General AddOns
  • 0

    posted a message on BeneCast 10: Official thread
    I am sure BeneCaster is a fine addon and I am honored by Phlay continuing where I left off. People don't need to use mine and what's life w/o a little competition ;).

    Suggestions have also come that Phlay and I should work together. While in principal I am not opposed to this the reason I moved my actions to wowace is because
    1. it has a version control system (SVN).
    2. it automatically embeds and packages everything.
    3. it has co-authorship for accessing those features.
    4. I think Ace-libs are the future.

    I feel going back to how development works at worldofwar AND not using Ace would be taking a step back. If Phlay would move BeneCaster to here and the Ace-platform... then we can talk...

    EDIT: One correction: I noticed Phlay uses SVN for BeneCaster as well. :D
    Posted in: General AddOns
  • 0

    posted a message on LibMindReader
    Quote from Phanx
    So... this is basically something you expect addon authors to spend extra time and effort writing extra code to support only to avoid having to remember what other functions they wrote and what those do? That's what I'm getting from your description and the example on your project page... :confused:


    Phanx, your worry is understandable, but anticipated:
    1. you don't HAVE to do function tips. They just ease the debugging process by helping the addon dev remember what parameters a certain function/method needs.
    2. The accompanying MindBrowser addon which I will write once BeneCast 10 is done will have the posibility of you pasting your whole source file in an editbox and MindBrowser will add function tips FOR YOU and spit it out in another editbox. How's that for convenience?

    Quote from Arrowmaster
    Is that the purpose of this? That's nothing like what the post or description describe it as from what I could tell.


    Arrowmaster, I don't understand this sentence. But I can tell you this, as OrionShock mentioned, this is a developers tool (which is why it's in the "Development Tools" category.

    It lets the developer inspect a variable without awkward slash commands.

    I find it hard to believe ANY developer NOT wanting this library (still, it could happen :p).

    Quote from sylvanaar
    How about making tabcompletion work on tables

    /print Prat.<tab through fields>

    That'd be spiffy.


    That'd be a great addon as well. Sounds more like a suggestion for chatframe addons though. My backlog of "addons I'd like to code" is already clogged with:
    - Finishing BeneCast 10
    - Making MindBrowser (manage MindReader-builds and aid in generating function tips)
    - Making BreadCrumbs (same lib+addon style development tool to be able to go back in a callstack and see the value of certain variables, using MindReader off course to visualize it)
    - Maybe make a RDBMS-library for WoW. Reception in the "Addon Ideas" forum wasn't great though.
    - Adding a "table printer' (name needs work :D) with tab-completion will either be at the end or after MindBrowser depending on how I feel my knowledge of the chatframe is.
    Posted in: General AddOns
  • 0

    posted a message on RDBMS (for AceDB-3.0)
    Quote from twobits
    Given that the current implementation of their saved variables stuff is taking over 20 minutes to write out the files...


    I think you are using a TAD bit too much addons... Or your hardrive is REALLY slow :p.
    Posted in: Addon Ideas
  • 0

    posted a message on BeneCast 10: Official thread
    Well, I DID say I couldn't quite pinpoint what rev I was referring to. And I AM in the middle of a code reorganisation to simplify stuff. On top of that I just wrote LibMindReader in two days. So BeneCast 10 is NOT ready for testing by other ppl. I was just letting you guys in on the how things are progressing.

    As for an ETA of a hopefully usable version: I have my hopes set for somewhere at the end of next week...

    I thought this was a forum "for devs, by devs" and I've gotten more "whaah it doesn't work yet" here than anywhere else. Am I going about this the wrong way? Are my alpha's supposed to be of a higher grade?

    Not to put you off of wanting to test stuff (good testers rock and are hard to find), but the Alpha-tag should speak for itself. Wait until a beta (higher than 10.0.6) and then post tickets if they give you errors please.

    In the meantime I am happy to discuss the finer points of BeneCasts mechanics with anyone. I see myself as a medium level addon programmer and admit I have much to learn. What I wouldn't give for one of the top-devs around here to take a peek at my code and give suggestions on simplifying stuff and/or speeding stuff up (while maintaining/improving code readability).
    Posted in: General AddOns
  • 0

    posted a message on LibMindReader
    http://www.wowace.com/projects/mindreader/

    LibMindReader is a mixin library (can also run 'not mixed in') that generates an AceConfigDialog-table from a variable. Running this table then allows the user to peek, poke and prod the variable in the following ways:

    - The table structure is shown as a tree. Efforts have been done do avoid recursiveness due to tables linking each other.

    - Selecting a table node in the tree shows an input box where the user can input some code and execute it as a method of that node.

    - Selecting a number or a string shows an input box where the value can be viewed and edited. Editing is not available if the number or string is not a member of a known table.

    - Selecting a function shows an execute button to execute the function. An inputbox is also provided to type in code to generate parameters for the call.

    Because the parameters of a function can not be determined from within Lua the addon being debugged can provide LibMindReader with a tip through calling of :AddFtionTip(func, paramstring, ismethod) or :AddFtionTips(tiptable).

    When building the AceConfig-node for the function LibMindReader will use paramstring to help the user.

    The builds can be managed using a standalone addon called MindBrowser (not yet created)

    See also http://www.wowace.com/projects/mindreader/pages/usage/
    Posted in: General AddOns
  • To post a comment, please or register a new account.