TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Shortest meta-circular description of a universal computational structure?

3 pointsby jaboweryabout 2 years ago

3 comments

triskaabout 2 years ago
I think a meta-circular interpreter for Prolog would fit this description nicely. Prolog excels at writing interpreters in general, and in particular admits exceptionally short <i>meta-circular meta-interpreters</i>, i.e., interpreters written in Prolog that can interpret pure Prolog code, including their own source code.<p>An example of such a meta-circular Prolog interpreter is:<p><pre><code> mi([]). mi([G0|Gs0]) :- clause(G0, Rs, Gs0), mi(Rs). </code></pre> It can interpret pure Prolog code, a Turing-complete subset of first-order predicate logic. For example, given the following clauses:<p><pre><code> clause(natnum(0), Rs, Rs). clause(natnum(s(X)), [natnum(X)|Rs], Rs). </code></pre> It yields:<p><pre><code> ?- mi([natnum(X)]). X = 0 ; X = s(0) ; X = s(s(0)) ; X = s(s(s(0))) ; X = s(s(s(s(0)))) ; ... . </code></pre> The meta-interpreter&#x27;s own code can also be represented in this way:<p><pre><code> clause(mi([]), Rs, Rs). clause(mi([G0|Gs0]), [clause(G0,Rs,Gs0),mi(Rs)|Ls], Ls). clause(clause(Head, Rs0, Rs), Ls, Ls) :- clause(Head, Rs0, Rs). </code></pre> And now it can interpret its own source code, interpreting any given program, arbitrarily deeply nested. For example:<p><pre><code> ?- mi([mi([mi([natnum(X)])])]). X = 0 ; X = s(0) ; X = s(s(0)) ; X = s(s(s(0))) ; ... . </code></pre> Tested with Scryer Prolog.
评论 #35607282 未加载
jaboweryabout 2 years ago
To quell AGI hysteria I&#x27;ve posed a simple Algorithmic Information Theoretic IQ Test question: What is the shortest program you can come up with that outputs this string: 0000000001000100001100100001010011000111010000100101010010110110001101011100111110000100011001010011101001010110110101111100011001110101101111100111011111011111<p>Yann LeCun responded: &quot;I can construct a computer for which the shortest program that generates this bit string has length 1.&quot;<p>To which I posed this question: &quot;Why do mathematicians spend centuries asking for their minimum set of axioms but, not even Wolfram&#x27;s acolytes ask for the shortest meta-circular description of a universal computational structure?&quot;
082349872349872about 2 years ago
paging John Tromp, paging John Tromp...
评论 #35606025 未加载