Oblivion icon indicating copy to clipboard operation
Oblivion copied to clipboard

Feature Request: Interactive Oblivion Snippets

Open viebel opened this issue 8 years ago • 14 comments

Would you like to have interactive Oblivion Snippets integrated into Klipse?

Something like the Oblivion playground but with editabe snippets that one could easilly embed in a blog post.

See for example: http://read.klipse.tech/a-new-way-of-teaching-html-and-css/ and http://read.klipse.tech/how-to-create-amazing-textures-in-javascript/

viebel avatar Mar 19 '17 10:03 viebel

This would be awesome! How would this be done ? Do you need a standalone version of the compiler? It's in the lib for.

jweinst1 avatar Mar 19 '17 19:03 jweinst1

Indeed, I need a standalone version of the compiler. Could you make a jsfiddle with an minimal example of a source code and its compilation?

viebel avatar Mar 19 '17 20:03 viebel

yup!

jweinst1 avatar Mar 19 '17 21:03 jweinst1

https://jsfiddle.net/jweinst1/bn0w019m/

jweinst1 avatar Mar 19 '17 22:03 jweinst1

@viebel does that fiddle work?

jweinst1 avatar Mar 21 '17 18:03 jweinst1

@jweinst1 Yes. I have been able to make the integration. Will deploy a new version of the plugin soon. Have a look at my local test page:

oblivion

viebel avatar Mar 21 '17 19:03 viebel

woah sweet! nic job

jweinst1 avatar Mar 21 '17 20:03 jweinst1

@jweinst1 Oblivion is available inside Klipse!!!

Here is a demo page: http://blog.klipse.tech/data/2017/03/22/oblivion.html

A couple of things we could improve:

  • find a CodeMirror mode that fits Oblivion's syntax
  • The height of the generated SVG is a bit too big

viebel avatar Mar 22 '17 04:03 viebel

Excellent!

As for the codemirror, the language is very similar to Ruby's syntax (gotta swap _ for end), so in theory one can just change the ruby mode a little to make it easier.

jweinst1 avatar Mar 22 '17 07:03 jweinst1

OK. Cool.

I have just deployed a new version of the Klipse plugin with ruby mode. Please make sure (in the browser console) that you get Klipse version 7.0.2

What are you going to do with the Klipse plugin?

viebel avatar Mar 22 '17 07:03 viebel

What are you going to do with the Klipse plugin?

Use it for examples on the website, and possibly other sites as time goes on :)

jweinst1 avatar Mar 22 '17 17:03 jweinst1

On the website, for interactive documentation purposes, I guess.

What use case do you have in mind for other sites?

viebel avatar Mar 22 '17 17:03 viebel

What use case do you have in mind for other sites?

No idea yet, possibly teaching tools for functional programming? Part of the motivation for this language was a functional language with less parnthesis than scheme.

jweinst1 avatar Mar 23 '17 17:03 jweinst1

teaching tools for functional programming

You might be interested by the work of this guy - http://blog.josephwilk.net/clojure/functions-explained-through-patterns.html

He is also working on an interactive version that works in the browser using Klipse and Clojure http://blog.josephwilk.net/functions-as-patterns/resources/

viebel avatar Mar 23 '17 19:03 viebel