[BestPracticeHandbook] Try the library online
Hi, I've recently added a new badge (try boost.di | online) to proposed boost.di library. It uses Wandbox (awesome) facilities to check the library using online compiler (Wandbox supports newest gcc/clang). IMHO this approach is really useful for reviews and new users, since they don't have to install anything, just click the link and its done. They can experiment and then if they like it, clone the library and explore it more. You can check the badge here: http://krzysztof-jusiak.github.io/di/cpp14/boost/libs/di/doc/html And, for inpatients, direct link to online compiler with the library: http://melpon.org/wandbox/permlink/O3ABWKU3VBV3WG8J Let me know, what do you think. Cheers, Kris
On 9 Jun 2015 at 14:16, Krzysztof Jusiak wrote:
I've recently added a new badge (try boost.di | online) to proposed boost.di library. It uses Wandbox (awesome) facilities to check the library using online compiler (Wandbox supports newest gcc/clang). IMHO this approach is really useful for reviews and new users, since they don't have to install anything, just click the link and its done. They can experiment and then if they like it, clone the library and explore it more.
You can check the badge here: http://krzysztof-jusiak.github.io/di/cpp14/boost/libs/di/doc/html
And, for inpatients, direct link to online compiler with the library: http://melpon.org/wandbox/permlink/O3ABWKU3VBV3WG8J
Seriously cool. Can I quickly check with you how you did this so I can write it up? 1. Assemble your library into a giant single header include file. Add that to wandbox. 2. Add small example program. Get it compiling and executing. 3. Hit the "Share This Code" button to get a permalink. 4. Go to badges.io to create a custom badge. 5. Add the badge to the link to your documentation. My *only* criticism is that I think the badge too samey to the CI status badges and that users simply will not see it. I think we need a much bigger maybe custom designed badge, and it should be separate from the status badges. Niall -- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/
Thanks,
Yea, basically you are right with the steps.
If it comes to giant preprocessed file, well, I was supporting it from day
dot, just for simplicity. It improves compilation times (just a bit), error
messages (get rid of include from/ include...) and it simplify the start
for new users. I would encourage everyone with header only library to
provide preprocessed header as well.
Anyway, moving back to Wandbox. Actually, there is a better way to do it,
because Wandbox supports json API (
https://github.com/melpon/wandbox/blob/master/kennel2/API.rst)
and, therefore, it might be done automatically (to have your library up to
date and not doing it manually all the time).
I have written a simple script to support this approach:
https://github.com/krzysztof-jusiak/di/blob/cpp14/doc/tools/try_it_online.sh
in response url is given, which might be used in documentation or for a
badge.
Please notice as well, that Louis and I were trying to do the same for
Hana, but, unfortunately, without any success yet (seems there is a limit
on Wanddbox and Hana is too big for it):
https://github.com/ldionne/hana/issues/87
Agreed, that the badge could have been a bit more appealing for the user.
Kris
On Wed, Jun 10, 2015 at 12:10 PM, Niall Douglas
On 9 Jun 2015 at 14:16, Krzysztof Jusiak wrote:
I've recently added a new badge (try boost.di | online) to proposed boost.di library. It uses Wandbox (awesome) facilities to check the library using online compiler (Wandbox supports newest gcc/clang). IMHO this approach is really useful for reviews and new users, since they don't have to install anything, just click the link and its done. They can experiment and then if they like it, clone the library and explore it more.
You can check the badge here: http://krzysztof-jusiak.github.io/di/cpp14/boost/libs/di/doc/html
And, for inpatients, direct link to online compiler with the library: http://melpon.org/wandbox/permlink/O3ABWKU3VBV3WG8J
Seriously cool.
Can I quickly check with you how you did this so I can write it up?
1. Assemble your library into a giant single header include file. Add that to wandbox.
2. Add small example program. Get it compiling and executing.
3. Hit the "Share This Code" button to get a permalink.
4. Go to badges.io to create a custom badge.
5. Add the badge to the link to your documentation.
My *only* criticism is that I think the badge too samey to the CI status badges and that users simply will not see it. I think we need a much bigger maybe custom designed badge, and it should be separate from the status badges.
Niall
-- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (2)
-
Krzysztof Jusiak
-
Niall Douglas