Re: Literate programming
Tim Daly <[email protected]> Tue, 19 Jul 2022 12:19:56 -0400
| Newsgroups | gmane.comp.mathematics.axiom.devel |
|---|---|
| Message-ID | <CAJn5L=KVWx+ev1O_10=iMwNekbmv+owkDeDjF7AzGNtkiuuSLA@mail.gmail.com> |
--0000000000009f029b05e42adb5d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Clifford, My research is on self-reproducing systems (SRP). Specifically I am trying to build a robot / 3D printer combination that can (a) make two copies of itself and then (b) forage for materials that can be used by those copies to make two copies. The idea is that this leads to exponential growth. The goal is to terraform Mars. Exponential growth is the only way to solve planet-scale problems. A sub-problem is creating these SRP systems with software that learns. By "learning" *I* mean self-modifying programs [6]. Learning, in this system, is defined as a permanent change based on experienced events. It is not the current "machine learning" / "deep learning" model. Post-learning, the software is running self-changed code. (This raises an interesting philosophical question I'll address below [0]). To make self-modifying programs I need a language that can self-represent. Lisp is ideal for this. Because I am using such limited hardware I need to make a space-efficient implementation. Forth is ideal for this. To make systems that are efficient I need hardware that can self-adapt. Field Programmable Gate Arrays (FPGAs) are ideal for this. I need an adaptable CPU instruction set. I am using RISC-V as it is designed to support extensions. In particular, I'm looking at extended instructions to natively support Forth / Lisp. There are a raft of problems that need to be solved. For example, the "wire problem"[2] or the "fastener problem"[3]. One question is how to construct a servo motor. I'm looking at 3D printed metal [7] (or, more recently 3D printed glass [5] since quartz is easier to find). Another research question is how to find material. It turns out that certai= n plants can extract things like metals [4]. Some of these metals are radioactive which could provide a power source. An alternative idea is to develop insects, such as ants, that prefer to build nests in various kinds of metal rich soils, bringing the spoil to the surface. Quartz seems to be readily available, making glass structures interesting. The current state of implementation of the research is primitive so far. o I have 2 robots and 2 3D printers. One of each will be disassembled to provide models for 3D parts. This will obviously fail various criteria but it provides a starting point for raising questions. I have to get better at 3D modeling. o I have experimented with 3D printed Japanese joinery parts. I have to prototype constructing a multi-segment "joinery'd" arm. o I have an FPGA I have programmed in Verilog. It runs RISC-V. It will soon run Forth. The game is to get the FPGA to compute and output an FPGA bitstream that can be re-loaded into the FPGA, thus demonstrating self-modifying hardware. This also requires careful thought about self-representation which is keeping me up at night. o I have to write FPGA routines to make an FPGA-ROS node capable of controlling a joint. Each joint will contain a custom FPGA for control. This will allow for joint adaptation. This is queued behind the prior problem. o I have micro- and nano- controller boards running Forth. I have a 6 breadboard pseudo-joint layout (servos controlled by the microcontrollers). I'm programming each joint to be a ROS node. I have to write ROS node software in Forth. I also have to write Forth code to control the Wifi / Bluetooth hardware. This will demonstrate non-wire joint control. o I have Freecad and Gazebo software that can talk to ROS so I can model the robot and use them to drive the pseudo-joints over Wifi / Bluetooth. I have to prototype this setup. This will enable merging real parts with simulated parts as the system evolves. I have both Freecad and Gazebo running but need to demonstrate remote ROS / Gazebo integrated control. This is the "top of stack" effort. o I have composite conductive PLA for the 3D printer [2a] . I need to prototype embedding these "printed wires" into a structure. I need to measure the voltage / current limits. I need to find / experiment with other materials. o I have been looking at 3D printed harmonic drives [10] to enable higher torque from minimal motors. o I have cameras and an iRobot Create3 [8] platform. I have mounted a camera and a Raspberry Pi 4. I want to experiment merging OpenCV with the Freecad / Gazebo / Pseudo-arm over ROS. I need to prototype the ROS / Wireless connection on the Pi. This will prototype the post-reproduce material search behavior. o I have a novel idea for end-point measurement of the robot hand. I have linear diffraction gratings [11] and various lasers. This can project spots that can be used to remotely measure the robot location. This needs a spot sensor and needs to be prototyped. o I have a hydroponic setup to grow sunflowers. I need to figure out how to measure the uptake of metals I put into the soil. (I also have free-range ants but they are not yet subject to test :-) ) It is all rather disconnected at the moment. However, it is all really just a Gedanken platform for my omphaloskepsis [9] :-) Tim [0] If a system learns by self-modification it will be fundamentally different from all other "copies". That means that it can't "teach" other systems by simple copying since they will also have diverged from the original. Thus it forces "learning by teaching" so that each system can adapt "what it learns" based on "what it knows". Or to put it simply: "You can't teach an old dog new tricks" because the "old dog" is fundamentally different than it was. [1] Japanese joinery https://architizer.com/blog/inspiration/industry/japanese-art-of-wood-joine= ry/ [2] The Wire Problem We don't want wires if we can help it. Each joint requires power and signals. Bluetooth at each joint can eliminate signal wires. The Proto-pasta company makes composite conductive PLA material for 3D printers. The game is to embed this conductive material in the physical structure of the robot to carry power / ground without wires. [2a] https://www.proto-pasta.com/products/conductive-pla?variant=3D27767315= 720 [3] The Fastener problem We don't want fasteners since that requires tools. So the game is to use Japanese joinery [1] techniques. I am prototyping 3D printed versions to build the robot structure. [4] Heavy Metals Extraction Potential Of Sunflower And Canola If we can seed the planet with phytoextractive plants then we can use the plants as a "mining operation". It appears that these plants can even extract radioactive elements which will make a useful power source. https://www.researchgate.net/profile/Mohammad-Hajabbasi-3/publication/22850= 1165_Heavy_Metals_Extraction_Potential_of_Sunflower_Helianthus_annuus_and_C= anola_Brassica_napus/links/0deec51a33592a6fa7000000/Heavy-Metals-Extraction= -Potential-of-Sunflower-Helianthus-annuus-and-Canola-Brassica-napus.pdf?ori= gin=3Dpublication_detail [5] Glass 3D Printing Glass has interesting advantages. In particular, it is easily shaped and can be made to fit areas without fasteners. https://oxman.com/projects/glass-3d-printing [6] TIRES - A Robot / Human Cooperative Effort To Change Tires. This is research I did at CMU with Scott Fahlman. [7] 3D printed metal There are various parts that need metal. In particular we need to be able to create 3D printed servo motors. https://markforged.com/3d-printers/metal-x [8] iRobot Create3 Foraging is a whole other problem that is still "on my horizon". But I have a deep background in vision so it is easy to create a prototype. https://edu.irobot.com/what-we-offer/create3 [9] Navel Gazing https://www.merriam-webster.com/dictionary/omphaloskepsis [10] Harmonic drives https://www.harmonicdrive.net/technology/harmonicdrive [11] Linear diffraction grating Lasers can be used with these gratings to patterns based on position and orientation. This makes it ideal for remotely measuring things like robot end-effector pose. https://www.newport.com/n/diffraction-grating-physics On Tue, Jul 19, 2022 at 8:33 AM Clifford Yapp <[email protected]> wrote: > On Tue, Jul 19, 2022 at 12:31 AM Svjatoslav Agejenko < > [email protected]> wrote: > >> Maybe that higher level language >> can be compiled to forth or forth byte-code, or forth should be >> used to implement lisp ? >> > > Interesting you should mention that - I'm aware of a couple cases were > people looked at Lisp implemented in Forth, although I don't think any of > them were intended to become something that might support full fledged > production systems: > > A Forth implementation of Lisp by T. Hand in 1988 ( > http://soton.mpeforth.com/flag/jfar/vol5/no1/article22.pdf) > > The code for Mark Probst's forthlisp on github: > https://github.com/schani/forthlisp > > > --0000000000009f029b05e42adb5d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Clifford,</div><div><br></div><div>My research is on = self-reproducing systems (SRP). Specifically I am trying to build</div><div= >a robot / 3D printer combination that can (a) make two copies of itself an= d then</div><div>(b) forage for materials that can be used by those copies = to make two copies.</div><div><br></div><div>The idea is that this leads to= exponential growth. The goal is to terraform Mars.</div><div>Exponential g= rowth is the only way to solve planet-scale problems.</div><div><br></div><= div>A sub-problem is creating these SRP systems with software that learns.<= /div><div><br></div><div>By "learning" *I* mean self-modifying pr= ograms [6]. Learning, in this system, is</div><div>defined as a permanent c= hange based on experienced events. It is not the</div><div>current "ma= chine learning" / "deep learning" model. Post-learning, the = software</div><div>is running self-changed code. (This raises an interestin= g philosophical <br></div><div>question I'll address below [0]).<br></d= iv><div><br></div><div>To make self-modifying programs I need a language th= at can self-represent.</div><div>Lisp is ideal for this. Because I am using= such limited hardware I need to <br></div><div>make a space-efficient impl= ementation. Forth is ideal for this.</div><div><br></div><div>To make syste= ms that are efficient I need hardware that can self-adapt.</div><div>Field = Programmable Gate Arrays (FPGAs) are ideal for this. I need an</div><div>ad= aptable CPU instruction set. I am using RISC-V as it is designed to</div><d= iv>support extensions. In particular, I'm looking at extended instructi= ons to</div><div>natively support Forth / Lisp.<br></div><div><br></div><di= v>There are a raft of problems that need to be solved. For example, the</di= v><div>"wire problem"[2] or the "fastener problem"[3]. = One question is how to</div><div>construct a servo motor. I'm looking a= t 3D printed metal [7] (or, more recently</div><div>3D printed glass [5] si= nce quartz is easier to find).</div><div><br></div><div>Another research qu= estion is how to find material. It turns out that certain</div><div>plants = can extract things like metals [4]. Some of these metals are radioactive</d= iv><div>which could provide a power source. An alternative idea is to devel= op</div><div>insects, such as ants, that prefer to build nests in various k= inds of metal</div><div>rich soils, bringing the spoil to the surface. Quar= tz seems to be readily</div><div>available, making glass structures interes= ting.</div><div><br></div><div>The current state of implementation of the r= esearch is primitive so far.</div><div><br></div><div>o I have 2 robots and= 2 3D printers. One of each will be disassembled to</div><div>=C2=A0=C2=A0 = provide models for 3D parts. This will obviously fail various criteria but<= /div><div>=C2=A0=C2=A0 it provides a starting point for raising questions. = I have to get better at</div><div>=C2=A0=C2=A0 3D modeling.</div><div><br><= /div><div>o I have experimented with 3D printed Japanese joinery parts. I h= ave</div><div>=C2=A0=C2=A0 to prototype constructing a multi-segment "= joinery'd" arm.<br></div><div><br></div><div>o I have an FPGA I ha= ve programmed in Verilog. It runs RISC-V.</div><div>=C2=A0=C2=A0 It will so= on run Forth. The game is to get the FPGA to compute</div><div>=C2=A0=C2=A0= and output an FPGA bitstream that can be re-loaded into the FPGA,</div><di= v>=C2=A0=C2=A0 thus demonstrating self-modifying hardware. This also requir= es</div><div>=C2=A0=C2=A0 careful thought about self-representation which i= s keeping me up</div><div>=C2=A0=C2=A0 at night.</div><div><br></div><div>o= I have to write FPGA routines to make an FPGA-ROS node capable of</div><di= v>=C2=A0=C2=A0 controlling a joint. Each joint will contain a custom FPGA f= or control.</div><div>=C2=A0=C2=A0 This will allow for joint adaptation. Th= is is queued behind the prior problem.<br></div><div><br></div><div>o I hav= e micro- and nano- controller boards running Forth. I have a 6<br></div><di= v>=C2=A0=C2=A0 breadboard pseudo-joint layout (servos controlled by the mic= rocontrollers). <br></div><div>=C2=A0=C2=A0 I'm programming each joint = to be a ROS node. I have to write ROS</div><div>=C2=A0=C2=A0 node software = in Forth. I also have to write Forth code to control the</div><div>=C2=A0= =C2=A0 Wifi / Bluetooth hardware. This will demonstrate non-wire joint cont= rol.<br></div><div><br></div><div>o I have Freecad and Gazebo software that= can talk to ROS</div><div>=C2=A0=C2=A0 so I can model the robot and use th= em to drive the pseudo-joints over</div><div>=C2=A0=C2=A0 Wifi / Bluetooth.= I have to prototype this setup. This will enable <br></div><div>=C2=A0=C2= =A0 merging real parts with simulated parts as the system evolves.</div><di= v>=C2=A0=C2=A0 I have both Freecad and Gazebo running but need to demonstra= te</div><div>=C2=A0=C2=A0 remote ROS / Gazebo integrated control. This is t= he "top of stack"</div><div>=C2=A0=C2=A0 effort.<br></div><div><b= r></div><div>o I have composite conductive PLA for the 3D printer [2a]</div= ><div><br></div><div>. I need to prototype embedding these "printed wi= res" into a structure. <br></div><div>=C2=A0=C2=A0 I need to measure t= he voltage / current limits. I need to find / experiment <br></div><div>=C2= =A0=C2=A0 with other materials.</div><div>=C2=A0</div><div>o I have been lo= oking at 3D printed harmonic drives [10] to enable higher</div><div>=C2=A0= =C2=A0 torque from minimal motors.<br></div><div><br></div><div>o I have ca= meras and an iRobot Create3 [8] platform. I have mounted a</div><div>=C2=A0= =C2=A0 camera and a Raspberry Pi 4. I want to experiment merging OpenCV</di= v><div>=C2=A0=C2=A0 with the Freecad / Gazebo / Pseudo-arm over ROS. I need= to prototype</div><div>=C2=A0=C2=A0 the ROS / Wireless connection on the P= i. This will prototype the</div><div>=C2=A0=C2=A0 post-reproduce material s= earch behavior.<br></div><div><br></div><div>o I have a novel idea for end-= point measurement of the robot hand.</div><div>=C2=A0=C2=A0 I have linear d= iffraction gratings [11] and various lasers. This can project</div><div>=C2= =A0=C2=A0 spots that can be used to remotely measure the robot location. Th= is</div><div>=C2=A0=C2=A0 needs a spot sensor and needs to be prototyped.<b= r></div><div><br></div><div>o I have a hydroponic setup to grow sunflowers.= I need to figure out</div><div>=C2=A0=C2=A0 how to measure the uptake of m= etals I put into the soil. (I also have</div><div>=C2=A0=C2=A0 free-range a= nts but they are not yet subject to test :-) )</div><div><br></div><div>It = is all rather disconnected at the moment. However, it is all really just</d= iv><div>a Gedanken platform for my omphaloskepsis [9] :-)</div><div><br></d= iv><div>Tim<br></div><div><br></div><div><br></div><div><br></div><div>[0] = If a system learns by self-modification it will be fundamentally</div><div>= different from all other "copies". That means that it can't &= quot;teach"</div><div>other systems by simple copying since they will = also have diverged</div><div>from the original. Thus it forces "learni= ng by teaching" so that each</div><div>system can adapt "what it = learns" based on "what it knows". Or to</div><div>put it sim= ply: "You can't teach an old dog new tricks" because the</div= ><div>"old dog" is fundamentally different than it was.</div><div= ><br></div><div>[1] Japanese joinery</div><div><a href=3D"https://architize= r.com/blog/inspiration/industry/japanese-art-of-wood-joinery/">https://arch= itizer.com/blog/inspiration/industry/japanese-art-of-wood-joinery/</a></div= ><div><br></div><div>[2] The Wire Problem<br></div><div><div>We don't w= ant wires if we can help it. Each joint requires power and signals.</div><d= iv>Bluetooth at each joint can eliminate signal wires. The Proto-pasta comp= any</div><div>makes composite conductive PLA material for 3D printers. The = game is to</div><div>embed this conductive material in the physical structu= re of the robot to carry</div><div>power / ground without wires.</div><div>= [2a] <a href=3D"https://www.proto-pasta.com/products/conductive-pla?variant= =3D27767315720">https://www.proto-pasta.com/products/conductive-pla?variant= =3D27767315720</a></div><div><br></div><div>[3] The Fastener problem<br></d= iv><div>We don't want fasteners since that requires tools. So the game = is to use</div><div>Japanese joinery [1] techniques. I am prototyping 3D pr= inted versions to</div><div>build the robot structure.</div><div><br></div>= <div>[4] Heavy Metals Extraction Potential Of Sunflower And Canola</div><di= v>If we can seed the planet with phytoextractive plants then we can use</di= v><div>the plants as a "mining operation". It appears that these = plants can even</div><div>extract radioactive elements which will make a us= eful power source.<br></div><div><a href=3D"https://www.researchgate.net/pr= ofile/Mohammad-Hajabbasi-3/publication/228501165_Heavy_Metals_Extraction_Po= tential_of_Sunflower_Helianthus_annuus_and_Canola_Brassica_napus/links/0dee= c51a33592a6fa7000000/Heavy-Metals-Extraction-Potential-of-Sunflower-Heliant= hus-annuus-and-Canola-Brassica-napus.pdf?origin=3Dpublication_detail">https= ://www.researchgate.net/profile/Mohammad-Hajabbasi-3/publication/228501165_= Heavy_Metals_Extraction_Potential_of_Sunflower_Helianthus_annuus_and_Canola= _Brassica_napus/links/0deec51a33592a6fa7000000/Heavy-Metals-Extraction-Pote= ntial-of-Sunflower-Helianthus-annuus-and-Canola-Brassica-napus.pdf?origin= =3Dpublication_detail</a></div><div><br></div><div>[5] Glass 3D Printing</d= iv><div>Glass has interesting advantages. In particular, it is easily shape= d and</div><div>can be made to fit areas without fasteners.<br></div><div><= a href=3D"https://oxman.com/projects/glass-3d-printing">https://oxman.com/p= rojects/glass-3d-printing</a></div><div><br></div><div>[6] TIRES - A Robot = / Human Cooperative Effort To Change Tires.</div><div>This is research I di= d at CMU with Scott Fahlman. <br></div><div><br></div><div>[7] 3D printed m= etal</div><div>There are various parts that need metal. In particular we ne= ed to be</div><div>able to create 3D printed servo motors.<br></div><div><a= href=3D"https://markforged.com/3d-printers/metal-x">https://markforged.com= /3d-printers/metal-x</a></div><div><br></div><div>[8] iRobot Create3</div><= div>Foraging is a whole other problem that is still "on my horizon&quo= t;. But I</div><div>have a deep background in vision so it is easy to creat= e a prototype.<br></div><div><a href=3D"https://edu.irobot.com/what-we-offe= r/create3">https://edu.irobot.com/what-we-offer/create3</a></div><div><br><= /div><div>[9] Navel Gazing<br></div><div><a href=3D"https://www.merriam-web= ster.com/dictionary/omphaloskepsis">https://www.merriam-webster.com/diction= ary/omphaloskepsis</a></div><div><br></div><div>[10] Harmonic drives<br></d= iv><div><a href=3D"https://www.harmonicdrive.net/technology/harmonicdrive">= https://www.harmonicdrive.net/technology/harmonicdrive</a></div><div><br></= div><div>[11] Linear diffraction grating</div><div>Lasers can be used with = these gratings to patterns based on <br></div><div>position and orientation= . This makes it ideal for remotely measuring</div><div>things like robot en= d-effector pose.<br></div><div><a href=3D"https://www.newport.com/n/diffrac= tion-grating-physics">https://www.newport.com/n/diffraction-grating-physics= </a></div></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class= =3D"gmail_attr">On Tue, Jul 19, 2022 at 8:33 AM Clifford Yapp <<a href= =3D"mailto:[email protected]">[email protected]</a>> wrote:<br></div= ><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border= -left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div cl= ass=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, Jul 19, 2= 022 at 12:31 AM Svjatoslav Agejenko <<a href=3D"mailto:svjatoslav@svjato= slav.eu" target=3D"_blank">[email protected]</a>> wrote:<br></div= ><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border= -left:1px solid rgb(204,204,204);padding-left:1ex">Maybe that higher level = language<br> can be compiled to forth or forth byte-code, or forth should be<br> used to implement lisp ?<br></blockquote><div><br></div><div>Interesting yo= u should mention that - I'm aware of a couple cases were people looked = at Lisp implemented in Forth, although I don't think any of them were i= ntended to become something that might support full fledged production syst= ems:</div><div><br></div><div>=C2=A0A Forth implementation of Lisp by T. Ha= nd in 1988=C2=A0 (<a href=3D"http://soton.mpeforth.com/flag/jfar/vol5/no1/a= rticle22.pdf" target=3D"_blank">http://soton.mpeforth.com/flag/jfar/vol5/no= 1/article22.pdf</a>)</div><div><br></div><div>The code for Mark Probst'= s forthlisp on github:=C2=A0 <a href=3D"https://github.com/schani/forthlisp= " target=3D"_blank">https://github.com/schani/forthlisp</a></div><div><br><= /div><div><br></div></div></div> </blockquote></div> --0000000000009f029b05e42adb5d--