Pastebin IDE Integration request

36 views
Skip to first unread message

Antonio Mancuso

unread,
Feb 23, 2018, 10:11:59 AM2/23/18
to Developers
Hello everyone,
a new to this group and this is my first message.

I have done some search and look like this topic has not been discussed previously or not in the same way I am going to explain.


I am part of some Arduino groups on FB in Italy and I see many time a day that users, especially the inexperienced one, they post a picture of the screen to show their sketch and ask questions.

Personally I consider this habit quite bad, for the only reason that is very difficult to read (picture out of focus, low resolution ...).

I would like to share an idea with you and see if it might be of general interest.

Just imagine in the Tool menu to have a Pastebin (https://pastebin.com/) option.

The flow would be like this one:

1- the user select Tool->Pastebin option
2- IDE will send an API request to paste bin to format the code (assumption is that PC is connected to the Internet)
3- Pastebin will provide back to IDE the shareable link
4- IDE will display the link to the user in a pop up window or similar
5- user share the Pastebin link on FB or any other social or forum

Clearly it is possible to think a plugin mechanism to support other similar services to Pastebin 

What do you think? pro vs cons?

can it be of general interest? if so I am willing to develop it and try to make a pull request for possible merging

Thank you very much
Antonio Mancuso

PS: If this has already been discussed and I missed my sincere apologies.

 

Dennis Lee Bieber

unread,
Feb 23, 2018, 10:28:13 AM2/23/18
to devel...@arduino.cc
On Fri, 23 Feb 2018 06:53:32 -0800 (PST), Antonio Mancuso
<mancu...@gmail.com> declaimed the
following:


>
>Clearly it is possible to think a plugin mechanism to support other similar
>services to Pastebin
>
>What do you think? pro vs cons?
>

You are discussing /text/ -- why does it need to be shoved off to a
third party site requiring (as you mentioned) a live network connection?

Just cut&paste the /text/ into the message itself. How much of an API
is needed for that? So far as I know, practically every OS supports it
natively.

But of course -- that requires weaning these beginners from their slow
graphics heavy "every thing is in a web browser" culture. (Especially as it
is so difficult to maintain /formatting/ in a web-form, since HTML
compresses white-space to single spaces).



If it means anything -- when I encounter a post on some forum (though I
tend to only rely upon NNTP -- basic comp.* hierarchy, or as here,
gatewayed by gmane; I don't even like mailing-list format) asking for help
with /code/, and said code is hidden away behind some URL to a third party
site, I ignore the message. Those cryptic URLs (especially when using a
"shortener" intermediate) could mask a vector for a virus.

--
Wulfraed Dennis Lee Bieber AF6VN
wlf...@ix.netcom.com HTTP://wlfraed.home.netcom.com/

Antonio Mancuso

unread,
Feb 23, 2018, 11:12:55 AM2/23/18
to devel...@arduino.cc
Hello Dennis,
Comments inline

-----Original Message-----
From: Dennis Lee Bieber [mailto:wlf...@ix.netcom.com]
Sent: Friday, February 23, 2018 4:28 PM
To: devel...@arduino.cc
Subject: [Developers] Re: Pastebin IDE Integration request

On Fri, 23 Feb 2018 06:53:32 -0800 (PST), Antonio Mancuso <mancu...@gmail.com> declaimed the
following:


>
>Clearly it is possible to think a plugin mechanism to support other
>similar services to Pastebin
>
>What do you think? pro vs cons?
>

You are discussing /text/ -- why does it need to be shoved off to a third party site requiring (as you mentioned) a live network connection?

[AM]: pastebin provide the user/APi back with a link that can be later access and showing formatted source code with syntax highlight.


Just cut&paste the /text/ into the message itself. How much of an API is needed for that? So far as I know, practically every OS supports it natively.

[AM]: If a user cut & paste the source code into FB all the formatting is gone making the source quite difficult to read.
The goal here is to "automate" a procedure that can be clearly performed manually in the hope that if it is "easy" for the user it will be used avoiding or mitigating the bad habits I described inmy original message.

But of course -- that requires weaning these beginners from their slow graphics heavy "every thing is in a web browser" culture. (Especially as it is so difficult to maintain /formatting/ in a web-form, since HTML compresses white-space to single spaces).



If it means anything -- when I encounter a post on some forum (though I tend to only rely upon NNTP -- basic comp.* hierarchy, or as here, gatewayed by gmane; I don't even like mailing-list format) asking for help with /code/, and said code is hidden away behind some URL to a third party site, I ignore the message. Those cryptic URLs (especially when using a "shortener" intermediate) could mask a vector for a virus.

[AM]: I agree with you. At the same time I should recognize that on forum not as specialized at basic.comp.* are full of people which don't pay attention to those security details.
In my mind my ultimate goal is to help those type of people to continue to use Arduino IDE and HW and being able to post questions to people like me in a meaningful way.

Obviously for more experienced people all this is not needed.

Last but not least the feature I am proposing will be just to be intentionally selected by user, in other words is just an option.
The one who don't want to use they can just ignore it.

Thnx
Antonio

--
Wulfraed Dennis Lee Bieber AF6VN
wlf...@ix.netcom.com HTTP://wlfraed.home.netcom.com/

--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

Adrian Godwin

unread,
Feb 23, 2018, 1:05:06 PM2/23/18
to Developers
There's no one-size-fits-all for pasting onto random sites. Pastebin isn't ideal - it now wants you to log in before you can use it. Pasting direct onto facebook would likely require constant work to keep up with their changes. You don't want to process the text : you might fail to render some critical semicolon or meaningful whitespace and mislead more than you help.


If I want to see what someone's done wrong, I probably want to scroll through the code and find other things, or try to compile it myself. But the user might not want to paste his whole code - just the bit they think is causing trouble.

I think you have to accept that web stuff is only going to get more graphical and the bandwidth wasted by an upload of an image instead of text is irrelevant when people use the net for live video.

If you do want some easy way to share stuff, I'd suggest you either have a 'screenshot' button to help them avoid using a phone camera (or find out how to screen shot on their OS - it always seems to be obscurely difficult), or 'submit to github' for the whole project. Both have their merits.

 

To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@arduino.cc.


--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@arduino.cc.

Antonio Mancuso

unread,
Feb 23, 2018, 1:15:18 PM2/23/18
to devel...@arduino.cc

May be I was not making myself clear (apologies for my broken English).

 

The goal is to avoid any formatting, hence the use of a webservice which does formatting for the user.

 

The ONLY result of paste bin is a http url like this:

 

https://pastebin.com/YeFDRqFY

 

This will avoid any possible issue of formatting.

 

The user will select Tool->pastebin (this is just an example) and get back this URL. Nothing else

 

Then the user will cut&paste this URL in any forum, social network, email  he/she wants.

 

Pastebin does not require nay login.

If you use it from API (my case here) just requires token which is very common practice for modern REST API

 

I hope I am able to better convey my idea..

 

Thnx

Antonio

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.



--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

 

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

Dennis Lee Bieber

unread,
Feb 23, 2018, 2:34:55 PM2/23/18
to devel...@arduino.cc
On Fri, 23 Feb 2018 19:15:10 +0100, "Antonio Mancuso"
<mancu...@gmail.com> declaimed the
following:

>
>The goal is to avoid any formatting, hence the use of a webservice which does formatting for the user.
>
Any service that does ANY change in formatting means one is not
reviewing the same code as the original problem code.

While I don't think anyone has produced a Python port for Arduino --
Python is reliant upon white space and any change in indentation could
create an invalid program -- that includes changing tabs to sequences of
spaces or the reverse, since the Python interpreter considers a tab
character to be equivalent to 8 spaces. Having something convert a tab to 4
spaces changes indentation of that line, and if all lines in a block are
not at the same indentation it is an error.

Jim Leonard

unread,
Feb 23, 2018, 2:49:03 PM2/23/18
to devel...@arduino.cc
On Fri, Feb 23, 2018 at 02:34:42PM -0500, Dennis Lee Bieber wrote:
> On Fri, 23 Feb 2018 19:15:10 +0100, "Antonio Mancuso"
> <mancu...@gmail.com> declaimed the
> following:
>
> >
> >The goal is to avoid any formatting, hence the use of a webservice which does formatting for the user.
> >
> Any service that does ANY change in formatting means one is not
> reviewing the same code as the original problem code.
>
> While I don't think anyone has produced a Python port for Arduino --
> Python is reliant upon white space and any change in indentation could
> create an invalid program -- that includes changing tabs to sequences of
> spaces or the reverse, since the Python interpreter considers a tab
> character to be equivalent to 8 spaces. Having something convert a tab to 4
> spaces changes indentation of that line, and if all lines in a block are
> not at the same indentation it is an error.
>
>

You're sitting here denigrating pastebin but you clearly have no idea what it does. If you did you'd know that this wasn't an issue.

Pastebin is specifically designed for sharing short pieces text, especially code snippets in a form that is convenient for people to use. The "reformatting" that they do is in terms of language specific color highlighting of the code. Much like a good IDE environment. This tends to make things more readable and more useful for a person doing a quick overview of the code.

Peter Feerick

unread,
Feb 24, 2018, 1:11:32 AM2/24/18
to devel...@arduino.cc
Jim beat me to the punch, but the only 'reformatting' that Pastebin does is syntax highlighting. It does not reformat your code, change whitespace, etc... it preserves the format of what you paste... and you can also access the raw 'as pasted with no syntax highlighting' source also if you do think it has done something hinky.

I can see it solving a problem for beginners... having a menu option/toolbar option that gives them a one-click way of giving someone a link to their source code. It's not for everyone, but it would be a nice option to have. 

Pete

Peter Feerick
BIT, BLDes CQU

--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@arduino.cc.

jerry w

unread,
Feb 26, 2018, 3:14:10 AM2/26/18
to devel...@arduino.cc
if it could be generalized, so that any similar service,
and user settable, say someone doesn't like PasteBin, FaceBook, or Google, etc,
Say their employers, for security reasons,
and/ or contractual, competitive or any other reasons/preferences,
don't allow brand x, y, and/or z, 
then a drop in replacement of something else is available...
Overloading, if that is available in the source languages..

Antonio Mancuso

unread,
Feb 26, 2018, 4:10:03 AM2/26/18
to devel...@arduino.cc

Indeed what I was proposing is a plug-in mechanism so it will be possible to use any similar service.

 

User can install the plug-in he/she wants to use. PasteBin was just an example as I use it but any other service will be good as well

 

 

From: jerry w [mailto:jerr...@gmail.com]
Sent: Monday, February 26, 2018 9:14 AM
To: devel...@arduino.cc
Subject: Re: [Developers] Re: Pastebin IDE Integration request

 

if it could be generalized, so that any similar service,

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

 

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

Darth Maker

unread,
Feb 28, 2018, 7:28:02 PM2/28/18
to Arduino Developers
In particular, pastebin.net is one of the poorer options, with (visually and sometimes audibly) noisy (video!) ads. The circles I'm in tend to favor gist.github.com. Another good default is bpaste.net, which has a very minimal interface, and allows posting their simple form arbitrarily (simple http post request).

To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@arduino.cc.

 

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@arduino.cc.

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@arduino.cc.

--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@arduino.cc.

Peter Feerick

unread,
Feb 28, 2018, 7:48:36 PM2/28/18
to devel...@arduino.cc
I like PasteBin (minus the ads), but I second Darth's suggestion to use gist.github.com... and it looks like there is of documentation as to an API to do easy code upload. Other favourites are http://sprunge.us/, but that will force a download of the code/paste (by the viewer) instead of viewing in the browser for longer stuff. There is also the Ubuntu Pastebin, but I don't know if it has an API for submission though. 

Peter Feerick
BIT, BLDes CQU

Antonio Mancuso

unread,
Mar 1, 2018, 5:00:05 AM3/1/18
to devel...@arduino.cc

I also like a lot gist and use it a lot.

 

All the one you mentioned are valid alternatives.

 

Thnx

antonio

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

 

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

 

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

Antonio Mancuso

unread,
Mar 1, 2018, 5:01:09 AM3/1/18
to devel...@arduino.cc

Darth,

Do you know whether bpaste.net provides an API?

 

 

 

From: Darth Maker [mailto:darth...@gmail.com]

Sent: Thursday, March 1, 2018 1:28 AM

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

 

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

 

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

Antonio Mancuso

unread,
Mar 1, 2018, 5:02:35 AM3/1/18
to devel...@arduino.cc

Peter,

Thnx for sharing additional suggestions. Very useful

 

I think that any service which expose an API is a valid candidate.

 

I will let the final user then pick up the service of his/her interested.

 

To me video ads is bothering, to another guy/girl is very ok. J

 

Thnx

Antonio

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

 

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

 

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

 

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

Darth Maker

unread,
Mar 1, 2018, 4:30:21 PM3/1/18
to Arduino Developers
Antonio,

bpaste can be POSTed to directly to upload, and you get redirected (presumably a location header) to the paste link. If that's enough to satisfy the API requirements, then yes.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@arduino.cc.

 

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@arduino.cc.

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@arduino.cc.

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@arduino.cc.

 

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@arduino.cc.

 

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@arduino.cc.

--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@arduino.cc.

Antonio Mancuso

unread,
Mar 6, 2018, 3:54:58 AM3/6/18
to devel...@arduino.cc

Ok I think thanks to the contribution of many persons here we have a larger set of online services which can be used.

 

The github says that before starting developing a feature it is important to discuss it in this mailer.

 

What is the process? Should I get an official approval before starting?

 

Thank you to help me to understand the process in this group

 

Antonio

 

From: Darth Maker [mailto:darth...@gmail.com]
Sent: Thursday, March 1, 2018 10:30 PM
To: Arduino Developers <devel...@arduino.cc>
Subject: Re: [Developers] Re: Pastebin IDE Integration request

 

Antonio,

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

 

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

 

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

 

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

 

--
You received this message because you are subscribed to the Google Groups "Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

per1234

unread,
Mar 6, 2018, 7:53:25 AM3/6/18
to Developers, mancu...@gmail.com
To remain beginner friendly it's important for the Arduino IDE to retain a simple user interface. The benefits of any proposed additions to the user interface must be carefully weighed against the added complexity (as well as maintenance and support burden) they introduce. In this case I don't think it's worth it.

The fact is that Facebook is just not an appropriate platform for this usage. The real solution is for people to use an appropriate platform, such as the Arduino Forum. In cases where something like Pastebin is necessary then it's reasonable to expect Arduino users to be competent enough to copy and paste. That is a basic and essential skill they will need to learn anyway if they don't already know how.

On the Arduino forum we are constantly trying to get people to post their code directly to the forum rather than as Pastebin links so any minor benefits to Facebook groups (which are terrible in my experience) will be had at the expense of making things worse for the larger Arduino Forum community.

Peter Feerick

unread,
Mar 6, 2018, 8:02:19 PM3/6/18
to devel...@arduino.cc
I can see arguments for and against Facebook or the Arduino forum... a lot of people nowadays seems to be getting help and information on different topics from Facebook, which whilst 'convenient' isn't 'the best' medium for that... there are just too many things lacking, and it's becoming an absolute behemoth in trying to keep extending itself. Ideally, questions should be asked on platforms designed for that purpose... that's where the Arduino Forum and others like AVR Freaks, StackExchange, etc, come in. 

However, if you feel that there is a need for an option like this, there is nothing to stop it being added as a plugin... although that would be self-defeating in a way, as a user would then have to add it in order to use it... and it would be simpler to just copy and paste the code into an appropriate site, or forum!

Peter Feerick
BIT, BLDes CQU

To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@arduino.cc.

Andrew Kroll

unread,
Mar 6, 2018, 8:28:49 PM3/6/18
to Arduino Developers
Emmm... I never have used facebook, never will. Call me anti-social, etc, but I just never have time for that.
If I've wanted quick answers, I've checked the Arduino forums, or stack exchange, and never have been disappointed, as long as the quirk isn't too deep, in which case I just contact the developer directly, or look on github.


--
Visit my github for awesome Arduino code @ https://github.com/xxxajk

Dennis Lee Bieber

unread,
Mar 7, 2018, 2:55:29 AM3/7/18
to devel...@arduino.cc
On Tue, 6 Mar 2018 20:28:45 -0500, Andrew Kroll
<xxx...@gmail.com> declaimed the following:

>Emmm... I never have used facebook, never will. Call me anti-social, etc,

Okay, you're anti-social <G> Welcome to the club!

I don't use Facebook, Twitter, etc... Not even LinkedIn (even though
that was a recommendation for job hunting -- I'd bought two books on using
LinkedIn and just never saw anything in them that seemed of use).

Since my ISP account provide 10MB of web space for each active email
address (I'm using 4 of a maximum of 8 distinct addresses -- not aliases
for one mail box), the few times I've had to provide stuff that couldn't be
pasted directly into a message I've provided links to files in my web
allocation.
Reply all
Reply to author
Forward
0 new messages