Info

Login

Channels

APIs

Credits

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

« 2019-05-14

2019-05-15

2019-05-16 »

Nick Message Date
indistylo [indistylo!~aruns_@106.51.25.10] has joined ##java [12:01]
d1b [d1b!~db@linode.d1b.org] has joined ##java [12:13]
rwheadon [rwheadon!~rwheadon@2600:1700:17a0:58e0:f99f:bde4:e621:6e51] has joined ##java [12:17]
nsdax [nsdax!84bc001d@gateway/web/freenode/ip.132.188.0.29] has joined ##java [12:26]
nsdax hi all , i have a data file which is hige and due to nested 3 for loops it seems to run forvever can someone help me how to fix it? https://pastebin.com/vdUJTyCD [12:27]
nsdax can someone help [12:34]
wisey [wisey!~wisey@79-73-80-105.dynamic.dsl.as9105.com] has joined ##java [12:34]
wisey [wisey!~wisey@79-73-80-105.dynamic.dsl.as9105.com] has joined ##java [12:57]
indistylo [indistylo!~aruns_@106.51.25.10] has joined ##java [01:01]
Galactus [Galactus!~Galactus@unaffiliated/galactus] has joined ##java [01:02]
led_dark_1 [led_dark_1!~Thunderbi@217.66.160.14] has joined ##java [01:03]
sauvin [sauvin!sauvin@about/linux/staff/sauvin] has joined ##java [01:10]
dendazen [dendazen!~dendazen@pool-72-76-93-243.nwrknj.fios.verizon.net] has joined ##java [01:11]
ogradyd [ogradyd!~Thunderbi@2a02:8070:88bf:9df0:80d2:20d9:8517:b9d6] has joined ##java [01:11]
Oatmeal [Oatmeal!~Suzeanne@2600:8802:1500:5f5:84e6:cc01:5888:9ee3] has joined ##java [01:12]
mitch0 [mitch0!~mitch@84-236-21-170.pool.digikabel.hu] has joined ##java [01:17]
indistylo [indistylo!~aruns_@106.51.25.10] has joined ##java [01:22]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [01:26]
indistylo [indistylo!~aruns_@106.51.25.10] has joined ##java [01:28]
metrixx [metrixx!~metrixx@unaffiliated/metrixx] has joined ##java [01:30]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [01:32]
ricky_clarkson ImmutableSet<Foo> foos = ...; ImmutableSet<Bar> bars = ...; Sets.difference(foos.stream().map(Baz::fromFoo).collect(toImmutableSet()), bars.stream().map(Baz::fromBar).collect(toImmutableSet())); [01:50]
ricky_clarkson Is there anything that will do this a bit less wordily? [01:51]
exonity01 [exonity01!uid364582@gateway/web/irccloud.com/x-zqtkhpyiuwmlfuwh] has joined ##java [01:51]
ricky_clarkson imagining something like: Sets.diffBy(foos, Baz::fromFoo, bars, Baz::fromBar) [01:51]
ricky_clarkson Streams.zip(foos, bars, (foo, bar) -> Baz.fromFoo(foo).equals(Baz.fromBar(bar))) is probably as close as I need. Thanks for the input. ;) [01:55]
SuperTyp [SuperTyp!~SuperTyp@15.5.3.213.static.wline.lns.sme.cust.swisscom.ch] has joined ##java [01:57]
Anthaas_ [Anthaas_!~Anthaas@unaffiliated/anthaas] has joined ##java [01:58]
Chuguniy [Chuguniy!~Chuguniy@80.232.218.96] has joined ##java [01:58]
wisey [wisey!~wisey@79-73-80-105.dynamic.dsl.as9105.com] has joined ##java [01:58]
immibis [immibis!~immibis@222-153-253-249-fibre.sparkbb.co.nz] has joined ##java [02:00]
Hanii [Hanii!~Hanii@2a00:23c5:c587:a800:3190:a820:cbcc:e2fd] has joined ##java [02:02]
buttsanchez [buttsanchez!~buttsanch@pool-173-63-194-122.nwrknj.fios.verizon.net] has joined ##java [02:02]
SmearedBeard [SmearedBeard!~SmearedBe@unaffiliated/smearedbeard] has joined ##java [02:07]
puppy_za [puppy_za!uid277586@gateway/web/irccloud.com/x-oijizwiosbpyvoek] has joined ##java [02:09]
forgottenone [forgottenone!~forgotten@176.88.103.227] has joined ##java [02:14]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [02:17]
OnceMe [OnceMe!~OnceMe@unaffiliated/onceme] has joined ##java [02:19]
palasso [palasso!~palasso@unaffiliated/palasso] has joined ##java [02:22]
Xgc [Xgc!~Jon@98.1.126.42] has joined ##java [02:24]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [02:25]
acidjnk [acidjnk!~acid@i577BCAAD.versanet.de] has joined ##java [02:26]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [02:29]
AugustusCaesar24 [AugustusCaesar24!~AugustusC@99-190-112-116.lightspeed.irvnca.sbcglobal.net] has joined ##java [02:31]
Anticom [Anticom!~Anticom@ip-178-202-98-139.hsi09.unitymediagroup.de] has joined ##java [02:34]
Maldivia that's bot the same though [02:39]
Maldivia not* [02:41]
g00s [g00s!~g00s@unaffiliated/g00s] has joined ##java [02:41]
wisey [wisey!~wisey@79-73-80-105.dynamic.dsl.as9105.com] has joined ##java [02:44]
sa02irc [sa02irc!~sa02irc@155-079-043-212.ip-addr.inexio.net] has joined ##java [02:50]
pd09041999 [pd09041999!~pd0904199@unaffiliated/pd09041999] has joined ##java [02:54]
kicked pd09041999 (Banned: possible bot? this ban will expire after 30d) [02:54]
OnceMe Hey people, I have this structure https://pastebin.com/DBUv2nDg and I was wondering how can I create structure with children, based on info from list (I have sql query with recursion, but now I want to transform it via code to the children nested array, any ideas/algorithms? [03:09]
AfroThundr|main [AfroThundr|main!~AfroThund@countervandalism/AfroThundr3007730] has joined ##java [03:09]
Kestrel-029 [Kestrel-029!~Nicmavr@unaffiliated/nicmavr] has joined ##java [03:11]
[twisti] OnceMe: java has no built in tree data structure (TreeMap is something different) [03:19]
[twisti] i think guava has something for that [03:20]
wisey [wisey!~wisey@79-73-80-105.dynamic.dsl.as9105.com] has joined ##java [03:21]
[twisti] in short, you have to roll your own, which should be trivial, but if you have any specific questions, feel free to ask [03:21]
wisey [wisey!~wisey@79-73-80-105.dynamic.dsl.as9105.com] has joined ##java [03:21]
OnceMe [twisti], do you have any proposition or suggestion for algorithm? [03:23]
yawkat just make a class [03:24]
[twisti] trees are a typical tutorial/beginners task that you can easily google [03:24]
odinsbane Guava doesn't have one? [03:24]
yawkat the problem with providing a "tree" data structure is that the problem is so generic that it's hard to actually offer a single class for it [03:24]
yawkat it's about as sensible as a "recursion" data structure [03:24]
odinsbane searching for a guava tree doesn't give me an api... [03:25]
OnceMe yawkat, what do you mean by "just make a class", I would need algorithm [03:26]
yawkat javadoc Graph [03:26]
yawkat yawkat: http://bit.ly/2VpOtKW [guava: com.google.common.graph.Graph] [03:26]
yawkat OnceMe: a hashmap and a loop. [03:26]
[twisti] no, i checked, guava doesnt have a tree, sorry [03:27]
Smeared_Beard [Smeared_Beard!~SmearedBe@unaffiliated/smearedbeard] has joined ##java [03:27]
[twisti] the graph is too generic for your problem and its really easier to just roll your own [03:27]
[twisti] there really arent any algorithms involved [03:27]
OnceMe yawkat, so for my issue, how would you write "a simple for loop"? [03:27]
yawkat for each item in the list, create an object, add it to the map and add it to its parent. [03:28]
OnceMe but what if I have n depth? [03:28]
[twisti] tree for, say, String (add generics on your own): class Node { Node root; List<Node> children; } [03:29]
yawkat it still works. [03:29]
[twisti] kind of depends on how you want to access it later [03:29]
[twisti] err [03:29]
[twisti] tree for, say, String (add generics on your own): class Node { Node root; List<Node> children; String value; } [03:29]
yawkat the only limitation to that "algorithm" is when parents appear after their children, which they dont seem to in your example. [03:29]
OnceMe let me think about it for a min, I might have something on my mind [03:29]
OnceMe yawkat, what do you mean? [03:30]
[twisti] you may want to think about questions such as: do you want parents to be able to be the children of their own children ? (that introduces endless loops, which you may or may not want) do you typically want to say "give me all the siblings of this node" ? do you want to be able to say "given this node value, who is its parent/children?" [03:31]
OnceMe [twisti], I dont think thats the thing here [03:33]
OnceMe so I guess I would have a simple approach [03:33]
OnceMe let me just try something [03:33]
[twisti] honestly its so simple to think about that its a great exercise to just hand roll [03:34]
OnceMe I would need two objects, one with children field and one without it, right? [03:34]
OnceMe I mean two classes*, not objects [03:35]
[twisti] no, always have the children field, and just have it an empty list when you have no children [03:35]
[twisti] makes it way easier to write code if you dont have extra cases [03:35]
svm_invictvs What backs a java.nio.channels.PIpe [03:38]
svm_invictvs Is that purely in Java, does it consume a file descriptor? [03:38]
magz_ [magz_!~magz@68-168-184-223.fttp.usinternet.com] has joined ##java [03:38]
yawkat well the selector has to support it [03:39]
yawkat it's usually an fd [03:39]
svm_invictvs Okay [03:39]
svm_invictvs I got code that's using a Selector and long story short my app runs the system out of file descriptors under heavy load [03:40]
[twisti] are you closing your resources ? [03:40]
svm_invictvs And it's using a bunch of pipes to funnel data around [03:40]
svm_invictvs [twisti] I think so. [03:40]
svm_invictvs well [03:41]
OnceMe [twisti], I have started like this: https://pastebin.com/E37XDLzd how can I proceed? [03:41]
svm_invictvs Having a test of 1000 clients connect there's liek 50k file descriptors open [03:41]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [03:41]
svm_invictvs something is leaking somewhere [03:41]
[twisti] OnceMe: generally: check what you want it to do, think about why its not doing that, then write code to make it do what you think it should do [03:42]
OnceMe should I have for loop in getNestedItems or in recursiveStrategy? [03:43]
[twisti] do you need a for loop in either ? [03:43]
OnceMe how would I go through all the items? [03:43]
[twisti] i dont even know what those methods are SUPPOSED to do, they have no comments [03:43]
nurupo [nurupo!~nurupo.ga@unaffiliated/nurupo] has joined ##java [03:43]
OnceMe its here https://pastebin.com/DBUv2nDg [03:44]
[twisti] for (ItemDTO child : children) { //... } [03:44]
Anticom [Anticom!~Anticom@87.190.49.75] has joined ##java [03:44]
OnceMe [twisti], I have in impl yes, but I dont know which algorithm to apply on this [03:46]
svm_invictvs [twisti] basically this library hides the actual Selector and I want to be able to signal the thread what's waiting on Selector.select [03:46]
OnceMe should I do bruteforce? [03:46]
[twisti] OnceMe: what algorithm ? what brute force ? [03:46]
svm_invictvs Seems kinda hairy to use Selector.wakeup() but also seems that's exactly what that's designed for soo ... [03:46]
OnceMe [twisti], how would you populate children field in ItemDTO? [03:46]
[twisti] children.add(child) [03:47]
OnceMe since I have a resultset "table" which is shown here [03:47]
OnceMe no, it's not that easy [03:47]
[twisti] ok then [03:47]
OnceMe check the table I have provided [03:47]
OnceMe id's 4 and 5 belong to id: 3 [03:48]
OnceMe and id 3 belongs to id 1, check parent node id [03:48]
OnceMe that's why I cannot simple check what to add to the children field [03:48]
OnceMe simply* [03:48]
[twisti] it sounds like you need to keep a list of node ids and their nodes [03:49]
OnceMe correct, but how do I that? [03:50]
OnceMe and I would need a bruteforce? [03:50]
[twisti] you keep repeating that word, which you have not explained and which makes no sense to me in this context [03:51]
[twisti] if you dont know how to make a list in java, then its time for a tutorial [03:51]
[twisti] although while i said list, what i really meant was a map [03:52]
[twisti] maybe something like Map<Integer, Node> [03:52]
svm_invictvs Actually, when is it appropriate to use Selector.wakeup()? [03:52]
svm_invictvs I'm assuming it's meant to be used when you want to hadn something to your IO thread immediately right? [03:52]
OnceMe [twisti], I know how to create a list huh, but how would I solve this problem? [03:53]
svm_invictvs Put it in some thread-safe quue, then issue a wakeup() on the thread that's waiting on select(), and let it begin proessing right? [03:53]
odinsbane [twisti]: brute force: throwing random code at a problem until it produces a result. [03:53]
[twisti] i dont know what part you need me to elaborate on, OnceMe [03:53]
[twisti] odinsbane: that is absolutely not the definition of brute force [03:53]
odinsbane [twisti]: yes, it's the same as a brute force password cracker. [03:54]
[twisti] no, it definitely not. brute force password crackers dont use random code to crack the password, they use the exact same code that is run millions of times [03:55]
[twisti] which is what brute force is: trying the same code millions of times to get a result instead of writing different, better code [03:55]
odinsbane [twisti]: you miss the joke. [03:55]
[twisti] oh, okay [03:55]
odinsbane [twisti]: brute force, you try many different passwords to get the correct one. [03:55]
odinsbane [twisti]: the code isn't random, the password is. [03:56]
odinsbane brute force coding: the code is random. [03:56]
Kestrel-029 [Kestrel-029!~Nicmavr@unaffiliated/nicmavr] has joined ##java [03:56]
[twisti] i cant tell whether you are trying to make a joke or are seriously trying to defend your definition of brute force, but either way i dont really care enough [03:56]
Anthaas [Anthaas!~Anthaas@unaffiliated/anthaas] has joined ##java [03:57]
tehy [tehy!0e8e97b2@gateway/web/freenode/ip.14.142.151.178] has joined ##java [03:58]
bolt [bolt!~r00t@unaffiliated/bolt] has joined ##java [03:59]
tehy I have a jar. how do i make the jar running [04:02]
tehy could someone be of help to me please [04:02]
tehy should i need to use something like tomcat [04:02]
odinsbane tehy: Have you asked the person who created/distributed the jar file? [04:02]
odinsbane jar [04:02]
odinsbane the Java ARchive. See http://docs.oracle.com/javase/tutorial/deployment/jar/index.html and http://docs.oracle.com/javase/7/docs/technotes/guides/jar/index.html [04:02]
odinsbane It's pretty much a zip file. [04:03]
tehy odinsbane: yes and he said use anything i can [04:03]
yawkat tech support [04:03]
yawkat Hello, ##java is not a technical support channel for your Java apps or virtual machines; it's a development channel for enthusiasts to discuss programming with the Java language. Please ask the vendor of your software for support if you're having trouble with it. [04:03]
deadc0de [deadc0de!~deadc0de@94.31.32.54] has joined ##java [04:05]
metascion [metascion!~metascion@185.254.68.92] has joined ##java [04:05]
tehy is it possible to install a specific version of openjdk? [04:10]
tehy as of now i have 1.8.0_212 [04:10]
tehy I want "1.8.0_121" [04:11]
ener2 [ener2!~quassel@gate.bach.cz] has joined ##java [04:12]
davlefou [davlefou!~davlefou@unaffiliated/davlefou] has joined ##java [04:13]
ener2 why is #22 not allowed by JLS? https://ideone.com/QZp16E [04:15]
ener2 (without explicit cast) [04:15]
eckon [eckon!~eckon@eckon.rocks] has joined ##java [04:16]
odinsbane ener2: Why specifically the JLS? You have an Class<?> how would it know to make it a Class<Bar>? [04:18]
odinsbane downloads [04:18]
odinsbane Find current releases for Java at http://www.oracle.com/technetwork/java/javase/downloads/index.html . Older releases can be found at http://www.oracle.com/technetwork/java/javase/archive-139210.html . If you don't need the Oracle Version, see ~alternative jdk [04:18]
ener2 odinsbane: I have Foo.class, why is it Class<?> instead of Class<Foo>? [04:18]
rwheadon [rwheadon!~rwheadon@2600:1700:17a0:58e0:f99f:bde4:e621:6e51] has joined ##java [04:19]
yawkat variance [04:19]
yawkat ener2, invariance is the notion that List<Integer> and List<Number> are not assignable to each other. This is because, for example, list.add(double) is only possible on the latter, and get() -> int is only possible on the former, making the two incompatible. Variance in java can be achieved through ~wildcards [04:19]
odinsbane ener2: hmm, I was looking at the getClass, I don't see the name of the field in the Object description, but I suspect it is Class<?> [04:19]
ener2 yawkat: but here cast is required even with wildcards though [04:20]
yawkat no [04:20]
yawkat Class<Foo> is assignable to Class<?>. [04:21]
ener2 yes but then you lose the type check though [04:21]
yawkat incorrect [04:21]
odinsbane Class<? extends Bar> is ok. [04:22]
ener2 yawkat: you lose that and newInstance() returns object [04:22]
odinsbane (The paste says Bar not foo.) [04:22]
yawkat ener2: thats not the same thing as "you lose the type check" [04:22]
ener2 odinsbane: hmm, strange, eclipse was still complaining [04:22]
yawkat ener2: also note that newInstance is deprecated. [04:22]
yawkat (and it's almost always better to just pass a method reference to the constructor, anyway) [04:23]
ener2 yawkat: good point l [04:24]
ener2 yawkat: interestling, with Supplier<Bar> it works without any casting or wildcards go figure [04:25]
ener2 *Foo, whatever, the interface [04:25]
yawkat it only works because at the method ref site, the return type is correctly inferred. [04:25]
yawkat you still cannot assign Supplier<Foo> to Supplier<Bar>, the expression Foo::new is just valid for either, depending on inference. [04:26]
yawkat only wildcards are variant in java. [04:26]
[twisti] i am also confused why "Class<? extends Bar> bcls = Foo.class;" does not work. Foo.class is Class<Foo>, and Foo extends Bar, so why doesnt that wildcard work ? [04:28]
ener2 it worked, Class<Bar> didn't [04:29]
ener2 but Supplier is much better since it does not have exceptions to handle anyways [04:29]
[twisti] wait, was that paste changed ? didnt you say #22 DIDNT work ? [04:31]
ener2 yeah I tested out Class<? extends Bar> in same paste [04:31]
[twisti] ah ok [04:31]
[twisti] i was like "wtf? that really SHOULD be working" when i saw that (and now that i rechecked it, i see that it actually DOES compile) [04:32]
HumanGeek [HumanGeek!~HumanG33k@62.147.242.8] has joined ##java [04:36]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [04:41]
skraito [skraito!~ypatra@unaffiliated/ypatra] has joined ##java [04:43]
keepLearning512 [keepLearning512!~keepLearn@106.51.72.155] has joined ##java [04:55]
i7c [i7c!mrs5J7pLUe@unaffiliated/i7c] has joined ##java [04:55]
KnownSyntax [KnownSyntax!sid233169@gateway/web/irccloud.com/x-rpfnwgazjzcekddo] has joined ##java [04:55]
bolovanos [bolovanos!~bolovanos@ctrli.eu] has joined ##java [04:59]
maxzor [maxzor!~maxzor@laubervilliers-657-1-70-103.w90-63.abo.wanadoo.fr] has joined ##java [05:01]
magz_ [magz_!~magz@68-168-184-223.fttp.usinternet.com] has joined ##java [05:02]
maxzor Hello, I am on ubuntu 19.04, want to run this software https://github.com/janmotl/linkifier. Downloaded latest release, unziped cd into dir, java -jar linkifier...jar : "Could not find or load main class controller.MainApp java.lang.NoClassDefFoundError: javafx/application/Application"... any clue? [05:04]
odinsbane maxzor: you probably need to be using java 8. [05:05]
maxzor default here is 11 [05:05]
odinsbane Yeah, then you gotta do some more crap to use javafx. [05:06]
odinsbane java -jar SomeJavaFxApp.jar doesn't work anymore due to the module system. I'm not sure offhand how to fandangle it. The easiest fix is to get a java 8 jvm with javafx and use that. [05:06]
odinsbane You don't even need to install the java system wide. [05:07]
maxzor I am a beginner and had lots of trouble running multi-version packages in the past. Will try guix one day :) [05:07]
odinsbane maxzor: right, you don't need 'multi-versions' download java 8, untar/zip it and then ../path/bin/java -jar yourjarfile.jar [05:08]
maxzor odinsbane, right [05:09]
eckon [eckon!~eckon@eckon.rocks] has joined ##java [05:09]
odinsbane maxzor: https://github.com/openjfx/samples this has some basic examples. [05:09]
odinsbane odinsbane's title: "GitHub - openjfx/samples: JavaFX 12 samples to run with different options and build tools" [05:09]
tehy how to deploy a jar in tomcat [05:10]
tehy i have copied the jar in the tomcat directory [05:10]
tehy inside the webapps directory [05:10]
srm [srm!~srm@unaffiliated/srm] has joined ##java [05:10]
very_sneaky [very_sneaky!~very_snea@221.121.145.59] has joined ##java [05:13]
powerbit [powerbit!~powerbit@5-15-13-92.residential.rdsnet.ro] has joined ##java [05:14]
maxzor "/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -jar linkifier-3.2.5.jar" --> still cannot find or load main class controller.MainApp [05:15]
srm Files.list(?) is supposed to be called with try-with-resources. Why? If I immediately call collect(..) on the stream, doesn't the terminal operation also close the stream? What am I missing here? [05:17]
odinsbane maxzor: Does that openjdk have javafx? [05:17]
srm (Reason is: some code quality tools tell me to use twr on a line like "List<Path> directoryContent = Files.list(folder).collect(Collectors.toList())" [05:17]
yawkat srm: no [05:19]
yawkat next [05:19]
yawkat Another satisfied customer. Next! [05:19]
odinsbane I often feel javafx was created to kill swing. Not to replace it, just kill it off. [05:22]
odinsbane javafx [05:22]
odinsbane JavaFX, or OpenJFX, is a set of APIs for writing rich client applications in Java. It's more fully-featured and capable than Swing. For more information see https://openjfx.io . Also see ~scenebuilder [05:22]
puppy_za Swing is still in JDK, though [05:25]
srm yawkat: ah, I think I get it. The tools are able to verify that Files.list() actually returns an autoclosable stream instance, while List<>.stream() doesn't [05:27]
maxzor odinsbane, dont think so right, why would latest openjfx + openjdk-11-jre not do it? [05:27]
yawkat srm: it was a mistake to make Stream closeable [05:27]
yawkat they should have made it either close on terminal ops, or introduced a separate closeable stream interface [05:28]
odinsbane maxzor: you are right. openjfx + openjdk-11 is going to be do-able. You'll have to do something slightly different than java -jar I think. [05:28]
yawkat as you say, with this approach static analysis has to learn that list.stream does not need to be closed [05:28]
plitter Since there is a new java.time, I was under the impression that it was the one that we should start using compared to java.util.date etc. is there somewhere that is documented? [05:28]
yawkat java.time [05:28]
yawkat Use the new, as of java 8, java.time package (inspired by joda-time): http://docs.oracle.com/javase/8/docs/api/java/time/package-summary.html and the tutorial, http://docs.oracle.com/javase/tutorial/datetime/TOC.html . Look at https://yawk.at/java.time/ for an overview of the basic concepts. [05:28]
ztychr [ztychr!ztychr@gateway/vpn/privateinternetaccess/ztychr] has joined ##java [05:33]
enoq [enoq!~enoq@2a02:8388:6a87:b080:649f:9456:c1b1:28e4] has joined ##java [05:33]
odinsbane maxzor: Did you get it to work? It seems like you can include a --module-path and --add-modules to your java command and get the jar file to execute. [05:43]
maxzor I did not mess further with open java. I downloaded proprietary java. It works ... [05:45]
maxzor odinsbane, thanks for assistance [05:45]
odinsbane release [05:49]
odinsbane odinsbane, what does that even *mean*? [05:49]
mluser-home [mluser-home!~mluser-ho@ip68-0-67-199.tu.ok.cox.net] has joined ##java [05:57]
keepLearning512 [keepLearning512!~keepLearn@106.51.72.155] has joined ##java [06:00]
mluser-home [mluser-home!~mluser-ho@ip68-0-67-199.tu.ok.cox.net] has joined ##java [06:00]
royal_screwup21 [royal_screwup21!89de72f4@gateway/web/cgi-irc/kiwiirc.com/ip.137.222.114.244] has joined ##java [06:07]
ztychr [ztychr!ztychr@gateway/vpn/privateinternetaccess/ztychr] has joined ##java [06:10]
Addax proprietary java? How? [06:16]
ztychr [ztychr!ztychr@gateway/vpn/privateinternetaccess/ztychr] has joined ##java [06:21]
Gugi [Gugi!~Gugi@enp16.neoplus.adsl.tpnet.pl] has joined ##java [06:35]
enoq have people thought about adding something like @Threadsafe which indicates that methods/classes are threadsafe? [06:36]
enoq have to look up the docs everytime I put something into a static [06:36]
yawkat yes, it's called "@ThreadSafe" [06:37]
yawkat javadoc ThreadSafe [06:37]
yawkat I have no documentation for ThreadSafe [06:37]
KeyJoo [KeyJoo!~KeyJoo@83.220.191.16] has joined ##java [06:37]
yawkat bah. [06:37]
yawkat every annotation framework has it. [06:37]
enoq yawkat: there's nothing for the stdlib though right? [06:37]
yawkat correct. there are almost no annotations in the stdlib. [06:37]
rwheadon [rwheadon!~rwheadon@2600:1700:17a0:58ef:c032:e7d5:f5c:80b9] has joined ##java [06:38]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [06:40]
yawkat (also, dont have global state.) [06:41]
immibis enoq: what does threadsafe actually mean? [06:41]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [06:42]
enoq immibis: it's either pure or synchronized in some way [06:42]
immibis which way? [06:43]
yawkat enoq: synchronization does not necessarily imply thread safety [06:43]
enoq yawkat: file local mutable state is fine :) [06:43]
enoq immutable* [06:43]
enoq yawkat: well, there's always IO but that's a different beast [06:44]
immibis public static void f() {synchronized(new Object()) {staticCounter++;}} // look at me, i'm synchronized in some way [06:44]
Addax bwahaha [06:44]
enoq yeah, you can shoot yourself in the foot ofc [06:45]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [06:45]
yawkat enoq: the problem is that thread safety depends very much on use. [06:45]
yawkat i can use a synchronizedlist in a non-thread-safe way. [06:45]
enoq yeah, but that's your code [06:46]
enoq synchronizedlist itself is threadsafe if your code is threadsafe as well [06:46]
yawkat there are certain operations that are safe with other threadsafe lists but not with synchronizedlist, even though it is thread safe. [06:47]
enoq for instance? [06:47]
yawkat iteration. [06:48]
enoq I see, that's kinda dumb [06:48]
royal_screwup21 can you run into deadlocks (with channels) in java? [06:49]
yawkat royal_screwup21: sure, why not [06:49]
enoq in that case the iterator() method is not synchronized is it? [06:49]
royal_screwup21 oh okay, didn't know java had channels...then yeah, I don't think sychronized would protect you from that as well [06:50]
enoq ah nvm [06:50]
Jantz [Jantz!~IceChat9@118-93-23-100.dsl.dyn.ihug.co.nz] has joined ##java [06:51]
enoq isn't an iterator instance generated anew each time you call iterator()? [06:51]
enoq then just synchronize the next() method? [06:52]
enoq or does the keyword break the interface? [06:52]
yawkat it's much more complicated than that. [06:52]
yawkat the api simply cannot ensure a lock is held for the duration of iteration. [06:53]
yawkat it has to be done by the user, or else thread interference will become visible. [06:53]
enoq even if each makes its own iterator() call [06:54]
enoq +thread [06:54]
yawkat yes, thats the point. [06:55]
enoq how come? is there a static iterator instance? [06:55]
enoq or an instance that is kept on the list itself? [06:55]
yawkat no. but they operate on shared data and may alter that data. [06:56]
enoq you mean the backing list? [06:56]
immibis enoq: imagine another thread inserts an item in-between two next() calls and you get a ConcurrentModificationException [06:56]
yawkat yes. [06:56]
Addax the underlying list, yes [06:56]
Addax not really a "backing list" [06:56]
immibis thread 1: list.iterator(), iterator.next() -> item 1. thread 2: list.add(item 2). thread 1: iterator.next() -> ConcurrentModificationException, or incorrect data [06:57]
immibis this problem happens even if the list is "thread-safe" [06:57]
yawkat and importantly, there is no real way to prevent this without significant changes to the backing data structure, or by narrowing the contract of the iterator. [07:00]
yawkat different thread-safe collections take different approaches to this. this is a case where "what is thread safety" depends very much on how the class is used. [07:00]
Addax yawkat: you should have said that first, dummy [07:01]
enoq I see, so tl;dr the synchronized abstraction is too weak [07:01]
immibis a synchronizedList wrapper of a CopyOnWriteArrayList doesn't have this problem, but it does have a new problem that the first thread won't see the new elements the second thread added unless it starts a new iteration! that, and it's just slow [07:01]
enoq and you'd need something like Rust does [07:01]
yawkat yea, you cant just slap synchronized on everything. [07:01]
enoq have* [07:02]
enoq has* [07:02]
yawkat immibis: also, the iterator doesnt support remove. [07:02]
yawkat (you dont actually need the synclist wrapper for COWArrayList, it's "thread safe") [07:02]
immibis i'm guessing that originally the java designers slapped synchronized on everything (e.g. Vector) in the hopes of improving correctness, but eventually people realised that it doesn't actually help with correctness anyway [07:02]
yawkat java was one of the first languages with first-class threading support. it's understandable that they made mistakes :D [07:03]
yawkat hell, actually having a sane memory model is still a distinguishing feature of the jvm. [07:04]
Addax the JVM's lack of popularity, such that it is, among some groups mostly shows those groups' inability to actually gauge what's useful to them [07:07]
Addax the JVM vs PHP? Yeah, for PHP devs the JVM would suck, but that's because PHP really doesn't have structure or lifecycle; the JVM does, so it makes sense that PHP devs wouldn't care for Java, because it doesn't do what THEY do the way they do it [07:08]
enoq Addax: you can write desktop apps in php [07:08]
enoq so not so sure actually [07:08]
Addax but for ruby or python? Python devs who prefer python's integration features are fine, they're using python as a wrapper for libs in C and C++. But for most other features, java kicks python's ass. [07:08]
Addax enoq: doesn't really matter either way [07:08]
Addax the fact that you say that and then walk it back is hilarious (and confirming) [07:09]
Addax (that's nothing against you, it's just indicative) [07:09]
enoq I used to use their built in local dev server [07:09]
enoq php -S ... [07:09]
enoq at some point it just crashed randomly with segfaults [07:10]
enoq because some underlying map was not thread safe [07:10]
Addax I can't tell if you are trying to reinforce my point or diminish it :/ [07:10]
enoq what I'm trying to say: they make it look like you can use it somewhere else but it doesn't really work [07:11]
indistylo [indistylo!~aruns_@106.51.25.10] has joined ##java [07:14]
neiluj [neiluj!~jco@unaffiliated/neiluj] has joined ##java [07:15]
mniip [mniip!mniip@freenode/staff/mniip] has joined ##java [07:17]
puppy_za what doesn't really work? [07:20]
enoq puppy_za: making PHP work in something other than per request [07:21]
puppy_za are we still on synchronized and threadsafe? [07:21]
enoq nope [07:21]
puppy_za oh [07:21]
puppy_za doesn't that belong to #php or something-similar? [07:21]
enoq depends on how deep you go into that topic I guess :P [07:22]
Addax the conversation shifted to include other languages after talking about the JVM's strengths [07:22]
Gugi [Gugi!~Gugi@enk71.neoplus.adsl.tpnet.pl] has joined ##java [07:22]
pioto [pioto!~pioto@unaffiliated/pioto] has joined ##java [07:32]
di0_ [di0_!~di0_@unaffiliated/di0-/x-5053590] has joined ##java [07:35]
skuuter [skuuter!~quassel@80-62-116-23-mobile.dk.customer.tdc.net] has joined ##java [07:36]
keepLearning512 [keepLearning512!~keepLearn@106.51.72.155] has joined ##java [07:45]
davlefou [davlefou!~davlefou@unaffiliated/davlefou] has joined ##java [07:52]
GenericCoffee [GenericCoffee!~GenericCo@cpe.ge-1-3-3-100.kh2nqe30.dk.customer.tdc.net] has joined ##java [07:55]
LearnAllTheTime [LearnAllTheTime!~LearnAllT@2600:1700:e560:21e0:613c:5332:7373:de93] has joined ##java [08:00]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [08:02]
OnceMe [twisti], so how do I create tree like structure? [08:03]
Addax in what [08:03]
[twisti] tutorial [08:03]
[twisti] OnceMe, The Oracle tutorial for Java is probably your best starting point, at https://docs.oracle.com/javase/tutorial . Skip the Netbeans bits. Another option: https://www.ktbyte.com/java-tutorial - https://hackr.io/tutorials/java has a list of others as well. [08:03]
indistylo [indistylo!~aruns_@106.51.25.10] has joined ##java [08:03]
Addax tree structure in... swing? in data structures? fractals? [08:03]
[twisti] OnceMe: we basically gave you the code for it earlier. if you need further hand holding like how to create a class or how to write a for loop, you really ought to work your way to at least the beginner tutorials [08:04]
Addax I guess fractals are data structures too, so... [08:05]
OnceMe [twisti], it's not an issue the syntax, but algorithm [08:06]
[twisti] Addax: he just needs a regular old tree structure in java, to model something that has parents/children [08:06]
[twisti] OnceMe: for now the 4th time: there are no algorithms involved [08:06]
Addax why? treeset/treemap isn't enough? [08:06]
[twisti] Addax: neither of those support a tree structure [08:06]
OnceMe Addax, check this structure https://pastebin.com/DBUv2nDg [08:06]
keepLearning512 [keepLearning512!~keepLearn@106.51.72.155] has joined ##java [08:07]
[twisti] a binary search tree is not the same as a tree data structure [08:07]
Addax guava table> [08:07]
[twisti] guava doesnt have that either [08:07]
[twisti] we went through all of this with him a few hours ago [08:07]
[twisti] he keeps asking for "algorithms" [08:07]
Addax [twisti]: note that tree* data structures are implemented via red/black trees or a variant of [08:07]
OnceMe but there was no possible solution (only create a for loop) when it's not that easy [08:07]
yawkat Addax: it's not appropriate for this problem [08:08]
Addax doesn't know what the problem is, so... okay [08:08]
OnceMe Addax, its in pastebin though [08:13]
Addax What's *the problem* - you have a list of tuples, why not create your structure with a control-break or something [08:14]
yawkat (also known as a "loop") [08:14]
Addax control-breaks aren't loops! ... oh wait, yes they are :) [08:15]
[twisti] OnceMe: you were given basically copy and pasteable code. its super easy to make a tree structure. there are no specific hard problems. there is no magic algorithm. if you cant work out the entire solution, ask with specific problems [08:15]
[twisti] and yes, its really that easy. for loops are all you need for this. [08:15]
Addax or iterators, really, depending on how the list is provided [08:16]
HumanGeek [HumanGeek!~HumanG33k@62.147.242.8] has joined ##java [08:16]
Addax did the fellow trying to pare marvel's superheroes last night ever get his problem defined? [08:16]
OnceMe [twisti], where's the code [08:17]
OnceMe ? [08:17]
[twisti] <[twisti]> tree for, say, String (add generics on your own): class Node { Node root; List<Node> children; String value; } [08:17]
[twisti] then you were asked multiple times what other functionality you needed from your tree, but you just kept repeating method names with no explanations [08:18]
skraito parted the channel: "Leaving" [08:18]
puppy_za maybe he's asking for the class definition. [08:18]
[twisti] i get that this is confusing for someone who never programmed before, but its not helpful to repeat your problem in vague terms. you need to learn to narrow it down to solveable steps that you can get help with [08:19]
Addax puppy_za: in which case he should read the java tutorial [08:19]
Addax and onceme has been in ##java for a long time [08:19]
[twisti] note how now that he has someone again asking him for concrete problems to help with, he once again goes silent [08:20]
[twisti] and in an hour hes going to post "can someone give me a tree" again [08:20]
Addax [twisti]: *shrug* a lot of people are like that, I don't know why [08:20]
rwheadon [rwheadon!~rwheadon@50-206-47-6-static.hfc.comcastbusiness.net] has joined ##java [08:21]
Addax anyway, you have basically given him a tree now, although for his solution I'd probably do class Node(int id; String name; int node_id; Integer parent_node_id; Set<Node> children; } and be done, although why he wants parent_node_id is beyond me [08:23]
ravenousmoose [ravenousmoose!~ravenousm@ptr-cud5aqf5xgz5td05eec.18120a2.ip6.access.telenet.be] has joined ##java [08:24]
_xor [_xor!~xor@50.216.161.66.ded-dsl.fuse.net] has joined ##java [08:26]
gareppa [gareppa!~gareppa@unaffiliated/gareppa] has joined ##java [08:26]
[twisti] Addax: i figured the node ids were only part of the transmission protocol, and not something that was needed once the tree was established, but i also suggested a Map<Integer, Node> for their storage [08:27]
[twisti] but since OnceMe refused to elaborate in any way what he needed the tree for and what he wanted with it, its hard to guess at the best solution [08:28]
keepLearning512 [keepLearning512!~keepLearn@106.51.72.155] has joined ##java [08:28]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [08:28]
Addax sure, so go for the straight-line solution would be my suggestion :) [08:29]
Gugi [Gugi!~Gugi@enk71.neoplus.adsl.tpnet.pl] has joined ##java [08:29]
Addax if he asks again in an hour, well, we'll know not to bother [08:29]
Addax hmm, I wonder if nsdax and onceme are the same person, or working on similar problems [08:35]
yawkat Once_Me has been here for a long time. [08:36]
Addax yeah [08:36]
Addax just both problems sound similar and the response to questions trying to work out what the problems *are* seem similar too [08:36]
[twisti] yawkat: his handling of this problem and his inability to form basic questions had me wonder if it was just a different person with the same nick [08:37]
matsurago [matsurago!~matsurago@240b:10:b3a1:1700:227c:8fff:fe9b:7ad6] has joined ##java [08:37]
[twisti] i dont recognize the name, but a lot of time people get their name from games and shows and books, so others pick the same names [08:37]
Addax onceme has a registered nick, so I think that one's the same [08:38]
[twisti] (when i first started coming here, there was a regular here named SirTwist, and without knowing it, he picked his name from the same source i did) [08:38]
Addax nsdax might be a new one [08:38]
[twisti] ah, weird [08:38]
matsurago good names are difficult to come with! [08:39]
OnceMe [twisti], well it's tree strcuture from existing resultset [08:39]
Addax OnceMe: well, we've solved your structure in multiple ways, so... happy coding [08:40]
Kestrel-029 [Kestrel-029!~Nicmavr@unaffiliated/nicmavr] has joined ##java [08:41]
[twisti] OnceMe: yes, it is. what are you trying to say with that statement ? [08:42]
Ox11de [Ox11de!~Ox11de@95.90.104.72] has joined ##java [08:42]
OnceMe ok let me show you the code than [08:44]
OnceMe it would be easier to explain whats the issue [08:44]
indistylo [indistylo!~aruns_@106.51.25.10] has joined ##java [08:44]
Addax why didn't you lead off with that then [08:44]
plarsen [plarsen!~plarsen@redhat/jboss/pdpc.professional.plarsen] has joined ##java [08:45]
puppy_za It takes years of practices to ask the right question. :p [08:45]
SuperTyp [SuperTyp!~SuperTyp@15.5.3.213.static.wline.lns.sme.cust.swisscom.ch] has joined ##java [08:45]
Addax I'd have to check the logs, but I think OnceMe has been here for years :) [08:46]
Addax IRC turnover is fairly low [08:46]
OnceMe here: https://pastebin.com/Giup0scz [08:49]
OnceMe on the end I'm getting list of items with children: [], so something is not right [08:49]
Addax do you have access to a debugger? [08:50]
OnceMe yap [08:50]
Addax and have you USED it on that code? [08:50]
OnceMe on the last iteration children[] is null [08:50]
OnceMe although, that is just one among issues [08:50]
Addax oh, you moron [08:50]
Addax lines 21, 24 [08:50]
[twisti] oh come on, thats a small overside [08:51]
[twisti] sight* [08:51]
Addax move line 21 to line 24 [08:51]
Addax get rid of line 21 [08:51]
Addax problem solved [08:51]
Addax what did you think you were accomplishing? [08:51]
[twisti] OnceMe: you keep reusing the same tmpHolder. you add it to one node, then clear it and add it to another [08:51]
OnceMe so just to remove line 21? but I will end up with bunch of data in tmpholder [08:51]
OnceMe I need somewhere to clear it [08:52]
yawkat just... make a new one [08:52]
[rg] [[rg]!d8df4f72@gateway/web/freenode/ip.216.223.79.114] has joined ##java [08:52]
[twisti] OnceMe: MOVE line 21 to 24. delete the current line 24 [08:52]
Addax just like I said [08:52]
Addax allocate a new list every time through the loop [08:52]
[rg] good name for a object that connects and handles ports? [08:52]
Anticom [Anticom!~Anticom@ip-178-202-98-139.hsi09.unitymediagroup.de] has joined ##java [08:52]
Addax PortHandler [08:52]
[twisti] PortManager [08:53]
OnceMe oh damn [08:53]
Addax PortThingy [08:53]
[rg] ok, thanks, variable naming is tricky [08:53]
Addax PortConnectorAndHandler [08:53]
Addax Shillelagh [08:53]
Addax Laura [08:53]
puppy_za there is probably a variable name generator online [08:54]
[rg] Laura lol [08:54]
OnceMe ok, seeing some progress now [08:54]
DTZUZO [DTZUZO!~DTZUZO@S0106bcd16584b0aa.vs.shawcable.net] has joined ##java [08:55]
OnceMe however another issue is that item with parentNodeId null have children null, which according to the table should not be the case [08:55]
OnceMe should I do some sort, check or something? [08:55]
Addax well, are you ever chasing the parent id? [08:55]
OnceMe well logic is in 26th line for this [08:56]
OnceMe so I end up with item with parent node id null, to have 0 children, which is not good [08:56]
OnceMe and I end up with duplicate item elements in children array as well [08:57]
Addax sighs [08:57]
Addax you know, what you should do is create a github project with all this including your data source, and dangle money in front of people to fix it for you [08:57]
Addax you said you had a debugger but ... do you know how to use it? [08:58]
Addax Have you considered seeing what your code is doing and where it's failing? [08:58]
OnceMe it's not about debugger, its about algorithm [08:58]
Addax there is no algorithm here [08:58]
[rg] java's command line debugger sucks [08:58]
Addax you're doing brute force loads [08:58]
OnceMe indeed, which I want to avoid [08:58]
Addax [rg]: jdb does, yes, nobody should use that crap [08:58]
Addax OnceMe: there's no way to avoid it, unless you're using a database (which would do all this for you) [08:59]
puppy_za eclipse and netbeans are free [08:59]
OnceMe [twisti], there is a brute force word, from Addax [08:59]
Addax OnceMe: how is brute force failing you? [08:59]
OnceMe Addax, I would be able to do this via sql query? [08:59]
Addax aaaand now we're back to confirming identity with the person from around midnight [08:59]
OnceMe its possible to return nested children array? [08:59]
Addax OnceMe: you'd be able to load the data, sure [08:59]
OnceMe from the resultset I got? [08:59]
matsurago Addax: there are more essential problems with that code, no? Like the loop is never executed [08:59]
Addax it's a simple database [08:59]
Addax matsurago: I don't have enough code to run it, and honestly, I'm still not sure what my motivation here is [09:00]
matsurago Addax: because he iterates on a new (empty) list [09:00]
Addax so I'm barely scanning the code [09:00]
matsurago List<ItemDTO> itemDTOS = new ArrayList<>(); [09:00]
Addax bwahaha [09:00]
matsurago and then: for (ItemDTO itemDTO : itemDTOS) [09:00]
Addax well, his debugger should have shown him all of this [09:00]
Addax even jdb would have [09:00]
OnceMe I removed the part where I populate it with data from sql [09:01]
OnceMe since it was not relevant for the code [09:01]
Addax It's... already in sql? [09:01]
Addax Then you're done [09:01]
OnceMe it is dude [09:02]
OnceMe but have you looked at pastebin? [09:02]
OnceMe I mean, I'm repeating myself [09:02]
Addax and stop removing shit that YOU think is unnecessary, you clearly don't know what you're doing or how to evaluate [09:02]
Addax OnceMe: Maybe you are, but I've also said multiple times that I don't know what the actual problem you're trying to solve is, so I haven't seen you say anything that matches what I'm asking for [09:02]
OnceMe see line 15 [09:03]
dob1 [dob1!~dob1@unaffiliated/dob1] has joined ##java [09:03]
Addax right, okay, so ... build a recursive data structure, a tree. You can even use the code I gave you earlier for it, although you'd want to ignore parent_node_id [09:03]
OnceMe and see line 3 (table), so I have a query with WITH (recursion) which I wrote and it works, however it outputs resultset as table, now I want to turn that table in 15th line format, thats all [09:04]
indistylo [indistylo!~aruns_@106.51.25.10] has joined ##java [09:04]
Addax sure, I gave you a class that would work for that [09:04]
OnceMe can you link it, I think Ive missed it [09:04]
[twisti] im out, i cant afford to yell angry curses anymore [09:04]
indistylo [indistylo!~aruns_@106.51.25.10] has joined ##java [09:04]
SuperTyp [SuperTyp!~SuperTyp@15.5.3.213.static.wline.lns.sme.cust.swisscom.ch] has joined ##java [09:05]
OnceMe I though brute force would be easy to fix this, but I was wrong :D [09:05]
Addax https://javabot.evanchooly.com/logs/%23%23java/2019-05-15#5cdc04b20a975a1bbba93026 [09:06]
dob1 hi, why ~1 gives me -2 ? it's related to the sign bit? [09:06]
Addax It will be fine to fix it, as long as you write the code correctly [09:06]
OnceMe I have a structure like that yes [09:06]
Addax so... use it [09:07]
OnceMe it's ItemDTO [09:07]
OnceMe I did, check my code [09:07]
Addax Why don't YOU check your code, we keep pointing out various flaws with it that a debugger would show [09:07]
Addax notes idly that he has a few cycles he's willing to sell [09:07]
OnceMe which flaws? [09:09]
Addax boggles [09:09]
puppy_za come to think of this, I think I have done a coding interview question similar to OnceMe's question [09:09]
Addax okay, the price just went way up [09:09]
puppy_za lol [09:09]
Addax puppy_za: I'm becoming increasingly convinced that this is the same person asking about a superhero social graph around 10 hours ago [09:09]
Addax maybe not, because that person said "it works now help me fix it" and not "it doesn't work" but... [09:10]
puppy_za the point of the exercise was to build a tree object using the data table. [09:10]
OnceMe ? [09:10]
Addax puppy_za: and you sneered and refused, yeah? [09:10]
OnceMe puppy_za, do you have an algorithm for it? [09:10]
puppy_za well it's for a job interview so I of course did it [09:11]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [09:11]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [09:11]
puppy_za well, I used a map so it's not the way you are looking to do or learn :p [09:11]
Addax puppy_za: I assume you didn't get it, then [09:12]
puppy_za nope [09:12]
OnceMe here is algorithm https://stackoverflow.com/questions/18017869/build-tree-array-from-flat-array-in-javascript [09:12]
OnceMe Ill use this, might help [09:12]
Addax you should have sneered and refused :/ [09:12]
Addax ... of course, that assumes you WANTED the job once they asked that [09:13]
puppy_za I tried to treat my potential employer with a bit respect [09:13]
Addax even when they don't do the same? [09:13]
raztoki [raztoki!~a0sle@unaffiliated/a0sle] has joined ##java [09:13]
puppy_za I did it as an exercise. But then I found out about HackerRank [09:14]
dob1 in pratice what I have to do is ~1 & 1 [09:14]
Addax I might have done it as an exercise, too, actually, but I'd still have been amused and decided that wasn't the position for me, and been open about that [09:15]
puppy_za my last job was doing Ruby & Rails [09:15]
puppy_za for years [09:15]
matsurago not the worst choice [09:15]
puppy_za but now I come back to Java [09:16]
Addax hmm [09:16]
LaSombra Not the worst choice as well [09:16]
Addax I guess maybe if the interview were "how would you *explain* how to do this..." it might not have been insulting [09:16]
indistylo [indistylo!~aruns_@106.51.25.10] has joined ##java [09:17]
OnceMe this is flat array to tree like structure problem [09:18]
Addax yeah, trivial to do [09:18]
Addax I should ask my oldest son to do it, see if he bothers - it'd be funny if he did [09:18]
OnceMe yeah sure [09:18]
puppy_za I encountered many companies simply ask for a coding test before even give an interview [09:19]
Addax OnceMe: it is quite trivial [09:19]
Addax puppy_za: companies that ask ME for a coding test are doing it wrong and generally know it [09:19]
matsurago I wouldn't say it's trivial... may be the tree needs balancing? [09:19]
Addax matsurago: *sigh* [09:19]
Addax matsurago: you're doing fine, don't wreck it [09:19]
OnceMe children does not always come after parent though :D [09:19]
OnceMe children can be before parent in array list, so thats shit too [09:20]
Addax sighs. That's not "shit." That's easy to fix. [09:20]
Addax really easy to fix. [09:20]
Addax *superduper* easy to fix. [09:20]
Addax You have the entire data in memory? Well, SCAN FOR THE PARENT NODE IN THE DATASET if it's not already in the tree. And then put it in the tree. [09:21]
Addax Rocket surgery this is not. [09:21]
Addax If you don't have the entire dataset in memory? Well, scan it in the database then, dumbass. Same concept. [09:21]
GivenToCode [GivenToCode!~GivenToCo@ext.mathworks.com] has joined ##java [09:21]
indistylo [indistylo!~aruns_@106.51.25.10] has joined ##java [09:22]
whaley [whaley!~whaley@192.133.78.17] has joined ##java [09:22]
Addax matsurago: to be specific, his tree structure is based on parent/child relationships. The only "balancing" that would occur would happen if the topmost node needed to change (as was just described, actually). But that's ... trivial. It's also kinda unfortunate to assume requirements not in evidence. [09:23]
OnceMe why dont you write pseudo code, if it's all so trivial for your brain? [09:23]
Addax Sure! How much are you paying me? [09:23]
OnceMe certainty it wouldnt take you more than one minute to write it down [09:24]
Addax I mean, I'll give you a *working* project. [09:24]
matsurago Addax: I didn't see the beginning of this discussion :) I was rather thinking that in general tree-related problems may not be that easy [09:24]
OnceMe did I asked for a working project? I gave you a code, you jut said it's easy [09:24]
OnceMe if it's easy it should be free of charge, no? [09:24]
Addax OnceMe: no. [09:24]
OnceMe I mean this is social discussion, not programmers discussion, so I'm cutting it off [09:24]
dmlloyd I do easy stuff all the time, but I still get paid [09:25]
OnceMe just letting you know that you are wrong, but won't admit it, that this is not trivial [09:25]
[twisti] but its really, really trivial [09:25]
OnceMe pseudo code? [09:25]
[twisti] you have yet to explain any single aspect of it you find hard [09:25]
dmlloyd nobody really has anything to prove to you AFAICT [09:25]
[twisti] im honestly curious whether you can program at all [09:25]
[twisti] or just copy and paste code from tutorials [09:26]
OnceMe prove? I said it's not trivial [09:26]
puppy_za this is getting out of hand quickly [09:26]
[twisti] you literally posted a link with working code [09:26]
[twisti] dude im not 13, you cant trick me into doing your work by saying "i bet you cant do it" [09:26]
Kestrel-029 [Kestrel-029!~Nicmavr@unaffiliated/nicmavr] has joined ##java [09:26]
Bombe Finally some entertainment! [09:26]
Bombe I?ve been sitting in the office all day, bored out of my mind! [09:26]
SuperTyp [SuperTyp!~SuperTyp@15.5.3.213.static.wline.lns.sme.cust.swisscom.ch] has joined ##java [09:27]
OnceMe [twisti], you said "what bruteforce", hour ago, Addax said you are using brutefoce and you can solve it with [09:27]
Addax yeah, this is social manipulation [09:28]
Addax he has a debugger, he has code, he can do his own homework [09:28]
OnceMe no, this is channel manipulation [09:28]
sbalmos close enough [09:28]
OnceMe [twisti], agrees with whatever you say, since you control the channel [09:28]
sbalmos we sometime delude ourselves into thinking this channel is social [09:28]
Addax who controls the channel? It ain't me [09:28]
OnceMe parted the channel: "Leaving" [09:28]
Addax I don't think it's twisti [09:28]
sbalmos next [09:28]
sbalmos Another satisfied customer. Next! [09:28]
Addax awwww you scared him off, dmlloyd [09:29]
Bombe Haha, what a coward. [09:29]
dmlloyd shrugs [09:29]
matsurago But it means he experienced this before. [09:29]
Addax I was curious to find out who ran the channel :) [09:29]
[twisti] matsurago: gee i wonder why [09:29]
sbalmos Addax: None of us know either [09:30]
puppy_za mmm, I was about to suggest him to find a tutor [09:30]
puppy_za but anyway [09:30]
OnceMe [OnceMe!~OnceMe@unaffiliated/onceme] has joined ##java [09:30]
[twisti] Addax is right, hes been here for years [09:30]
Addax puppy_za: I offered to help him for money [09:30]
OnceMe sorry, changed the network [09:30]
Addax OnceMe: oooo you're back! I wanted to find out who ran the channel [09:30]
puppy_za I mean, in real world :p [09:31]
matsurago A proxied one I think? [09:31]
matsurago (just in case) [09:31]
LSCody [LSCody!~textual@pool-96-246-175-233.nycmny.fios.verizon.net] has joined ##java [09:31]
puppy_za OnceMe: you should find yourself a tutor who can sit down with you and go through the code [09:31]
Addax puppy_za: yeah... actually, I probably couldn't tutor him, because I wouldn't have a measurable to work with [09:31]
Addax it'd never stop [09:31]
OnceMe anyway, I think this algorithm on stackoverflow would work, will try it soon :) [09:34]
OnceMe tnx all for help [09:34]
puppy_za good luck [09:35]
OnceMe ty [09:36]
sbalmos ah yes, StOve, the font of knowledge from hence overfloweth all inspiration and solutions... [09:36]
Addax I especially like how the source material uses a nested data structure to convert to a nested data structure :) [09:37]
sbalmos Addax: Nests are comfy! Especially if you line them with fuzzy fur [09:37]
OnceMe cya later :0 [09:38]
OnceMe 0 [09:38]
OnceMe ) [09:38]
puppy_za that reminds me... is he a PHP developer? [09:38]
sbalmos those two words are oil and water [09:38]
skraito [skraito!~ypatra@unaffiliated/ypatra] has joined ##java [09:39]
[twisti] he seems to not be afraid of the javascript code, so maybe thats where he hails from [09:39]
Addax speaking of... why is justice best served cold? Because otherwise it's justwater [09:39]
[twisti] but i find it hard to believe he in any capacity actually WORKS as a programmer [09:39]
sbalmos Addax: that... wow... I'm going to have to pass that one on [09:39]
skraito parted the channel: "Leaving" [09:39]
puppy_za lol [09:39]
puppy_za finally a good punchline [09:39]
Addax sbalmos: how do you think the unthinkable? ... with an itheberg. [09:40]
[twisti] just because its a pun doesnt mean it has a pun-chline [09:40]
sbalmos Addax: Not as good. ;) [09:40]
Addax you are a cretin and probably work for cisco or oracle or ibm or some creepy company like that. [09:42]
rajumoh [rajumoh!~rajumoh@180.151.197.91] has joined ##java [09:46]
sbalmos ( [09:46]
jamezp [jamezp!~jamezp@redhat/jboss/jamezp] has joined ##java [09:47]
Addax I also like "time flies like an arrow but fruit flies like a banana" [09:47]
whaley [whaley!~whaley@192.133.78.17] has joined ##java [09:48]
rajumoh if child classes have always call parent constructor(explicit or implicit), does this mean that when the child object is created, it is somehow a combination of 2 objects, the parent and itself ? [09:48]
rajumoh *to call [09:49]
Addax how are you defining a "child class" [09:49]
rajumoh child class extends parent class [09:49]
Addax okay, child is ALWAYS the combination of the two structures (one's a superset of the other), regardless of constructors [09:49]
ron your child maybe [09:50]
Addax well, a human child isn't a child class, it's more like an imprecise combination of parent codes [09:51]
Addax but a *class* that has another as a superclass is a superset of the superclass [09:51]
ron your class maybe [09:52]
acidjnk [acidjnk!~acid@i577BCAAD.versanet.de] has joined ##java [09:52]
Addax oh, shush! [09:52]
matsurago Real children exhibit multiple inheritance though [09:52]
henbruas [henbruas!~henbruas@unaffiliated/henbruas] has joined ##java [09:54]
puppy_za yeah tell that to James Gosling :p [09:55]
qouwse [qouwse!~qouwse@bb115-66-191-210.singnet.com.sg] has joined ##java [09:55]
Addax I wonder what Gosling's interviews are like [09:55]
Addax "So, Mr. Gossig, you say you know java. Well, show us. Write a tree structure! In Java!" [09:56]
puppy_za I wonder where he is now [09:57]
Addax AWS, yeah? [09:57]
matsurago he has two children [09:57]
puppy_za did you just google him? [09:57]
Addax puppy_za: I could have, but ... [09:58]
matsurago yes, shame to me I didn't know the father of Java [09:58]
Zarthus i've never had someone "popular" apply at our workplace. Do you even interview them or give them a straight pass? [09:59]
Zarthus i imagine just the culture fit, right? [09:59]
Addax you'd probably interview for the culture fit [10:00]
Addax but anything else would be insulting, if you don't know already they're the wrong hire [10:00]
Zarthus exactly [10:00]
SuperTyp [SuperTyp!~SuperTyp@15.5.3.213.static.wline.lns.sme.cust.swisscom.ch] has joined ##java [10:01]
greggerz [greggerz!~greggerz@unaffiliated/greggerz] has joined ##java [10:02]
mindCrime_ [mindCrime_!~mindCrime@216.85.170.148] has joined ##java [10:04]
[rg] father of java is oak? [10:06]
metascion [metascion!~metascion@185.254.68.92] has joined ##java [10:06]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [10:06]
Addax java's original name was oak [10:06]
[rg] ok [10:06]
[rg] remebered that from somewhere :P [10:06]
[rg] what does culture fit even mean? [10:07]
rajumoh it does not mean anything, that is the whole point [10:09]
t2mkn [t2mkn!~t2mkn@43.226.3.198] has joined ##java [10:09]
Addax "Does this person help us run more smoothly?" [10:09]
Addax It means a ton [10:09]
Addax if you have technical knowledge but you're an abrasive asshat to everyone who talks to you - and you're in a position where you need to be talking to people - that's a concern [10:09]
Addax it depends on your role, of course [10:10]
Addax but industry leaders would be expected to be mentors [10:10]
Addax you can see that sort of dynamic even here in ##java [10:11]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [10:11]
indistylo [indistylo!~aruns_@106.51.25.10] has joined ##java [10:13]
sbalmos Addax: I prefer to be an abrasive asshat to those who I think should've known already by their own initiative. ;) [10:18]
Addax well, sometimes that's called for [10:18]
Addax "look, you're not measuring up: why? Have you considered trying it?" [10:19]
Addax "It's neat to be competent!" [10:19]
deebo culture fit means you can work 80h per week on 40h worth of salary [10:20]
briian lol deebo [10:21]
Squarism is there some good way of debugging the servlet chain? Like can you get some clear view of how the filtering is dont? [10:22]
indistylo [indistylo!~aruns_@106.51.25.10] has joined ##java [10:23]
ron you mean... debugging? [10:23]
freeone3000 Squarism: It's done in the order defined in web.xml. If you're using annotation-order configuration, it's done in an arbitrary ordering. If order matters, specify. (there's no non-xml way of doing this) [10:25]
[rg] Addax: would take a nice guy over an asshat genius? [10:25]
[rg] just curious [10:25]
Squarism freeone3000, i know that. But somehow resteasy is handling "/" even if there is no trace of resteasy in web.xml [10:26]
mohsen_1 [mohsen_1!uid289573@gateway/web/irccloud.com/x-ydabguxduuklmrsy] has joined ##java [10:28]
Anticom [Anticom!~Anticom@ip-178-202-98-139.hsi09.unitymediagroup.de] has joined ##java [10:28]
sbalmos Let me guess, Spring Security OAuth [10:28]
Squarism sbalmos, we use spring security but not OAuth [10:31]
Squarism sbalmos, is that some common error? [10:32]
sbalmos SS OAuth implicitly adds a / binding to handle /oauth [10:32]
Squarism i guess you need to add a separate dependency to get oauth and that we havent done [10:33]
freeone3000 sbalmos: why doesn't it add a /oauth binding to handle oauth? [10:34]
sbalmos no idea [10:34]
MarkyC [MarkyC!~MarkyC@toroon4512w-lp130-01-70-31-68-179.dsl.bell.ca] has joined ##java [10:35]
indistylo [indistylo!~aruns_@106.51.25.10] has joined ##java [10:35]
freeone3000 Squarism: right, so annotation-based configuration will allow you to add things to web application configuration simply by putting them on the classpath... [10:35]
freeone3000 which is the equivilant of: if there's something with @ServletFilter("/") on the classpath, it's going to be used if you want it to be or not. [10:36]
Squarism Yeah, so i how can i find what stuff is configured and for what? [10:36]
t2mkn [t2mkn!~t2mkn@43.226.3.198] has joined ##java [10:38]
indistylo [indistylo!~aruns_@106.51.25.10] has joined ##java [10:40]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [10:41]
Addax [rg]: depends. A genius should be able to master "being nice." [10:43]
Addax If they're a good coder but can't manage social interactions, they're no genius. [10:43]
Squarism ok, so i found a damn resteasy servler that is annotated with @WebServlet, namely ; HttpServlet30Dispatcher [10:43]
Squarism So is this just added wo any scanning of sorts? [10:44]
noodlepie [noodlepie!~phillip@77.44.49.73] has joined ##java [10:45]
Addax it's scanned [10:46]
noodlepie [noodlepie!~phillip@77.44.49.73] has joined ##java [10:47]
Squarism using spring scanning or something else? [10:49]
Addax probably servlet container [10:50]
Addax servlets can use @WebServlet without spring, after all [10:50]
ron no... [10:52]
Squarism it seems the servlet container scans all classes on classpath [10:52]
Squarism no? [10:52]
[rg] Addax: of course that's true, but I hear this complaint a lot of the web so I wonder what could a coworker possibly do to me... [10:53]
dob1 parted the channel: "Leaving" [10:53]
Addax Squarism: it has to on app deployment, when certain conditions are present [10:53]
Squarism idk, but the model of scanning stuff is more and more looking like one big antipattern [10:55]
rippa [rippa!~rippa@ppp-vpdn-37.1.85.157.yarnet.ru] has joined ##java [10:56]
Addax shrugs [10:56]
Addax how so? [10:56]
Squarism People lose control of how things are instantiated / configured. [10:58]
Addax and bitch incessantly when they have the ability to declaratively configure things. [10:59]
Addax shrugs. Pick one: <servlet /> or @WebServlet [10:59]
Addax both work [10:59]
freeone3000 Yes, I think that's actually the problem. [10:59]
Addax Which is? [11:00]
RedSoxFan07 [RedSoxFan07!~Thunderbi@d-137-103-109-45.ct.cpe.atlanticbb.net] has joined ##java [11:00]
freeone3000 The classpath scanning mechanisms don't reveal a view of what they've discovered. [11:00]
Addax yeah, well, they're supposed to WORK :) [11:00]
freeone3000 Yes! And they do! But it's the SPI problem: What am I actually using? [11:00]
freeone3000 There doesn't have to be a single static answer, but the JVM SPI stuff expose an MXBean with a list here for a reason, so at least JVMTI can hook in. That's not part of the JarkataEE spec, though, so it's not discoverable the same way for Servlet3.0 annotations. [11:01]
Squarism How is the scanned servlet order determined? We found this because our "welcome-files" stopped working [11:06]
keepLearning512 [keepLearning512!~keepLearn@106.51.72.155] has joined ##java [11:06]
freeone3000 Squarism: Arbitrary [11:07]
Squarism ok, lol [11:07]
freeone3000 You can specify it in web.xml which will be treated as the correct order, and you can refer servlets that only exist as annotations as part of the <servlet-map> tag. [11:08]
mr_lou [mr_lou!~misthalos@077213097222.dynamic.telenor.dk] has joined ##java [11:11]
Kestrel-029 [Kestrel-029!~Nicmavr@unaffiliated/nicmavr] has joined ##java [11:11]
Squarism Thanks for your insight! [11:12]
Squarism This costed 2 persons 4 hours each [11:13]
Addax small cost then [11:13]
Addax you got lucky [11:13]
Squarism id say it was big for something quite simple. Im logging on INFO level and there was no mention of this scanning taking place. Atleast none that i saw [11:15]
Addax it's always an outsized cost when you look with hindsight [11:15]
mohsen_1 I have a grizzly http server that listens on some endpoints, in some of these endpoints, two volatile static fields in the SwitchState class get updated, in one endpoint these fields are fetched [11:17]
mohsen_1 any downsides on this approach? [11:17]
jadesoturi [jadesoturi!~jadesotur@unaffiliated/kfj] has joined ##java [11:20]
mohsen_1 any technical issue? [11:20]
freeone3000 It's kinda sketch and I'm wondering what you're doing with this, and whether you really should be using either a separate memory database or something else. It seems to link bits of application state to the currently running server, which is something I don't really like. Without any further details, I would advise against it based on personal prejudice in working with at-scale distributed systems [11:24]
freeone3000 If you are not, in fact, doing one of those, and it needs to run on a rented server until the end of time with minimal changes, it's probably fine if it works? [11:25]
tang^ [tang^!~tang^@207.229.38.10] has joined ##java [11:25]
sonOfRa [sonOfRa!sonOfRa@unaffiliated/sonofra] has joined ##java [11:26]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [11:26]
upgrdman [upgrdman!~upgrdman@blender/artist/upgrdman] has joined ##java [11:28]
mohsen_1 freeone3000: its a simple with two values as state, its never gonna change by time, and it appears to be working [11:28]
mohsen_1 simple app* [11:29]
Squarism servlet-api 2.x and 3.x has different maven group-id. Is i meant that you could have both on the classpath? [11:31]
led_dark_1 [led_dark_1!~Thunderbi@217.66.160.14] has joined ##java [11:31]
jadesoturi [jadesoturi!~jadesotur@unaffiliated/kfj] has joined ##java [11:31]
Squarism classes seems to overlap [11:31]
Hanii [Hanii!~Hanii@2a00:23c5:c587:a800:810c:f194:e49d:20d4] has joined ##java [11:31]
mohsen_1 This could have been the answer to my question a few days ago [11:32]
Addax yes, the java ee groups keep changing [11:32]
Addax they're likely to change again [11:32]
whaley so enterprise ready [11:32]
indistylo [indistylo!~aruns_@106.51.25.10] has joined ##java [11:47]
Jenetrix [Jenetrix!Jen@2600:3c01::f03c:91ff:fe6c:d27a] has joined ##java [11:51]
LKoen [LKoen!~LKoen@2a01cb0407597a005da9e3fa5c044cbf.ipv6.abo.wanadoo.fr] has joined ##java [11:51]
impermanence [impermanence!c01c0123@gateway/web/cgi-irc/kiwiirc.com/ip.192.28.1.35] has joined ##java [11:52]
altious [altious!~altious@209.133.3.83] has joined ##java [11:53]
impermanence does an openjdk rpm bounce tomcat when an update is performed? [11:53]
impermanence meaning if I update my openjdk rpm will that likely bounce tomcat? the rpm that is... [11:53]
Addax you'd have to check the tomcat installation for that [11:53]
impermanence Addax: k [11:53]
indistylo [indistylo!~aruns_@106.51.25.10] has joined ##java [11:54]
zjett [zjett!~zjett@75.76.93.253] has joined ##java [11:55]
impermanence it did not bounce tomcat [11:56]
Addax this does not surprise me [11:58]
paddyez [paddyez!~paddyez@wikipedia/paddyez] has joined ##java [11:59]
impermanence nor me after having done it now :) [12:00]
srisri [srisri!~srisri@204.14.239.17] has joined ##java [12:06]
indistylo [indistylo!~aruns_@106.51.25.10] has joined ##java [12:17]
Scarecr0w parted the channel: [12:18]
ogradyd [ogradyd!~Thunderbi@2a02:8070:88bf:9df0:80d2:20d9:8517:b9d6] has joined ##java [12:18]
Ben_1 [Ben_1!~ben@2001:1438:4010:702:f68e:edde:1fc3:6546] has joined ##java [12:18]
Ben_1 hi [12:18]
Ben_1 trying to change my jdk version in linux [12:18]
Addax cool! [12:18]
Ben_1 used 'update-alternatives --config java' [12:18]
Ben_1 but for any reason it is still openjdk8 and not openjdk11 [12:19]
Addax check your $PATH [12:19]
conan [conan!~conan@148.252.129.77] has joined ##java [12:19]
Ben_1 $PATH makes it much more complicated. In update-alternatives Java11 is selected. 'Java -version' returns Java 8 and in $PATH I have Java12 [12:20]
Ben_1 the fuck [12:20]
Ben_1 this inconsistency triggers me [12:20]
Addax well, be a linux person and chase it [12:20]
Ben_1 lol [12:21]
Ben_1 Addax: I'm trying to [12:21]
cheeser enter [12:21]
cheeser Ben_1, Enter is not punctuation. Please don't press your Enter or Return key until you're finished typing your question, sentence, or idea. It is annoying to see that and hard to follow. [12:21]
freeone3000 update-alternatives make it more complicated. $PATH is how it's meant to be done. [12:22]
briian i saw some really god awful enter punctuation a couple months ago [12:22]
mitch0 dammit xz is slooow :\ [12:23]
Ben_1 ok fixed it, removed the package java-latest-openjdk [12:23]
Ben_1 seems this package messed something up :) [12:24]
cheeser this is why we don't do tech support here. [12:25]
Kestrel-029 [Kestrel-029!~Nicmavr@unaffiliated/nicmavr] has joined ##java [12:26]
LSCody [LSCody!~textual@pool-96-246-175-233.nycmny.fios.verizon.net] has joined ##java [12:26]
Gugi [Gugi!~Gugi@enk71.neoplus.adsl.tpnet.pl] has joined ##java [12:30]
pepa [pepa!~androirc@host198.200-123-99.static.telmex.net.ar] has joined ##java [12:38]
pepa In lambda expressions [12:38]
pepa How do you know which method you are trying to create/invoke? [12:39]
pepa Because you are only passing the parameters [12:40]
Addax errr.... [12:40]
cheeser enter [12:40]
cheeser pepa, Enter is not punctuation. Please don't press your Enter or Return key until you're finished typing your question, sentence, or idea. It is annoying to see that and hard to follow. [12:40]
Addax you're evaluating THE EXPRESSION [12:40]
yawkat pfm [12:40]
yawkat pure fucking magic [12:40]
cheeser there's only one method on a lambda. [12:40]
cheeser and it's what Addax just said [12:40]
pepa A lambda is like an annonymous class [12:40]
Addax with one method [12:40]
Addax (foo) -> { foo.thing() } // the block. That's the lambda. That's the expression. [12:41]
pepa So that class will always have just one method? [12:41]
Addax sam [12:41]
Addax Addax, sam is "Single Abstract Method", and is the core concept behind lambdas in Java 8; the idea is that any interface with one abstract method can be automatically implemented by any lambda - or method reference - whose method signature is a match for the one method on the (functional) interface. For a more in depth explanation, refer to http://stackoverflow.com/a/22561853/1093528 [12:41]
pepa Madafaka!!! [12:41]
pepa So it always has just one method [12:42]
cheeser that sounds familiar... [12:42]
Zarthus what made you think otherwise? [12:42]
Addax how would you declare more than one? [12:42]
pepa I don't know dude [12:42]
cheeser in general you don't think of lambdas as having functions. you think of them as expressions that get evaluated. [12:42]
Addax nobody does [12:43]
[twisti] pepa: you can have more than one method through interface default methods. but you can only have one "lambda" method [12:43]
cheeser [twisti]: lambdas can't implement interfaces. [12:43]
[twisti] really ? my bad then [12:43]
pepa So the idea of lambdas was to create a method there while in the hot boiling water of another method? [12:44]
Addax sort of [12:44]
cheeser sighs [12:44]
funeral [funeral!~Funeral@2a01:79d:3e82:4b8c:a393:7879:435f:9c81] has joined ##java [12:44]
Addax lambdas [12:44]
Addax Addax, lambdas is http://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html [12:44]
cheeser it was to allow passing around executable blocks of code. it has 0 to do with methods. [12:44]
Addax it's actually a class, used like an expression [12:44]
pepa Yes of course [12:44]
Addax the underlying implementation is not especially concerning until you get into the weeds with it [12:45]
pepa Who said weed? [12:45]
kicked pepa (pepa) [12:45]
cheeser enough of the inane [12:45]
ravenousmoose [ravenousmoose!~ravenousm@ptr-cud5aqf5xgz5td05eec.18120a2.ip6.access.telenet.be] has joined ##java [12:46]
[twisti] cheeser: you are wrong or we miscommunicated [12:47]
cheeser [twisti]: it's possible *both* of those statements are true. [12:47]
[twisti] https://ideone.com/fRssnk [12:48]
pepa [pepa!~androirc@host198.200-123-99.static.telmex.net.ar] has joined ##java [12:48]
Barabacha [Barabacha!~Barabacha@d223-60.icpnet.pl] has joined ##java [12:48]
[twisti] ^ implementing an interface with a lambda that has a default method [12:48]
Addax we know java, thanks [12:48]
pepa So if I want to create a Thread.UncaughtExceptionHandler on the fly [12:49]
pepa I cannot use a lambadurcious there... [12:49]
[twisti] why not [12:49]
cheeser [twisti]: welcome to SAM. that's a compiler thing. the lambda itself cannot be declared to implement an interface. [12:50]
cheeser in this case, the compiler is allowing the assignment due to SAM semantics. it's akin to ruby's ducktyping. [12:50]
Addax cheeser ++ [12:50]
Addax cheeser has a karma level of 1,496, Addax [12:50]
pepa Because UncaughtExceptionHandler has many methods [12:50]
[twisti] cheeser: i dont really understand what you mean by that expression, but from how you responded to me, it sounded like you were disputing that an interface could have default methods and be used for a lambda [12:51]
freeone3000 pepa: https://docs.oracle.com/javase/7/docs/api/java/lang/Thread.UncaughtExceptionHandler.html no it doesn't. [12:51]
cheeser [twisti]: oh, god no. [12:51]
cheeser that's clearly mental. :) [12:51]
Addax oh come on, we're all on the same team here, get along like the morons you are [12:52]
cheeser Object bob = () -> { ... } implements Autoclosable; [12:52]
[twisti] pepa: like freeone3000 said, that interface only has one method. you are welcome to implement it as a lambda. [12:52]
cheeser lambda can't declare the interface. it's just an expression. like trying to have a function extend an interface. just makes no sense. [12:52]
cheeser chewbacca rests. [12:52]
[twisti] cheeser: oh, yeah, i wasnt debating that [12:52]
pepa Madafaka!!! [12:52]
cheeser [twisti]: oh, good. i always thought you were smarter than that. :) [12:53]
pepa UncaughtExceptionHandler has one method [12:53]
yawkat no shit [12:53]
pepa So I guess it could be used in a lambadurcious [12:53]
[twisti] thats literally what i just said [12:53]
Addax pepa: be less stupid, thanks [12:53]
freeone3000 what in the world is a lambadurcious [12:54]
Addax freeone3000: proof [12:54]
pepa The original name mr sun thought for lambda [12:54]
Addax it is not [12:54]
pepa But it was too long [12:54]
Addax it's actually proof you're a moron [12:54]
cheeser none of that made sense. please make sense or make an exit. [12:54]
cheeser next [12:56]
cheeser Another satisfied customer. Next! [12:56]
sbalmos borderline ~stupid [12:56]
Addax from which direction? I'm voting for "far side of stupid" [12:56]
sbalmos borders are meant to be redrawn as convenient [12:57]
Teckla Inside of a static method, is there a way to access the Class object to which the method belongs? For example, in a static method on Foo.java, rather than having to use Foo.class, is there something generic available that refers to Foo.class? [12:59]
cheeser getClass() ? [12:59]
cheeser but that's only available on instances [12:59]
Ben_1 parted the channel: [01:00]
noodlepie [noodlepie!~phillip@77.44.49.73] has joined ##java [01:00]
Teckla cheeser: So... the answer is "no," then? :) [01:01]
cheeser depends on what exactly you want but probably :D [01:01]
Teckla Heh, okay, thanks! [01:01]
Teckla Yeah, if it were an instance method, I could just use getClass(). That would be convenient. :) [01:01]
Diablo-D3 just stares at his laptop [01:01]
cheeser it's a synthetic field so you can refer to it unqualified like you would a declared field. [01:02]
Teckla Alas, it's a static method. [01:02]
cheeser nods. [01:02]
Diablo-D3 replaced the paste, very obviously baked out, turned to white crusty shit [01:02]
Diablo-D3 instead of maxing out above 90c, its just a bit above 80c. [01:02]
kicked Diablo-D3 (Diablo-D3) [01:02]
Diablo-D3 [Diablo-D3!foobar@exelion.net] has joined ##java [01:02]
[twisti] Diablo-D3: wrong window ? [01:02]
cheeser "yes" [01:02]
Diablo-D3 wrong tab, but now you all get to share my pain anyways [01:03]
tang^ sniffing paste? [01:03]
Diablo-D3 naw, sniffing the articlean heatsink cleaner [01:04]
Diablo-D3 its like jamming an orange up your nose [01:05]
led1 [led1!~Thunderbi@217.66.160.14] has joined ##java [01:05]
[rg] do you think java should remove primatives and just used objects for everything? [01:08]
yawkat a little late for that. [01:08]
[rg] doing menial tasks so a little bored [01:09]
[rg] yawkat: how is it too late? [01:09]
yawkat you cant do it anymore now. [01:09]
Addax it's also an idea that has pros and cons [01:09]
Addax and it is far too late now [01:09]
keepLearning512 [keepLearning512!~keepLearn@106.51.72.155] has joined ##java [01:10]
[rg] why??? lol [01:10]
yawkat it cannot be done in a backwards-compatible way. [01:10]
cheeser that will never happen so it's irrelevant [01:10]
[rg] i feel like they could so stuff behind the scenes [01:11]
yawkat not really. [01:11]
[rg] cheeser: yeah bit of slow down so just asking random questions [01:11]
[rg] yawkat: can't they just autobox whenever interfacing with older code? [01:12]
conan [conan!~conan@148.252.129.77] has joined ##java [01:13]
g00s [g00s!~g00s@unaffiliated/g00s] has joined ##java [01:13]
rruizt [rruizt!~rruizt@83-84-23-124.cable.dynamic.v4.ziggo.nl] has joined ##java [01:15]
yawkat autoboxing does not solve all issues. [01:16]
pppingme [pppingme!~pppingme@unaffiliated/pppingme] has joined ##java [01:16]
yawkat int[] would suddenly be assignable to Object[], for example. [01:16]
ztychr [ztychr!ztychr@gateway/vpn/privateinternetaccess/ztychr] has joined ##java [01:21]
gabizou [gabizou!~gabizou@irc.spongepowered.org] has joined ##java [01:28]
rruizt [rruizt!~rruizt@83-84-23-124.cable.dynamic.v4.ziggo.nl] has joined ##java [01:34]
[twisti] i for one am glad that stuff like IO doesnt have to use objects behind the scene [01:35]
CombatVet [CombatVet!~c4@gateway/tor-sasl/combatvet] has joined ##java [01:40]
deavmi [deavmi!~deavmi@41.164.24.82] has joined ##java [01:45]
NorthwestVegan [NorthwestVegan!~Northwest@gateway/tor-sasl/northwestvegan] has joined ##java [01:47]
bolovanos [bolovanos!~bolovanos@ctrli.eu] has joined ##java [01:53]
gabizou [gabizou!~gabizou@irc.spongepowered.org] has joined ##java [01:54]
di0_ [di0_!~di0_@unaffiliated/di0-/x-5053590] has joined ##java [01:56]
Sasazuka [Sasazuka!~Sasazuka@unaffiliated/sasazuka] has joined ##java [02:02]
surial [rg]: an Integer reference, if treated as a value, can hold 2^32+1 different values. [02:06]
surial [rg]: that +1 is a humongous problem. It means you can't use 32 bits to represent it; you can only cover 2^32 different values. [02:06]
onu [onu!YMoM9HEKNs@crux.uberspace.de] has joined ##java [02:06]
surial Just casually adding an entire 32 bits to take care of that is an extremely shite performance deal and it complicates math considerably; the + operation can't just add 2 numbers, it has to check if either of the two is the voodoo magic 'extra' value, and if so, throw a NullPointerException instead. That would cause gigantic slowdowns everywhere. [02:07]
surial So IF you want to do that, you need to design a system whereby you can decree that objects cannot hold null, ever. But if you have that, then you can't use them in places like List<Integer> because those abstractions inherently were designed with 'null is okay' in mind. So then you have to first upgrade all of tHOSE. [02:08]
surial We are sort of getting that particular step in the form of Project Valhalla which isn't by any means done. Feel free to google. Maybe 10 years down the road all necesassy steps have been taken and it's feasible to posit a 'fuck it, let's just have never-null Integer replace int straight up'. [02:09]
rruizt [rruizt!~rruizt@83-84-23-124.cable.dynamic.v4.ziggo.nl] has joined ##java [02:09]
cheeser kotlinc actually does that. :) [02:09]
cheeser but it knows more about nullability than javac [02:09]
grim002 [grim002!~grim001@ip24-253-15-145.lv.lv.cox.net] has joined ##java [02:16]
Rapture [Rapture!~textual@50-204-232-30-static.hfc.comcastbusiness.net] has joined ##java [02:19]
kgrimes2 [kgrimes2!~kgrimes2@137.79.206.187] has joined ##java [02:20]
[rg] oh wow [02:20]
[rg] didn't think it would be that compilcated [02:20]
cheeser most people don't understand how complex it all is. [02:21]
[rg] no wonder they say null is the miilion dollar mistake [02:21]
cheeser brian goetz, for all his detractors, is a saint when dealing with bike shedders. :) [02:21]
rruizt [rruizt!~rruizt@83-84-23-124.cable.dynamic.v4.ziggo.nl] has joined ##java [02:22]
paddyez [paddyez!~paddyez@wikipedia/paddyez] has joined ##java [02:23]
yawkat surial: null checks are already often elided [02:25]
eckon [eckon!~eckon@eckon.rocks] has joined ##java [02:41]
zeryx [zeryx!~zeryx@201.149.53.252] has joined ##java [02:42]
zeryx hey folks I got an stdin issue [02:42]
surial [rg]: it was 'billion dollar mistake'. It was said by a fucking idiot, and the statement is utter horseshit. [02:42]
zeryx https://github.com/zeryx/algorithmHandler-java/blob/DS-174/src/test/java/AlgorithmHandler/tests/AlgorithmLoaders/Base.java#L46 - this seems to set properly at that level [02:42]
zeryx zeryx's title: "algorithmHandler-java/Base.java at DS-174 zeryx/algorithmHandler-java GitHub" [02:42]
surial [rg]: The notion of 'there is no value' is an inherent complexity in all software development. Saying it is a mistake, is like saying the flu virus is a mistake. [02:43]
zeryx with System.in.read(data); I can see the string that I passed to stdin [02:43]
zeryx however, when I run 'input.hasNextLine()' it hangs indefinitely [02:43]
surial null is one way to solve it. A fine way. There are others. [02:43]
zeryx even if the data stream explicitly has an '\n' appended to it [02:43]
Addax Optional! [02:43]
zeryx any idea what could be going on here? [02:44]
surial They all have their nice bits, and they all have their sucky bits. Had there been a cool alternative that has no downsides whatsoever, or clearly markedly fewer downsides than null, great. Feel free to exaggerate and spout hyperbole like 'null is a billion dollar mistake!', but given that we don't even have a clear better solution (we have some which MIGHT be better, but nowhere near clear enough to call the debate done and [02:44]
surial decided), if you say stuff like that, you're just an idiot. [02:44]
surial zeryx: you shouldn't be using those .hasX things generally. [02:45]
surial zeryx: what are you trying to accomplish? [02:45]
surial zeryx: to use scanner, [A] never call .nextLine ever, and [B] just call .nextX(). If you wanna know if there is an X, just.. call .nextX(). Once an X shows up (or X is already there) you just get it. great. [02:45]
zeryx I'm trying to replicate a stdin -> myprocess -> print to named pipe process [02:46]
zeryx and spoof the stdin part [02:46]
surial If I want the salt, I'll just ask you to pass the salt. It's a bit silly for me to go: "Hey, uh, buddy? You got some salt?" You: "Yes, I do". Me: "Great! Pass it then!" [02:46]
surial I should just go: "Hey, can you pass me the salt?" [02:46]
surial zeryx: and you thought scanner was a good idea to do this? I doubt that's true. BUt, hey, if you wanna play with scanner, allright. But why do you think you need to call .hasNextLine in this process? [02:46]
zeryx surial: I do use a scanner: [02:46]
zeryx https://github.com/zeryx/algorithmHandler-java/blob/DS-174/src/main/java/com/algorithmia/algorithm/RequestHandler.java#L51 [02:47]
zeryx zeryx's title: "algorithmHandler-java/RequestHandler.java at DS-174 zeryx/algorithmHandler-java GitHub" [02:47]
zeryx it's initialized at class creation from `System.in` [02:47]
zeryx this used to work fine.. I'm really confused honestly [02:47]
zeryx like 2 days ago all of my end2end junit tests passed without any problems.. without any code changes at all [02:48]
zeryx am I missing something about stdin? [02:48]
surial zeryx: probably. [02:48]
surial zeryx: there is zero reason to use scanner here. [02:49]
surial zeryx: make a BufferedReader. [02:49]
zeryx what would you recommend [02:49]
surial new BufferedReader(new INputStreamReader(System.in, StandardCharsets.UTF_8)); [02:50]
surial and then just call .readLine() anytime you want a line. [02:50]
surial this also has the marked advantage that it'll give you the last line instead of hanging. [02:50]
zeryx I want to know when I've reached EOF [02:51]
zeryx which is why there's a while loop presently [02:51]
zeryx would ready() work for that? [02:51]
[rg] surial: which guy? [02:53]
[rg] pretty sure tony hoare said it [02:54]
[rg] i get your point tho [02:54]
deavmi [deavmi!~deavmi@41.164.24.82] has joined ##java [02:59]
deavmiLaptop [deavmiLaptop!~deavmi@41.164.24.82] has joined ##java [02:59]
Nightwing52 [Nightwing52!~Thunderbi@71.221.222.239] has joined ##java [03:00]
magz [magz!~magz@68-168-184-223.fttp.usinternet.com] has joined ##java [03:00]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [03:00]
esro [esro!~esro@user119-167.otvarta.com.pl] has joined ##java [03:03]
Gazooo [Gazooo!~Gazooo@142.196.183.136] has joined ##java [03:07]
t2mkn [t2mkn!~t2mkn@43.226.3.198] has joined ##java [03:09]
troulouliou_div2 [troulouliou_div2!~troulouli@unaffiliated/troulouliou-div2/x-0271439] has joined ##java [03:13]
Oatmeal [Oatmeal!~Suzeanne@2600:8802:1500:5f5:84e6:cc01:5888:9ee3] has joined ##java [03:14]
acidjnk [acidjnk!~acid@i577BCAAD.versanet.de] has joined ##java [03:16]
deavmiUniversity [deavmiUniversity!~deavmi@41.164.24.82] has joined ##java [03:16]
surial zeryx: BufferedReader's nextLine() call will finish, and returns null, once you hit EOF. [03:23]
zeryx surial: the 'lines()' method is perfect I believe [03:23]
surial or that. [03:23]
troulouliou_div2 hi is there anythong once can do on linux for hidpi screen and swing application to scale them by a factor size of 2X or more ? [03:23]
zeryx I was able to get everything working by just mapping over the Stream<String> [03:23]
troulouliou_div2 I mean for already compiled ones [03:24]
zeryx thanks a ton for your help! I still don't know why this works vs. my other approach [03:24]
zeryx but I'm happy [03:24]
gronke [gronke!~gronke@2600:1700:b00:bc50::63a] has joined ##java [03:24]
gronke If I wanted to get jre1.7.0_45 for linux, how would I go about doing that? There seems to be a whole login/account process on Oracle's site. [03:24]
Addax you'd login and get an account and download it from ... [03:24]
Addax archives [03:24]
Addax You can download old versions of the JRE and JDK from Oracle: http://www.oracle.com/technetwork/java/archive-139210.html [03:24]
Addax oh you might not even need to do the acount thing [03:25]
Addax nope, you do [03:25]
gronke yeah [03:25]
Addax so... do that [03:25]
gronke that's free? [03:26]
Addax yes [03:26]
gronke thanks [03:28]
gelignite [gelignite!~gelignite@55d45be0.access.ecotel.net] has joined ##java [03:33]
kgrimes2 [kgrimes2!~kgrimes2@137.79.206.187] has joined ##java [03:35]
forgottenone [forgottenone!~forgotten@176.88.97.251] has joined ##java [03:35]
Jantz [Jantz!~IceChat9@118-93-23-100.dsl.dyn.ihug.co.nz] has joined ##java [03:35]
rawblem [rawblem!~rob@redhat/jboss/rawblem] has joined ##java [03:35]
rawblem anyone know how to determine how much memory a java app actually needs? When I run a hello-world, pmap tells me it's using like 7gb of memory, which is baffling. [03:36]
kgrimes2 [kgrimes2!~kgrimes2@137.79.206.187] has joined ##java [03:41]
cheeser look at the RSS [03:43]
fstd_ [fstd_!~fstd@unaffiliated/fisted] has joined ##java [03:45]
jadesoturi [jadesoturi!~jadesotur@unaffiliated/kfj] has joined ##java [03:51]
bn_work [bn_work!uid268505@gateway/web/irccloud.com/x-kcyzrfwwvhyjeowe] has joined ##java [03:54]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [03:56]
patrick246 [patrick246!~patrick24@host02.patrick246.de] has joined ##java [04:02]
hussam [hussam!uid193284@gateway/web/irccloud.com/x-bkfnzsihjoybmkzb] has joined ##java [04:07]
Galactus [Galactus!~Galactus@unaffiliated/galactus] has joined ##java [04:08]
indistylo [indistylo!~aruns_@106.51.25.10] has joined ##java [04:15]
Kestrel-029 [Kestrel-029!~Nicmavr@unaffiliated/nicmavr] has joined ##java [04:26]
t2mkn [t2mkn!~t2mkn@43.226.3.198] has joined ##java [04:36]
CombatVet [CombatVet!~c4@gateway/tor-sasl/combatvet] has joined ##java [04:41]
penthief [penthief!~penthief@unaffiliated/penthief] has joined ##java [04:41]
SuperTyp [SuperTyp!~SuperTyp@dslb-188-104-195-122.188.104.pools.vodafone-ip.de] has joined ##java [04:45]
immibis [immibis!~immibis@222-153-253-249-fibre.sparkbb.co.nz] has joined ##java [04:48]
whaley [whaley!~whaley@192.133.78.17] has joined ##java [04:54]
indistylo [indistylo!~aruns_@106.51.25.10] has joined ##java [04:55]
deavmiUniversity [deavmiUniversity!~deavmi@41.164.24.82] has joined ##java [05:00]
raztoki- [raztoki-!~a0sle@unaffiliated/a0sle] has joined ##java [05:03]
mindCrime [mindCrime!~prhodes@rrcs-66-57-82-202.midsouth.biz.rr.com] has joined ##java [05:05]
whaley [whaley!~whaley@192.133.78.17] has joined ##java [05:07]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [05:11]
nfd9001 [nfd9001!~nfd9001@2601:602:8500:2443:21c8:1a90:96d6:82cd] has joined ##java [05:12]
LKoen [LKoen!~LKoen@2a01cb0407597a0034ea6b557c446756.ipv6.abo.wanadoo.fr] has joined ##java [05:13]
troydm [troydm!~troydm@unaffiliated/troydm] has joined ##java [05:14]
Mustard [Mustard!d41b1331@gateway/web/freenode/ip.212.27.19.49] has joined ##java [05:16]
Mustard Any easy way of sorting a 2d array based on the int of second column ? [05:22]
mindCrime_ [mindCrime_!~prhodes@rrcs-66-57-82-202.midsouth.biz.rr.com] has joined ##java [05:23]
indistylo [indistylo!~aruns_@106.51.25.10] has joined ##java [05:26]
toytoy [toytoy!~toytoy@unaffiliated/t0yt0y] has joined ##java [05:27]
troydm [troydm!~troydm@unaffiliated/troydm] has joined ##java [05:28]
conan [conan!~conan@mdproctor.plus.com] has joined ##java [05:29]
ogradyd [ogradyd!~Thunderbi@2a02:8070:88bf:9df0:80d2:20d9:8517:b9d6] has joined ##java [05:29]
keepLearning512 [keepLearning512!~keepLearn@106.51.235.188] has joined ##java [05:36]
Kestrel-029 [Kestrel-029!~Nicmavr@unaffiliated/nicmavr] has joined ##java [05:41]
keepLearning512 [keepLearning512!~keepLearn@106.51.235.188] has joined ##java [05:46]
ztychr [ztychr!ztychr@gateway/vpn/privateinternetaccess/ztychr] has joined ##java [05:50]
rruizt [rruizt!~rruizt@83-84-23-124.cable.dynamic.v4.ziggo.nl] has joined ##java [05:57]
mluser-home [mluser-home!~mluser-ho@ip68-0-67-199.tu.ok.cox.net] has joined ##java [06:04]
indistylo [indistylo!~aruns_@106.51.25.10] has joined ##java [06:06]
deavmi [deavmi!~deavmi@41.164.24.82] has joined ##java [06:14]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [06:26]
enoq [enoq!~enoq@2a02:8388:6a87:b080:649f:9456:c1b1:28e4] has joined ##java [06:27]
code_zombie [code_zombie!~code_zomb@2605:a601:aa1:da00:5c24:7c31:534e:43f2] has joined ##java [06:31]
Maldivia Areays.sort(ar, Comparator.comparingInt(a -> a[1])) [06:35]
wisey [wisey!~wisey@79-73-80-105.dynamic.dsl.as9105.com] has joined ##java [06:54]
nivag__ [nivag__!~gavin@121.99.202.67] has joined ##java [06:55]
henbruas [henbruas!~henbruas@unaffiliated/henbruas] has joined ##java [06:57]
wisey [wisey!~wisey@79-73-80-105.dynamic.dsl.as9105.com] has joined ##java [07:07]
indistylo [indistylo!~aruns_@106.51.25.10] has joined ##java [07:23]
Teckla [Teckla!~Teckla@unaffiliated/teckla] has joined ##java [07:24]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [07:26]
Hanii [Hanii!~Hanii@2a00:23c5:c587:a800:e8cb:2cde:9996:5c36] has joined ##java [07:28]
svm_invictvs Is there something in the regular Java API that's a type Future that I can manually drive? [07:45]
svm_invictvs Where, I can signal the end condition or the exception myself? [07:46]
svm_invictvs I'm assuming that's what CompleteableFuture is for, correct? [07:47]
Jantz [Jantz!~IceChat9@2407:7000:8d04:100:1c4d:4d59:bf68:a094] has joined ##java [07:48]
indistylo [indistylo!~aruns_@106.51.25.10] has joined ##java [07:53]
VG234 [VG234!~user@23.226.129.228] has joined ##java [07:55]
VG234 I'm trying to use groovy in a rest api json object to nexus using curl. I'm running into issues get groovy to work. I keep getting compilation errors when I try to do anything more complex than just print. Here is my code: http://ix.io/1GjS [07:56]
db [db!uid18678@gateway/web/irccloud.com/x-vcjobyhireufpcuf] has joined ##java [08:00]
metrixx [metrixx!~metrixx@unaffiliated/metrixx] has joined ##java [08:07]
orbyt_ [orbyt_!~orbyt@172.92.5.20] has joined ##java [08:13]
ztychr [ztychr!ztychr@gateway/vpn/privateinternetaccess/ztychr] has joined ##java [08:15]
kgrimes2 [kgrimes2!~kgrimes2@137.78.59.217] has joined ##java [08:18]
yawkat [yawkat!~yawkat@cats.coffee] has joined ##java [08:29]
rruizt [rruizt!~rruizt@83-84-23-124.cable.dynamic.v4.ziggo.nl] has joined ##java [08:31]
fyrril [fyrril!~fyrril@2605:a601:a1ab:7700:ac79:40b2:c792:aad] has joined ##java [08:34]
LearnAllTheTime [LearnAllTheTime!~LearnAllT@2600:1700:e560:21e0:e187:13d5:6298:ebb5] has joined ##java [08:42]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [08:46]
enoq [enoq!~enoq@2a02:8388:6a87:b080:649f:9456:c1b1:28e4] has joined ##java [08:47]
mindCrime_ [mindCrime_!~prhodes@cpe-98-27-55-10.nc.res.rr.com] has joined ##java [08:53]
Kestrel-029 [Kestrel-029!~Nicmavr@unaffiliated/nicmavr] has joined ##java [08:56]
wisey [wisey!~wisey@79-73-80-105.dynamic.dsl.as9105.com] has joined ##java [09:14]
indistylo [indistylo!~aruns_@106.51.25.10] has joined ##java [09:15]
VegetarianFalcon [VegetarianFalcon!uid258908@gateway/web/irccloud.com/x-irhmrwgzxmkxqopv] has joined ##java [09:20]
rwheadon [rwheadon!~rwheadon@2600:1700:17a0:58ef:7559:1878:135e:b25f] has joined ##java [09:22]
conan_ [conan_!~conan@mdproctor.plus.com] has joined ##java [09:30]
orbyt_ [orbyt_!~orbyt@172.92.5.20] has joined ##java [09:34]
toytoy [toytoy!~toytoy@unaffiliated/t0yt0y] has joined ##java [09:38]
wisey [wisey!~wisey@79-73-80-105.dynamic.dsl.as9105.com] has joined ##java [09:38]
indistylo [indistylo!~aruns_@106.51.25.10] has joined ##java [09:46]
wisey [wisey!~wisey@79-73-80-105.dynamic.dsl.as9105.com] has joined ##java [09:50]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [09:56]
arcsin_ [arcsin_!~alureon@unaffiliated/proxa] has joined ##java [09:59]
very_sneaky is there an easy way to format the way an ArrayList prints as a string? or format a string taking an ArrayList as input? [10:07]
very_sneaky something that would be equivelant to pythons `",".join(list_of_strings)` [10:07]
AMcBain [AMcBain!~Art@047-006-242-094.res.spectrum.com] has joined ##java [10:16]
sir_galahad_ad_ [sir_galahad_ad_!~aaron@cpe-76-179-65-199.maine.res.rr.com] has joined ##java [10:17]
Goplat [Goplat!~Goplat@reactos/developer/Goplat] has joined ##java [10:18]
db String.join(",", list_of_strings) [10:18]
db list_of_strings.stream().collect(Collectors.joining(",")) [10:18]
db etc [10:18]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [10:20]
Kol [Kol!~Kol@S0106bcd1656555bc.vc.shawcable.net] has joined ##java [10:22]
Muzer [Muzer!~muzer@tim32.org] has joined ##java [10:26]
very_sneaky db: oh nice, cheers [10:28]
Jigsy` [Jigsy`!~Jigsy@unaffiliated/jigsy] has joined ##java [10:32]
very_sneaky db`: lets say that it's a list of objects which have implemented a toString() method. Would it be possible to define a different string conversion than what's identified in the toString method? i.e. can I implement a toString(Boolean switch) method or similar and specify that it uses that to convert to string? [10:32]
very_sneaky or would I have to resort to a for loop in that case [10:33]
db list_of_strings.map(o -> o.toString(switch)).collect... [10:34]
very_sneaky ah almbdas. that confusing beast. [10:34]
db +stream() [10:34]
very_sneaky lambdas* [10:34]
db Lambada. [10:35]
tassee [tassee!~tasse@55d44537.access.ecotel.net] has joined ##java [10:35]
very_sneaky alright cheers, i'll see if i can work it out [10:35]
db good luck [10:35]
pd09041999 [pd09041999!~pd0904199@unaffiliated/pd09041999] has joined ##java [10:36]
kicked pd09041999 (Banned: possible bot? this ban will expire after 30d) [10:36]
rruizt [rruizt!~rruizt@83-84-23-124.cable.dynamic.v4.ziggo.nl] has joined ##java [10:37]
acidjnk [acidjnk!~acid@i577BCAAD.versanet.de] has joined ##java [10:37]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [10:41]
arcsin_ [arcsin_!~alureon@unaffiliated/proxa] has joined ##java [10:56]
g00s [g00s!~g00s@unaffiliated/g00s] has joined ##java [10:56]
LSCody [LSCody!~textual@pool-96-246-175-233.nycmny.fios.verizon.net] has joined ##java [10:59]
wisey [wisey!~wisey@79-73-80-105.dynamic.dsl.as9105.com] has joined ##java [11:07]
indistylo [indistylo!~aruns_@106.51.25.10] has joined ##java [11:07]
Hanii [Hanii!~Hanii@2a00:23c5:c587:a800:f09c:4fec:2fc2:78d9] has joined ##java [11:10]
adder [adder!~adder@gateway/tor-sasl/adder] has joined ##java [11:14]
extorr [extorr!~extor@unaffiliated/extor] has joined ##java [11:15]
forgottenone [forgottenone!~forgotten@176.88.97.251] has joined ##java [11:18]
Senethril [Senethril!~Senethril@109.131.179.118] has joined ##java [11:18]
arcsin_ [arcsin_!~alureon@unaffiliated/proxa] has joined ##java [11:35]
indistylo [indistylo!~aruns_@106.51.25.10] has joined ##java [11:37]
wisey [wisey!~wisey@79-73-80-105.dynamic.dsl.as9105.com] has joined ##java [11:46]
very_sneaky I'm using java.util.Observer and java.util.Observable; when implementing `update(Observable o, Object arg)`, I'm getting warnings for unchecked casts of arg - is there a good way to deal with this? It seems like it might be a limitation of the Observer interface [11:48]
Oatmeal [Oatmeal!~Suzeanne@2600:8802:1500:5f5:84e6:cc01:5888:9ee3] has joined ##java [11:48]
kgrimes2 [kgrimes2!~kgrimes2@172-11-18-93.lightspeed.irvnca.sbcglobal.net] has joined ##java [11:50]
t2mkn [t2mkn!~t2mkn@43.226.2.188] has joined ##java [11:50]
very_sneaky i.e., casting from a generic object to a non-generic one [11:52]
wisey [wisey!~wisey@79-73-80-105.dynamic.dsl.as9105.com] has joined ##java [11:57]