turing icon indicating copy to clipboard operation
turing copied to clipboard

rename nouns and verbs

Open jedahan opened this issue 7 years ago • 1 comments

From living-room created by jedahan : living-room/living-room#37

This has a lot of implications, and i'm looking for feedback if this improves clarity and implementation of working with the living room

  1. facts => messages Moving away from 'facts' has been a goal for a while.

  2. assert => say I'm worried that 'say' is a bit ableist, but kinda fits with the casualness of the system

  3. subscribe => listen I'm thinking about removing 'select' and just having subscriptions. Right now HTTP is the only stateless way to 'select' something. So like, a listen() over http works just like select does now, otherwise, it will be a subscription

  4. retract => transform So I want to allow for consuming subscriptions - that is a thing that does select() and immediately retracts any matching sentences, and optionally emits new messages. In this case, a retract is just a transform with no messages sent. Maybe transform should be 'consume' and we just have people manually say things in the consume listener.

room.consume(`$animal is scared of mice`, ({ animal }) => {
  room.say(`${animal} is unafraid of mice`)
})

high level version, that starts to look a lot like rules in datalog

  room.transform(`$animal is scared of mice`, `${animal is unafraid of mice`)

equivalent to retract today:

  room.transform(`$animal is scared of mice`)
  1. sensors/visualizers => speakers, listeners, transformers

I think these become natural, we are reducing the number of new vocabulary people need to learn.

Even just reactions to this issue with 👍 or 👎 will help me judge if this is a step in the right direction

jedahan avatar May 18 '18 02:05 jedahan

From @modernserf room.react(oldMessage, [...newMessages])

From http://wiki.c2.com/?TupleSpace

put places a tuple into the bag. copy finds and reads a tuple. take is like copy but also removes a tuple after reading it. Copy and find block if they cannot find a tuple matching the query; try_copy and try_find are the non-blocking versions. Eval forks a new process.

jedahan avatar May 18 '18 02:05 jedahan