Apr-23-2018, 03:30 AM
suppose you have a couple routines in separate contexts that send data objects back and forth to each other? how easy is it to insert a generator to "filter" the data (which may reduce the amount or increase the amount or just change it)? how about separate generators for each direction? how about multiple generators in stacked sequence.
i want to make a "filter" that encodes bytes/characters so that if i send chr(13) it sends chr(92)+chr(114) ('\\r') or chr(92)+chr(82) ('\\R') or chr(94)+chr(77) ('^M') on to the next routine (and many other codes encoded the proper way), sending them one byte/character at a time, or buffered if supported ... and one that does the reverse decoding.
i want to make a "filter" that encodes bytes/characters so that if i send chr(13) it sends chr(92)+chr(114) ('\\r') or chr(92)+chr(82) ('\\R') or chr(94)+chr(77) ('^M') on to the next routine (and many other codes encoded the proper way), sending them one byte/character at a time, or buffered if supported ... and one that does the reverse decoding.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.