My point of view

Want to talk about something that isn't covered by another category?

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6113
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: My point of view

Post by FourthWorld » Wed Jun 22, 2016 4:56 pm

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. :oops:
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.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Ormente
Posts: 28
Joined: Wed Nov 12, 2014 7:47 pm
Location: Near Mâcon, France

Re: My point of view

Post by Ormente » Wed Jun 22, 2016 5:41 pm

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:

Code: Select all

     refer to button "bDoThings" of card "theCard" using myButton
     send something to myButton
I gess while we are at it we could have the same syntax used with our new 1st class citizen:

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 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.

Klaus
Posts: 10295
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: My point of view

Post by Klaus » Wed Jun 22, 2016 5:52 pm

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
...
:D


Best

Klaus

Ormente
Posts: 28
Joined: Wed Nov 12, 2014 7:47 pm
Location: Near Mâcon, France

Re: My point of view

Post by Ormente » Wed Jun 22, 2016 5:56 pm

Thanks Klaus, very interesting. :idea:

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5492
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: My point of view

Post by dunbarx » Wed Jun 22, 2016 6:03 pm

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:

Code: Select all

on mouseUp
   answer doubleArg(doubleArg(doubleArg(10))) 
end mouseUp
In the card script:

Code: Select all

function doubleArg var
   return var * 2
end doubleArg
Am I not understanding your concerns?

Craig Newman

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5492
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: My point of view

Post by dunbarx » Wed Jun 22, 2016 6:09 pm

Klaus.

This ought to be a new thread, since it deals in functionality.

Craig

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6113
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: My point of view

Post by FourthWorld » Wed Jun 22, 2016 6:19 pm

dunbarx wrote:This ought to be a new thread, since it deals in functionality.
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.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Ormente
Posts: 28
Joined: Wed Nov 12, 2014 7:47 pm
Location: Near Mâcon, France

Re: My point of view

Post by Ormente » Wed Jun 22, 2016 6:23 pm

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 :

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

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.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6113
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: My point of view

Post by FourthWorld » Wed Jun 22, 2016 6:44 pm

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
Interesting. You could do something like that with LiveCode's value function:

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
LC's value function is very similar to JavaScript's eval, with similar tradeoffs in that it's very flexible but at the cost of needing to interpret the string passed to it dynamically, making it slightly less performant than an inline call.

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
Yields:
doOp: 0.0064 ms
foo: 0.0014 ms
true
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.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Ormente
Posts: 28
Joined: Wed Nov 12, 2014 7:47 pm
Location: Near Mâcon, France

Re: My point of view

Post by Ormente » Wed Jun 22, 2016 6:55 pm

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 :oops: 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.

Ormente
Posts: 28
Joined: Wed Nov 12, 2014 7:47 pm
Location: Near Mâcon, France

Re: My point of view

Post by Ormente » Wed Jun 22, 2016 8:23 pm

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.

javea71
Posts: 7
Joined: Fri Aug 08, 2014 2:02 pm

Re: My point of view

Post by javea71 » Wed Jun 22, 2016 8:41 pm

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.
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.

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

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6113
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: My point of view

Post by FourthWorld » Wed Jun 22, 2016 9:06 pm

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 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.
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.
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?

What specific changes would you like to see made to the Widgets implementation?
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.
That might be valuable feedback for them. What did they say when you wrote to them?

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
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

javea71
Posts: 7
Joined: Fri Aug 08, 2014 2:02 pm

Re: My point of view

Post by javea71 » Wed Jun 22, 2016 9:30 pm

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.

Klaus
Posts: 10295
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: My point of view

Post by Klaus » Wed Jun 22, 2016 9:36 pm

javea71 wrote:Do you or any other senior posters receive license discounts from Livecode for your presence on the forums?
I wished! :D
But no, everyone here is a volunteer!

Post Reply

Return to “Off-Topic”