« first day (3069 days earlier)      last day (1858 days later) » 

12:00 AM
MS-DOS must die! (source)
 
 
3 hours later…
2:45 AM
dreams of electric sheep
 
 
2 hours later…
4:40 AM
arf
 
 
1 hour later…
5:46 AM
o/
 
\o
 
6:23 AM
o/
 
\o
 
6:40 AM
posted on March 19, 2019

 
Zoe
7:11 AM
XD
JS in a nutshell
 
8:08 AM
@Zoe That's hardly JS specific...
Dam product people and their inability to plan ahead...
 
Zoe
JS is still worse
 
@Zoe I had this funny discussion in the PHP room a while ago
 
Zoe
JS; the only language where a var in a callback in a callback in a callback in an async function on a class in a function in a class in a callback is globally available
 
And I told them that while "casual" PHP code definitely looks worse than "casual" JS code, especially modern JS, "job security" JS takes "job security" PHP code on the "how ducked up can you make it" scale by orders of magnitude
@Zoe It's... not?
JS has variable scope
A function can access scopes outside of it (so a callback can access variables from inside the function it was defined in), but not the other way around.
It is very similar to Java's lambdas having access to final variables in the parent scope
Except that JS doesn't have the final limitation.
 
Zoe
@MadaraUchiha not in my experience
 
8:17 AM
@Zoe Your experience does not match with reality...
Show me an example where what you say happens.
 
8:30 AM
@MadaraUchiha Not final variables, but effectively final variables
 
@JennaSloan SSDD
"useless variables" as far as I can tell :D
 
Didn't Java recently make a change to what variables a lambda access?
 
@JennaSloan That, I don't know. Did it?
 
Zoe
@MadaraUchiha I don't have one atm, most of that code got dumped for various reasons. I can create an example later though. In theory anyways ^^" But I tend to write Horribly Broken Stuff™, sooo....
 
8:53 AM
@MadaraUchiha Isn't it a feature in Java 10?
 
They added type inference in java 10
but I don't think anything has changed with regards to lambda scope
 
Idk, it was mentioned in JEP 286
... and that's why I like Assembly!
There's no scopes in Assembly
 
9:16 AM
@Zoe Seems like you don't know much about JavaScript if this is your statements. JavaScript. problem is that if your "variable" is global accessible, then it's probably because you forgot to write "var" infront of it.
 
The best part about Assembly is that it can cause your processor to halt and catch fire.
 
Zoe
@AndersMetnik I always write var, but I've been told part of the scoping issue can be fixed with let, but idk if that's correct
 
ahem
Reminder: Voting for the SO 2019 Moderator Election closes in 10 hours.
Also, I think you can change your votes if you so choose, right up until it closes.
 
Zoe
Yeah, you can
 
9:32 AM
Where do the election results show up anyways?
 
Zoe
9:43 AM
@JennaSloan they don't for the next 10 hours and 17 minutes
 
Morning
 
Morning.
@GianlucaBenucci Welcome to the Java Chat, the room for Java enthusiasts! Please use a code snippet tool when posting code snippets. If you have an Android question, you're in the wrong place! And remember: this is not tech support! Thanks for visiting and have fun! :D
 
@GianlucaBenucci welcome
Also, vote for Zoe if you haven't already!
 
@Zoe But where?
 
Zoe
@JennaSloan the election site will point to the calculation IIRC
 
9:56 AM
Vote Zoe for what? Moderator election?
 
Zoe
@Neil <3
 
@GianlucaBenucci yep, she's going for moderator
 
10:13 AM
Morning
 
@d0n.key yo
 
morno
 
@Neil I've read is candidacy and i'll be vote for her but my reputation is not enough for vote =)
 
@GianlucaBenucci ah well, no big deal :P
 
10:33 AM
corn
 
corning Hans
 
corning d0n.key
/8ball happy corning ?
 
@Hans1984 Without a doubt
 
Best way to start my corning is with a good ol' moffee.
 
10:38 AM
yep
and some hereals with some fresh nilk
 
Now you're just messing things up
The trick was to only use letters that are already there
You can't just add and remove things
especially swapping c/m
 
Zoe
@d0n.key some mereals with fresh cilk?
:llama:
 
yes my dud
*dudine
Zoe would sure make a good moderator
But I'm not gonna vote for her
Simply because I'm in a very dangerous position with Zoe as a mod
 
/fatcat
 
life is the cat in the back
 
Nah that's me
 
11:30 AM
Hey guys. In this brief tutorial for JavaParser:
https://github.com/javaparser/javaparser/wiki/Manual
They call super.visit(n, arg); in the visit method for the MethodVisitor class. How come? What's the point?
 
so you saying you pushed me?
 
11:44 AM
/cat
 
@sockevalley The "visitor" (actually just looks more like a crappy decorator using inheritance) is just supposed to add behaviour to ("decorate") the super class. It's adding some additional behaviour to print one of the arguments, but it still defers to the super class to perform it's implementation of that method as normal. TL;DR: it's a way of supplementing behaviour rather than completely replacing it.
Java 12 enters GA today. What time does it usually drop?
 
get it tomorrow
not todae
 
12:00 PM
Probably built around 3000 B.C., Stonehenge has stood on England's Salisbury Plain for more than 5,000 years and is older than the famous Great Pyramids of Egypt. (source)
 
12:22 PM
@Michael So if you would to remove it, it still would print one of the arguments?
 
the whole thing with the switch statement seems nice
it's finally getting a much needed update
 
@sockevalley Yes, but that's all it would do.
 
@Michael alright, have you worked anything with javaparser previously btw?
 
@Neil Yeah, but it's experimental. Needs a flag to enable it, so I would say it's not suitable for production.
 
well i wouldn't use java 12 in production yet in general
but I assume by java 13, it won't be enabled experimentally
 
12:33 PM
@Neil I don't see why not tbh, especially when there's hardly any big changes. You get a lot of bug fixes which will never be back-ported. The JDK is incredibly thoroughly tested, so delaying upgrading is over-cautious imo
 
no I agree, but it would make sense to keep a branch for java 11, and a second for java 12 for testing
 
Yes, that's the plan. They want community feedback. Maybe the syntax could be improved, maybe there are some use-cases they haven't thought of, etc.
 
I would just wait to use java 12 because of the short-term support
in production I mean
 
@sockevalley Nope, haven't used it before
 
hi guys, does anyone has worked on eclipse git?
 
12:43 PM
@Michael alright man, guess I'll be on my own on this one ;PP
 
@Michael you do have to keep in mind that some dependencies need to update as well
for example, if your hosting service doesnt support J12 yet, you cant upgrade to J12
this was a big issue with J9 (especially because of jigsaw)
 
 
2 hours later…
Zoe
3:11 PM
@Clover Avoid IDE VCS. It's usually horrible
 
3:40 PM
/fatcat
 
. /forget fatcat
/8ball forget fatcat command ?
 
@Hans1984 Are you kidding? No!
 
ok
/forget cat command ?
 
@Hans1984 That command does not exist.
 
3:50 PM
oooops
/8ball forget cat command ?
 
@Hans1984 You may rely on it
 
still not going to do it
/8ball are you trying to get me banned ?
 
@Hans1984 Very doubtful
 
4:50 PM
lol
 
Zoe
>:D
whistles innocently
 
 
2 hours later…
7:14 PM
hey guys could i get some help from someone in private because its kind of a long code but easy since im a beginner
 
@ZiadYounis Welcome to the Java Chat, the room for Java enthusiasts! Please use a code snippet tool when posting code snippets. If you have an Android question, you're in the wrong place! And remember: this is not tech support! Thanks for visiting and have fun! :D
 
Zoe
SO doesn't have private.
 
Oh sorry i thought i could ask some simple questions here. Does anyone have an advice for me where i can ask someone for help. Like frequently simple lines of code so that i dont have to post a question all the time on stackoverflow
Maybe on discord or something
 
 
1 hour later…
8:27 PM
Does anyone know where I might begin to do partial matching of a string array? For instance if I have three names Joseph, Jossy, and Josephine in a string array and the user enters in Jos how might I display all the partially matched strings?
Here is my code on what I have accomplished so far I am also looking for critique on my coding style if anyone wants to chime in on that! Thanks in advance!
 
@JosephV [].filter and ''.includes
 
@MadaraUchiha thanks! I will research those and see if I can figure it out, thanks for getting me started!
@MadaraUchiha so for my code would I do away with the line match = FindName.compareToIgnoreCase(FoundName); and do something like FindName.contains(FoundName);
 
9:16 PM
@JosephV basically, yes
I would do something like Arrays.stream(names).filter(name -> name.toLowerCase().contains(query.toLowerCase()))
 
I was looking at that approach as well. I tried modifying my code but I am getting an error.
The code as it stands handles both upper and lower case entries from the user just wanted to add a section that I previously mentioned.
Other have suggested to convert the array to an arraylist, which might help but I am trying to accomplish this with little build in methods as possible
 
9:36 PM
Also, that code you posted a link to up above does not follow the naming conventions
 
10:34 PM
you are referring to findName instead FindName correct? @Je
@JennaSloan
 

« first day (3069 days earlier)      last day (1858 days later) »