Ever wanted to quickly share and run Python code via a URL? Well, now you can!
PySnippets is JSFiddle or CodePen but for Python in the browser (via PyScript).
It's a static website. All the logic runs in the browser. No back-end or cloud storage is used - instead, code is URL encoded. Share the URL, your code is in there already, and the static target re-hydrates it then runs it. Yeah, yeah, "snippets" because this is for small scripts. ;-)
This is a goofy "fun" project just to see how quickly something like this could be created. The initial version took just 3 hours to build. Here's a sample (SNAKE game) project: https://is.gd/q3209l (click through to see how its done.)
I wonder what old school international grandmasters like Theydon Bois (France), Pim Li Ko (China) and Will Esden-Green (UK) would think of the modern game... We've lost the creativity, bravery and elegance of such players, from a time when taking part was more important than winning.
I've got a lot of hope for the Google DeepMind attempt to solve Mornington Crescent to add creativity back into the game, like they did for Go.
The problem is that Google seem to be struggling to get the computing power and algos together to deploy nib effectively and to square out the down flows when dealing with Lancashire Pushback - which you must have in a modern game playing against a top player. It's one of those things that seems still out of grasp of ML...
It was rumoured that an early form of the game was played and researched by AM Turing in the 1930’s. Work had been nearly completed to show that good play was undecidable, but it was abandoned to focus on the much easier ENGIMA problem. This was before the modern rules and the addition of the Elizabeth line, leading to much expanded game space.
This is great! I've added it to this big list[0] of classless/minimal CSS frameworks (100+ frameworks) to make it easier to compare to other similar projects.
For those interested in Pico (which is already on the list), you can preview it on some boilerplate HTML here[1] or use the Javascript bookmarklet[2] to preview how it would look on any arbitrary page, which can be helpful for prototyping a new site.
A lot of the lists (UL) break for many of the libs in the demos, including pico [1]. Also in pico, the cursor remains "default" instead of switching to "text selection" when you hover over text to select it - is that a style choice?
@dohliam do you have some favorites, ones with the least "errors" and non-standard paradigms?
> A lot of the lists (UL) break for many of the libs in the demos, including pico
Unordered lists look okay to me[0], but it's possible that you are referring to the navigation section at the top of the page which technically contains a UL as well. This is just a boilerplate HTML5 template[1] with Pico CSS applied on top, so it seems that Pico doesn't have special handling for this particular usage of ULs nested in NAV elements (some frameworks turn these lists into a navigation bar or even dropdown menus, but it's interesting to compare how each of them works out of the box).
> the cursor remains "default" instead of switching to "text selection" when you hover over text
This is directly from Pico CSS itself -- check out the homepage[2] and you will see that the same thing happens there as well.
Both this and Pico are very inspiring. Looking through the gdcss docs was a lesson in itself - I was shown tags that I'd not previously known or thought about. Which is an admission that I tend to rely on (much to) large CSS frameworks to do their thing too much.
I managed to get MicroPython versions of these working on a micro:bit with the speaker directly plugged into the IO pins. Lots of fun, and MicroPython was definitely quick enough. :-)
Putting thoughts into words for others to understand is a creative activity that keeps on giving for all sorts of subtle reasons. (What reasons..? Write a blog and find out for yourself!)
PySnippets is JSFiddle or CodePen but for Python in the browser (via PyScript).
It's a static website. All the logic runs in the browser. No back-end or cloud storage is used - instead, code is URL encoded. Share the URL, your code is in there already, and the static target re-hydrates it then runs it. Yeah, yeah, "snippets" because this is for small scripts. ;-)
This is a goofy "fun" project just to see how quickly something like this could be created. The initial version took just 3 hours to build. Here's a sample (SNAKE game) project: https://is.gd/q3209l (click through to see how its done.)
Feedback welcome..! Thank you!