RosettaCode
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
RosettaCode
Hi all,
i came across a really useful resource: RosettaCode
Many of you have undoubtedly come across this before, but as i've not seen mention of it in the forums i though i'd post it here.
RosettaCode implements a number of common algorithms across a huge variety of languages, including liveCode, and I've found useful solutions there more than once.
I'd highly recommend this as a resource as the solutions tend to be as concise as possible and often very useful and thought-provoking - as well as having access to the same algorithm in all other languages for comparison.
They have basically set a number of algorithms to be performed in all languages and there is a list of algos still not being done in each language.
For liveCode, the pending algorithms are listed here: https://rosettacode.org/wiki/Reports:Ta ... n_LiveCode
I'll work on some but thought this might be good for the community at large both to consult and to contribute to - quite an interesting site.
Stam
i came across a really useful resource: RosettaCode
Many of you have undoubtedly come across this before, but as i've not seen mention of it in the forums i though i'd post it here.
RosettaCode implements a number of common algorithms across a huge variety of languages, including liveCode, and I've found useful solutions there more than once.
I'd highly recommend this as a resource as the solutions tend to be as concise as possible and often very useful and thought-provoking - as well as having access to the same algorithm in all other languages for comparison.
They have basically set a number of algorithms to be performed in all languages and there is a list of algos still not being done in each language.
For liveCode, the pending algorithms are listed here: https://rosettacode.org/wiki/Reports:Ta ... n_LiveCode
I'll work on some but thought this might be good for the community at large both to consult and to contribute to - quite an interesting site.
Stam
-
- Livecode Opensource Backer
- Posts: 10116
- Joined: Fri Feb 19, 2010 10:17 am
Re: RosettaCode
"Tasks not implemented in LiveCode"
Quite bewildering, but, Yes, a good landing place for
those in need of a spot of mental stretching.
Quite bewildering, but, Yes, a good landing place for
those in need of a spot of mental stretching.

Re: RosettaCode
I could not find "LiveCode" in the long list of programming environments.
Anyway, I thought I would try one of the simpler tasks, right at the top, the "99 bottles of beer". With a field 1 containing the first stanza, in a button script:
Works fine, if a bit brute-force. But I could not publish it because my Safari browser is out of date for them.To get it updated, I would have to change from Catalina to Big Sur. I have heard odd things about LC and Big Sur. Anyone think it is not an issue?
Craig
Anyway, I thought I would try one of the simpler tasks, right at the top, the "99 bottles of beer". With a field 1 containing the first stanza, in a button script:
Code: Select all
on mouseUp
put fld 1 into baseText
put baseText into workingText
repeat 98
subtract 1 from word 1 of workingText
subtract 1 from word 8 of workingText
subtract 1 from word 18 of workingText
put return & workingText after basetext
end repeat
replace "0" with "No more" in basetext
end mouseUp
Craig
-
- Livecode Opensource Backer
- Posts: 10116
- Joined: Fri Feb 19, 2010 10:17 am
Re: RosettaCode
Let's go OT . . .
so I got onto the beta programme for MacOS 12 (Monterey), and all the problems went away.
Now running the stable release of MacOS 12.
But I have a 2018 Mac Mini which does upgrade to MacOS 12.
My advice is that:
1. If your machine will upgrade to MacOS 12, upgrade it.
2. If your machine will NOT upgrade to MacOS 12 stick with MacOS 10.15 (Catalina),
and do NOT touch MacOS 11 (Big Sur) with a 10 foot pole.
My own experiences with MacOS 11 (Big Sur) were awful (especially re LiveCode),I have heard odd things about LC and Big Sur. Anyone think it is not an issue?
so I got onto the beta programme for MacOS 12 (Monterey), and all the problems went away.
Now running the stable release of MacOS 12.
But I have a 2018 Mac Mini which does upgrade to MacOS 12.
My advice is that:
1. If your machine will upgrade to MacOS 12, upgrade it.
2. If your machine will NOT upgrade to MacOS 12 stick with MacOS 10.15 (Catalina),
and do NOT touch MacOS 11 (Big Sur) with a 10 foot pole.
Re: RosettaCode
Richmond.
You of all people will love this about 10 foot poles.
https://www.milesgeek.com/decomposing-n ... ns-culture
Craig
You of all people will love this about 10 foot poles.
https://www.milesgeek.com/decomposing-n ... ns-culture
Craig
-
- Livecode Opensource Backer
- Posts: 10116
- Joined: Fri Feb 19, 2010 10:17 am
Re: RosettaCode
Wow: interesting stuff.
Although a good Gaelic word comes to mind: Fioch.
Although a good Gaelic word comes to mind: Fioch.

Re: RosettaCode
erm... the page is already on the LiveCode section, the list is to navigate to all other languages, which is why you won't find LiveCode there lol

Also note the 2nd link is the landing page missing/incomplete algorithms - and this is for the LiveCode language.
If you go to their homepage you can navigate to a link for all items for specific languages. For LiveCode, this is https://rosettacode.org/wiki/Category:LiveCode
It's a great resource for looking for algorithms like how to check if a certain year is a leap year, how to traverse folder structures recursively etc. Many have already contributed, but if people don't know about it, it's no good (much like this great language

Re: RosettaCode
Stam.
Right you are.
Craig
Right you are.
Craig
Re: RosettaCode
The change to Big Sur did bring some bugs but these were squashed in subsequent release candidates (best version was 9.6.2 RC2 - subsequent versions have included acknowledged issues with graphic objects, but the Big Sur bugs were resolved in my use cases).
The upgrade to MacOS Monterey 12.0.1 was much better in that respect; Ive not experienced a single new bug so far in LC.
However, curiously, LiveCloudManager (LiveCloud's tool for viewing online databases) seems to hang on startup every single time i launch this. This does not affect LiveCloud in any other way (ie it works just fine within LC), but it's a monumental PITA if trying to work on a new project.
So that was an unanticipated casualty...
-
- Posts: 665
- Joined: Tue Jul 29, 2014 12:52 am
Re: RosettaCode
I have been using LC with Big Sur for several months now (on a MacBook Air M1) with no problem whatsoever, as a matter of fact I'm in doubt if I should upgrade to Monterrey right now of wait a bit to thing to settle a bit...I have heard odd things about LC and Big Sur. Anyone think it is not an issue?
Simon
________________________________________
To ";" or not to ";" that is the question
________________________________________
To ";" or not to ";" that is the question