« first day (1610 days earlier)      last day (3555 days later) » 
00:00 - 18:0018:00 - 00:00

crl
crl
00:03
Regex are a pain in Java, why so many things when I just want a list of matches like in JS
Matcher, Pattern, Bollocks
fge
fge
@crl it is just a different API, and regexes are not first class citizens in Java, that's all
OK, just for fun, I'm going to talk about one point of the language I have to parse to give you the extent of the problem
There is, of course, an if statement
Now, first thing: the boolean expression after the if may be surrounded by parens -- or not
But in addition: "if" is case insensitive... AND it can be abbreviated to... "i" (or "I")
@fge What might cause a postgres connection to be closed before I've done anything with it?
Possible PEBKAC detected.
fge
fge
@SecondRikudo well, from the code I saw quickly in the patch you sent, you create the connection in a try-with-resources statement
So... I let you guess what follows :p
Indeed
Hence the PEBKAC
fge
fge
OK, another fun thing; there are builtin commands. Set, for instance. It can, of course, be abbreviated (to S)
NOW, the thing is that even though it is builin, it IS NOT RESERVED
So you can write: set set = 3
Yay
I've had a good number of laughs already, and I'm not even finished :p
@SecondRikudo you shouldn't really be bothered to close it to begin with since it will be there for the lifetime of the application, right?
00:18
@fge Yup. Added a commit.
@fge What do you mean?
ERROR: relation "public.customer" does not exist
Wait what? I do have that...
@Gemtastic PEBKAC
Ignore
Although it's a weird problem
It tells me the table doesn't exist even thoughh it most clearly does
(The object in question was generated by jooq after all...)
@fge Ideas?
Caused by: org.jooq.exception.DataAccessException: SQL [select "public"."customer"."id", "public"."customer"."first_name", "public"."customer"."last_name", "public"."customer"."date_of_birth", "public"."customer"."gender", "public"."customer"."phone", "public"."customer"."email", "public"."customer"."address" from "public"."customer"]; ERROR: relation "public.customer" does not exist
fge
fge
Hmm, no... You sure you use the same JDBC URL/user/pass for both the code generator and the "live" exercise?
00:24
feels a little better about not being the only one with issues
@fge Yup. PEBKAC again.
Alright @Gemtastic intensive change incoming
@Gemtastic Alright, have a look at the PR I sent
In a bit
fge
fge
00:46
Huh
6 candidates now for maintaining json-schema-validator!
Including 3 companies
@fge Impressive
fge
fge
And I have one for JSON Patch too
@Gemtastic I'll be going soon, want to review the PR together quickly?
@SecondRikudo No hurry, I don't think I'll implement it before I send it in anyway
crl
crl
Well json is not a Java first-class citizen too
00:57
@Gemtastic It's meant to help you get stuff done better and faster, but as you wish.
(i.e. no more copy-paste)
@SecondRikudo I'm gonna have a look at what you
*have done. I will keep building this app until it's nice
fge
fge
@crl that doesn't prevent Java from being very good at handling JSON; better in fact than even JavaScript since it has no limitations for numbers for instance
Witness my JSON validation library; I can tell that 298298298309728789273987987900000 is a multiple of 29829829830972878927398798790000, JavaScript cannot :p
@crl String.matches(regex pattern)
crl
crl
didn't know JS had a limit, that sucks indeed
@SecondRikudo Also... I think that it might be considered cheating if I use too much or your code
crl
crl
00:59
@ItachiUchiha Oh right, I was looking for that
=javadoc String#matches
fge
fge
Warning, .matches() is misnamed
@ItachiUchiha boolean matches(String regex): Tells whether or not this string matches the given regular expression. (1/2)
^^ @crl there you go
@Gemtastic the code is less important, it's the concept behind it what matters
Although I supposed you're right.
Feel free to only merge it in after you hand it in (or not at all)
@fge JavaScript doesn't have schema validation of any kind
On the contrary, JavaScript in the browser will take damaged and invalid HTML, and attempt to work magic with it. It will often succeed too.
01:03
@SecondRikudo I really appreciate it out of a learning and improving part :)
@fge Do you have some time?
fge
fge
01:17
@SecondRikudo libraries exist
(for JSON Schema)
@ItachiUchiha barely; also, have you received the mail this time?
yes
that email address had a typo while creating and I never had the patience to fix it :P
coming to my question
Do you think changing the method definition of getSuccessfulMatchFragments() to getSuccessfulMatchFragments(int, int, int, textarea) is a good idea?
@fge ^^
fge
fge
01:42
Erm
No :p
Here is the issue
fge
fge
Please do note that empty matches are handled specially
you are returning List<Text> called as fragments and adding them to the textflow
in my case there is no List<Text>
What I have is only strings
and while adding them, I need to style them appropiately
fge
fge
Wait, looking
OK, well, you can turn that into a List<String>, I guess; but why would you pass the textarea to it?
Don't forget that it is in the Display and that all widgets from the Display are supposed to be visible from here
2 mins ago, by ItachiUchiha
and while adding them, I need to style them appropiately
A simple example is :
 inputTextArea.appendText(fragment);
 inputTextArea.setStyleClass(existingLength, existingLength + fragment.length(), "gray");
