# ToNotebook: Equivalent of Mathematica ToExpression

**URL:** <https://talk.observablehq.com/t/tonotebook-equivalent-of-mathematica-toexpression/3304>\
**Category:** Help\
**Created:** [May 15, 2020, 3:34pm UTC](https://talk.observablehq.com/t/tonotebook-equivalent-of-mathematica-toexpression/3304 "2020-05-15T15:34:31Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![dara](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/dara/32/3057_2.png) [@dara](https://talk.observablehq.com/u/dara)\
**Post date:** [May 15, 2020, 3:34pm UTC](https://talk.observablehq.com/t/tonotebook-equivalent-of-mathematica-toexpression/3304/1 "2020-05-15T15:34:31Z")

</div>

I am getting bold now that I like Observable more and more 🙂

[https://reference.wolfram.com/language/ref/ToExpression.html](https://reference.wolfram.com/language/ref/ToExpression.html)

Mathematica is a universal Turing machine, so it can execute any valid String input as a program. See the above link.

For procedural language programmers that is a whoopy dang do! But in AI and Machine Learning self-writing programming environments this is a Divine Gift so to say.

By Self-writing I mean a program that could modify itself or write a new program in runtime.

**So we can design and code notebooks that design and code notebooks.**

Q: Why this is so important?  
A: In such self-writing programming environments we can input Strings which can be Textually Transformed to a new String to achieve a grammatical or heuristic alteration, and if this input String represents a valid program then we can have notebooks which Textually Transform notebooks into new ones with new instances of desired functionality.

Where did we used these?

1. Self-writing Neural Nets when we do not know the original connectivity of the nodes in the network

2. Non-standard Neural Networks which have no know no training algorithm

3. Symbolic Fit or Symbolic solvers where approximate better and better symbolic solutions to solve a problem

An example of a practical such application for Observable notebook:

Data Driven Self-modifying or Self-writing Notebook which calls Classifiers and predict functions to modify questionnaires or forms which are actually Observable notebooks!

We did some prototypes of these in Wolfram Cloud Forms:

[https://reference.wolfram.com/language/howto/CreateInstantWebForms.html](https://reference.wolfram.com/language/howto/CreateInstantWebForms.html)

But sadly Wolfram Cloud Forms are too primitive for most applications.

Now we like to investigate and build some prototypes for Observable …

Dara

---

_[View the full topic](https://talk.observablehq.com/t/tonotebook-equivalent-of-mathematica-toexpression/3304)._
