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

« 2019-02-18


2019-02-20 »

Nick Message Date
progart [progart!] has joined ##java [12:02]
keepLearning512 [keepLearning512!~keepLearn@] has joined ##java [12:08]
v01d4lph4 [v01d4lph4!~v01d4lph4@] has joined ##java [12:09]
w17t [w17t!~w17t@unaffiliated/w17t] has joined ##java [12:11]
immibis [immibis!] has joined ##java [12:20]
AnalytiCat Can anyone recommend something for Java practice? [12:22]
gitness hackerrank [12:24]
DTZUZO_ [DTZUZO_!] has joined ##java [12:24]
gitness It's loads of java fun \o/ [12:24]
wilbert [wilbert!~wilbert@unaffiliated/wilbert] has joined ##java [12:27]
metrixx [metrixx!~metrixx@unaffiliated/metrixx] has joined ##java [12:29]
User_ [User_!] has joined ##java [12:38]
indistylo [indistylo!~aruns_@2406:7400:58:48d9:d55a:5edd:d7e1:74c8] has joined ##java [12:41]
indistylo [indistylo!~aruns_@2406:7400:58:48d9:d55a:5edd:d7e1:74c8] has joined ##java [12:43]
quadsar [quadsar!~quadsar@unaffiliated/quadsar] has joined ##java [12:53]
Jantz [Jantz!~IceChat9@2407:7000:8d04:100:2cc0:d5bb:b958:773e] has joined ##java [12:54]
Kol [Kol!] has joined ##java [12:57]
zopsi [zopsi!zopsi@2600:3c00::f03c:91ff:fe14:551f] has joined ##java [12:58]
upgrdman [upgrdman!~upgrdman@blender/artist/upgrdman] has joined ##java [12:59]
karab44 [karab44!~karab44@unaffiliated/karab44] has joined ##java [01:19]
Fossfile [Fossfile!] has joined ##java [01:22]
zkxs [zkxs!zkxs@2600:8804:8043:3f00::1:1] has joined ##java [01:24]
nurupo [nurupo!] has joined ##java [01:29]
sauvin [sauvin!sauvin@about/linux/staff/sauvin] has joined ##java [01:33]
LtHummus [LtHummus!] has joined ##java [01:38]
learningc [learningc!] has joined ##java [01:39]
progart [progart!~kamee@] has joined ##java [01:41]
Janhouse [Janhouse!] has joined ##java [01:44]
i_am_romeo [i_am_romeo!67094ae5@gateway/web/freenode/ip.] has joined ##java [01:44]
i_am_romeo hi everyone [01:45]
i_am_romeo i am making a jsp page and trying to implement a captcha but the captcha code is not working in offline mode [01:45]
i_am_romeo how do i make run a captcha offline also? [01:45]
LtHummus AnalytiCat: I like advent of code [01:46]
AnalytiCat LtHummus: I'll check it out! [01:46]
xa0s_ [xa0s_!] has joined ##java [01:46]
bnyio [bnyio!] has joined ##java [01:47]
i_am_romeo can anyone help me with how to make run captcha code without internet connection [01:47]
immibis what kind of captcha is it? [01:50]
immibis if it's recaptcha (google's one) then it needs internet so it can talk to google [01:51]
comrad [comrad!~comrad@holarse/core/comrad] has joined ##java [01:56]
i_am_romeo immibis: okay thanks [02:02]
i_am_romeo if its captcha then we wont require internet connection [02:02]
i_am_romeo its captcha not recaptcha [02:02]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [02:04]
i_am_romeo immibis, its a captcha how can i run it locally without an internet connection [02:06]
immibis what captcha system are you using. [02:06]
immibis is it a library or did you write your own one [02:07]
mohsen_1 [mohsen_1!uid289573@gateway/web/] has joined ##java [02:07]
i_am_romeo nope i copied a code from [02:07]
ogradyd [ogradyd!~Thunderbi@2a02:8070:88bf:9df0::685] has joined ##java [02:07]
immibis and which code did you copy? [02:08]
i_am_romeo [02:09]
i_am_romeo see this website [02:09]
immibis and which code did you copy? [02:09]
comrad [comrad!~comrad@holarse/core/comrad] has joined ##java [02:09]
immibis the JSP one I guess [02:10]
i_am_romeo yes the jsp one [02:10]
immibis you cannot use that service witihout an internet connection. [02:10]
i_am_romeo okay [02:10]
i_am_romeo so how do i use a captcha without internet connection [02:11]
i_am_romeo any other solution [02:11]
immibis a different one? [02:11]
i_am_romeo yes [02:11]
i_am_romeo but it should be a captcha only not recaptcha [02:11]
immibis recaptcha is google's captcha system, like [02:12]
i_am_romeo okay okay [02:12]
i_am_romeo so whats the other solution [02:12]
i_am_romeo to use captcha locally without an internet connection [02:12]
immibis idk. find a different captcha library or make your own [02:13]
i_am_romeo okay [02:15]
i_am_romeo so i will need to write my own code you say [02:15]
ravenousmoose [ravenousmoose!~ravenousm@] has joined ##java [02:20]
rorx [rorx!] has joined ##java [02:24]
mitch0 [mitch0!] has joined ##java [02:27]
bugzy_on_busy [bugzy_on_busy!~Thunderbi@] has joined ##java [02:35]
OnceMe [OnceMe!~OnceMe@unaffiliated/onceme] has joined ##java [02:36]
sauvin [sauvin!sauvin@about/linux/staff/sauvin] has joined ##java [02:46]
beStKodErEveR [beStKodErEveR!] has joined ##java [02:49]
nebulae [nebulae!~nebulae@2a02:587:a25:c400:cc69:1022:3cc2:f7ac] has joined ##java [02:52]
progart [progart!~kamee@] has joined ##java [02:53]
bugzy_on_busy1 [bugzy_on_busy1!~Thunderbi@] has joined ##java [02:58]
zerogue [zerogue!] has joined ##java [03:02]
sauvin [sauvin!sauvin@about/linux/staff/sauvin] has joined ##java [03:04]
SchleimKeim [SchleimKeim!~mma@unaffiliated/schleimkeim] has joined ##java [03:07]
Hanii [Hanii!~Hanii@2a00:23c5:c587:a800:80aa:9d3d:2d2d:19a1] has joined ##java [03:09]
Tobbi [Tobbi!~Tobbi@supertux/tobbi] has joined ##java [03:10]
mlehmk [mlehmk!~ThomFox@unaffiliated/mlehmk] has joined ##java [03:12]
sonOfRa What's your goal here anyhow? Captchas are generally verified by a server [03:13]
sonOfRa If you're offline, nothing stops the "user" of your site to just... Delete the javascript code that is the captcha [03:13]
zh2683 [zh2683!~zh2683@] has joined ##java [03:13]
mf7 [mf7!~user@] has joined ##java [03:16]
lithium [lithium!~lithium@unaffiliated/lithium] has joined ##java [03:17]
mlehmk [mlehmk!~ThomFox@unaffiliated/mlehmk] has joined ##java [03:18]
avemi [avemi!ave@gateway/vpn/privateinternetaccess/avemilia] has joined ##java [03:24]
djhworld [djhworld!~djhworld@] has joined ##java [03:28]
rwheadon [rwheadon!~rwheadon@2600:1700:17a0:58ef:3994:dabf:d2c:8e0f] has joined ##java [03:30]
sgt-hartman [sgt-hartman!] has joined ##java [03:32]
tuskkk____ [tuskkk____!uid18470@gateway/web/] has joined ##java [03:45]
keepLearning512 [keepLearning512!~keepLearn@] has joined ##java [03:54]
bugzy_on_busy [bugzy_on_busy!~Thunderbi@] has joined ##java [03:58]
badSophia parted the channel: [04:00]
Matthijs [Matthijs!~quassel@unaffiliated/matthijs] has joined ##java [04:04]
avemi [avemi!ave@gateway/vpn/privateinternetaccess/avemilia] has joined ##java [04:05]
mona_x [mona_x!~mona_x@] has joined ##java [04:13]
mona_x #!/bin/sh vs #!/usr/bin/env bash ?? there seems to be some issues with the first when used in a git hook at leat [04:14]
mona_x least [04:14]
sonOfRa mona_x: how is this java-related? [04:15]
croo [croo!~ColinRoon@] has joined ##java [04:19]
bugzy_on_busy [bugzy_on_busy!~Thunderbi@] has joined ##java [04:21]
progart [progart!~kamee@] has joined ##java [04:27]
DrowningElysium [DrowningElysium!uid190788@gateway/web/] has joined ##java [04:30]
SuperTyp [SuperTyp!~SuperTyp@] has joined ##java [04:34]
vdamewood [vdamewood!~vdamewood@unaffiliated/vdamewood] has joined ##java [04:34]
togo [togo!~togo@2a01:5c0:e08f:71c1:462e:547b:133c:1d21] has joined ##java [04:38]
progart [progart!~kamee@] has joined ##java [04:40]
indistylo [indistylo!~aruns_@2406:7400:58:48d9:fcfa:ad12:fb6e:511] has joined ##java [04:55]
Fossfile is it good practice in your opinion to keep a static reference to an embedded server (tomcat) object in order to call its stop method later? [04:58]
yawkat no [04:59]
indistylo [indistylo!~aruns_@2406:7400:58:48d9:fcfa:ad12:fb6e:511] has joined ##java [05:01]
Fossfile yawkat: how would you suggest to go about it ? [05:03]
yawkat global state [05:03]
yawkat yawkat, what does that even *mean*? [05:03]
yawkat di [05:04]
yawkat Dependency injection is a pattern by which object relationships are managed by a framework rather than the objects that use the relationship. It's a core pattern in Java, and it's VERRRRY powerful. Ask about ~javax.inject, ~guice, ~dagger, ~pico, ~spring, ~cdi, and ~feather. [05:04]
karoshii -- Hey, could someone point me in the right direction to fix these 'bugs' (listed in errors.txt) -- File is run from, user selects a file - and the app replaces every 2nd char with a blank [05:05]
karoshii karoshii's title: " - ElegantActiveProfessional" [05:05]
karoshii Fixed everything else (: - last one, is a while loop the best method ? [05:05]
Fossfile yawkat: so one must use a framework for that? I currently do not [05:06]
yawkat ioc [05:06]
yawkat yawkat, ioc is Inversion Of Control, an older term for what is now called Dependency Injection. Ask me about ~di [05:06]
yawkat eh [05:07]
yawkat no, you dont have to [05:07]
Gazooo [Gazooo!~Gazooo@] has joined ##java [05:07]
badSophia [badSophia!~moretz@] has joined ##java [05:10]
karoshii I'm aware I can catch with try/catch/try/catch/finally but its ugly af i'm sure there's a better way [05:14]
realtime_ [realtime_!realtime@gateway/vpn/privateinternetaccess/realtime] has joined ##java [05:15]
odinsbane Fossfile: how do you stop/start the server now? [05:21]
Fossfile odinsbane: with 2 JButtons. each calls the respective method from that global tomcat static object. should mention that to start it, a new thread is created so UI thread wouldn't freeze [05:25]
odinsbane I don't know why the tomcat object would be static. [05:27]
Fossfile it isn't, I made it [05:27]
Fossfile I needed a convinient way to address it when the stop button is clicked. I felt it was dirty [05:28]
deebo weirdest thing in all this is the existence of a button to start and stop a servlet container [05:29]
odinsbane In this case, I would agree and say it is poor practice. Why make something static if you don't need to. [05:29]
karoshii okay fixed 2/3 bugs using - try (InputStream reader = new FileInputStream(file)) { - Just left with the main one I've been battling with for a week ): - Method ignores results of [05:30]
Fossfile deebo: perhaps I didn't word it right, the buttons to start and stop are on a GUI I created to easily start/stop server [05:30]
deebo yeah i don't get why that needs to exists :) [05:31]
Fossfile odinsbane: didn't easily think of a better way. I'm still learning [05:31]
mona_x [mona_x!~mona_x@] has joined ##java [05:31]
deebo if you really want to use an external servlet container and not embed it with the application, you can just wire it up to your IDE [05:32]
deathwishdave [deathwishdave!~deathwish@] has joined ##java [05:32]
Fossfile deebo: it's supposed to be a portable program, one runnable jar, with the server and the webapp both included. so the start/stop buttons allow some minimal control.. also you would at least need a stop button to gracefully end the server without issues.. [05:32]
Fossfile well that is the aim anyway [05:33]
odinsbane Fossfile: it's hard to say how to fix it. Just because it is static doesn't mean it's broken. If you can reduce it down to some managable level of code somebody could probably suggest how to make it non-static. Or possibly use some DI, though... might just be more of a DI learning experience. [05:33]
yawkat it is a good idea to start out with making nothing except your main method static [05:34]
Fossfile odinsbane: yes I have begun reading about it since yawkat suggested it [05:35]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [05:37]
Fossfile I've meanwhile changed a few things in code and now the tomcat object does not have to be static. but I do still need to keep a global refrence to is. anyway, it isn't instantiated until it's really needed so I don't think this is too terrible? [05:37]
royal_screwup21 [royal_screwup21!89de72f5@gateway/web/cgi-irc/] has joined ##java [05:38]
Sina [Sina!uid230776@gateway/web/] has joined ##java [05:40]
pandaadb [pandaadb!~pandaadb@] has joined ##java [05:45]
lightslategrey [lightslategrey!~lightslat@] has joined ##java [05:46]
avemi [avemi!ave@gateway/vpn/privateinternetaccess/avemilia] has joined ##java [06:02]
keepLearning512 [keepLearning512!~keepLearn@] has joined ##java [06:07]
zh2683 [zh2683!~zh2683@] has joined ##java [06:21]
Secret-Fire [Secret-Fire!~Secret-Fi@2601:1c1:4201:458c:d0d8:ccf1:341f:ff7d] has joined ##java [06:23]
devish [devish!345f4b0d@gateway/web/freenode/ip.] has joined ##java [06:24]
Secret-Fire [Secret-Fire!~Secret-Fi@2601:1c1:4201:458c:d0d8:ccf1:341f:ff7d] has joined ##java [06:24]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [06:28]
deathwishdave [deathwishdave!~deathwish@] has joined ##java [06:31]
ener2 [ener2!] has joined ##java [06:45]
x256 [x256!~Jace@2001:638:60f:1000:4c9f:ad71:e572:4d3] has joined ##java [06:54]
conan [conan!] has joined ##java [06:55]
t2mkn [t2mkn!~t2mkn@] has joined ##java [06:59]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [07:05]
bravoslo [bravoslo!] has joined ##java [07:07]
SuperTyp [SuperTyp!~SuperTyp@] has joined ##java [07:13]
camerin [camerin!] has joined ##java [07:15]
pmart [pmart!b945c762@gateway/web/cgi-irc/] has joined ##java [07:25]
Sheilong [Sheilong!uid293653@gateway/web/] has joined ##java [07:30]
rwheadon [rwheadon!~rwheadon@2600:1700:17a0:58ef:3994:dabf:d2c:8e0f] has joined ##java [07:32]
Sheilong In javafx is possible to bind a task to a pane background? [07:33]
Sheilong I want my thread to change the pane background color. [07:33]
Sheilong I`ve tried something line that paneSemaforoARed.backgroundProperty().bind(task1.messageProperty()); but the types doesn`t match [07:33]
tjt263 [tjt263!uid149471@gateway/web/] has joined ##java [07:35]
gblfxt [gblfxt!] has joined ##java [07:44]
Secret-Fire [Secret-Fire!~Secret-Fi@2601:1c1:4201:458c:783d:bcda:3a73:b88d] has joined ##java [07:47]
Karyon [Karyon!~karyon@unaffiliated/karyon] has joined ##java [07:47]
stryek [stryek!uid332574@gateway/web/] has joined ##java [07:53]
teralaser [teralaser!~teralaser@unaffiliated/teralaser] has joined ##java [07:54]
conan [conan!] has joined ##java [08:01]
ravenousmoose_ [ravenousmoose_!~ravenousm@] has joined ##java [08:01]
Jantz [Jantz!~IceChat9@2407:7000:8d04:100:653a:9c3:99c7:72b2] has joined ##java [08:08]
Maldivia Sheilong: you probably need to convert the message somehow then [08:09]
Sheilong Maldivia: May you point me out a way? [08:10]
Maldivia Sheilong: you have to add a converter [08:12]
Sheilong Maldivia: unfortunatly didn`t worked [08:15]
rwheadon [rwheadon!~rwheadon@] has joined ##java [08:16]
Sheilong That is if by converter you meant a cast [08:16]
Maldivia I did not [08:16]
Maldivia just a sec [08:16]
beStKodErEveR [beStKodErEveR!] has joined ##java [08:16]
Maldivia although, it might just be simpler to create a Background property on your task, and bind that, and then update your property instead D [08:18]
plarsen [plarsen!~plarsen@redhat/jboss/pdpc.professional.plarsen] has joined ##java [08:19]
surial Sheilong: casts don't convert unless you're casting primitives. [08:21]
surial they merely make type assertions. If the thing is what you say it is, nothing changes (except the compiler stops complaining). If it is not, a ClassCastException occurs there. Either it does nothing, or it crashes. No conversion. [08:22]
conan [conan!] has joined ##java [08:25]
indistylo [indistylo!~aruns_@2406:7400:58:48d9:fcfa:ad12:fb6e:511] has joined ##java [08:25]
Sheilong I did a mistake then. [08:25]
Sheilong I've been a while looking for how to bind a task to that pane property so I could change inside my thread [08:26]
Maldivia I would probably just do the "easy" way here, and in the onProgress in your task, have code that updates the background [08:27]
Maldivia (or what exactly it's called on Task, can't remember) [08:28]
SuperTyp [SuperTyp!~SuperTyp@] has joined ##java [08:33]
SuperTyp_ [SuperTyp_!~SuperTyp@] has joined ##java [08:34]
dendazen [dendazen!] has joined ##java [08:40]
keepLearning512 [keepLearning512!~keepLearn@] has joined ##java [08:45]
q9929t [q9929t!~Thunderbi@] has joined ##java [08:48]
palasso [palasso!~palasso@unaffiliated/palasso] has joined ##java [08:48]
noodlepie [noodlepie!] has joined ##java [08:50]
mr_lou [mr_lou!] has joined ##java [08:51]
Squarism gah this java upgrade sink [08:52]
Squarism so its either org.glassfish.jaxb or com.sun.xml.bind [08:53]
Squarism what to choose [08:53]
cheeser the glassfish version of course [08:53]
Squarism i allways though glassfish was some obscure appserver noone used [08:54]
Maldivia depends - you after the API or the implementation [08:54]
Squarism the implementation [08:54]
cheeser glassfish is the reference implementation for Jakarta EE. not terribly obscure. [08:55]
Maldivia well, org.glassfish.jaxb is the Reference Implementation, so [08:55]
Squarism cheeser, Maldivia - thanks for your input [08:56]
Maldivia Squarism: as for com.sun.xml.bind - I think those are the tools that were bundled with the JDK for some time, like to convert wsdl file to java classes etc (wsimport etc) [08:59]
Maldivia (not 100% sure though) [08:59]
Squarism i think one of my team members picked up on that taken away from java [09:02]
Squarism 9 [09:02]
Squarism and have included dependencies on them in about every project we've upgraded [09:02]
n35xdxb0 [n35xdxb0!] has joined ##java [09:04]
katiex7 [katiex7!] has joined ##java [09:04]
Maldivia well, probably because various blogs have used the com.sun.xml.bind artifacts [09:07]
ViralTaco [ViralTaco!~dork@unaffiliated/d-b/x-8688605] has joined ##java [09:11]
orbyt_ [orbyt_!~orbyt@] has joined ##java [09:12]
horribleprogram [horribleprogram!~horriblep@unaffiliated/nightcoder] has joined ##java [09:14]
Karyon [Karyon!~karyon@unaffiliated/karyon] has joined ##java [09:15]
keepLearning512 [keepLearning512!~keepLearn@] has joined ##java [09:17]
keepLearning512 [keepLearning512!~keepLearn@] has joined ##java [09:19]
kicked keepLearning512 (Banned: please fix your connection. you're bouncing in and out. this ban will expire after 8h) [09:19]
Squarism whatabout [09:20]
Squarism is that also so so? [09:20]
cheeser use the RIs [09:22]
Maldivia well, the com.sun.xml.* is considered the "old" versions of it [09:22]
Maldivia I would use the glassfish ones [09:22]
x256 Is there a way to get an existing instance (singleton) into a CDI 2.0 (weld-core-se) container? [09:28]
Maldivia existing instance? [09:29]
kempo [kempo!] has joined ##java [09:30]
x256 This is normal procedure for guice or hk2. Just bind an instance to its own class or an interface using singleton scope. But CDI 2 seems to really not like hat. [09:31]
Squarism cheeser, is there some place you can find a listing of RIs for javax api's? [09:31]
cheeser the Java EE umbrella spec for starters [09:31]
Squarism ? [09:33]
Squarism Squarism's title: "Java EE Platform Specification" [09:33]
mitch0 [mitch0!] has joined ##java [09:33]
cheeser yeah. that's good place to start [09:36]
mitch0 [mitch0!] has joined ##java [09:45]
w17t [w17t!~w17t@unaffiliated/w17t] has joined ##java [09:46]
Byteflux [Byteflux!] has joined ##java [09:52]
rippa [rippa!] has joined ##java [09:57]
q9929t [q9929t!~Thunderbi@] has joined ##java [09:57]
Maldivia Squarism: to be more precise [09:58]
Maldivia Maldivia's title: "Java EE Platform Specification" [09:58]
Squarism thanks again both of you. The last list seems very useful [10:01]
cheeser any time [10:01]
mitch0 [mitch0!] has joined ##java [10:01]
thief [thief!realtime@gateway/vpn/privateinternetaccess/realtime] has joined ##java [10:03]
Rapture [Rapture!] has joined ##java [10:03]
royal_screwup21 [royal_screwup21!89de72f5@gateway/web/cgi-irc/] has joined ##java [10:04]
code_zombie [code_zombie!~code_zomb@2605:a601:aa1:da00:fc52:92fa:18a0:e1cc] has joined ##java [10:08]
Addax "I would like a lombok generator method that generated custom code." *sigh* [10:08]
Maldivia ehh... [10:09]
Addax some of the lombok requests are a little ... odd [10:09]
Maldivia I don't even know what the above means... [10:10]
indistylo [indistylo!~aruns_@2406:7400:58:48d9:fcfa:ad12:fb6e:511] has joined ##java [10:10]
Addax Given I have a field called "name", [10:10]
Addax I would like this method "trackName()" to be created automatically. [10:10]
Addax Internally this method when invoked, it would call the method specified as Idefined (this method internally add the field in a list). [10:10]
Addax It's not my project or I'd simply respond "no" [10:10]
rwheadon [rwheadon!] has joined ##java [10:10]
Lymia [Lymia!] has joined ##java [10:10]
surial is this from the issuetracker? [10:11]
Addax mailing list [10:11]
Maldivia ok, so like a custom Getter/Setter ? [10:11]
Addax yeah, that's actually in the title of the email too [10:12]
freeone3000 @Getter("track") [10:15]
Addax freeone3000: he wants more than that, though [10:16]
Addax I didn't post the entire email [10:16]
freeone3000 then he should write his own method. [10:16]
Addax Indeed. [10:16]
Crash1hd [Crash1hd!~Crash1hd@unaffiliated/crash1hd] has joined ##java [10:17]
Addax surial ++ good response :) [10:17]
Addax surial has a karma level of 502, Addax [10:17]
surial can you tell I'm in a meeting? [10:17]
Addax not from the email [10:18]
Maldivia this is one of the places where method-referencse in annotations could be nice... @Foo("track", Klass::register) -- and could then genete public void trackName() { this.register(); } ? [10:20]
Addax sure, BUT LET'S SAY NO [10:20]
Addax geez [10:20]
freeone3000 Maldivia: Unfortunately, the interface has to include the return type, so it'd be... what, a Supplier<?> where the return is ignored? [10:21]
Maldivia freeone3000: Runnable? [10:21]
freeone3000 forcing a void return isn't great, it's inflexible. Really should be a Callable<?> but that one's marked as throws Exception. [10:22]
jcob [jcob!~jcob@] has joined ##java [10:23]
led_dark_1 [led_dark_1!] has joined ##java [10:23]
Maldivia well, since we're working on source-level here... @Foo("track", "register()") - yay, code in a string ! :D [10:23]
freeone3000 with all the attendant problems, such as lack of syntax checking! [10:27]
Addax i.e., "no" [10:28]
Addax you guys overcomplicate things [10:28]
Maldivia ok, I might have written one too many lines of javassist code ;D [10:28]
bitSt0rm [bitSt0rm!~manjana@unaffiliated/bitst0rm] has joined ##java [10:30]
RedSoxFan07 [RedSoxFan07!~Thunderbi@] has joined ##java [10:35]
temhaa [temhaa!d54adbd2@gateway/web/freenode/ip.] has joined ##java [10:41]
temhaa Hello [10:41]
temhaa I hope all people are doing great [10:41]
temhaa I need your advices about webhooks. [10:41]
WhereIsMySpoon [WhereIsMySpoon!~quassel@unaffiliated/whereismyspoon] has joined ##java [10:41]
WhereIsMySpoon Hi, how often do any of you lot use parallelStream() ? Do you use it whenever you can, or only when you've identified some code that needs optimising using benchmarking etc [10:42]
Addax WhereIsMySpoon: the latter. So far, I've never needed it; every time it MIGHT come in handy it's been slower than just regular streams [10:42]
temhaa My question is not related to java directly but wanted to get advices from someone who has experiences with that.. I making the project which supports webhooks. I am using Bearer API-Key authentication to feed callback url with events.. But My question is should I store apikey as free text or [10:44]
WhereIsMySpoon Addax: really? Why would it be slower than regular [10:44]
hussam [hussam!uid193284@gateway/web/] has joined ##java [10:44]
WhereIsMySpoon overhead of creating threads etc? [10:44]
Addax just the nature of the beast, generally coordinating the threads adds overhead [10:45]
WhereIsMySpoon mm ok [10:45]
WhereIsMySpoon i hadnt thought of that [10:45]
mitch0 [mitch0!] has joined ##java [10:45]
Maldivia well, highly depends on what you're doing also [10:45]
Addax yes [10:46]
Addax very much [10:46]
Addax so you... TEST [10:46]
bendem if you didn't measure, you didn't optimise [10:47]
bendem ? every performance guide ever [10:48]
WhereIsMySpoon hokay [10:48]
WhereIsMySpoon thanks all [10:48]
Addax bendem ++ [10:48]
Addax bendem has a karma level of 46, Addax [10:48]
Addax that was marvelously well-put [10:48]
WhereIsMySpoon Addax ++ [10:48]
WhereIsMySpoon addax has a karma level of 2, WhereIsMySpoon [10:48]
WhereIsMySpoon bendem ++ [10:48]
WhereIsMySpoon bendem has a karma level of 47, WhereIsMySpoon [10:48]
WhereIsMySpoon cheers both [10:48]
orbyt_ [orbyt_!~orbyt@] has joined ##java [10:58]
rohdef [rohdef!] has joined ##java [10:58]
mitch0 [mitch0!] has joined ##java [11:00]
Crash1hd [Crash1hd!~Crash1hd@unaffiliated/crash1hd] has joined ##java [11:09]
mohsen_1 [mohsen_1!uid289573@gateway/web/] has joined ##java [11:09]
Crash1hd Can anyone advise is there a way to test this without using unitTests.returnDefaultValues = true. Or using powermock? [11:12]
xa0s_ [xa0s_!xa0s@] has joined ##java [11:12]
freeone3000 What do I use if I want something that transforms JDBC ResultSets into Objects based on some rather simple field-name mappings but I want to write my own SQL? [11:13]
Diablo-D3 hibernate? [11:13]
Diablo-D3 maybe? [11:13]
x256 JOOQ [11:14]
Diablo-D3 yeah or jooq [11:14]
freeone3000 Hibernate refuses to do an INNER JOIN based on table name in JPQL. It wants me to do it by object. With special syntax, using a path. Which requires me to do a @ManyToMany mapping. Which requires me to specify a @JoinTable. I *have* a join table, it's just that the join has "edge data", so it's not going to map cleanly to ... [11:14]
mitch0 [mitch0!] has joined ##java [11:15]
Squarism native queries? [11:16]
freeone3000 Squarism: Otherwise known as "queries" [11:16]
Diablo-D3 @ManyToMany does, indeed, get ridiculous in JPA [11:16]
Squarism haha [11:16]
freeone3000 It's not even a many-to-many, it's a one-to-one this is just in an accessory table because of the "edge" data. [11:17]
Markow [Markow!~ejm@] has joined ##java [11:17]
acidjnk JDBI or JOOQ [11:18]
sonOfRa jdbi hasn't been suggested yet, but works well, too [11:18]
freeone3000 JOOQ wants $150 because of my choice in database. Let's check JDBI. (Or, I could switch database.) [11:18]
acidjnk I haven't used it before, just glanced over the websites, tbh. But it looks like it might be better than JPA for many cases. Without the limitations due to overly abstracting, but almost the same simple ORM utility. [11:19]
mohsen_1 freeone3000: as long as the returned fields match object's fields, I don't see why not the can be mapped [11:20]
freeone3000 mohsen_1: There's a name switch, and I expect it to be able to convert from UUID to uniqueidentifier and Instant to datetime2 and String to nvarchar(max) [11:20]
acidjnk I think criteria API could do the join you want. [11:21]
freeone3000 acidjnk: I'm actually doing this in kotlin (sorry) so Criteria becomes a bit unweidly. [11:21]
freeone3000 yep, jdbi with rowmappers seems perfect, thanks. [11:22]
mf7 [mf7!~user@] has joined ##java [11:23]
mitch0 [mitch0!] has joined ##java [11:30]
Addax freeone3000: you using spring at all? [11:30]
Addax sorry, just saw this channel again [11:31]
freeone3000 No, no spring. ktor + jackson. [11:31]
tang^ [tang^!~tang^@] has joined ##java [11:31]
Addax *nod* [11:31]
bitSt0rm [bitSt0rm!~manjana@unaffiliated/bitst0rm] has joined ##java [11:35]
karab44 [karab44!~karab44@unaffiliated/karab44] has joined ##java [11:36]
surial Crash1hd: that's kotlin, not java, though. (on a separate note, optional semicolons just steps on my toes, damn that looks fucked up). I assume you don't want to call crashlytics during the test? [11:36]
Addax optional semicolons rock; you use them when you need them, otherwise they're just noise [11:36]
surial Crash1hd: and separate from that, if the point is to never return null, whyever did you decide to decree that the return type of this method is Int? [11:37]
Crash1hd surial, correct and yes I meant to post this in android lol [11:37]
surial Addax: hamming distance issue, and it's not noise. [11:37]
surial in the sense that they don't 'obscure' by virtue of their existence, because they look like what they are and they don't look like what they're not. [11:37]
Addax surial: it works for me. I actually find that I LIKE avoiding the semicolons now. That started with... scala, and continued with kotlin. [11:38]
Crash1hd surial, it was not supposed to be there (forgot to remove the ?) in the pastebin [11:38]
surial Hmm, style discussions always get so woozy. I'm trying to say that, for example, some line of code that does a nullcheck or whatnot, well, it looks like an actual check on stuff, I treat it as 'noise', in that it obscures what I really wanna lookat, if that nullcheck, whilst I like it being there, is not otherwise something I want to even be thinking about when I look at some code. A semicolon is NOT going to confuse me. [11:38]
mitch0 [mitch0!] has joined ##java [11:39]
surial Crash1hd: okay, but, if it's not there, then your unit test is a futile exercise. [11:39]
Addax surial: it's not a matter of being confused [11:39]
surial Crash1hd: you might as well write this test: fun `ensure log framework is okay`() { assertNotNull("0 is somehow null", 0); } [11:39]
Crash1hd surial, why? Maybe I am missing something even more simple [11:39]
surial Crash1hd: because without the ?, the value returned by any call to Logger.e CANNOT be null, if I know my kotlin (And I really don't). [11:40]
Jantz [Jantz!~IceChat9@2407:7000:8d04:100:41d0:cfd9:fdcf:34e3] has joined ##java [11:40]
Addax Crash1hd: uh... that seems like a wonky logger. If it's misconfigured, throw an exception. [11:40]
surial Addax: no, say no more. Scala done infected you with some silly notions. You have my pity. [11:40]
Crash1hd surial, fair enough. Having trouble understanding the logic behind unit testing and I have that function just don't know what to test for? [11:40]
surial Crash1hd: I don't really think there's anything to test here. [11:40]
surial I'm somewhat confused as to what Log.e even returns, but that's a separate issue. [11:40]
Addax surial: most of my scala-isms have been cured or migrated to saner languages :) [11:41]
surial Oh, so there's hope then? :P [11:41]
Crash1hd surial, apparently it returns an Int (not sure why) however if there is nothing to test how does one follow Tdd and build these functions? [11:41]
Addax I don't see semicolons as necessary, unless there's a *reason* to have them - i.e., multiple statements in a given line [11:41]
Crash1hd I thought the point of TDD is that there is always something to test [11:42]
surial Crash1hd: a more pointed issue with your code might be that you call Log.e instead of your customer logger. In general tests can't solve that, instead you should rewrite your logging stuff to farm it out to crashlytics under certain circumstances so you can keep using Log.e, but maybe that's not possible in android \_(?)_/ ? that's more for ##android I guess. [11:42]
Addax but realistically I'm putting those in a block, and putting them on their own lines even within that block [11:42]
surial Crash1hd: probably, but I find those who espouse TDD to be blithering fucking morons who never wrote a serious project in their life. [11:42]
Addax surial ++ [11:42]
Addax surial has a karma level of 503, Addax [11:42]
Addax hey, I use TDD and I've written LOTS of serious projects [11:42]
surial Crash1hd: I'm probably the most test-hostile regular here though. Maaaybe also wait for a few others to chime in :) [11:42]
Crash1hd ) fair enough this is what I am trying to figure out lol [11:43]
surial Crash1hd: there's usually something to test. Not ALWAYS something to test. [11:43]
Crash1hd Addax, any idea how I would TDD that function? [11:43]
Addax testing's actually the biggest blocker I have in TWO of my projects right now [11:43]
surial Presumably the true idea you're trying to get to here is that you want 100% test coverage. [11:43]
livepan TDD is fine, i use it every once in a while when the situation is right [11:43]
Crash1hd surial, well that was my first function in the project lol and I was like how the... do I test this [11:43]
surial That, too, is shit said by idiots. In real life, trying to hit 100% code coverage leads to you removing defensive code and in general making your project extremely fragile. It has the opposite effect (bug-prone stuff that tends to break in production). [11:43]
Addax Crash1hd: uhh.. what does it DO [11:43]
Crash1hd The plan is that eventually it will save the log that is being written to the logcat into a local sqlite db [11:44]
livepan the bigger point I usually make is that "line coverage" != quality tests that actually catch issues [11:44]
Addax Crash1hd: then you're going about it the wrong way [11:44]
surial Addax: it calls crashlytics, then, if we're in debug mode which is (haha, this is a fun one for TDD aint it? The sheer amount of shit wafting off of this is adorable) - A COMPILE TIME CONSTANT, more or less.. ALSO send it to the built in android logger, otherwise don't. [11:44]
livepan 'oh some sort of test called this line of code, no way there can be a defect in prod' [11:44]
Addax Crash1hd: write a test that examines the SQLite database. Then write something that should log to it, to make the test pass. Test failure conditions. [11:44]
surial livepan: yes, that's true, but you can counter that argument with 'but I write really good tests'. Which, sure, you and I know we should point and laugh, but my argument does not require even that. [11:45]
Addax If you're using statics, then... uh... [11:45]
mitch0 [mitch0!] has joined ##java [11:45]
Addax isn't going to get into chasing the red herrings [11:45]
surial something like switch (someEnum) case OPT1: case OPT2: case EVERY_OPTION_HERE: ... default: throw new IllegalArgumentException("New enum value not covered: " + someEnum; break } [11:45]
surial The point of the default block is to not blindly carry on in case somebody somewhere adds a new enum value. [11:45]
surial given this situation, pick your poison [A] hack your way into dynamically adding an enum. [B] stop t hinking 100% coverage is a good goal to have. [C] delete hte default clause. [D] Actually add a 'this value is fake' kinda value to the enum AND some code to make sure the value ends up with this bullshit value just so you can test that the exception occurs. [11:47]
surial Clearly the right answer is [B], right? [11:47]
Crash1hd Right. :) and this is why I came to you guys, I felt like something was not right [11:48]
freeone3000 (B). Coverage counting is usually a mistake. [11:48]
surial livepan: just a random example, I find stuff like this comes up often. There's a fine line (if you never have null strings, they are always the blank string, and nevertheless you have tons of if (x == null || x.isEmpty()) everywhere, I'd claim your code is ugly and you should just make it if (x.isEmpty()), but, well, yeah ? coding, right. There are rules of thumb, but it's never black and white. [11:49]
craze124 [craze124!] has joined ##java [11:49]
surial I've seen blog posts about how to use reflection and Unsafe to add fake enum values. [11:49]
freeone3000 We have unit tests for the weird stuff, regression tests for bugfixes, and rely primarily on integration tests. [11:49]
sonOfRa It's a nice pointer in the right direction if you have a codebase without any tests, but other than that, don't rely on it [11:49]
surial freeone3000: yeah that's precisely how I do it too. [11:49]
Crash1hd I started this project with a static object Log that mimics util Log and was going to then add in the ability to save to db but couldn't figure out how to test that (but I felt that maybe it didn't need to be tested yet then as I went back to learning more about TDD I was like how?) thus I was so confused [11:49]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [11:50]
freeone3000 (sometimes these integration tests are automated!) [11:50]
livepan true - that's where stuff like good design and coding style definitely become more relevant, something you can't add by TDD [11:50]
livepan there is another aspect... I've been on many projects where the tests themselves took a fair amount of effort to maintain... it was a real-world, practical aspect of it I hadn't considered after I had drank all the TDD kool-aid [11:51]
surial Oh, I guess there is [E] make code coverage tools so smart, they can identify that line as 'oooh, but that one? That shouldn't be part of the stats!', possibly via a not-actually-all-that-smart magic comment. [11:51]
surial But between A, B, C, D, and E I'm still going with B. [11:51]
livepan I've seen a lot of codebases with horribly-written tests that basically add tons of work if you ever want to refactor... so either you have to give up the tests or never improve the design, guess which one usually happens [11:51]
lithium [lithium!~lithium@unaffiliated/lithium] has joined ##java [11:51]
freeone3000 that's not even that smart, cobertura had that back in 1.4 [11:52]
Sheilong Why is it so sux to use threads with gui. [11:52]
Crash1hd surial, So I am best to only test the saving of something into the roomDB and not the actual function of log.e cause everything that function does is built in android stuff (what I don't understand though is if I had another function that happens to have a log.e inside it) when I run a test on that function I am going to get the same error? [11:52]
Sheilong Javafx making my life harder lol [11:52]
surial livepan: there's a spectrum from 'your test is basically just a restating of the very code you just wrote' and 'no, its totally different, it is trying to state expectations and nothing more'. The closer you are to the former, the more likely the test needs rewriting if you change anything, ... and those tests are mostly useless anyway in the first place. Yet another line of reasoning to end up at 'mabbe 100% test coverage is [11:53]
surial not a great goal to shoot for'. But, seriously, don't look at me for this shit. I maintain the opinion that if I only write enough code that I carry the blame for if it is buggy and I don't test it, eventually I will ascend to godhood and never fuck up ever. [11:53]
surial I'm almost there, but, I Am Very Smart. [11:53]
surial P [11:53]
KeyJoo [KeyJoo!~KeyJoo@] has joined ##java [11:54]
freeone3000 Sheilong: Probably because you don't understand threading? [11:55]
freeone3000 JavaFX is single-threaded not-thread-safe. [11:55]
Diablo-D3 dont block in the render thread. [11:55]
waz jwz threads [11:55]
waz Some people, when confronted with a problem, think, "I know, I'll use threads," and have two problems they. [11:55]
Sheilong freeone3000: No. I've tried everything that I came across on the internet. I just want a thread to update a background color of a pane [11:55]
freeone3000 This is going to be true of the vast majority of code you work with, but the JavaFX documentation is very detailed on what exactly this means, for every method, and provides ways of interacting with it. [11:55]
Sheilong freeone3000: I wrote a code for do something similar, but it was being used to update a text. [11:56]
freeone3000 Sheilong: Okay, so you want another thread to queue a task on the event queue which updates the background color of a pane. [11:56]
freeone3000 Sheilong: See previous. [11:56]
freeone3000 Actually, JavaFX has a very nice Observer interface to debounce property changes, so you could work with that way. [11:56]
surial Sheilong: yeah, it sounds like you had a problem and went: I know! THREADS! [11:57]
surial Sheilong: that was the wrong answer. [11:57]
freeone3000 Sheilong: What's your code right now? [11:57]
Sheilong freeone3000: Yes, the way I wrote the previous doesn't same way. On the first I was able to bind the label to the task instance, however javafx doesn't let me bind the background property of pane same way [11:57]
freeone3000 Cool, so last time you used Observable. [11:57]
Sheilong surial: I don't understand threads , I only have some idea about them, but I don't think my problem is understand the threads itself, I mean it is not the main problem. [11:58]
surial either use the built in css-animate kinda dealios, and if that's no go, I'm pretty sure it's possible to create a timer kind of job with the javafx system which will inject an event every so often into the event queue. Then just write a handler for this timer event and update the colours (which you'll be doing inside the EDT so you can mess with the GUI). You never ever write 'new Thread' anywhere in this project. [11:58]
freeone3000 The color property isn't Observable, so you actually need to use Platform.runLater(). [11:58]
mitch0 [mitch0!] has joined ##java [11:58]
surial does javafx have any kind of 'runrepeatedly', or a runlater with a millis-delay? [11:58]
surial hasn't written any javafx, ever. [11:58]
freeone3000 (javafx actually uses a different thread which serves the exact same purpose as the EDT, but is not the EDT) [11:58]
Sheilong freeone3000: When I use Platform.runLater() it does freezes the screen = / [11:59]
freeone3000 surial: Platform.runLater() is very similar to EventQueue.invoke() [11:59]
surial Sheilong: it does not. [11:59]
freeone3000 Sheilong: Show me what you've got. [11:59]
surial Sheilong: I'm sure your code does that, but it's not because of that. pastebin the whole thing. [11:59]
Sheilong My code is very messed [11:59]
freeone3000 It's not going to get less messed with you fiddling with it. [11:59]
freeone3000 Ah. No, it doesn't have the delay function, nor invokeAndWait(). Kind of glad for the latter, the only purpose of that was to check which thread you were on. [12:00]
Sheilong You're gonna mad on me lol [12:00]
cheeser you don't need the 'true' part on line 45 [12:01]
freeone3000 Sheilong: Okay. You actually could replace this with a CSS animation, but let's do this as an exercise. [12:01]
cheeser and line 98 [12:02]
freeone3000 Sheilong: You want to have one Runnable around lines 136-137, and another around line 139. As in, the bits you actually want to run that modify the UI. These should be executed on the same thread as the rest of the UI. [12:02]
Sheilong The exercise purposed was to simulate a traffic crossing [12:02]
freeone3000 simulate which part? [12:03]
cheeser the crashes! :D [12:03]
mitch0 [mitch0!] has joined ##java [12:03]
Sheilong Four semafores working together whereas one wait each other [12:04]
freeone3000 so, fun note. actual traffic lights run single-threaded on a dedicated controller which outputs the state of all lights. [12:04]
Crash1hd surial, This is a better example of what I am trying to resolve any know how to resolve this? Instead of just using print? Seeing as android suggest to use Log but once you do all test fail [12:04]
cheeser i once programmed one on a SLC-*mumblemumble* [12:05]
Regon [Regon!~Regon@unaffiliated/regon] has joined ##java [12:05]
cheeser doesn't work [12:05]
cheeser cheeser, 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) [12:05]
fstd [fstd!~fstd@unaffiliated/fisted] has joined ##java [12:06]
freeone3000 Sheilong: I only see one CountDownLatch? [12:06]
freeone3000 I'm not really seeing the simulation. Or what this is supposed to do. Anyway, the above fix will cause the JavaFX code to run on the JavaFX thread, and hopefully clarifies exactly what Platform.runLater() does. [12:07]
Sheilong freeone3000: I add the PlatformRunlater to those line, but didtn't fix yet . [12:09]
mitch0 [mitch0!] has joined ##java [12:10]
surial Crash1hd: why would your test fail when you add that? [12:10]
Crash1hd surial, it gives me this java.lang.RuntimeException: Method v in android.util.Log not mocked. See for details. [12:10]
Crash1hd Crash1hd's title: "Unit testing support - Android Studio Project Site" [12:10]
cheeser yeah, this is an #android-dev question [12:11]
surial indeed. [12:11]
Crash1hd I know it is but I figured that someone out there might know I did ask in android-dev alas nothing yet [12:11]
Crash1hd I am actually really surprised there is not a TDD channel :( [12:12]
beStKodErEveR [beStKodErEveR!] has joined ##java [12:12]
cheeser if you know it is, then start by asking in the right channel instead of wasting everyone's time. [12:12]
Crash1hd cheeser, I did, no one there seems to know [12:13]
Crash1hd Or at least are not responding [12:13]
Anthaas [Anthaas!~Anthaas@unaffiliated/anthaas] has joined ##java [12:13]
Crash1hd I am also asking on SO cause I know that this cant be that difficult of a question lol [12:13]
Crash1hd I am actually very surprised it has not been covered before on SO [12:14]
cheeser that doesn't make it on topic here, though. [12:14]
bobek [bobek!~bobek@unaffiliated/bobek] has joined ##java [12:14]
mitch0 [mitch0!] has joined ##java [12:15]
Crash1hd cheeser, fair enough (just feel like I'm at an absolute loss) and again very surprised [12:15]
mitch0 [mitch0!] has joined ##java [12:22]
kicked mitch0 (Banned: please fix your connection. you're bouncing in and out. this ban will expire after 4h) [12:22]
Sheilong freeone3000: Before attemp to do what I wanted I was trying to update that value. With Platform.invokelater it seems to update the value "outside" the UI, but the that while [12:26]
Sheilong but the screen still freezes [12:26]
progart [progart!~kamee@] has joined ##java [12:30]
Sheilong My attemp [12:30]
DTZUZO_ [DTZUZO_!] has joined ##java [12:32]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [12:34]
freeone3000 Sheilong: That 404s. [12:35]
Sheilong [12:35]
junktext__ [junktext__!~junktext@fsf/member/junktext] has joined ##java [12:36]
Sheilong sorry [12:36]
Sheilong This one [12:36]
freeone3000 Sheilong: Okay. Do you see that while loop? [12:36]
freeone3000 Sheilong: That while loop blocks. [12:36]
freeone3000 Sheilong: What do you not want to do on the UI thread? [12:36]
freeone3000 Sheilong: Right. You don't want to block. So which line actually does need to get executed on the UI thread? It's not the entire loop, it's one line out of that snippet. [12:37]
Sheilong freeone3000: freeone3000 The loop one. [12:38]
freeone3000 Sheilong: No. That is incorrect. Which singular line out of that snippet makes a change to a UI element? [12:38]
Sheilong freeone3000: The line with set style [12:38]
freeone3000 Sheilong: Right. THAT line needs to be passed to Platform.runLater(). [12:39]
freeone3000 Sheilong: The rest of the loop should not be. Line 11 must NOT be. [12:39]
Sheilong freeone3000: The change happens as expected, but the loop freezes the screen. [12:40]
freeone3000 Sheilong: What does your code look like now? [12:41]
Sheilong Just a sec, now my laptop decided to freeze [12:43]
Sheilong freeone3000: [12:44]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [12:45]
freeone3000 Sheilong: Okay, that's correct handling of Platform.runLater(). Now let's go to your usage of Task. [12:46]
freeone3000 Sheilong: Tasks are *not* general purpose. JavaFX has one, singular, background thread on which all Tasks are run. This is not what you want. [12:47]
freeone3000 Sheilong: Unbind from FXML, do not extend Task, and submit this job to an ExecutorService as you would any other. [12:47]
freeone3000 Also: Platform.runLater() invokes the task *on the ui thread*. It's part of the event loop for the UI thread - listen for mouse, listen for keyboard, refresh screen, check to see if there's anything posted there, sleep a bit, repeat. [12:48]
Sheilong freeone3000: I passed it to a Thread instance [12:48]
freeone3000 Sheilong: Is it a Task still? [12:48]
Sheilong no [12:48]
freeone3000 Sheilong: What does your code look like now? [12:48]
Karyon [Karyon!~karyon@unaffiliated/karyon] has joined ##java [12:51]
royal_screwup21 [royal_screwup21!89de72f5@gateway/web/cgi-irc/] has joined ##java [12:51]
Sheilong The task is in a class. I retrieve it by a getter and feed an instance of thread with it [12:52]
Sheilong Then I call the start method from thread [12:53]
Sheilong In the controller class [12:53]
freeone3000 Sheilong: I'm asking you to show me your code. [12:53]
freeone3000 Also, you're referring to it as a "task" still, which I hope is not a Task. [12:54]
lithium [lithium!~lithium@unaffiliated/lithium] has joined ##java [12:55]
royal_screwup21 [royal_screwup21!89de72f5@gateway/web/cgi-irc/] has joined ##java [12:57]
SolarFlare [SolarFlare!~SamanthaB@unaffiliated/samanthabdawn] has joined ##java [12:57]
bnyio [bnyio!] has joined ##java [01:02]
bravoslo [bravoslo!] has joined ##java [01:03]
Tobbi [Tobbi!~Tobbi@supertux/tobbi] has joined ##java [01:03]
Sheilong freeone3000: [01:04]
wildlander [wildlander!~wildlande@unaffiliated/wildlander] has joined ##java [01:04]
mayonnaise [mayonnaise!~bob@unaffiliated/viktorgordo] has joined ##java [01:05]
freeone3000 Sheilong: What did I say about Task? [01:07]
Sheilong That the task should run on the UI thread. [01:15]
freeone3000 [01:19]
jcob [jcob!~jcob@] has joined ##java [01:23]
Sheilong freeone3000: "Tasks are *not* general purpose. JavaFX has one, singular, background thread on which all Tasks are run. This is not what you want." [01:23]
freeone3000 Right. Okay. The associated advice for that is to not use Task as a general-purpose Runnable, and instead, to use something that is general-purpose, like Runnable. [01:23]
freeone3000 You're still using Task, which explains the weirdness, especially since you're calling (via Thread.start()) which Task's documentation says specifically not to do. [01:24]
tassee [tassee!] has joined ##java [01:24]
Sheilong freeone3000: Waht documentation you mean? says otherwise so [01:26]
freeone3000 Sheilong: Do you get this problem if you don't use Task? [01:29]
Sheilong Yes. I'vve already tried other approaches [01:32]
paddyez [paddyez!~paddyez@wikipedia/paddyez] has joined ##java [01:32]
DLSteve [DLSteve!~DLSteve@] has joined ##java [01:38]
Sheilong freeone3000: What should I do instead? [01:38]
gelignite [gelignite!] has joined ##java [01:40]
conan [conan!~conan@] has joined ##java [01:41]
lithium__ [lithium__!~lithium@unaffiliated/lithium] has joined ##java [01:43]
wilbert [wilbert!~wilbert@unaffiliated/wilbert] has joined ##java [01:49]
lumm_ [lumm_!~lumm@2a01:e35:2f0f:b480:1233:2a3b:100:9b4e] has joined ##java [01:50]
Sheilong freeone3000: The thread runs fine now, but the background of pane just change once, I cannot set another value to it [01:50]
lumm_ [lumm_!] has joined ##java [01:54]
Sheilong The second Platform.runlater is not being executed [01:54]
freeone3000 Sheilong: If you pause it in a debugger, how many active threads do you have? [01:55]
Sheilong No very much [01:55]
Sheilong I was doing a mistake, the thread was working a long time ago, I am just too stupid to have figured this out [01:56]
Sheilong Thanks so much for helping a such noob that long. I will work on the simulation now. [01:56]
lumm [lumm!] has joined ##java [01:58]
rager when you apply observeOn as well as share on an Observable, which one should go first? [02:00]
orbyt_ [orbyt_!~orbyt@] has joined ##java [02:01]
yawkat probably unspecified [02:01]
Psybur [Psybur!~Psybur@unaffiliated/psybur] has joined ##java [02:02]
Sasazuka [Sasazuka!~Sasazuka@unaffiliated/sasazuka] has joined ##java [02:02]
jcob [jcob!~jcob@] has joined ##java [02:12]
Unlimiter [Unlimiter!uid281704@gateway/web/] has joined ##java [02:18]
Markow [Markow!~ejm@] has joined ##java [02:20]
mona_x [mona_x!] has joined ##java [02:29]
Rapture [Rapture!~textual@2601:1c2:5102:6d00:a50b:ecd6:cad8:a1c7] has joined ##java [02:32]
orbyt_ [orbyt_!~orbyt@] has joined ##java [02:42]
lumm_ [lumm_!] has joined ##java [02:42]
srisri [srisri!~srisri@] has joined ##java [02:46]
bobek [bobek!~bobek@unaffiliated/bobek] has joined ##java [02:48]
nunllk [nunllk!edium@gateway/shell/suchznc/x-tynuikrltvcvqiyz] has joined ##java [02:49]
jcob [jcob!~jcob@] has joined ##java [02:53]
t2mkn [t2mkn!~t2mkn@] has joined ##java [02:55]
wilbert [wilbert!~wilbert@unaffiliated/wilbert] has joined ##java [02:55]
immibis [immibis!] has joined ##java [02:57]
Sheilong freeone3000: I only need to use task whether I am going to change something in UI thread, otherwise I could implement a runnable and pass it to Executor/Thread class as the usual way ?: [02:58]
freeone3000 Sheilong: You don't even need a task then. Platform.runLater() executes whatever you give it on the UI thread. [02:59]
Sheilong freeone3000: I kinda wrote another class with Task lol to run the four semaphores' threads [02:59]
AndreYuhai [AndreYuhai!~porfavord@] has joined ##java [03:01]
lumm [lumm!] has joined ##java [03:03]
wyvern I'm testing the waters of modularizing a project to prepare for JDK 12 being more picky, and I'm confused by the behavior of automatic modules. I have a project that depends on jooq, and in the codegen'd stuff it uses org.jooq types like org.jooq.Field. I have `requires org.jooq;` in the module descriptor. However, I get: `package org.jooq is declared in module org.jooq, which is not in the module graph`. What am I missing... [03:04]
wyvern If adding the `requires org.jooq` to isn't adding it to the module graph, then what is? [03:05]
Sheilong freeone3000: almost working [03:05]
rs [rs!~rs@unaffiliated/borsin] has joined ##java [03:06]
Gazooo [Gazooo!~Gazooo@] has joined ##java [03:07]
Viciouss [Viciouss!~viciouss@unaffiliated/viciouss] has joined ##java [03:07]
lucidian [lucidian!~lucidian@unaffiliated/lucidian] has joined ##java [03:11]
wilbert_ [wilbert_!~wilbert@unaffiliated/wilbert] has joined ##java [03:18]
t2mkn [t2mkn!~t2mkn@] has joined ##java [03:24]
whoever [whoever!~trevor@unaffiliated/whoever] has joined ##java [03:25]
conan [conan!] has joined ##java [03:28]
ogradyd [ogradyd!~Thunderbi@2a02:8070:88bf:9df0::bae] has joined ##java [03:42]
HZun [HZun!] has joined ##java [03:52]
Jantz [Jantz!~IceChat9@2407:7000:8d04:100:41d0:cfd9:fdcf:34e3] has joined ##java [03:53]
HZun [HZun!] has joined ##java [03:54]
orbyt_ [orbyt_!~orbyt@] has joined ##java [03:58]
X230t [X230t!x13@gateway/shell/suchznc/x-xubxfptrrtupmewb] has joined ##java [04:00]
HZun [HZun!] has joined ##java [04:01]
wtflux [wtflux!] has joined ##java [04:05]
HZun [HZun!] has joined ##java [04:05]
Sheilong freeone3000: Finally I managed it to work [04:05]
kicked HZun (Banned: please fix your connection. you're bouncing in and out. this ban will expire after 2h) [04:06]
Sheilong freeone3000: Conclusion, I am a completely noob [04:06]
Addax well, you'd been saying that, so no big deal [04:09]
Sheilong I was having trouble with the logic as well. I managed to make the four semaphores work together by setting a flag which tells me which one has finished its task to resume the next one, [04:10]
kgrimes2 [kgrimes2!] has joined ##java [04:12]
noodlepie [noodlepie!] has joined ##java [04:18]
cheeser aka, state machine [04:20]
Sheilong Yes. So they are making transitions between states : ) I used ifs, but could've used while loops that wait the stastes change [04:23]
wilbert_ [wilbert_!~wilbert@unaffiliated/wilbert] has joined ##java [04:30]
lumm [lumm!~lumm@2a01:e35:2f0f:b480:1233:2a3b:100:9b4e] has joined ##java [04:48]
Boltermor [Boltermor!] has joined ##java [05:06]
esro [esro!] has joined ##java [05:07]
erg0s1 [erg0s1!~erg0s1@] has joined ##java [05:13]
jcob [jcob!~jcob@] has joined ##java [05:15]
SupaHam Is there a java data structure that is queue but intended to be cleared entirely and retrieved in the form of a Collection/array [05:17]
cheeser what? [05:17]
waz haha, I was thinking the same thing [05:18]
SupaHam ive got an event tracking system on game world events and I wanted to minimise overhead entirely, was hoping java would do the heavy lifting for me [05:19]
SupaHam Every so often I push to db, but I don't have an idea of how big the queue will get and the impact it would have on the runtime performance [05:20]
Chaterz [Chaterz!~Ritual@unaffiliated/chaterz] has joined ##java [05:20]
cheeser and? [05:20]
svm_invictvs [svm_invictvs!~svm_invic@unaffiliated/svminvictvs/x-938456] has joined ##java [05:21]
oakridge [oakridge!] has joined ##java [05:22]
waz faptimisation [05:23]
waz waz, faptimization is the process of optimizing code without measuring for performance problems first [05:23]
SupaHam nah, i just dont have the time to worry about it when shit hits the fan [05:24]
waz so you're just guessing you know where the problem will be [05:24]
waz generally you're wrong when you do that [05:24]
SupaHam I think i misunderstood what I wanted, I'll be using a linkedlist, and where i thought I needed to copy, I'll just create a new linkedlist every time i push to db [05:24]
Remavas [Remavas!~Remavas@unaffiliated/remavas] has joined ##java [05:25]
SupaHam Well, what I know is that there will be a lot of elements floating about, but it can vary as player activities increase [05:25]
cheeser gross [05:26]
cheeser don't used LinkedList [05:26]
SupaHam Why not? [05:26]
cheeser linkedlist [05:26]
cheeser LinkedList in Java is almost always slower than ArrayList and ArrayDeque; prefer those to LinkedList (ArrayDeque has O(1) for insert-at-beginning and is otherwise better in nearly every way, for example.) See - even its creator doesn't use it [05:26]
orbyt_ [orbyt_!~orbyt@] has joined ##java [05:27]
SupaHam I care more about write performance, although I would like to have faster read speeds, I want the write performance as I wish to keep game response times as high as possible [05:28]
SupaHam tbf the reading part (transforming into PreparedStatement) is done on an async thread, so hopefully it's not too bad [05:29]
cheeser LL is not going to give you any measurable benefits [05:29]
SupaHam Than arrays having to resize? [05:29]
cheeser yes [05:29]
SupaHam uh huh [05:30]
lumm [lumm!~lumm@2a01:e35:2f0f:b480:1233:2a3b:100:9b4e] has joined ##java [05:32]
jcob [jcob!~jcob@] has joined ##java [05:35]
sangy [sangy!~sangy@archlinux/trusteduser/sangy] has joined ##java [05:36]
waz next [05:40]
waz Another satisfied customer. Next! [05:40]
[twisti] SupaHam: arrays resizing is incredibly, incredibly cheap on modern hardware. the garbage overhead from LL is a lot less optimizable. if you are programming the next word or calculator, you might get away with it, but for game development, LL is pretty much the worst data structure imaginable [05:43]
conan [conan!] has joined ##java [05:43]
[twisti] though if in doubt, benchmark [05:43]
cheeser or, for the lazy, just do as I say. :D [05:45]
waz lazy and smart [05:45]
royal_screwup21 [royal_screwup21!3309aae6@gateway/web/cgi-irc/] has joined ##java [05:45]
badSophia [badSophia!~moretz@] has joined ##java [05:47]
Remavas [Remavas!~Remavas@unaffiliated/remavas] has joined ##java [05:51]
lumm [lumm!] has joined ##java [05:53]
orbyt_ [orbyt_!~orbyt@] has joined ##java [05:58]
hussam [hussam!uid193284@gateway/web/] has joined ##java [06:10]
Me4502 [Me4502!~Me4502@unaffiliated/me4502] has joined ##java [06:10]
Hanii [Hanii!~Hanii@2a00:23c5:c587:a800:ccf4:d55c:c4ed:d5c9] has joined ##java [06:10]
wreed [wreed!~wreed@] has joined ##java [06:12]
KukOrkan [KukOrkan!] has joined ##java [06:13]
bsinger [bsinger!~user@2604:6000:7a81:f00:8d52:4f:d384:614e] has joined ##java [06:25]
bsinger parted the channel: "ERC (IRC client for Emacs 25.3.1)" [06:30]
grim001 [grim001!] has joined ##java [06:43]
grim002 [grim002!] has joined ##java [06:45]
yokel [yokel!~yokel@unaffiliated/contempt] has joined ##java [07:04]
orbyt_ [orbyt_!~orbyt@] has joined ##java [07:13]
Sheilong [Sheilong!uid293653@gateway/web/] has joined ##java [07:13]
CAPITANOOO [CAPITANOOO!~CAPITANOO@] has joined ##java [07:13]
surial holy shit. [07:14]
surial there's this 'codota' thing that tries to give you smart auto-complete, presumably based on popular choices. [07:15]
surial [07:15]
surial nevermind that eclipse already ships with this, and nevermind that this feels like a massive fuckign security leak waiting to happen: Watch the opening video. It shows how the tool helpfully suggests Class.forName("com.mysql.jdbc.Driver"). [07:15]
surial facepalms [07:15]
surial I am flabbergasted by how masterfully codota themselves eloquently argue quite definitively how stupid their tool is in their own intro movie in a mere 10 seconds. Kudos. [07:15]
Remavas [Remavas!~Remavas@unaffiliated/remavas] has joined ##java [07:21]
paddyez [paddyez!~paddyez@wikipedia/paddyez] has joined ##java [07:29]
w1d3m0d3 [w1d3m0d3!~w1d3@gateway/tor-sasl/w1d3m0d3] has joined ##java [07:30]
Voob_Sant [Voob_Sant!] has joined ##java [07:36]
Crash1hd [Crash1hd!~Crash1hd@unaffiliated/crash1hd] has joined ##java [07:45]
katiex7 [katiex7!] has joined ##java [07:45]
javango [javango!~javango@] has joined ##java [07:53]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [07:54]
grim001 [grim001!] has joined ##java [07:54]
AcTiVaTe [AcTiVaTe!] has joined ##java [08:02]
Jantz [Jantz!] has joined ##java [08:06]
orbyt_ [orbyt_!~orbyt@] has joined ##java [08:12]
conan [conan!] has joined ##java [08:15]
upgrdman [upgrdman!~upgrdman@blender/artist/upgrdman] has joined ##java [08:16]
wreed [wreed!~wreed@] has joined ##java [08:20]
Crash1hd [Crash1hd!~Crash1hd@unaffiliated/crash1hd] has joined ##java [08:21]
Crash1hd [Crash1hd!~Crash1hd@unaffiliated/crash1hd] has joined ##java [08:23]
yohnnyjoe [yohnnyjoe!] has joined ##java [08:33]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [08:46]
orbyt_ [orbyt_!~orbyt@] has joined ##java [08:48]
AMcBain [AMcBain!] has joined ##java [08:56]
jadesoturi [jadesoturi!~jadesotur@unaffiliated/kfj] has joined ##java [09:08]
rwheadon [rwheadon!~rwheadon@] has joined ##java [09:15]
conan [conan!] has joined ##java [09:17]
Crash1hd [Crash1hd!~Crash1hd@unaffiliated/crash1hd] has joined ##java [09:41]
Crash1hd [Crash1hd!~Crash1hd@unaffiliated/crash1hd] has joined ##java [09:46]
Remavas [Remavas!~Remavas@unaffiliated/remavas] has joined ##java [10:00]
xlegoman [xlegoman!~xlegoman@2605:a601:9d8:2f00:acf:5b20:1b03:6e24] has joined ##java [10:04]
rwheadon [rwheadon!~rwheadon@] has joined ##java [10:06]
orbyt_ [orbyt_!~orbyt@] has joined ##java [10:16]
srisri [srisri!] has joined ##java [10:19]
magyar [magyar!~magyar@unaffiliated/magyar] has joined ##java [10:23]
srisri [srisri!~srisri@] has joined ##java [10:24]
badSophia [badSophia!~moretz@] has joined ##java [10:28]
Raku [Raku!raku@2601:2c7:4300:1b00:230:48ff:fe32:d99f] has joined ##java [10:29]
druonysus [druonysus!~quassel@unaffiliated/druonysus] has joined ##java [10:34]
tassee [tassee!] has joined ##java [10:38]
conan [conan!] has joined ##java [10:41]
Danilochka [Danilochka!cc537a1b@gateway/web/freenode/ip.] has joined ##java [10:46]
Danilochka Hello, I am having trouble understanding this Java exploit. I don't really get exactly how the payload is deployed. They say they have code examples at the bottom but I don't know what to do with those hashes/keys. [10:47]
Danilochka Danilochka's title: "Exploit:Java/CVE-2010-0840 threat description -Windows Defender Security Intelligence" [10:47]
Raku [Raku!raku@2601:2c7:4300:1b00:230:48ff:fe32:d99f] has joined ##java [10:53]
cheeser should talk to microsoft. not really a topic for this channel. [10:54]
cheeser it's an applet exploit. applets are dead. [10:54]
t2mkn [t2mkn!~t2mkn@] has joined ##java [10:56]
Danilochka It's a general Java exploit. The issue can be generalized. It was just discovered in an applet and targetted towards one. [10:56]
cheeser ok. [11:01]
cheeser i know all that. it doesn't change anything for *here*. [11:01]