Last active
March 30, 2017 15:23
-
-
Save kenwebb/0bf052ef9eac2848a0805845586bbda2 to your computer and use it in GitHub Desktop.
Dog Whistle - SIG_BROADCAST_TO_CHILDREN_REQ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!--Xholon Workbook http://www.primordion.com/Xholon/gwt/ MIT License, Copyright (C) Ken Webb, Thu Mar 30 2017 11:22:54 GMT-0400 (EDT)--> | |
<XholonWorkbook> | |
<Notes><![CDATA[ | |
Xholon | |
------ | |
Title: Dog Whistle - SIG_BROADCAST_TO_CHILDREN_REQ | |
Description: | |
Url: http://www.primordion.com/Xholon/gwt/ | |
InternalName: 0bf052ef9eac2848a0805845586bbda2 based on 1e110b23c820a088cea8073fdc664a89 | |
Keywords: | |
My Notes | |
-------- | |
March 27, 2017 | |
Dog-whistle politics | |
I use the Xholon BroadcastService to send messages to all people, but only some of these people react to them. | |
I use the new SIG_BROADCAST_TO_CHILDREN_REQ signal. | |
- Send a regular async message to each child of each node in a list of broadcast receivers, but NOT to the broadcast receiver itself. | |
References | |
---------- | |
() https://en.wikipedia.org/wiki/Dog-whistle_politics | |
Dog-whistle politics is political messaging employing coded language that appears to mean one thing to the general population but has an additional, different or more specific resonance for a targeted subgroup. The phrase is often used as a pejorative because of the inherently deceptive nature of the practice and because the dog-whistle messages are frequently distasteful to the general populace. The analogy is to a dog whistle, whose high-frequency whistle is heard by dogs but inaudible to humans. | |
() http://money.cnn.com/2016/10/19/news/dog-whistle-trump-clinton/ | |
"Criminal illegal aliens" | |
(Decoded: Scary and dangerous undocumented brown people.) | |
]]></Notes> | |
<_-.XholonClass> | |
<PhysicalSystem/> | |
<Person> <!--superClass="Avatar">--> | |
<DogWhistler/> <!-- typically a politician --> | |
<Listenerr> | |
<DogWhistleTarget/> | |
</Listenerr> | |
</Person> | |
<Listeners/> | |
</_-.XholonClass> | |
<xholonClassDetails> | |
</xholonClassDetails> | |
<PhysicalSystem> | |
<DogWhistler/> | |
<Listeners> | |
<Listenerr multiplicity="5"/> <!-- members of the general population --> | |
<DogWhistleTarget multiplicity="2"/> <!-- members of a targeted subgroup --> | |
</Listeners> | |
<InteractionsViewer interactionParams="32,true,localhost,60001,false,true,15,30"/> | |
</PhysicalSystem> | |
<Listenersbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[ | |
// container for behaviors of a targeted group | |
var me, beh = { | |
postConfigure: function() { | |
const SIG_ADD_BROADCAST_RECEIVER_REQ = -3898; | |
me = this.cnode.parent(); | |
me.println("whistle target"); | |
var bs = $wnd.xh.service("BroadcastService"); | |
$wnd.console.log(bs.name()); //"broadcastService_29" | |
bs.call(SIG_ADD_BROADCAST_RECEIVER_REQ, "Criminal illegal aliens", me); // register to receive broadcasts | |
$wnd.xh.root().append(this.cnode.remove()); | |
} | |
} | |
//# sourceURL=Listenersbehavior.js | |
]]></Listenersbehavior> | |
<DogWhistleTargetbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[ | |
// behavior of a targeted group | |
var me, beh = { | |
postConfigure: function() { | |
me = this.cnode.parent(); | |
}, | |
processReceivedMessage: function(msg) { | |
me.println(me.name() + " rxed: '" + msg.data + "' which I can decode to mean 'Scary and dangerous undocumented brown people'"); | |
} | |
} | |
//# sourceURL=DogWhistleTargetbehavior.js | |
]]></DogWhistleTargetbehavior> | |
<DogWhistlerbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[ | |
// behavior of Dog Whistler, Politician | |
var me, bs, whistle, beh = { | |
postConfigure: function() { | |
me = this.cnode.parent(); | |
me.println("whistler"); | |
bs = $wnd.xh.service("BroadcastService"); | |
$wnd.console.log(bs.name()); //"broadcastService_29" | |
whistle = "Criminal illegal aliens"; | |
}, | |
act: function() { | |
const SIG_BROADCAST_TO_CHILDREN_REQ = -3893; | |
me.println("whistling '" + whistle + "'"); | |
bs.call(SIG_BROADCAST_TO_CHILDREN_REQ, whistle, me); // broadcast | |
} | |
} | |
//# sourceURL=DogWhistlerbehavior.js | |
]]></DogWhistlerbehavior> | |
<SvgClient><Attribute_String roleName="svgUri"><![CDATA[data:image/svg+xml, | |
<svg width="100" height="50" xmlns="http://www.w3.org/2000/svg"> | |
<g> | |
<title>Block</title> | |
<rect id="PhysicalSystem/DogWhistler" fill="#98FB98" height="50" width="50" x="25" y="0"/> | |
<g> | |
<title>Height</title> | |
<rect id="PhysicalSystem/Listeners/DogWhistleTarget" fill="#6AB06A" height="50" width="10" x="80" y="0"/> | |
</g> | |
</g> | |
</svg> | |
]]></Attribute_String><Attribute_String roleName="setup">${MODELNAME_DEFAULT},${SVGURI_DEFAULT}</Attribute_String></SvgClient> | |
</XholonWorkbook> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment