inline console log plugin

52 views
Skip to first unread message

Ian Johnson

unread,
Sep 4, 2013, 2:04:05 AM9/4/13
to trib...@googlegroups.com
I finally got around to turning this prototype into a plugin:

simple example:

try playing with the r property of a or b:
http://tributary.io/inlet/6432958

it can get pretty slow with longer inlets because its parsing twice (once for syntax correction and once for the console.log stuff). probably not parsing super efficiently either...

but it should be really convenient while developing to quickly see what some value is. 

shoutout to josephg for putting me on esprima and breaking it down for me.
i got a lot of the code for the parsing from https://github.com/nornagon/live/blob/master/xform.coffee
thanks EJ for making this look good.

--
Ian Johnson - 周彦

Ian Johnson

unread,
Sep 4, 2013, 2:11:47 AM9/4/13
to trib...@googlegroups.com
an interesting thing happens if you have animation (or loops really)

pause it to stop the logs from going on forever. you can just make any change to the code to clear the logs.

theta theta

unread,
Sep 4, 2013, 8:47:19 AM9/4/13
to trib...@googlegroups.com
oh boy! 

inline logging, will find ways to get used to that :) 

Vikram Mirla

unread,
Sep 20, 2013, 3:53:33 PM9/20/13
to trib...@googlegroups.com
This is very useful plugin Ian. Thanks for your effort.

Vikram Mirla

unread,
Sep 20, 2013, 4:36:07 PM9/20/13
to trib...@googlegroups.com

For this inlet
tributary.io/inlet/6643039

the inline console.log feature is enabled - which is good for me.

but, when I created a new inlet, I was not able to debug using console.log.

should any library be loaded to enable the inline console.log feature?





On Wednesday, September 4, 2013 2:04:05 AM UTC-4, Ian Johnson wrote:

Ian Johnson

unread,
Sep 22, 2013, 11:36:32 PM9/22/13
to Vikram Mirla, trib...@googlegroups.com
Hi Vikram,

I'm glad you like it. You can turn it on in the config section. I've attached a gif :)

Unfortunately there is a bug with escodegen (which I'm using to make it work) 
so some code will inexplicably not work (namely chained functions that aren't saved into a variable).

hopefully they resolve it soon!



--
You received this message because you are subscribed to the Google Groups "Tributary" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tributary+...@googlegroups.com.
Visit this group at http://groups.google.com/group/tributary.
For more options, visit https://groups.google.com/groups/opt_out.
inlinelogging.gif

Vikram Mirla

unread,
Sep 26, 2013, 12:08:25 PM9/26/13
to Ian Johnson, trib...@googlegroups.com
Thanks Ian for responding to my question
Reply all
Reply to author
Forward
0 new messages