After a whole night working on my writing and not feeling very fresh in the morning, I told Simon about the three ages of life: the young age is when one can party all night long and the next morning feel like one has been sleeping like a rose, the middle age is when one parties all night long and the next morning feels like one had been partying all night long, and the old age is when has been sleeping all night long and the next morning feels like one has been partying all night long. He immediately drew these pictures, telling me it’s just like *1-input 1-output logic gates*, but the only one that makes sense is the *OR*.

# Tag Archives: Computer Science

# Rainbow Quicksort in p5.js

Link to Simon’s code: https://editor.p5js.org/simontiger/sketches/UMuLxaHJ

# Simon crafting a search engine with sticky notes

Simon working on a simplified version of a search engine, including just a few documents, and performing calculations to determine how many searches one should do to make creating an index of all the documents efficient (something he has picked up in Brilliant.org’s Computer Science course.

# Zutopedia, a fun Computer Science Resource

Through the whole moth of October, Simon really loved watching Computer Science and Physics videos by Udi Aharoni, a researcher at IBM research labs and creator of the Udiprod channel https://www.youtube.com/user/udiprod and the Zutopedia website http://www.zutopedia.com/ Simon’s favourite has been the Halting Problem video that he also explained to his little sister.

In the example below, Simon has applied a compression algorithm to a sentence by transforming the sentence into a tree where all the letters have their corresponding frequencies in this sentence. “Can you get back to the sentence? You have to first transform the letters into ones and zeros using the tree (the tree is a way to encode it into ones and zeros that’s better than ASCII)”.

# Brilliant Discussions

This is an example of the learning style that Simon enjoys most. He really likes doing the daily challenges on Brilliant.org. He later sometimes discusses them with other participants or even writes wikis!

# Simon’s first steps in Stephen Wolfram’s Computational Universe

Simon has been enjoying Stephen Wolfram’s huge volume called *A New Kind of Science* and is generally growingly fascinated with Wolfram’s visionary ideas about the computational universe. We have been reading the 1500-page *A New Kind of Science* every night for several weeks now, Simon voraciously soaking up the behaviour of hundreds of simple programs like cellular automata.

Wolfram’s main message is that, contrary to our intuition, simple rules can result in complex and often seemingly random behaviour and since humanity now has the computer as a tool to study and simulate that behaviour, it could open a beautiful new alternative to the existing models used in science. According to Wolfram, we may soon realise that the mathematical models we are currently using, based on equations and constraints instead of simple rules, are merely a historical artefact. I’m amazed at how much this is in line with Simon’s own tentative thoughts he was sharing with me earlier this year, about how maths will be taken over by computer science and how algorithms are a more powerful tool than equations. When he came up with those ideas he hadn’t discovered Wolfram’s research and philosophy yet, he used to only know Wolfram as the creator of Wolfram Mathematica and the Wolfram language, both of which Simon greatly admires for being so advanced.

Last night, Simon was watching a TED talk Stephen Wolfram gave in 2010 about the possibilities of computing the much aspired theory of everything, but not in the traditional mathematical way. “It’s about the universe!” Simon whispered to me wide-eyed, when I came to the living room to fetch him. “Mom, and you know who was in the audience there? Benoit Mandelbrot!” (Simon knows Mandelbrot died the same year, he is intrigued by the fact that his and Mandelbrot’s lifetimes have actually overlapped by one year).

We have been informed by the World Science Scholars program that Stephen Wolfram will be one of the professors preparing a course for this year’s scholars cohort, so Simon will have the unique experience of taking that course and engaging in a live session with Stephen Wolfram. It is breathtaking, a chance to connect with someone who is much older, renowned and accomplished, and at the same time so like-minded, a soulmate.

Inspired by reading Stephen Wolfram, Simon has revisited the world of cellular automata and Turing machines, and created a few beautiful Langton’s Ants:

Simon has also watched a talk by Stephen Wolfram for MIT course 6.S099: Artificial General Intelligence. He said it had things in it about Wolfram Alpha that he didn’t know yet.

# Simon trying to build a 8-bit computer in circuit simulators

As some of you may know, Simon is working on building a real-life 8-bit computer from scratch, guided by Ben Eater’s tutorials (it’s a huge project that may takes months). He has also been enchanted by the idea to build the computer in a simulator as well, researching all virtual environments possible. The best simulator Simon has tried so far has been Circuitverse.org, although he did stumble upon a stack overflow error once, approximately half-way through (maybe the memory wasn’t big enough for such an elaborate circuit, Simon said). You can view Simon’s projects on Circuitverse here: https://circuitverse.org/users/7241

Link to the project that ended up having a stack overflow: https://circuitverse.org/users/7241/projects/21712

And here is a link to Simon’s new and more successful attempt to put together a SAP-1 (simple as possible) processor (work in progress), something he has been reading about in his new favourite book, the Digital Computer Electronics eBook (third edition): https://circuitverse.org/users/7241/projects/22541

Simon has also tried building an 8-bit computer in Simulator.io, but it was really difficult and time consuming:

The next hopeful candidate was the Virtual Breadboard desktop app for pc. Simon downloaded it about ten times from the Microsoft store but it somehow never arrived, most probably because our Windows version was slightly outdated but who knows.

And finally, Simon has also discovered Fritzing.org, an environment for creating your own pcbs with a real-life look. He may attempt actually making a hardcopy SAP-1 via Fritzing after he’s done with the Ben Eater project. Conclusion: sticking with Circuitverse for the time being.

# Asynchronous into synchronous

Simon thinking about how to turn an asynchronous language into a synchronous language, using Sleepsort as a test.

# The Digital Computer Electronics book

Simon has been mesmerised by this book for a couple of days by now, the Digital Computer Electronics eBook (third edition). He has downloaded it online and has been reading about the so called “simple as possible” processors or the sap’s (he loves the name) one of which is like the 8-bit computer he is currently trying to build from scratch.

# The Diffe-Hellman key exchange algorithm

This is Simon explaining Diffe-Hellman key exchange (also called DiffeHellman protocol). He first explained the algorithm mixing watercolours (a color representing a key/ number) and then mathematically. The algorithm allows two parties (marked “you” and “your friend” in Simon’s diagram) with no prior knowledge of each other to establish a shared secret key over an insecure channel (a public area or an “eavesdropper”). This key can then be used to encrypt subsequent communications using a symmetric keycipher. Simon calls it “a neat algorithm”). Later the same night, he also gave me a lecture on a similar but more complicated algorithm called the RSA. Simon first learned about this on Computerphile and then also saw a video about the topic on MajorPrep. And here is another MajorPrep video on modular arithmetic.