other cfg.baz(2, 3) end do # What if? x = with Foo as cfg: cfg.bar = 1 if other: cfg.baz(2, 3) 15 North Bay Python 2024 – Noah Kantrowitz – @[email protected]
preForth interpreter loop. It reads tokens \ and handles them until an error occurs or the input is exhausted. : quit ( -" ) token \ get next token \ run interpreters ?: \ :-definition ?code \ code definitions ?pre \ pre* ?\ \ comment dup ?exit drop \ unhandled or EOF tail quit ; \ cycle 31 North Bay Python 2024 – Noah Kantrowitz – @[email protected]
= s1.create_task(cache_manager()) async with s1.sup(on_error=emit_log) as s2: s2.create_task(web_server(c)) async with loop.sup(watchdog=5) as s3: s3.create_task(cleanup()) 33 North Bay Python 2024 – Noah Kantrowitz – @[email protected]
Oh look, atom 'defmacro, record this into the list of macros • (* 1 (addone (- 2 1))) • Oh look, atom 'addone is a macro, do the macro thing! • Execute (list '+ '1 x) • Got back ('+ '1 ('- '2 '1)) • (* 1 (+ 1 (- 2 1))) 39 North Bay Python 2024 – Noah Kantrowitz – @[email protected]
{ { let mut v = Vec:$new(); $( v.push($x); )* v } }; } let myvec: Vec<u32> = vec![1, 2, 3]; /" Becomes ..$ let myvec: Vec<u32> = { let mut v = Vec:&new(); v.push(1); v.push(2); v.push(3); v }; 42 North Bay Python 2024 – Noah Kantrowitz – @[email protected]
with Composer Expansive std lib Ruby Easy lambdas via blocks Flow programming Symbol literals Builder pattern Go Static compilation and FROM scratch Interfaces 45 North Bay Python 2024 – Noah Kantrowitz – @[email protected]