by adityasaky on 10/24/24, 7:23 PM with 50 comments
by wahern on 10/24/24, 11:23 PM
I'll never get how merely having function names that reflect the use case, plus a stripped down or absent standard library, qualifies as a DSL. I know some people have long used "DSL" in this way, especially among LISP fans, but... I just don't get it. If I want a DSL it's because I want something that gives me, e.g., novel control flow constructs a la AWK, or highly specialized semantics a la regular expressions, that directly suit the problem domain. If I'm not getting that kind of power, why tie myself to some esoteric dependency? Either way you're adopting a tremendous maintenance burden; it better be worth your while.
I'm a huge fan of Lua and have used it for many projects in different roles, but never once thought of any particular case as having created a DSL, even when stripping the environment to just a few, well-named, self-describing functions.
I don't mean to criticize this particular project. Good code is good code. It's just the particular conceptualization (one shared by many others, to be fair) of what a "DSL" means that bugs me.
by bitexploder on 10/25/24, 1:20 AM
DSLs are such a trap for most projects that think they need them. Use lua or something off the shelf for scripting.
CEL exists for Go and (safely) solves many of the problems you might also want a DSL for.
The case for DSLs is often hard to justify in a project that has to be maintained for years.
by bezkom on 10/25/24, 1:59 PM
by Mikhail_Edoshin on 10/26/24, 8:39 AM
by wejick on 10/25/24, 12:16 PM
Or probably grule? [1] https://github.com/hyperjumptech/grule-rule-engine
by Lyngbakr on 10/24/24, 10:52 PM
> Some popular DSLs most software developers use on a regular basis include Regular Expressions for pattern matching, AWK for text transformation or Standard Query Language for interacting with databases.
Isn't it Structured Query Language? Or are both variants used?by codetrotter on 10/25/24, 2:33 AM
https://en.wikipedia.org/wiki/Lingo_(programming_language)
by allknowingfrog on 10/25/24, 2:59 PM
#!/usr/bin/env ruby
require "csv"
puts CSV.foreach(ARGV[0], headers: true).sum { _1[1].to_f }.round(2)
by ofrzeta on 10/25/24, 6:18 AM
by justinko on 10/25/24, 2:18 PM
by Alifatisk on 10/24/24, 9:55 PM
by dlock17 on 10/24/24, 8:43 PM
And where it should be used, I can't imagine you can't find a pre existing language (Cuelang maybe) instead.
I was expecting a section at the end where they demonstrate which services need a new language written just for it's configuration, but nope, just general examples.
Also, this should have a (2022) in the title.