this makes the text fragment as grey
fge
fge
01:48
Then what? Just return a List<String> instead of a List<Text>, the length of it will always be three in the event of a success (and two in the event of a failure)
However this means that you will also need to decorate with the characters which is for now done in this method
(that is, substitute \r, \n, add the arrows/empty set)
But how will I decide the color to apply for string in the list?
fge
fge
The first element of the list will be the text already consumed (gray); the second element of the list (which MAY be empty) will be the text matched; the third will be the text not consumed
fge
fge
I was just too lazy to create a POJO :p
So it will be always a maximum of three items in it?
May be I should :P
because both before match and after match may or maynot come in the list
and it will be difficult to decide which one is absent
fge
fge
01:58
Yeah, the code is not as clean as it could be :p
Meh, it's my first foray into JavaFX, bear with me :p
Ok, cool
now I need a name for the POJO
and the name of the fields :P
fge
fge
Well, MatchFragments, and as to the fields, beforeMatch, match and afterMatch :p
Sounds good enough
You don't have a package for POJO :P
let me create something called as model
fge
fge
Why?
Just create a static inner class
The view only knows of the failed indices; it also happens to have the buffer to extract text
I see, everything is there in the class
fge
fge
02:08
Or maybe the method should be changed in the view to take a POJO as an argument instead but then don't forget to modify the tests accordingly :p
I am redeclaring the method to private MatchFragments getSuccessfulMatchFragments
and why do you want me to create a static inner class?
hi again
fge
fge
@ItachiUchiha that will be for later; I need to sleep
Ok, we can re-factor later :)
Night ^^
02:37
Ugh
I have the weirdest bugg
02:52
Hello.
In an online coding test, if there is no main method, then how will the compiler compile?
03:21
Morning Folks!
Mrng
@gem what is it?
I solved it ^^
Bt it took me 2h Q_Q
It happens
@Sword Does that even work>
in most cases it does..
I am fine and I got them right..
This answer needs more likes!
8
A: scene builder won't open

Marc Ionut StegarescuI found out that it is a bug and you have to open Scene Builder from your desktop and: File>Preferences>Reset To BuiltIn Defaults File>Open recent>clear menu

 
3 hours later…
06:35
@crl Of course. It's blatantly wrong.
If you pull up Fiddler and load the chat, it will tell you clearly what you need to auth for websockets:
POST (//chat.(domain).com/chats/(roomId)/events
      since:0
      mode:Events
      msgCount:1
      fkey:fkey().fkey)
as response 'resp1',
POST (//chat.(domain).com/ws-auth
      roomid:(roomId)
      fkey:fkey().fkey)
as response 'resp2', then on success
Websocket URL = resp2.url, with param l:resp1.time
This is Sam's script:
$.post(window.location.href.match(/^https?:\/\/[^\/]+/) + '/chats/' +
       window.location.href.match(/\d+/) + '/events', 'since=0&mode=Events&msgCount=1&fkey=' + fkey().fkey)
    .success(function (o) {
        $.post(domain + '/ws-auth', 'roomid=' + id + '&fkey=' + fkey().fkey)
            .success(function(oo) {
                var ws = new WebSocket(oo.url + '?l=' + o.time);
                ws.onmessage = function (e) {
                    console.log(e.data);
                }
            });
@XsergeiX No, it's not ok.
@subhamsoni Java compilers just compiles your class files, the presence of the main method is irrelevant. With another runtime system (with a custom class loader to load it and reflection to invoke your method, for example) it is able to test your code trivially.
@Gemtastic Meh, maybe if the self-asker fixes the horrendous formatting in their question. Or you can post an edit like that and get 2 rep.
 
2 hours later…
fge
fge
08:40
Hehe
How to create a rule for a content having recursive parens: Rule content() { return join(zeroOrMore(noneOf("()"))).using(sequence('(', content(), ')')).min(1); }
fge
fge
08:54
<-- very close to complete the parsing
09:08
@fge can you look at the changes at github.com/TheItachiUchiha/grappa-debugger/commit/…
fge
fge
@ItachiUchiha on it
Code can be crappy as I didn't find a way to compare my changes in Idea IntelliJ
<--- Confessions of a beginner with IntelliJ
fge
fge
OK, first batch of comments :p
366
Q: Jon Skeet Facts

Bill the LizardI'm looking for Chuck Norris Facts style answers. In case anyone is curious, this question was inspired by Jon's own comment to this question. EDIT: If you're into cryptography, you may enjoy these facts. Now with official sanction from the powers that be!

I just replied to one of them
09:19
@Sword olds news are always so exciting.
 
2 hours later…
fge
fge
11:35
WOOHOO
Only one file left and it's the easy one!
Ugh, I'm tired already. xD
I didn't drink any coffee today at all.
11:58
320
A: Why are static variables considered evil?

Jon SkeetStatic variables represent global state. That's hard to reason about and hard to test: if I create a new instance of an object, I can reason about its new state within tests. If I use code which is using static variables, it could be in any state - and anything could be modifying it. I could go ...

Jon Skeet has more gold tag badges than I have badges. xD
GitHub is offline for 15 minutes...
Maintaince?
I kinda like the angry unicorn :P
12:15
@fge ping!
fge
fge
Pong
@Unihedro the number of upvotes on that answer are equal to the number of downvotes by you in a week.. Strange...
Wait, "equivalent"?!
edited..
downvotes something I JUST BEAT JON SKEET IN SOMETHING!
OMG!
12:23
maybe you beat him in minecraft too..
I doubt he plays minecraft..
Nah, impossible. Every punch of his is a roundhouse kick.
And the game bends in the matrix in programmatical definition to match his requirements, then he will have the entire world in his hands.
There's no beating Jon Skeet.
maybe you could beat him in martial arts.. :\
@Sword Some magicians can walk on water, Jon Skeet can swim through land.
Good morning, Java!
Morning Jerry!
12:29
it is michael
for a moment I thought our favourite mudkip is here.. :(
@fge about the immutable class, how do you suggest me writing the getSuccessfulMatchFragments and getFailureMatchFragments? Should I declare beforeMatch, match and afterMatch strings, populate them and later use them to call the constructor?
@Sword Haha
@Michael good morning michael..
Morning! :D
I like this one: "Jon Skeet is immutable. If something's going to change, it's going to have to be the rest of the universe."
yeah
fge
fge
12:31
@ItachiUchiha yes; also, maybe separate POJOs are needed for success and failure since in the event of a failure you'll only ever get two strings; between these two is the position where the match failed
this one as well:

Q: Can Jon Skeet ask a question that even Jon Skeet can't answer?

A: Yes. And he can answer it, too.
"Jon Skeet can recite π. Backwards." lol
and this :

If Jon Skeet posts a duplicate question on StackOverflow, the original question will be closed as a duplicate.
haha
@fge I didn't get the need for separate POJO's. May be it is because of my limited knowledge to your project, but can you be please be a li'l more descriptive.
fge
fge
12:33
@ItachiUchiha an entry in the matches table contains the success status, the start index and the end index; when a match fails, the start and end index will always be the same
They MAY also be in the event of a successful match, and in this case it means "nothing else" than an empty match
(which is when I insert an "empty set" character instead of arrows surrounding the matched text)
(well, there are other elements in this table but they are irrelevant in this context)
Got it, but why does it call for a new POJO?
fge
fge
Uh?
Ah
Well, for convenience, I'd say
Now, if you don't see the need to, do as you wish ;)
I can still handle it with the fragement class we have ;)
Problem solved
btw, there is one comment, waiting for your reply
fge
fge
About the styling stuff?
Well, I had another thought about this
Since for now there is only really the need for this in the rich text area, and I do believe you can apply styles as strings, I'd just define string constants in JavafxUtils and use that instead of having a stylesheet
Provided that it's possible
Well that would be possible, but I would have to use inlinecsstextarea instead of StyleClassedTextArea
that would make things simple, though I would like to run a POC before confirming anything ;)
fge
fge
12:48
Meh, I make full use of the debugger for my work
I'm reeeally happy to have decided to write it
And my job gives me a good opportunity to develop the web version of it as well
A win win
Ok it works !
fge
fge
Screenshot?
13:05
@oratiosupport
0 tweets, 1 followers, following 1 users
Love the picture. xD Spoiler alert: I made it.
What is the alternative for a "while" loop??
for(;condition;)?
i.e keep on executing until a value is reached..
I'll experiment and see whether it works.. (My application is something different)..
thanks uni
13:07
^^ gonna create constants for them :D
@Unihedro nope did not work.. Renders it in one frame only..
fge
fge
@ItachiUchiha nice!
And when it fail?
(s)
^^ selected Text
@fge How do I do that?
fge
fge
Well, navigate the tree
THere ARE matchers which fail
I'll definitely pull it however, it looks MUCH nicer than a TextFlow, by far
Ideally I'd like... Uh... A fixed width font... But I'm not sure whether the glyphs are used will be supported :/
13:17
I can use a font for you, if it is one of the defaults, we can just load it via css. Or we can also load a tff file and use it
fge
fge
Nah, that's not necessary at the moment ;)
hi everyone - I am trying to upload big file using chunk and I am constantly getting this error -
java.io.IOException: Error writing request body to server
at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.checkError(HttpURLConnection.java:3205)
at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:3188)

things works for small files.. any help what is happening
But while we are doing it, lets do it ;)
fge
fge
Can't you just submit a PR with what you have already?
:p
(hoping you did that on a separate branch; if not it's not too late)
I always do all my changes on separate branch :)
I need to fix the FXML
fge
fge
13:20
@phenomenon.aurora without the code, do you really think you can get any sort of help?
and then submit a PR
I am doing
private HttpURLConnection connection;
outStream = connection.getOutputStream();
doStream = new DataOutputStream(outStream);
...
while (chunk ...){
doStream.write(toWrite, 0, toWrite.length); // here is the problem
doStream.flush();
I am thinking if this error is related to unable to handle the buffer by http..
13:33
is this a normal problem ?
fge
fge
No idea, sorry
@fge: k :|
@phenomenon.aurora Don't call "flush()". I think that's your problem.
When you call "flush()", it ends the HTTP connection.
@Michael: ok let me try that... but it is working for files of around 65 mb.. and chunks are transferred at 64*1024 bytes
fge
fge
@Michael really??
13:40
I mean - chunks are read 64*1024 bytes
Maybe I'm thinking of ServletOutputStream.
Anonymous
this question generated so many bad answers, except one
would you like to help me handling those ?
Anonymous
0
Q: How to convert Java String to JSON Object

NishitThis question has been asked earlier, but I am unable to figure out the error in my code from the responses to those questions. I am trying to convert a java string into json object. Here is the code: import org.json.JSONObject; //Other lines of code URL seatURL = new URL("http://freemusicarc...

fge
fge
@Joiner don't use org.json
It sucks
ANY library to handle JSON is better than org.json
Anonymous
@fge sure, i use JSON.simple
Anonymous
13:43
but maybe you prefer GSON, like any other user on the site :/
@fge Isn't that totally irrelevant?
Anonymous
@Unihedro it isn't, where we now are in (chat)
I mean, this is a moderation request [despite not posted in The Assembly]
@phenomenon.aurora Maybe the server can't handle requests that large?
@Michael
@Michael: that I have to check,
@Michael: any ways to see the error response or what went wrong with the connection...
13:46
Don't mass ping. Just saying.
@phenomenon.aurora You'd be wasting time typing the @-mention, and Michael is getting the beep three times.
@phenomenon.aurora Can you show us the full stack trace?
Never mind on the mass ping - just a mistake..:)
java.io.IOException: Error writing request body to server
at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.checkError(HttpURLConnection.java:3205)
at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:3188)
at java.io.DataOutputStream.write(DataOutputStream.java:107)
at com.vaultize.uploaderapplet.backgroundthread.UploadThreadWorker.doInBackground(UploadThreadWorker.java:180)
at com.vaultize.uploaderapplet.backgroundthread.UploadThreadWorker.doInBackground(UploadThreadWorker.java:49)
fge
fge
@Unihedro maybe so; but I am of the opinion that people using some libraries deserve to be punished, and org.json is one of these :p
@phenomenon.aurora I wonder if the server is running out of memory.
Michael: ok let me check the server activity while in upload...
13:59
The server might hold the entire request in memory before it acts upon it.
@Michael: the server top shows normal... and I missed an info... I nginx which does the loadbalancing and handling of the post.
14:21
@phenomenon.aurora What are you doing with the uploaded data? Putting it in a file?
14:32
Morning
@fge PR on
Review and comment
fge
fge
14:45
YESSS
All example files I have been give are now successfully parsed AND tokenized!
WOW!
OMG!
Very very nice! That's awesome!
fge
fge
@ItachiUchiha some of my earlier comments still haven't been addressed :p
Oops sorry, I didn't see
@ItachiUchiha can you squash and push -f?
@fge what is that?
fge
fge
(I shouldn't be doing this but...)
@ItachiUchiha oh, I thought you knew what squashing was
Are you asking me to squash commits and make them a single commit?
fge
fge
14:54
Yes
ez-vcard is now on Github! :D github.com/mangstadt/ez-vcard
Happy now? xD
Ok, git rebase -i doesn't help me
@fge need some help here
Am I supposed to type git rebase -i HEAD~2 because I want to squash my last two commits?
git reset --soft HEAD~2
git add .
git commit
well that is one way
but I want to learn about squashing
and it is good time time to practice since I have a practical scenario :P
15:06
@Sword I know how reset works
fge
fge
git rebase -i HEAD~2 is in fact what you should do
ohh; sorry then
fge
fge
Don't you see the instructions in the text file?
Or should there be a session about advanced git usage? :p
which text file?
@fge i'm in..
fge
fge
15:07
When you git rebase -i you have a list of the commits and in the comments below you have a set of instructions on how to perform
ohh yeah
but i was confused between HEAD and HEAD~2 :P
fge
fge
HEAD is the current commit you are in; HEAD~2 is two commits prior to this one
Well I know that :D
fge
fge
Anyway, there is still a better alternative ;)
and what is that?
fge
fge
15:10
Create another branch on which you perform the rebase, and rename once you are satisfied :p
A session would definitely be worth it, I believe
Because at the same time we could study git add -i
but you are busy
fge
fge
Right now I have just reached a milestone, so I can take a little pause before getting back to it :p
A pretty big milestone at that
Mine was a small one and its not completed (PR pending ) :P
So I say, lets get started :)
fge
fge
How about in 20 minutes?
I gotta leave in an hour, so if we start it in 20 mins and end it within half an hour, I am good with it :)
fge
fge
15:16
That would probably be too short
I can stretch it to 40 :P
fge
fge
And why on earth is it always the same with you? :p Each time I program a session you are either not here or have to leave soon :p
I do not know :P
I just planned an outing 15 mins ago
Why?
15:18
If I knew about this session, 15 mins ago, I would have never invited friends over
fge
fge
Ohwell, in this case it's not worth doing it now
Because there is a LOT to explain
Why would you invite friends over?
I reject guest visits aplenty :p
I apologize to everyone who are gonna miss this session today because of me
It's fine.
@fge Do I just use the reset command to squash the changes for now or are you willing to wait till we are done with the session?
<--- Needs to take a shower
fge
fge
15:24
@ItachiUchiha just squash for now; I have fetched from your remote
@fge Done :)
fge
fge
16:13
Didn't I say that I didn't want to see nulls? :p
16:40
Puh! So fat! ate a lot of food
fge
fge
@Michael yes, this means that it uses git, at last :p
17:03
Me right now:
user image
2
It's such a lovely day here. Not seen the weather this nice in ages.

I'm going to stay inside and code.
hehe pretty much the same here. Beautiful clear summer sky, some snow melting off of the ground....
17:22
Support for IDEA support!
Night!
Night
@fge Are you aware of a way to prepare a statement with a variable number of parameters in the IN clause?
@fge So you're working at LiteSolution?
fge
fge
@SecondRikudo hmm, scenario?
Because if this is for the stats of @Gemtastic's apps, an .in() is not what you want; you want column expressions instead
@fge SELECT * FROM table WHERE id IN(1, 2, 3, 4);
It's not, it's for something else
And I'm under JDBC
00:00 - 18:0018:00 - 00:00

« first day (1610 days earlier)      last day (3555 days later) »