News for hackers. Stuff that matters.
Re:We need less powerful languages by tomp on Saturday November 14, 2015 @05:33PM (#10567570)
I don't really see an issue here. Regular expressions, HTML, configuration files... these aren't programming languages, they're data languages.

They don't describe an algorithm or a behavior, they just describe data. For that purpose, it's preferable to have a format that's as simple to read, process and analyze as possible. On the other hand, actual programming languages are meant to describe an algorithm, and "power" usually means either high-level expressiveness (Scala) or low-level adaptability (C), both of which are very important in some contexts.

Re:We need less powerful languages by harveywi on Saturday November 14, 2015 @07:43PM (#10567973)
> these aren't programming languages, they're data languages.

Sounds like a job for free applicative functors, which are strictly less powerful than free monads (which you can imagine as the set of interpretable languages). From John De Goes's ScalaWorld 2015 presentation:

Free Functors: Programs that Change Values

Free Applicatives: Programs that Build Data

Free Monads: Programs that Build Programs

Re:We need less powerful languages by catnaroek on Saturday November 14, 2015 @05:36PM (#10567578)
The language of regular expressions is a programming language. It's just not Turing-complete.
Re:We need less powerful languages by mreiland on Saturday November 14, 2015 @06:02PM (#10567669)
it's a programming language in the same way that a flashing light can be a programming language. If someone on the other side is using it to make decisions then you're technically programming something so it's a "programming" language.

I mean sure, technically that's true, but it's also not interesting.

The interesting thing about regexp is that it's really damned close to the mathematical notations used for describing regular grammars, and therefore it's a good, tight way to specify pattern matches on regular grammars.

No one ever really answers with "I've been programming the regular grammar parser". Sure, maybe technically that's what they've been doing, but the context isn't really right.

Re:We need less powerful languages by catnaroek on Saturday November 14, 2015 @06:37PM (#10567792)
> it's a programming language in the same way that a flashing light can be a programming language. If someone on the other side is using it to make decisions then you're technically programming something so it's a "programming" language.

You're totally missing my point. A regular expression describes a computation - the series of state transitions a nondeterministic finite state automaton undergoes in order to decide whether an input string belongs to a language. (The fact that this computation is typically optimized by regex compilers is another matter.)

A programming language doesn't need to be general-purpose to be a programming language.

> The interesting thing about regexp is that it's really damned close to the mathematical notations used for describing regular grammars, and therefore it's a good, tight way to specify pattern matches on regular grammars.

Are you saying that what matters most about a language is its surface syntax? Seriously? Wow.

Re:We need less powerful languages by mreiland on Saturday November 14, 2015 @07:10PM (#10567875)
> A regular expression describes a computation

So does the flashing light, it also has the cool advantage of being parameterized by time.

> Are you saying that what matters most about a language is its surface syntax? Seriously? Wow.

If that's what you took from that then there's a knowledge gap and it will do us no good to continue this conversation.

Re:We need less powerful languages by unfamiliar on Saturday November 14, 2015 @06:39PM (#10567800)
Did you just miss the section where he demonstrates the claim for Python? To see more examples of how more "power" can give you difficulties with optimisation, maintainability, backwards compatibility, etc, all you have to do is look at C++.