Page 2 of 3

Posted: Mon Sep 07, 2009 11:10 pm
by xytroxon
Is BSD The New GPL?

Note: Zed Shaw is the former Ruby language programming guru, now Python language advocate... Zed does not mince words over his opinionated views on programming, and does not suffer fools (or Rubists ;) lightly... That said, he is usually right... And now prefering GPL over BSD for his new works... But most people nowdays, that don't want to suffer the pains of trying to figure out (let alone try to strictly follow), either license's rules, just throw up their hands and use the MIT license, as the least painful license for simple works they wish to share... Of course that p*sses the GPL's Richard Stallman off to no end ;p)

http://en.wikipedia.org/wiki/BSD_licenses

http://en.wikipedia.org/wiki/GNU_General_Public_License

http://en.wikipedia.org/wiki/MIT_License

Posted: Tue Sep 08, 2009 5:18 am
by hilti
xytroxon wrote: But most people nowdays, that don't want to suffer the pains of trying to figure out (let alone try to strictly follow), either license's rules, just throw up their hands and use the MIT license, as the least painful license for simple works they wish to share...
That's why I use the MIT License.

What are the benefits when I use the GPL License for Dragonfly - are there any?

Posted: Tue Sep 08, 2009 6:25 am
by TedWalther
cormullion wrote:just out of interest, what's the difference between the suggested licences?
I think the modern two-clause BSD license is shortest and easiest to understand.

Posted: Tue Sep 08, 2009 8:25 am
by xytroxon
Here's an article, that for several possible advantages, such as for profit use, suggests the Apache License:
Does GPL still matter?
Jagielski claims that Apache's licensing terms are written to be comprehensible to people with no legal training. "It's very, very easy to read and understand, so it's a less risky license for external companies to use," he says.
http://en.wikipedia.org/wiki/Apache_License
... as of July 2009, over 5000 non-ASF projects located at SourceForge.net are available under the terms of the Apache License.
The Apache Software Foundation and the Free Software Foundation (FSF) agree that the Apache License 2.0 is a free software licence, compatible with version 3 of the GNU General Public License (GPL).

However, the Free Software Foundation considers all versions of the Apache License (as of 2007) to be incompatible with the previous GPL versions 1 and 2.
-- xytroxon

Posted: Thu Sep 17, 2009 7:26 pm
by hilti
... counting 37 downloads at Google Code :-)

I'm just wondering if anybody else uses Dragonfly for his projects? One project beside my own website is here: http://daycaster.org

Cheers
Hilti (working on version 0.20)

Posted: Thu Sep 17, 2009 9:02 pm
by cormullion
i do! http://unbalanced-parentheses.nfshost.com/

I think it's great. I've found Dragonfly easy to use and reliable. The only problem is that when a new version is released it's quite hard to work out which files to install, which to modify, and which to ignore. Perhaps that's a difficult architecture to design...

Posted: Thu Sep 17, 2009 9:31 pm
by Lutz

Posted: Fri Sep 18, 2009 7:24 am
by Kirill
hilti wrote:... counting 37 downloads at Google Code :-)

I'm just wondering if anybody else uses Dragonfly for his projects? One project beside my own website is here: http://daycaster.org

Cheers
Hilti (working on version 0.20)
Not yet, but I consider dragonfly (to try it out) for a PSI server.

Posted: Fri Sep 18, 2009 9:40 am
by hilti
Kirill wrote:
Not yet, but I consider dragonfly (to try it out) for a PSI server.
Hi Kirill

what is a PSI server? Never heard of it.

Posted: Fri Sep 18, 2009 9:42 am
by hilti
That's just me, Lutz ;-)

Posted: Fri Sep 18, 2009 10:31 am
by Kirill
hilti wrote: Hi Kirill

what is a PSI server? Never heard of it.
PSI stands for Public Subject Identifier (in the Topic Maps world that is). A PSI is an URI that servers two purposes: as a unique identifier for a subject and as a URL which can be entered into a browser to provide the end-user a description of what the subject refers to.

psi.ontopedia.net is a PSI server.

-- Kirill

Re: dragonfly web framework license

Posted: Thu Oct 01, 2009 6:48 pm
by joejoe
joejoe wrote:hi hilti - looks like really cool code you've released.

im curious to know why you chose the mit license instead of the license that newlisp uses, the gpl? any chance you might consider the gpl for future releases?

thanks in any case! - :0)
i either misread or youve updated the license to gplv3 (like nL) !! :D

thanks for this, hilti! im downloading right now!

Posted: Thu Oct 01, 2009 7:06 pm
by hilti
That's right. I've updated the license to GPL (v3), because I didn't see any difference (for my intention) between MIT License or GPL.

I just want the Dragonfly to be open source and free available.

Cheers!
Hilti

Posted: Mon Oct 12, 2009 8:21 pm
by hilti
Dragonfly version 0.20 is ready for download!

The major changes

* changed license from MIT to GNU (GPL v3)
* updated web.lsp to version 0.3.1 beta
* updated nldb.lsp (draft of 2009-09-11 20:42:48)
* added the file "dragonfly.js" which includes some small javascripts which support the Dragonfly framework (AJAX, iPhone, Dragonfly Guide Menu)
* added the first AJAX function to Dragonfly: ajax-updater (check out the twitter demo)
* added a Dragonfly guide (it can be opened with /dragonfly_welcome/index)

There will be a Dragonfly User Guide in near future. Have a look a the draft: http://dragonfly.nfshost.com

The Dragonfly ajax functions in action:
http://dragonfly.nfshost.com/dragonfly_ajax/index

Download it here
http://code.google.com/p/dragonfly-newl ... loads/list

Have fun!
Hilti

Posted: Mon Oct 12, 2009 9:11 pm
by cormullion
Cool! Will upgrade soon...

thanks for the user guide

Posted: Mon Oct 12, 2009 10:14 pm
by joejoe
the user guide really helped me get up and running in less than a minute. thanks!

Re: Dragonfly - a web framework for newLISP

Posted: Fri Nov 06, 2009 4:57 pm
by cormullion
Is your new version 0.50 available to non-Mercurial users yes?

(I gather Mercurial is another thing like git or subversion...?)

Re: Dragonfly - a web framework for newLISP

Posted: Sat Nov 07, 2009 2:11 am
by itistoday
cormullion wrote:Is your new version 0.50 available to non-Mercurial users yes?

(I gather Mercurial is another thing like git or subversion...?)
It will be ready sometime this month, but there's still some work to be done before we make a release.

Mercurial is a DVCS like git (SVN is not a DVCS), it's pretty simple to use, just takes a little reading and then you'll get the hang of it.

Short instructions:

To grab a copy from the repo:

Code: Select all

$ hg clone https://dragonfly-newlisp.googlecode.com/hg/ dragonfly-newlisp
To update your copy (I would do this once a day):

Code: Select all

$ cd dragonfly-newlisp
$ hg pull -uf
If you're not committing code, that's really all you'll need to do anyway. :-)

To run the example-site, read the README and the INSTALL documents.

Re: Dragonfly - a web framework for newLISP

Posted: Sat Nov 07, 2009 2:58 pm
by cormullion
thanks... I managed to obtain a copy (thanks!)

I'm now trying to copy my content over to the new framework. It's not going too badly, but there are a lot of changes from the version I'm using!

Edit:

OK, I haven't figured it out yet. These are the kind of URIs I want to handle:

http://unbalanced-parentheses.nfshost.com/syntaxmatters
http://unbalanced-parentheses.nfshost.c ... eerswanted
http://unbalanced-parentheses.nfshost.c ... e-glypher/ -> directory containing index.cgi
http://unbalanced-parentheses.nfshost.com/downloads -> directory

I used to test the selector:

Code: Select all

