I hate new DUB config format

Idan Arye via Digitalmars-d digitalmars-d at puremagic.com
Wed Dec 2 12:45:33 PST 2015


On Wednesday, 2 December 2015 at 16:15:04 UTC, Nick Sabalausky 
wrote:
> On 11/25/2015 06:53 AM, Suliman wrote:
>>> I find the SDLang format much cleaner to use than JSON
>> But it's dead format! Nobody do not use it. JSON easy to read, 
>> there is
>> a lot of it's checkers and formating tools.
>>
>> Yes, it's not perfect, but now it's _standard_. Personally I'd 
>> prefer
>> yaml, because it's much easier to read for humans.
>>
>> But what we will do with SDL? Who know how to parse, validate 
>> it with D,
>> and with another language? Even ini is better, because 
>> everybody know it.
>>
>
> This whole debate is completely moronic.
>
> 1. With DUB, which format is "default" means next to nothing.
>
> 2. I don't know where in the world you've gotten the idea you 
> can no longer just copy-paste deps. That's patently BS.
>
> 3. SDLang is fucking trivial. Any programmer worth at least 
> half their salt (ie anyone here, including you) could've 
> learned it in same time you've already spent bellyaching about 
> it.
>
> 4. Fuck "standard/popular/common". Seriously, fuck it. That 
> sort of bullshit nonsense attitude is EXACTLY why half our 
> industry is as completely fucked as it is with complete and 
> total shit like PHP, JS, Node, JVM, Angular, JS Toolkit 
> #five-billion-and-one, gaudy metro colors, meaningless 
> hieroglyphs, walled gardens, web pages with near-zero content 
> just empty space and screen-sized images with a quick slogan or 
> two, text entry boxes that are *literally* slower than a 
> goddamn Apple II, etc, etc etc... Seriously, enough of this 
> goddamn "fashion before engineering" bullshit. That load of 
> crap is why I'm right on the verge of completely jumping ship 
> from what's left of this goddamn industry. If we start pulling 
> that shit as a matter of course here too, I'm fucking gone, 
> good riddance.

The issue is not with humans reading and writing SDLang files - 
like you said, the syntax is not hard, and besides - the default 
should be enough for most of the basic learning projects one can 
make, so by the time you actually need to edit dub.sdl you should 
know enough D to not be learning two things at once.

No - the problem is with making tools(IDEs/editor 
plugins/scripts) parse and emit it. Yes, computers can read&write 
SDLang files - but you need to find a library(or write one 
yourself) that fits your language of choice.


I, for example, have a Ruby script that creates small DUB 
projects for me when I want to test stuff. Since usually I want 
to interact with small parts of the huge application, I need to 
do some specific configuration on the DUB project file so I have 
my Ruby script load it with it's JSON module, perform the 
necessary changes, and save over the original file.

Back then, when DUB moved to SDLang, obviously my script crashed 
because `dub init` now creates SDLang config files by default. 
This can be changed, but I thought I would go with the flow and 
modify my script to edit the SDLang file. I'm always eager to 
test new technologies(not adapt - test. I want to experience them 
before I decide whether to adapt them or not).

So, the first step was to google for a Ruby Gem that deals with 
SDLang. Should be easy, right? Wrong! Neither "Ruby SDL" nor 
"Ruby SDLang" yielded any relevant results(at least not in the 
first pages of google), and only recently, when this thread 
started and I decided to attempt again, I figured out you need to 
search for "Ruby Simple Declarative Language". Or to use 
rubygems.org's search engine. But that doesn't matter - back then 
I couldn't find it so instead just set my script to run `dub 
init` with `--format=json`, and now I no longer feel motivated to 
convert my script to use SDLang...


If you try to push a new technology, and when people complain 
about problems of that technology your reply is that they can 
simply use the better alternative instead - well, if you think 
this is good for the ecosystem let me tell you about a project 
called Tango...


More information about the Digitalmars-d mailing list