• 0

    posted a message on Not packaging new versions of my addon

    I gave up and switched to GitHub actions completely, you can use BigWigs' packager script to push to curse as well

    Posted in: Need Help?
  • 0

    posted a message on Don't know why I am suddenly no longer allowed to commit?
    Quote from Torhal >>

    For anyone else encountering this issue:

     

    For the past two years, VCS clients were supposed to be using an API key instead of CurseForge credentials since CurseForge was switched over to using Twitch accounts and its own authentication system was decommissioned.

     

    Early in April, every bit of the old authentication code was removed from the sites which brought to light the fact that in some cases the old credentials had been erroneously accepted. To fix this, go to the site your projects reside on and click your name on the top navigation bar. On the dropdown, select "My Account" and on the next page click into the My API Tokens tab. From there you'll be able to generate a new API token which you would use as the password in your VCS client.

     Could you update the documentation here to reflect this?

    Posted in: Need Help?
  • 0

    posted a message on My Account has been reset!!!

    I'm back after a more than 2 years break, but the above link does nothing for me - just logs me out and lands me on the curseforge page... Should I just not bother?

     

    Also my twitch account runs on a different mail address than my old curseforge account... (I thought so at least...)

     

    Edit2: Apparently it just took some time to take, back in action!

    Posted in: General Discussion
  • 0

    posted a message on Documenter status

    Seems I misinterpreted his post then, sorry.

     

    If luadoc just wasn't such a pain... :-/

    Posted in: General Chat
  • 0

    posted a message on Documenter status

    Hmm, I'd hoped that you could patch it up again, the old thread indicated that Stanzilla was working on it?

     

    Posted in: General Chat
  • 0

    posted a message on Etiquette for taking ownership of an abandoned addon?

    PM the previous author. It's just being nice.

     

    Abandoned projects are marked as abandoned by the system automatically after a few months or patches (don't know the logic behind it), it will then show an option for you to take over.

     

    There is also an issue with projects that are "All rights reserved", they technically can not be taken over, because Curse/Wowace does not have the rights to do so, unless I missed something in the EULA.

    Posted in: General Chat
  • 0

    posted a message on Documenter status

    Referencing this thread from the old forums: Documenter broken?

    The pending commits list contains > 300 entries

    The top changed repository in the pending commits list (I assume its a FIFO list?) is Skada which had the last repository change from August 31 -- and the list does not change.

    The "Status" says it's running, but that does not seem to be the case - Is the documenter taking a summer break? :)

     

    PS: (forum feedback) the preview button is broken in the create-threads view, it redirects to an error page, links are orange in the editor, but dark-grey in the actual post, which makes them very hard to discern from normal text

    Posted in: General Chat
  • 0

    posted a message on date leakage...
    You could also do something like this:

    local tz, tzdiff;
    function time_utc()
       if tz ~= date("%z") then
           --print("Updating tzdiff");
           local utc, here = date("!*t"), date("*t");
           here.isdst = false;
           tzdiff = difftime(time(here), time(utc));
           tz = date("%z");
       end
       return time()-tzdiff
    end
    
    print(date("%c", time_utc()))
    I did a quick test that actually led me to change the isdst flag as this would otherwise generate wrong output (you should consider that in your code too, even if you don't use mine)

    After the first run you don't get any new tables, and if the timezone ever changes, it should get updated automatically
    Posted in: Lua Code Discussion
  • 0

    posted a message on Snapshotting player stats for DoTs
    Quote from jlam
    ...
    If what you are doing is an indicator of relative DoT strength, I want it!!! :)
    Posted in: Lua Code Discussion
  • 0

    posted a message on how do i detect mob death...
    Quote from tinystomper
    btw, it seems UnitReaction takes a UnitID.. and 'bossN' doesn't seem to work.

    i'm in stockades with Randolph Moloch swinging at me.. and UnitGUID("boss".. n ) returns nil for n (1..5). UnitReaction("boss".. n ) also returns nil. "npc" also returns nil. only 'target' seems to get any valid returns.

    thoughts?

    I think "NPC" is only used for things like "talking to anduin" so that the lore window (and other such ui panels like vendor, etc.) does not lose its target even if you target another unit.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Removing WoW escape sequences from a string
    Quote from saiket
    You're right that each match will generate new strings for the color code and pipes, but because identical strings are re-used in Lua's string pool, this technique doesn't generate nearly as much garbage. It works especially well when the number of unique color codes you might encounter is limited, such as with syntax highlighted tokens.
    Lua still has to generate them, create hashes, test the string table for existing hashes and call the callback function. String operations are known to be expensive operations in Lua (compared to other simple operations), not in memory but in CPU time. In comparison even four chained gsubs are more efficient.

    Also, you can do this easier, if you are going to use callback functions: You can "fake" branches and get a much simpler function like this

    print(str:gsub("|([|cr])(%x?%x?%x?%x?%x?%x?%x?%x?)",function(c, arg)
        if c == "r" then
            return arg;
        elseif c == "c" and #arg == 8 then
            return "";
        end
    end));
    I had already thought about such a solution while answering Iroared, but expected a lot worse performance -- Or rather for gsub to perform better. Pretty sure it handles all border cases although I have not tested it thoroughly since, as it is, it takes 15-30% longer to parse input than my current 4 gsubs (yeah, I've profiled it). It works because the "|" are consumed and you don't call gsub a 2nd time.

    Of course this also won't work with the more complex escape sequences unless you manage to come up with a monster pattern like Phanx' that covers everything and then test that again in the callback. (I would like to see that code though, should be fun, you'd have to go recursive for link text -- I think.)

    If there was a simple replacement function without patterns in Lua though, there would be no challenge ;)
    Posted in: Lua Code Discussion
  • 0

    posted a message on how do i detect mob death...
    Quote from tinystomper
    ugh.. that's what i was afraid of. seems like i'd be constantly checking (i try to keep that to a minimum)

    another odd thing, on one test in scarlett halls (mop) armsmaster harlan came up as a vehicle and not an npc

    http://i.imgur.com/tNEfSgn.png

    i'm pretty sure i'm parsing the guid correctly. seemed very odd.

    Isn't he the one with that whirlwind attack? Most likely when he's whirling he's in a vehicle
    Posted in: Lua Code Discussion
  • 0

    posted a message on Removing WoW escape sequences from a string
    Quote from saiket
    Yep, forgot to mention that.

    You mean those that are called for every match and thus also generate a string for each pattern *hint*hint* ;)
    Posted in: Lua Code Discussion
  • 0

    posted a message on Removing WoW escape sequences from a string
    Quote from saiket
    Rather than replacing all escaped pipes with "|!", you could rewrite your patterns to match "(|*)|r" and then count the string length of the pipes sub-match. If the length is even (#pipes % 2 == 0), then the control code is active and should be replaced by just the pipes sub-match. This technique avoids making a complete copy of your edit box's contents escaped with exclamation points.
    You mean in a gsub replacement-callback function?
    Posted in: Lua Code Discussion
  • 0

    posted a message on Removing WoW escape sequences from a string
    Quote from Iroared
    Ideally, strings should be parsed sequentially (as they probably are in the client) to avoid all corner cases, but the code for that would be longer.

    Lookbehinds won't really help, either, because "|||r" should become "||". Replacing "||" with "|!" seems like it should work, if you want to stick with patterns.
    Yes I figured that out too afterwards, I was a bit fixed thinking in Lua patterns.

    I'm pretty sure branches would suffice for the simple escape sequences without recursion (||, |cAARRGGBB, |r, ...?). But since Lua patterns don't have branches, this actually wouldn't help either :D
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.