(if (= "" Dragonfly:selector) 
and provide a default page if I didn't find the string I wanted. What's the mechanism for doing this?

Re: Dragonfly - a web framework for newLISP

Posted: Sat Nov 07, 2009 7:55 pm
by hilti
Hi Cormullion!

Just a short help to Your "downloads" problem: You could use a static route to it described on this page in the User Guide: http://www.rundragonfly.com/dragonfly_routes

Put this into your view

Code: Select all

<% (link_to "Downloads" "downloads") %>
About the selector:
I've to test some things out, but maybe you can create your own route described here
http://www.rundragonfly.com/dragonfly_create_routes

Hope this helps!
Hilti

Re: Dragonfly - a web framework for newLISP

Posted: Sat Nov 07, 2009 8:16 pm
by cormullion
Thanks for the help! I'm not sure I really know what a route is.

In the last version, I had code in the 'view' that took action depending on the selector:

Code: Select all

<div id="right">    
    <% (Dragonfly:load-database "blog.nldb") %>
    
    <% (if (= "" Dragonfly:selector) 
           (set 'query (nldb:select-rows 'nldb:stories true true 'nldb:story-date >))
           (set 'query (nldb:select-rows 'nldb:stories '(= nldb:story-id Dragonfly:selector)))) %>
    
    <% (unless query (set 'query (nldb:select-rows 'nldb:stories '(= nldb:story-id "aboutthissite")))) %> 

    <% (set 'story (first query)) %>
    <% (println {<h1>} (story 2) {</h1>}) %>
    <% (println {<small>} (story 0) {</small>}) %>
    <% (println (last story)) %>

</div>
Do I put this code in a .lsp file in 'plugins-active' (the static route you're talking about)? I would have thought it belonged in the view.

Forgive the stupid questions - I'm trying to catch you up but you're going too fast for me.:)

Re: Dragonfly - a web framework for newLISP

Posted: Sun Nov 08, 2009 2:01 am
by itistoday
cormullion, I've updated the dragonfly_routes page with some more detail, read through it carefully, it should explain what they are and how they work. Also, take a look at the page on creating templates (also in the guide).

As of this post it's not up on rundragonfly.com, so view the example-site in your web browser locally using newlisp as the server (again, see the INSTALL and README files if you don't know how to do this). Before doing that though you'll need to pull the latest changes as I showed above first.

Re: Dragonfly - a web framework for newLISP

Posted: Sun Nov 08, 2009 4:03 am
by itistoday
cormullion wrote:In the last version, I had code in the 'view' that took action depending on the selector:

Code: Select all

<% (if (= "" Dragonfly:selector)
BTW, Dragonfly:selector has been removed. Views no longer have selectors or actions, if you want something like that either make a resource (see the guide on the RESTful route) or use GET/POST parameters with your views instead, or create your own route. If you need help, check the docs, they probably have the answer to your question, but if they don't let us know!

Re: Dragonfly - a web framework for newLISP

Posted: Sun Nov 08, 2009 2:15 pm
by cormullion
Thanks guys, Dragonfly is looking pretty impressive now. I've been reading the docs again. You've done a nice job.

Here's my problem. I already have the URLs I want (see above). I don't think I can use "RESTful routes" because the first value in these (the resource) has to be the name of the context whereas in my URLs I want it to be the name of the ID (the specific object in the collection). I don't want to create static routes because I don't want to create a page for each ID.

I suppose I'll have to use .htaccess to rewrite the incoming URL to insert a 'resource' identifier before the ID, and then use the 'action' to store the ID and pass it on to the .lsp resource. And then I can just go 'print' to output HTML? But then what happened to the template...

Re: Dragonfly - a web framework for newLISP

Posted: Sun Nov 08, 2009 4:33 pm
by itistoday
cormullion wrote:I don't want to create static routes because I don't want to create a page for each ID.
I looked at your URLs again (I hadn't really read your original post) and it seems like creating a page for each of those is the solution you're looking for, otherwise you're not really using Dragonfly to your advantage and end up rewriting a lot of the stuff that it handles efficiently and cleanly for you. You also end up with a massive single file that has a huge if/else block in it...

I'd consider splitting all of your pages into separate files the way the example-site does, but if you don't want to do that then just disable both of the default handlers in config.lsp and create your own route (as described in the guide). Your route would simply grab the first part of the request URL, set the DF:selector, and display your main file. Or you could even check the $GET parameters, i.e.: (if (nil? ($GET "downloads/foo")) ...)

Documentation on all of that ($GET, how to display files, etc.) is in the Core API (linking to my copy since rundragonfly.com currently isn't updated):

http://www.taoeffect.com/dragonfly-newl ... gonfly_api