« first day (546 days earlier)      last day (4385 days later) » 

10:00 PM
sigh
nevermind
thanks anyway
then again i guess it is a really hard function to change into iterative
 
No, what's confusing you? The principle is literally the same.
 
it isnt
i've seen like twelve pages like that one already
i still can't get any of it working
the function's too complex
 
Anywhere you have a recursive call, replace that with pushing the arguments onto your stack. Then just iteratively process the stack.
 
i also have memoization to take into account too
 
Use two functions.
 
10:04 PM
and "iteratively process the stack" doesn't mean anything to me
i have three recursive calls in the thing
 
One does the actual processing, with memoization, and returns any new recursive arguments, and one that walks the stack.
 
two of which are in conditionals
plus memo
 
Conditions don't mean anything to transforming a recursive function into a stack-based one.
 
idk i feel like there's more to it than that
i've had this problem in the past
and like 90% of the people i've asked had no idea how to do it
i feel like it's actually harder than people let on
like "oh you want to make a game? just make a graphics renderer, easy"
 
10:29 PM
Ffs
Can't even load this prject in VS
 
@JohnSmith: Did you see this answer? stackoverflow.com/a/9831838/87234
 
yes
 
If you don't have it solved by the time I get home from work, I'll take a deeper look into it.
 
in python stacks are usuallyjust lists
and you can push/pop onto them
i just don't know how i am supposed to convert things into that structure
whenever i see these examples they are all custom-tailored to the function
i don't know the "process" of translation
do i start out with an empty stack? do i push the initial arguments to it before calling? etc
 
If you know another language try and build it in that
 
10:33 PM
nothing to do with language
it's the logic
 
I have a problem with the following. dictionary.ContainsValue(new int[]{no,result}) this statement is resulting false even when ther is a matching value.. may i know y?
 
Man. I just lost an hours worth of work
 
@KianMayne Sorry fr the trouble
 
Huh?
 
i am trying to go from GManNickG's example above... where would i place in the stopcondition
if condition=something return 1 (via the recursion)
 
10:38 PM
can you help me with the above problem?
 
Sorry I'm really busy trying to make up for this loss
 
i would help but i am horrible with syntax and wouldnt know
 
@JohnSmith Initial arguments.
 
John Smith
you know any assembler?
 
?
no
 
10:41 PM
ok
 
and what do you mean initial arguments?
 
this is basically the same as a regular function call in assembler
 
right now i started things off with stack=[], stack.append([a,b]) and then while stack!=[]
then a,b=stack.pop()
that part works so far
but normally my function has some stopping condition
def rec(a,b):
    stack=[]
    stack.append([a,b])

    while stack!=[]:
        a,b=stack.pop()
        if(a==stopValue): return 1
 
0
A: How can I get gcc to add a prefix to all symbol names

hide0This is not exactly what you are looking for, but I have had to do something similar in the past (renaming the symbols exported by a library) If you know the names of the symbols you want to redefine you can try using objcopy --redefine-syms old=new . See the man pages of objcopy for more detail...

a command called "objcopy" which does not produce a copy?
3
genius!
 
aghhh why does nobody know how to do this
 
10:52 PM
"Build successful" :)
Wow really
I had something of Double type (this is C'#.NET) and it accepted 0.0 but not 0. You'd think there'd be an implicit conversion
 
aaaaaaaaaaaaaggghhhh
every single tutorial i am reading doesnt cover my case
 
tide comes in, tide comes out. can't explain that
 
11:14 PM
How to disable Microsoft's performance-killing "performance checker" in Windows 7:
:)
@StackedCrooked tides are caused by small nano-machines in the sea, who once or twice every day experience a sudden urge to get on land
Oh, that's what they say at Reddit also!
 
anyone know how to handle stopconditions with stacks
 
i am changing recursive to iterative/stack
 
@JohnSmith there is no "stopcondition" with a stack
 
my recursive function is a counter; it returns 1 if it meets some condition
 
11:17 PM
@CheersandhthAlf So it's a common story?
 
otherwise goes on to perform more recursive calls, adding to a total var initialized to 0
returns total
 
@StackedCrooked Hey, it's not a "story"!
 
so far I've got

def rec(a,b):
    stack=[]
    stack.append([a,b])

    while stack!=[]:
        a,b=stack.pop()
 
In your question all recursion increases a. Hence, a stopping condition for the recursion should better involve that a passes some limit.
 
well my stopping condition is if b[a]>0
return 1
errr
sorry that's completely wrong
r=a//w
c=a%w
if(c==0 and r==h): return 1
 
11:22 PM
@JohnSmith No matter, the main question is whether it's sufficiently off-topic to discuss here?
 
i asked it on the main forum and nobody seemed to know how to do it
 
You know, that stopping condition looks suspiciously equivalent to a == h*w...
But even in Python you have True and False -- did you know?
 
yes, it's checking to see if all the area is filled
if so, we have a valid solution and return 1 to count
 
So you could just write return (a == w*h)
 
yeah but i use r and c later
so i figured i'd use it here anyway
 
11:26 PM
k'
 
but yes it is the same thing
either way still trying to make it a stack
 
john, now let me tell you how to probably get more real help
first write up your code so that it can be run. use dummy procedures
use dummy functions
 
it already works
 
it's just recursive
i am trying to make it iterative so it wont die for large values
 
11:28 PM
it doesn't matter if the main code works for you.
what matters is that the code you post on SO can be run
do not post pseudo-code, as you did
post real code that can be run
 
if i posted the whole thing it'd be huge
 
and for that you may need to use dummy functions etc.
 
i simplified it to the basic structure
 
now please read what I wrote, again
 
i understand what you are saying
posting the whole thing isn't really feasible
 
