Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyodide working, numpy getting close #33

Open
SimonBiggs opened this issue Oct 5, 2018 · 23 comments
Open

pyodide working, numpy getting close #33

SimonBiggs opened this issue Oct 5, 2018 · 23 comments
Milestone

Comments

@SimonBiggs
Copy link
Contributor

I have an instance set up at http://jyve.simonbiggs.net:

screenshot from 2018-10-06 01-29-21

When using the pyodide kernel it can recognise to pull numpy.js just at the moment however it appears to not be accurately picking up the "locateFile" function. Instead it is trying to find numpy.data at http://jyve.simonbiggs.net/lab/numpy.data.
screenshot from 2018-10-06 01-32-59

I shall do a bit more digging another day.

Cheers.
Simon

@bollwyvl
Copy link
Contributor

bollwyvl commented Oct 5, 2018 via email

@SimonBiggs
Copy link
Contributor Author

Yup

@SimonBiggs
Copy link
Contributor Author

ScriptedForms branch of the following:

https://github.com/SimonBiggs/jyve

@SimonBiggs
Copy link
Contributor Author

Also, what are your thoughts about using the Google drive extensions? I haven't looked into it but I imaging Google would have API limitation options...

@SimonBiggs
Copy link
Contributor Author

So I thought about it further. Showers are good for that. I think I don't want to expose anyone's data from other services to this creature. So instead of using Google drive or the GitLab API I'll use firebase nosql storage. That way the only data that can be leaked or lost is the data on my website.

I'll only save text, so hopefully 1 GB will go a long way.

@bollwyvl
Copy link
Contributor

bollwyvl commented Oct 6, 2018 via email

@SimonBiggs
Copy link
Contributor Author

That is a brilliant idea. I shall look at that. It might just be perfect.

@SimonBiggs
Copy link
Contributor Author

Can forms be created via the API? As in could users log in with their Google account, create a ScriptedForm and have the ScriptedForm mimic itself as a Google Form. Then as they fill out their ScriptedForm it would then use the API to fill out the created Google Form...

@bollwyvl
Copy link
Contributor

bollwyvl commented Oct 6, 2018 via email

@SimonBiggs
Copy link
Contributor Author

@bollwyvl I think that might only work inside the "App Scripts" that you write within the Google Office suite... https://developers.google.com/apps-script/

@SimonBiggs
Copy link
Contributor Author

@bollwyvl
Copy link
Contributor

bollwyvl commented Oct 6, 2018 via email

@PythonLinks
Copy link

I just used numpy in pyodide yesterday. It is part of the tutorial I am giving next week.

@SimonBiggs
Copy link
Contributor Author

SimonBiggs commented May 15, 2019 via email

@PythonLinks
Copy link

No.
Good point. It was from iodide.
Do you know specifically what the problem is?

@SimonBiggs
Copy link
Contributor Author

Haven't looked at the issue since late last year.

@bollwyvl
Copy link
Contributor

bollwyvl commented May 16, 2019 via email

@bollwyvl bollwyvl added this to the 1.0 milestone Jul 13, 2019
@SimonBiggs
Copy link
Contributor Author

Like I said on that other issue, my plan was to wait until lab 1.0 to do another serious attempt... But by all means, give it a go! Pyodide has changed a lot since then!

Heya @bollwyvl, I'm thinking of giving this another deep dive. Before I take the plunge do you have any initial pointers?

My first key issue is that running the pyodide kernel hangs the browser rendering. An example of this can be seen by going to http://jyve.simonbiggs.net/ creating a pyodide kernel notebook and then running:

import time

while True:
    print('boo')
    time.sleep(10)

This will freeze up the interface and the kernel can't be reset.

Screenshot from 2020-02-04 20-55-14

I believe I can fix this by running the pyodide kernel within a webworker instead. There's a bug with this in builds of pyodide I was previously using, but it appears there may be a solution to that pyodide/pyodide#441 (comment).

@bollwyvl
Copy link
Contributor

bollwyvl commented Feb 4, 2020 via email

@SimonBiggs
Copy link
Contributor Author

Kk, I'll hold off until JLab 2.0 also

@SimonBiggs
Copy link
Contributor Author

SimonBiggs commented Apr 14, 2020

@bollwyvl pyodide is unfortunately falling into an unmaintained state, from where I stand, pyodide has the possibility of making Jyve be truly something amazing. Might you be in a position to comment on the following proposal:

https://bugs.python.org/issue40280

If you were able it would also be awesome to have a hand in creating a patch, if it comes to that. I suspect a similar process may also be needed for emscripten, but I think it best to address the hardest issues first, in case it just may not be viable.

In the end I was hoping to get the pyodide patches merged upstream and then be able to version bump so that threading and webworkers run without issue. First step though, get the work merged upstream instead of having it go stagnant.

@bollwyvl
Copy link
Contributor

Whew, that's probably a bit above my paygrade. Language runtime aside, there are so many thorny issues raised there. I have a lot of opinions about what one might be able to do once we get to "better", but I am woefully uninformed about the cPython implementation, and how that might be pushed forward. @jtpio do you have any thoughts on the matter?

@jtpio
Copy link

jtpio commented Apr 23, 2020

Hey sorry for the late answer. Unfortunately I haven't been able to look into pyodide yet, but I agree this would be the ultimate use case for Jyve and similar frontends.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants