Earlier quoted context omitted.
Even without the new spiffs, I still don't see the point of DSLs. From where I sit, I see exactly zero problems where I think that new syntax is what I need to be able to write a solution.
Regex
The Red Programming Language
41–50 of 135 posts
Re: The Red Programming Language
#42Earlier quoted context omitted.
There are plenty of places where it makes more sense to use DSLs (or where they’re flat-out required). SQL and regex both spring to mind. Pretty much any HTML templating language is simpler to use than concatenation a bunch of strings together. JSX is usually easier read than directly calling React functions directly. A line of a shell script can be much nicer (and more portable) than 20 lines of a more general purpo…
Most people think of DSLs as a language you can create within a language . All the things you named are either entire languages themselves like HTML, SQL, and the shell family, or formal extensions of existing languages like JSX. A DSL would be something you could create inside JS tagged literals or Ruby.
Re: The Red Programming Language
#43Re: The Red Programming Language
#44Earlier quoted context omitted.
"In 1988, Sassenrath left Silicon Valley for the mountains of Ukiah valley, 2 hours north of San Francisco. From there he founded multimedia technology companies such as Pantaray, American Multimedia, and VideoStream. He also implemented the Logo programming language for the Amiga, managed the software OS development for CDTV, one of the first CD-ROM TV set-top boxes, and wrote the OS for Viscorp Ed, one of the first…
Right? And I think that's what keeps bringing me back to REBOL, and thus Red. They don't appeal to me on the face of them. Like, the code examples look interesting but in a "magical" kind of way that strikes a little bit of fear into my engineering heart. But with that kind of pedigree, I can't dismiss the ideas. If Sassenrath came up with it, I bet there's a kernel of awesomeness inside.
Re: The Red Programming Language
#45 red-lang.org is blocked!
Phantom believes this website is malicious and unsafe to use.
This site has been flagged as part of a community-maintained database of known phishing websites and scams. If you believe the site has been flagged in error, please file an issue.
Ignore this warning, take me to https://www.red-lang.org/p/about.html anyway.Re: The Red Programming Language
#46This is a successor to REBOL[0], designed by Carl Sassenrath[1] who designed the Amiga kernel. I've looked it a few times over the years. It's neat. I've never written a single line of it, though. [0] https://en.wikipedia.org/wiki/Rebol [1] https://en.wikipedia.org/wiki/Carl_Sassenrath
"In 1988, Sassenrath left Silicon Valley for the mountains of Ukiah valley, 2 hours north of San Francisco. From there he founded multimedia technology companies such as Pantaray, American Multimedia, and VideoStream. He also implemented the Logo programming language for the Amiga, managed the software OS development for CDTV, one of the first CD-ROM TV set-top boxes, and wrote the OS for Viscorp Ed, one of the first…
Re: The Red Programming Language
#47Earlier quoted context omitted.
There are plenty of places where it makes more sense to use DSLs (or where they’re flat-out required). SQL and regex both spring to mind. Pretty much any HTML templating language is simpler to use than concatenation a bunch of strings together. JSX is usually easier read than directly calling React functions directly. A line of a shell script can be much nicer (and more portable) than 20 lines of a more general purpo…
Most people think of DSLs as a language you can create within a language . All the things you named are either entire languages themselves like HTML, SQL, and the shell family, or formal extensions of existing languages like JSX. A DSL would be something you could create inside JS tagged literals or Ruby.
https://martinfowler.com/books/dsl.html
https://martinfowler.com/dsl.html
Also see:
https://en.m.wikipedia.org/wiki/Domain-specific_language
including the References section.
Re: The Red Programming Language
#48Earlier quoted context omitted.
Kind of, except that a non-DSL API doesn't create any new syntax. Which means that you get to keep all sorts of quality-of-life tools like syntax highlighting and correctness checking in the editor, autoformatting, possibly some amount of linting, etc. A few years ago I revisited Racket after a long hiatus, and that was maybe the biggest thing I noticed. I really don't like syntax macros as much as I did back in the…
Even without the new spiffs, I still don't see the point of DSLs. From where I sit, I see exactly zero problems where I think that new syntax is what I need to be able to write a solution.
Standard math syntax is a DSL. I understand math a lot more quickly than I understand the same thing written in 20 lines of code.
I think the language we use to express ourselves influence the quality of the product. If your language encapsulates complexity, then you can build more complicated things.
I’m not arguing in favor of specific (“pointless”) DSLs, but there’s a nice paper about making a video editing language in Racket [1] that makes a DSL seem pretty convincing.
Re: The Red Programming Language
#49Seems the last release (alpha) was in 2015.
Re: The Red Programming Language
#50This is like the only programming language I could never learn. I just don't understand anything and I can't build any mental model of what's going on behind the hood
I wrote a paper on REBOL back in college. It is very interesting, but the syntax is definitely weird. You might think of the function call syntax as being sort of Forth-like, but with the tokens in reverse order. So like a Lisp, but without required parentheses. e.g. in the example send friend@rebol.com read http://www.cnn.com `read` knows that it takes one argument, and `send` knows that it takes two, so this ends u…
There are no keywords or statements, only expressions. Square backets ("blocks") are used for both code and data, similar to a Lisp list. The main language (called the "'do' dialect") is entirely polish notation with a single exception for infix operators: Whenever a token is consumed, check the following token for an infix operator. If it is one, also immediately consume the immediately following one to evaluate the infix operator.
This results in a few oddities / small pitfalls, but it's very consistent:
* "2 + 2 * 2" = 8 because there is no order of operations, infix operators are simply evaluated as they're seen
* "length? name < 10" errors (if "name" isn't a number) because the infix operator "<" is evaluated first to create the argument to "length?"