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

« 2021-04-06


2021-04-08 »

Nick Message Date
hnOsmium0001 [hnOsmium0001!uid453710@gateway/web/] has joined ##java [12:02]
db [db!uid18678@gateway/web/] has joined ##java [12:36]
nikow [nikow!~nikow@2001:41d0:601:1100::462] has joined ##java [12:48]
Fr1nge [Fr1nge!~Fr1nge@] has joined ##java [01:01]
unsyncing [unsyncing!~unsyncing@] has joined ##java [01:47]
cliluw [cliluw!~cliluw@unaffiliated/cliluw] has joined ##java [02:03]
upgrdman_ [upgrdman_!~upgrdman@blender/artist/upgrdman] has joined ##java [02:18]
JackB [JackB!b968f6e0@] has joined ##java [02:18]
istlf [istlf!~istlf@] has joined ##java [02:29]
v01d4lph4 [v01d4lph4!~v01d4lph4@] has joined ##java [02:34]
black_ant [black_ant!~antilope@unaffiliated/black-ant/x-1505394] has joined ##java [02:36]
upgrdman_ [upgrdman_!~upgrdman@blender/artist/upgrdman] has joined ##java [02:40]
fingo [fingo!~fingo@gateway/tor-sasl/fingo] has joined ##java [02:46]
Ragnor [Ragnor!] has joined ##java [03:04]
dpl [dpl!] has joined ##java [03:05]
localh0st Hey! I got some XML file and browsers says it's something wrong with file encoding ( ' error on line 20830 at column 38: Input is not proper UTF-8, indicate encoding ! ' ). How can I rewrite this file in Java to make it valid again? I tried to store it as bytes array, but after saving the file problem remains... I have no control on how this file is originally written [03:06]
lithium [lithium!~lithium@unaffiliated/lithium] has joined ##java [03:10]
LKoen [LKoen!] has joined ##java [03:11]
localh0st I found a solution: I used regex to replace non-ASCII characters and then I converted String to byte[] before writing to file, looks good so far [03:36]
aedroid [aedroid!] has joined ##java [03:46]
cliluw [cliluw!~cliluw@unaffiliated/cliluw] has joined ##java [03:58]
hendursa1 [hendursa1!~weechat@gateway/tor-sasl/hendursaga] has joined ##java [04:07]
v01d4lph4 [v01d4lph4!~v01d4lph4@] has joined ##java [04:17]
code-witch [code-witch!~code-witc@] has joined ##java [04:20]
junktext_ [junktext_!junktext@fsf/member/junktext] has joined ##java [04:23]
KidBeta [KidBeta!~Kidbeta@hpavc/kidbeta] has joined ##java [04:23]
holdsworth [holdsworth!~quassel@unaffiliated/holdsworth] has joined ##java [04:34]
cliluw [cliluw!~cliluw@unaffiliated/cliluw] has joined ##java [04:36]
ghormoon [ghormoon!] has joined ##java [04:51]
shrysr_ [shrysr_!~shrysr@2600:3c04::f03c:91ff:fece:e233] has joined ##java [04:54]
LKoen [LKoen!] has joined ##java [04:55]
Acru [Acru!] has joined ##java [05:09]
bolovanos__ [bolovanos__!~bolovanos@unaffiliated/bolovanos] has joined ##java [05:09]
Acru Hey, do you know whether there is an established method to track the number of invocations of a rest endpoint in e.g. a spring project? [05:10]
georgios [georgios!~george@unaffiliated/anaphaxeton] has joined ##java [05:11]
JackB [JackB!b968f41c@] has joined ##java [05:12]
sizeof_void34 [sizeof_void34!] has joined ##java [05:12]
mbooth Acru: Beyond incrementing a counter? [05:13]
code-witch [code-witch!~code-witc@] has joined ##java [05:21]
Acru [Acru!] has joined ##java [05:21]
acidjnk_new [acidjnk_new!] has joined ##java [05:21]
Acru Well, whether you eg usually track it with java flight recorder [05:22]
aedroid [aedroid!] has joined ##java [05:22]
Feuermagier [Feuermagier!~Feuermagi@] has joined ##java [05:24]
cliluw [cliluw!~cliluw@unaffiliated/cliluw] has joined ##java [05:24]
mbooth Acru: Oh you are asking about profiling? [05:24]
mbooth profilers [05:24]
mbooth A profiler is a tool to find performance bottlenecks. VisualVM is a free profiler available from (included with OpenJDK up to Java 8); JProfiler and YourKit cost money but usually have free eval periods or time-limited betas. Java Flight Recorder and Java Mission Control were recently opened sourced under OpenJDK. [05:24]
code-witch [code-witch!~code-witc@] has joined ##java [05:34]
average [average!uid473595@gateway/web/] has joined ##java [06:04]
LKoen [LKoen!] has joined ##java [06:05]
yiyoyo [yiyoyo!~yiyoyo@] has joined ##java [06:23]
Rashad [Rashad!~textual@2a01:9700:141d:fd00:3521:d57:8da:d7f1] has joined ##java [06:25]
combatvet_ [combatvet_!~c4@gateway/tor-sasl/combatvet] has joined ##java [06:50]
VicMackey [VicMackey!] has joined ##java [07:00]
Maldivia [07:02]
Maldivia Maldivia's title: "JetBrains IntelliJ IDEA on Twitter: "IntelliJ IDEA 2021.1 is out! ? Our first release of 2021 is here with: ?Space integration ?WSL2 and Java 16 support ?Video and audio calls in embedded Code With Me ?And so much more! Learn all the..." [07:02]
mbooth Maldivia: "Video and audio calls" .... [07:04]
Maldivia mbooth: yes, because why work on all the bugs when they can add new features noone wanted :D [07:04]
mbooth Exactly :-/ [07:05]
yawkat lol that image is the actual splash screen. thanks i hate it. [07:06]
jink [jink!] has joined ##java [07:06]
yawkat and i think they changed from CMS to G1GC. [07:06]
mbooth I like the splash, it's a stone's throw away from some classic 70s design [07:08]
yawkat ok dad :P [07:08]
Fr1nge Did anyone try developing java projects with vim(obviously with plugins like coc), is it doable in your opinion? [07:08]
VicMackey Hello! I'd like to ask a question regarding externalizing SQL queries. Previously, I've externalized the queries by using an XML file, reading with a PropertySource, creating a Bean and injecting it to a class with @Autowired. Something along the lines of this[1]. Are there any alternative best practices to this? Thank you in advance :) [1]: [07:09]
VicMackey VicMackey's title: "java - How to read a property in the an XML properties file in Spring Boot - Stack Overflow" [07:09]
yawkat mbooth: btw, they finally merged the jdt fixes. thanks for the help with the build :) [07:09]
yawkat yawkat's title: "571929 ? EmptyStackException when generating long-parameter method call" [07:09]
computeiro [computeiro!~Wender@] has joined ##java [07:09]
mbooth yawkat: \ó/ [07:09]
mbooth yawkat: Thanks for doing the hard work ;-) [07:09]
sonOfRa Fr1nge: doable yes, recommended no, reasonable also no [07:10]
_lucifer use intellij idea's vim plugin if you want to work in something vim-like [07:13]
Fr1nge IntelliJ feels sluggish after using vim for a while, that is why I asked. What does vim lack that make it so inconvenient? [07:14]
yawkat proper refactoring [07:15]
VicMackey Code navigation, code completion, suggestions, etc. [07:19]
yawkat ah, i found the article [07:19]
Fr1nge [Fr1nge!~Fr1nge@] has joined ##java [07:21]
VicMackey And very very important: debugging [07:23]
Fr1nge [Fr1nge!~Fr1nge@] has joined ##java [07:23]
VicMackey It complies with .editorconfig files, you can add a datasource so you can get help writing queries, you can add linters if you so desire, etc. [07:24]
Streusel [Streusel!~Anonymous@unaffiliated/streusel] has joined ##java [07:25]
VicMackey I tried to use Vim as well for Java code, because Vim just feels right. However it also feels lacking or overcomplicated for things that are easily solved by an IDE [07:26]
VicMackey I set up the language server to have code completion in Vim, installed a linter, and fought through configuration files [07:26]
Fr1nge [Fr1nge!~Fr1nge@] has joined ##java [07:27]
VicMackey And even then I couldn't make it work the way I wanted - that was totally my fail. However I had all that with IntelliJ, and also a very good Vim plugin which gives me the features I miss from Vim [07:27]
VicMackey My 0.02? [07:29]
VicMackey Nonetheless, you've got really nice projects like SpaceVim[1] which will help you setting up a proper Vim environment to work in Java. [1]: [07:30]
Fr1nge [Fr1nge!~Fr1nge@] has joined ##java [07:30]
wender [wender!~Wender@] has joined ##java [07:31]
VicMackey Also don't use Vim, use NeoVim :P [07:32]
aedroid [aedroid!] has joined ##java [07:44]
computeiro [computeiro!~Wender@] has joined ##java [07:45]
deepsky parted the channel: "??" [07:47]
Fr1nge [Fr1nge!~Fr1nge@] has joined ##java [07:47]
SirMangler [SirMangler!] has joined ##java [07:48]
RazielZ [RazielZ!~Raziel@unaffiliated/raziel] has joined ##java [07:54]
SirMangler [SirMangler!] has joined ##java [08:01]
Jantz [Jantz!~IceChat95@2407:7000:8d04:100:f1a9:c1b0:8ad3:f515] has joined ##java [08:02]
yawkat now i know why the jck is so hard to pass [08:03]
yawkat yawkat's title: "java/17 : java.datatransfer/java/awt/datatransfer/" [08:03]
yawkat do they really test that *that* method throws an NPE? [08:04]
m1dnight_ [m1dnight_!] has joined ##java [08:10]
ScrambledRK [ScrambledRK!] has joined ##java [08:22]
tuskkk____ [tuskkk____!uid18470@gateway/web/] has joined ##java [08:31]
scm_ [scm_!scm@gateway/vpn/protonvpn/scm] has joined ##java [08:38]
zulutango [zulutango!] has joined ##java [08:41]
FabioP [FabioP!] has joined ##java [08:45]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [08:49]
LKoen [LKoen!] has joined ##java [08:49]
llorllale [llorllale!~llorllale@2607:9880:1078:46:64cf:19b4:3e1c:2db9] has joined ##java [08:51]
ADG1089 [ADG1089!~aditya@] has joined ##java [08:52]
wedr [wedr!] has joined ##java [08:52]
dreamreal hrm, new idea out, but code with me isn't compatible according to jetbrains... [08:59]
dreamreal maybe it's the old version of the plugin. YOLO! [09:00]
yawkat it's included now [09:00]
dreamreal Have you used it? [09:00]
yawkat no [09:00]
dreamreal (I have.) [09:00]
dreamreal It's actually pretty nice. [09:00]
yawkat remembers eclipse saros [09:00]
dreamreal yeah, and netbeans had a collab mechanism too [09:01]
dreamreal I'm comparing apples to apples :) [09:01]
di0_ [di0_!~di0_@unaffiliated/di0-/x-5053590] has joined ##java [09:01]
MrFlibble [MrFlibble!Rimmer@] has joined ##java [09:01]
bolovanos_ [bolovanos_!~bolovanos@unaffiliated/bolovanos] has joined ##java [09:09]
plarsen [plarsen!~plarsen@redhat/jboss/pdpc.professional.plarsen] has joined ##java [09:11]
joelmo [joelmo!uid17355@gateway/web/] has joined ##java [09:14]
CombatVet [CombatVet!~c4@gateway/tor-sasl/combatvet] has joined ##java [09:15]
cliluw [cliluw!~cliluw@unaffiliated/cliluw] has joined ##java [09:23]
AcTiVaTe [AcTiVaTe!] has joined ##java [09:26]
arcanescu [arcanescu!] has joined ##java [09:37]
Fr1nge [Fr1nge!~Fr1nge@] has joined ##java [09:37]
arcanescu I am trying to define an interface public MyList transform(String id, List<A> aList);the problem is that, I want each concrete class to implement this function, but they have variable number of arguments to this List and of different type for example, [09:39]
arcanescu MyList transform(String id, List<A> aList); [09:39]
arcanescu MyList transform(String id, List<A> aList, List<B> bList); [09:39]
arcanescu MyList transform(String id, Map<A,B> aMap); [09:39]
arcanescu is there a generic way to define this interface?? [09:39]
jamezp [jamezp!~jamezp@redhat/jboss/jamezp] has joined ##java [09:40]
md_5 [md_5!~md_5@mcdevs/trusted/md-5] has joined ##java [09:42]
averell [averell!~averell@unaffiliated/averell] has joined ##java [09:44]
dreamreal arcanescu: it kinda depends. You could do MyList transform(String, Collection) but that wouldn't handle the second form, or the third one very well [09:44]
dreamreal but it sound slike the transform method's not specified very well on the surface of it [09:44]
arcanescu yea, hence the struggle [09:45]
hussam [hussam!~hussam@unaffiliated/hussam] has joined ##java [09:48]
yawkat this is weird anyway [09:49]
yawkat how would you call it? [09:49]
arcanescu Yea I think its odd, perhaps just needed to look at it again. [09:52]
bolovanos [bolovanos!~bolovanos@unaffiliated/bolovanos] has joined ##java [09:55]
Anticom [Anticom!~Anticom@] has joined ##java [09:59]
Sgeo [Sgeo!] has joined ##java [10:00]
bolovanos [bolovanos!~bolovanos@unaffiliated/bolovanos] has joined ##java [10:03]
chewb [chewb!~chewb@] has joined ##java [10:03]
Squarism If you create a new transaction i spring using transaction templates, can you create a new EntityManager and assign to the current running transaction? [10:04]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [10:31]
ozzz [ozzz!~oz@] has joined ##java [10:41]
ozzz Dear all, could you please tell, how to format GC logfile, to have gc-DATETIME.log for example [10:42]
ozzz java version seems from 8 and below [10:42]
LKoen [LKoen!] has joined ##java [10:44]
dreamreal why? You shouldn't be using java 8 or older [10:47]
Jantz [Jantz!~IceChat95@2407:7000:8d04:100:5437:930d:db2a:8ec9] has joined ##java [10:47]
ozzz dreamreal, this doesn't really matter... I only need to know how [10:51]
ozzz I found that from version 9 - there are %D, %t etc... format options [10:52]
ozzz but what about java 8 and earlier versions? [10:52]
dreamreal java -Xloggc:gc-$(date).log - you'd have to do it from the invocation mechanism [10:52]
dreamreal and those old versions are EOL, nobody cares about them [10:53]
mitch0 *cough* :) [10:53]
ozzz I understand, but functionality of GC logfile formatting must be there I suppose? [10:53]
CombatVet [CombatVet!~c4@gateway/tor-sasl/combatvet] has joined ##java [10:53]
qwedfg [qwedfg!~qwedfg@] has joined ##java [10:53]
dreamreal it is not [10:54]
yawkat why do you suppose that :D [10:54]
dreamreal not the way you're asking [10:54]
ozzz and no rotation too? [10:54]
dreamreal there's absolutely no reason to go back and fix java 6 to add a java 9 feature like that [10:54]
dreamreal nope [10:54]
dreamreal need the new capabilities? run a supported VM [10:54]
astroanax [astroanax!] has joined ##java [10:54]
ozzz then it's not java 8 or early version [10:54]
dreamreal There are a lot of things that are a lot more rocket-sciency than this [10:55]
ozzz since it rotates [10:55]
ozzz gc.0-current [10:55]
ozzz etc... [10:55]
dreamreal If older versions rotated, that's great [10:55]
astroanax [astroanax!] has joined ##java [10:55]
dreamreal but nobody's going to retrofix features that aren't there [10:55]
CombatVet [CombatVet!~c4@gateway/tor-sasl/combatvet] has joined ##java [10:56]
ozzz that's what I'm asking. is there any clear info how to format logfile name? [10:56]
ozzz for example gc-DAY-MONTH.log [10:56]
dreamreal sighs [10:56]
dreamreal I don't think so, ozzz [10:56]
astroanax [astroanax!] has joined ##java [10:56]
ozzz -Xloggc:/home/GCEASY/gc-$(date +%Y_%m_%d-%H_%M).log" [10:57]
dreamreal yes, but I already suggested that to you, and if that wasn't the answer you're looking for... [10:57]
ozzz dreamreal, thanks a lot [10:58]
ozzz only just very strange, that using -XX:+UseGCLogFileRotation [10:59]
ozzz it's not possible to reformat file name [11:00]
ozzz just very strange [11:00]
dreamreal ok [11:00]
dreamreal do recent java versions provide the ability? [11:01]
ozzz dreamreal, I just need to know about possibility, I don't really use java [11:01]
dreamreal oh, that's good [11:02]
ozzz someone who has it, don't want to update [11:02]
dreamreal so the answer simplifies a lot: no [11:02]
dreamreal someone who has it but doesn't want to update has deep pockets to pay oracle [11:02]
dreamreal so that's cool, they can ask oracle to update, oracle will say no unless the contract's hefty enough [11:02]
ozzz well ) I only need to have proper names for logs [11:03]
ozzz I don't really care about oracle :) [11:03]
dreamreal well, if you're trying to use an old EOL JVM you should [11:03]
ozzz I don't use java, I have to work with files [11:04]
dreamreal That's irrelevant to me [11:04]
ozzz for me either [11:04]
dreamreal the feature's not there in old JVMs, or it is; if it's not, well, your options are super-duper limited [11:04]
ozzz unfortunately... [11:05]
dreamreal Why unfortunate? It's easy to update to a recent JVM, and that actually gets you non-EOL software at the same time [11:05]
dreamreal Not updating has costs, if someone chooses those costs, such is life [11:05]
ozzz dreamreal, will it provide gc logs with proper orthodox name format? [11:06]
dreamreal again, this is not rocket-sciency [11:06]
ozzz not this - gc.0-current [11:06]
ozzz will update solve that with enabled rotation? [11:07]
ozzz If no, I will suggest to disable rotation functionality, and cook-up logrotated [11:07]
Peste_Bubonica [Peste_Bubonica!~Peste_Bub@unaffiliated/peste-bubonica/x-4612396] has joined ##java [11:12]
ozzz dreamreal, What I see now using google, there is no functionality to have reformatted GC log [11:12]
ozzz even in latest version [11:13]
ozzz that %t will append only timestamp to logfile's name [11:13]
ozzz and it will be rotated using round robin, with addirion to that name of .0 .1 .2 etc [11:14]
ozzz I just wanna see that clever designer from oracle, who invented this [11:14]
dreamreal who invented what? [11:15]
ozzz this rotation mechanism [11:15]
dreamreal shrugs. Java's open source these days; check the logs, or fix it [11:16]
ozzz maybe I'm wrong, and there is the way how to change this behavior [11:17]
ozzz but if not, then this is super mega stupid, to limit users using their naming scheme for gc log [11:17]
dreamreal ok [11:18]
ozzz dreamreal, thanks anyway. [11:18]
ozzz parted the channel: "Leaving" [11:18]
abhi_wn_01 [abhi_wn_01!~abhi_wn_0@] has joined ##java [11:19]
veegee [veegee!] has joined ##java [11:22]
r0bby [r0bby!sid699@guifications/user/r0bby] has joined ##java [11:25]
Xiti` [Xiti`!~Xiti-@unaffiliated/xiti] has joined ##java [11:38]
muhaha [muhaha!59b09477@gateway/web/cgi-irc/] has joined ##java [11:47]
hendursa1 [hendursa1!~weechat@gateway/tor-sasl/hendursaga] has joined ##java [11:50]
hnOsmium0001 [hnOsmium0001!uid453710@gateway/web/] has joined ##java [11:56]
donalsd [donalsd!75f7808c@] has joined ##java [11:57]
hussam [hussam!~hussam@unaffiliated/hussam] has joined ##java [11:58]
v01d4lph4 [v01d4lph4!~v01d4lph4@] has joined ##java [12:01]
donalsd Hi, what does `NullpointerException: text` mean? I've always encountered NPE with `null`, [12:01]
donalsd donalsd's title: "java.lang.NullPointerException: text at java.base/java.util.Objects.requireNonNull(Objec - 197330c7" [12:01]
led1 [led1!~Thunderbi@] has joined ##java [12:02]
_lucifer that's probably the error message passed to Objects.requireNonNull. [12:06]
sonOfRa donalsd: since the exception is from requireNonNull(...), which takes an optional string parameter, I'm guessing whatever you called has a parameter called "text", and it is not allowed to be null [12:06]
sonOfRa And so that method called Objects.requireNonNull(yourValue (this is null), "text"), and that's how you got that exception and message [12:07]
donalsd Ahh understood. [12:07]
istlf [istlf!~istlf@] has joined ##java [12:11]
qqqhhh [qqqhhh!~qqqhhh@] has joined ##java [12:12]
long4mud [long4mud!] has joined ##java [12:16]
_lucifer so no Project Leyden? [12:23]
_lucifer _lucifer's title: "JEP draft: Remove the Experimental JIT and Ahead-of-Time Compiler" [12:23]
solvr [solvr!57e3c46d@] has joined ##java [12:24]
dmlloyd I think they intend to do Leyden differently [12:24]
cheeser no, they're essentially remove graal from the JDK it looks like. leaving the hooks, though, as both projects are jdk-external [12:24]
dmlloyd jaotc and graal are both a bit rough, and also hard to improve, in my estimation [12:25]
solvr Is there an array version of Java's Records. For when I want, say, one of my record properties to be an immutable list/tuple. [12:25]
freeone3000 solvr: No. [12:27]
solvr Thanks freeone3000. [12:27]
solvr How would you folks approach this problem with least wheel reinvention? [12:27]
freeone3000 Do it in Rust? [12:27]
solvr Wut [12:27]
dmlloyd just put a List in your record [12:28]
freeone3000 You seem to care a lot about exactly where and how contiguous your memory is allocated. Your application needs aren't sufficiently supported by even draft proposals to be a useful development experience. You might be better suited for writing the performance-critical portions of your application in a native language, like rust, and calling it [12:28]
freeone3000 through JNA. [12:28]
dmlloyd the List.of() implementations are quite efficient [12:28]
dmlloyd note that records are not the same as value types [12:29]
ricky_clarkson solvr: I'd just use normal objects, or if there really is a need, use a ByteBuffer with some careful indexing code. That's basically manual memory management and isn't what Java's aimed at. [12:29]
dmlloyd records are just classes constrained to a particular usage pattern and have few special behaviors [12:29]
dmlloyd value types are still in JEP draft stage [12:29]
solvr I know I talk a lot about memory allocation, but in this case I'm just asking at face value how to represent a record immutable list. [12:30]
dmlloyd an immutable list is best done with List.of() [12:30]
solvr Records have semantics like built-in serialization, immutability and so on [12:30]
freeone3000 List.immutableListOf(). [12:30]
dmlloyd a record with a list is best done by having a field of type List<Something> [12:30]
dreamreal I'd put it in rust, too [12:30]
dmlloyd a list of records is best done by List<RecordType> [12:30]
dreamreal anything but java, really [12:31]
dmlloyd a "record immutable list" is a syntax error [12:31]
cheeser so you're saying i should use a List? [12:31]
dreamreal java's the worst [12:31]
dreamreal solvr: aaaaanything but java [12:31]
dreamreal Visual BASIC [12:31]
dreamreal rust [12:31]
dreamreal go [12:31]
dreamreal dart [12:31]
solvr List.of() is not immutable or serializable by default. [12:31]
dreamreal javascript [12:31]
dmlloyd it is, I think, generally understood by everyone here that Java has some glaring weaknesses [12:31]
cheeser or just upgrade your logic and do things sanely [12:31]
dreamreal C# [12:31]
dreamreal you name it, as long as it's not java you'll be fine [12:32]
sonOfRa cheeser++ :D [12:32]
sonOfRa cheeser has a karma level of 1,591, sonOfRa [12:32]
solvr Ah shit it is immutable. [12:32]
Betal [Betal!~Betal@unaffiliated/betal] has joined ##java [12:32]
solvr I've never used the new .of() APIs [12:32]
dreamreal Trying to care, failing dramatically [12:32]
dmlloyd it's pretty nice tbh [12:32]
dreamreal makes jazz hands for emphasis [12:32]
cheeser dmlloyd: not quite list literals but close enough [12:32]
dmlloyd I use List.of() and Set.of() very frequently [12:32]
cheeser List.of() does not support null elements, fwiw [12:33]
solvr Don't need null in list, but I wonder why [12:33]
dreamreal sighs [12:34]
solvr You guys know I love you [12:37]
solvr Right [12:37]
solvr I respect like all of you, a lot. [12:37]
solvr Aight. [12:37]
dmlloyd many people believe it is bad practice to have nulls in collections [12:39]
dmlloyd so most of the newer collections and collection methods added into the JDK do not allow them [12:39]
cheeser which is ... naive [12:40]
dmlloyd many of the legacy collection types do however allow them, leading to fun [12:40]
solvr dmlloyd, so it's a design concern. Aight [12:40]
dmlloyd for my part I've found it to be almost 100% situational [12:40]
cheeser dmlloyd: should we stuff Optional in there instead? grody. [12:40]
solvr Makes sense I guess, why would one deliberately push null in a list. Maybe there are use cases but poor ones [12:40]
cheeser see? naive. [12:40]
solvr Maybe when people use List as tuples [12:40]
dmlloyd it depends completely on what you're using the list for [12:41]
solvr So position is semantic [12:41]
dmlloyd if you're using it for data, sure [12:41]
cheeser null is a valid [12:41]
cheeser null is a valid value [12:41]
solvr Tihs is why it's better to have a separate tuple type tho [12:41]
dmlloyd well, the JDK people are also against tuple types [12:41]
cheeser yeah. Lists as tuples is almost always wrong. [12:41]
solvr dmlloyd, they are? [12:41]
dmlloyd yes [12:41]
cheeser because $reasons. and they all suck. [12:42]
dmlloyd which is why every java library around has their own Pair<A,B> type [12:42]
cheeser pair [12:42]
cheeser Q: Why is Java such a manly language? A: Because every programmer has to grow a Pair. [12:42]
solvr Rationale? Guess because objects/records are already tuples. Just with names for convenience [12:42]
cheeser records don't factor in to it. objects only do if you squint hard enough. [12:42]
ricky_clarkson but but if you need a name and address you don't need a Pair<String, String>, that has no semantic meaning [12:42]
ricky_clarkson you clearly need a NameAndAddress type and that's amazingly better. [12:43]
solvr I've always found it odd method arguments are a tuple, but the result isn't. Quite asymetric. [12:43]
dreamreal ... [12:43]
solvr isn't it? [12:44]
_lucifer Records are named tuples. [12:44]
ricky_clarkson Pattern matching might 'solve' the result part. [12:44]
dmlloyd the bias towards multiple arguments/single results is buried very deeply in the language/compiler design society [12:44]
ricky_clarkson var (name, address) = whoDat(); [12:44]
solvr I'd be fine with one argument. [12:44]
solvr But this would produce tons of ad-hoc classes [12:44]
cheeser ricky_clarkson: i prefer kotlin's destructuring but oh well [12:44]
ricky_clarkson cheeser: I'm not that familiar with it, do you mean using 'when'? [12:45]
cheeser ricky_clarkson: yeah. that. that's different from java's pattern matching. [12:45]
solvr Ergo the only pragmatic option is results as a tuple [12:45]
dmlloyd indeed [12:45]
ricky_clarkson How will it look with Java's pattern matching? [12:45]
dmlloyd user value ("primitive") types could help with that, much like one can return a struct in C [12:45]
ricky_clarkson I get the amber emails but mostly don't read them ;( [12:45]
cheeser [12:46]
_lucifer when is like a pattern matching switch i think [12:46]
solvr dmlloyd "the bias towards multiple arguments/single results is buried very deeply in the language/compiler design society" <-- was this a thing, or a joke [12:47]
dmlloyd it's a thing [12:47]
solvr Was it ever (retro)rationalized? [12:47]
dmlloyd examine LLVM for example [12:47]
Jantz_ [Jantz_!~IceChat95@2407:7000:8d04:100:756f:bedd:6630:cfc] has joined ##java [12:48]
ricky_clarkson cheeser: That looks similar. 'let Rect(var p0, var p1) = r;' - where 'let' was not yet decided syntax. [12:48]
dmlloyd I think it was the rust designers that were lamenting how hard it is to design a language that supports multiple returns when the only practical modern FFI is C-based [12:48]
dmlloyd the C ABI really kind of sucks, but it's the only one that is globally supported [12:48]
dmlloyd not that it's one ABI - it's not - but more that everyone has one [12:49]
dmlloyd in fact one of the reasons it sucks so bad is because it can vary not only by OS and CPU, but by OS *version* and CPU *model* [12:49]
freeone3000 Everyone has *at least* one -- Windows has three! [12:50]
solvr If we could start over I wonder if we'd prefer named params and multiple (named) results by default. Notice in public APIs (like over HTTP etc.) this is almost always the default factoring [12:51]
dreamreal no. [12:51]
freeone3000 *waaayyy* too much overhead [12:51]
dreamreal ^^^^ [12:51]
solvr Well if it's a native feature it can be optimized away [12:51]
dreamreal sighs [12:51]
freeone3000 what does that even mean? [12:51]
solvr It means for example Swift is not slower for having named arguments [12:52]
ricky_clarkson Named params seems reasonable, it can mostly be a compile time feature. [12:52]
dmlloyd once we get to "if we could start over", then the value of discussion begins to rapidly fall off :) [12:52]
freeone3000 okay, let's assume you mean __cdecl calling convention, where you use the shift registers in order to pass arbitrary arguments and any number of arguments over the shift register max stack are pushed into main memory [12:52]
solvr And when you destructure your result and read one field, you don't need to physically materialize the object holding that field [12:52]
ricky_clarkson In Java it means the .class files need a bit more information due to separate compilation. [12:52]
solvr ricky_clarkson, definitely as a compile time feature yes. (unless you use reflection to map it to JSON or whatever) [12:53]
solvr Same for results [12:53]
freeone3000 for java? jvm calling convention really, really likes having one return. it's a stack machine, no registers. [12:54]
ricky_clarkson For results I think tuples would be fine with a syntax to destructure them. [12:54]
greentree47 [greentree47!~greentree@unaffiliated/greentree47] has joined ##java [12:54]
ricky_clarkson iirc that's what Python does and it presents no issues. [12:54]
greentree47 if i have Str foo = null; will foo.isEmpty() return true? [12:55]
greentree47 String foo* [12:55]
solvr The biggest overhead would be the extra typing when you do NOT need multple results, but you need to do something like getUser(id: 123).user [12:55]
greentree47 or it doesnt work for null [12:55]
freeone3000 greentree47: No, it will throw a NullPointerException. [12:55]
ricky_clarkson greentree47: Have you tried it? [12:55]
_lucifer tias [12:55]
_lucifer Try it and see. You learn much more by experimentation than by asking without having even tried. [12:55]
freeone3000 There you're already destructuring a record. F# has some really nice syntax for this, actually. [12:55]
freeone3000 Or Powershell, which is TCL.Net. [12:56]
greentree47 what about if foo != null && !foo.isEmpty() [12:56]
greentree47 would that be safe to and together? [12:56]
_lucifer tias [12:56]
_lucifer Try it and see. You learn much more by experimentation than by asking without having even tried. [12:56]
greentree47 even if it were null [12:56]
greentree47 i dont have an IDE open atm [12:56]
ricky_clarkson solvr: then you do var (user, _) = getUser(id: 123) or what you showed, and that's fine. [12:56]
freeone3000 greentree47: Then what are you doing? [12:56]
ricky_clarkson pretending to code [12:56]
solvr ricky_clarkson, sure but it's more verbose still. Not a big deal [12:56]
solvr But it'd be nice to have some way to avoid it when not needed [12:56]
freeone3000 ricky_clarkson: You don't actually need to do that, because getUser(id: 123).user is already an expression. You don't need to atomicize everything fully; you can assume that getUser(id: 123) is an expression and .user is the destructuring of that expression. you can do an implicit pattern-match against the entire expr, not just the atom. [12:57]
cheeser ricky_clarkson: right. so rather than destructuring, it'd just feed in to a named typed. [12:57]
ricky_clarkson cheeser: If that's regarding the amber link, sure. I'm not sure the type name is syntactically necessary, it could be distracting at times. [12:58]
cheeser i think the java impl needs it. [12:59]
cheeser it's a much bigger change without it. [12:59]
ricky_clarkson cheeser: NameAndAddress(var name, address) = whoDat(); is more distracting than var (name, address) = whoDat(); [12:59]
cheeser agreed. but java will likely never have the latter. [12:59]
freeone3000 could we reuse the lambda type-matching here? [12:59]
cheeser kotlin does, though. [12:59]
ricky_clarkson Fair enough, maybe something something subtypes causes a problem for Java. [12:59]
VicMackey [VicMackey!] has joined ##java [01:00]
ricky_clarkson cheeser: How does the Kotlin one look? I've only used 'when' [01:00]
cheeser [01:00]
ricky_clarkson Nice, exactly what I imagined Java could have. :) [01:01]
cheeser java has local var type inference but it doesn't support declaring variables of different types on one line like that. [01:01]
cheeser ricky_clarkson: exactly :) [01:01]
cheeser but "no." [01:01]
ricky_clarkson If Kotlin can do it, Java technically probably could and there's a deliberate decision against it. [01:01]
ricky_clarkson Possibly due to nominal/structural typing complaints. [01:01]
cheeser yeah. that. [01:03]
cheeser kotlin applies certain constraints on types to be eligible for destructuring [01:03]
cheeser the closest java gets to that is Iterable and the for each syntax [01:04]
VicMackey Hello! I'd like to ask a question regarding externalizing SQL queries. Previously, I've externalized the queries by using an XML file, reading with a PropertySource, creating a Bean and injecting it to a class with @Autowired. Something along the lines of this[1]. Are there any alternative best practices to this? Thank you in advance :) [1]: [01:04]
VicMackey VicMackey's title: "java - How to read a property in the an XML properties file in Spring Boot - Stack Overflow" [01:04]
VicMackey Another way is creating my custom SQL file loader, and save those files in "resources/sql/entity/query.sql", which I'm starting to consider [01:07]
cliluw [cliluw!~cliluw@unaffiliated/cliluw] has joined ##java [01:08]
solvr VicMackey sorry for not directly answering your question, I'm curious about the practice of externalizing. How do you parametrize your queries. Aside from basic scalar params what about parametrically including subexpressions, or what about variable count parameters (like IN(1,2, 3, 4...)) [01:15]
solvr I've been thinking about taking directives etc. from GraphQL and applying a similar philosophy to SQL queries [01:15]
dreamreal It'd be about time someone managed to do something useful with SQL [01:16]
cheeser it's an underserved market to be sure [01:16]
solvr SQL is great, it's just that the literal language divide is so annoying [01:16]
cliluw [cliluw!~cliluw@unaffiliated/cliluw] has joined ##java [01:17]
solvr I was in camp jOOQ thinking you need to abstract everything away and build it natively. I no longer find this optimal. [01:17]
VicMackey solvr: I don't really understand what do you mean. The query I would write in a file would be of the kind SELECT name FROM car WHERE name = :name . If you must build a dynamic query, either you partially store it in a .sql file and then build upon that with the conditionals you want, or you build your query directly as a literal [01:18]
VicMackey dreamreal: like what? [01:18]
dreamreal VicMackey: ? [01:18]
VicMackey dreamreal: The "It'd be about time someone managed to do something useful with SQL", what do you mean with doing something useful? [01:19]
ricky_clarkson jOOQ's problem for me is that you can't just take the query and run it manually in your DB, you'd have to run some code to get the query. [01:19]
cheeser VicMackey: that was sarcasm [01:19]
dreamreal VicMackey: oh SQL is a promise made of pure math but devastated by nobody understanding how to use it at all [01:19]
solvr VicMackey, my point was imagine you needed to include part of a WHERE expression conditionally on the value of a boolean param. In GraphQL this would look a bit like  SELECT name FROM car WHERE name = :name @if :recent (AND date > "2020-04-01") [01:19]
dreamreal also, this is sarcasm [01:19]
ricky_clarkson I kind of have to use an in-house version of jOOQ if I want paginated queries, and it's much more painful than direct SQL or DB API access (yes, that's a thing). [01:20]
VicMackey Whoops sorry, my bad [01:20]
dreamreal in general you use SQL when you don't give a shit about performance (or your performance requirements are really generous)... but as far as what it can do? SQL's great and quite well known [01:20]
FightingFalcon [FightingFalcon!~ff@unaffiliated/fightingfalcon] has joined ##java [01:21]
FightingFalcon what does @override mean in Dart language? [01:21]
VicMackey dreamreal: more sarcasm? [01:21]
dreamreal "I just now had an idea to improve something that's been around for 50+ years" is ... probably incorrect [01:21]
solvr dreamreal, people like to complain about SQL performance until they try to replicate what it does [01:21]
dreamreal FightingFalcon: you'd need to ask #dart [01:21]
dreamreal solvr: shut up. I made my bones in that industry. [01:21]
cheeser yeah. why are you asking *here* ? [01:21]
solvr dreamreal, and so your conclusion is don't use SQL unless you don't care about performance [01:22]
solvr ? [01:22]
VicMackey solvr: Yeap, that actually is a problem. We used to solve it by adding dynamism to the query by building WHERE clauses on the fly, with the first part read from a .sql file. Which I don't like, by the way... [01:22]
FightingFalcon because they are similar [01:22]
dreamreal solvr: or your performance requirements allow it. Like, if you're read-mostly? SQL's probably fine [01:22]
_lucifer this is at least the third time I've heard that from FightingFalcon. [01:22]
cheeser FightingFalcon: so are Java and C but that doesn't mean asking C questions here makes any sense. [01:23]
cheeser ffs [01:23]
solvr VicMackey check how GraphQL does it. It's relatively minimal but pragmatic I think [01:23]
cheeser find a dart forum. [01:23]
VicMackey solvr: Thanks, I'll do it :) [01:23]
istlf [istlf!~istlf@] has joined ##java [01:23]
solvr dreamreal, I just don't understand if you literally blame SQL semantics on this, or the fact it's a remote process (and usually a remote machine) reading shit off its disk and sending it over a socket. [01:24]
FightingFalcon So tell me what does @override mean in java? [01:24]
dreamreal solvr: that's because I didn't tell you. [01:24]
cheeser tutorial [01:24]
cheeser FightingFalcon, The Oracle tutorial for Java is probably your best starting point, at . Skip the Netbeans bits. Another option: - has a list of others as well. [01:24]
dreamreal jls [01:25]
dreamreal FightingFalcon, jls is short for the 'Java Language Specification'; it is the official spec that defines what java (the language) is. You can find it at - you can also find the 'Java Virtual Machine Specification' there, which defines java (the virtual machine). [01:25]
solvr dreamreal, great point. You didn't [01:25]
kicked FightingFalcon (FightingFalcon) [01:25]
solvr dreamreal, but I'm curious, as I'm interested in hybrid solutions of handling state (i.e. where you don't run to the DB for everything concerning app state, but you don't throw it away either) [01:26]
VicMackey solvr: you mean caching solutions? [01:26]
dreamreal solvr: I do a lot of things with IMDGs. [01:26]
dreamreal ew, caches, gross [01:26]
VicMackey dreamreal: as SQL gross [01:27]
dreamreal caches mean you recognize your DB is slow as shit but are afraid to go to something good [01:27]
cheeser like redis [01:27]
dreamreal damn you [01:27]
VicMackey The trolling is real today [01:28]
led1 [led1!~Thunderbi@] has joined ##java [01:28]
dreamreal VicMackey: he knows my experience with redis :) [01:28]
dreamreal I was literally laughing when I read that [01:29]
solvr VicMackey, not strictly only caching. [01:29]
solvr VicMackey, for example most RDBMS suck at running graph reachability queries. You can keep this in Java, and run the queries there, and then only fetch the records that match. [01:29]
dreamreal [01:29]
solvr VicMackey, but also caching is not just read cache, but also write cache. I.e. not writing immediately to SQL, but coalescing updates etc. [01:30]
cheeser or use a proper graphdb like a pro. [01:30]
dreamreal ^^^ this [01:30]
solvr cheeser, depends on your needs. [01:30]
dreamreal ... as always [01:30]
solvr Neo4j is in my eye like a shitty RDBMS with a thin graph query layer on top [01:31]
cheeser if you're doing graph queries, you almost certainly don't want to build that shit out yourself. [01:31]
solvr Might as well do it myself :P [01:31]
cheeser bwahahaha. oh, dear. [01:31]
_lucifer heh, just yesterday i wrote some non-trivial logic for invalidating caches when underlying data gets updated [01:31]
VicMackey solvr: I was about to tell you about Neo4j, but I haven't fiddled with it enough [01:31]
dreamreal I have [01:31]
VicMackey dreamreal: did you have a Neo4j databas cached on Redis? [01:32]
VicMackey O [01:32]
dreamreal hah, gosh [01:32]
cheeser it's a real gremlin to get it set up sometimes but worth it. [01:32]
solvr Ok I take this back I don't want to pile on Neo4j. It's just not my cup of tea if I don't have SERIOUS MASSIVE graph needs. [01:32]
solvr But also it's kinda shitty as a DB [01:32]
solvr P [01:32]
dreamreal It's okay. For graphs it's pretty good. [01:33]
VicMackey But but... they say that they're the leaders of graph databases!!!! If they say so, it must then be true!!!! [01:33]
Ragnor [Ragnor!] has joined ##java [01:33]
solvr Also their marketing really reaches for that "I don't understand SQL but I hate it" crowd. [01:33]
dreamreal well, graph databases are ... difficult to define clearly [01:33]
solvr The cringe is too big. [01:33]
Sheilong [Sheilong!uid293653@gateway/web/] has joined ##java [01:34]
solvr They explain at length how difficult of a chore it is to define a schema or do a join. [01:34]
solvr Like they've never used a RDBMS [01:34]
solvr Gotta feed their families I guess, and sell that graph. [01:34]
Ragnor [Ragnor!] has joined ##java [01:35]
VicMackey Well, I remember using it to analyze a huge codebase and to extract the dependencies among classes. The idea was to analize that data to suggest applying patterns that would improve code quality [01:35]
VicMackey I didn't finish the research, and Neo4j was weird to use, but it was a curious concept [01:36]
solvr A RDBMS can express a graph just fine. It's just a table self-joined. What it sucks (typically) is querying it at depth. So this is why RDBMS  + something just for the graph walking is a better solution in my mind, because at least the REST of your data is structured and secure [01:36]
JackB [JackB!b968f6e0@] has joined ##java [01:37]
solvr I think about a Graph DB as a special form of index. [01:37]
cheeser storing a graph in an RDBMS is trivial (especially if you dont give a shit about performance). querying a graph in SQL is a non-starter. [01:38]
solvr No need to put any data in it that's not DIRECTLY necessary for your graph queries [01:38]
ernimril cheeser, not at all, with a few stored procedures graphs in rdbms works fine, we do it :-) [01:38]
cheeser commits seppuku [01:38]
solvr Well just because something forms a graph doesn't mean you need intense graph-related queries. [01:39]
solvr What doesn't form a graph anyway:P  Everything does [01:39]
JackB Hello everyone , I have an assignment where I should design using inheritance some Hr classes like employee classes salary, hourly etc... I did my design but I have some questions for example I have SSN as a unique identifier of an employee so how would I go about not allowed 2 employee objects with the same SSN not to be created? I am also [01:39]
JackB confused about how I should implement the pay method and its logic like what will it do ! Since I have 0 experiences with work places or companies I am also confused weather I should make a class department to store employees ? Any ideas please [01:39]
cheeser do you keep a list of obvious statements around just to toss them out in conversational dead spots? [01:39]
solvr cheeser, no I generate them on the fly. [01:40]
ernimril cheeser, we did evaluate neo4j vs our code, there were almost no difference. but then the indexes are max 3 levels deep in our databases, so there were a few cases where we could see a difference, but it was not O(nlogn) vs O(n) as it ought to be [01:40]
cheeser ernimril: *nod* [01:40]
cliluw [cliluw!~cliluw@unaffiliated/cliluw] has joined ##java [01:40]
solvr ernimril, how do you express the graph, aside from direct adjacency? [01:41]
solvr Or is it just direct adjacency [01:41]
akaWolf [akaWolf!~akaWolf@unaffiliated/akawolf] has joined ##java [01:42]
ernimril solvr, we have for example power network, all parts so for a reasonably sized company that is about 10 million connected cables/switches/transformers, ... one table has the connections, basically a few id:s and the two connection indexes, everything with the same connection value is connected, 0/null is not connected [01:42]
ernimril solvr, in neo4j it was a correct graph though [01:42]
wedr [wedr!] has joined ##java [01:43]
ernimril solvr, the "hard" part was writing a few fancy stored procedures that follow the connections (with a few rules, like current switch statuses or normal switch statuses). Having the stored procedures return data in a nice way took a bit of work, but now it has been great for many years [01:44]
solvr ernimril, quite interesting [01:44]
solvr Well it's for the best, who knows how long's gonna Neo4j be around anyway [01:45]
solvr SQL isn't going anywhere [01:45]
solvr cheeser, I did it again. The obvious statement [01:46]
cheeser it'll be around for a while. because sql isn't the answer for what neo4j does. [01:46]
ernimril neo4j seems to be used quite a lot so I expect it to stick for quite some time [01:46]
cheeser it's the #1 graph db on the market, fwiw [01:47]
solvr cheeser, the thing with hype cycles is that right now people are using neo4j for many things where SQL is a better fit. As I said their marketing even pushes for this. And when the hype wave subsides, this makes even people who need Neo4j and benefit from it to pull away (to the next big thing). And this can bankrupt a business. The industry is not [01:48]
solvr fully rational. [01:48]
cheeser there's hardly a hype wave with neo4j [01:48]
solvr Well. [01:48]
cheeser it's been around for a long time now and will be around for a long time. [01:48]
solvr Cool, I see it differently. I don't see it as bad. [01:48]
solvr It's just not that exciting or capable. [01:48]
solvr As they sell it [01:48]
cheeser ¯\_(?)_/¯ [01:48]
VicMackey solvr: the same applied to Big Data, Block chain, IoT, ... [01:48]
solvr Right [01:49]
VicMackey And Rust [01:49]
VicMackey hides behind a rock [01:49]
solvr Obvious statement time: before RDBMS/SQL we already had graph DBs. [01:49]
solvr They were all abandoned [01:49]
cheeser let's get back on topic, then. [01:49]
_lucifer interesting [01:49]
_lucifer this is all very interesting (not really) but please take it somewhere else. [01:49]
solvr I was curious what dreamreal does when he considers SQL slow. Maybe some in-Java data engine or something [01:50]
VicMackey Right, to the question that started all: do we externalize SQL queries or not? [01:50]
solvr But he didn't say :P [01:50]
VicMackey solvr: probably use it wrong [01:50]
VicMackey is going to get kicked. He can feel it [01:50]
yawkat imdg!!1 [01:51]
solvr VicMackey, externalize but to me if it's just bunch of strings in a file, that doesn't help too much, for the reasons I noted (parametricity beyond name = :name) [01:52]
solvr There needs to be some macros to add an ounce of flexibility [01:52]
VicMackey Indeed... [01:52]
solvr Also what about stored procedures [01:53]
solvr That's also externalizing it [01:53]
VicMackey I tend to avoid those things [01:53]
VicMackey I rather have all the logic in the service layer [01:53]
solvr Then in your Java your calls can be reduced to basically SELECT things FROM procedure. [01:53]
gelignite [gelignite!] has joined ##java [01:54]
VicMackey The most I do are views, but procedures and functions and weird returns... no thank you. I've worked with DBAs that used procedures and such, and we ended with scattered logic everywhyere [01:54]
solvr Well, way I see it your DB is in the service layer. But I know that's not popular with Robert Martin and his clean architecture etc. [01:54]
cheeser this is also not java. so ... [01:54]
_lucifer why not store the sql query in a multi line string literal? [01:54]
solvr cheeser, it's kinda about using SQL from Java [01:55]
cheeser don't care [01:55]
cheeser [01:55]
VicMackey _lucifer: actually that could be a thing. But it feels weird having to trim the leading and trailing spaces, and the indentation - Using Kotlin btw [01:55]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [01:56]
VicMackey solvr: thanks for the answers though, I'll check GraphQL [01:57]
ron dafaq [01:57]
ron wait, don't care. [01:57]
paddyez [paddyez!~Patrick-E@wikipedia/paddyez] has joined ##java [01:57]
solvr VicMackey, you don't have to trim the whitespace, that won't make or break your performance stats. [01:57]
VicMackey solvr: mmmm... gotta try that, actually. Without trimming stuff. Thanks again [01:58]
solvr Also if you choose to do it's not that hard, one regex on first assign, and done. [01:58]
solvr Anyway none of this matters. [01:59]
dmiserak [dmiserak!] has joined ##java [01:59]
solvr dreamreal, can you share how you speed up or avoid your SQL bottlenecks you referred to [02:01]
solvr Part of what I'm playing with is how much I can avoid calling the DB and do the work I need in Java directly. [02:01]
solvr (still love the DB) [02:01]
Hanii [Hanii!~Hanii@2a00:23c5:c587:6d00:957f:a465:e8c5:c373] has joined ##java [02:01]
solvr He ded [02:08]
Peste_Bubonica [Peste_Bubonica!~Peste_Bub@unaffiliated/peste-bubonica/x-4612396] has joined ##java [02:12]
jamezp [jamezp!~jamezp@redhat/jboss/jamezp] has joined ##java [02:16]
solvr I knew why we couldn't overload on return type, but I forgot [02:32]
solvr Anyone remember? [02:32]
fizzie Here's one plausible reason: back when the semantics of method overloading were being defined, there wasn't such a thing as target type inference. There'd be no way of knowing which overload to call, without that. And it's still not always unambiguous (say, if you're ignoring the result). [02:37]
Fr1nge [Fr1nge!~Fr1nge@] has joined ##java [02:37]
cheeser solvr: return types are not used in method resolution [02:37]
solvr Ah shoot, ignoring the result is a thing. [02:38]
solvr fizzie, although maybe that's an argument in favor of void overload [02:38]
solvr :P [02:38]
JackB I have a question about activity diagrams [02:38]
JackB do we use an activity diagram to represent 1 single use case? [02:38]
JackB or to represent 1 single use case diagram [02:38]
JackB For example in my use case diagram I have a use called Login which includes another use case validate login [02:38]
JackB how would I go about doing it? [02:38]
cheeser JackB: ask #uml [02:39]
JackB or doing the activity diagram for it [02:39]
JackB ok thanks didn't know that channel existed [02:39]
JackB cheeser there is just 4 participants [02:39]
solvr That's cause no one cares about UML [02:40]
cheeser yeah. uml isn't that widely used these days. [02:40]
solvr P [02:40]
JackB Anyways do u guys know what should I do? [02:42]
JackB I am confused [02:42]
cheeser aolbonics [02:42]
cheeser cheeser, aolbonics is using unnecessary abbreviations such as 'u', 'r', 'ur', 'thx', etc. Using this kind of abbreviation is annoying and pointless. You have a full keyboard. Please use it. If you want intelligent answers, the least you can do is speak intelligently. [02:42]
cheeser we don't do uml here either. [02:42]
solvr JackB, if this is an assignment, isn't this what you have teachers about. Ask them [02:44]
solvr And if it's not. [02:44]
solvr WTF are you doing UML :P [02:44]
JackB uh it is an assignment [02:44]
JackB I hate asking my teacher : ( [02:44]
solvr Great. [02:44]
cheeser well, we don't get paid for that. they do. [02:45]
solvr So print an empty sheet with "sorry but I hate asking you" and submit that. [02:45]
cheeser #programming might have something for you, though [02:46]
solvr cheeser, cruel [02:46]
nyxyn [nyxyn!~nyxyn@2600:1700:3db0:2540:910:e58b:2116:37c2] has joined ##java [02:46]
GnarlyBob [GnarlyBob!~chris@unaffiliated/gnarlybob] has joined ##java [02:47]
solvr [solvr!57e3c46d@] has joined ##java [02:53]
Gazooo [Gazooo!~gazoox@] has joined ##java [03:01]
Pixi__ [Pixi__!~Xiti-@unaffiliated/xiti] has joined ##java [03:03]
SirMangler [SirMangler!] has joined ##java [03:05]
wedr [wedr!] has joined ##java [03:11]
Gazooo is there any way to make JDBC friendly with named parameters in anyway when dealing with prepared statements for SQL? it created new bind parameters every time, which causes some issues in some edge cases [03:13]
Gazooo so far I have found no implementation that relies on prepared statements that gets around this use case [03:13]
dmlloyd afaik it 100% depends on the driver and database [03:13]
yawkat that [03:14]
Gazooo currently mssql, using latest mssql driver from M$ [03:14]
Gazooo but essentially, I have a case statement I'm using in a GROUP BY clause, that same case statement is selected up top, inside that case statement has a parameter (a ? is generated) [03:14]
Gazooo but it complains that said field must exist in GROUP BY clause, simply because it's using a diff bind param [03:15]
Gazooo if I manually replace/hardcode the param to a fixed value, it works [03:15]
Gazooo the code generates generic SQL but makes heavy use of prepared statement parameters, I would have hoped that the driver (or DB) would be intelligent enough to detect same parameter, but unfortunately not [03:16]
phredus [phredus!~phredus@unaffiliated/phredus] has joined ##java [03:17]
yawkat can you show the query [03:18]
Gazooo sec [03:21]
Gazooo I can show the parts that matter I guess [03:21]
Gazooo [03:22]
Gazooo this is the jist of what is happening [03:22]
Gazooo it can get even more complex than that, but for the most part assume this [03:23]
yawkat yea i can see how that can break [03:25]
Gazooo if it reused the bind param, it works fine [03:27]
Gazooo but unfortunately I cannot rely on that it seems, will have to find a different approach [03:27]
solvr If you have to choose between being successful and bashed vs. unsuccessful but morally superior, which one you pick? [03:35]
wedr solvr, I would pick the option that the end users want. [03:36]
wedr Those options are just "business decisions". Whichever one the management chooses, we do it, so as long as we get our pay. [03:37]
solvr I'm just comparing the mood between here and #haskell [03:39]
solvr Over there they're sure they're right, but no one "gets it". Over here no one gives a damn as Java is everywhere [03:39]
yawkat i would pick an on-topic discussion [03:40]
Xiti [Xiti!~Xiti-@unaffiliated/xiti] has joined ##java [03:46]
tang^ [tang^!~tang^@2604:3d09:47c:f970:9558:c137:81e6:1534] has joined ##java [03:51]
Fr1nge [Fr1nge!~Fr1nge@] has joined ##java [03:54]
Haxxa [Haxxa!] has joined ##java [04:23]
georgios [georgios!~george@unaffiliated/anaphaxeton] has joined ##java [04:28]
cheeser yawkat++ [04:34]
cheeser yawkat has a karma level of 358, cheeser [04:34]
yawkat be cheeser [04:34]
yawkat how is this java? [04:34]
ries- parted the channel: [04:37]
Cmaj6 [Cmaj6!] has joined ##java [04:38]
led1 [led1!~Thunderbi@] has joined ##java [04:54]
ricky_clarkson Nobody's picking something that doesn't work, and definitely not due to morals. No morals are broken if you overwrite data in memory, but there are different approaches to how you do that, with different tradeoffs. [04:56]
mindCrime_ [mindCrime_!] has joined ##java [04:59]
acidjnk_new [acidjnk_new!] has joined ##java [05:07]
nyxyn [nyxyn!~nyxyn@2600:1700:3db0:2540:910:e58b:2116:37c2] has joined ##java [05:26]
Fr1nge [Fr1nge!~Fr1nge@] has joined ##java [05:29]
nyxyn [nyxyn!~nyxyn@2600:1700:3db0:2540:910:e58b:2116:37c2] has joined ##java [05:59]
eckman [eckman!] has joined ##java [06:22]
Maldivia why java... why... [06:30]
Maldivia but works... [06:32]
Jantz [Jantz!] has joined ##java [06:38]
Fr1nge [Fr1nge!~Fr1nge@] has joined ##java [06:45]
Fr1nge [Fr1nge!~Fr1nge@] has joined ##java [06:51]
wedr Maldivia, I think it's because when you're calling on Bar.super.m(), Java doesn't know which m() to use. Both Bar and Baz inherit the default method m(), so the Bar.super.m() is ambiguous. [06:52]
wedr Baz.super.m() is clear because we know Baz doesn't have m() in Baz, but has Bar.super.m() in Baz. [06:53]
wedr Or I'm totally wrong... [06:53]
nyxyn [nyxyn!~nyxyn@2600:1700:3db0:2540:910:e58b:2116:37c2] has joined ##java [07:14]
Intrepd_ [Intrepd_!] has joined ##java [07:19]
mindCrime_ [mindCrime_!] has joined ##java [07:29]
Peste_Bubonica [Peste_Bubonica!~Peste_Bub@unaffiliated/peste-bubonica/x-4612396] has joined ##java [07:34]
hussam [hussam!~hussam@unaffiliated/hussam] has joined ##java [07:39]
paddyez [paddyez!~Patrick-E@wikipedia/paddyez] has joined ##java [07:45]
Intrepd [Intrepd!] has joined ##java [08:03]
NorthwestVegan [NorthwestVegan!~Northwest@gateway/tor-sasl/northwestvegan] has joined ##java [08:03]
swj [swj!~swj@2409:8928:544c:374:c948:4a5d:1c22:ab44] has joined ##java [08:41]
Jantz_ [Jantz_!] has joined ##java [08:42]
nivag_ [nivag_!] has joined ##java [08:42]
gambl0re [gambl0re!~rickyjw@unaffiliated/gambl0re] has joined ##java [08:55]
Renari [Renari!] has joined ##java [09:00]
Arimil [Arimil!] has joined ##java [09:03]
pr3d4t0r [pr3d4t0r!] has joined ##java [09:07]
db [db!uid18678@gateway/web/] has joined ##java [09:11]
upgrdman [upgrdman!~upgrdman@blender/artist/upgrdman] has joined ##java [09:14]
MrFlibble parted the channel: [09:15]
tnR [tnR!] has joined ##java [09:20]
Jantz [Jantz!] has joined ##java [09:43]
Nightwing52 [Nightwing52!~Thunderbi@] has joined ##java [10:02]
vecnah [vecnah!~vec@2a01:e0a:174:4c50:6ece:24a:7415:70d8] has joined ##java [10:03]
upgrdman_ [upgrdman_!~upgrdman@blender/artist/upgrdman] has joined ##java [10:16]
upgrdman__ [upgrdman__!~upgrdman@blender/artist/upgrdman] has joined ##java [10:19]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [10:31]
Hanii [Hanii!] has joined ##java [11:11]
Enissay [Enissay!~Enissay@unaffiliated/enissay] has joined ##java [11:13]
Enissay [Enissay!~Enissay@unaffiliated/enissay] has joined ##java [11:24]
Goplat [Goplat!~Goplat@reactos/developer/Goplat] has joined ##java [11:28]
p[a]ddy [p[a]ddy!~Patrick-E@wikipedia/paddyez] has joined ##java [11:40]
rajrajraj [rajrajraj!uid72176@gateway/web/] has joined ##java [11:45]
Enissay [Enissay!~Enissay@unaffiliated/enissay] has joined ##java [11:50]
DasBrain [DasBrain!~DasBrain@unaffiliated/johannes13] has joined ##java [11:53]