Search for tag: "functions"

SOIL Seminar: An Indexed Type System for Fast and Safe WebAssembly

Title: An Indexed Type System for Fast and Safe WebAssembly Speaker: Adam Geller—University of British Columbia Summary: Often in low-level languages (i.e., assembly languages), potentially…

From  Ross Tate on December 7th, 2020 14 plays

Lesson 29.7 Time Budgeting (OPTIONAL)

This video is not optional because the material is advanced. It is optional because it is not relevant for the final assignment. However, you may be interested in this video if you want to see…

From  Hannah Lee on December 3rd, 2020 11 plays

Lesson 29.2 Coroutines

In the previous video we introduced the term coroutine but did not actually define it. In this video we give a more concrete definition. As a result, we see that coroutines and generators have a lot…

From  Hannah Lee on December 3rd, 2020 31 plays

Lesson 28.7 Iterator Chaining

Generators take iterators as input, but they also produce one as output. In this video we show how to chain iterators together, doing complex operations on our data.

From  Hannah Lee on December 3rd, 2020 22 plays

Lesson 28.6 map and filter

In this video we talk about two very famous generators: map and filter. We show how to use these to replace writing code with a for-loop.

From  Hannah Lee on December 3rd, 2020 26 plays

Lesson 27.8 Application Design

Game applications (and graphical applications in general) can get pretty complicated. In this video we talk about how to break up your code to make it more readable and more manageable. In some…

From  Hannah Lee on November 30th, 2020 40 plays

Lesson 26.6 Mutable While-Loops

In this video we show that the one place we typically prefer while-loops is when we are modifying a list or other mutable iterable. While we did see how to do this with for-loops (by looping over…

From  Hannah Lee on November 12th, 2020 36 plays

Lesson 25.3 Error Types and the Call Stack

After the last video, try-except looks less like an if-else statement and more like an if-elif-else statement. As we see in this video, this has profound effects on how errors interact with the call…

From  Hannah Lee on November 12th, 2020 39 plays

Lesson 24.3 Dynamic Attribute Access

Types guarantee that an object supports a set of operations (methods) and has a certain set of attributes. However, in this video we show that we can actually get this information without typing an…

From  Hannah Lee on November 12th, 2020 31 plays

SOIL Seminar: Interface Types Introduction and Update

Title: Interface Types Introduction and Update Speaker: Luke Wagner—Fastly Summary: The presentation will recap the motivation and requirements for the Interface Types proposal as well as the…

From  Ross Tate on November 9th, 2020 46 plays

Lesson 21.1 Interface vs Implementation

When we implement (or define) a function, we are given a specification and we complete the rest of the body to match the specification. We will do the same thing for classes as well. But as we see in…

From  Hannah Lee on October 30th, 2020 44 plays

Lesson 20.9 Optional Arguments

Unlike other programming languages, a Python class has only one constructor, If we want to give the user more flexibility when creating objects, we should make certain arguments optional. In this…

From  Hannah Lee on October 27th, 2020 34 plays

Lesson 20.1 Class Definitions

In this video we show you the basic format of a class definition. However, classes can contain a lot of features, so our classes will be very simple for this demonstration.

From  Hannah Lee on October 27th, 2020 40 plays

Lesson 19.6 Immutable Dictionary Functions

Since we can loop over dictionaries, that means we probably want to use them in functions with accumulators. In this video we show how to do this and why they are not that much different from lists.

From  Hannah Lee on October 27th, 2020 30 plays

Lesson 18.5 Immutable Table Functions

In this video we show how to write an immutable function on a table of data. In most ways this is no different than writing an immutable function on a list. Except that this time we may need multiple…

From  Hannah Lee on October 27th, 2020 27 plays