Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
DimpledChad
May 14, 2002
Rigging elections since '87.
xml vs json is the most boring argument ever, i am just trying soooooo hard and i just can't even care




okay SOAP vs XML-RPC vs RESSSSSSSST go

Adbot
ADBOT LOVES YOU

tef
May 30, 2004

-> some l-system crap ->
go back about 250 pages or so

Bloody
Mar 3, 2013

tef posted:

go back about 250 pages or so

this but applied to anything ever in this thread

power botton
Nov 2, 2011

xml-rpc is cool cause you can use it to manage rtorrent

tef
May 30, 2004

-> some l-system crap ->

DimpledChad posted:

okay SOAP vs XML-RPC vs RESSSSSSSST go

the first one is the second system effect of the second one, which is what happens when you let a hack become a standard

the latter is an architectural style :confused:

suffix
Jul 27, 2013

Wheeee!

Shaggar posted:

Microsoft had to write a json schema system to make it work for configs. its so stupid and pointless.

xml had its decade. now every single format must be based on json
(which is why netflix made an encrypted message protocol based on ferrying around base64 encoded data in json)
thus ushering in a new era of intercompatibility, and solving the serialization problem forever.

Brain Candy
May 18, 2006

MononcQc posted:

What I'm saying is I'd have preferred something binary that could be defined as well as XML is (not that Schemas are all super amazing good when people write their own anyway), so that you would get that serialization format you want, except it's not dumb XML, it doesn't need escaping, it doesn't need to be this lovely verbose, even if it forces people to stop using their dark age tools in the first place that you seem to hate so much.

The only reason "human readable" formats like JSON and XML exist is that all freaking text editors and the toolchains around them can only represent text and hardly anything more complex without requiring a loving development suite to be installed that in the worst case will do nothing but syntax highlight your bullshit document, and in the best case will display some form for you to fill it in with strings.

Hell, software like wireshark can decode binary protocols spanning multiple concurrent streams and make sense out of them better than 99% of moronic text editors will be able to read (or god forbid reindent) xml or JSON without getting confused in some way (reminder: many editors apparently still poo poo themselves when a wild BOM appears).

I'm just generally unhappy with the state of things, and it feels that the longer "human-readable" is synonymous with "it's representable as an ASCII string to be modified by hand", the longer it will remain really loving lovely.

I mean in the general case, Shaggar, you advocate not editing XML by hand. It would be far better if the same tools you use to edit XML yielded a much more compact and efficient format in the first place.

once you've had to unpack zipped XML blobs from a 'binary' stream the idea that somehow people would Do It Right if they just used a binary format loses it's luster

Stringent
Dec 22, 2004


image text goes here

Brain Candy posted:

once you've had to unpack zipped XML blobs from a 'binary' stream the idea that somehow people would Do It Right if they just used a binary format loses it's luster

hehe

b0lt
Apr 29, 2005

DimpledChad posted:

xml vs json is the most boring argument ever, i am just trying soooooo hard and i just can't even care




okay SOAP vs XML-RPC vs RESSSSSSSST go

corba

Sauer
Sep 13, 2005

Socialize Everything!
why do both of the major open source C++ compilers support nearly all of C++11 and most of C++14 but microsoft can't even offer constexpr yet? I just want to use auto for lambda parameters mr. nadella, while also enjoying a bitching IDE and debugger, is that too much to ask for? I tried that clang-cl doohicky and it worked pretty great up until I needed to completely disable exceptions for it to work. that's not terribly helpful.

Bloody
Mar 3, 2013

is that the clang thing in vs 2015 ive been hearin g about?

Arcsech
Aug 5, 2008

Bloody posted:

is that the clang thing in vs 2015 ive been hearin g about?

Nope clang in vs2015 is so that you can compile junk for Android and ios from visual studio because that's a thing people want to do apparently

Sauer
Sep 13, 2005

Socialize Everything!
nah it just some version of clang built to use the same compiler flags that ms's compiler uses. supposed to be able to use it as a drop in replacement in visual studio. it does do that but it doesn't support certain poo poo you might want, like exceptions.

it would be pretty great if ms threw away cl.exe and just used clang in their next version of visual studio. let a bunch of nerds keep your compiler current for you at no cost.

Sauer fucked around with this message at 03:33 on Nov 14, 2014

necrotic
Aug 2, 2005
I owe my brother big time for this!

suffix posted:

xml had its decade. now every single format must be based on json
(which is why netflix made an encrypted message protocol based on ferrying around base64 encoded data in json)
thus ushering in a new era of intercompatibility, and solving the serialization problem forever.

