mathstodon.xyz is one of the many independent Mastodon servers you can use to participate in the fediverse.
A Mastodon instance for maths people. We have LaTeX rendering in the web interface!

Server stats:

2.8K
active users

#recursive

0 posts0 participants0 posts today

A friend and colleague recently shared their alarm over "AI" being able to change its own programming. I explained that self-modifying code, that is code that changes itself while it is running, has been a thing for decades. They thought I wasn't alarmed therefore, but oh, I am. Just because something, or at least aspects of something, are well understood does not make them less alarming. In this case, my understanding makes it more alarming!

Proof of the non-existence of #magic: consider a magic bag which can only contain bags like itself. The bag can not contain nothing, therefore it contains infinite bags. Given that everyone implementing anything #recursive fucks up like this at least once, any wizard doing this will crash the universe. The universe has not crashed. Therefore magic doesn't exist. #ProofByContradiction

Continued thread

smatch in smatch! The #recursive #lisp patterns are expressive enough to describe themselves.

Here's a smatch pattern file you can use to check if your patterns are correct:

github.com/geezee/smatch/blob/

You can also check that this file matches itself. #recursion much?

Have a look at the last two tests in `./test.sh` :)

GitHubsmatch/smatch-syntax.lisp at main · geezee/smatchregexes for trees; grep for s-exprs. Contribute to geezee/smatch development by creating an account on GitHub.

#Python question...

I recently ran into a surprise using #pathlib.Path - seems to be a sharp edge and I'm curious if others have run into it and what you thought.

I wanted to find all #files/#dirs below the current #directory, and thought a #recursive #glob would do it - `Path.cwd().glob("**")`. I was surprised that this returns all directories but not files. "**/*" is needed to find the files as well.

I'm not a big user of recursive globs, so maybe this is expected #behaviour?