Week 9 - Server Updates and Networking Overview

Today:

  • server updates
  • Networking Overview
  • software emulation
  • prep for workshop

Server updates

You can recommend software for our socialsoftware server. Message lee with any recommendations.

Login reminder:

ssh your_username@147.182.164.95

It will prompt you for your password. When you type it in, it will be invisible. Then hit enter. In a moment you will be connected. If you mis-type too many times, you will be locked out. Message lee for help.

New programs

Textual Paint
textual-paint (thanks to ~itslex)

Text user interface painting/drawing program. Mouse works in this program. More info about textual-paint. Fullscreen works best.

Pokete - Grey edition
pokete (thanks to ~mh7)

Pokete is a terminal-based pokemon clone. More info. Fullscreen works best.

|\----------------|--------------|----------------|--------------\
|                                                                 \
| UPPER ENGINE                        CAFETERIA       WEAPONS      \
|                 |-     --------|                |                 \
|/--------|    |--|       MEDBAY |                |                  \
          |    |                 |                |                   \------\
/---------|    |-------\         |                |----------|        |       \
|         |    |        \        |---|     |------|          |                 |
|                        \       |                |                            |
| REACTOR        SECURITY |      |  ADMIN OFFICE  |   O2           NAVIGATION  |
|                         |      |                |          |                 |
|         |    |          |      |---|     |----|-|----------|                 |
\---------|    |----------|------|              |                     |       /
          |    |                 |                                    /------/
|\--------|    |--|              |                                   /
|                 |              |              |--    --|          /
| LOWER ENGINE       ELECTRICAL       STORAGE   | COMMS  | SHIELDS /
|                                               |        |        /
|/----------------|--------------|--------------|--------|-------/

Among sus group text command line game version of Among Us (Requires an admin to start the game). Additional info.

Ascii-patrol

asciipatrol  

Ascii patrol info. Fullscreen works best.

Networking

IP addresses

An Internet Protocol address (IP address) is a numerical label such as 192.0.2.1 that is connected to a computer network that uses the Internet Protocol for communication…An IP address serves two principal functions: it identifies the host, or more specifically its network interface, and it provides the location of the host in the network, and thus the capability of establishing a path to that host. Its role has been characterized as follows: “A name indicates what we seek. An address indicates where it is. A route indicates how to get there.” The header of each IP packet contains the IP address of the sending host and that of the destination host. –Wikipedia

Code.org: IP Addresses and DNS

Code.org: Packets, Routing and Reliability

Emulation

Computerphile: Emulation

Uxn and “weathering software winter”

Devine Lu Linvega: Weathing Software Winter, at Handmade Seattle 2022
transcript of Weathing Software Winter

Intro and comparison of languages

Stack-based languages

We had a discussion about programming paradigms, the levels of abstraction (from electrons, transisitors, gates, machine code, assembly, programming languages, etc). Stack-based languages can be more easily mapped to primitive instructions. For example, Forth can be more easily mapped to Assembly than many others.

We tried a version of the Forth language called gforth in class.

We used the metaphor of a stack of books, considering pushing numbers onto this metaphorical stack. The stack starts out empty with nothing on it. Then we can add things to it.

20 10 * 50 + CR .
300 ok

Explanation: Put 25 and then 10 onto the stack. Multiply them (200) and return the result to the top of the stack. Push 50 onto the top of the stack. Add them, combining 50 and the result gets placed on the top of the stack (250). Hit return (CR = carriage return). A single period prints out and removes the top result from the stack.

Javascript!

Introduction to Javascript ES6

ES6 conventions

Variables
let var;
const a_constant_variable;
Functions

Named function:

function doSomething( optional_passed_in_vars ){
  //function code
}

Anonymous Function:

runs once, usually ‘in place’

function(){ 
  //do stuff here 
}

Fat arrow functions:

() => {
  //function code
}


( passed_vars ) => {
  //function code
}

Putting it all together:

() => {
  const replaceText = (selector, text) => {
    const element = document.getElementById(selector)
    if (element) element.innerText = text
  }

  for (const type of ['chrome', 'node', 'electron']) {
    replaceText(`${type}-version`, process.versions[type])
  }
}

Electron

What is Electron?

Electron is a free and open-source software framework developed and maintained by GitHub.It allows for the development of desktop GUI applications using web technologies: it combines the Chromium rendering engine and the Node.js runtime. Electron is the main GUI framework behind several open-source projects including Atom, GitHub Desktop, Light Table, Visual Studio Code, Evernote, and WordPress Desktop.

Also: Discord, Slack, Whatsapp, Beaker Browser, Skype, Signal, Visual Studio Code, Etcher, Ramme (instagram on the desktop), and many others.

How does it work?

In short: it packages a website as an application, a full browser itself along with HTML, CSS, Javascript and Node.js for a specific app.

Advantages:

  • “write once, work everywhere”
  • use a language you already know
  • lots of learning / building resources and a community of people working with it

Disadvantages:

  • Not native-specific design
  • “Bloated” (packages an entire Chrome-based web browser, which may be redundant)
  • Security

Homework

A selection of readings selected by our workshop guest Alex Wennerberg in preparation for our workshop next week.

Jenny Odell – Why does this feel so bad? (8 minute read) - related to social media

melonking - What is the web revival? (8-9 minutes read) - related to the small web

Darius Kazemi - Run your own social: How to run a small social network site for your friends (variable read time) - relating to social media for a small community

Permacomputing Wiki (variable read time) - relating to environmental action and computing