Programming as closest thing to real world magic

From apm
Revision as of 17:28, 22 August 2025 by Apm (talk | contribs) (added main illustrative image for the page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Magic circles as a fun questionably practical code projection?

Disclaimer: This page is more for fun, Don't take some parts too seriously.
(wiki-TODO: Add image.)

Any sufficiently advanced technology is indistinguishable from magic. (Arthur C. Clarke)

With advancing technology hardware and software will increasingly merge.
From programmable matter to materializable programs.
Using future advanced programming will be the one thing closest to "wielding magic" in our reality.

A code projection that projects "code-spells" into magic circles

Related: Projectional editors & Structural editors

A questionably practicable but fun idea:

Functions have many inputs and one just one single output.
This lends itself to go from the outside of the circle to the center.

For visuals beside calssic box-n-wire a matching more info dense
and proven scaleable (as nigh plaintext equivalent) alternative
that could be used instead would be
lambda diagrams in the form of annotated lambda diagrams.
Specifically the variant that funnels down both ways
forming a funnel shaped diagram that is matching a circle segment.

Three circle segments

There are three aspects:

  • variable values
  • variable names
  • variable types (ignoring types of types an further progression here)

These three can be displayed in near the very same structure distributed 120° apart.

  • The values can act as live coding responding instantly to every edit like in a spreadsheet.
  • The names can act live too with renaming propagating.
  • The types can act live too with type-changes propagating to explicit program holes (typed holes).

For larger not instantly executed possibly dangerous side effects involving batch processing actions
program/spell activation nicely matches up with authentication.
Better stay with fingerprint scans rather than drops of blood.
And please lets avoid the sacrifice and summoning demons part.

Only the up 120° of the circle have upright text. This is a bit of an issue.
Some way to quickly rotate the circle to the segment of current interest?

Visually connected circles – low cognitive friction

The idea is to have all nicely directly visually connected so it's easy to follow context.
Even for people who struggle with too many computer tabs or
things like remembering light switches & hot/cold faucet sides.
A bicycle for the mind rather than an aircraft-carrier.

Sub/super circles (sub functions/closures) opened up in 3D behind or in front of the current circle.
Magic circles in modern fiction often are supposed to live in 3D
rather than on the ground and often occur in connected groups.

Code refactoring withing and across circle boundaries
corresponds to generalized alpha, beta, and eta conversions of lambda calculus.

  • alpha … renaming (propagating across circle boundaries)
  • beta … substitution and the inverse as a base for code/spell factorization
  • eta … just wrapping a circle in a new yet unnamed (or several ones for the generalized case)

Greek letters fit the magic circle theme somewhat.
And more people can read them than runes as they are heavily used in math.

Magic circle user interface control

Wand & speech I guess to stay withing the trope.
Though typing may often be more effective.
Reciting spells makes no sense though other than for a password.
It can't possibly be worse than that some silly password requirements that we have today.
Maybe add some (as of 2025 still quite novel) AI assisted coding.

Immediate effects on physical reality

Mechanosynthesis of stuff from scratch will be to slow for anything looking like magic.
Recomposition of microcomponents can be blazingly fast though.
In contrast to much of lazy mahic in fiction thsi sort of magic would be
much more productivity & peace rather then destuctivity & war focused.

See related page: Microcomponent recomposers

Full compute for proof system on type level

More useful for deep fundamental libraries (denotative design). Less so for quick tinkering where types are mole like broad guiderails without complex deeper structure. Some examples enabled by this:

Also let's please shelve unary numbers (Church numerals).

Blending over into the philosophical

Choice of correct most elegant choice of formalism?

What is the one correct formalism?
There is no particular one but rather some.
There is not the one single correct formal model for computations.
But some still are unreasonable effective for practical use.

A few good formal systems for modelling programming:

From "magic" programming language to how nature computes

Error creating thumbnail: Unable to run external programs, proc_open() is disabled.
Causality topology "cone" of pure programming language code in analogy/generalization to the light cone of physics.

Succession of types of programming gradually getting closer to how physical reality is processing information.

A progression towards matching deep physics of nature:

  • conventional imperative programming (no mathematical code substitution even) >
  • pure programming (still allows for encapsulated irreversibilities) >
  • reversible programming (no quantum pseudo-parallelism) >
  • quantum programming

The topological concurrency cone of reversible computation
has some analogy to the light-cone of spacetime.

Related


External links




less seriuos: