• cheeser
  • ernimril
  • joed
  • kinabalu
  • lunk
  • ojacobson
  • r0bby
  • ThaDon
  • ricky_clarkson
  • topriddy

« 2016-08-22


2016-08-24 »

Nick Message Date
jcomo [] has joined ##java [12:00]
Leates [unaffiliated/leates] has joined ##java [12:13]
ludocode [] has joined ##java [12:22]
gischy__ [unaffiliated/gischy] has joined ##java [12:23]
SwiftMatt [] has joined ##java [12:23]
airborn [unaffiliated/airborn] has joined ##java [12:28]
ogradyd [] has joined ##java [12:31]
spew [] has joined ##java [12:36]
Hanii [] has joined ##java [12:38]
Fastinyoh [] has joined ##java [12:48]
mEck0 [] has joined ##java [12:48]
bob_the_clown [2601:281:8703:8a80:e4af:9ecc:a513:f43d] has joined ##java [12:52]
zoraj [] has joined ##java [12:53]
frank89rm [2601:49:1:5372:eccb:cb39:15d7:16f3] has joined ##java [01:03]
frank89rm hey does anyone know if openjdk contains classes that the oraclejdk does not? [01:03]
Cmaj6 [] has joined ##java [01:04]
frank89rm [2601:49:1:5372:e5:48a0:8df4:3b53] has joined ##java [01:09]
frank89rm hey does anyone know if openjdk contains classes that the oraclejdk does not? [01:11]
monpocchi [unaffiliated/monpocchi] has joined ##java [01:14]
Hanii I?m trying to save and load a grid of binary values to a from a binary file. I referenced an answer to a question StackExchange I found ( ) but, following that, it seems to be a wee bit garbled the next time I load :( [01:16]
Hanii Pictures - top is before saving/loading, bottom is after: [01:17]
Hanii Hanii's title: "Imgur: The most awesome images on the Internet" [01:17]
Hanii Code: - I can?t see what I?m doing different. [01:17]
Hanii Other than using a grid rather than an array, obviously. [01:18]
liste Hanii: looks like just loss of horizontal resolution. maybe you read/write the same bit for each byte [01:20]
atbe [gateway/web/] has joined ##java [01:21]
Hanii \ o / found what I was doing wrong, thankyou. [01:25]
Hanii In the j loop of the write part, I was reading from position i instead of position j. I looking over that so many times and somehow managed to miss that :< [01:26]
BOKALDO [] has joined ##java [01:36]
sud0 [unaffiliated/sud0] has joined ##java [01:43]
bocaneri [about/linux/staff/sauvin] has joined ##java [01:44]
mEck0 [] has joined ##java [01:49]
Corosus [] has joined ##java [01:53]
ljc [] has joined ##java [01:54]
Markhor1991 [] has joined ##java [01:56]
Colt [] has joined ##java [02:02]
asgs_ [gateway/web/freenode/ip.] has joined ##java [02:04]
last_staff [] has joined ##java [02:05]
snql [] has joined ##java [02:07]
mofai [] has joined ##java [02:11]
karab44 [unaffiliated/karab44] has joined ##java [02:13]
jazzonmym111nd [unaffiliated/jazzonmym1nd] has joined ##java [02:14]
wvdhaute [] has joined ##java [02:18]
wvdhaute [] has joined ##java [02:24]
bob_the_clown [2601:281:8703:8a80:e4af:9ecc:a513:f43d] has joined ##java [02:26]
sz332 [gateway/web/freenode/ip.] has joined ##java [02:31]
l2esonance [] has joined ##java [02:35]
al_nz1 [] has joined ##java [02:37]
al_nz1 I need to write a java applet to serve up a webpage. Is this the sort of thing I can do with jetty? Cause I am looking at jetty now, and intally I thought it was just a case of running the start.jar from the command line, but thats not working (says nothing to do) [02:38]
martyix [2001:af0:8000:1c01:6575:23a3:2032:fdbb] has joined ##java [02:41]
Tichodroma [fsf/member/Tichodroma] has joined ##java [02:46]
zoraj [] has joined ##java [02:47]
notadeveloper_ [] has joined ##java [02:49]
mEck0 [] has joined ##java [02:50]
sz332 ????? [02:50]
sz332 jetty is a web server, which receives HTTP GET/POST/PUT/etc. and sends responses [02:50]
sz332 Applet is a signed jar file referenced in a HTML file and loaded by the browser & JVM [02:51]
sz332 btw in 2016 why do you need to write an applet? [02:51]
PlanckWalk I suspect the word is just used to mean "small application" [02:52]
elect [] has joined ##java [02:52]
al_nz1 yes it is [02:53]
al_nz1 my point was when I try to run start.jar it says nothing to do and quits [02:53]
bolovanos [] has joined ##java [02:54]
al_nz1 hmm, got it to go [02:54]
al_nz1 weird - dunno what was going on before [02:54]
Leon_ [] has joined ##java [02:55]
c64x86 [unaffiliated/c64x86] has joined ##java [02:56]
kicked c64x86 (User is banned from this channel) [02:56]
al_nz1 the docs keep talking about $JETTY_HOME - but that directory isnt defined anywhere afaik [02:58]
Leon__ [] has joined ##java [02:58]
asgs_ that's an environment var pointing to the directory where you Jetty installed [02:59]
al_nz1 oh yip - see that now. Im on windows so havent changed that yet [03:00]
selckin maybe easier to look at embedding jetty docs (and then servlet section) [03:00]
watersoul [] has joined ##java [03:06]
j` [gateway/web/] has joined ##java [03:07]
nightfuri [unaffiliated/nightfuri] has joined ##java [03:07]
Hanii Is Double.toString and Double.valueOf guaranteed to be able to store doubles as strings and recover them completely losslessly? Or is there something else for that? [03:08]
Hanii I?m doing stuff with seeded random values and the slightest change might change the result, which I?d like to avoid. [03:09]
Matthijs [unaffiliated/matthijs] has joined ##java [03:09]
odinsbane Hanii: where are you storing them. Most likely you want a DataOutput and writeDouble. [03:12]
Hanii In a text file. [03:12]
Hanii I?m fairly sure, but not completely, so I was wanting to double-check (lel) to make sure I wasn?t about to do something that would lead to a weird annoying bug later on. [03:12]
odinsbane If you want to use text you have to write character of precision. eg. 0.1 is a repeating value in float and therefore is truncated. [03:13]
milkman [] has joined ##java [03:14]
Gamoder_ [] has joined ##java [03:15]
Hanii I?m converting from double to decimal (in text) and back, rather than vice versa. Afaik, all binary non-integer values are expressible as regular decimal non-integer values. [03:15]
Gamoder_ Hi everyone, what is the easiest way to create a video thumbnail (if possible many/all codecs supported) every x seconds - and, if possible, even stored as e.g. BufferedImage [03:16]
selckin Gamoder_: calling our to 3rd party tools like ffmpeg [03:16]
sz332 find some ffmpeg + java library, or check javafx2 i think it has it integrate [03:16]
sz332 d [03:16]
Gamoder_ Well, ffmpeg is a command line utility. A java-API for ffmpeg would be good enough, probably, but I don't know any [03:17]
Hanii ffmpeg is a godsend. [03:17]
selckin they don't work very well,using ffmpeg directly will make your life a lot easier [03:17]
shrek [gateway/web/freenode/ip.] has joined ##java [03:18]
sz332 [03:18]
Gamoder_ Another problem is that I am partly on windows, but want to deploy on linux [03:18]
sz332 this is what javafx2 provides [03:18]
sz332 and is integrated in java 8 [03:19]
shrek hi [03:19]
odinsbane Gamoder_: what is going to display your video 'thumbnail' [03:19]
shrek is there any site which can provide me all the english words and their meanings? [03:19]
Gamoder_ well, I will save the file, but more importantly is that I want to analyze it and save the results [03:19]
odinsbane shrek: [03:20]
Gamoder_ but I don't want to analzye all the video but just e.g. an image every 1 minute [03:20]
shrek odinsbane can they be downloaded too? [03:20]
bojangles [] has joined ##java [03:21]
Ozymandy [] has joined ##java [03:21]
selckin Gamoder_: seriously just call out to ffmpeg it can do this standard, batching out to other processes is not a cardinal sin [03:21]
al_nz1 how do I change the directory where jetty finds index.html, or the root folder [03:21]
bojangles Hey has anyone had any experience with parsing the DBLP? [03:21]
BernhardPosselt [2a02:8388:7000:ab80:7054:86d2:d5a2:45af] has joined ##java [03:22]
sz332 Gamoder_: also check [03:22]
sz332 sz332's title: "Home - FMJ" [03:22]
sz332 selckin: +1 [03:22]
bojangles I need to parse the DBLP XML file. Should i make a new class for each record type i.e. article, book, masterthesis etc? or just have a generic Record type and assign the publication information to each record? [03:23]
Iskarlar [] has joined ##java [03:23]
selckin zt-exec [03:23]
selckin zt-exec is a nicer wrapper about Process and ProcessBuilder by the zeroturnaround engineers. [03:23]
sz332 this looks like the easiest solution, especially that under windows you can simply bundle an ffmpeg.exe, and under linux, you can add ffmpeg as prerequirement [03:23]
Gamoder_ I will check that out, thanks, looks nice [03:24]
odinsbane Otherwise you will spend your life in codec hell. [03:24]
Gamoder_ however, it has not been updated for a while oO [03:24]
selckin cause it works [03:24]
Gamoder_ I hope so [03:24]
Gamoder_ usually projects break after a while [03:24]
BernhardPosselt parted the channel: [03:24]
Matthijs Software doesn't "break". It either works or has always been broken. [03:25]
sz332 Like windows10 webcamera update :) [03:25]
Gamoder_ well, it could easily break if e.g. the ffmpeg command line api changes [03:25]
Gamoder_ which, to be honest, seems likely to be the case within 8 years [03:25]
selckin thats why you write tests [03:26]
shrek i want to include the words with their menings in a project but can't add them individually,its too hard [03:26]
Gamoder_ yes, but the tests don't automatically fix things [03:26]
selckin shrek: wikipedias dictionary project probably closest to a 'free' dataset [03:27]
yawkat but this is not "usually"... [03:27]
selckin Gamoder_: ffmpeg doesn't automaticly update [03:27]
yawkat projects breaking after some time is not the norm [03:27]
Gamoder_ and if a project has no updates for 9 years then it is likely that no developer cares any more about whether things run or not [03:27]
selckin ffmpeg is the standard video library in all of linux and will be supported till the end of time [03:27]
Gamoder_ selckin: yes, but my version installed will likely be newer than the version the people there have developed their project with [03:27]
odinsbane Which project hasn't been updated in 9 years? [03:27]
Gamoder_ [03:27]
Gamoder_ Gamoder_'s title: "FMJ download |" [03:27]
Gamoder_ which is ,a.o., a wrapper for ffmpeg [03:28]
selckin oh i wasn't talking about that project, i agree don't use that [03:28]
odinsbane Gamoder_: You're probably better off using zt-exec + ffmpeg. [03:28]
achauvin [] has joined ##java [03:31]
Gamoder_ what is the advantage of zt-exec compared with the usual (Process.?? or so) way? Does it fix the problem that sometimes programs which have ended are not recognized to have ended? [03:31]
selckin more a pain in the ass and difficult to properly handle the in/out streams [03:32]
Gamoder_ I think I wouldn't need any input/output stream? [03:32]
selckin no, you might want to log the output tho to watch like warnings it spews or progress info [03:32]
selckin but you still have to read the output or close the streams i think or it might block on it [03:33]
Gamoder_ yes, but the issue is that it is a maven project and has no .jar as far as I can see [03:33]
shrek selckin ok bro thanks [03:33]
Gamoder_ ok, there it is: [03:34]
Gamoder_ Gamoder_'s title: "Maven Repository: org.zeroturnaround zt-exec 1.9" [03:34]
Gamoder_ I will try it [03:34]
odinsbane Gamoder_: [03:35]
odinsbane odinsbane's title: "The Central Repository Search Engine" [03:35]
danijoo_ [] has joined ##java [03:36]
odinsbane You can d/load the jar file from there. You can also d/load the pom file and check for other dependencies. Or, you could use maven. [03:36]
bob_the_clown [2601:281:8703:8a80:e4af:9ecc:a513:f43d] has joined ##java [03:43]
ibouvousaime [] has joined ##java [03:48]
ibouvousaime Hello are there unions in java ? [03:49]
selckin no [03:49]
ibouvousaime okay [03:49]
odinsbane labour or sets? [03:50]
selckin or c like [03:50]
Serpent7776 [] has joined ##java [03:50]
lightt [unaffiliated/lightt] has joined ##java [03:51]
mEck0 [] has joined ##java [03:51]
ibouvousaime c like [03:52]
spronk [] has joined ##java [03:53]
s4ke [] has joined ##java [03:54]
odinsbane What would you hope to accomplish with that? [03:54]
sz332 no [03:54]
teralaser [unaffiliated/teralaser] has joined ##java [03:56]
selckin save some bits from the 32kb of memoery [03:57]
ibouvousaime I want to add one variable to my class and that variable type wont be the same according to some other atribute to the objects, I just didnt want to make both 2 variables while still knowing that one of them will be useless [03:57]
ibouvousaime but nevermind I have another idea in mind [03:58]
AMcBain [] has joined ##java [03:58]
selckin generics [03:58]
selckin For a tutorial on generics, please see . Also, is a great in-depth resource. [03:58]
ibouvousaime selckin: interesting [03:59]
selckin might not apply here tho [04:00]
Gamoder_ well, thanks, seems to work [04:00]
Gamoder_ however, ffmpeg seems to output te same frame multiple times, at least there are multiple lines for the same frame with the same time [04:01]
selckin doesn't work [04:03]
selckin selckin, doesn't work is useless. Tell us what it is, what you want it to do, and what it is doing. Consider putting some code and any errors on a pastebin. (use ~pastebin for suggestions) [04:03]
selckin there is a wiki page with the exact wording of your question on ffmpeg site explaining what todo [04:04]
kwladyka [] has joined ##java [04:04]
Gamoder_ yes, and I used that parameters and now I got the problem [04:04]
Gamoder_ but wait, I will show you with a sample video [04:04]
selckin start with the parameters [04:05]
Krisostoomus [unaffiliated/kristjan85] has joined ##java [04:05]
Krisostoomus hello [04:05]
Krisostoomus I have a problem with Cannot instantiate the type Response [04:05]
Krisostoomus [04:05]
Krisostoomus Krisostoomus's title: "smpp-server/ at master elibom/smpp-server GitHub" [04:05]
Krisostoomus its a enum [04:05]
Gamoder_ ffmpeg -i <inputfile> -filter:v scale="160:-1" -vf fps=1/30 <outputfilewith%d.png> [04:05]
ljc [] has joined ##java [04:07]
selckin Krisostoomus: any context or do we get the guess who ro what gives that error when doing what [04:07]
Krisostoomus I need to initiate Response r1=new Response(); [04:09]
Krisostoomus but this gives this error [04:10]
Gamoder_ selckin: the problem is that if you do the command on the console, this error is not immediately visible [04:10]
selckin enum [04:10]
selckin selckin, enums is [04:10]
selckin Krisostoomus: you don't instantiate enums they are constants ^ [04:11]
Krisostoomus but why do they have methods inside? [04:11]
sl33k [] has joined ##java [04:11]
Gamoder_ could it be that ffmpeg just does not output only one line per frame? [04:11]
Krisostoomus and why I can't use them? [04:11]
Gamoder_ and that it does not generate the frame multiple times? [04:11]
odinsbane Gamoder_: could be. [04:11]
selckin where do lines come into play? [04:11]
T-2000 [unaffiliated/t-2000] has joined ##java [04:12]
slopaxy [] has joined ##java [04:12]
Gamoder_ The command execution was slow, so I redirected the program output to system.out [04:12]
kwladyka_ [] has joined ##java [04:12]
Gamoder_ and there I saw multiple lines like frame= 0 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed= 0x frame= 0 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed= 0x [04:13]
odinsbane Gamoder_: ffmpeg does some wierd things with the terminal, I wouldn't be surprised at all if lines are repeated. [04:13]
maxorator [] has joined ##java [04:14]
Gamoder_ ok, then I guess it works properly [04:14]
s4ke !karma [04:14]
sphenxes01 [] has joined ##java [04:17]
codebold [] has joined ##java [04:18]
Gamoder_ ok, sorry for so many questions: is it possible to specify that the tempoary directory should be RAM-mapped? [04:20]
selckin require admin rights on every os i think, and no standard apis [04:21]
Gamoder_ so this is a no I guess? [04:21]
shrek yes [04:21]
selckin depends how much pain you like to endure [04:21]
shrek lol [04:21]
Gamoder_ not much [04:22]
shrek pain [04:22]
selckin could maybe actively monitor the output directory and read/remove as it goes [04:22]
Gamoder_ no, I will deploy it on a rapsberry with sd card [04:22]
odinsbane Gamoder_: what do you want though? [04:22]
Gamoder_ and I worry about the life [04:22]
selckin the os will keep it cached [04:22]
Gamoder_ not so much about the speed [04:22]
Gamoder_ generating thumbnails is rather slow anyway [04:23]
odinsbane So you want the ram to appear as a file system? [04:23]
selckin then you can make a memory mapped dir manuall in /etc/fstab [04:23]
selckin or write to /dev/shm but i'm not sure how that works [04:23]
chevdor [] has joined ##java [04:23]
Gamoder_ well, /tmp is a tmpfs anyway [04:23]
selckin usualy isn't [04:23]
odinsbane Gamoder_: why do you want to write a file? [04:24]
yawkat "it depends" [04:24]
Gamoder_ I don't want, but ffmpeg just outputs a file [04:24]
selckin multiple files, so its not easy to redirect to a sream [04:25]
Gamoder_ that's why I initially wanted a java-only solution [04:25]
iflow885 [unaffiliated/iflow885] has joined ##java [04:26]
s4ke what do you want to do gamoder_? [04:26]
s4ke with ffmpeg that is [04:26]
Gamoder_ generate videothumbnails which I then want to analyze [04:27]
s4ke do you know about xuggler? [04:27]
swoc_work [] has joined ##java [04:27]
s4ke [04:27]
selckin hit a bug every hour when i tried to use that a few years ago [04:28]
s4ke selckin: okay. i have just used their audio decoding once, and it worked [04:28]
Gamoder_ xuggler is not actively developed any more [04:28]
s4ke Gamoder_: but i guess trying it out doesnt hurt. [04:28]
s4ke Gamoder_: and you dont need a temp directory [04:29]
Gamoder_ Now I think I am too lazy for that [04:29]
selckin its a lot of pain for a simple tmpfs problem [04:29]
odinsbane Gamoder_: you can stream ffmpeg output. [04:29]
Gamoder_ /tmp is tmpfs, on windows I don't care about ssd wear so whatever [04:29]
s4ke Gamoder_: xuggler i think allows you to directly decode stuff [04:30]
s4ke Gamoder_: maybe think about ram mounted filesystems [04:30]
s4ke so you mount your ram as a harddisk [04:30]
Gamoder_ yes, that's why I said I have /tmp on tmpfs now [04:31]
Gamoder_ tmpfs is a ramdisk [04:31]
s4ke Gamoder_: okay. sorry :) [04:31]
yawkat Ramdisk on a raspi? And Java? [04:31]
yawkat I hope it's a new one. [04:31]
Gamoder_ well, it has 1 GB [04:31]
yawkat Ah, that may work out. [04:31]
selckin rpi2 is like a 10 year old laptop, and those ran eclipse and half life just fine [04:32]
Gamoder_ But I would like to have 2. Had to rewrite some of my programs to make it fit into the RAM :-/ [04:32]
Gamoder_ I also have an odroid C2 which has 2 GB Ram but it doesn't work as well [04:32]
selckin stream 4k video from my rpi2, my original intel atom couldn't even handle 1080p [04:33]
Gamoder_ well, that doesn't count since I think there is hardware decoding for that [04:33]
slopaxy [] has joined ##java [04:33]
selckin had a nvidia card aswel [04:33]
Gamoder_ but it really is slow. I often need to rewrite programs which perfecty work in my laptop setting to make them faster and/or use less RAM on the raspberry [04:34]
selckin you also need ot make sure you have a good sd card [04:34]
selckin some are insanely slow [04:35]
selckin like factor 100x difference for same price etc [04:35]
Gamoder_ yes, but I try to do most things in memory so I don't think this should be that relevant [04:35]
selckin well like jvm startup has to read a lot of files etc [04:36]
selckin but yeah, its not a rocket ship ofc [04:36]
Gamoder_ well, I start the programs once and then they just keep running, so startup time also isn't that relevant for me [04:37]
sud0 [unaffiliated/sud0] has joined ##java [04:42]
Gamoder_ ok, another question: is there something which can unzip/untar/un?? archives in RAM for java? [04:43]
selckin commons-compress [04:43]
odinsbane Java has classes for Zip, and Gzip. [04:43]
sl33k [] has joined ##java [04:45]
monksam [] has joined ##java [04:45]
Gamoder_ right. Is there a way to ensure that when compressing the files are stored in the .zip in alphabetical order? [04:46]
s4ke parted the channel: [04:46]
gravitation [] has joined ##java [04:46]
yawkat Writing them in that order will probably do the trick [04:47]
Gamoder_ I hope so [04:47]
Matsv [] has joined ##java [04:47]
myu [unaffiliated/myu] has joined ##java [04:48]
mEck0 [] has joined ##java [04:52]
milkman [] has joined ##java [04:53]
Ozymandy [] has joined ##java [04:56]
Ozymandy Hi, guys. I have class which parse data from database [04:57]
sl33k [] has joined ##java [04:57]
Ozymandy But there are methods which converts resultset to list [04:57]
Ozymandy And I want to remake structure of this class by implementing converter. (this two methods). But it will cause problem that I will use query in my converter [04:59]
moei [] has joined ##java [05:00]
Stummi test [05:04]
Stummi is something broken with javabot? [05:05]
Stummi <javabot> I don't know who you are. Check your NickServ registration. [05:05]
Taylor [unaffiliated/taylor] has joined ##java [05:05]
Matthijs fuck you [05:05]
Matthijs Or nickserv [05:06]
Stummi nickserv works [05:06]
Stummi /whois Stummi and /ns info stummi both show accurate info [05:06]
ekarlso- is there any ok library to do app configuration ? [05:08]
odinsbane logs [05:09]
Tichodroma ekarlso-: perhaps [05:09]
Tichodroma Tichodroma's title: "Commons Configuration Java Configuration API" [05:09]
ekarlso- ok ) [05:10]
sphenxes01 [] has joined ##java [05:12]
surial ekarlso-: did you mean command line switches? In that case, jcommander, otherwise, what Tichodroma said. [05:14]
ekarlso- surial: I mean to do config via yaml / eureka or alike... [05:16]
mbroeker [] has joined ##java [05:22]
kwladyka [] has joined ##java [05:24]
cyource [unaffiliated/cyource] has joined ##java [05:26]
cyource I keep getting cannot recognised symbols Collection and Iterator - and the import statements aren't recognised. [05:26]
cyource Any ideas? [05:26]
odinsbane your import statements are wrong. [05:27]
odinsbane pastebin [05:27]
odinsbane ... past your code, maybe just your package and imports. [05:28]
cyource This is a Edu Kotlin project [05:28]
cyource [05:28]
cyource The statements are not wrong [05:28]
Markow [] has joined ##java [05:29]
cyource odinsbane I have Java 8, so Collection should be recognised... [05:30]
odinsbane Is that the whole file? [05:30]
cyource odinsbane yes [05:30]
cyource It's a Edu Kotlin task [05:30]
cyource *an [05:30]
Gamoder_ ok, now even another question: Is there a way to detect (a) on which hard drive (id) a file is and (b) which the mount-root of this hard drive is? [05:31]
cyource odinsbane the code isn't wrong at all [05:31]
surial Gamoder_: with the new file API, yes. [05:32]
odinsbane It should compile, it appears to be you have an evironment issue. Who says the symbols aren't recognized? [05:32]
surial ekarlso-: you can do Tichodroma's link, or, go with a JSON format config file and use a JSON library (not the one from; type ~json parsing) [05:32]
surial cyource: The code is fine, indeed. Your compiler is wrong. [05:33]
surial cyource: with javac it compiles just peachy fine. [05:33]
cyource surial so what should I do? [05:33]
surial cyource: .. use javac. Or explain what this edukotlin thing is. [05:33]
cyource surial an interactive plugin for IDEA to help learn Kotlin [05:34]
surial cyource: Hmm, one really weird answer to this is that you either saved your text file in something that isn't UTF-8 compatible OR the compiler wants to read a wonky charset. For example, if you saved in UTF-16 and you just toss it to javac, you.. nah, then the compiler couldn't even read the word 'import', it can't be that. [05:34]
zwliew [gateway/web/] has joined ##java [05:34]
surial cyource: shouldn't you, you know, be writing kotlin then? [05:34]
cyource surial there's a task in which I have to convert Java -> Kotlin [05:35]
surial puts on his Captain Obvious! cape. [05:35]
odinsbane cyource: so... you need to convert, not just copy/paste. [05:35]
cyource odinsbane um, converting via copy paste [05:36]
cyource odinsbane: there auto kotlin conversion in IDEA [05:36]
odinsbane You pasted java source. [05:36]
moei [] has joined ##java [05:37]
cyource odinsbane oh, yea [05:37]
surial cyource: all you've done is paste java source. It compiles fine with javac, I don't know kotlin but I'm pretty sure it wouldn't compile at all in kotlin. What more do you want from us, eactly? Tips as we gaze into our crystal ball? Okay, here's one: For whatever reason (tutorial fucked up, version of plugin changes, you didn't read it right or are doing something else wrong), you're now trying to compile java code with kotlin [05:37]
surial and it won't work. [05:37]
cyource surial no, no - I see there's a confusion here - Um, Kotlin uses the JDK to compile the code, from what I've read [05:38]
odinsbane cyource:,%20world!/Simplest%20version/Simplest%20version.kt [05:39]
cyource surial hence why some kotlin code isn't recognised either [05:39]
surial cyource: Sure, but kotlin isn't java. [05:40]
cyource odinsbane: tried that, it's shit - the buttons don't work on most of the tasks [05:40]
surial cyource: note how that uses the word 'fun' which isn't even a keyword in java. [05:40]
cyource surial: I know that [05:40]
surial cyource: there is indeed confusion. Pretty sure it's.. not over here. [05:40]
odinsbane cyource: but it has examples of kotlin...which you don't. [05:40]
sl33k [] has joined ##java [05:41]
cyource surial: I asked here because it was a jdk problem... ok, I'll see in #kotlin [05:41]
odinsbane jdk - java development kit. I suspect you are confusing jdk with jvm. [05:41]
cyource odinsbane: what? [05:41]
BOKALDO [] has joined ##java [05:41]
Matthijs cyource: It means you can use Java API, not Java Syntax [05:41]
surial okay, okay, new theory: You pasted the wrong thing OR you thought it was kotlin code, and you thought ##java was the appropriate channel. [05:41]
surial If so: Well, it's not kotlin code you pasted, but java code. kotlin has its own channel. [05:42]
cyource surial: No - I know it is Java code [05:42]
odinsbane cyource: also if you look at the Kotlin import statements. They omit the ; [05:42]
cyource odinsbane: I'm not a Java noob, lol. I think I didn't explain this clearly [05:42]
surial cyource: okay, well, whatever you're running? It cannot compile java code; if you're confused and thought you read somewhere you can intermix kotlin and java; they probably meant you can use java _LIBRARIES_ from kotlin. Like, you can use java.util.List from kotlin. You can't write java syntax. [05:42]
surial cyource: See how thinking twice about how to ask a question is worth doing? We're all so eager to help, we're rapid-fire guessing. It's fun. Feels like a gameshow. [05:43]
surial If one of us gets it right, you're on the hook for the prize money by the way. [05:43]
cyource Basically - there is a task in which I have to convert some Java code into Kotlin code - with a simple copy/paste from the code in the Java file into the Kotlin File (because IDEA automatically converts the code) [05:44]
surial cyource: IDEA did not convert said code. [05:44]
cyource surial: yes it can [05:44]
surial sure, but what you pasted was java code. [05:44]
dreamreal It CAN. Maybe it did not. [05:44]
dreamreal sighs [05:44]
cyource dreamreal: it did [05:44]
Matthijs No it did not. What you pasted isn't Kotlin code. [05:45]
surial boy this is like Pulling Teeth! ? the gameshow! [05:45]
cyource Matthijs: I KNOW THAT! [05:45]
bob_the_clown [2601:281:8703:8a80:e4af:9ecc:a513:f43d] has joined ##java [05:45]
leolrrj [2601:580:c000:8ba:84eb:7a7c:a721:109a] has joined ##java [05:45]
cyource I guess I didn't explain this clearly enough [05:45]
zeapo [] has joined ##java [05:45]
odinsbane Do you still have a question? [05:46]
dreamreal haha [05:46]
dreamreal sighs [05:46]
cyource odinsbane: No. But everyone, um, sorry for... all this. I'm off to #kotlin then. Bye# [05:46]
Matthijs Good luck [05:46]
dreamreal cyource: sorry, odinsbane's statement was funny :) [05:46]
surial We've killed em with kindness. [05:47]
surial asfdd: That's some amazing armchair libertarianism in your /quit quote there, idiot. [05:47]
dreamreal well, if you're going to steal that's a good way to do it [05:47]
Munnu [] has joined ##java [05:48]
Matthijs surial: Tokkies everywhere [05:48]
dreamreal and since it doesn't say "all taxation is theft" it would be insidious to detect the level of theft [05:48]
surial dreamreal: It does posit that taxation can be theft. ANd it implies that ALL taxation is theft. [05:50]
surial insinuates? Yeah, I like that word better here. [05:50]
dreamreal it doesn't say that, no [05:50]
surial Hence the word 'insinuates'. [05:50]
dreamreal You are inferring it - the statement itself doesn't necessarily carry that meaning [05:50]
dreamreal taxation can be theft != taxation is theft [05:51]
dreamreal but if you're going to steal, make it by taxation [05:51]
surial Taxation is by definition legal, so the statement is already horseshit if analysed without looking for the implication. [05:54]
CedricBeust [unaffiliated/cbeust] has joined ##java [05:54]
mEck0 [] has joined ##java [05:54]
dreamreal thus the insidious nature of the theft. [05:54]
dreamreal is, BTW, a libertarian [05:55]
surial dreamreal: you normally outgrow that phase. [05:55]
slopaxy [] has joined ##java [05:55]
asfdd [] has joined ##java [05:55]
dreamreal depends on what those terms mean. [05:55]
dreamreal If you think "libertarian" means Ayn-Rand acolyte to the death, no taxes EVAR, gummint sucks, nobody kin tell me nuffin'... that's not actually what being a libertarian means. [05:56]
dreamreal I spent about 15 minutes in THAT phase when I was 17 or so. [05:57]
surial dreamreal: Let's put it this way: Whilst it wasn't explicitly said, someone who has that /quit message, strikes me as someone who probably is in THAT phase. [05:58]
dreamreal maybe so. But as someone who's regularly accused of being in that phase because of the willingness to claim a label that does NOT mean that phase... [05:58]
dreamreal to me it struck me as just a statement. [05:59]
surial Evidently. [05:59]
surial I'm currently on a 'basic income or we're all fucked' kind of political vibe. [06:00]
dreamreal to me, the people who are in the phase are more likely to say "hands off mine, suckers, and it's all mine! NO RULES FOREVA!" [06:00]
surial 'you can pry my copy of Atlas Shrugged from my cold dead hands. Did you see my machine gun collection?' ? yeah, just so we're clear, I didn't accuse you of that either. [06:01]
dreamreal I know. But that's the impression people have of libertarianism, and it's... inaccurate. [06:01]
Maldivia ... libertarian... is that something similar to librarian ? [06:02]
Gurkenglas [] has joined ##java [06:03]
dreamreal Maldivia: alas, no, what with having different letters and word roots and all [06:03]
surial I can't make a judgment leap that that quit message implies certain things, but when I joke about it, you go on a tirade that people misconstrue the term. Feels like you're using two different yardsticks here, but, hey. I empathize with your plight. [06:03]
dreamreal but many libertarians love libraries! [06:03]
dreamreal surial: *shrug* it's a message *I* get tired of hearing, too [06:03]
surial dreamreal: Them state-funds-wastin' thingies wit' dem books that question The Jesus? Burn em alL! [06:03]
Maldivia dreamreal: but but... what about that thing, that you just need to see the first few letters and last few letters, and the rest of the letters doesn't really matter [06:03]
dreamreal notes that he's jewish [06:04]
sl33k [] has joined ##java [06:05]
surial dreamreal: you're not on ##java-talk, are you? Because that whole 'libertarians love libraries' thing, that sounds like a bunch of bullshit in a bag. [06:05]
surial But we've kinda strayed from the topic here I think. [06:06]
ZeNEX [] has joined ##java [06:06]
dreamreal I'm not, but I'd be surprised if a libertarian didn't love libraries [06:06]
dreamreal besides, I said "many" and not "all" [06:07]
surial dreamreal: Which door? (A) the government should arrange for additional funds/subsidies for the library, (B) the library should somehow manage to fund itself, (C) I hadn't thought this through yet (D) You haven't thought this through yet. [06:07]
ADubhlaoich [gateway/web/] has joined ##java [06:07]
dreamreal surial: A and B, of course. [06:08]
dreamreal Was that a trick question? [06:08]
surial dreamreal: The doors are mutually exclusive. [06:09]
dreamreal not at all. [06:10]
surial dreamreal: a libertarian being in favour of government providing libraries is just weird. The belief that a library can fund itself is also quite weird. [06:10]
dreamreal The government should fund libraries, because they're a common resource that establishes the basis for a common culture; the library should work to represent local interests. [06:10]
dreamreal see? You don't know what libertarian is. [06:10]
dreamreal moves on. [06:10]
mebigfatguy do people still use libraries? [06:10]
Lone_Rifle [gateway/web/freenode/ip.] has joined ##java [06:11]
selckin no, only containers [06:11]
odinsbane with maven... [06:11]
mebigfatguy i just assumed it went the way of shopping malls [06:11]
surial dreamreal: You don't own the term. [06:11]
surial dreamreal: Take Gary Johnson. He's not gonna agree with you on this. [06:11]
dreamreal is okay with that. Libertarianism doesn't imply that every libertarian feels the same on every issue. [06:11]
surial And that wasn't claimed either. [06:11]
dreamreal I didn't say it was. [06:12]
yawkat My siblings looove libraries. [06:12]
surial But you did claim that 'most libertarians love libraries', and I'm sticking to my: bullshit! call on that. [06:12]
Lone_Rifle good day. to exemplify my current frustration working with a particular column-oriented data store, let me point you to its Java client API. [06:12]
Lone_Rifle [06:12]
yawkat There's still a certain audience for them. [06:12]
surial yay java questions [06:12]
dreamreal laughs [06:12]
surial Lone_Rifle: that's been minified. [06:12]
Lone_Rifle no... it's not [06:12]
mebigfatguy pretty [06:12]
surial Yes yes. I refuse to believe it has not been. [06:12]
yawkat Or decompiled [06:13]
Lone_Rifle suit yourself. you want me to post a similar example in its C client? [06:13]
selckin maybe they use an ast editor :) [06:13]
Maldivia just becaues it's the "original", doesn't mean it hasn't been [06:13]
surial Lone_Rifle: Are you shitting me? You cannot possibly use this library. It's like going to a bakery, seeing the baker shit on the floor right as you walk in, and buying bread there anyway. You dont KNOW the bread's unsanitary, but, at some point the circumstantial evidence is sufficient to run for the hills. [06:13]
Lone_Rifle surial: [06:13]
mebigfatguy what db uses port 5010 [06:14]
yawkat Woow, revision history at the bottom [06:14]
Lone_Rifle ^ // remove more clutter [06:14]
yawkat It may actually be legit wtf [06:14]
dreamreal mebigfatguy: telepath, looks like? [06:14]
odinsbane Lone_Rifle: what is the point? [06:14]
dreamreal avaya? [06:14]
Lone_Rifle odinsbane: to exemplify my frustration. that is all. [06:15]
Maldivia Lone_Rifle: well, you probably have some actual documentation somewhere... in this case, source is obviously not meant as docs [06:15]
Byteflux Anyone know what might cause a call to ConcurrentHashMap#put() to cause what appears to be a deadlock? Relevant thread dump: [06:15]
Lone_Rifle Maldivia: i'm... just going to stop for now. [06:15]
surial mebigfatguy: offtopic. Commonly known is that 5010 is used by some malware called 'telepath'. [06:15]
surial Byteflux: top thread is part A of the supposed deadlock, but there are a lot of threads. Did you find the other? [06:16]
odinsbane Byteflux: are you synchronizing on the map anywhere. [06:17]
surial I see lots of scheduledthreadpoolexecutors in LockSupport.park.. [06:17]
selckin Maldivia: lol looks like they are actually serious about this [06:17]
selckin selckin's title: "Cookbook/InterfacingWithJava - Kx Wiki" [06:17]
surial odinsbane: obviously not, it's about LockSupport.park(), which is a lot like synchronized but not with synchronized. [06:17]
yawkat Byteflux: can't see that paste on hastebin, but if there's a concurrent atomic operation like compute it may block [06:17]
surial line 3585. [06:18]
surial Byteflux: you do not have a deadlock. [06:18]
Byteflux yawkat: nah it's just a simple put, not a computation [06:18]
surial Byteflux: the thread listed in line3585 of your dump is waiting on the first thread in the dump, but the first thread is.. just parked. [06:18]
Byteflux surial: is it just taking a long time then? (the "watchdog" kicks in after a period of unresponsiveness) [06:18]
Tachyon_ [] has joined ##java [06:18]
Lone_Rifle selckin, Maldivia: this is what happens when an APL-er insists he is right and everyone else has it wrong. [06:18]
surial admittedly, just parking for shits and giggles is not behaviour that .put() ought to be doing so that IS quite weird. [06:18]
milkman [] has joined ##java [06:19]
selckin Lone_Rifle: thik the code is autogenerated maybe ? [06:19]
Lone_Rifle selckin: no.. it hasn't. the guy really writes (and talks) like that. [06:19]
surial Byteflux: if your VM is almost out of resources I can see how this could happen. [06:19]
Byteflux I've had that same error occur through different code paths, but always the same originating code base. [06:19]
selckin Lone_Rifle: stay away then [06:19]
Lone_Rifle selckin: can't - users [06:19]
Byteflux surial: Like potentially memory? [06:19]
surial Byteflux: well, whatever you spplied to the VM for the -Xmx param. [06:19]
Byteflux Do you think a leak might cause these sort of side effects? [06:19]
surial (That'd be the max amount of memory the VM is going to allocate from the OD). [06:20]
surial Byteflux: possible, but not particularly likely. I'm still going through it. It's.. weird. [06:20]
Byteflux Excessive number of threads perhaps? [06:21]
Byteflux There does seem to be a lot of threads... not really sure why [06:21]
Maldivia Byteflux: well, seeing you have YourKit attached -- any info from there? [06:23]
surial Byteflux: If you google around for this problem there are various ways you CAN deadlock it. [06:23]
Byteflux Maldivia: I wasn't in a session at the time :( but I will check now on the production instance to see if there's anything suspicious. [06:23]
surial Byteflux: you have an executorpool, it spawns lots of threads because that is efficient from a CPU perspective. [06:23]
zozeo [] has joined ##java [06:23]
Byteflux surial: Yeah, like yawkat said, self referencing atomic operations is one possibility [06:24]
surial Byteflux: and the concurrenthashmap impl (I just looked) locks on itself (and as that hashmap instance is also known to other code, if that code ALSO locks on it, deadlocks can happen), but it doesn't use the normal locking mechanism, but Unsafe.park. And who knows what that does... [06:24]
Byteflux That's native so yeah... implementation specific :( [06:25]
yawkat It may just be high-traffic code with lots of time spent in put so it happens to dump there [06:25]
Byteflux I thought that could be the case too, but the server doesn't seem to ever recover from it. [06:26]
Byteflux Seems like an indefinite hang. [06:26]
yawkat And I thought chm parked on map nodes, not the whole map? [06:27]
Maldivia it des [06:27]
Maldivia the LockSupport.part is called in an instance of TreeBen [06:27]
Maldivia Bin* [06:27]
surial oh shit, I missed that. [06:28]
Maldivia (I fail at writing today) [06:28]
surial I saw Unsafe.park(this), didn't realize I was in an innerclass there. [06:28]
surial Maldivia++ [06:28]
surial maldivia has a karma level of 143, surial [06:28]
lisak [] has joined ##java [06:29]
lisak hey, anybody played with JVM shutdown hooks? Here's the problem, I have microservices that communicate only through kafka therefore they lack any http interface and they are simply part of docker container's lifecycle ... and I need them to perform an action when container is stopped, documentation says that jvm shutdown hook is not triggered on process KILL which I'm not sure I can rely on in this environment [06:30]
Maldivia lisak: you can never rely on a shutdown hook [06:30]
mofai [] has joined ##java [06:30]
lisak are there any alternatives apart from http interface in that case ? [06:31]
lisak I find it strange that this is not a common problem nowadays [06:31]
selckin its triggered on kill, just not kill -9 [06:31]
Maldivia lisak: what if someone pulls the plug on the computer? what if the CPU suddenly is fried? [06:31]
Lengsdorfer [unaffiliated/lengsdorfer] has joined ##java [06:31]
lisak yeah sure in these cases it's just a shame ... [06:31]
lisak this is more about controlled shutdowns [06:32]
Maldivia lisak: for normal exits of the JVM, then yeah, the shutdown hooks should run, but what kind of server is this -- app server? [06:32]
lisak cluster restarts and such [06:32]
Serpent [] has joined ##java [06:33]
lisak all the microservices are just docker containers with a simple jvm app [06:33]
Maldivia ok, so nothing standard -- then I guess a shutdown hook could work [06:33]
Iskarlar [] has joined ##java [06:33]
lisak I guess I'll do some testing, I was wondering about alternatives apart from doing that over http ... can't think of anything though [06:34]
surial lisak: If the microservice container hardkills the VM, there's really nothing java can do about it. [06:34]
Maldivia javadoc Runtime.addShutdownHook(*) [06:34]
surial lisak: if it normal-kills then Runtime.addShutdownHook will work just peachy fine. [06:35]
Maldivia why have you forsaken me! [06:35]
surial But as was said, you really shouldn't rely on those things. It's really shitty if a sudden hard-shutdown means your entire stack is now borked util someone manually goes in and fixes it. [06:35]
Maldivia lisak: -- read what the docs says, about for what kind of exits they are run [06:35]
Vacuum_ [unaffiliated/vacuum-/x-6306216] has joined ##java [06:36]
selckin couldn't that threaddump not be a deadlock? [06:37]
Vacuum_ Q: You have array in side arrays : [1,2,3,[4,[5,6]]]. The lenght and depth is unknown, How do you print the numbers as 1,2,3,4,5,6? [06:37]
selckin homework [06:38]
selckin Homework is meant to be done by YOU, so that YOU learn something. Stop cheating; we don't like doing our own, why should we do yours? Also, answering homework questions is extremely frustrating. See "~why no homework" for more reasons why we won't answer your questions. [06:38]
Vacuum_ selckin: not homework [06:38]
Maldivia Vacuum_: so you're saying you have an Object[] that contains either Integer or other Object[] ? [06:38]
Vacuum_ Maldivia: yes [06:38]
Maldivia Vacuum_: recursively seems to be the way then, with instanceof checks [06:38]
Vacuum_ Maldivia: wait no. I think its xDimentional array [06:39]
Vacuum_ Maldivia: what you said can be correct too. [06:39]
Vacuum_ Maldivia: let me write some psdudo code and show you. Thats what I had in mind but it has some issu. THe arra, if, in stack. it will stack overflow. [06:40]
selckin couldn't that threaddump be normal operation for the map, and it dumped it for some other reason, doesn't seem to be the jvm deadlock detection? [06:40]
Maldivia Vacuum_: well, then don't do recursive, then use a stack and a loop [06:40]
Vacuum_ Maldivia: ok, I am going to code somethin. Would you like to participate? [06:42]
Maldivia no [06:42]
dreamreal haha [06:42]
dreamreal Vacuum_: so flatten the lists. [06:42]
dreamreal this is a fairly common pattern. stack overflow has examples. [06:43]
dreamreal next [06:43]
dreamreal Another satisfied customer. Next! [06:43]
selckin dreamreal wants to participate, contact him on skype [06:43]
dreamreal not a chance, I already helped him by handing him the answer. [06:43]
dreamreal off to take the lad to school [06:43]
Krisostoomus [unaffiliated/kristjan85] has joined ##java [06:47]
Ener2_ [gateway/web/freenode/ip.] has joined ##java [06:50]
Iskarlar [] has joined ##java [06:51]
Vacuum_ dreamreal: Maldivia I bloody failed to answer this question properly with an interview with amazon recruiters [06:51]
Vacuum_ Vacuum_'s title: "Tue Aug 23 2016 15:42:46 - Code - Codeshare" [06:51]
Ener2_ in jpql is there a way to set value to field to be x, x+1, x+2, x+3 based on sort? [06:51]
vitimiti [unaffiliated/vitimiti] has joined ##java [06:51]
Ener2_ Vacuum_: you know you can just use stack structure instead of java stack for that? [06:52]
Maldivia Vacuum_: [06:53]
Vacuum_ Ener2_: stack structure? whats that? [06:54]
Maldivia Vacuum_: look at my example [06:54]
surial Vacuum_: what you did is.. nothing. just some fields. [06:54]
surial Vacuum_: no wonder they failed you for that. [06:54]
Ener2_ Vacuum_: you can also use Stack<Object> instead of ArrayDeque<Object> [06:55]
Ener2_ but that was rather primitive question though.... [06:55]
surial Vacuum_: Maldivia kept the recursive approach, except instead of calling yourself, there's now a loop, and the 'state' is now stored in a collection instead of on the instruction stack. This accomplishes nothing except the ability to control the memory allocation of the collection, which makes all the difference, as heap is orders of magnitude larger than stack. Problem solved. [06:55]
Ener2_ you can always transform any recursion into iteration [06:55]
mEck0 [] has joined ##java [06:55]
surial And, yes, this approach (take your code, put a loop around it, replace the recursion call with 'add me to the pile', and have a collection to represent said pile) works for all recursion. [06:56]
Vacuum_ Ener2_: hm [06:57]
Vacuum_ surial: Maldivia hmm [06:57]
surial Vacuum_: In this:, if the first 15 lines of that paste is what amazon gave you, they were specifically looking for Maldivia's solution. [06:57]
Vacuum_ surial: ignoring stack, wasnt my approach correct? [06:57]
yawkat Your signature is broken [06:58]
surial Vacuum_: All I can see of your approach is line 19-30 in the paste which has no code. It just defines a structure that has absolutely no point or purpose for the assignment. [06:58]
surial surial's title: "Tue Aug 23 2016 15:42:46 - Code - Codeshare" [06:58]
surial Vacuum_: so, heck no, your approach was way wrong. [06:58]
yawkat Integer[] can't nest [06:58]
Ener2_ also what is with the initial code? That is not correct java at all [06:58]
momomo [] has joined ##java [06:58]
surial Vacuum_: and that, the original code (liens1-16) is incorrect; it'd have to be passed an Object[]; an Integer[] cannot contain Integer[]. [06:58]
surial Vacuum_: there's so much wtf going on here. [06:59]
Vacuum_ surial: amazon gave me first 4 lines [06:59]
Ener2_ ah okay, then you had it wrong completely [06:59]
Vacuum_ surial: I corrected lin 9 [06:59]
canton7 you're missing a brace after that else as well... [06:59]
surial Vacuum_: okay. What you did is fucked up in two ways. Object[] was required instead of Integer[] there; your exmaple didn't even compile. [06:59]
surial Vacuum_: Here are the thought processes of whatever engineer reviewed this: Okay, recursion; cutesy but we really care about pragmatism in the face of huge inputs, and recursion is notorious for not handling that well. This guy made a small mistake in picking this route given that we, here, at amazon, care a lot and a good researcher would have known this. But, hey, 9 points out of 10. Except.. wait, this code doesn't even [07:01]
surial compiler. This fuckwad has the gall to waste my time posting code that HE DIDNT EVEN TAKE THE EFFORT TO COMPILE? Fail. Next candidate! [07:01]
canton7 pretty sure .instanceOf() isn't a method either :P [07:01]
Vacuum_ surial: isnt this correct syntax? if(array[i] instanceOf Integer){ [07:01]
surial Vacuum_: see where you went wrong? It's not so much picking the wrong approach, it's.. the little details. [07:01]
Mr0dus [] has joined ##java [07:01]
surial Vacuum_: it is, but array is of type Integer, which means it CAN ONLY CONTAIN Integer instances (and null); Integer[] cannot itself contain another Integer[]. [07:01]
surial Object[] CAN. [07:01]
surial Integer[] is an instanceof Object. It is not an Instance of integer. [07:02]
surial Vacuum_: compile your fucking original, dude! [07:02]
Vacuum_ surial: the inteview was on code share just testing my algorythm, not syntax [07:02]
surial Vacuum_: So (A) your original did not compile and any interviewer worth their salt will instafail you for lack of attention to that kind of detail. That was your real problem. Now, _SPECIFICALLY TO YOUR APPROACH_, (B) if your code did work in the first place, it does indeed ahve the problem that it fails with memory issues if the input is deeply nested. [07:02]
Vacuum_ surial: its an object array [07:03]
surial Vacuum_: it is NOW. [07:03]
surial Vacuum_: It wasn't when we started out here. [07:03]
surial Vacuum_: If an interviewer fails you straight up for picking the recursion approach, that's weird and a sign that interviewer is way too obsessed with right vs. wrong. More likely, the interviewer raises the point that this approach does not handle deeply nested inputs well, and then just watches what you do. [07:04]
Vacuum_ surial: yes, i was more concentrating on algorythm, not syntax [07:04]
surial Vacuum_: I give you a 2 out of 10 here, where I don't hire until I get an 8; a 6 or 7 for junior positions. [07:04]
canton7 Vacuum_, while the algorithm may be valid, there are a good 3 or 4 syntax errors in 6 lines of code, which is pretty bad [07:04]
Mr0dus parted the channel: [07:05]
surial Vacuum_: (A) didn't compile. (B) this codeshare example is unclear about input vs. what you're doing (being careful and clear is the lifeblood of a programming shop. I care 10% about the ability of an interviewee to nail the algorithm and 90% about how that interviewee goes about it. And at least if this was an interview, this interaction with you and the regulars in this channel, you're failing at it). [07:05]
Ener2_ Vacuum_: my take [07:05]
Vacuum_ the answer was, you did correct algo but theres a stack issue. I was unable to solve the stack issue. I did the lin 23 with same recursion approach and was not able to complete in 30 mins [07:05]
Vacuum_ surial: ^ canton7 [07:05]
surial Vacuum_: For example, you have : What vacume_ did in lines 21-27 and that is no code, just a structure. wtf do I do with this? If I run that, it does nothing, as there is no method to run. [07:05]
tuskkk___ [gateway/web/] has joined ##java [07:05]
yawkat Well yea if you cant derecurse that solution that's bad [07:06]
surial Vacuum_: Maldivia posted an example that replaces recursion with looping. Ener2_ just did too, and I and Ener2 and maldivia all explained how you can always replace recursion with stack collection + loop, and I explained how this moves the state from stack memory to heap memory which is nice as heap is many orders of magnitude larger. Did you read any of it? I suggest you review these logs. Lets move on to another question. [07:06]
Mr0dus [] has joined ##java [07:06]
yawkat It's a decent example of derecursing a non-tail-recursive function [07:07]
yawkat You should know how to do that [07:07]
Ener2_ heck, some languages (scheme) can make tail call recursion into loop internally [07:07]
canton7 heh, I literally had to edit every single line in order to get that to compile [07:07]
Vacuum_ Ener2_: hm [07:07]
Mr0dus parted the channel: [07:07]
Ener2_ Vacuum_: do you have any compsci background? Stack as memory model and stack as data structure should have been covered (we had scheme for recursion basics where this was exactly explained) [07:08]
Vacuum_ surial: what if its xDimentional array in the first place and we have to have recurse in primiteves/stack space? [07:09]
surial Vacuum_: so what? [07:09]
surial Vacuum_: if you MUST use recursion, then your original solution (minus all the typos) would do it. What if you had to stand on your head? Wtf kind of question is this? [07:10]
Vacuum_ don't you think stackoverflow issue is there? [07:10]
surial Vacuum_: Yes, if you MUST use recursion you HAVE a stackoverflow issue. [07:10]
surial By definition. [07:10]
surial Avoid the stackoverflow issue but use recursion is like asking: Draw a circle, but, you know, with corners. [07:10]
Vacuum_ ok. So recursion ... is all that made SO (stackoverflow)? [07:10]
Vacuum_ thats all? [07:11]
Ener2_ Vacuum_: not really [07:11]
canton7 "Issues with the following approach: stack overflow if array is too long and deep." <-- that's because of the recursion [07:11]
surial Vacuum_: Yes. [07:11]
Vacuum_ ok. so recursion makes the SO? [07:11]
surial Vacuum_: Yes. [07:11]
Vacuum_ why is that? [07:11]
Ener2_ Vacuum_: you can reach stack depth without recursion, if you have that deep stack call... [07:11]
Vacuum_ thats my main question here? [07:11]
surial Vacuum_: Y.E.S. [07:11]
surial Vacuum_: The fact that your implementation calls itself is why that amazon reviewer made that comment. [07:11]
canton7 because each time you recurse, you eat into the stack. If you do that too many (the array is too deep), you run out of stack [07:12]
yawkat Stack overflow is usually caused by some form of recursion, or similar concept. [07:12]
Vacuum_ I will understand Ener2_ and Maldivia's code for sure [07:12]
Vacuum_ canton7: ah, so recursion is never in heap? [07:12]
Vacuum_ canton7: ah, so recursion is never in heap? and foreach loops/iterations ARE? [07:13]
surial Vacuum_: you are just throwing words around now. [07:13]
surial Vacuum_: foreach loops consume neither heap nor stack. They just loop. [07:13]
Ener2_ Vacuum_: look, stack overflow happens because memory reserved for stack was exhausted [07:13]
Ener2_ that is all [07:13]
Ener2_ it doesnt matter if it was reserved on c stack or from heap [07:13]
canton7 huh? every time you call a method, stuff ends up on the stack [07:13]
surial Vacuum_: however, as you can see from maldivia's / ener2's examples, you have to store this state SOMEWHERE. If you recurse, it's in the local variables of each call, and those are on stack. Ener2/maldivia's code does not call itself, there's no recursion, but they still have to store it somewhere. Their code has a collection object. Which are always on the heap. [07:13]
Ener2_ canton7: depends on the vm [07:14]
tonyacunar [] has joined ##java [07:14]
Peste_Bubonica [] has joined ##java [07:14]
canton7 ok, assuming the method being called has local variables [07:14]
canton7 and assuming you're not tail calling [07:14]
Vacuum_ surial: so recursion here stores vars in primiteves-stack and iteration here stored as objects in heap? [07:15]
surial Ener2_, canton7: Er, what? No it doesn't. On any VM that passes the TCK that exists today, calling a method, even if you tailrecurse or have zero locals, consumes some stack space. [07:15]
surial Vacuum_: no, you don't get it at all. [07:15]
surial Vacuum_: forget this code for a moment. [07:15]
Ener2_ surial: isn't that vm dependant? I mean I can make java vm that will allocate java stack on heap [07:15]
surial Ener2_: no you can't. [07:15]
a3Dman [unaffiliated/a3dman] has joined ##java [07:15]
surial Ener2_: the stack is the stack by definition. As far as the OS is concerned it's all 'heap'. [07:16]
Ener2_ surial: err no? [07:16]
cube-_- [unaffiliated/cube---/x-9825553] has joined ##java [07:16]
surial Vacuum_: You're writing some random java code. You do this: void test() { System.out.println("Hello!"); System.out.println("Goodbye!";" } [07:16]
surial Vacuum_: that's all you do. [07:16]
Ener2_ surial: processor by itself uses stack part of the memory [07:16]
Ener2_ which is why stack is even used as concept [07:16]
surial Ener2_: .. as pointed to by the stack pointer, which is just in memory. [07:16]
Ener2_ sure ;) [07:16]
surial Vacuum_: Now, after the call that prints hello, what happens? [07:16]
surial Vacuum_: does the code just.. go to the println method and from there it just forgets and, er, just exits I guess? What happens? [07:17]
Ener2_ good old basic with only goto [07:17]
Vacuum_ surial: hello world is a string in heap [07:17]
surial Vacuum_: you're being an idiot. please stop. [07:17]
surial Vacuum_: I asked a simple question. [07:17]
Vacuum_ hm ok [07:17]
surial Vacuum_: the code begins execution, finds the println method, goes to exectue it, that method prints 'Hello!', and then what. What happens here. [07:18]
surial Hello! has been printed, and now what does the println method do? [07:18]
Ener2_ Vacuum_: why did you even apply for amazon? Not trying to disrespect you, but... [07:18]
yawkat I guess an inlined call may not consume stack space. [07:18]
surial Does it somehow know where your code live and jump to it? [07:18]
Vacuum_ it calls the System.out.printmethod. somehting happes to stdout. done [07:18]
surial Vacuum_: define 'done' here. [07:18]
surial Vacuum_: Does the JVM exit? [07:18]
Vacuum_ surial: the method? its just line of code in memory. no? [07:19]
surial Vacuum_: sure. [07:19]
Vacuum_ the 'stack' memeory? :) [07:19]
surial Vacuum_: we're in println, at the very end. println is done (Hello! has already been echoed). [07:19]
surial Vacuum_: We're about to go to the } part. What happens here. Does the JVM exit? Does your computer play yankie doodle dandy? [07:19]
surial It's not a trick question. [07:19]
Vacuum_ vvm does nto exits [07:19]
surial right. It does something else. what? [07:20]
Vacuum_ garbage coll? [07:20]
surial christ. [07:20]
ljc [] has joined ##java [07:20]
Vacuum_ well, it just forgets the line of code. It shoudl. I dont know [07:20]
surial the right answer was: "It returns to the test() method". And you failed. miserably. you need to do a lot more learning. [07:20]
Vacuum_ returns the test()? [07:21]
surial no, it returns. [07:21]
surial That's it. [07:21]
Vacuum_ to what? [07:21]
canton7 *from the test() method [07:21]
surial println is done so code continues executing back at the test() method. [07:21]
Vacuum_ return to what? [07:21]
surial THE TEST METHOD. [07:21]
surial Vacuum_: You're writing some random java code. You do this: void test() { System.out.println("Hello!"); System.out.println("Goodbye!";" } <- [07:21]
surial that's where we started. that test method. [07:21]
Vacuum_ ok [07:21]
surial After the println("Hello") method finishes execution, code continues executing and the Goodbye line will run now. [07:21]
Vacuum_ then? [07:21]
surial How do you think this works? By sheer magic? [07:22]
Vacuum_ what are you tryting to explain? [07:22]
Vacuum_ the method memory? [07:22]
surial That the computer needs to remember, somehow, where to return TO. [07:22]
Vacuum_ in stack. the code is saved in stack memeory [07:22]
Vacuum_ no? [07:22]
surial when you call a method, you need to make a note somewhere that you need to get back here. you need tor emember. [07:22]
surial Not the code. [07:22]
surial a pointer. [07:22]
Vacuum_ pointer in memeory. [07:23]
Vacuum_ yes [07:23]
surial But THAT is the point you're too dense to pick up on here: Whenever you call ANY method, you can't just abandon your current method. Because after the method you called finishes execution we gotta get back to this one and finish it. [07:23]
Vacuum_ now we are talking assembly [07:23]
Vacuum_ hm [07:23]
surial So you need to remember (A) where THIS method lives, so the method we call can return to it, and (B) All the local variables, because we still need those to be there. [07:23]
surial Those live in the stack because if they just lived in a constant location, any method that called itself would end up overwriting the data from the original invocation and you couldn't then return to your previous call. [07:23]
surial we're not talking assembly, we're talking how computers work. [07:24]
Vacuum_ hm [07:24]
surial Now, WHERE does the computer store the location of this method (and the exact place we were when we called another method), AND all the local variables? [07:24]
Vacuum_ so duplicate methods and methdo vars are created in recursion? [07:24]
licnep [gateway/web/] has joined ##java [07:24]
surial 'in memory', of course. Specifically, in a part of memory we call 'the stack', and each thread must have one as each thread is executing methods. Each thread needs to store the call stack. The shit you see when you throw an exception. [07:24]
Vacuum_ in stack [07:24]
surial yes. [07:25]
Vacuum_ hm [07:25]
surial That's another good way to view this: if you throw an exception you get a stack trace with each line. [07:25]
canton7 depends on what you mean by a "duplicate method" [07:25]
surial That's.. not coming from a crystal ball. That's gotta be in memory somewhere. [07:25]
surial Vacuum_: _THAT_ is the stack. Now, because each thread needs one and memory is not free, stacks tend to be small. around 1MB or so. If you recurse 50000 deep, you're gonna run out. [07:25]
surial Vacuum_: anytime you call 'new', you are creating stuff in normal memory (it's not in the stack; things on the stack cannot be shared with any other thread, and you can share whatever the heck you please in java with anything else, so clearly, objects are alwasy on the heap. Thestack contains only primitives and pointers). [07:26]
Vacuum_ surial: line 9-16, I did nto used any variables/primitives that would not be used in a loop. Is it just about creating method references in stack that blows things up? [07:26]
Vacuum_ [07:26]
Vacuum_ Vacuum_'s title: "Tue Aug 23 2016 15:42:46 - Code - Codeshare" [07:26]
surial Vacuum_: the heap is.. gigabytes large. There's only one for the entire VM. [07:26]
surial Vacuum_: when a method calls itself, YOU HAVE RECURSION. stack is gonna blow. [07:26]
surial period. [07:26]
surial if at this point you still don't get it, you're beyond hope as far as my didactic skills are concerned. [07:27]
Vacuum_ threads cant share stack? [07:28]
sdegutis [unaffiliated/sdegutis] has joined ##java [07:28]
kicked sdegutis (User is banned from this channel) [07:28]
surial Vacuum_: by storing the state of where we were in that array as we walk through it in a collection (created with 'new', on the heap), and not implicitly in the stack by recursing and letting the state stay in that tower of local vars, we now have some GBs worth of storage for this thing instead of the few MBs the stack has. [07:28]
surial Vacuum_: no of course not. how the fuck would that work? [07:28]
Terabyte hey. If I have an object with 4 fields, and I don't make them final, and I have a constructor. Does java promise the visibility of those fields to other threads? [07:29]
ljc [] has joined ##java [07:29]
surial Terabyte: no. [07:29]
Terabyte (they're all initialised in the constructor) [07:29]
Ozymandy [] has joined ##java [07:29]
Terabyte no setters* [07:29]
surial Terabyte: if they are final, yes. [07:29]
Terabyte they're not final. [07:29]
Vacuum_ so by storing state of a method/pointer etc is all happening in stack? NOT talking about storing variables of data. [07:29]
surial Vacuum_: public void foo() { int x = 5; bar(); } [07:30]
surial Vacuum_: during the execution of the bar method here, the computer still has to store that 5 somewhere. [07:30]
Terabyte talking specifically about a special case with the constructor. obviously they're not necessarily visible with just a setter [07:30]
surial Vacuum_: we can't just get rid of it; when the bar() call returns, the foo() method continues execution and still needs to know that 5. [07:30]
Ener2_ Terabyte: you can access any fields on any object always [07:30]
surial Vacuum_: where is that 5 stored? Stack. The stack stores three things, and only three things: (A) parameters, (B) local variables, and (C) the instruction pointer; where the method was when it moved to another method; the place we have to return to continue execution. [07:31]
surial and in java, ALL non-primitives are pointers. [07:31]
Ragnor [] has joined ##java [07:31]
Terabyte Ener2_, ? not sure what you're talking about. not sure you're sure what i'm talking about. [07:31]
Vacuum_ surial: what if I use only Integer and not int [07:32]
Ener2_ .... [07:32]
Ener2_ lol [07:32]
surial Vacuum_: what difference does that make? You're.. very confused now I bet. [07:32]
Vacuum_ OH, so C was the majore thing [07:32]
surial Vacuum_: C? What?? [07:32]
surial you're just mumbling random nonsense at this point. [07:32]
Vacuum_ (C) the instruction pointer; where the method was when it moved to another method; the place we have to [07:32]
Vacuum_ return to continue execution. [07:32]
surial ah. [07:33]
surial that C. [07:33]
danijoo_ [] has joined ##java [07:33]
surial well, the only reason C is relevant, is that even if you have a method with zero local variables and no parameters, you still need some stack for the instruction pointer, so if you recurse, you can only do that until your stack memory runs out. [07:33]
surial in your example you have local variables (the int i of your for loop for example). [07:34]
Vacuum_ so recursion is not a good idea in any case? [07:34]
Ener2_ recursion is fine [07:34]
Ener2_ just know where to use it [07:34]
surial Vacuum_: it's fine.. just, there's a limit on how often you can recurse. a thousand or so times, max. [07:34]
canton7 it would have been fine for the question you were asked - the interviewer just wanted to know whether you could make a solution which wasn't recursive [07:34]
Vacuum_ surial: that int i is also needed in heap solutions. no? [07:34]
surial Vacuum_: No. [07:35]
surial Vacuum_: there's only one int i. [07:35]
surial not one PER recurse. [07:35]
KieronWiltshire [2a02:c7d:1a45:4a00:b966:7259:ae83:e6c] has joined ##java [07:35]
Vacuum_ surial: ok, so recursion is only good for 1000s [07:35]
surial Vacuum_: the heap solution needs a collectino of some sort. an arraydeque or list or something. [07:35]
surial But collections can be a lot larger than 'a few 1000'. [07:35]
Vacuum_ ok. understood . Now I will study the code of both helpers [07:35]
Vacuum_ surial: thansk for the effort. You have any feelance work to blow it up? I will do it. Searching for job [07:36]
surial Vacuum_: yeah, also, work on general common sense. [07:36]
Vacuum_ just kidding, a fact though. [07:36]
Vacuum_ hm [07:36]
surial Vacuum_: okay, or your humour timing :P [07:36]
Vacuum_ thanks! [07:36]
Vacuum_ bbls [07:37]
thinkpad [] has joined ##java [07:37]
Ener2_ do you ever feel like coding something for 2 hours, then your coworker tells you we wont need it so you git reset hard it and later they tell you "hey, you were right, we can use what you made"? [07:38]
Vacuum_ Q: what do php and javascript do in such cases? They would just blow up? [07:39]
Vacuum_ surial: ^ [07:39]
surial Ener2_: Never happens. I don't write a single line before 'git checkout -b something' and if someone says to fuck it, I'll just rename that branch so I know it's an abandoned sidetrack. [07:39]
surial Ener2_: every so often I clean those out. [07:39]
surial generally when the probable effort to git rebase master em is more than just rewriting the whole thing. [07:39]
Ener2_ surial: maybe I should do that then :x [07:39]
Lone_Rifle surial: but then what happens when they say they need it _after_ you clean out? [07:39]
Vacuum_ as php and JS do not differenceate in heap or stack [07:39]
surial Vacuum_: PHP and javascript are the same as java. [07:39]
canton7 or at the very least, shove it in a stash [07:39]
Vacuum_ I think. [07:39]
canton7 Vacuum_, try it [07:40]
Vacuum_ hm [07:40]
Ener2_ surial: eh, depends on the implementation, no? [07:40]
Vacuum_ ok. so same solution goes for them too [07:40]
Vacuum_ bbl [07:40]
surial Vacuum_: there's ONE trick a language can do to make recursion not blow up stack and it's aclled 'tail call optimization'. It's.. mostly irrelevant, and trying to learn that given your current state of java knowledge is like trying to explain to someone who just read 'See Jack Run' the intricacies of Dostoyevski. [07:40]
Ener2_ surial: js can store stack itself on heap, therefore you have stack less limited than using c stack [07:40]
surial Ener2_: you keep saying this shit and it keeps being an irrelevant distraction. [07:41]
surial The CPU just has memory. [07:41]
surial that's it. [07:41]
Ener2_ but os declares part of it stack [07:41]
surial If you want to really really REALLY inefficiently emulate it all, you can live-grow that stack which is harder when the CPU is doing the execution directly, but javascript isn't conforming to your view of 'it's just one emulated slow-ass blob'. There are optimizers and hotspot and JIT and all that jazz and they have the same issues. [07:41]
Lone_Rifle surial++ [07:44]
liefer [] has joined ##java [07:44]
Fuchus [] has joined ##java [07:44]
bob_the_clown [2601:281:8703:8a80:e4af:9ecc:a513:f43d] has joined ##java [07:46]
Matthijs Ener2_: git reflog [07:47]
canton7 not useful if he never committed [07:47]
Ener2_ didnt commit :( [07:47]
Iskarlar [] has joined ##java [07:48]
interki [] has joined ##java [07:48]
Gluesticky [unaffiliated/gluesticky] has joined ##java [07:49]
ibouvousaime [] has joined ##java [07:50]
ibouvousaime if an outer class A extends a class B does a class C automaticly extends the class B ? [07:51]
AtumT [] has joined ##java [07:51]
yawkat no. [07:52]
Fuchus why don't you test it for yourself? :) [07:53]
selckin where does c come from [07:53]
thebope [pdpc/supporter/student/thebope] has joined ##java [07:56]
mEck0 [] has joined ##java [07:57]
leolrrj [2601:580:c000:8ba:49e1:95a9:416d:24e] has joined ##java [08:01]
KaliLinuxGR [unaffiliated/kalilinuxgr] has joined ##java [08:01]
codeman [2804:14c:170:2019:dd2a:c64e:2278:668a] has joined ##java [08:03]
Vacuum_ surial: do you think/have any idea if amazon reconsiders rejected candidates in future again? [08:03]
Krisostoomus [unaffiliated/kristjan85] has joined ##java [08:03]
Krisostoomus Hello [08:03]
Krisostoomus Does anyone know, how to send DLR-s with gescobar smpp-server implementation? [08:03]
yawkat Vacuum_: i think amazon is notorious for above-average recruitment requirements because working there is so massively overhyped. try somewhere else at your level of knowledge. [08:04]
Krisostoomus and how to send the DLR-s the right way? [08:05]
selckin and people have some horror stories from amazon [08:05]
robscow yawkat, oh don't say that, they're calling me shortly :) [08:05]
Vacuum_ yawkat: so once rejected is rejected for eternity? I assume they would have records [08:05]
Vacuum_ selckin: horror? [08:06]
gjvc [unaffiliated/gjvc] has joined ##java [08:06]
yawkat who cares anyway? lots of other companies out there [08:06]
Anthaas Isn't there an entire website from people who work/used to work at Amazon about how terrible they are? [08:07]
selckin sounds like the job was above your level anyway, so should be an option again in a few years [08:07]
Krisostoomus has anyone else been in the same situation like me? [08:07]
Anthaas Like, isn't it notoriously bad? [08:08]
selckin thats definitly a rep they have from people like me tha tonnly read news and not directly connected [08:08]
surial Anthaas: That was about the people working in the warehouses. [08:09]
surial Anthaas: If your moral compass is sufficiently dampened or you really just don't give a shit, that shouldn't be an issue. [08:09]
Tichodroma thinks this is not related to Java [08:09]
surial Tichodroma: java job opportunities are related enough. [08:10]
Tichodroma I don't think they use Java in the warehouses [08:10]
surial Tichodroma: exactly. [08:11]
yawkat only in data warehouses. [08:11]
Krisostoomus has anyone programmed a smpp server in java? [08:12]
Anthaas surial, Ahh, I think it was The Face of Amazon or something, there were a load of posts, so I didn't bother reading through many of them. I can see that being the case, though. [08:12]
Krisostoomus how to send dlrs? [08:12]
selckin from mostly hackernews reading, amazon seems like the bad form of netflix [08:13]
crunchiebones [] has joined ##java [08:13]
selckin but who knows! [08:13]
yawkat it's a big company. some people will have good experiences, some bad. [08:14]
gravitation [] has joined ##java [08:15]
Ozymandy [] has joined ##java [08:17]
Ozymandy No Spring WebApplica [08:17]
Ozymandy tionInitializer types detected on classpath [08:17]
Ozymandy What is wrong [08:17]
Ozymandy I have in web-inf dispatcher-servlet.xml [08:18]
Ozymandy java.lang.IllegalStateException: No such servlet: dispatcher [08:18]
Vacuum_ surial: what if the array was, I was think, a primitive int x Dimentional array? Secondly, I recall the interviewer said something about 'tree' like structure. Does that rings a bell? [08:19]
silenced [unaffiliated/silenced] has joined ##java [08:20]
Vacuum_ selckin: what kind of horror? [08:20]
yawkat yes, your structure is a tree. [08:20]
Ozymandy Can anyone help me? [08:20]
Vacuum_ Anthaas: terrible? why would you say that? [08:20]
Vacuum_ yawkat: any datastructure in Java fits it? [08:21]
yawkat what? [08:21]
selckin Vacuum_: its a google away [08:21]
yawkat well treeset is a tree. but there are lots of kinds of trees [08:22]
Vacuum_ treeset etc but [08:22]
yawkat theyre one of the most important structures in computer science... [08:22]
Vacuum_ hm. its just for sorting I htink [08:22]
Vacuum_ I will look [08:22]
dreamreal heh [08:22]
Vacuum_ set.. cant have duplicates [08:22]
dreamreal Vacuum_: what are you trying to do? [08:22]
yawkat treeset is for sorting, yes. but trees arent, in general. [08:23]
yawkat dreamreal: he's trying to figure out why he failed an amazon interview. [08:23]
Vacuum_ dreamreal: my question is solved but here it is [08:23]
Vacuum_ Vacuum_'s title: "Tue Aug 23 2016 15:42:46 - Code - Codeshare" [08:23]
dreamreal and he has to ask? [08:23]
dreamreal "They said something about trees, sorting, I don't know. Now why did I fail?" [08:23]
dreamreal ... which answers itself quite well [08:23]
Vacuum_ dreamreal: what if the array was, I was think, a primitive int x Dimentional array? Secondly, I recall the interviewer said something about 'tree' like structure. Does that rings a bell? [08:23]
ibouvousaime if an outer class A extends a class B does an inner class C (inner to A) automaticly extends the class B ? [08:24]
yawkat tias [08:24]
yawkat and didnt we already answer that [08:24]
Iskarlar [] has joined ##java [08:24]
ibouvousaime yawkat: no [08:24]
ibouvousaime I asked the question badly [08:24]
ibouvousaime sorry [08:24]
yawkat i totally did. [08:25]
Lone_Rifle he rephrased the question - the answer is still no [08:26]
dreamreal Vacuum_: "primitive x Dimentional array"? That... means almost nothing. And tree structures do, in fact, "ring a bell" since they're horribly common and simple. [08:26]
_mirko_ [unaffiliated/-mirko-/x-2946915] has joined ##java [08:26]
Lone_Rifle ibouvousaime - you might want to read up on inheritance [08:27]
surial Vacuum_: I have no idea what 'a primitive int x Dimentional array' would be. [08:27]
dreamreal and the answer is that whoever created that structure broke things - it's a heterogenous structure, and that's ungood. But the answer was still to use Java. Flatten the structure, and print the elements. If it was a tree, it wouldn't be represented like that - and a tree would be easy to print, because it's a freaking tree. [08:28]
Vacuum_ dreamreal: "primitive x Dimentional array"? in[][][] arr = {1,2,3,{4,{5,6}}} [08:28]
dreamreal see, that's not a valid declaration. [08:28]
PlanckWalk Urk. [08:28]
Vacuum_ dreamreal: correction? [08:28]
surial Vacuum_: possibly what was meant is: A 2D or 3D array with the same sizes. So, for example, a 2D array of 5x4 would be {{1,2,3,4},{5,6,7,8},{9,10,11,12},{13,14,15,16},{17,18,19,20}}. Note how the outer contains only inner arrays and each inner is 4 elements large. [08:28]
Vacuum_ ah [08:29]
surial Vacuum_: If you know the 5 and the 4 you can just nest 2 for loops and be done with it, easy peasy. [08:29]
dreamreal see what surial said. [08:29]
Vacuum_ surial: yes [08:29]
surial Vacuum_: in[][][] arr = {1,2,3,{4,{5,6}}} <- this will not compile. [08:29]
Vacuum_ correct [08:29]
Vacuum_ my bad [08:29]
dreamreal in fact, you don't need the 5 and the 4. You can get it from the arrays: int[][][] x={ { { 1,2,3 }, {4,5,6} }, { { 7,8 }, { 9 } } }; [08:29]
dreamreal for(int[][] inner1:x) { for(int inner2[]=inner1) { for(int i:inner2) { print(i); } } } [08:30]
dreamreal but at that point it's a matter of nested homogenous arrays and not whatever the crap was you were talking about [08:30]
surial that too can be printed with a loop. The key reason you can do that, Vacuum_, is that you are given the guarantee that the whole thing is exactly N (given) deep, and each level is another level, except the final level, which is ALL ints. Whereas the origianal example of {1,2,3,{4,5},{6, {7, 8}}} doesn't have that: It's unknown deep and at each level you have both ints and new arrays. [08:31]
kwladyka [] has joined ##java [08:31]
surial now what dreamreal and others are driving at, is if you are somehow asked to do this in a _REAL_ code example, you'd turn it right the fuck around and go: Whoa, dude, wtf are you doing? That's no data structure to toss about! Come up with something better! [08:31]
dreamreal right, it's heterogenous. So your approach probably would have been *about* as good as one could do, given a terrible data structure that one would fail on review in any event. [08:31]
dreamreal ... i.e., what surial ALSO just said. [08:31]
surial (and that 'something better' is probably a tree, but, it depends on what that array represents). [08:32]
mohsen_ [] has joined ##java [08:32]
crunchiebones [] has joined ##java [08:32]
Vacuum_ hm [08:32]
dreamreal what they were PROBABLY looking for you to do was laugh and say "heh, for reals?" [08:33]
Vacuum_ surial: will there by any point in any of the above examples where recurssion would be unavoidable? [08:33]
dreamreal "I thought you guys would be competent." <-- earns a passing grade on THAT question [08:33]
zoraj [] has joined ##java [08:33]
bakwods_ [] has joined ##java [08:36]
mohsen_ I? encrypt a string using jbcrypt can I? decrypt it again to get the plain text? [08:38]
dreamreal Don't know, can you? [08:38]
weox [gateway/web/] has joined ##java [08:39]
Vacuum_ {1,2,3,{4,5},{6, {7, 8}}} doesn't have that: It's unknown deep and at each level you [08:39]
Vacuum_ have both ints and new arrays. [08:39]
dreamreal (and that's... not how bcrypt works) [08:39]
dreamreal Vacuum_: right, it's a broken data structure. Heterogeny. [08:39]
dreamreal you'd have to check the type of every element. Easiest way to do that IS with recursion. [08:39]
mdrabe [] has joined ##java [08:40]
Vacuum_ int[][][] x={ { { 1,2,3 }, {4,5,6} }, { { 7,8 [08:40]
Vacuum_ }, { 9 } } }; [08:40]
dreamreal and while it's possible that you could get a stack overflow with recursion, you'd have to have an incredibly deep structure for that to be the case. [08:40]
Vacuum_ will there by any point in any of the above examples where recurssion would be unavoidable? [08:40]
dreamreal Vacuum_: you could ALWAYS implement your own stack and do it without recursion. [08:40]
yawkat bcrypt is not an encryption function... [08:40]
ryordan [] has joined ##java [08:41]
Vacuum_ dreamreal: ya but first I have to convert that to some stack/queue [08:41]
Vacuum_ for that, need recursion [08:41]
dreamreal why? Just use recursion in the first place. [08:41]
dreamreal Why are they asking you to avoid recursion? [08:41]
Vacuum_ my aim is to avoid recursion [08:41]
mohsen_ dreamreal: I need to store a password and use it in some part of my program. [08:41]
dreamreal why? [08:41]
Vacuum_ stack of [08:42]
dreamreal mohsen_: so do so. [08:42]
mohsen_ in the future [08:42]
selckin recursion can always be rewritten to a loop [08:42]
dreamreal bcrypt means you're not storing the password, you're storing a representation of the password that is difficult to recreate. [08:42]
Vacuum_ selckin: give me an example for line 9-17 ? [08:42]
Vacuum_ Vacuum_'s title: "Tue Aug 23 2016 15:42:46 - Code - Codeshare" [08:42]
dreamreal sighs [08:42]
selckin Vacuum_: [08:43]
selckin or other things you cgoogle up [08:43]
mohsen_ dreamreal: So what tool should I? use for it? [08:43]
dreamreal selckin: no, no, he wants you to do it for him [08:43]
dreamreal mohsen_: for what [08:43]
dreamreal what's wrong with bcryupt [08:43]
surial mohsen_: The point of bcrypt is to obfuscate the input. [08:43]
Vacuum_ selckin: yes yes, dreamreal is correct, I want you to do it for me [08:43]
surial mohsen_: If it was reversible, it would have utterly fucking failed at the job and the entire exercise was quite pointless. [08:43]
dreamreal hahaha [08:43]
waz [pdpc/supporter/active/waz] has joined ##java [08:43]
dreamreal honesty++ [08:43]
dreamreal honesty has a karma level of 3, dreamreal [08:43]
selckin Vacuum_: well i want a milion dollars [08:43]
surial mohsen_: so, no, you can't 'decrypt' a jbcrypt. It's called a hashing operation, not 'encryption'. [08:44]
dreamreal hey, give him credit for bluntness :) [08:44]
Vacuum_ selckin: you must be working at amazon then. [08:44]
dreamreal Vacuum_: errr.. what? [08:44]
selckin Vacuum_: you're not gonna get a coding job for another year [08:44]
Vacuum_ dreamreal: my problem is solved. I was just finish curiosity [08:44]
interki [] has joined ##java [08:44]
Vacuum_ dreamreal: I aint. got rejegect for this question [08:44]
mohsen_ So what's the recommended way to store a password and reuse it in the future? [08:44]
dreamreal Vacuum_: if you ask me, it sounds like a weeding-out question. "We don't want to hire this fellow, let's give him a terrible question that has no answer so he'll fail." [08:44]
Vacuum_ surial helped me quite well [08:44]
surial mohsen_: what kind of job do you have here? If it's "I need to store passwords in my DB", then the answer is: "Actually, no, you don't, you need to store something in your DB you can use to verify somebody knows said password. Which is what bcrypt does for you, and you should use that". I assume you have another question, not "I need to verify passwords". [08:45]
dreamreal mohsen_: you... don't. You store a hash of the password and match it. [08:45]
Vacuum_ dreamreal: hm [08:45]
mohsen_ dreamreal: I don't have the password itself to match it, I'd have to use the stored string. [08:45]
surial mohsen_: if you need to store an actual password, as in, you need it, in plain text, later, for something else, the correct answer is: Rearchitect the fucking thing. You should never as a server need a password like this. If you really do, then you're fucked; you need to store it plain and go post an armed guard with a big machine gun in front of the server. [08:45]
dreamreal Vacuum_: for example, whining about recursion when you're given a heterogenous array of ints and arrays of ints... uh, the problem is the DATA STRUCTURE, recursion isn't likely to be deep enough to matter. [08:46]
surial mohsen_: the idea of bcrypt is this: You take the password, do something to it, and now you have a big number. I store the number. I can't go back from the number to the password, but given any input string I do the same operation to it and if you get the same number, hey, it was the same password. [08:46]
dreamreal mohsen_: what you do is take a password from a user, hash it, see if it matches the password you've already hashed. [08:46]
surial mohsen_: this lets you confirm someone knows the password, without ever storing it. [08:46]
dreamreal i.e., what surial said, dang it [08:46]
selckin its just an excuse to talk about something, like do with recursion and without and see what happens [08:46]
dreamreal selckin: they said that recursion had the flaw of possibly overflowing the stack :) [08:46]
dreamreal which... is amusing [08:47]
selckin well then you argue against that and/or show how easy it is to guard against or rwwrite to a loop [08:47]
Vacuum_ every recursion can be converted to iteration? [08:47]
surial mohsen_: bcrypt furthermore ensures it is hard to rainbowtable attack the concept, by using a 'salt', and it ensures its hard to just throw a bunch of optimized hardware at it, because it is intentionally slow in ways that are relatively hard to optimize away. That's all complicated stuff, but, fortunately, bcrypt just solves that for ya. [08:47]
surial Vacuum_: yes. [08:47]
surial Vacuum_: that's only the 8th time we said that. [08:48]
dreamreal although I'd say that recursion in that case wasn't really a problem [08:48]
Vacuum_ 2nd [08:48]
dreamreal go ahead and recurse, and curse the idiot who came up with the data structure [08:48]
epatpol [unaffiliated/epatpol] has joined ##java [08:48]
Vacuum_ ) [08:48]
Vacuum_ they were pretty nice though [08:48]
dreamreal Vacuum_: we've said it a few more times than that, since *I* have been watching [08:48]
Vacuum_ best interviewer ever I ecountered by personality [08:48]
dreamreal sure, it's easy to be nice to ... uh... people [08:48]
mohsen_ surial: Its...actually.. not a server, its an android program that takes a string as a ussd code then calls the ussd code in the future, but inside the code may contain bank account credentials, so if I? store the code with the plain text password, you know what happens, so I? need to store the encrypted version of the password that is inside the code then decrypt it when the user wants to call the code. [08:50]
dreamreal hahaha [08:50]
dreamreal xy [08:50]
dreamreal XY Problem: You have problem X, and you think Y is a good solution, so now you are asking about how to do Y. However, maybe Y is not a good way to solve X. Maybe you should take a step back and tell us about X first. More: [08:50]
dreamreal so discard everything we've said, since it's all based on a misrepresentation of yours [08:50]
surial mohsen_: what you describe is impossible. [08:51]
surial mohsen_: We assume here that some.. thing has access to your DB that stores the 'encrypted' password. [08:52]
Vacuum_ line 21? [08:52]
Vacuum_ Vacuum_'s title: "Tue Aug 23 2016 15:42:46 - Code - Codeshare" [08:52]
surial mohsen_: Okay. Well, that 'thing' then also has access to the code you write to decrypt it, so, they can just.. decrypt it. you're fucked. you can't do this. [08:52]
surial mohsen_: the only thing you CAN do, is ask the user for a secret prhase of some sort, then encrypt it using that as the key, and then forget all about the secret. if you need to decrypt the password, you can't; you ask the user for that secret phrase, then you decrypt it, use it, and forget both the secret and the password. [08:53]
surial but this requires the user to be prompted to enter the secret. [08:53]
surial Vacuum_: dude, what the serious fuck? [08:53]
surial Vacuum_: Both ener2 and maldivia posted a complete, working example of who to do it without recursion 3 fucking hours ago!! [08:53]
freeone3000 the password can be something like their fingerprint or their irises or a smartcard or whatever. [08:54]
dreamreal and I did, too, although not that long ago [08:54]
mohsen_ surial: The whole point of storing the password is not prompting an input dialog for my mom so he can buy credit only by pressing a key:D [08:55]
dreamreal for your mom so he... [08:55]
dreamreal is confused by the gender swapping [08:55]
localh0st dreamreal: :D [08:55]
Vacuum_ surial: yes, I am reviewing them. thanks to them. But what if the datastructure is in a xdimensional array of ints [08:55]
mohsen_ well, in case of a phone, taping the touchscreen. [08:55]
freeone3000 mohsen_: Android Pay. Done. [08:55]
dreamreal Vacuum_: what does that mean. [08:55]
silenced [unaffiliated/silenced] has joined ##java [08:55]
freeone3000 mohsen_: It takes advantage of the TPM (which you don't have easy access to), and integrates with existing auth providers and uses a pin-code passphrase. [08:56]
surial Vacuum_: the stated code already works just great with any variant of arrays-in-ararys. [08:56]
b4b [] has joined ##java [08:56]
mohsen_ dreamreal: She* :D [08:56]
dreamreal ... as long as they're heterogenous. [08:56]
dreamreal or, rather, homogenous. Homogeneity is the key factor here and the MAIN reason your original question is mangled and stupid. [08:56]
mohsen_ dreamreal: Are you talking to me? [08:57]
dreamreal mohsen_: no. [08:57]
Vacuum_ surial: no both have Object[]s or Stacks at the start. not primitive arr [08:57]
dreamreal mohsen_: YOUR problem is #android-dev and/or android pay. [08:57]
surial mohsen_: then, without involving secure enclaves and such which you don't have access to, you CANT FUCKING DO IT. Think about it: You can't have a device that will cough up a password on demand without interaction, and then somehow make that secret impossible to obtain for someone with access to this app's data until the time comes to use it. [08:57]
surial Vacuum_: fuckin' duh. [08:57]
dreamreal Vacuum_: see? broken data structure. [08:57]
yawkat "i need to store sensitive data offline, so it's more secure encrypted"? [08:57]
surial Vacuum_: the primitive array variant is homogenous. [08:57]
dreamreal heterogenous data structure. Not a simple clean way to do it, although it can be done. [08:57]
mEck0 [] has joined ##java [08:58]
localh0st mohsen_: so how do you want to create safe app for credentials storing without using any safe tools to access it? [08:58]
surial Vacuum_: every level is either all int arrays, or all ints. some for loops and you're done. there's no need for either recursion OR an explicit java.util.collection to serve as stack. [08:58]
Vacuum_ surial: you mean same number of pockets in every array? [08:58]
dreamreal no, but the same number of LEVELS. [08:58]
localh0st surial: ;d [08:58]
surial Vacuum_: Let's say you have a heterogenous one: int[][] x = {5, 2, {10, 11}}. [08:58]
dreamreal The dataset I gave you has different array sizes at the end. [08:58]
surial Vacuum_: that doesn't compile. [08:58]
surial Vacuum_: int[][] x means that x is an array containing int[]. 5 is not an int[]. Therefore, won't compile. [08:58]
mohsen_ freeone3000: I see, let me research about it. [08:58]
surial Vacuum_: you can't HAVE int[][][][][][][][], for any number of brace pairs, that is NOT homogenous. [08:59]
Vacuum_ surial: so this is not a valid array? int[][][] x={ { { 1,2,3 }, {4,5,6} }, { { 7,8 }, { 9 } } }; [08:59]
surial Vacuum_: hence why the examples given to you so far are ALL based on Object[], because only that one can handle heterogenous input. [08:59]
mohsen_ localh0st: Newbie at security here, thought bcrypt can do that. [08:59]
surial Vacuum_: It is, and it is homoenous. [08:59]
dreamreal mohsen_: that is not what bcrypt does. [08:59]
dreamreal Vacuum_: of course it is. [08:59]
surial Vacuum_: x contains only int[][]. each member of x contains only int[], and each member of those only contains int. [08:59]
bakwods_ [] has joined ##java [08:59]
localh0st mohsen_: of course bcrypt can do this, but you must use it... [09:00]
surial mohsen_: no. Seriously, please, think. You. CANNOT 'encrypt' anything if it has to be decrypted without further secrets as inputs. [09:00]
dreamreal Vacuum_: it's an "irregular" array, in that the dimensions are different for each array, but that's... java. Perfectly legitimate, valid code. [09:00]
surial mohsen_: now, many payment services and such are aware of this problem and give alternate solutions. These involve NOT authenticating with a password, but with other things [09:00]
Vacuum_ dreamreal: so how to interete it? [09:00]
sz332 [gateway/web/freenode/ip.] has joined ##java [09:00]
mohsen_ surial: Yeah I'm concluding that its impossible without user input. [09:01]
dreamreal for(int[][] inner1:x) { for(int inner2[]=inner1) { for(int i:inner2) { print(i); } } } [09:01]
freeone3000 well, in that they're not alphanumeric - I unlock my credit card on my phone with my irises, but it's still user-input, it's still unique to me, and it's still secure. [09:01]
dreamreal ^^^ from what I told you a while back. [09:01]
localh0st Vacuum_: goig throug array's lenghts? ;x [09:01]
freeone3000 pin code is *reasonably* secure if you require physical access (after all, banks use them) [09:01]
talmos [] has joined ##java [09:02]
dreamreal Vacuum_: guess how I typed that again... and if you can't guess, I'll tell you. I hit the up arrow until it showed up. [09:02]
odinsbane dreamreal: you've got a syntax error. [09:03]
dreamreal Yeah, my bracket placement is inconsistent too [09:03]
MarkyC [] has joined ##java [09:03]
surial dreamreal: for (int inner2[] : inner1) is a funny one. [09:04]
surial dreamreal: it is not legal java code. [09:04]
surial dreamreal: however, EVERY java compiler (intellij's, eclipse's, and javac) nevertheless incorrectly treats it as correct java code. [09:05]
dreamreal [09:05]
yawkat surial: why is it not valid? [09:05]
surial yawkat: because the JLS does not include the appropriate nbf for it. [09:05]
yawkat ah. [09:05]
dreamreal Now corrected to put the brackets after inner2[] just to annoy people. [09:05]
surial more likely, the JLS is buggy and not the implementations. [09:05]
surial That was a fun bug report to file at oracle. [09:05]
Gurkenglas [] has joined ##java [09:05]
masuberu [] has joined ##java [09:06]
Vacuum_ how to iterate? [09:06]
yawkat or they decided that kind of declaration sucks anyway [09:06]
dreamreal notes, which does in fact show "short aas[][]" as a valid declaration [09:06]
yawkat tutorial [09:06]
yawkat the bot doesnt like me :( [09:07]
dreamreal Vacuum_: by learnin u sum java [09:07]
dreamreal tutorial [09:07]
dreamreal The Oracle tutorial is available at (start with Getting Started and skip the NetBeans bits). Another option is which includes video, hyperlinked, and book-style tutorials. The first link is recommended. [09:07]
odinsbane The bot's been cranky today. [09:07]
Vacuum_ ya its a algo question. Nothing to do with java syntax much [09:07]
dreamreal doesn't care [09:07]
Vacuum_ nevermind . Thaks this far :) [09:07]
Vacuum_ Hi [09:07]
surial dreamreal: the problem lies specifically with the spec of the foreach. [09:07]
yawkat dreamreal: [09:08]
yawkat yawkat's title: "Chapter14.Blocks and Statements" [09:08]
surial yes, there. [09:08]
yawkat the problem is that that's not a variable declaration [09:08]
surial note how after VariableDeclaratorId, there is no room for further []. [09:08]
dreamreal does it? cool. Well, ideone handles the ugly declaration well, and it's consistent with other declarations even if the spec doesn't show it [09:08]
dreamreal shrugs. We all win. [09:08]
dreamreal you're right, of course, but I think the spec should be fixed to fit the behavior as it exists. YMMV. [09:09]
yawkat same for try-with-resources? [09:09]
odinsbane Although that method is pretty ugly. [09:09]
dreamreal odinsbane: no doubt. [09:09]
surial oh sweet, in 14.14.2 it's fixed now. [09:09]
surial I guess my bug report finally got processed. I thought you'd get some email for that. [09:10]
surial or it was 'naturally' picked up because now you can shove annotations right in between. [09:10]
surial int [] @Foo [] bar @Baz [] @WTF [] = null; // compiles [09:10]
yawkat oh i love java 8 for those things [09:11]
yawkat yawkat's title: "javap pastebin" [09:11]
yawkat always wanted annotations there. [09:12]
mohsen_ parted the channel: [09:12]
Lone_Rifle surial: did you work on some major public Java-related project? i can't remember if you did [09:13]
dreamreal lombok [09:13]
dreamreal dreamreal, lombok is a compiler plugin that removes boilerplate. It can for example generate getters, setters, equals, and hashCode. It can also take care of resource management for you. Works in eclipse, netbeans, javac, maven, ant, and most other tools. An IntelliJ plugin is in alpha. See for a video showing exactly what it can do. Free, Open Source. [09:13]
Lone_Rifle surial: i somehow recall that you did though [09:13]
Lone_Rifle ah there we go. [09:13]
Lone_Rifle thanks dreamreal [09:13]
Akimb [] has joined ##java [09:15]
dreamreal I'm pretty sure I get a commission for converting people into using lombok [09:15]
selckin broke after 30min for me, but hopefully due to EAP of intellij [09:17]
surial dreamreal: I owe you like 8193 beers. [09:18]
dreamreal I know! It's crazy, and sad, too, because I don't drink beer :( [09:18]
dreamreal grins [09:18]
cheeser i'll take 'em [09:18]
plarsen [redhat/jboss/pdpc.professional.plarsen] has joined ##java [09:20]
pampeho [unaffiliated/pampeho] has joined ##java [09:20]
rkazak [] has joined ##java [09:20]
besolov [] has joined ##java [09:21]
stefkos [] has joined ##java [09:23]
BOKALDO [] has joined ##java [09:26]
tona [gateway/web/freenode/ip.] has joined ##java [09:28]
leolrrj [] has joined ##java [09:28]
tona hi everyone [09:29]
Deacydal [unaffiliated/deacyde] has joined ##java [09:29]
tona how could i convert or change json file to xml file ? [09:29]
yiati [gateway/web/] has joined ##java [09:30]
dreamreal by doing it [09:30]
cheeser use jackson. read in the json. write out the xml. [09:30]
dreamreal load the JSON, then write the nodes out as you need [09:30]
tona yes i know i was thinking is there one library fr it [09:30]
DLSteve [] has joined ##java [09:30]
cheeser stop put restrictions on solutions before you even know what the solutions are. [09:30]
liste json parsing [09:31]
tona ok thanks [09:31]
liste json parsing [09:31]
liste xml [09:31]
liste ( [09:31]
dreamreal tona: for which [09:31]
liste says my to check my registration, is it broken? [09:32]
cheeser probably [09:32]
Lone_Rifle is by far the most useful interactive reference for the language [09:33]
cheeser that's mildly frightening. :) [09:33]
dreamreal jwz an irc bot [09:33]
dreamreal Some people, when confronted with a problem, think "I know, I'll use an irc bot!" Now they have two problems. [09:33]
thepr [] has joined ##java [09:34]
Lone_Rifle dreamreal: s/irc/fb messenger/ and you'll have a soundbite for more recent times [09:34]
dreamreal I like my recent times to be 20 years old, thanks [09:35]
odinsbane icq then? [09:36]
surial [09:36]
Iskarlar [] has joined ##java [09:36]
dreamreal unbcrypts surial's address and gets his real name [09:38]
waz it's ricky clarkson [09:39]
discovered [unaffiliated/discovered] has joined ##java [09:40]
whaley ricky everything [09:40]
selckin there is a website that lets you search all the password leak dumps, can find most ppl in there with real name /password and email [09:41]
whaley hello [09:41]
whaley '[09:41:13] <javabot> I don't know who you are. Check your NickServ registration.' <--- oh what in the bloody hell [09:41]
yawkat cheeser broke it [09:41]
cheeser the nickserv stuff is flaking out [09:41]
liste whaley: happens to me too [09:41]
cheeser i'll bounce the bot. see if that helps. [09:41]
javabot [unaffiliated/javabot] has joined ##java [09:46]
cheeser waiting for the bot.... [09:46]
cheeser tech support [09:46]
cheeser there it is. [09:46]
cheeser it's rebooting [09:46]
discovered is slow [09:46]
discovered ) [09:46]
cheeser Hello, ##java is not a technical support channel for your Java apps or virtual machines; it's a development channel for enthusiasts to discuss programming with the Java language. Please ask the vendor of your software for support if you're having trouble with it. [09:46]
freeone3000 discovered: That's tech support. We don't do that. If you want a DEB on Ubuntu, hey, Ubuntu provides those. If you want a RPM or a RUN, hey, Oracle provides those. [09:46]
cheeser right now it's reconnecting to all its channels so everything is buffered [09:46]
discovered no, you are! [09:46]
Lone_Rifle what's the longest distance over which you have had to do pair programming? [09:47]
liste oh, he's back (: [09:47]
sz332 1 meter, maybe 2 ... [09:49]
slopaxy [] has joined ##java [09:53]
Ekho [unaffiliated/ekho] has joined ##java [09:53]
SHC [] has joined ##java [09:54]
sz332 so, jokes aside, we did not do much pair programming, only ocassionally. It is great when you enable some new developer in the project. [09:55]
sz332 Especially juniors [09:55]
interki [] has joined ##java [09:55]
snql [] has joined ##java [09:57]
TooLmaN [] has joined ##java [09:57]
Lone_Rifle i'm serious about the distance question btw. [09:58]
cheeser that sounds like a #programming question [09:58]
mEck0 [] has joined ##java [09:58]
maxorator about half a meter [10:00]
sz332 oh, this was a serious question... well depends on gender, eaten onions, and stuff.. [10:01]
ResidentBiscuit [unaffiliated/residentbiscuit] has joined ##java [10:04]
Maxel [] has joined ##java [10:04]
yawkat Did pair programming via that eclipse sync thingy once. [10:05]
yawkat Was surprisingly okay. [10:05]
dreamreal I've done it via Netbeans -- and then they dumped the feature [10:05]
dreamreal it was a compelling feature, too! I was thinking "THIS IS MY NEW EDITOR" when I started using it [10:06]
it_ [] has joined ##java [10:06]
mbenson3 [] has joined ##java [10:10]
solune [] has joined ##java [10:11]
gmurop [] has joined ##java [10:11]
maxorator I tried pair programming with one computer, but two keyboards [10:12]
maxorator didn't turn out so well [10:12]
yawkat But was it fun [10:13]
whaley i tried pair programming once, but it didn't work because coworkers smell funny [10:13]
ibouvousaime [] has joined ##java [10:16]
bakwods_ [] has joined ##java [10:18]
dreamreal I mostly enjoyed it until the person I was paired with started trying to offer stuff himself [10:19]
dreamreal like, shut up, dude [10:19]
dreamreal let the smart one write [10:19]
Matthijs haha [10:21]
Anthaas Haha, dreamreal, so pair programming to you is programming with company? :P [10:21]
ibouvousaime what is the enum method that return you an enum elements when you give it the index of that element ? [10:22]
dreamreal Anthaas: no, I just have few peers. :) [10:22]
ibouvousaime pretty much that does the "inverse" of ordinal() [10:22]
freeone3000 ibouvousaime: .values()[i] [10:22]
ojacobson ibouvousaime: E.values(e.ordinal()) == e, where E is some enum type and e is a non-null member of the type [10:22]
ojacobson er [10:23]
ojacobson E.values()[e.ordinal()] [10:23]
surial ibouvousaime: note that this requires the creation of the entire array every time you do it. As annoying as it is, you have to make your own method in the enum. [10:23]
surial if you want it 'fast' (and that method works off of a private static final EnumType[] that you set once). [10:23]
jrtappers [] has joined ##java [10:24]
ibouvousaime ohhh great !! thank you people [10:25]
waz [pdpc/supporter/active/waz] has joined ##java [10:25]
noss [] has joined ##java [10:25]
odinsbane you people? [10:25]
jrtappers How do I get the permission to make temporary directories for a java web start application? [10:25]
rwheadon [] has joined ##java [10:26]
C0nundrum [gateway/web/freenode/ip.] has joined ##java [10:26]
bakwods_ [] has joined ##java [10:26]
C0nundrum Hello [10:27]
ibouvousaime odinsbane: people who helped, well If you have a better way to say it, tell me xD [10:27]
cheeser thanks, you sexy bitches! [10:27]
Raziel What's the best way to convert a LocalDateTime to an sql.Date? [10:27]
cheeser Raziel: there's a toDate(), iirc [10:28]
yawkat There isn't [10:28]
C0nundrum I'm using mybatis and i'm wondering how would use a bean to do a query [10:28]
ibouvousaime cheeser: LMAOO [10:28]
yawkat Maybe sql.Date has a fromInstant method [10:28]
Raziel Should I do toEpochSeconds with the system default zone offset [10:28]
yawkat But you need a timezone [10:28]
cheeser oh, right. it's toInstant() [10:28]
Raziel yawkat, it doesn't apparently [10:28]
Raziel only does [10:28]
Raziel actually, does it? [10:29]
yawkat Well depends on what tz you want... [10:29]
yawkat You can always pass millis manually [10:29]
yawkat But you need a tz [10:29]
liste java.sql.Date inherits java.util.Date [10:29]
liste it doesn't help here, though [10:29]
yawkat Where is your localdt from? [10:30]
liste Raziel: java.sql.Date.valueOf(LocalDate date) [10:30]
liste javadoc java.sql.Date.valueOf(*) [10:30]
liste liste: [JDK: java.sql.Date.valueOf(String)]; [JDK: java.sql.Date.valueOf(LocalDate)]; [JDK: java.sql.Date.valueOf(String)]; [JDK: java.sql.Date.valueOf(LocalDate)] [10:30]
yawkat Ahhh. It's without time. Right. [10:30]
Raziel yeah, I need the time too [10:30]
Raziel hmmm [10:30]
cheeser you need Timestamp then. [10:30]
yawkat Still need tz though [10:31]
cheeser oh, and look at that! [10:31]
athidhep [unaffiliated/athidhep] has joined ##java [10:31]
yawkat Should use offsetdt probably [10:31]
silva [gateway/web/freenode/ip.] has joined ##java [10:31]
surial PROTIP: If you dip from localdatetime to instant and back, you're going to fuck it up. never do that. [10:32]
yawkat Exactly. [10:32]
surial that's WHY there are 2 'trees': Wallclocks and computerjesus. Don't mix. [10:32]
Raziel So, is the equivalent of sql server's datetime2 Timestamp? [10:32]
cheeser all praise to computerjesus! [10:32]
surial Raziel: java.sql.Date is explicitly DATE ONLY. There's java.sql.Timestamp. [10:32]
surial Raziel: pretty sure, yes. [10:32]
Raziel Okay, fair enough [10:32]
Vacuum_ parted the channel: [10:32]
surial Raziel: and j.s.Timestamp is akin to java.time's Instant. [10:32]
Raziel Too many date/time types [10:33]
surial So, not wallclock, but computerjesus based. [10:33]
shrek [gateway/web/freenode/ip.] has joined ##java [10:33]
liste Raziel: just enough types to reflect the real world [10:34]
surial Raziel: within the java.time package, there are exactly the right number of date/time types. [10:34]
surial outside of it... yeah, way too many types. [10:34]
yawkat Hehe [10:34]
Raziel Yup [10:34]
Raziel Why can't the java.time stuff just cast to sql types without any hassle [10:34]
yawkat cast [10:35]
yawkat casting is a way of changing the type of a reference (it NEVER changes an object), or a sloppy way of converting between different primitive types. '(Type) expression' casts the result of expression to Type. [10:35]
yawkat That's why. [10:35]
shrek how come the capacity remains same after the third append? [10:35]
surial Raziel: be aware that mixing wallclock and computerjesus times is going to lead to weird issues down the road. For example, a wallclock time of 6 nov 2016, 01:30:00 at night, in new york... [10:35]
silva hello, I'm having memory problem scanning (java.util.Scanner) large files, how can I set a fixed chunk of data? like scan every N lines [10:35]
surial Raziel: is one wallclock time, but it's 2 computerjesus times, because the clocks were set back, so that time will occur.. and then an hour later it will occur again. [10:35]
Raziel surial, so what should I do to avoid issues [10:36]
xPucTu4 [Fenixandar.Pleven-DaGe.Net] has joined ##java [10:36]
cheeser shrek: the capacity grows to accomodate more content. allocating that space can be expensive so capacity grows faster than size. [10:36]
jrtappers I think the issue is my JNLP file, when I open it from the Java Cache Viewer is is missing the security attribute [10:36]
surial Raziel: within databases? I honestly don't actually know; the vast majority of date/time libs out there conflate wallclocks with epochmillis. [10:36]
cheeser shrek: size is much less than capacity so there's no need to allocate more space. [10:37]
shrek cheeser but why it got increased after second append? [10:37]
odinsbane silva: What are you doing with your scanner that get an OutOfMemory error? [10:38]
cheeser shrek: because the size of the data you appended exceeded the remaining capacity [10:38]
jazzonmym1nd [gateway/vpn/privateinternetaccess/jazzonmym1nd] has joined ##java [10:38]
cheeser ever host a dinner party? you put out 6 chairs because you're not sure how many are coming. then 8 show up. you grab, say, 4 chairs from the closet to seat the extra people and then a couple of extra chairs just in case more show up. no need to keep running back forth grabbing one chair at a time. [10:39]
Ropeney [] has joined ##java [10:39]
magz0r [2001:4980:1000:1f01:ffff:49:52:43] has joined ##java [10:41]
CedricBeust [unaffiliated/cbeust] has joined ##java [10:42]
silva odinsbane, println every line in console [10:42]
shrek cheeser haha nice 1 [10:42]
shrek ! [10:42]
cheeser shrek: make sense? [10:43]
ibouvousaime [] has joined ##java [10:43]
Matthijs He was complimenting you on your real life example. [10:43]
cheeser Matthijs: i was asking if that example made sense. i can see how that was ambiguous, though. :D [10:44]
shrek cheeser yes [10:44]
cheeser cool [10:44]
odinsbane silva: What are you doing with your scanner that get an OutOfMemory error? [10:44]
shrek cheeser matthijis is right [10:45]
odinsbane silva: If the scanner keeps a reference, then you might have to go with a buffered reader instaed. [10:45]
xsreality [] has joined ##java [10:46]
silva odinsbane, it works with compressed files? [10:48]
mbroeker parted the channel: [10:48]
odinsbane Scanner works with compressed files? [10:49]
silva yes [10:50]
surial silva: .. no. [10:50]
silva BZip2CompressorInputStream [10:50]
surial silva: the java stream structure is built around filtering; to uncompress something you have an input stream that takes another input stream. You can then build it yourself like lego. [10:50]
surial silva: scanner does not work with compressed streams, but, you can make that and put it in the right place and voila. The same applies to BufferedReader. [10:51]
silva I did that [10:51]
surial you have a raw input stream, toss it through BZip2CompressorInputStream, you toss THAT through InputStreamReader specifying a charset (because when you fail to specify a charset, a baby kitten is murdered), and then that throuhg bufferedreader. [10:51]
surial when programming, I find that it is less messy if you just avoid the kitten murder. [10:52]
odinsbane baby kitten... vs a normal kitten, which is a baby cat. [10:52]
adempus [] has joined ##java [10:53]
adempus How many instances of a static attribute can live within a JVM? [10:53]
surial adempus: infinite. [10:53]
surial adempus: limited by memory. [10:53]
adempus ah, I see. [10:53]
surial odinsbane: Oh, yes, I fucked up my grammar when using a silly jokish hint. My god. [10:54]
surial adempus: note that _NORMALLY_ there's only one, that's what static means. [10:54]
dreamreal Yeah, odinsbane, read english carefuly, or else you might misinterpret what someone says [10:54]
surial adempus: to have more than 1 static you need to load that class multiple times. This can be done via classloaders. Can you give context? If it's homework.. they probably wnat the answer 'only 1', though, that is wrong. [10:54]
shrek is there any way to use insert() on String? [10:55]
dreamreal shrek: look at the API for String and see. [10:56]
GhettoJava [] has joined ##java [10:56]
trustyhank [] has joined ##java [10:56]
kobain [unaffiliated/kobain] has joined ##java [10:56]
surial shrek: string objects are immutable. you cannot change them. What you CAN do, is either (A) use a datatype that represents text, but IS mutable (such as StringBuilder), or (B) construct a NEW string instance based on mix-and-matching bits and pieces of other strings. To do this, concatenate the results of calls to .substring() and such. [10:57]
adempus surial, no context just making sure. [10:57]
shrek surial i want to use insert() directly but thanks anyways! [10:59]
mEck0 [] has joined ##java [10:59]
bitkiller [unaffiliated/bitkiller] has joined ##java [10:59]
surial shrek: yeah, that's why I said: Yo ucan't do that. [11:01]
thebope [pdpc/supporter/student/thebope] has joined ##java [11:01]
nickatnite [] has joined ##java [11:01]
dreamreal heh [11:01]
momomo [] has joined ##java [11:05]
shrek surial but in the case of concat() it creates a new string so why not with insert();?? [11:05]
hubatrix [unaffiliated/hubatrix] has joined ##java [11:06]
dreamreal it does not [11:06]
dreamreal it returns a new string [11:07]
surial shrek: you said: 'insert directly'. that's not possible; strings cannot be changed. you can only make new ones. concat() makes a new one. [11:07]
surial shrek: String withSomethingInTheMiddle = mystring.substring(0, point) + "hello" + mystring.substring(point); [11:07]
surial shrek: if you feel like this hsould be a method.. go make it. [11:08]
shrek ok [11:08]
shrek parted the channel: [11:10]
Iskarlar [] has joined ##java [11:11]
zeapo [] has joined ##java [11:12]
cozzym [gateway/web/freenode/ip.] has joined ##java [11:13]
GhettoJava [] has joined ##java [11:14]
cozzym Hi everyone, I just finished going a 1 year CS course, so I know basics of programming and OOD, using Java.. question is, where do I go from here, what is the next thing I should learn to do, or program with Java? [11:15]
cozzym thanks! [11:15]
liste cozzym: just get coding [11:16]
liste (: [11:16]
surial cozzym: there are many ways to go: You can scratch your own itch and build something you'd like. POssibly on android if you have an android phone for that instant satisfaction. You can also do a bunch of programming exercises on 'challenge sites', where you get a coding challenge and you try to finish the assignments. you can also try to contribute to foss projects. [11:16]
cozzym what to program though, and there is all this stuff I have no idea about [11:16]
cozzym Spring [11:16]
cozzym Hibernate [11:16]
cozzym etc etc [11:16]
talmos cozzy look for automation opportunities in your every day life [11:16]
cozzym I can't see a clear path I am meant to be going down [11:16]
surial cozzym: that's because there is no one path. [11:17]
surial cozzym: I just gave you three options. [11:17]
surial cozzym: you generally don't go: "I know! SPRING! I'm gonna do... uh.. something... with spring?". [11:17]
lvns_ [] has joined ##java [11:17]
Zalabinsky [] has joined ##java [11:17]
cozzym whats a foss project? [11:17]
cheeser free and open source software [11:17]
cozzym ahhh [11:17]
cozzym hmm.. [11:18]
surial cozzym: you go: "Website for cataloging the lego bricks I have! Okay, what do I need... uh, crap, I need a DB. Welp, let's see what my options are: Raw JDBC, JPA, jOOQ, or JDBI. Let's get some info and... JDBI seems like a good match. Before I build the lego brick thing, I'm gonna go fuck around a bit with this DB stuff and when I 'get' it, I go do the lego thing". [11:18]
cozzym I see.. :/ [11:18]
surial Same story for web dev (tons of options there, let's say you end up going with dropwizard), then you've got the skills you need to make this thing. Then you make it. Then you are happy and have learned a lot. [11:18]
surial That's ONE way to go. The others, well, I just told you. [11:18]
cozzym so if I have no ideas im pretty much in the dark [11:18]
Hanii [] has joined ##java [11:18]
cozzym what if I just want to get up to employable graduate standard [11:19]
surial but the way of: "I wanna learn spring so let me just learn it and fuck if I know what I'm gonna do with that knowledge".. is didactically speaking not a great way to learn. boring, you'll lack motivation, don't do that. [11:19]
cozzym which I dont feel like I am at the moment [11:19]
surial cozzym: yeah, you're just going to have to think of something. [11:19]
cozzym ok :) [11:19]
cozzym hmm.. [11:19]
surial cozzym: if you want this for a cushy job, well, imagine you build bridges and you go interview. [11:19]
surial cozzym: now imagine you arrive at the site, and you're actually outside, next to a river, and there a bunch of girders and shit all over the palce. Your interviewer says: Yeah, so, you got an hour or two. Build me a bridge. GO! [11:20]
jamezp [redhat/jboss/jamezp] has joined ##java [11:21]
surial cozzym: that's ACTUALLY how development positions are filled by non-stupid companies. They just go tell you to code up some stuff. It's not just about whether you can, but how you approach the problem, what kinda feedback and questions you ask, but, still, it's: Can you do it? They also do reviews of the bridges you've already built. In coding terms, you either bring some code / mail it to them or they go look at your commits on [11:21]
surial github or whatnot. If you have none, well, for starters that'll be taken as a bad sign, and they'll be much harsher on the 'build me a bridge, live, right now' part. [11:21]
rany [unaffiliated/rany] has joined ##java [11:21]
surial cozzym: in other words, you just NEED to make something cool you can show off, or at least some commits to an open source project, or preferably both, if you want any shot at landing a job at a good, fun, capable, fulfilling programming job. [11:21]
ArkaZeen [] has joined ##java [11:22]
cozzym O [11:22]
cozzym oooookie [11:22]
mohsen_ [] has joined ##java [11:22]
cozzym hmm.. If I said I don't feel I was capable of building anything yet, even after say I know the 'basics' what would you advise me to do right now? [11:23]
whaley fun anecdote, I was actually hired for my first full time programming job mostly from interacting on this channel [11:23]
bakwods_ parted the channel: [11:23]
surial cozzym: either something REALLY simple, or some of those coding challenges I spoke of. [11:23]
whaley cozzym: point being is that having some kind of public record of your competence is a big advantage [11:23]
surial cozzym: let's say these first steps.. not so much part of that whole 'public record' thing. [11:23]
cozzym thanks whaley :) [11:24]
cozzym ok [11:24]
whaley well, maybe not advantage, but a strong indicator that you'd be worth considering for the gig [11:24]
surial but start with that soon, if you have anything halfway kinda fun, go put it on github. I do code reviews for potential new hires and I have no issues with 'well, I was young and stupid' code, especially if, during the interview, you can just point at it and explain why you thought that was good at the time and why you no longer do, that's a near instant hire if you can do that, because it proves you know stuff now, you're a [11:24]
surial go-getter, and you can communicate well. All I want. [11:24]
cozzym cool.. [11:25]
alexmh [] has joined ##java [11:25]
cozzym so I should just make something really, or get started trying to make something.. [11:25]
cozzym someone advised that I do - ruby on rails tutorial [11:25]
cozzym cozzym's title: "Learn Ruby on Rails with the Best Free Online Tutorial | Ruby on Rails Tutorial by Michael Hartl |" [11:25]
cozzym I know it's not Java [11:26]
surial cozzym: that's not java. [11:26]
cozzym but what do you think of that recommendation? [11:26]
dreamreal We think you should definitely learn ruby. [11:26]
surial if you want them there are java tutorials.. but.. not great for learning. [11:26]
cozzym haha [11:26]
cozzym I think the persons idea behind doing the ruby tutorials was, that it covers, all of web development.. and gets a web app up and running [11:27]
cozzym can you write web apps with Java? [11:27]
cozzym Java on the backend is it? [11:27]
cozzym and the usual front end javascript/html/css [11:27]
cheeser of course. how do you think amazon gets by? [11:27]
cozzym Just wondering because I hear a lot of, MEAN stack, and ruby on rails.. but not much Java stuff in that area atm [11:28]
cozzym or python Django [11:28]
whaley cozzym: anything rails is almost assuredly going to be about web applications - specifically the three-tiered kind. If that's what you want to do, then that's sound advice. If you want general purpose programming skills, then it's horrible advice when you are starting out (rails has batteries included for all kinds of things and is questionably horrible for learning) [11:28]
Deacyde [unaffiliated/deacyde] has joined ##java [11:28]
cheeser ruby is the hoverboard of web programming. it's flashy. it's shiny. but it's underpowered and will burst into flames when you a load on it. [11:29]
cozzym yea you see whaley that was my reservation about it.. if im learning to program, I want to learn how to program well, and be able to build things.. web apps included if I want to [11:29]
cozzym not just 'make something flashy' that ive no real idea of how i made it [11:30]
cozzym basically I want someone to tell me, do this, this, and this.. and that where get you 'here', and 'here' is a good place to be.. [11:30]
cozzym / [11:30]
surial cozzym: it's just not how it works. [11:31]
cozzym because that was what was good about the course, I was being told what to do, I did it, and did it well.. but now I feel like im thrown out into the wild.. no idea where to g [11:31]
cozzym go [11:31]
cozzym ok cool, I can get with that [11:31]
cozzym ... I'll have to just make something.. to be honest, I have been looking at moving to Javascript, because it seems to pop up everywhere.. and I am into sound stuff.. and two tutorials from kadenze (very cool creative tutorial site) in relation to audio programming synthesis use javascript [11:32]
zuloyd [gateway/web/freenode/ip.] has joined ##java [11:32]
zuloyd hi [11:32]
gregf_ cozzym: in programming theres no good/safe place to be :).... *the storm is coming* [11:33]
cozzym haha [11:33]
cozzym just wanna get a start really somewhere I guess.. :( [11:33]
gregf_ give Java a go or python [11:34]
Iskarlar [] has joined ##java [11:34]
cozzym it's like a fractal.. all the different programming 'tags' / 'tools' out there [11:34]
cozzym I've java down to a fairly basic level.. just don't know where to take it next.. [11:34]
gregf_ Java is *vast* [11:34]
cozzym so i suppose doing some of those challanges.. until I think of something to build is the best thing [11:34]
cozzym yea that's my problem.. I'm looking at a vast wilderness at the moment [11:35]
cozzym because I am so bewildered [11:35]
gregf_ everyone was where you are atm ;).. *nothing new tbh* [11:35]
zuloyd I have an entity PositionalVectorSet and an entity PositionalVector. PositionalVectorSet has a OneToMany relation to PositionalVector (with eager loading). When I perform a query to retrieve multiple PositionalVectorSets, Hibernate performs one SQL query for every PositionalVectorSet, and this takes too long [11:36]
zuloyd is it possible to tell Hibernate to fetch all the PositionalVectors with a single SQL query and assign them to the PositionalVectorSets afterwards? [11:36]
nickatnite [] has joined ##java [11:37]
monksam [] has joined ##java [11:41]
Colt [] has joined ##java [11:45]
talmos zuloyd: yes, look into fetch type [11:51]
talmos eager vs lazy [11:51]
nivyaj [gateway/web/] has joined ##java [11:53]
ChrisWJ [gateway/web/freenode/ip.] has joined ##java [11:59]
ChrisWJ I am getting the following error when trying to compile with javac, "error: diamond operator is not supported in -source 1.6" I am using java version "1.7.0_111". Google says the diamond operator is ot supported by 1.6, but, not sure why that error if I am using 1.7? [12:02]
stefkos_ [] has joined ##java [12:02]
Leates [unaffiliated/leates] has joined ##java [12:04]
cheeser are you using maven? [12:04]
l3dx [unaffiliated/l3dx] has joined ##java [12:05]
gregf_ ChrisWJ: you prolly need to set JAVA_HOME? or as cheeser has said, set it in the mvn pom.xml [12:06]
ChrisWJ cheeser: no, ant [12:06]
ChrisWJ I set JAVA_HOME in my bash profile [12:06]
cheeser ... [12:07]
dreamreal why are you using ant [12:07]
ChrisWJ is not a java developer [12:08]
dreamreal and why are you using 1.7 [12:08]
Leates [unaffiliated/leates] has joined ##java [12:08]
rany [unaffiliated/rany] has joined ##java [12:08]
ChrisWJ I am just following an from a piece of software I am trying to install [12:08]
dreamreal cheeser: err... okay, you're getting that when trying to compile with ... javac, or ant? [12:08]
dreamreal what piece of software [12:08]
cheeser eyes dreamreal [12:08]
dreamreal oh, shut up, you know it was an autocomplete problem :) [12:09]
ChrisWJ is the software [12:09]
ChrisWJ ChrisWJ's title: "dbseer/ at master barzan/dbseer GitHub" [12:09]
cheeser i've learned not to assume with some people. ;) [12:09]
dreamreal ChrisWJ: well, what I would do is file an issue, describe the problem and its error message, and wait for tech support from them [12:11]
ChrisWJ [12:11]
dreamreal [12:13]
dreamreal see the "source" attribute [12:13]
Deacydal [unaffiliated/deacyde] has joined ##java [12:14]
ChrisWJ ahh [12:15]
sl33k__ [] has joined ##java [12:16]
Corosus [] has joined ##java [12:17]
jazzonmym11nd [unaffiliated/jazzonmym1nd] has joined ##java [12:20]
ynyounuo [unaffiliated/ynyounuo] has joined ##java [12:21]
myu [unaffiliated/myu] has joined ##java [12:21]
snql [] has joined ##java [12:22]
danijoo_ [] has joined ##java [12:23]
jazzonmym111nd [unaffiliated/jazzonmym1nd] has joined ##java [12:25]
svm_invictvs [unaffiliated/svminvictvs/x-938456] has joined ##java [12:28]
kwladyka [] has joined ##java [12:29]
codeman [] has joined ##java [12:32]
Deacyde [unaffiliated/deacyde] has joined ##java [12:34]
noregret [unaffiliated/noregret] has joined ##java [12:35]
Muzer [] has joined ##java [12:35]
noregret when using System.getProperty("foo"), does it mean "foo" was .set earlier or is there a file somewhere that it reads from? [12:36]
svm_invictvs noregret There's a lot going on there [12:37]
svm_invictvs noregret But essentially you assume it was set from outside the program in some way. Usually it's set by using the -D flags passed to the VM when you launch it. [12:38]
noregret oh, i thought it mighe be in some .properties file [12:38]
Serdar [] has joined ##java [12:40]
rkazak [] has joined ##java [12:40]
Deacydal [unaffiliated/deacyde] has joined ##java [12:43]
yabbes [2a02:908:2f32:2960:f4ea:c44b:8c4a:2311] has joined ##java [12:45]
GhettoJava [] has joined ##java [12:47]
codeman [] has joined ##java [12:48]
ShekharReddy [gateway/web/] has joined ##java [12:49]
svm_invictvs noregret uh...I don't think so but some frameworks may read and then inject .properties files [12:53]
svm_invictvs noregret Or more accurately, I can't recall any specifics off the top of my head that govern System properties using a .properties file. I could be wrong, though [12:54]
avalchev parted the channel: [12:54]
ogradyd [] has joined ##java [12:55]
avalchev [] has joined ##java [12:55]
C0nundrum In mybatis is it possible to have a stored function in the xml that generates sql ? [12:57]
gregf_ [] has joined ##java [01:01]
Leon_ [] has joined ##java [01:01]
Sasazuka [unaffiliated/sasazuka] has joined ##java [01:03]
dreamreal C0nundrum: what, now? [01:04]
GenteelBen [] has joined ##java [01:05]
C0nundrum So i have a DateFilter bean i made containing LocalDate startDate and LocalDate endDate [01:05]
C0nundrum instead of writing a between filter for each date in my mapper file [01:07]
C0nundrum is it possible to call a stored function in my mapper file that will generate sql for that specific bean [01:07]
C0nundrum if that makes sense [01:08]
dreamreal I'm missing a ton of context here, I think [01:08]
C0nundrum ok i will give an example [01:09]
ron context [01:10]
ron ron, context is the information relating to your issue. without context, we're going to waste time. and lots of it. [01:10]
ron o_O [01:10]
C0nundrum lol [01:11]
C0nundrum ok [01:12]
C0nundrum you see this dreamreal [01:12]
deacyde [unaffiliated/deacyde] has joined ##java [01:13]
C0nundrum is it possible to not have to rewrite the choose block for every date filter i want to check [01:13]
kwladyka [] has joined ##java [01:13]
discovered [unaffiliated/discovered] has joined ##java [01:13]
buglessdr [2600:1011:b12a:b97b:3501:81ca:1cc:2d05] has joined ##java [01:14]
dreamreal no clue, I am not familiar with that query syntax [01:14]
C0nundrum using this [01:15]
C0nundrum C0nundrum's title: "mybatis MyBatis 3 | Mapper XML Files" [01:15]
Brett[Air] [] has joined ##java [01:15]
buglessdr is there a way to call an iterator within the for each loop from java? for example: for(int num : intArray, i) (I think there is something akin to this in javascript?) [01:15]
dreamreal not a mybatis user, either. Do they have an IRC channel or slack channel? [01:15]
dreamreal buglessdr: no. [01:15]
DLSteve [] has joined ##java [01:15]
dreamreal buglessdr: you could always do for(int i=0;i<intArray.length;i++) { int num=intArray[i]; } [01:16]
C0nundrum Not that i could find :( [01:16]
C0nundrum I see [01:16]
beardedeagle [] has joined ##java [01:17]
buglessdr bummer [01:17]
buglessdr thanks dreamreal [01:17]
buglessdr I hate the way the forloop looks its just flipping messy - I want to hide it from my eyes forever! [01:18]
dreamreal is trying to care. [01:20]
dreamreal Why do you want the index anyway? [01:20]
buglessdr I am cycling through two arrays [01:23]
thebope [pdpc/supporter/student/thebope] has joined ##java [01:23]
nb-ben_ [unaffiliated/nb-ben] has joined ##java [01:23]
buglessdr and need to pull out the same index on both arrays each time i cycle through [01:23]
dreamreal nods [01:25]
cheeser it's a shame java doesn't have a zip() [01:26]
dreamreal [01:27]
dreamreal dreamreal's title: "functional programming - Zipping streams using JDK8 with lambda ( - Stack Overflow" [01:27]
Xeronate [] has joined ##java [01:30]
Xeronate parted the channel: [01:30]
waz [pdpc/supporter/active/waz] has joined ##java [01:31]
MagicHereos [] has joined ##java [01:32]
MagicHereos I have a question, I want to implement MVC and I have view class which has a button which should add something to model(to arraylist), how should I do that?(I mean communication view->controller) [01:33]
SpeakerToMeat [prgmr/customer/SpeakerToMeat] has joined ##java [01:34]
BadApe_ [] has joined ##java [01:34]
compengi [unaffiliated/compengi] has joined ##java [01:36]
SpeakerToMeat I'm trying to try JavaFX, but I can't find the download link (for linux) for the scene builder.... an article at Oracle mentions it should be next to the downloads for SE, but can't find it... any tips please? [01:36]
dreamreal gluonhq [01:36]
dreamreal dreamreal, what does that even *mean*? [01:36]
dreamreal gluon [01:36]
dreamreal dreamreal, what does that even *mean*? [01:36]
dreamreal anyway, look up gluon [01:36]
buglessdr tryharder [01:37]
buglessdr buglessdr, what does that even *mean*? [01:37]
SpeakerToMeat can the gluon scene builder be integrated into idea like oracle's? [01:37]
dreamreal no clue, I don't do JavaFX [01:38]
cheeser oracle discontinued scene builder. gluon took it over. [01:38]
SpeakerToMeat cheeser: Ok, so gluon's is the same code. [01:38]
cheeser i didn't say that. ;) [01:38]
G4rb4g3C0ll3ct0r [] has joined ##java [01:39]
a3Dman [unaffiliated/a3dman] has joined ##java [01:42]
SpeakerToMeat Hmmm it seems the source comes (or at least was forked) from the JavaFX that Oracle turned over to OpenJDK, which is known as OpenJFX now [01:43]
cheeser sounds right [01:44]
SpeakerToMeat Does this mean JavaFX is a "dead" technology? or is it pretty much used? [01:45]
bob_the_clown [2601:281:8703:8a80:e4af:9ecc:a513:f43d] has joined ##java [01:45]
SpeakerToMeat Aaaand, it seems Idea has integrated the scene builder code into the latest version, they don't need the external executable anymore... [01:45]
SpeakerToMeat oh well, thanks [01:45]
cheeser any time! :D [01:46]
SpeakerToMeat cheeser: Any comments about JavaFX's "viability" for the future? [01:47]
C0nundrum dreamreal: i'm so close using the <sql /> tag but i can't figure out how to access the password properties in my if tags [01:47]
Leon_ [] has joined ##java [01:47]
cheeser it's viable, i think, but the uses will tend to be more back office style apps than consumer apps, i think. [01:48]
cheeser it's used pretty heavily in certain places but they're mostly internal apps [01:48]
mEck0 [] has joined ##java [01:48]
SpeakerToMeat Yeah I want a solution to do some quick-develope cross platform desktop apps, but it's somehow in-house so it's congruent [01:49]
cheeser nods. [01:49]
cozzym hey there, what would I need to know to develop a small web app using java, including database? [01:51]
cozzym eclipse, maven (what does this do?), spring (hibernate?), Sql? [01:52]
cozzym or if anyone knows a good tutorial [01:52]
cheeser g maven java [01:53]
cheeser [01:53]
Pulp [] has joined ##java [01:54]
dreamreal cozzym: er... that's a very broad question. Look at dropwizard. Whatever technologies it uses that you don't understand, learn them. [01:55]
cozzym great thanks a mill! [01:55]
dreamreal cozzym: get back with us next year with any questions. [01:56]
BadApe [] has joined ##java [01:56]
surial cozzym: eclipse: This is an IDE; an editor, a place you type your code in. You need a 'smart' one. Choices: eclipse, intellij. maven: This is a 'build system', a way to write a config file that describes how to make the software you're writing into a package that actually runs, which notably includes just specifying the third party libraries you need (the tool just finds these on the internet automatically and downloads them for [01:57]
surial you), and where your test code lives (it also automatically runs those for you and produces a test report). Options: Gradle, Maven. [01:57]
k5_ [] has joined ##java [01:58]
surial cozzym: Interacting with DBs: Many ways to do it, but in the end SQL which is what DBs 'speak' is not object oriented and trying to bridge the two leads to a lot of pain. JPA tries to bridge the two. JDBI does not; JDBI advised. webstack: Also a ton of ways to approach this. There are literally 50 different offerings here. Just go with dropwizard. [01:58]
cheeser also, for IDEs: netbeans [01:59]
surial it's the glue between 'user connects to your machine' and 'your machine runs your code, your code produces the desired resource somehow, and returns it' and 'this data is returned to the requesting client'. You need other bells and whistles for this, usually for example a templating system because you want to write template-style HTML where your server 'fills in the blanks' as appropriate (something like <h2>Hello, {{name}}</h2> [01:59]
surial ). [01:59]
waz- [pdpc/supporter/active/waz] has joined ##java [02:00]
cozzym wow, mind blown again.. [02:00]
snql [] has joined ##java [02:00]
zeapo [] has joined ##java [02:01]
surial then there's git: A version control system. When you write some code and you're done, well, what do you do in, say, a word document? You hit 'save', right? Okay, but, it's REAL useful to be able to see changes over time. Why? Well, let's say sometime in june it worked, but now it does not, you wanna know when you broke it. If all the versions you ever made are available, you can binary search (go to the middle, if it works, then [02:02]
surial the error was introduced in the latter half. Go to THAT middle, etc. Even on 1000 updates, you find it in 7 steps or so), and also in practice when developing, you have 'branching'; you have a feature you're working on, it's not done yet, and a bug report comes in. You gotta sort of stow away your work, go back to the working version, fix it there, release an update, then go back to your work in progress and integrate that [02:02]
surial patch, or not. This is what version control systems do. Available options: git and a few others, but, really, just use git. [02:02]
surial Then there are libraries and such for the client side, such as lessy or sassy as css preprocessors (you can go raw css, but, ugh, painful), raw js or sometimes a preprocessor like coffeescript (I think you can do fine with raw JS here, but if you do A LOT of JS, maybe not), a JS dom library such as jquery... [02:03]
ron blog [02:04]
ron surial, ##java is not your personal blog. Take it back to your tumblr, where your ideas will be read by thousands of hungry followers. The next revolution will be led by YOU! Just like the last one. [02:04]
surial So in practice to do web dev, you're looking at, at minimum: JDBI (DBs), maven (build system), eclipse (IDE), jersey (request broker), velocity (templating system), jquery (JS DOM library), lessy (CSS preprocessor), and probably TestNG (test framework). [02:04]
noregret parted the channel: [02:04]
surial cozzym: ^^ [02:04]
surial ron: I'm answering the question, doofus. [02:04]
ron that's writing an essay. [02:04]
surial ... answering the question. [02:05]
dreamreal the least you could do is espouse my favorite technologies, though. [02:06]
Markow [] has joined ##java [02:06]
ron "hibernate" [02:06]
sbalmos your favorites are irrelevant [02:06]
ron there. [02:06]
Razerglass [unaffiliated/razerglass] has joined ##java [02:06]
dreamreal (and this DOES sound like a great topic for a channel blog entry.) [02:06]
cheeser we have a blog? [02:06]
cozzym wow thanks for that comprehensive answer surial [02:06]
sbalmos dreamreal: plus your favorites creates a microaggression and shows intolerance to other preferences [02:06]
dreamreal we really do! [02:06]
cozzym *copy pastes* [02:07]
sbalmos dreamreal: that will not be tolerated! [02:07]
dreamreal sbalmos: heh [02:07]
goolash [2607:fcd0:100:8203::1fad:8e7e] has joined ##java [02:08]
goolash ahh it's a wonderful day [02:08]
dreamreal surial: captured. I might play with that essay some to see if I can nudge it into a form for the blog, unless you want to write something for that purpose. [02:14]
dreamreal (writing something for that purpose WOULD be wise, but note that I'm almost guaranteed to inject my own biases no matter what.) [02:15]
dreamreal like: "NEVER EVER use JDBI; instead, BUY THIS BOOK. Whether you use it or not is irrelevant. Just buy it. Geez." [02:16]
cheeser turns out a friend of mine works on jdbi [02:16]
raoulvdberge [gateway/web/] has joined ##java [02:16]
dreamreal my foaf network encompasses developers who hit nearly all of those technologies. [02:17]
aspire [unaffiliated/aspire] has joined ##java [02:18]
ron cheeser: is he still? [02:18]
ron s/he [02:18]
cheeser yep [02:18]
ron both? [02:18]
Markhor1991 [] has joined ##java [02:23]
paperziggurat [gateway/web/] has joined ##java [02:24]
sbalmos dreamreal: I thought that was jOOq. ;) They seem to always be wanting to reinvent the wheel and blog about it [02:27]
runciter [] has joined ##java [02:28]
runciter is there any way to make log4j's ConsoleAppender rotate logs? [02:29]
dreamreal wait... the *console* appender? How do you rotate stdout? [02:30]
cheeser clear the screen :D [02:30]
Serdar [] has joined ##java [02:30]
runciter dreamreal: ok, so that's like, a great point [02:32]
runciter evidently something else has nabbed stdout [02:32]
runciter or System.out [02:32]
runciter thank you for the reality check :) [02:32]
cheeser haha. nice. [02:33]
ron dreamreal++ [02:33]
ron dreamreal has a karma level of 131, ron [02:33]
cheeser SpeakerToMeat: [02:34]
cheeser cheeser's title: "JavaFX at JavaOne | The Java Source" [02:34]
cheeser gerrit's a great resource to follow for JavaFX stuff [02:34]
sbalmos dreamreal: You want to know how to rotate stdout? Uh... pick your monitor up, rotate, profit. Or Alt-Arrow on your laptop. Or there's always White-Out... [02:36]
airborn [unaffiliated/airborn] has joined ##java [02:36]
runciter my typewriter has a lever that i can push that advances the page [02:38]
runciter i'll probably just that [02:38]
KaliLinuxGR [unaffiliated/kalilinuxgr] has joined ##java [02:39]
Serdar [] has joined ##java [02:42]
Enissay [unaffiliated/enissay] has joined ##java [02:48]
mEck0 [] has joined ##java [02:49]
huck5 [] has joined ##java [02:50]
Katana [unaffiliated/katana] has joined ##java [02:51]
hubatrix a good example for semaphores and mutex anyone ? in java [02:53]
dreamreal hubatrix: google! [02:53]
Lecherito [gateway/web/] has joined ##java [02:54]
blindbox [] has joined ##java [02:56]
acuzio hubatrix: the Multi-threading tutorial has a good example or even better are the examples in JCIP [02:58]
asgs javadoc Semaphore [02:58]
asgs asgs: [JDK: java.util.concurrent.Semaphore] [02:58]
asgs this one has a neat example [02:58]
hubatrix thanks asgs acuzio [02:58]
hubatrix 404 [02:58]
hubatrix url [02:58]
cheeser the javadoc's fucked up at the moment [02:58]
dreamreal look it up on ... google [02:58]
hubatrix I tried dreamreal well I am bearly understanding this [02:59]
dreamreal shrugs [02:59]
thebope [pdpc/supporter/student/thebope] has joined ##java [03:00]
hubatrix the concept I do [03:00]
hubatrix but not really the code [03:01]
acrussell [] has joined ##java [03:03]
hubatrix what does semaphore(int n) mean n is the number of signals taking place between 2 threads ? ( counting semaphore ) [03:03]
ryordan [] has joined ##java [03:04]
thebope [pdpc/supporter/student/thebope] has joined ##java [03:05]
milkman [] has joined ##java [03:07]
ianp anyone here do much docker development? looking for a way to speeed up the creation of my docker images as part of my build [03:09]
indistylo [] has joined ##java [03:09]
ianp the slowest part of my release build is building docker images, but the base image never really changes, just the application code loaded on to it... looking for a different approach to try to make the builds faster [03:09]
yawkat use FROM? [03:13]
asgs hubatrix: n indicates the number of permits you have available on a shared resource. every time a thread does something with the resource, it acquires a permit and releases it when it's done. if there are no permits, it has to wait until it's available [03:13]
asgs a crude example would be a floating licence scenario for a commercial ware. your company could've been granted 10 licences. if there are licences available, you could use it for sometime while the count is decremented by one. once you're done with that software, it's released to the pool so others could use it [03:14]
hubatrix permit form ? asgs [03:15]
ianp we do use FROM for the base image AFAIK.. 10 minute release build, builds 2 docker containers... probably 8mintes out of the 10 is building them. it's on a build server so i guess it redownloads the base image each time [03:15]
yawkat so make your build server not do that [03:15]
asgs permit from the Semaphore, of course. it's the middle man here [03:16]
ianp what should it do instead? have the base images located on each build server? [03:16]
squeakytoy [] has joined ##java [03:16]
ianp I'm fairly new to docker so i dont know what the best practices are [03:16]
squeakytoy pastebin [03:16]
squeakytoy Please paste your code and any errors to - for actual runnable snippets use [03:16]
cheeser you should ask a docket channel, ianp [03:16]
ianp we have a centralized docker repo [03:16]
ianp ok, nevermind [03:16]
ianp youre right, probably a better question for a docker channel [03:17]
yawkat ianp: try not removing intermediate images. [03:17]
cheeser question of topicality aside, you're more likely to find an answer there. [03:17]
yawkat that's your goal, at least. but i dont know how youre building. [03:17]
squeakytoy Hey guys. Is there any way I can make this code cleaner? I am using a Java8 lambda, as method argument. But I cannot have a single "Game" variable, since it needs to be final, which it can't. [03:18]
ianp that's the challenge, i think, i suppose the work area is usually pristine for a clean release build. so it's kind of related to java because maybe someone knows of a particular pattern to stage those things. thanks for the feedback, I'll dig some more [03:18]
federinik [unaffiliated/federinik] has joined ##java [03:19]
yawkat squeakytoy: make select be able to return a value? [03:19]
squeakytoy Then I need to create a container for ResultSet, which I am not to keen on. [03:19]
cheeser wha....? [03:20]
cheeser the hell is that? [03:20]
squeakytoy ? [03:21]
cheeser select() should return a T [03:21]
squeakytoy So, no way I can make this code clenaer, while keeping the lambda? [03:22]
cheeser is this your API? [03:22]
squeakytoy Yea [03:22]
cheeser select() should return a T [03:22]
yawkat squeakytoy: this pattern [03:22]
yawkat yawkat's title: "DBI (jDBI 2.48.2 API)" [03:22]
waz [pdpc/supporter/active/waz] has joined ##java [03:23]
elastix [] has joined ##java [03:23]
squeakytoy i dont see the pattern, based on a single method [03:23]
mac- [] has joined ##java [03:24]
yawkat you can also look at the lambda type. [03:24]
mac- hey [03:24]
squeakytoy What about i? [03:24]
squeakytoy What about it? [03:24]
yawkat it returns a ReturnType. that same value is then returned from the method. [03:24]
yawkat like cheeser said. [03:24]
mac- [03:24]
mac- mac-'s title: "Free Learning - Free Technology eBooks | PACKT Books" [03:24]
mac- Java 7 Concurrency Cookbook [03:24]
mac- for free [03:24]
squeakytoy Yea, so, to my original question. I can't clean up the code, but still use the lambda? [03:25]
squeakytoy Ah, wait [03:25]
squeakytoy Is the return type of the method, the one that gets generated in the callback? [03:25]
yawkat yes [03:25]
yawkat we are giving you a design pattern that solves your exact problem [03:25]
yawkat because this isnt uncommon [03:25]
squeakytoy Ah, ok. No i get it. [03:25]
squeakytoy Yea, that seems like a good idea [03:26]
squeakytoy Cool pattern, will try, thanks. [03:26]
squeakytoy its common in DB situations? [03:26]
cheeser sure [03:26]
yawkat makes for easy retrying, cleanup etc [03:27]
yawkat (both of which jdbi does) [03:27]
squeakytoy uhhh, then i need to relearn generics again [03:29]
squeakytoy im too tired for that >_> maybe time for bed instead [03:29]
last_staff [] has joined ##java [03:30]
squeakytoy so, how does this pattern work for multiple resultsets? [03:31]
squeakytoy it seems like a straight forward pattern for single objects, but when you need to callback multiple, i am not sure how it should work [03:32]
yawkat pair [03:33]
yawkat Q: Why is Java such a manly language? A: Because every programmer has to grow a Pair. [03:33]
squeakytoy Why do Java devs wear glasses? Since they can't C#. [03:33]
frd [] has joined ##java [03:34]
frd parted the channel: [03:36]
asgs that Concurrency cookbook looks good enough [03:38]
asgs too bad it's not free forever [03:39]
TooLmaN [] has joined ##java [03:39]
spew [] has joined ##java [03:39]
Colt [] has joined ##java [03:40]
MIC132 [] has joined ##java [03:42]
Serdar [] has joined ##java [03:43]
nickatnite [] has joined ##java [03:44]
BOKALDO [] has joined ##java [03:45]
C0nundrum anyone familiar with mybatis ? [03:46]
bob_the_clown [2601:281:8703:8a80:e4af:9ecc:a513:f43d] has joined ##java [03:47]
ubuntuisloved [] has joined ##java [03:47]
[twisti] asgs: on concurrency, read jcip [03:47]
[twisti] its the bible for a reason [03:47]
asgs yes, I do have it [03:48]
asgs the reason I quoted the cookbook is it looked like a quick refresher [03:48]
hubatrix any good place for a quick revision of OOP concepts ?? please dont tell me javadocs !! [03:48]
GhettoJava [] has joined ##java [03:50]
cheeser books [03:50]
cheeser Some good java books are Core Java Vol I ( and Vol II ( , and Java Concurrency in Practice ( [03:50]
mEck0 [] has joined ##java [03:50]
hubatrix *quick revision* cheeser [03:51]
roflmyeggo [] has joined ##java [03:54]
Serdar [] has joined ##java [03:55]
rotcev [gateway/web/freenode/ip.] has joined ##java [03:55]
eNull [gateway/web/] has joined ##java [03:55]
lv1 [] has joined ##java [03:55]
ubuntuisloved [] has joined ##java [03:57]
lv1 Hello! What is this chatroom generally used for? [03:58]
cheeser topicsmite lv1 [03:58]
cheeser And the wrath of /TOPIC descended with terrible fury upon lv1. And all the people marvelled, saying, Behold, we too should read the /TOPIC, lest we be stricken. And all the people read the /TOPIC, and went away edified. [03:58]
ibouvousaime [] has joined ##java [03:59]
dreamreal quick poll: if you use hibernate, do you use .hbm.xml or annotations for mapping? [04:00]
[twisti] annotations [04:00]
dreamreal anyone else? [04:01]
buglessdr [] has joined ##java [04:03]
dreamreal hubatrix: those are quick, but you have to know how to read and integrate information [04:04]
dreamreal I'd suggest the tutorial but you seem to resist it, despite it being probably the quickest way to grok the concepts [04:04]
waz [pdpc/supporter/active/waz] has joined ##java [04:06]
asgs annotations [04:07]
asgs are you in the mid of writing a blog article? [04:07]
ArkaZeen [] has joined ##java [04:07]
dreamreal no [04:07]
surial dreamreal: If I would use hibernate, I'd use the annotations. Not sure if that holds much water as I'd go pretty far out of my way to avoid using JPA. [04:09]
CedricBeust [unaffiliated/cbeust] has joined ##java [04:09]
dreamreal surial: *nod* I'm aware, and thank you even so [04:09]
dreamreal I'm trying to find someone who actually uses the XML on purpose without, like, having a really good reason to do so [04:10]
baraba [unaffiliated/baraba] has joined ##java [04:10]
surial Let's put it this way: I usually prefer to shove configuration and elaboration of structures, together _WITH_ the structure, in the source file. And I'll even write my own annotation processor to make that happen if I must. Then agian, you know, lombok, of course I would have a hard-on for annotations :P [04:10]
dreamreal academic interest [04:10]
surial ah. Yeah. Can't help you there :P [04:10]
hubatrix I came across this question design a hash function that can store name value pair for a scenario consisting of petabyte of data ? what should be my aproach how should I handle such huge data ? [04:10]
dreamreal hubatrix: learn to program first [04:10]
MarkyC [] has joined ##java [04:11]
dreamreal surial: I've used the XML, but the situation was one where the relationships were modeled from an existing DB, with specific names and types of relationships. The DDL wasn't hibernate-managed at all. That's... the only case I can find where the XML is really a good idea. [04:12]
dreamreal (And yes, I know, you're likely to tell me "ORM is a terrible idea in and of itself") [04:12]
dreamreal and my response will be, as usual, "yet it works, and if you're going to use relational systems, meh, you're already screwed") [04:12]
surial hubatrix: storing name/value pairs, even a bazillion of em, is straightforward. The trick is: If you have 5,000,000,000,000 such pairs stored away somewhere and I ask you: Okay, for key "Joe Blow", give me the value please, how do you do that quickly? How do you avoid checking 5,000,000,000,000 keys for a match? The usual answer to that question involves hash algorithms and buckets and the like. Your question presumes you [04:12]
surial already know all this and just zooms in on an appropriate hash function. Given that you probably don't know the basics yet, this is a bit like asking someone who just started out earning a driver's license, if they would like to read this pamphlet that explains exactly the chemical processes in a car catalyser. _RIDICULOUSLY_ not appropriate for you to learn. you're too stupid. [04:12]
kwladyka [] has joined ##java [04:12]
surial hubatrix: learn the stuff at the level you're at, in other words. walk before you try to run. [04:13]
dreamreal s/stupid/inexperienced/ [04:13]
surial yeah, that's a much better choice of words. [04:13]
dreamreal is a nice person. [04:13]
cheeser and stupid != ignorant. you can not know something (ignorant) and not be stupid. [04:13]
surial yeah, I used the wrong words, I'm aware. [04:14]
hubatrix thanks anyhow this helped [04:14]
dreamreal is glad hubatrix found something useful. [04:14]
surial dreamreal: I've written my own JDBI-like thing and one of the things it has is that you can just annotate a class with fields (this thing can't be null, this has the following default, index this thing, this is a reference to that table (and that field, defaults to unid field), this is the primary key, yadayada. I still have it but it's a part I wanna ditch. [04:14]
dreamreal Why do you want to ditch it, and for what? [04:15]
surial dreamreal: in practice you always, always end up having to modify the DB 'live', so there are translators that translate from 'old versions'. But there's no practical way for me to test that migrating a v5 to the current v6 ends up looking the exact same as using the current annotated fieldset as a basis to make the table in the first place. [04:15]
surial So, what I _WANT_, is a simple DSL (well, a nice fluent API is all, nothing fancy, it's just java) to do this, and then we just have methods: v0, v1, v2, v3 (annotated, of course), and to make v6, we just make v0 and evolve it up. [04:16]
surial This fundamentally doesn't jive with annotated fields. [04:16]
surial I already kinda have said DSL, so it's really just a matter of kicking the annotated field stuff out and makiing it a tad bit nicer for that v0 case. [04:16]
surial in practice if you have an empty DB, starting with some table definition and then running a bazillion ALTER TABLEs at it to redefine it into something utterly differenti s really fast, as there is no data anyway. [04:17]
MjrTom_ [azureus/MjrTom] has joined ##java [04:17]
MjrTom_ parted the channel: [04:18]
surial and you'd think: Hey, well, if you have a class with fields, you can do fun stuff! like: db.selectAllFields(MyTableModel.class).append("SELECT * FROM foo ").append("WHERE birthDate < ? ", LocalDate.of(1970, 1, 1).query(); or something, which would return an iterable<MyTableModel>. [04:18]
surial This too sounds great and easy and nice, but in practice I rarely write queries like that. It's usually "SELECT,, z.whatsit IN (?, ?) AS bloo FROM x INNER JOIN y WHERE blahblah;", so what I actually do is, if I want to, I can make a 'value class' JUST for _1_ query. [04:19]
surial either way I end up at: Having a class that is a model of the table structure, as blindingly obvious as that sounds... is useless. [04:19]
dreamreal heh [04:19]
Gluesticky [unaffiliated/gluesticky] has joined ##java [04:20]
dreamreal I actually like Hibernate's modeling - it's not perfect, but then again, you're going to a relational system, it's never going to be perfect. And you're right, migrations are a pain. [04:20]
surial (I prefer complex SQL over simplistic SQL and then doing the work java-side, because, well, performance is totally going to force you into it sooner rather than later anyway so why bother painting the dream that you can get away with simplistic SQL in the first place ? if it wasn't obvious). [04:20]
buglessdr [2600:1011:b112:f0dd:c031:7fdb:561e:c088] has joined ##java [04:20]
dreamreal agreed. [04:20]
dreamreal surial: privmsg? [04:21]
surial so I and up with aggregates, 5 inner joins, multiple inner selects, views, and more. Feel free. [04:21]
avalchev parted the channel: [04:23]
lv1 parted the channel: [04:24]
ArkaZeen [] has joined ##java [04:27]
a3Dman [unaffiliated/a3dman] has joined ##java [04:30]
gelignite [] has joined ##java [04:31]
ogradyd [] has joined ##java [04:32]
a3Dman [unaffiliated/a3dman] has joined ##java [04:35]
a3Dman [unaffiliated/a3dman] has joined ##java [04:39]
mEck0 [] has joined ##java [04:40]
xnrand [unaffiliated/xy] has joined ##java [04:41]
lv1 [] has joined ##java [04:42]
m3n3chm0 [] has joined ##java [04:43]
a3Dman [unaffiliated/a3dman] has joined ##java [04:45]
DLSteve [] has joined ##java [04:46]
danijoo_ [] has joined ##java [04:49]
mintograde [] has joined ##java [04:52]
a3Dman [unaffiliated/a3dman] has joined ##java [04:52]
purplex88 [unaffiliated/purplex88] has joined ##java [04:52]
acrussell [] has joined ##java [04:52]
freeone3000 [Syncleus/dev/freeone3000] has joined ##java [04:53]
lv1 [] has joined ##java [04:53]
sud0 [unaffiliated/sud0] has joined ##java [04:54]
hybridark [] has joined ##java [04:54]
a3Dman [unaffiliated/a3dman] has joined ##java [04:55]
average [unaffiliated/average] has joined ##java [04:58]
average anyone worked with Saxon ? [04:58]
average is there a way to get the path from the root down to an XdmItem ? [04:58]
average (that's a node inside of a parsed XML tree) [04:59]
talmos parted the channel: [04:59]
a3Dman [unaffiliated/a3dman] has joined ##java [04:59]
hubatrix yea I had once on SaxonHE [05:00]
average hubatrix: cool ! [05:00]
average hubatrix: so how would I get that path ? [05:00]
hubatrix but I dont average sorry I used saxon only yo convert my XML and XSLT to XSD may be others can help [05:01]
average mkay [05:01]
airborn_ [unaffiliated/airborn] has joined ##java [05:01]
GhettoJava [] has joined ##java [05:09]
elastix [] has joined ##java [05:10]
Xano [] has joined ##java [05:12]
Xano I'm confused as to how Stream::reduce() works. The BiFunction it takes seems to get the stream's current value as the first parameter value during the first call (with the second parameter empty), but as the second parameter value during all subsequent calls (where the first parameter is the last call's return value). [05:15]
Xano This inconsistency seems to indicate I did something wrong. [05:15]
gravitation [] has joined ##java [05:15]
dreamreal show us [05:15]
surial Xano: yes please. I assume you're talking about the 3-arg reduce function? with U, BiFunction, BinaryOperator? [05:16]
satifant [unaffiliated/satifant] has joined ##java [05:17]
surial Xano: the first argument of the BiFunction is the accumulator, the second is the new value. So if you're for example turning a stream of 'a', 'b', 'c', 'd', etcetera into the string "abcdefgh..", then your identity (first param ofyour reduce call) is "" (the empty string), the second is: (acc, v) -> acc + v [05:17]
Xano dreamreal, surial [05:18]
Xano The goal is to assemble a string consisting of the first letters of all words in a string, in other words an acronym. [05:18]
surial Xano: okay, step one is to use proper names. 'var0' and 'var1' are not helping here. [05:19]
Xano surial, I meant BinaryOperator, not BiFunction [05:19]
surial this is also the simpler reduce function. [05:19]
Xano surial, As soon as I know what the parameters do, I can rename them. [05:19]
Xano surial, If the first parameter is the accumulator, why does it have the first item as its value during the first call? [05:20]
surial Xano: first one is the accumulation. second one is the item. [05:20]
surial Xano: because that's how it works. [05:20]
surial Xano: what else should it be? [05:20]
Xano surial, I'm used to empty accumulators in PHP [05:20]
surial Xano: it can't sniff 0, 1, false, true, or "" just by sheer magic. [05:20]
surial Xano: define 'empty'. [05:20]
surial What does that mean? [05:20]
Xano In PHP reductions take a default accumulator value, so Java setting the first value as the default took me by surprise. [05:21]
surial for multiplication, 1 is 'empty'. for addition, it's 0. How the hell should the reduce function know? So you ahve two options, and only two: (A) y ou specify it explicitly (the OTHER reduce function lets you do it, first param of type 'U', named 'identity'), or (B) a special-casing for empty lists, and the accumulator starts being the first value. [05:21]
surial that's the one you choice. [05:21]
surial Xano: PHP is a piece of shit. [05:21]
surial Let's not look at it for inspiration. [05:21]
dreamreal heh [05:21]
Xano surial, Thanks for being a dick. Enjoy your evening. [05:21]
surial Xano: As I said, if you want to specify the initial value for your accumulator, you can do so; simply call another reduce. [05:21]
dreamreal Xano: he's pointing out truth to you [05:22]
Xano parted the channel: "Leaving" [05:22]
surial You're going to ignore advice and help if they shit on PHP some? Boy. you're in for... a lot of frustrating and very few answers. [05:22]
dreamreal if you're unable to ... accept truth without it being covered in honey, you're stupid [05:22]
dreamreal shrugs and moves on [05:22]
dreamreal "This doesn't work like it does in PHP!" "You're welcome." "Waaaah" [05:22]
CatDogSheep45 [2607:fb90:84d:c1d:561:ac3f:f69e:44d2] has joined ##java [05:23]
surial it actually DOES work like it does in PHP; but Xano would have to call the other reduce function for that. [05:23]
dreamreal was focusing on what was, not what could be [05:23]
a3Dman [unaffiliated/a3dman] has joined ##java [05:24]
surial though, of course, java has to make it complicated with a combiner. Then again, reduce, object of adoration for functional fanbois notwithstanding, is fundamentally not parallellizable and thus kinda dumb, so I get it. [05:25]
surial then again the supersimple reduce that returns the optional does NOT take one, so what's the harm in writing a reduce(U identity, BiFunction) version without a combiner? [05:25]
surial nevermind, it exists. my bad. [05:26]
lightt [unaffiliated/lightt] has joined ##java [05:26]
gravitation [] has joined ##java [05:28]
bitkiller [unaffiliated/bitkiller] has joined ##java [05:32]
EduFrazao [] has joined ##java [05:33]
cbeust [unaffiliated/cbeust] has joined ##java [05:36]
Corosauce [] has joined ##java [05:37]
Deacydal [unaffiliated/deacyde] has joined ##java [05:38]
buglessdr [2600:1011:b112:f0dd:cd84:191:e73:9c5e] has joined ##java [05:38]
Tachyon_ [] has joined ##java [05:39]
gravitation [] has joined ##java [05:42]
sl33k [] has joined ##java [05:43]
rany [unaffiliated/rany] has joined ##java [05:44]
acrussell [] has joined ##java [05:45]
Xgc [] has joined ##java [05:45]
vuoto [] has joined ##java [05:46]
bob_the_clown [2601:281:8703:8a80:e4af:9ecc:a513:f43d] has joined ##java [05:48]
lv1 [] has joined ##java [05:51]
rany [unaffiliated/rany] has joined ##java [06:00]
tlaxkit [] has joined ##java [06:00]
hwrdprkns [unaffiliated/hwrdprkns] has joined ##java [06:01]
cbeust [unaffiliated/cbeust] has joined ##java [06:01]
mEck0 [] has joined ##java [06:03]
lv1 [] has joined ##java [06:06]
zwliew [gateway/web/] has joined ##java [06:13]
Trovic [gateway/web/freenode/ip.] has joined ##java [06:14]
Leates_ [unaffiliated/leates] has joined ##java [06:15]
b4b [] has joined ##java [06:27]
waz [pdpc/supporter/active/waz] has joined ##java [06:29]
mike802 [] has joined ##java [06:31]
thebope [pdpc/supporter/student/thebope] has joined ##java [06:36]
thebope [pdpc/supporter/student/thebope] has joined ##java [06:39]
lv1 [] has joined ##java [06:43]
plitter hey, I'm at an assignment that is asking me to write a stack client that has a static method copy. Is a stack client a class that extends stack? [06:44]
surial plitter: 'a stack client' does not really mean much. [06:44]
plitter or should I implement it all myself [06:44]
surial plitter: If that's the full text of the assignment, it's completely unclear what it asks for. [06:44]
plitter surial: here is the whole text [06:46]
surial plitter: still have no idea. Presumably, a class called stack that has stack-like behaviour and implements Iterable; it's impossible to tell if you can just extend some existing class (probably not 'Stack', that one really blows. I'd go with ArrayDeque if I were you), or you have to write it from scratch. [06:47]
dreamreal plitter: class StackClient<T> extends ArrayDeque<T> {} // done [06:47]
surial also, don't extend, have a field. If you're gonna go the 'Imma just gonna use this existing thingie' route. public class MyStack implements Iterable<String> { private final ArrayDeque<String> stack = new ArrayDeque<>(); .... } [06:47]
surial You forgot the copy method. [06:48]
dreamreal shrugs. Exercise for the student. [06:48]
hwrdprkns [unaffiliated/hwrdprkns] has joined ##java [06:48]
silenced [unaffiliated/silenced] has joined ##java [06:49]
tonyacunar [] has joined ##java [06:49]
plitter p they do have a jar with all implementations, including a stack [06:49]
plitter but I am thinking that maybe I should just make a class that has the static copy method [06:50]
surial oh, yeah, it's possible 'stack client' is an idiotic way to say: "Utility class that does stuff to stacks". [06:50]
surial i.e. not itself one. [06:51]
PlanckWalk Does the Stack in the jar implement Iterable? [06:51]
plitter PlanckWalk: yes [06:51]
plitter surial: maybe :) its an algorithm course not a java course, but it is all written in java [06:52]
plitter (intro course) [06:52]
ResidentBiscuit [unaffiliated/residentbiscuit] has joined ##java [06:55]
GhettoJava [] has joined ##java [07:01]
Kol [] has joined ##java [07:01]
mofai [] has joined ##java [07:03]
gravitation [] has joined ##java [07:03]
mEck0 [] has joined ##java [07:03]
matty_r [] has joined ##java [07:05]
average parted the channel: [07:05]
rkazak [] has joined ##java [07:06]
ibouvousaime [] has joined ##java [07:08]
cbeust [unaffiliated/cbeust] has joined ##java [07:09]
leolrrj [] has joined ##java [07:10]
Immune [] has joined ##java [07:12]
mofai [] has joined ##java [07:14]
KieronWiltshire [2a02:c7d:1a45:4a00:38d2:b97a:7e1d:fb6b] has joined ##java [07:19]
l2esonance [] has joined ##java [07:21]
motaka2 [] has joined ##java [07:21]
KindOne [freenude/topless/kindone] has joined ##java [07:24]
tonyacunar [] has joined ##java [07:25]
jtdoncas [] has joined ##java [07:26]
mofai [] has joined ##java [07:26]
VVD [] has joined ##java [07:28]
jrozner [] has joined ##java [07:30]
leolrrj [2601:580:c000:8ba:c90b:8864:b810:42ac] has joined ##java [07:30]
jrozner I'm getting "No public static parameters method on class ..." when I try to run this test I've marked data method with the @Parameters annotation and it's public static. Am I doing something wrong [07:31]
silenced [unaffiliated/silenced] has joined ##java [07:31]
GhettoJava [] has joined ##java [07:33]
Hanii [] has joined ##java [07:34]
gravitation [] has joined ##java [07:34]
motaka2 [] has joined ##java [07:35]
P1RATEZ [unaffiliated/p1ratez] has joined ##java [07:40]
ljc [] has joined ##java [07:43]
mike802 [] has joined ##java [07:54]
gravitation [] has joined ##java [07:56]
codeme [] has joined ##java [07:57]
gravitation [] has joined ##java [08:01]
Tachyon_1 [] has joined ##java [08:01]
mebigfatguy By what mechanism does a java.sql.DataSource obtain the to-be-used url as supplied from some container... Unless i'm blind i don't see any setURL type method in the interface... is this reflectively found or something? [08:01]
T-2000 [unaffiliated/t-2000] has joined ##java [08:03]
mEck0 [] has joined ##java [08:04]
moestevens [] has joined ##java [08:08]
ojacobson mebigfatguy: what makes you think such a mechanism exists? [08:09]
ojacobson oh [08:09]
ojacobson you mean from the container-specific config? [08:09]
ojacobson (eg. from asadmin, for glassfish) [08:09]
mebigfatguy right [08:09]
ojacobson container-specific mechanisms ;) [08:09]
ojacobson more seriously, if you're using driver-provided DataSource classes, Java EE requires that you be provided with a way to set bean props on the actual object [08:10]
mebigfatguy so the container knows each database driver and knows a private whey to transfer this information? [08:10]
ojacobson those props do not have to exist on the interface [08:10]
ojacobson If you're using container-provided implementations (eg. one that wraps DriverManager), then the mechanism is purely container-dependent [08:10]
ojacobson bean props are available by introspection, and the administrator is expected to know what properties their drivers support [08:11]
ojacobson As a practical example, have a look at the Postgres JDBC driver: its implementation of DataSource exposes bean props for host, port, username, password, database name, and a few other attributes [08:11]
mebigfatguy well, for instance wls, has a static interface for setting a connection. with a URL entry. how does that value get into the DataSource? [08:11]
mebigfatguy surely wls doesn't know every driver that you could possibly use, and what method to call [08:12]
mebigfatguy does it just assume there is a setURL call, and look for it? [08:12]
ojacobson if it's using a URL, it's almost certainly wrapping DriverManager itself [08:12]
ojacobson many drivers provide DataSource implementations that do not use a URL at all (postgres, again) [08:12]
mebigfatguy so the web app, gets a DataSource, and that datasource returns a connection based on somehow the container uses DriverManager to set the url? that doesn't make sense [08:13]
ojacobson sure it does [08:14]
ojacobson the container creates an object implementing DataSource whose getConnection() method does the moral equivalent of DriverManager.getConnection(url) [08:14]
ojacobson it uses a generic DataSource implementation, rather than anything driver-specific [08:14]
ojacobson that's my theory, anyways [08:14]
mebigfatguy so the datasource you receive as a web app, is not from the driver itself, but a wrapped DataSource provided by the container? [08:15]
ojacobson yeah [08:15]
spronk [] has joined ##java [08:15]
mebigfatguy ah ok. [08:15]
rwheadon is there a good way to find out the source of this error? : java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy [08:15]
ojacobson I don't know WLS well enough to validate that theory but it should be easy to test in a debugger :) [08:15]
mebigfatguy that certainly could work, but seems pretty bogus [08:16]
ojacobson It's surprisingly common [08:16]
ojacobson I know JBoss used to support exactly that mechanism (around JBoss 4 era) for folks who didn't know how to configure a driver-specific DataSource [08:16]
mebigfatguy so you only use the driver's DataSource when you are programmetically creating it directly in your program? which is most likely never? [08:17]
ojacobson Or if you configure the container to specifically use the driver's own implementation, at least in JBoss's case. [08:17]
ojacobson (Glassfish has a similar mechanism available, but they encourage you to use driver-specific classes more often.) [08:17]
ojacobson (And then they wrap them anyways, to do things like release leaked connections back to the pool.) [08:18]
mebigfatguy yeah that makes sense [08:18]
tassilo_tazz [2601:41:4201:6650:2811:9099:c9e0:ecbf] has joined ##java [08:18]
rwheadon here's a gist of the stack : [08:18]
mebigfatguy but then the DataSource is really quite a stinky design [08:18]
tassilo_tazz [08:19]
tassilo_tazz [08:19]
tassilo_tazz Problem is that when I type yes it prints out "You Typed Yes" and "You typed no" [08:19]
tassilo_tazz tassilo_tazz's title: "Gyazo - de95275f6c83f38488cf73d8714bc7db.png" [08:19]
ojacobson mebigfatguy: how so? [08:19]
tassilo_tazz Can anyone help? [08:19]
ojacobson Callers don't have to care whether the container-provided DS is a generic DS, a driver-specific DS, or an app-provided DS [08:19]
ojacobson DataSource-the-interface is designed for clients, not administraors [08:19]
mebigfatguy so if you are a driver writer, how do you implement DataSource? [08:19]
mebigfatguy tassilo_tazz, look at line 16 real careful [08:20]
tassilo_tazz There's a "}" - I don't see anything wrong .-. [08:21]
rwheadon grins [08:21]
mebigfatguy rwheadon, no idea, but maybe pastebin STSService.getSTSServicePort [08:22]
mildlettuce [unaffiliated/mildlettuce] has joined ##java [08:22]
mebigfatguy tassilo_tazz, this line is wrong -> else if ("no".equals(response)); [08:22]
rwheadon mebigfatguy: ok, let me decompile the class [08:22]
tassilo_tazz Hmmm.. I don't see what's wrong with it, mind telling me? xD [08:24]
KindOne_ [freenude/topless/kindone] has joined ##java [08:24]
mebigfatguy tassilo_tazz, what is that line doing, and if the condition is true what gets executed because it is true? [08:24]
rwheadon tassilo_tazz: remove the line breaks around the curly braces and see how it looks [08:25]
tassilo_tazz It's testing if if no is equal to what ever was typed, if so then it will output "You typed no" [08:25]
surial rwheadon: sounds like a classpath messup. [08:25]
mebigfatguy rwheadon, oh, i thought that was your class [08:25]
mebigfatguy tassilo_tazz, how do you know what is executed if an if is true? what are the rules? [08:26]
surial tassilo_tazz: what's the difference between the if line and the else if line? [08:26]
surial tassilo_tazz: look towards.. the end. [08:26]
mebigfatguy or else if in this case [08:26]
rwheadon no, it's an ongoing saga of two vmware packages not playing well together... so I broke one up and have been putting pieces back together as needed... so quite certainly it's something missing I just have no way of knowing what [08:27]
tassilo_tazz OOooo! there is a ";" [08:27]
surial tassilo_tazz: hey now. [08:27]
mebigfatguy bingo [08:27]
tassilo_tazz I feel like a huge newb [08:27]
rwheadon so far the stacks have been helpful... but not so much this one [08:27]
surial tassilo_tazz: IDEs with code linters will warn you when you pull stunts like this. they're useful. [08:27]
tassilo_tazz Thanks guys!! As you can tell I'm still very new to Java [08:27]
motaka3 [] has joined ##java [08:27]
tassilo_tazz Surial what IDE do you use? [08:27]
surial eclipse. [08:27]
freeone3000 [Syncleus/dev/freeone3000] has joined ##java [08:28]
surial tassilo_tazz: turn on 'warning' for 'empty statement' and this would have been flagged. [08:29]
tassilo_tazz Thank you for the tip. Turning it on now. And wow you're all so nice on this channel :D [08:30]
mebigfatguy that should really be a separate warning that is on by default [08:30]
surial mebigfatguy: semis after if? Yeah probably. [08:30]
tassilo_tazz I didn't warn me and I use Eclipse. [08:30]
surial mebigfatguy: well, no. I mean, when is an empty statement ever useful? [08:30]
surial If I write while(true); I'd also like to know. [08:30]
mebigfatguy well, an empty catch block for instance is bad, but not the same as semi after condition [08:30]
surial mebigfatguy: an empty catch block is not an empty statement. [08:31]
mebigfatguy the first is just lazy, the second is dead wrong [08:31]
surial ; is an empty statement. catch (Throwable t) {;} <-- this is legal. [08:31]
tassilo_tazz Gtg I'll be back in like 2 hours [08:31]
IronMike [] has joined ##java [08:31]
freeone3000 [08:32]
freeone3000 JVM bug report, or is this caused by something sane? [08:32]
surial catch (Throwable t) {;} would get you an eclipse warning: Empty statement. catch (Throwable t){} does not. You can tell pmd and such to whinge about empty catch blocks if you prefer. [08:32]
surial it's jdk1.7, oracle's not gonna give a fuck. [08:32]
mebigfatguy ah maybe so... thought eclipse wined about that too [08:32]
runciter parted the channel: [08:33]
surial I think you can turn it on, I never do. [08:33]
mebigfatguy so ojacobson how does a driver writer implement DataSource? [08:34]
average [unaffiliated/average] has joined ##java [08:35]
average does HashMultiset require additional memory for storing the same key twice ? [08:35]
IronMike I am tearing my hair out with a persistence.xml problem. I have a basic persistence.xml file defined that works with hibernate-entitymanager 4.3.1.Final but when I run against 5.2.2.Final Persistence.createEntityManagerFactory fails saying it can't find the persistence unit. What's going on here? [08:35]
rwheadon mebigfatguy: here's the paste of STSService.getSTSServicePort, not very enlightening to me : [08:37]
knob [] has joined ##java [08:40]
rwheadon I was almost happier with the JAXB duplicate class errors! :p [08:40]
SwiftMatt [] has joined ##java [08:41]
rwheadon I wonder if I gave up on trying to marshall the classes with the JAXB2 maven plugin too early [08:43]
ryordan [] has joined ##java [08:46]
rhorama [] has joined ##java [08:48]
hwrdprkns [unaffiliated/hwrdprkns] has joined ##java [08:49]
codeme [] has joined ##java [08:51]
zylum_ [unaffiliated/zylum] has joined ##java [08:53]
gravitation [] has joined ##java [08:54]
frivol [unaffiliated/flippo] has joined ##java [08:55]
plarsen [redhat/jboss/pdpc.professional.plarsen] has joined ##java [08:56]
mEck0 [] has joined ##java [09:06]
Suchorski [unaffiliated/suchorski] has joined ##java [09:08]
tonyacunar [] has joined ##java [09:09]
Ropeney [] has joined ##java [09:09]
sssilver [] has joined ##java [09:09]
matty_r [] has joined ##java [09:13]
silenced [unaffiliated/silenced] has joined ##java [09:14]
rkazak [] has joined ##java [09:14]
elliot-59 [] has joined ##java [09:14]
svm_invictvs [unaffiliated/svminvictvs/x-938456] has joined ##java [09:17]
moms [] has joined ##java [09:19]
Kol [] has joined ##java [09:20]
Mr0dus [] has joined ##java [09:21]
Mr0dus parted the channel: [09:21]
CedricBeust [unaffiliated/cbeust] has joined ##java [09:27]
silenced [unaffiliated/silenced] has joined ##java [09:29]
zylum [unaffiliated/zylum] has joined ##java [09:31]
fred-fri [] has joined ##java [09:31]
ubuntuisloved [] has joined ##java [09:34]
roflmyeggo [] has joined ##java [09:37]
athidhep [unaffiliated/athidhep] has joined ##java [09:53]
neopeng [] has joined ##java [09:53]
makknife_ [] has joined ##java [09:56]
makknife_ [] has joined ##java [09:57]
makknife_ [] has joined ##java [09:58]
makknife [] has joined ##java [09:59]
makknife [] has joined ##java [10:01]
makknife [] has joined ##java [10:02]
makknife [] has joined ##java [10:03]
momomo [] has joined ##java [10:04]
makknife [] has joined ##java [10:04]
gravitation [] has joined ##java [10:04]
makknife [] has joined ##java [10:05]
makknife [] has joined ##java [10:06]
mEck0 [] has joined ##java [10:07]
makknife [] has joined ##java [10:07]
makknife [] has joined ##java [10:08]
makknife [] has joined ##java [10:09]
makknife [] has joined ##java [10:10]
edvorg [] has joined ##java [10:12]
makknife [] has joined ##java [10:12]
b4b [] has joined ##java [10:12]
makknife [] has joined ##java [10:13]
makknife [] has joined ##java [10:14]
makknife [] has joined ##java [10:15]
gravitation [] has joined ##java [10:16]
makknife [] has joined ##java [10:16]
makknife [] has joined ##java [10:17]
neopeng [] has joined ##java [10:17]
makknife [] has joined ##java [10:18]
makknife [] has joined ##java [10:20]
smarty [] has joined ##java [10:20]
makknife [] has joined ##java [10:21]
neopeng [] has joined ##java [10:21]
makknife [] has joined ##java [10:22]
Katana [unaffiliated/katana] has joined ##java [10:22]
smarty hello [10:22]
neopeng [] has joined ##java [10:23]
makknife [] has joined ##java [10:23]
makknife [] has joined ##java [10:24]
makknife [] has joined ##java [10:25]
makknife [] has joined ##java [10:26]
makknife [] has joined ##java [10:27]
makknife [] has joined ##java [10:28]
surial ops [10:28]
surial to a list of the channel ops type: /msg chanserv access ##java list. If you have an issue with channel operations, contact any of the above. [10:28]
surial dreamreal: ping [10:28]
surial dreamreal: ban makknife. [10:28]
makknife [] has joined ##java [10:29]
makknife [] has joined ##java [10:30]
gravitation [] has joined ##java [10:31]
makknife [] has joined ##java [10:32]
makknife [] has joined ##java [10:33]
makknife [] has joined ##java [10:34]
makknife [] has joined ##java [10:35]
MarkyC [] has joined ##java [10:36]
makknife [] has joined ##java [10:36]
makknife [] has joined ##java [10:37]
makknife [] has joined ##java [10:39]
makknife [] has joined ##java [10:40]
jazzonmym1nd [unaffiliated/jazzonmym1nd] has joined ##java [10:41]
makknife [] has joined ##java [10:41]
dj_pi [] has joined ##java [10:42]
makknife [] has joined ##java [10:42]
makknife [] has joined ##java [10:43]
MarkyC [] has joined ##java [10:44]
makknife [] has joined ##java [10:44]
makknife [] has joined ##java [10:45]
makknife [] has joined ##java [10:47]
makknife [] has joined ##java [10:48]
rwheadon [] has joined ##java [10:48]
aspire [unaffiliated/aspire] has joined ##java [10:48]
fstd_ [unaffiliated/fisted] has joined ##java [10:50]
MarkyC [] has joined ##java [10:52]
thepr [] has joined ##java [10:52]
thepr is there a getCanonicalPath for Path? [10:53]
thepr toString doesnt seem to have the same behavior [10:53]
neopeng [] has joined ##java [10:54]
decontamin4t0R [unaffiliated/decontamin4t0r] has joined ##java [10:54]
plitter javadoc Path [10:56]
plitter plitter: [JDK: java.nio.file.Path] [10:56]
thepr ... [10:57]
thepr Im slightly confused [10:57]
thepr my question was how, with a Path, to get a canonical Path as a String [10:57]
thepr the `toString` of Path doesnt appear to do that [10:57]
tonyacunar [] has joined ##java [11:02]
mEck0 [] has joined ##java [11:08]
neopeng [] has joined ##java [11:09]
average parted the channel: [11:11]
edvorg [] has joined ##java [11:16]
neopeng [] has joined ##java [11:24]
neopeng [] has joined ##java [11:26]
spronk [] has joined ##java [11:27]
spew [] has joined ##java [11:31]
Seifer [] has joined ##java [11:31]
ljc [] has joined ##java [11:31]
b4b [] has joined ##java [11:34]
AMcBain [] has joined ##java [11:35]
milkman [] has joined ##java [11:38]
neopeng [] has joined ##java [11:40]
robink_ [unaffilated/robink] has joined ##java [11:44]
hwrdprkns [unaffiliated/hwrdprkns] has joined ##java [11:45]
neopeng [] has joined ##java [11:46]
matty_r [] has joined ##java [11:53]
neopeng [] has joined ##java [11:59]