klipse

jrheard 2016-10-27T16:08:23.000121Z

@viebel - is it possible to have klipse plugin snippets (is there a word for these?) run inside of another, surrounding expression?

jrheard 2016-10-27T16:08:27.000122Z

this isn’t necessary, i’m just curious

jrheard 2016-10-27T16:08:47.000123Z

eg i’m thinking about a blog post where there are 5-6 snippets, each of which ends with a call to (draw-grid a-grid)

jrheard 2016-10-27T16:09:10.000124Z

and i’m going to supply draw-grid offscreen, in a visibility:hidden snippet, because its implementation details are off-topic; the blog post is about grids, not the html5 canvas

jrheard 2016-10-27T16:09:42.000125Z

and so the idea would be that each snippet has a <canvas> immediately under it, and each snippet’s call to draw-grid draws to that specific canvas

jrheard 2016-10-27T16:11:04.000126Z

i can accomplish this by just having this utility function have an API like (draw-grid a-grid :canvas-1), but i wanted to make sure there isn’t a way to eg have some code run offscreen that makes a snippet run in a (binding [*which-canvas* :canvas-1]) expression, so the draw-grid call can just look like (draw-grid a-grid) and the user doesn’t have to even think about what’s going on

Yehonathan Sharvit 2016-10-27T17:46:02.000131Z

klippet - klipset - snipperactive - what else? @jrheard

Yehonathan Sharvit 2016-10-27T17:46:31.000132Z

@mfikes do you have a good idea for of name to the klipse interactive snippets ?

jrheard 2016-10-27T17:47:58.000134Z

“klipse snippet” works just fine for me tbh

jrheard 2016-10-27T17:48:11.000135Z

just wanted to see if there’s already a different preexisting vocabulary word for ‘em 🙂

Yehonathan Sharvit 2016-10-27T17:49:12.000136Z

I’m trying to think about your question re: wrapping snippets

jrheard 2016-10-27T17:49:54.000137Z

i think “no” would be a totally fine answer to my question 😄

jrheard 2016-10-27T17:50:00.000138Z

it could be a super bad idea

Yehonathan Sharvit 2016-10-27T17:50:26.000139Z

another way of achieving almost the same result would be to let each snippet provide a “pre-run” piece of code

Yehonathan Sharvit 2016-10-27T17:50:41.000140Z

via some html attribute like data-pre-run

jrheard 2016-10-27T17:50:49.000141Z

yeah, like setting a canvas-id atom to “canvas-2"

jrheard 2016-10-27T17:50:56.000142Z

that would work great for this situation for sure

Yehonathan Sharvit 2016-10-27T17:50:57.000143Z

exactly

Yehonathan Sharvit 2016-10-27T17:51:16.000144Z

Would you like to make a PR?

jrheard 2016-10-27T17:51:44.000145Z

sure why not - will take a look this afternoon

jrheard 2016-10-27T17:52:06.000146Z

cat is sleeping on one hand atm

Yehonathan Sharvit 2016-10-27T17:52:12.000147Z

ok

Yehonathan Sharvit 2016-10-27T17:52:26.000148Z

don’t hesitate to send me questions

Yehonathan Sharvit 2016-10-27T17:52:37.000149Z

but keep in mind that I’m in UTC+2

Yehonathan Sharvit 2016-10-27T17:52:54.000150Z

so, don’t be upset if I’m not responsive on slack

jrheard 2016-10-27T17:52:56.000151Z

ha npnp

Yehonathan Sharvit 2016-10-27T17:53:03.000152Z

it’s ok to send messages 24/7

Yehonathan Sharvit 2016-10-27T19:27:20.000153Z

test.check documentation with klipse will look like this