« first day (3385 days earlier)      last day (1788 days later) » 

Hmmm seems I hit a nerve with saying that JSON is widely used....
we do all our apis in JSON
I agree it's widely used
@DaveS there is no difference between: "key":0 and "key": "0", the parsing of both would be valid
@IvanMilisavljevic I already have that one but wanna generate all of em at once
actually there is
"0" is a string and 0 is an int
19:01
That's the parser job to decide + developers data model
no it's the actual definition
if you want to convert a string to an int you can
but strings MUST be in quotes
numbers do not
Ignore me. I misread that.
@DaveS who's gonna tell that? There is no XSD
the syntax
When you retrieve that json payload, it's a string
19:03
it's the same type inference javascript does
it's actually a sequence of bytes
and all your code is just a string
but you have a SYNTAX
||> typeof JSON.parse('{"foo": "0"}').foo
@JBis "string" Logged: ``
It's hard to argue on mobile :D
||> typeof JSON.parse('{"foo": 0}').foo
@JBis "number" Logged: ``
19:04
its different @Mehdi
> A value can be a string in double quotes, or a number, or true or false or null, or an object or an array. These structures can be nested.
I love you Mehdi but you're so wrong on this
I will be home in 10min XD
the payload is encoded as a string
Are you SOing and driving?
but that doesn't mean JSON doesn't have types
he's in Germany, likely on the train
or something
19:06
he's taking the cable car to his private castle in the alps
Don't be @Mauker
@DaveS I know, but no one is stopping your client from sending an int 0 when you expect "0" and the parsing would still be valid
not in JSON.org's java package
it would throw an exception
you have to code a parser to break from the definition to do it
|| poll close
A poll is already open for this room. Use || vote [choice] to vote and || vote to see options: How often, in years, on average, do you switch places of employment?
Poll Closed: How often, in years, on average, do you switch places of employment?
Results: 5-8: 2 | 1 - 3: 1 | 3 - 5: 0 | 10-15: 0 | Never changed: 0
19:08
just because you can code a parser to not break doesn't mean it's right
should a zip code be an int or a string (varvhar)?
@DaveS it's just a Hashmap[string, object] in that package, you as a developer will make it fail when inferring
I got a fucking headache
@JBis in JS it's different, "JavaScript Object Notation" it's an actual object there
19:10
JSON is json
> getString
public java.lang.String getString(java.lang.String key)
throws JSONException

Get the string associated with a key.

Parameters:
key - A key string.
Returns:
A string which is the value.
Throws:
JSONException - if there is no string value for the key.
The key
keys are typeless (strings)
values have types
Still 7min to arrive
I am flabbergasted that this argument is happening
19:12
I think Mehdi is trying to make a different point but doesn't know how to communicate it
lol indeed
i have to say it @JBis i really like this bot
All I said was that I was surprised lots of languages don't have better JSON support. lol
19:17
yeah you had to open the JSON can of worms
Did anyone else get this when searching on the Googs?
> Success! You've managed to infiltrate Commander Lambda's evil organization, and finally earned yourself an entry-level position as a Minion on her space station. From here, you just might be able to subvert her plans to use the LAMBCHOP doomsday device to destroy Bunny Planet. Problem is, Minions are the lowest of the low in the Lambda hierarchy. Better buck up and get working, or you'll never make it to the top...
I think you've been hacked cM
Then it has some coding challenge
I think it's a christmas egg
Now I forgot what I was searching for though
do you see what I mean when I say that it's the dev's responsibility to enforce a type?
@Mehdi what point are you trying to make?
19:19
@Mehdi every Object in java can be handled as a Generic Object, are you telling me then that the children classes don't really exist?
Psshh, "christmas egg"? C'mon, everyone knows Jesus can't lay eggs, that's only rabbits.
@IvanMilisavljevic yay :D thanks!
@CarlAnderson that there is no contract per se regarding the data types, it's up to the recipient to do it his way, unlike in the XML world when you usually have an XSD (schema definition that makes an XML valid or not - business wise)
> that there is no contract per se regarding the data types
that's where you're wrong
the contract is in the definition of the syntax of the values
you could apply that same logic to XML and parse it incorrectly if you want
but it would be breaking the contract
what if I do getInt for val = "0", would that throw me an exception?
19:22
in that package yes
in JavaScript it would make the object a string value unless you cast it
Integer.parseInt(object.toString()); (github.com/stleary/JSON-java/blob/master/JSONObject.java#L749) this one would be perfectly valid
parseInt is not getInt
check the name of the method
parsing a String to an Int doesn't make that String an Int
Tim
Tim
Ahhh my eyes, all this nerd talk
19:24
XD
but I still get an int Dave, even though my cobol system only accepts strings because in 0.001% of cases I will get a "two" but now I'm lucky I got a "2"
so If I, a developer, make a mistake of expecting the wrong type, as long as the parser agrees for that specific payload I'm testing with, I'm good
having a parser that makes reasonable assumptions to reduce errors doesn't mean the definition doesn't have clear types
you could write a parser that ignored the type field and tried to parse an xml string value as int
the parser doesn't rely on me as a developer to figure out things, It does it from the XSD schema
It's the same thing
19:27
Anyone used GraphQL? It's kind of cool how it uses schemas, but JSON is still used for transferring data.
you don't need to figure it out Mehdi, the definition states "0" is a string
it's clear
what is the definition?
but if you call getInt the parser helps you not fuck up
Tim
Tim
I used graphql, hate it with a passion
Looks like I started a serious discussion 😯
19:28
@Tim haha why is that?
there is no "contract" like in XML, or like a WSDL with SOAP
What are you guys arguing about?
Tim
Tim
because it is ass to work with
there is a contract it's just not burdensome by being unnecessarily explicit
Tim
Tim
on android
19:29
@RaghavSood Mehdi is trying to argue JSON doesn't have types
even though there are some efforts to introduce a WSDL like for REST (don't remember the name) cc @raghav - what's the name of that API doc thing the cool kids use nowadays?
openapi?
yes
I think I'm going to make a game.
I need to get more juul pods brb
19:30
JSON doesn't do the types you're used to in languages
I wish JSON allowed comments
It's just strings, numbers, bool, or null
but they ARE types
@DaveS If i don't use a parser along with some parser specifics such as Json to POJO or something, I'm free (just like org.json btw)
And numbers means no real float support
19:31
primitives everywhere!
@Tim I see. It's kind of weird because GraphQL is just a standard and then there's just a bunch of libraries trying to implement it. I imagine it's pretty inconsistent across platforms.
You can do exponential notation etc., but not the traditional IEEE floats we're used to
@CarlAnderson But you don't think that we should comment our code
a type is just a way of telling you how to interpret the data, JSON has that
Well... Maybe i should say a poorly defined standard. ha
19:32
at the end of the day they are bytes that could be converted in any number of ways if you want to ignore the definition
it applies to any sequence of bytes, JSON, XML etc
so I don't see your point
   JSON can represent four primitive types (strings, numbers, booleans,
   and null) and two structured types (objects and arrays).
When in doubt, read the RFC
^ types
@codeMagic true
But it spells out the limitations of each type
19:32
I don't know how to make my point go across XD
it's easier to work with yes
@Mehdi it's true.
it's easier to ignore the contract, yes
lol, Carl
but they have types
19:33
GraphQL has its usecases
Quite useful for... graph-y stuff
Not so useful for signing in users into an Android app (usually)
@DaveS yes, the contract is what you (client) decide to parse your json on
So it's very much one sided
I feel like I've been lied to on the nature of the argument
Doesn't look like Mehdi is denying the existence of types in JSON
More like denying their strictness
i.e., "1" == 1 in Mehdi-world
Exactly that
Which, given it is JavaScript Object Notation, is not necessarily a bad approach
Tim
Tim
@Mehdi just tell yourself that they are not intelligent enough to understand your arguments
19:36
It's a bad approach to life, but not to JSON
it's a similar argument to saying "Well your CSV parser won't work if the data has no commas !!!"
@Tim XD
@CarlAnderson Sure it will, you'll just get everything in the first output index of your array/list :D
@CarlAnderson CSV is a terrible schema
But CSV is not a schema :(
19:37
Data format*
Mobile again, not fast enough XD
199 ribbit
If it makes you feel any better, Mehdi, we also encode all our numbers as strings in JSON payloads
@RaghavSood I get confused where the line is drawn between GraphQL and the GraphQL-client I use. haha. But it is quite nice for caching data and then pulling in more fields later, since you can specify what you want.
Encoding them as numbers led to a ton of parsing differences across different languages when they were coerced into the nearest native type
So now we just use strings and parse the strings into the local BigDecimal equivalent
and it's the exact reason why we mainly convert most of data types, csv - json to parquet in data processing to avoid all that stuff
back to laptop, it's always fun and interesting to argue with nerds about technical stuff :D
@twiz you started it :D
19:41
@Mehdi I know, but I still have no idea how. haha
I don't even remember how either XD
Anyone know of a good tool to create graphics for a pitch deck?
@Mehdi I know you don't have time to add but I am going to request it anyway. Can you make a way to search stars?
Basic stuff like comparison tables, small graphs (literal CS graphs of a network, not that stats nonsense)
I just said I was surprised languages didn't have better support for JSON for how widely used it is. Was not expecting that to turn into a hour long argument. lol
19:42
uhhh... powerpoint?
You can search stars on SO directly
Just enter your search term, then filter by the starred tab
oh you want the graphics themselves
IDEK
@CarlAnderson Looking for something a bit prettier, and powerpoint seems to take issues with some of the stuff I'm trying to draw - can't seem to convince it to lay things out as I need them
I'm a developer, I only know fortawesome.github.io/Font-Awesome/icons
@RaghavSood cool
19:45
the management of SO is probably worried now: oh look, people are happy, they've been talking about tech for a complete hour now, let's make another drama
oh wow, you're right
699
Q: Firing Community Managers: Stack Exchange is not interested in cooperating with the community, is it?

Anton MenshovLess than a month ago, there was some settling of the incident with firing Monica. It's obvious that there was not a lot of approval from the community on the course of action chosen by SE, or the settlement. Today, we are seeing a new wave of SE actions targeted on work with the community: firi...

@Mehdi you could do the same thing in XML if you wanted, so it's not really a difference between the two
wow so much nerd talk
Is this all still about the lady who they think said something offensive or whatever in the hell it was??
Tim
Tim
that was the event that opened the can of shit
19:50
That's kind of like saying "is this Impeachment still about corruption in Ukraine?"
Yeah what Tim said
the can of shit kept getting more and stinkier poop, but it was at least sealed
then that incident opened it up for everyone to smell
@DaveS you could, but the normal flow is to abide by the "schema component" XSD, so the flow is usually, XML -> XSD validation -> XSLT to transform the payload -> XSD for validating the transformation -> client receives a valid and the expected payload
it's the same for JSON, the normal flow is to treat all values in quotes as Strings
and by this point people are realizing it's not a can at all, it's actually a sewer drain
just a constant stream of sewage
Tim
Tim
and the can is also opened on the other side and SE management just keeps shitting in it
19:52
hahahaha
lmao exactly, their toilets connect to the sewer
They decided they want to be in waste management
I love how to the CEO comes in after a couple months of working here during which all the controversies went down and goes "Hey everyone! SO is such a great place and I love the community. I'm looking to make SO an even better place! How do you suggest we do it?!"
@DaveS did you read the new CEO blog post? stackoverflow.blog/2020/01/21/…
I skimmed it then downvoted it, then decided I don't care enough, undid the downvote and closed the tab
Tim
Tim
19:54
I didn't read it at all and downvoted it
because fuck him
not a single comment posted (or accepted by the blog moderators) on that post even 24h later
The CEO blog post sounds like its more oriented to investors rather than the community
also everyone ignore this, but @carl and @adam sorry about earlier. I get very very angry and frustrated from smells and sounds.. I let that get the best of me, combined with being sick. Left the office to WFH and thought about it, cooled down, and I agree with what you said. Whether or not it's relevant at all, was unnecessary for a public chatroom
@Mehdi it's all here
ooh, I didn't see that one !!
19:55
@Tim hahaha lord's work
oo what'd i miss bb and carl
Tim
Tim
it's embarrasing that his post has a positive score
nothing important, JBis, just some poor phrasing.
@CarlAnderson just like school I gotta maintain that 70% average, heh
19:57
:D
@Tim how come his meta rep didn't change after so many upvotes? does his profile not abide by the rules of SE? :D
All of those bullet points are like an investment presentation
Sounds like hes on shark tank
Tim
Tim
meta SO rep is a mirror of main site
@Mehdi They probably learned once Sara nips got downvoted into the negatives
to each their learnings eh :D
Tim
Tim
19:59
this guy would have had 1 rep if not for the free association bonus
"hey guys this is your new leader speaking.. So uhh yah.. what is this place?"
hmm interesting
all his rep is from workplace lol

« first day (3385 days earlier)      last day (1788 days later) »