Live data from Hacker News

The Red Programming Language

red-lang.org

91–100 of 135 posts

Re: The Red Programming Language

#91

I know asciidoc from red and erlang, it's a nice language. Not sure why it is not as popular as markdown.

There aren't many parser libraries for languages other than ruby. Its Ruby implementation, Asciidoctor, is considered as the reference implementation. However, it's being standardized and the situation will hopefully improve.

Re: The Red Programming Language

#92
post #9
post #7

This 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…

> I have no idea how the 'parser'[1] works

I think parsing there depends on the actual value of the current token. So if you assign send to another variable and use that the "parser" will still recognize that it takes 2 parameters.

It's an interesting design, definitely not something one sees frequently.

Re: The Red Programming Language

#93

Languages that encourage making DSLs are a two-edged sword. On the one hand, you get to make a language that is more clear and fine-tuned to your use-case. On the other, you have an ad-hoc language with no support that you have to maintain along with the documentation (considering that you can't expect anyone else to know the DSL ahead of time). As I've gotten older, I've determined that well-designed APIs in a well-…

Even DSLs of huge and successful projects are more often than not bad. As a rule if you think that you can create a better query language than SQL, please spare us. JQL, Elastic Query DSL, KQL... Don't.

Re: The Red Programming Language

#94

Languages that encourage making DSLs are a two-edged sword. On the one hand, you get to make a language that is more clear and fine-tuned to your use-case. On the other, you have an ad-hoc language with no support that you have to maintain along with the documentation (considering that you can't expect anyone else to know the DSL ahead of time). As I've gotten older, I've determined that well-designed APIs in a well-…

I've come to hate DSLs. With rare exception, almost every DSL has become a brittle subset of the parent language.

Sometimes you want a specific limited subset of the parent language, especially when you don't want to expose a huge possibility space to non technical users. Exposing only a limited subset can also be helpful to sandbox for security reasons.

Re: The Red Programming Language

#95
post #87
post #54

Earlier quoted context omitted.

Interesting, that at least explains why this happens a little bit. https://i.imgur.com/a/phd4lVr

Holy nanny state. The authors of a language have thought about using cryptocurrency, so it's flagged as a phishing and scam site? Literally 1984.

It gives you a way to proceed anyway, and is opt-in, and not run by any government. How is that “nanny state”? Also, given that it doesn’t torture and murder people, it’s not quite 1984 either.

Re: The Red Programming Language

#96
Maybe it's just bias based on what I'm familiar with but I don't really like the syntax, or at least I can't understand any of it intuitively. Looking at the few examples I can find, it doesn't appear to be obvious without having to look at and interpret a bunch of surrounding context for clues to what a particular token is, e.g. a function name, a variable, an argument to a function and what function it is an argument to, the type of a variable, a value being assigned to it, etc. I see a lot of lines of code that are just several strings in a row without any sort of punctuation.

Re: The Red Programming Language

#97
post #23

When I look at a programming language site, especially for a "new" language, I want a quick way to navigate to a reasonably sized decent code sample, ideally documented, showing off significant language features, idiomatic syntax and usage patterns etc... Sites which do this well (just from the top of my head): https://odin-lang.org/ immediate code sample visible "See the Full Demo" "See More Examples" https://ziglan…

They used to promise that proper docs and everything would come when the language reaches 1.0. That was 7 years ago. The language is at version 0.6.6 today, and the state of docs is the same as 7 (and 10) years ago.

There are at best two people working on the language, and they both don't have the time and have a very weird approach to docs (like posting extensive google docs or pastebin explanations, but never actually having any proper documentation)

Re: The Red Programming Language

#98

Languages that encourage making DSLs are a two-edged sword. On the one hand, you get to make a language that is more clear and fine-tuned to your use-case. On the other, you have an ad-hoc language with no support that you have to maintain along with the documentation (considering that you can't expect anyone else to know the DSL ahead of time). As I've gotten older, I've determined that well-designed APIs in a well-…

It has been interesting to watch the Clojure community’s take on DSLs over time. Clojure is a Lisp, and Lisps are notorious for inventing DSLs, particularly after PG’s various papers promoted that as a superpower of sorts. Clojure has gone the other direction and, while it supports macros, it generally discourages their use unless you’ve tried everything else first. But it still encourages DSLs built from the native Clojure data structures. So, for instance Hiccup for HTML generation.

Re: The Red Programming Language

#99
post #86

Languages that encourage making DSLs are a two-edged sword. On the one hand, you get to make a language that is more clear and fine-tuned to your use-case. On the other, you have an ad-hoc language with no support that you have to maintain along with the documentation (considering that you can't expect anyone else to know the DSL ahead of time). As I've gotten older, I've determined that well-designed APIs in a well-…

this is a very important lesson. I remember the frustration of dealing with the Gradle and whatever was the name of the DSL used by Fastlane. Gradle especially kept changing so documentation was never really useful and there was zero help from the tooling

I've run the same frustration road.

And at least the last time I used it in anger (which was, granted, perhaps double digit years ago), the docs started out with and loudly proclaimed "here's how you write your own tasks!" Wait, what? I want to have a build system do at least the 80% case with minimal/zero work; why am I jumping right in to my bespoke needs?

Not sure if this was just bad doc, or the tool actually didn't do the 80% very well then or what, but it's stuck with me.

Re: The Red Programming Language

#100
post #35

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

Or in Rebol/Red it's Parse, a dialect (DSL) that comes with the language - https://www.rebol.com/docs/core23/rebolcore-15.html
Post reply on HN