Re: [Wikitech-l] Interested in working on a WikiWidget for algorithm visualization

2015-09-28 Thread S Page
Hi. You're getting advice on how to add a new "algorithm visualization"
content type to MediaWiki. But...

On Fri, Sep 11, 2015 at 2:52 PM, Daniel Moisset 
wrote:

>
> I'm one of the developers of thewalnut.io, a platform for authoring
> and
> sharing algorithm visualizations. ... creating a wikiwidget that can
> somehow integrate the content built in the walnut


"somehow" is the part you need to flesh out.

It seems a first step is simply to have algorithms on Wikipedias link to
your external platform. That's just adding a link to the == See also ==
section.

If you want a wiki widget to present a screenshot of the visualization that
when clicked open an external link to "See an interactive visualization of
this algorithm", that is just Template:External_Walnut_visualization that
has parameters for the animated GIF and the URL of the walnut.io
visualization. Using it extensively seems a per-wiki decision. You can
discuss and promote your idea in each wiki's technical area (e.g. "Village
Pump (technical)" [1]) and relevant WikiProjects [2].

External coordinate linking might be instructive. E.g. click the "37.787°N
122.4°W" in many articles [3], and a "GeoHack" window pops up that links to
interesting mapping services, both free and commercial. They didn't
implement "Offline animated image rendering solution" and such :-). In
general, wiki communities look more favorably on open presentation of
multiple services for data than blessing a single provider.

The third step is embedding the walnut.io interactive visualization of its
data format in the page, which could be a big on-wiki JavaScript gadget but
is probably best implemented as an extension implementing a new content
type. At that level everything that others said about FLOSS and licenses
and fallbacks does apply.

Cheers, sorry if I completely misunderstood what you're proposing... which
is a good reason to write it up as a subpage of your user page on meta-wiki
;-)

[1] https://en.wikipedia.org/wiki/Wikipedia:Village_pump_%28technical%29
[2]
https://en.wikipedia.org/wiki/Wikipedia:WikiProject_Directory/Science,_technology,_and_engineering_WikiProjects
[3] https://en.wikipedia.org/wiki/140_New_Montgomery

-- 
=S Page  WMF Tech writer
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Interested in working on a WikiWidget for algorithm visualization

2015-09-15 Thread Quim Gil
Hi Daniel, thank you for your interest in contributing to Wikimedia.

On Fri, Sep 11, 2015 at 11:52 PM, Daniel Moisset 
wrote:

> Hi,
> I'm one of the developers of thewalnut.io, a platform for authoring
> and
> sharing algorithm visualizations. While working on a visualization of
> Langton's ant, I ran into the WikiWidget at
> https://es.wikipedia.org/wiki/Hormiga_de_Langton and started looking at
> how
> you guys are doing these, given that it has some similarities to our work.
>
> My idea is that by creating a wikiwidget that can somehow integrate the
> content built in the walnut, assuming it gets incorporated into Wikipedia,
> it would allow many people to easily create and add interactive
> visualizations for algorithms into wikipedia articles with much less work
> than now where each wikiwidget for each algorithm needs to be created from
> scratch[1].


Sounds like a sensible idea that fits in our long term plan for promoting
alternative content formats supplementing text and images. Conceptually, it
also looks like a neighbor of https://www.mediawiki.org/wiki/Extension:Graph

A MediaWiki extension is probably the best approach for this, not only
technically but also socially. This is how the steps could look like:

1. Develop a prototype extension that works with the latest MediaWiki
stable version.
2. As soon as you have a minimally functional extension, share it here, all
the better if supported by a documentation page in mediawiki.org, code
published in Wikimedia's Gerrit, and a test instance in Wikimedia Labs.
3. From there you will need users, feedback, and most probably bugfixes.
You might want to have your project in Wikimedia Phabricator. With a bit of
luck you will get contributors as well, for code and translations.
4. At some point you should feel ready for being deployed to Wikimedia
servers -- we have a process for that.

In more detail:
https://www.mediawiki.org/wiki/How_to_become_a_MediaWiki_hacker

Bringing a whole new feature to one of the most visited and most creative
websites is not a simple task, but it is possible, and we have many
precedents of volunteer developers who made it with skill and perseverance.
I hope this effort fits in your personal and walnut's interests.

-- 
Quim Gil
Engineering Community Manager @ Wikimedia Foundation
http://www.mediawiki.org/wiki/User:Qgil
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Interested in working on a WikiWidget for algorithm visualization

2015-09-14 Thread Gergo Tisza
Another possible approach is to have the MediaWiki server proxy and cache
the content from the remote server, and then display it in some kind of
safe sandbox. See T31242 .

On Mon, Sep 14, 2015 at 9:15 AM, Daniel Moisset 
wrote:

> How do you handle the "Offline animated image rendering solution" for your
> current wikiwidgets? What I can think about here is an animated gif
> fallback, but that would lose interactivity at all (this is something that
> users will be able to do anyway without any implementation effort)
>

I don't think we have widgets currently (apart from some JS hacks which
change from wiki to wiki and can't deal with offline etc). Videos come
closest, and they just display a thumbnail as fallback for offline and old
browsers.
Depending on the implementation, an interactive algorithm visualisation
might work offline just fine, but you need to support old browsers,
print/PDF and so on. A simple static image (or even just text explaining
there would be a visualisation here but you don't get to see it) would work
IMO.


> Another (technical) question I have is if there's already something in
> mediawiki that would allow users to upload JSON content, or if something
> like that should be implemented. Having that would allow users to use later
> in markup stuff like {{WikiWidget|WalnutVisualizer:myuser/somecontent}}.
>

There are three ways to go about this:

   - Upload widgets as files, use your own MediaHandler
   
and MediaTransformOutput
   

classes to
   display them. This is what Bryan was referring to in his answer, and
   probably the best suited for your use case. There is no support for JSON
   files specifically, but they are not really different from any other file.
   Licensing and some of the display is handled by MediaWiki, you just need to
   return an HTML blob from the MediaTransformOutput class, given the
   dimensions. Compared to the other options, this area of the code is
   somewhat poorly documented but you can look at the existing media
   handling extensions
   ,
   - Upload widgets as wiki pages. There is some support for JSON pages
   (see ContentHandler
    and
   the JsonContent class). This has some advantages if you want to focus on
   collaboratively creating animations, not just displaying them (you can
   provide a custom editor, can show custom diffs and so on), but the widget
   has to be on its own page so not really useful.
   - Upload widgets as part of the wikitext of a page (something like
   ...JSON blob here...). The Graph extension
    is a good example of
   this. Still somewhat useful for collaborative creation (no JSON support so
   you get plaintext diffs and less editor support but that's still a lot
   better than having to compare uploaded files by hand). You need to
   implement any support you want for licensing and rendering (including how
   the user can specify size/location) on your own. You can combine this with
   the previous option to get the benefits of both, via the JsonConfig
    extension (the
   Graph extension does this as well).
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Interested in working on a WikiWidget for algorithm visualization

2015-09-14 Thread Daniel Moisset
Hi, thanks for the detailed information... my reply inline:

On Fri, Sep 11, 2015 at 7:20 PM, Bryan Davis  wrote:

> (...)
> The high level and non-negotiable needs for integration with Wikipedia
> or the sister projects would be:
> * Freely licensed client (OSI approved license)
> * Offline animated image rendering solution for user-agents that
> can't/won't use the client
> * Ability to host freely licensed "models" on Commons
> * No client interaction with servers not managed by the Wikimedia
> Foundation on behalf of the larger Wikimedia movement.
>
> Ideally the authoring tools would also be freely licensed and capable
> of being integrated with MediaWiki under the same hosting terms listed
> for the client.
>
>
What I can imagine as factible is something like what there is already for
any "standard" format like png or ogg: We can define a spec for the
visualization input data (which already is a pretty simple JSON, so it is
just a matter of documentation), and a freely licensed (I'm guessing GPL
here) "player" in JS, implemented as a Wikiwidget. So our tool can be a way
to build and generate these JSONs (but anybody could implement their own)
and export it so wikimedia can host the data. I think that matches your
requirements; it loses part of the interaction on the article (I think that
requires the interaction with external servers you want to avoid) , but is
still a way to allow any user instead of only mediawiki commiters
contribute visualizations. At upload time the content creator can assert
that the content has appropriate licensing (as you do now when uploading
other media)

How do you handle the "Offline animated image rendering solution" for your
current wikiwidgets? What I can think about here is an animated gif
fallback, but that would lose interactivity at all (this is something that
users will be able to do anyway without any implementation effort)

Another (technical) question I have is if there's already something in
mediawiki that would allow users to upload JSON content, or if something
like that should be implemented. Having that would allow users to use later
in markup stuff like {{WikiWidget|WalnutVisualizer:myuser/somecontent}}.

Do you think this approach would work, and would be compatible with the
values of the wikimedia foundation?

Thanks for your time,

D.
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Interested in working on a WikiWidget for algorithm visualization

2015-09-11 Thread Bryan Davis
On Fri, Sep 11, 2015 at 3:52 PM, Daniel Moisset  wrote:
> Hi,
> I'm one of the developers of thewalnut.io, a platform for authoring and
> sharing algorithm visualizations. While working on a visualization of
> Langton's ant, I ran into the WikiWidget at
> https://es.wikipedia.org/wiki/Hormiga_de_Langton and started looking at how
> you guys are doing these, given that it has some similarities to our work.
>
> My idea is that by creating a wikiwidget that can somehow integrate the
> content built in the walnut, assuming it gets incorporated into Wikipedia,
> it would allow many people to easily create and add interactive
> visualizations for algorithms into wikipedia articles with much less work
> than now where each wikiwidget for each algorithm needs to be created from
> scratch[1]. Instead of just a few wikiwidgets like now it could be
> something commonplace in CS related articles. I also see this as an
> opportunity to get people from visualization communities closer to the
> wikipedia community. And I also see this as an improved experience for
> visitors, given that the walnut gives the flexibility to users of modifying
> and creating alternate versions of algorithms and visualizations.
>
> So, in short, I'm sending this here to see if the community shares this
> interest on moving forward into this direction; specifically if there's
> interest on this (I'm more than happy about doing the development work
> myself). I'm new here so I'm not even sure if this is the right mailing
> list, feel free to redirect me if I'm at the wrong place :)
>
> As a bit of context, I'd like to clarify a few things that I assume might
> be relevant for you... I'm not at all an active member in the
> mediawiki/wikipedia development community, and a very minor wikipedia
> contributor; I'm mostly just a heavy wikipedia user. But I've been an
> active participant in many open source project and free software
> communities for more than 15 years, so I am quite aware that my invitation
> will raise many concerns about the dangers of integrating an external app
> that you don't control. I know because I'd have those concerns if I was in
> your place. With that in the open I'd like to hear about what we can do to
> ease those concerns; if you like the general idea, we're really open to
> explore possibilities like releasing code, data, licensing terms on
> content, or whatever you think is needed to make this possible.
>
> Thanks for your time,
>
>D.
>
> [1] Just so you have a reference, having an interactive  animation about
> the langton's ant example took me a bit about 40 minutes; 50 in total if
> you count the second visualization I made for density of visits when a
> friend asked "are some locations more important than others?"

The high level and non-negotiable needs for integration with Wikipedia
or the sister projects would be:
* Freely licensed client (OSI approved license)
* Offline animated image rendering solution for user-agents that
can't/won't use the client
* Ability to host freely licensed "models" on Commons
* No client interaction with servers not managed by the Wikimedia
Foundation on behalf of the larger Wikimedia movement.

Ideally the authoring tools would also be freely licensed and capable
of being integrated with MediaWiki under the same hosting terms listed
for the client.

The bar is lower for creating an extension that would allow
non-Wikimedia wikis powered by MediaWiki to integrate with your hosted
service. See 
and 
for  how you and your team could get started in that direction.

Bryan
-- 
Bryan Davis  Wikimedia Foundation
[[m:User:BDavis_(WMF)]]  Sr Software EngineerBoise, ID USA
irc: bd808v:415.839.6885 x6855

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

[Wikitech-l] Interested in working on a WikiWidget for algorithm visualization

2015-09-11 Thread Daniel Moisset
Hi,
I'm one of the developers of thewalnut.io, a platform for authoring and
sharing algorithm visualizations. While working on a visualization of
Langton's ant, I ran into the WikiWidget at
https://es.wikipedia.org/wiki/Hormiga_de_Langton and started looking at how
you guys are doing these, given that it has some similarities to our work.

My idea is that by creating a wikiwidget that can somehow integrate the
content built in the walnut, assuming it gets incorporated into Wikipedia,
it would allow many people to easily create and add interactive
visualizations for algorithms into wikipedia articles with much less work
than now where each wikiwidget for each algorithm needs to be created from
scratch[1]. Instead of just a few wikiwidgets like now it could be
something commonplace in CS related articles. I also see this as an
opportunity to get people from visualization communities closer to the
wikipedia community. And I also see this as an improved experience for
visitors, given that the walnut gives the flexibility to users of modifying
and creating alternate versions of algorithms and visualizations.

So, in short, I'm sending this here to see if the community shares this
interest on moving forward into this direction; specifically if there's
interest on this (I'm more than happy about doing the development work
myself). I'm new here so I'm not even sure if this is the right mailing
list, feel free to redirect me if I'm at the wrong place :)

As a bit of context, I'd like to clarify a few things that I assume might
be relevant for you... I'm not at all an active member in the
mediawiki/wikipedia development community, and a very minor wikipedia
contributor; I'm mostly just a heavy wikipedia user. But I've been an
active participant in many open source project and free software
communities for more than 15 years, so I am quite aware that my invitation
will raise many concerns about the dangers of integrating an external app
that you don't control. I know because I'd have those concerns if I was in
your place. With that in the open I'd like to hear about what we can do to
ease those concerns; if you like the general idea, we're really open to
explore possibilities like releasing code, data, licensing terms on
content, or whatever you think is needed to make this possible.

Thanks for your time,

   D.

[1] Just so you have a reference, having an interactive  animation about
the langton's ant example took me a bit about 40 minutes; 50 in total if
you count the second visualization I made for density of visits when a
friend asked "are some locations more important than others?"

-- 
Daniel F. Moisset - Technical Leader
www.machinalis.com
Skype: @dmoisset
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l