|
|
# ? Sep 13, 2013 20:31 |
|
|
# ? May 13, 2024 05:37 |
|
NOTinuyasha posted:protobuf: if i add values to an existing enum will it break the protocol or will old versions just set the enum to default if an unknown value is encountered? i would guess default but i havent encountered this (i designed my protocol correctly the first time )
|
# ? Sep 13, 2013 21:03 |
|
NOTinuyasha posted:protobuf: if i add values to an existing enum will it break the protocol or will old versions just set the enum to default if an unknown value is encountered? I would expect it to just keep the numeric value of the enum and it just won't equal any symbolic name accessible in the old versions. edit: confirmed this is what the Go protobuf stuff does. the enum wire type is just a varint anyway so leterip fucked around with this message at 21:43 on Sep 13, 2013 |
# ? Sep 13, 2013 21:36 |
|
leterip posted:I would expect it to just keep the numeric value of the enum and it just won't equal any symbolic name accessible in the old versions. my understanding is that it goes to the default if your language can force things to an enum type, this is why you should always do enum Butts { UNKNOWN = 0; BALLS = 1; DICKS = 2; } so you always know when you have wacky data
|
# ? Sep 14, 2013 18:47 |
|
gently caress the single-space-after-sentence police: http://www.heracliteanriver.com/?p=324
|
# ? Sep 14, 2013 20:33 |
|
(we don't have a font thread no mo' )
|
# ? Sep 14, 2013 20:33 |
|
NOTinuyasha posted:protobuf: if i add values to an existing enum will it break the protocol or will old versions just set the enum to default if an unknown value is encountered? according to the spec: "You can do this very simply by adding an enum to your message definition - a field with an enum type can only have one of a specified set of constants as its value (if you try to provide a different value, the parser will treat it like an unknown field)." so it'll treat it like it's not present, therefore default value Bloody posted:(i designed my protocol correctly the first time ) congratulations on either designing dead software or underspecifying your protocol
|
# ? Sep 14, 2013 20:54 |
|
Cocoa Crispies posted:according to the spec: "You can do this very simply by adding an enum to your message definition - a field with an enum type can only have one of a specified set of constants as its value (if you try to provide a different value, the parser will treat it like an unknown field)." lolll do they not have conformance tests or something. might as well just roll your own lovely binary protocol
|
# ? Sep 14, 2013 20:58 |
|
Nomnom Cookie posted:lolll do they not have conformance tests or something. might as well just roll your own lovely binary protocol it's a construction kit for binary serializers that lets you add fields and not break outdated deserializers that don't know about them having a default is part of that
|
# ? Sep 14, 2013 21:07 |
|
and go's implementation doesn't handle it properly, therefore loll doesnt it have conformance tests
|
# ? Sep 14, 2013 21:09 |
|
Nomnom Cookie posted:and go's implementation doesn't handle it properly, therefore loll doesnt it have conformance tests lol so does beefcake in ruby Ruby code:
*files bug*
|
# ? Sep 14, 2013 21:14 |
|
Cocoa Crispies posted:congratulations on either designing dead software or underspecifying your protocol nope it works wonderfully
|
# ? Sep 14, 2013 21:15 |
|
Otto Skorzeny posted:gently caress the single-space-after-sentence police: http://www.heracliteanriver.com/?p=324 nice! first typographers get duped by publishers wanting to cut costs. they turn their backs on centuries of their own history and adopt the techinical limitations of the 60's to stay relevant. in doing so they got owned by computers once. now with ubiquitous computing capable of any any imaginable typesetting conventions they would get owned by computers again, if people actually cared that much about typesetting. what a profession
|
# ? Sep 14, 2013 21:16 |
|
Max Facetime posted:nice! first typographers get duped by publishers wanting to cut costs. they turn their backs on centuries of their own history and adopt the techinical limitations of the 60's to stay relevant. in doing so they got owned by computers once. now with ubiquitous computing capable of any any imaginable typesetting conventions they would get owned by computers again, if people actually cared that much about typesetting. what a profession
|
# ? Sep 14, 2013 21:25 |
|
Max Facetime posted:nice! first typographers get duped by publishers wanting to cut costs. they turn their backs on centuries of their own history and adopt the techinical limitations of the 60's to stay relevant. in doing so they got owned by computers once. now with ubiquitous computing capable of any any imaginable typesetting conventions they would get owned by computers again, if people actually cared that much about typesetting. what a profession owned, good ſir
|
# ? Sep 14, 2013 21:28 |
|
less presses > worthless ~~standards~~ who gives a poo poo about keyboard jockeys
|
# ? Sep 14, 2013 23:21 |
|
Shinku ABOOKEN posted:less presses > worthless ~~standards~~ this. it's a formatting issue. add some code or a stylesheet or whatever the gently caress if you want ". " to look like ". "
|
# ? Sep 14, 2013 23:40 |
|
Otto Skorzeny posted:gently caress the single-space-after-sentence police: http://www.heracliteanriver.com/?p=324 two spaces after periods is a clear sign of advanced syphilis
|
# ? Sep 15, 2013 01:11 |
|
as is indenting code with tabs
|
# ? Sep 15, 2013 01:49 |
|
two spaces after periods just looks uglier and harder to read.
|
# ? Sep 15, 2013 05:35 |
|
it wouldn't be if you had robot eyes
|
# ? Sep 15, 2013 06:15 |
|
i imagine it would be slightly easier to parse english if 'end of sentence' token was the ever so slightly less ambiguous period double-space
|
# ? Sep 15, 2013 06:16 |
|
Nomnom Cookie posted:as is indenting code with tabs gently caress you+eat poo poo
|
# ? Sep 15, 2013 08:35 |
|
Cocoa Crispies posted:congratulations on either designing dead software or underspecifying your protocol i dunno if you were using http you could use content-negociation to allow newer clients to get a new format while still supporting legacy ones since i was using a website as an api, i just added more forms and links on it and old clients didn't break
|
# ? Sep 15, 2013 10:33 |
|
tef posted:if you were using http you could use content-negociation is this an actual thing that exists and not just one apache plugin zipping the server's response if there's an Accept-Encoding: gzip, deflate header? because when a web application firewall can just plop down some tables and divs between html and head tags I'm having some doubts: HTML code:
|
# ? Sep 15, 2013 12:39 |
|
uG posted:i imagine it would be slightly easier to parse english if 'end of sentence' token was the ever so slightly less ambiguous period double-space You don't know true pain until you have to tokenize CJKV.
|
# ? Sep 15, 2013 13:59 |
|
tef posted:i dunno if you were using http you could use content-negociation to allow newer clients to get a new format while still supporting legacy ones protobuffs is optimized for size and backwards/forwards compat, and requiring users of it to implement negotiation goes against that
|
# ? Sep 15, 2013 14:35 |
|
Meiwaku posted:You don't know true pain until you have to tokenize CJKV. chinese word segmentation makes a fun campfire horror story
|
# ? Sep 15, 2013 16:18 |
|
tef posted:chinese word segmentation makes a fun campfire horror story Ill light the fire, you get the flashlight
|
# ? Sep 15, 2013 17:03 |
|
tef posted:chinese word segmentation makes a fun campfire horror story seems like a good time for a consultant
|
# ? Sep 15, 2013 17:36 |
|
tef posted:i dunno if you were using http you could use content-negociation to allow newer clients to get a new format while still supporting legacy ones yes the normal way to change service message formats is to version them instead of replacing them to maintain backwards compatibility.
|
# ? Sep 15, 2013 17:59 |
|
the version was in the header all along!
|
# ? Sep 15, 2013 20:16 |
|
tef posted:the version was in the header all along!
|
# ? Sep 15, 2013 21:12 |
|
Cocoa Crispies posted:according to the spec: "You can do this very simply by adding an enum to your message definition - a field with an enum type can only have one of a specified set of constants as its value (if you try to provide a different value, the parser will treat it like an unknown field)." thank you this is a good answer Nomnom Cookie posted:and go's implementation doesn't handle it properly, therefore loll doesnt it have conformance tests Cocoa Crispies posted:lol so does beefcake in ruby oh god i have to test it beforehand anyway
|
# ? Sep 15, 2013 23:25 |
|
http://aem1k.com/world/ christ
|
# ? Sep 15, 2013 23:28 |
|
tef posted:the version was in the header all along! yes you and the client can decide on a custom header to use for version information
|
# ? Sep 15, 2013 23:29 |
|
altho usually just using a different base url is easier
|
# ? Sep 15, 2013 23:32 |
|
or you can even put it in the message itself! no need for any reconfiguration from the client's view
|
# ? Sep 15, 2013 23:32 |
|
Accept: application/vnd.shaggar; version=2 Content-Type: application/vnd.shaggar; version=3 or something
|
# ? Sep 15, 2013 23:35 |
|
|
# ? May 13, 2024 05:37 |
|
well yes I suppose you could abuse an existing field
|
# ? Sep 15, 2013 23:36 |