11 ms·
I wish these language websites would put an example of some code right there on the homepage so I can see what the language "feels" like. I finally found some c
by voidUpdate 1y ago
I wish these language websites would put an example of some code right there on the homepage so I can see what the language "feels" like. I finally found some code in the tutorials https://tutorial.ponylang.io/getting-started/hello-world https://tutorial.ponylang.io/getting-started/hello-world
- burnt-resistor 1y agoExactly. A "try language" demo should dive right into an editable executor with syntax highlighting and API-docs floating tool tip code completion. Make it as painless and fast to understand as possible.
- codethief 1y agoYou mean this executor[0] which is linked right there on the page we are discussing here? [0]: http://playground.ponylang.io/ http://playground.ponylang.io/
- ben0x539 1y agoThey should probably put more than three lines of code in there?
- kasey_junk 1y agoThe rust and golang versions are exactly the same. Printing hello world is the default of the industry for this sort of thing.
- ameliaquining 1y agoThe Go playground actually has a dropdown menu with 15 examples, of which "Hello World" is merely the first; together they do a decent job of demonstrating the language's core features. The Rust playground defaults to "Hello World" but that's just because there has to be something there, it's not on the home page of the website or anything (though it used to be).
- kasey_junk 1y agoThe golang playground added those through time though. It f pony gets adoption (and I don’t know why it would) they likely would go through the same transition. Mainly my point is it’s weird to complain about hello world. It’s been the first program for languages for decades.
- burnt-resistor 1y agoThat's not the home page and that's not what I'm talking about if you had bother to have read what I wrote that differs from a conventional and limited "try" playground. Also, I've used Pony before and gave up on it. You also don't get to be the chief decider of what all of us may or may not talk about.
- ratdragon 1y agoExample pony applications: https://github.com/ponylang/ponyc/tree/main/examples https://github.com/ponylang/ponyc/tree/main/examples Playground: https://playground.ponylang.io/ https://playground.ponylang.io/ They're on HP https://www.ponylang.io/ https://www.ponylang.io/ unfortunately the article link points to /discover/
- jillesvangurp 1y agoI was also wondering what kind of language this is and where they were hiding all the code. Even the tutorial requires clicking past several pages of (more) introduction before you get to see any code. Probably better to lead with the code. Less waffling, more code would be my recommendation.
- Timwi 1y agoHonestly, I get it. The document wants to tell you what's new and different under the hood, not what the language looks like superficially. Code examples don't actually tell you what the language feels like in production. It's kinda like judging a person's character by how they dress. I would be torn if I had to write intro documentation like this. On the one hand, people demand code examples, but on the other hand, the majority of people reading code examples will nitpick minor pet peeves in the syntax and completely detract from the actual new ideas and concepts that go way beyond just the syntax. I found the descriptions of the concepts very enlightening and I honestly think they gave me a better idea of what the language would “feel like” to program in than a code example (or a description of the syntax) would have. In theory, syntax should be interchangeable. It's conceivable to parse a syntax into an AST and reexpress it in another syntax without changing the AST. In practice, this is not done for many reasons (incl. tooling like diffs) but a big reason is that individual bits and bobs of the syntax are tied to the new concepts in subtle ways. There could absolutely be multiple syntaxes for the same concept, but if the concept is new, even in small and unobvious ways, then no prior existing language’s syntax will map it exactly. For this reason, a code example can't really express the new concept, especially if the syntax is superficially similar to another language that doesn't actually have that concept.
- archerx 1y agoYea but the syntax looks like a mix of Python and JavaScript. By just seeing that I know I don’t want to use it, by seeing the code up front I know that I don’t want to keep reading what ever rationalizations they have to justify the existence of this language. So by seeing the syntax up front I can save a lot of time because in a world where there are many languages that do the same thing it really boils down to using the one with the syntax that you like the most.
- swiftcoder 1y ago> in a world where there are many languages that do the same thing it really boils down to using the one with the syntax that you like the most Wat? If all languages were just syntax re-skinning, we really wouldn't need more than one compiler backend... Generally the semantic differences are much more important. Rust isn't interesting for its syntax, it's interesting for its ownership rules and borrow checker. Erlang isn't interesting because of its syntax, it's interesting for its actor model concurrency. And so on...
- jibal 1y agoThe syntax is the least interesting thing about the language, and hello-world examples demonstrate almost none of the syntax. This bit from the About page is notable: "never write a programming language. That’s like rule #1. Everybody will just tell you it isn’t needed and then argue about syntax."
- klas_segeljakt 1y agoIt's not only about showing off syntax. It's also about showing what type of applications the language makes easy to implement.
- jibal 1y agoBut that's not what was asked for. To find that out, one must dig fairly deeply into the documentation ... at least read the About page.
- poulpy123 1y ago> The syntax is the least interesting thing about the language, and hello-world examples demonstrate almost none of the syntax. I agree for the hello world but I disagree with the syntax. It is the first thing you see and the characteristic you can never escape. It is like the layout and typesetting of a text: the substance is of course more important, but it is still very important. I personally find much more readable languages that have a concise-but-not-too-much syntax, that use not too many special characters, and that is read like fortran/pascal/c/etc (I don't how to define it, but for example lisp is different)
- jibal 1y agoFor Pony in particular, the syntax is not important ... it's simply not the point of the language.
- SiempreViernes 1y agoHaving looked at some source examples, I'm pretty sure Pony has syntax errors just like every other parsed language.
- notfed 1y agoEven caling this an example is a stretch... it's a hello world...that's it. I mean, at least show some conditionals, or something. We get it, your language is amazing, ok, so...can we see it now?
- nallerooth 1y agoI think Nim has a good homepage, with some bullet points explaining what the language is all about coupled with several code examples. I'm not saying Nim is better, but I visited the page the other day and thought it was neat. https://nim-lang.org/ https://nim-lang.org/
- voidUpdate 1y agoYeah, that's exactly the thing I'd hope to see on anything trying to sell me on using a new language. Tell me about what it does, and show me how it does it
- johnisgood 1y agoYeah I think Nim's website is well-made. You can see the features / pros of the language, with many different (and IMO cool) examples.
- 1980phipsi 1y agoThe D language home page has something similar with a drop down with code examples https://dlang.org/ https://dlang.org/
- Alifatisk 1y agoI was about to mention Dlangs website aswell, very well designed and clearly presents the language
- vova_hn 1y agoI remember the first time I visited the DLang website. I clicked “What is D used for?” [0] and scrolled to the very first section, “1. Industry.” The opening example was “1. Games,” so naturally I went to read more…and found the first link, “AAA game,” was dead. It led straight to an error page on Xbox. That was years ago. After reading your comment, I decided to check again. The same “AAA game” link is still first, and it’s still broken. You can’t really call that “a good presentation of a language” when the very first real-world example links to nowhere—and nobody’s bothered to fix it for years. [0] https://dlang.org/areas-of-d-usage.html https://dlang.org/areas-of-d-usage.html
- stared 1y agoAlso it took surprisingly many clicks to see any code. After 3 clicks I had impression that it is not yet a language, just and idea for one.
- brap 1y agoUnfortunately this is true for basically any kind of “product”. It’s crazy how many people build something and make a website for it, only to hide the thing they’ve built somewhere deep in the website. Just show me the damn thing!
- rapnie 1y agoSame impression. I was reading several pages with "Interesting.. interesting.. interesting.. but where is the code?". First code I managed to find was a Github repo with examples [0], and just now trying to follow the click path that led me to it, couldn't find it anymore. I looked up the link from my browser history. [0] https://github.com/ponylang/ponyc/tree/main/examples https://github.com/ponylang/ponyc/tree/main/examples
- katzgrau 1y agoI also (usually) go looking right away to see if the syntax makes me feel warm and fuzzy. I’m so shallow.
- dismalaf 1y agoAgreed. Pony even has nice syntax. Web page is pretty bad though.
- Twey 1y agoI've always loved Factor's homepage, which includes a random snippet of non-trivial (i.e. small but not ‘hello world’) code: https://factorcode.org/ https://factorcode.org/
- gmfawcett 1y ago(also, velociraptors)
- FrustratedMonky 1y agoI wish these new languages would put an elevator pitch on first page. Why another object language?
- sitkack 1y agoIt is funny you say this, because nearly every posting of the Pony language includes this comment. And it is always apologized as you need to go to https://tutorial.ponylang.io/ https://tutorial.ponylang.io/ which still doesn't have source on it. https://github.com/KittyMac/PonyCAT/blob/master/pony-cheat-sheet.pdf https://github.com/KittyMac/PonyCAT/blob/master/pony-cheat-s... The project looks hostile to any sort of adoption.
- 0x457 1y agoProbably hiding the fact that it's whitespace significant
- spooneybarger 1y agoIt's not.
- 0x457 1y agoWhat is this, then? https://github.com/ponylang/ponyc/blob/main/examples/echo/echo.pony https://github.com/ponylang/ponyc/blob/main/examples/echo/ec...
- __red__ 1y agoIt is not whitespace signficant. That is indented to assist the human reader, not the compiler.
- 0x457 1y agoso you're telling me this is valid Pony? actor Main new create(env: Env) => TCPListener(TCPListenAuth(env.root), Listener(env.out)) ?? If so, I don't want to every see that language in my life ever again.
- jbritton 1y agoI see this comment on all language postings and I just don’t get it. I’m much more curious about the motivation behind the language. If the syntax was that of APL, Forth, or Prolog would you just instantly ignore it because it doesn’t look like Java. I think if the language motivation is compelling then you can decide to dive into a tutorial where the syntax will be explained step by step. I don’t see how syntax can be judged before it is understood. Do you accept/reject languages over simple syntax like curly braces vs begin/end or significant white space, or abbreviations you don’t like eg. def, fun, defun, function, procedure.
- thesz 1y agoExamples such as Hello, World! can tell you many things. They can tell you whether language is statically typed or not, does it have an effect typing (it necessarily needs higher order types), does it have type inference, etc, A syntax of one is semantic of other.
- WorldMaker 1y agoCode is poetry and even if you don't know the syntax or details of the tools of the language, a choice example up front gives you a sense of the "rhyme" and "meter" of the language. Sure, some people are going to use that as an immediate gut filter for "doesn't look enough like languages I already know" or various pet peeves, but on the other side for those that love to dig deep into the syntaxes of esoteric/lesser-known languages it becomes like the first sniff when working on tasting notes of a beverage and tells you a lot up front to your "nose" faster than paragraphs of prose about the motivations of the language. "Ah, yes, I'm sensing a strong Python influence on top of earthy notes of Erlang and just a bit of floral Pascal-ness most recently from the vineyards of Typescript, perhaps?"
- catlover76 1y ago[dead]