Simon builds his own RiveScript Editor

Simon has been working on a RiveScript Editor for creating chat bots. RiveScript is a markup language, that gives chat bots the ability to respond to messages from humans using natural human language. This project will involve server side programming, which means that Simon will have to go through the whole process of hosting it on Heroku once he’s finished. So far, he decided to give himself a break in the middle of programming the syntax highlighting, which he found a little too much boring work, so not sure whether the editor will ever be published. In any case, Simon has got quite far and the interface looks good.

Simon has already built three chat bots using RiveScript online editor and Atom.

 

Advertisements

Simon contributes to the p5.Speech library

Simon has made a pull request to the p5.Speech GitHub repo (a milestone!) and hopes his request gets merged. In this video he explains what he wants to improve with his contribution.

Later it turned out that someone else made a similar request (with more extras) and that request will probably be merged, so Simon was definitely thinking in the right derection. He got positive response from Daniel Shiffman and it looked like Simon’s comments have sparked a discussion on GitHub.

 

Simon contrubuted to p5.Speech library. Pull request 14 Oct 2017

Simon writing on GitHub: 

This github issue is referring to pull request #7.

As you can see in commit a2a5d38, there are some comments. Which look like 
this:

// this one 'start' cycle.  if you need to recognize speech more

// than once, use continuous mode rather than firing start()

// multiple times in a single script.

The comments are right before the start() function in the p5.SpeechRec 
object. But the commit adds arguments to this function:

p5.SpeechRec.prototype.start = function(continuous, interimResults) {

  if('webkitSpeechRecognition' in window) {

    this.rec.continuous = continuous;

    this.rec.interimResults = interimResults;

    this.rec.start();

  }

}

And before, that piece of code looked like this:

p5.SpeechRec.prototype.start = function() {

  if('webkitSpeechRecognition' in window) {

    this.rec.continuous = this.continuous;

    this.rec.interimResults = this.interimResults;

    this.rec.start();

  }

}

Are the comments "unnecessary" now? In other words, Should we remove 
them or leave them there?

28 times 28

Simon programmed a presentation to explain why 28×28 is not the same as 20×20 + 8×8 geometrically. The code is quite complicated and involves some trigonometry and conditional statements: the grid is divided into different parts every time Simon clicks and depending on how many times he has already clicked. This is typical Simon – coming up with an inherently arduous and complex system to visualise the beauty of the world around him, even of the seemingly trivial things. By the way, the inspiration for the 28×28 grid came from Simon’s favourite math channel, 3Blue1Brown and its latest video on Neural Networks (the grid was used to explain computer vision).

Simon is doing quite a lot of sums in his head nowadays, looks like it’s a new trend. Today, while bathing in the fountain outside, he was calculating how long 1/16th of a minute lasted. And a couple days ago, while waiting for his appointment at the hospital, he calculated how long it would take someone to read a whole page of random numbers, taking an educated guess that one takes 4 seconds to read out one number and remembering Daniel Shiffman mentioned there were 100×5 numbers per page in his book.

Cannon Game in Processing

Simon shows the Cannon game he created in Processing (Java). He says he was inspired by the Stackoverflow forum, where he saw an example of the game and later wrote the code for a similar game himself. I saw him quickly write the code in a matter of perhaps two hours. Simon will post his code on GitHub once he has added a couple extra features.

Simon’s Chat Bots

Inspired by Daniel Shiffman’s recent live stream on chat bots, Simon made two chat bots himself. He seems to really enjoy the logic behind programming bot conversations. Daniel Shiffman even tried Simon’s second chat bot out during another streaming session today, which made Simon extremely happy:

Daniel trying Simon's chat bot 9 Oct 2017

And this is how Simon filled his chat bot in himself:

Screen Shot 2017-10-07 at 20.35.05

Here is the link to Simon’s demonstration of a chatbot as a programming language, anyone can play with it online at: https://play.rivescript.com/s/HwDyLgbKwY

 

 

 

 

Lessons for Mom continued

It’s great that Simon continues to find the time to teach me some JavaScript. We’re now done with the Basic course he had prepared, below are some impressions. The video is of the rectangle intersection lesson and the “highway” we built.

Later, Simon decided he was wrong with the math defining the vehicles intersecting each other and changed it to:

Screen Shot 2017-10-02 at 16.02.21

This is Simon’s explanation why he changed the formula:

dsc_21131485843373.jpg

From a lesson on importing images:

dsc_21191151075634.jpg

dsc_21161668129738.jpg

dsc_21181439851118.jpg

Circle Intersection (I like the design!)

dsc_1876236677532.jpg

dsc_1882128578110.jpg

Simon Proposes a Community Project in Procedural Design

Inspired by the Processing Community Day projects, Simon came up with an idea to launch his own community project – in procedural design. He used the Coding Train Community Cloud page as inspiration, trying to guess the code used to build it. The videos below show Simon in process of creating the interface.

Simon later presented his project on the Coding Train Slack channel where other members (including Daniel Shiffman) suggested that Simon narrowed down the theme (originally, it was procedural design projects in general and that was too broad). Simon was very upset as he was afraid his “big project” would become too small and couldn’t come up with a theme. Two days later we agreed that he would make several examples for the projects and publish them on the project’s website to give everyone a better idea of what he was looking for.

At the moment, Simon has already published the first example but there seems to be a bug in it, so please view it as work in progress. (Simon originally wrote the code for the Community Cloud project and it worked when he shared it in Processing JS, but on his own project page, using instance mode, the cloud looks like a circle).

Simon writes: Everybody is welcome to contribute to my community project called *Procedural Designs*!
Link to GitHub rep (for this community project: https://github.com/simon-tiger/procedural-designs/ (link to github pages site in the README).

 

 

Text Generating Machine that Posts to Twitter

A milestone in server side programming here, as Simon has built a text generating machine that posts to Simon’s Twitter account! Essentially, it’s website where anyone can enter his own text for the machine to make a “poem” from using an acrostic algorithm; the machine simultaneously posts that “poem” to Simon’s Twitter.

This project falls under the topic of building an interface for Twitter. The original inspiration came from Daniel Shiffman. Simon writes:

You can try my Acrostic machine at http://acrostic-tweeter.herokuapp.com/ and it tweets to my account at https://twitter.com/simontigerh/

In this scenraio, I’m feeding in some text and a word. I’m clicking a button, to tweet the acrostic. I used node to create the server. I later put that server on heroku.

I’m also using a couple of packages:
– express – to host my interface
– socket.io – for the server and the client to talk to eachother
– twit – to tweet the acrostic

 

 

 

 

 

 

In the previous video, I got everything working, except that after I try to use heroku (by typing `heroku login` in git bash), What appeared was:
“`bash: heroku: command not found.
Later we solved this issue by using command prompt:

Simon got positive feedback on his project from Daniel Shiffman, who asked Simon to give some explanation about what the machine on the webpage and also to give a link to Simon’s Twitter:

Acrostic 18 September 2017

The Magformers saga continued

Oops, the Magformers are back in our life. I thought that Simon was over Magformers (which he built with excessively when he was six), but he has picked them up again and taken them to a new level. He seems to be using Magformers to illustrate his increasingly philosophical thoughts in the pauses he takes between lessons and programming. Yesterday, he was quite disturbed after building with the mirror piece for a while and said: “What if two mirrors reflect each other? Would that stop time?” He added: “Just for safety, I’m going to put the mirror in the box. Never, never ever put two mirrors opposite to each other!”

And there is more! Magformers the company has actually contacted Simon on his YouTube channel, saying they loved his Magformers Table program he made in JavaScript and wanted Simon to send them an e-mail and to talk to him about it! Simon put his code on GitHub and shared it, you can view his Magformers Table online here:

https://simon-tiger.github.io/magtables/magtable/

He hasn’t made it interactive yet though. This was the original plan but he got stuck.

DSC_1823