Bitwise»Episode Guide
Domain-Specific Languages In Python
?
?

Keyboard Navigation

Global Keys

[, < / ], > Jump to previous / next episode
W, K, P / S, J, N Jump to previous / next marker
t / T Toggle theatre / SUPERtheatre mode
V Revert filter to original state Y Select link (requires manual Ctrl-c)

Menu toggling

q Quotes r References f Filter y Link c Credits

In-Menu Movement

a
w
s
d
h j k l


Quotes and References Menus

Enter Jump to timecode

Quotes, References and Credits Menus

o Open URL (in new tab)

Filter Menu

x, Space Toggle category and focus next
X, ShiftSpace Toggle category and focus previous
v Invert topics / media as per focus

Filter and Link Menus

z Toggle filter / linking mode

Credits Menu

Enter Open URL (in new tab)
0:09Recap and set the stage for the day
🗩
0:09Recap and set the stage for the day
🗩
0:09Recap and set the stage for the day
🗩
0:34Review some off-stream optimisation on the lowered jump table-based switch statement
🗩
0:34Review some off-stream optimisation on the lowered jump table-based switch statement
🗩
0:34Review some off-stream optimisation on the lowered jump table-based switch statement
🗩
5:30Being careful of associativity when flattening expressions and register allocations, with another mention of the Sethi–Ullman algorithm1
🗩
5:30Being careful of associativity when flattening expressions and register allocations, with another mention of the Sethi–Ullman algorithm1
🗩
5:30Being careful of associativity when flattening expressions and register allocations, with another mention of the Sethi–Ullman algorithm1
🗩
12:00Setup to cover domain-specific languages in Python
🗩
12:00Setup to cover domain-specific languages in Python
🗩
12:00Setup to cover domain-specific languages in Python
🗩
15:46Dive into building up an abstract syntax tree for our logic design code, starting by parsing the & operator
15:46Dive into building up an abstract syntax tree for our logic design code, starting by parsing the & operator
15:46Dive into building up an abstract syntax tree for our logic design code, starting by parsing the & operator
20:42Run it to find that it does execute
🏃
20:42Run it to find that it does execute
🏃
20:42Run it to find that it does execute
🏃
21:11Parse the | operator and introduce UnaryNode
21:11Parse the | operator and introduce UnaryNode
21:11Parse the | operator and introduce UnaryNode
24:02Note why __not__ doesn't exist in Python
🗩
24:02Note why __not__ doesn't exist in Python
🗩
24:02Note why __not__ doesn't exist in Python
🗩
25:11Guard against erroneous boolean comparison of variables
25:11Guard against erroneous boolean comparison of variables
25:11Guard against erroneous boolean comparison of variables
25:54Run it to see our intended error
🏃
25:54Run it to see our intended error
🏃
25:54Run it to see our intended error
🏃
27:50Fix the ~ Node to use __invert__ (rather than __inv__)
27:50Fix the ~ Node to use __invert__ (rather than __inv__)
27:50Fix the ~ Node to use __invert__ (rather than __inv__)
28:13Note that we're building up a graph rather than a tree
🗩
28:13Note that we're building up a graph rather than a tree
🗩
28:13Note that we're building up a graph rather than a tree
🗩
30:43Introduce the notion of a ConstantNode, and as_node()
30:43Introduce the notion of a ConstantNode, and as_node()
30:43Introduce the notion of a ConstantNode, and as_node()
34:30A few words on Python's reverse operator overload methods
🗩
34:30A few words on Python's reverse operator overload methods
🗩
34:30A few words on Python's reverse operator overload methods
🗩
38:18Rename InputNode to VariableNode and input() to var()
38:18Rename InputNode to VariableNode and input() to var()
38:18Rename InputNode to VariableNode and input() to var()
39:16Consider how to handle out-of-range errors for bitwise-not in Python
🗩
39:16Consider how to handle out-of-range errors for bitwise-not in Python
🗩
39:16Consider how to handle out-of-range errors for bitwise-not in Python
🗩
44:12Enable as_node() to handle out-of-range errors on ints by taking their least significant bit
44:12Enable as_node() to handle out-of-range errors on ints by taking their least significant bit
44:12Enable as_node() to handle out-of-range errors on ints by taking their least significant bit
45:05elavid I guess "1 & x" tries to run the int class __and__ function first, and when that throws some exception it tries Per's __rand__ function instead
🗪
45:05elavid I guess "1 & x" tries to run the int class __and__ function first, and when that throws some exception it tries Per's __rand__ function instead
🗪
45:05elavid I guess "1 & x" tries to run the int class __and__ function first, and when that throws some exception it tries Per's __rand__ function instead
🗪
47:27Determine to create a simple interpreter
🗩
47:27Determine to create a simple interpreter
🗩
47:27Determine to create a simple interpreter
🗩
49:09Embark on a simple interpreter, introducing evaluate() and related functions
49:09Embark on a simple interpreter, introducing evaluate() and related functions
49:09Embark on a simple interpreter, introducing evaluate() and related functions
57:02Test evaluate() to see that it all works as expected
🏃
57:02Test evaluate() to see that it all works as expected
🏃
57:02Test evaluate() to see that it all works as expected
🏃
1:01:28Construct a nested tree 16 levels deep for evaluate() to evaluate
1:01:28Construct a nested tree 16 levels deep for evaluate() to evaluate
1:01:28Construct a nested tree 16 levels deep for evaluate() to evaluate
1:06:33Run it to see that the performance of our evaluate() is terrible, on 16 and 32 levels deep
🏃
1:06:33Run it to see that the performance of our evaluate() is terrible, on 16 and 32 levels deep
🏃
1:06:33Run it to see that the performance of our evaluate() is terrible, on 16 and 32 levels deep
🏃
1:07:47Introduce eval() to cache values for evaluate() to call
1:07:47Introduce eval() to cache values for evaluate() to call
1:07:47Introduce eval() to cache values for evaluate() to call
1:12:15Run it to see that the state does get filled in
🏃
1:12:15Run it to see that the state does get filled in
🏃
1:12:15Run it to see that the state does get filled in
🏃
1:12:41Increase our nested tree to 32 levels deep
1:12:41Increase our nested tree to 32 levels deep
1:12:41Increase our nested tree to 32 levels deep
1:13:19Run it to see that it is now instantaneous
🏃
1:13:19Run it to see that it is now instantaneous
🏃
1:13:19Run it to see that it is now instantaneous
🏃
1:14:51Reflect on our Python-based interpreter
🗩
1:14:51Reflect on our Python-based interpreter
🗩
1:14:51Reflect on our Python-based interpreter
🗩
1:15:37Q&A
🗩
1:15:37Q&A
🗩
1:15:37Q&A
🗩
1:15:47rickylqhan What's your endgame?
🗪
1:15:47rickylqhan What's your endgame?
🗪
1:15:47rickylqhan What's your endgame?
🗪
1:17:11garryjohanson pervognsen So this is off-topic, but do you think the Intel 8086 chip will be within the direct scope of this project, or is it more complicated than what we are attempting?
🗪
1:17:11garryjohanson pervognsen So this is off-topic, but do you think the Intel 8086 chip will be within the direct scope of this project, or is it more complicated than what we are attempting?
🗪
1:17:11garryjohanson pervognsen So this is off-topic, but do you think the Intel 8086 chip will be within the direct scope of this project, or is it more complicated than what we are attempting?
🗪
1:18:17That's it for today
🗩
1:18:17That's it for today
🗩
1:18:17That's it for today
🗩