Fork me on GitHub
#sci
<
2022-10-27
>
Lone Ranger12:10:54

Python finally invented #sci! https://peps.python.org/pep-0554/

😁 1
1
teodorlu13:10:48

I'd say lots of languages deserve a sci! So much simpler to provide a flexible userspace when there's an interpreter isolated from side effects.

teodorlu13:10:42

Shame they don't have code as data and have to rely on passing strings around :(

respatialized17:10:55

Can you pass a Python AST as an argument to a function? Would be a nice alternative to strings alone.

Lone Ranger18:10:56

hehh I'm pretty interested in some nightmare combination of these subinterpreters + sci + libpython-clj and see how much damage we can do there

clojure-spin 2
😁 1
Lone Ranger18:10:14

I bet we can pass a libpython-clj form into a libpython-clj subinterpreter

Lone Ranger18:10:25

and just bypass the AST thing altogether

teodorlu08:10:25

> Looks like the stdlib might support it: https://docs.python.org/3/library/ast.html > Yeah, there's support for going text->ast and back, plus interpretation of the ast. But writing that ast is such a chore compared to a quoted sexp (I tried)

Lone Ranger13:10:04

there is some really brilliant AST code out there though

👀 1
Lone Ranger13:10:45

Both of those kinda blow my mind at their ability to extend Python

🔥 1
teodorlu13:10:17

Yeah - it's amazing how dynamic Python is when you start digging

Lone Ranger13:10:20

One of those uses the AST directly to modify the interpreter live

Lone Ranger13:10:37

yeah the kit certainly comes with enough rope to hang yourself haha