Also we now have json hyper schema, which is basically soap for json.

pseudorandom name
May 6, 2007

Sauer posted:

why do both of the major open source C++ compilers support nearly all of C++11 and most of C++14 but microsoft can't even offer constexpr yet? I just want to use auto for lambda parameters mr. nadella, while also enjoying a bitching IDE and debugger, is that too much to ask for? I tried that clang-cl doohicky and it worked pretty great up until I needed to completely disable exceptions for it to work. that's not terribly helpful.

IIRC, rjmccall (being a clang dev who talks to Microsoft devs at secret club meetings or something) explained here previously that while the Microsoft compiler backend is state of the art, the frontend is a marketing-driven barely functioning creeping horror show.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
The entire MSVC front-end team just got up and left to Apple, apparently.

Notorious b.s.d.
Jan 25, 2003

by Reene

MononcQc posted:

What I'm saying is I'd have preferred something binary that could be defined as well as XML is (not that Schemas are all super amazing good when people write their own anyway), so that you would get that serialization format you want, except it's not dumb XML, it doesn't need escaping, it doesn't need to be this lovely verbose, even if it forces people to stop using their dark age tools in the first place that you seem to hate so much.

The only reason "human readable" formats like JSON and XML exist is that all freaking text editors and the toolchains around them can only represent text and hardly anything more complex without requiring a loving development suite to be installed that in the worst case will do nothing but syntax highlight your bullshit document, and in the best case will display some form for you to fill it in with strings.

ironically XML and SGML came from failed negotiations about binary formats

we have these human-unfriendly "human readable" formats because smart, well-intentioned people could reach no compromise, much less consensus, on the valuable properties of a binary format

everyone could agree on what was important about a document format, so we have a well-specified meta-format for documents. xml has many aesthetic defects but its standard is the living triumph of the possible over the perfect

raminasi
Jan 25, 2005

a last drink with no ice

pseudorandom name posted:

IIRC, rjmccall (being a clang dev who talks to Microsoft devs at secret club meetings or something) explained here previously that while the Microsoft compiler backend is state of the art, the frontend is a marketing-driven barely functioning creeping horror show.

my favorite fact about the terrible frontend is that it's so bad that visual studio uses an entirely different, third-party one for intellisense

Notorious b.s.d.
Jan 25, 2003

by Reene

orphean posted:

if your xml parser doesn't pay attention to namespaces and schemas what the hell is it doing? just parsing out the literal text?
let's not make it uncomfortable. it's not so much a parser as a 500 line method applying regexes to an ascii string filled with < and > chars

this is the short reason for why xml is dead: children playing with toys could not be arsed to implement a standard fully

orphean posted:

integers, doubles, string, booleans, etc etc are all defined in http://www.w3.org/2001/XMLSchema which is like the base schema for doing anything

yeah go figure that the standard is useful

next thing you know, they'll be letting us define our own types for use in our own documents. sheesh it will be anarchy. how do i validate a thing that contains subtypes!?!???!!

pseudorandom name
May 6, 2007

GrumpyDoctor posted:

my favorite fact about the terrible frontend is that it's so bad that visual studio uses an entirely different, third-party one for intellisense

my favorite fact about the terrible frontend is that it will accept any sequence of tokens in a template body as long as it never gets instantiated

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

pseudorandom name posted:

IIRC, rjmccall (being a clang dev who talks to Microsoft devs at secret club meetings or something) explained here previously that while the Microsoft compiler backend is state of the art, the frontend is a marketing-driven barely functioning creeping horror show.

there was a period of something like 10 years when basically nothing happened in c++. c++98 was a huge effort. c++03 had a few minor fixes and some editorial cleanup. people kept proposing a bunch of sweeping and adventurous language proposals like modules and concepts, but most gradually went nowhere. a few major changes like move semantics enjoyed widespread agreement, but the committee dithered about their details forever. the x in c++0x was supposed to be like 7, but nobody was pushing to actually release a standard. it wasn't until like 2009 that the committee finally woke up and realized that they hadn't made a feature release in over a decade. the c++ committee's still got a lot of dysfunction which we all love to complain about in our secret compiler dev club meetings, but the commitment they've made to issuing regular updates puts them lightyears ahead of where they were for most of the 2000s

meanwhile, while microsoft was and now continues to be pretty committed to c++, in the late 90s / early 2000s they also started earnestly pursuing like a thousand different language technologies. they did a ton of work on java, they made the clr and wrote several new languages to go with it, they reconsidered basically every api in the system for .net, they threw a massive amount of effort at longhorn, they made like a dozen different scripting environments, they even eventually got serious about javascript, you get the idea

