Where is the list of current working implemented Lua commands?

Case number:954892-996467
Topic:Developer Preview
Opened by:Bruno Kestemont
Status:Closed
Type:Question
Opened on:Monday, December 16, 2013 - 17:38
Last modified:Wednesday, December 16, 2015 - 14:09

Hello,

There are many changes in new Foldit versions, for example Wiggle with a time in seconds.

Is there any depository with the ultimate corresponding Lua commands?

I know this list:
https://docs.google.com/spreadsheet/ccc?key=0Ao8zT_UBuJe8dGxTNHFUdzJnbjk1dW5JMEo1Z1RYNGc#gid=0

and this one:
http://foldit.wikia.com/wiki/Foldit_Lua_Functions

and the "help" command within Foldit.

All these lists seem to be outdated and report commands that do not work, like:
structure.Tweakstraighten(integer Segmentindex)

I know it's a bump.

(Mon, 12/16/2013 - 17:38  |  9 comments)


spvincent's picture
User offline. Last seen 4 hours 8 min ago. Offline
Joined: 12/07/2007
Groups: Contenders

I believe that Brow wrote a script to see which functions are implemented : https://fold.it/portal/recipe/46122.

MurloW's picture
User offline. Last seen 8 weeks 22 hours ago. Offline
Joined: 11/21/2012

A webpage or easy-to-read, downloadable text-based file is much handier than having to have an open foldit client doing nothing but showing an output window while working on code and referencing a command/argument list. I appreciate the effort put into the script and your reply, but I vote for the FoldIt Lua Functions page to actually be complete and comprehensive.

About your examples, wiggle with a time in seconds integer and tweakstraighten,
they both don't seem to work, but this feedback tells you why tweak doesn't(and why it does show up in brow's script and the time integer for wiggle doesn't).

I do wish they'd implement the timeout integer, this feedback got my hopes up, but it seems they haven't gotten around to it yet.

brow42's picture
User offline. Last seen 4 days 17 hours ago. Offline
Joined: 09/19/2011
Groups: None

Well, I wrote the script so that I wouldn't have to open the web page just to get the arguments, or to find out I left Segment out of GetSegmentEnergySubscore. I also wrote it so that if the devs added a function, we would know about it and could add a wiki page for it, or ask the devs what it did.(*)

What exactly are you asking for here? Because the wiki page is *THE* list for functions that actually work. Yes, it can be out of date. This happened when the centroid puzzles were released to main, bkoep (I think) forgot to include the function in the news posting. If you find that the wiki is out-of-date, you can 1) fix it yourself, 2) ask another scripter if they know what it does, or 3) post a specific feedback about it. The Foldit API only changes a couple times a year; we don't need to make a big production out of it.

If you are really concerned about the wiki not being up to date, then you have the help searcher script and the google docs page. The search script literally dumps all function entry points in the client. TweakSegment is a real function. It exists, it's callable, it just doesn't do anything. I choose not to add that to the wiki because 1) it doesn't do anything, 2) it's never done anything, 3) there's no announced plans to make it do anything in the future. Better nobody even knows they exist. I added the wiggle and shake accuracy functions because, once upon a time, they did do something, they are still called in existing scripts, and that should be documented.

As for the google docs, jflat explicitly said it was their internal function list, and some of those functions may only exist in their development build (not the devprev or main build). It may be out of date (I'm not sure if he uploaded that just for us or if they actually work from that google document).

You want the list of useful functions? It's the wiki. It may be out of date.

You want the up-to-date list of functions? It's the dump of the Lua functions tables. These functions may do nothing, or even crash.

You want an up-to-date list of useful functions? That's the users, updating the wiki. It doesn't exist anywhere else.

It seems you (Bruno, MurloW) are asking that the devs update the wiki, without outright asking them to update the wiki. That's not really their responsibility. Documenting changes in the news post *IS* their responsibility. They notify us of the change, we update the wiki.

(*) This will catch functions being added or deleted. I don't know if Lua help() auto-generates the argument list or if it's part of the developer-written description. If they did add a timeout to wiggle, that would be documented in the news post, right?

Joined: 04/15/2012
Groups: Beta Folders

Perhaps one or two people should take responsibility of keeping it updated?

Joined: 09/24/2012
Groups: Go Science

Hello brow42.

I already edited the Wiki in the past. But:
"Note: This page is automatically generated. Any modifications to the page will be wiped out the next time that it is generated" so I only edited the "details" part on displayed functions.

If I understand you well, I should rely only on the Wiki to be sure a function is really working. That's the answer to my question. Thanks.

Note: Using a recipe or help to list workable functions is suboptimal for me. I usually script away from foldit client. It's also not ideal using copy-paste, what I find more practical (having the right spelling and seeing everything on the same screen). The Wiki is my prefered reference source.

MurloW's picture
User offline. Last seen 8 weeks 22 hours ago. Offline
Joined: 11/21/2012

I.. didn't ask for anything? Was merely trying to be helpful, provide info coming from other feedbacks.

Since the wiki page says it's auto-generated,
the aforementioned feedback pertaining to wiggle timeout confused me;
since it seemed (to me) to say those functions were already implemented (while not found in wiki).
And with TweakSeg not erring in client(while TimeOut does), but also not found in wiki, I assumed that the wiki page wasn't updating anymore.
Now I know why TweakSeg isn't up there, and indeed, rightfully so.

The reason I said a webpage/text-file is much handier for me than your script is simply because I often copy/paste (as to not mess up the order of arguments and then not understand what's wrong) directly into foldit client from wiki and edit there for instant testing.

Joined: 09/24/2012
Groups: Go Science

Great news !

LociOiling found a way to update the Lua commands Wiki page with actual implemented commands:

http://foldit.wikia.com/wiki/Foldit_Lua_Functions

(I let the post open several days for info)

LociOiling's picture
User offline. Last seen 19 min 59 sec ago. Offline
Joined: 12/27/2012
Groups: Beta Folders

Hmmm, I guess I should have done some more searching while I was working on the update, didn't realize this feedback existed. As Bruno notes, http://foldit.wikia.com/wiki/Foldit_Lua_Functions is now updated. I've published the tools I used to do this as recipes. They are actually standalone Lua scripts, but now anyone can update the web page without too much difficulty.

I've started a description of the update process on http://foldit.wikia.com/wiki/Foldit_Lua_Functions_List_Generation and I'll add some additional detail in the near future.

One last step is to compare the output of "help()" to the results of inspecting each function "namespace". (For example, "structure" is a "namespace", really just a plain old Lua table.) This allow some assurance that we aren't missing anything. There are several problems in the help output, noted this feedback: http://fold.it/portal/node/2000767

All of this effort details the syntax of the Foldit Lua interface V2. There's very little of the semantics, or what the functions really do. Some things, like cutpoints, are relatively clear. But important things, like how wiggle differs from shake and how local wiggle differs from wiggle aren't captured. These things are probably best covered in separate discussions on the wiki.

Joined: 09/24/2012
Groups: Go Science
Status: Open » Closed

ok thanks LociOiling !

Sitemap

Developed by: UW Center for Game Science, UW Institute for Protein Design, Northeastern University, Vanderbilt University Meiler Lab, UC Davis
Supported by: DARPA, NSF, NIH, HHMI, Amazon, Microsoft, Adobe, RosettaCommons