« first day (1616 days earlier)      last day (3328 days later) » 

1:09 PM
@SecondRikudo Actually, it went really well
 
@Gemtastic What's the job?
 
He managed to talk his boss into meeting me anyway to hire me now instead of in fall XD
@SecondRikudo Java programmer/developer
 
Dev
how cani check if a json object having json array inside it
 
@Gemtastic Nice, what do they do?
 
1:10 PM
@ItachiUchiha Nothing's for sure though. It's just a meeting. I hope it'll go well though :)
 
@Dev /\[.*?\]/
 
Dev
i tried
JSONObject gobj = obj.optJSONObject("gauges");
if (gobj.optJSONArray("contaminants")!=null) {
 
@Unihedro {"messsage": "[You fail]"}
 
?!
Oh noes! My regez skillz haz been defeated!!
 
Dev
@Unihedro can you edit my code?
 
1:11 PM
@Dev what?
 
Maybe deep recursion...
Don't double post. Or dump code. Use Pastie.org, GitHub gists or Pastebin.com, or my favourite: hastebin.com
 
ASR
hi all,
 
hi guys
 
heya everyone
 
@SecondRikudo Not sure actually. :P
 
ASR
1:13 PM
can any one explain me this logic
public static void permutation(String str) {
    permutation("", str);
}

private static void permutation(String prefix, String str) {
    int n = str.length();
    if (n == 0) System.out.println(prefix);
    else {
        for (int i = 0; i < n; i++)
            permutation(prefix + str.charAt(i), str.substring(0, i) + str.substring(i+1, n));
    }
}
 
I just know I'll get to do Java
 
@ASR Take a paper, a pencil and see what the execution flow is with a simple String, or use the debugger
 
^^ true that
 
@Gemtastic Did you ask them any questions?
 
1:15 PM
@SecondRikudo Yes and no. We were just gonna meet up so that he'd get a better feel for who he's recruiting and that his gut-feeling from talking to me online is correct.
 
Dev
@ItachiUchiha ??
 
If he's working for the company he's listed on LinkedIn, they make accounting software. Exactly what I want to work with
 
@Dev IDK
 
Dev
okay
unexpected answer :)
 
@Gemtastic I see.
Just remember that during an interview, it's not just the company that decides if they want to hire you
It's also you deciding whether you want to work for them
 
1:18 PM
@Dev It's name "gauses" in the JSON and you do .optJSONObject("gauges") is this intentional?
 
For example, 2 of the companies I interviewed for wanted me very badly, but they didn't have the notion of a version control, so I turned them down.
 
@SecondRikudo Yep. :) He gave me some advice on that too. He told me to be more confident and look after myself more.
 
Dev
@AlexisC. data is like this paste.ofcode.org/32WjrgbXaQCERSnrvAczNPB
 
To me, it seems promising just with the fact that he's working there.
 
@Gemtastic That's what I always say.
Despite what you may think, you're more talented and knowledgeable than most people your age in the field..
 
1:22 PM
^^
 
@SecondRikudo If that's true I'll be very happy. But I aim to become even better!
 
@Gemtastic Underrating yourself and striving to become better are two different things.
From what I pick up, you're somewhere between those two
 
fge
@SecondRikudo for me the problem is different
 
You need to let that feeling go. Yes, you have a lot more to learn, we all do, but you are worth more than you estimate yourself.
And don't ever forget that.
 
The company looks really proper and fancy; it has its office in the biggest mall in Gothenburg and they make a very solid product, officially working with all the Swedish banks.
@SecondRikudo Aww, now I'm blushing.
 
fge
1:25 PM
I want to be brutally honest, but...
It would hurt
 
@Gemtastic thanks :)
 
/mute
 
@fge You and I have a lot of miscommunications. I think I know what you think of me, and as I mentioned before, I hope to prove you wrong as a positive thing.
 
fge
Yes we do, now let me explain
 
@Gemtastic @fge Only when everyone is in a peaceful environment where they feel welcomed, can they have constructive debates even if they're heated and everyone learns :D
 
fge
1:28 PM
You want to have a fundamental understanding of the process; however, as I see it, you fail to want to produce code so that this process become even clearer in your head; and among others, it means that you fail to extract useful knowledge from documentation
Theory is one thing; practice is another
 
I can see exactly why you see that,
 
fge
If I told you repeatedly to read, read, and read again the manual for JooQ, it was not for nothing
But you seem to fail to practice upon that
 
But I believe, I'm beyon that hurdle now, and I have been for a couple of days.
 
fge
And no, documentation will almost NEVER go your way
You have to adapt
 
I know.
 
fge
1:29 PM
You have to struggle, you have to win over it
But you fail to do that
Sorry, but that's how I feel
 
@fge Do be fair, I think the only piece of documentation I've ever sat through and read was the W3 specs
 
My issue here is that I haven't had the time to sit down and derp about as I would have wanted. Had I had the time, I never would have asked you anything.
 
fge
On the other hand, I am very good at winning over that
 
<- feels lucky to be able to occasionally mess with trash code / code golf on mondays
 
I think it's especially something you learn and practice while getting a degree. Sitting on your ass and reading this 50 page technical document
 
1:30 PM
... you really do that???
I am impressed. I do that more... "on the fly"
 
@Vogel612 Same here.
 
Entirely self learnt, didn't get to experience the degree horror :p
 
"I need to implement X"
 
fge
@Gemtastic sorry but I disagree; as far as I can see you failed to produce a sufficient amount of personal work to take advantage of the documentation; really, that is how I see it
 
@fge Tools are nice all, and tools with good documentation are even better. But I don't use tools I don't need, and that "understanding the need" thing is missing for a lot of the developers I know
 
1:31 PM
well let's search the docs for Y which might be related
 
You're a sinner in that regard too, by the way :)
 
I like experimenting. I like reading documentation in general. But I'm a week overdue and my app is still not done. I didn't have the time to study this in the most optimal way.
 
fge
@Gemtastic yet had you done the effort I just mentioned, you'd have a much easier time in the long run
Sometimes you need to invest yourself
 
@fge I have no idea what you mean by "sufficient amount of personal work"
 
fge
ie, "too easily discouraged"
You HAVE to struggle
 
1:32 PM
@Gemtastic I think he means "work you put in yourself"
 
fge
There is no easy path
This is how I progressed
 
I've refused to use any of your (you and second) code examples apart from that util file because I want the app - flawed as it may be - to be my work.
 
fge
I never give up
 
I sense a slight miscommunication
 
fge
@Gemtastic that is probably one of your errors as well
 
1:33 PM
~cough
 
@Vogel612 I sense a more than slight miscommunication.
@fge I don't think it is.
 
I've never given up either. I spent a lot of time working with jooq when you were sleeping. Noone to ask, just me working things out.
 
:sigh:
 
@fge I consider that message crossing the line. Just FYI
 
If I had an assignment for school, I'd consider it cheating to let someone do my work for metoo.
 
1:34 PM
can we not flag stupid shit?
thanks
 
@SecondRikudo I just can't do that :/
 
^^^^
 
gg..
 
Could you guys not flag something as insignificant as that?
 
fge
@Vogel612 OK, as you see fit
 
1:35 PM
@Cerbrus Any clue what it is?
 
@Cerbrus We weren't, someone was. Move on :P
 
Invasion of high-rep users >>>
 
I was
 
ROs should be able to see flagged messages despite rep limit :[
 
Invasion of people annoyed by insignificant flags
 
1:35 PM
why would you flag something like that?
 
Like, seriously disgruntled
 
@Unihedro Get to 10k you lazy-bum
 
well.. well.. well..
 
Possibly traumatized by the popup
 
1 min ago, by Vogel612
@fge I consider that message crossing the line. Just FYI
 
1:36 PM
@SecondRikudo
 
@Vogel612 I've mentioned it a lot that I and fge has a lot of miscommunication. But bear in mind that what he's saying now is from a history of me asking for help I should have been able to figure on my own,and eventually I did, but I still asked for help. He tried to help me a lot
 
@Vogel612 Flags are for "spam or offensive"...
 
^^^^^^^^^^^^^^^^^^^^
stop annoying the network.
 
That ^
 
fge
Anyway, my view on this is simple: if people provide you with code, and you trust these people enough to procude sane code, reuse it; and if you have questions, ask the people who provide the code
 
1:36 PM
crossing the line as in: OFFENSIVE, but alas
 
@Unihedro with your motivation you should get to 10K easily :P
 
no one will ever validate your flags like that no one -- you just make people annoyed
 
I have no idea what got flagged :S
 
@fge Again, not if it's her school assignment. That would be cheating.
 
3 mins ago, by fge
@Gemtastic that is probably one of your errors as well
 
1:36 PM
@HamZa I have lots of ideas. I have even more motivation. I have lots of stuff to do. I have even more stuff I'm already doing O~o
 
That
 
@Unihedro I see
 
ah
 
Can we drop the flag thing please? Thank you
 
That is better
 
1:37 PM
Worldbuilding.se is awesome btw. xD
 
fge
<-- hides away
 
<- tries to keep the air from heating up
 
<- sips coffee
 
<- hands @Unihedro an AC-unit
 
well, I just want to make it clear that I do not consider this conversation to be mean or bad, he's just voicing his feelings. I don't think poorly of him at all. I know where he's coming from and I understand his critique
 
1:38 PM
<--- Aims the fire extinguisher towards the room
 
@Gemtastic Flags are flawed.
 
No
 
@Unihedro As am I :D
 
People flagging are (often) flawed
 
1:38 PM
One person considers it rude despite not flag worthy, the entire family and their dogs comes for a visit just to review it.
 
public flags are, we should just leave it to mod flags and kick-mute
 
@Cerbrus ^
 
Well, I agree with @second, let's drop the flag thing now. Someone put a bugger in the cookie jar, leave it be.
 
Gross
 
Indeed, so let's talk about something less gross.
 
1:39 PM
Pizza!
 
@Gemtastic @Unihedro @Cerbrus youtube.com/watch?v=eVzirQdQO3I
 
@Unihedro I can't decide if I'm hungry or stuffed XD
 
.... almost 24 hours later... its still going.
 
@rlemon ?!?!
Where can I get one? It looks awesome! xD
 
amazon
make sure it is a good seller, this is the second one I've got
first one came in two :? (UPS is a bastard)
 
1:41 PM
@rlemon I still have no idea how that works
 
Looks Amazing !
 
It made my day. xD Thanks!
 
@rlemon Classic! Reminds me a little bit about you somehow :P
 
@SecondRikudo the head gets wet, water evaporates, changes temp, causes pressure change, pulls liquid up, normalizes pressure with liquid in head, pulls forward to water to re-wet, liquid escapes because no more vacuum
repeat
 
While true do that.
 
1:42 PM
Mind = blown
 
@Gemtastic what's the status with the app anyway? Were you given an extension? An unofficial extension?
 
@Cerbrus Right?! That's awesome!!
 
@rlemon Perfecto mobile!
 
It reminds me of rube goldberg machines.
 
1:43 PM
@SecondRikudo No, nothing. I'm gonna finish it and turn it in and see what they say.
 
Technically, I can afford no grade in that course, provided it's the only one I flunk. Otherwise I'll have to pay back the student grant. I'll still graduate.
 
:S
Be careful!
 
But the school is also obligated to let me have a written exam too
 
Uh oh. Are you set for one?
 
1:45 PM
@Gemtastic Do you know of anyone else taking that?
 
@SecondRikudo Not in this course, but the last one
there were a few flunking the webb one
To me, what matters is what I've learned, and you helped me a lot on that end.
 
soo... work-life balance?
 
I mean, hashing passwords isn't something we'll learn until september
But I still have them hashed in my db :D
 
1:59 PM
can anyone advise on how I should build a graph in Java? I'm parsing locations in from an XML and storing the location ID and name in a map, someone suggested a 2d array would be a good idea, any thoughts?
 
fge
@BrianJ define "graph"
Is it directed? Is it cyclic?
 
directed
player goes from start to finish
not an undirected one
I have the parsing working and storing the id/location name map, just stuck at building the actual graph
 
fge
Hold on
The player is not part of the graph, right?
For two nodes A and B in that graph, some player P1 may go from A to B while some other player P2 may go from B to A
Therefore your grap is NOT directed
You have vertices (A -> B and B -> A) both ways
What matters is the vertices
 
@fge nope the player just specifies the direction, eg move South
they can't go back by design, only to the next location
which makes it directed
should be easy to wire up, but I'm not sure where to start
do I need to create a graph class or something?
 
crl
class Node{
    String id;
    Node next;
}
 
2:12 PM
@BrianJ Well you can have a basic class a Vertex has a Set of Edges
 
Make next a collection on Nodes and it probably suits
 
And an edge goes from one vertex to another as its directed
@fge Isn't that you that were writing a parsing library?
 
so this is my base class for the location, thinking of modifying it to create the graph
what do you guys think?
I'm using the name "location" instead of nodes
 
fge
@AlexisC. you mean grappa?
 
@fge Ah yes that were that
 
2:16 PM
@AlexisC. Their library has been completed for a while now...
#define while long time
 
@Unihedro This was just out of curiosity
 
:p
 
@fge Was searching if you have by chance defined a MIME grammar
god those RFCs are just horrible to read
 
fge
@AlexisC. what do you mean by "MIME grammar"? A grammar to parser MIME types?
 
@fge Basically yes, I'm creating a MIME Parser
 
2:19 PM
still not sure how I should build the actual graph from my map values..my location class is shown above, I think I need methods in the to set the edges?
 
fge
Hold on, that's an entirely different matter
 
okay, how so?
 
fge
2:44 PM
@BrianJ I was talking to @AlexisC. here
 
okay no probs
I'll look into this problem a bit more, am I on the right lines at least?
 
@fge Well a MIME Message follows a certain structure right? So it has a grammar
If only SO was in french that would makes things more simple to explain ^^
nvm
 
fge
@AlexisC. well, je suis français, mais bon
 
@fge I know but....
 
fge
@AlexisC. we could talk more about that on some other medium -- IRC for instance
@AlexisC. join #grappa on FreeNode
I'm the owner of the channel
 
2:52 PM
I'm in
 
 
2 hours later…
5:18 PM
@Gemtastic have you worked with intellij in a web project yet?
 
fge
5:59 PM
yawn
 
 
1 hour later…
fge
7:03 PM
YAY
Successfully used MethodHandle to grab the rule I need
Woohoo
 
crl
7:29 PM
How can I do new Foo() from the Foo class, without using the name of the class? a sort of new this()
 
@crl What's your problem exactly?
 
crl
@AlexisC. I'm inside class Foo, and need an instance of Foo, but I'd prefer to do it without doing new Foo()
 
Why
 
It's possible to do getClass().newInstance() assuming you have a parameterless constructor, but indeed, why?
 
fge
Or you can use a static factory method
 
crl
7:35 PM
@kiheru Great, that's what I was thinking of thanks
 
@crl Seems like an X/Y problem. What's preventing you from doing new Foo() ?
 
crl
@AlexisC. it looks more "generic" gist.github.com/cauburtin/… and not tied to the specific name of the class I randomly chose
 
8:29 PM
you guys ever tried to enter the magic process that looks to be contributing to netbeans
@SecondRikudo jetbrains managed to go to hero to zero better than mozilla
selling what they call webstorm 8 and what i recognize as a piece of crap with a nice logo is just a theft
the fuck 7 was great, 8 doesn't even have feature parity with ms notepad
 
 
1 hour later…
fge
9:36 PM
@Worf eh? I use Intellij IDEA daily and it has never failed to disappoint me; I don't know about webstorm but I suspect the problem is not with Webstorm but the way you expect to be using it
 
The only thing that makes me switch to IntelliJ was because of Java 8
 
fge
The only one, eh?
 
ECJ have so hard times
Well I didn't know it before
 
fge
The reason I switch to IDEA is that I have tried and used Eclipse
 
I was fine with Eclipse
^^
 
fge
9:38 PM
And yeah, ECJ was part of the reason why I switched
 
@fge for example, sometimes i can't change any kind of setting on it. it enters a complete failure state to the point that i have to delete caches manually and edit settings' xmls myself
not to speak of automated refactorings that mess with my imports every time i try to do something with them
and that code completition only works for 5 minutes after invalidating the cache
the 7 has problems too, it's not perfect, but 8 is a massive pita
 
fge
Then open a bug to JetBrains
With an SSCCE of course
 
i did it, some are marked as duplicates but evidently were different problems
some were just ignored
just a few got fixed
 
That reminds me I should get the student pack for github and IntelliJ
 
also i don't have the time to report such amount of bugs
one is not supposed to sell a software that buggy
also they have no clue of how php works, autocomplete is all wrong
 
9:49 PM
greetings, I'm trying to use String.split with a simple regexp
split("[a-zA-Z]+[0-9]+");
however, it does not work
"asd02" does not match
 
i don't know java but shouldn't be split(/[a-zA-Z]+[0-9]+/)
 
I don't know, never seen slashes used like that
 
ah well i could easily be wrong lol
split(new Regexp("...", modifiers)) perhaps?
 
Possibly. It should be easier doc than that. There's also a Pattern class that can be "compiled", but it's for a Matcher class. I wanted to keep this simple.
 
@Agostino "xxxasd02xxx".split("[a-zA-Z]+?[0-9]+") seems to be working
 
9:57 PM
It matches the all string
 
how is the rest of the string composed? because if it's composed of alphanumeric characters that of course would match the whole string
 
@Worf oh, that's why. I wanted to split it in 2
like "asd" and "02"
 
[a-zA-Z]+? the ? means as few as possible
idk just guessing
what's the string?
 
yes, before the digits
maybe it's not necessary
I need to split the string in more pieces
maybe I could try with groups ()
 
what's the subject string?
 
10:01 PM
"asd02", to keep it simple, I want to divide it in "asd" and "02"
 
aahh, wait
 
There's this question, but the first answer uses /d and /D, which are error prone, and the second is too complex.
 
not sure if it's error free tho, you should ask in the regex room
 
ok, looks fine, but mine should work as well
 
[a-zA-Z]+[0-9]+ this? no, it can't work
 
10:08 PM
why not?
 
it matches the all string
 
([a-zA-Z]+)([0-9]+)
 
fge
@Agostino do use a Pattern and Matcher
those are the most efficient ways
 
crl
=http 411
 
@crl HTTP 411 (Length Required): The 411 (Length Required) status code indicates that the server refuses to accept the request without a defined Content-Length (Section 3.3.2 of RFC7230). The client MAY repeat the request if it adds a valid Content-Length header field containing the length of the message body in the request message.
 
fge
10:11 PM
And if regexes can't do that for you, you have the option of using grappa
 
@fge ok, I just want to know why split does not work now
@fge this is splitting a file name, no big deal
(?<=[a-zA-Z])(?=[0-9])|(?<=[0-9])(?=[a-zA-Z]) works
and I don't know why
 
fge
@Agostino now look here; regexes are not aware that the input you submit to them is a file name or whatever
 
file name means very short string (it's not a full path)
 
fge
Then what?
 
that's why I wanted this to be simple
 
fge
10:16 PM
OK, now define "simple"
 
1 liner
 
fge
And note that "simple" DOES NOT mean "short"
 
true
 
fge
Well, there is your fundamental error
 
com'on
 
10:16 PM
what's wrong with this regex101.com/r/iA3nX1/2
 
fge
No, I'm not joking
"simple" and "one liner" are NOT synonyms
 
yes, I know
 
fge
In fact, most of the time they are not
 
^
 
fge
Well, if you are aware of that, decompose your task so that you get the job done
 
10:17 PM
nothing wrong, actually, I just don't know why the lookback is needed
 
fge
Don't fret over that
 
and why the other one does not work
 
if you want something simple, you can split at each character, then traverse and merge adjacent digits or characters
but it's not one liner
 
fge
Do not struggle to reduce your code
 
10:18 PM
so, this is fine regex101.com/r/iA3nX1/2
just help me understand it
 
fge
Code so that It Just Works(tm)
 
and why this does not work ([a-zA-Z]+)([0-9]+)
 
fge
Using regexes or not, doesn't matter
 
yeah, ok, thanks got that
 
fge
DO NOT ASK YOURSELF USELESS QUESTIONS, damnit
 
10:19 PM
com'on, it's not useless
 
fge
Yes
 
fge
It is useless
 
I want to know why one works while the other does not
 
fge
If you know of a way to solve your problem and code it, just go for it
You. Cannot. Lose.
 
10:20 PM
Why did Java does not introduce Enum type at the beginning? Now we have to use ints when using compareTo. I find this pretty dumb...
 
@Worf terrible website
 
lol
 
@Worf thanks for taking it nicely
 
fge
@AlexisC. probably because the concept of an enum, at the type when Java was born, was not well defined
 
@fge And they didnt feel bad when writing the contract of compareTo?
they could either spending more time on defining the enum concept rather than throwing a random integer in the air for the comparison. With an enum that what would so simple and far less confusing
 
10:23 PM
I get 3 matches with ([a-zA-Z]+)([0-9]+) so it appears to me it should work
well, this will remain a mystery for now
byw
 
fge
@Agostino again: decompose; and if regexes are not the solution for you, don't use them
It's that simple
@AlexisC. sorry, I don't see the relationship
 
@fge "Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object." Wouldn't it be better, less error prone and more readable if it was "Return Compare.LESS_THAN. Compare.EQUAL_THAN, Compare.GREATER_THAN" instead ?
 
A leftover from C, like many features of early java. To me it seems to be modelled after strcmp()
 
fge
10:40 PM
What @kiheru says; and anyway, Comparable predates enums
And you do know about Java's obsession about backwards compatibility, right? :)
 
Yeah but they could introduced a very basic enum type and improve it after. Well it's done now so....
 
fge
They couldn't
 
and preserving backward compatibility
why
 
fge
Had they done so it would have meant bytecode pollution
But on the upside, enums as they are defined in Java are very powerful
Much more so than what you call "basic enums"
 
the enum of early days would have probably been a thin wrapper around int. Hard to come from that to what we have now
 
10:50 PM
@fge Interestingly I just see your question about .sorted(Integer::min). Fortunately I'm not the only one thinking this: stackoverflow.com/questions/22561614/…
Now we wonder why Arrays.asList(-2, 1, 3).sort(Integer::min); produce [1, 3, -2]. The semantic is so broken...
well nvm :-)
(and give you the 90 upvote btw =))
or they could introduce a class with three final constants
not a big deal either IMO
 

« first day (1616 days earlier)      last day (3328 days later) »