11:30 PM
so, then you need to ... what did I say about that?
 
dummy functions don't accomplish anything in this regard
it's not any different from me saying "arbitrary condition here"
 
if not then you're screwed. however, most likely that's a very premature conclusion.
 
otherwise if i post a dummy routine someone assumes it's similar to the real thing and then says "well if you're gonna do that just do X instead"
when X isn't analogous to the full version because it's a simplified version
 
just make sure that
* the code posts is real and can be run
 
i posted the absolute barebones structure
 
11:31 PM
* the control flow is identical to the real code
 
are there any other coding forums that would be good for this then
 
it needs to be real code
 
where someone would know how to change it to stack
 
not pseudo code
 
people use pseudocode all the time in CS textbooks so I am not entirely convinced of that
 
11:32 PM
lemme repeat that: it needs to be real code
not pseudo code
 
okay but that doesn't hold up
people work with pseudocode all the time
 
since you don't know how to do it, you are not sufficiently competent in this are to translate your real code to pseudo-code
 
there's absolutely nothing wrong with my pseudocode
 
just sayin', the psedu-code in your question, sucks
it is not sufficient to answer the question
 
why?
 
11:33 PM
you need to post real code
 
what is fundamentally insufficient
 
now i have wasted enough time on you
 
that the structure of the function is ambiguous
 
because you refuse to take advice
 
you're not actually supporting your arguments, just insulting me
and not explaining/justifying why
just calling me incompetent
 
11:34 PM
no not at all. that is not calling. i informed you that you are incompetent in that area
you don't need to be incompetent for ever
 
so i can "inform" someone they are an idiot? tomato, tomato
 
you can learn
 
point is you're not supporting your argument
 
theoretically, at least
 
man
 
11:35 PM
but then you must at least consider taking the advice you ask for
 
I feel sick
 
it's untenable advice in this context
 
it's no good advicing you and get back "that is impossible" or "won't work"
 
i've gone down that road before and it gets horribly off-topic
 
you are not competent to evaluate the advice you get
 
11:35 PM
sure i am
 
your evaluation is just noise, and it prevents you from learning
 
like i said, i've SEEN plenty of texts using pseudocode similar to how i've described my unction
 
so stop evaluating
 
so what you are telling me is literally not compatible with reality
 
and do follow some advice
if you completely ignore all advice, yet persist in asking, then you are an idiot
 
11:36 PM
posting the full version is not realistic, and posting dummy functions is no more distinguishable than the way i have it right now
 
what did i say about your ability to evaluate the advice?
 
you are really not getting it
i asked a perfectly reasonable question and all you're doing is calling me incompetent and giving me non-advice you're claiming i am not fit to even evaluate
when i already gave you good reasons why that advice wouldn't work
instead of defending why, you just say "well you're wrong" without any justification
 
@John is a good example of the Dunning-Kruger effect, I think.
 
this isn't the DK effect
I asked you to justify your argument -- you haven't done so
just echoed hollow statements and insults
 
@John please don't flag messages in the lounge. it's generally frowned on, and not acceptable.4
 
11:47 PM
I'll flag at my discretion, thanks
You don't have carte blanche to browbeat other members
 
flagging really is kinda bad
not that I'm going to enter this specific argument; but flagging should generally be avoided wherever possible
 
he's flaming
therefore, flag.
 
then flag for a moderator.
 
Then ignore it, instead of annoying every 10k user using the chat.
 
the flag for other users functionality is absolutely broken in every way
 
11:48 PM
Geez.
 
all the other users will just push "not sure" to make it go away
 
I counterflag everything, because I'm evil.
 
I have validated a few flags
but they have to be pretty nasty
 
@JohnSmith I think it's a misrepresentation to call the advice that you asked for, browbeating. It's either trolling, or very confused.
 
Wait, so the flag isn't a bookmark feature?
 
11:51 PM
You did not give advice
Just called me incompetent and made snide remarks
So yeah I am going to flag you
 
@JohnSmith You are being lame.
 
@John you are lying. I have not called you incompetent. I have informed you of your incompetence in one particular area, which I very carefully pointed out so that I could later refer to it if needed, such as now. I suspected you being a troll.
 
Uhhhh, do I need to quote your Dunning Kruger cite again?
You are lying. I can literally quote you
 
Why do games require UI. :.
I hate UIs.
 
jli
Command line games from now on?
 
11:53 PM
@CatPlusPlus I agree.
 
Commandline is UI, "command UI" (CUI)
 
jli
fine, hardware buttons for each command
 
And if anything you are trolling because I gave you very good reasons why your "advice" was unworkable here, to which you offered zero response. You'd only do that if you were trolling, or if you were unwilling to admit that your advice was vague, broad, or untenable
 
jli
Or how about this: auditory feedback instead of visual feedback?
 
@JohnSmith Stop it before you embarrass yourself more
 
11:56 PM
@jli Visual feedback can be produced automatically through a renderer. Auditory feedback would be ... text to speech? owch
 
@ManofOneWay Well, considering I'm right here... hardly embarrassing
 
jli
@DeadMG Nah, just morse code clicking.
 
take 999999 seconds to "render" a "frame" doing that :P
 
jli
Or a series of minor shocks to the player via a simple and cheap USB accessory!
 
@DeadMG "Copies a binary file, possibly transforming it in the process"?
 
jli
11:57 PM
The future of gaming
 
@CheersandhthAlf Nothing with "copy" in the name should ever modify the original.
 
mutilate_the_copy
 
jli
copy_and_destroy_both_the_copy_and_the_original(void *)
 
I had to do a double take for the "bananable" thing.
 

« first day (546 days earlier)      last day (4385 days later) »