Chapter 17 - Walk in the Park

310 17 17
                                    

My mouth fell open as Kyrie started walking us down the hallway.

"You GROW computers??"

"Yep! We genetically engineer plants to perform both specific and general computations, for a variety of use-cases."

She looked at a camera set in the wall for a retina scan, before the glass doors opened automatically and we followed her into her lab. The modern space looked more like a conservatory than a lab, with a lofty ceiling, large skylight spanning its full length, and indoor palm trees. However, the banks of desk-lamp-sized plants, wires running everywhere, and floating holograms definitely made it a lab!

"How does the computational mechanism work? Is it cell-level? What are the input/output streams?"

"Great questions, I can see why Mike brought you now," she giggled gleefully. "Basically, groups of cells in the plant act as ALUs — Arithmetic Logic Units — to perform simple computations like addition, subtraction, conjunction, disjunction, bit shifts... every single n-bit calculation you can imagine. They use a combination of bioelectrical signals and enzymes to communicate with other cells that store data temporarily, and finally wires tap changes in bioelectrical voltage across parts of their stems for I/O. It's all solar-powered through photosynthesis, and the plants even generate oxygen as a byproduct!"

"Wow!" I found myself once again lost for words. Biological computation back home was in its infancy, and growing entire plants to act as processors blew my mind.

"What's the throughput up to?" Mike asked.

"We've hit two megaflops per plant in bursts, but nothing crazy yet. I think we can expect to double that by next week's batch though. We're still tweaking core implementation details, particularly on the inter-cellular level, to maximize power delivery."

"Nice. How do you program it?"

"A custom assembly language called PAL — Plant Assembly Language — for now; we'll develop support for higher-level languages and start cross-compiling popular compilers like GCC over once we get enough computing power to run a bytecode runtime environment. Our goal is to run Freax on it someday. Wanna try writing something in PAL and running it?"

"Hell yeah!"

Mike and I got a quick lesson on PAL syntax, before we got a chance to flex our assembly muscles and write some code ourselves. I noticed that the touchboard provided to me automatically reconfigured its keys to my preferred mapping when Mike sat me down in front of it.

I wrote a simple Fibonacci sequence program, which would take a number n as an input and output the nth Fibonacci number. Each successive number was calculated by adding the previous two, with the first two being '1', so I got a bit of a workout implementing recursion in assembler. I made sure to add a couple of sanity checks to short-circuit my code and exit if weird inputs were provided, before sending it over to Kyrie.

Mike wrote FizzBuzz, another classical programming problem, which was based on the children's game that they apparently called 'FloofBoop' here. The plant would print numbers starting from 1, replacing any number divisible by 3 with 'Floof', any number divisible by 5 with 'Boop', and any number divisible by 15 with 'FloofBoop'. The assembler didn't support strings, so Mike used -1 for Floof, 0 for Boop, and -10 for FloofBoop instead.

Kyrie typed a few commands to feed our programs to the nearest two plants. We were pleasantly surprised when the output holograms hovering above them appeared to show both programs working on the first try! Not everyday when the first thing you write in assembly works on the first try! Kyrie took advantage of one of my sanity checks to halt my code by inputting -1 after trying a couple different numbers, exiting the program.

Your MoveWhere stories live. Discover now