lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Yeah, a lot of guys are definitely over-thinking this (I haven't read all of the previous comments in the thread yet, but judging from what I've seen). The model for a Lua Recipes site isn't Github or LuaRocks; it's Pastebin / Bitbucket.

The way I would layout the main page would be a big search bar at the top (for finding existing recipes) and an empty form at the bottom (for pasting into). If you're looking for a recipe for something, you can enter your query and, if matching a tag, it would present all recipes with that tag, where otherwise it would search descriptions, code comments, and recipe response comments. If you're looking to submit a recipe, you can write/paste it in the large multiline text form at the bottom (or maybe upload a file). You can hit submit and save it (which will also then compile and save its output/errors, if any, to be shown on the page after the code. If the code included an or or require of a module not present in the compilation/demo sandbox, it would simply skip this step altogether).

After it's saved and you are taken to the recipe's page, you would be prompted to edit the page and add a title/description (A description that recognizes "titles" as a line (not ending with a full stop) followed by 2 newlines, for the rare situation that a recipe needs a title to summarize its description) and tags (when adding tags, there'd be a Javascript pop-up telling you what tags already exist, and the site administrator could manually lay out a logical tag progression ("os"-> "files" -> "file-read" -> "XML-Parsing") and synonyms (like "file" and "files", as addressed above).) Scripts lacking tags (or descriptions) would be featured in a "Help! Tag these recipes:" sidebar.

As stated, comments are a must, and they should be visible while editing so you can copy+paste code suggested in comments. As for making it so that "only the original contributor can edit", I'd say we leave this one more to etiquette (and track IPs/include a "nuke edits from this IP and ban" admin button to handle outright vandalism). Include an "Author" field on the edit page for the contributor credit that's tracked with the code, description, and tag history.

I can make an IUP window / SVG image mockup of this design.

For simplicity's sake, we should just do what Wikipedia does and say that anything submitted to the site must be licensed under a specific license (most likely MIT). There's no reason to force people into anything else (except public domain): there's not really any danger of anybody getting rich off the hard labor put into a 20-line Lua recipe because it wasn't GPLv3 licensed.

If you want to come up with an architecture that lets you manage a module like a project on Github, I'll do you one better: make a project for a module on Github.

From: "steve donovan" <>
Sent: Sunday, September 20, 2009 A8:09
Newsgroups: gmane.comp.lang.lua.general
To: "Lua list" <>
Subject: Re: Lua Recipes Site?

On Sun, Sep 20, 2009 at 4:37 PM, George Petsagourakis
<> wrote:
I would like to throw in the conversation. It can provide a good way to manage code in a so distributed environment we are talking about
(much non coherent code, many users, etc).

Gosh, this is getting complicated. I like Web+copy/paste myself.  OK,
I'll obviously have to get Git at some point in my life, but remember
that the main issue is not how to store the recipes, but how to tag
them and search them intelligently, by a combination of
classification, tags and keyword search.