No worries, Ormente. Text-only discussion is inherently prone to misunderstanding. And even if a serious misunderstanding were to occur, it's nothing that can't be mended with an hour over a beer. If you're ever passing through Los Angeles let me know - or even better, if it's on the first Thursday of the month you could attend our monthly LiveCode User Group meeting.Ormente wrote:I get your point Richard, and i'm very sorry i misread your message. Please accept my apologies.
Thanks a lot for repeating what i should have understood in the first place.
My point of view
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 9842
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: My point of view
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: My point of view
Richard, that would be a great pleasure, but sadly i can't see that happening any time soon (i live in France).
For the language features i suspect most of them are just lack of experience/understanding of my part. But here are some things i have in mind right now (i will take some time later to list more, with "why and how") :
The most important thing i miss is functions as "first class citizens": the ability to pass functions or commands as arguments to others, or to store them in variables or arrays. I see i can store their names and use call or send, but that feels unsatisfactory to me.
I would also like to store "references" to "objects" in variables in order to do something like this, when i have multiple things to do with an object:
I gess while we are at it we could have the same syntax used with our new 1st class citizen:
For efficiency reasons i would also like to compile regex and reuse them.
For some uses i wou also like that :
- replaceText can accept a callback in place of replacementString
- matchText (or matchAllText) can populate an array of all matches
An example on the top of my head : i could have a lot of strings like "This is a T{cow} with T{horns}" to process with replaceText(myString, myRegexp, myTranslationFunction). Having myRegexp precompiled would be more efficient (unless it's allready the case under the hood), and using a callback you could (for example) get replacement strings from internet, or a database, or someting else.
For the language features i suspect most of them are just lack of experience/understanding of my part. But here are some things i have in mind right now (i will take some time later to list more, with "why and how") :
The most important thing i miss is functions as "first class citizens": the ability to pass functions or commands as arguments to others, or to store them in variables or arrays. I see i can store their names and use call or send, but that feels unsatisfactory to me.
I would also like to store "references" to "objects" in variables in order to do something like this, when i have multiple things to do with an object:
Code: Select all
refer to button "bDoThings" of card "theCard" using myButton
send something to myButton
Code: Select all
-- this avoid to make 100 times the same test
if someCondition then
refer to function "foo" of button "btn" of card "theCard" using myFunction
else
refer to function "bar" of card "aLibrary" using myFunction
end if
repeat 100 times
myFunction
end repeat
For some uses i wou also like that :
- replaceText can accept a callback in place of replacementString
- matchText (or matchAllText) can populate an array of all matches
An example on the top of my head : i could have a lot of strings like "This is a T{cow} with T{horns}" to process with replaceText(myString, myRegexp, myTranslationFunction). Having myRegexp precompiled would be more efficient (unless it's allready the case under the hood), and using a callback you could (for example) get replacement strings from internet, or a database, or someting else.
Re: My point of view
Bonsoir Ormente,
at least the first one can be easily done like this:
...
## refer to button "bDoThings" of card "theCard" using myButton
put the long ID of button "bDoThings" of card "theCard" into YourButton
send "something" to YourButton
...
Best
Klaus
at least the first one can be easily done like this:
...
## refer to button "bDoThings" of card "theCard" using myButton
put the long ID of button "bDoThings" of card "theCard" into YourButton
send "something" to YourButton
...
Best
Klaus
Re: My point of view
Thanks Klaus, very interesting.
-
- VIP Livecode Opensource Backer
- Posts: 9670
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: My point of view
I am interested in your comment about LC not being able to include functions as arguments to other functions. Make a button. In it s script:
In the card script:
Am I not understanding your concerns?
Craig Newman
Code: Select all
on mouseUp
answer doubleArg(doubleArg(doubleArg(10)))
end mouseUp
Code: Select all
function doubleArg var
return var * 2
end doubleArg
Craig Newman
-
- VIP Livecode Opensource Backer
- Posts: 9670
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: My point of view
Klaus.
This ought to be a new thread, since it deals in functionality.
Craig
This ought to be a new thread, since it deals in functionality.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9842
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: My point of view
FWIW I think it's fine where it is. It's in the OT section in a thread title "My point of view". Many here have expressed their various points of view, and I find it refreshing to see these views include specific and potentially actionable requests.dunbarx wrote:This ought to be a new thread, since it deals in functionality.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: My point of view
Thanks for the reply Craig.
What you are doing is passing the result of a function to another function. What i would like to do is more like this :
I think it's better for me to wait before opening a new thread, as i need to become more familiar with the language and list all my "wishes" in regard of a better understanding.
What you are doing is passing the result of a function to another function. What i would like to do is more like this :
Code: Select all
function add x y
return x + y
end add
function prod x y
return x * y
end prod
-- That's the juicy part
function doOp op x y
return op(x,y)
end doOp
-
- VIP Livecode Opensource Backer
- Posts: 9842
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: My point of view
Interesting. You could do something like that with LiveCode's value function:Ormente wrote:Thanks for the reply Craig.
What you are doing is passing the result of a function to another function. What i would like to do is for like this :
Code: Select all
function add x y return x + y end add function prod x y return x * y end prod -- That's the juicy part function doOp op x y return op(x,y) end doOp
Code: Select all
on mouseUp
put doOp( "foo", 10,10)
end mouseUp
function doOp op, x, y
return value( op &"("& x &","& y &")" )
end doOp
function foo x,y
return x+y
end foo
Being a bit of a benchmarking fetishist, the next question I had was: Just how much faster is a direct call?
Running this:
Code: Select all
on mouseUp
put 10000 into n
put 10 into x
put 10 into y
-- with value:
put the millisecs into t
repeat n
put doOp("foo", x,y) into r1
end repeat
put the millisecs - t into t1
-- inline:
put the millisecs into t
repeat n
put foo(x,y) into r2
end repeat
put the millisecs - t into t2
-- show results:
put "doOp: "& t1/n &" ms"&cr \
& "foo: "& t2/n &" ms" &cr& (r1=r2)
end mouseUp
So while an inline call is indeed much faster relatively speaking, in absolute terms the difference is only a few microseconds. Probably fast enough for infrequent use.doOp: 0.0064 ms
foo: 0.0014 ms
true
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: My point of view
You got the point of this perfectly Richard: its (among other things) to avoid the cost of value/eval.
I'm also a bit of a benchmarking fetishist Thanks for doing this benchmark, it's very revealing.
If you don't do it before me (time to eat here) i'll try your value trick with my example above to avoid testing in a loop, so we can see if this result in a net gain or not.
Javascript is a good reference in your example, as it's a language where functions are first class.
I'm also a bit of a benchmarking fetishist Thanks for doing this benchmark, it's very revealing.
If you don't do it before me (time to eat here) i'll try your value trick with my example above to avoid testing in a loop, so we can see if this result in a net gain or not.
Javascript is a good reference in your example, as it's a language where functions are first class.
Re: My point of view
I've done the test and value is wayyyyy more costly than a simple test (if). Not a surprise!
So for now doing tests in the loop is better.
So for now doing tests in the loop is better.
Re: My point of view
This highlights a whole different problem, livecode is nothing like those companies in any way in terms of user numbers, product maturity or revenue. They rely on a small user base to keep their product alive, they don't frequently interact with the community in the ways that you would expect a comparatively small opensource project to ( which would be to their benefit product development wise and financially). I could be mistaken but I didn't see any Livecode ltd led community discussion on the subject of how the widgets should be moved forward. There was an email sent saying we think widgets are basic, we've decided on a widgets v2, by the way we're opensource so it's up to you to pay for it. The word opensource only seems to get banded around when there's a call for funding. I really don't see much in the way of genuine, meaningful engagement in between appeals for money.FourthWorld wrote: LiveCode Ltd is like Apple, and Adobe, and most other companies I've seen in that regard: there's a very regular high volume of suggestions floating around in their community. Some of those contradict others, some have already been tried, and some may be real gems, but when they're submitted to a user-to-user support forum rather than to the company that choice almost guarantees the company won't see them, certainly leaving things far more to chance than if they were sent directly.
Again, the video tutorials which are a valuable resource for newcomers to evaluate and see the capabilities of the language are paywalled. They should be used as a resource for onboarding and retaining new users.
This thread has been an eye opener, I do wish they would speak up a bit more on their intentions if in fact it is to evolve into a foundation type entity. That would shed a whole new light on proceedings. As for now I think there are a lot of mixed messages as to the direction that they are headed
-
- VIP Livecode Opensource Backer
- Posts: 9842
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: My point of view
I never said the similarity was in revenue. The comparison was only in terms of guidance ostensibly directed at the company but not sent to them, instead posted in user-to-user forums.javea71 wrote:This highlights a whole different problem, livecode is nothing like those companies in any way in terms of user numbers, product maturity or revenue.
I was unable to find your posts in the Engine Contributors section of the forums, or in the Github repos. Were you posting under a different screen name?I could be mistaken but I didn't see any Livecode ltd led community discussion on the subject of how the widgets should be moved forward. There was an email sent saying we think widgets are basic, we've decided on a widgets v2, by the way we're opensource so it's up to you to pay for it. The word opensource only seems to get banded around when there's a call for funding. I really don't see much in the way of genuine, meaningful engagement in between appeals for money.
What specific changes would you like to see made to the Widgets implementation?
That might be valuable feedback for them. What did they say when you wrote to them?Again, the video tutorials which are a valuable resource for newcomers to evaluate and see the capabilities of the language are paywalled. They should be used as a resource for onboarding and retaining new users.
If it's helpful, in addition to the 78 hands-on tutorials included with the install and the dozens of Lessons freely available at the LC site, there's also more than 50 videos in their accessible YouTube channel, most of which are tutorials:
https://www.youtube.com/user/RunRevLtd/videos
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: My point of view
I wasn't picking at your words, please don't take my post as that. I was highlighting the lack of engagement.
I'm not technically capable of contributing to a technical discussion on the engine or on widgets. That doesn't mean that I can't see a lack of engagement on those subjects from Livecode with the community, it doesn't invalidate my view that for opensource projects the bar is much higher than it was a few years ago.
Im discussing this within the community, whether I choose to email them or not, it's doesn't invalidate my views expressed on here (I'm contemplating whether it's worth it to be totally honest)
Do you or any other senior posters receive license discounts from Livecode for your presence on the forums?
That doesn't matter to me by the way, it doesn't validate or invalidate any views you have been expressing. Without you guys there would be no community at all.
I'm not technically capable of contributing to a technical discussion on the engine or on widgets. That doesn't mean that I can't see a lack of engagement on those subjects from Livecode with the community, it doesn't invalidate my view that for opensource projects the bar is much higher than it was a few years ago.
Im discussing this within the community, whether I choose to email them or not, it's doesn't invalidate my views expressed on here (I'm contemplating whether it's worth it to be totally honest)
Do you or any other senior posters receive license discounts from Livecode for your presence on the forums?
That doesn't matter to me by the way, it doesn't validate or invalidate any views you have been expressing. Without you guys there would be no community at all.
Re: My point of view
I wished!javea71 wrote:Do you or any other senior posters receive license discounts from Livecode for your presence on the forums?
But no, everyone here is a volunteer!