@Steppers - just run my installed version of WebRepo and it fired up an update suggesting installation of a modified system, but the buttons didn’t respond to touch. Any suggestions?
@Bri_G It’s worth me mentioning that 2.4.0 should automatically update itself every time you launch it now so you should never see an update popup when you open it.
It downloads/updates and runs the ‘WebRepoImpl’ project + dependencies at launch. This is what the WebRepoLib tab is doing but I’m yet to upload it separately just yet.
WebRepo just tried to auto-update, crashed my iPhone, and now won’t run at all (something about not finding “Thread” function I think, not positive though).
Just want to provide some info about some recent WebRepo changes for some transparency:
The latest WebRepo version now uploads submissions directly to the webrepo server. The old version used bayfiles.com (now inactive) as a holding area for projects prior to approval.
Load times should now be greatly improved having moved some loading tasks off the main thread.
Crash reports now also include a fairly detailed log which is also uploaded to the webrepo server for debugging purposes.
If you experience a crash please do send the crash report as requested, they really do help! A quick post here or including your username with the report would be greatly appreciated too as it can help if I need to reach out for more info.
I already receive a notification when a crash report is uploaded so it won’t go unnoticed.
As for future plans, I’ve been working on a new preview feature for a while now allowing you to run projects without needing to exit the WebRepo project at all. This is currently being held back by some trouble with various API functions not working correctly when called from a coroutine (Issue was raised here). Many projects already work but the reliability is not consistent enough yet.
Any questions or suggestions do let me know.
Cheers,
Steppers
Here’s a screenshot from some early experimenting for the preview feature. All of these projects are running fully at the same time!
To elaborate on the above, this is using WKWebView to load instances of wasmoon and websockets for communication.
This is by no means fast but if you just need to split some long running task onto another thread then this could be ideal. If you need all the performance you can get then the similar JS project above is better for that.
Here are a couple of examples:
function accumulate(n)
local acc = 0
for i=1,n do
acc = acc + i
end
return acc
end
-- This creates our new thread with the accumulate function loaded
instance = parallel({
accumulate = accumulate
})
-- Call the parallel function (this returns immediately)
callResult = instance.accumulate(1000000)
-- Wait for the result, then print it
print(callResult:result())
-- Alternatively we could register a callback instead
callResult:next(function(r)
print(r)
end)
Copied upvalues:
-- The ‘message’ variable is also copied across to wasmoon!
-- This works with other simple values too, like numbers, tables, functions etc.
local message = “Hello Parallel!”
function hello()
print(message)
end
-- Create our instance
instance = parallel({
hello = hello
})
-- Call the parallel function (this returns immediately)
instance.hello()
Sadly these parallel instances do not have direct access to the Codea API so many things are entirely unavailable. This should be most useful for slightly heavier data processing.
If anyone has questions fire them my way but I hope this proves useful to someone!
@binaryblues Thanks, not yet but a quick google shows this WebAssembly implementation so I’d have to do some experimenting to figure out if I could hook it up
@Steppers you’re so good at porting these different frameworks to Codea, and making it look easy. Would it be similarly easy to port Love2D to Codea? That would open the door to giving Codea the ability to run many more projects from off of GitHub… that seems impossibly challenging to me, but you’re some kind of wizard as far as I can tell
@UberGoober Haha, not sure about wizard Most of these are almost the same thing with a slight implementation change to target a different language in what is essentially a web browser in the background.
As for Love2D I think there’s a fair bit of additional complexity and functionality that could be difficult to emulate in Codea. I have thought about it before but it could be something for me to revisit.
Pico-8 could be a nice one to look at though. I know they have a runtime working on WebAssembly so could be feasible.