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

« 2019-11-13


2019-11-15 »

Nick Message Date
Wagoo [Wagoo!] has joined ##java [12:27]
ChaiTRex johnau: Best is a murky concept. If JSON will get the necessary data over the wire, then it has some benefits, like ease of reading it when debugging, easier switching out of the endpoints because JSON is widely supported, and so forth. It has downsides, though, like having to write more code than using, say, Java's Serializable interface. [12:35]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [12:38]
orbyt_ [orbyt_!~orbyt@] has joined ##java [12:38]
tasse [tasse!] has joined ##java [12:53]
puppy_za [puppy_za!uid277586@gateway/web/] has joined ##java [12:54]
johnau ChaiTRex, thanks, thats basically the argument i was having with myself [01:06]
johnau using json at the moment, will probably stick with it [01:06]
newbieG [newbieG!~bhaskar@] has joined ##java [01:07]
jmorris [jmorris!uid374834@gateway/web/] has joined ##java [01:07]
rohanrhu_ [rohanrhu_!~rohanrhu@] has joined ##java [01:20]
tracks [tracks!~tracks@2600:1700:ade0:4400:b50f:43c8:f4e9:46ad] has joined ##java [01:21]
Chuguniy [Chuguniy!~Chuguniy@] has joined ##java [01:22]
tracks_puter [tracks_puter!] has joined ##java [01:37]
AMcBain [AMcBain!] has joined ##java [01:38]
Chuguniy [Chuguniy!~Chuguniy@] has joined ##java [01:39]
palasso [palasso!~palasso@unaffiliated/palasso] has joined ##java [01:47]
KidBeta [KidBeta!~Kidbeta@hpavc/kidbeta] has joined ##java [01:53]
ravenousmoose [ravenousmoose!] has joined ##java [01:55]
rruizt [rruizt!] has joined ##java [02:06]
Zee- [Zee-!~Zee-@] has joined ##java [02:07]
hojang [hojang!~hojang@] has joined ##java [02:08]
sb35 [sb35!~sb35@] has joined ##java [02:16]
progart [progart!~kamee@] has joined ##java [02:23]
johnau in a java ee / web app, if you're getting a GC Overhead limit exception when submitting many entities thru messagedriven beans (each entity in a message to the jms queue), what could you do to alleviate this load? [02:33]
ravenousmoose [ravenousmoose!] has joined ##java [02:33]
plutonium186 [plutonium186!~vdagli@] has joined ##java [02:34]
bitwinery johnau, I would start by understanding the load characteristics [02:34]
bitwinery what objects are being created, why... [02:34]
g00s [g00s!~g00s@unaffiliated/g00s] has joined ##java [02:35]
johnau bitwinery, yeah ok. Do you know what the best plugin for netbeans for analzying is? [02:35]
Zee-- [Zee--!~Zee-@] has joined ##java [02:35]
bitwinery johnau, I don't use netbenas [02:35]
bitwinery netbeans [02:35]
johnau ok nw [02:35]
bitwinery johnau, you could use different tools though: heapdump + memory analyzer, visualvm, mission control... [02:36]
v3d [v3d!~vdagli@] has joined ##java [02:36]
johnau ok thanks [02:37]
sauvin [sauvin!sauvin@about/linux/staff/sauvin] has joined ##java [02:38]
matijja [matijja!~matijja@] has joined ##java [02:49]
Alina-malina [Alina-malina!~Alina-mal@unaffiliated/alina-malina] has joined ##java [02:52]
matijja [matijja!~matijja@] has joined ##java [02:54]
LearnAllTheTime [LearnAllTheTime!~LearnAllT@2601:cc:4000:9db0::d6d0] has joined ##java [02:54]
Me4502 [Me4502!~quassel@unaffiliated/me4502] has joined ##java [02:54]
matijja [matijja!~matijja@] has joined ##java [02:55]
oakridge [oakridge!~oakridge@] has joined ##java [02:58]
Tichodroma [Tichodroma!~lutz@fsf/member/Tichodroma] has joined ##java [03:00]
aqd [aqd!~textual@] has joined ##java [03:02]
glosoli [glosoli!~glosoli@unaffiliated/glosoli] has joined ##java [03:07]
sdu [sdu!] has joined ##java [03:14]
ogradyd [ogradyd!~Thunderbi@2a02:8070:88bf:9df0::577] has joined ##java [03:14]
masuberu [masuberu!] has joined ##java [03:17]
Matthijs [Matthijs!~quassel@unaffiliated/matthijs] has joined ##java [03:17]
enoq [enoq!] has joined ##java [03:19]
masuberu hi, I am trying to develop a jersery application that supports http PATCH verbs. I need some help understanding how to process add and remove operations if we cant add or delete fields in a java object? [03:22]
sbeex [sbeex!~sbeex@] has joined ##java [03:24]
yawkat patch doesnt need to mean add or remove [03:28]
Matthijs [Matthijs!~quassel@unaffiliated/matthijs] has joined ##java [03:30]
deebo are there "serverless" options for linting/static analysis of java code? we've been using sonarqube for a few years but maintaining the instance is getting tedious [03:40]
deebo most useful part of it is reporting static analysis bugs and formatting errors in pull requests, so something similar would be great [03:40]
yawkat make it part of your maven build and CI? [03:41]
bitwinery deebo, all the processing is serverless. The server is usally required only for the reporting and making it available [03:41]
deebo hmm havent actually checked if the sonarqube gradle plugin works w/o an instance [03:42]
bitwinery deebo, you also have many different plugins for static analysis. It depends what analysis you are interested in [03:42]
deebo nope [03:43]
deebo (to the serverless part) [03:43]
immibis [immibis!] has joined ##java [03:43]
deebo current problem is that i upgraded a project to jdk11, sonarqube javaplugin doesnt support it without an instance upgrade, and noone is going to pay for that -> no sonar analysis for that project [03:43]
immibis_ [immibis_!] has joined ##java [03:44]
killvenom [killvenom!~killvenom@] has joined ##java [03:46]
bitwinery deebo, what about the OSS version of sonarqube? [03:47]
deebo that's what we're using, not sure what you're suggesting [03:47]
deebo our ci runs gradle sonar plugin on PR and master merge, reports to github and/or the sonar instance [03:48]
deebo problem is noone is going to pay for the work required to upgrade the sonar instance, so i'm looking at alternatives [03:49]
bitwinery deebo, so what would you be paying for? [03:49]
bitwinery ah [03:49]
bitwinery the work [03:49]
bitwinery why would it be so expensive to upgrade the instance? [03:49]
newbieG [newbieG!~bhaskar@] has joined ##java [03:49]
yawkat spotbugs definitely works without a server. no clue about sonar [03:49]
bitwinery deebo, doesn't a team "owned" that instance? What if the instance crashes? [03:51]
bitwinery own* [03:52]
progart [progart!~kamee@] has joined ##java [03:52]
Raging_Hog [Raging_Hog!] has joined ##java [04:01]
Tichodroma [Tichodroma!~lutz@fsf/member/Tichodroma] has joined ##java [04:10]
nokdoot [nokdoot!~nokdoot@] has joined ##java [04:10]
conan [conan!] has joined ##java [04:23]
Lengsdorfer [Lengsdorfer!~Lengsdorf@unaffiliated/lengsdorfer] has joined ##java [04:25]
AndreYuhai [AndreYuhai!~porfavord@] has joined ##java [04:25]
AndreYuhai I have a swing app, using maven to build. When I run the app, on the task bar when I hover over the icon, it shows me the package name. And also on ALT + TAB, the same. How could I change this name shown? [04:26]
AndreYuhai [04:28]
Bebef [Bebef!] has joined ##java [04:30]
Maldivia probably then name of your jar file? [04:30]
AndreYuhai Maldivia, no, the name of the jar file is already something else. [04:31]
kh [kh!~hk@unaffiliated/kh] has joined ##java [04:37]
hojang [hojang!~hojang@] has joined ##java [04:38]
sb35 [sb35!~sb35@] has joined ##java [04:39]
it_ [it_!~quassel@] has joined ##java [04:39]
odinsbane Is that the name of the frame? [04:40]
it_ Hello. Is it easily possible to transform this code to more functional-style code? Basically I have a list of a specific type and apply an operation on every element, returning an Optional. I need to retrieve the list of all those transformed elements which have a non-null Optional and give an error message for every object which is not valid anymore. Sample code: [04:40]
it_ I thought of something in a way to call .map() on the Optionals to still have a reference to the original object, i.e. number in this sample. As I also require to include the "invalid" object in the errormessage [04:41]
odinsbane AndreYuhai: did you check this: [04:42]
odinsbane odinsbane's title: "macos - Setting Java Swing application name on Mac - Stack Overflow" [04:42]
it_ Perhaps a better example to understand the problem is that assuming I have a list of IDs, I want to retrieve the corresponding object assigned to that ID. I want to return a list of all these objects and give an error message for every ID, that it is invalid. [04:44]
ipe [ipe!] has joined ##java [04:48]
AndreYuhai odinsbane, Thank you, I am taking a look at it now. I've searched many things since yesterday but none of them had returned this page. :D [04:49]
odinsbane it_: you can use a groupingBy to get a Map with the valid and invalid options. [04:49]
hojang [hojang!] has joined ##java [04:56]
cnsunyour [cnsunyour!] has joined ##java [04:59]
it_ Will look into it, thanks odinsbane. Is there some sort of fancy syntax for unpacking this into two lists? [04:59]
acidjnk_new [acidjnk_new!] has joined ##java [05:06]
Gazooo [Gazooo!~Gazooo@] has joined ##java [05:07]
CookieM [CookieM!] has joined ##java [05:07]
Cuby96 [Cuby96!3e4404a2@] has joined ##java [05:08]
black_ant [black_ant!~antilope@unaffiliated/black-ant/x-1505394] has joined ##java [05:08]
it_ Actually I can't get it to work. The list of valid ones would be Optional<Object> and for the invalid ones I'd have nullable Optionals, but I require the original ID used to retrieve the object. I'll see that I can make an example and post it here asap [05:09]
hojang [hojang!] has joined ##java [05:10]
Cuby96 Hey there, just wanted to ask you about annotations in java, as i am writing a paper for uni, and i informed myself about that topic, and now i am at the topic custom exceptions and i don't really know what to write about (obviously i don't need ghost writing, just some ideas about what i could write about) [05:11]
whaley [whaley!~whaley@] has joined ##java [05:11]
gbobby [gbobby!~raltnoede@LINBIT/gbobby] has joined ##java [05:13]
Cuby96 and i have to write about annotations in general, so i explained what annotations are what annotations already are in java etc how they work, but custom annotation i just wrote one and explained what it does but what could i also include? [05:13]
deebo it's just metadata that is or isn't available at different stages of a programs lifecycle [05:14]
sonOfRa Huh, why does,%20long,%20boolean) throw an exception instead of *waiting* when the current VM already holds a lock for the file? That is rather inconvenient. [05:15]
Cuby96 yes thats right, i already mentioned that in my paper, the different life cycles and what the @Retention does to the custon annotation [05:16]
it_ Here's the example: [05:16]
jmorris [jmorris!uid374834@gateway/web/] has joined ##java [05:16]
it_ I didn't manage to get it working with groupingBy, as I require the object in the success case and the ID to retrieve it in the error case [05:16]
odinsbane sonOfRa: which exception does it throw? It sounds like it should block. [05:17]
Cuby96 so what i already wrote is: what is an annotation? what predefined annotatons are they already in java? and custom annotation example, i ask myself how i can further write about those custom ones as they are quite a big thing [05:18]
sonOfRa OverlappingFileLockException - If a lock that overlaps the requested region is already held by this Java virtual machine, or if another thread is already blocked in this method and is attempting to lock an overlapping region ^ odinsbane [05:18]
Markow [Markow!~ejm@] has joined ##java [05:21]
odinsbane That is a wierd one. "they are not suitable for controllnig access to a file by multiple threads within the same virtual machine" [05:21]
extor [extor!~extor@unaffiliated/extor] has joined ##java [05:27]
dreamreal Cuby96: sounds like a paper on metadata [05:27]
Cuby96 almost dreamreal the paper topic is Annotations and Exceptions [05:28]
Cuby96 i am on the annotations part rn [05:28]
dreamreal Cuby96: exceptions, too, are metadata at the source level [05:29]
dreamreal the compiler enforces things when it sees "throws..." statements that fit specific requirements, but at the VM level that stuff's irrelevant [05:29]
Cuby96 ah okay interesting, didnt find that fact that exceptions are metadata [05:30]
Cuby96 nice then i know a similarity what those both have in common [05:31]
Cuby96 and do you know dreamreal what i could wrote about custom annotations else then write one and explain what they could be used for? [05:32]
Cuby96 *than [05:32]
Cuby96 ik for a fact that i will explain how i can read and use those annotations for a specific scenario, but i cant just write a custom one and say thats it :D [05:33]
sdu [sdu!] has joined ##java [05:34]
peaceguy [peaceguy!~peaceguy@unaffiliated/peaceguy] has joined ##java [05:34]
dreamreal Cuby96: they can be used for a lot of things. They're basically metadata. What can metadata be used for? That's what annotations can be used for. They can affect the generated code (as with CDI), or serve as flags for compilation (as lombok does) [05:37]
dreamreal they're basically things that say "here's information ABOUT this code" that also indicate how long that information is relevant (i.e., visible at runtime, or just compile-time.) [05:38]
dreamreal A discussion would ... cover all of that. [05:38]
Cuby96 okay that would also include to explain what metadata is to cover that fact that they are metadata, i guess that would be a good point aswell isnt it? or would that be too general? [05:39]
dreamreal I don't know what your rubric is [05:40]
Cuby96 the topic of the paper is annotations and exceptions, the length should be 6 sites long the rest is quite open [05:40]
dreamreal 6... sites... long? [05:41]
dreamreal How long is a "site" in this context? [05:41]
johnau was just about to ask [05:41]
Cuby96 well have to see how many words those are [05:43]
dreamreal It really doesn't matter. It's not my paper, and I'm pretty sure that what *I* think is important won't matter to your teacher. Figure out what your teacher wants, write that, get a good grade, be a good person. [05:44]
gbobby might be an incorrect translation from german "Seiten" = english "pages" [05:44]
askar_baskar [askar_baskar!d94684b2@] has joined ##java [05:44]
Tichodroma [Tichodroma!~lutz@fsf/member/Tichodroma] has joined ##java [05:44]
dreamreal gbobby: *nod* [05:44]
johnau ah [05:44]
dreamreal could very well be. But then you have to factor in whether font size and line spacing is accounted for, and so forth. [05:45]
johnau they usually specify that at the start of the course i think [05:45]
gbobby that used to be the loophole [05:45]
johnau "all submissions must be size 12 arial with 1.5 line spacing etc" [05:45]
Cuby96 [Cuby96!3e4404a2@] has joined ##java [05:45]
Cuby96 rip irc connection, well i will write about metadata i don't think he will have an issue with that :D [05:46]
gbobby gotta write 4 pages for an assignment? Hold my beer. Neue Helvetica, size 72, line spacing 400% [05:46]
dreamreal johnau: yes, but as I haven't taken the course, I don't know what the requirements are :) [05:47]
johnau dreamreal: of course [05:47]
dreamreal gbobby: helvetica? Amateur! Use the khuzdul font! [05:48]
x6e69636f [x6e69636f!4d882b06@gateway/web/cgi-irc/] has joined ##java [05:48]
Cuby96 well dreamreal its all i have as requirements, it literally says with my predefined template i should write 6 pages of raw text (so without pictures etc) :D [05:49]
Cuby96 \bibliographystyle{ACM-Reference-Format} if that helps you somehow :D [05:50]
dreamreal Cuby96: well, write 6 pages of raw text. You're a student. Use filler if you have to. Cite a lot. Point out javadoc, lombok, spring/CDI. Explain what each does. Then have a paragraph on exceptions on page 6. [05:50]
Cuby96 well, the problem isnt filling 6 pages as itself, its just the topics i should write about that was the question wasnt asking for any ghost writing :D [05:51]
Cuby96 i am definately sure i can write by myelf :) [05:51]
Cuby96 just needed some hints some things i may have overseen in my research for sources [05:52]
Cuby96 so metadata is one thing, another was that exceptions are handled as metadata so 2 good points there :) thanks alot for them dreamreal [05:53]
coalado [coalado!~Thomas@unaffiliated/coalado] has joined ##java [05:55]
gbobby haha, khuzdul doesn't take up a lot of space, but it sure is hard to read [05:55]
dreamreal gbobby: you gotta play every angle, man [05:59]
dreamreal What's interesting to me about khuzdul is that the dwarves were tolkien's take on hebrew culture in middle-earth... and khuzdul has like 64 sigils where hebrew has 22 [06:02]
gbobby hebrew has only 22? I thought it had a lot more... [06:03]
gbobby it looks interesting, I wish I could read it [06:03]
dreamreal no, it has 22 consonants plus vowel annotations [06:03]
dreamreal but the vowels were added later [06:03]
xa0s_ [xa0s_!] has joined ##java [06:10]
davlefou [davlefou!~davlefou@unaffiliated/davlefou] has joined ##java [06:15]
hojang [hojang!] has joined ##java [06:21]
dreamreal [dreamreal!~jottinger@unaffiliated/dreamreal] has joined ##java [06:21]
ravenousmoose [ravenousmoose!] has joined ##java [06:23]
neckutrek [neckutrek!53f19bc2@gateway/web/cgi-irc/] has joined ##java [06:32]
askar_baskar when will java have something better than getter and setter? [06:37]
glosoli [glosoli!~glosoli@unaffiliated/glosoli] has joined ##java [06:38]
yawkat records [06:39]
yawkat yawkat, what does that even *mean*? [06:39]
yawkat jep 359 [06:39]
yawkat 'JEP 359: Records (Preview)' can be found at [06:39]
dka I am trying to publish to maven local repository and install the package within another gradle project. I have used -SNAPSHOT extension. I can see in the new gradle project open in IntelliJ that the dep is here, however, I keep having build error due to missing package [06:42]
dka error: package com.myapp.api.mybatis.persistable does not exist [06:42]
con3 [con3!~kvirc@] has joined ##java [06:43]
dka My goal is to find a way to work on two workspace at once [06:43]
dka how can I ensure that my package is published properly? [06:47]
bendem Find it in your local repo [06:48]
bendem Under $HOME/.m2 [06:48]
hojang [hojang!~hojang@] has joined ##java [06:49]
dka I can see it [06:50]
dka so why the same source code work if installed from artifactory and fail if installed from local mvn ? [06:50]
SanguineAnomaly [SanguineAnomaly!] has joined ##java [06:51]
jbuchmaier [jbuchmaier!] has joined ##java [06:52]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [06:53]
dka Does gradle need anything more than mavenLocal() to be able to resolve classpath of dependencies installed from maven local repository ? [06:57]
dob1 I have a string lile 14-11-2019 11:55:22 I have parse it and create a LocalDateTime object, I am able to do this using LocalDateTime.parse(string, formatter) but the problem is that the time used in the string is in GMT timezone [06:58]
yawkat -> conversion table [06:59]
yawkat yawkat's title: "An introduction to java.time" [07:00]
dob1 I have to use zonedatetime I know [07:00]
francis36012 [francis36012!] has joined ##java [07:00]
Bombe Do entity listeners in Hibernate need to be enabled somehow? We switched from EclipseLink to Hibernate and now some tests that should fail, run and some that should run, fail. [07:00]
dob1 yawkat, I don't know to use the perse method of zonedatetime with the timezone [07:01]
yawkat ... then convert the LDT you already have [07:01]
dka I have classpath ONLY when installing my package from local maven repository. I use gradle in my project. What's going on ? [07:02]
dob1 yawkat, I am doing ldt = ldt.atZone(ZoneId.of("GMT")).toLocalDateTime(); [07:06]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [07:07]
rruizt [rruizt!] has joined ##java [07:08]
dob1 this seems to work ldt = ldt.atZone(ZoneId.of("GMT")).withZoneSameInstant(ZoneId.systemDefault()). [07:10]
dob1 toLocalDateTime(); [07:10]
dka What could cause a dependency to work in one repo and not in another ? [07:12]
CookieM [CookieM!] has joined ##java [07:13]
[twisti] work [07:19]
[twisti] [twisti], what does that even *mean*? [07:19]
[twisti] doesn't work [07:19]
[twisti] dka, doesn't work is useless. Tell us what it is, what you want it to do, and what it is doing. Consider putting some code and any errors on a pastebin. (use ~pastebin for suggestions) [07:19]
dreamreal dka: At some point we'd need to see the projects actually in question. What you've BEEN asking about isn't unusual or difficult or abnormal in any way, but you seem to be struggling, and that's... odd. [07:25]
enoq [enoq!] has joined ##java [07:25]
dka I would greatly appreciate if someone could send me a link so I can learn how to work in two java project on intellij without having to release to a real repository [07:28]
jbuchmaier [jbuchmaier!] has joined ##java [07:29]
macroprep [macroprep!] has joined ##java [07:29]
gurrkiin dka: I have done what you are trying to achieve without even thinking about it, but I had opened the 2 projects under an "umbrella project" so intellij had considered them modules, not sure if that is the missing link or not [07:34]
dka I believe the way maven publish to local is not the issue. I believe the way publish to local work is just producing a different artifact than the one produced by publish to artifactory. Otherwise no reason to that he does not work..i just need to get proper resource to read. [07:36]
Peste_Bubonica [Peste_Bubonica!~Peste_Bub@unaffiliated/peste-bubonica/x-4612396] has joined ##java [07:36]
dreamreal dka: the publish plugin doesn't create different artifacts: it just does something with the artifacts generated. publish to local would publish the SAME artifact as publish to remote. [07:37]
dreamreal gurrkiin: as he described it yesterday, they are not related in that fashion, as I understand it [07:37]
dreamreal dka: the way the build works in gradle and maven is pretty simple: compile, test, generate artifact, publish - if the publish phase goes to different locations, the artifact generated *is not affected* [07:39]
dka Thanks that clarify a bit. Considering repository is not involved in classpath issues, artifact are. How could you explain that an artifact publish to artifactory which is the same as the one released on my maven, fail to compile because of classpath missing if jar are equal ? [07:41]
dreamreal dka: that implies that the repository settings for the project aren't being set properly. Can you show the build.gradle files anywhere? [07:42]
dreamreal Along with the error messages? [07:42]
dreamreal Just like publish doesn't change anything, the compilation doesn't change either - the repositories are used to locate the artifacts, in order. [07:43]
dka I have a standard configuration except i use mavenLocal() in repositories. [07:45]
dreamreal That's ALSO standard. [07:45]
dreamreal It's not a default, but it's pretty freaking normal. [07:46]
dka I have noted that it is trivial and you are willing to have a look to help..i am picking up kids at airport and will be back later i will provide a test case [07:46]
sdu [sdu!] has joined ##java [07:47]
dka I ll gladly ask you some selected resources to read so I am aware on steps necessary to work locally on two projects at the same time, one being used as a dependency of the other. [07:48]
very_sne_ [very_sne_!~very_snea@] has joined ##java [07:49]
dreamreal Yeeks, freenode made like a banana and split [07:51]
cheeser haven't seen one of those in a while [07:51]
surial That doesn't even work. Bananas don't split. They just blacken up and shrivel. [07:52]
surial HumorMakesNoSenseException! [07:52]
dreamreal I've always thought you would be absolutely no fun at parties except as the target of derision. Confirmed! :D :D ;D [07:52]
Peste_Bubonica [Peste_Bubonica!~Peste_Bub@unaffiliated/peste-bubonica/x-4612396] has joined ##java [07:53]
whaley [whaley!~whaley@] has joined ##java [07:53]
black_ant [black_ant!~antilope@unaffiliated/black-ant/x-1505394] has joined ##java [07:53]
enoq [enoq!] has joined ##java [07:53]
matijja [matijja!~matijja@] has joined ##java [07:53]
davlefou [davlefou!~davlefou@unaffiliated/davlefou] has joined ##java [07:53]
sbeex [sbeex!~sbeex@] has joined ##java [07:53]
EmmaT_ [EmmaT_!] has joined ##java [07:53]
Ring0` [Ring0`!~ringo@unaffiliated/ring0/x-8667941] has joined ##java [07:53]
tracks_puter [tracks_puter!] has joined ##java [07:53]
bartzy [bartzy!uid163429@gateway/web/] has joined ##java [07:53]
begui [begui!] has joined ##java [07:53]
bn_work [bn_work!uid268505@gateway/web/] has joined ##java [07:53]
exonity01 [exonity01!uid364582@gateway/web/] has joined ##java [07:53]
ma1uta [ma1uta!~ma1uta@2a07:5741:0:89a::1] has joined ##java [07:53]
fmccann [fmccann!] has joined ##java [07:53]
Darkfoe [Darkfoe!uid402081@gateway/web/] has joined ##java [07:53]
dostoyevsky [dostoyevsky!~sck@unaffiliated/dostoyevsky] has joined ##java [07:53]
sunri5e_ [sunri5e_!~sunri5e@unaffiliated/sunri5e] has joined ##java [07:53]
bolt [bolt!~r00t@unaffiliated/bolt] has joined ##java [07:53]
AbrarSyed [AbrarSyed!] has joined ##java [07:53]
Yamakaja [Yamakaja!] has joined ##java [07:53]
TReK [TReK!~UnFaQ@unaffiliated/trek] has joined ##java [07:53]
linuxdaemon [linuxdaemon!linuxdemon@unaffiliated/linuxdaemon] has joined ##java [07:53]
tomato [tomato!~Tomato@unaffiliated/tomato] has joined ##java [07:53]
RoguePointer [RoguePointer!~jigen@unaffiliated/roguepointer] has joined ##java [07:53]
QuickWango [QuickWango!] has joined ##java [07:53]
benJIman [benJIman!benji@2a01:7e00::f03c:91ff:fedf:5ab2] has joined ##java [07:53]
Lymia [Lymia!] has joined ##java [07:53]
comrad [comrad!~quassel@holarse/core/comrad] has joined ##java [07:53]
pdg [pdg!sid395042@gateway/web/] has joined ##java [07:53]
Fezboy [Fezboy!] has joined ##java [07:53]
SJr [SJr!~sjr@unaffiliated/sjr] has joined ##java [07:53]
raatiniemi [raatiniemi!] has joined ##java [07:53]
jhill [jhill!sid1055@gateway/web/] has joined ##java [07:53]
yn [yn!~yano@freenode/staff-emeritus/yano] has joined ##java [07:53]
Buliarous [Buliarous!~gypsydang@unaffiliated/buliarous] has joined ##java [07:53]
Cyp_ [Cyp_!~Cyp_@2a05:f6c7:2883:0:2f1d:5968:2fed:3169] has joined ##java [07:53]
SpiceMan [SpiceMan!~SpiceMan@unaffiliated/spiceman] has joined ##java [07:53]
mindfulStoic [mindfulStoic!sid172528@gateway/web/] has joined ##java [07:53]
worstadmin [worstadmin!sid56056@gateway/web/] has joined ##java [07:53]
KnownSyntax [KnownSyntax!sid233169@gateway/web/] has joined ##java [07:53]
Velgor [Velgor!] has joined ##java [07:53]
tazle [tazle!] has joined ##java [07:53]
errr [errr!~errr@fedora/errr] has joined ##java [07:53]
cader [cader!] has joined ##java [07:53]
mbooth [mbooth!~mbooth@redhat/mbooth] has joined ##java [07:53]
Learath2 [Learath2!~learath2@unaffiliated/learath2] has joined ##java [07:53]
amosbird [amosbird!~amosbird@2a01:111:f102:8001::1761:4cf8] has joined ##java [07:53]
dostoyevsky [dostoyevsky!~sck@unaffiliated/dostoyevsky] has joined ##java [07:54]
tracks_puter [tracks_puter!~tracks@2600:1700:ade0:4400:b50f:43c8:f4e9:46ad] has joined ##java [07:55]
KnownSyntax [KnownSyntax!sid233169@gateway/web/] has joined ##java [07:57]
dodobrain_ [dodobrain_!~dodobrain@unaffiliated/freakabcd] has joined ##java [07:58]
AutomationD parted the channel: [07:58]
jhill [jhill!sid1055@gateway/web/] has joined ##java [07:58]
puppy_za well it depends on the kind of party [07:58]
Janhouse [Janhouse!] has joined ##java [07:59]
puppy_za let's host a java party! [07:59]
dreamreal Good point. Disection parties would be the best! [07:59]
dreamreal gross anatomy, here we come! [07:59]
puze [puze!~puze@] has joined ##java [08:00]
svm_invictvs [svm_invictvs!~svm_invic@unaffiliated/svminvictvs/x-938456] has joined ##java [08:00]
rajrajraj [rajrajraj!uid72176@gateway/web/] has joined ##java [08:01]
sdu [sdu!] has joined ##java [08:09]
hojang [hojang!] has joined ##java [08:16]
Cahaan [Cahaan!~Cahaan@] has joined ##java [08:22]
enoq [enoq!] has joined ##java [08:23]
KidBeta [KidBeta!~Kidbeta@hpavc/kidbeta] has joined ##java [08:23]
con3 [con3!~kvirc@] has joined ##java [08:24]
giaco [giaco!] has joined ##java [08:26]
puze parted the channel: "WeeChat 2.6" [08:28]
sonOfRa am I reading this correctly that FileAlreadyExistsException might not be thrown if the file already exists, and I'd get a regular IOException instead? [08:31]
progart [progart!~kamee@] has joined ##java [08:31]
odinsbane Why do you say that, because of the 'optional specific exception'? [08:35]
sonOfRa yes [08:36]
yawkat sonOfRa: correct [08:41]
sonOfRa well that's unfortunate. [08:41]
sonOfRa Is that due to different filesystems not having a concept of O_CREAT? [08:41]
Bombe Well, turns out, the annotated methods of entity listener classes must not be in a superclass but must be declared directly in the entity listener class. [08:46]
Bombe Plus, throwing generics into that mix sucks doubly because only one method may have the annotations, and synthetic methods are not ignored. [08:47]
dreamreal Bombe: document this! [08:48]
hojang [hojang!~hojang@] has joined ##java [08:49]
Bombe dreamreal, aye aye! [08:50]
Bombe Later tonight. :) [08:50]
Anthaas [Anthaas!~Anthaas@unaffiliated/anthaas] has joined ##java [08:54]
ravenousmoose [ravenousmoose!] has joined ##java [08:56]
deathcap [deathcap!~user@unaffiliated/deathcap] has joined ##java [09:02]
x6e69636f parted the channel: [09:12]
Rapture [Rapture!] has joined ##java [09:13]
maxel_ so I am trying to use a paho mqtt client to connect to an mqtt endpoint. I keep getting a Connection lost (32109) exception after it seems to successfully make a connection. I validated my endpoint and certs work with mosquitto_pub [09:17]
dreamreal maxel_: sounds like you might need to talk to the mqtt support forums [09:18]
maxel_ yeah, there's a ticket open on the paho git page [09:18]
maxel_ just another asinine request because a customer used paho once and it worked, so they asked if we could get it working for them on our aws iot endpoint [09:19]
maxel_ even though I sent code that works using aws sdk [09:19]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [09:27]
yn [yn!~yano@freenode/staff-emeritus/yano] has joined ##java [09:35]
Iolo [Iolo!] has joined ##java [09:42]
sdu [sdu!] has joined ##java [09:43]
conan_ [conan_!~conan@] has joined ##java [09:47]
jbuchmaier [jbuchmaier!] has joined ##java [09:49]
dka Hi again, dreamreal I've been reading this and they seems to have a different approach [10:01]
dka they do not rely on deployed artifact, they rely on local import [10:01]
Sc0tty- [Sc0tty-!~Scott@] has joined ##java [10:01]
cheeser that's still a deploy, really. it's just a local repo. [10:01]
dka -deployed+released [10:01]
rohanrhu__ [rohanrhu__!~rohanrhu@] has joined ##java [10:06]
conan_ [conan_!~conan@] has joined ##java [10:07]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [10:07]
dreamreal sighs [10:09]
dka I just wanted to confirm that this is a bad strategy [10:14]
dka this is how we learn right ? [10:14]
gbobby hmm... upgraded from NetBeans 8.2 to 11.1, and somehow that thing became way worse... Code assistance fails frequently [10:14]
dka I assume no one can always be in the truth and must have made lots of mistake to stay in truth long term [10:14]
plarsen [plarsen!~plarsen@redhat/jboss/pdpc.professional.plarsen] has joined ##java [10:14]
surial not really; if you try something and trust random laid-down law (without explanation or, if it does have explanation, without you understanding it properly), you're not really learning. not in a way that's gonna stick or let you expand your knowledge into related domains. [10:15]
mluser-home [mluser-home!] has joined ##java [10:15]
dreamreal dka: what's a bad strategy? [10:15]
dka That's something that you should not do [10:15]
x256 [x256!] has joined ##java [10:16]
dreamreal what's the "that" [10:16]
dka I was replying to the *sight* [10:16]
dka The that is abstract, if you want to make it specific I can rephrase the whole [10:16]
mluser-home [mluser-home!] has joined ##java [10:16]
dka from my knowledge, dreamreal suggested to just publish and install package locally because it is not recommended do link project that are not from the same workspace [10:17]
dreamreal dka: what ... what sight are you talking about? The way to use artifacts from project A in project B, if they're not part of the same parent project, is to publish the artifacts from project A somewhere - locally, remotely, it doesn't matter where. [10:17]
dreamreal I've been telling you this over and over and over again. [10:17]
dreamreal This is not only accepted practice, it's very very common practice. [10:17]
dka this guy here is saying the opposite, I wanted to get an impression like your tought about this, because I cant just assume you guys are always right. even if you are most of the time right. [10:17]
cheeser if you pull in resources via relative links like that that, you're tying the build to your machine/setup. [10:18]
dka Ok, in this case I may have not understood you. [10:18]
cheeser we are always correct. :) [10:18]
dka So I should not publish and install, I should follow the stackoverflow recommendation and use local import ? [10:18]
dreamreal dka: that SO article, where he binds the projects together like that, is asking for a very brittle build. [10:18]
dreamreal dka: you SHOULD publish and install! [10:19]
dreamreal We keep saying the same damn thing! [10:19]
cheeser the fuck did i just say? [10:19]
dka dreamreal, ok well I was in the right direction I just needed to make sure because I keep not succeeding [10:19]
dka I will keep going trying to make it work, thanks [10:19]
dreamreal dka: and we keep saying to show your work, because it's what everyone does [10:19]
dka Yes, I just got back from the airport, I am on it now [10:20]
dreamreal dka: create project A. Put stuff in it. Publish locally, to the local maven repo. [10:21]
acidjnk_new [acidjnk_new!] has joined ##java [10:21]
dreamreal dka: create project B, with a dependency on A. Put the maven local repo in the repositories list. Build as normal. [10:22]
Harlin [Harlin!] has joined ##java [10:22]
dreamreal It's that trivial. There's nothing to it. [10:22]
dka Yes, except I have classpath issue when using local maven repo [10:22]
dreamreal Then you're doing something wrong. [10:23]
dka otherwise I would be far away from this already xD [10:23]
dreamreal There's literally nothing more to it than what I just described. [10:23]
dka I did exactly that. But yeah let me inspect and in worth case Ill try to create a reproduction [10:23]
greggerz [greggerz!~greggerz@unaffiliated/greggerz] has joined ##java [10:26]
jamezp [jamezp!~jamezp@redhat/jboss/jamezp] has joined ##java [10:26]
dreamreal well, which dependencies didn't resolve [10:27]
dka A is resolved by gradle and imported, I can see it in external libraries in intellij [10:27]
dreamreal um... in B? [10:27]
dka but error happen during build time, such as error: package com.myapp.api.mybatis.persistable does not exist [10:28]
dreamreal okay, SHOW US the build.gradle in B and A [10:28]
EgonX [EgonX!] has joined ##java [10:28]
dka in B and A I have a root build.gradle [10:28]
dka and sub project build.gradle [10:28]
mluser-home [mluser-home!] has joined ##java [10:29]
dka This ir B root build.gradle [10:29]
dreamreal okay, so let me see if I can describe the problem: A depends on mybatis, B depends on A, B sees *A* but not mybatis? [10:29]
dka This is B sub project build.gradle [10:29]
dka No its not mybatis, its a class from my package [10:30]
dka com.myapp.api.mybatis is my package [10:30]
dreamreal okay, so B isn't seeing *A* at all [10:30]
dka This is build.gradle of A root [10:30]
dka This is build.gradle of A sub project [10:31]
dreamreal dka: and in B's build.gradle, where's the repositories block that includes mavenLocal()? [10:31]
dka L35 [10:32]
dka and L92 [10:32]
dka here (B root build.gradle) [10:32]
dreamreal well, it SOUNDS like that's not being carried through to the actual projects. run gradle in debug mode, examine what the repositories are. [10:33]
dka I've already tried to add --debug but didnt found any relevant log [10:33]
rippa [rippa!] has joined ##java [10:34]
dreamreal you used --scan or anything like that? [10:35]
dka This is ./gradlew build --debug : [10:35]
dka I don't know --scan and I've just tried, it doesen't produce anything special [10:36]
hojang [hojang!hojang@nat/redhat/x-qrigoprplqjrgqjb] has joined ##java [10:36]
enoq [enoq!] has joined ##java [10:36]
dreamreal See line 336 & so [10:38]
conan [conan!~conan@] has joined ##java [10:39]
dka interesting, but expected. [10:39]
dreamreal yes, but that means it's seeing at least that artifact [10:39]
dka since 1.1.26-SNAPSHOT only exist in the local maven repo [10:39]
dka Yes, I can see it pulled in intellij under External Libraries [10:39]
dka It's a classpath issue right ? [10:40]
dreamreal errrr [10:40]
dka if the jar is here, but java can't compile, it can only be the classpath, you said the published artifact is equal and is not corrupted because its local maven repository released [10:40]
dreamreal Classes not being resolved *is* a classpath issue, but this is more a dependency resolution thing [10:40]
dreamreal if the jar is there and java's not compiling it, then javac either doesn't see the artifact (it's at the wrong scope?) or the artifact doesn't have what you think it does [10:41]
dka It must be the first one, because I have the same package released on artifactory and it work like a charm [10:41]
dreamreal Well, *where* the jar is loaded from isn't relevant, if it's local or remote would make no difference [10:42]
dka [10:44]
mluser-home [mluser-home!] has joined ##java [10:44]
dka There's currently no built-in functionality to even publish dependencies to the Maven's local repository from the build script. Create a shell script that does the necessary legwork. Daniel Dietrich once wrote one and published it on Twitter. [10:44]
dka could it be the cause ? [10:44]
dreamreal The publish command does in fact have the ability to publish to the local maven repo. I showed you that yesterday. [10:45]
freeone3000 This isn't a question! Of course it doesn't! [10:45]
freeone3000 It uses the *gradle* local repository! [10:45]
freeone3000 We went over this yesterday. [10:45]
dka Sorry, you are right. But I am trying to make hypothesis so I can troubleshoot something [10:46]
dka If we go back to what I want to achieve, it's fairly common, I just want to be able to work on A and B, B depending on A, using two workspace [10:46]
dreamreal it's very common, not just fairly common [10:47]
dka I need a way, I don't know what way. But I need to find a way to achieve that. [10:47]
enoq [enoq!] has joined ##java [10:48]
gurrkiin longshot but sometimes when IntelliJ aint recognizing what I need it to, I go File->Invalidate Caches/Restart and it magically is fixed [10:48]
dka It sound very common, I've read an article during transportation, it was this one : [10:48]
dka This guy use : ':libraryname' [10:50]
dka project(':libraryname').projectDir = new File(settingsDir, '../your-library-folder/libraryname') [10:50]
dka maybe that's another way to go, but I'd like to get the recommended from here. [10:51]
dreamreal dka: you... would not... refer to projects that way [10:56]
dreamreal project A would have coordinates: groupId foo, artifactId bar, version baz. You would thus refer to it with: compile('foo:bar:baz') just like any other project. [10:56]
mluser-home [mluser-home!] has joined ##java [10:59]
dka yes, I know, but in multi gradle project you would .... [11:04]
led_dark_1 [led_dark_1!~Thunderbi@] has joined ##java [11:04]
dka What's your suggestion so I can get going with the development on both project ? [11:04]
whaley [whaley!~whaley@] has joined ##java [11:04]
dka would you try to find why my setup is not resolving classpath properly ? [11:04]
dreamreal multi-gradle project where the projects aren't associated? I'd do exactly what I keep on telling you. Publish locally, resolve locally, profit. [11:05]
dreamreal dka: without seeing your actual project, I'm not sure I can. [11:05]
dka Of course, I was asking in my place. Ok so you would fix it [11:06]
dreamreal ... of course I would [11:07]
dreamreal not fixing it means leaving it broken [11:07]
dreamreal and that seems... dumb [11:07]
nowayy [nowayy!~noway96@2607:ea00:107:3c07:4661:6dc7:7644:6725] has joined ##java [11:12]
dka I don't see how to fix it I have no clue. I can only share my project and rely on you but I rather find it by myself so you dont have to work for free [11:13]
dka But is that the only option I have? That's kind of you [11:13]
otto_j [otto_j!] has joined ##java [11:14]
nowayy Hello! has anyone compiled junit from the command line? I'm having issues. I have my src code in src/ folder and my tests in tests/ folder. How do I compile tests/ that uses src/ I've tried javac -cp /usr/share/java/junit4-4.12.ja tests/ but it doesn't seem to work [11:14]
cheeser doesn't work [11:14]
cheeser cheeser, doesn't work is useless. Tell us what it is, what you want it to do, and what it is doing. Consider putting some code and any errors on a pastebin. (use ~pastebin for suggestions) [11:14]
nowayy compiled with junit* [11:14]
dreamreal nowayy: why are you using javac manually [11:15]
nowayy dreamreal I dunno I'm just used to working from the command line with C++ and Python [11:15]
dreamreal you're going to hurrrrrrrrt with java then [11:16]
dreamreal and you... probably use with python, along with pip/pipenv/poetry [11:16]
cheeser you can still "work from the command line" and use a proper build tool [11:16]
nowayy dreamreal I mean yeah there will helper files [11:17]
brainproxy [brainproxy!~michael@pdpc/supporter/gold/brainproxy] has joined ##java [11:17]
dreamreal nowayy: maven and gradle are going to be equivalents. Rely on them. [11:17]
dreamreal maven [11:17]
dreamreal Maven is a software management tool that can compile, test, package, and deploy your project, with plugins for everything you can think of. See and [11:17]
dreamreal gradle [11:17]
dreamreal dreamreal, 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 for more. [11:17]
dreamreal do you invoke cc manually? like, cc -Wall src/foo.c src/bar.c src/baz.c -lm -lcrc -lasox # EVERY time? [11:18]
nowayy no there's a make file for that [11:19]
dreamreal haha [11:19]
dreamreal well... maven and gradle are equivalents for make and [11:19]
hojang [hojang!hojang@nat/redhat/x-yraxtirfczlfdyzc] has joined ##java [11:19]
mbooth nowayy: Cool, then consider your maven pom.xml the equivilent of a makefile [11:19]
nowayy wow you all really love your Maven [11:19]
nowayy and Gradle [11:20]
gurrkiin no, it's just a major pain in the ass to work without them [11:20]
dreamreal no, we love getting shit done and not masturbating over how much we love to type "javac" [11:20]
nowayy I'll look into it but I'm also curious for the javac command [11:20]
mbooth nowayy: Well, you use the idiomatic tools in other languages, what makes Java special? :-) [11:20]
dreamreal well, we'd have to see the actual error you are getting [11:20]
dreamreal and not "it doesn't work" [11:21]
nowayy I can share the code. Does filebin work? [11:22]
dreamreal why not share the error [11:22]
mluser-home [mluser-home!] has joined ##java [11:22]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [11:22]
acidjnk_new [acidjnk_new!] has joined ##java [11:22]
nowayy [11:24]
nowayy nm just compiled it [11:24]
nowayy lol [11:24]
nowayy but how do I run it? [11:25]
dreamreal now convert to a maven or gradle build and stop manually manipulating the compilation classpath [11:25]
dreamreal run what [11:25]
nowayy the compiled tests with java [11:25]
gurrkiin java test/UserInputTest [11:25]
dreamreal The test? That's a convoluted junit invocation. You'll love it! [11:25]
dreamreal gurrkiin: he needs to invoke it with the junit test runner, along with having the classpath set properly [11:26]
gurrkiin knew that was too simple.. [11:26]
mbooth nowayy: maven would run your tests with a simple invokation of "mvn test" -- the alternative is... well I'd rather stick a finger in my eye [11:26]
nowayy mbooth what is the alternative? [11:26]
dreamreal (or, well, "mvn test" or "gradle test" but ... that would require him following our idiomatic advice, and who needs THAT, right?) [11:26]
sleepywitch [sleepywitch!] has joined ##java [11:26]
nowayy I'll go work on gradle after I figure out the bare metal version [11:27]
dreamreal nowayy: invoke the junit test runner via command line, manually. I'm not even sure what the NAME of the test runner is. Heck, I don't even know if junit publishes the name very obviously, because only morons would invoke it manually. [11:27]
mbooth nowayy: Maybe you should read the Junit manual: [11:27]
dreamreal java org.junit.runner.JUnitCore TestClass1 [...other test classes...] [11:28]
dreamreal [11:28]
dreamreal but that implies that you have the classpath set correctly (not shown in the invocation) [11:28]
mbooth Right, that's an exercise for the reader. [11:29]
mbooth s/reader/not right in the head/ [11:29]
gurrkiin How did people do Enterprise Java before build tools? [11:29]
dreamreal gurrkiin: they used build tools. Ant was around even then. [11:30]
dreamreal (Actually... you know, I built a makefile for running stuff in sun's original jigsaw server. But that didn't last long.) [11:30]
mbooth gurrkiin: ant was created as a replacement for make, so even before that (before my time) they probably used make [11:30]
gurrkiin oh, released 2000, thats old [11:30]
dreamreal yeah, this would have been in 1998 or so, we were working with sun's professional services [11:31]
dreamreal we also had applets that ran with 1.02, deployed along with the servlets (that were done with 1.1) so we had a multistage build [11:31]
blackntan [blackntan!jay@unaffiliated/blackntan] has joined ##java [11:32]
mbooth dreamreal: How long did it take you to get over your PTSD? :-) [11:33]
dreamreal mbooth: I'm not that delicate, thank you. [11:33]
mbooth Heh [11:33]
dreamreal "oh no, XML with namespaces, whatever shall I dooooooo" <-- not me, thank you [11:33]
dreamreal "ermagerd this isn't the perfectest thing that ever perfected, you have to make compromises to get it to work well, whatever shall I dooooooooo" <-- again, not me [11:34]
dreamreal make sucks for java but that's mostly because of the dependency resolution - and things like ivy and aether were yet glimmers in peoples' eyes at the time, you just included the jars you needed in your project and got it done because working > complaining about things not being ideal [11:36]
dreamreal (and you collected requirements for making things closer to the ideal, of course) [11:38]
HumanG33k [HumanG33k!~HumanG33k@] has joined ##java [11:38]
HumanG33k [HumanG33k!~HumanG33k@] has joined ##java [11:40]
ExtraCrispy [ExtraCrispy!~ExtraCris@gateway/tor-sasl/extracrispy] has joined ##java [11:40]
enoq [enoq!~enoq@2a02:8388:6a87:b080:649f:9456:c1b1:28e4] has joined ##java [11:45]
dka dreamreal, I have published the -SNAPSHOT of A on artifactory in snapshot repo, now I am able to run the app [11:47]
dreamreal ok [11:48]
RedSoxFan07 [RedSoxFan07!~Thunderbi@] has joined ##java [11:48]
dka I don't know if that add valuable information. [11:48]
yokel [yokel!~yokel@unaffiliated/contempt] has joined ##java [11:48]
dka It shouldn't have any different behavior. Perhaps my maven local repository is outdated? [11:49]
dreamreal shrugs [11:49]
dka dreamreal, you told me the artifact is equal. I have asserted that the repository are being handled differently. artifact are still equal. Probleme comes from the way those artifact are installed [11:50]
dka I don't know but that make sens. [11:51]
dreamreal applies occam's razor [11:51]
Arlion [Arlion!Arlion@gateway/vpn/privateinternetaccess/arlion] has joined ##java [11:57]
extor [extor!~extor@unaffiliated/extor] has joined ##java [11:58]
sbalmos dreamreal: can I borrow that razor to slit a throat, or at least a wrist? [11:59]
dreamreal sbalmos: please. Have more than one. [12:00]
dka "then javac either doesn't see the artifact (it's at the wrong scope?)" => Can you explain when such situation happen and how I could verify that [12:02]
dka "or the artifact doesn't have what you think it does" => is it possible that the same artifact doesnt have what I think he does after publishing in both repository with the same gradle command ? or can we just remove that assumption and dig the previous one [12:03]
Sheilong [Sheilong!uid293653@gateway/web/] has joined ##java [12:03]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [12:04]
ahilman [ahilman!~ahilman@] has joined ##java [12:07]
recon_dsk [recon_dsk!~mec@] has joined ##java [12:13]
g00s [g00s!~g00s@unaffiliated/g00s] has joined ##java [12:15]
codecutter [codecutter!~anon@] has joined ##java [12:26]
gareppa [gareppa!~gareppa@unaffiliated/gareppa] has joined ##java [12:26]
codecutter what collection type is best suited for something twitter timeline? [12:27]
trinityblade [trinityblade!~trinitybl@] has joined ##java [12:27]
cheeser a database [12:28]
codecutter parted the channel: [12:28]
sdu [sdu!~doo@] has joined ##java [12:30]
mbooth Does anyone even know how the twitter timeline works? Seems pretty random to me [12:30]
funeral [funeral!~Funeral@] has joined ##java [12:31]
cheeser sounds like a #java-talk question [12:31]
sizeof_void34 [sizeof_void34!~dolbean@2a00:1370:811e:d659:cc56:1d69:2f29:f6ea] has joined ##java [12:33]
orbyt_ [orbyt_!~orbyt@] has joined ##java [12:35]
dreamreal mbooth: I can find out for you if you'd like [12:39]
mbooth Nah, it was just a passing idle curiosity. [12:40]
dreamreal well, there are lots of wys to do it but the requirements at twitter itself are probably different than most people would want to think about [12:41]
whaley I'm sure someone knows how the timeline works [12:42]
dreamreal I'm sure someone does, whaley [12:42]
whaley whether or not they are at liberty to disclose it, is another matter altogether [12:42]
whaley I was actually given an interview question once of diagramming the architecture of how I thought Twitter worked... in other words, how would you architect it in 45 minutes or less [12:44]
xeno [xeno!~xeno@unaffiliated/xeno] has joined ##java [12:44]
cheeser "start with a whale..." [12:45]
dreamreal "... kill it..." [12:45]
mbooth "... and eat it one bite at a time?" [12:45]
dreamreal heh [12:45]
dreamreal it'd be interesting to see how you solved it, whaley - were they basing it off of actual twitter SLAs, as they imagined them? [12:46]
whaley heh, if I ever get asked again, I'm going to start with 'well, let's with the DR plan that will serve up a fun 500, because let's be honest, this shit I'm drawing isn't going to work" [12:46]
dreamreal haha [12:47]
whaley dreamreal: it was very open ended. I think they (Apple, fwiw) were interested in what tradeoffs I was going to make, and what aspects of the overall system I fixated on [12:47]
dreamreal *nod* Sounds like the right approach, too [12:47]
learning1 [learning1!~pi@] has joined ##java [12:48]
paddyez [paddyez!~Patrick-E@wikipedia/paddyez] has joined ##java [12:49]
recon_dsk I'd of asked them for the spec's [12:50]
dreamreal hmm, now I'm wondering how *I* would solve twitter's timeline [12:50]
dreamreal "Install an http redirect to irc..." [12:51]
recon_dsk not much of a twitter user, not sure what a twitter timeline is [12:51]
mbooth recon_dsk: It's a mechanism to receive a stream of ads occasionally punctuated with messages from your friends. [12:52]
recon_dsk hmm, guess uOrigin Block stopped me for seeing the adds :) [12:53]
recon_dsk ads* [12:53]
Arlion [Arlion!Arlion@gateway/vpn/privateinternetaccess/arlion] has joined ##java [12:53]
reefreef [reefreef!a06ffe11@] has joined ##java [12:57]
togo [togo!~togo@2a02:6d40:34c7:a901:a083:56ba:a861:99c6] has joined ##java [12:59]
progart [progart!~kamee@] has joined ##java [01:03]
kicked progart (Banned: please fix your connection. you're bouncing in and out. this ban will expire after 30d) [01:03]
pikapika [pikapika!] has joined ##java [01:05]
EgonX [EgonX!~Egon@2600:380:605c:d0c2:596e:3c7d:932e:ed12] has joined ##java [01:09]
Xiti [Xiti!~Xiti-@unaffiliated/xiti] has joined ##java [01:23]
mluser-home [mluser-home!] has joined ##java [01:31]
Human_G33k [Human_G33k!~HumanG33k@] has joined ##java [01:33]
Human_G33k [Human_G33k!~HumanG33k@] has joined ##java [01:35]
led1 [led1!~Thunderbi@] has joined ##java [01:36]
led2 [led2!~Thunderbi@] has joined ##java [01:38]
jamiejackson [jamiejackson!c7df1efe@gateway/web/cgi-irc/] has joined ##java [01:39]
TReK [TReK!~UnFaQ@unaffiliated/trek] has joined ##java [01:40]
led2 [led2!~Thunderbi@] has joined ##java [01:41]
ravenousmoose [ravenousmoose!] has joined ##java [01:42]
rruizt [rruizt!] has joined ##java [01:43]
newbieG [newbieG!~bhaskar@] has joined ##java [01:50]
Arlion [Arlion!Arlion@gateway/vpn/privateinternetaccess/arlion] has joined ##java [01:57]
veegee [veegee!] has joined ##java [02:02]
hojang [hojang!] has joined ##java [02:04]
fragamus [fragamus!] has joined ##java [02:10]
Jigsy` [Jigsy`!~Jigsy@unaffiliated/jigsy] has joined ##java [02:11]
Sasazuka [Sasazuka!~Sasazuka@unaffiliated/sasazuka] has joined ##java [02:12]
Harlin [Harlin!] has joined ##java [02:12]
fragamus [fragamus!] has joined ##java [02:17]
EgonX [EgonX!~Egon@2601:2c6:47f:98f4:a499:d35f:bc23:7f1] has joined ##java [02:18]
gelignite [gelignite!] has joined ##java [02:18]
funeral [funeral!~Funeral@] has joined ##java [02:20]
sa02irc [sa02irc!] has joined ##java [02:21]
HotBeefDip [HotBeefDip!] has joined ##java [02:22]
mluser-home [mluser-home!] has joined ##java [02:23]
ricky_clarkson Twitter architecture? I'd just reinvent IRC in the interview. [02:25]
dreamreal or create a long and drawn-out solution that doesn't map to twitter at all? ... after two hours of architecture discussion, the realization dawns that you've created a shipping demurrage application and nothing like twitter at all? :) [02:26]
Diablo-D3 twitter, imnho, is the absolutely most retarded pubsub impl ever. [02:27]
ricky_clarkson hah [02:27]
Diablo-D3 how the fuck they even got it to scale is beyond me [02:27]
dreamreal Diablo-D3: isn't that the whole point of the challenge, though? [02:28]
Diablo-D3 is it a challenge? I can just throw a sufficiently large pg server at it. [02:29]
dreamreal um. [02:30]
Diablo-D3 yes, you heard me, running a pubsub api out of pg. [02:31]
mbooth Doesn't sound "web-scale" to me [02:32]
Lengsdorfer [Lengsdorfer!~Lengsdorf@unaffiliated/lengsdorfer] has joined ##java [02:33]
orbyt_ [orbyt_!~orbyt@] has joined ##java [02:36]
RedSoxFan07 [RedSoxFan07!] has joined ##java [02:39]
Renart0 [Renart0!~Renart@2605:b100:506:ab8:157:c7fc:f27c:3ee0] has joined ##java [02:39]
Diablo-D3 mbooth: I think, for 99.9999% of customers, the cloud is a mistake [02:40]
Diablo-D3 scaling up is a mistake [02:40]
lucid-lullaby [lucid-lullaby!lucid-lull@gateway/vpn/privateinternetaccess/lucid-lullaby] has joined ##java [02:40]
Diablo-D3 and hiring idiots is a mistake [02:40]
Diablo-D3 code golf should often be encouraged, actual real performance testing should be encouraged, and rapid prototyping should be discouraged (although, sometimes, but rarely, it has its place) [02:41]
x256 Answering "I'll just ..." would immediately disqualify you in such an interview. There is no easy solution, and underestimating complexity before trying to understand it better is a rookie mistake. [02:41]
Diablo-D3 x256: which is what twitter has the halmark of doing repeatedly [02:41]
Diablo-D3 they did not understand the problem, and they are now drowning under the accrued technical debt [02:41]
x256 Works great for them so far, though. [02:42]
Diablo-D3 no, it really didnt [02:42]
Diablo-D3 I'd hate to be a twitter investor, they got sold a bill of goods and gave a bunch of scammers an exit [02:42]
fragamus [fragamus!] has joined ##java [02:43]
Diablo-D3 the problem is, they wrote a lot of their early code after "evaluating" stuff that existed back then [02:46]
Diablo-D3 they published a lot of their code, and also the rationale at why it was written [02:46]
Diablo-D3 twitter pooped out a lot of dead projects, and it shows an alarming cultural shift over there [02:46]
Diablo-D3 they, early on, has a surprisingly large amount of java [02:46]
Diablo-D3 now its a less suprisingly large amount of js [02:47]
gareppa [gareppa!~gareppa@unaffiliated/gareppa] has joined ##java [02:52]
humanBird [humanBird!265b7f73@] has joined ##java [02:52]
humanBird in intellij i have a pom with testng and recompiled. in the command line in intellij, java org.testng.TestNG testng.xml gives me a could not find or load main [02:54]
srm28__ [srm28__!~tracks@2600:1700:ade0:4400:a0ae:c474:4ca8:94a6] has joined ##java [02:54]
bitwinery [bitwinery!] has joined ##java [02:57]
surial humanBird: intellij has a command lane? Anyway, your classpath isn't setup. [02:58]
humanBird intellij specifically says not to do this stuff manually [02:58]
surial humanBird: it's java -cp yourstuff:moreofthestuff org.testng.TestNG etcetera. [02:58]
surial humanBird: and yet that's what you are doing though. [02:58]
surial maybe intellij has a command line plugin but that's literally putting a command line thingie inside intelilj for convenience; iyou're doing it 'manually' if you run it that way. [02:58]
bitwinery [bitwinery!] has joined ##java [02:58]
humanBird [humanBird!265b7f73@] has joined ##java [02:59]
humanBird what is mystuff and moreofmystuff [02:59]
Diablo-D3 yourstuff, and moreofyourstuff [03:00]
surial Diablo-D3: scammers? [03:00]
surial Diablo-D3: nah. [03:00]
humanBird yea. i still dont' get how this works [03:01]
surial Diablo-D3: the last round of investment in twitter was still the kidn of 'needs at least a 10x value increase before we can get out of this investment' level of investment, and it wasn't stupid, nor was it a scam: Twitter is _STILL_ the primary thing that people use when writing hashtags and identities for discussion (on television, people's twitter handles and such show up!), and twitter is STILL the best source for live-second-p [03:02]
surial er-second as-it-is-happening news. [03:02]
surial It makes sense to think that valuating the company for investment purposes at a few billion and thinking it'll 10x that is feasible. [03:02]
Diablo-D3 Im... just not seeing it [03:02]
Diablo-D3 how does twitter make money? [03:02]
surial Unfortunately.. either it is not feasible (likely) or twitter's management is not the team to do it (maybe). [03:02]
surial how does facebook? [03:02]
surial how does google? [03:02]
surial It's the fucking valley. they don't care. [03:02]
Diablo-D3 google sells ads, and also runs a vc side gig, and is incredibly profitable on both [03:03]
Diablo-D3 facebook was late to the ad game its kinda meh, but its mostly keeping the lights on [03:03]
Diablo-D3 twitter? who the fuck knows [03:03]
Diablo-D3 I think they have some sort of weird paid post thing? maybe? [03:03]
humanBird i see maven and java 1.8 under something called "external libraries" in this intellij "External Libraries" menu. [03:03]
surial That's not the point. Twitter hasn't grown since its last round of investment. Not in users, not in what it does. Whilst perhaps not surprising that it hasn't, note that SV investors are looking to make the following bet: I want to invest in a company that has a 10% chance to become 20x as valuable, or maybe a 20% chance to become 10x as valuable. I will double my money then. [03:03]
humanBird when I [03:03]
humanBird when I type mvn, I get a command not found [03:03]
Diablo-D3 I dunno, I just dont see the inherent value in what it does [03:04]
humanBird i don't know how intellij is handling maven but it's not working. [03:04]
Diablo-D3 you listed things its just bad at [03:04]
surial so why ISNT twitter being able to monetize the platform (one that is used by TV _AND_ a lot of celebrities in particular AND has real value that so far still isn't being replicated by any other service, in up-to-the-minute news in the trenches)? My point is simply: It is fucking idiotic to think that, 10 years ago, the odds that twitter CLOUD monetize it properly was less than 20%. [03:04]
surial No, the VC investors are mostly fine. They made a solid bet, and it didn't pay out. Doesn't mean the bet was wrong. [03:05]
surial Just part of the job. No, the ones who are fucking fucked are twitter. [03:05]
humanBird eh.. losing money in a bet means the bet is wrong [03:05]
Diablo-D3 you just have a different opinion on this, I think [03:05]
humanBird in hindsight but still wrong [03:05]
surial They signed up for this shit. They either 10x their value or they remain stuck in this hole, where they can NOT act in any way to just consolidate the platform and improve it organically. They MUST continue to chase 10x growth even if it, now with 10 years hindsight, seems undoable. [03:05]
Diablo-D3 Im pretty sure twitter went in knowing they were living on borrowed time, so theres still a bit of dishonesty going on [03:05]
humanBird lol this channel [03:05]
humanBird nothing about java [03:05]
Diablo-D3 Im not saying VCs arent complete morons 90% of the time [03:06]
surial So, they kill off 3rd party apps, try rewriting how the timeline works, and who knows what. None of it works, all of it makes for a worse product, but they gotta keep trying weird shit. anyway, humanBird does make a fair point. [03:06]
Diablo-D3 humanBird: oh no, its a java discussion [03:06]
Diablo-D3 they jettisoned a java stack for a javascript stack [03:06]
Diablo-D3 theres a clear right to wrong progression going on [03:06]
Diablo-D3 a lot of the java they pooped out because it was dead is actually pretty decent [03:06]
surial humanBird: if I give you the following situation: You have a roulette wheel; you know it is not a scammy wheel (it is fair), and I make a special bet for y ou: You may put any amount of money on red; if it comes up red, you get 3x your money back, if it isn't red, you get nothing. [03:06]
Diablo-D3 with some retooling, you probably could even build most of a twitter out of it [03:06]
surial You bet 10% of everything you own. That'd be a good bet. [03:07]
humanBird not the same. [03:07]
surial And the bet cannot all of a sudden turn 'bad' once the wheel stops spinning. That makes no sense. It's good, or it is not good, at the time you make it. [03:07]
humanBird i'd bet 100000000 times. [03:07]
surial see? You agree the bet is good. [03:07]
humanBird and keep betting. after that [03:07]
surial because it's a good bet. [03:07]
surial twitter was a good bet. [03:07]
humanBird and twitter is not a rigged wheel that prints money [03:07]
surial Even though it didn't land red. [03:07]
surial let's take this to java-talk. [03:07]
Diablo-D3 Im still banned there :( [03:08]
humanBird still not sure how intellij is handling mvn [03:08]
surial huh. whyever did that happen? [03:08]
humanBird command not found.... but it says it installed testng [03:08]
surial humanBird: intellij does not _HAVE_ its own command line thing. [03:08]
Diablo-D3 intellij has an mvn plugin. [03:08]
surial humanBird: so I don't know where you are entering 'java' or 'mvn' into, but it's JUST the command line and has fuck all to do with intellij. [03:08]
Diablo-D3 if you installed testng using your package manager, all that did was install it in the system's classpath somewhere, far away from anything you're using [03:09]
Diablo-D3 add it to your pom and use maven correctly [03:09]
humanBird it's in the pom as a <dependency> [03:10]
humanBird whatever intellij is running to add testng put it in /Users/myself/.m2/repository/org/testng/testng/7.0.0/testng-7.0.0.jar [03:11]
minos_ [minos_!] has joined ##java [03:11]
humanBird <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>7.0.0</version> </dependency> [03:11]
Diablo-D3 uh, I might be wrong, but you dont want it as a dep [03:11]
Diablo-D3 oh wait you do, your scope is set wrong [03:11]
Diablo-D3 [03:12]
humanBird still would be unable to run in test scope since mvn is command not found [03:12]
humanBird guess intellij saying "don't mess around with maven install manually" is a 100% incorrect step [03:13]
dreamreal um [03:13]
tang^ wut? [03:13]
humanBird since i will now have to add maven to whatever path there is. [03:13]
Diablo-D3 what? [03:13]
dreamreal humanBird: you can tell intellij where maven is [03:13]
Diablo-D3 no shit, if you're running it from the command line, you need to install it [03:13]
dreamreal it'll use it [03:13]
humanBird so if i add <scope> test <scope> and then run mvn test [03:13]
humanBird i'll still be fcked since mvn is "command not found" [03:14]
Diablo-D3 intellij does not rely on command line maven, it merely knows how to run it if you tell it to [03:14]
dreamreal humanBird: ^^^ [03:14]
Diablo-D3 intellij, by default, uses its internal private implementation of it (which is still maven, just not your maven) [03:14]
humanBird so it doesn't actually configure maven correctly for you. [03:14]
dreamreal If you're fucked, it's because you're persistent in ignorance. The good news is that this is easy to fix: learn! listen! You'll be fine. [03:14]
tang^ there's nothing to configure [03:15]
humanBird i checked some box that said "add maven" when creating this project [03:15]
Diablo-D3 it doesnt configure _your_ maven [03:15]
humanBird i never installed "my" maven so it doesn't exist [03:15]
dreamreal humanBird: it clearly doesn't do what you thought it does. Experience, it does a body good, etc [03:15]
Diablo-D3 exactly, so go install it [03:15]
tang^ well, for most cases, there's nothing to configure [03:15]
dreamreal You wouldn't want to rely on idea for a system's maven install anyway [03:15]
dreamreal srsly: stop swimming against the stream [03:16]
tang^ do I even have a system that doesn't have a system maven before I installed IDEA? [03:16]
Diablo-D3 tang^: I did [03:16]
dreamreal tang^: I don't know how we would answer that question [03:16]
tang^ sorry... thinking out loud [03:17]
Diablo-D3 intellij still uses its own by default, which is still the best option [03:17]
tang^ and that is as simple as Open the Maven pane and double clicking on the lifecycle phase you want to run [03:17]
tang^ or, y'know, ?F9 [03:18]
Diablo-D3 how DARE you use a mac [03:18]
dreamreal tang^: yo! [03:18]
tang^ so busy reading haven't got time to think [03:18]
Diablo-D3 why do you even know the unicode for that [03:19]
tang^ TextExpander ccmd [03:19]
dreamreal glares at tang^ [03:20]
tang^ working on it. geez [03:20]
tang^ there's lots of words [03:20]
humanBird fine. i quit [03:20]
dreamreal yes, but... that's not what I'm glaring at you about [03:20]
tang^ yo? [03:20]
dreamreal humanBird: *shrug* okay, seems a silly reason to give up [03:20]
Diablo-D3 some people just aren't really meant to be conscious productive members of society and prefer to just be meat popsicles [03:22]
dreamreal Diablo-D3: some people want to ve overly judgemental given far too little data, but ... who's judging THEM, right? [03:22]
iam730 [iam730!] has joined ##java [03:23]
hojang [hojang!] has joined ##java [03:23]
minos_ [minos_!] has joined ##java [03:33]
iam730 [iam730!] has joined ##java [03:37]
ogradyd [ogradyd!~Thunderbi@2a02:8070:88bf:9df0::577] has joined ##java [03:39]
Arlion [Arlion!~Arlion@unaffiliated/arlion] has joined ##java [03:40]
sabocat [sabocat!] has joined ##java [03:41]
ipee [ipee!] has joined ##java [03:41]
porfavordama [porfavordama!uid404504@gateway/web/] has joined ##java [03:41]
xeno [xeno!~xeno@unaffiliated/xeno] has joined ##java [03:42]
Al_nz1 [Al_nz1!] has joined ##java [03:43]
bluezone [bluezone!uid104970@gateway/web/] has joined ##java [03:48]
sabocat I want to have an ID field for my objects that uniquely identifies each object based on the data it contains. Ex: an object {'a', 5, "str"} should always produce the same ID. I also want to store this object in a JPA backend. How should I handle this? Separate fields for DB ID and obj data ID? [03:53]
bitwinery sabocat, depends on your queries [03:54]
x256 Sounds like you have a primary key with three fields. These are your ID. no need to generate one. [03:55]
shrewdy [shrewdy!~shrewdy@2a03:2880:11ff:1c::face:b00c] has joined ##java [03:56]
sabocat x256, How can I get JPA (Hibernate) to use this as the ID? Esp. if the fields are complex types? [03:56]
Diablo-D3 popular answer: by not using jpa. [03:57]
sabocat How did I know someone would say that? [03:58]
sabocat What should I use instead? [03:58]
bitwinery sabocat, googling "jpa composite key" gives some pretty good ideas :) [03:58]
x256 Google for "composite primary key" [03:58]
sabocat Cool. Sometimes I just need to write out my question I guess. Thanks y'all. [03:59]
somazero [somazero!~somazero@2600:8805:100:112:cbb5:3a7e:e144:4f17] has joined ##java [03:59]
Diablo-D3 sabocat: its rubber ducking, to some extent [04:00]
bitwinery sabocat, note that if you never use the obj data id, you don't really need a composite key [04:00]
bitwinery or if you only query by obj data id, you can just use that as the id [04:00]
minos_ [minos_!] has joined ##java [04:04]
mizi [mizi!] has joined ##java [04:04]
sabocat bitwinery, not sure I understand. I want to be able to query by an ID which is computed from the values of the other fields. So new MyObj a = MyObj('a', 5, "str"); MyOb b = new MyObj('a', 5, "str"); a == b is TRUE [04:08]
surial sabocat: that is literally impossible. [04:08]
bitwinery sabocat, yeah, then you need to compute that ID (ex: using a checksum like md5/sha) and use that as the DB ID [04:08]
surial sabocat: == compares refs, and 'new' guarantees a new ref. [04:09]
surial sabocat: a.equals(b) can be made true trivially, but that's not related in any way to JPA. [04:09]
bitwinery oh yeah, I assume you meant equalds [04:09]
bitwinery equals* [04:09]
sabocat I should say == And be able to query to the DB based on the computed ID. [04:09]
surial sabocat: also literally impossible; the only types that can be identity-compared like that go as far as 64-bit.. [04:09]
sabocat Yeah. I meant "is the same thing" (equals() method) [04:09]
surial 64-bit is less than infinity bits, which is what you need if you posit a composite key of unknown elements, each element being of unknown type. [04:10]
surial sabocat: you don't WANT an id. [04:10]
surial sabocat: the id would be pointless. [04:10]
surial the entire object, all those fields? That IS the ID. [04:10]
surial the only thing you can 'compute' from the values of all the fields which matches entirely and never gives a false positive is... all the fields. [04:11]
surial it's like you're trying to ask: Please write me a compression algorithm that can compress literally anything. [04:11]
surial that's.. not possible. You may as well ask us to make it so that 2 + 2 equals 5. [04:11]
mluser-home [mluser-home!] has joined ##java [04:15]
sabocat surial, I'm not asking to compare two totally dissimilar objects. What I mean is if I create two objects (of the SAME TYPE) using the same initialization data, these objects should be guaranteed to have the same IDs. Does that make sense? [04:18]
surial no. [04:18]
sabocat Why not? [04:19]
surial sabocat: but before we get there, I assume the reverse is also true? If these 2 objects do not have entirely the same initialization data, their 'ID' (wrong wording, but we'll get to that) is NOT the same? [04:19]
sabocat Correct. [04:19]
surial Right, okay, so, the initializaztion data _IS THE ID_. [04:19]
sabocat Right, OK. [04:20]
surial Let's say I have a database table with 2 columns: the id of a student (foreign key ref to the student table), and the id of a course (foreign key ref to the courses table). [04:20]
Rapture [Rapture!] has joined ##java [04:20]
surial The ID _IS_ the entire row. There is no need to make a third column called 'unid'. In fact, that'd be actively stupid: You're replicating data and it says nothing useful. [04:20]
surial It's just wasted space, and an opportunity to fuck up. [04:20]
surial Databases have zero issue with you stating that the combination of (student_id, course_id) _IS_ the primary key (those 2 fields being the entire table). [04:20]
sabocat Right, that's 2NF, no? [04:21]
surial sure. [04:21]
sabocat OK. So why is this impossible? [04:21]
surial I never said anything was impossible, and I have no idea waht you mean there with the word 'this'. [04:21]
surial Time for a different exercise. [04:22]
surial I give you 2 values of type int. [04:22]
sabocat OK... [04:22]
surial Please make a single int; this int should have the properties you stated: If I give you the same 2 ints later you should give me the exact same id. [04:22]
surial also, there should exist no 2 different pairs of numbers such that the generated id is equal. [04:23]
surial hop to it! Make me an algorithm. [04:23]
surial let's cut to the chase: It is literally impossible. You're trying to store 64-bits of data into 32 bits. This cannot be done. [04:23]
[twisti] i think you are too close to the problem. take a step back: what could your id for your object ('a', 5, "str") be ? maybe a string that looks like "a;5;str" ? if thats your id, then why do you need the other fields at all ? just calculate them from your id [04:24]
surial So, whatever 'id' you can concoct that follows your properties must contain exactly as much info as the original data. Such an id is therefore completely pointless. It's not impossible; far from it. It's just.. stupid. [04:24]
Diablo-D3 [twisti]: thats ugly, even if you're using a view to do it [04:24]
[twisti] Diablo-D3: way to miss the point [04:24]
sabocat surial, OK, I see what you are saying. [04:24]
surial Diablo-D3: I think that's the point [twisti] is trying to make. [04:24]
Diablo-D3 oh my bad [04:24]
sabocat This is basically what I was doing. I just need to figure out how to get JPA to use it. [04:25]
surial sabocat: now BECAUSE it's silly to make "a;5;str" from ('a', 5, "str"), and yet, because also this notion of compound keys comes up, ALL major db engines are agnostic about their primary keys: You will see in amny designs and many books that all tables have a column named 'id' or 'unid', usually of whatever is local db-ese for '64 bit datatype', it's auto-sequenced (the db generates the values for you), and it is the primary key. [04:26]
[twisti] in abstract data, you can only really do two things with pieces of information: reduce it to something 'less', that is usually called hashing. but if you do that, you can end up with two hashes for the same number (a simple hash would be 'add all the numbers together'). or you can transform the data without losing information, but then you still have all the data twice [04:26]
surial But that isn't encoded in stone: That's just one way to do it. You don't have to. [04:26]
surial auto-sequencing is just a thing DBs can do. You can let any integer field do it, not just the 'unid' field, and you can point at any field and decree it to be the primary key (hell, in almost all DB engines, you don't even NEED to have a primary key for any given table. PRIAMRY KEY is just a bullshit term which really just mean: Stick an index on this, make it unique, oh and if someone decrees a foreign key association with this [04:27]
surial table without naming the fields it links to, the default is all the fields involved in this specially labelled index'. THAT IS ALL. [04:27]
[twisti] sabocat: for what its worth, this is where the concept of hashCode() and equals() comes in - hash is enough to say 'these two are definitely not the same', which MOST of the time is what you need. when two things have the same hash, you still need equals to compare their actual data [04:27]
somazero [somazero!~somazero@2600:8805:100:112:cbb5:3a7e:e144:4f17] has joined ##java [04:27]
Diablo-D3 hash just lets you early fail [04:28]
Diablo-D3 almost a faux bloom filter at that point [04:28]
sabocat Gotcha. Good info all. [04:30]
mluser-home [mluser-home!] has joined ##java [04:33]
ogradyd [ogradyd!~Thunderbi@2a02:8070:88bf:9df0::577] has joined ##java [04:42]
LunarJetman [LunarJetman!] has joined ##java [04:51]
killvenom [killvenom!~killvenom@] has joined ##java [04:51]
Goplat [Goplat!~Goplat@reactos/developer/Goplat] has joined ##java [04:52]
Kol [Kol!] has joined ##java [04:58]
bitwinery also looking at LSH when going at scale [05:04]
bitwinery (looking beyond equality) [05:04]
recon_dsk /join #visual-studio [05:05]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [05:06]
er1k757 [er1k757!] has joined ##java [05:07]
recon_dsk god, I really don't get the UI's IDE's seem to have moved to. you can open a project but cannot close it (Visual Studio). [05:10]
recon_dsk ok, they called folders in visual studio. [05:11]
wad [wad!~wad@] has joined ##java [05:13]
yuljk [yuljk!~yuljk@unaffiliated/yuljk] has joined ##java [05:25]
black_ant [black_ant!~antilope@unaffiliated/black-ant/x-1505394] has joined ##java [05:30]
waz intellij++ [05:32]
waz intellij has a karma level of 20, waz [05:32]
waz idea++ [05:32]
waz idea has a karma level of 178, waz [05:32]
wad What's the best way to make a static array of longs threadsafe? Several threads could increment some values in it, I don't want them to stomp on each other. [05:33]
DuckyDev [DuckyDev!] has joined ##java [05:38]
ernimril wad, 1) make it immutable, 2) synchronize on it, 3) list of AtomicLong instead [05:42]
surial wad: wow, yeah, that is just near impossible. [05:50]
surial wad: for starters, the JVM spec does not, in fact, guarantee that longs and doubles are atomic. Now, in practice, _ALL_ 64-bit VMs I ever heard of DO have atomic longs and doubles. Separate from the notion that it feels daft to write code to work around a non-existent problem (being: that long updates may not be atomic), it's not possible to test this. [05:51]
surial wad: second problem is that arrays aren't threadsafe and aren't extensible, so there are no 'threadsafe implementations'. [05:51]
surial wad: you can streamline all accesses to this array (reads AND writes) through methods which synchronize on it. Now threads wont stomp on each other, and also you've probably eliminated the performance gain as all but one thread will be twiddling its thumbs. You can't just wave a magic wand here; in general, your data structure enforcement of 'a long array' means you already lost the game. [05:52]
surial for example, trivially, if you have 20 threads and a 100-slot array, and you can assign to each thread 'you get 0-5, you get 5-10', etc, you've trivially fixed the problem. [05:53]
yuljk [yuljk!~yuljk@unaffiliated/yuljk] has joined ##java [05:53]
wad Thanks, guys! [05:53]
surial ernimril: you can't have immutable long arrays. [05:54]
wad I think I'll just make it a list of AtomicLong. [05:54]
surial as long as you never call list.set(x), only list.get(pos).set(val), that'll get you far. It'll also be slow, but it WILL scale with cores. [05:55]
surial (versus 'fuck it synchronize on the whole thing for all accesses' which is pretty quickly gonna run into 'doesnt matter how many cores y ou add, it wont go any faster'). [05:55]
ernimril surial, you can not make it immutable, but you can treat it as such [05:55]
surial with atomiclongs, yeah, and by making it a list, you CAN actually enforce the immutability. [05:55]
ernimril surial, but sure, I ought to have written make it effectively immutable [05:55]
wad Oh, after reading a bit more... I think I'll just synchronize on it. [05:56]
ernimril wad, uncontended synchronization is cheap, but contended is not that cheap [05:56]
surial wad: there's also no need to synchronize on anything here. As long as that list is IMMUTABLE (the size of it, and each atomiclong inside it, is created and set up BEFORE you enter multithreaded territory, and the only ops you ever do on this list is .get(), .size(), and other read-only sstuff; in fact, you wrapped it in Collections.unmodiifableList or used List.of to make the thing in the first place)... you can call .incrementAnd [05:57]
surial Get() and .set() and friends as much as you please on atomiclongs. [05:57]
wad ok [05:57]
surial it'd help to know what you mean with 'stomp on each other'. [05:57]
surial wad: let's say your threads do the follow op: Roll a die to determine a random location in the list. Then, get the value of the long, add 12 to it, and put the long back. [05:58]
surial wad: in this case, atomiclong does fuck all: Your threads will fuck each other over. There is no 'atomically add 12' operation available to you; no, instead, you need to write the code retry/CAS style. [05:58]
surial wad: fetch the long, add 12, then put the long back in the box but only if the value is still what you originally got; if not, start over. That's CAS style. That'd be atomic. As I said, there are no generic answers, you'd have to explain the algorithm. [05:59]
warthes [warthes!] has joined ##java [05:59]
nb-ben there's usually a better structure than a list to synchronize on [06:00]
sb35 [sb35!~sb35@] has joined ##java [06:00]
surial while (true) { AtomicLong a = list.get(idx); int c = a.get(); int d = c = 12; if (a.compareAndSet(c, d)) break; } [06:00]
very_sneaky [very_sneaky!~very_snea@] has joined ##java [06:00]
surial the real answer is list.get(idx).addAndGet(12);.. but let's say the op is a little more complex than 'add 12'. [06:00]
surial nb-ben: what? no. [06:01]
surial nb-ben: there's usually a better data structure to avoid synchronizing. [06:01]
fragamus [fragamus!~textual@] has joined ##java [06:01]
surial if you want to synchronize() on something, the best 'data structure' is: private final Object locker = new Object[0];. period. [06:01]
nb-ben I lack terminology to avoid conflicting with Java's synchronize.. I mean the application of the idea of synchronization. And yes, it's to achieve greater concurrency by synchronizing unnecessarily less by making the structure reflect the problem better such that you have greater lock granularity [06:04]
warthes Hello! I'm trying to replace a class with another implementation, its for a project where i cant use mockito etc, so I'm doing this to replace the class with its stub. I'm using gradle and i have two different classpaths src/... and src/Testing/.. (Testing folder is excluded in the first classpath), I've tried replacing the .class files but i get [06:06]
warthes java.lang.NoClassDefFoundError I've also tried to config gradle so it compiles only one of the classes, and "jar tf out.jar" looks good but i get the same error, what can i do? [06:06]
Al_nz1 [Al_nz1!] has joined ##java [06:07]
Al_nz1 I am trying to run but getting Cause: org/openjfx/gradle/JavaFXPlugin has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 - I am using Java 11 (55) though in my IDE - Intellij. What am I doing wrong to still get the erro [06:07]
Al_nz1 Al_nz1's title: "GitHub - Esri/java-gradle-starter-project: Starter project for the ArcGIS Runtime SDK for Java with Gradle" [06:07]
cheeser mocks are a code smell [06:07]
warthes I'm not the one that decides :C [06:08]
nb-ben sure you are [06:09]
nb-ben you're implementing the thing, you're writing the tests, do it properly [06:09]
ernimril 52 [06:09]
ernimril ernimril, 52 is the class file format version number of class files emitted when using -target 1.8. You will need Java 8 or higher to run these. [06:09]
ernimril Al_nz1, if you get that you are trying to run with java 8 [06:09]
Al_nz1 ernimril: yes, but I cant see where else I can change the java settings. I have changed the project setting and the run configuration. java -version in the console shows java 11 [06:10]
nb-ben warthes: decouple yourself from offenders by using interfaces and referring to these instead [06:10]
nb-ben warthes: it is a smell like cheeser says [06:11]
warthes I dont understand, I'm trying to replace with that only contains stub functions, both have the same package but are at different classpaths [06:12]
warthes I need this so that uses (original) starts using (class with stubs) [06:14]
nb-ben warthes: make classB only access classA via an interface [06:15]
nb-ben warthes: and when you want to mock, you could implement that interface instead of doing classpath trickery [06:15]
warthes is this usual or its a strange practice like the classpath trickery? [06:16]
nb-ben warthes: this is how you decouple implementations. This is why we refer to Map instead of HashMap, so that some day we could replace it with ConcurrentHashMap or some other implementation. [06:17]
nb-ben warthes: (to say the least in that regard) [06:18]
warthes I'm new to java, so I'm thinking how this would work, with my understanding the class that only accesses class A with an interface needs to instantiate a class that implements the interface, then if i create another class that implements the interface but with stubs I'll need to replace the other implementation from classB so it uses this new [06:23]
warthes implementation instead of the original [06:23]
nb-ben warthes: you inject dependencies through the constructor, if your dependency refers to an interface, then your class doesn't have to instantiate classA -- it can be instantiated outside of that class, like when you set-up the test [06:24]
mbooth Al_nz1: Doing "java -version" in the console tells you exactly nothing about which version of java your IDE is using [06:24]
warthes ohh this makes more sense [06:25]
nb-ben warthes: [06:25]
nb-ben warthes: and [06:27]
warthes thanks, never heard of dependency injection before [06:29]
Renart0 [Renart0!] has joined ##java [06:30]
pikapika_lunar_a [pikapika_lunar_a!] has joined ##java [06:32]
crised parted the channel: [06:44]
Velgor [Velgor!] has joined ##java [06:46]
fragamus [fragamus!~textual@] has joined ##java [06:51]
nun [nun!] has joined ##java [07:04]
yokel [yokel!~yokel@unaffiliated/contempt] has joined ##java [07:07]
canton7 [canton7!~canton7@about/csharp/regular/canton7] has joined ##java [07:17]
fstd_ [fstd_!~fstd@unaffiliated/fisted] has joined ##java [07:22]
matsurago [matsurago!~matsurago@240b:10:b3a1:1700:6169:5609:e3e3:1eaf] has joined ##java [07:26]
c0ns [c0ns!] has joined ##java [07:26]
black_ant [black_ant!~antilope@unaffiliated/black-ant/x-1505394] has joined ##java [07:28]
zaltekk [zaltekk!~zaltekk@] has joined ##java [07:28]
Hal9k [Hal9k!~Hal9k@unaffiliated/kusanagi] has joined ##java [07:34]
db [db!uid18678@gateway/web/] has joined ##java [07:45]
zalt_ [zalt_!~lambda443@unaffiliated/lambda443] has joined ##java [07:48]
acidjnk_new [acidjnk_new!] has joined ##java [07:48]
yokel [yokel!~yokel@unaffiliated/contempt] has joined ##java [07:49]
Renart0 [Renart0!] has joined ##java [07:50]
ravenousmoose [ravenousmoose!] has joined ##java [07:55]
Xe4roX [Xe4roX!~Xe4roX@unaffiliated/xe4rox] has joined ##java [07:57]
Renart0 [Renart0!] has joined ##java [07:57]
g00s [g00s!~g00s@unaffiliated/g00s] has joined ##java [08:03]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [08:09]
recon_dsk parted the channel: [08:11]
lolmac [lolmac!sid171216@gateway/web/] has joined ##java [08:13]
egp [egp!sid237851@gateway/web/] has joined ##java [08:13]
Lewix [Lewix!sid158496@gateway/web/] has joined ##java [08:13]
lineos [lineos!sid103986@gateway/web/] has joined ##java [08:13]
Sina [Sina!uid230776@gateway/web/] has joined ##java [08:13]
fotato [fotato!sid41913@gateway/web/] has joined ##java [08:13]
lucifer [lucifer!lucifer@gateway/web/] has joined ##java [08:13]
tang^ [tang^!sid382663@gateway/web/] has joined ##java [08:13]
hsiktas [hsiktas!sid224847@gateway/web/] has joined ##java [08:13]
happymeal [happymeal!~happymeal@unaffiliated/happymeal] has joined ##java [08:14]
cliluw [cliluw!~cliluw@unaffiliated/cliluw] has joined ##java [08:15]
Bebef [Bebef!] has joined ##java [08:18]
tracks_droid [tracks_droid!~androirc@2600:1700:ade0:4400:f841:56e8:c10d:bdbd] has joined ##java [08:23]
yawkat [yawkat!] has joined ##java [08:25]
nokdoot [nokdoot!~nokdoot@] has joined ##java [08:28]
sb35 [sb35!~sb35@] has joined ##java [08:33]
whaley [whaley!] has joined ##java [08:42]
macroprep [macroprep!] has joined ##java [08:45]
RedSoxFan07 [RedSoxFan07!] has joined ##java [08:46]
orbyt_ [orbyt_!~orbyt@] has joined ##java [08:54]
jmorris [jmorris!uid374834@gateway/web/] has joined ##java [09:00]
EgonX [EgonX!~Egon@2601:2c6:47f:98f4:34a4:2210:ebd7:c221] has joined ##java [09:11]
Renart0 [Renart0!] has joined ##java [09:12]