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

made a similar plugin some time ago, discussing #1

Closed
michaelb opened this issue Aug 13, 2021 · 6 comments
Closed

made a similar plugin some time ago, discussing #1

michaelb opened this issue Aug 13, 2021 · 6 comments

Comments

@michaelb
Copy link

Hi, I'm the main dev of https://github.com/michaelb/sniprun.

It's not really an issue, more of a discussion (but discussion aren't enabled on your repo). Feel free to close at any time if not relevant or anything.

Just some context; Sniprun is a code-runner plugin that can execute code from the editor. It has several features such as various possible output; REPL-like mode for some languages, markdown-blocs support, auto-fetch of imports...

  • What motivated you to make this plugin ?
  • Did you search for any alternatives before starting your project, and if so, how ?
  • Did you know about sniprun (I guess not but your never know) ?
  • How do you think the two compare ?
@jubnzv
Copy link
Owner

jubnzv commented Aug 13, 2021

Hi Michael,

Initially, I didn't plan to make a separate plugin. I was preparing to technical interviews and my language of choice was too tricky, so I decided to start writing some notes in markdown, describing some border cases of the language. These notes, of course, usually include some pieces of source code.

In the past, I was a big fan of Emacs's org-mode, and I remember the feature of evaluating code blocks inside org documents. It could be really useful to me, because I need to a way to have executable code blocks, like Jupiter notebooks, so that I can experiment with them and make some notes in the same document.

So I created several functions in my Lua configuration file that implemented evaluation of code blocks. Then I saw that they could be separated as a plugin, and created this repository.

Answering your questions about Sniprun, I found it interesting. You've implemented much more functionality and already have some users.

I didn't know about it when I started working on my plugin. But probably, I'd create my own plugin anyway, because I needed a simple tool for a single use case described in the README. And also I'm not very familiar with Rust.

Anyway, I solved my task and I'm not planning to add more functionality to this plugin. So I won't compete with Sniprun in any way.

@michaelb
Copy link
Author

So I won't compete with Sniprun in any way.

That wasn't a concern (nice 'competition' like this is fun anyway). I mostly wanted to inquire (without looking at the code for too long) whether there was some fundamental difference between our projects

The way you display the result is nice though, do you mind if I do something similar ?

@jubnzv
Copy link
Owner

jubnzv commented Aug 13, 2021

Ah, well, of course I don't mind if you'll implement something similar. Moreover, you can use this code according to MIT license, if it could be useful.

But I personally recommend you to take a look at this section of the documentation of org-mode first. This tool is fascinating, I believe you can get much more ideas there.

@michaelb
Copy link
Author

Thanks! Have a good day

jubnzv added a commit that referenced this issue Aug 15, 2021
@jubnzv
Copy link
Owner

jubnzv commented Aug 15, 2021

Good luck with your project :)
I also mentioned sniprun in README.

@michaelb
Copy link
Author

Wow! Thanks!

I'll ping here if I decide to support Orgmode files one day :-)

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

2 participants