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
Shaggar
Apr 26, 2006
web services is unrelated to web "development"

Adbot
ADBOT LOVES YOU

Notorious b.s.d.
Jan 25, 2003

by Reene
if everything in your application and everything your application communicates with are all under your control and written for a single loving platform

yeah, go buck wild. write your own serialiser that formats all data as ascii dicks

i don't care, any god drat thing will work. it's the degenerate case

Notorious b.s.d.
Jan 25, 2003

by Reene
xml solves a lot of hard problems, and if you don't understand why xml is good, it means you haven't figured out the problems yet

Posting Principle
Dec 10, 2011

by Ralp

Java code:
String accept = request.getHeader("accept");
if (accept != null && accept.contains("xml")) {
	throw new HTTPException(HttpServletResponse.SC_NOT_ACCEPTABLE);
}

X-BUM-RAIDER-X
May 7, 2008
trigger warning for people who do not know what a web service is

double riveting
Jul 5, 2013

look at them go
sorry i'm not keeping track, but didn't w3c or whoever decide that xhtml was a dumb idea?

Zlodo
Nov 25, 2006

Notorious b.s.d. posted:

xml solves a lot of hard problems, and if you don't understand why xml is good, it means you haven't figured out the problems yet

i still dont see how it is such help with interoperability when you are allowed to just shove data haphazardly in it or could perfectly get away with writing an adhoc parser that could break if you do as much as inserting a tag somewhere

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

double riveting posted:

sorry i'm not keeping track, but didn't w3c or whoever decide that xhtml was a dumb idea?

it said that tags had to be lower-case instead of upper-case, which was all it took to get me to endorse it :thumbsup:

Shaggar
Apr 26, 2006

Zlodo posted:

i still dont see how it is such help with interoperability when you are allowed to just shove data haphazardly in it or could perfectly get away with writing an adhoc parser that could break if you do as much as inserting a tag somewhere

you cant get away with writing an adhoc parser and the entire point of xml is it prevents you from shoving in data haphazardly.

Zlodo
Nov 25, 2006

Shaggar posted:

you cant get away with writing an adhoc parser and the entire point of xml is it prevents you from shoving in data haphazardly.

no, it doesnt, because you can shove data in an xml file without defining a schema which is what most people do in my experience

and i dont see what guarantees you have that people who consume your data will actually use your schema and not just write some adhoc parser that doesnt care about anything in your format that is not yet used (and which will break their parser when it is some time down the line)

Shaggar
Apr 26, 2006
i don't care about how they consume my well formed xml and i wouldn't accept non-well formed xml. the point is they can do it the right way and doing it the right way is easy if you aren't using lovely tools (and also easier than doing it any other way). with every other serialization format there is no right way

X-BUM-RAIDER-X
May 7, 2008
Zlodo perhaps you should leave the forums for a while and come back once you've caught up on what a "standard" is

X-BUM-RAIDER-X fucked around with this message at 20:32 on Sep 23, 2013

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

Soricidus posted:

a format that's deliberately designed not to scale? sounds good to me

How so?

Also I don't see what problems xml is solving that protobuf hasn't also solved but better.

Zlodo
Nov 25, 2006

OBAMA BIN LinkedIn posted:

Zlodo perhaps you should leave the forums for a while and come back once you've caught up on what a "standard" is

yeah, it is a standard. yeah, you can avoid pitfalls when using it if people respect a standardized way to use it. yes, you can build a standard on top of it.
it has nothing to do with whether it is poo poo or not. perhaps you could say its serviceable poo poo? there's lot of serviceable poo poo such as p-langs, but they're poo poo nonetheless

X-BUM-RAIDER-X
May 7, 2008

Zlodo posted:

yeah, it is a standard. yeah, you can avoid pitfalls when using it if people respect a standardized way to use it. yes, you can build a standard on top of it.
it has nothing to do with whether it is poo poo or not. perhaps you could say its serviceable poo poo? there's lot of serviceable poo poo such as p-langs, but they're poo poo nonetheless

the point of a standard is that you can verify that the stuff your library is writing conforms to what another thing expects which also uses the same standard, while completely ignoring non standard poo poo that peasants fire to your service because it's bad and poo poo. XML and SOAP have these standards. Json has nothing of the sort.

MononcQc
May 29, 2007

It's just a very much relaxed standard (E: do you count RFCs as standards? I guess so?)

Brain Candy
May 18, 2006

Notorious b.s.d. posted:

xml solves a lot of hard problems, and if you don't understand why xml is good, it means you haven't figured out the problems yet

Brain Candy
May 18, 2006

i looked at the 8 page RFC for JSON. i looked at the errata too

http://www.ietf.org/rfc/rfc4627.txt?number=4627 posted:

A JSON text can be safely passed into JavaScript's eval() function
(which compiles and executes a string) if all the characters not
enclosed in strings are in the set of characters that form JSON
tokens. This can be quickly determined in JavaScript with two
regular expressions and calls to the test and replace methods.

var my_JSON_object = !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(
text.replace(/"(\\.|[^"\\])*"/g, ''))) &&
eval('(' + text + ')');

ahahahahhahahah

X-BUM-RAIDER-X
May 7, 2008

Brain Candy posted:

i looked at the 8 page RFC for JSON. i looked at the errata too


ahahahahhahahah

Notorious b.s.d.
Jan 25, 2003

by Reene

MononcQc posted:

It's just a very much relaxed standard (E: do you count RFCs as standards? I guess so?)

RFCs are the perfect example of why real standards issued by committees are so great

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Brain Candy posted:

i looked at the 8 page RFC for JSON. i looked at the errata too


ahahahahhahahah

the comedy stylings of douglas crockford. he legitimately believes that's a safe way of evaluating json

Soricidus
Oct 21, 2010
freedom-hating statist shill

Hard NOP Life posted:

How so?

Also I don't see what problems xml is solving that protobuf hasn't also solved but better.
"Protocol Buffers are not designed to handle large messages. As a general rule of thumb, if you are dealing in messages larger than a megabyte each, it may be time to consider an alternate strategy."

"Protocol Buffers do not include any built-in support for large data sets."

"If you want to write multiple messages to a single file or stream, it is up to you to keep track of where one message ends and the next begins. The Protocol Buffer wire format is not self-delimiting, so protocol buffer parsers cannot determine where a message ends on their own."

in other words, protobufs are intended for sending short messages over the internet. they do that pretty well, but that's all they're good for. if you need to handle non-trivial quantities of data, you'd have to invent your own proprietary file format that maybe uses protobufs internally to store chunks of data (and then you still have to worry about whether those chunks might hit the size limit).

alternatively you could just get over your irrational fear of angle brackets and use xml.

tef
May 30, 2004

-> some l-system crap ->

Brain Candy posted:

i looked at the 8 page RFC for JSON. i looked at the errata too


ahahahahhahahah



read the bit about unicode

quote:


To escape an extended character that is not in the Basic Multilingual
Plane, the character is represented as a twelve-character sequence,
encoding the UTF-16 surrogate pair. So, for example, a string
containing only the G clef character (U+1D11E) may be represented as
"\uD834\uDD1E".


and of course we all know that json isn't a subset of javascript, right?

Nomnom Cookie
Aug 30, 2009



So is array() a JSON list or a JSON object?

double sulk
Jul 2, 2010

xml is fine and better than a lot of programming related things out there

Shaggar
Apr 26, 2006

Nomnom Cookie posted:

So is array() a JSON list or a JSON object?

yes

Nomnom Cookie
Aug 30, 2009




i need a response from tiny bug tef

double sulk
Jul 2, 2010

json is ok when you are only using it for document store, for example when you are utilizing the sheer power of mongodb in order to reach web scale.

Brain Candy
May 18, 2006

tef posted:

read the bit about unicode


and of course we all know that json isn't a subset of javascript, right?

i went in expecting unicode literals, was not disappointed

Vanadium
Jan 8, 2005

I just don't get how the rust people manage to get stuff done when the language can't even have multiple non-const pointers to the same object without requiring the GC (or refcounting since they don't have a GC yet, afaik), and the type checker has the weirdest notion of pointer lifetime (like here https://github.com/mozilla/rust/issues/6613) so basically anything gets you "hold on there's too many pointers to this thing already" errors.

Yet they have a somewhat working browser engine

they must be wizards

Bloody
Mar 3, 2013

Soricidus posted:

"Protocol Buffers are not designed to handle large messages. As a general rule of thumb, if you are dealing in messages larger than a megabyte each, it may be time to consider an alternate strategy."

"Protocol Buffers do not include any built-in support for large data sets."

"If you want to write multiple messages to a single file or stream, it is up to you to keep track of where one message ends and the next begins. The Protocol Buffer wire format is not self-delimiting, so protocol buffer parsers cannot determine where a message ends on their own."

in other words, protobufs are intended for sending short messages over the internet. they do that pretty well, but that's all they're good for. if you need to handle non-trivial quantities of data, you'd have to invent your own proprietary file format that maybe uses protobufs internally to store chunks of data (and then you still have to worry about whether those chunks might hit the size limit).

alternatively you could just get over your irrational fear of angle brackets and use xml.

this is funny because im using gigabyte+ protobufs in a project

double sulk
Jul 2, 2010

thanks tim for installing a default postgres or some poo poo making it a pita to work with until you add localhost and install postgres.app

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

gucci void main posted:

thanks tim for installing a default postgres or some poo poo making it a pita to work with until you add localhost and install postgres.app

brew postgres works4me

double sulk
Jul 2, 2010

Malcolm XML posted:

brew postgres works4me

dunno, something got hosed and it wasn't tracking the psql until i installed postgres.app. apparently it's not an uncommon issue? idk

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

gucci void main posted:

dunno, something got hosed and it wasn't tracking the psql until i installed postgres.app. apparently it's not an uncommon issue? idk

did it move to brazil without telling you in advance

Brain Candy
May 18, 2006

Bloody posted:

this is funny because im using gigabyte+ protobufs in a project

clearly it's impossible to use protobuffs by themselves. i'm guessing you encode each message into the filesystem like /foo/v4/bar/fartz/seg192131 that way you have all the coherent data under /foo/v4/bar.

Soricidus
Oct 21, 2010
freedom-hating statist shill

Bloody posted:

this is funny
holy poo poo

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

Bloody posted:

this is funny because im using gigabyte+ protobufs in a project

God drat, I use megabyte+ regularly but Jesus Christ a gigabyte is just :eyepop:

Also I don't know what the big deal is about not being able to send multiple protos back to back, you can just nest them inside of a repeated field of another message and problem solved.


Soricidus posted:

alternatively you could just get over your irrational fear of angle brackets and use xml.
It's not a fear, the performance and overhead are too much for our apps. Yes we do send a lot of small < 50k messages over the internet and it fit our needs way better than the stupid hand rolled binary format they were doing before.

MrMoo
Sep 14, 2000

Soricidus posted:

"If you want to write multiple messages to a single file or stream, it is up to you to keep track of where one message ends and the next begins. The Protocol Buffer wire format is not self-delimiting, so protocol buffer parsers cannot determine where a message ends on their own."

The C# API does though and you have to write your own code to match it in other languages.

Managed a 6GB compressed protobuf today :woop:

Adbot
ADBOT LOVES YOU

Nomnom Cookie
Aug 30, 2009



Non-standard extensions, what a great idea.

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