Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Technical Demonstration, 01 Apr 2013

mjstahl edited this page Apr 13, 2013 · 14 revisions

UPDATE (03 April 2013): Although not scripted as planned below, a video was uploaded showing off the v0.3 capabilities. The link is below:

10min Introduction to Social Machines

Overview

This demonstration will be performed in Savannah, GA during the same time as the 51st ACM Southeast Conference. It is unclear at this time if there will be a presentation at the conference. None the less, this demonstration will be recorded and the video distributed on the internet for later viewing by those not in the area during the time of the demonstration.

The purpose of this demonstration is to present the (very basic) distributed model of the Discourse programming language by showing the following:

  • The distribution of a project’s source code and manifest
  • Becoming a peer for a project not created by the user
  • Using another’s project without requiring the source code

This will be done with two (3) objects: True, False, Nil, and three (3) users/computers (one Linux (A), one OS X (B), and one Windows (C)).

Other demonstrations, although not the focus, will be the use of Social Machines, the Discourse syntax, and the use of cryptography.

The 3 users/computers will be used in this demo: Alice (A), Bob (B), and Charlie (C). Trent (T), as the trusted arbitrator, will represent the Social Machines website.

Demonstration

  1. Alice begins the demonstration by typing disco console on the command line in her home directory
    • The Discourse Read-Eval-Print-Loop (REPL) will be presented.
  2. Alice types True at the input line of the REPL
    • An error will be returned, informing Alice that the object True does not exist.
  3. Alice exits the Discourse REPL.
  4. Bob creates a Discourse project named “Boolean” in his home directory by typing disco create Boolean on the command line.
    • The following directories/files will be created:
      • ~/Boolean
      • ~/Boolean/.disco
      • ~/Boolean/dist
      • ~/Boolean/src
      • ~/Boolean/src/Boolean.disco
  5. Bob navigates to the ~/Boolean/src directory and open the file Boolean.disco for editing.
  6. Bob adds the Boolean source (provided in the Source Code section of this document) to the Boolean.disco file, save and close the file.
  7. Bob navigates to the ~/Boolean directory and types disco serve https://www.socialmachines.io.
  8. Charlie types the command disco get https://www.socialmachines.io/1/Boolean in his home directory.
    • A message is shown to Charlie that the Boolean archive is retrieved from Social Machines and placed in the ~/.disco.root/dist directory.
  9. Charlie types disco serve https://www.socialmachines.io in his home directory.
  10. Alice types disco use https://www.socialmachines.io/1/Boolean in her home directory.
    • A message is shown to Alice that the Boolean manifest is retrieved from Social Machines and placed in the ~/.disco.root/dist directory.
  11. Alice types disco console in her home directory.
    • The Discourse REPL will be presented.
  12. Alice types True on the REPL prompt.
    • The IDs of the True objects on Bob and Charlie's are returned.
  13. Alice types True not on the REPL prompt.
    • False is displayed on Alice, Bob, and Charlie’s displays.

Source Code

+ False ifFalse: fBlock => { fBlock value }

+ False ifTrue: tBlock => { Nil }

+ False ifTrue: tBlock ifFalse: fBlock => { fBlock value }

+ False not => { True }

+ False & aBool => { False }

+ False | aBool => {
  aBool ifTrue: { True } ifFalse: { False }
}

+ False ^ aBool => {
  aBool ifTrue: { True } ifFalse: { False }
}

+ True ifFalse: fBlock => { Nil }

+ True ifTrue: tBlock => { tBlock value }
   
+ True ifTrue: tBlock ifFalse: fBlock => {
  tBlock value
}

+ True not => { False }
   
+ True & aBool => {
  aBool ifTrue: { True } ifFalse: { False }
}

+ True | aBool => { True }
   
+ True ^ aBool => {
  aBool ifTrue: { False } ifFalse: { True }
}
Clone this wiki locally