Hacker News new | past | comments | ask | show | jobs | submit login

I have not.



They basically have PEG-kind of parser built into the language allowing you to execute arbitrary code up to modifying the parsing rules themselves.

Here's small shell dialect I made while learning it: https://gitlab.com/maxvel/red-shell-dialect/blob/master/shel...

So you can do things like

  shell/run [cat %/etc/passwd | grep {root} > myvar]
where both `cat` and `grep` can be either shell commands or Red functions and you can redirect input/output from/to variables as well as files. Also you can mixin Red data types, like in example here `%/etc/passwd` is a file instance, not a string.

Also the language itself heavily utilizes this (called Parse dialog) for example they don't have regular expressions at all, JSON is parsed using it as well, GUI system is a fully separate dialog and so on.


s/dialog/dialect/

Concept of a dialect (aka 'embedded DSL') is not tied to Parse - you can implement one with it for sure, but it's not a strict requirement.




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

Search: