RosettaCode

Geoff Canyon gcanyon at gmail.com
Mon Jul 8 04:18:17 EDT 2013


I don't have much experience with the site, but what I've seen seems more friendly than contentious. The goal seems to be the exchange of information, to help people learn about the different languages. 

With the new language features coming in LiveCode, I think it provides a rich template for extensions to our syntax. For example, the anagrams problem made it abundantly clear that we need a sort characters command, as well as words. 

gc

Sent from my iPad

On Jul 8, 2013, at 1:30 AM, Scott Rossi <scott at tactilemedia.com> wrote:

> OK, just so I'm clear, thoughŠ  I thought part of the bragging rights of
> these things was to execute the task in as few lines as possible,
> regardless of readability.  Looking through the various entries (including
> the entry you posted), everything looks fairly well formatted/readable. So
> on this site, brevity, while encouraged, isn't really the goal, correct?
> In fact, it seems convoluted options can be posted alongside concise
> options within the same language.
> 
> Regards,
> 
> Scott Rossi
> Creative Director
> Tactile Media, UX/UI Design
> 
> 
> 
> 
> On 7/7/13 10:20 PM, "Geoff Canyon" <gcanyon at gmail.com> wrote:
> 
>> Thanks for contributing!
>> 
>> Hopefully I don't come off quite that harsh... In any case, there doesn't
>> seem to be a better way to add a new entry than:
>> 
>> 1. Go to the page for 99 bottles.
>> 2. Click the entry for the language before LiveCode alphabetically --
>> Liberty BASIC in this case.
>> 3. Edit that entry.
>> 4. Insert the following at the bottom, after a couple CRs:
>> 
>> =={{header|LiveCode}}==
>> <lang livecode>function beerMe numberOfBottles
>>     put "XX bottles of beer on the wall" into verseA
>>     put "Take one down, pass it around" into verseB
>>     repeat with N = numberOfBottles down to 1
>>           put replaceText(verseA,"XX",N) & cr & word 1 to 4 of \
>>           replaceText(verseA,"XX",N) & cr & verseB & cr &
>> replaceText(verseA,"XX",N-1) \
>>           & cr & cr after theSong
>>     end repeat
>>     return theSong
>> end beerMe</lang>
>> 
>> I generally add a comment that I'm adding LiveCode, and then save. It
>> could
>> also be done by editing the entry *after* LiveCard alphabetically, and
>> putting the LiveCode entry before that entry, with a couple CRs between
>> them. Or by editing the whole page, but that would be harder because you'd
>> have to search through the markdown to find the right place to put
>> LiveCode.
>> 
>> Note that in this case I just modified your code to take an argument for
>> the number of bottles just for laughs. If I were optimizing I'd do
>> something like:
>> 
>> function beerMe3 numberOfBottles
>>  repeat with N = numberOfBottles down to 0
>>     put N && "bottles of beer on the wall" & cr & cr & \
>>           N && "bottles of beer on the wall" & cr & \
>>           N && "bottles of beer" & cr & \
>>           "Take one down, pass it around" & cr after theSong
>>  end repeat
>>  return line 3 to -5 of theSong
>> end beerMe3
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list