WebRepo 2.0 - Easy access to projects from the Codea community

Lol… Nothing to do with Cloudflare apparently. I just received an email from Oracle telling me the VM had been reclaimed due to ‘idle’ resources.

Now to artificially increase CPU usage a little…

Edit: VM is running again… Just need to stop it shutting down in the future.

Things worked this time. Deleted the old version and imported the latest.

1 Like

base conversion - 1.0.0 is now available.

Description: Base conversion
Author(s): @dave1707

Change-notes:

  • Initial Release

Latest WebRepo project

@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 WebRepo 2.4.0 should only have 2 tabs:

If not, the ‘latest’ link above should be correct.

@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).

Hey @UberGoober how many tabs do you have in your WebRepo project atm? If it’s any more than 2 then you’ll need a fresh install.

Hi everyone,

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.

    • These are available at https://codeawebrepo.co.uk/crashreports.
    • 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!


Latest WebRepo project

1 Like

JS - 1.0.0 is now available.

Description: Multi-thread capable JS bindings.
Author(s): @Steppers

Change-notes:

  • Initial Release

Latest WebRepo project

1 Like

Wow my mind boggles… the power you have when you actually know how to code… amazing…

CubeDeform - 1.0.0 is now available.

Description: A wobbly shader cube
Author(s): @yojimbo2000

Change-notes:

  • Initial Release

Latest WebRepo project

1 Like

Parallel - 1.0.0 is now available.

Description: Multi-threading via WebAssembly
Author(s): @Steppers

Change-notes:

  • Initial Release

Latest WebRepo project

1 Like

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!

Steppers
o7

R - 1.0.0 is now available.

Description: R Language in Codea
Author(s): @Steppers

Change-notes:

  • Initial Release

Latest WebRepo project

@SugarRay

2 Likes

Very nice exploration, Is there a Ruby in Codea?

@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 :slight_smile:

R - 1.0.2 is now available.

Description: R Language in Codea
Author(s): @Steppers

Change-notes:

  • Fix for Codea 3.8 (current App Store version)
  • Add REPL functionality

Latest WebRepo project

@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 :slight_smile:

@UberGoober Haha, not sure about wizard :joy: 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.