SenseTalk features to LiveCode?

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

Post Reply
rinzwind
Posts: 131
Joined: Tue May 01, 2012 10:44 am

SenseTalk features to LiveCode?

Post by rinzwind » Wed Sep 14, 2016 6:20 am

I think its a good thing to research the few other xTalk alternatives looking for ideas to improve LiveCode.

SenseTalk was the scripting environment of NeXTStep/OpenStep (you know, the one where mr Jobs was involved with) and now officially in use by TestPlant/eggPlant (automated testing platform). It has some very good documentation, both online and in PDF. I would recommend for the main architect(s) of the LiveCode language to take a good look at their additions to HyperCard and give them complements by implementing some of these additions in LiveCode.

Some things seems to be easy to implement and are a major improvement. Things that also are already frequently requested by other LC users. Things like multi line value assignment (text block) and by reference variables.

PDF: http://docs.testplant.com/PDFs/SenseTal ... erence.pdf

The database handling is also neat (implemented as a language feature).

simple values
<3FA64B> --binary, spaces, newline ignored

text block
put {{The Matrix
Terminator
Star Trek}} into movies

nested list

property list
put (name:"john", age:30) into person
put name of person
put person.name

iterator
put "A" to "Z" into alphabet
put alphabet.nextValue
OR
...


byte size
MB KB

local, global (main stack), universal (between main stacks)

multi variable assignment
put 0 into (a, b, c)
put 1, 2, 3 into a, b, c

put 30 into age
put reference to age into age2
OR
put @age into age2
put age2
add 1 to age2
put age --31
add 1 to age
put age2 --32

myFunction @age --pass reference to age to myFunction

automatic date/time/weight/size arithmetic/conversion
put today + 2 weeks into dueDate

more date formats (international date)

database handling

rinzwind
Posts: 131
Joined: Tue May 01, 2012 10:44 am

Re: SenseTalk features to LiveCode?

Post by rinzwind » Thu Sep 15, 2016 5:43 am

It supports the DOT NOTATION which is clean and short ;)
:
put (firstName:"Joseph", age:50) into joe put property age of joe -- 50
put the age of joe -- 50
put joe's firstName -- Joseph
put joe.firstName -- Joseph

tellMeMore's elucidation "terse",5
utilities.insertCommas @myNumber,3

Object first notation also makes it possible to create a more useful intellisense code editor feature.

capellan
Posts: 418
Joined: Wed Aug 15, 2007 11:09 pm
Contact:

Re: SenseTalk features to LiveCode?

Post by capellan » Sat Sep 17, 2016 2:56 am

How did work for Macromedia Director mixing dot syntax and
their own x-talk influenced Lingo language?

https://en.wikipedia.org/wiki/Lingo_(pr ... _language)
http://help.adobe.com/en_US/Director/11 ... -7fce.html

rinzwind
Posts: 131
Joined: Tue May 01, 2012 10:44 am

Re: SenseTalk features to LiveCode?

Post by rinzwind » Fri Nov 04, 2016 4:13 pm

Interesting (old) interview with the main architect of SenseTalk/HyperSense Doug Simons. Shame its only used in eggPlant...
http://www.zathras.de/angelweb/xtalkint ... simons.htm

The same questions asked to other xTalk people out there.

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

Re: SenseTalk features to LiveCode?

Post by FourthWorld » Fri Nov 04, 2016 5:30 pm

rinzwind wrote:text block
put {{The Matrix
Terminator
Star Trek}} into movies
I submitted a similar request some time ago, inspired at the time by bash's heredoc. I just updated that with consideration of the SenseTalk syntax (thanks for drawing my attention to that - heredoc is arguably geekier than would be best for our language, and having another xTalk already provide this provides useful guidance):
http://quality.livecode.com/show_bug.cgi?id=17471
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/

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2673
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: SenseTalk features to LiveCode?

Post by mwieder » Fri Nov 04, 2016 8:52 pm

Nice suggestions.
myFunction @age --pass reference to age to myFunction
I believe this is now done be default behind the scenes without needing to explicitly state it.
Since LC8 (IIRC) LiveCode has supported copy-on-write, so no extra copy is created until it's necessary.

However, in the sense of passing a handle to an asset, that's still handled at the function definition end rather than at the caller end.
I can't say one way is better than the other, but trying to manage both optionally would be a nightmare for the parser.

Post Reply

Return to “Feature Requests”