Re:Hello (Distributed) World: Designing Software that Spread...
by tophercyll on Thursday August 12, 2010 @06:02PM
(#1599367)
Ignoring user interface and the mechanics of peer discovery...
[ Parent
| on HN ]
Re:Hello (Distributed) World: Designing Software that Spread...
by akkartik on Thursday August 12, 2010 @10:20PM
(#1599848)
Are the names discovery-system, user-interface, my-actor important?
Re:Hello (Distributed) World: Designing Software that Spread...
by tophercyll on Thursday August 12, 2010 @10:59PM
(#1599929)
Every process has "my-actor" defined in its global environment. It provides methods related to basic actor functionality. In this case I'm calling the "announce" method to say something to all of the process' subscribers.
user-interface and discovery-system are two hypothetical processes whose pids (process identifiers) are passed in to this process as arguments. user-interface would be responsible for creating a window with a text display area and a text entry box. discovery-system would use our remote service discovery model to find others chatting in the same "room."
Re:Hello (Distributed) World: Designing Software that Spread...
by exit on Friday August 13, 2010 @01:47AM
(#1600173)
what does ' before a symbol do?
Re:Hello (Distributed) World: Designing Software that Spread...
by cracki on Friday August 13, 2010 @05:06AM
(#1600448)
in scheme, the ' is the syntax for a quote. i'm guessing they use it here as syntax to symbols, but in some of the example code, i see it in front of list-like things too...
Re:Hello (Distributed) World: Designing Software that Spread...
by adamb on Friday August 13, 2010 @11:09AM
(#1601109)
Our use of ' was inspired by lisp's.
Immutability such is an important part of Spin's messaging model that we wanted a consistent way to declare an immutable construction.
# An immutable string (or symbol)
'foo
# An immutable list
'[ 1, 'foo, '[] ]
# An immutable map
'{ foo: 1, y: 'two, z: '[ 'three ] }
Slightly more advanced... # Also an immutable string
"foo with spaces"
# An immutable pair
"bar" -> 2
# Syntactic sugar for that same pair
bar: 2
# Syntactic sugar for "baz" -> baz
~baz