Skip to content

Instantly share code, notes, and snippets.

View pgoodman's full-sized avatar
🦥

Peter Goodman pgoodman

🦥
View GitHub Profile
@pgoodman
pgoodman / out.txt
Last active October 6, 2020 03:26
Pretty print tables.
+- Grammar ---------------+ +-----------------------------------------------------+
| | | Production | Nullable | FIRST | FOLLOW |
| S -> S S | |-------------------------+----------+-------+--------|
| S -> if E then S else S | | S' -> S $ | False | exit | |
| S -> if E then S | | | | if | |
| S -> exit when E | |-------------------------+----------+-------+--------|
+-------------------------+ | S -> S S | False | exit | $ |
| S -> if E then S else S | | if | exit |
| S -> if E then S | | | if |
| S -> exit when E | | | else |
@pgoodman
pgoodman / group_functions.py
Last active August 8, 2024 23:56
Group functions by their type
# Copyright 2024, Peter Goodman. All rights reserved.
"""
This program approximately groups functions by their types, and then prints
out the grouped functions.
XREF: https://x.com/eatonphil/status/1821573274582823247
"""
import argparse

VTable Notes on Multiple Inheritance in GCC C++ Compiler v4.0.1

http://www.cse.wustl.edu/~mdeters/seminar/fall2005/mi.html#basics

The Basics: Single Inheritance

As we discussed in class, single inheritance leads to an object layoutwith base class data laid out before derived class data. So if classes A and B are defined as: