Info

Login

Channels

APIs

Credits

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

« 2019-11-08

2019-11-09

2019-11-10 »

Nick Message Date
xeno [xeno!~xeno@unaffiliated/xeno] has joined ##java [12:14]
tassee [tassee!~tasse@55d4e4ab.access.ecotel.net] has joined ##java [12:14]
acidjnk_new [acidjnk_new!~acidjnk@200116b86759450038991b63520cf54b.dip.versatel-1u1.de] has joined ##java [12:23]
acidjnk_new2 [acidjnk_new2!~acidjnk@200116b867594500c498d503c79328ab.dip.versatel-1u1.de] has joined ##java [12:24]
Me4502 [Me4502!~quassel@unaffiliated/me4502] has joined ##java [12:28]
KidBeta [KidBeta!~Kidbeta@hpavc/kidbeta] has joined ##java [12:43]
coalado [coalado!~Thomas@unaffiliated/coalado] has joined ##java [12:43]
hypc [hypc!~Thunderbi@113.233.192.38] has joined ##java [12:53]
upgrdman [upgrdman!~upgrdman@blender/artist/upgrdman] has joined ##java [01:14]
sdu [sdu!~doo@80.107.19.72] has joined ##java [01:23]
bsld [bsld!~bsld@80.72.90.239.coresnet.bg] has joined ##java [01:24]
sauvin [sauvin!sauvin@about/linux/staff/sauvin] has joined ##java [01:34]
xeno [xeno!~xeno@unaffiliated/xeno] has joined ##java [01:39]
rruizt [rruizt!~rruizt@83-84-23-124.cable.dynamic.v4.ziggo.nl] has joined ##java [01:48]
nfd9001 [nfd9001!~nfd9001@c-67-183-33-240.hsd1.wa.comcast.net] has joined ##java [02:08]
cixx_ [cixx_!~user@176.234.98.137] has joined ##java [02:10]
mizi [mizi!~mizi@p200300ECF3CBB400FD249BF9A58414C7.dip0.t-ipconnect.de] has joined ##java [02:13]
auteroche [auteroche!~andy@203.214.35.6] has joined ##java [02:14]
palasso [palasso!~palasso@unaffiliated/palasso] has joined ##java [02:18]
xeno [xeno!~xeno@unaffiliated/xeno] has joined ##java [02:26]
bravoslo [bravoslo!~bravoslo@178.162.212.214] has joined ##java [02:28]
xeno [xeno!~xeno@unaffiliated/xeno] has joined ##java [02:29]
xeno [xeno!~xeno@unaffiliated/xeno] has joined ##java [02:32]
dtrott [dtrott!~dtrott@cpe-45-49-158-31.socal.res.rr.com] has joined ##java [02:42]
DemonWav [DemonWav!~DemonWav@unaffiliated/demonwav] has joined ##java [02:58]
makara1 [makara1!~sol@196.61.111.63] has joined ##java [03:04]
jmorris [jmorris!uid374834@gateway/web/irccloud.com/x-vwxdugeatzuawfpi] has joined ##java [03:24]
rruizt [rruizt!~rruizt@83-84-23-124.cable.dynamic.v4.ziggo.nl] has joined ##java [03:26]
ravenousmoose [ravenousmoose!~ravenousm@ptr-cud5aqg6fng7b11552m.18120a2.ip6.access.telenet.be] has joined ##java [03:34]
indistylo [indistylo!~aruns_@106.51.26.248] has joined ##java [03:40]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [03:47]
immibis [immibis!~immibis@p200300F1C70F8809288DA02DAB50F930.dip0.t-ipconnect.de] has joined ##java [03:52]
immibis_ [immibis_!~immibis@p200300F1C70F8809BA8252BA1A2A7155.dip0.t-ipconnect.de] has joined ##java [03:53]
extor [extor!~extor@unaffiliated/extor] has joined ##java [03:54]
treefrob_ [treefrob_!~treefrob@p57A96089.dip0.t-ipconnect.de] has joined ##java [03:54]
KidBeta [KidBeta!~Kidbeta@hpavc/kidbeta] has joined ##java [04:00]
black_ant [black_ant!~antilope@unaffiliated/black-ant/x-1505394] has joined ##java [04:00]
nokdoot [nokdoot!~nokdoot@211.205.207.39] has joined ##java [04:02]
makara1 [makara1!~sol@196.61.111.63] has joined ##java [04:05]
rippa [rippa!~rippa@ppp-vpdn-37.1.85.157.yarnet.ru] has joined ##java [04:06]
makara1 [makara1!~sol@196.61.111.63] has joined ##java [04:19]
indistylo [indistylo!~aruns_@106.51.26.248] has joined ##java [04:29]
DTZUZO [DTZUZO!~DTZUZO@S0106bcd165662a4d.vs.shawcable.net] has joined ##java [04:38]
indistylo [indistylo!~aruns_@106.51.26.248] has joined ##java [04:39]
dob1 [dob1!~dob1@unaffiliated/dob1] has joined ##java [04:42]
dob1 hi, I am tryng to use jansi, AnsiConsole.systemInstall(); I try AnsiConsole.out.print(Ansi.ansi().fgGreen().a("test")); this shoud be in green ? [04:43]
dob1 right? [04:43]
dob1 *should [04:43]
DTZUZO [DTZUZO!~DTZUZO@S0106bcd165662a4d.vs.shawcable.net] has joined ##java [04:45]
dob1 (considering that I am using ecplise ansi console) [04:48]
DTZUZO [DTZUZO!~DTZUZO@S0106bcd165662a4d.vs.shawcable.net] has joined ##java [04:53]
LearnAllTheTime [LearnAllTheTime!~LearnAllT@2601:cc:4000:9db0::1dcd] has joined ##java [04:57]
emmanuelux [emmanuelux!~emmanuelu@2a01cb0000f3930065dccf0acc280985.ipv6.abo.wanadoo.fr] has joined ##java [04:58]
dob1 but my doubt is: if I don't see the colors then I should see ansi escape codes... but nothing [04:59]
dreamreal tech support [04:59]
dreamreal dob1, 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:59]
dreamreal talk to the jansi project, they will know [04:59]
dob1 dreamreal, ok but it's a very small projecs we are not talking about hibernate. Maye someone here could have used it and can give me some hints. it's not allowed? [05:00]
dreamreal Nobody said it wasn't allowed. But nobody here really uses jansi that I know of, and what you're asking really requires jansi experience. The jansi project will have people with jansi experience. [05:01]
dreamreal You're asking for tech support for jansi, and that's... not what this channel is for. You might receive it, but I have a feeling you won't, because ANSI color support in java isn't that common. [05:02]
dob1 dreamreal, sorry to be clear I am not arguing. but I am asking the first line of a tutorial, a text with a color [05:02]
dreamreal And... [05:02]
dob1 you said " what you're asking really requires jansi experience" I don't think so. If someone has played with it a bit can give me an hing [05:03]
DTZUZO [DTZUZO!~DTZUZO@S0106bcd165662a4d.vs.shawcable.net] has joined ##java [05:03]
dob1 *hint [05:03]
dreamreal I'm sure they can, if someone has played with it. Now let's see if anyone has played with it. [05:03]
dob1 my bad, it's not the right time to ask questions, they are all sleeping :) [05:04]
dreamreal and as I pointed out, that's not what this channel is for. [05:04]
Katana [Katana!~hentai@unaffiliated/katana] has joined ##java [05:06]
Gazooo [Gazooo!~Gazooo@142.196.183.136] has joined ##java [05:07]
dob1 ok maybe I can be lucky :) [05:07]
dreamreal maybe you can. But if you really want to increase your luck, you should ASK THE JANSI PROJECT. [05:07]
dreamreal Or you can keep on hoping for a low percentage of success to work out anyway, I guess. [05:08]
dob1 err irc channel is empty, mailing list is dead. I can ask stackoverflow but for sure they will redirect me to an old question [05:10]
dreamreal does the project have a website? a github repository? [05:10]
dreamreal jansi [05:10]
dreamreal dreamreal, what does that even *mean*? [05:10]
dob1 https://github.com/fusesource/jansi [05:11]
dob1 dob1's title: "GitHub - fusesource/jansi: Jansi is a small java library that allows you to use ANSI escape sequences to format your console output which works even on windows." [05:11]
dreamreal dob1: oh look. updated in the last few months. Maybe they're active enough that you can file an issue or ask the project maintainer directly. [05:11]
dob1 dreamreal, I will try [05:12]
dreamreal good luck. [05:12]
DTZUZO [DTZUZO!~DTZUZO@S0106bcd165662a4d.vs.shawcable.net] has joined ##java [05:14]
Jantz [Jantz!~IceChat9@118-93-11-225.dsl.dyn.ihug.co.nz] has joined ##java [05:14]
Simonsen [Simonsen!~Simonsen@unaffiliated/simonsen] has joined ##java [05:22]
DTZUZO [DTZUZO!~DTZUZO@S0106bcd165662a4d.vs.shawcable.net] has joined ##java [05:24]
zalt [zalt!~lambda443@unaffiliated/lambda443] has joined ##java [05:29]
DTZUZO [DTZUZO!~DTZUZO@S0106bcd165662a4d.vs.shawcable.net] has joined ##java [05:32]
con3 [con3!~kvirc@154.119.40.183] has joined ##java [05:35]
DTZUZO [DTZUZO!~DTZUZO@S0106bcd165662a4d.vs.shawcable.net] has joined ##java [05:39]
KidBeta [KidBeta!~Kidbeta@hpavc/kidbeta] has joined ##java [05:41]
DTZUZO [DTZUZO!~DTZUZO@S0106bcd165662a4d.vs.shawcable.net] has joined ##java [05:44]
UndefinedIsNotAF [UndefinedIsNotAF!~kvirc@lns-bzn-58-82-251-215-83.adsl.proxad.net] has joined ##java [05:47]
indistylo [indistylo!~aruns_@106.51.26.248] has joined ##java [05:54]
DTZUZO [DTZUZO!~DTZUZO@S0106bcd165662a4d.vs.shawcable.net] has joined ##java [05:57]
feannag [feannag!~feannag@2405:204:902c:c4c1:e113:7b3b:3906:64f7] has joined ##java [06:10]
indistylo [indistylo!~aruns_@106.51.26.248] has joined ##java [06:12]
DTZUZO [DTZUZO!~DTZUZO@S0106bcd165662a4d.vs.shawcable.net] has joined ##java [06:13]
DTZUZO [DTZUZO!~DTZUZO@S0106bcd165662a4d.vs.shawcable.net] has joined ##java [06:30]
Katana [Katana!~hentai@unaffiliated/katana] has joined ##java [06:44]
DTZUZO [DTZUZO!~DTZUZO@S0106bcd165662a4d.vs.shawcable.net] has joined ##java [06:45]
DTZUZO [DTZUZO!~DTZUZO@S0106bcd165662a4d.vs.shawcable.net] has joined ##java [06:56]
DTZUZO [DTZUZO!~DTZUZO@S0106bcd165662a4d.vs.shawcable.net] has joined ##java [07:16]
nokdoot [nokdoot!~nokdoot@211.205.207.39] has joined ##java [07:32]
MJCD_ [MJCD_!~MJCD@unaffiliated/mjcd] has joined ##java [07:33]
MJCD_ Hey all [07:33]
MJCD_ I have a relatively simple little .java file [07:33]
MJCD_ it fails to build or something [07:33]
MJCD_ basically saying it cannot find the default class [07:33]
MJCD_ but there's a main method exactly textbook standard definition [07:34]
DTZUZO [DTZUZO!~DTZUZO@S0106bcd165662a4d.vs.shawcable.net] has joined ##java [07:34]
MJCD_ the debugger is what tells me it's unable to resolve a default class [07:34]
MJCD_ even if I do like [07:34]
Bombe Well, the only conclusion we can draw from the massive amount of information you have given us is that you?re doing it wrong. [07:34]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [07:34]
Bombe If you want less help, please supply less information. [07:35]
Bombe Thank you! [07:35]
MJCD_ `java -cp .\ thing' [07:35]
MJCD_ here's the code [07:35]
MJCD_ https://gist.github.com/MJCD/291923ed7550d83f05cfd297b4d74bbc [07:37]
Bombe There is an obvious disconnect between this code and how you?re calling it. [07:37]
MJCD_ as I said, about as simple as it gets - it could be that my JDK isn't particularly well configured [07:37]
ernimril MJCD_, what is the actual command you run? [07:38]
MJCD_ `java wg.java` but I also get the same thing with `java -cp ./ wg.java` [07:38]
ernimril MJCD_, java is case sensitive [07:39]
MJCD_ er [07:39]
ernimril MJCD_, "java WG" ought to work [07:39]
Bombe Also, java takes class names, not paths. [07:39]
MJCD_ `java -cp ./ WG` [07:39]
MJCD_ my bad [07:39]
Bombe ~MJCD_ tutorial [07:39]
Bombe Bombe, what does that even *mean*? [07:39]
MJCD_ ernimril, i'll try, and Bombe thus the second command [07:39]
MJCD_ sorry I retyped it wrong [07:39]
Bombe tutorial [07:39]
Bombe 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. [07:39]
MJCD_ this IS a tutorial [07:39]
MJCD_ lel. [07:40]
MJCD_ `java WG` doesn't work any different [07:40]
Bombe If it tells you to do something that doesn?t work it?s probably crap. Use one of the linked ones. [07:40]
Lengsdorfer [Lengsdorfer!~Lengsdorf@unaffiliated/lengsdorfer] has joined ##java [07:40]
MJCD_ it's from the oracle docs... [07:40]
MJCD_ well [07:40]
Bombe And it this point it sounds like you?re skipping things. [07:41]
MJCD_ not running it [07:41]
MJCD_ but running a class isn't rocket surgery, I just mistyped the command once [07:41]
Bombe So you either are doing things differently that the tutorial tells you to, or you?re not telling us everything. [07:41]
MJCD_ I mean [07:41]
MJCD_ i'm using vscode.. and microsofts debugger [07:41]
MJCD_ with a brand new jdk install [07:41]
MJCD_ also windows not linux [07:42]
DTZUZO [DTZUZO!~DTZUZO@S0106bcd165662a4d.vs.shawcable.net] has joined ##java [07:42]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [07:44]
MJCD_ ooooh [07:44]
MJCD_ hol upppp [07:44]
tasse [tasse!~tasse@55d4e4ab.access.ecotel.net] has joined ##java [07:45]
MJCD_ ahhh meh, only thing the example I linked didn't have was a constructor [07:46]
MJCD_ added that; same issue [07:46]
yawkat again - if you get an error following the exact steps of the tutorial, it's a bad tutorial [07:47]
yawkat but what you showed so far does not look like something a tutorial would do. [07:48]
MJCD_ ... this is the exact oracle one linked. [07:48]
MJCD_ I mean, i'm not doing a full bicycle example with extends and shit [07:49]
MJCD_ it's literally as basic as it gets. Output one line. [07:49]
yawkat which one? [07:49]
MJCD_ lol "meow" [07:49]
MJCD_ it's just a test. [07:49]
yawkat it's certainly not https://docs.oracle.com/javase/tutorial/getStarted/cupojava/win32.html#win32-2a [07:49]
yawkat yawkat's title: ""Hello World!" for Microsoft Windows (The Java Tutorials > Getting Started > The "Hello World!" Application)" [07:49]
yawkat so which tutorial are you following? [07:49]
MJCD_ https://docs.oracle.com/javase/tutorial/java/javaOO/variables.html [07:50]
MJCD_ MJCD_'s title: "Declaring Member Variables (The Java Tutorials > Learning the Java Language > Classes and Objects)" [07:50]
MJCD_ that's where i'm upto [07:50]
yawkat i see no "wg" there [07:50]
MJCD_ > I mean, i'm not doing a full bicycle example with extends and shit it's literally as basic as it gets. Output one line. [07:50]
MJCD_ https://gist.github.com/MJCD/291923ed7550d83f05cfd297b4d74bbc [07:50]
yawkat i know the code [07:50]
yawkat where is it from? [07:51]
yawkat what tutorial are you following? [07:51]
MJCD_ I did add a `public WG (int x) { }` for a constructor [07:51]
MJCD_ fuck me [07:51]
yawkat i dont really care [07:51]
yawkat where is it from? [07:51]
MJCD_ are you being intentionally dense [07:51]
MJCD_ > I mean, i'm not doing a full bicycle example with extends and shit it's literally as basic as it gets. Output one line. [07:51]
yawkat so youre not following a tutorial? [07:51]
MJCD_ I can post that as many times as pleases you [07:52]
MJCD_ It's exact form is identical. As you can see. [07:52]
MJCD_ No, it doesn't have "gears" [07:52]
yawkat well you just said it's *not* the bicycle example. you havent said what example it *is*. [07:52]
MJCD_ because more stuff makes the thing more complicated... for a basic demo to test if my JDK setup is even working [07:52]
Bombe Well, if you are not doing the tutorial you?re on your own. [07:52]
MJCD_ sigh [07:52]
bendem did you ever even pasted the exact error message? [07:52]
KidBeta [KidBeta!~Kidbeta@hpavc/kidbeta] has joined ##java [07:53]
MJCD_ Exception in thread "main" java.lang.Error: Unresolved compilation problem: (blank) [07:53]
bendem my guess is, you didn't compile your source file so the class can indeed not be found [07:53]
MJCD_ the debugger tells me it resolves to URLClassLoader.class [07:53]
yawkat MJCD_: thats... not a javac error [07:53]
bendem that error comes from eclipse, not from the jdk [07:53]
MJCD_ which is a line showing no class was found, essentially [07:53]
yawkat MJCD_: that sounds like eclipse [07:53]
MJCD_ vscode, as I said [07:53]
bendem still, javac WG.java; java -cp . WG [07:54]
mbooth vscode uses Eclipse JDT under the hood [07:54]
MJCD_ but it is the output from those same terminal commands I gave you [07:54]
MJCD_ bendem, that's what I tried. [07:54]
MJCD_ as above.. [07:54]
yawkat MJCD_: no it's not, because javac would never produce that error [07:54]
bendem MJCD_, that's a lie, javac cannot produce that error [07:54]
bendem there is literally no way [07:54]
MJCD_ ...... so [07:54]
MJCD_ to the non astute myself included most highly [07:55]
bendem also, fix your case, WG, not wg [07:55]
MJCD_ the commands I quoted very specifically were using `java` [07:55]
MJCD_ not `javac` [07:55]
bendem yes, and I'm saying, run both [07:55]
MJCD_ javac is not in my $PATH seemingly [07:55]
bendem if you don't compile your program (as mentionned in the tutorial you said you're following) [07:55]
MJCD_ (windows) [07:55]
bendem no wonder there is no way to run the compiled file [07:56]
DTZUZO [DTZUZO!~DTZUZO@S0106bcd165662a4d.vs.shawcable.net] has joined ##java [07:56]
Sheilong [Sheilong!uid293653@gateway/web/irccloud.com/x-htxvudwlyoantzps] has joined ##java [07:56]
MJCD_ dude this is the third fucking page alright [07:56]
MJCD_ they haven't even said anything about ANY software [07:56]
MJCD_ fuck me [07:56]
MJCD_ ease up [07:56]
bendem I'm not the one swearing, maybe you should follow your own advice? [07:56]
MJCD_ ... that makes zero sense. [07:57]
MJCD_ am I being mean to you because I said i'm on the third FUCKING page? [07:57]
MJCD_ clearly the answer is no [07:57]
yawkat third page of what? the bicycle thingy is much further along [07:58]
bendem I'm just saying I actually have 0 emotional involvment into whether you succeed in your basic test [07:58]
bendem so I cannot ease up more than that [07:58]
MJCD_ yawkat, lel ok, 5 pages ;) [07:58]
MJCD_ bendem, so might as well be an ass [07:58]
MJCD_ gotcha [07:58]
yawkat then start at page ^1 [07:58]
MJCD_ yawkat, doesn't mention software til much later in detail [07:58]
MJCD_ section uhhh [07:59]
MJCD_ infact that java tutorial section (From the link you guys provided, perhaps I clicked 1 specific section) [07:59]
yawkat it does mention software literally on the first page [07:59]
MJCD_ does not mention software at all [07:59]
MJCD_ it talks about software on the page entitled "Classes and objects" ? [07:59]
MJCD_ https://docs.oracle.com/javase/tutorial/java/javaOO/index.html [08:00]
MJCD_ MJCD_'s title: "Lesson: Classes and Objects (The Java Tutorials > Learning the Java Language)" [08:00]
MJCD_ negatory. [08:00]
yawkat no, thats the 6th chapter [08:00]
yawkat start in chapter 1 [08:00]
MJCD_ lol oh, I must have misclicked [08:00]
MJCD_ ok [08:00]
MJCD_ still... ease up on your struggling noobs ;) [08:00]
yawkat https://docs.oracle.com/javase/tutorial/getStarted/cupojava/win32.html [08:00]
yawkat yawkat's title: ""Hello World!" for Microsoft Windows (The Java Tutorials > Getting Started > The "Hello World!" Application)" [08:00]
MJCD_ peace [08:00]
MJCD_ parted the channel: [08:00]
yawkat amazing. [08:00]
KidBeta [KidBeta!~Kidbeta@hpavc/kidbeta] has joined ##java [08:01]
mbooth Heh, y'all will be here if he needs you to read something for him again, right? :-D [08:02]
DTZUZO [DTZUZO!~DTZUZO@S0106bcd165662a4d.vs.shawcable.net] has joined ##java [08:07]
sa02irc [sa02irc!~mbax@155-079-043-212.ip-addr.inexio.net] has joined ##java [08:08]
Viciouss [Viciouss!~viciouss@unaffiliated/viciouss] has joined ##java [08:09]
ogradyd [ogradyd!~Thunderbi@2a02:8070:88bf:9df0::577] has joined ##java [08:14]
tasse [tasse!~tasse@55d4e4ab.access.ecotel.net] has joined ##java [08:16]
RoriconKnight [RoriconKnight!~RoriconKn@120.188.4.220] has joined ##java [08:25]
ipe [ipe!~ipe@91-156-247-55.elisa-laajakaista.fi] has joined ##java [08:29]
john-doh [john-doh!xenolith@gateway/shell/xshellz/x-eswcvgsrwxwhdplj] has joined ##java [08:33]
somazero [somazero!~somazero@2600:8805:100:112:e7b7:fc17:b4ac:d4d1] has joined ##java [08:38]
DemonWav [DemonWav!~DemonWav@unaffiliated/demonwav] has joined ##java [08:38]
NetGirl [NetGirl!~NetGirl@unaffiliated/netgirl] has joined ##java [08:41]
somazero [somazero!~somazero@2600:8805:100:112:e7b7:fc17:b4ac:d4d1] has joined ##java [08:49]
alexi5_ [alexi5_!~alexi5@38.92.124.187] has joined ##java [08:51]
alexi5_ hello [08:51]
somazero_ [somazero_!~somazero@2600:8805:100:112:e7b7:fc17:b4ac:d4d1] has joined ##java [08:55]
somazero_ [somazero_!~somazero@2600:8805:100:112:e7b7:fc17:b4ac:d4d1] has joined ##java [08:56]
dreamreal hi [08:58]
manualcrank [manualcrank!~manualcra@bras-base-mtrlpq2718w-grc-09-70-24-225-95.dsl.bell.ca] has joined ##java [09:07]
Chepra [Chepra!~chepra@summer.c137.eu] has joined ##java [09:14]
acidjnk_new2 [acidjnk_new2!~acidjnk@200116b867594500c498d503c79328ab.dip.versatel-1u1.de] has joined ##java [09:18]
rohanrhu [rohanrhu!~rohanrhu@88.237.251.74] has joined ##java [09:29]
alexi5 [alexi5!~alexi5@208.83.82.244] has joined ##java [09:36]
alexi5 Hello [09:36]
plarsen [plarsen!~plarsen@redhat/jboss/pdpc.professional.plarsen] has joined ##java [09:37]
deathcap [deathcap!~user@unaffiliated/deathcap] has joined ##java [09:37]
dreamreal alexi5: hello (again) [09:38]
alexi5 D [09:38]
alexi5 i was trying out OpenJ9 (JDK11) with some applications I made and notice that I keep getting nullpointer exceptions at some wierd places in code, but the app runs flawless using oracle JDK and OpenjDK11 hotspot [09:38]
dreamreal that would be odd [09:38]
alexi5 I have been trying to find out why, but can't see any reason why it would [09:39]
dreamreal gradle 6.0 released: https://docs.gradle.org/6.0/release-notes.html [09:39]
dreamreal alexi5: well, show code and show stacktraces [09:39]
alexi5 ok [09:40]
alexi5 but is it usuall for this to happen with OpenJ9 ? [09:40]
alexi5 where an app runs without problems , but have problems with one JVM ? [09:40]
dreamreal I don't know, I haven't used j9, but I'd suspect it to be unusual [09:41]
deathcap I totally understand *why* variables must be effectively final inside lambdas. but sometimes getting around that with an AtomicReference by dynamically adding a bunch of action listeners can lead to some ridiculously ugly type signatures. [09:41]
dreamreal deathcap: this should surprise you 0% [09:41]
deathcap Pair<JTextField,Supplier<Consumer<String>>> [09:41]
deathcap but hey, i just managed to save a whole heck of a lot of repetition. [09:42]
dreamreal now the question you ask yourself is if it was worth it [09:42]
deathcap Totally. [09:43]
dreamreal wins all around then [09:43]
yawkat deathcap: at some point you should just declare your own types you know [09:43]
yawkat Pair especially is pretty much meaningless [09:43]
dreamreal especially given THAT signature [09:45]
deathcap Neither of you are wrong. [09:45]
rruizt [rruizt!~rruizt@83-84-23-124.cable.dynamic.v4.ziggo.nl] has joined ##java [09:46]
feannag [feannag!~user@2405:204:902c:c4c1:e113:7b3b:3906:64f7] has joined ##java [09:46]
sleepywitch [sleepywitch!~sleepywit@cpe-24-55-21-107.austin.res.rr.com] has joined ##java [09:48]
sleepywitch https://i.redd.it/3bqhuz9g0nx31.jpg [09:49]
deathcap But since there aren't tuples built in and I have only 4 different pairs of JTextFields used to edit a string field in a particular class, the extra scaffolding of creating a class "TextFieldConsumerSupplier" seems a bit superfluous. [09:49]
sleepywitch rip wrong channel [09:49]
yawkat it's four lines with lombok [09:49]
deathcap lombok? [09:50]
yawkat lombok [09:50]
yawkat yawkat, lombok is a tooling (compiler and IDE) plugin that removes boilerplate. For example, it adds getters, setters, equals, hashCode, builders, etc for you. Works in eclipse, intellij, netbeans, javac, maven, ant, etc. https://projectlombok.org/ [09:50]
sleepywitch popular boiler plate plugin [09:50]
deathcap Damn Indonesion island names. [09:51]
AcTiVaTe [AcTiVaTe!~activate@host-m7ku8h.tnz1.zeelandnet.nl] has joined ##java [09:53]
Cuby96 [Cuby96!3e440562@62.68.5.98] has joined ##java [09:53]
feannag parted the channel: "ERC (IRC client for Emacs 26.3)" [09:54]
Cuby96 Hey there, just wanted to ask about exceptions in very general, what else i could include as topics into my paper which i am writing on for college about exceptions, as i already included how they work, how they are able to be catched, the hierarchy of classes and the ability to nest exceptions, also the differences between exceptions and errors. [09:56]
Cuby96 do you guys know any other topic i could mention? [09:56]
yawkat exceptions [09:56]
yawkat exceptions are a mechanism to return from a method indicating something extra-ordinary has occurred. They are used to handle errors of all sorts. Read all about it: https://javachannel.org/posts/deep-dive-all-about-exceptions/ and at the tutorial https://docs.oracle.com/javase/tutorial/essential/exceptions/ [09:56]
Cuby96 Alright i skimmed the text most of that is already mentioned in my first post [09:59]
Cuby96 the topic of my paper is about "Annotations and Exceptions" so what construct is a quite good one to make a good flow from the exception topic to annotations? [10:05]
indistylo [indistylo!~aruns_@106.51.26.248] has joined ##java [10:13]
Eduard_Munteanu [Eduard_Munteanu!~Eduard_Mu@86.121.174.147] has joined ##java [10:20]
indistylo [indistylo!~aruns_@106.51.26.248] has joined ##java [10:21]
rajrajraj [rajrajraj!uid72176@gateway/web/irccloud.com/x-upukxbxbrfrrgalr] has joined ##java [10:23]
presiden [presiden!fwiw@unaffiliated/matematikaadit] has joined ##java [10:31]
led_dark_1 [led_dark_1!~Thunderbi@217.66.160.14] has joined ##java [10:33]
royal_screwup21 [royal_screwup21!89de72f4@gateway/web/cgi-irc/kiwiirc.com/ip.137.222.114.244] has joined ##java [10:36]
cheeser they are completely orthogonal so ... none? [10:37]
cheeser you could always go for the classic monty python reference: "and now for something completely different." [10:38]
Cuby96 welp, my supervisor told me annotations and exceptions have something build on each other as a hint for getting deeper into the topic [10:39]
deathcap They're both language features. [10:39]
deathcap So I guess there's that. [10:39]
cheeser they do not build on each other, no. [10:40]
eippw [eippw!~eippw@172.76.91.7] has joined ##java [10:42]
immibis [immibis!~immibis@p200300F1C70F8809288DA02DAB50F930.dip0.t-ipconnect.de] has joined ##java [10:42]
Cuby96 hm i see [10:43]
indistylo [indistylo!~aruns_@106.51.26.248] has joined ##java [10:47]
alexi5 feels ashamed to blame the VM for a bug he had in his application [10:55]
cheeser it's almost always your code. general rule of thumb. [10:59]
cheeser D [10:59]
royal_screwup21 [royal_screwup21!89de72f4@gateway/web/cgi-irc/kiwiirc.com/ip.137.222.114.244] has joined ##java [11:04]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [11:06]
LunarJetman [LunarJetman!LunarJetma@5ec1bc5a.skybroadband.com] has joined ##java [11:07]
plarsen [plarsen!~plarsen@redhat/jboss/pdpc.professional.plarsen] has joined ##java [11:11]
indistylo [indistylo!~aruns_@106.51.26.248] has joined ##java [11:13]
shantaram [shantaram!uid207478@gateway/web/irccloud.com/x-vbjasevzkuimuweq] has joined ##java [11:17]
Stummi I have met some people who always blame their platform/framework/library first if something does not work [11:18]
Stummi because you know, the thing that is in use thousands or million times is more likely to have some obvious bug than your code [11:18]
cheeser well, when i'm the greatest coder to ever sling code, of course it's someone else's fault. [11:19]
plarsen [plarsen!~plarsen@redhat/jboss/pdpc.professional.plarsen] has joined ##java [11:34]
indistylo [indistylo!~aruns_@106.51.26.248] has joined ##java [11:34]
indistylo [indistylo!~aruns_@106.51.26.248] has joined ##java [11:36]
royal_screwup21 [royal_screwup21!89de72f4@gateway/web/cgi-irc/kiwiirc.com/ip.137.222.114.244] has joined ##java [11:40]
ExtraCrispy [ExtraCrispy!~ExtraCris@gateway/tor-sasl/extracrispy] has joined ##java [11:48]
ExtraCrispy [ExtraCrispy!~ExtraCris@gateway/tor-sasl/extracrispy] has joined ##java [11:50]
ExtraCrispy [ExtraCrispy!~ExtraCris@gateway/tor-sasl/extracrispy] has joined ##java [11:51]
ExtraCrispy [ExtraCrispy!~ExtraCris@gateway/tor-sasl/extracrispy] has joined ##java [11:53]
newtothisv21 [newtothisv21!~Shinigami@2600:6c56:6e00:5b4:155:6369:819e:fb05] has joined ##java [11:53]
newtothisv21 I know this isn't the place but could I ask a simple SQL question here? [11:54]
yawkat off topic [11:54]
yawkat Anytime you start a statement with something like "this is kind of off topic," do us all a favor and stop. ask it somewhere else or just go to google.com and search there. [11:54]
yawkat try ##sql [11:54]
ExtraCrispy [ExtraCrispy!~ExtraCris@gateway/tor-sasl/extracrispy] has joined ##java [11:54]
kicked ExtraCrispy (Banned: please fix your connection. you're bouncing in and out. this ban will expire after 4h) [11:54]
yawkat or whatever it's called [11:54]
newtothisv21 Yeah I tried #sql and #mysql, and ##programming but no one is interested, lol [11:55]
cheeser that *is* hilarious [11:55]
newtothisv21 I'm so close too, feel free to shoot me a private message if you can spare 5 minutes of your time [11:55]
Goplat [Goplat!~Goplat@reactos/developer/Goplat] has joined ##java [11:58]
eippw [eippw!~eippw@172.76.91.7] has joined ##java [12:00]
indistylo [indistylo!~aruns_@106.51.26.248] has joined ##java [12:03]
hooper [hooper!~hooper@2a01:e0a:191:c7b0:20a6:662f:c343:454d] has joined ##java [12:17]
surial Cuby96: both exceptions and annotations are mostly 'normal' java types (they extend things, implement things, act as normal types), except some voodoo magic type is hardcodedly decreed as significant for the language itself. For exceptions, it's java.lang.Throwable: That type, and any subtype thereof, IS throwable, as in, you can use the language construct 'throw expr;' to do so, provided expr is of type Throwable. [12:20]
surial Cuby96: annotation is somewhat similar, in that, annotations ARE a subtype of java.lang.Annotation. [12:20]
indistylo [indistylo!~aruns_@106.51.26.248] has joined ##java [12:20]
surial That is utterly uninteresting except for language wonks. But, hey, gun to my head 'find a similarity between annotations and exceptions', I guess there is that. [12:20]
Cuby96 i know some sql so hit me up [12:21]
Cuby96 surial: so the only similarities they share is that they are java types and thats it? sounds weird [12:23]
Secret-Fire [Secret-Fire!~Secret-Fi@97-120-114-69.ptld.qwest.net] has joined ##java [12:23]
surial well, a language feature where part of how it work is intertwined with a type in the java.lang package. [12:23]
dob1 well I am becoming a bit crazi about encoding and accents: I am printing to console 2 strings: windows: on eclise console both OK, on Conemu console both bad (no accents), on cmd both bad. Linux: running on console 1 OK other one Bad.... I don't know what to do [12:23]
surial most language features don't work like that. [12:23]
Cuby96 weird in that sense that my supervisor tells me they have something they share with each other, but just that trivial thing aight [12:23]
dob1 *crazy [12:23]
surial dob1: do not, ever, rely on platform default encoding. [12:23]
surial dob1: there are ways to tell your IDE to flag any method invocation as inherently broken (invoking that method, ever, is bad) ? that's one way to go. [12:24]
surial note that you're printing to console which is its own shitshow. [12:24]
surial cuz that involves an encoding as well. [12:24]
null1337 [null1337!~WhoAmI@c-73-243-212-197.hsd1.co.comcast.net] has joined ##java [12:25]
surial better way to emit a file in a known encoding (pick UTF-8. Always pick UTF-8), open it in a text editor that lets you explicitly configure encoding, make sure it is on UTF-8, and check if the output is okay. If it is, it's your console fucking it up. If not, it's your java code.. or the input. [12:25]
Secret-Fire [Secret-Fire!~Secret-Fi@97-120-114-69.ptld.qwest.net] has joined ##java [12:25]
dob1 surial, I am trying to build a command line program... [12:26]
surial sigh. [12:26]
surial Okay, jesus, fine, time for the noob lesson. [12:26]
dob1 I am getting crazy about this encoding [12:26]
surial you don't debug by taking a complex problem and staring at it intently. [12:26]
surial This is a not a fucking hollywood movie. [12:26]
surial You break it up in chunks. Reduce the problem space. [12:26]
dob1 surial, more simpler than "print a string" [12:27]
surial yes. [12:27]
dob1 this is my problem [12:27]
surial dob1: you are actually literally testing System.out.println("Hello, Wörld!");? [12:27]
surial why didn't you say that. [12:27]
surial asking vague questions when you could have been clearing at basically no effort is silly. [12:27]
surial When you save the text editor contianing your java code? Encoding is involved. Which encoding is it? [12:28]
dob1 I was thinking to rebuild the string something like new String(original, encoding), I don't know [12:28]
surial When you tell javac to compile it? Encoding is involved. which encoding did you provide it? [12:28]
surial When you emit to the console, things.. should work out, but encoding is involved there too. [12:28]
surial The error is in at least 1 of these 3 places. Check and verify one by one. [12:28]
surial if you don't know how - start by pasting your full code AND how you get it compiled. If it's an IDE, mention that. [12:28]
dob1 surial, I an agree with you BUT why on linux I see one ok and the other one not ok and they are using the same accent? [12:29]
surial because any of those 3 things is different. duh. [12:29]
dob1 file.txt: text/plain; charset=utf-8 [12:29]
surial says who? [12:29]
dob1 file -i [12:29]
surial also that is not a java file [12:29]
dob1 I am reading the data from other files [12:29]
surial so apparently you read it in via java, which gets me back to my points earlier. [12:29]
surial for fuck's sake. okay, you're cut off. [12:29]
surial ask sane questions, include pastebins. You're so vague as to be useless. [12:30]
freebds [freebds!6f7ddd41@111.125.221.65] has joined ##java [12:30]
freebds where do i start learning data structures and algorithims from? [12:31]
deathcap freebds [12:31]
deathcap what kind of algorithms? and what kind of data structures? [12:31]
freebds yes sir [12:31]
freebds binary search, sorting [12:32]
freebds stack , queue [12:32]
deathcap Lots of googling, to be honest. [12:32]
makara1 [makara1!~sol@196.61.111.63] has joined ##java [12:33]
mluser-home [mluser-home!~mluser-ho@ip68-0-67-199.tu.ok.cox.net] has joined ##java [12:33]
wreed [wreed!~wreed@2601:645:8100:8480:70f2:6bdc:a120:5b6] has joined ##java [12:33]
deathcap the java collections api has a whole lot of information about specific ones build into Java by default like Maps, Lists, etc. [12:33]
freebds i follow this guy TechLead on youtube. he always talks about ds and algos [12:33]
dob1 surial, I am on windows, iso-8859-1 encoding. I read the first file via a FileReader. I read another, encoding charset=utf-8, I read it via a new FileInputStream(calendarFilename), Charsets.UTF_8) so I suppose I am reading them in the right way [12:33]
cheeser deathcap: java actually has no notion of those types. they're in the standard library but not the language [12:33]
dob1 surial, I am reading the files with the correct encoding [12:33]
deathcap cheeser: well...yeah. but anyone building anything of any significance is going be using that part of the standard library and they're still well documented. [12:34]
freebds deathcap one question, actually two [12:35]
freebds why do we use generics in non collection classes? for collections it provides type safety, but what about Comparable<T> ? [12:36]
deathcap Same reason. You can't compare an AssaultRifle with a Potato [12:37]
freebds ok i get it. so compareTo method gets the T argument? [12:38]
deathcap correct. [12:38]
freebds you are the best : ) [12:38]
freebds thanks [12:38]
deathcap i don't know about the best, i'm pretty wack compared to a lot of people here! [12:38]
freebds wack? [12:39]
deathcap lame [12:39]
freebds hmm [12:39]
freebds then what am i? [12:39]
deathcap you tell me! [12:39]
freebds barbarian? [12:41]
led1 [led1!~Thunderbi@217.66.160.14] has joined ##java [12:41]
freebds neanderthal? [12:41]
royal_screwup21 [royal_screwup21!89de72f4@gateway/web/cgi-irc/kiwiirc.com/ip.137.222.114.244] has joined ##java [12:46]
ravenousmoose [ravenousmoose!~ravenousm@ptr-d6zu296t152z5xr4tlv.18120a2.ip6.access.telenet.be] has joined ##java [12:58]
dob1 surial, I got the problem. first of all "gradle run" , I don't know why, uses always a wrong encoding so I can't trust its output. But the problem is that I was reading on windows a file using the default windows encoding via FileReader (and the program was ok) but running the program on linux it was reading the file using default linux encoding utf-8, I had to specify the encoding reading it. new InputStreamReader(new FileInputStream(file), [01:13]
dob1 Charsets.ISO_8859_1). and this worked (it seems at least) [01:13]
surial dob1: it's not 'the wrong encoding', it's what it is. The mistake is you going with platform default, anywhere. [01:13]
surial I told you 'never go with system default encoding'. That was the very first thing I typed to you. [01:14]
dob1 surial, I don't think so, on conemu running gradle run gives wrong result, running it via java -jar file.jar gives right results [01:14]
surial only a moron would blame a million+ user tool over their own code so cavalierly. [01:14]
minos_ [minos_!~simonbosm@137-152-21-31.ftth.glasoperator.nl] has joined ##java [01:15]
surial No; gradle is simply choosing different system defaults. The point is, the systme default can be anything, and if your code relies on it being something specific, YOUR code is buggy. [01:15]
dob1 surial, it was buggy, yes [01:16]
dob1 but I just asked this, and nobody answered me, I think it's a noob question but I retry: I find the file encoding simplying using file -i, so you can detect it. so why this is not done automatically by java when you open a file? [01:18]
ravenousmoose [ravenousmoose!~ravenousm@ptr-d6zu296t152z5xr4tlv.18120a2.ip6.access.telenet.be] has joined ##java [01:18]
surial dob1: you can NOT detect it. [01:18]
surial file -i is just printing UTF-8 for shits and giggles. [01:19]
surial Every so often you can attempt to detect it, but it's heuristic. You're going by the notion that 'ü' is more commonly spotted amongst other plain jane alphabetic characters, than, say, ? [01:19]
dob1 surial, ok, someone gives you a file. how do you know what is this file encoding? [01:19]
surial you cannot know. [01:19]
surial whomever gave you the file should tell you what encoding it is in. [01:20]
sonOfRa dob1: you know by asking them. [01:20]
sonOfRa A file is just a list of bytes. You can, for some files, deduce what encoding it is *not* [01:20]
sonOfRa But you can never for certain know what encoding it *is* [01:20]
surial quite so. [01:20]
dob1 sonOfRa, let's say then, if it its encoding is utf-8, at least can you know this? [01:21]
sonOfRa You can guess, but you cannot know. [01:21]
surial file -i is guessing, using rather complicated algorithms that also require reading the entire file. Java should definitely not be doing what file is doing: It is unreliable, requires reading a lot of the data (and java intentionally lets you stream data, but, that means it can't start reading a whole bunch to attempt a wild stab in the dark as to encoding), and requires continuous updating as new lessons are learned and [01:21]
surial languages around the world change. java core libs need clear specifications; they'd need continuous updating, it'd be a nightmare. [01:21]
surial dob1: no, you cannot know. [01:21]
dob1 it's complicated in this way too [01:22]
dob1 if you can just guess [01:22]
surial dob1: there is no encoding you can know for sure. The ones that are easiest to guesstimate is any file starting with the byte sequence 0xFE 0xFF as well as 0xFF 0xFE. Those are almost always UTF16-LE respecively UTF16-BE. But UTF16 (either variant) is a pisspoor format otherwise, and the fact that it is somewhat common that they start with that marker (and no other encodings commonly do) isn't a good enough reason to go: Fuck [01:23]
surial it, let's all go with UTF-16! Nor is it a good reason to write java's 'I turn bytes into characters' methods into 'if I spot a 0xFEFF or 0xFFFE I'll consider it UTF16, either. [01:23]
surial dob1: it's not complicated at all. [01:23]
surial dob1: it's simple. [01:23]
sonOfRa Does gradle not *warn* you if you use platform default encoding? [01:23]
surial you wanna turn bytes into chars? Okay. Specify which encoding. [01:23]
surial That's easy. [01:23]
sonOfRa Because maven very much yells at you every single time you invoke it if you're not specifying an encoding [01:23]
dob1 surial, al least utf-8, know if the file use utf-8. it's not windows doing this with bom? [01:24]
surial no. [01:24]
surial BOM is that 0xFEFF thing, and it is not customarily emitted for ANY encoding.. except specifically UTF-16, which is a rarely used encoding. [01:25]
dob1 ok my bad [01:25]
surial No UTF_8 printer I know of Throws a BOM in there for shits and giggles. BOM is for 'byte order mark', something that is not relevant to UTF_8, so shoving a BOM in there just as a marker 'I am UTF-8!' is.. weird. [01:25]
dob1 I would appreciate it :) [01:26]
surial THere is NO WAY to know if any given text file is any given encoding. Not utf-8, not win-cp252, not iso-8859-1 or any other 8859, not ucs2, and usually not utf-16 either. [01:26]
surial that's just not how it owrks. Now, for almost all encodings (but NOT UTF-16; it has the upside of that BOM, but it has a lot of downsides), if your text is ALL ascii, it's the same byte sequence regardless of encoding. [01:26]
surial so if you take the strin g"Hello, World!", encode it to bytes in UTF_8, read it as US_ASCII, write it as Win-Cp252, and then read it back in as ISO-8859-1? [01:27]
surial It's still "Hello, World!". Throw in anything not in the 32-127 ASCII range and all those characters'd be quite well mangled. [01:27]
dob1 surial, there are accents in your native language? [01:27]
surial I assume you usually deal solely with such chars in your files, so you wouldn't notice if a text editor or whatnot picks the wrong encoding. [01:27]
surial not many and rarely typed. [01:27]
surial But _I_ never fuck this up. [01:27]
dob1 surial, you are not so affected by the problem [01:27]
surial I always save and read all my shit explicitly in UTF-8, and I go out of my way in java to always specify that. [01:28]
surial so even if I lived in korea and typed only hangul, this would not affect me, but that's because I nkow how it works and I wrote proper code. [01:28]
surial dob1: try to grok this bit: Anytime, _ANY TIME_, you convert bytes to chars or vice versa, either [A] the method call you use to do this involves passing in a Charset, or [B] is a bug. [01:29]
dob1 yes, ok if all the ppl use utf-8 the problem is gone [01:29]
surial so, new FileReader("foo.txt")? BOOM! Bug [01:29]
surial That's turning bytes (files and network connections are always bytes) into chars (Reader kinda gives it awya: Readers deal in chars), but no charset encoding specified. therefore, broken. do not use. [01:30]
surial If it were up to me, those methods'd get an @Obsolete tag, but regrettably it is not. [01:30]
dob1 on FileReader? [01:30]
surial dob1: tell that to microsoft, who is the main holdout for not using UTF_8. At this point all common linuxen as well as macosx default to UTF_8, which helps a lot. [01:30]
surial dob1: yes, because that FileReader constructor should have been: new FileReader("foo.txt", StandardCharsets.UTF_8); and there shouldn't BE a constructor that does NOT take a charset. [01:31]
surial turns out there isn't even one that does. FileReader really is fucking idiotic and shouldn't ever be used. [01:31]
dob1 surial, but you cannot change default encoding now, I mean many ppl will have their old file... how do you explain them that they are not going to read them in the right way? [01:31]
TlrDr [TlrDr!~tlrdr@126-180-35-213.dyn.estpak.ee] has joined ##java [01:31]
surial it's 2019, almost 2020. We don't do it that way anymore. Try Files.newReader(Paths.get("foo.txt")); // as a nicety, all the non-charset-taking methods specifically in java.nio.file.Files all default to UTF-8 and NOT platform default. [01:31]
ernimril FileReader has a Charset constructor @since 11 [01:32]
surial dob1: an excellent question, but entirely off-topic for the channel. [01:32]
surial ernimril: sigh. what teh fuck, oracle? [01:32]
surial It should have had an @Obsolete since 11. [01:32]
surial There is zero reason to ever use FileReader. ever. no matter how academic you make it, unless we bring in 'to be compatible with old cruft'. which is fine, that's why it should stay.. with an @Obsolete annotation. [01:32]
ernimril well, now it is possible to use it correctly, but I agree, it is not a class I would recommend [01:33]
dob1 surial, but we are talking about text files, does document files, like .doc or whatever contains a metadata about encoding at least? [01:35]
surial yes, they almost always do. [01:35]
ernimril but note that the metadata may be in the file or in the specification of the format [01:36]
surial dob1: for example, JSON is defined as ... always in UTF-8. That's easy. [01:36]
ernimril xml is a funny thing, file encoding is in the file, so you have to guess first and open the file and read off the encoding and then you can close and open it as it ought to be open [01:36]
m3pow [m3pow!~m3pow@176.223.2.223] has joined ##java [01:36]
IRCNew [IRCNew!~Elrick@76-10-173-219.dsl.teksavvy.com] has joined ##java [01:37]
BShaftoe12349 [BShaftoe12349!~blahlblah@2605:e000:1520:429b:ade6:483f:fb7a:f525] has joined ##java [01:40]
bolt [bolt!~r00t@unaffiliated/bolt] has joined ##java [01:42]
sonOfRa I wonder if you can produce an xml file that has a corrupted encoding tag that borks editors depending on how they try to open it on the first try, now [01:44]
ravenousmoose [ravenousmoose!~ravenousm@ptr-d6zu296t152z5xr4tlv.18120a2.ip6.access.telenet.be] has joined ##java [01:44]
mbooth sonOfRa: XML files can certainly declare one encoding and be another. [01:47]
sonOfRa I'm imagining something more insidious, where you declare an encoding that gets read by the editor on first try as X, and when you actually open it as X, the xml will say encoding Y [01:48]
zalt [zalt!~lambda443@unaffiliated/lambda443] has joined ##java [01:49]
minos_ [minos_!~simonbosm@137-152-21-31.ftth.glasoperator.nl] has joined ##java [01:55]
mbooth sonOfRa: Just putting a byte-order-mark at the start of a UTF-8 encoded file will screw with plenty of brain-dead editors [02:05]
mbooth No need to bring XML into it :-) [02:06]
gelignite [gelignite!~gelignite@55d46af5.access.ecotel.net] has joined ##java [02:10]
surial sonOfRa: custom crafting an XML file that borks readers that read it? That's... not much of a challenge. XML offers tons of ways to fuck up readers. [02:11]
surial I bet there are boatloads of scecurity leaks still; given that most folks moved on to other formats means there's less research being poured into it. [02:11]
sonOfRa surial: specifically via encoding, though! [02:13]
SpiceMan uhm. you can't switch the encoding of a file?stream?whatever in Java? [02:14]
ravenousmoose [ravenousmoose!~ravenousm@ptr-d6zu296t152z5xr4tlv.18120a2.ip6.access.telenet.be] has joined ##java [02:17]
Bombe That sentence has multiple levels of misunderstandings. [02:17]
recon_dsk [recon_dsk!~mec@185.167.198.36] has joined ##java [02:20]
bitwinery [bitwinery!~bitwinery@c-73-37-18-139.hsd1.wa.comcast.net] has joined ##java [02:20]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [02:32]
SpiceMan no, I just don't know java nor lingo. a file is just raw data. how you interpret (decode) the next bit is arbitrary. [02:34]
SpiceMan *nor java lingo [02:34]
SpiceMan the 4 first bytes of an XML file are very telling. BOM or not BOM. they narrow possible encodings a great deal. [02:35]
SpiceMan specifically, I'm addressing 03:36 <ernimril> xml is a funny thing, file encoding is in the file, so you have to guess first and open the file and read off the encoding and then you can close and open it as it ought to be open [02:36]
SpiceMan which is untrue for all languages I know [02:36]
Bombe Yes and no. All the Reader implementations in the JDK generally can not switch their encoding after being created. [02:43]
Bombe However, nothing stops you from writing a reader that can actually do that. [02:43]
Bombe And while I?m sure that there are implementations that actually switch the charset during decoding I?m quite sure that the default XML parser implementations in a lot of languages/SDKs fail miserably if you construct an XML file carefully. [02:45]
patientplatypus [patientplatypus!~patientpl@2604:2000:800d:e400:e5b4:f938:b3e2:7b9b] has joined ##java [02:56]
patientplatypus https://github.com/ruippeixotog/scala-scraper/issues/88 [02:56]
patientplatypus patientplatypus's title: "Unresolved Dependency on Import in Build.SBT (Scala/Play 2.7) Issue #88 ruippeixotog/scala-scraper GitHub" [02:56]
patientplatypus if anyone has any ideas please let me know [02:56]
rruizt [rruizt!~rruizt@83-84-23-124.cable.dynamic.v4.ziggo.nl] has joined ##java [03:08]
SpiceMan Bombe: fair enough [03:16]
dreamreal patientplatypus: um, this may be a better question for the scala-scraper project. [03:23]
dreamreal This is ##java. [03:23]
patientplatypus k [03:23]
dob1 surial, if uft-8 is what can be used for all the files around the world what is the meaning of several utf-8 encoding? en_GB, us_US, etc ? in what they differ? [03:29]
dob1 ah no, I got it nevermind :) [03:30]
dob1 sorry for the stupid question [03:31]
Aquazi [Aquazi!uid312403@gateway/web/irccloud.com/x-qypjmydcgkyitwhi] has joined ##java [03:33]
Aquazi hello [03:33]
orbyt_ [orbyt_!~orbyt@172.92.5.20] has joined ##java [03:33]
Aquazi need to do a task for a friend of mine, and I don't really know Java [03:33]
Aquazi don't really get arrays [03:33]
Aquazi I have String[] inputNames = new String[2]; then I want to add two strings with Scanner [03:34]
Aquazi but it doesn't let me do inputNames.add(foo) [03:34]
Aquazi I'm basically looking for the equivalent of .push method in JS [03:35]
ravenousmoose [ravenousmoose!~ravenousm@ptr-d6zu296t152z5xr4tlv.18120a2.ip6.access.telenet.be] has joined ##java [03:35]
ChaiTRex Aquazi: inputNames[0] = "hello"; [03:37]
ChaiTRex Aquazi: similarly with [1] [03:37]
mbaxter You've created an array that will hold precisely two strings. You can set inputNames[0] and [1] to things as above. [03:37]
Aquazi ok and if I declared it without any length? couldn't I push stuff in it? [03:38]
ChaiTRex Aquazi: for a push methos, use an ArrayList<String> with .add [03:38]
Aquazi do I have to import ArrayList? [03:38]
mbaxter If you're looking to do things like inputNames.add(foo) you want a Collection. Probably a List or a Set. The ArrayList implementation would work, as Chai said [03:38]
ChaiTRex Aquazi: arrays are fixed size, arraylists aren't [03:38]
ChaiTRex Aquazi: import java.util.ArrayList; [03:39]
mbaxter Presumably you're using an IDE that can help you with these things? [03:39]
Aquazi if I declare it with a length, like 3, indexes are 0, 1, 2 right? [03:39]
royal_screwup21 [royal_screwup21!89de72f4@gateway/web/cgi-irc/kiwiirc.com/ip.137.222.114.244] has joined ##java [03:39]
ChaiTRex Aquazi: with arrays, yes [03:39]
Aquazi is there a .forEach method? [03:42]
ChaiTRex Aquazi: for (String str : list) { [03:43]
Aquazi it's like doing stringList.forEach(str => {}) in js right [03:43]
Aquazi list is the name of the list? [03:44]
ChaiTRex Aquazi: yes, though no modifying the list while it's in progress [03:44]
ChaiTRex Aquazi: yep, list is your list variable name [03:44]
Aquazi thx, sorry for bothering [03:44]
ChaiTRex Aquazi: you're welcome [03:44]
Aquazi but its 10 pm sat night and I've been forced to solve this [03:44]
Aquazi about println [03:48]
Aquazi for (String str: list) { System.out.println(str); } [03:49]
Aquazi prints str1 [03:49]
Aquazi str2 [03:49]
Aquazi str3 [03:49]
Aquazi if I add \n at the end then it adds a \n at each str [03:49]
ChaiTRex Aquazi: the print method prints it, println adds a newline wt the end for you. [03:50]
Aquazi oh right, sorry [03:50]
ChaiTRex Aquazi: if you're getting commas you don't want, that's from your parser putting commas in the strings you add to the list [03:52]
Aquazi yeah, makes sense [03:53]
Aquazi something seems inconsistent about reading from console... [03:53]
Anthaas [Anthaas!~Anthaas@unaffiliated/anthaas] has joined ##java [03:58]
michele [michele!~eraser@unaffiliated/michele] has joined ##java [03:58]
con3 [con3!~kvirc@154.119.40.183] has joined ##java [04:07]
veegee [veegee!~veegee@ipagstaticip-3d3f7614-22f3-5b69-be13-7ab4b2c585d9.sdsl.bell.ca] has joined ##java [04:09]
z3t0 [z3t0!~z3t0@z3t0.powered.by.lunarbnc.net] has joined ##java [04:10]
ogradyd [ogradyd!~Thunderbi@2a02:8070:88bf:9df0::577] has joined ##java [04:12]
ipee [ipee!~ipe@91-156-247-55.elisa-laajakaista.fi] has joined ##java [04:15]
locustlord [locustlord!~tech@S0106f0f249e2c023.va.shawcable.net] has joined ##java [04:16]
con3|2 [con3|2!~kvirc@154.119.40.183] has joined ##java [04:18]
locustlord I'm wondering [04:18]
locustlord what's the easiest way to automatically create a variable? [04:18]
locustlord assuming I'm parsing from a source file [04:19]
locustlord for example [04:19]
locustlord if I say "read x" in my source file [04:19]
locustlord I'd want the program to create a variable called x [04:19]
ChaiTRex locustlord: HashMap<String, whatever> [04:20]
ChaiTRex locustlord: vars.put("x", whatever); [04:21]
ChaiTRex locustlord: gets more complicated if you want scopes, though. [04:21]
jaziz [jaziz!~jaziz@unaffiliated/jaziz] has joined ##java [04:27]
rruizt [rruizt!~rruizt@83-84-23-124.cable.dynamic.v4.ziggo.nl] has joined ##java [04:28]
locustlord why is using eclipse the most confusing part of all this [04:29]
adder [adder!~adder@gateway/tor-sasl/adder] has joined ##java [04:35]
RedSoxFan07 [RedSoxFan07!~Thunderbi@d-137-103-109-45.ct.cpe.atlanticbb.net] has joined ##java [04:46]
minos_ [minos_!~simonbosm@137-152-21-31.ftth.glasoperator.nl] has joined ##java [04:47]
recon_dsk locustlord: because IDE's tend to get in the way of learning a programming language, not help. [04:48]
fstd [fstd!~fstd@unaffiliated/fisted] has joined ##java [04:59]
wreed [wreed!~wreed@2601:645:8100:8480:70f2:6bdc:a120:5b6] has joined ##java [05:04]
mluser-home [mluser-home!~mluser-ho@ip68-0-67-199.tu.ok.cox.net] has joined ##java [05:18]
michele [michele!~eraser@unaffiliated/michele] has joined ##java [05:24]
Xe4roX [Xe4roX!~Xe4roX@unaffiliated/xe4rox] has joined ##java [05:28]
Suya [Suya!~Suya@gateway/tor-sasl/suya] has joined ##java [05:39]
patientplatypus [patientplatypus!~patientpl@ool-4579337b.dyn.optonline.net] has joined ##java [05:41]
patientplatypus hi [05:41]
patientplatypus query: [05:41]
patientplatypus is there a cooked solution for extracting english sentences from english mixed with html? [05:41]
patientplatypus i dont know an easy solution off the top of my head, and i figure its either a solved problem or mathematically "hard" [05:41]
Aquazi why does str.toUpperCase() gives me cannot find symbol etc etc? [05:44]
Aquazi @ChaiTRex [05:44]
ChaiTRex Aquazi: either str isn't String, toUpperCase is misspelled, there are arguments [05:46]
Aquazi I have it inside an initializatioj [05:46]
Aquazi String secondNameUpperCase = secondName.toUppercase(); [05:46]
Aquazi oh.... [05:46]
Aquazi you were right <3 [05:46]
Aquazi working without an ide [05:46]
ChaiTRex Aquazi: also, cool trick for Java is Google: java 8 classname [05:48]
ChaiTRex Aquazi: 8 is the Java version you're on [05:48]
ChaiTRex Aquazi: brings up all the methods that are available in a handy reference [05:48]
Stummi patientplatypus, well, theres JSoup for html parsing. I think just accessing text-nodes and stripping out any html tags should be easy with that, if this is what you are looking for [05:51]
patientplatypus sure [05:51]
patientplatypus thats probably the best solution for the moment actually [05:52]
Aquazi thank you [05:52]
Aquazi completed the exercise [05:52]
Aquazi now I'm gonna fuck black bitches [05:52]
Aquazi cya.3 [05:52]
RoriconKnight [RoriconKnight!~RoriconKn@120.188.66.133] has joined ##java [06:01]
locustlord how do I figure out what version of java I have? [06:08]
locustlord nvm [06:10]
locustlord ChaiTRex, I'm confused as to how to use hashmap [06:11]
ChaiTRex locustlord: what are you confused about? [06:13]
locustlord the whatever part [06:13]
locustlord should I be putting my own class in place of whatever [06:13]
ChaiTRex locustlord: Oh, whatever is the class of objects you can assign to each variable [06:14]
ChaiTRex locustlord: So, perhaps: HashMap<String, Double> vars = new HashMap<>(); vars.put("x", 2.0); [06:15]
locustlord ah ok [06:15]
locustlord so how is this helping me create new variables? [06:16]
ChaiTRex locustlord: You can also use an interface name or even the Object class to hold multiple types. [06:16]
locustlord when I read from a file [06:16]
plitter [plitter!~plitter@78.31.86.243] has joined ##java [06:16]
ChaiTRex locustlord: It holds the values assigned to each variable. [06:17]
locustlord the code isn't matching the thoughts in my head [06:17]
ham [ham!~z0mbie@unaffiliated/ragnarokkr] has joined ##java [06:18]
ChaiTRex locustlord: what are you thinking about? [06:18]
locustlord I'm thinking like if line == "read x" then create int x [06:19]
ChaiTRex locustlord: Java won't let you create a Java variable directly. [06:19]
locustlord ok [06:20]
ChaiTRex locustlord: At runtime, I mean. [06:20]
locustlord so how do I use hashmap to do this? [06:20]
locustlord it just looks like another abstract data type to me [06:20]
ChaiTRex locustlord: HashMap lets you store a value for each key. [06:21]
locustlord yeah ok [06:22]
locustlord I still have the same problem [06:22]
locustlord of not being able to create a variable [06:22]
ChaiTRex locustlord: So, map.get("x") will give you the value stored for key "x". [06:22]
locustlord yeah ok [06:22]
locustlord I'm not following [06:22]
ChaiTRex locustlord: So you just use the variable name as the key. [06:22]
locustlord I don't see the different between that and calling an array at index x [06:23]
ChaiTRex locustlord: It's quite similar, except arrays have you stuck with int keys that are consecutive. [06:23]
locustlord this isn't solving my problem [06:24]
ChaiTRex locustlord: HashMaps are like arrays with whatever as the key instead of a low int value. [06:24]
locustlord yeah that was my impression [06:24]
ChaiTRex locustlord: What is the problem? [06:24]
locustlord I'm really scratching my head at how I'm supposed to use it [06:24]
locustlord to create variables [06:24]
locustlord wait a minute [06:25]
locustlord nope nevermind [06:25]
locustlord I didn't figure it out [06:25]
ChaiTRex locustlord: Well, you can assign and use variables, right? [06:25]
locustlord I'm trying to write an interpreter in java [06:26]
locustlord and I'm starting with the hard part - handling the creation of variables [06:26]
locustlord I can assign values [06:26]
locustlord but it doesn't matter that I can do it [06:26]
locustlord I need the user of the interpreter to be able to assign values [06:27]
locustlord and use variables [06:27]
ChaiTRex locustlord: Generally, you'll need to be able to set and retrieve a value from a given variable name. [06:27]
locustlord ? [06:28]
ChaiTRex locustlord: Sorry, I don't understand that question. [06:28]
locustlord if I write read x in my language [06:28]
locustlord it should create variable x [06:28]
locustlord or the illusion of it [06:29]
ChaiTRex locustlord: does it do more, like reading from the keyboard what x's value should be? [06:29]
locustlord I'm worrying about that once I get to it [06:30]
locustlord and that's also much easier [06:30]
ChaiTRex locustlord: I really wouldn't recommend that. [06:30]
locustlord anyway [06:30]
ChaiTRex locustlord: Given you don't know how to do it, how do you know what's easier to do? [06:31]
locustlord well I do know how to do the second part [06:31]
locustlord for one [06:31]
locustlord so I guess that's how [06:31]
ChaiTRex locustlord: How do you do the second part? [06:31]
locustlord I'm gonna use BufferedReader [06:32]
locustlord whoops that's for reading from the file [06:32]
locustlord Scanner is for the keyboard [06:32]
ChaiTRex locustlord: You're just going to read it and do nothing with what you read or is there more? [06:33]
locustlord I'm making it go through a text file line by line [06:34]
locustlord I have stuff I've done before that works I can use [06:34]
locustlord dissext [06:34]
locustlord dissect [06:34]
buttsanchez [buttsanchez!~buttsanch@pool-71-172-148-224.nwrknj.fios.verizon.net] has joined ##java [06:34]
presiden so, basically, you want to associate a name with a value, right? so that when the user calling that name, you can return back the value? [06:35]
locustlord yes [06:35]
Deacyde [Deacyde!~Deacyde@unaffiliated/deacyde] has joined ##java [06:36]
presiden String name; int value; [06:37]
presiden for example [06:37]
presiden then you read the name and assign it to that variable [06:37]
presiden then read the value and assign it to another variable [06:38]
presiden and put them in the map [06:38]
kupi [kupi!uid212005@gateway/web/irccloud.com/x-ctcwmshmgxboytze] has joined ##java [06:38]
presiden as an example, when you get name = "x", and value = 10 [06:40]
presiden putting them inside the map means you get an association between the string "x" and value 10 [06:40]
locustlord oh I think I see what you're saying [06:40]
locustlord I should create a hashmap array [06:41]
locustlord and then put the value in as I read the file? [06:41]
presiden when your user wanna recall what's the value of "x" [06:41]
presiden you can get them from the map by using that key "x" provided by the user [06:41]
presiden afk [06:42]
DTZUZO [DTZUZO!~DTZUZO@S0106bcd165662a4d.vs.shawcable.net] has joined ##java [06:47]
locustlord ok this is gonna be a stupid question [06:51]
locustlord so bear with me [06:52]
locustlord how do I check to see if there's a certain word in a string [06:53]
Freshnuts [Freshnuts!~Freshnuts@71-222-32-230.lsv2.qwest.net] has joined ##java [07:05]
jmorris [jmorris!uid374834@gateway/web/irccloud.com/x-ekvcoekkwueqwkop] has joined ##java [07:06]
jaziz1 [jaziz1!~jaziz@unaffiliated/jaziz] has joined ##java [07:10]
somazero [somazero!~somazero@2600:8805:100:112:46a5:39e4:32f6:d475] has joined ##java [07:12]
somazero [somazero!~somazero@2600:8805:100:112:46a5:39e4:32f6:d475] has joined ##java [07:13]
LearnAllTheTime [LearnAllTheTime!~LearnAllT@2601:cc:4000:9db0::1dcd] has joined ##java [07:13]
upgrdman [upgrdman!~upgrdman@blender/artist/upgrdman] has joined ##java [07:18]
somazero [somazero!~somazero@2600:8805:100:112:46a5:39e4:32f6:d475] has joined ##java [07:19]
somazero [somazero!~somazero@2600:8805:100:112:46a5:39e4:32f6:d475] has joined ##java [07:20]
ChaiTRex locustlord: You can use a Scanner on a file. new Scanner(filename) or new Scanner(bufferedReader) [07:22]
ChaiTRex locustlord: For finding a word in a String without a Scanner, you can str.split(" ") and then check whether each word is your target word. [07:24]
BullShark_ [BullShark_!~weechat@2602:ffc5:30::1:6b5d] has joined ##java [07:24]
BullShark_ I've downloaded jdk-13.0.1_linux-x64_bin.deb from Oracle's webpage, installed it. And when I run update-alternatives --auto java, I get update-alternatives: error: no alternatives for java. Help please. [07:26]
ChaiTRex locustlord: str.split("\\s+") is even better if the words can be separated by whitespace that isn't spaces. [07:26]
ChaiTRex BullShark_: One sec. [07:26]
ChaiTRex BullShark_: On ubuntu etc, it can be easier to install oracle-java13-installer from this PPA: https://launchpad.net/~linuxuprising/+archive/ubuntu/java [07:29]
ChaiTRex ChaiTRex's title: "Oracle Java : Linux Uprising team" [07:29]
ChaiTRex BullShark_: It takes care, I think, of setting the alternatives. [07:29]
ChaiTRex BullShark_: here's also their instructions: https://www.linuxuprising.com/2019/09/install-oracle-java-13-on-ubuntu-linux.html [07:30]
ChaiTRex ChaiTRex's title: "Install Oracle Java 13 On Ubuntu, Linux Mint Or Debian From APT PPA Repository - Linux Uprising Blog" [07:30]
freespirit-girl [freespirit-girl!~D@unaffiliated/freespirit-girl] has joined ##java [07:32]
c0ns [c0ns!~c0ns@dslb-088-069-010-100.088.069.pools.vodafone-ip.de] has joined ##java [07:32]
BullShark_ According to that, I shouldn't use the deb that Oracle provides, so I will go ahead and remove it. [07:33]
freespirit-girl I have a question. Does anyone know if I can can watch entire Pearson's course before taking a class? [07:33]
freespirit-girl Because the professor who is teaching the course is supposed to be extremely difficult, I would really like to get a head start [07:35]
wreed [wreed!~wreed@2601:645:8100:8480:70f2:6bdc:a120:5b6] has joined ##java [07:36]
freespirit-girl I do not want to be rushed through the course without REALLY understanding what i am doing [07:36]
bitwinery freespirit-girl, class about java? [07:37]
freespirit-girl yes [07:37]
ChaiTRex BullShark_: Yeah, .debs are usually not set up to update with new bersions as well. PPAs that are kept updated are superior usually. [07:37]
bitwinery freespirit-girl, I don't know anything about Pearson. However any book or online class should do it for learning the language or programming [07:37]
bitwinery freespirit-girl, what will make the main difference is how much you practice yourself [07:38]
dreamreal freespirit-girl: why not do the java tutorial [07:38]
freespirit-girl introduction to java but from what I have read he expects the students to have a basic knowledge [07:39]
dreamreal it's free, it's canonical, it's trivial [07:39]
dreamreal freespirit-girl: exactly why you'd do the tutorial [07:39]
dreamreal tutorial [07:39]
dreamreal 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. [07:39]
freespirit-girl I would like to practice using Pearson's because i think that is what he uses [07:40]
dreamreal ummm... okay, that makes sense, but IMO you'd be better off doing the tutorial - if you cater to what you think he's teaching, you're likely to limit your knowledge [07:41]
dreamreal I don't know what pearson's access [07:41]
dreamreal BLEAGH. As far as pearson's course, whether you can watch the whole thing or not isn't something we can control. Good luck! [07:41]
openstruct [openstruct!~openstruc@unaffiliated/openstruct] has joined ##java [07:42]
hammond [hammond!proscan@gateway/shell/insomnia247/x-gsnxkuigcktjhbwy] has joined ##java [07:43]
bitwinery freespirit-girl, you may also have more chances contacting the teacher for advice and recommendation. He might have more appropriate suggestion and appreciate your interest in preparing for his class [07:43]
freespirit-girl I agree but I am a very structured person that does well when getting a grade and I know when the the course starts, he will literally fly through the assignments [07:43]
hammond so when working with a github repo is it prefered to use a local git install of just what the IDE offers? [07:43]
freespirit-girl bitwinery, I DID!! He never responde [07:43]
dreamreal freespirit-girl: right. But is the goal to actually learn java, or get a grade? [07:43]
freespirit-girl responded [07:43]
dreamreal hammond: *shrug* [07:44]
bitwinery hammond, I tend to prefer a local git install as do most of the people I know. [07:44]
freespirit-girl dreamreal, BOTH [07:44]
dreamreal I'd prefer local too because why would you want to depend on your IDE [07:44]
freespirit-girl I want to get a clear understanding and get a good grade [07:44]
bitwinery freespirit-girl, but tbh, there aren't many ways to learn java. At this stage, any resource would do and would give you a head start [07:44]
dreamreal freespirit-girl: well, doing the tutorial should accomplish both, while doing only the pearson stack would help with the grade [07:44]
openstruct Is there a way to tell which Java a project is using? I'm coming from the land of Ruby and am trying spice up my Java chops by working on an open source project. I've google around but can't seem to figure out how to tell if this is JavaEE/SE/whatever-e [07:44]
dreamreal openstruct: they're all just java [07:45]
dreamreal java EE is just java SE + some libs [07:45]
bitwinery openstruct, some projects do specify the versions. But that's left to the build system, if it does [07:45]
hammond idk... maybe somethings have to be done thru the IDE. like the first time I played with git i deleted my local project and then couldn't load it right, it was a maven account. [07:45]
dreamreal hammond: th.. [07:45]
dreamreal I... [07:46]
freespirit-girl I'm reading the advice you guys gave me [07:46]
hammond it happened. [07:46]
openstruct dreamreal: Ah, ok, how can I tell if some method or class is part of a specific library? Via the import? [07:46]
dreamreal hammond: ... errr [07:46]
bitwinery hammond, that's a problem between the keyboard and the chair. Not the IDE or git [07:46]
hammond xD [07:46]
dreamreal openstruct: yeah, although the actual dependency is going to be more valuable for that [07:46]
dreamreal hammond: "maven account" -- I don't think any of this means what you think it means [07:47]
openstruct dreamreal: That depends on the dependency manager right? In my case, this project is using Maven so I've referencing the different pom.xml files. [07:47]
hammond maven project, whatever... [07:47]
dreamreal openstruct: that's a build tool, not a "dependency manager" [07:47]
hammond ok I will continue now. [07:47]
dreamreal but yes [07:47]
bitwinery dreamreal, actually a project manager as it does more than building :p [07:47]
openstruct Gotcha, thanks for the pointers. This is a _very_ different world than Ruby. [07:48]
dreamreal bitwinery: thanks for the correction. [07:48]
royal_screwup21 [royal_screwup21!89de72f4@gateway/web/cgi-irc/kiwiirc.com/ip.137.222.114.244] has joined ##java [07:48]
ham [ham!~z0mbie@unaffiliated/ragnarokkr] has joined ##java [07:50]
wreed [wreed!~wreed@2601:645:8100:8480:b49b:346b:33f6:3fab] has joined ##java [07:50]
locustlord if I have a string [07:51]
locustlord and I find a character within the string [07:51]
locustlord how would I assign all the characters before the found character to a new string [07:52]
dreamreal locustlord: String newString=oldString.substring(0, indexOfFoundCharacter); [07:52]
locustlord thank you [07:53]
freespirit-girl the textbook i will have to buy is "Java How to Program Late Objects (w/Bind-In Access)" [07:54]
locustlord does "bind-in access" mean an online code in this context? [07:54]
dreamreal No clue [07:54]
freespirit-girl I am not sure, locustlord [07:55]
locustlord ok [07:56]
locustlord given that I find have a string [07:57]
locustlord if there's a number after the string [07:57]
locustlord how would I convert the number in the string to an integer [07:57]
dreamreal locustlord: have you considered doing the java tutorial? [07:57]
dreamreal I mean, these are not questions you should have to ask [07:57]
bitwinery freespirit-girl, that's super expensive for a book on java [07:57]
dreamreal javadoc String [07:57]
dreamreal dreamreal: http://bit.ly/2Sgzh1r [JDK: java.lang.String] [07:57]
dreamreal javadoc String [07:58]
dreamreal locustlord, dreamreal: http://bit.ly/2Sgzh1r [JDK: java.lang.String] [07:58]
bitwinery looks like it tries to cover a lot of things from OOP, to DBs to concurrency [07:58]
juhwad__ [juhwad__!~jaziz@unaffiliated/jaziz] has joined ##java [07:59]
bitwinery freespirit-girl, again, the book won't make a difference. If the book would make a difference in your learning, you would have bigger problems than that. The main thing for you is to get started and start writing some code. I also don't know your other classes (design principes, OOP, DBs...) but these are also interesting topics to learn about and get familiar with [08:01]
bitwinery in class, what makes the most difference between student who struggle to follow and the students who are ahead is how much prior experience they have had [08:02]
bitwinery * broad generalization based on my experience [08:02]
tadgh [tadgh!~tadgh@S0106b4fbe452f654.vc.shawcable.net] has joined ##java [08:02]
hammond what's a late object? a lazy object that's late too? [08:03]
bitwinery hammond, it's specific to the book methodology of teaching; https://answers.yahoo.com/question/index?qid=20110120090559AA3usq7 [08:05]
bitwinery bitwinery's title: "What's the difference between Java's early objects and late objects? | Yahoo Answers" [08:05]
ChaiTRex hammond: there's another book in series called early objects [08:05]
ChaiTRex hammond: so probably late is more advanced stuff with objects [08:05]
hammond ok [08:06]
locustlord ok I looked through the string methods [08:07]
locustlord I don't see which one I'd use to convert part of a string to an int [08:08]
hammond so i'm thinking of becoming a competitive programmer. [08:08]
ChaiTRex locustlord: there's stuff in there to get the numeric part. you can use the numeric part with a method in Integer or Long. [08:09]
dreamreal locustlord: do you know how to convert a string to an int at all? [08:09]
dreamreal I mean, think like a programmer here. [08:09]
locustlord well, I'd just parse the string for a number [08:10]
dreamreal would you really [08:10]
dreamreal javadoc Integer.parseInt(*) [08:10]
dreamreal dreamreal: http://bit.ly/2L6TNkS [JDK: java.lang.Integer#parseInt(CharSequence, int, int, int)]; http://bit.ly/2L38WDN [JDK: java.lang.Integer#parseInt(String)]; http://bit.ly/2L38Xrl [JDK: java.lang.Integer#parseInt(String, int)] [08:10]
dreamreal why wouldn't you... A) get the part of the string that represents the number and B) convert that PART OF THE STRING (from step A) to an integer [08:11]
acidjnk_new2 [acidjnk_new2!~acidjnk@200116b867594500f151fee9b6bd4577.dip.versatel-1u1.de] has joined ##java [08:11]
locustlord dreamreal, if I was designing the types [08:12]
dreamreal locustlord: again, do the java tutorial, you're missing baseline knowledge and approach here [08:12]
zalt [zalt!~lambda443@unaffiliated/lambda443] has joined ##java [08:12]
locustlord a string would be a list of chars and ints [08:12]
dreamreal heh [08:12]
locustlord so it'd be able to convert automatically [08:12]
dreamreal locustlord: I'm sure you would. [08:12]
dreamreal Alas, strings tend to be general-purpose collections of characters. [08:12]
locustlord I'm trying to get this done before today [08:13]
locustlord I kinda know how to use java [08:13]
locustlord kinda don't [08:13]
dreamreal yes, it's a two-minute thing, assuming you know basic java and how to code [08:13]
dreamreal no, you don't [08:13]
dreamreal so: learn basic java. You should be able to master this task in an hour. [08:13]
fstd [fstd!~fstd@unaffiliated/fisted] has joined ##java [08:13]
Bebef [Bebef!sbreit@phobos.bebef.de] has joined ##java [08:13]
locustlord dreamreal, again I'm looking in the documentation and I don't see how parseInt does what I want it to [08:14]
locustlord it says it parses the string argument as an integer [08:15]
locustlord I dno't understand what it means by that [08:15]
dreamreal and the bit where I said "A) get the part of the string that represents the number" meant nothing to you, I suppose [08:15]
dreamreal "do step 1, then step 2" "but all I want to do is step 2, how do I do that" "step 1, first" [08:15]
dreamreal int value=Integer.parseInt("5"); // value will now be 5, like maaaaagic [08:16]
locustlord wait it will [08:16]
locustlord ok the language in the documentation is super confusing [08:16]
dreamreal blinks [08:16]
locustlord because I read the part with parseInt [08:17]
locustlord it said it parses the string "as an integer" whatever the gobbledygook that means [08:17]
dreamreal uhhhhh [08:17]
dreamreal okay, I don't have the patience for this [08:17]
dreamreal you don't even know what an integer is? [08:17]
locustlord I know what an integer is [08:17]
locustlord I don't know what "as an" integer means [08:18]
dreamreal sighs [08:18]
locustlord it should be "for an" integer [08:18]
dreamreal it doesn't do it "for an" integer [08:18]
dreamreal look at the parameters and the returned values [08:18]
locustlord you're right [08:18]
locustlord it should be [08:18]
dreamreal parameter: "A string containing the int representation to be parsed" [08:18]
locustlord it parses the string in search of an integer [08:18]
dreamreal returns: "The integer value represented by the argument" [08:18]
locustlord hmm [08:18]
dreamreal it doesn't [08:18]
locustlord I'm reading the documentation very literally [08:19]
freespirit-girl Can Java be used for dispatching software ? [08:19]
locustlord so I don't get how an integer parses a string [08:19]
ChaiTRex locustlord: it won't search. the string needs to already by just the numeric characters. [08:19]
ChaiTRex be* [08:19]
ChaiTRex freespirit-girl: what do you mean by dispatching? [08:20]
freespirit-girl for subcontractor's such as, electricians [08:21]
dreamreal freespirit-girl: yes. [08:21]
ChaiTRex freespirit-girl: yes, it can be used to dispatch servicepeople [08:21]
dreamreal locustlord: you ... probably... are not cut out for this field [08:21]
dreamreal if you can't manage abstractions, programming is going to be verrrrrry oblique for you [08:22]
locustlord don't worry I'm not planning to be a programmer [08:22]
locustlord I've realized it already [08:22]
dreamreal nods [08:22]
locustlord trust me [08:22]
locustlord I am going to finish my compsci degree though [08:22]
dreamreal uhhhh... are you really [08:22]
locustlord yes [08:23]
locustlord I can still be a sysadmin [08:23]
dreamreal good on you, for the determination [08:23]
locustlord since I'm good at sysadmining stuff [08:23]
ChaiTRex locustlord: there should be an IT-specific degree. CS is usually programming and math focused. [08:25]
locustlord there is but it's a 2 year program [08:25]
ChaiTRex locustlord: ask around at your school to see what might be better for just sysadmin IT degree [08:25]
bitwinery locustlord, don't give up! Anyone can be a programmer [08:25]
locustlord and I'm already in my second year [08:25]
bitwinery locustlord, also keep an eye open for other areas. The field is wide and there are tons of opportunities. Also what you like now might be different in a few years. So don't paint yourself in a corner [08:26]
ChaiTRex locustlord: as far as getting through a CS degree, practice programming in your spare time, as it's your weak point. [08:27]
bitwinery (also not all the countries make such distinction between computer science and computer engineering. Sometimes there is no such distinction) [08:27]
locustlord if I print a hashtable [08:28]
locustlord what all should it output? [08:28]
bitwinery freespirit-girl, java runs on a lot of platforms! From high end servers, to mobile devices and all the way down to smartcards. Being a platform and language, you can write pretty much anything you want with it [08:28]
ChaiTRex locustlord: try it out and ask questions if you don't understand [08:29]
locustlord I did try it out [08:29]
freespirit-girl that is what I am reading [08:29]
locustlord I don't know if it's working right or if my code is bad [08:29]
somazero [somazero!~somazero@2600:8805:100:112:46a5:39e4:32f6:d475] has joined ##java [08:30]
bitwinery locustlord, http://catb.org/~esr/faqs/smart-questions.html [08:31]
bitwinery bitwinery's title: "How To Ask Questions The Smart Way" [08:31]
ChaiTRex locustlord: If it's a one-liner, paste it in here. If not, use a pastebin. [08:32]
bitwinery locustlord, it's best if you don't just ask a random question but instead specify what you did, what you observe and what you were expecting. That will make it much easier to understand what is that you are trying to solve or understand [08:32]
locustlord ok what I did [08:32]
locustlord was I made a hashtable [08:32]
dreamreal sighs [08:32]
locustlord and I fed it 2 sets of data [08:32]
locustlord x, 5 [08:33]
locustlord and y, 3 [08:33]
dreamreal a hashtable? Like a HashMap, or your own data structure? [08:33]
bitwinery locustlord, also show, don't tell [08:33]
dreamreal Or did you actually use the Hashtable class in java? [08:33]
locustlord Hashtable class [08:33]
dreamreal And why didn't you try it out and see what it output, because that's what it should output [08:33]
dreamreal DOn't use hashtable, use HashMap instead. [08:33]
black_ant [black_ant!~antilope@unaffiliated/black-ant/x-1505394] has joined ##java [08:33]
locustlord ok so it should output y, 3 [08:33]
locustlord good to know [08:33]
dreamreal yay! [08:33]
dreamreal hashtable [08:33]
dreamreal The only reason to use Vector is for compatibility with Java 1.1/1.0, or JavaME. Otherwise, use ArrayList. If you need an internally synchronized version (if you don't know what that means, you don't need it), use the collections in java.util.concurrent; the same applies to Hashtable and HashMap, Hashtable is old, HashMap is new, and Stack vs. ArrayDeque [08:33]
locustlord cause it's not [08:33]
dreamreal cause it's not what [08:34]
locustlord outputting y=3 [08:35]
locustlord only x=5 [08:35]
locustlord that means there's fixin' to be done [08:35]
dreamreal yes, probably in your map construction [08:35]
dreamreal show your code. [08:35]
freespirit-girl I think i need to build myself a new computer [08:35]
yawkat [yawkat!~yawkat@cats.coffee] has joined ##java [08:35]
locustlord https://glot.io/snippets/fhpex35evy [08:36]
locustlord espresso.txt line 1 is "read x" and line 2 is "y = 3" [08:37]
dreamreal oh, my. [08:37]
freespirit-girl I feel like my computer is going to fail soon. One really fast off topic question.. what CPU, graphic card and memory would you guys suggest? [08:38]
dreamreal freespirit-girl: wrong channel. [08:38]
dreamreal locustlord: well, crank up a debugger and see what's happening [08:39]
locustlord I hit debug in eclipse and it does the same thing as running it [08:40]
dreamreal did you... set a breakpoint? [08:40]
locustlord what's a breakpoint? [08:40]
dreamreal something you need to learn about [08:40]
locustlord ok I set a breakpoint [08:42]
locustlord wait shit [08:42]
locustlord wait a minute [08:43]
tasse [tasse!~tasse@55d4f60c.access.ecotel.net] has joined ##java [08:44]
locustlord dreamreal, does my loop only read the first line? [08:45]
dreamreal I dunno, I'd have to run your code [08:46]
freespirit-girl I apologize [08:46]
dreamreal it looks like it should read the whole file assuming the input works properly [08:46]
dreamreal but I dunno [08:46]
Anthaas [Anthaas!~Anthaas@unaffiliated/anthaas] has joined ##java [08:50]
locustlord What's number format exception mean? [08:59]
ChaiTRex locustlord: read the API docs from earlier. the exceptions for parseInt shoukd include that. [09:01]
wreed [wreed!~wreed@2601:645:8100:8480:7553:d011:cfdd:2eb0] has joined ##java [09:02]
VegetarianFalcon [VegetarianFalcon!uid258908@gateway/web/irccloud.com/x-ypxcennhtytuxdxq] has joined ##java [09:11]
ham [ham!~z0mbie@unaffiliated/ragnarokkr] has joined ##java [09:21]
nfd [nfd!~nfd9001@c-67-183-33-240.hsd1.wa.comcast.net] has joined ##java [09:30]
shantaram [shantaram!uid207478@gateway/web/irccloud.com/x-fjrseqaawvdmamaf] has joined ##java [09:41]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [09:44]
KidBeta [KidBeta!~Kidbeta@hpavc/kidbeta] has joined ##java [09:57]
locustlord is there a way to handle different exceptions differently within the same catch statement? [09:57]
ChaiTRex locustlord: multiple catch blocks [09:58]
locustlord like lets say I wanted to display a different error message for a certain type of exception [09:58]
locustlord oh I can do that? [09:58]
locustlord cool cool [09:58]
rohanrhu [rohanrhu!~rohanrhu@88.237.251.74] has joined ##java [09:59]
dreamreal sighs [10:02]
dreamreal if only there were tutorials that taught basic java concepts so you didn't have to ask people who'd actually invested the time [10:02]
locustlord those tutorials take much more than an hour [10:06]
ChaiTRex locustlord: yeah, but do them during some free time because you said you were weak on programming. [10:06]
locustlord yeah I am weak at programming [10:06]
ChaiTRex locustlord: only way to get good enough at programming to pass CS is to learn and practice [10:07]
locustlord I have an objective to finish today [10:07]
locustlord tomorrow I'll look at java [10:07]
ChaiTRex locustlord: OK [10:07]
dreamreal locustlord: this sounds like really poor project management [10:10]
cheeser you'd actually make better use of your time by reading the exceptions tutorial [10:10]
locustlord that's cause it is [10:10]
dreamreal and you wouldn't waste OUR time that way too [10:11]
dreamreal which is my main objection to this whole "help me do basic stuff I really should have already learned" approach [10:11]
locustlord ok you have a point there [10:11]
locustlord I feel kinda bad now maybe I will read some stuff [10:11]
cheeser don't feel bad. everything's an opportunity to learn. [10:11]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [10:17]
patientplatypus [patientplatypus!~patientpl@ool-4579337b.dyn.optonline.net] has joined ##java [10:17]
patientplatypus hi [10:17]
patientplatypus ok im using sql in the play framework [10:17]
patientplatypus and im getting that my database is in an inconsistent state [10:18]
patientplatypus at this point ive re-cloned a previously working copy, re-installed my sbt, cleared cache everything and it wont reflect the changes in the 1.sql file [10:19]
patientplatypus im totally lost [10:19]
patientplatypus nvm got it [10:27]
patientplatypus fuck me [10:27]
dreamreal thanks the rubber duck [10:29]
Secret-Fire [Secret-Fire!~Secret-Fi@97-120-114-69.ptld.qwest.net] has joined ##java [10:29]
Secret-Fire [Secret-Fire!~Secret-Fi@97-120-114-69.ptld.qwest.net] has joined ##java [10:31]
locustlord evaluating infix expressions is hard [10:37]
dreamreal it is not [10:38]
dreamreal but there're libraries that do it for you [10:38]
dreamreal algebra [10:38]
dreamreal There are many algebraic expression evaluators for Java, including the built-in javascript interpreter; also see http://mathparser.org/ , http://commons.apache.org/proper/commons-jexl/ , http://www.objecthunter.net/exp4j (all open source), and http://www.singularsys.com/jep/ (commercial), among others [10:38]
jimender2 [jimender2!uid320657@gateway/web/irccloud.com/x-useimbydmgyzrlvs] has joined ##java [10:45]
nav2002 [nav2002!~nav2002@115.99.28.188] has joined ##java [10:56]
locustlord dreamreal, I meant doing it by reading from a file [10:57]
p[a]ddy [p[a]ddy!~Patrick-E@wikipedia/paddyez] has joined ##java [11:06]
locustlord assuming I have a method that returns a value [11:14]
locustlord how do I assign said value to an integer [11:14]
ChaiTRex locustlord: to an int variable in Java? [11:17]
locustlord yes [11:17]
locustlord my method has return x at the end [11:17]
ChaiTRex locustlord: intVar = whatever(...); [11:17]
locustlord I call the method within main [11:17]
locustlord how do I assign an integer said value [11:18]
ChaiTRex locustlord: see just above [11:18]
locustlord oh [11:18]
locustlord so that works [11:18]
locustlord thanks [11:18]
locustlord how would I break out of an if statement [11:20]
locustlord I type break; but that breaks me out of the loop [11:20]
locustlord not the if statement [11:20]
ChaiTRex locustlord: ypu have to readjust your code so that the if block ends right then [11:21]
ChaiTRex locustlord: one way is to have an if block inside your if block [11:21]
ChaiTRex locustlord: if (whatever) { a; b; c; if (whatever2) { stuff to do only sometimes } } [11:22]
locustlord there's a problem with that idea [11:23]
locustlord the if block within the if block needs to come first [11:23]
locustlord because if it is true then doing the regular stuff is gonna give me an error [11:23]
ChaiTRex locustlord: you can use if (whatever) { true stuff } else { false stuff } [11:24]
locustlord right [11:25]
locustlord else exists [11:25]
locustlord duh [11:25]
locustlord well [11:25]
locustlord it compiles without error now [11:25]
locustlord the program, however, is not without error [11:27]
locustlord oh nevermind [11:27]
locustlord now it works perfectly [11:27]
ChaiTRex locustlord: yeah, now the debugging part [11:28]
ChaiTRex locustlord: Oh, good. [11:28]
locustlord it does the 4 basic arithmetics in infix wonderfully [11:30]
cheeser enter [11:30]
cheeser locustlord, 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. [11:30]
locustlord sorry [11:31]
locustlord now I need to make it multiply variables [11:33]
locustlord not just numbers [11:33]
buttsanchez [buttsanchez!~buttsanch@pool-71-172-148-224.nwrknj.fios.verizon.net] has joined ##java [11:34]
Me4502 [Me4502!~quassel@unaffiliated/me4502] has joined ##java [11:47]
locustlord is there a reason I can't declare a Hashmap globally? [11:54]
Chuguniy [Chuguniy!~Chuguniy@home-136.169.20.159.mits.lv] has joined ##java [11:58]