#python - Thu 22 Feb 2007 between 00:00 and 00:07

NY Lost Funds



cracki_it's pseudocode. that transmap tries binding to functions that don't exist
yet
raI know it's pseudocode, I'll move it down
cracki_i don't quite see why you want new_state
rathat's totally unrelated to my problem
uhm..
I need to know what state I'm going into
cracki_hm
k
and the other funcs don't mention new_state because they're not written yet, right?
rano, those don't touch it
cracki_uh, if they don't touch it, how would you know what the next state is supposed to be?
rathe transition functions don't need to know about the next state, the map takes care of that
trans_done setting new_state is basically a hack to make it loop from "DONE" to "BEGIN"
cracki_who sets new_state?
ah
rait's passed in
cracki_your code doesn't quite make sense
JohnQHow about a module for doing user queries and interogation.. ie,. "Do you really want to copy the file /dev/zero to /dev/kmem as user root? Y/n >>> "
cracki_it could be fairly straight-forward
raenlighten me then
JerubJohnQ: pretty easy with just raw_input() and looking at the string.
raI think it makes plenty of sense
JohnQI know.. I was just hoping for a simple built-in for it
cracki_ra, i don't know what exactly you wanna drive with that fsm, but i'd define states, transition functions (together with next states) that are called in order, saying True/False, and if exactly one returns True, you take that new state
ironfroggyraw_input(msg).lower().startswith('y') isnt built in enough for you?
racracki_: that's not how it works, I already said it was event driven
cracki_ra, it makes sense to you. i can't muster the patience to understand what you imply in your code
ironfroggytheres a point where the mental overhead of the module outweighs the perceived benefits of the abstraction.
cracki_ra i don't have enough information to give much more advice
rayou don't need any more information than what's given there
ivan`kcore rocks. you can search for anything, and you will find it
cracki_ra, well where do the events come from, i mean, how are they fed into your fsm?
rayou don't care about the application or the project domain, I want that inner function to be able to modift new_state, or some similar effec
cracki_: it doesn't matter
cracki_ra, then your problem is of scoping? hm, make a class then
and use self.new_state
looks like a class is perfectly suited for your fsm
rasee, now that doesn't make sense
it doesn't make sense to store new_state in the class, it's the variable that's passed in

Page: 2 9 16 23 30 37 44 51 58 65 

IrcArchive

NY Lost Funds