Guild icon
PyScript ๐Ÿ’ป
๐Ÿ’ฌ | General / โ•ฐโ•ธpyscript-collective
Avatar
tedpatrick 01/11/2022 15:11
Hello PyScript Collective
Avatar
FabioRosado 04/11/2022 22:30
@Paul Everitt Iโ€™m having some issues setting my local env based on your branch. Pre-commit doesnโ€™t install anything. Iโ€™ll poke at it tomorrow and then fix the typing issues, but wanted to check with you, what do you think about merging your draft soon(ish) and start working on top of it? ๐Ÿค”
Avatar
Paul Everitt 04/11/2022 22:30
Hey, first...how are things? (edited)
Avatar
Paul Everitt 04/11/2022 22:37
It's midnight for you, go to sleep. ๐Ÿ˜€
Avatar
FabioRosado 04/11/2022 22:52
All good here ๐Ÿ˜„ haha I was enjoying the โ€œmeโ€ time with some coding while my son is as sleep ๐Ÿ˜„
Avatar
Paul Everitt 04/11/2022 22:54
I worry about merging, as I'm not convinced anybody but me thinks any of this is a good idea.
22:55
I wonder if you're interested in going on a detour with me, then returning to PSC
Avatar
FabioRosado 04/11/2022 22:55
Sure sounds good what do you have in mind?
Avatar
Paul Everitt 04/11/2022 23:23
Sorry, had dinner, probably missed my chance with you ๐Ÿ˜€
23:23
I've been on a deep dive to illustrate a positive development experience for all this stuff
23:24
"Test-first" to take advantage of good tooling and avoid console.log everywhere
Avatar
Paul Everitt 05/11/2022 11:06
I'm using Vitest to go as far as I can on a productive developer experience with web workers
Avatar
Paul Everitt 05/11/2022 11:58
Actually, let's not let that be a distraction. Let's stay on this. Please think extra-hard about it. If you are ok with the direction this is going, I'll merge. You're right, it will make things a lot easier.
Avatar
AlexFreeland 08/11/2022 02:18
Cool, new group. Hi there
๐Ÿ–– 1
Avatar
Hey Everyone! I am really enjoying PyScript
Avatar
Hi, so I have a question about Pythons Qiskit and Qrng Modules in pyscript. It seems like I can get QRNG module but I am unable to load Qiskit into pyscript. Any suggestions?
Avatar
Avatar
losphilly
Hi, so I have a question about Pythons Qiskit and Qrng Modules in pyscript. It seems like I can get QRNG module but I am unable to load Qiskit into pyscript. Any suggestions?
Jeff Glass 08/11/2022 22:36
Hi @losphilly! I'm going to respond to your question over in the #โ•ฐโ•ธpyscript-help channel - this channel is focused on the PyScript Collective project/repo, which collates community-created examples, tutorials, and demos https://github.com/pyscript/pyscript-collective
๐Ÿ™ 1
Avatar
Jeff Glass 08/11/2022 22:57
I see from another channel there's a verification issue affecting you... in case you can't see that channel, if you accept my pending friend request I can PM you the answer as well, just to keep you moving (edited)
๐Ÿ™ 1
Avatar
Avatar
Jeff Glass
I see from another channel there's a verification issue affecting you... in case you can't see that channel, if you accept my pending friend request I can PM you the answer as well, just to keep you moving (edited)
Thank you!
Avatar
Avatar
Jeff Glass
I see from another channel there's a verification issue affecting you... in case you can't see that channel, if you accept my pending friend request I can PM you the answer as well, just to keep you moving (edited)
will do
Avatar
Hi, everyone! Congrats on the REPL & Examples launch. Looking forward to learning more about Py script in the browser here.
Avatar
FabioRosado 10/11/2022 11:50
Hello @Taras thank you!
Avatar
Avatar
FabioRosado
Hello @Taras thank you!
I shared it on vis.social for folks to try it out: https://vis.social/web/@dataSamurai/109319403628541983
Attached: 1 image Meanwhile, in the #PyScript in the browser land new #MicroPython tech preview & #REPL is out for the public to check it out: https://pyscript.net/tech-preview/micropython/ More info at: https://twitter.com/pyscript_dev #pyTools ...
Avatar
question: anyone got pyarrow or polars working in pyodide or new micropython in the browser yet? looking for some examples for exploratory data work
Avatar
Paul Everitt 10/11/2022 12:24
Sorry, Discord wasn't something in my startup items so I didn't have it running
Avatar
Avatar
Paul Everitt
Sorry, Discord wasn't something in my startup items so I didn't have it running
was this a follow up to my comment in the #deleted-channel channel? I'd say keep it simple
Avatar
Paul Everitt 10/11/2022 12:34
No, unrelated
๐Ÿ™‚ 1
Avatar
so, I see verification lifted, and intro channel is there. Nice! However, I can't post in any of the "server dump" channels? What's the reason of keeping everything so locked down here? ๐Ÿ™‚
Avatar
Avatar
Taras
so, I see verification lifted, and intro channel is there. Nice! However, I can't post in any of the "server dump" channels? What's the reason of keeping everything so locked down here? ๐Ÿ™‚
Jeff Glass 10/11/2022 19:39
We're working on opening up what were intended to be spam-prevention methods, and it seems there's a few hiccups along the way. Maybe @Leonard Wolf can help us out and double-check why you might not be able to post there
๐Ÿ‘ 1
Avatar
Avatar
Jeff Glass
We're working on opening up what were intended to be spam-prevention methods, and it seems there's a few hiccups along the way. Maybe @Leonard Wolf can help us out and double-check why you might not be able to post there
np. I am just happy I found this discord. MicroPython does look super speedy on load.
Avatar
Avatar
Jeff Glass
We're working on opening up what were intended to be spam-prevention methods, and it seems there's a few hiccups along the way. Maybe @Leonard Wolf can help us out and double-check why you might not be able to post there
Leonard Wolf 11/11/2022 03:26
Hope you can post now?
Avatar
Avatar
Leonard Wolf
Hope you can post now?
yup. thx!
โœ… 1
Avatar
Hi can someone add me to the pyscript-core chat? Also, @Paul Everitt I really like your video. I have never figured out how to make the node debugger work but I would like to know. Especially because recent versions of chrome have very crashy debuggers -- there was a regression somewhere around Chrome version 103.
Avatar
Avatar
hood
Hi can someone add me to the pyscript-core chat? Also, @Paul Everitt I really like your video. I have never figured out how to make the node debugger work but I would like to know. Especially because recent versions of chrome have very crashy debuggers -- there was a regression somewhere around Chrome version 103.
Jeff Glass 16/11/2022 19:01
@Leonard Wolf is adding hood to that channel something you can help us out with? Ted is quite literally beneath the waves at the moment.
Avatar
Maybe @Fabio has the rights to do it as well I guess? not sure. (edited)
Avatar
Paul Everitt 16/11/2022 19:38
@hood Sure, I'm hoping to finish the writing on this https://pyodide-components.readthedocs.io/en/latest/ Would video segments also be useful on those? It was a lot of challenge reaching the finish line on that. Learned a lot.
Avatar
Avatar
madhurt
Maybe @Fabio has the rights to do it as well I guess? not sure. (edited)
Mmmm.. good question ๐Ÿ™‚ Let me check
Avatar
FabioRosado 16/11/2022 23:27
I think you only have the maintainer role, if so maintainers canโ€™t change user roles it seems
Avatar
Avatar
hood
Hi can someone add me to the pyscript-core chat? Also, @Paul Everitt I really like your video. I have never figured out how to make the node debugger work but I would like to know. Especially because recent versions of chrome have very crashy debuggers -- there was a regression somewhere around Chrome version 103.
you should be able to type in the pyscript-core chat now (thanks to @Leonard Wolf)
โœจ 1
Avatar
Paul Everitt 17/11/2022 20:48
@FabioRosado I'm going to put in some PSC app time on Saturday. Got some time now to discuss some things?
Avatar
Avatar
Paul Everitt
@FabioRosado I'm going to put in some PSC app time on Saturday. Got some time now to discuss some things?
FabioRosado 17/11/2022 20:50
Sure I can chat ๐Ÿ™‚ want to jump into the test voice channel?
Avatar
Paul Everitt 17/11/2022 20:51
Cool, I've never tried it
20:51
Hmm, which channel? ๐Ÿ™‚
Avatar
FabioRosado 17/11/2022 20:52
Down under staff? Its a test one
Avatar
Paul Everitt 17/11/2022 21:16
$ PWDEBUG=1 pytest
Avatar
Paul Everitt 18/11/2022 00:34
I just merged some Dependabot PRs.
00:35
@FabioRosado I also got everything working on the Meg branch and pushed. I think it is ready to merge.
Avatar
Avatar
Paul Everitt
@FabioRosado I also got everything working on the Meg branch and pushed. I think it is ready to merge.
FabioRosado 18/11/2022 07:24
Awesome thank you so much!
Avatar
Paul Everitt 18/11/2022 12:20
@FabioRosado It reminded me of some things to document, perhaps I can discuss here first, see if you agree?
Avatar
Avatar
Paul Everitt
@FabioRosado It reminded me of some things to document, perhaps I can discuss here first, see if you agree?
FabioRosado 18/11/2022 12:27
Sure sounds good ๐Ÿ˜„
Avatar
Paul Everitt 18/11/2022 12:29
Authoring an example...a thread...
Avatar
Paul Everitt 18/11/2022 12:36
@FabioRosado Have you done GitHub Actions to deploy to GitHub Pages recently? I think we'll want to get off of ReadTheDocs for the Gallery itself.
Avatar
Avatar
Paul Everitt
@FabioRosado Have you done GitHub Actions to deploy to GitHub Pages recently? I think we'll want to get off of ReadTheDocs for the Gallery itself.
FabioRosado 18/11/2022 12:37
Not recently, but I don't think it changed much since I did it last ๐Ÿ˜„
Avatar
Paul Everitt 19/11/2022 14:12
I merged the meg branch, starting a "pe-cdn-mode" branch now. First, a writeup. I'm starting a new area docs/developers/ with little notes to write down the thinking on hard things.
Avatar
Avatar
Paul Everitt
I merged the meg branch, starting a "pe-cdn-mode" branch now. First, a writeup. I'm starting a new area docs/developers/ with little notes to write down the thinking on hard things.
FabioRosado 19/11/2022 17:38
Thank you! I havenโ€™t done much today, we got some issues with our boiler and got a friend to come over and check things up
Avatar
Paul Everitt 19/11/2022 18:36
No problem, it gave me time to think about a much simpler approach
Avatar
Paul Everitt 20/11/2022 11:36
@FabioRosado I just merged a PR for "CDN mode". Explanation here: https://pyscript-collective.readthedocs.io/en/latest/developers/cdn_mode.html With this, the GHA now passes tests again.
Avatar
Paul Everitt 20/11/2022 12:23
Changes Release 0.0.1 (#60) @pauleveritt Bring in a "CDN mode" (#59) @pauleveritt Meg interest calculator (#31) @pauleveritt awesome-pyscript listing review (#28) @pauleveritt README lin...
๐Ÿ‘ 1
๐ŸŽ‰ 1
12:24
Next step: a GitHub Action that builds and deploys the Gallery Later step: re-enable the load-to-PyPI workflow (we will need to choose a good package name)
Avatar
Paul Everitt 20/11/2022 13:41
Ok, got the GHA build working, we now have a website: https://pyscript.github.io/pyscript-collective/
๐Ÿ™Œ 3
Avatar
FabioRosado 20/11/2022 14:11
Dang you have been busy Paul! Iโ€™m going to switch on the computer and catch up ๐Ÿ˜„
๐Ÿ˜€ 1
Avatar
Paul Everitt 20/11/2022 14:16
@FabioRosado I'm learning more about what I want from "mocking" Element and friends (edited)
14:20
@FabioRosado Any suggestion on what I should do next? (I have two ideas)
Avatar
Paul Everitt 20/11/2022 14:43
I'm using the "Release Drafter" workflow correctly now to make annotated release notes: https://github.com/pyscript/pyscript-collective/releases It looks like I used some unknown labels so somethings aren't grouped correctly.
Placeholder repository for community contributions to pyscript - pyscript/pyscript-collective
๐Ÿคฉ 1
Avatar
Jeff Glass 20/11/2022 14:45
That's awesome!
Avatar
FabioRosado 20/11/2022 14:47
Nice! we use that action in another project and its great! Makes releasing much easier ๐Ÿ˜„
Avatar
Avatar
Paul Everitt
@FabioRosado Any suggestion on what I should do next? (I have two ideas)
FabioRosado 20/11/2022 14:48
Not sure, what are you thinking? To confirm you addressed the nox issue right? I think I'll tackle the website maybe?
Avatar
Paul Everitt 20/11/2022 14:49
I'd like to finish the Meg example:
  • Introduce a concept of Author
  • Link her example to her as an Author
14:49
Yes, there are a couple of website things if you're up for it:
  • The Bulma fluid columns thing on the examples isn't wrapping right
  • The home page section with "top examples" should either (a) work or (b) go away ๐Ÿ™‚
Avatar
FabioRosado 20/11/2022 16:28
I think we might need to write some "setting up your env" docs, I'm trying to create my dev environment and getting a couple of issues (mostly because I'm on a M1 mac)
Avatar
Paul Everitt 20/11/2022 16:41
I'm on an M1 Mac also
16:41
@FabioRosado You're right, I need to write a whole lot of those type docs. What problem did you have?
Avatar
FabioRosado 20/11/2022 16:43
Did you use the conda env and then install using poetry?
16:44
mostly poetry complaining that couldn't find the wheels for a bunch of dependencies like playwright (this one not even with pip seems to work, but on pyscript does)
Avatar
Paul Everitt 20/11/2022 16:44
No, I don't use conda
16:44
For the Collective, we're trying to avoid using it
16:46
FWIW, once you do "poetry install" you then need to do "playwright install" to get the binaries
16:46
(But you probably know that)
16:48
I just did this and it worked: $ git clone git@github.com:pyscript/pyscript-collective.git $ cd pyscript-collective $ poetry install $ poetry run psc build
16:50
Then: $ poetry run psc download $ poetry run pytest
Avatar
FabioRosado 20/11/2022 17:03
I'm seeing the same issue on ubuntu, I think it might be some odd thing with conda. Will try your way ๐Ÿ˜„
Avatar
Paul Everitt 20/11/2022 17:04
I just wrapped up the "authors" work. Once merged...I can finally close a PR. ๐Ÿ˜€
17:05
I also fixed the layout to show just 3 examples per row
Avatar
can someone help me in pyscript help? xD (edited)
Avatar
Paul Everitt 20/11/2022 17:09
@KCLucas It looks like Jeff is answering your question?
Avatar
nope xD
Avatar
Paul Everitt 20/11/2022 17:09
@FabioRosado I guess it's important to list the files used in each example, so people can get the source
17:10
He replied a couple of hours ago, right?
17:10
I mean, I don't think you can expect immediate response especially on a weekend ๐Ÿ˜€ (edited)
Avatar
First now its not dierectly and i just asked if someone who is active right now can help me xD?
Avatar
Paul Everitt 20/11/2022 17:16
I can take a look in a bit after I wrap up what I'm on
Avatar
FabioRosado 20/11/2022 17:26
Hmm... using only poetry seems to hang on the first 4 deps ๐Ÿค”
Avatar
Paul Everitt 20/11/2022 17:58
Ahh, hence my task to remove poetry ๐Ÿ™‚ Try deleting the Poetry cache
Avatar
FabioRosado 20/11/2022 18:04
haha yeah that makes sense ๐Ÿ˜„
Avatar
Paul Everitt 20/11/2022 18:10
Did it work?
Avatar
Avatar
Paul Everitt
Ok, got the GHA build working, we now have a website: https://pyscript.github.io/pyscript-collective/
awesome ๐Ÿ˜
๐Ÿ™ 1
18:20
I'm confused: if I open the hello world example, it works but it doesn't show the loader: how is it possible? https://pyscript.github.io/pyscript-collective/gallery/examples/hello_world/index.html
18:24
ah I think I know: the HTML does NOT include pyscript.css
Avatar
Paul Everitt 20/11/2022 18:40
Correct
18:40
IMO PyScript shouldn't include pyscript.css either ๐Ÿ™‚
Avatar
FabioRosado 20/11/2022 19:42
It can be useful for folks that don't want to spend time styling things and also for the loader ๐Ÿ˜„
Avatar
Paul Everitt 20/11/2022 20:26
I shall respectfully defer that argument ๐Ÿ˜€
Avatar
why not? pyscript contains some builtin visual components and they must be styled somehow
20:40
what would you like to do instead?
Avatar
Paul Everitt 20/11/2022 20:44
@antocuni It's kind of the ongoing discussion about whether PyScript is an app, a framework, or a library
20:44
I think it's definitely not an app, it's for people to make apps, and those apps have their own CSS
Avatar
I agree
Avatar
Paul Everitt 20/11/2022 20:44
I'm someone with 20+ years of burn marks on the "Are we a product or a platform?" (edited)
Avatar
well, you can be a platform and have some builtin styles
Avatar
Paul Everitt 20/11/2022 20:47
This discussion about the PSC app is a perfect reason why I disagree ๐Ÿ™‚
Avatar
and apart from the theory, we have the very concrete problem of styling e.g. the splashscreen and the terminal. Do you think that: 1) they should not be part of the core 2) they should not be styled 3) they should be styled but not with an external CSS 4) other?
Avatar
Paul Everitt 20/11/2022 20:47
(1)
20:47
At least, if Ted's direction is true
20:48
The pyscript-collective PSC app is a perfect example: PyScript: We have CSS but you don't have to use it. PSC: Great, I'm my own app with my own styling, so I won't use it. PyScript: Wait, why aren't you using pyscript.css ?
Avatar
ok, I thought that the missing CSS was a mistake, not a conscious decision
20:50
I wasn't aware of that
Avatar
Paul Everitt 20/11/2022 20:53
Ah, in that case...I retract
Avatar
well, then we could also discuss whether it's good that examples in the official pyscript gallery look different than the default, but that another discussion I guess
Avatar
Paul Everitt 20/11/2022 21:10
I believe the thinking is that the examples move out of PyScript itself
21:10
And PyScript ships just with examples it needs to illustrate machinery
21:11
But again...it implies that PyScript has an official "look"
Avatar
yes, +1 on this
21:13
well, take the terminal for example. I don't think we have many choices: 1) we don't include py-terminal , which implies that print("hello") doesn't show anything by default 2) we include py-terminal but you have to style it yourself 3) we include py-terminal and we give it a default style Personally, I think that (3) is the best choice, but we can debate of course
Avatar
Avatar
Paul Everitt
But again...it implies that PyScript has an official "look"
FabioRosado 20/11/2022 21:22
I was actually working on this on friday for a brief moment. I've restyled the examples page to match pyscript.net and was on the process to restyle each example (also adding a button so users can click and see the pyscript code so they dont have to look at the source code ๐Ÿ™‚ )
21:23
personally I think is a good idea to ship with styles and if you want to restyle things (like py-terminal) then you should create your own css that overrides the defaults
๐Ÿ‘ 1
21:25
I think I got something weird on my ubuntu machine. On the Manjaro one I was able to setup the collective environment without any issues
Avatar
Paul Everitt 20/11/2022 23:57
Ok, it all needs a polish, but in a decent spot...each example now has a view to see the code for the example: https://pyscript.github.io/pyscript-collective/gallery/examples/hello_world/code.html
๐Ÿ”ฅ 2
Avatar
super cool!
Avatar
I am curious what work if any has been done in PyScript for integration with new local file system access api in a browser: https://web.dev/file-system-access/ It's basically the api vscode.dev uses for the browser versions of their IDE
The File System Access API enables developers to build powerful web apps that interact with files on the user's local device, such as IDEs, photo and video editors, text editors, and more. After a user grants a web app access, this API allows them to read or save changes directly to files and folders on the user's device.
Avatar
related there's a new filesytem coming to emscripten ( which pyodide the default engine of pyscript already uses ) https://github.com/orgs/emscripten-core/projects/1
Avatar
Avatar
pmp-p
related there's a new filesytem coming to emscripten ( which pyodide the default engine of pyscript already uses ) https://github.com/orgs/emscripten-core/projects/1
sweet! thx for that info
13:55
@pmp-p I see the gitter link in your profile. does wasm-python dev community also have a discord? I am interested in learning more about developments on that front.
Avatar
python wasm has a sub channel in WebAssembly discord now
๐Ÿ‘ 1
13:56
you want a link ?
Avatar
I'll find it. thx!
Avatar
Avatar
Taras
I'll find it. thx!
there's one at the bottom of https://pygame-web.github.io/
๐Ÿ‘ 1
Avatar
woo, I wasn't aware of the webassembly discord server. Very useful, thanks!
๐Ÿคฟ 1
Avatar
Paul Everitt 24/11/2022 15:42
@pmp-p When you say "coming to emscripten and thus Pyodide"...is "coming" measured in months, years? (That ticket is kind of stale) How does it differ from the OPFS work?
Avatar
well it's hard to give ETA on anything emscripten related
Avatar
Avatar
Paul Everitt
@pmp-p When you say "coming to emscripten and thus Pyodide"...is "coming" measured in months, years? (That ticket is kind of stale) How does it differ from the OPFS work?
in fact i was following that issue originally https://github.com/emscripten-core/emscripten/issues/15041
Avatar
Pyodide already has support for NativeFS: https://github.com/pyodide/pyodide/pull/2987
Description Related: #738 This PR adds an API pyodide.mountNativeFS which mounts FileSystemDirectoryHandle into a Pyodide Python file system. Note that there are some limitations such as: File Sy...
Avatar
will there be a place for offering prebuilt third parties wheels for libraries that don't have a suitable build script for pyodide yet ? i have pygame / harfang3d (abi3) wheels already and Panda3D / pymunk soon (edited)
Avatar
Paul Everitt 27/11/2022 13:47
@pmp-p Interesting question. In theory that's a Pyodide question, but they have enough on their plate. Wonder if Anaconda has some forge thoughts.
Avatar
We've been thinking about that. I think the first step is to move micropip to using the pypi simple index and then we could set up a wheel server where people could upload wheels. The main issue is Emscripten versioning: Emscripten says all minor updates are ABI breaks, so currently we reject all wheels built with a different version of Emscripten. Emscripten updates are still pretty difficult for us though they are getting easier on average. Given that Emscripten updates often break Pyodide and require us to fix things, we want to stay on top of updates so we can fix regressions. And we don't really want to maintain a long lived branch with a different Emscripten version. I think people can just upload multiple wheels for different versions of Emscripten though and that would be fine.
Avatar
i think "Emscripten says all minor updates are ABI breaks" is irrelevant for dynamic libraries normalized to mvp ( or not ) in wheels (edited)
Avatar
Avatar
hood
We've been thinking about that. I think the first step is to move micropip to using the pypi simple index and then we could set up a wheel server where people could upload wheels. The main issue is Emscripten versioning: Emscripten says all minor updates are ABI breaks, so currently we reject all wheels built with a different version of Emscripten. Emscripten updates are still pretty difficult for us though they are getting easier on average. Given that Emscripten updates often break Pyodide and require us to fix things, we want to stay on top of updates so we can fix regressions. And we don't really want to maintain a long lived branch with a different Emscripten version. I think people can just upload multiple wheels for different versions of Emscripten though and that would be fine.
i also suggested here https://github.com/python/cpython/issues/96426 to keep abi3 and have only two flavour "mvp" ( where compiler version is irrelevant ) or "emscripten" ( assuming when people use that both libpython and wheels are built with latest stable emscripten to get more features and performance ) (edited)
04:38
this one uses mvp wheels https://pygame-web.github.io/showroom/pythondev.html?-d most of them are just normalized ones straight from pyodide repo (edited)
04:41
i'm quite sure ( and i hope that ) abi breaks are for objects files / static lib archives
Avatar
Emscripten updates are still pretty difficult for us though they are getting easier on average. Given that Emscripten updates often break Pyodide and require us to fix things, we want to stay on top of updates so we can fix regressions
but a given version of pyodide uses always the same version of emscripten, doesn't it? If so, I think that a good first step is to support version-specific wheels: i.e., you would have to build wheels for pyodide 0.21, 0.22, etc., similarly to what you do for the various CPython versions
Avatar
feels like cpython normalized mvp wheels could be be counterparts of manylinux1_compatible, and manylinux_${GLIBCMAJOR}_${GLIBCMINOR}_${ARCH} could be in fact manylinux_<emscriptenversion> from https://peps.python.org/pep-0600/ (edited)
15:51
though emscripten version is probably not enough to match features available detected at runtime eg with https://wasm-feature-detect.surma.technology/
15:55
maybe a binary mask of features used required by the wheel should be in the tag ?
Avatar
i think "Emscripten says all minor updates are ABI breaks" is irrelevant for dynamic libraries normalized to mvp ( or not ) in wheels
I don't think this is correct. The Emscripten ABI breaks are different from the wasm features. The problems are due to thing like the signature of the time function changing from (i32) -> i32 to (i32) -> i64. If a module was built with a version of Emscripten that gives it the former signature and someone tries to link it against a Pyodide built with the latter signature, then it crashes at load time. There is no "MVP" or "backwards compatible" flag, if Emscripten changes its ABI then the modules can't work together. As far as actual wasm features, we require bigInt and mutableGlobals for everything, but other than that I think none of the other features are used in our wheels. Of course, we could imagine making simd enabled builds of packages like numpy...
21:28
but a given version of pyodide uses always the same version of emscripten, doesn't it? If so, I think that a good first step is to support version-specific wheels: i.e., you would have to build wheels for pyodide 0.21, 0.22, etc., similarly to what you do for the various CPython versions
I think this is exactly what we are headed towards @antocuni.
(edited)
๐Ÿ‘ 1
Avatar
There is no "MVP" or "backwards compatible" flag
(edited)
03:41
that's not a flag that's a bynarien pass you can apply to any dynamic lib (edited)
03:42
of course caller and callee must follow same mvp principle, eg won't work with pyodide default build because it is a bigint one (edited)
03:43
anyway hard to be sure without running a lot of testsuites
03:44
so better not rush it
03:46
there's also some potential side effects with MVP normalizing like i encountered here https://github.com/bkaradzic/bgfx/issues/2978 and those only show (actually) at runtime (edited)
Avatar
@pmp-p But the compatibility issue isn't about wasm features at all. The issue is about dynamic linking: do the headers in Emscripten version x and Emscripten version y (a) declare the same symbols and (b) declare them with the same types? No? Then any library that uses a symbol that changed types from Emscripten version x to Emscripten version y needs to be compiled against the same version that Python was compiled against. Even if you normalized the wasm module to remove features, it won't fix the problem where the side module thinks that time has signature (i32) -> i32 and it actually had signature (i32) -> i64.
Avatar
Avatar
hood
@pmp-p But the compatibility issue isn't about wasm features at all. The issue is about dynamic linking: do the headers in Emscripten version x and Emscripten version y (a) declare the same symbols and (b) declare them with the same types? No? Then any library that uses a symbol that changed types from Emscripten version x to Emscripten version y needs to be compiled against the same version that Python was compiled against. Even if you normalized the wasm module to remove features, it won't fix the problem where the side module thinks that time has signature (i32) -> i32 and it actually had signature (i32) -> i64.
it don't think it removes feature use ( these are internals to the lib), norming to mvp fixes side modules exports to handle i64 to i32,i32 signature that the caller will use if not built with bigint
07:09
i guess it just adds a trampoline so the js 2x32 call becomes a 1x64 wasm one ( without caring for side effects since lib can still think the 64 bits original signature is still present <= that is probably fixeable by wast transformation ) (edited)
07:13
i think features tracking is just another whole problem after basic ABI choices
Avatar
btw the time 64bits stuff i remember was more of a libc break than an abi break
07:24
so i guess there are 3 levels to consider : abi ( mvp or bigint ) libc ( musl headers emscripten used ) features ( expected from wasm cpu : huge memory, simd etc ... )
07:26
seems to me like a deep rabbit hole, and better stick to browser mvp for some time.
Avatar
@pmp-p when you talk about "bigint", you mean support for i64, right?
Avatar
Avatar
antocuni
@pmp-p when you talk about "bigint", you mean support for i64, right?
yeah passing directly i64 via javascript calls listed in export table
Avatar
ok๐Ÿ‘
Avatar
abi ( mvp or bigint )
But the ABI isn't just wasm features. The C and C++ programming language have support a lot of features like varargs, taking pointers to arguments, stack unwinding, dynamic linking, etc which are not supported by the wasm runtime and need to be implemented on top of the wasm runtime by the compiler. Emscripten does not guarantee that the way these features are implemented will stay the same between different versions. So one example is that there are three different ABIs for C++ exception handling / Rust panics / setjmp longjmp: one ABI if wasm-exceptions are assumed, a second ABI if no wasm-exceptions but yes wasm-bigint, and a third ABI if no wasm-exceptions and no wasm-bigint. The reason that we enabled wasm-bigint was that this third EH ABI was buggy when combined with dynamic linking, and in particular we were unable to dynamically link rust libraries unless we disabled stack unwinding. I fixed this by dynamically generating a wasm binary at run time to provide the missing adaptors (https://github.com/emscripten-core/emscripten/pull/17328). But each of these missing features requires quite complicated code to work around them and the workarounds to implement each feature interact with each other in complicated ways. If the details of any of these workarounds changes between Emscripten versions, that is likely an ABI break.
(edited)
Avatar
Another thing that causes ABI breaks is changes in the way that Emscripten handles relocations when loading a so file.
Avatar
was checking out the collective today and it seems like the only thing we're missing is how to be decisive on wether to accept people's PRs or not is an example.html file (as stated in the link) I remember finding the website @Paul Everitt good! definitely better than just having the github, even if currently incomplete I'm wondering if there's something else left to be done I guess the package building stuff is all done because hyperdrive gave us that for free right? maybe stipulating guidelines for people to write tests?
Avatar
Paul Everitt 13/01/2023 12:57
Oh, alas, we're missing more than that ๐Ÿ˜ฆ I've been very absent. And my Data Science DC talk later this month highlights it.
Avatar
NathanKrupa 22/09/2023 15:28
Is there any thought or work being done on creating a pyscript plugin for wordpress? Or is that something that is way down the line?
Avatar
Avatar
NathanKrupa
Is there any thought or work being done on creating a pyscript plugin for wordpress? Or is that something that is way down the line?
Jeff Glass 22/09/2023 15:53
What would you want such a plugin to do?
Avatar
Avatar
Jeff Glass
What would you want such a plugin to do?
NathanKrupa 22/09/2023 16:34
I think it would be awesome to be able to host interactive code samples in a browser. Either through a Jupyter notebook style persistent code that can be modified and rerun, or through a REPL block.
Avatar
Avatar
Jeff Glass
What would you want such a plugin to do?
NathanKrupa 22/09/2023 16:39
I'm a professional fundraiser by trade, and host a website on fundraising. I just posted an article on using a python script to interact with a fundraising platform API. https://thealmoner.com/python-classy-api/. It would be cool and useful to be able to have an active script on the page. (edited)
Avatar
So the folks building PyScript.com have plans to make it easy to embed PyScript stuff inside another web page (using the same iframe technique video embedding uses).
Avatar
Hello! I'm working on a PyScript package called proceso that provides a pythonic interface to p5.js. It's very much a WIP. I'm developing it for students I'm mentoring in after school projects focused on environmental sensing and food access. Just got a nice email from a high school teacher in Australia who plans to use it with his seniors next semester. Does anyone have advice for making examples suitable for the collective? https://proceso.cc
Avatar
Avatar
mcintyre
Hello! I'm working on a PyScript package called proceso that provides a pythonic interface to p5.js. It's very much a WIP. I'm developing it for students I'm mentoring in after school projects focused on environmental sensing and food access. Just got a nice email from a high school teacher in Australia who plans to use it with his seniors next semester. Does anyone have advice for making examples suitable for the collective? https://proceso.cc
bugzpodder 07/11/2023 17:30
the library looks sweet. is it open-sourced?
Avatar
@mcintyre that's a pretty cool project. WRT to creating examples, this isn't so much advice as "impressions" but:
  • Make sure the example illustrates a well defined point. E.g. "How do I easily create animations with PyScript?" or "I want to wrap a JavaScript library in a Pythonic API, how?" could be answered by proceso ๐Ÿ˜‰
  • Linking to proceso's own docs from our docs is definitely possible in terms of pointing folks at frameworks folks have implemented on top of PyScript.
  • Make it look cool. ๐Ÿ˜‰
  • Make it easy to adapt so folks have a skeleton from which to flesh out their unique ideas.
Hope this makes sense, and please do let us know how youre getting on.
Avatar
Avatar
bugzpodder
the library looks sweet. is it open-sourced?
A Python package for creative coding on the web. Contribute to nickmcintyre/proceso development by creating an account on GitHub.
Avatar
Avatar
ntoll
@mcintyre that's a pretty cool project. WRT to creating examples, this isn't so much advice as "impressions" but:
  • Make sure the example illustrates a well defined point. E.g. "How do I easily create animations with PyScript?" or "I want to wrap a JavaScript library in a Pythonic API, how?" could be answered by proceso ๐Ÿ˜‰
  • Linking to proceso's own docs from our docs is definitely possible in terms of pointing folks at frameworks folks have implemented on top of PyScript.
  • Make it look cool. ๐Ÿ˜‰
  • Make it easy to adapt so folks have a skeleton from which to flesh out their unique ideas.
Hope this makes sense, and please do let us know how youre getting on.
Great suggestionsโ€“much appreciated! Those are great points to address. I'll also put some thought into answering "How do I wrap a JavaScript library so that it works with both Pyodide and MicroPython?"
Avatar
Avatar
mcintyre
Great suggestionsโ€“much appreciated! Those are great points to address. I'll also put some thought into answering "How do I wrap a JavaScript library so that it works with both Pyodide and MicroPython?"
i would use ctypes
๐Ÿ‘๐Ÿฝ 1
Avatar
@mcintyre yeah... so clearly this is early days for the PyScript project (we're perhaps 18 months old), and so describing the process and answering the question of "how to wrap JS in a Pythonic module that works with both Pyodide and MicroPython?" is a welcome trailblazing thing to do. Please also consider submitting it as a talk to PyCon! https://us.pycon.org/2024/speaking/guidelines/ Happy to help in any way we can..! ๐Ÿš€
๐Ÿ‘๐Ÿฝ 1
10:19
Would be great if this could point the way for other folks who want to Pythonic-ize some JS-y thing via PyScript. Both ecosystems are rich and diverse. Connecting them together would be a pretty powerful exercise in coding alchemy, if you see what I mean. ๐Ÿ™‚
Avatar
Avatar
ntoll
Would be great if this could point the way for other folks who want to Pythonic-ize some JS-y thing via PyScript. Both ecosystems are rich and diverse. Connecting them together would be a pretty powerful exercise in coding alchemy, if you see what I mean. ๐Ÿ™‚
Happy to give this a go. My students are very interested in sustainable web design, so having access to MicroPython goes a long way toward reducing emissions from data transfer. Thanks for all your work on this! I don't have a fully-formed thought here, but it'd be neat to design wrappers that work with MicroPython by default and can switch over to Pyodide to access Python's ecosystem as needed.
Avatar
@mcintyre happy to collaborate on this. You've made a cow path, and it'd be good to help pave it (IYSWIM) so others can follow and explore where you've been. In an ideal world, such information could be a part of the official docs (definitely a WiP - repos here: https://github.com/pyscript/docs). All feedback, ideas, constructive criticism and contributions most welcome!
Avatar
Avatar
ntoll
@mcintyre happy to collaborate on this. You've made a cow path, and it'd be good to help pave it (IYSWIM) so others can follow and explore where you've been. In an ideal world, such information could be a part of the official docs (definitely a WiP - repos here: https://github.com/pyscript/docs). All feedback, ideas, constructive criticism and contributions most welcome!
I'd love to contribute docs soon. I'm actually working on the p5.js documentation with support from the Processing Foundation. Here's one resource that's informed my thinking: https://diataxis.fr/
The Diรกtaxis framework solves a problem of quality in technical documentation, describing an information architecture that makes it easier to create, maintain and use.
Avatar
Avatar
mcintyre
I'd love to contribute docs soon. I'm actually working on the p5.js documentation with support from the Processing Foundation. Here's one resource that's informed my thinking: https://diataxis.fr/
Jeff Glass 13/11/2023 13:55
We actually had been implementing diataxis in our previous releases, and moved away from it in this re-release. You can see what that looked like here: https://github.com/pyscript/pyscript/tree/2023.05.1/docs
๐Ÿ‘๐Ÿฝ 1
Avatar
Avatar
mcintyre
I'd love to contribute docs soon. I'm actually working on the p5.js documentation with support from the Processing Foundation. Here's one resource that's informed my thinking: https://diataxis.fr/
My thoughts on diataxis amount to: https://ntoll.org/article/chicken/ ๐Ÿ”
A large part of my day job involves reading and writing what folks optimistically call "technical documentation". It's usually about as much fun as sticking forks in one's eyes, rubbing a cheese grate
๐Ÿ” 1
Avatar
@Fabio @ntoll @Dasha @Andrea Giammarchi To resume our last 2 PyScript marketing meetings: We "set in stone" the proposed segmentation We need to gather our knowledge somewhere, so we will probably use Notion We proposed to focus on PyCon for now, and for this do the following:
  • audit the channels that we have
  • open new channels
  • figure out some corporate guidelines so we can put together some images and a little bit of an intro for each channel
  • have a QR code that will probably go to the landing page of PyScript.net, where we will have all our channels made available
(edited)
โค๏ธ 2
๐Ÿฅณ 1
Avatar
Avatar
Mikimic
@Fabio @ntoll @Dasha @Andrea Giammarchi To resume our last 2 PyScript marketing meetings: We "set in stone" the proposed segmentation We need to gather our knowledge somewhere, so we will probably use Notion We proposed to focus on PyCon for now, and for this do the following:
  • audit the channels that we have
  • open new channels
  • figure out some corporate guidelines so we can put together some images and a little bit of an intro for each channel
  • have a QR code that will probably go to the landing page of PyScript.net, where we will have all our channels made available
(edited)
Thank you for the summary @Mikimic !
๐Ÿ‘ 2
Avatar
Avatar
Mikimic
@Fabio @ntoll @Dasha @Andrea Giammarchi To resume our last 2 PyScript marketing meetings: We "set in stone" the proposed segmentation We need to gather our knowledge somewhere, so we will probably use Notion We proposed to focus on PyCon for now, and for this do the following:
  • audit the channels that we have
  • open new channels
  • figure out some corporate guidelines so we can put together some images and a little bit of an intro for each channel
  • have a QR code that will probably go to the landing page of PyScript.net, where we will have all our channels made available
(edited)
Thank you ๐Ÿ™
๐Ÿ‘ 3
Avatar
Avatar
mihir2760
used /See user's stats
Statbot BOT 07/07/2024 18:09
Author icon
Loading...
Please wait. This won't take long!
Avatar
Avatar
Statbot
Click to see attachment ๐Ÿ–ผ๏ธ
still loading
Avatar
Hello, I hope I am writing in the right channel. I wanted to extend an invitation to participate in Pycon latam 2025, Costa Rica (https://www.pylatam.org/). It would be an honor for us if someone responsible for this project could join us from August 21-24. Additionally, if you are interested, it could be a keynote at our event, giving a more prominent space to talk about PyScript during the activity.
โค๏ธ 2
Avatar
Avatar
luisza
Hello, I hope I am writing in the right channel. I wanted to extend an invitation to participate in Pycon latam 2025, Costa Rica (https://www.pylatam.org/). It would be an honor for us if someone responsible for this project could join us from August 21-24. Additionally, if you are interested, it could be a keynote at our event, giving a more prominent space to talk about PyScript during the activity.
Chris Laffra 24/04/2025 18:01
I will not be able to make this, but I can share a bunch of PyScript slides with anyone who ends up speaking on PyScript. Examples of talks can be found here: https://www.youtube.com/playlist?list=PLXHJZN4UnprtCWGih6gSG_PvmgsvHue5y
Various presentations/podcasts. If you like these podcasts, check out my C4E book at chrislaffra.com
Avatar
Original message was deleted or could not be loaded.
Does spam like this actually work? I doubt you'll find any success here.
Exported 200 message(s)
Timezone: UTC+0