4 ms·
Make-like build system. This would expose students to a few useful concepts, and can be a 'jumping-off point' into various more advanced concepts. - topologica
by oftenwrong 3y ago
Make-like build system. This would expose students to a few useful concepts, and can be a 'jumping-off point' into various more advanced concepts.
- topological sorting the build graph
- what is a graph
- running child processes
- what a process is
- process api
- interaction with the filesystem
- r/w files
- mtime comparisons
- how computers store time
- what is incremental execution
I would suggest to skip parsing, and use a Python literal to hold the 'Makefile'-equivalent dependency graph data structure.
You let students come up with their own fun build graphs, like making sushi:
tuna_maki -> nori, cooked_rice, tuna_fillet, chef, sushi_roller
cooked_rice -> uncooked_rice, rice_cooker, water, rice_seasoning
tuna_fillet -> tuna_slab, knife
tuna_slab -> fishmonger, money
nori -> algae, dehydrator
And then, when executed, it would print the steps, or say that a target was already made.
- fdeage 3y agoVery interesting per se, but needs to introduce several concepts (graphs, process management, etc.) that are too low-level for my scope :)