Remix.run Logo
voidUpdate 4 days 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

nallerooth 4 days ago | parent | next [-]

I 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/

1980phipsi 4 days ago | parent | next [-]

The D language home page has something similar with a drop down with code examples

https://dlang.org/

Alifatisk 4 days ago | parent [-]

I was about to mention Dlangs website aswell, very well designed and clearly presents the language

vova_hn 4 days ago | parent [-]

I 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

Alifatisk 4 days ago | parent | next [-]

I guess you're referring to the official link to quantumbreak.com. No one has probably noticed or pointed it out yet, I do not know where to raise it since I am not a member of the fourm. But the next sentence links to the presentation about the Game (Quantumbreak) and it's integration with Dlang.

You are not wrong, that should be fixed but no information about it is lost, I feel like you're a bit too harsh here.

1980phipsi 2 days ago | parent | prev [-]

If you don't file an issue, then no one will know to fix it. Took me literally three minutes to create a PR using the "Improve this page" button.

https://github.com/dlang/dlang.org/pull/4277

voidUpdate 4 days ago | parent | prev | next [-]

Yeah, 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 4 days ago | parent [-]

Yeah I think Nim's website is well-made. You can see the features / pros of the language, with many different (and IMO cool) examples.

mvieira38 4 days ago | parent | prev | next [-]

It still looks great with Javascript off, 3rd party frames disabled and no remote fonts, too, for us privacy nuts

whalesalad 4 days ago | parent | prev [-]

Nim feels like the perfect language to me. Keep meaning to give it a shot for something.

maleldil 4 days ago | parent | next [-]

The way it handles imports is weird. Default to importing everything from the module without qualification? I know you can choose to qualify everything, but that seems to go against the language's conventions.

archargelod 4 days ago | parent | next [-]

Using fully qualified imports is a Python tradition.

Python doesn't have a notion of public/private symbols (no, "__" prefix does absolutely nothing). It also doesn't have a good type system, so it can't have function overloading.

This is why you're required to qualify almost all imports in Python, to avoid name clashes.

Nim doesn't have this problem and also "fixes" a lot of other shortcomings[1] of Python.[2]

[1] - https://github.com/yugr/python-hate

[2] - https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programm...

maleldil 3 days ago | parent [-]

It's not only a Python thing. Many modern languages require this as well. Go, Gleam, Rust, etc.

When you're reading Nim code and you see a symbol you don't know, how can you tell where it comes from? In Rust, it's either qualified or you have to explicitly import it. What do you do in Nim?

archargelod 3 days ago | parent | next [-]

This is solved by tooling. LSP will get you to symbol definition in a single key press. That's a lot faster then looking it up manually.

In my experience, it's even faster to git clone, open a project in neovim and navigate with LSP than browsing code with some online interface.

archargelod 3 days ago | parent | prev [-]

> Many modern languages require this as well. Go, Gleam, Rust

All the languages you listed do not support function overloading. Qualified imports and namespaces exist to avoid name clashes first, dependency tracking is just a bonus (and a chore).

shiomiru 4 days ago | parent | prev [-]

Nim's import rules are part of its generalization of OOP's obj.foo() syntax. That is, in Nim, you don't have to put "foo" in a specific class, just set the first parameter of "foo" to the type of "obj", and this only works if you don't have to qualify "foo" (similarly to OOP languages...)

maleldil 3 days ago | parent [-]

I don't see how Nim's import is necessary for that to happen. You can allow the user to specify items to import without the qualifier (like Python's `from lib import foo`), and the universal function call syntax would work, too.

shiomiru 3 days ago | parent [-]

That is allowed, with the exact same syntax as Python. But then you still lose the qualification so I don't see any benefits, it's just more boilerplate to constantly adjust, git conflicts to fight with, etc.

bargainbin 4 days ago | parent | prev [-]

Highly recommend you give it a go! Good community, great libraries and the language itself is just bonkers performant without even trying.

sitkack 4 days ago | parent | prev | next [-]

It 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/ which still doesn't have source on it.

https://github.com/KittyMac/PonyCAT/blob/master/pony-cheat-s...

The project looks hostile to any sort of adoption.

jillesvangurp 4 days ago | parent | prev | next [-]

I 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.

jibal 4 days ago | parent | prev | next [-]

The 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."

poulpy123 4 days ago | parent | next [-]

> 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)

zem 4 days ago | parent | next [-]

the way i like to put it is that the syntax is the user interface of the language. if your user interface sucks, your product will not be pleasant to use, no matter how capable it is.

jibal 4 days ago | parent | prev [-]

For Pony in particular, the syntax is not important ... it's simply not the point of the language.

poulpy123 4 days ago | parent | next [-]

If the syntax is not important, that would mean coding in whitespace or malboge would be as easy as coding in python

fouric 3 days ago | parent | next [-]

The GP is factually wrong. There's plenty of empirical evidence to indicate that language influences thought, and that syntax is therefore important.

Although, I would point out that while your argument ad absurdum is generally reasonable (the fact that syntax can make the difference between a very good language and an unusable one), whitespace and malbolge also have terrible semantics that contribute to them being unusable.

As a former Lisp enthusiast (and still an enjoyer), I'd actually use my own darling as an example: Lisps have amazing semantics and are generally good languages. Their syntax is highly regular and structured and easy to parse...except that it's brain-hostile, and I'm convinced that it actively makes it harder to read and write - not just adopt, but actually use.

Tainnor 3 days ago | parent [-]

> There's plenty of empirical evidence to indicate that language influences thought, and that syntax is therefore important.

Are you talking about natural languages here? The so called Sapir Whorf thesis - in its strong or weak form - is rather controversial. There are some interesting findings, but the interpretation of them is still hotly debated.

In any case, none of the studies that I've seen (e.g. about colour perception, spatial reasoning, etc.) seem to be about syntax. I'd have to see some evidence that head-marking language speaker somehow think differently than dependent-marking language speakers and I haven't seen that.

> your argument ad absurdum is generally reasonable

it's a valid argument when somebody is speaking in absolutes, but I haven't seen GGP do that. There's a difference between saying "all syntax is completely arbitrary" and "syntax is not the point" - the latter suggests to me that if you stay within certain reasonable bounds (e.g. not be whitespace or malbolge), whether you use significant whitespace of braces, the language looks more like Pascal or like C, etc. are of minor importance in the grand scheme of things. Which is something you may disagree with, but it's a much more reasonable point that anything you can just counter with "but whitspace!".

jibal 4 days ago | parent | prev [-]

[flagged]

Twirrim 4 days ago | parent | next [-]

You're talking from a position I don't think many would agree with, at all, and I think the responses you're getting are reflecting that.

Syntax is probably one of the single most important things in any language. It matters for writing, but especially for reading.

Bad syntax leads to all kinds of implementation mistakes. It comes with footguns primed ready to go off, probably at the worst possible time. Bad syntax can also make it hard to re-read code and understand what it's doing (especially if the language leans heavily on "magic"), leading to difficulties when troubleshooting, or difficulties when extending existing code.

The more developers you have involved in any project, the more important good syntax becomes, because you all have to be able to read and understand each other's code, and know precisely what is happening. A lot of the bugs that end up in production tend to stem from some disconnect in understanding of the interactions between sections of code.

Tainnor 4 days ago | parent | next [-]

> Syntax is probably one of the single most important things in any language. It matters for writing, but especially for reading.

That appears to be your position (and maybe even that of a majority of developers), but it apparently isn't the position of the Pony developers. If you have a language in which you can mathematically reason about code (which Pony claims very prominently), then surface concerns such as syntax seem to matter less.

It's a different design goal and it feels like many people in the comments here don't appreciate that.

yuppiemephisto 4 days ago | parent [-]

Lean 4 truly lets you mathematically reason about code and has metaprogramming that truly makes syntax a surface thing, but if anything people who know this have the taste to want better syntax

jibal 4 days ago | parent | prev [-]

"I don't think many would agree with"

Aside from this being argumentum ad populum, my upvotes and some of the other comments say otherwise. And I find comments like yours full of strawmen and taking things out of context, to the point where it's simply not worthwhile to debate the substantive points.

perching_aix 4 days ago | parent | prev | next [-]

Good faith argumentation, or really argumentation in general, went out the window when you started treating whether syntax matters (for this language and in general) as a universal truth / (binary) logical statement rather than just an opinion.

mindcandy 4 days ago | parent | next [-]

One of the greatest problems in argumentation over the internet is that people gravitate towards acting as if every statement is intended to define a universal truth so they can argue against that strawman.

perching_aix 4 days ago | parent | next [-]

I don't think (or rather, want to think) that people are being intentionally malicious. Instead, I think this is a scaling issue. Natural language being scaled in ways it isn't prepared to (e.g. over the internet to random strangers from all walks of life with very different intentions).

I've been looking for platforms where one can maybe more formally encode their thoughts, so that the argumentation and debating skill barrier is lowered / eliminated, along with manipulation. And I did find some, but they don't quite hit the spot, and even if they did, people aren't really on them, so it doesn't matter sadly.

jibal 4 days ago | parent | prev [-]

Indeed; thank you. That's certainly what happened here, together with ad hominem whataboutism.

P.S. "please do flag and downvote rather."

I don't have that capability, else I would certainly use it.

"Surely you can appreciate that their comment was not written in agreement with or support for you"

No, I disagree; I think that is exactly what it was--the subject of the comment was your comment, not mine--you wrote of my statement as being a universal truth, not v.v.

Unsurprisingly, on every point where you and I disagree, I think that I am right and you are wrong.

I think it is best that, from now on, neither of us speak to or about each other.

4 days ago | parent | next [-]
[deleted]
perching_aix 4 days ago | parent | prev [-]

If you truly feel that way, please do flag and downvote rather. Surely you can appreciate that their comment was not written in agreement with or in support of you, and that hijacking their thoughts to sarcastically taunt me really doesn't serve you, your point, or this community. At least I certainly struggle to find what's good faith about this comment of yours specifically.

Edit:

> No, I disagree;

Sure, costs me nothing to take your word for it, so it shall be that way then. Definitely came across like that to me though, so if that was not intentional, maybe it's something for your later consideration.

jibal 4 days ago | parent | prev [-]

[flagged]

dang 4 days ago | parent | next [-]

I appreciate your good intentions re the site guidelines! But I'm afraid you've been breaking them multiple times in this thread by being much too aggressive with other users. This post is one example, and here are two others:

https://news.ycombinator.com/item?id=44728708

https://news.ycombinator.com/item?id=44722043

It's laudable to want work like Pony to get discussed in terms of the most interesting things about it, but the best way to do this is to describe and explain more of what's interesting. It's not helpful to comment about how bad other comments are, and certainly not to cross into attack. Those things feed flamewars, as unfortunately happened badly in this thread. That's what we're most trying to avoid.

jibal 4 days ago | parent [-]

All I see is that I've been personally attacked and mischaracterized. If I could downvote such comments I would do that rather than respond. Calling my response here aggressive or an attack is simply not factual, it is hypervigilance against me. Where is your criticism of "Good faith argumentation, or really argumentation in general, went out the window when you started treating whether syntax matters (for this language and in general) as a universal truth / (binary) logical statement rather than just an opinion." ?? I can't flag that outrageous personal attack and no one else has.

As for Pony, I'm not here to defend it or explain it ... I simply responded to casual dismissals of it on trivial grounds.

P.S.

A personal attack is a personal attack ... it's not the target's fault for perceiving it that way. If you're saying something negative about someone then that's a personal attack. Just talk about the subject and the substance, not people. For example, do not write things like "You seem to be struggling with the whole fallacy thing by the way". And FWIW, I think I have a very good grasp of fallacies ... e.g., I know that "no true Scotsman would put sugar on his porridge" is a No True Scotsman fallacy but "certain Scotsmen put sugar on their porridge" is not.

"Why wouldn't you be able to flag it?"

Ask dang ... as I said, I do not have that capability.

Twirrim 3 days ago | parent | next [-]

> All I see is that I've been personally attacked and mischaracterized.

I think there is a fundamental gap in communication. Your actual point is not coming across at all, anywhere in this thread.

That's why you're getting downvoted.

"For Pony in particular, the syntax is not important ... it's simply not the point of the language."

You said that in direct response to someone who was wanting to see the syntax. While I do appreciate that it's not strictly speaking necessary in the context of your reply, it doesn't communicate at all why syntax isn't important to the pony language. You're just making a definitive statement unsupported by anything. Context or even a brief explanation would have been extremely helpful and almost certainly avoided all of this fuss. Your response, given without any context as to why syntax isn't important for pony, was actually harmful, rather than useful.

perching_aix 4 days ago | parent | prev [-]

I really did not mean it as a personal attack, as unbelievable as that may be, apologies if it came across that way.

> I can't flag that outrageous personal attack and no one else has.

Why wouldn't you be able to flag it? And there's no flagged counter, it's not possible for ordinary users to tell how many times a post has been flagged; you cannot know that no one has flagged it, only that it is yet to reach the threshold.

> it's not the target's fault for perceiving it that way.

Where did I say or suggest that it was? If I thought that, what would I be apologizing for?

> If you're saying something negative about someone then that's a personal attack.

I disagree: if someone has negative traits or behavioral patterns that are externally observable, people should not be at fault for observing them and confronting the person about it.

In my view, and I believe in most everyone's view, personal attacks (personal insults) are attacks (expressions that incite) that use the other party's real, perceived, or claimed-perceived personal attributes as but a delivery vehicle for insult. They're the exact opposite of a genuine critique of someone's character or behavior in this sense, which is a thing I recognize as existing, valid, and distinct from this.

And so when I said I didn't mean those to be personal attacks, that's why I did so; it was me clarifying that I wasn't abusing personal critique to deliver an insult (nor do I think I actually delivered any), I legitimately just meant to offer a critique. Clearly it didn't land that way, and so for that I apologize. This is in contrast with "You seem to be struggling with the whole fallacy thing by the way", which I 100% meant as a personal insult, and was unsurprisingly moderated out for it. I did mean it, I do agree with it, but it was absolutely a vehicle for delivering an insult first, and everything else second.

It really does seem like we just disagree every step of the way.

perching_aix 4 days ago | parent | prev [-]

[flagged]

dang 4 days ago | parent [-]

Please don't perpetuate flamewars on HN, no matter how wrong someone else is or you feel they are. It just makes things worse.

https://news.ycombinator.com/newsguidelines.html

perching_aix 4 days ago | parent [-]

Apologies. Been trying to work on it, it's not easy.

jeltz 4 days ago | parent | prev [-]

Then make your arguments instead of making us try to read your mind. Why is Pony special?

arethuza 4 days ago | parent [-]

See: https://www.ponylang.io/discover/why-pony/

I don't think that Pony is claiming to be novel in the area of syntax?

pseudocomposer 4 days ago | parent [-]

If “reference capabilities” are the important thing about Pony, they should have a max 100-200 LoC example on the front page that uses them.

As far as I can tell reading here, “reference capabilities” don’t do anything that properly-used C semaphores haven’t done for near half a century. Or that their abstraction of that isn’t nicer to use than, say, Elixir’s, or better than Rust’s borrow checker for managing mutability. A code example could convince me otherwise.

Show us code that uses “reference capabilities” to do something. This “the syntax doesn’t matter” talk just comes off as bullshit to devs wanting to actually use a language. It would be better to commit to a syntax, post some damn examples on the site, and let devs get used to “reference capabilities.” If the syntax needs revising, just do that in Pony v2.

If you want devs to be enthusiastic about your language, make it easy for them to understand why they should be enthusiastic. That means code, front and center, first thing.

dismalaf 4 days ago | parent [-]

A high performance Actor-based language is fairly unique. Pony is also very fast for a garbage collected language.

Also the syntax is great, probably my favourite language ever syntactically. Dunno why there's a pointless argument about it in these comments...

The reference capabilities are fairly novel as well. Apart from the lack of tooling, writing in Pony is great.

pphysch 4 days ago | parent [-]

If the syntax is great (I agree it doesn't seem bad at first glance) then the website attempting to sell the language should quickly demonstrate that syntax and capabilities. This is what the argument was about. "Can we see the syntax without clicking a dozen links?" "No, the syntax is not important."

dismalaf 4 days ago | parent [-]

Or 3rd option, the syntax is great but the creators are poor website designers because they came from the finance industry writing high performance back end systems...

SiempreViernes 4 days ago | parent | prev | next [-]

Having looked at some source examples, I'm pretty sure Pony has syntax errors just like every other parsed language.

jibal 4 days ago | parent [-]

We must not be communicating clearly, because that doesn't seem to me to have anything to do with what I wrote. I thought it was clear that the discussion was about the syntactic specifics of programming languages. I certainly wasn't claiming that Pony doesn't have a syntax, or that it's not important to use the correct syntax to write a Pony program.

gosub100 4 days ago | parent [-]

People like to make themselves sound smart and important by finding the most trivial and low effort ways to discount and invalidate your point, instead of expending effort to respond to a more substantial argument that I could easily read from what you wrote. It's just the nature of online forums I think. It's easy (but incorrect) to conclude this place is full of jerks, because sometimes jerks are more likely to respond at all, and you don't get a baseline of how many people read your message but didn't reply at all.

jibal 4 days ago | parent [-]

Yes, thank you. I found the amount of bad faith in the responses is really rather shocking, but you have a good point about self-selection.

gosub100 4 days ago | parent | next [-]

I even regret using the word "jerks". Even better would be that people get entranced in a tactical mindset of "how do I most efficiently dismantle and invalidate this input?" Which certainly sounds like a jerk, but in reality they aren't even "considering the human" (can't remember which website used that in their guidelines, maybe early reddit?) in the first place. That's all just my pet theory and speculation.

Tainnor 4 days ago | parent | prev [-]

I honestly think there's a certain number of people whose insecurities get triggered when they encounter something that they don't immediately understand and instead of concluding that it's not for them or that they lack prerequisite knowledge, they get angry and dismissive.

quotemstr 4 days ago | parent | prev [-]

[flagged]

dang 4 days ago | parent | next [-]

"Eschew flamebait. Avoid generic tangents."

https://news.ycombinator.com/newsguidelines.html

perching_aix 4 days ago | parent | prev | next [-]

This is textbook no true scotsman fallacy, you're aware, right?

BobaFloutist 4 days ago | parent | next [-]

It's really more of an inversion. No true Scotsman is "No Scotsman would ever (commit murder)" "What about (Scotsman that committed murder)?" "Ok, no true Scotsman would commit murder"

Whereas this follows the form more of "Murder is bad" "I dunno, a lot of Scotsmen commit murder" "Ok, but no true Scotsman would commit murder"

It's the same (annoying) assertion, but the fundamental argument is about the value of murder, not the category of "Scotsmen," so it's not the same extremely obvious fallacy of redefining the literal topic at hand whenever a counterexample is presented.

perching_aix 4 days ago | parent [-]

It's no true scotsman if you just resolve their indirection: no true scotsman would care about syntax, because a true scotsman is someone who doesn't care for such a thing - otherwise, they're people who GP finds to be of low value, and thus their opinion doesn't count, as they're no true scotsman, not true programmers.

It's why I called it an outright textbook example: it's an appeal to purity, where purity is determined in a circular way - the very definition of the no true scotsman fallacy, as far as I could find and understand it.

fkyoureadthedoc 4 days ago | parent | prev [-]

And? Doesn't mean it's not true. It just means you can't use it to win an argument against a nerd.

jibal 4 days ago | parent | next [-]

If it's a fallacy then it's nonsensical to call it true. But in fact that comment was not at all a True Scotsman Fallacy, or any other kind of fallacy. Saying that a certain kind of Scotsman puts sugar on his porridge is vastly different from saying that no true Scotsman puts sugar on his porridge.

perching_aix 4 days ago | parent | prev [-]

> Doesn't mean it's not true.

True, it just means that it's idiotic, rather.

fkyoureadthedoc 4 days ago | parent [-]

oof I'm pretty sure that's a fallacy, let me just consult the manual here...

jibal 4 days ago | parent | next [-]

Speaking of fallacies, it's complete nonsense (not the only example of it from that source) to say that the comment in question was a True Scotsman Fallacy (or any other kind of fallacy). Saying that a certain kind of Scotsman puts sugar on his porridge is very different from saying that no true Scotsman puts sugar on his porridge.

perching_aix 4 days ago | parent [-]

Right, saying that only programmers who don't solve genuine problems and instead merely follow trends and treat it as fashion (and are thus no true scotsman) care about syntax, implying their opinion doesn't count, is definitely not a no true scotsman fallacy. It totally doesn't suggest that true scotsman heed the notion that syntax doesn't matter, and that so by definition, anyone else is just some goober following the cargo cult, so they don't count. [0] /s

And so no,

> Saying that a certain kind of Scotsman puts sugar on his porridge is very different from saying that no true Scotsman puts sugar on his porridge.

I categorically disagree that these would be meaningfully distinct claims, as the "[only] a certain kind of Scotsman puts sugar on his porridge" bit specifically invokes the implicit disqualification of said Scotsman from being counted as a True Scotsman.

> not the only example of it from that source

Pretty ironic of you to say that.

[0] the literal definition of the no true scotsman fallacy: https://en.wikipedia.org/wiki/No_true_Scotsman

fkyoureadthedoc 3 days ago | parent [-]

Only a certain kind of Hacker News would make this reply

perching_aix 4 days ago | parent | prev [-]

Keep us updated.

poulpy123 4 days ago | parent | prev [-]

[flagged]

pxeger1 4 days ago | parent | prev | next [-]

The designer's syntax decisions tell you a lot about their semantic decisions, which languages they take inspiration from, and the language's philosophy about things like flexibility, correctness, and opinionatedness.

jibal 4 days ago | parent [-]

Or not. Mostly not in this case.

arethuza 4 days ago | parent [-]

I agree, in the case of Pony the interesting stuff is mentioned on this page:

https://www.ponylang.io/discover/why-pony/

Syntax doesn't really come into it.

Edit: I'm as fond of discussions of the design of programming language syntax as everyone else - just in this case the apparent novelty of Pony is at a more fundamental level.

jibal 4 days ago | parent [-]

Indeed. I wonder how many people here even read the title of the post.

klas_segeljakt 4 days ago | parent | prev | next [-]

It's not only about showing off syntax. It's also about showing what type of applications the language makes easy to implement.

jibal 4 days ago | parent [-]

But 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.

Mawr 4 days ago | parent | prev [-]

The way a Ferrari looks is the least interesting part of it too. I still want to see the thing front and center on its homepage.

The syntax is the language. To show me the language you have to show me its syntax.

jibal 4 days ago | parent [-]

"The syntax is the language."

This is obviously false.

Twey 4 days ago | parent | prev | next [-]

I'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/

gmfawcett 4 days ago | parent [-]

(also, velociraptors)

jbritton 4 days ago | parent | prev | next [-]

I 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 4 days ago | parent | next [-]

Examples 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 3 days ago | parent | prev [-]

Code 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?"

ratdragon 4 days ago | parent | prev | next [-]

Example pony applications: https://github.com/ponylang/ponyc/tree/main/examples

Playground: https://playground.ponylang.io/

They're on HP https://www.ponylang.io/ unfortunately the article link points to /discover/

burnt-resistor 4 days ago | parent | prev | next [-]

Exactly. 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 4 days ago | parent [-]

You mean this executor[0] which is linked right there on the page we are discussing here?

[0]: http://playground.ponylang.io/

ben0x539 4 days ago | parent | next [-]

They should probably put more than three lines of code in there?

kasey_junk 4 days ago | parent [-]

The rust and golang versions are exactly the same.

Printing hello world is the default of the industry for this sort of thing.

ameliaquining 4 days ago | parent [-]

The 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 4 days ago | parent [-]

The 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 4 days ago | parent | prev [-]

That'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.

notfed 4 days ago | parent | prev | next [-]

Even 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?

stared 4 days ago | parent | prev | next [-]

Also 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 4 days ago | parent | prev | next [-]

Unfortunately 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!

Timwi 4 days ago | parent | prev | next [-]

Honestly, 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.

notfed 4 days ago | parent | next [-]

> people reading code examples will nitpick minor pet peeves in the syntax and completely detract from the actual news ideas and concepts

Err, ok, so? Don't be so afraid of criticism, I guess? Yeah, some people will nitpick. I don't see the problem.

johnisgood 4 days ago | parent [-]

I think the emphasis should be on "nitpick" and "detract". Syntax is important, but they want people to focus on the fundamental or underlying concepts instead of the syntax first. With regarding taking criticisms: I think the person posting this submission may not be associated with the language to begin with. I wonder if any Pony developers are even reading it. Just my 2 cents.

gr4vityWall 4 days ago | parent | prev | next [-]

> 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 believe that, regardless of our personal preferences, the reality is that syntax is a major criteria for adopting a programming language.

Some people have trouble following Lisp code, and won't touch your project if it looks like chat. Others will have the opposite reaction and have their interest captured instead.

cestith 4 days ago | parent [-]

Likewise, some people love the ABC and Python model of syntactically important leading whitespace while others passionately prefer some sort of brackets (for this purpose brackets include parentheses, curly braces, square brackets, words like BEGIN and END, etc).

Some love short, mnemonic built-in variables and short built-in function names of the sort you see in APL or Perl (although Perl has longer-named versions optionally for a lot of things). Others love long, self-documenting names for keywords and functions. They might want no built-in variables at all.

Lutger 4 days ago | parent | prev | next [-]

In a way, leading with the core ideas and not with the syntax also shows what this language is about, and selects for people who are more interested in the PL concepts than its looks. After all, syntax is the bikeshed of programming language.

voidUpdate 4 days ago | parent | prev | next [-]

On the homepage, just move the descriptions to the left a bit, and put a big block on the right side where there is some example code that shows off the concepts a bit. It's not like they're struggling for space

archerx 4 days ago | parent | prev [-]

Yea 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 4 days ago | parent [-]

> 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...

norir 4 days ago | parent | next [-]

I agree and disagree completely with this statement. Syntax is superficial. It is the first thing that people will notice about the language (unless you hide it from them). One quickly notices that if you don't like a language syntax, you can always write a compiler that operates at a purely syntactic level to transform your desired syntax to the actual target language.

But just because syntax is superficial doesn't mean that it isn't important. If a language has such poor syntax that I feel the need to write my own compiler to work around its syntax, I have to seriously question the skills and/or motivations of the author. If I am capable of writing a compiler at the syntactic level, why not just go all in and write my own compiler that implements _my_ desired semantics? A language that I find subjectively distasteful at the syntactic level is nearly guaranteed to be filled with semantic and architectural decisions that I also dislike. Consider Rust, I do not think that its syntax and abysmal compilation times can be decoupled. I would rather write my own borrow checker than subject myself to writing rust. And the reason is not the syntax, which I do strongly dislike, but the semantic properties of the language, such as horrible compilation times and compiler bugs (if a language has more than 100 open issues on github, I consider it broken beyond repair).

archerx 4 days ago | parent | prev [-]

You say that but I will never use Rust because of it's awful syntax, I'll stick with C/C++ and be happy and not miss out on anything. I don't know much about erlang so I have no comments on it.

whytevuhuni 4 days ago | parent | next [-]

> I will never use Rust because of it's awful syntax, I'll stick with C/C++

Oh, that's very interesting. Rust tried to match C++'s syntax as much as possible.

Which parts do you find awful? Lifetimes and trait bounds?

swiftcoder 4 days ago | parent | prev [-]

> and not miss out on anything

I mean, you do you. No one is judging. The fact remains that Rust exists primarily because there are some features that C++ cannot reasonably provide

pjmlp 4 days ago | parent | next [-]

It could eventually provide some, if Safe C++ (nee Circle) proposal had gotten a warm welcome by the WG21 committee unfortunately they rather go with the mythical profiles approach.

Not only didn't they made it into C++26, it isn't clear what could land in C++29, this ignoring the assumptions regarding capabilities that static analysers are yet to provide nowadays.

archerx 2 days ago | parent | prev [-]

Rust exist because people have skill issues. Same deal with typescript.

rapnie 4 days ago | parent | prev | next [-]

Same 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

katzgrau 4 days ago | parent | prev | next [-]

I also (usually) go looking right away to see if the syntax makes me feel warm and fuzzy. I’m so shallow.

0x457 4 days ago | parent | prev | next [-]

Probably hiding the fact that it's whitespace significant

spooneybarger 4 days ago | parent [-]

It's not.

0x457 3 days ago | parent [-]

What is this, then? https://github.com/ponylang/ponyc/blob/main/examples/echo/ec...

__red__ 2 days ago | parent [-]

It is not whitespace signficant.

That is indented to assist the human reader, not the compiler.

0x457 2 days ago | parent [-]

so 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.

__red__ 15 hours ago | parent [-]

So you like languages that treat whitespace as syntax.

That's fine, we all have our preferences :D

FrustratedMonky 4 days ago | parent | prev | next [-]

I wish these new languages would put an elevator pitch on first page.

Why another object language?

dismalaf 4 days ago | parent | prev | next [-]

Agreed. Pony even has nice syntax. Web page is pretty bad though.

catlover76 4 days ago | parent | prev [-]

[dead]