
Observable Playground - mbostock
https://beta.observablehq.com/playground
======
tlarkworthy
I have been playing with Observable for a few months now, and it is the
programming environment of my dreams.

There have been many times in the past I wish I could preview the results of a
computation when tuning parameters or data, and this allows me to do it and
without restricting my expressiveness or domain. Note: I am predominately
thinking of graphical and data exploration use cases.

An example where I think observablehq has allowed me to go beyond the status
quo is my port of Wave Function Collapse
[https://beta.observablehq.com/@tomlarkworthy/wave-
function-c...](https://beta.observablehq.com/@tomlarkworthy/wave-function-
collapse) (early stages). I added the ability to mask individual tiles in the
tilesets dynamically and the effect on the generated images is non-intuitive
but very satisfying. Manually editing the tilesets in XML which is what the
original requires would be too laborious, so its a domain where observablehq
really shines. I have more work to make it truly idiomatic of observablehq but
the sign that its a genuine force multiplier is there.

~~~
mbostock
Thank you for the encouragement!

------
octref
I like everything about Observable but the editing experience. In 2018 no one
wants to write code like writing txt files.

Is there any plan to adopt Language Server Protocol so at least users could
get auto completions? But with the custom syntaxes to JS I guess Observable
can't just use plain TypeScript Language Server.

~~~
tmcw
Hey there - have you tried hitting Tab while editing code? We've implemented
dynamic code completion that works in a surprising number of cases where no
other completion can work - for example, completing properties of API
responses, based on the real values in the environment.

But, of course we have a long way to go, especially relative to the
VSCode/TypeScript ecosystem.

~~~
octref
Never know that existed! Maybe you can improve discoverability by doing that
on typing a dot.

------
geo_mer
You are a unique innovator Mike, I am not really into visualization but I am a
big fan of yours.

------
xtagon
This is really neat! Is there a way to embed these cells into another site, so
they could be used in a blog for example?

~~~
jashkenas
There sure is!

Here's the introductory post, explaining how you can download or link
Observable notebooks as ES modules, and use the open-source runtime to
evaluate notebooks or just render specific cells:
[https://beta.observablehq.com/@jashkenas/downloading-and-
emb...](https://beta.observablehq.com/@jashkenas/downloading-and-embedding-
notebooks)

Here's an example of a toy notebook being embedded on another domain:
[http://ashkenas.com/breakout/](http://ashkenas.com/breakout/)

Finally, because Observable notebooks are of course, themselves, web pages,
here's an example of a notebook embedding itself:
[https://beta.observablehq.com/@jashkenas/ouroboros-a-
noteboo...](https://beta.observablehq.com/@jashkenas/ouroboros-a-notebook-
embeds-itself)

~~~
xtagon
Thanks so much!

------
watersb
I love Observable.

Word processors? Spreadsheets? PowerPoint? I see a shift towards interactive
notebooks. So weird to me that this innovation of Mathematica took twenty-five
years to gain traction, but yes please!

------
kevintb
Wow, this is cool, especially the tweet import. Can see this as being a vastly
improved Jupyter notebook for JS.

~~~
mbostock
Thanks! The ability to reuse code across notebooks—making notebooks analogous
to ES modules—I hope is one of the most powerful and interesting features of
Observable. You can see a few more examples of reusable notebooks here:

[https://beta.observablehq.com/collection/@observablehq/libra...](https://beta.observablehq.com/collection/@observablehq/libraries)

------
cheeaun
Seeing this on HN, almost thought it's no longer beta ;) (in the URL)

------
jmccarthy
Hey Mike! Thanks for d3, etc. Is the playground newly released today?

~~~
mbostock
We deployed it yesterday and announced it today.

