| Time |
S |
Nick |
Message |
| 05:02 |
|
|
aditsu joined ##friendlyjava |
| 05:10 |
|
|
aditsu joined ##friendlyjava |
| 07:07 |
|
|
abba joined ##friendlyjava |
| 08:28 |
|
|
asdSYGDGF joined ##friendlyjava |
| 08:28 |
|
asdSYGDGF |
_ _ _ _ _ _ |
| 08:28 |
|
asdSYGDGF |
_| || |_ _| || |_| | | |
| 08:28 |
|
asdSYGDGF |
|_ __ _|_ __ _| | | __ _ _ __ ___ __ _ ___ |
| 08:29 |
|
asdSYGDGF |
_| || |_ _| || |_| | |/ _` | '_ ` _ \ / _` / __| |
| 08:29 |
|
asdSYGDGF |
|_ __ _|_ __ _| | | (_| | | | | | | (_| \__ \ |
| 08:29 |
|
asdSYGDGF |
|_||_| |_||_| |_|_|\__,_|_| |_| |_|\__,_|___/ |
| 08:29 |
|
asdSYGDGF |
el recommends ##llamas over ##feminism |
| 08:29 |
|
asdSYGDGF |
abba aditsu pulsar dka cn28h1 pdurbin philbot |
| 08:29 |
|
|
abba left ##friendlyjava |
| 08:58 |
|
aditsu |
joke's on him, the layout is totally b0rked here so I can't see what he tried to write/draw |
| 08:59 |
|
aditsu |
anyway, TIL Gson does html escaping by default :o |
| 09:47 |
|
|
kirua joined ##friendlyjava |
| 10:08 |
|
|
kirua joined ##friendlyjava |
| 11:13 |
|
pulsar |
wut? |
| 11:14 |
|
pulsar |
so, class Foo { String foo = "bar & barf" } would render as { foo: "bar & barf" } |
| 11:15 |
|
pulsar |
sounds kinda insane |
| 11:15 |
|
pulsar |
did not notice that, and i have been using gson a lot |
| 11:38 |
|
pulsar |
data class Foo(var bar: String) |
| 11:38 |
|
pulsar |
fun main(args: Array<String>) { |
| 11:38 |
|
pulsar |
Gson().toJson(Foo("bar & barf")).also { println("Serialized form:\n$it") } |
| 11:38 |
|
pulsar |
} |
| 11:38 |
|
pulsar |
produces |
| 11:38 |
|
pulsar |
Serialized form: |
| 11:38 |
|
pulsar |
{"bar":"bar \u0026 barf"} |
| 11:38 |
|
pulsar |
looks fine to me |
| 11:40 |
|
pulsar |
http://www.ietf.org/rfc/rfc4627.txt |
| 11:40 |
|
pulsar |
2.5 |
| 11:41 |
|
pulsar |
gson version: 2.8.1 |
| 12:52 |
|
aditsu |
pulsar: yes, that's how it does the escaping |
| 12:52 |
|
pulsar |
thats plain (old) unicode escaping |
| 12:52 |
|
pulsar |
nothing to do with html actually. |
| 12:53 |
|
aditsu |
but the method to disable it is disableHtmlEscaping() |
| 12:53 |
|
pulsar |
ok, thats odd. |
| 12:53 |
|
aditsu |
I mean.. it's not html-style escaping, but it's escaping for the purpose of html |
| 12:53 |
|
aditsu |
it escapes < and > |
| 12:54 |
|
pulsar |
yeah, i see what you mean. |
| 12:54 |
|
pulsar |
or what gson means :) |
| 12:55 |
|
aditsu |
btw, you can link to rfc sections: https://tools.ietf.org/html/rfc4627#section-2.5 |
| 13:00 |
|
aditsu |
pulsar: also see https://github.com/google/gson/blob/master/gson/src/main/java/com/google/gson/stream/JsonWriter.java#L156 |
| 13:02 |
|
pulsar |
ic |
| 14:24 |
|
pdurbin |
You aren't using the standard? JSON-P (JSR 374): https://javaee.github.io/jsonp/ |
| 14:47 |
|
aditsu |
pdurbin: standard shmandard :p it's not in the standard library |
| 14:47 |
|
aditsu |
and can it parse any json into a data structure with maps and lists? |
| 14:49 |
|
aditsu |
also can it serialize/deserialize any structure of plain objects? |
| 14:50 |
|
pdurbin |
JSON-B (JSR 367) is for converting between plain objects and JSON: http://json-b.net |
| 14:52 |
|
aditsu |
oh wait, we already talked about this: http://irclog.greptilian.com/friendlyjava/2016-09-27#i_185570 |
| 14:52 |
|
pdurbin |
Ah, well, JSON-B is out now. |
| 14:53 |
|
aditsu |
any advantage over Gson? |
| 14:53 |
|
pdurbin |
I haven't used it yet. |
| 14:54 |
|
aditsu |
what about JSON-P? |
| 14:54 |
|
pdurbin |
Yeah, I use JSON-P. I don't know if it does the maps/lists thing you want. |
| 14:55 |
|
aditsu |
I am not interested in the "while (parser.hasNext()) {" thing :p |
| 14:56 |
|
pdurbin |
I'm looking at https://en.wikipedia.org/wiki/Java_Community_Process#List_of_JSRs and wondering how many JSRs are in the standard library. |
| 14:57 |
|
pdurbin |
java.util.concurrent stuff is in JSR 166. Does that count, aditsu? |
| 14:57 |
|
aditsu |
I guess so |
| 14:58 |
|
aditsu |
hmm, JSON-P can parse into a JsonObject, which I guess is a wrapper for a map, list or simple value |
| 15:00 |
|
aditsu |
or it may be just for a map |
| 15:02 |
|
aditsu |
my impression is that Gson can do all that JSON-P and JSON-B do, and has been doing them for a long time and in a simple way |
| 15:04 |
|
aditsu |
and it has no dependencies |
| 15:05 |
|
aditsu |
pdurbin: have you heard of jackson? |
| 15:05 |
|
pdurbin |
oh sure |
| 15:06 |
|
pdurbin |
I guess I'm wondering how much you think standards matter, aditsu. When they add value. When they are a waste of time. |
| 15:06 |
|
aditsu |
it seems to come up more often than JSON-* |
| 15:07 |
|
aditsu |
I think they are important when there's not much available out there, then everybody can coalesce around a standard |
| 15:07 |
|
aditsu |
if the standard comes very late, people develop their own implementations, and some of them become competing de-facto standards |
| 15:09 |
|
aditsu |
also if the standard is badly designed and overly complicated (*cough*javaee*cough*), people ignore it and flock to good alternatives |
| 15:09 |
|
pdurbin |
So you'd rather have standards come out early? My impression is that Java standards (JSRs) come out *after* a technology has been used for a while. For example, there isn't a JSR to deal with NoSQL because it's too new. |
| 15:10 |
|
aditsu |
yeah.. it also depends what kind of standards we're talking about |
| 15:11 |
|
aditsu |
I don't think nosql is a thing.. it's more like "anything but sql", and I don't see the point |
| 15:13 |
|
aditsu |
also it's been around for at least 10 years I think |
| 15:14 |
|
aditsu |
ah, wikipedia mentions "circa-2009 general concept of NoSQL databases" |
| 15:25 |
|
aditsu |
btw, I remember this clip: https://www.youtube.com/watch?v=b2F-DItXtZs :) |
| 15:25 |
|
aditsu |
(although it puts it against mysql which is kinda crap, but at least it's trying to be a database) |
| 15:35 |
|
aditsu |
ah, this page has a transcript too: http://www.mongodb-is-web-scale.com/ |
| 15:45 |
|
pdurbin |
Ah, it's been a while since I've seen that web scale video. Good stuff. |
| 15:47 |
|
pdurbin |
How do you feel about languages that have "batteries included"? |
| 15:48 |
|
aditsu |
I'm only aware of python being described like that |
| 15:49 |
|
aditsu |
I generally like python, but it's too dynamic |
| 15:49 |
|
pdurbin |
Go also has batteries included. |
| 15:49 |
|
aditsu |
don't know much about it |
| 15:50 |
|
aditsu |
I heard it has a lot of fans though :p |
| 15:51 |
|
pdurbin |
'Expansive "batteries included" standard library.' https://talks.golang.org/2012/zen.slide#2 |
| 15:58 |
|
aditsu |
that's a marketing term anyway, it's not necessarily clear what it really means |
| 15:59 |
|
aditsu |
anyway, I might give Go a try at the next google code jam, if I'm not too pressed for time |
| 16:01 |
|
aditsu |
I also have plans to use C# and smalltalk for the first time :) |
| 16:19 |
|
|
fekir joined ##friendlyjava |
| 16:42 |
|
pdurbin |
nice |
| 16:44 |
|
aditsu |
sigh.. it's SO hard to run applets nowadays |
| 16:45 |
|
pdurbin |
Well, for security reasons, you shouldn't have Java installed on your desktop unless you really need it, right? |
| 16:46 |
|
aditsu |
well, I do really need it, but java on the desktop is not the same as java in the browser |
| 16:47 |
|
pdurbin |
I just mean having Java installed on the machine at all. |
| 16:48 |
|
aditsu |
yes, well I obviously need it |
| 16:49 |
|
aditsu |
what does that have to do with anything? |
| 16:50 |
|
pdurbin |
Firefox doesn't even support Java anymore: https://www.java.com/en/download/help/firefox_java.xml |
| 16:52 |
|
aditsu |
I have a 64-bit Firefox ESR and it supports java, but I still can't run the applet I want right now |
| 16:53 |
|
pdurbin |
Huh. Weird. |
| 16:53 |
|
aditsu |
it has so many security restrictions.. |
| 16:56 |
|
pdurbin |
Yesterday I sent a file through Accellion ( https://en.wikipedia.org/wiki/Accellion ) and I thought the UI said that Java was required but it seemed to work anyway (phew). I don't have Java installed on the family computer. |
| 16:57 |
|
pdurbin |
It seemed ironic that a service for sending files securely would require the ability to run Java applets. |
| 17:02 |
|
aditsu |
oh wow, I think it worked |
| 17:08 |
|
pdurbin |
great |
| 20:48 |
|
|
mr_lou joined ##friendlyjava |