Recursive union and intersect commands

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, LCMark

Locked
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7229
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Recursive union and intersect commands

Post by jacque » Mon Nov 11, 2013 8:05 pm

There has been a request in the Feature Request area of the forum to recursively create folders when a full path is provided. I liked that so I entered it into Bugzilla with the suggested syntax:

Code: Select all

create folder "/Users/me/folder 1/folder2/" recursive
Monte mentioned that union and intersect have similar syntax but use the adverb "recursively". To date, with one exception, there are no other adverbs in the language:

flip img vertical
sort lines of var numeric
move btn 1 50,50 relative

I thought the union/intersect change was the only adverb in the language until I found this (also recently-added) one:

start using font file tPath globally

To keep things consistent, should union/intersect also use the non-adverb version? Or at least accept both "recursive" and "recursively"? Actually, I'd like to see font inclusion accept "global" as well.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1208
Joined: Thu Apr 11, 2013 11:27 am

Re: Recursive union and intersect commands

Post by LCMark » Mon Nov 11, 2013 8:21 pm

Or should it be that flip/sort/move should be changed to take adverbs and then the non-adverbs as synonyms? ;)

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7229
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Recursive union and intersect commands

Post by jacque » Mon Nov 11, 2013 8:30 pm

The order of precedence is up to you, but reprogramming my brain would be difficult. We have tradition to consider here, you know. ;)

And here I thought you were the strict overseer of the language syntax. Hmph.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: Recursive union and intersect commands

Post by monte » Tue Nov 12, 2013 12:44 am

Well I guess with 6.1.3 out now we are stuck with adverbs in the language which is meant to be english like after all... In both cases it seemed like nice syntax when it was suggested so I didn't question that there was no precedence for adverbs in the language.
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1208
Joined: Thu Apr 11, 2013 11:27 am

Re: Recursive union and intersect commands

Post by LCMark » Tue Nov 12, 2013 9:27 am

This is intriguing... The adverbs that have been added lately are from my suggestion, however it wasn't from a point of view to be inconsistent or introduce something new - I thought we already had them... However, I realized last night that I always get 'flip' wrong - it takes me at least 2 attempts to remember its 'flip horizontal' and not 'flip horizontally' for the simple reason that it sounds correct to me in my head.

I do wonder why the other cases @jacque presents are not adverbs though - after all, from my point of view at least adverbs in all these contexts is the 'correct' part of speech to use and if we are an English-like language then shouldn't it use correct forms where possible? Indeed, simplicity in many cases in the language stems from being able to (largely) write what you think as far as is possible and thus adverbs seemed to fit.

Is there a difference between American and British English here (or a legacy from HyperCard, or a Dr Scott Raneyism)? These are the only reasons I can think of the other commands don't use adverbs (these tokens aren't used anywhere else so its not economy, the additional 'ly' wouldn't have made any difference).

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: Recursive union and intersect commands

Post by monte » Tue Nov 12, 2013 9:56 am

Hmm... I guess if it was an American v British English thing it makes sense that is sounds better in my Australian English head... I guess if that's the case then for consistency with color and behavior we would need to go with the American form. I found this when googling "adverbs american english": http://blog.oup.com/2007/08/adverb/
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Recursive union and intersect commands

Post by trevordevore » Tue Nov 12, 2013 2:57 pm

runrevmark wrote:Is there a difference between American and British English here (or a legacy from HyperCard, or a Dr Scott Raneyism)? These are the only reasons I can think of the other commands don't use adverbs (these tokens aren't used anywhere else so its not economy, the additional 'ly' wouldn't have made any difference).
FWIW - an adverb sounds much better to my ears. I prefer the new approach (e.g. load font globally)
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7229
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Recursive union and intersect commands

Post by jacque » Tue Nov 12, 2013 4:57 pm

It's a HyperCard compatibility thing. There were no adverbs in HC anywhere. American speakers use "ly"... consistently and properly.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1208
Joined: Thu Apr 11, 2013 11:27 am

Re: Recursive union and intersect commands

Post by LCMark » Tue Nov 12, 2013 5:05 pm

It's a HyperCard compatibility thing. There were no adverbs in HC anywhere. American speakers use "ly"... consistently and properly.
In which case, what's the argument for accepting 'recursive' and 'global' in LiveCode? If the existing syntax (from HyperCard) that should really have had adverbs doesn't for compatibility reasons (I still wonder why HyperCard avoided them), surely the better approach would be to deprecate the non-adverb forms and add adverb synonyms for them, thus moving forward with the less-strained-English adverb using forms for new syntax...

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7229
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Recursive union and intersect commands

Post by jacque » Tue Nov 12, 2013 7:08 pm

Synonoyms would be fine. I'm not particularly married to avoiding adverbs, I just don't want to have to remember two different types of syntax and keep track of which commands use adverbs and which ones don't. Mostly I was just teasing you, but I do think consistency is important.

For that matter, I think it would be fine if you add synonyms for all those words you want to spell with an additional "u". Then you can, for example, get the colournames. :) After all, we have hilite and highlight and hilight and who knows what else.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: Recursive union and intersect commands

Post by monte » Tue Nov 12, 2013 8:27 pm

It would be nice if it were possible to tag locale based equivalents in the engine and present them appropriately depending on the authors locale both in the dictionary and in scripts... I guess that's a reasonable size project though.

Talking about deprecation... what would need to be done in order to highlight deprecated syntax in the script editor (red & crossed out)?
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1208
Joined: Thu Apr 11, 2013 11:27 am

Re: Recursive union and intersect commands

Post by LCMark » Wed Nov 13, 2013 10:35 am

It's a HyperCard compatibility thing. There were no adverbs in HC anywhere. American speakers use "ly"... consistently and properly.
I wasn't casting aspersions in any way on American English - I was more trying to verify whether in American English it is common to not use an adverb in the kinds of contexts we are talking about - e.g. 'I flipped the image horizontal', rather than 'I flipped the image horizontally'.
Synonoyms would be fine. I'm not particularly married to avoiding adverbs, I just don't want to have to remember two different types of syntax and keep track of which commands use adverbs and which ones don't. Mostly I was just teasing you, but I do think consistency is important.
Well, that's the thing - it would be better not to have two different types of syntax... So if the adverb forms are considered better and more expressive, isn't a relatively small change (i.e. reprogrammaing ;)) to move to using adverbs in all situations it would be better if they were there.
For that matter, I think it would be fine if you add synonyms for all those words you want to spell with an additional "u". Then you can, for example, get the colournames. :) After all, we have hilite and highlight and hilight and who knows what else.
This has been suggested before, but in terms of adding synonyms for the British English forms then I think it might just be too subtle. It works for things like 'the behaviour of control ...', but it would still have to be 'behavior' when returned in 'the properties'. Obviously there are lots of synonyms at the moment, but they are usually either contractions or for convenience and there's generally always an obvious one which is considered to be the principal one.
It would be nice if it were possible to tag locale based equivalents in the engine and present them appropriately depending on the authors locale both in the dictionary and in scripts... I guess that's a reasonable size project though.
Doing something like this would be feasible, and would perhaps work fine for syntax but as properties (and messages) are dynamic you have the issue of in some cases having to use the 'principal' form and if the differences between them are subtle (like an added 'u') then it might cause more problems than it solves.
Talking about deprecation... what would need to be done in order to highlight deprecated syntax in the script editor (red & crossed out)?
I think there's at least initial support in the dictionary for this - I'm pretty sure there's a possibility for expressing it in the XML files. I'll have to check with @runrevelanor.

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: Recursive union and intersect commands

Post by monte » Wed Nov 13, 2013 9:36 pm

I was thinking more along the lines of the script colorisation in the IDE engine
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7229
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Recursive union and intersect commands

Post by jacque » Thu Nov 14, 2013 12:27 am

I wasn't casting aspersions in any way on American English - I was more trying to verify whether in American English it is common to not use an adverb in the kinds of contexts we are talking about - e.g. 'I flipped the image horizontal', rather than 'I flipped the image horizontally'.
Now that I think about it, I have heard some people say "flip horizontal". Those who paid attention in English class know it's grammatically incorrect but I hear it anyway. I hadn't thought about it until now; it may be a sub-culture thing, or it may just be a natural shortcut since people everywhere tend to shorten longer words to two or three syllables when speaking.

At any rate, I didn't feel you were casting aspersions on our grammar, though some US-ians are very good at being verbal slobs. As we say: it didn't bother me none.

:)
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Locked

Return to “Engine Contributors”