in other words, if you were a c++ compiler developer at microsoft in the early 2000s, you could participate in an exciting and technically interesting new project of great importance to the company and its developers and be commensurately rewarded by your managers and peers ooooorrrrrrrrrrr you could continue to be a c++ compiler developer at microsoft doing, i dunno, ports to armv4 to support pocket pc or something. which doesn't even require any significant new work on the frontend

my understanding is that a lot of things have gotten better since about 2010, but there was a very long period of time when nobody on that team understood a drat thing about the semantic analysis engine or really even the parser and the only way they knew how to implement new features was to manufacture token sequences that approximated the code they wanted

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

rjmccall posted:

but instead member pointers can point to members of subclasses (you have to use static_cast, but it's allowed and defined to work), so those optimizations are bullshit. and you can reinterpret_cast member pointers to member pointers with a completely unrelated class type and back again (as long as you don't cross the function/object line), so those optimizations are bullshit. and you can have member pointers of incomplete class type, and they have to have a consistent representation, so those optimizations are bullshit

what's inside a clang member function pointer? how big are they, what are the hidden fields? is it documented anywhere, like does it come from that common ABI shared by clang and gcc?

Sauer posted:

nah it just some version of clang built to use the same compiler flags that ms's compiler uses. supposed to be able to use it as a drop in replacement in visual studio. it does do that but it doesn't support certain poo poo you might want, like exceptions.

rjmccall, does this mean Windows-compatible exceptions are coming to llvm like ever? I think I promised I'd look into it myself like a year ago, but then I looked at the clang sources and it seemed incredibly complicated and way beyond my skills. my understanding is that Windows-compatible exceptions will require changes even to llvm, because llvm assumes Unwind ABI semantics

should I bother trying to make sense of it some day, or do I just sit back and let the big boys go at it?

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

pseudorandom name posted:

IIRC, rjmccall (being a clang dev who talks to Microsoft devs at secret club meetings or something) explained here previously that while the Microsoft compiler backend is state of the art, the frontend is a marketing-driven barely functioning creeping horror show.

without being in the secret treehouse club, you can probably already tell by the loads of half-baked, half-abandoned features the front-end has. off the top of my head:
  • extensible, code-generating attributes. used among others for automatically generating ATL boilerplate IIRC, I see no reason for this except inescapable vendor lock-in for users of ATL
  • .NET-like multicast events. this was so clearly bolted on top of the front-end that there's even a command line switch to dump the auto-generated code
  • #import <type library> to translate a COM type library to a C++ header with convenience wrappers. this can be already done with MIDL (minus the convenience wrappers), but MIDL comes free with the Windows SDK, who would miss this opportunity to provide vendor lock-inadded value to users of Visual Studio?
  • C++/CLI, one of my favorite language extensions ever, but very clearly a second-class citizen, buggy, neglected and rapidly approaching an expiration date

hackbunny fucked around with this message at 11:45 on Nov 14, 2014

MononcQc
May 29, 2007

Notorious b.s.d. posted:

let's not make it uncomfortable. it's not so much a parser as a 500 line method applying regexes to an ascii string filled with < and > chars

this is the short reason for why xml is dead: children playing with toys could not be arsed to implement a standard fully


I'm still confused as to why version 1.1 of XML (2nd edition) was published 2 years prior to version 1.0 of XML (5th edition).

Then again, Tim Bray was in there, and we've had 3 different versions of HTTP/1.1 existing concurrently, so why not 7 of XML.

Sapozhnik
Jan 2, 2005

Nap Ghost
what happens if you call/cc something and that something never invokes the continuation passed to it but just returns normally?

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

the continuation can be stored and invoked later, if I understand what you're asking, so it doesn't need to be synchronous with return to the caller.

Notorious b.s.d.
Jan 25, 2003

by Reene

Subjunctive posted:

the continuation can be stored and invoked later, if I understand what you're asking, so it doesn't need to be synchronous with return to the caller.

that part is obvious, but what happens when it passes out of scope?

is it GCed like other objects?

Notorious b.s.d.
Jan 25, 2003

by Reene

MononcQc posted:

I'm still confused as to why version 1.1 of XML (2nd edition) was published 2 years prior to version 1.0 of XML (5th edition).

1.0 was published in '98
1.1 was published in '04

the fifth edition is the 5th revision of the 1.0 standard, not the 5th version of xml

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Notorious b.s.d. posted:

that part is obvious, but what happens when it passes out of scope?

is it GCed like other objects?

yeah

gonadic io
Feb 16, 2011

>>=

Mr Dog posted:

what happens if you call/cc something and that something never invokes the continuation passed to it but just returns normally?

this halts the evaluation

Shaggar
Apr 26, 2006
Probation
Can't post for 4 hours!

Mr Dog posted:

what happens if you call/cc something and that something never invokes the continuation passed to it but just returns normally?

if it returns a continuation u can wait for it or let it go. if it doesn't do anything w/ the continuation no matter what I think that's probably called a bug? but idk this stinks of monads.

Cybernetic Vermin
Apr 18, 2005

Notorious b.s.d. posted:

that part is obvious, but what happens when it passes out of scope?

is it GCed like other objects?

yeah, this kind of thing is sort of a standard pattern in fact, so it'll be expected and likely optimized for

MononcQc
May 29, 2007

Notorious b.s.d. posted:

1.0 was published in '98
1.1 was published in '04

the fifth edition is the 5th revision of the 1.0 standard, not the 5th version of xml

Yeah but the first to third revisions of other protocols (say HTTP/1.1) also had behavorial changes that came with the precisions, because implementations in the wild took and used different interpretations of the standard to work prior to them.

This always came as a problem because when a given behaviour is made more precise, it usually invalidates existing implementations' work, without ever taking the implementations out of circulation nor the responsibility from making poo poo work for your customers.

I know that in the proxy code I maintain, there's at least 3 distinct versions of HTTP/1.1 at work, including some specific cases for HTTP/1.0 backwards compatibility (which were at least partially specified in many or some of the 1.1 spec).

It's loving dumb that when people fix their idiot protocols, they just keep piling on bullshit rather than properly versioning them up. People in the real world away from the standard committees just end up mashing all your loving revisions into one partially working malleable version that in the end cannot exactly be strict to any of the minor ones because it has to try and support all of them without being able to identify them.

It's a great way to ensure that the first, second, and third version of your 1.1 protocol will need fourth 1.1 version too, and possibly a fifth one later.

I loving hate it.

MononcQc
May 29, 2007

Fun example to try with your favorite XML parser.

code:
<vxml xmlns="http://www.w3.org/2001/vxml"xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"xsi:schemaLocation="http://www.w3.org/2001/vxmlhttp://www.w3.org/TR/voicexml20/vxml.xsd"
version="2.0">
<test id="1234">Test XML</test>
</vxml>
Does this parse? If it does, your parser does not respect the XML 1.1 specification.

Relevant grammar sections:

code:
[3]   S   ::=   (#x20 | #x9 | #xD | #xA)+
[40]   STag   ::=   '<' Name (S Attribute)* S? '>'
[41]   Attribute   ::=    Name Eq AttValue
Important bit: (S Attribute)*. Attribute should never follow another Attribute without a whitespace to precede it.

The grammar is the same in XML 1.0, and HTML5 also forbids that kind of stuff.

As far as I've seen reported, the W3C parser/validator itself, the PHP parser, and some Java parser (according to a mailing list post) support the broken form. Erlang's parser doesn't. SWI Prolog's parser (again, I'm taking this from a ML post with Richard O'Keefe in it) will allow it with special flags provided.

Thank you Postel and lovely versioning of protocols, for the living nightmare we've got.

Dicky B
Mar 23, 2004

xml suits my needs

Sapozhnik
Jan 2, 2005

Nap Ghost

AlsoD posted:

this halts the evaluation

right, this is what i was asking. the call/cc'ed function is expected to terminate by invoking the continuation. if it returns instead, then what does it return control to?

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror

i don't think i'll ever understand the attitude a lot of computer people have that you should just throw your hands up and break when there's a tiny flaw in the input

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror
like if you hired a janitor and told him to clean the bathroom with lysol and you came back and found out he didn't do poo poo cause you only had generic store-brand cleaner you would fire that rear end in a top hat

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

Mr Dog posted:

right, this is what i was asking. the call/cc'ed function is expected to terminate by invoking the continuation. if it returns instead, then what does it return control to?

the caller of call/cc, same as if you invoked the continuation. if the continuation is spend-once, this invalidates it, but many call/cc implementations aren't spend-once, although doing that efficiently means fundamentally abandoning the normal idea of a stack

Adbot
ADBOT LOVES YOU

Arcsech
Aug 5, 2008

Tiny Bug Child posted:

i don't think i'll ever understand the attitude a lot of computer people have that you should just throw your hands up and break when there's a tiny flaw in the input

its important when doing the wrong thing is worse than setting off alarms and doing nothing

see also: industrial equipment, financial and medial software, etc

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply