ANN: Quil on ClojureScript prototype

66 views
Skip to first unread message

Максим Карандашов

unread,
May 26, 2014, 4:11:36 AM5/26/14
to clj-pro...@googlegroups.com
Hello all! I'm working on adding support ClojureScript to Quil library (https://github.com/quil/quil/tree/master) as part of GSOC program.

I created first prototype of Quil on ClojureScript. You can find it here - https://github.com/Norgat/quil/tree/cljs
And I write simple example - https://github.com/Norgat/quil-cljs-examples

For install Quil on ClojureScript use:

cd quil
lein install

For install and run examples:

cd quil-cljs-examples
lein compile

and open web/index.html in your browser.



I really want to get you feedback in next questions:

1. What are you think about sketch initialization on HTML page? Do you prefer have a sketch init and run function or you prefer that sketch initialize and run automatically or both feature together? Or something else?

2. How do you prefer to connect an external libraries in ClojureScript. Why? What would you prefer to see in Quil?

3. If you have any ideas on how to must look ClojureScript drawing library - please send them. This will help make the library better.

P.S. You could get this message twice, since I published it in several groups. To reach more people who may be interested. 

Erik Svedäng

unread,
May 27, 2014, 3:18:29 AM5/27/14
to clj-pro...@googlegroups.com
Nice work. This is very exciting!

Erik

Przemysław Wojnowski

unread,
Jun 2, 2014, 4:26:52 AM6/2/14
to clj-pro...@googlegroups.com
Hi.


1. What are you think about sketch initialization on HTML page? Do you prefer have a sketch init and run function or you prefer that sketch initialize and run automatically or both feature together? Or something else?
 IMHO sketch initialization should be separated from HTML page load, because in web apps most things are started using events (like button click or sth). If anyone wants to start sketch on page load it can be easily done like with all other JavaScript code. When it is separated one can init sketch many times on button click.

 
2. How do you prefer to connect an external libraries in ClojureScript. Why? What would you prefer to see in Quil?
I don't understand this one. ClojureScript is taking care of interaction between libraries.
 
3. If you have any ideas on how to must look ClojureScript drawing library - please send them. This will help make the library better.
Just "release fast, release often" and incorporate feedback. ;-)

Anyway, great work. This is very good project!

Cheers,
Przemek

Nikita Beloglazov

unread,
Jun 3, 2014, 3:30:02 PM6/3/14
to clj-pro...@googlegroups.com
Here is my 2 cents about initialisation. I think it would be nice to support 2 approaches.

1. Simple one, which doesn't require any knowledge how html/js/page loading/dom works. This is one is used when you simply playing with quil and not embedding it as part of other appication to a page and don't need fancy buttons and such things.
Use defsketch macro for this one. It will automatically start sketch as soon as page loads. It even may create canvas element and append to a page if :host option is not provided. In this approach you need empty html page and nothing more to start playing with quil.

2. Complex. If you want more control over when sketch is created - use sketch function and not defsketch macro. You can call sketch whenever you need, for example on button click. It takes same arguments as defsketch so it is easy to switch between them. Calling sketch starts sketch right away.

It would be somewhat consistent with current quil recommendations about using sketch and defsketch.

Thanks,
Nikita


--
You received this message because you are subscribed to the Google Groups "clj-processing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clj-processin...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages