{"url":"https://api.github.com/repos/open-cogsci/osweb/issues/23","repository_url":"https://api.github.com/repos/open-cogsci/osweb","labels_url":"https://api.github.com/repos/open-cogsci/osweb/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/open-cogsci/osweb/issues/23/comments","events_url":"https://api.github.com/repos/open-cogsci/osweb/issues/23/events","html_url":"https://github.com/open-cogsci/osweb/issues/23","id":641439465,"node_id":"MDU6SXNzdWU2NDE0Mzk0NjU=","number":23,"title":"loop operations should be applied after applying repeats and shuffling","user":{"login":"smathot","id":594936,"node_id":"MDQ6VXNlcjU5NDkzNg==","avatar_url":"https://avatars.githubusercontent.com/u/594936?v=4","gravatar_id":"","url":"https://api.github.com/users/smathot","html_url":"https://github.com/smathot","followers_url":"https://api.github.com/users/smathot/followers","following_url":"https://api.github.com/users/smathot/following{/other_user}","gists_url":"https://api.github.com/users/smathot/gists{/gist_id}","starred_url":"https://api.github.com/users/smathot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smathot/subscriptions","organizations_url":"https://api.github.com/users/smathot/orgs","repos_url":"https://api.github.com/users/smathot/repos","events_url":"https://api.github.com/users/smathot/events{/privacy}","received_events_url":"https://api.github.com/users/smathot/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[{"id":410672930,"node_id":"MDU6TGFiZWw0MTA2NzI5MzA=","url":"https://api.github.com/repos/open-cogsci/osweb/labels/bug","name":"bug","color":"ee0701","default":true,"description":null}],"state":"closed","locked":false,"assignees":[{"login":"smathot","id":594936,"node_id":"MDQ6VXNlcjU5NDkzNg==","avatar_url":"https://avatars.githubusercontent.com/u/594936?v=4","gravatar_id":"","url":"https://api.github.com/users/smathot","html_url":"https://github.com/smathot","followers_url":"https://api.github.com/users/smathot/followers","following_url":"https://api.github.com/users/smathot/following{/other_user}","gists_url":"https://api.github.com/users/smathot/gists{/gist_id}","starred_url":"https://api.github.com/users/smathot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smathot/subscriptions","organizations_url":"https://api.github.com/users/smathot/orgs","repos_url":"https://api.github.com/users/smathot/repos","events_url":"https://api.github.com/users/smathot/events{/privacy}","received_events_url":"https://api.github.com/users/smathot/received_events","type":"User","user_view_type":"public","site_admin":false}],"milestone":null,"comments":0,"created_at":"2020-06-18T17:48:34Z","updated_at":"2020-10-01T13:08:48Z","closed_at":"2020-10-01T13:08:48Z","assignee":{"login":"smathot","id":594936,"node_id":"MDQ6VXNlcjU5NDkzNg==","avatar_url":"https://avatars.githubusercontent.com/u/594936?v=4","gravatar_id":"","url":"https://api.github.com/users/smathot","html_url":"https://github.com/smathot","followers_url":"https://api.github.com/users/smathot/followers","following_url":"https://api.github.com/users/smathot/following{/other_user}","gists_url":"https://api.github.com/users/smathot/gists{/gist_id}","starred_url":"https://api.github.com/users/smathot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smathot/subscriptions","organizations_url":"https://api.github.com/users/smathot/orgs","repos_url":"https://api.github.com/users/smathot/repos","events_url":"https://api.github.com/users/smathot/events{/privacy}","received_events_url":"https://api.github.com/users/smathot/received_events","type":"User","user_view_type":"public","site_admin":false},"author_association":"COLLABORATOR","issue_field_values":[],"type":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"Right now, OSWeb applies `loop` operations as the very first step in processing the `loop` table. But it should be the last step. The script below illustrates the issue. The desired result is that the table is repeated five times, and then the `shuffle_horiz` operation is applied, such that the order of \"A B C\" changes on every key press. Instead, `shuffle_horiz` is applied first, and only then the repetition is applied, resulting in a random-but-fixed order.\r\n\r\n```\r\n---\r\nAPI: 2.1\r\nOpenSesame: 3.3.3\r\nPlatform: posix\r\n---\r\nset width 1024\r\nset uniform_coordinates yes\r\nset title \"New experiment\"\r\nset subject_parity even\r\nset subject_nr 0\r\nset start experiment\r\nset sound_sample_size -16\r\nset sound_freq 48000\r\nset sound_channels 2\r\nset sound_buf_size 1024\r\nset round_decimals 2\r\nset height 768\r\nset fullscreen no\r\nset form_clicks no\r\nset foreground white\r\nset font_underline no\r\nset font_size 18\r\nset font_italic no\r\nset font_family mono\r\nset font_bold no\r\nset disable_garbage_collection yes\r\nset description \"The main experiment item\"\r\nset coordinates uniform\r\nset compensation 0\r\nset canvas_backend psycho\r\nset background black\r\n\r\ndefine sequence experiment\r\n\tset flush_keyboard yes\r\n\tset description \"Runs a number of items in sequence\"\r\n\trun new_loop always\r\n\r\ndefine loop new_loop\r\n\tset source_file \"\"\r\n\tset source table\r\n\tset repeat 5\r\n\tset order sequential\r\n\tset description \"Repeatedly runs another item\"\r\n\tset cycles 1\r\n\tset continuous no\r\n\tset break_if_on_first yes\r\n\tset break_if never\r\n\tsetcycle 0 a A\r\n\tsetcycle 0 b B\r\n\tsetcycle 0 c C\r\n\tshuffle_horiz a b c\r\n\trun welcome\r\n\r\ndefine sketchpad welcome\r\n\tset start_response_interval no\r\n\tset reset_variables no\r\n\tset duration keypress\r\n\tset description \"Displays stimuli\"\r\n\tdraw textline center=1 color=white font_bold=no font_family=serif font_italic=no font_size=32 html=yes show_if=always text=\"[a] [b] [c]\" x=0 y=0 z_index=0\r\n```","closed_by":{"login":"smathot","id":594936,"node_id":"MDQ6VXNlcjU5NDkzNg==","avatar_url":"https://avatars.githubusercontent.com/u/594936?v=4","gravatar_id":"","url":"https://api.github.com/users/smathot","html_url":"https://github.com/smathot","followers_url":"https://api.github.com/users/smathot/followers","following_url":"https://api.github.com/users/smathot/following{/other_user}","gists_url":"https://api.github.com/users/smathot/gists{/gist_id}","starred_url":"https://api.github.com/users/smathot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smathot/subscriptions","organizations_url":"https://api.github.com/users/smathot/orgs","repos_url":"https://api.github.com/users/smathot/repos","events_url":"https://api.github.com/users/smathot/events{/privacy}","received_events_url":"https://api.github.com/users/smathot/received_events","type":"User","user_view_type":"public","site_admin":false},"reactions":{"url":"https://api.github.com/repos/open-cogsci/osweb/issues/23/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/open-cogsci/osweb/issues/23/timeline","performed_via_github_app":null,"state_reason":"completed","pinned_comment":null}