Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sharing code with other users #8

Open
scripting opened this issue Nov 11, 2021 · 3 comments
Open

Sharing code with other users #8

scripting opened this issue Nov 11, 2021 · 3 comments

Comments

@scripting
Copy link
Owner

Gary Teter wrote yesterday:

Why can't I just break off a chunk of code, and let other people use it?

All we need is a verb that reads a URL, call it from a startup script, and you've now just loaded someone else's code.

I'm pretty sure that kind of thing is pretty easy in JS. I know I've done it with CSS, and there is a verb that does this for CSS.

@scotthansonde
Copy link

NPM for Drummer shudder

Seriously, JavaScript imports, maybe?

@PostMonsterG
Copy link

PostMonsterG commented Nov 21, 2021

There's actually two aspects to that "let other people use it" idea—

  • Let people add it to Drummer and run it locally
  • Let people call it remotely in the cloud

This example is for the first type.

I'm calling it a "snippet" mostly because I don't have any better suggestions at the moment. But basically the idea is, this is a little, useful, chunk of Drumkit.

In some hypothetical future there might be some sort of discovery mechanism, installer, blah blah.

I think one would probably want to do the distribution via GitHub, since it provides versioning, permanence, content signatures, etc. But since I figure the best way to package it up will be OPML, I went ahead and made an example one here:

http://drummer.scripting.com/PostMonsterG/DocserverLookup.opml

I actually can't view a raw OPML file on the iPad, but this looks about right to me in Drummer. I wonder if "Drumkit" is a node type, or if it should be.

I think, I am not sure, but in my dream world, what I actually put into my icon bar outline is actually just a link to this opml, rather than copy-pasting.

@PostMonsterG
Copy link

PostMonsterG commented Nov 22, 2021

Here is another sample Drumkit thingie.

This one sends the current outline over to iA Writer on the iPad. Works pretty good for Markdown, in my limited testing.

http://drummer.scripting.com/PostMonsterG/OpenInIAWriterAsNewFile.opml

I'm also refining how I want my Drumkit code to look. I was pleased to discover Drumkit gives me some very nice tools for this, like bold and italics in comments, and block indents that don't have to correspond to language structure.

In addition to wondering if there is (or should be) a Drumkit node type, I'm also wondering if there should be an executable flag. (Maybe it's useful to have Drumkit code that can't be executed? I dunno.)

Note: These examples aren't being proposed as a standard, or anything, I'm just exploring what code and documentation might look like in Drumkit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants