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

« 2020-01-13


2020-01-15 »

Nick Message Date
snowmanbamm [snowmanbamm!snowmanbam@gateway/vpn/privateinternetaccess/snowmanbamm] has joined ##java [12:08]
MrRothstein [MrRothstein!a1457a0e@] has joined ##java [12:19]
MrRothstein i don't know where else to ask and figured you guys might know... i remember reading somewhere the definition of "architecture", it was something like "normative constraints on design". Trying to find the quote and I can't... I thought it was maybe in implementing ddd, but i can't find it now. Does it sound familiar to anybody here? [12:21]
cheeser try ##programming [12:33]
BeerLover [BeerLover!~BeerBuddy@] has joined ##java [12:42]
extor [extor!~extor@unaffiliated/extor] has joined ##java [12:45]
EmmaT [EmmaT!~EmmaT@] has joined ##java [12:45]
BeerLove_ [BeerLove_!~BeerBuddy@] has joined ##java [12:47]
tassee [tassee!] has joined ##java [12:58]
dtrott parted the channel: [01:15]
sauvin [sauvin!sauvin@about/linux/staff/sauvin] has joined ##java [01:17]
EmmaT [EmmaT!~EmmaT@] has joined ##java [01:19]
feannag [feannag!~feannag@2409:4042:102:b238:c96:39f:af01:444] has joined ##java [01:19]
karab44 [karab44!~karab44@unaffiliated/karab44] has joined ##java [01:25]
snowmanbamm [snowmanbamm!snowmanbam@gateway/vpn/privateinternetaccess/snowmanbamm] has joined ##java [01:31]
oxum [oxum!~oxum@] has joined ##java [01:32]
cpplearner Guys, is there any cases where a class reference(=access) is not done via a constant pool? [01:36]
cpplearner I mean, in the context of JVM. [01:36]
led_dark_1 [led_dark_1!~Thunderbi@] has joined ##java [01:44]
hussam [hussam!uid193284@gateway/web/] has joined ##java [01:54]
TomyWork [TomyWork!~TomyLobo@] has joined ##java [02:00]
palasso [palasso!~palasso@unaffiliated/palasso] has joined ##java [02:00]
yawkat Reflection? [02:12]
yawkat What do you mean by "via the constant pool" [02:12]
Zee- [Zee-!~Zee-@] has joined ##java [02:22]
palasso [palasso!~palasso@unaffiliated/palasso] has joined ##java [02:24]
Tichodroma [Tichodroma!~lutz@fsf/member/Tichodroma] has joined ##java [02:28]
quadsar [quadsar!~quadsar@unaffiliated/quadsar] has joined ##java [02:31]
BeerLover [BeerLover!~BeerBuddy@] has joined ##java [02:35]
serdar [serdar!~serdar@2a02:908:5c0:540:d0b7:8c75:8fc2:9b90] has joined ##java [02:43]
RazielXYZ [RazielXYZ!~Raziel@unaffiliated/raziel] has joined ##java [02:44]
EmmaT [EmmaT!~EmmaT@] has joined ##java [02:47]
ogradyd [ogradyd!~Thunderbi@2a02:8070:88bf:9df0::449] has joined ##java [02:51]
BeerLover [BeerLover!~BeerBuddy@] has joined ##java [02:53]
Matthijs [Matthijs!~quassel@unaffiliated/matthijs] has joined ##java [02:58]
very_sneaky [very_sneaky!~very_snea@] has joined ##java [03:07]
very_sne_ [very_sne_!~very_snea@] has joined ##java [03:09]
tomboy64 [tomboy64!~tomboy64@gateway/tor-sasl/tomboy64] has joined ##java [03:13]
extor [extor!~extor@unaffiliated/extor] has joined ##java [03:14]
very_sneaky [very_sneaky!] has joined ##java [03:16]
CombatVet [CombatVet!~c4@gateway/tor-sasl/combatvet] has joined ##java [03:17]
FabioP [FabioP!] has joined ##java [03:22]
FabioP morning o/ [03:23]
srm [srm!~Adium@unaffiliated/srm] has joined ##java [03:30]
Maxdamantus [Maxdamantus!~Maxdamant@unaffiliated/maxdamantus] has joined ##java [03:33]
EmmaT [EmmaT!~EmmaT@] has joined ##java [03:45]
EmmaT [EmmaT!~EmmaT@] has joined ##java [03:49]
EmmaT [EmmaT!~EmmaT@] has joined ##java [03:53]
gbobby [gbobby!~raltnoede@LINBIT/gbobby] has joined ##java [03:55]
very_sneaky [very_sneaky!~very_snea@] has joined ##java [03:56]
treeman5 [treeman5!~treeman5@] has joined ##java [04:01]
ogradyd [ogradyd!~Thunderbi@2a02:8070:88bf:9df0::449] has joined ##java [04:09]
spuz [spuz!6dee4b8e@gateway/web/cgi-irc/] has joined ##java [04:22]
treeman6 [treeman6!~treeman5@] has joined ##java [04:26]
hinst [hinst!509c193b@gateway/web/cgi-irc/] has joined ##java [04:29]
oxum [oxum!~oxum@] has joined ##java [04:38]
conan [conan!] has joined ##java [04:38]
dob1 what does "Tells whether the file is a regular file with opaque content." opaque means in this context? [04:42]
dob1 isRegularFile() [04:43]
spuz dob1: it means it's not a directory, pipe, device or other special file type [04:47]
spuz it might still be a symbolic link but there is an option to that method to specify whether or not you want to follow links [04:48]
EmmaT [EmmaT!~EmmaT@] has joined ##java [04:49]
Technodrome [Technodrome!~textual@unaffiliated/technodrome] has joined ##java [04:51]
kaniki [kaniki!~kaniki@] has joined ##java [04:57]
kaniki /join ##bug [04:58]
jaziz1 [jaziz1!~jaziz@unaffiliated/jaziz] has joined ##java [05:00]
macroprep how can i invoke a method before the garbage collector gets ran [05:03]
macroprep as im trying to calculate the total memory usage of my application that would be used if the garbage collector was not present [05:04]
Cahaan [Cahaan!~Cahaan@2a02:a03f:5a79:d000:ddf3:498e:2213:766a] has joined ##java [05:04]
macroprep for example, total memory usage over 2 hours [05:05]
deebo set a max and see if it's enough [05:05]
mbooth macroprep: If garbage collector was not present you'd run OOM [05:06]
macroprep but because of the garbage collector, i cannot actually do this since the current memory usage decreases when the garbage collector runs, and i have no way of knowing if any allocations are made during the time the GC IS BEING RAN [05:06]
macroprep is being ran* [05:07]
spuz macroprep you can disable the garbage collector in some version of java.. I can't find the details at the moment though [05:07]
mbooth macroprep: In general you can't predict when it will run, so *all* method invocations are before a garbage collection. [05:07]
Gazooo [Gazooo!~Gazooo@] has joined ##java [05:07]
spuz Here we go: [05:08]
spuz spuz's title: "JEP 318: Epsilon: A No-Op Garbage Collector (Experimental)" [05:08]
spuz [05:09]
mbooth spuz++ # fist time I'm seen epsilon, TIL [05:10]
mbooth spuz has a karma level of 5, mbooth [05:10]
hussam [hussam!uid193284@gateway/web/] has joined ##java [05:10]
dob1 spuz, ok thanks [05:11]
conan_ [conan_!] has joined ##java [05:11]
macroprep x.x [05:25]
oxum [oxum!~oxum@] has joined ##java [05:25]
dreamreal morning [05:27]
Cyp_ [Cyp_!~Cyp_@2a05:f6c7:2883:0:2f1d:5968:2fed:3169] has joined ##java [05:27]
hinst [hinst!509c193b@gateway/web/cgi-irc/] has joined ##java [05:28]
melatonina [melatonina!uid317528@gateway/web/] has joined ##java [05:30]
treeman5 [treeman5!~treeman5@] has joined ##java [05:33]
treeman6 [treeman6!~treeman5@] has joined ##java [05:36]
benskey [benskey!] has joined ##java [05:38]
hooper [hooper!] has joined ##java [05:39]
very_sne_ [very_sne_!~very_snea@] has joined ##java [05:40]
Me4502 [Me4502!~quassel@unaffiliated/me4502] has joined ##java [05:41]
EmmaT [EmmaT!~EmmaT@] has joined ##java [05:41]
ChaiTRex [ChaiTRex!~ChaiTRex@gateway/tor-sasl/chaitrex] has joined ##java [05:41]
benskey o/ I've been studying core java and now trying to move into Spring, databases and other enterprise stuff. I learned that Spring (jpa) translates method queries like "findByLastnameAndFirstname" into e.g. "? where x.lastname = ?1 and x.firstname = ?2" under the hood. I was wondering if it is the conventional way to handle database operations or is using actual SQL just as used/accepted? Trying to get into good habits right from th [05:44]
benskey rt.. [05:44]
dreamreal benskey: Spring Data is *a* convenient way to do it, but note that relying on query generation tends to get unwieldy really, really quickly [05:44]
benskey dreamreal: Would it be a good idea for me to stick to SQL queries for now? I guess the reason I'm overthinking this is that I am not that experienced with databases/sql and was thinking it would make me learn more if I stick to doing the queries myself, I was just afraid if it might not be the convention [05:46]
dreamreal Are you only talking to SQL databases? [05:46]
spuz benskey in my experience it's better to have full control over your SQL and your schema. Eventually, your ORM will paint you into a corner, or produce some really weird poorly performing query. [05:46]
dreamreal It's "a" convention, not "the" convention [05:46]
dreamreal and Spring Data does *not* imply an ORM [05:47]
dmiles [dmiles!] has joined ##java [05:47]
spuz benskey as far as having it on your CV, I would say SQL is more valuable than <insert-ORM-name-here> [05:47]
benskey Yes for now I am learning sql and postgresql [05:47]
spuz that's just my opinion though [05:47]
dreamreal recognizes he's being ignored, moves on [05:48]
benskey Haha dreamreal I replied I am only talking to SQL (postgresql) just didn't tag you [05:48]
zalt [zalt!~devp@unaffiliated/lambda443] has joined ##java [05:49]
dreamreal being tagged isn't relevant, I'm *reading the channel* [05:49]
benskey Cheers everyone, I'll focus on manual SQL for now in that case! [05:49]
[twisti] benskey: may i recommend the excellent JDBI (not to be confused with jdb*C*) as a light weight framework that takes care of the more annoying parts while still allowing you full control ? [05:50]
benskey Please! [05:51]
benskey I haven't learned much about database stuff with Java yet so it's all quite a bit confusing [05:51]
[twisti] i would say that jdbi has an incredibly low entrance barrier because it really is designed around making the most common stuff simple [05:52]
pmart [pmart!d9619129@gateway/web/cgi-irc/] has joined ##java [05:53]
benskey twisti: I guess I am quite a bit concerned about the industry standards and whatever makes it easy to get a job (atm trying to switch from front-end into back-end and the entrance to the job market as a fresh graduate is quite tough). Would you say it's fine in that regard? [05:54]
maroloccio [maroloccio!~marolocci@] has joined ##java [05:54]
[twisti] jdbi will make you productive. jpa and hibernate will make you sad and drink alone, but they are things youd put on a resume. [05:55]
dreamreal and hyperbole makes people pay attention to you [05:55]
maroloccio [maroloccio!~marolocci@] has joined ##java [05:56]
benskey Got you. Thanks a bunch! I do keep on hearing not-so-good things about Hibernate but it is on pretty much every java job listing out there at the moment.. [05:56]
spuz benskey to some extent, the technologies that you see on job listings are those that no-one wants to do because they're awful so bear that in mind [05:57]
dreamreal benskey: it's great. [05:57]
mbooth benskey: Eh, there is software that people complain about, and software that nobody uses. :-p [05:57]
mbooth Guess which hibernate is ;-) [05:57]
[twisti] dreamreal: :* [05:58]
benskey I figured haha [05:58]
benskey Well hey can't be much worse than moving pixels around for 8 hours so I'll take it [05:58]
maroloccio [maroloccio!~marolocci@] has joined ##java [05:59]
dreamreal Hibernate isn't perfect. Neither is JDBI, or JOOQ, or lombok, or the JVM, or anything. Hibernate tends to be used as a cannon even though it wasn't designed to be and wasn't intended to be, and people TEND to bag on it because they ran into a situation where it just doesn't fit their requirements and they refuse to use the facilities it provides to help with that. [05:59]
dreamreal "Hibernate sucks because I won't use the native interface where appropriate" <-- uhhhhh okay [05:59]
RazielZ [RazielZ!~Raziel@unaffiliated/raziel] has joined ##java [06:00]
dreamreal but that's the MAIN criticism of the library, once you decide that you're going to use an ORM [06:00]
mbooth dreamreal: That's a long way of saying what I said ;-) [06:00]
dreamreal I know [06:00]
dreamreal I was trying to explain it, not counter it [06:00]
dreamreal ... I'm not even sure how hibernate got into the discussion when the question was about spring data [06:03]
dreamreal "I like the color blue" "BUT PEARS ARE ABSOLUTELY THE WORST FRUIT EVER!" [06:03]
dreamreal .... okay [06:04]
mbooth waves hand [06:04]
mbooth "This is not the ORM you are looking for." [06:04]
Lengsdorfer [Lengsdorfer!~Lengsdorf@unaffiliated/lengsdorfer] has joined ##java [06:11]
oxum [oxum!~oxum@] has joined ##java [06:14]
ipe [ipe!] has joined ##java [06:17]
oxum [oxum!~oxum@] has joined ##java [06:37]
ogradyd [ogradyd!~Thunderbi@2a02:8070:88bf:9df0::449] has joined ##java [06:38]
oxum [oxum!~oxum@] has joined ##java [06:44]
odinsbane [odinsbane!] has joined ##java [06:45]
pmart [pmart!d9619129@gateway/web/cgi-irc/] has joined ##java [06:47]
sdu [sdu!~doo@] has joined ##java [06:47]
EmmaT [EmmaT!~EmmaT@] has joined ##java [06:49]
EmmaT [EmmaT!~EmmaT@] has joined ##java [06:53]
CuriousErnestBro hello [07:00]
CuriousErnestBro How do you enable warnings in IDEA? [07:00]
dreamreal how do you turn them off? [07:01]
CuriousErnestBro Oh it's automatically enabled [07:01]
CuriousErnestBro no wait, someone else it getting warnings on his machine (different IDE) [07:01]
CuriousErnestBro Isn't there somewhere where you can set warning levels? [07:02]
dreamreal project settings, also preferences, but... what kind of warnings are you talking about? [07:02]
CuriousErnestBro dreamreal, do you mean project structure? [07:05]
yawkat no [07:06]
yawkat it's in the settings somewhere [07:06]
yawkat idea calls it inspections [07:06]
CuriousErnestBro Ah okay, thanks [07:07]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [07:07]
Cahaan_ [Cahaan_!~Cahaan@2a02:a03f:5a79:d000:ddf3:498e:2213:766a] has joined ##java [07:08]
tomboy64 [tomboy64!~tomboy64@gateway/tor-sasl/tomboy64] has joined ##java [07:09]
feannag [feannag!~feannag@2409:4042:102:b238:c96:39f:af01:444] has joined ##java [07:09]
EmmaT [EmmaT!~EmmaT@] has joined ##java [07:14]
realtime [realtime!~realtime@unaffiliated/realtime] has joined ##java [07:19]
hypc1 [hypc1!~Thunderbi@] has joined ##java [07:30]
matsurago [matsurago!~matsurago@240b:10:b3a1:1700:227c:8fff:fe9b:7ad6] has joined ##java [07:32]
hypc1 [hypc1!~Thunderbi@] has joined ##java [07:37]
kupi [kupi!uid212005@gateway/web/] has joined ##java [07:38]
benskey [benskey!] has joined ##java [07:39]
oxum [oxum!~oxum@] has joined ##java [07:40]
oxum [oxum!~oxum@] has joined ##java [07:40]
newbieG [newbieG!~newbieG@] has joined ##java [07:52]
Kundry_Wag [Kundry_Wag!~Kundry_Wa@] has joined ##java [07:52]
newbieG Is there any difference between accessing public class from jar and from own project? [07:52]
mrhall [mrhall!b51c946f@] has joined ##java [07:56]
matsurago newbieG: I don't think so. [07:57]
mbooth newbieG: If everything is loaded by the same classloader, then no difference at all. If you don't know what a classloader is, then just assume everyone can access your public class from anywhere. [07:58]
mrhall Hello there! I have a question about numeric wrapper comparasion, wich is the diference between <> and compareTo method? Is there an issue with border cases if i use <>? [07:58]
sonOfRa Java doesn't have overloads for operators on Number [07:58]
sonOfRa Are you sure you're looking for java and not another language? [07:58]
sonOfRa javascript [07:59]
sonOfRa Java is to JavaScript as ham is to hamster ( Try ##javascript. [07:59]
mrhall No, im talking about the diference between num1 < num2 and num1.compareTo(num2) < 0 [08:00]
mrhall both variables are Integers [08:00]
matsurago mrhall: in the first case num1 and num2 are both cast to primitive ints, NullPointerException may occur if either num1 or num2 is null; in the second case, no unboxing happens, and NullPointerException occurs only when num1 is null. [08:02]
sonOfRa matsurago: I don't think that's correct [08:03]
sonOfRa Let's verify! [08:03]
sonOfRa yup, NPE for num2=null as well. [08:04]
spuz [spuz!6dee4b8e@gateway/web/cgi-irc/] has joined ##java [08:04]
matsurago sonOfRa: OK, you get NPEs in both cases, thanks for the correction :) [08:05]
sonOfRa Everything other than NPE for that scenario doesn't make sense, there's no sensible answer for the question "is the absence of a value smaller or larger than a certain value"? [08:05]
oxum [oxum!~oxum@] has joined ##java [08:05]
surial mrhall: so, there is no difference. [08:07]
mrhall Thanks [08:07]
surial mrhall: both forms exist because, hey, you can use Number (or Integer) more generally: you can have a 'list of some type that is comparable' and give it to something. such as the treeset constructor. Integer is comparable. ints are primtives and don't get to play (you can't have a list of ints, for example). [08:07]
mrhall Understood, thanks for your time! [08:08]
sonOfRa There's also a few numeric types in java that don't have a primitive version, there you have no option other than compareTo (BigInteger, BigDecimal) [08:09]
mrhall I have asked this because i have had issues with == with Integers and border cases [08:09]
dreamreal blinks [08:10]
matsurago mrhall: == operator is somewhat fundamentally different from <. The < operator is not defined for Objects (like Integers), so casting to primitive ints always happens. On the other hand, == is defined for all objects and means something very different, reference comparison. [08:11]
sonOfRa dreamreal: to be fair, can be *very* confusing to newcomers [08:12]
matsurago mrhall: if you want to compare two Integers for equality, as for any value objects, it is better to use num1.equals(num2) [08:13]
dreamreal I didn't say anything! [08:13]
sonOfRa Your blinking said things for you! [08:13]
dreamreal blinks at sonOfRa [08:13]
matsurago sonOfRa: a very popular question on job interviews though ._. [08:14]
sonOfRa If I got that question in an interview, I would tell them to (maybe a little more politely) to go fuck themselves [08:14]
sonOfRa Asking about silly minutiae like the interned integer caches in java, is not something that really tells you a lot about applicants [08:16]
dreamreal "Hello, Mr. Interviewer! That's a fascinating question, and to truly inculcate you with my more visceral reaction, might I suggest you take your physical attributes related to any procreative you might have, and apply them vigorously to those elements of your physique most likely to respond?" [08:16]
spuz I'm about to interview a senior java dev. What question should I ask? [08:16]
sonOfRa Ask them about the interned integer caches! [08:16]
spuz lol [08:17]
dreamreal ask them to write a linked list in java [08:17]
spuz I will do that just to see if he tells me to go fuck myself [08:17]
dreamreal if they say "okay" and the answer isn't class MyLinkedList<T> extends ArrayList<T> {} reject them [08:17]
spuz lol dreamreal [08:17]
dreamreal spuz++ [08:17]
dreamreal spuz has a karma level of 6, dreamreal [08:17]
sonOfRa dreamreal: yes, about like that! [08:17]
dreamreal spuz: if they do laugh at you, that's a good sign, indeed [08:18]
matsurago spuz: I added a question for a *middle* dev to change some code that uses if statements to use polymorphism instead [08:18]
dreamreal if they actually write a non-ironic linkedlist without looking like they're smelling a massive and gangrenous fart in the room, they're probably worth passing on [08:18]
[twisti] honestly i just want to ask people something that they will definitely have to google, and then watch them how they research it [08:21]
KidBeta [KidBeta!~Kidbeta@hpavc/kidbeta] has joined ##java [08:22]
Bombe ?Why is the sky blue?? [08:22]
matsurago Actually I think it may be a good idea just to show him some Pull Request and ask to review it. [08:22]
sbeex [sbeex!~sbeex@] has joined ##java [08:24]
dl036 [dl036!] has joined ##java [08:26]
dl036 parted the channel: [08:26]
Sheilong [Sheilong!uid293653@gateway/web/] has joined ##java [08:31]
dougquaid [dougquaid!dougquaid@gateway/vpn/privateinternetaccess/dougquaid] has joined ##java [08:33]
Arlion [Arlion!~Arlion@unaffiliated/arlion] has joined ##java [08:33]
sdwrage [sdwrage!~textual@] has joined ##java [08:36]
realtime_ [realtime_!~realtime@unaffiliated/realtime] has joined ##java [08:40]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [08:47]
isBEKaml [isBEKaml!~v1@unaffiliated/isbekaml] has joined ##java [08:48]
KidBeta [KidBeta!~Kidbeta@hpavc/kidbeta] has joined ##java [08:52]
newbieG Is there any way to secure you java class so that no one can easily see the code [08:52]
newbieG ? [08:52]
jamezp [jamezp!~jamezp@redhat/jboss/jamezp] has joined ##java [08:52]
alex88 [alex88!~alex88@unaffiliated/alex88] has joined ##java [08:53]
conan [conan!~conan@] has joined ##java [08:54]
ron yes. don't write it. [08:54]
surial newbieG: there is, of course! [08:55]
surial newbieG: don't give it to the person who you don't want to read it. For example, by hosting an app on a server. [08:55]
sonOfRa There are tools available to obfuscate java code, but they are mostly nuisances. You will still be able to decompile it, and with some effort, give meaning back to it. [08:56]
sonOfRa Someone determined to acquire compilable java source code from executable code you handed to them, *will* be able to. [08:56]
sonOfRa This isn't just java though, this applies every time you give executable code to someone. The code clearly *does* something that is observable, so there is always the possibility of reverse engineering. [08:58]
con3 [con3!~kvirc@] has joined ##java [09:00]
db I wonder what you built that you need to hide the code [09:00]
zalt [zalt!~devp@unaffiliated/lambda443] has joined ##java [09:00]
exonity01 [exonity01!uid364582@gateway/web/] has joined ##java [09:01]
db is it so bad that no one should see? would it reveal flaws? or is it so unique that no one can know? [09:02]
sonOfRa db: a lot of managers are still of the opinion that everything must be top sekrit, especially in smaller companies. A bunch of the big companies just give you the code if you ask nicely, these days (and maybe sign a few papers) [09:02]
matsurago newbieG: if it is a big thing, a real innovation, it is better to acquire a patent. Then you don't need to worry if anyone copies it (you can sue them) [09:02]
FabioP [FabioP!] has joined ##java [09:02]
sonOfRa (don't do that, software patents are terrible and destroy innovation) [09:03]
macroprep [macroprep!] has joined ##java [09:05]
sonOfRa For example, Blackberry is currently suing Facebook in germany over patents like... "backups", or "notifications" [09:06]
CuriousErnestBro Should I do try {} except on the same line on } or on the next one? [09:06]
CuriousErnestBro What's the java way? [09:06]
CuriousErnestBro Catch I mean [09:07]
mbooth CuriousErnestBro: Just use your IDE code-formatter [09:09]
mbooth (In Eclipse it is Ctrl+Shift+f) [09:10]
sonOfRa Almost all code I've seen is } catch (...) {. There may be exceptions (hah), but that's the most common way [09:10]
macroprep anyone know how to hashmap locally created objects such that two objects can be identified and distinguished from one onother, but without needing to use custom keys for each object such as map("a", a); map("b", b); [09:11]
macroprep without the user needing to supply custom keys* [09:11]
mbooth macroprep: Use a hashset instead? [09:12]
CuriousErnestBro mbooth, thanks! [09:14]
macroprep how does a hashset differ from a hashmap? [09:16]
gurrkiin One is a key-value Map, other is a Set [09:16]
macroprep as the main problem, is that when my object gets recreated, i need to be able to identify it, and then re-map it [09:16]
mbooth macroprep: It's a set backed by a hashtable. [09:17]
macroprep and i dont want to involve user managed keys as it would likely get complicated fast [09:17]
macroprep eg trying to remember what keys are mapped to what objects and such [09:17]
jamezp [jamezp!~jamezp@redhat/jboss/jamezp] has joined ##java [09:17]
gurrkiin if the objects have unique fields, use that as key [09:18]
CuriousErnestBro with array literals, do I need to do: int[] a = new int[] {1,2,3} [09:18]
CuriousErnestBro Or is int[] a = {1,2,3} fine? [09:18]
gurrkiin tias [09:19]
gurrkiin Try it and see. You learn much more by experimentation than by asking without having even tried. [09:19]
macroprep especially if, for example, two objects are directly instantiated from the same class, eg A a1 = new A(); A a2 = new A(); [09:19]
macroprep i wont be able to diferentiate a1 from a2 simply by their contents nor class name nor hashcode [09:20]
surial macroprep: so what DO you want to differentiate them on? [09:21]
surial If they are literally un-differentiatable, what's the point? [09:21]
conan [conan!] has joined ##java [09:21]
CuriousErnestBro How do I name "amount of projects" numProjects or amountOfProjects? [09:22]
CuriousErnestBro Or just projects [09:23]
surial CuriousErnestBro: What is "amount of projects"? [09:23]
nkz [nkz!~nkz@] has joined ##java [09:23]
matsurago CuriousErnestBro: numProjects if it is an int, projects if it is List<Project> [09:23]
CuriousErnestBro surial, an int [09:23]
surial int numProjects = 5; [09:23]
CuriousErnestBro Thanks :) [09:23]
feannag [feannag!~feannag@2409:4042:102:b238:c96:39f:af01:444] has joined ##java [09:24]
macroprep surial: i dont know, ill just use user-managed keys for now even though id like to avoid them [09:24]
sonOfRa int projectAmount = 5! :D [09:24]
nkz Hey, beginner here. I am writing my first "real" full stack web app with spring and react for a job interview. Right now I have a repo with two folders, frontend and backend. I have to deploy this app to heroku and it looks too complicated for me to make a separate branch just for this, as build version is lot more different than just source code. I am thinking of creating a new private repo just for deploying. Is this too noobish? Will they think this is weird [09:25]
nkz or that I am bad? [09:25]
fizzie int projectCardinality = 5; // for the mathematicians [09:25]
matsurago nkz: You are really a dedicated one if you are doing both frontend and backend with frameworks for a mere job interview! [09:26]
mbooth nkz: Why do you think you need a separate branch? Or a second repo? [09:26]
nkz mbooth: to deploy to heroku? [09:27]
CodePoint [CodePoint!~CodePoint@] has joined ##java [09:27]
nkz matsurago: This is for my first job out of college, I am just stressing out a bit [09:27]
mbooth nkz: I don't understand. What differences will this branch have? [09:27]
mbooth nkz: And why can't master branch have these changes? [09:28]
nkz mbooth: well the react app will be built, which will generate a lot of stuff. Then all of those will be moved to static folder inside spring boot. [09:28]
matsurago nkz: That's not how you do it. [09:28]
matsurago nkz: You build and run frontend separately and run it on a separate port (default 3000) [09:29]
matsurago nkz: You build and run the backend separately and run it on another port (say, 8080). You communicate between both using Rest API [09:29]
nkz matsurago: Hm, this course didn't mention this. First time I am hearing about this. [09:30]
nkz like obviously that's how I do it on my local machine, I thought things are different in cloud [09:31]
matsurago nkz: You can do the same on your local machine. It depends though whether your front-end is a real Single-Page Application (SPA) built with webpack/babel or not. [09:32]
nkz matsurago: it is. That is how I do it locally, frontend and backend running on different ports. [09:32]
matsurago nkz: if it is a classical SPA, you just run it with 'npm run start' from the frontend folder; you run the Spring backend with './gradlew bootRun' in the backend folder. [09:33]
nkz matsurago: yeah, pretty much [09:33]
mizi [mizi!] has joined ##java [09:33]
matsurago cloud is the same. [09:33]
matsurago both services may be deployed at the same time using docker-compose, for example. In its config file, you declare both frontend and backend parts and their ports [09:34]
nkz matsurago: alright, thanks, I will read up how to do this on heroku now. [09:35]
mbooth nkz: cloud is just a euphemism for "someone else's computer" [09:35]
nkz mbooth: I never used docker. Is it required for this? [09:35]
surial macroprep: you need some key. So, either the 'user' gives you a key everytime they interact with your map, or.. they hand you a key derivation function once. [09:35]
mbooth nkz: I don't know, I never used heroku. Needing a different branch "for deployment" sounds super wrong though. [09:37]
Anticom [Anticom!~Anticom@] has joined ##java [09:39]
mbooth nkz: Did you read through this? [09:40]
nkz mbooth: Yeah I did that tutorial. I am just wondering now what is the proper way to integrate react [09:41]
zalt_ [zalt_!~devp@unaffiliated/lambda443] has joined ##java [09:41]
mbooth shrugs [09:41]
mbooth Javascript would be out-of-scope for this channel [09:41]
mbooth But probably heroku has a similar tutorial [09:42]
gbobby [gbobby!~raltnoede@LINBIT/gbobby] has joined ##java [09:48]
EmmaT_ [EmmaT_!] has joined ##java [09:52]
EmmaT_ got disconnected [09:52]
EmmaT_ ive tried to upgrade a bunch of things .. maven for one ... spring ... lombok ... [09:53]
EmmaT_ error message: [09:53]
cheeser there should be a "caused by" further down [09:54]
con3 [con3!~kvirc@] has joined ##java [09:55]
EmmaT_ there isn't ... i've used mvn clean install -DskipTests=true -X -e [09:56]
fraktor [fraktor!] has joined ##java [09:56]
LaSombra You should redirect the output to a file and paste the file contents on pastebin or something [09:57]
fraktor I'm developing an application in Spring Boot, and I need to push out live updates based on what other users are doing. Websockets or long-polling seem like a good idea, so I'm not constantly sending requests, but I also need to scale this application horizontally. Does anyone know a good way to broadcast update information to all instances of the [09:58]
fraktor server? Adding some kind of message queue is an acceptable approach for my situation. [09:58]
n35xdxb0 [n35xdxb0!~n35xdxb0@] has joined ##java [09:58]
ipe [ipe!] has joined ##java [10:05]
paws_ [paws_!uid89121@gateway/web/] has joined ##java [10:07]
francogrex [francogrex!~user@] has joined ##java [10:10]
francogrex hi, does anyone know of a way (easy) to manipulate word docs from java. I know of jacob but the documentation is very limited [10:11]
francogrex Apache POI is another example, the problem is i would like that there is a tool like a macro recorder to immediately translate the actions into a java code [10:13]
gbobby clusters commonly use a message queue like OpenMQ or MQseries to post cluster-wide messages that are batch-processed afterwards [10:13]
EmmaT_ i managed to get through it by removing some stuff .. but now i am getting javax.annotation.resource is not present .. and it is not in java 11 ... what has replaced it ? [10:13]
EmmaT_ @Resource(name = "mytransactionxyz") is how it is used [10:14]
gbobby with most applications, scaling horizontally is hard [10:14]
gbobby horizontal scaling works best with problems that can be split up so that every node works on a part of the problem [10:15]
gbobby applications where all nodes need to have a synchronized state typically experience increased latency and increased load when scaled horizontally, and may even become slower rather than faster [10:16]
mbooth EmmaT_: EE APIs were removed from the JDK during the Java 11 timeframe -- they moved to the Eclipse Foundation Jakarta EE4j project [10:17]
TheresaJayne [TheresaJayne!sid37392@gateway/web/] has joined ##java [10:18]
mbooth EmmaT_: So you need to add a dep and get it from maven central instead of assuming it's present in the JDK [10:18]
EmmaT_ mbooth do you know what they are named ? [10:20]
EmmaT_ jakarta enterprise ? [10:20]
EmmaT_ [10:21]
EmmaT_ EmmaT_'s title: "Maven Repository: jakarta" [10:21]
mbooth EmmaT_: It's pretty easily googlable, but you can use this if you don't want change any code: [10:21]
mbooth mbooth's title: "The Central Repository Search Engine" [10:21]
EmmaT_ mbooth i tried adding that 5 minutes ago [10:21]
EmmaT_ 2018 [10:22]
mbooth EmmaT_: IIRC the new jakarta version changed package name: javax->jakarta [10:22]
mbooth So would require code changes [10:22]
EmmaT_ mbooth so not [10:23]
EmmaT_ ? [10:23]
EmmaT_ ahh .. i need to change in the code .. hmm [10:23]
mbooth EmmaT_: Yes that looks right [10:24]
EmmaT_ so javax.annotation ... pulls in jakarta ... or do i need another dependency ? [10:24]
EmmaT_ no jakarta package in javax.annotation [10:24]
mbooth EmmaT_: What? I don't think you've read what I've written. The new jakarta version has different package names. The old javax version still has the old package names [10:24]
mbooth So, as I said: Use the javax.annotation-api coords if you don't want to change any code [10:25]
EmmaT_ i missed adding jakarta as well ... i thought the last one was enough .. i guess jakarta.annotations-api is required as well... ar eboth ? [10:26]
dreamreal no, pick one [10:26]
dreamreal jakarta is the rebranded one [10:26]
mbooth EmmaT_: No they are the same thing. But in newer versions they changed the package names. I'm not sure how else to explain it... [10:27]
gareppa [gareppa!~gareppa@unaffiliated/gareppa] has joined ##java [10:27]
EmmaT_ ook .. so it seems i have to make some code changes [10:27]
mbooth Sigh [10:28]
mbooth EmmaT_: mbooth: So, as I said: Use the javax.annotation-api coords if you don't want to change any code [10:28]
EmmaT_ you should have said: pull in jakarta-annotations-api ... and rename javax.x.y ... to jakarta ... then i would have gotten it faster :) [10:28]
EmmaT_ javax.annotation-api did not help [10:29]
dreamreal hard to gauge what people will understand on irc sometimes [10:29]
dreamreal I understood what he was saying [10:29]
mbooth EmmaT_: Your question was "where did javax.annotation.Resource go?" [10:29]
Arlion [Arlion!~Arlion@unaffiliated/arlion] has joined ##java [10:29]
mbooth EmmaT_: If you want different answers, you should ask different questions ;-) [10:30]
EmmaT_ well.. more .. it is not working ... how to fix [10:30]
gnufr33d0m [gnufr33d0m!~gnufr33d0@] has joined ##java [10:30]
EmmaT_ ( [10:30]
EmmaT_ ) [10:30]
dreamreal doesn't work [10:30]
dreamreal dreamreal, 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) [10:30]
level3 [level3!] has joined ##java [10:31]
VinceG [VinceG!] has joined ##java [10:32]
EmmaT_ hurray! build success [10:35]
EmmaT_ soon .. going for 13 [10:36]
EmmaT_ should i expect some further difficulties ? [10:36]
level3 hi, in a restful world, lets say I have a form that updates an item. The database is normalized and my item is like { id: int, createdBy: int, createdAt: date, modifiedBy: int, modifiedAt: date, status: int } I also have another entity called StatusHistory { id: int, itemId: int, status: int, createdBy: int, createdDate: date, endDate: date } so now when I update the status of the item on the form, [10:36]
level3 I have to change three things: I need to update the item.status, I need to patch an end date to the current item status in history, and I need to add a new item to the item status history. Should it not all be one HTTP request? [10:37]
plarsen [plarsen!~plarsen@redhat/jboss/pdpc.professional.plarsen] has joined ##java [10:37]
dreamreal why wouldn't it be one http request [10:37]
mbooth EmmaT_: Who knows, we can't see your project and I don't have the psychic-debugging extension installed into my Eclipse ;-) [10:38]
level3 because I wrote it as two posts and a patch :( [10:38]
dreamreal why? [10:38]
cheeser sounds like one operation to me. [10:39]
level3 yeah, well I didn't even think about it until I wrote the code and now I'm like what if one of the three requests fails for some reason :( [10:39]
dreamreal why not rewrite it to have one entry point, it sounds trivial [10:40]
level3 that's a great idea [10:40]
level3 so just post the item and figure out in the controller what changed? [10:41]
level3 or post three different objects in the body? [10:42]
dreamreal I'd... have a DTO and post that to the HTTP endpoint, and propagate changes to every entity to which changes apply [10:43]
dreamreal you don't have to expose your ACTUAL schema [10:43]
level3 I'll look more into this data transfer object [10:44]
EmmaT_ apache-tomcat-8.0.21/endorsed is not supported. Endorsed standards and standalone APIs ? [10:45]
EmmaT_ do i have to upgrade tomcat too ? [10:45]
mbooth EmmaT_: Sounds like you are using a too old version of Eclipse or WTP [10:47]
EmmaT_ mbooth it is intellij ... was working fine prior to upgrade from 8 to 11 [10:50]
manualcrank [manualcrank!] has joined ##java [10:50]
EmmaT_ 9 starts but leads to other issue [10:51]
mbooth EmmaT_: Why not try the latest version of tomcat 8 then? [10:52]
TheresaJayne [TheresaJayne!sid37392@gateway/web/] has joined ##java [10:52]
EmmaT_ yes, maybe ... i will try [10:52]
mbooth EmmaT_: tomcat 8.0.21 is from 2015 :-o [10:53]
mbooth It probably does not support Java 11 [10:53]
EmmaT_ mbooth worked better than 8.2 but same error as 9 [10:54]
EmmaT_ i think it has to do with some dependencies [10:54]
EmmaT_ org.hibernate.validator.internal.util.Version.getJavaRelease [10:54]
EmmaT_ related: org.hibernate.validator.internal.util.Version.getJavaRelease [10:54]
spuz [spuz!6dee4b8e@gateway/web/cgi-irc/] has joined ##java [10:56]
spuz interview over. I shouldn't have bothered preparing questions. barely had a chance to talk... [10:56]
dreamreal good interview candidate? [10:56]
dreamreal Gonna recommend him/her/it? [10:57]
spuz not sure yet. obviously had a lot of knowledge and experience but also would not stop talking. Can't tell if that's just an effort to impress or if he is really going to spend 5 minutes every time he's asked a simple question [10:58]
dreamreal how many other candidates? What's the role? [10:58]
DTZUZO [DTZUZO!] has joined ##java [10:59]
level3 All my work history is in .NET. How do I get a job working with Java? [11:00]
greggerz [greggerz!~greggerz@unaffiliated/greggerz] has joined ##java [11:00]
sonOfRa Learn java, which shouldn't be hard if you already know C#, apply for some jobs. [11:00]
dreamreal sonOfRa ++ [11:00]
dreamreal sonofra has a karma level of 177, dreamreal [11:00]
level3 I know some Java but haven't used spring much. Still learning but I might be writing C# in Java if that makes any sense. [11:01]
ottoshmidt [ottoshmidt!~ottoshmid@] has joined ##java [11:01]
spuz There's at least one other candidate but it's pretty hard to find people in London right now. The role is a java developer but he also had experience with infrastructure / devops which we can certainly make use of [11:02]
dreamreal level3: spring's easy [11:02]
level3 I had an interview and I didn't understand why they cared so much about multithreading. I mean do I really need to worry about threads when writing a REST web api? [11:02]
dreamreal if you can think you'll do fine [11:02]
dreamreal level3: *shrug* maybe? It depends on what the scarce resources are [11:03]
spuz level3 yes... most webservers use threads to serve requests. [11:04]
level3 I mean all we are really doing is taking some json input, maybe processing it a little, maybe validating a little, and just putting it into a database or given some json giving back some json from the database? [11:04]
level3 spuz:but when do I use threads when I write my controllers? [11:04]
spuz level3 right, but how does the database handle being read and written to from multiple threads? [11:04]
spuz then what happens if you decide you want to speed up your queries by implementing a cache? [11:05]
sonOfRa Well it depends on what that company specifically does. There might be stuff they do based on the JSON that doesn't just go into a database, but instead needs computation [11:05]
sonOfRa And that kind of computation may need threading [11:05]
mbooth level3: There is plenty of java work that is not simply CRUD applications [11:05]
level3 Some Boeing subsidiary [11:05]
tomboy64 [tomboy64!~tomboy64@gateway/tor-sasl/tomboy64] has joined ##java [11:05]
dreamreal spuz: what you decide to speed up the queries by adding a cache, you screwed up [11:05]
dreamreal level3: oh, that job ain't gonna work out [11:05]
spuz Even if your strategy is "let the database handle all the concurrency issues" then you need to be aware of an understand multi-threading in a web app [11:06]
level3 well yeah but pleasantly enough they rejected me within a week so that's nice. usually I just get ghosted when I apply for java roles. [11:06]
dreamreal They rejected you because it's boeing, nothing to do with you [11:06]
dreamreal "all our positions just dried up, are you hiring?" [11:06]
level3 Oh so the position actually closed and they were not lying? [11:07]
level3 I just assumed they were being nice [11:07]
dreamreal I dunno, but boeing's... going through some stuff as a company [11:08]
dreamreal something about building planes that don't do especially plane-like things [11:08]
dreamreal "This plane flies like a brick does!" [11:08]
level3 spuz: I know the framework is multithreaded but how do I do multi threading? in the example above where I need to update an item, insert a new itemHistory and update an existing itemHistory, would you use threads to do all thee at once? [11:09]
level3 Sorry if this is stupid. I use at work and I pretty much do one thing after another all the time. [11:09]
dreamreal level3: uh... would you NEED to [11:09]
spuz level3 no idea. what exactly was the question? [11:10]
dreamreal I mean, there's always a possibility that you'd need to do that, it's just highly unlikely [11:10]
level3 How do I do multithreading when writing web api [11:10]
dreamreal same way you do it in any other API, but you'd want to coordinate with the container [11:10]
mbooth level3: Uh, when would use threads in C#? I can't imagine it's too different to Java [11:10]
mbooth You are already a c# programmer, no? [11:10]
mizi [mizi!] has joined ##java [11:11]
level3 mbooth:I don't use threads in a web api that is my problem. [11:11]
spuz I guess they are asking "how do you set up a connection pool to handle web requests?" Most web frameworks set that up for you automatically so probably not something you normally need to worry about [11:11]
sonOfRa note that in an interview setting, they may just want to know about some general understanding of multithreading [11:11]
sonOfRa *having* that understanding is important imo, even if you're not going to be writing threading code in your day to day business [11:11]
dreamreal spuz: maybe they WANT you to avoid JNDI because why not introduce easy-to-find bugs, amirite? [11:12]
spuz I don't even know what JNDI is [11:12]
level3 some directory api thing [11:13]
dreamreal jndi [11:13]
dreamreal dreamreal, jndi is - Java Naming and Directory Interface. [11:13]
dreamreal it's... where you'd set up database connections and look them up by name, so the container manages them. If your app has its own connection pool you're doing it wrong. [11:13]
level3 I have never used service and discovery together in a sentence [11:14]
dreamreal ... [11:14]
level3 I mean I know what it is but I have never used it. I always just put connection strings in a web config file [11:15]
dreamreal ... [11:15]
spuz dreamreal.. it's been a long time since I worked on a JavaEE application. Last few years, I've always used library based web and database frameworks where setting up those connection pools is something done by the application. [11:15]
dreamreal That's... good of you, I guess [11:15]
level3 am I barking up the wrong tree? [11:15]
dreamreal what makes a tree wrong? [11:15]
level3 no, not the data structure tree :/ [11:15]
gbobby depends on the type of tree ;P [11:16]
dreamreal I mean, I can't judge you, or maybe I can, but I won't [11:16]
dreamreal you do what works for you [11:16]
hypc1 [hypc1!~Thunderbi@] has joined ##java [11:16]
dreamreal if you worked for me I'd fix most of that shit right out of the gate and within a day, but hey [11:16]
spuz please judge, that's why I'm here lol [11:16]
matsurago The last time I was working with JNDI was about 10 years ago xD [11:18]
dreamreal JNDI itself isn't all that important, but the concepts are [11:18]
fahadash [fahadash!uid44972@gateway/web/] has joined ##java [11:18]
CookieM [CookieM!] has joined ##java [11:19]
matsurago That was a big app with JSF, EJB, JNI, and RMI (my favourite part). [11:19]
dreamreal EJB *and* RMI? [11:20]
mbooth Ah jsf. I am 6-years jsp/jsf clean. [11:20]
dreamreal Was your architect drooling in the corner and wearing a helmet to protect him- or herself? [11:20]
matsurago dreamreal: I don't know, it was so long time ago, at my first job :) [11:22]
dreamreal Why the bloody 'ell would you use EJB *and* RMI... [11:22]
dreamreal Were the EJBs at least hosted remotely? [11:22]
matsurago dreamreal: yea [11:23]
dreamreal so why RMI too? [11:23]
ricky_clarkson Helpful steps in migrating from EDI to SOAP. Actually any ALLCAPS technology should be fine too. [11:23]
matsurago dreamreal: I don't remember though. Also, JMS was used as well. [11:23]
FabioP mbooth for curiosity, what do you use instead of jsf/jsp? [11:24]
matsurago dreamreal: That was a big app [11:24]
dreamreal matsurago: sounds like something that should have been able to scale well [11:24]
mbooth FabioP: Nothing \/ [11:24]
mbooth FabioP: I no longer do web stuff [11:24]
dreamreal but RMI + EJB makes me think someone was playing buzzword bingo instead [11:24]
dreamreal That's sort of like bragging about how your app uses SOAP and REST and HTTP too [11:25]
EmmaT [EmmaT!~EmmaT@] has joined ##java [11:32]
tang^ sure, my scraper app uses all of those and more [11:33]
white_shadow [white_shadow!~white_sha@unaffiliated/whiteshadow/x-9072] has joined ##java [11:33]
EmmaT_ [EmmaT_!~EmmaT@] has joined ##java [11:34]
dreamreal tang^: hahaha [11:34]
dreamreal dude, I'm in public, don't make me laugh out loud, please [11:34]
tang^ hah... sorry [11:35]
dreamreal I'm lurking in a starbuck's sneering at all the lamers who have lesser hardware than I have, laughing makes me look mortal [11:35]
surial dreamreal: my favourite thing to do waaay back when in electronics stores is to ask 'does this screen have interlaced'? [11:36]
dreamreal haha [11:36]
surial hey, you said you were in public and all that. Couldn't resist. [11:36]
dreamreal I truly appreciate you, you asshole [11:37]
dreamreal is trying to stifle his laughter and kinda failing [11:37]
Diablo-D3 wait, dreamreal is mortal? [11:37]
Devastator oh, the good old days, I miss them :( [11:37]
dreamreal Diablo-D3: some bits are [11:37]
Diablo-D3 gotta keep upgrading, yo [11:38]
dreamreal the artificial bits are going to outlive us aaaaaaalllll [11:38]
tomboy64 [tomboy64!~tomboy64@gateway/tor-sasl/tomboy64] has joined ##java [11:38]
Diablo-D3 all hail our dreamrobo overlords! [11:38]
dreamreal they're going to find parts of my skull and my hip and wonder what strange being this was [11:38]
Diablo-D3 100% chance [11:38]
Diablo-D3 we look at those weird south american skulls with the artifically elongated whateverthefuck and are like "wtf, aliens" [11:40]
dreamreal my corpse would amuse them: "It looks like they moved part of his hip to his face but ... whyyyy" [11:41]
dreamreal (they did exactly that) [11:41]
surial but ... whyyyy? [11:42]
dreamreal because I was born with missing parts, of course, and this predated the time when you'd try to repair shit like that instead of abandoning the child to wolves [11:43]
surial okay, so, the wolves moved your hip to your face. [11:43]
dreamreal ... but just barely, so a surgeon decided he'd figure out a fix. Now, kids with my problems have surgery for them one or two days after birth and everything gets fixed, thanks to all the shit I went through... but in the meantime I have titanium or something like it in various places around my skeletal system [11:44]
Diablo-D3 hope you're not allergic to titanium [11:44]
dreamreal and I still can't breathe for shit, which makes singing on stage great fun [11:44]
dreamreal Diablo-D3: whatever I have I'm not allergic to it, it's been there for over four decades now :) [11:45]
dreamreal The surgeon who worked on me has a building named for him now at Duke University, was really cool to go by there [11:48]
dreamreal was one of the best plastic surgeons in the world at the time [11:48]
dreamreal worked on hollywood actors, charged the hell out of them and turned around and did work on kids like me for free [11:48]
Diablo-D3 only reason I mention that, btw, is I know they selected titanium because its strong, light, and humans dont react to it.... [11:49]
dreamreal (we had to pay for the hospital services, but the surgery itself wasn't an added cost) [11:49]
Diablo-D3 except apparently my neighbor may have a titanium allergy... and they already replaced a bit of her jaw with titanium [11:49]
dreamreal Diablo-D3: I THINK it's titanium but I don't know, I was like 7 [11:49]
Diablo-D3 how old are you? [11:49]
tang^ ancient [11:49]
dreamreal me? early 50s [11:49]
Diablo-D3 oh hmm [11:49]
mbooth Diablo-D3: Depends in what shape the titanium is. I might react to it if it was in the shape of something scary [11:49]
Diablo-D3 might not be titanium [11:49]
dreamreal I dunno, they kinda pushed the envelope a lot with me [11:50]
dreamreal They had to work out some new anaesthetics, a lot of new techniques [11:50]
Diablo-D3 right, so you're a cyborg, okay [11:50]
dreamreal it's kinda alienating, really: I'd go to school and kids would be bragging about their "surgery" and "20 stitches they had to get" [11:50]
tang^ he's a scientific experiment [11:50]
dreamreal meanwhile by that time I was looking at having had 38 majors and THOUSANDS of stitches [11:51]
cheeser there's a channel for this :) [11:51]
Diablo-D3 there is, and Im pretty sure Im still banned from it [11:51]
dreamreal was one of the early examples of biodegradable stitches being used, as well as early staples [11:51]
EmmaT_ java.nio.file.WatchEvent on mac seems to be really really slow [11:51]
Diablo-D3 ( [11:51]
orbyt_ [orbyt_!~orbyt@] has joined ##java [11:51]
dreamreal cheeser: fiiiiiiiine! So my CPU is able to run java, right....... [11:51]
Diablo-D3 biodegradable stitches are still a fucking lie [11:51]
EmmaT_ is there another approach to this ? [11:51]
dreamreal Diablo-D3: not in here, please [11:52]
Diablo-D3 if WatchEvent does what I think it does, you might not be able to fix it [11:52]
EmmaT_ found another lib ... [11:53]
EmmaT_ EmmaT_'s title: "jpathwatch | a Java library for monitoring directory and file changes" [11:53]
EmmaT_ maybe have to rewrite ... [11:53]
EmmaT_ how come on java 13 native is still not implemented? [11:53]
tang^ minimum requirement: Java 5.... guessing that's old [11:53]
Diablo-D3 it probably IS using native [11:54]
dreamreal EmmaT_: it might be native, but "native" might rely on services from the OS that are not done efficiently or implemented well [11:54]
tang^ heh... tested on PPC Mac [11:54]
Diablo-D3 inotify and whatever NT calls it is sufficiently fast [11:54]
Diablo-D3 osx's file system events api is a goddamned horrorshow of unending pain [11:55]
tang^ and macOS isn't making it any easier [11:55]
madmonkey [madmonkey!~elric@] has joined ##java [12:01]
ogradyd [ogradyd!~Thunderbi@2a02:8070:88bf:9df0::449] has joined ##java [12:03]
dob1 when I used joda time there was Duration.isLongerThan/isShorterThan/isEqual(other duration), with java 8 Duration this is not possible? I have to convert duration to mills and do comparision? [12:05]
dob1 or it's done in anothre way? [12:06]
BeerLover [BeerLover!~BeerBuddy@] has joined ##java [12:06]
cheeser dob1: it's Comparable ... [12:06]
dob1 cheeser, it was the one on joda time too [12:07]
EmmaT_ it is probably faster if i poll myself than use directory watch events [12:09]
cheeser dob1: so why not use that? [12:10]
sonOfRa dob1: what's wrong with just doing one.compareTo(two) </>/== 0? [12:10]
sonOfRa That's the standard idiom for expressing one </>/== two [12:10]
dob1 nothing wrong, it was, for me, more intuitive isShorter,isLonger [12:11]
treeman5 [treeman5!~treeman5@] has joined ##java [12:13]
oxum [oxum!~oxum@] has joined ##java [12:14]
EmmaT_ maven is not complaining: com.sun.nio.file.SensitivityWatchEventModifier .. but intellij is when I attempt to run a static void main [12:20]
EmmaT_ says java package com.sun.nio.file does not exist [12:20]
EmmaT_ register( watcher, events, SensitivityWatchEventModifier.HIGH ) [12:21]
tang^ com.sun is bad news [12:21]
Technodrome [Technodrome!~textual@unaffiliated/technodrome] has joined ##java [12:21]
EmmaT_ what are my option for this case? [12:21]
EmmaT_ increase sensitivity for directory watch [12:21]
tang^ bet IDEA is using a different JDK than Maven is [12:22]
cheeser tang^: no it's not [12:23]
cheeser sun.* is [12:23]
cheeser i personally have written code under com.sun meant for use by external people [12:23]
EmmaT_ found this [12:24]
EmmaT_ [12:24]
EmmaT_ seesm to be using class.forname [12:24]
EmmaT_ to a void it [12:24]
feannag [feannag!~feannag@2409:4042:102:b238:c96:39f:af01:444] has joined ##java [12:27]
CodePoint [CodePoint!~CodePoint@] has joined ##java [12:30]
EmmaT_ better but not great [12:33]
ChaiTRex [ChaiTRex!~ChaiTRex@gateway/tor-sasl/chaitrex] has joined ##java [12:40]
paddyez [paddyez!~Patrick-E@wikipedia/paddyez] has joined ##java [12:48]
kappa1 [kappa1!~kappa@unaffiliated/kappa1] has joined ##java [12:48]
kappa1 What's the best way to keep printing the input stream of a process launched through Java? Process.getInputStream(), how can I keep reading and printing it [12:49]
jesmon [jesmon!] has joined ##java [12:59]
EmmaT_ kappa1 [01:01]
EmmaT_ convertInputStreamToString [01:01]
EmmaT_ replace while block [01:01]
ogradyd [ogradyd!~Thunderbi@2a02:8070:88bf:9df0::449] has joined ##java [01:05]
CygniX [CygniX!~CygniX@opensuse/member/CygniX] has joined ##java [01:05]
sizeof_void34 [sizeof_void34!] has joined ##java [01:05]
kashike [kashike!kashike@unaffiliated/kashike] has joined ##java [01:06]
kappa1 EmmaT_, how should I replace the while block? [01:07]
kappa1 I mean, how do I know that the stream has ended? [01:08]
tomboy64 [tomboy64!~tomboy64@gateway/tor-sasl/tomboy64] has joined ##java [01:13]
EmmaT [EmmaT!~EmmaT@] has joined ##java [01:14]
LKoen [LKoen!~LKoen@] has joined ##java [01:24]
RedSoxFan07 [RedSoxFan07!] has joined ##java [01:27]
EmmaT kappa1 != -1 [01:27]
gareppa [gareppa!~gareppa@unaffiliated/gareppa] has joined ##java [01:29]
g00s [g00s!~g00s@unaffiliated/g00s] has joined ##java [01:30]
_xor [_xor!~xor@] has joined ##java [01:34]
level3 I remember using RMI in college. I have never used it since. [01:35]
level3 I can't believe I got an A in that class. [01:35]
rawblem [rawblem!~rawblem@redhat/jboss/rawblem] has joined ##java [01:49]
rawblem hey all... looking for a way to locate files based on a glob / regex, where you have a basedir to search and a pattern to look for. Problem is, The impls I've seen so far (AntPatternMatcher, PathMatcher in nio) all seem to fully traverse the entire basedir recursively. Are there any smarter implementations out there that might recognize that the basedir is /home/user/apps/oneApp and the pattern to find is lib/server/some.stuff-.*.jar and not [01:51]
rawblem traverse the entire oneApp folder but rather recognize it needs to go into lib/server first? [01:51]
Sheilong [Sheilong!uid293653@gateway/web/] has joined ##java [01:51]
zalt__ [zalt__!~devp@unaffiliated/lambda443] has joined ##java [01:52]
fstd_ [fstd_!~fstd@unaffiliated/fisted] has joined ##java [01:52]
dreamreal That sounds like what ant's pattern matcher does, though: you'd pass it /home/user/apps/oneApp/**/lib/server/some-stuff-*.jar and see what it finds [01:54]
rawblem most of the APIs i see involve you passing a path TO it and it says whether it matches or not [01:54]
rawblem hrmm,.... maybe i'm looking at a wrong copy of ant's pattern matcher. [01:55]
rawblem some copied / cloned / modified version [01:55]
dreamreal I could be wrong, I haven't used ant in a long, long time, but the files for pathspecs work pretty much that way [01:55]
rawblem i cant find any impl where you give it a basedir, and basically ask it to search for you [01:57]
rawblem basedir + pattern and let it return all matches. all the impls i can find seem to be you asking it if a given path matches or not, which means you need to traverse the entire basedir first. [01:57]
dreamreal rawblem: [01:58]
rawblem bam thats it. DirectoryScanner [01:59]
rawblem i knew I'd seen it before [01:59]
Maxdamantus [Maxdamantus!~Maxdamant@unaffiliated/maxdamantus] has joined ##java [02:00]
bobek [bobek!~bobek@unaffiliated/bobek] has joined ##java [02:03]
stryek [stryek!uid332574@gateway/web/] has joined ##java [02:04]
Sasazuka [Sasazuka!~Sasazuka@unaffiliated/sasazuka] has joined ##java [02:13]
xalen7 [xalen7!~ztr8x@] has joined ##java [02:13]
xbyte1024 [xbyte1024!] has joined ##java [02:14]
westor [westor!~westor@unaffiliated/westor] has joined ##java [02:15]
RedSoxFan07 [RedSoxFan07!] has joined ##java [02:19]
karab44 [karab44!~karab44@unaffiliated/karab44] has joined ##java [02:20]
level3 [level3!level3@gateway/shell/] has joined ##java [02:25]
pratch [pratch!pratch@gateway/shell/] has joined ##java [02:25]
surial Ow BOTHER - if I write 'java.lang.String x' someplace, that doesn't work if I have a field accessible in lexical scope named 'java'? Oooooof. [02:26]
jesmon [jesmon!] has joined ##java [02:36]
IRCNew [IRCNew!] has joined ##java [02:39]
_xor [_xor!~xor@] has joined ##java [02:50]
Sasazuka [Sasazuka!~Sasazuka@unaffiliated/sasazuka] has joined ##java [02:57]
RazielXYZ [RazielXYZ!~Raziel@unaffiliated/raziel] has joined ##java [02:58]
tomboy64 [tomboy64!~tomboy64@gateway/tor-sasl/tomboy64] has joined ##java [02:59]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [03:03]
Arlion_ [Arlion_!~Arlion@unaffiliated/arlion] has joined ##java [03:13]
Arlion_ [Arlion_!~Arlion@unaffiliated/arlion] has joined ##java [03:15]
tomboy64 [tomboy64!~tomboy64@gateway/tor-sasl/tomboy64] has joined ##java [03:15]
tag So looking at some JNI tutorials, is it common to store C++ pointers as long fields in a Java class? Is there not a nicer way to go about this than doing `reinterpret_cast<T *>`? [03:17]
tag Seems like it might be easier for my usecase to just do all of the allocation within the jvm, though it'll be slightly more call overhead [03:28]
con3 [con3!~kvirc@] has joined ##java [03:29]
jaziz [jaziz!~jaziz@unaffiliated/jaziz] has joined ##java [03:30]
conan [conan!] has joined ##java [03:35]
serdar [serdar!] has joined ##java [03:36]
alex88 [alex88!~alex88@unaffiliated/alex88] has joined ##java [03:37]
dreamreal better question is why you want JNI [03:39]
sonOfRa tag: storing pointers on the java side is often a bad idea. What exactly are you trying to achieve [03:40]
sa02irc [sa02irc!] has joined ##java [03:44]
palasso [palasso!~palasso@unaffiliated/palasso] has joined ##java [03:49]
iam730 [iam730!~iam730@] has joined ##java [03:52]
AcTiVaTe [AcTiVaTe!] has joined ##java [03:59]
Arlion [Arlion!~Arlion@unaffiliated/arlion] has joined ##java [03:59]
tomboy64 [tomboy64!~tomboy64@gateway/tor-sasl/tomboy64] has joined ##java [04:05]
KidBeta [KidBeta!~Kidbeta@hpavc/kidbeta] has joined ##java [04:07]
tomboy64 [tomboy64!~tomboy64@gateway/tor-sasl/tomboy64] has joined ##java [04:07]
tag sonOfRa: I have a few different use-cases I want to explore. The first one is leveraging AVX2 and AVX-512 algorithms within large matrixes. The second one is to access a C++ library from within an application that's largely written in Java. [04:10]
yawkat jni is slowww [04:11]
tag Yes [04:11]
tag But the JVM is also shitty sometimes [04:12]
Arlion [Arlion!~Arlion@unaffiliated/arlion] has joined ##java [04:14]
sonOfRa If you really have no other way to interface with the library other than keeping a pointer to some library-structure around, sure, store it in a long, but, yuck [04:15]
conan [conan!] has joined ##java [04:18]
palasso [palasso!~palasso@unaffiliated/palasso] has joined ##java [04:20]
gAb1 [gAb1!~chazy@] has joined ##java [04:28]
g00s [g00s!~g00s@unaffiliated/g00s] has joined ##java [04:29]
Technodrome [Technodrome!~textual@unaffiliated/technodrome] has joined ##java [04:32]
AcTiVaTe [AcTiVaTe!] has joined ##java [04:48]
tomboy64 [tomboy64!~tomboy64@gateway/tor-sasl/tomboy64] has joined ##java [04:51]
Zaum [Zaum!4d1c1b28@] has joined ##java [04:57]
Zaum parted the channel: [04:59]
otto_j [otto_j!] has joined ##java [05:11]
Peste_Bubonica [Peste_Bubonica!~Peste_Bub@unaffiliated/peste-bubonica/x-4612396] has joined ##java [05:25]
jesmon [jesmon!] has joined ##java [05:28]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [05:35]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [05:49]
Arlion [Arlion!~Arlion@unaffiliated/arlion] has joined ##java [05:56]
Kundry_Wag [Kundry_Wag!~Kundry_Wa@] has joined ##java [06:27]
Squarism How do I troubleshoot "why bean x is scanned, when package added to exclude filter" [06:29]
Squarism is there some logging/tool to provide a reason for bean instantiations? [06:30]
ogradyd [ogradyd!~Thunderbi@2a02:8070:88bf:9df0::449] has joined ##java [06:31]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [06:38]
illuminated [illuminated!~illuminat@freebsd/user/illuminated] has joined ##java [06:42]
surial Squarism: perhaps you should explain to us what thingie is 'scanning beans'. [06:46]
surial Squarism: I cannot think of anything common that 'scans beans', whatever that's about. [06:46]
surial your iDE? Some library? spring? what? [06:46]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [06:52]
very_sneaky [very_sneaky!~very_snea@] has joined ##java [07:03]
Jantz [Jantz!] has joined ##java [07:05]
db [db!uid18678@gateway/web/] has joined ##java [07:06]
Arlion [Arlion!~Arlion@unaffiliated/arlion] has joined ##java [07:08]
canton7 [canton7!~canton7@about/csharp/regular/canton7] has joined ##java [07:14]
di0_ [di0_!~di0_@unaffiliated/di0-/x-5053590] has joined ##java [07:15]
tomboy64 [tomboy64!~tomboy64@gateway/tor-sasl/tomboy64] has joined ##java [07:17]
zalt__ [zalt__!~devp@unaffiliated/lambda443] has joined ##java [07:17]
karstensrage why are text blocks preview features [07:17]
karstensrage lots of things seem way more complex and controversial and werent preview features [07:22]
tomboy64 [tomboy64!~tomboy64@gateway/tor-sasl/tomboy64] has joined ##java [07:26]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [07:28]
surial karstensrage: the notion 'preview feature' is new since JDK12. [07:38]
surial whatever 'way more complex and controversial' concept you're thinking of? It predates the notion 'preview feature'. [07:38]
LKoen [LKoen!~LKoen@] has joined ##java [07:43]
Kundry_Wag [Kundry_Wag!~Kundry_Wa@] has joined ##java [07:44]
melatonina [melatonina!uid317528@gateway/web/] has joined ##java [07:45]
karstensrage i mean are they concerned text blocks wont be liked so they will have to revert or is it just not finished? [07:46]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [07:47]
surial karstensrage: every feature is going to be released like this from now on. [07:48]
surial karstensrage: there's no real way to know beforehand that no significant feedback would be forthcoming. It's an unknown unknown. [07:48]
tomboy64 [tomboy64!~tomboy64@gateway/tor-sasl/tomboy64] has joined ##java [07:50]
Xe4roX [Xe4roX!~Xe4roX@unaffiliated/xe4rox] has joined ##java [07:51]
Arlion [Arlion!~Arlion@unaffiliated/arlion] has joined ##java [07:58]
Xe4roX [Xe4roX!~Xe4roX@unaffiliated/xe4rox] has joined ##java [08:04]
jesmon [jesmon!] has joined ##java [08:08]
Arlion [Arlion!~Arlion@unaffiliated/arlion] has joined ##java [08:08]
conan [conan!] has joined ##java [08:14]
YottaByte [YottaByte!~YottaByte@unaffiliated/yottabyte] has joined ##java [08:21]
Inu [Inu!~Inu@unaffiliated/inu] has joined ##java [08:21]
YottaByte is this a good practice: or is visitor pattern preferred? [08:23]
Nitrousoxide [Nitrousoxide!~quassel@unaffiliated/nitrousoxide] has joined ##java [08:27]
oxum [oxum!~oxum@] has joined ##java [08:29]
Nitrousoxide If I have a method that constructs a class from a passed class literal, how can I vary which arguments that method takes, based on the arguments the constructor takes? [08:29]
Nitrousoxide My first idea was to use a Map but that seems kinda hacky [08:30]
orbyt_ [orbyt_!~orbyt@] has joined ##java [08:33]
isBEKaml [isBEKaml!~v1@unaffiliated/isbekaml] has joined ##java [08:40]
Jantz [Jantz!] has joined ##java [08:42]
deavmi [deavmi!~quassel@] has joined ##java [08:45]
di0_ [di0_!~di0_@unaffiliated/di0-/x-5053590] has joined ##java [08:46]
Kundry_Wag [Kundry_Wag!~Kundry_Wa@] has joined ##java [08:47]
nun [nun!] has joined ##java [08:50]
Arlion [Arlion!~Arlion@unaffiliated/arlion] has joined ##java [08:51]
p[a]ddy [p[a]ddy!~Patrick-E@wikipedia/paddyez] has joined ##java [08:54]
YottaByte basically I have some concrete types which extend an abstract class, and I want to be able to call methods which expect the concrete types as arguments without doing a bunch of instanceofs. the type of the object I'm passing is the type of the abstract base class though [08:54]
snowmanbamm [snowmanbamm!snowmanbam@gateway/vpn/privateinternetaccess/snowmanbamm] has joined ##java [08:58]
RedSoxFan08 [RedSoxFan08!] has joined ##java [09:01]
Technodrome [Technodrome!~textual@unaffiliated/technodrome] has joined ##java [09:07]
n35xdxb0 [n35xdxb0!~n35xdxb0@] has joined ##java [09:10]
db Nitrousoxide: look at class.getConstructor(...) - well, not exactly sure what's your goal here, if you have a "class literal", can't you just call the classes' constructor directly? [09:14]
Nitrousoxide I found the answer anyway but that wasn't what I was asking [09:17]
Jantz [Jantz!] has joined ##java [09:18]
n35xdxb0 [n35xdxb0!~n35xdxb0@] has joined ##java [09:25]
wrongt [wrongt!~wrongt@unaffiliated/wrongt] has joined ##java [09:32]
Arlion [Arlion!~Arlion@unaffiliated/arlion] has joined ##java [09:41]
di0_ [di0_!~di0_@unaffiliated/di0-/x-5053590] has joined ##java [09:58]
dtrott [dtrott!] has joined ##java [10:07]
afei [afei!~user@] has joined ##java [10:16]
dl036 [dl036!] has joined ##java [10:16]
dl036 parted the channel: [10:18]
begui [begui!] has joined ##java [10:22]
_Warl0ck [_Warl0ck!] has joined ##java [10:24]
surial YottaByte: that's.. bizarre. you have a method with signature, say, void foo(Number x), but.. you only ever pass INtegers? Why not just update the sig. [10:31]
surial YottaByte: or do you mean: I have a method takes Number, but what I really want is for my 5 methods (the Integer one, the Byte one, the Short one, etc) to be called? As in, there is a fixed set of subtypes and I have a method for every one of them, how do I 'route' it? [10:31]
YottaByte the latter [10:35]
NeXTSUN [NeXTSUN!~textual@2601:83:8100:42cf:d1ba:3b73:5ae5:d6e0] has joined ##java [10:36]
YottaByte @ surial (in case you didn't see my message) [10:41]
CodePoint [CodePoint!~CodePoint@2600:1700:1060:d580:c538:4d73:8f16:3904] has joined ##java [10:42]
Katana [Katana!~hentai@unaffiliated/katana] has joined ##java [10:47]
johnau anyone know where to edit context-root for web app in a maven/javaee8/glassfish project? [11:09]
johnau glassfish-web.xml seems no longer in use, apparently application.xml can't be used because of maven [11:09]
dodobrain [dodobrain!~dodobrain@unaffiliated/freakabcd] has joined ##java [11:25]
johnau ah, you have to edit the ear pom.xml and configure the maven-ear-plugin - bit convoluted [11:25]
gnufr33d0m [gnufr33d0m!~gnufr33d0@] has joined ##java [11:27]
cheeser that's ear deployment for you [11:28]
Goplat [Goplat!~Goplat@reactos/developer/Goplat] has joined ##java [11:32]
feannag [feannag!~feannag@2405:204:9321:b824:c96:39f:af01:444] has joined ##java [11:46]
oxum [oxum!~oxum@] has joined ##java [11:53]