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
Julia code somewhere on the landing page #115
Comments
Somehow the benchmark should be brought back, and I think showing them side by side but without making it busy would be best. Somehow. |
Pointed out on HN: https://news.ycombinator.com/item?id=17725174. |
It looks like there is a plenty of space on the download/doc banner for Mandelbrot set program 😉 |
Yeah I rather liked our Mandelbrot code from the old site. Nice and concise code, familiar and understandable algorithm. |
I wrote a simple Riemann Zeta function calculator for a fixed value of the parameter. https://github.com/joelandman/rzf/blob/master/julia/rzf.jl highlighting the expressiveness of language. |
Note that this
But perhaps an expansion of a trig function, with complex values & derivatives people may recognise, would be better. |
The benchmarks are linked. Maybe we can put the benchmarks and some code in one section. In fact, hovering on the benchmark could show that code, all of which are short snippets. |
I think linking through to the benchmarks is fine; not having any code examples on the first page is not. |
The markup for adding and showing code samples for each of the ecosystem tabs is there -- it's just a matter of adding it. |
I was idly wondering how to show source code on the front page. I think it's possible but at the expense of making the site look a little denser and text-heavy. Remove the "Julia in a nutshell" text—it's kind of obvious from the size of the paragraphs—and use lead-in headings. Don't ask me how it would be done technically, I know little of this CSS wizardry... |
So what needs to be done to make this happen? |
Outsider or not, all you need to do to contribute is make a pull request and then have it reviewed! Help is greatly appreciated. |
I took a crack at this since no one else has, with the caveat that I'm in no way a web dev and the HTML/CSS may be imperfect. Before I clean things up and submit a pull request, I wanted to ask people's thoughts on some of the changes. Taking inspiration from nim's homepage, I put code on the right, slightly shrinking the jumbotron and the "Julia in a Nutshell" section, where I altered the various text boxes. In narrow windows, the code slides in beneath these. I tried to showcase a wide range of the language in limited space, which I didn't think the Mandelbrot function did well. If there are issues with code examples or descriptions here, it'd be possible to use the ones from cormullion's proposal instead. |
Can we try a version with the jumbotron as it is right now and the code to the right of features? The features text can be further shortened if necessary. |
First of all, thanks for trying this out!
I actually disagree here. I think the Mandelbrot function is a canonical, recognizable example and showcases Julia's clarity and brevity well. I think code on the homepage should give a brief taste of the language; I find the above a bit overwhelming. |
One thing the Mandelbrot doesn't show off is user-defined types. Perhaps something similar in spirit to Mandelbrot but using Arrays of RGB values using Images.jl might be a bit better. One other possibility for showing off code could be a screencast or slideshow that shows the code, and then running time, and the C or Python versions. Just putting some ideas out there. |
As a couple of data points:
|
If there was "see some code examples" link to a page with code examples, that might also be fine. |
Thanks for the feedback everyone. Here's take 2 (though I need to fix code block alignment):
What I meant is that this function shows only basic control structure and little unique to Julia (compared to say MATLAB) in 11 lines, which is most of the available space. However, I agree it's a pretty introduction and a
(as in the screenshot) could compliment it nicely. I know I would've found an example page useful when learning about Julia. If people think this is reasonable I'll give it a shot. Things I'd include (very briefly, maybe 5-10 lines each just to highlight all the syntax/features that make Julia so great, like an extended version of my previous attempt):
Other replies:
I don't mind leaving the Jumbotron full-width, but would it be OK to shrink it a little vertically? It takes up an enormous amount of screen real estate as is, especially with the header and banner.
If I were making a page for Rust, I wouldn't show code either ;) |
What you've shown there looks awesome to me! I would 100% support a PR for that. Nice work!
😂 |
I like the idea - but not so much design-wise. Can we do a separate page with Code examples as Stefan suggested, and show off several language features? Kind of along the lines of the first trial above? |
While not the same as having code on the landing page, I've added a link to browsing the microbenchmarks in the "Easy to Use" section right on top as a quick way to see the code. |
Hey all, let me know your thoughts on this. |
Why don't we just add the code examples in an additional section on the homepage? |
Yeah, that’s a possible solution. |
The microbenchmarks would be perfect to link to for code examples. |
I don't think the microbenchmarks are ideal code examples, although they're not the worst. They're certainly better than nothing, which has been the status quo since I opened this issue. |
We can link the microbenchmarks and also some coding examples. Is there somewhere I can look for good examples of Julia code? |
I think some things in stdlib could be interesting, but one has to pick carefully. Also, perhaps from some of the common packages. |
@logankilpatrick The trick with good examples is to make sure you only introduce one new thing (here, the Julia syntax), so it's not a good idea to show How to Integrate a Tschaikovsky Manifold Gradient, or whatever. ;) A good source of basic and familiar examples is Rosetta Code - be warned that some of them were written for early versions of Julia, and the syntax would need updating (and possibly vetted for style, depending on who originally wrote them). |
I would say just pick some examples and get this merged and then we can iterate on the examples once it's clear where to put them. |
Examples from the link above? |
I vote for #115 (comment) or #115 (comment) as a first pass. |
The |
I like the
I think this is fine. We just have to get across that we don't look like Haskell or something and if people feel a bit familiar I don't think that is bad. |
Okay, I will move that example into the example page and request a final review. |
I just merged this. I'm sure that what I did was not perfect but I wanted to get the ball rolling so we can iterate. Feel free to open a new issue or PR if you think the example needs something or I missed the mark. |
I somehow didn't notice the fact that the otherwise-lovely homepage revamp has completely removed all Julia code from the landing page. We need to have some example of actual Julia code on that page. It would be good to brainstorm what a good bit of example code would be.
The text was updated successfully, but these errors were encountered: