Posted on April 3rd, 2012 by Bo Morgan
Memory fragmentation limits the lifetime of programs that allocate and free memory throughout their run-time.
Funk2 now implements a defragmenter that runs before saving any compiled memory image.
A defragmenter is difficult to implement in a programming language, such as C or C++ because as used memory is consolidated, every memory pointer in the entire running program must be corrected to reflect all new memory block positions.
Funk2 now handles this "pointer fixing" behind the scenes by keeping track of all Funk2 pointer references and fixing them automatically.
This effectively removes any fragmentation-based lifetime limitation of any Funk2 program.
The current implementation introduces a 40x optimization for saved memory images.
See this article on defragmentation problems in heap-based dynamic C/C++ memory allocators, e.g. malloc and free (C) or new[] and delete (C++).
Posted on January 16th, 2012 by Bo Morgan
The new Funk2 Wiki on GitHub has up-to-date tutorials on downloading, installing, and learning to program in Funk2!
This tutorial is meant as a place for users to share their solutions to problems they have faced when programming with the Funk2 programming language.
A Lisp-like introductory programming tutorial introduces the language.
Many other practical necessities for using the language are also included, such as package management, parallel process management, and even an introduction to causal reflective tracing!
Please take a look, try out the examples, and give the authors feedback on what you would still like to see!
Also, the Wiki is meant as a public democratic place where users can share their own experiences and expertise, so please exercise your right to contribute.
Posted on February 19th, 2011 by Bo Morgan
Process triggers are a new Funk2 core object that allows for multiple parallel processes to wait for a specific trigger signal object to be triggered by a controlling process.
The following is a simple example that defines a global trigger named my-trigger.
Next, we enter a dotimes loop that loops ten times and creates ten parallel fibers (funk2 processes).
Each of these parallel fibers enters an infinite loop that simply waits for our trigger, my-trigger, to be triggered.
The last line triggers our trigger object, which allows all of our waiting processes to start running and they each end up printing a number from zero to nine.
[globalize my‑trigger [new fiber_trigger]]
[dotimes [i 10]
[let [[j i]]
[fiber [funk []
[while t
[wait‑for‑trigger my‑trigger]
[print j]]]]
nil]]
[have my‑trigger trigger]
While a fiber process is waiting for a trigger, it is paused, which means that it takes no system CPU resources.
This allows us to easily allocate thousands of different parallel processes that are efficiently controlled in this way.
Posted on February 19th, 2011 by Bo Morgan
You can now export screen renderings to PDF, SVG, postscript (PS) or PNG files from within the Funk2 programming language by includinig the Cairo package (i.e. [require cairo]).
An example Cairo application can be seen in the cairo-test directory included in the example directory in the source code.
The cairo test example can be included and run by typing, [require cairo], followed by, [cairo-test], which should output a test file for each available file format.
See the Funk2 Cairo package documentation for details about the Funk2 wrapper.
Posted on October 7th, 2010 by Bo Morgan
A basic natural language toolkit has been added to the Funk2 programming language.
A basic English dictionary and parser have been included for defining verbs and argument structures that can be used for adding knowledge and natural language control to cognitive architectures.
A new built-in package can be required with the [require natural_language] command.
Posted on September 4th, 2010 by Bo Morgan
A basic cognitive architecture has been included as an example package. This includes definitions for mind, mental_layer, agency, and resource objects.
These basic mental primitives can be included by requiring the mind package (i.e. [require mind]).
Also, when building a mind, using these architectural primitives, it is useful to see an overview of your mental model by using the new mindmon utility, which provides a graphical user interface to the mind.
Posted on June 23rd, 2010 by Bo Morgan
You can now create graphical applications within the Funk2 programming language by includinig the GTK package (i.e. [require gtk]).
An example GTK application can be seen in the gtk-test directory included in the example directory in the source code.
Posted on June 23rd, 2010 by Bo Morgan
A new package manager has been added to the Funk2 programming language.
A number of built-in packages are included in the default bootstrap image, and there is now a growing number of example packages that can be found in the example directory, included with Funk2 source code.
You can now use the [require package-name] command in order to load a package and all of its dependencies.
Posted on May 12st, 2010 by Bo Morgan
All programs fail, so let us embrace this failure and write systems that react to failure through reflection:
“Reflection is the business of man; a sense of his state is his first duty: but who remembereth himself in joy? Is it not in mercy then that sorrow is allotted unto us?”—William Shakespeare
Human intelligence is a complicated control system for accomplishing complicated goals.
Building artificial intelligence is a massive software engineering project that requires new ways for large teams of engineers to work together.
Funk2 is meant as a collaboration platform that provides reflective tracing of resposibility for bugs in distributed interactive software systems.
Posted on May 12th, 2010 by Bo Morgan
The funk object is as universal to Funk2 as the lambda object is to Lisp or Python.
Causally tracing funk execution and completion events allows us a powerful and intricate reflective tool.
These numerous and intricate events are compiled into graphs and other representations for both debugging as well as planning in order to avoid software failures.
Declarative and goal-oriented software systems that are not reflectively controlled are notoriously difficult to control and often attempt to solve problems by diving into an under constrained search.
Building pattern recognition that deals not only with the problem space but with the reflective space of the solver itself is necessary for learning to solve more difficult control problems.
Posted on May 12th, 2010 by Bo Morgan
IsisWorld is another core research effort supported by the Mind Machine Project that we are using to collaborate in developing reflective social commonsense reasoning cognitive models of humans.
Agents in IsisWorld are controlled through an XML-RPC interface.
The most recent IsisWorld interface in now included in the default distribution of Funk2 in order that AI researchers around the world can contribute to this large open software development and research project.
Posted on May 12th, 2010 by Bo Morgan
Funk2 is written in pure C, which makes incorporating the fastest libraries easy.
Xmlrpc-c is a lightweight implementation of this very abstract remote procedure call (RPC) protocol.
The XML-RPC protocol is an XML representation communicated through HTTP and is supported by all popular languages.
Python dictionaries, Java hashtables, and other hierarchical named complex data types from other languages can be easily communicated to and from Funk2's frame-based and directed-graph object representations.
Also, for data-intensive algorithms, the XML-RPC protocol supports the efficient communication of large amounts of raw binary data between correctly implemented versions of the protocol.
Posted on May 12th, 2010 by Bo Morgan
Procedural traces in Funk2 are labeled directed graphs.
These graphs are very large and difficult to visualize because of their size and complexity.
We are developing algorithms for simplifying the process of finding and recognizing critical patterns in these reflective traces.
Often, large and subtle but exact patterns must be found in order to correctly assign credit for a failure in a learning situation.
We have developed a fast labeled directed graph representation in Funk2.
See our graph matching example for a demonstration of a simple variable graph matching algorithm.
Posted on May 12th, 2010 by Bo Morgan
A port of Funk2 has been made to the CygWin platform, which now enables Microsoft Windows users to join the Funk2 distributed programming effort!
We have not completed a binary distribution package for the Windows operating system yet, but developers should have few problems compiling and installing Funk2 from source.
Please see the Funk2 download page in order to download the latest source package.
Posted on May 12th, 2010 by Bo Morgan
Binary packages for the Apple Macintosh operating system X (MacOS X) are now available!
Please see the Funk2 download page in order to download the latest MacOS X binary package for Funk2.
Posted on May 12th, 2010 by Bo Morgan
GraphViz is an open, free and fast graph visualization tool for labeled directed graphs.
We have included a very fast GraphViz compiler in Funk2 for generating and viewing our causal reflective traces.
See our GraphViz example for how this new facility of Funk2 can be used.
Posted on May 12th, 2010 by Bo Morgan
Fibers are to Funk2 as threads are to a C or Java application.
Funk2 is an abstract simulation of an operating system built out of Funk2 traceable memory.
Each Funk2 processor is an abstract object representing each processor core in it's host machine.
Each Funk2 processor is implemented as a POSIX thread (pthread).
Funk2 processors each have a scheduler that handles scheduling Funk2 fibers that represent parallel procedures, implemented as funks (traceable functions) of compiled bytecodes.
Because this entire operating system simulation is built out of traceable memory, this opens an avenue for easily building very intricate causally reflective traces.
The ability to run 1000 parallel fibers for a complete day is one step closer to the ability of the Funk2 programming to simulate large distributed concurrent systems.
See our parallel programming example for more details about how to create and control parallel fibers in Funk2.
Posted on May 12th, 2010 by Bo Morgan
Funk2 is largely inspired by Marvin Minsky's theory that the ability of humans to quickly adapt and switch between reflective representations and processes is a metacognitive problem of reflective control.
His book, Society of Mind, organizes and describes in surprisingly both dense and understandable English the hundreds of different types of reasoning that a human performs.
In his most recent book, The Emotion Machine, Prof. Minsky tells a story about how what we normally call “emotions” are actually self-reflective forms of control processes for switching between ways of thinking.
We have built and demonstrated basic reactive and deliberative planning algorithms in Funk2 that demonstrate simple aspects of the lower layers of this theory.
Thirty-five students completed two computer laboratory assignments within the Funk2 language that related the continuity between the contemporary fields of planning and reinforcement learning in relational domains to Prof. Minsky's theory for how to build a cognitive architecture.
Posted on May 12th, 2010 by Bo Morgan
Funk2 is the programming language that supports building large cognitive architectures, and a preliminary demonstration of the Moral Compass cognitive architecture was invited to be presented last week at Seed Magazine's head office in New York.
Read more about our visit on Seed Media Group's blog!
Posted on May 12th, 2010 by Bo Morgan
Funk2 is a free, open, programming language designed for causal reflective tracing and monitoring of complex control systems.
This project is developed by the Reflective Commonsense Thinking group at the MIT Media Lab.
Funk2 is primary meant as a novel artificial intelligence research tool for developing massive heterogeneous AI systems.
We expect our novel ways of reflectively controlling massive parallel systems to be useful to many diverse fields of computational application and theoretical modelling.