Info

Login

Channels

APIs

Credits

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

« 2019-03-25

2019-03-26

2019-03-27 »

Nick Message Date
tassee [tassee!~tasse@55d4566e.access.ecotel.net] has joined ##java [12:00]
ExtraCrispy [ExtraCrispy!~ExtraCris@gateway/tor-sasl/extracrispy] has joined ##java [12:02]
rockyraccoonn [rockyraccoonn!rockyracco@pool-74-98-214-203.pitbpa.fios.verizon.net] has joined ##java [12:09]
VegetarianFalcon [VegetarianFalcon!uid258908@gateway/web/irccloud.com/x-xoujidqifegfrqfy] has joined ##java [12:17]
acidjnk [acidjnk!~acid@i577BCA8C.versanet.de] has joined ##java [12:25]
Nightwing52 [Nightwing52!~Thunderbi@71-221-224-186.dvnp.qwest.net] has joined ##java [12:26]
Crash1hd [Crash1hd!~Crash1hd@unaffiliated/crash1hd] has joined ##java [12:32]
immibis [immibis!~immibis@125.238.72.168] has joined ##java [12:33]
rruizt [rruizt!~rruizt@83-84-23-124.cable.dynamic.v4.ziggo.nl] has joined ##java [12:37]
NorthwestVegan [NorthwestVegan!~Northwest@gateway/tor-sasl/northwestvegan] has joined ##java [12:39]
kgrimes2 [kgrimes2!~kgrimes2@172-11-18-93.lightspeed.irvnca.sbcglobal.net] has joined ##java [12:42]
dendazen [dendazen!~dendazen@pool-72-76-93-243.nwrknj.fios.verizon.net] has joined ##java [01:01]
Anthaas [Anthaas!~Anthaas@unaffiliated/anthaas] has joined ##java [01:16]
AMcBain [AMcBain!~Art@047-006-242-094.res.spectrum.com] has joined ##java [01:23]
Comstock_ [Comstock_!Comstock@gateway/vpn/privateinternetaccess/comstock] has joined ##java [01:34]
rajrajraj [rajrajraj!uid72176@gateway/web/irccloud.com/x-sykfufwumzxlzvlr] has joined ##java [01:34]
Comstock_ [Comstock_!Comstock@gateway/vpn/privateinternetaccess/comstock] has joined ##java [01:35]
g00s_ [g00s_!~g00s@unaffiliated/g00s] has joined ##java [01:37]
t2mkn [t2mkn!~t2mkn@43.226.2.118] has joined ##java [01:41]
Crash1hd [Crash1hd!~Crash1hd@unaffiliated/crash1hd] has joined ##java [01:43]
palasso [palasso!~palasso@unaffiliated/palasso] has joined ##java [01:52]
forgottenone [forgottenone!~forgotten@176.88.97.248] has joined ##java [01:58]
Galactus [Galactus!~Galactus@unaffiliated/galactus] has joined ##java [02:00]
sauvin [sauvin!sauvin@about/linux/staff/sauvin] has joined ##java [02:00]
yaoxu [yaoxu!~yaoxu@106.39.42.115] has joined ##java [02:02]
omonk [omonk!~omonk@unaffiliated/omonk] has joined ##java [02:02]
yaoxu [yaoxu!~yaoxu@106.39.42.115] has joined ##java [02:03]
con3 [con3!~kvirc@ml.sun.ac.za] has joined ##java [02:13]
Chuguniy [Chuguniy!~Chuguniy@80.232.218.96] has joined ##java [02:25]
yaoxu [yaoxu!~yaoxu@106.39.42.115] has joined ##java [02:49]
t2mkn [t2mkn!~t2mkn@43.226.2.118] has joined ##java [02:49]
untrck_ [untrck_!uid353408@gateway/web/irccloud.com/x-iqfzgbprgioqqmar] has joined ##java [02:53]
OnceMe [OnceMe!~OnceMe@unaffiliated/onceme] has joined ##java [02:55]
yaoxu [yaoxu!~yaoxu@106.39.42.115] has joined ##java [02:59]
esro [esro!~esro@user119-167.otvarta.com.pl] has joined ##java [03:04]
Nightwing53 [Nightwing53!~Thunderbi@2600:100c:b21b:f2a4:5dcd:2c8d:6fb:6bfb] has joined ##java [03:05]
yuriescl [yuriescl!~yuriescl@unaffiliated/yuriescl] has joined ##java [03:08]
yaoxu [yaoxu!~yaoxu@106.39.42.115] has joined ##java [03:09]
yaoxu [yaoxu!~yaoxu@106.39.42.115] has joined ##java [03:10]
yaoxu [yaoxu!~yaoxu@106.39.42.115] has joined ##java [03:16]
deavmiLaptop [deavmiLaptop!~deavmi@165.0.49.2] has joined ##java [03:28]
puppy_za [puppy_za!uid277586@gateway/web/irccloud.com/x-laigioltxlsdhjqx] has joined ##java [03:34]
[A]Li [[A]Li!ca7d88c2@gateway/web/freenode/ip.202.125.136.194] has joined ##java [03:41]
[A]Li Hello there, i need an urgent help on 1 of my applications java is throwing some exception message Dump Event "systhrow" (00040000) Detail "java/lang/OutOfMemoryError" received in javacore [03:42]
yaoxu [yaoxu!~yaoxu@106.39.42.115] has joined ##java [03:43]
Matthijs [Matthijs!~quassel@unaffiliated/matthijs] has joined ##java [03:43]
[A]Li i have check through javacore logs Bytes of Heap Space Free: 55E36F0 is available, so it means it is native memory errors [03:43]
yaoxu [yaoxu!~yaoxu@106.39.42.115] has joined ##java [03:44]
[A]Li when i am going to jvm settings my initial and maximum heap size is set to 4096, i have 64 bit machine with 64 os [03:44]
bnyio [bnyio!~bnyio@alcatraz.open-xchange.com] has joined ##java [03:45]
[A]Li can anybody help me out on this and suggest what should be initial and maximum heap size to be set in JVM settings [03:45]
yaoxu [yaoxu!~yaoxu@106.39.42.115] has joined ##java [03:47]
yaoxu [yaoxu!~yaoxu@106.39.42.115] has joined ##java [03:48]
yaoxu [yaoxu!~yaoxu@106.39.42.115] has joined ##java [03:50]
progart [progart!~kamee@host-31-7-162-99.customers.adc.am] has joined ##java [03:51]
yaoxu [yaoxu!~yaoxu@106.39.42.115] has joined ##java [03:52]
yaoxu [yaoxu!~yaoxu@106.39.42.115] has joined ##java [03:55]
yaoxu [yaoxu!~yaoxu@106.39.42.115] has joined ##java [03:58]
OnceMe [OnceMe!~OnceMe@unaffiliated/onceme] has joined ##java [03:59]
yaoxu [yaoxu!~yaoxu@106.39.42.115] has joined ##java [04:00]
yaoxu [yaoxu!~yaoxu@106.39.42.115] has joined ##java [04:03]
progart [progart!~kamee@host-31-7-162-99.customers.adc.am] has joined ##java [04:04]
ravenousmoose [ravenousmoose!~ravenousm@194.78.35.195] has joined ##java [04:04]
yaoxu [yaoxu!~yaoxu@106.39.42.115] has joined ##java [04:06]
Maldivia are you sure it's heap mem it's out of? [04:21]
Maldivia from the above, you're using IBM or OpenJ9? [04:22]
Maldivia ohh, he's gone again [04:23]
deavmiLaptop [deavmiLaptop!~deavmi@165.0.49.2] has joined ##java [04:28]
_xor [_xor!~xor@50.216.161.66.ded-dsl.fuse.net] has joined ##java [04:32]
nebulae [nebulae!~nebulae@2a02:587:a3b:c000:9c0b:d7a4:6b94:9c48] has joined ##java [04:42]
kernel-sanders is using streams / lamba used a lot in production code good or is it frowned upon? [04:49]
yawkat depends on who you ask [04:52]
yawkat but it's probably fine [04:53]
deebo and what the application does [04:53]
deebo our rest api (jersey) stuff is full of streams, optionals etc, they're so easy to work with in this context [04:54]
deavmiLaptop [deavmiLaptop!~deavmi@165.0.49.2] has joined ##java [04:57]
djhworld [djhworld!~djhworld@90.252.109.98] has joined ##java [04:58]
Anthaas_ [Anthaas_!~Anthaas@unaffiliated/anthaas] has joined ##java [04:58]
magz [magz!~magz@68-168-184-223.fttp.usinternet.com] has joined ##java [05:02]
tomaszklosinski [tomaszklosinski!~tomasz@85.195.197.168] has joined ##java [05:05]
Gazooo [Gazooo!~Gazooo@142.196.183.136] has joined ##java [05:07]
DotHack [DotHack!~lars@static-40-206-112-80.thenetworkfactory.nl] has joined ##java [05:11]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [05:15]
t2mkn [t2mkn!~t2mkn@43.226.2.118] has joined ##java [05:21]
acidjnk hello [05:22]
acidjnk Really unhappy with embedded payara 4 / 5 and glassfish 4 / 5. Is there any application server or EJB container that has a good, reliable embedded variant? [05:22]
VegetarianFalcon [VegetarianFalcon!uid258908@gateway/web/irccloud.com/x-glnqtmuimwccswfl] has joined ##java [05:29]
beStKodErEveR [beStKodErEveR!~dannyD@static-24-21-26-46.ipcom.comunitel.net] has joined ##java [05:32]
Anthaas [Anthaas!~Anthaas@unaffiliated/anthaas] has joined ##java [05:33]
Maldivia acidjnk: well, what do you want from it? [05:35]
Maldivia undertow [05:35]
Maldivia Maldivia, undertow is a web server written in java with a nice API for bootstrapping an embedded HTTP server into your application. Even offers non-blocking handlers if you really want to go there. http://undertow.io/. alternatives: ~jetty, ~tomcat. Make sure to download via maven because the site is not HTTPS: https://mvnrepository.com/artifact/io.undertow [05:35]
Maldivia thorntail [05:37]
Maldivia Maldivia, what does that even *mean*? [05:37]
sa02irc [sa02irc!~sa02irc@155-079-043-212.ip-addr.inexio.net] has joined ##java [05:39]
Maldivia thorntail is <reply>Thorntail is a MicroProfile and Java EE compatible packaging for creating web application to run with "java -jar", based on WildFly. [05:40]
Maldivia OK, Maldivia. [05:40]
tuskkk____ [tuskkk____!uid18470@gateway/web/irccloud.com/x-awcrircxgovrbfzn] has joined ##java [05:42]
Maldivia no, thorntail is <reply>Thorntail is a MicroProfile and Java EE compatible packaging for creating web application to run with "java -jar", based on WildFly. For more information see https://thorntail.io/ [05:43]
Maldivia OK, Maldivia. [05:43]
deebo is there still a reason to do new development on the EE stack? [05:46]
Maldivia yws [05:47]
Maldivia yes* [05:47]
Maldivia many of the specs there are still really good -- doesn't mean you need to use all of them :D [05:47]
acidjnk thanks Maldivia [05:48]
acidjnk It is about an application that in production is supposed to run on GF 5 (still trying to fight this, there is hope ...), but the integration tests with JUnit are really unstable due to bugs in the embedded EJB container as well as the embedded full application server. [05:49]
t2mkn [t2mkn!~t2mkn@43.226.2.118] has joined ##java [05:50]
acidjnk So I need to be able to deploy the ears or alternatively only ejb-jars in the embedded container, hopefully without too many adjustments (datasource only?) for using a different container in test. [05:50]
acidjnk Good tip using mvn for download - I'm surprised how common it is to just download libraries and tools via HTTP and then using them in a highly confidential project, e. g. even in public service. [05:53]
sonOfRa Some services require signatures for uploads to maven [05:54]
sonOfRa Which you can also acquire when downloading and verifying [05:54]
acidjnk That one time there was a coworker who wanted to validate some production XML data from a real citizen. He uploaded it to the w3c validator. [05:55]
sonOfRa The problem that will then happen is that you probably won't find the keys, because it is generally only verified *that* it is signed, not with which key. [05:55]
adder [adder!~adder@gateway/tor-sasl/adder] has joined ##java [05:58]
sunri5e [sunri5e!~sunri5e@unaffiliated/sunri5e] has joined ##java [06:05]
Matthijs The latest version of Bcrypt on mvncentral is 0.3 (from 2012), while 0.4 is out already. How should I best use BCrypt? Incorporate the source code in our own, or..? [06:12]
deebo id use something above bcrypt (if for passwords), just so i wouldn't have to deal with it at all [06:14]
OnceMe if I have some text, like testing blabla etc \n blabla2, how can I get a whole string only until the new line? [06:14]
Matthijs "something above bcrypt"? [06:15]
Matthijs Note that every password hashing factoid tells me to use bcrypt because it's the best. [06:15]
deebo i meant on abstraction level so i wouldnt directly use bcrypt for anything [06:15]
deebo just tell some higher level library to use bcrypt [06:15]
deebo e.g. spring security [06:16]
avemi [avemi!ave@gateway/vpn/privateinternetaccess/avemilia] has joined ##java [06:19]
earthy Matthijs: well, you could consider scrypt... [06:19]
Addax earthy: and use javascrypt? NEVER! [06:20]
esro [esro!~esro@user119-167.otvarta.com.pl] has joined ##java [06:27]
beStKodErEveR [beStKodErEveR!~dannyD@c-5eea2c4f-74736162.cust.telenor.se] has joined ##java [06:28]
con3 [con3!~kvirc@ml.sun.ac.za] has joined ##java [06:31]
themsay [themsay!~themsay@149.254.235.3] has joined ##java [06:36]
Maldivia OnceMe: "whole string only until the new line" -- you want to break the string up in lines, or ? [06:45]
sonOfRa Matthijs: At this point, I would strongly recommend argon2 over bcrypt [06:46]
Maldivia Matthijs: I think scrypt or argon2 [06:46]
sonOfRa This is the binding I use for argon2: https://github.com/phxql/argon2-jvm. It comes in 2 flavors, one with bundled native libs, one without (which requires argon2 being installed on your system) [06:49]
Maldivia Matthijs: for a nice SO post about argon2: https://security.stackexchange.com/a/197550 [06:50]
Maldivia Maldivia's title: "In 2018, what is the recommended hash to store passwords: bcrypt, scrypt, Argon2? - Information Security Stack Exchange" [06:50]
Hanii [Hanii!~Hanii@2a00:23c5:c587:a800:95c1:226a:335f:21e] has joined ##java [06:50]
progart [progart!~kamee@host-31-7-162-99.customers.adc.am] has joined ##java [06:54]
Matthijs Thanks, I'll have a look [06:56]
avemi [avemi!~ave@82.142.93.34] has joined ##java [07:06]
Raging_Hog [Raging_Hog!~heikki@82-181-38-176.bb.dnainternet.fi] has joined ##java [07:09]
conan [conan!~conan@mdproctor.plus.com] has joined ##java [07:14]
ztychr [ztychr!~ztychr@unaffiliated/ztychr] has joined ##java [07:14]
avemi [avemi!ave@gateway/vpn/privateinternetaccess/avemilia] has joined ##java [07:15]
stryek [stryek!uid332574@gateway/web/irccloud.com/x-mfkavcxhuaywqtug] has joined ##java [07:34]
beefjoe [beefjoe!~beefjoe@unaffiliated/beefjoe] has joined ##java [07:42]
KnownSyntax [KnownSyntax!sid233169@gateway/web/irccloud.com/x-ifxeiereevsyjgow] has joined ##java [07:46]
surial Matthijs: I always just copy/paste the bcrypt class. [07:51]
surial If 'native libs' are necessary I'd.. be vvery fucking hesitant. [07:52]
surial OnceMe: take the input source. Throw it at a 'scanner' constructor. Set the scanner to .useDelimiter("\n"). Call .next(). [07:53]
yawkat elytron has bcrypt support [07:54]
surial I have yet to read any security missive on these algorithms (bcrypt, scrypt, etc) that are written from a sane security standpoint (as in, an understanding that in the real world it's a mix of running faster than your friend when being chased by a crocodile, and a tradeoff between cost and security gained), where bcrypt is in any way or form inadequate. [07:55]
surial i.e. yeah objectively argon2 might be more resilient, but in practice, the game requires you to score 1000 points to win. bcrypt is 9999999995 points, and argon2 is 9999999998 points. Not worthy of your time and effort. [07:55]
surial And given that relying on native libs is a whole nother can of worms in various aspects (security itself, ops, portability), that's -8999999999 points for shitty experience. Conclusion: Win goes to bcrypt. [07:56]
Matthijs The fact that Bcrypt seems a 10 times easier to use and less likely to do wrong is a big plus as well. [07:56]
surial if you can find an all-java FOSS version of something, by all means. [07:56]
yawkat it's mostly about asic resistance nowadays [07:57]
yawkat bcrypt needs very little memory [07:58]
surial exactly. That's exactly the right line to take to talk about the pragmatic differences once we're actually seriously considering: "A hacker has a copy of your database and will now start hacking away at it to figure out passwords". [07:59]
surial My point is: It's bcrypt. YOU WON THE GAME. It's fine. I need to hear a very specific reason as to why its worth your limited budget to spend on security features, to talk about _THIS_. [07:59]
surial Yes, if the attacker didn't just grab your DB but also has a spare $5 million lying around and is willing to spend half a year or so, that 5 million buys them a rig that will be far more efficient (in dollar spent per attempt per hour) than scrypt and argon2 boast. Which is nice. But the $/attempt/hr rate is still many, MANY orders of magnitude beyond what is required. It's security: Your entire layout is as secure as the [08:01]
surial weakest link. bcrypt won't be it. [08:01]
surial spend time elsewhere. [08:01]
yawkat i mean, by that logic you can use sha with salting [08:01]
surial Now, if it's a matter of: "But, surial, I can download dep A here or dep B there, the APIs are the same, why not pick the best option? " By all means. But the argon2 impl, having to rely on native libs, is not the winner here. [08:01]
surial yawkat: no. [08:01]
surial yawkat: sha with salting + an existing basic test rig (defined as: "Let's say I work at an office with 100 computers and I can make them crack hashes overnight"), means you get a few passwords _every day_. [08:02]
surial also, the effort spent to get sha+salting is _MORE_ than bcrypt. [08:02]
SmearedBeard [SmearedBeard!~SmearedBe@unaffiliated/smearedbeard] has joined ##java [08:02]
surial bcrypt is just 'add GAV org.mindrot::jbcrypt::0.4 to maven. Follow the 2-liner guide. The library has no deps whatsoevver, neither on hardware nor external weird config stuff/native libs nor other java jars'. Only way to beat that is to hand off the basic flow of auth to a higher abstraction, on which I personally would recommend against, but only if you have someone who knows their shit, which, well, I understand security [08:04]
surial experts are hard to hire these days. [08:04]
untrck_ [untrck_!uid353408@gateway/web/irccloud.com/x-eoynpzqvhgeruvgw] has joined ##java [08:09]
yawkat i think youre underestimating how easy bcrypt is to crack on fpgas [08:10]
surial I think you're overestimating how often 'source of serious incident traced to usage of bcrypt'. [08:10]
surial argon2 is a loser due to the native lib thing, don't do it. If I were to start from scratch I'd probably look at https://github.com/wg/scrypt [08:11]
surial surial's title: "GitHub - wg/scrypt: Java implementation of scrypt" [08:11]
yawkat well, same for pbkdf, same for scrypt, same for argon [08:11]
yawkat isnt pbkdf even in the jdk [08:11]
esro [esro!~esro@user119-167.otvarta.com.pl] has joined ##java [08:16]
Secret-Fire [Secret-Fire!~Secret-Fi@2601:1c1:4201:458c:719b:c4f0:9e7f:93d9] has joined ##java [08:17]
earthy yah. anyway, knowing the difference between a key derivation function and a secure hash is important [08:31]
forgottenone [forgottenone!~forgotten@176.88.97.248] has joined ##java [08:31]
earthy once you're at the level of 'using an approved key derivation function' the choice of which exactly is probably not the place you can have the greatest effect on your overall security [08:32]
surial yup. [08:34]
gauru [gauru!~gauru@80.2.23.173] has joined ##java [08:42]
gauru hi everyone [08:42]
gauru my first oops second message on the group [08:43]
progart [progart!~kamee@46.241.139.0] has joined ##java [08:43]
OnceMe [OnceMe!~OnceMe@unaffiliated/onceme] has joined ##java [08:51]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [08:53]
themsay [themsay!~themsay@149.254.235.3] has joined ##java [09:07]
themsay [themsay!~themsay@149.254.235.3] has joined ##java [09:11]
goldstar [goldstar!~adm@unaffiliated/goldstar] has joined ##java [09:12]
gauru [gauru!~gauru@80.2.23.173] has joined ##java [09:13]
gauru hi [09:13]
RoriconKnight [RoriconKnight!~RoriconKn@114.4.213.5] has joined ##java [09:14]
karab44 [karab44!~karab44@unaffiliated/karab44] has joined ##java [09:17]
mohsen_1 [mohsen_1!uid289573@gateway/web/irccloud.com/x-kcwcjzhftiljqfrq] has joined ##java [09:19]
surial gauru: hello. [09:20]
rockyraccoonn [rockyraccoonn!~rockyraco@pool-74-98-214-203.pitbpa.fios.verizon.net] has joined ##java [09:21]
gauru surial, I am very new [09:27]
surial Yes, so you said. [09:28]
RoriconKnight [RoriconKnight!~RoriconKn@114.4.213.5] has joined ##java [09:31]
ravenousmoose_ [ravenousmoose_!~ravenousm@194.78.35.195] has joined ##java [09:33]
pmercado [pmercado!~pmercado@190-22-235-213.baf.movistar.cl] has joined ##java [09:35]
RoriconKnight [RoriconKnight!~RoriconKn@120.188.7.52] has joined ##java [09:36]
troker [troker!~troker@evergage03.e.subnet.rcn.com] has joined ##java [09:40]
gauru i might seem a nut, why only three users have green dots. if that is for active users then @surial name is not in it [09:40]
surial gauru: this channel is about java development. [09:40]
surial Questions about IRC itself, hmm, no idea if there's a channel for that. Questions about freenode in particular go to #freenode. [09:41]
surial gauru: If you're referring to chanserv, cheeser, and kinabalu, they have their op flag on for some reason. It's.. not relevant. [09:41]
bluezone [bluezone!uid104970@gateway/web/irccloud.com/x-qehzhdsddklqoyas] has joined ##java [09:41]
gauru surial, and I am learning java :-) [09:41]
gauru i'll be lurking till i start to understand it better [09:42]
cheeser here we try to limit questions to java development. otherwise the signal to noise ratio drops too low. [09:43]
gauru cheeser I'll stick to the rules [09:43]
gauru [gauru!~gauru@80.2.23.173] has joined ##java [09:44]
gauru sorry for another dumb question,but where can i find the guidelines [09:46]
cheeser topicsmite gauru [09:47]
cheeser And the wrath of /TOPIC descended with terrible fury upon gauru. And all the people marvelled, saying, Behold, we too should read the /TOPIC, lest we be stricken. And all the people read the /TOPIC, and went away edified. [09:47]
Maldivia gauru: for this particular channel: https://javachannel.org/ -- see the "Channel Rules" menu at the top [09:47]
Maldivia Maldivia's title: "Freenode ##java enthusiasts united" [09:47]
waz gauru and green dots is something to ask your irc client vendor [09:51]
RoriconKnight [RoriconKnight!~RoriconKn@120.188.65.112] has joined ##java [09:52]
veegee Hey guys, what's the easiest way to format a number to add a thousands separator comma? [09:52]
cheeser javadoc DecimalFormat [09:52]
cheeser cheeser: http://bit.ly/2SzgQVJ [JDK: java.text.DecimalFormat] [09:52]
veegee I was hoping that wasn't the answer. A whole new object just for this tiny thing [09:52]
Maldivia "a whole new object" -- why does that worry you [09:53]
yuriescl [yuriescl!~yuriescl@unaffiliated/yuriescl] has joined ##java [09:53]
hussam [hussam!uid193284@gateway/web/irccloud.com/x-emynsgtpffbwvrub] has joined ##java [09:53]
EgonX [EgonX!~Egon@12.156.175.3] has joined ##java [09:54]
waz veegee java is fucking efficient at creating new object [09:54]
waz don't be reluctant to use them [09:54]
cheeser javadoc String.format(*) [09:54]
cheeser cheeser: http://bit.ly/2TsmfP3 [JDK: java.lang.String#format(String, Object...)]; http://bit.ly/2TsmgT7 [JDK: java.lang.String#format(Locale, String, Object...)] [09:54]
veegee I was hoping String.format had something [09:55]
yawkat you know format also creates objects internally [09:55]
Maldivia (shh, don't tell him that .format also creates a whole new objecft) [09:55]
cheeser *RAGE* [09:55]
cheeser D [09:55]
veegee Ok my bad, I phrased it incorrectly. It's not the fact that it's creating an object [09:55]
veegee it's more about a lot of code to do something pretty simple [09:56]
yawkat it's three lines [09:56]
sonOfRa You'd *think* formatting numbers was simple [09:56]
sonOfRa Formatting *anything* is very very not simple. [09:56]
veegee ah yes technicalities [09:56]
veegee you know what I mean [09:56]
sonOfRa queue 3 decades of printf buffer overflow bugs [09:56]
sonOfRa Yes I know what you mean, and what you mean is dumb! [09:57]
veegee no not really [09:57]
yawkat String.format strings are already hard enough to understand, they shouldnt do everything [09:57]
Maldivia System.out.println(new DecimalFormat("#,###").format(23456789)); -- how is that 3 lines ? :D [09:58]
veegee apparently String.format supports %,d [09:58]
veegee that's good enough for what I need [09:58]
MadLamb [MadLamb!~fabio@p4FE1B5CC.dip0.t-ipconnect.de] has joined ##java [09:59]
yawkat just be careful picking your locale [09:59]
yawkat (same with decimalformat though) [10:00]
cheeser yeah, you'll want Localely sourced ingredients. [10:00]
veegee I'm in Canada and I spek da engrish [10:03]
veegee and it's for an internal tool [10:03]
MadLamb Im trying to connect a class that writes to a OutputStream directly to Google Cloud Storage. I wasnt able to find a method that returns OutputStream on GCS Storage class, but it has one that returns a WriteChannel. Is there a way to connecting with that? [10:03]
yawkat Channels.newOutputStream [10:04]
veegee I haven't followed JVM past 1.8, haven't worked with it in a while apart from Scala. Have there been any GC improvements or new GC lately? [10:04]
MadLamb yawkat, and how do I get Channels? [10:04]
yawkat javadoc Channels [10:04]
yawkat yawkat: http://bit.ly/2TBP7nM [JDK: java.nio.channels.Channels]; http://bit.ly/2TwjD2x [JDK: jdk.nio.Channels] [10:04]
mohsen_1 veegee: unless you're doing the format repeatedly over and over again, there's no performance issue with using either one [10:05]
mohsen_1 A few milliseconds in a one time setup doesn't matter [10:05]
mohsen_1 If it's a loop, worry about it [10:06]
Crash1hd [Crash1hd!~Crash1hd@unaffiliated/crash1hd] has joined ##java [10:07]
MadLamb yawkat, link doesnt work [10:08]
yawkat prods the cheeser [10:08]
yawkat https://java-browser.yawk.at/java/11/java.base/java/nio/channels/Channels.java#java.nio.channels.Channels%23newOutputStream%28java.nio.channels.WritableByteChannel%29 [10:09]
yawkat yawkat's title: "java/11 : java.base/java/nio/channels/Channels.java" [10:09]
IRQ` [IRQ`!~patrickal@213.218.198.18] has joined ##java [10:09]
surial veegee: a ton. [10:12]
freeone3000 JDK12 has a GC that releases memory back to the host OS! [10:13]
surial veegee: The new hotness is shenandoah, which is an entirely new GC that is particularly focused on reducing freezes to minimums (trading off a slightly larger memory load per object to make it happen), though I do believe you missed a bunch of updates to the other GCs if you haven't looked for that long. [10:13]
Maldivia freeone3000: so does JDK11, 10, 9... :D [10:14]
surial shenandoah's amortized performance is bad, but that's sort of the point. [10:14]
yawkat freeone3000: did you mean g1 in j8? :D [10:14]
yawkat java 8 that is [10:14]
EgonX [EgonX!~Egon@12.156.175.3] has joined ##java [10:14]
freeone3000 Maldivia: Not in actual practice. [10:14]
yawkat g1 did [10:16]
SJr With a maven workflow for building a tomcat app, the cycle right now seems to be do a maven build, then rebuild the tomcat container (with the new WAR), then restart the tomcat container. What's the best way to reduce the cycle time on this? [10:16]
freeone3000 This is JEP346. G1GC has existed for a while, but it doesn't actually return memory usually, even though it theoretically can. JEP346 means we can do that. [10:17]
Addax rebuild.. the.. tomcat container? [10:17]
Addax you'd just build a war and deploy it into whatever servlet container you wanted [10:17]
deavmiLaptop [deavmiLaptop!~deavmi@165.0.49.2] has joined ##java [10:17]
SJr tomcat docker container, sorry. [10:17]
freeone3000 SJr: If you remove docker, you remove the docker time. [10:17]
Rapture [Rapture!~textual@50-204-232-30-static.hfc.comcastbusiness.net] has joined ##java [10:17]
yawkat jep did, if you configured a max free percent [10:17]
freeone3000 SJr: tomcat's been able to do hot redeploys since literally ever. [10:17]
yawkat er g1 did [10:17]
Addax oh, docker [10:18]
Addax freeone3000: although tomcat's been known to have some issues with hot redeployments [10:18]
freeone3000 It's mostly fine and if you actually care you'd use jetty. [10:18]
SJr Yeah I didn't build this pipeline, just trying to improve it, and it's been like a decade since I last dealt with this stuff :). Is there a mode where I can not build a war file and it can just look at the class path and classes on disk in a series of directories? [10:19]
Addax you could deploy a directory, sure [10:19]
Addax but a .war is better [10:19]
SJr I don't have a single directory, just a bunch of different target directories from a multi project maven build. [10:20]
freeone3000 SJr: You build to one war, you deploy the war. [10:20]
freeone3000 SJr: But if you can build a classes directory file, you save teh work of... building a war. [10:20]
progart [progart!~kamee@46.241.139.0] has joined ##java [10:21]
freeone3000 But it has to have the same structure as the war? so you're not really winning anything. [10:21]
SJr Ah yeah, not useful. [10:21]
Addax SJr: if you have a single .war, you DO have a single directory structure, anyway [10:21]
surial um... [10:21]
SJr Oh I guess yeah, the target directory of the maven project that builds the war, probably builds everything. [10:21]
surial okay, I have very little experience with what y'all are talking about, so I'll start with a story of awesomeness. And then we'll see how we can get you there. [10:21]
Addax can we not and say you did? [10:22]
surial if I make a change to some code, I.. hit CMD+S, then, i tab over to my webbrowser, and then the magic happens. Perhaps I hit CMD+R to reload the page. [10:22]
surial The turnaround time is measured in milliseconds. Maybe 100ms. [10:22]
SJr What tooling are you using? [10:22]
surial You all build a goddamn fucking jar and think that is an ignorable amount? [10:22]
surial jesus f. christ. how do you get anything done? [10:22]
surial SJr: primarily? Eclipse HCR. [10:22]
freeone3000 yes? I'm on a 40-core xeon with a ssd, building a jar is measurable in milliseconds. [10:23]
waz stop bragging [10:23]
surial Every so often, I do need a full restart of the server, for example because I added a new method or messed with the generation of some constant factor or some such weirdness. In that case, I hit, in eclipse, CMD+D and wait about 1.2 seconds (I just measured, that's what the logs say). The server is fully functioning at that point, having cycled, though, the server on-demand loads a few things to make this cycle time speedy. [10:24]
surial On-server I may need to work on a 'ping all modules to enforce loads and DB sanity checks on the production server instead of waiting for the first user to hit a relevant page'. [10:24]
yawkat yea if you can run embedded in your ide it's much nicer [10:24]
Addax sighs [10:24]
surial The problem is, I basically rolled my own stack. Routing? Wrote it myself, that was a fun day and no more than that. moduel deployment? I like messing with classloaders, seemed a lot less work than reading the entire goddamn OSGi manual. [10:24]
surial I do understand this makes it more difficult to give you specific advice of 'set this setting to this value, and supply this param switch to this tool, and voila'. [10:25]
surial Just saying: Yeah, you can do this. If your tooling can't, mabbe it sucks. [10:25]
waz freeone3000 see, only surial gets to brag here [10:25]
freeone3000 JVMTI hot reload? Nice. [10:25]
Addax he's like a particularly effective topper [10:25]
SJr lol [10:26]
Addax "I don't know what I'm doing in THIS arena, but I did it better than you" [10:26]
SJr My PHP Setup does that :) [10:26]
yawkat you can do this with most embedded servers [10:26]
Addax "I accidentally farted out a skynet but it was safe" [10:26]
SJr Anyway, yeah I'm just trying to make this as fast as possible maybe I'll look into the embedded server and hot deploy. [10:26]
surial Addax: Maybe. But at the end of the day.. my turnaround time is, even in bad scenarios, 1 second, and all y'all are throwing 40 fucking cores at the problem whilst I'm happily devving away in a train on a small laptop. [10:26]
surial So, fuck it. yeah, I top that shit. I win this game. [10:26]
SJr surial++ [10:26]
SJr surial has a karma level of 512, SJr [10:26]
surial Be inspired. Fix your tools. [10:27]
SJr Amen [10:27]
Addax I'm throwing 40 cores at a problem? [10:27]
SJr I think freeone3000 is. [10:27]
Addax ponders his toolchain, which doesn't... require 40 cores [10:27]
yawkat i would throw 40 cores at it too if i could [10:27]
Addax freeone3000 is doing fundamentally different kinds of apps than surial is [10:27]
waz OK, is everyone clear that surial is a fucking god and we're morons? [10:27]
yawkat why the fuck not [10:27]
waz shut the fuck up now [10:27]
Addax I throw 40 cores at things when I need 40 cores [10:27]
waz we get it [10:28]
Addax waz ++ [10:28]
Addax waz has a karma level of 152, Addax [10:28]
Addax tall poppy! [10:28]
surial Addax: I used the identifier 'all y'all' :P [10:28]
freeone3000 Addax: Only in the sense that pretty much everything I write is disposable, so it's not really worth engineering a single solution. I use significant amounts of code generation and automated tooling, and have maven run the jar in-source locally. [10:28]
SJr Thanks everyone!. [10:28]
MatiasMunk [MatiasMunk!~MatiasMun@87-49-146-63-mobile.dk.customer.tdc.net] has joined ##java [10:28]
MatiasMunk parted the channel: [10:29]
freeone3000 All testable units run outside the webserver context, so spinning up an integration test isn't really something that's valuable, and since it's a 2-day turnaround time from legal for a release anyway, saving a second or two on an RC build doesn't gain me anything. [10:29]
surial SJr: A few tips: If you can manage to run the actual JVM from within eclipse (and choose 'debug', not 'run', always choose debug), HCR should automatically update any loaded classes if their names match what eclipse dumps in the 'bin' folder, so, as long as you aren't shading, you should get hot code replace (HCR) automatically. Note, HCR fails if you mess with signatures (add/remove methods or fields, or change their name/params/ [10:30]
surial types/etc). [10:30]
Addax freeone3000: I wasn't asking you to justify anything. That's sort of the whole point, actually. [10:30]
surial SJr: So maybe give that a shot at least; getting HCR is like 75% of the win here. The rest is in having the server boot fast, but that tends to take way more time. [10:30]
freeone3000 There's also a commercial product, JRebel, which does hot-code reload including method and class changes to remote running Java servlet containers. [10:31]
surial I have no idea how the fuck intellij works. I've heard conflicting evidence. In my experience, it just doesn't work, at all (does not HCR), but presumably I didn't try hard enough. [10:31]
freeone3000 IDEA only does HCR if in a debugging context. [10:31]
surial it can't even compile, so,.. how?!!???? [10:31]
yawkat but the HCR works fairly well when it is in debugging [10:31]
yawkat it compiles with javac, and then reloads [10:31]
freeone3000 surial: Huh? It does the build, then reloads the code, same as eclipse. [10:32]
freeone3000 Eclipse compiles a bit earlier, time-wise, but the steps are the same. [10:32]
surial freeone3000: intellij doesn't have a built in compiler though. [10:32]
SJr Yeah we are an IntelliJ shop, and I'm sure I can figure it out. I may also look at dce-vm [10:32]
surial does it just run mvn and then tries to halting problem its way through the pom to figure out where the class files must therefore be, and then HCR from there? [10:32]
freeone3000 Yep. [10:32]
Addax I'm not actually smart enough to need sub-ms redeployments [10:32]
Addax It forces me to write code that has a higher chance of running right in the first place [10:33]
freeone3000 Though actually, the POM is pre-parsed into IML files first as a caching layer. [10:33]
SJr I dunno, Addax, I think a general rule of thumb is lower cycle time and feedback cycles is better, and I would say you are the first person who has espoused a different view. [10:33]
yawkat yea intellij build doesnt actually run maven unless you tell it to [10:33]
yawkat it just loads the classpath and such from the pom [10:34]
SJr I actually find IntelliJ's build weird and wish it's delegating to the build tools was better. [10:34]
yawkat i guess it exists to make it closer to code completion and such [10:35]
Addax SJr: there's a tipping point. If the turnaround time is 1s and that fits your dev cycle, that's fine. If it's 10s and that fits your dev cycle, it's fine. If it's .7ms and your cycle is 7s... okay, that's fine, but if you made an effort to get it to .7ms you're a fucking idiot. [10:35]
greggerz [greggerz!~greggerz@unaffiliated/greggerz] has joined ##java [10:35]
SJr Oh I'm trying to get it down from like 2 minutes to something more reasonable. [10:36]
Addax and if you decide that EVERYONE has the exact same requirements as you... I don't want to say you're also a fucking idiot, but... [10:36]
Addax sure [10:36]
Addax two minutes feels enormous [10:36]
yawkat drumpf two minutes [10:36]
yawkat <drumpf>Are you asking me about two minutes? Let me tell you about two minutes. I know two minutes. I like two minutes. I donated money for two minutes. We're gonna be two minutes, let me tell you, it'll be great, it'll be yuge. Next question.</drumpf> [10:36]
SJr Although I suspect part of the problem is that we rely almost exclusively on API tests, and now that I'm doing a big refactor the lack of unit tests is a big problem. [10:37]
fyrril [fyrril!~fyrril@2605:a601:7012:7200:18c0:e211:4a8c:4a98] has joined ##java [10:37]
cfoch [cfoch!uid153227@gateway/web/irccloud.com/x-rbzicimaeedxxsyz] has joined ##java [10:37]
sbalmos1 [sbalmos1!~sbalmos@2605:a000:1304:8078:c954:d7bb:5891:9fbe] has joined ##java [10:39]
freeone3000 SJr: What we do is we keep the service layer simple so we don't have to unit test it. We also keep it generated, so that we can test the generator, which then applies to all generated services. Then, per-project unit tests on the functional components are sufficient, since the mapping from functional->service is tested. [10:40]
freeone3000 Usually, with modern code, your service layer is servlet3 or whatever so this happens anyway. [10:40]
freeone3000 (We're using servlet2 and... some serious compatability nonsense.) [10:40]
SJr Yeah I guess I more mean integration testing, for large refactorings there is a lot of value that can be done without spinning up the entire service. I guess what you are talking about is testing against the servlets an functional unit test? [10:41]
freeone3000 Against whatever the servlet calls, yeah. We keep our servlets artifically separate. [10:42]
freeone3000 (microservices!) [10:42]
tang^ [tang^!~tang^@2604:3d09:47f:fb80:a84e:95b1:648e:9b1e] has joined ##java [10:42]
SJr Yeah I guess I've seen spring support unit testing at the 'controller' level, but not our stuff. I guess that's stuff more to think about / dig into. Still have lots of stuff to read. [10:43]
SJr Thanks everyone for your advice! [10:43]
fyrril [fyrril!~fyrril@2605:a601:7012:7200:18c0:e211:4a8c:4a98] has joined ##java [10:44]
gauru [gauru!~gauru@86.8.202.200] has joined ##java [10:44]
DrowningElysium [DrowningElysium!uid190788@gateway/web/irccloud.com/x-btqruxevctdlnrdc] has joined ##java [10:52]
fyrril [fyrril!~fyrril@2605:a601:7012:7200:18c0:e211:4a8c:4a98] has joined ##java [10:54]
fyrril [fyrril!~fyrril@2605:a601:7012:7200:18c0:e211:4a8c:4a98] has joined ##java [10:56]
tachoknight [tachoknight!~tachoknig@205.178.20.7] has joined ##java [11:01]
q9929t [q9929t!~Thunderbi@27.7.83.26] has joined ##java [11:04]
bolt_ [bolt_!~r00t@unaffiliated/bolt] has joined ##java [11:06]
EgonX [EgonX!~Egon@12.156.175.3] has joined ##java [11:06]
led_dark_1 [led_dark_1!~Thunderbi@217.66.160.14] has joined ##java [11:09]
gareppa [gareppa!~gareppa@unaffiliated/gareppa] has joined ##java [11:12]
coder7of9 [coder7of9!1825e846@gateway/web/freenode/ip.24.37.232.70] has joined ##java [11:14]
rippa [rippa!~rippa@ppp-vpdn-37.1.85.157.yarnet.ru] has joined ##java [11:14]
con3 [con3!~kvirc@ml.sun.ac.za] has joined ##java [11:15]
coder7of9 i have been reading about lambadas in java8 a real example (for me) would be useful. how do I turn this isimple nterface into a lambada: https://glot.io/snippets/fapk1qkftt [11:15]
pr3d4t0r [pr3d4t0r!~zhenya01@2603:3024:1d7a:4000:6a05:caff:fe05:9a0e] has joined ##java [11:16]
pr3d4t0r Hola. [11:16]
Maldivia VolleySuccessCallback callback = success -> mainActivity.deviceDataReady(success); [11:16]
Maldivia VolleySuccessCallback callback = mainActivity::deviceDataReady; [11:16]
Addax coder7of9: that... looks like android. [11:17]
coder7of9 yes in android.. thanbk you for the examples. [11:17]
coder7of9 thanks you rather [11:17]
upgrdman [upgrdman!~upgrdman@blender/artist/upgrdman] has joined ##java [11:18]
deavmiLaptop [deavmiLaptop!~deavmi@165.0.49.2] has joined ##java [11:21]
surial isn't android still stuck on java7? I don't think you get to use these in android. [11:25]
surial coder7of9: ^^ [11:25]
surial pr3d4t0r: hello. [11:25]
Maldivia surial: recent APIs are on equivalent of java 8, but yeah -- android, not ##java :D [11:26]
orbyt_ [orbyt_!~orbyt@172.92.5.20] has joined ##java [11:27]
coder7of9 surial Android Nougat introduces support for Java 8 language features [11:28]
coder7of9 already switeched to java8 date time so much better [11:28]
coder7of9 sorry not ##java [11:29]
Regon [Regon!~Regon@unaffiliated/regon] has joined ##java [11:31]
gauru [gauru!~gauru@86.8.202.200] has joined ##java [11:37]
RedSoxFan07 [RedSoxFan07!~Thunderbi@137.103.109.45] has joined ##java [11:43]
netriber [netriber!~Andre@62.28.165.146] has joined ##java [11:52]
IRQ` [IRQ`!~patrickal@213.218.198.18] has joined ##java [11:53]
meldzha [meldzha!~meldzha@46.109.111.138] has joined ##java [11:54]
themsay [themsay!~themsay@149.254.235.3] has joined ##java [11:55]
MadLamb what is the best way to debug an OutputStream? Can I somehow add a listener to it and print data as it comes? [11:55]
forgottenone [forgottenone!~forgotten@176.88.97.248] has joined ##java [11:56]
IRQ` parted the channel: [11:59]
aqd you can wrap it in your own OutputStream [12:00]
themsay [themsay!~themsay@149.254.235.3] has joined ##java [12:06]
esro [esro!~esro@user119-167.otvarta.com.pl] has joined ##java [12:12]
avalchev [avalchev!~user@46.238.21.2] has joined ##java [12:14]
Anticom [Anticom!~Anticom@87.190.49.75] has joined ##java [12:15]
IRQ` [IRQ`!~patrickal@213.218.198.18] has joined ##java [12:16]
deavmiLaptop [deavmiLaptop!~deavmi@165.0.49.2] has joined ##java [12:18]
bike-bill [bike-bill!5808547e@gateway/web/cgi-irc/kiwiirc.com/ip.88.8.84.126] has joined ##java [12:18]
orbyt_ [orbyt_!~orbyt@8.4.228.64] has joined ##java [12:19]
IRQ` parted the channel: [12:21]
rohdef [rohdef!~rohdef@90.184.72.135.1.fullrate.ninja] has joined ##java [12:24]
MadLamb I'm writing to a Google Cloud Storage WriteChannel (writeChannel.write(ByteBuffer.wrap("Test".toByteArray()))), I get no error or exception but no file appears. Any clue what might be going on and how to debug? [12:25]
orbyt_ [orbyt_!~orbyt@192.211.15.73] has joined ##java [12:25]
whaley [whaley!~whaley@192.133.78.17] has joined ##java [12:26]
con3 [con3!~kvirc@ml.sun.ac.za] has joined ##java [12:29]
gauru hi guys, i recently moved from intelliJ on windows to intelliJ on ubuntu but i see many features missing in it; like there is no auto generate option to create constructor, getter and setters. the deal breaker is that when I have compilation errors it is not giving any details other than telling me that I have n errors and m warnings [12:30]
tang^ you'll want to talk to jetbrains about that [12:31]
jhaenchen [jhaenchen!ccf6a226@gateway/web/freenode/ip.204.246.162.38] has joined ##java [12:31]
tang^ or maybe hang out in #idea-users [12:31]
tang^ sounds like you might have gone from Ultimate to Community in your platform switch, though [12:31]
jhaenchen Hey folks, I'm trying to use Mockito to count the calls to a method on my mock object, but Mockito appears to count my calls to setup the behavior of my mock as an invocation of the method, so all my call counts are +1 than they should be. Any suggestions? [12:32]
gauru thanks tang^, i'll try #idea-users [12:32]
jhaenchen For example, setting up my mock: `when(myMockObject.retrieveApplication(anyString())).thenReturn("emptyresponse");`, Mockito counts that as a call to retrieveApplication [12:33]
Avaray [Avaray!~Avaray@dynamic37-72-124-240.ostnet.pl] has joined ##java [12:33]
Addax gauru: uhh... something's wrong with your installation, then, if you're missing features [12:34]
cheeser this is why hate test mocks. [12:36]
jhaenchen Mocks are so much more elegant in js [12:37]
jhaenchen Anyway, I used the clearInvocations method to reset the call counts on my mocks before doing my test [12:37]
MadLamb cheeser, I'm on IntelliJ on ubuntu and I have the features you described [12:37]
MadLamb gauru, * [12:37]
cheeser i have described no features so that's impressive. [12:37]
MadLamb hahha [12:38]
MadLamb sorry [12:38]
kgrimes2 [kgrimes2!~kgrimes2@172-11-18-93.lightspeed.irvnca.sbcglobal.net] has joined ##java [12:38]
dez [dez!uid92154@fedora/deSouza] has joined ##java [12:38]
srisri [srisri!~srisri@c-98-207-200-202.hsd1.ca.comcast.net] has joined ##java [12:42]
srisri [srisri!~srisri@204.14.239.105] has joined ##java [12:47]
gauru MadLamb: I guess I should reinstall then [12:49]
LKoen [LKoen!~LKoen@2a01cb0407597a00bc52c3c502252404.ipv6.abo.wanadoo.fr] has joined ##java [12:49]
sa02irc [sa02irc!~sa02irc@155-079-043-212.ip-addr.inexio.net] has joined ##java [12:59]
bike-bill [bike-bill!5808547e@gateway/web/cgi-irc/kiwiirc.com/ip.88.8.84.126] has joined ##java [12:59]
MadLamb I'm writing to a Google Cloud Storage WriteChannel (writeChannel.write(ByteBuffer.wrap("Test".toByteArray()))), I get no error or exception but no file appears. Any clue what might be going on and how to debug? Code very similar to this: https://github.com/googleapis/google-cloud-java/blob/master/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/StorageExample.java#L301-L324 [01:07]
MadLamb MadLamb's title: "google-cloud-java/StorageExample.java at master googleapis/google-cloud-java GitHub" [01:07]
g00s [g00s!~g00s@unaffiliated/g00s] has joined ##java [01:08]
surial MadLamb: first make sure the write call actually completes (with a breakpoint or, if you have to, a System.out.println statement). Then, triple check that you actually know where that file is being written. presumably by checking blobInfo. If it's still a mysterious 'no errors, no file' scenario, ask google for support. [01:12]
surial note that you have really crappy exception handling in your code. [01:12]
surial so, I bet it's just you swallowing exceptions. [01:12]
surial for example, line 312 catches exception and then proceeds to invoke 'ex.printSTackTrace()' on it. This [1] eliminates the ability to see the type of the exception, [2] similarly eliminates the message, [3] similarly eliminates the causal chain and suppressed exceptions, and finally [4] keeps right on truckin', guaranteeing other weird shit is going to happen. [01:13]
surial and all in a place where you didn't even NEED to catch any exceptions. [01:13]
MadLamb surial, that is not my code, it is the example from the library [01:13]
surial ah, well, we figured it out then. [01:13]
surial apparently this library has a very low quality. [01:14]
MadLamb surial, hahaha [01:14]
surial If you care about it, I'd file a bug, and go: "Seriously. This disappointingly crappydocumentation and sets bad examples"> [01:14]
MadLamb surial, it is just an example, it doesnt mean there isnt a more specific exception [01:14]
surial but, usually 'no errors, no result' IS crappy exception handling. [01:14]
MadLamb hahahaha [01:14]
surial This is a fine example in other code of what that might look like. [01:14]
cheeser to help debug *your* code, show *your* code. [01:15]
surial yes, indeed. my sincerest fucking apologies assuming that the link you pasted is _YOUR_ code. [01:15]
MadLamb cheeser, I did. (writeChannel.write(ByteBuffer.wrap("Test".toByteArray()))) [01:15]
cheeser no [01:15]
cheeser show us [01:15]
cheeser Paste the code (and any errors) in a pastebin where we can see it. See ~pastebin for options. Also see ~testcase for good examples as to how to help us help you quickly diagnose and solve problems. [01:15]
surial MadLamb: that line wouldn't compile. At the very least you need a class and a method around it. Show. Us. [01:16]
MadLamb cheeser, https://pastebin.com/qrNPyZSU [01:17]
cheeser sighs and moves on [01:18]
MadLamb cheeser, man that is literally what matters, the only other thing I can do is zip the entireapp and send you [01:19]
cheeser paraphrase [01:19]
cheeser Don't paraphrase code or errors. If you knew what was important to show us, you wouldn't need us to answer your question. You should pastebin the *actual* code and the *actual* error. Anything else is most likely going to be useless. [01:19]
cheeser but it's ok. i've got my own shit to handle. [01:19]
MadLamb cheeser, i have the gcs library working in other parts of the app, so i am very sure is not config [01:19]
MadLamb cheeser, if there was an error to pass I would not be asking for ideas on how to debug [01:20]
Maldivia surial: hmm, I cannot @SneakyThrows on a constructor that call something with a checked exception before this/super ? [01:22]
Maldivia surial: example @SneakyThrows public Klass() { this(Files.readBytes(...)); } [01:23]
surial Maldivia: I doubt we can do that, yeah. [01:23]
klottie [klottie!~user@unaffiliated/klottie] has joined ##java [01:24]
surial we still go try/catch in the source, and you can't put those around a this() or super() invoke. [01:24]
Maldivia no red line in IntelliJ, but got a compiler warning and error [01:24]
surial At the class level we can 'fix it', but the rule is that it has to work in delombok. [01:24]
bike-bill [bike-bill!5808547e@gateway/web/cgi-irc/kiwiirc.com/ip.88.8.84.126] has joined ##java [01:24]
Maldivia surial: my "fix" was: https://www.hastebin.com/haxupafija.java [01:25]
enoq [enoq!~enoq@2a02:8388:6a87:b080:649f:9456:c1b1:28e4] has joined ##java [01:27]
peaceguy [peaceguy!~yu68@unaffiliated/peaceguy] has joined ##java [01:29]
surial yup, sorry, was a bit busy but was going to suggestion something like that [01:29]
g00s [g00s!~g00s@unaffiliated/g00s] has joined ##java [01:33]
Essadon [Essadon!~Essadon@81-225-32-185-no249.tbcn.telia.com] has joined ##java [01:34]
g00s_ [g00s_!~g00s@unaffiliated/g00s] has joined ##java [01:37]
gauru [gauru!~gauru@86.8.202.200] has joined ##java [01:40]
klottie Is it possible to give exclusive access to subclasses within same package? [01:41]
Addax you could make them private, but... no [01:43]
spawned4562 [spawned4562!~spawned45@75-163-85-234.omah.qwest.net] has joined ##java [01:44]
conan [conan!~conan@62.60.61.246] has joined ##java [01:44]
cheeser package private members with protected constructors? [01:44]
cheeser so only subclasses could be instantiated directly [01:45]
cheeser though that's overly complicated as I thin probably package private would be sufficient on everything. [01:45]
surial cheeser: protected = package-private + [01:45]
cheeser surial: i know. ;) [01:45]
surial cheeser: so, no, that doesn't stop anything whatsoever. a non-subclass from the same package can access protected stuff. [01:45]
Addax blinks [01:46]
MadLamb [MadLamb!~fabio@ip5b40f0ee.dynamic.kabel-deutschland.de] has joined ##java [01:46]
cheeser /12 [01:47]
MadLamb surial, what you were saying about exception handling. Wouldn't the printStackTrace output anyway even if the exception was being supressed? [01:47]
cheeser why would it? [01:47]
cheeser stack traces only get printed if the exception handler says to do so. [01:48]
MadLamb cheeser, prob using the default exception handler (spring boot) [01:48]
MadLamb cheeser, I could throw an Exception somewhere else just to make sure [01:49]
cheeser i don't know what spring boot does so i got nothing [01:49]
klottie So, the answer is no. Do you think my design is flawed if I need such thing, then? [01:50]
cheeser klottie: probably [01:50]
cheeser you could put all those classes in their own packages [01:50]
cheeser but that wouldn't prevent someone from putting *their* classes in that package [01:50]
MadLamb cheeser, yeah, manually added an Exception there and got output "java.lang.Exception: This sausage is tasty" [01:50]
klottie ok, I'll think on that. Thanks, cheeser. [01:51]
Squarism one thing ive never really understood is why i cant run builds on separate maven "modules" unless ive installed any project module dependendencies before. Why isnt package + relative path enough? [01:51]
cheeser MadLamb: mmmmm. sausage. [01:51]
t2mkn [t2mkn!~t2mkn@43.226.2.118] has joined ##java [01:51]
MadLamb cheeser, also inside the try catch block, also woked [01:51]
cheeser klottie: it sounds like you maybe want sealed classes but java doesn't support that. [01:51]
cheeser MadLamb: how socially conscious of it! [01:52]
MadLamb cheeser, so no exception, but still no file on GCS... and I am calling write directly on the channel with a "Test" string [01:54]
cheeser \_(?)_/ [01:54]
cheeser time to talk to google support it sounds like [01:54]
MadLamb \_(?)_/ [01:54]
ron omg he has no hand [01:54]
cheeser the jaime lannister shrug emoji [01:54]
MadLamb hahaha [01:55]
MadLamb LMAO [01:55]
Diablo-D3 jesus [01:55]
MadLamb *\_(?)_/* [01:55]
ron I'm pretty sure jesus had two hands [01:55]
Addax I don't think there's a jew on a stick emoji [01:56]
led_dark_1 [led_dark_1!~Thunderbi@217.66.160.14] has joined ##java [01:56]
gauru [gauru!~gauru@86.8.202.200] has joined ##java [01:56]
MadLamb ()\_(?)_/() [01:56]
MadLamb o\_(?)_/o [01:56]
alureon [alureon!~alureon@unaffiliated/proxa] has joined ##java [01:58]
wad [wad!~wad@66.43.16.1] has joined ##java [02:06]
wad Anyone here use a mac? IntelliJ on my linux box uses CTRL-UPARROW to scroll up without moving my cursor. I use it all the time. Doesn't work on mac, and my googles are failing to find the key. Ideas? [02:06]
Maldivia wad: https://resources.jetbrains.com/storage/products/intellij-idea/docs/IntelliJIDEA_ReferenceCard.pdf [02:07]
wad There's actually a plugin that prints out the shortcut keys. I have a printout in my hand now. :) [02:07]
wad Sadly, it doesn't list any keys for this behavior. [02:08]
Maldivia wad: ctrl-shift-a type scroll down [02:09]
wad tries [02:09]
cheeser also, there's #idea-users [02:09]
Maldivia or ctrl-cmd-a or what it is to get the action menu [02:09]
wad I should be in #idea-users! Didn't know that existed! [02:09]
wad Okay, action menu is SHIFT-COMMAND-A [02:11]
wad What the heck? I can't get to it anymore... a screen flashes, then a yellow box with an error message shows up. [02:12]
orbyt_ [orbyt_!~orbyt@192.211.15.73] has joined ##java [02:13]
whaley [whaley!~whaley@192.133.78.17] has joined ##java [02:13]
cheeser i had the same thing happen! [02:13]
wad lol [02:13]
cheeser change windows in idea and come back to the current one. it'll work again. [02:14]
wad Huh. I got it to work for a moment, now it's stuck again. Tried four different documents... [02:16]
cheeser is terminal open? [02:16]
wad Inside the IDE? [02:16]
cheeser in general [02:17]
wad iTerm [02:17]
wad yes [02:17]
wad closed it.... [02:17]
cheeser hrm. may be unrelated. i use iterm but just found terminal open in the background. [02:17]
cheeser can't recreate the problem now. [02:17]
wad Weird. I exited IDEA, reloaded, and it's fixed. [02:18]
dob1 [dob1!~dob1@unaffiliated/dob1] has joined ##java [02:18]
fstd_ [fstd_!~fstd@unaffiliated/fisted] has joined ##java [02:19]
wad I found the keybinding, it's not assigned to a key in IDEA. Fixing it. :) [02:20]
wad Ah, in `Mac OS X 10.5+`, it's not assigned. [02:22]
cheeser what was the key combo? [02:22]
fyrril [fyrril!~fyrril@2605:a601:7012:7200:18c0:e211:4a8c:4a98] has joined ##java [02:22]
wad There was none assinged. [02:22]
alureon [alureon!~alureon@unaffiliated/proxa] has joined ##java [02:22]
wad I tried to put CTRL-DOWNARROW and CTRL-UPARROW on them, but OSX wouldn't let me. Those are for some window management stuff. [02:23]
SmearedBeard [SmearedBeard!~SmearedBe@unaffiliated/smearedbeard] has joined ##java [02:23]
wad So I bound them to CTRL-OPTION-DOWNARROW and CTRL-OPTION-UPARROW instead. Just some more keystrokes I have to relearn. Undoing 13 years of IntelliJ muscle memory, and 35 years of PC muscle memory... [02:24]
Diablo-D3 or just switch to windows [02:24]
Oni-Sanba [Oni-Sanba!~user@public-gprs409560.centertel.pl] has joined ##java [02:25]
erg0s1 [erg0s1!~erg0s1@179.189.157.119] has joined ##java [02:32]
chonkin [chonkin!~katyab@c-75-67-100-34.hsd1.nh.comcast.net] has joined ##java [02:36]
hoaxguru [hoaxguru!5c63a709@gateway/web/freenode/ip.92.99.167.9] has joined ##java [02:36]
hoaxguru pastebin [02:36]
hoaxguru Please paste your code and any errors online. For runnable main-classes, try https://glot.io/new/java . For general code and errors, use for instance https://gist.github.com or https://www.hastebin.com [02:36]
erg0s1 [erg0s1!~erg0s1@179.189.157.119] has joined ##java [02:37]
hoaxguru Guys, what is the value of "a" here > https://glot.io/snippets/fapppv839z [02:39]
Addax homework [02:39]
Addax We don't answer homework-style questions here. Homework assignments intentionally ask you to produce bad code: You generally HAVE to use some mechanism even though it isn't the best tool for the job, and '.. just use this library that does all that in a very nice way!' is usually not acceptable. That makes them VERY frustrating questions. [02:39]
cheeser tias [02:39]
cheeser Try it and see. You learn much more by experimentation than by asking without having even tried. [02:39]
Addax what does your debugger show you [02:39]
hoaxguru Lmao, it's just a humble question. I'm trying to learn Java. [02:40]
cheeser so run the code and learn [02:40]
Addax so... yeah [02:40]
hoaxguru Addax: It shows me multiple values. [02:40]
Addax so if you're trying to learn, run the code, watch it with a debugger. [02:40]
hoaxguru All I want is to output of a, but I get multiple values when executed. [02:41]
Addax does this surprise you? [02:41]
cheeser you print b every time through the loop and a not at all. [02:41]
Addax I mean, it's going to run that block while a<20... [02:41]
Addax I'm pretty sure a debugger would show you everything you want to know [02:42]
hoaxguru cheeser: Oh yeah, thanks! I'm sorry if I wasted your time :) [02:42]
cheeser no worries [02:42]
Teckla hey cheeser, wanna... waste some time? *waggles eyebrows* [02:42]
hoaxguru Addax: Yeah I get it, you don't wanna help, atleast don't be rude... [02:42]
Addax I wasn't being rude, and I wasn't *not* helping [02:43]
Teckla hoaxguru: Watching what it does in a debugger seems like super good advice to me. [02:43]
Teckla It's also the kind of advice that keeps paying off forever [02:44]
Teckla So it turns out Nashorn is now deprecated. [02:44]
cheeser it is. [02:45]
Oni-Sanba i always happy to help people with their homework. By doing so i help them get worse training then they coud thus lowering competition in labor market [02:45]
cheeser in favor of truffle-js iirc [02:45]
Oni-Sanba for a buck [02:45]
Teckla Interesting, hadn't heard of truffle-js before. [02:45]
cheeser Oni-Sanba: so very clever of you. [02:45]
Teckla The company I work for uses Rhino [02:45]
cheeser and punch cards? [02:45]
Teckla thanks for making me laugh out loud in my cell [02:45]
Teckla err cube. [02:45]
cheeser bows. [02:45]
Teckla Rhino has seem updates recently; I wonder if it's picking up steam again [02:46]
Teckla s/seem/seen/ [02:46]
alureon [alureon!~alureon@unaffiliated/proxa] has joined ##java [02:54]
pmercado [pmercado!~pmercado@190-22-235-213.baf.movistar.cl] has joined ##java [02:58]
Iolo [Iolo!~iolo@dsl-tkubng22-58c023-38.dhcp.inet.fi] has joined ##java [03:01]
Gazooo [Gazooo!~Gazooo@142.196.183.136] has joined ##java [03:07]
omonk [omonk!~omonk@unaffiliated/omonk] has joined ##java [03:07]
fyrril [fyrril!~fyrril@2605:a601:7012:7200:18c0:e211:4a8c:4a98] has joined ##java [03:08]
RedSoxFan07 [RedSoxFan07!~Thunderbi@137.103.109.45] has joined ##java [03:15]
SmearedBeard [SmearedBeard!~SmearedBe@unaffiliated/smearedbeard] has joined ##java [03:18]
deavmiLaptop [deavmiLaptop!~deavmi@165.0.49.2] has joined ##java [03:18]
fyrril [fyrril!~fyrril@2605:a601:7012:7200:18c0:e211:4a8c:4a98] has joined ##java [03:22]
junktext [junktext!~junktext@fsf/member/junktext] has joined ##java [03:24]
fyrril [fyrril!~fyrril@2605:a601:7012:7200:18c0:e211:4a8c:4a98] has joined ##java [03:27]
wreed [wreed!~wreed@155.33.132.29] has joined ##java [03:28]
SmearedBeard [SmearedBeard!~SmearedBe@unaffiliated/smearedbeard] has joined ##java [03:30]
peaceguy [peaceguy!~yu68@unaffiliated/peaceguy] has joined ##java [03:30]
wad parted the channel: [03:32]
chonkin parted the channel: [03:32]
codebam [codebam!~codebam@unaffiliated/codebam] has joined ##java [03:36]
codebam hey, I have an intellij project and no matter how I add junit to it I get a NoClassDefFoundError [03:37]
codebam how do I fix it [03:37]
Addax maven [03:37]
Addax Maven is a software management tool that can compile, test, package, and deploy your project, with plugins for everything you can think of. See http://maven.apache.org and https://books.sonatype.com/mvnref-book/reference/index.html [03:37]
codebam yeah I don't want to use maven [03:38]
codebam I don't want to use gradle either, how do I add this library in intellij? [03:38]
Addax gradle [03:38]
Addax Addax, gradle is a build tool written in groovy and provides a groovy dsl that enables you to perform dependency management and imperative build scripting. See http://gradle.org for more. [03:38]
Sasazuka [Sasazuka!~Sasazuka@unaffiliated/sasazuka] has joined ##java [03:38]
Addax oh, sorry, I thought you wanted to do stuff correctly [03:38]
Addax never mind [03:38]
Addax good luck! [03:38]
codebam I know, but it's for school [03:38]
Diablo-D3 whahah [03:38]
codebam so has to be done this way [03:38]
Diablo-D3 homework [03:38]
Diablo-D3 We don't answer homework-style questions here. Homework assignments intentionally ask you to produce bad code: You generally HAVE to use some mechanism even though it isn't the best tool for the job, and '.. just use this library that does all that in a very nice way!' is usually not acceptable. That makes them VERY frustrating questions. [03:38]
codebam it's not a homework question [03:39]
codebam I just want to set up this project [03:39]
Addax why no homework [03:39]
Addax We understand you aren't asking us to do your homework. That's not why we don't answer. We don't because 1) You usually don't comprehend the answer and we get stuck in an endless loop of 'why', 2) You will understand, but you'll retort with "my professor doesn't want me to do it this way'. That's frustrating. 3) Homework questions are boring questions. We don't get paid. Your prof does. [03:39]
Addax See #2 [03:39]
codebam you don't have to be jerks you know [03:39]
Addax ask your prof how to use IDEA, I guess. And while you're at it, ask him or her why you can't use a build system like the rest of the world [03:39]
Addax jerks? who? [03:39]
Addax I mean, the *right* answer to your question is: "Add the dependency to maven or gradle" [03:40]
codebam fine, I'll just use gradle or maven [03:40]
Addax but you already said that wasn't acceptable [03:40]
codebam well you can add it directly in intellij [03:40]
codebam I just want to know how to do that [03:40]
Addax Yes, yes you can. But that's stupid. [03:40]
codebam well for small projects [03:40]
Addax Well, module settings is where you'd do it but... that's stupid for every project [03:40]
Addax makes IDEA a core part of your project, and that's dumber than shit [03:41]
codebam yeah true [03:41]
Addax and let's be real, shit's pretty fucking stupid [03:41]
Addax sorry, you're in school [03:41]
Addax "let's be real, feces is rather unintelligent on a grand scale" [03:41]
codebam huh? [03:41]
codebam where is that quote from [03:41]
Addax I'm translating from adult [03:42]
kegster [kegster!~kegster@unaffiliated/kegster] has joined ##java [03:42]
immibis [immibis!~immibis@125-238-72-168-fibre.sparkbb.co.nz] has joined ##java [03:42]
Addax same thing as "shit is pretty fucking stupid", just used without adult language [03:42]
Addax don't want to offend tender sensibilities, you know [03:42]
adadelta codebam: Don't be discouraged. Addax wakes up on the wrong side of the bed every day :) [03:43]
Addax I do not! ... which side is the wrong side of the bed? [03:45]
cheeser the underside [03:45]
dez [dez!uid92154@fedora/deSouza] has joined ##java [03:45]
Addax I definitely don't defy gravity while sleeping [03:45]
Addax or if I do, nobody's ever mentioned it to me [03:45]
cheeser *but* everything else aside, using maven/gradle is the simplest way to get things going, codebam. [03:45]
cheeser if only because there are a billion search hits on how to add junit to maven. [03:46]
wahibdon [wahibdon!86431d5c@gateway/web/freenode/ip.134.67.29.92] has joined ##java [03:46]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [03:46]
wahibdon parted the channel: [03:47]
alureon [alureon!~alureon@unaffiliated/proxa] has joined ##java [03:49]
codebam anyways, I set up a new project with gradle, how do I add a main class? [03:50]
codebam in intellij [03:51]
Oni-Sanba you could use emacs, this will surprise your prof [03:52]
codebam Oni-Sanba: usually I use vim actually, this is for a friend [03:53]
codebam but I can't very well get them to set up gradle manually for vim [03:53]
Oni-Sanba well you don't [03:55]
Oni-Sanba you just create a java file and then [03:55]
Oni-Sanba javac your file [03:55]
Oni-Sanba and that's it you can run your class using some java command with parameters i don't remember because reasons [03:56]
Oni-Sanba you can even write python binding for your vim [03:57]
Oni-Sanba so it will do whatever you want automatically, but you should know it better than me [03:57]
whaley [whaley!~whaley@2601:281:8400:558f:f4a3:a09:a052:97b7] has joined ##java [04:00]
hoaxguru codebam: Looks like I'm not the only one who thinks the same about Addax..... [04:00]
Addax hoaxguru: did I not give you good advice? [04:01]
Addax Was what I told you WRONG somehow, or actually unhelpful? [04:02]
hoaxguru Addax: *good* advice he says..... [04:02]
Addax hoaxguru: again, was there an issue with what I told you? If so, what was it? [04:03]
Addax you wanted to know what some simple code you'd written was doing, so I suggested you crank up a debugger and *watch*, which would do a number of things for you. That's what a real programmer would do, too. Did you want me to hold your hand, as if you were incompetent and truly stupid? [04:05]
Addax If I held your hand, note that you'd have learned very little besides that asking people might help you over a given hurdle. That makes you a terrible programmer. If you're trying to learn, wouldn't you... you know... want to learn? [04:06]
orbyt_ [orbyt_!~orbyt@8.4.228.64] has joined ##java [04:07]
Addax hoaxguru: and note that I really don't give a damn what you think about ME - like me, hate me, want to cut off my toes, whatever. You don't know me, I don't know you, your opinion of me is irrelevant TO ME. I'm trying to look at the actual quantitative advice you received. [04:08]
whaley [whaley!~whaley@2601:281:8400:558f:50c3:bf90:e7b:80a5] has joined ##java [04:09]
conan [conan!~conan@mdproctor.plus.com] has joined ##java [04:11]
Skyie [Skyie!~Skyie@2606:ed00:2:1013::1003] has joined ##java [04:13]
rruizt [rruizt!~rruizt@83-84-23-124.cable.dynamic.v4.ziggo.nl] has joined ##java [04:15]
orbyt_ [orbyt_!~orbyt@192.211.15.72] has joined ##java [04:15]
nickel8448 [nickel8448!~rahul@45.56.154.157] has joined ##java [04:21]
whaley [whaley!~whaley@8.25.196.26] has joined ##java [04:26]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [04:32]
conan [conan!~conan@mdproctor.plus.com] has joined ##java [04:36]
Skyie [Skyie!~Skyie@unaffiliated/skyie] has joined ##java [04:46]
omonk [omonk!~omonk@unaffiliated/omonk] has joined ##java [04:47]
alureon [alureon!~alureon@unaffiliated/proxa] has joined ##java [04:58]
qrestlove [qrestlove!~qrestlove@2601:446:c201:f560:3013:7f1f:89c1:c7e1] has joined ##java [04:58]
nonconvergent [nonconvergent!c72f2503@gateway/web/freenode/ip.199.47.37.3] has joined ##java [05:05]
nonconvergent Making a static parameter object that needs two Class objects as members. Can I make it parameterized and get them from there or will erasure make that impossible and I'll need the constructor/explicit setters? [05:07]
nonconvergent Like `static class Param<T extends SomeT, R extends SomeR> { Class<T> TClass; Class<R> RClass; }` [05:10]
orbyt_ [orbyt_!~orbyt@192.211.15.72] has joined ##java [05:10]
Maldivia nonconvergent: did you try? [05:20]
codebam [codebam!~codebam@unaffiliated/codebam] has joined ##java [05:27]
nonconvergent Maldivia: Yup. Essentially https://gist.github.com/nonconvergent/01c8750069c7f5423b2ab801a077cc5c [05:29]
Maldivia well, first of, you need actually type param identifiers there, not ? [05:30]
Maldivia but it won't magically give you Class instances, your fields will be null [05:30]
nonconvergent Yeah, that fixes the linting at least, yeah, that's the part I don't understand. How do I make some magic in that case? [05:30]
nonconvergent I'm thinking it's not possible because erasure means the types are washed away at runtime, so it has to be a constructor or setter. [05:31]
Shoe0nHead [Shoe0nHead!uid204639@gateway/web/irccloud.com/x-tsrryudaiiqrmaan] has joined ##java [05:32]
nonconvergent In which case I can just make it not parameterized. [05:32]
Maldivia nonconvergent: https://www.hastebin.com/ilusewiken.java [05:32]
Maldivia something like that [05:32]
nonconvergent Right, but since it's a static member I don't think I'll need generic after all. [05:35]
nonconvergent ...why did I talk myself into it in the first place [05:35]
Maldivia well, depends on how you're using it [05:35]
nonconvergent Maldivia: Static parameter object. It's gonna hold some fields and derive some more so that method signatures in this class are 10 parameters and 5 lines long. [05:36]
nonconvergent s/are/are not/ [05:36]
Maldivia so instead you have a method with 1 parameter, and 8 lines of code on the caller withe new Parem.Builder().... [05:37]
nonconvergent Yup! Per Effective Java 3rd Edition Item 51: "Avoid long parameter lists" [05:39]
nonconvergent It recommends, if you can't chop it up orthogonally, static member classes or a Builder. [05:40]
togo [togo!~togo@2a01:5c0:1a:c171:3ee7:9c4a:6828:3ea8] has joined ##java [05:41]
Cahaan [Cahaan!~Cahaan@static.88-198-39-148.clients.your-server.de] has joined ##java [05:41]
Revan- [Revan-!~Revan@host-72-174-107-194.static.bresnan.net] has joined ##java [05:42]
ricky_clarkson pppingme: Did you understand the ==/equals thing now? [05:47]
pppingme I think so [05:47]
nonconvergent Maldivia: In this case it's especially necessary because most params are derivable and have the same String type. [05:48]
ricky_clarkson pppingme: Integer i = 200, j = 200; There are two objects, and == just checks if they're the same object, which is why it gives false. [05:48]
ricky_clarkson pppingme: for ints, there are no objects involved, the actual numbers are compared. [05:48]
pppingme yeah, thats the part I figured out [05:49]
ricky_clarkson nonconvergent: If you're using a DI framework and it's a constructor with many parameters I'd say it doesn't matter much if the constructor has too many parameters. [05:50]
ricky_clarkson nonconvergent: In other cases, sure, if there are good logical groupings then you can add types to reduce the number of parameters. If there aren't good logical groupings, consider splitting the class/method. [05:51]
nonconvergent There is no explicit constructor on the @Service. This is an attempt at DRYing out some WET code but it's created a place where we have class all over the place calling a method with the signature (Context, Document, String, String, String, String, String, String, String, List<Object>) and every call I've found is full of more work and more casts and how does anyone remember what goes with what [05:54]
ricky_clarkson Sounds like creating multiple methods is the right refactor. [05:58]
nonconvergent This is after doing that. :P [05:58]
nonconvergent It's calling a badily written DSL and if I break that up people with pitch fits. [05:59]
a3Dman [a3Dman!~3Dman@unaffiliated/a3dman] has joined ##java [05:59]
wtflux [wtflux!~wtflux@67-131-112-171.dia.static.qwest.net] has joined ##java [06:00]
Diablo-D3 okay I have to ask [06:00]
Diablo-D3 what does WET stand for [06:00]
Maldivia write everything twice [06:01]
Maldivia ie, opposite of DRY [06:01]
Buliarous [Buliarous!~gypsydang@unaffiliated/buliarous] has joined ##java [06:05]
Diablo-D3 wow its actually a clever acronym [06:05]
Sasazuka__ [Sasazuka__!~Sasazuka@unaffiliated/sasazuka] has joined ##java [06:10]
Maldivia Diablo-D3: well, it was a clever guy who came up with it :D [06:12]
EgonX [EgonX!~Egon@12.156.175.3] has joined ##java [06:12]
jamiemagee [jamiemagee!~jamie.mag@customer-212-237-97-203.ip4.gigabit.dk] has joined ##java [06:13]
codebam [codebam!~codebam@unaffiliated/codebam] has joined ##java [06:14]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [06:14]
bros [bros!4ac83c03@gateway/web/freenode/ip.74.200.60.3] has joined ##java [06:17]
bros https://github.com/netty/netty/blob/00afb19d7a37de21b35ce4f6cb3fa7f74809f2ab/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2FrameLogger.java#L162 I can't for the life of me figure out how to set that to TRACE. [06:18]
bros bros's title: "netty/Http2FrameLogger.java at 00afb19d7a37de21b35ce4f6cb3fa7f74809f2ab netty/netty GitHub" [06:18]
jamiemagee [jamiemagee!~jamie.mag@customer-212-237-97-203.ip4.gigabit.dk] has joined ##java [06:21]
Maldivia bros: new Http2FrameLogger(TRACE, ...) ? [06:22]
bros Maldivia: but I'm ingesting that code in a client library like... 10 layers up [06:22]
bros Maldivia: does that make any sense? [06:22]
Maldivia bros: well, I'm sure you have a connection handler somewherE? [06:23]
Maldivia so set the frameLogger on that? [06:23]
Maldivia bros: from the netty examples: https://github.com/netty/netty/blob/master/example/src/main/java/io/netty/example/http2/helloworld/client/Http2ClientInitializer.java [06:24]
Maldivia Maldivia's title: "netty/Http2ClientInitializer.java at master netty/netty GitHub" [06:24]
Maldivia there you can see on line 45 that they create an INFO logger [06:24]
bros frees-rpc-client-netty is the package I'm using. all I have is "ChannelForAddress(config.host, config.port)" [06:25]
bros isn't there a way to configure the logger or override it at runtime? [06:25]
gauru [gauru!~gauru@86.8.202.200] has joined ##java [06:27]
Maldivia well, set a breakpoint in the Http2FrameLogger constructor, see what code-paths cause it to be constructed, and then step back and see if you can influence it somehow [06:27]
xlxnnx [xlxnnx!~xlxnnx@66.171.34.67] has joined ##java [06:30]
bros Maldivia: this might sound dumb but, in what IDE can I set breakpoints in JARs? to my knowledge, you can't? [06:31]
xlxnnx [xlxnnx!~xlxnnx@66.171.34.67] has joined ##java [06:31]
kgrimes2 [kgrimes2!~kgrimes2@137.79.211.50] has joined ##java [06:31]
jamiemagee [jamiemagee!~jamie.mag@customer-212-237-97-203.ip4.gigabit.dk] has joined ##java [06:33]
Teckla [Teckla!~Teckla@unaffiliated/teckla] has joined ##java [06:36]
Crash1hd [Crash1hd!~Crash1hd@unaffiliated/crash1hd] has joined ##java [06:39]
Teckla [Teckla!~Teckla@unaffiliated/teckla] has joined ##java [06:40]
Maldivia all of them [06:49]
Maldivia most of major IDEs also has an easy way to attach the source code to a maven dependency, making it even easier [06:50]
alureon [alureon!~alureon@unaffiliated/proxa] has joined ##java [06:51]
goldstar [goldstar!~adm@unaffiliated/goldstar] has joined ##java [06:55]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [07:05]
katiex7 [katiex7!~katiex7@ip72-196-214-135.dc.dc.cox.net] has joined ##java [07:05]
LKoen [LKoen!~LKoen@2a01cb0407597a00080df769e349b8e1.ipv6.abo.wanadoo.fr] has joined ##java [07:06]
CAPITANOOO [CAPITANOOO!~CAPITANOO@185.192.137.14] has joined ##java [07:12]
dez [dez!uid92154@fedora/deSouza] has joined ##java [07:12]
kgrimes2 [kgrimes2!~kgrimes2@128.149.145.134] has joined ##java [07:14]
thief [thief!realtime@gateway/vpn/privateinternetaccess/realtime] has joined ##java [07:18]
pppingme [pppingme!~pppingme@unaffiliated/pppingme] has joined ##java [07:28]
nonconvergent Apparently called Class#getDeclaredFields isn't returning a public static final member off a implemention of a subclass of a interface. IE I have Class<A>, and A implements B, B extends C, C extends interface D, and D has a static member I want. [07:28]
Hanii [Hanii!~Hanii@2a00:23c5:c587:a800:95c1:226a:335f:21e] has joined ##java [07:32]
Sheilong [Sheilong!uid293653@gateway/web/irccloud.com/x-ssevlhbnzhravaym] has joined ##java [07:32]
Sasazuka__ [Sasazuka__!~Sasazuka@unaffiliated/sasazuka] has joined ##java [07:32]
alureon [alureon!~alureon@unaffiliated/proxa] has joined ##java [07:35]
pmercado [pmercado!~pmercado@190-22-235-213.baf.movistar.cl] has joined ##java [07:41]
Maldivia of course not [07:48]
Maldivia declared = declared on that class [07:48]
nonconvergent learning yay [07:50]
Cahaan [Cahaan!~Cahaan@static.88-198-39-148.clients.your-server.de] has joined ##java [07:50]
Maldivia nonconvergent: https://www.ideone.com/Jp6GR0 [07:50]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [07:59]
earthy [earthy!~arthurvl@deban2.xs4all.space] has joined ##java [08:12]
DaPinkOne what are gradle/maven/sbt for? [08:22]
Maldivia maven [08:22]
Maldivia Maven is a software management tool that can compile, test, package, and deploy your project, with plugins for everything you can think of. See http://maven.apache.org and https://books.sonatype.com/mvnref-book/reference/index.html [08:22]
DaPinkOne i've looked them up and i got something about 'building a probject' [08:22]
Maldivia gradle [08:22]
Maldivia Maldivia, gradle is a build tool written in groovy and provides a groovy dsl that enables you to perform dependency management and imperative build scripting. See http://gradle.org for more. [08:22]
DaPinkOne does eclipse not already do those things? [08:22]
Maldivia yes and no [08:23]
Maldivia you send your project to me, I cannot compile it then as I don't use eclipse, but I have maven and gradle, and my IDE supports reading maven and gradle build scripts [08:24]
DaPinkOne so they're build tools to enable ide-independence? [08:25]
Maldivia basically, they are the industry accepted build systems [08:26]
Maldivia yes, ide dependency, allows you to build your stuff in a CI environment, etc [08:26]
Maldivia ehh independency* [08:26]
DaPinkOne i hadn't considered that could be a problem in CI [08:27]
Maldivia you want Eclipse installed on CI? [08:27]
ron Maldivia: umm, headless, sure. [08:29]
ron D [08:29]
DaPinkOne Maldivia: no, i'm just trying to get a handle on the environment. I'm using eclipse for my first large java project, and one of the packages I need's docs says i need maven/gradle/etc in order to install. [08:29]
con3 [con3!~kvirc@ml.sun.ac.za] has joined ##java [08:29]
DaPinkOne i'm kindof thrown into the deep end, honestly [08:29]
Maldivia you don't"need", but really should [08:30]
Maldivia quickstart [08:30]
Maldivia Start a basic java project with https://bitbucket.org/marshallpierce/java-quickstart for gradle or https://github.com/jottinger/starter-archetype for maven. [08:30]
DaPinkOne i imagine i could hack it together 'cause the code is on github, but that's not recommended [08:30]
ron if you work on a project for learning purposes and you're working on it on your own, using eclipse to do the build for you is fine. however, since it is the common way to build java projects, you should learn maven at some point. [08:31]
Maldivia the basic maven or Gradle is simple, specify the dependencies and that's aboit it [08:31]
Maldivia maven/gradle just makes using 3rd party dependencies a lot simpler [08:32]
DaPinkOne alright, i'll get it goin. thanks for your quick response :) [08:32]
ron also, the truth is... [08:33]
ron nobody knows maven. everyone just copies and pastes. [08:33]
bohrbug_ [bohrbug_!~bohrbug@162-233-95-15.lightspeed.livnmi.sbcglobal.net] has joined ##java [08:33]
bohrbug_ [bohrbug_!~bohrbug@162-233-95-15.lightspeed.livnmi.sbcglobal.net] has joined ##java [08:37]
bohrbug_ [bohrbug_!~bohrbug@162-233-95-15.lightspeed.livnmi.sbcglobal.net] has joined ##java [08:44]
VegetarianFalcon [VegetarianFalcon!uid258908@gateway/web/irccloud.com/x-qqkougzotxdqfybc] has joined ##java [08:55]
nivag [nivag!~gavin@121.99.202.67] has joined ##java [08:58]
Goplat [Goplat!~Goplat@reactos/developer/Goplat] has joined ##java [08:59]
whaley [whaley!~whaley@c-73-78-132-227.hsd1.co.comcast.net] has joined ##java [09:04]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [09:07]
dj_pi [dj_pi!~dj_pi@d4-50-214-166.col.wideopenwest.com] has joined ##java [09:16]
bohrbug_ [bohrbug_!~bohrbug@162-233-95-15.lightspeed.livnmi.sbcglobal.net] has joined ##java [09:19]
alureon [alureon!~alureon@unaffiliated/proxa] has joined ##java [09:24]
EgonX [EgonX!~Egon@2601:2c6:47f:98f4:4515:8942:9d28:4d5c] has joined ##java [09:26]
orbyt_ [orbyt_!~orbyt@172.92.5.20] has joined ##java [09:28]
g00s [g00s!~g00s@unaffiliated/g00s] has joined ##java [09:30]
whaley [whaley!~whaley@c-73-78-132-227.hsd1.co.comcast.net] has joined ##java [09:33]
nonconvergent [nonconvergent!4952f768@gateway/web/freenode/ip.73.82.247.104] has joined ##java [09:42]
alureon [alureon!~alureon@unaffiliated/proxa] has joined ##java [09:48]
di0_ [di0_!~di0_@unaffiliated/di0-/x-5053590] has joined ##java [09:52]
nonconvergent Hmm, how do I get an inherited inner class via reflection? [09:53]
AfroThundr|main [AfroThundr|main!~AfroThund@countervandalism/AfroThundr3007730] has joined ##java [09:54]
AfroThundr|main [AfroThundr|main!~AfroThund@countervandalism/AfroThundr3007730] has joined ##java [10:00]
orbyt_ [orbyt_!~orbyt@172.92.5.20] has joined ##java [10:06]
alureon [alureon!~alureon@unaffiliated/proxa] has joined ##java [10:09]
t2mkn [t2mkn!~t2mkn@43.226.2.118] has joined ##java [10:10]
Buliarous [Buliarous!~gypsydang@unaffiliated/buliarous] has joined ##java [10:11]
Buliarous [Buliarous!~gypsydang@unaffiliated/buliarous] has joined ##java [10:12]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [10:21]
dez [dez!uid92154@fedora/deSouza] has joined ##java [10:35]
phoenixdeac [phoenixdeac!~phoenixde@adsl-75-60-246-19.dsl.wotnoh.sbcglobal.net] has joined ##java [10:35]
dj_pi [dj_pi!~dj_pi@d4-50-214-166.col.wideopenwest.com] has joined ##java [10:40]
learningc [learningc!~learningc@mti-37-145.tm.net.my] has joined ##java [10:40]
whaley [whaley!~whaley@c-73-78-132-227.hsd1.co.comcast.net] has joined ##java [10:41]
kgrimes2 [kgrimes2!~kgrimes2@172-11-18-93.lightspeed.irvnca.sbcglobal.net] has joined ##java [11:07]
yokel [yokel!~yokel@unaffiliated/contempt] has joined ##java [11:13]
NorthwestVegan [NorthwestVegan!~Northwest@gateway/tor-sasl/northwestvegan] has joined ##java [11:27]
Anthaas [Anthaas!~Anthaas@unaffiliated/anthaas] has joined ##java [11:27]
vdamewood [vdamewood!~vdamewood@unaffiliated/vdamewood] has joined ##java [11:34]
alureon [alureon!~alureon@unaffiliated/proxa] has joined ##java [11:37]
CombatVet [CombatVet!~CombatVet@gateway/tor-sasl/combatvet] has joined ##java [11:41]
forgottenone [forgottenone!~forgotten@176.88.97.248] has joined ##java [11:45]
RedSoxFan07 [RedSoxFan07!~Thunderbi@137.103.109.45] has joined ##java [11:51]
chonkin [chonkin!~katyab@c-75-67-100-34.hsd1.nh.comcast.net] has joined ##java [11:52]
tassee [tassee!~tasse@55d4a8f5.access.ecotel.net] has joined ##java [11:59]