« first day (1546 days earlier)      last day (3619 days later) » 

13:04
I'm so proud of myself.
@Jefffrey gotta love the (T)null part
fge
fge
@FredOverflow interesting! Watching
Wow, dynamic programming? I'm proud of you.
@FredOverflow Is that wrong?
Or is there a better way?
If it doesn't compile without the cast, it certainly isn't wrong.
It just looks weird.
13:07
hi...
Hello!
anybody works on RPM or deb file
@Unihedro I see you've met the C++ room :P
@BenjaminGruenbaum Last time I was there I was ranting about autocomplete. :p
I had to visit Bartek, I almost feel so sorry for triggering him :/
merh
They like ranting, they're just pretty childish about stuff, there are few decent people there though like sehe, rightfold (usually) robot xeo etc.
13:12
Yeah, the lounge is full of spectacular creatures. Don't know why they visit us sometimes, but it still happens.
are they gone?
@Vogel612 The haters?
@Vogel612 This user has been automatically suspended for posting inappropriate content and cannot chat for 53 minutes.
ohhhhhhh
comes out from behind his rock
Welcome back
13:14
Oh, looks like he unignored you @Unihedro :D
~ router maintainence
in other news, I've never seen the Java room with so much traffic :P
That's because of me xD
In other news, that maybe isn't quite so bad....
increases that "all time user" count
:P
13:28
hi, i would like to ask how does java handles this kind of condition

(a >= 99 || a <= 33 && b == 10)

does java groups the condition like ( (a >= 99 || a <= 33) && b == 10) or (a >= 99 || (a <= 33 && b == 10))
@anathema You mean... Operator precedence?
AKA which pairs evaluates first, et cetera?
Shouldn't it be left-to-right?
Well, firstly, conditions always evaluate first. You have three conditionals in the expression:
1. a >= 99
2. a <= 33
3. b == 10
i found the answer lol, (a >= 99 || (a <= 33 && b == 10)) since && is a higher precedence compared to ||
13:34
Therefore, those are evaluated first. After that, in conditional operators, && has higher precedence over ||. Therefore, (2) && (3) is evaluated first. Then the result is taken for OR comparison.
@anathema That is correct.
Note that Java uses short-circuiting (in C# you can override this with singularity conditional comparators, in Java no) to handle its expressions.
how does c# do that?
Could you point at corresponding section in JLS?
Therefore, if it finds that a >= 99 (which is evaluated first, as (1)), it knows that true || any is true, so it doesn't evaluate a <= 33 && b == 10 and immediately returns true. This means that if any includes side effects, if (1) is true, the side effects will not be carried out.
@anathema a >= 99 | a <= 33 & b == 10
@OlegKuznetsov For operators, or short circuiting evaluation of conditional operators?
@Unihedro order of conditions evaluation
@uni
@Unihedro but still java will evaluate it from left to right?
the only difference was on how java groups the conditions?
13:39
@anathema In expressions, yes. Though it's not just that simple, it only works in expressions and RHS assignments and conditional chains with no side effects.
fge
fge
@Unihedro uh, & and | boolean operators do exist in Java
No idea why but they do exist
@fge You mean bitwise?
fge
fge
No, boolean
There exist a & b where a and b are boolean expressions
Same with a | b
I actually saw them used, only once, in Tomcat code
@anathema Read the JLS section for more on "evaluation order": docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.7
thanks @Unihedro
fge
fge
13:41
They are like && and || except that they don't short circuit
But I absolutely restrain from ever using them
@Unihedro thanks
@fge The no-shortcircuit boolean operators exists in C#, which is why I know of them on the first place. I've never recalled reading on no-shortcitcuit boolean operators in Java, so that's a new find for me.
Hey guys. I have a situation where I have one-to-many relationship. For each object in Table 1 I want to get all foreign objects in Table 2. I open a db connection to get parent and then in another model another connection for all child objects. The problem is that current design allows only one connection. Is it better then to share this existing connection between two models or get parent and child objects seperately.
@OlegKuznetsov @ana You're welcome!
@mantic0 Why not?
fge
fge
@Unihedro yet they do ;) No idea whether C# actually copied them from Java; but frankly I fail to see the point of these operators at all
13:43
why not 'what'? :D
fge
fge
Using them would mean that your boolean expressions have pretty deep side effects
@mantic0 Because it sounds reasonably broken..
fge
fge
And that makes for some unmaintainable code all right
@fge Sometimes, it's intentional. Though when I need that intentional side effect, I just break them down into assignments.
fge
fge
My point exactly
13:44
@fge Hey, I do win the "weirdest code award" on most contests I participate.
I could use doubles to float pointer casting to solve a tic tac toe problem.
fge
fge
I have enough of C for weirdness so I try and keep the code clean at any cost :p
When I code in Java, I write clean code because I know that the JIT will clean up the trail, which is why I prefer C++; It's taken me many years dev hours of mastery, can't give up the hard work for nothing now.
@Unihedro what do you mean exactly?
@mantic0 When I post a message, I mean what I meant, no more, no less.
If you don't get it, you can bookmark it for later. When you get into the programming ecosystem, you'll understand it.
in Room for Uni and Sam on Meta Stack Exchange Chat, 4 hours ago, by Unihedro
Eh, I'm kind of getting burnt out from coding today (I've been coding non-stop since I got home), so I'm going to try some web design instead.
^ Why I'm still chatting instead of coding
@Unihedro good question
13:53
I know it's broken, no need to state the obivous. I'm just trying to get around this the best way I can
Shinchan
Vs
Itachi
Holding two personalities within same body, It's really hard
I have been through tough times..
14:20
Morning again
@Jefffrey Heyo!
I was wondering. Is, the only way to run a certain number of tasks all concurrently and then way for them all to finish (in any order), to use Executors.newCachedThreadPool?
The problem I have with it is that it's not easy to express this "wait for them all" without blocking the addition of new threads.
Also I'd like to be able to await termination indefinitely (that is, don't define a timeout, like awaitTermination forces you to set).
Sounds like you have a design problem.
How so?
I have no idea how long it takes for them all to finish and I don't care.
Because you're waiting for multiple tasks and you can't block any.
14:24
Let's say I'm ok with the shutdown + awaitTermination thingy, the timeout problem is still there.
fge
fge
15:02
OK, where do you report javafx native bugs?
<-- tired of walking into bugs :(
Adz
Adz
hellooo guys
hello
15:10
i have a query on "mutual exclusion" program written in java, can i ask?
fge
fge
SIGSEGV
I hate that
SIGSEGV?
Segmentation fault
1 message moved from Lounge<C++>
@R.MartinhoFernandes Thanks!
fge
fge
15:13
It seems to be a Ubuntu native bug
i965_dri.so
Great
@fge sigsegv's are present across *nix families. They're slightly more frequent than BSoDs on Windows's, though.
fge
fge
I know
Don't forget that I have 15 years experience as a systems engineer :p
@fge i have a question about mutual exclusion, do you think you help me?
program written in java
fge
fge
Not now, sorry
@fge I want to run FreeBSD, but I'm not experienced enough with systems to use it properly.
I've only done system administration on concrete layers for eight months.
15:20
I have some questions about ant and maven
Or rather, the differences.
When you have maven, you can just put the dependencies into the POM file, but how do you do that in ant?
maven-ant-plugin
create a lifecycle task to run ant with it
or use ivy
No, I meant, if you make an ant project and you want to add a dependency, how do you do that
It's not the case of converting anything
@Gemtastic Ant was never made to handle dependencies
@ItachiUchiha So ant is mainly for SE java?
15:22
It was made to add classpath to a project, which can be a folder containing all the jars
Or? You don't use frameworks or libraries either?
Nope, it is for Java. It is a build tool, it doesn't differentiate b/w J2EE and J2SE
@Gemtastic didn't get ya
@Gemtastic With Ant, building asserts that you have the jars of binaries (or source code if you're using ant debugger). It doesn't assemble anything, it just builds it and run.
Maven assembles stuff.
@ItachiUchiha In the links you gave me yesterday they talk about using ant for spring, but you said ant don't handle dependencies
@Unihedro I don't really get what that means
@Gemtastic Handle dependency -> Automatically download and add the jars to your classpath
Ant doesn't do it ...
Just skip the ANT part, if they are using it
15:26
Well, I'm just curious as to how ant works. I don't know anything about it since I only use maven. I was just curious since all sites mentions ant
and you say ant doesn't handle dependencies or frameworks >_>
They mention ant because they are old :P
Adz
Adz
man i love coming to this chat and just reading about all these things i don't know about
Yeah, which means you should be able to use it, not that I will.
2 mins ago, by ItachiUchiha
@Gemtastic Handle dependency -> Automatically download and add the jars to your classpath
@ItachiUchiha That tells me exactly nothing. Is it a eclipse thing? Is it a menu option? Do you right-click something?
15:30
facedesk
And that also makes it sound like it does support dependencies
When I was using Eclipse, I wrote the ant scripts myself.
@Gemtastic What does maven do for you?
@ItachiUchiha Everything 8D
fge
fge
Use gradle
15:30
You just add the dependency to the pom
and that everything includes?
I have no idea because it works magic
Which is why I'm asking about ant because... Maven is too convenient
You jsut put the dependency in the pom and download declared dependencies
done
You completely skipped the "write code" part.
It's like maven writes your program.
@gem what is a classpath/buildpath in java?
@ItachiUchiha isn't that the design for the map-structure?
15:36
map-structure?
Fev
Fev
helo @Unihedro ,sinchan , and everyone, how are yo doingg
Hiya @Fev
Fev
Fev
good
15:39
@ItachiUchiha Yes, map structure. Where the folders of the projects are to be located and stuff like that. Am I wrong?
Hello @fev
Fev
Fev
oi..yo
@Gemtastic yes you are wrong
@ItachiUchiha then what is it?
(Noone actually explained that to me so I was just guessing)
There are two phases:

1. building your application
2. executing your application
15:43
All your source files and libraries needed to compile your application is called Build-Path
All the class files and library needed to run your application form the classpath
Whenever you create an application, it will always have a classpath defined in the MANIFEST file
you can externally define the classpath while running the jar, by using -cp <location of jar>
What maven does is, it resolves your buildpath automatically (by downloading, if absent) and when you run a maven install command, it resolves your classpath and create the correct manifest for you..
If you have a dependency, let us say jfxrt.jar for your project. So you add a dependency, let us say:
<groupId>com.java</groupId>
<artifactId>jfxrt.jar</artifactId>
<version>1.0</version>
This jar get downloaded inside /user/.m2/repository/com/java directory
and maven adds this location to the buildpath
So your project can now use the contents of this jar....
Since ant doesn't download the jar, you need to download it and keep it somewhere and add it to the buildpath :)
anybody free for some couple of seconds ?
@MissNoob Don't ask to ask, just ask
Fev
Fev
i'm free and single also..
ya right... dating on friendscout please
i'm working on android app and want to integrate paypal api...i successfully implemented it...but have a couple of questions regarding it
15:56
@Fev Go to some dating site
Fev
Fev
she means need help. help him Shinnosuke Itachi
do anybody have any idea about paypal api ??
@MissNoob I am not sure if we can actually answer your questions on android. You must try the other rooms dedicated to android
@Gemtastic Are few things clear now?
i ain't getting access in android rooms :'(
16:00

Android

Don't say hi. Don't ask questions. Don't have fun. Don't do an...

 Android Era with Kotlin and Java

Important: Read dos and don'ts here: androidera.github.io . Ma...
@ItachiUchiha Please stop linking to that room. That's the room for cat gifs.
@Unihedro Haha, but it has some pretty smart guys in there :)
@ItachiUchiha Case in point.
okey...thnkyou guyss
@ItachiUchiha It clears up a few things, but it still doesn't say what a classpath/buildpath actually is, which is what I thought you'd explain. I'm happy with what you told me though. And by the sound of it, classpath/buildpath sounds to be kinda close to what I thought it was
Fev
Fev
16:06
what is gifs? i don't find it on dic ..
fge
fge
@Fev Glorified Image (format) Fuckup
Fev
Fev
oh sangkyu sangkyu..
fge
fge
Encumbered by patents and whatnot (well, not anymore)
Uhm, had to reboot because of kernel update and now no SIGSEGV anymore
sigh of relief
SIGSEGV?
1 hour ago, by Unihedro
Segmentation fault
Second person to ask for the day...
16:18
I know Segfault... but I didn't know SIGSEGV :(
well.. TIL ;)
1 hour ago, by Unihedro
@fge sigsegv's are present across *nix families. They're slightly more frequent than BSoDs on Windows's, though.
Second person to ask the same follow-up question..
Fev
Fev
what is TIL ?? nooooo..stop it...
@Fev Can't you search it up or something?
Fev
Fev
uh.. TYYL
TYYL doesn't stand for anything , don't ask it..
accidentaly it has meaning , my god , lingo2word.com/lingodetail.php?WrdID=469564
Oke guys tyyl, i wanna get out of my room and looking for something to eat .., see ya later
16:28
You mean TTYL?
@Unihedro can i ask something?
slowly this question annoys me...
@anathema don't ask to ask... just ask
when assigning an unsigned integer to a char I know that this is valid

char a = 122;

but I discovered that this is also valid char a = '1'; but when I tried char x = '10' it results to compilation error
sorry @Vogel612
@anathema aah that's an actually interesting question
@anathema You know what a char is right?
16:39
tell me, what is '1' when you output it as integer?
the answer (maybe surprisingly) is not 1
quite contrary, it's 49
char can store a 16 bit unicode character @Unihedro
@Gemtastic Classpath != BuildPath
that is because '1' != 1
@ItachiUchiha I know, I'm just writing it as you did
1 hour ago, by ItachiUchiha
@gem what is a classpath/buildpath in java?
16:41
@Vogel612 it was 49
now when you open a char with the leading ', you signal the compiler: "ATTENTION: here comes a char-literal"
hehe
so did you now get an idea what maven does and ant doesn't?
wh00ps, I jumped two lines in the ascii table
16:41
Kinda, yeah.
@anathema Well, since you know that, a char is practically an unsigned integer from zero to 65535 inclusive.
a char literal is always just a single character
Character literals are simply two single quotes ' with a unicode character in between.
So here you can have from '\u0000' to '\uffff'
Therefore, '1' is a char literal, and '10' isn't.
ow
nice
I'll quote from the JLS:
A character literal is expressed as a character or an escape sequence (§3.10.6), enclosed in ASCII single quotes. (The single-quote, or apostrophe, character is \u0027.)

CharacterLiteral:
  ' SingleCharacter '
  ' EscapeSequence '
SingleCharacter:
  InputCharacter but not ' or \
16:45
thanks @Unihedro
hello, I am new to the chat room
Hello, new user.
I am good and you there
fge
fge
@Unihedro there are escape sequences which you can't use though
Since they would provide a parse error of the source file...
@fge Simple. Escape the escape sequence.
fge
fge
16:55
It's not so simple
Have you ever tried for instance to define a char as '\u0013'?
... With the escape sequence of a backslash.
fge
fge
Hmmwait, that's not this one
Well, it's a control char.
You mean something like PARAGRAPH SEPERATOR?
fge
fge
Ohwell, nevermind that
I know that IDEA will yell at you if you try
Can someone with at least Java 7+ try and run this code? gist.github.com/fge/7706bf0402ba19d1794a
Bugs for me with latest 1.7 and 1.8 JDKs
Creates a corrupted zip file
17:26
error: invalid compressed data to inflate
java version "1.8.0_25"
Just noticed http://chat.stackoverflow.com/ for the first time. Pretty awesome.
fge
fge
@ItachiUchiha OK, but since you run Ubuntu I should have expected that
I will try later on windows
I have JDK 8 on windows as well
Anyone here idea of handling wrong url pattern in Spring MVC ?
I can handle in case of exceptions
17:50
I think someone needs to have a word with the google drive developers...
Logo is floating outside of it's supposed place, items are sorted 1 10 11 12 2 3 4 >_>
The more I learn about JS, the more of a hippie language it seems to be
Wanna see how long a string it? Just .length that and you're good to go
@TheLittleNaruto Are you looking for something like this -> spring.io/blog/2013/11/01/exception-handling-in-spring-mvc ?
fge
fge
@Gemtastic I can relate to that although my complaint is not about the UI; it's how needlessly complicated it is to exploit it programmatically
Developing a filesystem for dropbox and box.com was a breeze compared to Google Drive
@fge so many issues to address... kinda makes me think that it might not be so hard to get a job at google after all ;P
@Marc-Andre Thanks for the link... Checking
18:06
@TheLittleNaruto There is a lot of information but I think it should cover what you want to achieve!
@Marc-Andre looks like I'll have to handle all http exception
@TheLittleNaruto I've never implemented it myself, but you should be able to choose the one you want to handle specifically and leave the others to the default handler.
What do you mean by default handler ?
If I'm not mistaken Spring define some default handler for exception. And by handler I mean the class that will handle exception in your webapp
Ouu!
It has @ExceptionHandler annotation
18:21
The part that could be the most interesting for you would probably be : If you want to have a default handler for any exception, there is a slight wrinkle. You need to ensure annotated exceptions are handled by the framework. The code looks like this:
18:36
http://www.commitstrip.com/en/2015/01/16/what-bug-there-is-no-bug/
CommitStrip - Blog relating the daily life of web agencies developers
What bug? There is no bug
CommitStrip
1421433200
I'm trying to re-watch my class on Spring but it's sooooo booooring....
Full of long pauses for when the teacher had to walk around to help people or fix his own code >_>
@Marc-Andre ...this: ?
@TheLittleNaruto I didn't paste the code but you should find the relative code by doing ctrl-f in the blog post
I guess this one you're talking about:
@ExceptionHandler(Exception.class)
Grand pa of all Exceptions :P
Which is not a bad ! It's all exceptions that has not been handled at all.
18:44
Correct
HttpStatus.NOT_FOUND == 404 ?
Then why the hell it's not working
:'(
Dear Spring, Please make this baby happy .. Work! Work!
How do you find the idea of writing a Spring project without using annotations at all?
Wait... Dint I write annotations ?
My boss wants us to stop using annotations
18:51
What the hack I just wrote then Here?
In our spring project
Your boss is a dick
How good or bad is that
I dont know
I mean what the heck
Seriously?
Why did he decide that?
God knows
His logic is
18:53
Bosses are always PITA
Sounds like "I have no idea what they do and they're ugly, get rid of them!"
Hahah
Yeah sort of
I don't know anything really about spring but what little I know makes me think "Why use Spring at all when you're not using it?"
And what that means ?
@Smrita what?
18:55
I mean he wants to not use annotations because by using annotations we will be mixing our code with configuration
without annotations, spring is just a XML poop
Exactly
@ItachiUchiha exactly my thought
What the heck am i supposed to do
Thrash your boss
18:55
And he made sorta like a racist comment joke
He doesn't know a thing
@Smrita Sounds like he doesn't want you to use spring.
@Smrita Give him a shit right on his face
Racist joke :@
Now this is bad, either change your work place or change your boss
He said that girls can't program at first and later he was like please don't be offended it's just a joke and infact programming is for women
18:57
Doesn't your boss have a boss?
How racist is that
@Gemtastic You will know about it once you start using it :)
It's sexist not racist
And after making tgat joke later he was like programming is meant for women
18:57
@ItachiUchiha I'm trying to learn it but... ugh.. that class we had on it >_>
How racist is that
Both the times
Magic, magic everywhere. He's actually explaining it as magic. "Now we've done this magic"
@Smrita Can you bring your boss ?
Where?
Here?
Haha
I'll kick his ass if he'll come in front of him
18:59
lolz
And hes suggesting a lot of crazy stuff
as in?
This conversation is interesting ---- devilish laugh

« first day (1546 days earlier)      last day (3619 days later) »