
Concord, our GPL outliner - tjr
http://scripting.com/2013/09/16/concordOurGplOutliner
======
AaronFriel
GPL? How does this interact (legally) with other running JavaScript? Do I have
to make the rest of my site's JavaScript "GPL" as a result?

I'm curious, does the dynamic nature of JavaScript make browser-based GPL
Javascript essentially LGPL? Any lawyers or FSF advocates out there know?

~~~
tedivm
I've never seen a good answer to that question. I've emailed the FSF and
others and they all tell me to consult a lawyer for how the license works (if
they respond at all).

~~~
npsimons
IANAL, but the spirit seems to be "hey, here's this software, use it how you
like, but if you distribute it (including building on it or bundling it in a
product) please be kind enough to extend the same freedoms to those you give
it to."

Using Concord on your site? Offer a link to the source. Modify it to work
better with a framework? Offer that modification too. Build an entire product
off of it? Well, be prepared to release the source to that product under GPL
as well. If you don't like those terms, feel free to start from scratch and
not freeload off the original authors who were kind enough to share source
with you in the first place.

I don't understand how people can pay good money for things like game engines,
then turn around and think that OSS doesn't have a price too, or get upset
when they are asked to pay it. You just end up paying back to the community
instead of into a company's coffers.

~~~
davewiner
And most important, no gratuitous incompatibility or user lock-in based on
formats. Commercial developers esp ones that raise huge money, tend to try to
lock users in. If that's their plan, they can write their own outliner, should
that situation ever arise.

~~~
atan
Use of the GPL doesn't merely prevent commercial developers from creating non-
compatible formats -- it prevents them from using Concord _at all_. Let's say
I want to build a commercial app that happens to use Concord, and I'm happy to
use Concord as is (contributing back any patches or improvements I make) and
even make the outlines exportable (assume outlining is just one feature in a
much larger app, not the main focus). In that case, I'd have to make much or
possibly all of the client-side code GPL compatible, so I can't use Concord,
even though I'm not violating your rule about compatibility and am
contributing back to the Concord community.

GPL seems like overkill given your goal. It will be limited to a niche of
either fully open source public applications or completely private/internal
applications.

------
acomjean
I didn't know what an outliner was:

From the Git page: An outliner is a text editor that organizes information in
a hierarchy, allowing users to control the level of detail and to reorganize
according to structure. Your notes can have full detail, yet be organized so a
casual reader can get a quick overview. Outlining is a great way for teams to
organize work.

~~~
smoyer
And isn't this just a special case of an object graph where all the objects
are strings, the relationships sub-objects can't have two parents and the
traversal is over when you've reached a leaf?

What about hierarchies of objects that aren't strings? (I'd like to organize
them too).

What about hierarchies that aren't a strict tree? (I can't really do my
genealogy on this).

P.S. I like what Dave does with outliners but I'm not sure I'd apply them
everywhere he does.

~~~
jerf
I've fiddled with this extensively. The problem isn't data representation;
sure, "outlines" are "just" graphs. The question is, what on Earth does your
UI look like? Editing "graphs" is hardly more structured than creating a "data
editor"... ok, those are some nice English words you've got there, but how
does it actually _work_?

At least by limiting it to text and stuff that looks a lot like text, you can
produce a real application that does real things of real value. It may not be
suitable for everything, but your thing that is suitable for "everything" is
likely come out being suitable for nothing in practice.

~~~
smoyer
That's a hard problem - I haven't done any "fiddle" but I've spent a lot of
time doing Gedankenexperiment and haven't come up with anything I believe is
remotely applicable. The genealogy example I gave is simpler but I'm not sure
I've seen an editor for that use-case that's optimal either.

Maybe the problem just can't be simplified further? And as an aside, I wasn't
trying to disparage Dave Winer's implementation of tree editing at all.

------
davexunit
It's crazy to me that there seems to be a backlash against this project being
licensed under the GPL. Thank you for choosing copyleft.

Also, if I got it right, an outliner is a note taking application? The best
note-taking application I know of is, by far, org-mode in Emacs.

------
jerf
Ah, dwiner, at last my long Linux nightmare of having no decent outliner shall
come to an end....

Urf, budgeting the time for this may be a challenge, but odds are good that
this can be dropped into a XUL shell to obtain a traditional "local"
filesystem outliner with only a few hundred lines more of grease. I'll have to
see what I can do. (I've done it once before for something else.)

~~~
phaer
No decent outliner on Linux? [http://orgmode.org/](http://orgmode.org/) is by
far the best i have seen so far, so could use outline-mode if you do not use
any of the extra features. There is something similar to outline-mode for vim
users if i remember correctly.

~~~
ah-
Yes, I use VimOutliner, which is perfect when you already know how to use vim.

------
kemayo
Should really have a demo link somewhere.

You can click through to github, to be told that it's what their Fargo tool is
based on, and from there you can click through to that... to be told that you
have to link it to your dropbox account before you can even try it.

~~~
tjr
[http://littleoutliner.com/](http://littleoutliner.com/)

~~~
davewiner
And littleoutliner is an instance of Concord as well. ;-)

------
sinkasapa
I would like something like this that translates directly into JSON. Kind of a
cross between concord and
[http://jsoneditoronline.org/](http://jsoneditoronline.org/)

It will just have to be something I write myself, I guess.

------
hhuuggoo
hope you all don't mind. little self plug on the subject - I also have an open
source outliner

here is the source
[http://github.com/hhuuggoo/efficiently](http://github.com/hhuuggoo/efficiently)

and the demo:
[https://eff.iciently.com/docview/r/4ed70c031a7ba32edb000002/](https://eff.iciently.com/docview/r/4ed70c031a7ba32edb000002/)

But this one is an app, not a plugin, so it might be less useful to some.

------
Touche
3k LOC in a single file... ouch. Someone introduce Dave to makefiles.

~~~
andymoe
I'm almost certain he writes the code using an outliner tool as well like was
the case for the scripting language that shipped with frontier and the OPML
editor so that probably makes it easier for him to manage. At least it will be
easy to include into a project ;-)

~~~
davewiner
It's only a problem if you edit in a flat text editor.

If you look in the opml folder of the repo you'll find the source files for
all the js and css files.

~~~
andymoe
Ah, thanks for pointing those files out. I'll have to try loading them up in
Fargo for fun.

------
gatesphere
Leo is the last outliner you'll ever need.
[http://leoeditor.com/](http://leoeditor.com/)

------
Stratoscope
I've been browsing through the code a bit. It has a few problems.

First, the brace and indentation style is _extremely_ unusual and hard to
follow. I have never seen this style used in another curly-brace-language
project anywhere.

I realize that brace and indentation is a very personal preference, but I've
had no trouble following a variety of styles - until this one. Here's an
example:

    
    
      if(c.op.inTextMode()){
          c.op.focusCursor();
          c.editor.restoreSelection();
          }else{
              c.pasteBinFocus();
              }
    

The if block and matching else block have different indentation levels? What?
That does seem to be the pattern followed in a number of places.

How would you follow this style if there is a chain of else-if's? I don't see
any examples in the code, but it seems it would have to look like this to be
consistent:

    
    
      if(a){
          b();
          }else if(c){
              d();
              }else if(e){
                  f();
                  }else{
                      g();
                      }
    

OTOH, this function follows _two different_ indentation styles for its two
if/else blocks:

    
    
      this.callbacks = function(callbacks) {
          if(callbacks) {
              this.root.data("callbacks", callbacks);
              return callbacks;
          } else {
              if(this.root.data("callbacks")) {
                  return this.root.data("callbacks");
                  } else {
                      return {};
                      }
              }
          };
    

Try this quiz: Without loading the code into a brace-matching editor, just
eyeball that function and see if you can tell which open brace matches with
which close brace.

The function could be much simpler too:

    
    
      this.callbacks = function( callbacks ) {
          return callbacks ?
              this.root.data( "callbacks", callbacks ) :
              this.root.data( "callbacks" ) || {};
      };
    

Also in a half-dozen places or so, the code uses a for..in loop to iterate
over an array. This type of loop should never be used with an array for two
reasons: If any other code in the page extends Array.prototype the code will
break, and the order of iteration is not guaranteed. These loops need to be
converted to numeric for loops or $.each() or any similar alternative.

One last point that is just a matter of taste, but I think the code would
benefit quite a bit if it followed the popular jQuery convention of using a $
prefix on variables that contain jQuery objects.

I love outliners, and I'd really like to contribute to this project, but the
code is so strangely formatted that I'd have a really hard time with it. I
wonder if the authors would consider adopting a more conventional coding
style, or if they just like it the way it is?

~~~
davewiner
I think the programmer was just getting comfortable with coding in an outliner
when he wrote that code. I would consider that indentation a bug, when and if
I work in those areas, I'll fix the indentation there. Thanks for pointing it
out.

~~~
Stratoscope
Ah, thanks, Dave, and I'm sorry I went a bit overboard on my remarks about the
code! The project does look promising; now I'm encouraged to check it out some
more. :-)

~~~
davewiner
Not at all! :-)

I am a total bugger about formatting code.

The outliner approach is pretty good but not perfect.

If-then-else is the sore thumb, for sure.

Along with try-catch.

But overall, outliners are a huge win for writing code.

Let's be hardasses about this stuff, but also understanding.

I think your approach is perfect.

------
tzs
GPLv3, which will put off some people who would be fine with GPLv2.

------
the_mitsuhiko
I think more project should be this obvious with their choice of GPL, makes it
easier to dismiss :-)

~~~
vx-k
I think more comments should be this obvious with their trolling & stupidity,
makes it easier to flag :-)

~~~
the_mitsuhiko
Might not have been the highest quality comment but there are lots of
companies out there that outright forbid GPLv3 code to be used for anything
really.

