Working on bug #15

https://todo.sr.ht/~sforman/thun-der/15
This commit is contained in:
Simon Forman 2021-11-28 13:41:19 -08:00
parent 4ed8ccc07d
commit 89550cdd5f
2 changed files with 227 additions and 4 deletions

View File

@ -353,7 +353,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 4,
"metadata": {},
"outputs": [
{
@ -366,6 +366,229 @@
"clear"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[Q] [dip dip infra dip infra dip infra]"
]
}
],
"source": [
"[Q] [dip dip infra dip infra dip infra]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"[unit cons] step"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"So that's broken with the current definition of `step` but this works:"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": []
}
],
"source": [
"clear"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[Q] [[dip] [dip] [infra] [dip] [infra] [dip] [infra]]"
]
}
],
"source": [
"[Q] [[dip] [dip] [infra] [dip] [infra] [dip] [infra]]"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[[[[[[[[Q] dip] dip] infra] dip] infra] dip] infra]"
]
}
],
"source": [
"[cons] step"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Do I want to revisit `step` def? Insist that `Z` use `[[A][B][C]...]` rather than `[A B C ...]`? Seems clunky, special-cased, and not in the spirit of the thing, eh?\n",
"\n",
"Arguably,\n",
"\n",
" [dip dip infra dip infra dip infra] [unit cons] step\n",
"\n",
"*should* work, yes?\n",
"\n",
"\n",
" ... [] [Q] . step\n",
" -----------------------\n",
" ... .\n",
"\n",
"\n",
" ... [a] [Q] . step\n",
" ------------------------\n",
" ... a . Q\n",
"\n",
"\n",
" ... [a b c] [Q] . step\n",
" ----------------------------------------\n",
" ... a . Q [b c] [Q] step\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": []
}
],
"source": [
"clear"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[dip dip infra dip infra dip infra]"
]
}
],
"source": [
"[dip dip infra dip infra dip infra]"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[[dip] dip infra dip infra dip infra]"
]
}
],
"source": [
"[unit] infra"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 6,

View File

@ -201,9 +201,9 @@ class Def(object):
if line.lstrip().startswith('#'):
continue
name, body = text_to_expression(line)
if name not in dictionary:
inscribe(class_(name, body), dictionary)
## inscribe(class_(name, body), dictionary)
## if name not in dictionary:
## inscribe(class_(name, body), dictionary)
inscribe(class_(name, body), dictionary)
#