{"id":17013,"date":"2022-09-19T13:37:22","date_gmt":"2022-09-19T12:37:22","guid":{"rendered":"https:\/\/johnjohnston.info\/blog\/?p=17013"},"modified":"2022-09-19T13:39:32","modified_gmt":"2022-09-19T12:39:32","slug":"turbowarp-speeds-up-scratch","status":"publish","type":"post","link":"https:\/\/johnjohnston.info\/blog\/turbowarp-speeds-up-scratch\/","title":{"rendered":"TurboWarp Speeds up Scratch"},"content":{"rendered":"<p>I saw a tweet from \u00a0<a href=\"https:\/\/twitter.com\/eslweb\/status\/1555783054115115011\">James Abela:<\/a><\/p>\n<blockquote><p>Just found this amazing tool to convert any @scratch project into a #Mac #App. You can now literally use this kid&#8217;s tool to put apps together! Incredible and I managed this in less than a minute! #everyonecancode #scratch #appinamin #coding <a href=\"https:\/\/www.youtube.com\/watch?v=njhBLyYzWRU\">How to make a Scratch Project into a Mac OS app in under 1 minute &#8211; YouTube<\/a><\/p><\/blockquote>\n<p>The <a href=\"https:\/\/packager.turbowarp.org\/\">TurboWarp Packager<\/a><em> Converts Scratch projects into HTML files, zip archives, or executable programs for Windows, macOS, and Linux.<\/em> but it is linked to several tools that are part of TurboWarp:<\/p>\n<blockquote><p>TurboWarp is a Scratch mod that compiles projects to JavaScript to make them run really fast.<\/p><\/blockquote>\n<p>Now the <a title=\"Scratch \u2013 Banton Biggies\" href=\"https:\/\/blogs.glowscotland.org.uk\/nl\/bantonbiggies\/tag\/scratch\/\">sort of thing I do with scratch<\/a> is certainly not in need of speeding up or turned into an application! But I have seen many really complicated scratch programs, but my needs are simple.<\/p>\n<p>I did recall a <a href=\"https:\/\/scratch.mit.edu\/projects\/693848225\/\">maths project<\/a> we made in class a couple of years ago, when working on probability &amp; chance. The project throws dices a number of times. Of course the class wanted to run it many many times, but it got a bit slow once we got to 10 million throws.<\/p>\n<p>Here is the Project on Scratch:<\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/scratch.mit.edu\/projects\/693848225\/embed\" width=\"485\" height=\"402\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>And in <a href=\"https:\/\/turbowarp.org\">Turbowarp<\/a>:<\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/turbowarp.org\/693848225\/embed\" width=\"499\" height=\"416\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>For me 100 million throws took 1056.443 seconds in Scratch and 21.784 seconds in <a href=\"https:\/\/turbowarp.org\">Turbowarp<\/a>. I guess device, browser, operating system and the direction of the wind might change these results a bit. I also expect the code could be a lot better;-)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I saw a tweet from \u00a0James Abela: Just found this amazing tool to convert any @scratch project into a #Mac #App. You can now literally use this kid&#8217;s tool to put apps together! Incredible and I managed this in less than a minute! #everyonecancode #scratch #appinamin #coding How to make a Scratch Project into a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":17017,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"mf2_syndication":["https:\/\/twitter.com\/johnjohnston\/status\/1571840925483110401"],"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"webmentions_disabled_pings":false,"webmentions_disabled":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6],"tags":[21,76,1547],"post_format":[],"class_list":{"0":"post-17013","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-wwwd","8":"tag-classroom","9":"tag-coding","10":"tag-scrarch","11":"kind-article","13":"h-entry","14":"hentry"},"better_featured_image":{"id":17017,"alt_text":"","caption":"","description":"","media_type":"image","media_details":{"width":1128,"height":878,"file":"2022\/09\/scratch-dice-in-tubrowarp.png","filesize":123678,"sizes":{"medium":{"file":"scratch-dice-in-tubrowarp-620x483.png","width":620,"height":483,"mime-type":"image\/png","filesize":54045,"source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2022\/09\/scratch-dice-in-tubrowarp-620x483.png"},"large":{"file":"scratch-dice-in-tubrowarp-1024x797.png","width":1024,"height":797,"mime-type":"image\/png","filesize":107146,"source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2022\/09\/scratch-dice-in-tubrowarp-1024x797.png"},"thumbnail":{"file":"scratch-dice-in-tubrowarp-150x150.png","width":150,"height":150,"mime-type":"image\/png","filesize":8693,"source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2022\/09\/scratch-dice-in-tubrowarp-150x150.png"},"medium_large":{"file":"scratch-dice-in-tubrowarp-768x598.png","width":768,"height":598,"mime-type":"image\/png","filesize":71680,"source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2022\/09\/scratch-dice-in-tubrowarp-768x598.png"},"post-thumbnail":{"file":"scratch-dice-in-tubrowarp-668x520.png","width":668,"height":520,"mime-type":"image\/png","filesize":59771,"source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2022\/09\/scratch-dice-in-tubrowarp-668x520.png"},"sempress-image-post":{"file":"scratch-dice-in-tubrowarp-668x520.png","width":668,"height":520,"mime-type":"image\/png","filesize":59771,"source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2022\/09\/scratch-dice-in-tubrowarp-668x520.png"},"rpwe-thumbnail":{"file":"scratch-dice-in-tubrowarp-45x45.png","width":45,"height":45,"mime-type":"image\/png","filesize":1508,"source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2022\/09\/scratch-dice-in-tubrowarp-45x45.png"},"jetpack-portfolio-admin-thumb":{"file":"scratch-dice-in-tubrowarp-50x50.png","width":50,"height":50,"mime-type":"image\/png","filesize":1774,"source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2022\/09\/scratch-dice-in-tubrowarp-50x50.png"}},"image_meta":{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0","keywords":[]}},"post":17013,"source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2022\/09\/scratch-dice-in-tubrowarp.png"},"jetpack_featured_media_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2022\/09\/scratch-dice-in-tubrowarp.png","jetpack_shortlink":"https:\/\/wp.me\/p57zFQ-4qp","jetpack_likes_enabled":false,"jetpack_sharing_enabled":true,"kind":false,"_links":{"self":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts\/17013","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/comments?post=17013"}],"version-history":[{"count":6,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts\/17013\/revisions"}],"predecessor-version":[{"id":17020,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts\/17013\/revisions\/17020"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/media\/17017"}],"wp:attachment":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/media?parent=17013"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/categories?post=17013"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/tags?post=17013"},{"taxonomy":"post_format","embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/post_format?post=17013"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}