Info

Login

Channels

APIs

Credits

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

« 2019-02-11

2019-02-12

2019-02-13 »

Nick Message Date
w17t [w17t!~w17t@unaffiliated/w17t] has joined ##java [12:01]
immibis [immibis!~immibis@125-238-72-168-fibre.sparkbb.co.nz] has joined ##java [12:01]
Masterphi [Masterphi!~Masterphi@unaffiliated/masterphi] has joined ##java [12:02]
aeveltstra DarkTwiz: Try #android-dev [12:06]
SuperLag parted the channel: [12:12]
Me4502 [Me4502!~Me4502@unaffiliated/me4502] has joined ##java [12:13]
deavmi [deavmi!~deavmi@146.232.65.210] has joined ##java [12:23]
Muzer [Muzer!~muzer@tim32.org] has joined ##java [12:27]
metrixx [metrixx!~metrixx@unaffiliated/metrixx] has joined ##java [12:30]
bswolf [bswolf!~BSWolf@cpe-66-75-34-36.san.res.rr.com] has joined ##java [12:31]
rwheadon [rwheadon!~rwheadon@2600:1700:17a0:58ef:4cd6:679f:6fc4:6ffa] has joined ##java [12:34]
seven-eleven i'd like to implement a protocol (learning purpose), which one is easy to implement? Even for FTP there's a long specification document (provided you implement all the commands): https://tools.ietf.org/html/rfc959 [12:36]
wbrawner [wbrawner!~wbrawner@187.235.71.142] has joined ##java [12:40]
wilbert [wilbert!~wilbert@unaffiliated/wilbert] has joined ##java [12:40]
DaPinkOne seven-eleven: if it's for learning purposes, you probably don't need the whole protocol [12:40]
seven-eleven aight, then I'd implement only the fundamental things [12:40]
DaPinkOne if you're only looking for bare bones, http can be pretty straight forward [12:41]
seven-eleven should I go for something like FTP, HTTP or something different? I think things like SIP, HLS are too sophisticated [12:41]
seven-eleven mhm ok [12:41]
shicks255__ [shicks255__!~quassel@ool-4354603e.dyn.optonline.net] has joined ##java [12:46]
immibis seven-eleven: any protocol? HTTP is certainly doable. you can play it by trial-and-error if it's just a prototype, same for FTP [12:48]
maryo [maryo!~Maryo@unaffiliated/maryo] has joined ##java [12:48]
studyzombie [studyzombie!uid103377@gateway/web/irccloud.com/x-jrskmmbkrqrmyuby] has joined ##java [12:48]
immibis IRC also [12:48]
pangolino [pangolino!~pangolino@93.115.193.206] has joined ##java [12:51]
seven-eleven this should be the src code of the signal protocol? https://github.com/signalapp/Signal-Server/tree/master/src/main/java/org/whispersystems [12:51]
seven-eleven seven-eleven's title: "Signal-Server/src/main/java/org/whispersystems at master signalapp/Signal-Server GitHub" [12:51]
studyzombie parted the channel: [12:52]
Chepra [Chepra!~chepra@summer.c137.eu] has joined ##java [01:09]
maryo [maryo!~Maryo@unaffiliated/maryo] has joined ##java [01:11]
dgtlcmo [dgtlcmo!~dgtlcmo@c-73-143-114-238.hsd1.ma.comcast.net] has joined ##java [01:13]
immibis seven-eleven: maybe, not gonna check [01:16]
DarkTwiz aeveltstra: thank you! [01:23]
bugzy_on_busy1 [bugzy_on_busy1!~Thunderbi@64.52.85.12] has joined ##java [01:27]
veegee [veegee!~veegee@ipagstaticip-3d3f7614-22f3-5b69-be13-7ab4b2c585d9.sdsl.bell.ca] has joined ##java [01:29]
junktext [junktext!~junktext@fsf/member/junktext] has joined ##java [01:35]
veegee [veegee!~veegee@ipagstaticip-3d3f7614-22f3-5b69-be13-7ab4b2c585d9.sdsl.bell.ca] has joined ##java [01:45]
OnceMe [OnceMe!~OnceMe@unaffiliated/onceme] has joined ##java [02:00]
patstoms [patstoms!~patstoms@tzt.lv] has joined ##java [02:04]
runlevel7 [runlevel7!~runlevel7@unaffiliated/runlevel7] has joined ##java [02:05]
ravenousmoose_ [ravenousmoose_!~ravenousm@194.78.35.195] has joined ##java [02:14]
coalado [coalado!~Thomas@unaffiliated/coalado] has joined ##java [02:15]
kikudjiro [kikudjiro!~kikudjiro@78.158.215.166] has joined ##java [02:15]
Shoe0nHead [Shoe0nHead!uid204639@gateway/web/irccloud.com/x-yvolkzdnvahuildu] has joined ##java [02:24]
harha_ [harha_!~harha@ns356919.ip-91-121-144.eu] has joined ##java [02:27]
nebulae [nebulae!~nebulae@2a02:587:a25:c400:cc69:1022:3cc2:f7ac] has joined ##java [02:29]
ogradyd [ogradyd!~Thunderbi@2a02:8070:88bf:9df0::212] has joined ##java [02:35]
Galactus [Galactus!~Galactus@unaffiliated/galactus] has joined ##java [02:37]
acidjnk [acidjnk!~acid@i577BCA28.versanet.de] has joined ##java [02:39]
coalado [coalado!~Thomas@unaffiliated/coalado] has joined ##java [02:42]
NorthwestVegan [NorthwestVegan!~Northwest@gateway/tor-sasl/northwestvegan] has joined ##java [02:43]
Matthijs [Matthijs!~quassel@unaffiliated/matthijs] has joined ##java [02:44]
plitter [plitter!~plitter@183.109.95.88.customer.cdi.no] has joined ##java [02:46]
coalado1 [coalado1!~Thomas@unaffiliated/coalado] has joined ##java [02:53]
SuperTyp [SuperTyp!~SuperTyp@212.203.123.78] has joined ##java [02:56]
mohsen_1 [mohsen_1!uid289573@gateway/web/irccloud.com/x-oxaydxcpjtusbfzj] has joined ##java [02:59]
sauvin [sauvin!sauvin@about/linux/staff/sauvin] has joined ##java [03:00]
Globe_Bloater [Globe_Bloater!~username@static.101.100.203.116.clients.your-server.de] has joined ##java [03:11]
powerbit [powerbit!~powerbit@5-15-17-196.residential.rdsnet.ro] has joined ##java [03:19]
mitch0 [mitch0!~mitch@188-143-39-71.pool.digikabel.hu] has joined ##java [03:22]
rruizt [rruizt!~rruizt@5354177C.cm-6-5a.dynamic.ziggo.nl] has joined ##java [03:26]
computeiro [computeiro!~computeir@189.15.123.248] has joined ##java [03:32]
introom [introom!introom@unaffiliated/introom] has joined ##java [03:33]
enoq [enoq!~enoq@2a02:8388:6a87:b080:649f:9456:c1b1:28e4] has joined ##java [03:34]
introom what's happening with java11 regarding the api doc? [03:34]
introom for the `getMethod', https://docs.oracle.com/javase/10/docs/api/java/lang/Class.html [03:35]
introom java10 has the page. [03:35]
introom but 11 is missing on this: https://docs.oracle.com/javase/11/docs/api/java/lang/Class.html [03:35]
yawkat they changed the structure [03:39]
yawkat https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html [03:39]
enoq [enoq!~enoq@80-110-93-204.cgn.dynamic.surfer.at] has joined ##java [03:56]
Me4502 [Me4502!~Me4502@unaffiliated/me4502] has joined ##java [03:56]
ravenousmoose [ravenousmoose!~ravenousm@194.78.35.195] has joined ##java [04:05]
Markow [Markow!~ejm@176.122.215.103] has joined ##java [04:23]
helderc [helderc!~helderc@177.180.100.205] has joined ##java [04:30]
erg0s2 [erg0s2!~erg0s1@179.189.156.112] has joined ##java [04:31]
Kakky [Kakky!~Kakky@202.142.80.150] has joined ##java [04:35]
vdamewood [vdamewood!~vdamewood@unaffiliated/vdamewood] has joined ##java [04:40]
ravenousmoose [ravenousmoose!~ravenousm@194.78.35.195] has joined ##java [04:41]
ViralTaco [ViralTaco!~dork@unaffiliated/d-b/x-8688605] has joined ##java [04:42]
zulutango [zulutango!~zulutango@static-n49-176-171-248.mas2.nsw.optusnet.com.au] has joined ##java [04:47]
Gazooo [Gazooo!~Gazooo@142.196.183.136] has joined ##java [05:07]
ravenousmoose [ravenousmoose!~ravenousm@194.78.35.195] has joined ##java [05:10]
v01d4lph4 [v01d4lph4!~v01d4lph4@223.225.8.128] has joined ##java [05:12]
AndrewBass [AndrewBass!~chatzilla@109-73-33-210.in-addr.mastertelecom.ru] has joined ##java [05:19]
exonity01 [exonity01!2e059f99@gateway/web/freenode/ip.46.5.159.153] has joined ##java [05:19]
exonity01 Hello [05:19]
exonity01 Do you know if its possible to order by an joined field with the pagable object (this.repository.findAll(specification, pageable);) [05:21]
exonity01 I got a table user and a table address and I like to sort it with user.address [05:21]
gryffus [gryffus!~gryffus@unaffiliated/gryffus] has joined ##java [05:29]
deavmi [deavmi!~deavmi@146.232.65.210] has joined ##java [05:30]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [05:33]
aeveltstra exonity01: Yes, that is possible. How to do it depends on your choice of DAO framework (if any). A straightforward comparator should work for custom DAOs. [05:36]
yawkat O.o [05:37]
Kakky [Kakky!~Kakky@202.142.80.150] has joined ##java [05:40]
rajrajraj [rajrajraj!uid72176@gateway/web/irccloud.com/x-osgrmdczhxyjxikm] has joined ##java [05:40]
deavmi [deavmi!~deavmi@146.232.65.210] has joined ##java [05:56]
exonity01 Ah sorry, I thought I joined #spring. :-) findAll is the spring repository method [05:57]
exonity01 But I got an solution by adding the sort orders to the specification [05:58]
Sonderblade [Sonderblade!~user@2001:6b0:1:1df0:f68e:38ff:fe7a:6914] has joined ##java [05:58]
Sonderblade how would you convert a stream of type Stream<int[][]> to int[][][]? [06:01]
yawkat using toArray? [06:02]
yawkat and then wonder why youre using arrays in the first place [06:02]
Sonderblade please type the exact invocation of toArray [06:03]
badSophia [badSophia!~moretz@175.223.38.37] has joined ##java [06:06]
badSophia java is not popular now? because number of member is only 491 :( [06:07]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [06:13]
sonOfRa It's IRC that is not popular. [06:14]
sonOfRa None of my colleagues, or friends from university who have java jobs come here. Only very few people are around on IRC these days [06:14]
badSophia sonOfRa: ah ok [06:16]
markoong [markoong!~marco@88.202.177.232] has joined ##java [06:21]
Byteflux [Byteflux!~byte@byteflux.net] has joined ##java [06:22]
kupi [kupi!uid212005@gateway/web/irccloud.com/x-wawftmoazahmsouz] has joined ##java [06:22]
badSophia can i study java with https://www.youtube.com/watch?v=grEKMHGYyns [06:24]
badSophia badSophia's title: "Learn Java 8 - Full Tutorial for Beginners - YouTube" [06:24]
badSophia ? [06:24]
yohnnyjoe [yohnnyjoe!~yohnnyjoe@c-73-129-2-10.hsd1.dc.comcast.net] has joined ##java [06:25]
badSophia sonOfRa: ? [06:26]
exonity01 sonOfRa? From jtox? [06:27]
exonity01 ;) [06:27]
sonOfRa the one. Haven't touched tox code in a while, but I am still working on some tox stuff behind the scenes. Will show up in a few months with some results. [06:28]
sonOfRa badSophia: no idea [06:28]
sonOfRa tutorial [06:28]
sonOfRa The Oracle tutorial for Java is probably your best starting point, at https://docs.oracle.com/javase/tutorial . Skip the Netbeans bits. Another option: https://www.ktbyte.com/java-tutorial - https://hackr.io/tutorials/java has a list of others as well. [06:28]
computeiro [computeiro!~computeir@189.15.123.248] has joined ##java [06:28]
Karyon [Karyon!~karyon@unaffiliated/karyon] has joined ##java [06:29]
nbro [nbro!~nbro@2a02:aa13:3100:6000:d08d:aadc:6e05:186c] has joined ##java [06:33]
Addax badSophia: the only way for you to tell is to try it. Most people use the tutorial, but different people learn in different ways. [06:35]
palasso [palasso!~palasso@unaffiliated/palasso] has joined ##java [06:43]
badSophia yeah then i m different people 8) [06:48]
badSophia Addax: [06:49]
Karyon [Karyon!~karyon@unaffiliated/karyon] has joined ##java [06:52]
Addax everyone's different [06:53]
Addax some people learn by watching a demonstration, others by reading, others by experimenting [06:53]
badSophia ah [06:54]
badSophia ok [06:54]
badSophia Addax: 8) [06:54]
badSophia anyway what os is good to learn java? [06:54]
badSophia Addax: ? [06:54]
Addax People wouldn't make tutorial videos if there wasn't a market for them [06:54]
Addax badSophia: err... any OS, it's java [06:54]
badSophia any os [06:54]
badSophia 8) [06:54]
badSophia windows 10 is good? [06:55]
Addax sure [06:55]
badSophia ok [06:55]
badSophia then i must use eclipse? [06:55]
q9929t [q9929t!~Thunderbi@223.227.8.59] has joined ##java [06:55]
Addax ide [06:55]
Addax Addax, ide is short for Integrated Development Environment. You don't *need* one to write java code but it's strongly recommended. The big two (and you should pick one of these two; try them out and decide for yourself which one you like more) are: Eclipse (www.eclipse.org) and IntelliJ IDEA (www.jetbrains.com/idea); they have their own freenode channels at #idea-users and #eclipse [06:55]
badSophia yeah i will use eclipse [06:56]
togo [togo!~togo@2a01:5c0:e08f:71c1:462e:547b:133c:1d21] has joined ##java [07:03]
togo I have tried everything to configure my hexchat to authenticate with nickserv in order to autojoin here, what works? [07:05]
togo is #java and ##java the same? [07:07]
AMcBain togo, you know you can send your password to your account as the server password (freenode repurposed it) for auto-login, right? Rarely it'll be a little too slow to occur before you join channels. [07:07]
AMcBain togo, #java should forward to ##java but ##java is the correct channel. [07:07]
ericek111 [ericek111!~ericek111@109-230-55-69.dynamic.orange.sk] has joined ##java [07:08]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [07:09]
acidjnk Requirement description: "Create a scheduled task that deletes all entries from the DB that don't belong to the main user, every 10 minutes.". What was really needed: "Show only entries in the table on the website that belong to the user who is currently logged in." [07:10]
[twisti] ## [07:11]
[twisti] togo, It's ##java and not #java because of freenode rules. One hash is for "official channels", and since Oracle didn't set up the channel here, we're "unofficial". See http://freenode.net/policies#channel-ownership [07:11]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [07:13]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [07:15]
togo Thanks! [07:23]
sbeex logs [07:31]
sbeex sbeex, channel logs can be found at http://javabot.evanchooly.com/ (Select the channel from the list on the left-hand side.) [07:31]
sbeex cool patern! [07:31]
SuperTyp [SuperTyp!~SuperTyp@212.203.123.78] has joined ##java [07:32]
SuperTyp [SuperTyp!~SuperTyp@212.203.123.78] has joined ##java [07:33]
acidjnk What's up with this trend of complex hashCode implementations that take literally all fields into account? In almost 100 % of classes, I can make a very very low collision hashCode using 1 or 2 fields, e. g. having a class UserGroup: return groupName.hashCode(); add a null check if you must. Yet it feels to me like hashCode implementations grow bigger and bigger over the years. [07:36]
cheeser whatever is used in equals() should be used in hashCode(). it's that simple. [07:37]
ravenousmoose [ravenousmoose!~ravenousm@194.78.35.195] has joined ##java [07:38]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [07:38]
acidjnk I think the opposite: As few fields as possible should be used, while just making sure the combination of those fields is fairly unique (e. g. simple probability, or a DB-constraint). [07:39]
sonOfRa acidjnk: you may think that, but you'd be wrong, because you're going to break things if your equals and hashcode aren't consistent [07:40]
acidjnk I just have to make sure that hashCode is the same when equals is true. [07:41]
cheeser so use as few fields in equality as you can. use those fields for hashing. win/win [07:42]
cheeser but you're bucking 20 years (at least) of common advice and best practice. [07:43]
stryek [stryek!uid332574@gateway/web/irccloud.com/x-ygftrktchcggsmwd] has joined ##java [07:47]
peaceguy [peaceguy!~yu68@unaffiliated/peaceguy] has joined ##java [07:55]
conan [conan!~conan@mdproctor.plus.com] has joined ##java [07:57]
deavmi [deavmi!~deavmi@146.232.65.210] has joined ##java [08:04]
themsay [themsay!~themsay@149.254.235.31] has joined ##java [08:06]
yawkat using partial equals feels odd [08:12]
yawkat partial hashcode, not so much [08:12]
SuperTyp [SuperTyp!~SuperTyp@212.203.123.78] has joined ##java [08:16]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [08:19]
Karyon_ [Karyon_!~karyon@unaffiliated/karyon] has joined ##java [08:22]
surial acidjnk: So, what's the theory, here? [08:26]
surial acidjnk: [A] having hashCode() methods being more complicated than they need to be is a problem because that means a higher likelyhood of bugs and more code to look at and maintain, and/or [B] I think the performance could be better if you include fewer fields in the hashcode, or [C] something else that I didn't really understand from your missive. [08:26]
peaceguy [peaceguy!~yu68@unaffiliated/peaceguy] has joined ##java [08:27]
mbooth But who cares, the implementations of hashcode/equals that are generated by my IDE are fine most of the time. How many of these are you implementing by hand anyway? [08:29]
badSophia parted the channel: [08:30]
Ruckus [Ruckus!~textual@c-67-185-162-233.hsd1.wa.comcast.net] has joined ##java [08:32]
t2mkn [t2mkn!~t2mkn@43.226.2.173] has joined ##java [08:32]
Ruckus [Ruckus!~textual@c-67-185-162-233.hsd1.wa.comcast.net] has joined ##java [08:33]
ravenousmoose [ravenousmoose!~ravenousm@194.78.35.195] has joined ##java [08:33]
surial mbooth: I'm asking acidjnk in which way, specifically, he cares. [08:33]
surial mbooth: also, if you're letting your IDE generate your hashcode impls, you're defintely fucking up. [08:33]
Ruckus [Ruckus!~textual@c-67-185-162-233.hsd1.wa.comcast.net] has joined ##java [08:34]
surial mbooth: let's say you have 8 fields, and you let your IDE auto-gen. Then, a month later, you or someone else adds another field. [08:34]
surial mbooth: do you remember to add these to the hashCode/equals impls? The fact that you've already involved 8 fields means it is somewhat likely you're just not gonna casually eyeball the problem anymore, that's a lot of trees hiding the forest. [08:34]
Ruckus [Ruckus!~textual@c-67-185-162-233.hsd1.wa.comcast.net] has joined ##java [08:34]
Ruckus [Ruckus!~textual@c-67-185-162-233.hsd1.wa.comcast.net] has joined ##java [08:35]
Ruckus [Ruckus!~textual@c-67-185-162-233.hsd1.wa.comcast.net] has joined ##java [08:36]
Ruckus [Ruckus!~textual@c-67-185-162-233.hsd1.wa.comcast.net] has joined ##java [08:37]
surial cheeser: Ruckus might need a temp ban for bouncing. [08:37]
Ruckus [Ruckus!~textual@c-67-185-162-233.hsd1.wa.comcast.net] has joined ##java [08:38]
hassoon[work] [hassoon[work]!hassoon@gateway/shell/blinkenshell.org/x-vwvtwclyohmckgue] has joined ##java [08:38]
hassoon[work] 'evening [08:38]
surial Hello. [08:38]
Ruckus [Ruckus!~textual@c-67-185-162-233.hsd1.wa.comcast.net] has joined ##java [08:38]
surial waz, Addax: Ruckus is bouncing in and out. [08:39]
Ruckus [Ruckus!~textual@c-67-185-162-233.hsd1.wa.comcast.net] has joined ##java [08:39]
Ruckus [Ruckus!~textual@c-67-185-162-233.hsd1.wa.comcast.net] has joined ##java [08:40]
giaco [giaco!~jack@2-238-151-49.ip244.fastwebnet.it] has joined ##java [08:40]
giaco hello [08:40]
Ruckus [Ruckus!~textual@c-67-185-162-233.hsd1.wa.comcast.net] has joined ##java [08:41]
Ruckus [Ruckus!~textual@c-67-185-162-233.hsd1.wa.comcast.net] has joined ##java [08:41]
giaco How to write a Short[] to an OutputStream? Short[] is a buffer from an audiosource (PCM16), OutputStream is process.outputStream (external process waiting for PCM16 in stdin) [08:42]
Ruckus [Ruckus!~textual@c-67-185-162-233.hsd1.wa.comcast.net] has joined ##java [08:42]
DTZUZO [DTZUZO!~DTZUZO@S0106bcd16584b0aa.vs.shawcable.net] has joined ##java [08:42]
Ruckus [Ruckus!~textual@c-67-185-162-233.hsd1.wa.comcast.net] has joined ##java [08:43]
Ruckus [Ruckus!~textual@c-67-185-162-233.hsd1.wa.comcast.net] has joined ##java [08:44]
Ruckus [Ruckus!~textual@c-67-185-162-233.hsd1.wa.comcast.net] has joined ##java [08:45]
Ruckus [Ruckus!~textual@c-67-185-162-233.hsd1.wa.comcast.net] has joined ##java [08:46]
Ruckus [Ruckus!~textual@c-67-185-162-233.hsd1.wa.comcast.net] has joined ##java [08:47]
Ruckus [Ruckus!~textual@c-67-185-162-233.hsd1.wa.comcast.net] has joined ##java [08:47]
Ruckus [Ruckus!~textual@c-67-185-162-233.hsd1.wa.comcast.net] has joined ##java [08:48]
Ruckus [Ruckus!~textual@c-67-185-162-233.hsd1.wa.comcast.net] has joined ##java [08:49]
Ruckus [Ruckus!~textual@c-67-185-162-233.hsd1.wa.comcast.net] has joined ##java [08:50]
surial giaco: Short[], with a capital S? [08:50]
Ruckus [Ruckus!~textual@c-67-185-162-233.hsd1.wa.comcast.net] has joined ##java [08:51]
cfoch [cfoch!uid153227@gateway/web/irccloud.com/x-xifqidfmbrzfciqa] has joined ##java [08:51]
bendem wrap in a DataOutputStream and loop over your array calling writeShort [08:51]
surial cheeser, dmlloyd, Addax, Maldivia, kinabalu: Wake up already. [08:51]
athidhep [athidhep!~sb35@unaffiliated/athidhep] has joined ##java [08:52]
surial bendem: weird overkill. [08:52]
Ruckus [Ruckus!~textual@c-67-185-162-233.hsd1.wa.comcast.net] has joined ##java [08:52]
surial giaco: Short[] with a capital S indicates something fucked up is happening, that should be a short[]; a Short[] is ridiculously inefficient, which seems relevant for audio handling. Yes, loop; note that you'll need to figure out HOW these shorts are to be written to the outputstream. [08:52]
Ruckus [Ruckus!~textual@c-67-185-162-233.hsd1.wa.comcast.net] has joined ##java [08:52]
bendem surial, it's an answer that's valid and that doesn't need much explanation for beginners. Sure there are other ways, but that one is easy to understand for beginners. [08:52]
surial giaco: the simplest possible ways are as a 16-bit raw value, but then you need to know if it's to be in little endian format or big endian format. [08:52]
akaWolf [akaWolf!~akaWolf@unaffiliated/akawolf] has joined ##java [08:53]
waz sorry, wasn't at my desk [08:53]
Ruckus [Ruckus!~textual@c-67-185-162-233.hsd1.wa.comcast.net] has joined ##java [08:53]
waz seems like his network finally crashed :) [08:53]
bendem nope [08:53]
waz nope! [08:53]
surial waz: nice timing :P [08:53]
waz as always [08:54]
Ruckus [Ruckus!~textual@c-67-185-162-233.hsd1.wa.comcast.net] has joined ##java [08:54]
ArcherL [ArcherL!~ArcherL@unaffiliated/archerl] has joined ##java [08:54]
Ruckus [Ruckus!~textual@c-67-185-162-233.hsd1.wa.comcast.net] has joined ##java [08:55]
waz fixed! [08:55]
Karyon [Karyon!~karyon@unaffiliated/karyon] has joined ##java [09:01]
giaco surial: sorry, I write capital S accidentally. My mistake. It is obviously a short[] array [09:02]
bendem giaco, I'd stuff everything into a bytebuffer so you can set the byte order, wrap the outputstream you have using Channels.newChannel(OutputStream) and do the read/putShort/flip/write dance with that [09:05]
dgtlcmo [dgtlcmo!~dgtlcmo@c-73-143-114-238.hsd1.ma.comcast.net] has joined ##java [09:07]
giaco bendem: I used a bytebuffer before, but then when I added a calculate audio volume procedure between reading PCM and save to outputstream and I realised that while writing into a bytebuffer was quite efficient, reading bytes from it (I calculate volumes by averaging PCM values in buffer) was not, so I fallback to normal short[] array [09:10]
bendem reading from a bytebuffer was ineficient? [09:11]
giaco bendem: yes [09:12]
yawkat [citation needed] [09:12]
yawkat how did you measure? [09:12]
bendem guess you get to loop over your short array and write each short as two bytes to the output stream thne [09:12]
bendem but yeah, I don't actually believe you [09:12]
SJr Is there any divine wisdom I can take out of the fact that the java.util.concurrent.Flow functionality has nested interfaces under the Flow class instead of just having a package like java.util.concurrent.flow; [09:13]
giaco yawkat: programming on android and using java function trace, so well, it may be related to android and not strictly java [09:13]
yawkat android [09:13]
yawkat Android is Google's OS based on Linux and a non-Java-bytecode Virtual Machine. See http://developer.android.com/ . Start in #android-dev if you have Android development questions - and if you use Android's API or you're running it on Android, you have an Android development question. [09:13]
bendem beeeeeep, you just lost everyone's time [09:13]
sb35 [sb35!~sb35@184.75.215.11] has joined ##java [09:13]
bendem IO apis in android do not work identically as java's. You come asking for help, we give you java help, none of it is relevant to your problem [09:14]
mluser-home [mluser-home!~mluser-ho@ip68-0-67-199.tu.ok.cox.net] has joined ##java [09:15]
Karyon_ [Karyon_!~karyon@unaffiliated/karyon] has joined ##java [09:15]
giaco I came here asking how use a collection/type present both in android api and java api, and therefore you told me how to perform such conversion and the quesiton/aswer was valid. I am aware about the difference between the OS implementation of the VM and I didn't came here initially to compare the performance of the two (I am already logged to android-dev channel), but I don't understand why I should lie if you [09:17]
giaco strictly ask me how I performed the performance inspection. I was still talking about how to chain function calls, not why this/that behaves different than expected [09:17]
Lymia [Lymia!lymia@magical.girl.lyrical.lymia.moe] has joined ##java [09:17]
giaco If yoi think it is offtopic anyway even when the given answer is relevant to the proposed question, I think it is better to just say that you like java but hate android. I accept that [09:18]
Scarecr0w Excuse me please, Could anyone help me confirm the Big-O runtime for this function in two test cases (lst being an ArrayList, and LinkedList)? https://ghostbin.com/paste/hjrzk [09:19]
yawkat giaco: the problem is that the stdlib is not only implemented differently but also behaves differently [09:19]
yawkat advice for the java stdlib does not apply to android [09:19]
SJr Scarecr0w, confirm what, you have no answer :) [09:20]
Scarecr0w Oh sorry, I think O(logN) for ArrayList and O(NlogN) for linkedlist or O(N^2). [09:20]
SJr Um no :( [09:21]
Scarecr0w dang [09:21]
mohsen_1 [mohsen_1!uid289573@gateway/web/irccloud.com/x-gklkdfcplygrhlcq] has joined ##java [09:21]
SJr why would it be log(n) ? [09:21]
SJr log typically only appears when your are subdividing the problem. [09:21]
Scarecr0w i += 2? hmmm, ah shit [09:21]
Scarecr0w So would it still be O(N)? [09:22]
Scarecr0w for ArrayList? [09:22]
SJr Yes. [09:22]
SJr log(n) appears in binary search, or sorting, because you repeatedly cut the array in two and recurse. [09:22]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [09:22]
NeXTSUN [NeXTSUN!~textual@c-73-193-166-105.hsd1.nj.comcast.net] has joined ##java [09:23]
Scarecr0w Thank you so much, so for LinkedList, i'm gonna go on a limb and say O(N^2) as .get() needs to iterate thru the list.. Would I be correct? [09:23]
yawkat yes [09:23]
Scarecr0w Thankies, awesome. [09:23]
SJr Although I wonder if LinkedList internally keeps track of the latest get(), it seems like a easy optimization. [09:23]
yawkat it does not [09:24]
SJr But for comp sci problems the answer is probably O(n^2) [09:24]
bendem that's why you use iterators [09:25]
Scarecr0w SJr: Could I just bother you once more? Because you explained log(n) runtime in one sentence with so much clarity, when do I use Nlog(n)? [09:25]
yawkat logn except n times. [09:25]
SJr The term appears whenever you are subdividing a list in half. In searching you don't do it, so it's O(log(n)), when sorting you do it n times as yawkat says. [09:25]
Scarecr0w simple as that. damn, you gents are awesome. [09:26]
SJr I don't think it's that simple :) and I'd caution you against have an illusionary understanding of the issue. [09:27]
giaco yawkat: I know, but I was not asking about the behaviour/implementation of library function, but just what is the java-way to convert this to that because the situation was relevant in both environment and it was caused by my ignorance on the subject. To confirm that, again, your answer was right: I didn't know about DataOutputStream [09:28]
dmlloyd I think sort is n log n isn't it? unless the list was sorted to begin with [09:28]
yawkat dmlloyd: yes, thats what SJr said [09:28]
surial timsort and quicksort are nlogn, yes. [09:28]
yawkat quicksort is not nlogn [09:28]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [09:28]
dmlloyd this IRC client is hard for me to read for some reason [09:29]
surial though, you can construct a list which will effectively O(n^2). It all averages out to O(nlogn) if you hypothetically sort all possible lists and take an average. [09:29]
surial yawkat: yes it is. [09:29]
gryffus [gryffus!~gryffus@unaffiliated/gryffus] has joined ##java [09:29]
surial SOURCE: wikipedia, everybody. [09:29]
yawkat https://en.wikipedia.org/wiki/Quicksort [09:29]
yawkat Worst-case performance O(n2) [09:29]
surial As I just said. [09:29]
surial but _average performance_ is O(nlogn). [09:29]
surial That average includes the worst-case. [09:29]
yawkat for random arrays, sure. [09:30]
dmlloyd backs slowly out of the room [09:30]
yawkat (independently random that is) [09:31]
surial yawkat: I ahve no idea why you decided to get your 'pedantic jackhole' hat out of the box on this. [09:31]
yawkat is it ever in the box? [09:32]
surial If you need to sort shit, and you use quicksort, it'll be O(nlogn).. UNLESS someone is explicitly trrying to fuck with you and feeding you lists engineered to be horrible for quicksort, in which case, yes, it'll be O(n^2), but those engineered lists are the only feasible way that'll happen to you. So, if it's some sort of security (Denial of Service, for example) issue, it's relevant that quicksort can be o(n^2), but other than [09:32]
surial that it jsut will not be. [09:32]
surial In addition, raising the scepter of the exotic worst case in the presence of newbies is an asshole move because it'll just confuse them. [09:32]
surial Can we fucking drop it now? kthx. [09:32]
progart [progart!~kamee@188.115.255.203] has joined ##java [09:33]
surial giaco: did you ever answer in what format you want to write these shorts to the outputstream? [09:33]
surial giaco: There is no 'uh, whatever' answer to this. It always matters. Various stated answers (Such as using DataOutputStream) make the choice for you, but it'd be a complete coincidence if this so happens to be the correct choice for whatever you're doing. [09:34]
Souvent22 [Souvent22!~eberry@cpe-104-162-100-12.nyc.res.rr.com] has joined ##java [09:35]
progart parted the channel: [09:35]
jcob [jcob!~jcob@152.7.255.195] has joined ##java [09:44]
bluezone [bluezone!uid104970@gateway/web/irccloud.com/x-enhrypkstxawiluv] has joined ##java [09:46]
Rapture [Rapture!~textual@50-204-232-30-static.hfc.comcastbusiness.net] has joined ##java [09:50]
wodencafe [wodencafe!~wodencafe@2605:6000:1517:614c:724d:7bff:fe63:71b6] has joined ##java [09:57]
acidjnk A and B, surial. It just happened that someone in the project created a bug in hashCode, violating the contract. It included suddenly a hashCode from Object that was not overridden. [09:59]
surial acidjnk: You solve [A] by using lombok. [09:59]
rippa [rippa!~rippa@ppp-vpdn-37.1.85.157.yarnet.ru] has joined ##java [09:59]
surial note that going the 'lets include fewer fields' route does open the door to debate as to which fields are 'significant enough' to include, and you can now introduce a more exotic kind of bug: Where you don't use enough fields to get good hc coverage, this is even harder to spot 'at a glance' and requires way more domain knowledge. It also takes automatic generation (via lombok or an IDE or something like auto value) almost [10:00]
surial entirely off the table. [10:00]
jcob [jcob!~jcob@152.7.255.200] has joined ##java [10:00]
acidjnk First he had a bug by having a stack overflow in hashCode. Then someone else tried to fix that, but ended up with a "random" hashCode because it included Object#hashCode. [10:00]
surial And [B]: Well, that's premature optimization horseshittery, isn't it? [10:00]
surial you're comparing the cost of calculating the hash versus the cost of hash collisions. [10:01]
surial Of course, in theory, even if we amortize it all, 'cost of calculation' could definitely exceed the cost of collision, but to answer that question problem, hoo boy that's a gigantic can of wurms. It depends on so many factors, it's effectively unanswerable. [10:01]
surial This all leads me to go: Generate these with lombok. Include every field you feel is relevant to equality. Don't bother splitting up definitions for hashCode and equals (even though the contract does let you use fewer fields in hashCode). [10:02]
surial i.e. you're wrong. [10:02]
surial but it takes some in-depth analysis to figure it out. [10:02]
surial I bet the vast majority of those responsible for equals/hashCode impl haven't put even a tenth of this kind of thought into it, so they kinda stumbled on the right answer by accident. [10:03]
surial nevertheless, the 'wisdom' of the community (just use all fields, don't worry about it unless you have a profiler report specifically showing you there's a real performance issue that is actually having measurable effects on your application) ? is correct. Let's not attempt to guess at why 'the community' came to the right conclusion and rejoice that it did. [10:03]
acidjnk I'm pretty sure that ALl my hashCode implementations of the last 15 years have very low collisions and fulfill the contract. [10:04]
Rapture [Rapture!~textual@50-204-232-30-static.hfc.comcastbusiness.net] has joined ##java [10:04]
Xiti` [Xiti`!~Xiti-@unaffiliated/xiti] has joined ##java [10:04]
surial acidjnk: that's an extremely shortsighted, to the point of stupidity, view of things. [10:04]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [10:05]
surial acidjnk: [A] that's just what you think, or did you spend actual time testing all this? [B] how much time did you waste on this over the years? Note that assuaging [A] makes [B] worse. [C] that says nothing about maintainability, flexibility, bug-prone-ness and other such falsifiable real costs that 'code cleanliness' and its ilk are attempting to accomplish. [10:05]
surial For example, I never wrote any hashCode impl, ever, in the past 15 years. [10:05]
Addax dmlloyd: which irc client are you using? [10:05]
dmlloyd irccloud [10:05]
freeone3000 How do you have a stackoverflow in hashcode? How? [10:06]
yawkat circular references. it's easy with jpa [10:06]
surial I can guarantee you mine had the fewest possible collisions, which automatically beats your track record, and I can guarantee that they fulfill the contract, so that beats your record too. Which leaves performance. Yours may be more performant. Then again, mine might be more performant too (even fewer collisions than yours). Most likely, I bet the difference of all app runs of everything you ever wrote vs. everything I ever [10:06]
surial wrote is measured in a handful of seconds. [10:06]
surial I don't know if your code or my code was 'faster', but I do know it definitely doesn't matter and it pales in comparison to the notion that hashCode is a thing you should usually think about. [10:07]
surial freeone3000: List<Object> list = new ArrayList<Object>(); list.add(list); list.hashCode(); //voila [10:07]
surial acidjnk: and as a separate point: "This idiot coded up something idiotic, and I shall now use this fact to 'prove' that some style the idiot used while doing idiotic things is therefore idiotic" ? is an idiotic strategy for determining code style. [10:09]
surial idiots will be idiots. It doesn't matter what tools or caveats you hand to them: The universe is vastly better at idiocy than you are at fighting it. Therefore, if an idiot will use a tool in an idiotic fashion, do not blame the tool. That proves nothing. [10:09]
surial Let's call it Surial's law of idiocy: Idiocy is not transitive. [10:10]
led_dark_1 [led_dark_1!~Thunderbi@hotspot10.rywasoft.net] has joined ##java [10:12]
NeXTSUN [NeXTSUN!~textual@c-73-193-166-105.hsd1.nj.comcast.net] has joined ##java [10:12]
shirafuno [shirafuno!~shirafuno@cpc76560-dals22-2-0-cust353.20-2.cable.virginm.net] has joined ##java [10:14]
inky [inky!~noch@141.136.76.46] has joined ##java [10:16]
Karyon [Karyon!~karyon@unaffiliated/karyon] has joined ##java [10:19]
w17t [w17t!~w17t@unaffiliated/w17t] has joined ##java [10:19]
tang^ [tang^!~tang^@2604:3d09:47f:fb80:f152:1830:1078:fa23] has joined ##java [10:23]
enoq [enoq!~enoq@2a02:8388:6a87:b080:3f30:9f7d:611e:7eef] has joined ##java [10:29]
rwheadon [rwheadon!~rwheadon@2600:1700:17a0:58ef:4cd6:679f:6fc4:6ffa] has joined ##java [10:30]
Souvent22 [Souvent22!~eberry@72.46.18.100] has joined ##java [10:33]
ravenousmoose [ravenousmoose!~ravenousm@194.78.35.195] has joined ##java [10:34]
jamezp [jamezp!~jamezp@redhat/jboss/jamezp] has joined ##java [10:51]
wodencafe [wodencafe!~wodencafe@2605:6000:1517:614c:724d:7bff:fe63:71b6] has joined ##java [10:52]
Masterphi [Masterphi!~Masterphi@unaffiliated/masterphi] has joined ##java [10:53]
abhixec [abhixec!~abhixec@c-24-130-65-112.hsd1.ca.comcast.net] has joined ##java [10:54]
tachoknight [tachoknight!~tachoknig@205.178.20.7] has joined ##java [10:58]
ArcherL [ArcherL!~ArcherL@unaffiliated/archerl] has joined ##java [11:06]
sainathvd [sainathvd!~sainathvd@27.97.134.41] has joined ##java [11:13]
adder [adder!~adder@gateway/tor-sasl/adder] has joined ##java [11:15]
kikudjiro [kikudjiro!~kikudjiro@78.158.215.166] has joined ##java [11:21]
DrTenma [DrTenma!DrTenma@gateway/shell/panicbnc/x-vuofgbimakkttgqd] has joined ##java [11:23]
martin989 [martin989!~Matt@97.84.186.252] has joined ##java [11:28]
srisri [srisri!~srisri@204.14.239.13] has joined ##java [11:31]
w17t [w17t!~w17t@unaffiliated/w17t] has joined ##java [11:32]
karoshii I'm getting the following warning :: Method ignores results of InputStream.read() - https://dpaste.de/fEhV [11:33]
karoshii karoshii's title: "dpaste/fEhV (Python)" [11:33]
karoshii Should/can I get rid of it ? [11:33]
surial karoshii: .read(byte[], start, pos).. [11:35]
surial karoshii: will either [A] return -1 (there are no bytes read and there never will be; the stream is closed), or [B] read at least 1 byte, __BUT PERHAPS FEWER THAN N!!!!!__... [11:35]
surial karoshii: or [C] fill up the whole thing, from 0 to n. [11:35]
SuperTyp [SuperTyp!~SuperTyp@212.203.123.78] has joined ##java [11:36]
surial karoshii: this code is therefore broken. [11:36]
surial karoshii: boy this code is a mess. [11:36]
karoshii Haha, I've been messing about with datainputstream, byteinputstream [11:36]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [11:36]
surial karoshii: [A] don't make a class called 'util'. [B] don't star import. [C] use ARM. [D] don't catch exception to then print something to sysout and do nothing. [11:36]
karoshii from what i read - it's always gonna be C - unless the computer ignores the exceptions ? [11:37]
surial karoshii: no it won't. [11:38]
surial karoshii: let's say n is 65536, and for whatever reason your OS works in 4k buffers. [11:38]
surial karoshii: the call reader.read(buffer, 0, 65536) may return 4096, and filll bytes 0-4096. [11:38]
surial karoshii: even though the file is 1MB large. [11:39]
karoshii hm, I see [11:39]
surial karoshii: you must have a while loop here. [11:39]
RedSoxFan07 [RedSoxFan07!~Thunderbi@137.103.109.45] has joined ##java [11:41]
surial karoshii: also, Integer.toString(swap).equals(Integer.toString(1)) is a convoluted way to write 'swap == 1'. [11:41]
surial so.. why not write swap == 1? Or alternatively, explain what you are trying to accomplish there. [11:41]
karoshii Checking if the index i is even, and swapping for a blank character if it is [11:42]
surial karoshii: if (i %2 == 1) buffer[i] = ' '; [11:43]
surial seems a lot simpler. [11:43]
surial or even better: [11:43]
surial also this doesn't swap the 0 either. [11:43]
surial so you're swaping the second, fourth, etc. [11:43]
surial seems bizarre that you end up turning 'Hello, world!' into 'He l , w r d ' [11:43]
surial You'd think ' e l , w r d ' no? [11:43]
karoshii hm, thank you! Wouldn't have caught that [11:44]
surial so why not: for (int i = 0; i < buffer.length; i+=2) buffer[i] = ' '; [11:44]
surial then get rid of the catches and put 'throws IOException' on your method signature. [11:44]
Sonderblade [Sonderblade!~user@2001:6b0:1:1df0:f68e:38ff:fe78:636f] has joined ##java [11:44]
surial karoshii: then, use ARM: try (FileInputStream in = new FileInputStream(file)) { .... } (and no finally at all) [11:46]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [11:47]
karoshii I had that as my 1st change, will change back - was just messing about with all the different types [11:47]
veegee Hey all, any way to pass the -D definition arguments from within the main class itself? [11:50]
veegee Instead of doing it on the command line [11:50]
junktext [junktext!~junktext@fsf/member/junktext] has joined ##java [11:52]
pmercado [pmercado!~pmercado@190-22-153-125.baf.movistar.cl] has joined ##java [11:52]
surial veegee: System.setProperty("a", "b") is -Da=b [11:53]
veegee thanks [11:53]
sb35 [sb35!~sb35@23.111.78.44] has joined ##java [11:54]
YaknotiS [YaknotiS!~YaknotiS@hx-dnat-241.ebi.ac.uk] has joined ##java [11:55]
Regon [Regon!~Regon@unaffiliated/regon] has joined ##java [11:59]
Souvent22 [Souvent22!~eberry@104.218.140.180] has joined ##java [12:02]
esro [esro!~esro@95.155.114.211] has joined ##java [12:04]
Tadas [Tadas!~Tadas@unaffiliated/hausas] has joined ##java [12:08]
hussam [hussam!uid193284@gateway/web/irccloud.com/x-pkoypbojivmlvabs] has joined ##java [12:14]
bobek [bobek!~bobek@unaffiliated/bobek] has joined ##java [12:20]
t2mkn [t2mkn!~t2mkn@43.226.2.173] has joined ##java [12:26]
metrixx_ [metrixx_!~metrixx@unaffiliated/metrixx] has joined ##java [12:30]
mipesom [mipesom!~mipesom@p200300E6EF2C5E00F524A2719595F173.dip0.t-ipconnect.de] has joined ##java [12:30]
reaga [reaga!~joxo@cpc114742-brad22-2-0-cust1463.17-1.cable.virginm.net] has joined ##java [12:32]
Jantz [Jantz!~IceChat9@2407:7000:8d04:100:8447:ab23:508b:8656] has joined ##java [12:36]
millerti [millerti!~millerti@cpe-66-24-91-119.stny.res.rr.com] has joined ##java [12:36]
wyre [wyre!wyre@gateway/shell/xshellz/x-yypnevjrggxrdsrh] has joined ##java [12:38]
cheeser Maldivia: congrats on the 2nd acquistion :) [12:39]
dgtlcmo [dgtlcmo!~dgtlcmo@c-73-143-114-238.hsd1.ma.comcast.net] has joined ##java [12:41]
lumm [lumm!~lumm@2a01:e35:2f0f:b480:1233:2a3b:100:9b4e] has joined ##java [12:43]
Xiti [Xiti!~Xiti-@unaffiliated/xiti] has joined ##java [12:45]
w1d3m0d3 [w1d3m0d3!~w1d3@gateway/tor-sasl/w1d3m0d3] has joined ##java [12:45]
w1d3m0d3 is there a channel dedicated to Spring? if not, with methods marked as @Bean (which I presume "configure" how a bean is constructed) is the name sensitive? say, can my public LocaleResolver localeResolver() also be called anything else? [12:46]
cheeser tias [12:48]
cheeser Try it and see. You learn much more by experimentation than by asking without having even tried. [12:48]
cheeser but in general, i don't think the name figures in to anything at all [12:48]
v01d4lph4 [v01d4lph4!~v01d4lph4@223.225.78.176] has joined ##java [12:49]
SolarFlare [SolarFlare!~SamanthaB@unaffiliated/samanthabdawn] has joined ##java [12:50]
lumm [lumm!~lumm@2a01:e35:2f0f:b480:1233:2a3b:100:9b4e] has joined ##java [12:51]
maryo [maryo!~Maryo@unaffiliated/maryo] has joined ##java [12:59]
lumm_ [lumm_!~lumm@220.168.185.81.rev.sfr.net] has joined ##java [01:00]
orbyt_ [orbyt_!~orbyt@199-116-74-10.grio.static.monkeybrains.net] has joined ##java [01:02]
Souvent22_ [Souvent22_!~eberry@72.46.18.100] has joined ##java [01:03]
wodencafe [wodencafe!~wodencafe@2605:6000:1517:614c:724d:7bff:fe63:71b6] has joined ##java [01:05]
Revan- [Revan-!~Revan@host-72-174-107-194.static.bresnan.net] has joined ##java [01:06]
conan [conan!~conan@62.60.61.246] has joined ##java [01:08]
lumm_ [lumm_!~lumm@2a01:e35:2f0f:b480:1233:2a3b:100:9b4e] has joined ##java [01:14]
lumm_ [lumm_!~lumm@2a01:e35:2f0f:b480:1233:2a3b:100:9b4e] has joined ##java [01:16]
v01d4lph4 [v01d4lph4!~v01d4lph4@223.225.78.176] has joined ##java [01:22]
rohdef [rohdef!~rohdef@90.184.72.135.1.fullrate.ninja] has joined ##java [01:22]
mluser-home [mluser-home!~mluser-ho@ip68-0-67-199.tu.ok.cox.net] has joined ##java [01:24]
code_zombie [code_zombie!~code_zomb@2605:a601:aa1:da00:85a:55d6:1254:3236] has joined ##java [01:24]
Maldivia cheeser: it's actually my 3rd :) [01:24]
pr3d4t0r Addax: Yo' [01:24]
Maldivia surial: you wanted something earlier? [01:25]
Addax Maldivia: what happened? [01:26]
Maldivia cheeser: but thanks - I guess [01:26]
Maldivia Addax: I'm now perforce [01:26]
Rapture [Rapture!~textual@50-204-232-30-static.hfc.comcastbusiness.net] has joined ##java [01:28]
Maldivia w1d3m0d3 / cheeser: if I'm not mistaken, the name of the method is used to name the bean, but if using unqualified autowireing it shouldn't matter [01:29]
cheeser right. but that's also arbitrary until you *want* it to mean something. [01:29]
w1d3m0d3 ^ yeah after some looking around and trying I came to that conclusion too [01:29]
wilbert [wilbert!~wilbert@unaffiliated/wilbert] has joined ##java [01:29]
w1d3m0d3 another question, I'm implementing a bean and I wonder how do I get a value of an entry in applications.properties to use it to init the bean [01:30]
w1d3m0d3 uh specifically I want dataSource() to return a HikariDataSource but I need to preconfigure it first with values from the properties [01:31]
Maldivia @Value [01:31]
plarsen [plarsen!~plarsen@redhat/jboss/pdpc.professional.plarsen] has joined ##java [01:32]
Maldivia but if using spring boot, it can do that automatically for you [01:32]
w1d3m0d3 yes, but where do I mark as @Value()? a parameter, variable in the class that holds my dataSource(), anything else? [01:32]
w1d3m0d3 and I am [01:32]
horribleprogram [horribleprogram!~horriblep@unaffiliated/nightcoder] has joined ##java [01:34]
Maldivia spring boot 2 should default to hikari, and create the appropriate beans for it [01:35]
Maldivia w1d3m0d3: see https://docs.spring.io/spring-boot/docs/current/reference/html/howto-data-access.html [01:36]
w1d3m0d3 ah if it does then I really don't need to do anything, since I'm also using postgresql I'd just need to set the url to use it [01:37]
Raku [Raku!raku@2601:2c7:4300:1b00:230:48ff:fe32:d99f] has joined ##java [01:40]
jenia [jenia!ceac00cc@gateway/web/freenode/ip.206.172.0.204] has joined ##java [01:45]
tomorrow__ [tomorrow__!~tomorrow_@84.89.63.64] has joined ##java [01:48]
tomorrow__ Hi, how do you get a File from classpath file? [01:49]
cheeser you don't [01:49]
cheeser you get an InputStream [01:49]
tomorrow__ I used getClassLoader().getResource("<classpath>").getFile() [01:49]
tomorrow__ but the problem is that it escapes certain characters of the URL [01:50]
tomorrow__ cheeser: So what do you propose? [01:50]
Addax gras [01:50]
Addax getResourceAsStream is a mechanism to read files from the same place your class files are stored - even from jars. Use it for data files that go with your app, like icon png files or a list of states in the US. For sample code and a tutorial, along with more explanation: http://javachannel.org/posts/how-to-access-static-resources/ [01:50]
cheeser depends on what you want to do [01:50]
headcr4sh [headcr4sh!~headcr4sh@ip-95-222-207-53.hsi15.unitymediagroup.de] has joined ##java [01:50]
tomorrow__ I want to read a p12 file from my classpath [01:50]
cheeser gras [01:50]
cheeser getResourceAsStream is a mechanism to read files from the same place your class files are stored - even from jars. Use it for data files that go with your app, like icon png files or a list of states in the US. For sample code and a tutorial, along with more explanation: http://javachannel.org/posts/how-to-access-static-resources/ [01:50]
tomorrow__ and pass it as an argument to a google play function [01:51]
freeone3000 Do not use File for this. [01:51]
cheeser sounds like an android question. [01:51]
tomorrow__ freeone3000: The google play function asks for a file [01:51]
freeone3000 tomorrow__: Too bad. [01:51]
tomorrow__ not android, it's server side [01:51]
cheeser ask #android-dev [01:51]
cheeser uh... [01:51]
tomorrow__ payments private key [01:51]
cheeser weird [01:51]
tomorrow__ GoogleCredential.Builder().setServiceAccountPrivateKeyFromP12File() [01:52]
freeone3000 That's a serious misstep on Google's side. It needs to be either a JSSE X509PrivateKey (as it should be) or an InputStream (if they insist parsing it themselves); File is incorrect. [01:52]
tomorrow__ And that function's parameter is a file [01:52]
tomorrow__ File* [01:52]
Foxfir3 [Foxfir3!~Foxfir3@ip-5-186-114-209.cgn.fibianet.dk] has joined ##java [01:52]
freeone3000 tomorrow__: https://developers.google.com/api-client-library/java/google-api-java-client/reference/1.19.1/com/google/api/client/googleapis/auth/oauth2/GoogleCredential.Builder#setServiceAccountPrivateKey(java.security.PrivateKey) [01:53]
freeone3000 freeone3000's title: "GoogleCredential.Builder (google-api-java-client 1.19.1)" [01:53]
Markow [Markow!~ejm@176.122.215.103] has joined ##java [01:53]
Maldivia there is also an InputStream method [01:53]
Foxfir3 hi guys. Kotling question. Can I write java inside the kotlin file, like in Groovy? [01:53]
Addax Foxfir3: no. [01:54]
cheeser Foxfir3: 1. no. 2. kotlin questions go to #kotlin. [01:54]
freeone3000 Maldivia: Not on that version, at least, there isn't. [01:54]
tomorrow__ freeone3000: I see, so I need to use that one [01:54]
Foxfir3 okay. hmm.. so.. since im leaning Java, I might be better off learning some more Groovy instead? [01:55]
tomorrow__ Foxfir3: you can program android in kotlin [01:56]
Maldivia learn Java then [01:56]
cheeser Foxfir3: wtf? [01:56]
cheeser neither kotlin nor groovy are java... [01:56]
tomorrow__ if you have to choose between kotlin or groovy I suggest kotlin [01:56]
Maldivia freeone3000: from 1.26.0 [01:56]
freeone3000 Alright! Then use the InputStream version in version 1.26.0 since getting a java.security.PrivateKey is a pain. [01:57]
Addax Foxfir3: so ... wait, you're choosing between groovy and kotlin based on whether the compiler can ingest java code? [01:57]
tomorrow__ Maldivia: I use 1.23.0 [01:57]
Foxfir3 Addax: yes. It it completely mad? [01:58]
tomorrow__ dunno if it's safe to upgrade [01:58]
Addax Foxfir3: yes, that's fucking stupid, and let's be real, stupid doesn't need to procreate [01:58]
Addax so stop it [01:58]
Foxfir3 Addax: well.. I better stick to oldschool java then :D [01:59]
Addax shrugs. Why? [01:59]
tomorrow__ Maldivia: code is not mine. Just fixing a bug. >_< [01:59]
cheeser learn java. learn kotlin. ignore groovy. [01:59]
Addax groovy's still good for gradle config - the docs haven't caught up to the kotlin dsl yet [02:00]
Addax but apart from that, groovy might as well be dead, dead, dead, dead [02:00]
Foxfir3 cheeser: oki doky. in that order. great. [02:00]
nfd [nfd!~nfd9001@c-73-157-90-101.hsd1.wa.comcast.net] has joined ##java [02:01]
RazielZ [RazielZ!~Raziel@unaffiliated/raziel] has joined ##java [02:01]
tomorrow__ Addax: also jenkins configs [02:01]
tomorrow__ they are in groovy [02:01]
Foxfir3 Addax: okay. I thought Groovy had been updated, and was going places. But that like asking a mother about her son i guess. [02:02]
deepy- [deepy-!deepy@wrongplanet/deepa] has joined ##java [02:02]
Addax Foxfir3: groovy is going places. [02:03]
Addax it's just "places" includes "the cemetery" [02:03]
Jabbslad_ [Jabbslad_!sid25161@gateway/web/irccloud.com/x-hnxkxabuxqmcwwtt] has joined ##java [02:03]
sengy [sengy!~sangy@archlinux/trusteduser/sangy] has joined ##java [02:03]
lol768_ [lol768_!lol768@pwned.with.csrf.tech] has joined ##java [02:03]
canton7_ [canton7_!canton7@about/csharp/regular/canton7] has joined ##java [02:03]
hussam_ [hussam_!uid193284@gateway/web/irccloud.com/x-kfmhdkdquunqdgkr] has joined ##java [02:03]
pdgwien- [pdgwien-!~pdg@static.77.36.76.144.clients.your-server.de] has joined ##java [02:03]
cfoch_ [cfoch_!uid153227@gateway/web/irccloud.com/x-mshlvkhsbtuxqqtm] has joined ##java [02:03]
raztoki- [raztoki-!~a0sle@unaffiliated/a0sle] has joined ##java [02:04]
deebo [deebo!~deebo@stonebay32.com] has joined ##java [02:04]
cheeser turns it back on again [02:04]
wodencafe [wodencafe!~wodencafe@2605:6000:1517:614c:724d:7bff:fe63:71b6] has joined ##java [02:04]
Dragon092 [Dragon092!~Dragon@ve705.venus.fastwebserver.de] has joined ##java [02:04]
benJIman [benJIman!~benji@li273-180.members.linode.com] has joined ##java [02:05]
introom [introom!introom@unaffiliated/introom] has joined ##java [02:05]
Addax all those russians! [02:05]
Bombe [Bombe!~bombe@freenet/developer/Bombe] has joined ##java [02:05]
Wintereise [Wintereise!~reise@unaffiliated/wintereise] has joined ##java [02:05]
palasso [palasso!~palasso@unaffiliated/palasso] has joined ##java [02:05]
tang^ [tang^!~tang^@2604:3d09:47f:fb80:f152:1830:1078:fa23] has joined ##java [02:05]
jink [jink!mrjink@chat.jink.net] has joined ##java [02:05]
bobek [bobek!~bobek@unaffiliated/bobek] has joined ##java [02:05]
bendem [bendem!~bendem@irc.bendem.be] has joined ##java [02:05]
treefrob [treefrob!~treefrob@p2E542C13.dip0.t-ipconnect.de] has joined ##java [02:05]
Teckla [Teckla!~Teckla@unaffiliated/teckla] has joined ##java [02:06]
visl [visl!~visl@2001:19f0:4009:1423::64] has joined ##java [02:06]
fcanela [fcanela!~fcanela@unaffiliated/fcanela] has joined ##java [02:06]
ket [ket!~jil@2607:f298:6:a016::c10:cabe] has joined ##java [02:06]
db` [db`!db@gateway/shell/panicbnc/x-bwalefgmdkvwdkiq] has joined ##java [02:07]
Jantz [Jantz!~IceChat9@2407:7000:8d04:100:5039:d87d:4f77:abc1] has joined ##java [02:07]
bow [bow!~johanf@c-abb7235c.036-1-6c756c12.bbcust.telenor.se] has joined ##java [02:07]
harha_ [harha_!~harha@2001:41d0:1:c134::1] has joined ##java [02:08]
orbyt_ [orbyt_!~orbyt@8.4.228.63] has joined ##java [02:10]
acidjnk a historic moment [02:11]
yawkat [yawkat!~yawkat@cats.coffee] has joined ##java [02:12]
mitch0 [mitch0!~mitch@188-143-39-71.pool.digikabel.hu] has joined ##java [02:13]
srisri [srisri!~srisri@204.14.239.53] has joined ##java [02:17]
[twisti] what am i missing ? [02:19]
gelignite [gelignite!~gelignite@55d46d5e.access.ecotel.net] has joined ##java [02:20]
Addax bunch of parts/joins [02:20]
Addax netsplit, basically [02:20]
progart [progart!~kamee@188.115.255.203] has joined ##java [02:20]
wullas [wullas!~c@177.36.188.5] has joined ##java [02:21]
Maldivia didn't I read a headline that Russia wanted to cut off the "global internet" ? :) [02:22]
[twisti] oh, i have those turned off [02:22]
[twisti] i read that too, and you just know that some industrious russian hackers are going to use their test to take over some DNS records and get people to give them their passwords for everything and use them to steal everything on the real internet while the owners are unable to go online to change their passwords [02:23]
Addax [twisti]: I blame trump for enabling the russian hackers [02:24]
Addax He probably created DNS for that very purpose [02:24]
Foxfir3 Bought and paid for [02:24]
[twisti] he created a very good DNS [02:24]
[twisti] a great DNS [02:24]
[twisti] maybe the best DNS in the history [02:24]
Jantz [Jantz!~IceChat9@118-93-145-218.dsl.dyn.ihug.co.nz] has joined ##java [02:24]
Maldivia it's going to need a firewall though... [02:25]
Addax [twisti]: nobody's said it was a bad DNS, so logically... [02:25]
kgrimes2 [kgrimes2!~kgrimes2@172-11-18-93.lightspeed.irvnca.sbcglobal.net] has joined ##java [02:25]
orbyt_ [orbyt_!~orbyt@8.4.228.63] has joined ##java [02:26]
[twisti] Maldivia: you better be making russia pay for the firewall [02:27]
themsay [themsay!~themsay@149.254.234.146] has joined ##java [02:27]
cheeser you know where this would be a great subject? #anywhereelse [02:27]
Jantz [Jantz!~IceChat9@118-93-145-218.dsl.dyn.ihug.co.nz] has joined ##java [02:29]
tomorrow__ Thanks guys for the help [02:32]
themsay [themsay!~themsay@149.254.234.146] has joined ##java [02:32]
troker [troker!~troker@evergage03.e.subnet.rcn.com] has joined ##java [02:34]
orbyt_ [orbyt_!~orbyt@192.211.15.72] has joined ##java [02:34]
wilbert [wilbert!~wilbert@unaffiliated/wilbert] has joined ##java [02:37]
w1d3m0d3 can I simply get a SQL connection from Spring to use (since I am configuring stuff with Spring) [02:38]
Addax sure [02:38]
lumm [lumm!~lumm@nem77-1-82-240-251-72.fbx.proxad.net] has joined ##java [02:38]
w1d3m0d3 how do I do it? [02:42]
dgtlcmo [dgtlcmo!~dgtlcmo@c-73-143-114-238.hsd1.ma.comcast.net] has joined ##java [02:42]
Addax how are you configuring your jdbc connection in spring [02:44]
w1d3m0d3 just setting the values in application.properties Addax [02:45]
Addax so this is spring boot? [02:47]
bitSt0rm [bitSt0rm!~manjana@unaffiliated/bitst0rm] has joined ##java [02:49]
w1d3m0d3 correct [02:49]
Cahaan [Cahaan!~Cahaan@ns326233.ip-37-187-158.eu] has joined ##java [02:53]
Sasazuka [Sasazuka!~Sasazuka@unaffiliated/sasazuka] has joined ##java [02:55]
sonOfRa w1d3m0d3: I think you can inject a JDBCTemplate (Or JdbcTemplate?) into your current context, and work from there. There should be some way to get the underlying datasource (and from there, a connection) [02:55]
Jantz [Jantz!~IceChat9@2407:7000:8d04:100:52f:2a20:9d8c:4c76] has joined ##java [02:55]
jcob [jcob!~jcob@152.7.255.200] has joined ##java [02:55]
sonOfRa However, why do you want the raw connection? What are you actually trying to achieve? [02:55]
w1d3m0d3 sonOfRa: I am used to that [03:01]
w1d3m0d3 but if there's a better method I'm all ears [03:01]
sonOfRa Not that I know of. But then again, I've never had a need to directly access a db connection. What are you doing with it? [03:01]
wilbert [wilbert!~wilbert@unaffiliated/wilbert] has joined ##java [03:02]
calyx parted the channel: [03:02]
w1d3m0d3 well I have more data to deal with than just user credentials that spring security handles sonOfRa [03:03]
sonOfRa And using Hibernate is not an option? [03:03]
sonOfRa That comes with spring boot as well [03:03]
sonOfRa No need to fire queries through a raw connection [03:04]
sonOfRa Spring Repositories etc are the recommended way to interact with your data source [03:04]
w1d3m0d3 I never used Hibernate [03:04]
w1d3m0d3 I'll look at it [03:04]
X230t [X230t!x13@gateway/shell/suchznc/x-zoitimrwldxxtsga] has joined ##java [03:06]
badSophia [badSophia!~moretz@175.223.38.37] has joined ##java [03:07]
Gazooo [Gazooo!~Gazooo@142.196.183.136] has joined ##java [03:07]
Jantz [Jantz!~IceChat9@118-93-145-218.dsl.dyn.ihug.co.nz] has joined ##java [03:08]
immibis [immibis!~immibis@125-238-72-168-fibre.sparkbb.co.nz] has joined ##java [03:12]
sonOfRa https://spring.io/guides/gs/accessing-data-jpa/ here's a small guide that covers the very basics [03:14]
sonOfRa sonOfRa's title: "Getting Started Accessing Data with JPA" [03:14]
surial Maldivia: I just pinged a bunch of ops because somebody had connected and disconnected about 50 times in the past 15 minutes. [03:14]
surial (context: Maldivia: surial: you wanted something earlier?) [03:14]
fstd_ [fstd_!~fstd@unaffiliated/fisted] has joined ##java [03:17]
fstd [fstd!~fstd@unaffiliated/fisted] has joined ##java [03:19]
tang^ [tang^!~tang^@208.38.34.74] has joined ##java [03:21]
gurmble [gurmble!~grumble@freenode/staff/grumble] has joined ##java [03:22]
merpnderp parted the channel: [03:22]
Jantz [Jantz!~IceChat9@118-93-145-218.dsl.dyn.ihug.co.nz] has joined ##java [03:25]
wilbert [wilbert!~wilbert@unaffiliated/wilbert] has joined ##java [03:27]
Jantz [Jantz!~IceChat9@118-93-145-218.dsl.dyn.ihug.co.nz] has joined ##java [03:36]
comrad [comrad!~comrad@holarse/core/comrad] has joined ##java [03:48]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [03:49]
dbck [dbck!~dbck@p200300DD2F1F880051677AD5BBD6667E.dip0.t-ipconnect.de] has joined ##java [03:56]
dbck Hi, where i can read about the classpath and how resources or classes are resolved. Especially if dependencies (e.g. resolved via maven) are having the the same filenames in the resources. Which will be used? [04:00]
ernimril_ classpath [04:01]
ernimril_ The classpath tells Java or the compiler which jar files and folders to search for classes and resources. Use the -cp/-classpath run-time options to specify the classpath (does NOT work with -jar!). Also see http://bit.ly/15InVZQ [cheeser's blog], http://bit.ly/19MnH5C [oracle.com], or http://bit.ly/2aJ5MoG for more information. [04:01]
ernimril_ dbck, same filename but different content or same filename / same dependency from several different sources? [04:02]
coomrad [coomrad!~comrad@holarse/core/comrad] has joined ##java [04:04]
dbck ernimril_, same filename with different content. So which one of them will be used? e.g. two css files. In a project which references dependency A and B. Will be the ccs file from A or B be used. [04:05]
cheeser loaded in classpath order. first one wins. [04:06]
jink [jink!mrjink@chat.jink.net] has joined ##java [04:06]
cheeser nice and easy. [04:06]
introom2 [introom2!introom@unaffiliated/introom] has joined ##java [04:06]
Gazooo [Gazooo!~Gazooo@142.196.183.136] has joined ##java [04:07]
harha_ [harha_!~harha@2001:41d0:1:c134::1] has joined ##java [04:07]
ket [ket!~jil@2607:f298:6:a016::c10:cabe] has joined ##java [04:08]
wodencafe [wodencafe!~wodencafe@2605:6000:1517:614c:724d:7bff:fe63:71b6] has joined ##java [04:08]
bolt [bolt!~r00t@unaffiliated/bolt] has joined ##java [04:10]
dbck classpath order is not deterministic, or? Especially on different jdk implementations. So you can't rely on that, can you? [04:10]
ernimril_ dbck, if you call java on your own it is deterministic, if you rely on some tool to call java then you have to check with that tool [04:11]
dbck So accessing the resources will feel like it is a squashed directory of all dependencies, but which resource is accessable in a conflict case depends on the load order of the classpath. Can you put it that way? [04:13]
yawkat yes. at least pre-9 [04:13]
dbck thanks [04:15]
LaSombra [LaSombra!lasombra@unaffiliated/lasombra] has joined ##java [04:19]
jcbitter [jcbitter!~jcbitter@181.49.85.192] has joined ##java [04:20]
dbck Another close question. If multiple same dependencies are used in different versions. Which version will be used? Example: A uses pg11, B uses pg9, C uses pg8 and A references B and C as dependency. Will pg9 or pg 8 still be used from B's or C's codebase in the project A? [04:25]
jcob [jcob!~jcob@152.7.255.196] has joined ##java [04:36]
surial dbck: depends. [04:38]
surial dbck: assuming you do NOT use any module system or classloader framework, deterministic but undetermined. [04:39]
surial So, effectively, random, just don't rely on it being random. [04:39]
surial which is, obviously, bad. [04:39]
surial dbck: it's the same situation: That's a conflict and depends on load order. [04:39]
surial dbck: class files are just resources. [04:39]
surial dbck: note that you can modify how these are loaded, which would let you set up module systems. It is possible to run BOTH pg11 and pg9 in a single VM. It is possible to have, say, class 'com.google.common.collect.ImmutableList' from guava 21, and the same 'com.google.common.collect.ImmutableList' from guava 25 both loaded and they are completely separate classes that just so happen to share a name. [04:41]
orbyt_ [orbyt_!~orbyt@8.4.228.63] has joined ##java [04:52]
dbck Thank you [04:55]
w1d3m0d3 ugh I'm not liking Hibernate (aka JPA), I prefer getting my hands on sql [05:03]
cheeser then do so [05:04]
w1d3m0d3 goes back to my initial question: how do I get a connection from spring boot [05:06]
horribleprogram [horribleprogram!~horriblep@unaffiliated/nightcoder] has joined ##java [05:15]
surial w1d3m0d3: dunno but once you have it, JDBI and JOOQ are what you're looking for [05:22]
yawkat jdbi [05:22]
yawkat yawkat, jdbi is a convenience library built on JDBC with a fluent API and another annotation-based one for creating DAOs. http://jdbi.org [05:22]
SuperTyp [SuperTyp!~SuperTyp@178.197.237.48] has joined ##java [05:26]
rruizt [rruizt!~rruizt@5354177C.cm-6-5a.dynamic.ziggo.nl] has joined ##java [05:27]
q9929t [q9929t!~Thunderbi@223.227.1.85] has joined ##java [05:28]
taxon [taxon!~taxon@p54966E65.dip0.t-ipconnect.de] has joined ##java [05:32]
untestable[m] [untestable[m]!untestable@gateway/shell/matrix.org/x-vdxdghcpsvvrycum] has joined ##java [05:35]
w1d3m0d3 how does hibernate handle alterations in data structure [05:37]
SuperTyp [SuperTyp!~SuperTyp@178.197.237.48] has joined ##java [05:37]
untestable[m] hi [05:38]
untestable[m] is there an appropriate channel for Kafka discussions? [05:38]
SuperTyp [SuperTyp!~SuperTyp@178.197.237.48] has joined ##java [05:47]
SuperTyp [SuperTyp!~SuperTyp@178.197.237.48] has joined ##java [05:50]
tracks [tracks!~tracks@2600:1700:ade0:4400:7592:9f5c:a8ce:58b6] has joined ##java [05:54]
goldstar [goldstar!~adm@unaffiliated/goldstar] has joined ##java [05:55]
Me4502 [Me4502!~Me4502@unaffiliated/me4502] has joined ##java [06:09]
ernimril_ [ernimril_!~ernimril@83-233-178-255.cust.bredband2.com] has joined ##java [06:12]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [06:13]
SuperTyp [SuperTyp!~SuperTyp@178.197.237.48] has joined ##java [06:14]
ogradyd [ogradyd!~Thunderbi@2a02:8070:88bf:9df0::212] has joined ##java [06:16]
conan [conan!~conan@mdproctor.plus.com] has joined ##java [06:16]
SuperTyp [SuperTyp!~SuperTyp@178.197.237.48] has joined ##java [06:27]
Karyon [Karyon!~karyon@unaffiliated/karyon] has joined ##java [06:29]
z3t0 [z3t0!~z3t0@otwaon0916w-lp140-03-70-54-49-122.dsl.bell.ca] has joined ##java [06:30]
z3t0 does a foreach loop in java cause race conditions? [06:30]
cheeser xy [06:32]
cheeser XY Problem: You have problem X, and you think Y is a good solution, so now you are asking about how to do Y. However, maybe Y is not a good way to solve X. Maybe you should take a step back and tell us about X first. More: http://mywiki.wooledge.org/XyProblem [06:32]
surial z3t0: can I take a wild flying stab? You're getting a ConcurrentModificationException, and the 'concurrent' makes you think: Huh. threads I guess. [06:33]
surial z3t0: how close was I? [06:33]
z3t0 I'm actually not getting any errors [06:37]
z3t0 I am using a counter inside the for loop, and i was wondering if i should be aware of any race conditions [06:37]
surial your thought process is absolutely bizarre. [06:38]
surial race conditions involve more than one thread. [06:38]
surial if you're accessing the same collection from multiple threads, yah duh that's gonna cause issues unless you went out of your way to guardfence control, which, generally, with iterators, can't be done in the first place. [06:38]
surial if you're not.. then.. thinking 'mabbe this will cause a race condition' is a befuddling thought. [06:38]
cheeser also, premature worrying [06:38]
surial you might as well think: "Maybe if I add 8 to a number, the VM will crash." [06:39]
cheeser it might... [06:39]
surial z3t0: hmm, trying to walk in your shoes, maybe you think foreach loops do something fancy and run in parallel. There are a few pretty academic/exotic languages that can do that, but, java isn't one of them. a foreach loop is single threaded and very sequential. [06:41]
surial z3t0: nothing to worry about :) [06:41]
z3t0 ahh okay [06:42]
z3t0 yes I was wondering if the foreach ran in parallel [06:42]
surial z3t0: unmanaged laissez fair parallelism in java looks like: someCollection.stream().parallel().filter(x -> x.length() > 5).forEach(System.out::println); [06:43]
surial of course, printing to sysout (which is sequential) via a parallel op is a bad idea, but you get the gist I hope ;P [06:44]
wullas parted the channel: [06:53]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [06:53]
z3t0 ah got it [06:55]
z3t0 thanks [06:55]
wodencafe [wodencafe!~wodencafe@2605:6000:1517:614c:724d:7bff:fe63:71b6] has joined ##java [07:12]
veegee [veegee!~veegee@ipagstaticip-3d3f7614-22f3-5b69-be13-7ab4b2c585d9.sdsl.bell.ca] has joined ##java [07:13]
goldstar [goldstar!~adm@unaffiliated/goldstar] has joined ##java [07:15]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [07:20]
SuperTyp [SuperTyp!~SuperTyp@dslb-178-007-104-140.178.007.pools.vodafone-ip.de] has joined ##java [07:32]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [07:34]
SuperTyp [SuperTyp!~SuperTyp@dslb-178-007-104-140.178.007.pools.vodafone-ip.de] has joined ##java [07:48]
rruizt [rruizt!~rruizt@5354177C.cm-6-5a.dynamic.ziggo.nl] has joined ##java [07:54]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [07:55]
badSophia [badSophia!~moretz@220.82.16.30] has joined ##java [07:57]
horribleprogram [horribleprogram!~horriblep@unaffiliated/nightcoder] has joined ##java [08:06]
yohnnyjoe [yohnnyjoe!~yohnnyjoe@c-73-129-2-10.hsd1.dc.comcast.net] has joined ##java [08:07]
games [games!sid99242@gateway/web/irccloud.com/x-tbqlxcacngfeuhat] has joined ##java [08:07]
bankai_ [bankai_!~bankai@unaffiliated/bankai/x-6544441] has joined ##java [08:08]
Karyon [Karyon!~karyon@unaffiliated/karyon] has joined ##java [08:12]
minn [minn!~minn@c-24-20-199-166.hsd1.wa.comcast.net] has joined ##java [08:25]
Shawnecy [Shawnecy!~shawn@2600:8800:3780:872:6862:d8dc:12d6:d1ed] has joined ##java [08:28]
opalraava is javax always in the java? [08:29]
cheeser no. [08:30]
cheeser javax covers a lot of ground [08:30]
cheeser if, by java, you mean the JDK [08:30]
opalraava just the java [08:30]
cheeser that means nothing. [08:30]
opalraava oh [08:30]
cheeser the jdk? [08:30]
rajrajraj When i was not able to get things working on heroku, this guy tells me to port the code to go [08:31]
rajrajraj From java [08:32]
rajrajraj I don't know how to deal with these freelancing employers [08:32]
opalraava they have the java? [08:32]
cheeser \_(?)_/ [08:33]
opalraava en it is good [08:33]
opalraava then it is good* [08:33]
cheeser opalraava: "the java" means exactly nothing. [08:33]
code_zombie [code_zombie!~code_zomb@2605:a601:aa1:da00:28d9:341e:a0cf:3eab] has joined ##java [08:33]
opalraava oh sorry [08:34]
dino82 [dino82!~deeno@unaffiliated/dino82] has joined ##java [08:37]
w1d3m0d3 uhh this is fun `Method org.postgresql.jdbc.PgConnection.createClob() is not yet implemented.` [08:40]
Hanii [Hanii!~Hanii@2a00:23c5:c587:a800:74d3:5122:4e77:26c6] has joined ##java [08:42]
Kol [Kol!~Kol@S0106bcd1656555bc.vc.shawcable.net] has joined ##java [08:47]
pdgwien [pdgwien!~pdg@static.77.36.76.144.clients.your-server.de] has joined ##java [08:49]
henbruas [henbruas!~henbruas@unaffiliated/henbruas] has joined ##java [08:49]
aqd [aqd!~quassel@host-111-184-31-50.dynamic.kbtelecom.net] has joined ##java [08:52]
aqd [aqd!~quassel@host-111-184-31-50.dynamic.kbtelecom.net] has joined ##java [09:06]
sb35 [sb35!~sb35@67.231.16.205] has joined ##java [09:13]
maryo_ [maryo_!~Maryo@unaffiliated/maryo] has joined ##java [09:24]
fyrril [fyrril!~fyrril@2605:a601:7012:7200:14:fcf:a9c6:4ca0] has joined ##java [09:26]
Goplat [Goplat!~Goplat@reactos/developer/Goplat] has joined ##java [09:26]
w1d3m0d3 so I'm using spring boot and I made /templates/error.html (thymeleaf), and it works, but I don't know where in the model the error code and message are held, and it does not seem to be documented. does anyone know> [09:30]
w1d3m0d3 ? [09:30]
Diablo-D3 I could be wrong, but I think spring has its own channel somewhere [09:32]
w1d3m0d3 oh? I'd love to get into it [09:33]
Diablo-D3 Im just not sure where. [09:33]
w1d3m0d3 #spring apparently exists but has only like ~75 members [09:34]
Diablo-D3 https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html#a-multi-language-welcome [09:34]
Diablo-D3 I think this is what you're asking about [09:34]
w1d3m0d3 but looking through sources I found https://docs.spring.io/spring-boot/docs/1.1.6.RELEASE/api/org/springframework/boot/autoconfigure/web/DefaultErrorAttributes.html [09:34]
Diablo-D3 oh, or maybe not [09:35]
w1d3m0d3 nah, I was looking for how the model for the error pages is defined, and that seems to align with reality, so I think that is it [09:35]
w1d3m0d3 thanks at any rate [09:35]
Diablo-D3 I dont use spring, so Im not going to be much help [09:35]
Diablo-D3 surprised spring just doesnt have a demo for how to get errors out and display them using an error template [09:36]
Diablo-D3 seems like a common use case [09:36]
w1d3m0d3 /shrug dunno [09:37]
Diablo-D3 https://spring.io/blog/2013/11/01/exception-handling-in-spring-mvc [09:39]
Diablo-D3 I guess they do, just not in their docs [09:39]
goldstar [goldstar!~adm@unaffiliated/goldstar] has joined ##java [09:45]
dj_mobley [dj_mobley!~dj_mobley@cpe-24-164-81-222.cinci.res.rr.com] has joined ##java [09:46]
Karyon [Karyon!~karyon@unaffiliated/karyon] has joined ##java [09:47]
nokdoot [nokdoot!~nokdoot@123.212.109.70] has joined ##java [09:52]
RedSoxFan07 [RedSoxFan07!~Thunderbi@137.103.109.45] has joined ##java [10:15]
srisri [srisri!~srisri@204.14.239.18] has joined ##java [10:16]
srisri [srisri!~srisri@204.14.239.18] has joined ##java [10:16]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [10:18]
xlxnnx [xlxnnx!~xlxnnx@193.148.18.251] has joined ##java [10:19]
bobek [bobek!~bobek@unaffiliated/bobek] has joined ##java [10:20]
katiex7 [katiex7!~katiex7@ip72-196-214-135.dc.dc.cox.net] has joined ##java [10:22]
dj_mobley_ [dj_mobley_!~dj_mobley@cpe-24-164-81-222.cinci.res.rr.com] has joined ##java [10:25]
dj_mobley [dj_mobley!~dj_mobley@cpe-24-164-81-222.cinci.res.rr.com] has joined ##java [10:25]
computeiro [computeiro!~computeir@189.15.175.4] has joined ##java [10:29]
donkey [donkey!~donkey@stanky.networkninjas.net] has joined ##java [10:29]
horribleprogram Hello, my self-studying has asked me to write a program: https://pastebin.com/A4R3UB5y [10:36]
horribleprogram If anyone could write a static method that does this, maybe takes an int[] parameter, or int... [10:36]
horribleprogram that'd be nice, ty [10:37]
cyp3d [cyp3d!~n0b0dy@unaffiliated/cyp3d] has joined ##java [10:38]
horribleprogram It's not an assignment I wanna see if you're smart enough to do it [10:38]
donkey tutorials [10:38]
donkey The Oracle tutorial for Java is probably your best starting point, at https://docs.oracle.com/javase/tutorial . Skip the Netbeans bits. Another option: https://www.ktbyte.com/java-tutorial - https://hackr.io/tutorials/java has a list of others as well. [10:38]
horribleprogram would you use some sort of dictionary, each key being an int that was inputted, and the value being how many occurrences the key showed up in the input? [10:40]
horribleprogram then output the highest valued keys? [10:40]
tassee [tassee!~tasse@55d4aea2.access.ecotel.net] has joined ##java [10:40]
horribleprogram donkey: if I wanted to learn Java I woulda went to my first 8 classes this semester and not ditched to smoke weed in the forest [10:41]
horribleprogram well my self-studying sessions, I call them classes [10:41]
cheeser blog [10:42]
cheeser this channel is not your personal blog. Take it back to your tumblr, where your ideas will be read by thousands of hungry followers. The next revolution will be led by YOU! Just like the last one. [10:42]
horribleprogram Fine, I'll take it to my blog, if anyone wants to check it out: www.horribleprogramthoughts.gov.www\horribleprogramthoughts check it out [10:44]
horribleprogram office reference :P [10:44]
SJr Curses, I wanted to write him a class that did it. [10:45]
sbalmos I'd much rather write code that screwed with his head *just enough* [10:46]
orbyt_ [orbyt_!~orbyt@172.92.5.20] has joined ##java [10:47]
SJr I was going to write a class that was buggy, convert it into bytes put it as a byte[] literal, and then do some class loader magic to load the array of bytes and call the method. [10:47]
donkey lol I wasn't even hinting at him, I'm legit needing to lern sum java so I figured the channel bot would have a good list [10:48]
badSophia eclipse version is only one now? [10:49]
phait0 [phait0!phait0@gateway/vpn/protonvpn/phait0] has joined ##java [10:49]
cheeser what? [10:49]
badSophia there is only one donwload button now ? [10:50]
SJr Does cbeust still hang around? [10:50]
cheeser \_(?)_/ [10:50]
cheeser whatever's on the page. try #eclipse if you have questions. [10:50]
phait0 parted the channel: [10:56]
Anthaas [Anthaas!~Anthaas@unaffiliated/anthaas] has joined ##java [11:15]
badSophia System.out.print(?hello world?); <? System is class and print is method then what is out? [11:21]
metrixx [metrixx!~metrixx@unaffiliated/metrixx] has joined ##java [11:21]
badSophia no one know it? [11:25]
badSophia ( [11:25]
cheeser javadoc System [11:25]
cheeser cheeser: http://bit.ly/2hOXm1B [JDK: java.lang.System] [11:25]
badSophia cheeser: you don?t know it? [11:27]
cheeser did i say that? [11:28]
badSophia when? [11:28]
cheeser i gave you the docs so you can learn to help yourself. [11:28]
badSophia lol [11:29]
badSophia too cruel [11:29]
badSophia ( [11:29]
cheeser not cruel. teach a man to fish and all that. [11:30]
cheeser i don't want to spend the rest of your semester answer basic, easily researched questions. [11:30]
cheeser *you* don't want to have to wait around for someone to take pity on you. [11:30]
cheeser win/win [11:30]
badSophia cheeser: i want it :( [11:31]
erg0s1 [erg0s1!~erg0s1@179.189.156.112] has joined ##java [11:31]
cheeser want what? [11:32]
badSophia someone want to teache me :( [11:32]
cheeser ask your teacher/prof [11:32]
keepLearning512 [keepLearning512!~keepLearn@106.51.31.245] has joined ##java [11:32]
shicks2525 [shicks2525!~shicks252@ool-4354603e.dyn.optonline.net] has joined ##java [11:34]
tona [tona!bb90aea4@gateway/web/freenode/ip.187.144.174.164] has joined ##java [11:44]
tona I am creating one json object using JSONObject but it is keeping like ['a','b','c'], my raw file is a,c,b I am wondering why it is being ordered why someone help me [11:45]
EgonX [EgonX!~Egon@2601:2c6:47f:98f4:60f9:bf3b:c76:cd70] has joined ##java [11:49]
henbruas [henbruas!~henbruas@unaffiliated/henbruas] has joined ##java [11:52]
tona I am creating one json object using JSONObject but it is keeping like ['a','b','c'], my raw file is a,c,b I am wondering why it is being ordered could someone help me [11:56]
dj_mobley_ [dj_mobley_!~dj_mobley@cpe-24-164-81-222.cinci.res.rr.com] has joined ##java [11:58]
immibis [immibis!~immibis@125-238-72-168-fibre.sparkbb.co.nz] has joined ##java [11:59]