New Ibex farm - linking with PC Ibex?

53 views
Skip to first unread message

Nene

unread,
May 3, 2021, 4:32:04 PMMay 3
to ibexexperiments
Hello!

I was wondering if there's still a way to use PC Ibex controllers on the new Ibex Farm? 

In the previous Ibex Farm this was achievable by using the "update git repo" function or by uploading the PennController.js file. However, I don't see the git option anymore. I tried manually uploading the PennController.js file, but the PC Ibex controllers still don't work. Also, I wasn't able to add the PennController.ResetPrefix(null); line to the data.js file either, as that line threw an error when I preview the experiment (but I'm not sure if this line was necessary to add). 

Any advice would be appreciated!

Alex Drummond

unread,
May 3, 2021, 4:41:38 PMMay 3
to ibexexperiments
Hello Nene,

See here for the replacement for the "update git repo" feature:
https://gist.github.com/addrummond/b345d3d4f23436838e52afbe880ebbd9#uploading-experiment-folders.
However, the method that you use to upload the files shouldn't make
any difference – as long as they all end up in the right place.

I aim for the new site to be fully backwards compatible with the old
site. I'm happy to investigate any incompatibilities, but to do so in
this case I'd need a lot more information. Could you provide me with
an example of an experiment that works correctly on the old Ibex Farm
but not on the new one?

Best,
Alex
> --
> You received this message because you are subscribed to the Google Groups "ibexexperiments" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ibexexperimen...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ibexexperiments/3abc8c2d-5175-4072-8acd-599a195ae45en%40googlegroups.com.

Jeremy Zehr

unread,
May 3, 2021, 5:53:32 PMMay 3
to ibexexperiments
Hello,

Unfortunately I designed PennController in a very hacky way, and it crucially relies on the engine setting the `items` and `CHUNK_DICT` variables/objects in a very specific order. Could it be that allowing functions to set `items` required changing how those are set?

Jeremy

Alex Drummond

unread,
May 3, 2021, 6:01:10 PMMay 3
to ibexexp...@googlegroups.com
Hi Jeremy,

If you could send me over the files for a PennController experiment that works on the original Ibex Farm (assuming that you have one to hand), then I can look into how best to fix this incompatibility over the next week or two. Indeed, the underlying code for setting CHUNKS_DICT etc. is now quite different, but I expect I can tweak it so that PennController works again.

Alex 

Nene

unread,
May 3, 2021, 6:14:07 PMMay 3
to ibexexperiments
Hello Alex and Jeremy,

Thanks for your replies!

Jeremy, yes I think that may be partly contributing to the issue, since the error message I'm getting on the new ibex is "ERROR: You must define the 'items' variable". 

After some troubleshooting, the line that causes the issue in the new Ibex is this line (placeholders used for Experiment ID and Credit Token):

["final", "Message", {html: "<center><p style ='color: red; font-size:14pt;'><strong>IMPORTANT:</strong><br> Your results have been saved, but you still need to validate your participation below!</p> <p>This is a necessary step to grant you credits.</p> <p><a href='https://ucdavis.sona-systems.com/webstudy_credit.aspx?experiment_id=EXPERIMENTIDGOESHERE&credit_token=CREDITTOKENGOESHERE&survey_code="+PennController.GetURLParameter("id")+"'><strong>Click here to confirm my submission on SONA.</strong></a></p> <p>Thank you for participating in the study.</p></center>", transfer: null}],

Message has been deleted
Message has been deleted

Jeremy Zehr

unread,
May 3, 2021, 6:20:45 PMMay 3
to ibexexperiments
Hi Alex,

What's the best way for you to receive my files? (I can't attach script to my google groups message)
In any case, you can find a minimal pair of projects that I just created, here (new farm): https://ibex.spellout.net/experiments/jeremyzehr/pcibex/view

The file js_includes/PennController.js can be found here: https://github.com/PennController/penncontroller/tree/master/dist
and example_data.js is just:

PennController.ResetPrefix(null);

newTrial( "test",
  newButton("Hello World").print().wait()
)


The webconsole complains that items is undefined, and if I add e.g. `var items = seq()` then it complains that e.charCodeAt is not a function, which seems related to this line in the source code: https://github.com/PennController/penncontroller/blob/427b73e455139a38a46a50ccc53381c067e972a2/src/tables.js#L121

I'm afraid PennController's source code is little cryptic, so I'd be happy to investigate the issue myself if you have any pointers

Jeremy

Alex Drummond

unread,
May 3, 2021, 6:24:21 PMMay 3
to ibexexp...@googlegroups.com
Thanks Jeremy, that’s fine, I can investigate based on those links. And likewise, feel free to shoot me an email if you have any questions about the internal workings of the new Ibex Farm.
Alex 

--
You received this message because you are subscribed to the Google Groups "ibexexperiments" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ibexexperimen...@googlegroups.com.

Alex Drummond

unread,
May 4, 2021, 12:04:44 PMMay 4
to ibexexperiments
I think I've fixed the main issue. Try wrapping your data file in the
following magical incantation:

function items() {
<ORIGINAL DATA FILE GOES HERE>
}

I'm not familiar enough with PennContoller to verify that everything
is working as expected, so quite possibly there are other issues
lurking.

I will try to get unmodified data files working too, as it's my goal
to have full backwards compatibility. However, assuming that the above
method works, it should be fine as a stopgap.

Best,
Alex

Nene

unread,
May 4, 2021, 2:59:25 PMMay 4
to ibexexperiments
Hello Alex,

Thanks so much for your prompt reply!

I just tried this, but unfortunately the experiment now fails to load. It's infinitely stuck at the initial loading screen with the small grey circle.

Alex Drummond

unread,
May 4, 2021, 3:01:16 PMMay 4
to ibexexp...@googlegroups.com
I’d need the experiment files to investigate further. 

Nene

unread,
May 4, 2021, 3:33:46 PMMay 4
to ibexexperiments
Hello Alex, 

Is there a way I can send the experiment files over to you?

Alex Drummond

unread,
May 4, 2021, 3:34:45 PMMay 4
to ibexexperiments
Any way you like (e.g. email, dropbox, google drive...).
Alex

On Tue, 4 May 2021 at 20:33, 'Nene' via ibexexperiments
> To view this discussion on the web visit https://groups.google.com/d/msgid/ibexexperiments/9b359574-ad2a-4549-890d-f81acd9ed544n%40googlegroups.com.

Nene

unread,
May 4, 2021, 3:51:09 PMMay 4
to ibexexperiments
Hello Alex,

I have sent you an invitation to a Box folder that contains the files! Please let me know if you have trouble accessing it.

Alex Drummond

unread,
May 4, 2021, 5:25:48 PMMay 4
to ibexexperiments
Thanks for sending the files. However, your experiment doesn't work on
the old Ibex Farm either. The overriding reason for this is that your
PennController.js files contains a large HTML page rather than
Javascript source code. It looks to me as though you might have saved
the HTML page on github rather than the file itself (?)

I gave the old Ibex Farm a bit of a spring clean while testing the
experiment. It should be working slightly more reliably now.

Jeremy: I've pushed an update to the new Ibex Farm which should remove
the need to wrap Penn Controller data files in 'function items() { ...
}'. At least, your simple example experiment now works without doing
that.



Alex

Nene

unread,
May 4, 2021, 11:21:20 PMMay 4
to ibexexperiments
Hello Alex,

After I re-copied the PennController.js file properly, the experiment is working fine now. 

Thank you so much for your help!

Jeremy Zehr

unread,
May 5, 2021, 11:04:39 AMMay 5
to ibexexperiments
Thank you Alex, really appreciate the prompt fix!

Jeremy
Reply all
Reply to author
Forward
0 new messages