-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Illustrate features of Pony with Code Samples #292
Comments
I disagree. Is anyone going to use Pony because of those examples? Probably not. People want many things. Whether those things are valuable or useful or not is a different story. If we have a valid reason for providing examples of how you do X in Pony then ok, but "people want to see code examples when briefly doing a pass by on HN" is not a good reason to me. There should be a reason for those example. |
@mfelsche and I chatted a bit. I'm quite good with approaching this as "impression should someone have after a quick visit to the homepage" and working from there to figure out what in terms of text, code, images, videos etc should be there. The key for me is having a goal besides "put some code on there". We should have a defined goal and figure out how to meet that goal via whatever means (including code). |
The main goal i would like to pursue is to have the visitor of the website, especially newcomers to pony, be able to get a good first impression of the language and if they want lead them to other sites for further information (like the tutorial or the stdlib docs). So, to clarify, i don't want code examples for the sake of having them, but for the following reasons:
|
A central aspect that the front page should show off is actors. Most readers coming from other languages will not have used them before, and even people coming from eg Erlang have used a very different style. This is IMO what really differentiates Pony from other languages (maybe I'm biased, coming from Rust/C++). But just having text explaining what actors are is not going to grab attention. If we had a simple example (like two actors, just doing ping pong) that demonstrates how easy and intuitive actors are in Pony I think it would help a lot. |
I agree with @plietar re: actors. I think something that shows actors is certainly part of it. Hello world while there is more than 1 actor is very non-obvious and wouldn't be a good idea in my mind. Ping/Pong might be good. Ref caps are an integral part of Pony as well but, do we show them that early on? I think not. Or rather, we don't highlight them. I think something like Ping/Pong with an explanation of what is going on could be good. Showing code for the sake of syntax is in my mind, unimportant. If you are coming for to see the syntax, you aren't getting over the hump of reference capabilities. That's the wrong audience for us. So, if you want things to highlight I think it should be: safe concurrency via actors. that's the hard problem that pony is solving. its what needs to be emphasized. I'm not against code samples but they should be specifically to demonstrate what makes Pony different. Its a serious investment in time to learn Pony. People need to be presented with a case for why they should do that. |
One additional note, I'm worried that Ping/Pong wouldnt end up demonstrating enough. We might need something a bit more interesting. Find a good example that is accesible in terms of problem domain yet also demonstrates what we want could be hard. It might require more than 1 example but a single example would be best in my mind. Perhaps something from |
Reviving this old issue as I've been thinking about this too. I also disagree that code samples are that important, especially since syntax isn't Pony's strength. I think it's most insightful to take a leaf from other languages' websites. Below, I will analyze some of the top rising languages in 2020: Rust
CommentsNotice that there are no code samples. There is just one line about the borrow checker. Nothing about syntax. Nothing about error handling. It's all about what Rust provides: a No GC language that happens to have a great type system. And more importantly, it's about the problem domains that Rust solves. They really neatly categorised them, which is nice as a developer. Typescripthttps://www.typescriptlang.org/
CommentsThe Typescript page is less convincing for me than the Rust page, but I think Typescript is targeting a different group. Namely, engineering managers / architects who already know JS intimately, and are looking to upgrade their front end apps. To those people, they probably know why types are important, Typescript just has to convince them that it is stable enough to be adopted in their organization. Again, there are no code samples. It's all about how stable Typescript is and how clean it is. I really doubt many will watch the video, but having a video there shows commitment! It shows that people like this language enough, that they made a whole video on this. (For those unaware, MS Build is a huge Microsoft conference, and to be featured there is a big deal; F# wasn't even featured in this year's MS Build and it's an older language than TS) GoI don't want to make it sound like I'm bashing code samples, so it's just nice that the next language I picked, Go, has a lot of code samples on their website:
CommentsThe Go website is minimalist, reflecting the developers' philosophy. Indeed, the Go language, Go tutorial all follow this design scheme of minimalism. For instance, the Go playground doesn't even have syntax highlighting. More interestingly is the abundance of code samples. My guess is that Go can focus on this, since its syntax is so similar to C like languages that anyone with a programming background can understand most of it. Very little is said about Go's strengths, namely its easy concurrency handling, its huge standard library, and its minimalist syntax. Overall, a nice contrast from the marketing-heavy websites above. snark: It's kinda funny that Rust and Go both use basically the same tagline... Dart
CommentsThe animation is super smooth, they really hired good designers for this. IMHO, I think this website is designed to convince people to use Dart. The target audience is mobile app developers who have never heard of Dart, who probably won't use Dart right now, but might in the future. That's why there is very little focus on getting Dart installed on their computers. The focus is on convincing you, the reader, that Dart is a good language that you might consider for your next hobby project, and hopefully later on, your next company project. This reflects Dart's position - It's definitely not as big as Kotlin / Swift / Typescript for mobile app dev (TS thanks to React Native). So, it has to compete by focusing on impressing new devs, even those who probably won't download your language. will add more |
@mfelsche Is this what you want? @SeanTAllen We can open a discussion topic in zulip and collect the most representative code of pony. It must have the characteristics of pony and the most spiritual representative. I think it's good if it is up to expectations. When I first logged in to ponylang.io, I was actually very eager to see this. |
@damon-kwok I will argue against all those as a waste of space. |
In this hackernews conversation: https://news.ycombinator.com/item?id=17195580 , lots of people demanded code examples on the website. They couldn't find any, even after clicking around.
I think it makes sense to give shallow first impression with some code example that highlights some of the strengths of pony and to provide some more examples on a separate page, centered around how to do common things in pony, people might be used to from other languages.
The text was updated successfully, but these errors were encountered: