Fork me on GitHub

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


this isn’t necessary, i’m just curious


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)


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


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


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 Sharvit17:10:02

klippet - klipset - snipperactive - what else? @jrheard

Yehonathan Sharvit17:10:31

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


“klipse snippet” works just fine for me tbh


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

Yehonathan Sharvit17:10:12

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


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


it could be a super bad idea

Yehonathan Sharvit17:10:26

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

Yehonathan Sharvit17:10:41

via some html attribute like data-pre-run


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


that would work great for this situation for sure

Yehonathan Sharvit17:10:16

Would you like to make a PR?


sure why not - will take a look this afternoon


cat is sleeping on one hand atm

Yehonathan Sharvit17:10:26

don’t hesitate to send me questions

Yehonathan Sharvit17:10:37

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

Yehonathan Sharvit17:10:54

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

Yehonathan Sharvit17:10:03

it’s ok to send messages 24/7

Yehonathan Sharvit19:10:20

test.check documentation with klipse will look like this