Skip to content

Allow for different demo snippets to be selected #528

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

Merged
merged 4 commits into from
Feb 23, 2019

Conversation

coolreader18
Copy link
Member

@coolreader18 coolreader18 commented Feb 23, 2019

The selection works, but I'm looking for ideas for what other snippets could be put there. Everything's stored in wasm/demo/snippets/*.py; a separate demo snippet would mean a new .py file in that directory.

@coolreader18 coolreader18 marked this pull request as ready for review February 23, 2019 17:01
@windelbouwman
Copy link
Contributor

You can check this issue, it contains mandelbrot.py:

#352

count = 0
until = 10

print(f"These are the first {until} numbers in the Fibonacci sequence:")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet! f-strings!

@coolreader18
Copy link
Member Author

coolreader18 commented Feb 23, 2019

It takes a while to run, for me about 20 seconds, and the page is frozen during that time. It's a good example, though.

@coolreader18
Copy link
Member Author

I think it could be improved by a requestAnimationFrame call, but that would be for another PR to add that as a builtin.

@codecov-io
Copy link

codecov-io commented Feb 23, 2019

Codecov Report

Merging #528 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #528   +/-   ##
=======================================
  Coverage   48.41%   48.41%           
=======================================
  Files          69       69           
  Lines       14375    14375           
  Branches     3591     3591           
=======================================
  Hits         6960     6960           
  Misses       5554     5554           
  Partials     1861     1861

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c675a59...6e8b88e. Read the comment docs.

@windelbouwman windelbouwman merged commit d44f1b3 into RustPython:master Feb 23, 2019
@coolreader18 coolreader18 deleted the multiple-demo-snippets branch February 23, 2019 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy