Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

We independently reinvented an adaptation of this algorithm for Monte's "simple" quasiliteral, which does simple string interpolation and matching. The code at https://github.com/monte-language/typhon/blob/master/mast/pr... is somewhat similar in appearance and structure to the examples in the post.

  def name := "Hackernews"
  # greeting == "Hi Hackernews!"
  def greeting := `Hi $name!`
  # language == "Lojban"
  def `@language is awesome` := "Lojban is awesome"
A quirk of our presentation is that adjacent zero-or-more patterns degenerate, with each subsequent pattern matching the empty string. This mirrors the observation in the post that some systems can coalesce adjacent stars without changing the semantics:

  # one == "", two == "cool"
  def `adjacent @one@two patterns` := "adjacent cool patterns"


hey BuuQu9hu, your comment started out as [dead] for some reason. You may have been inadvertently hellbanned.


...hellbanned?


Being (silently) hidden so that your posts look okay to you but don't show up for others (unless they have 'show dead' set to on).

It's an effective filtering mechanism, but some consider it rather cruel and try to notify posters about it.


False positives suck. There are people coming on here day after day, posting valuable or at least worthy comments, and nobody can see them. They waste their time unknowingly. It is cruel.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: