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
Website Content #40
Comments
Is this the appropriate issue for discussing the front page? The front page is arguably the most important part of the site, since it has to capture users and focus their attention to deeper within the website. It took a look at the current mock-up. It is beautiful, but I feel it goes too far in the simplicity direction: i.e., while it succeeds in not being visually overwhelming, it misses an opportunity to convey some useful information in that prime space. See, e.g., the Haskell website. It immediately shows you interesting parts of the project, in this case even allowing you to play with some elements of it. Somewhat similar for nim. We have a beautiful API, so maybe we can showcase it? |
I really like the Haskell website. I think the interactive command shell quite a bit, and it's a little bit addicting. I now know more Haskell than I did 5 minutes ago :) That being said, I think that will likely take some time if people are interested in that (I think it would be a great addition). However, I do think we could easily implement something static that will give the same message. Any suggestions for content? |
The interactive session is fun, but probably a stretch for us to build. I more wanted to focus on the code snippets and the value they could add. (That said, an interactive component could be backed by AWS Lambda quite easily.) |
So Haskell (and others) are using this library: https://github.com/chrisdone/jquery-console If anyone has an impressive code snippet you'd prefer we use, I can add that for now. |
Maybe something like: import numpy as np
x = np.linspace(-1, 1, 1000)
y = x[..., np.newaxis]
z = np.sin(x**2 + y)
p0 = np.sum(z, axis=0)
p1 = np.sum(z, axis=1) And then display something like a [marginal plot]: Instead of histograms, showing p0 and p1. If that code snippet is too complicated, something like:
|
Good point, a code snippet would be great. I like that hexbin plot code better. Showing that plot without the code for it is a nice idea. Could you add the code here @stefanv so it can be tweaked (e.g. green needs change to our color scheme)? |
Single expressions are doable it seems, but an actual shell is much harder probably. If it's responsive and backed by AWS Lambda it would be cool indeed .... |
Running an interpreter instance on a server via javascript can open up security problems and resource abuse. Solutions such as the PyPy sandbox which recently got and update exist, but are not trivial. We could consider running something like pyiodide which runs in the user's browser, but I don't think that should be our first priority. |
The hexbin was just an example, taken from the seaborn gallery. It doesn't illustrate NumPy very much. |
100%. However, I am interested in solving this problem. I think this would be really great to have either on the site, or standalone (or both). I think I may reach out to the person who did Haskell's sandbox and see what he has to say. Looking at what code I can in the browser, I have a feeling their implementation might not be very secure. Regardless, not our first priority :) |
Cool, be curious to hear what you learn @joelachance. |
AWS lambda now has a layer with NumPy and SciPy included: Our system could be as simple as CodeMirror -> send code to lambda -> display resulting object. AWS will allow us to set very clear resource limits, and we can switch networking off so that no remote data can be fetched. We can also have the call timeout in 5 seconds or so. |
@joelachance I spoke to Chris Holdgraf this morning and turns out this can be done trivially using ThebeLab + MyBinder: https://thebelab.readthedocs.io/en/latest/ Only downside is that it takes a few seconds for the kernel to spin up, but subsequent commands execute quickly. If we have some money, we could also host our own binder instance, which would make startup very quick (we can pre-pull the image we are interested in, which currently is what causes the delay). |
I will look into this! I never heard back from Chris Done who did the Haskell sandbox. I may try him at Twitter next... |
If you get stuck, you can get in touch with @choldgraf, who also uses this for Jupyter Book. |
Note that if you ran your own Binder instance, you could also request the kernel upon page load instead of waiting for someone to click a button before requesting the kernel. It's all a question of resource management and cost :-) |
@choldgraf, good to know! I'm going to look at this this coming week, I may be in touch with questions :) |
@stefanv The website content is still at the stage of brainstorming. Excellent timing on your idea for the front page! |
|
One of the most impressive numpy usage I've seen are from this user on SO. Definitely worth to check his answers. |
@choldgraf I have binder working and a NumPy shell working in the browser. Splitting this out into another ticket (#66). Thank you for the suggestion, it's working well! |
Note that the styling for this needs fixing in shell.css Closes numpygh-40
Okay this is all done and can be closed. The shell content in this issue is superseded by gh-81. Thanks everyone for the input! |
We're missing some stuff (mostly cool looking images), but copy too. Continue working on this.
New content lives on the branch
newsite
(branched from master of numpy.org), in the directory/new-content
. We can add and commit updated content there for the time being.The text was updated successfully, but these errors were encountered: