« first day (3145 days earlier)      last day (2020 days later) » 
00:00 - 13:0013:00 - 00:00

00:00
Space is to place as eternity is to time. -- Joseph Joubert (source)
 
2 hours later…
01:30
@Pseudohuman current time
@萝莉w 8:30:58 pm CDT | Sunday, June 2, 2019
Interesting.
 
5 hours later…
06:09
@Pseudohuman current time
.
@萝莉w 1:09:32 am CDT | Monday, June 3, 2019
@Zoe Are you online now?
Zoe
Zoe
yep
Don't you sleep?
Zoe
Zoe
I do.
06:11
you just woke her up
Sorry.
So how about you? @towc
I'm sleeping right now, I have no clue how I can make so few typos with my eyes closed
Zoe
Zoe
@萝莉w you didn't btw - it's a joke ^^"
nah, it's 8am in central/eastern europe, a lot of people are awake
Zoe
Zoe
and then there's those of us who are, but don't want to be :]
06:14
@Pseudohuman current time CCT
@萝莉w 12:44:33 pm UTC+06:30 | Monday, June 3, 2019
@Zoe wait, aren't you in central europe?
I'm pretty sure there's a EU directive that makes it a criminal act to stay in bed after 7:30am on a monday
I'll have to report you
It should be UTC+8:00.
...
Zoe
Zoe
@towc I am.
06:17
@萝莉w CCT is china coast time
@萝莉w no, it should be UTC+1/2
Zoe
Zoe
@towc Norway is in Europe, but not in the EU.
Emmmm...
@Zoe well, you better not cross the border
I don't exactly know.
Zoe
Zoe
@towc puts a bed on the border to Sweden Fite me
06:18
2019-6-3 14:18:24.
Zoe
Zoe
@Pseudohuman current time CEST
@Zoe 8:18:46 am CEST | Monday, June 3, 2019
@Zoe I never wanted to do this, but you leave me no choice: have you tried emacs?
Zoe
Zoe
@towc I have, yes!
isn't it better than vim?
Zoe
Zoe
06:19
nope
You should see the config file
damnit, derailing you didn't work
Zoe
Zoe
Literally feels like:
I declare surrender, but I shan't forget
Zoe
Zoe
(((((((((((((
  ((((((((((((((((((((((((((((((((((((((((((((((
        ((((((((((((((((((((( ))) )(( ( )) )) ( ()( ( )))) )))))))))
(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
))))))))))))))))))))))))))))
oh, that's how you change color scheme, right? :P
Zoe
Zoe
06:20
nah
@towc Good luck with that. xD
Sorry.
Zoe
Zoe
Lisp, yeah
@萝莉w why?
Lisp.
Zoe
Zoe
It's really ugly to type out
06:21
you didn't do anything wrong, your mispelling was kind of funny
@Zoe unlike zoe?
@towc I forgot the name of the language.
I'm going to test my program now.
Zoe
Zoe
@towc seriously, have you seen it?
I need to go on a tour of the keyboard in order to type it
Zoe
Zoe
It's so ugly >.>
You need parentheses on single statements
06:26
at least it sticks very closely to another language worth learning
while learning vimscript only teaches you... vimscript
Zoe
Zoe
@towc lmao, "worth learning" XD
and funnily enough, there's not much vim tooling for navigating vimscript
but the lisp ecosystem is fantastic
Zoe
Zoe
@towc navigating how?
@Zoe keywords, completion, tags... these were all pretty bad last time I looked into it
and really hard to google XD
Zoe
Zoe
you're just doing it wrong. :p
06:29
if at least it was a standalone language, but cleverly designed around vim motions, that could be neat
Zoe
Zoe
completor-necovim supports Vimscript
could be fun to design a language that compiles down to vimscript
@Zoe did you find out by trying it out?
Zoe
Zoe
Why?
nothing in the source or readmes or linked to pages seem to suggest that
@Zoe because vimscript is pretty bad
Zoe
Zoe
@towc I used it for a while. I don't have it rn because I uninstalled and tried a different auto-complete program
@towc nah. I like it
06:38
Uncomfortable.
I am uncomfortable with all these hip young people using the console instead of real programs.
Zoe
Zoe
@geisterfurz007 gVim. :dab:
:dab:
oh wait
no g
don't g
but the sentiment is there
@geisterfurz007 Are you implying that you're not young, but old?
06:42
I feel old, certainly.
How old?
Maybe 40 or something?
Zoe
Zoe
@towc I use gVim, because Windows.
oh wait
no windows
don't windows
but the sentiment is there
Don't get her to use linux again, please.
I am happy the "boooo, linux does not driver anymore, sooo bad" stopped a while ago c:
06:44
I mean, linux is the only next step after vim
it's too late for you, geist
I use Windows because it's the only OS that supports all of the best PC games.
O-O
There are normal people here :o
Zoe
Zoe
I use Windows because it's the only OS that works decently on this royally messed up computer.
you're a programmer, surely you can afford a better one
I really can't get myself to start working today
Zoe
Zoe
technically I'm a student.
06:48
it's so nice outside, and I'm still so sleepy
if I desleep, my desire to go outside will be even greater
and yesterday I bought a hammock, so I could actually sleep outside
@Zoe If you write code to make a computer do your bidding, you're a programmer.
Zoe
Zoe
@JennaSloan yes, but one is paid, and one is not
Technically I'm a Software Engineer with a Enterprise Applications Certificate, a graduate student, and unemployed. So I don't get paid, but I'm still a programmer.
I am just stupid.
07:15
@geisterfurz007 You're smarter than most users.
Some people don't know that the right mouse button doesn't always do the same thing as the left mouse button.
...and then you find out they've only ever used a Mac.
@Zoe Why did Neil say that you are a liar?
@萝莉w They are just kidding around
Zoe
Zoe
^
You can read the transcripts by click the time on it.
I cant believe Zoe didnt clean up that starboard
well, technically Zoe did lie.. -_-
07:30
Yeah lol
Cannot understand...
@萝莉w she said she wasn't going anywhere, and then she leaves
I was honestly joking around :P
Please stick to English as possible
It seems that I thought it too serious.
well that was part of the joke :)
if I had seemed insincere, it would have fell through
is calling someone a liar in your culture a serious accusation?
07:33
In fact, I guess so, but cannot believe.
Don't mind.
is believing in your culture a serious crime?
serious crime?
Don't mind him, he's a Wietlol
Did Stack overflow blocks in China?
In fact, I'm a bit conservative.
Zoe
Zoe
07:35
@Neil would it have been better if I said I didn't plan on going anywhere?
@nyconing China blocks SO if anything.
@Zoe well that wouldn't have been a lie I think
you can actively not plan on going anywhere and then have something come up
@nyconing Are you Asian?
China doesn't block SO.
Zoe
Zoe
Not directly
but it blocks jQuery and other scripts loaded from the Google CDN
Yes.
@Zoe good move. I would block jQuery too
Zoe
Zoe
07:38
@Neil but it breaks the site
Yep Im from Malaysia, Im born in Malaysia and Im Malaysian. I know Chinese because Im Chinese. And 'Chinese' doesnt mean China citizen (just clarify)
Zoe
Zoe
Because SO forgot to add a <noscript>
I used vpn to cached jQuery so that it can be loaded.
@Zoe well kidding, but also not kidding. jQuery is mostly unnecessary
@nyconing I know that.
07:40
@nyconing so by Chinese you mean you reside in China?
but you're not a citizen?
face palm
Zoe
Zoe
@Neil Not on the site
lol sorry
I know in common sense, add 's/ses' after country mean the person who born in that country.
@nyconing Then you mean to say you're Chinese by ancestry, but you were born in Malaysia so you're also Malaysian
did I get it right this time?
07:42
But in Chinese, its diffrent
For example Indians are born in Malaysia too.
> But in Chinese, its diffrent
For example Indians are born in Malaysia too.
The Indians who isnt Indian, is Malaysian
lol
Good morning, suppose I have 1. String s1="ABD"; and 2. String s2=s1+"EFG";. Line 2 creates two objects, one on the Heap and the other in String Constant Pool, but I am not sure if I am correct that the objects would be:Heap (ABDCEFG) & SCP (EFG). Am I correct?
1. Malaysian
1a. Chinese race
2. Born in Malaysia
3. Havent go to China
4. I need VISA to go China
@JWizard I think the optimizer would make it two constants tho
if not, then "ABD" and "EFG" are both constants
and then there is one string on the heap "ABDCEFG"
07:47
String s = "abc"; // compile time constant
@Wietlol Only if s1 is final, but becoz it is not, it would be evaluated at runtime.
i think it doesnt have to be final
not even effectively final
as long as the value is determinable during compilation time
var s1 = "Hello";
var s2 = s1 + " World!";
s1 = "ohai";
I thnik s2 would still be a constant at compilation time
(not in debug mode tho)
The final is added to prevent human error
@nyconing So you mean no Object would be created on the Heap? on line 2?
Zoe
Zoe
@Neil let it be known to all, that @Neil is a liar!
2
;p
07:52
You made a new object from read the first object. The first object didnt get set/ modifies. It can be final.
You can made it final, to prevent human error
@nyconing I left the final intentionally, I would like to figure out how/when objects are created both on the Heap and SCp.
@Zoe what'd I say?
Zoe
Zoe
16 mins ago, by Neil
@Zoe well kidding, but also not kidding. jQuery is mostly unnecessary
I don't know...
@JWizard is there a reason to know?
07:55
then you lie when you say I'm a liar!
And that is correct in todays world with Vue, Angular and React, I'd guess.
I am on Neil's side.
@Wietlol Yes, for certification exam :D
I think you want to know how compiler actually compiled that code. Wietlol made he own program language, he will know more.
exams are stupid
> its a school assignment, your task is to do the exact thing you are not supposed to do in the business world
Zoe
Zoe
07:57
@Neil unless that is a lie :p
in the business world
@nyconing I know how mine works (approximately), doesnt mean I know how javac works
some compilers use execution context based contracts
such as (from line x to y, variable z will never be null)
Zoe
Zoe
@Wietlol Javac runs on magic and unicorn power. Everyone knows that!
String temp= "Nation";
String s1="Nation Chirara";
String s3=temp + " Chirara";
System.out.println(s1==s3);//False, true if temp final
but other, more primitive, compilers, only use the declaration, and variable z is defined as nullable, so it can be null
Zoe
Zoe
07:59
@JWizard no
even though you did an if (z != null) { ... }
Zoe
Zoe
Don't use == to compare strings
take C# or Java for example
Chirara are Zimbabwe?
@Zoe It's an example you dork.
08:00
their switch expressions are the heresy of modern compilers
@nyconing Yes yes, you are right!
Oh, that's gonna be a flag isn't it?
@Zoe It is true
Zoe
Zoe
727
Q: How do I compare strings in Java?

Nathan HI've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug. Is == bad? When should it and should it not be used? What's the difference?

@Zoe I am not comparing content
Zoe
Zoe
08:00
So?
System.out.println("Chirara"=="Zimbabwe");
true
Zoe
Zoe
You'll just need to reverse it if that's the case
The problem still exists
System.out.println("today"=="saturday");
> true
no? its false
@JWizard is that in debug or release mode?
@nyconing u sure?
08:02
???
yes, its friday.
@nyconing What you mean here
@Wietlol Not in debug mode
(point was made for "Tuesday", but point still remains valid for "Today")
Zoe
Zoe
08:04
My point is, final causes a single instance in the string pool
I think String is a special Object.
all objects are special
Zoe
Zoe
It's just because of the string pool
And? That's part of the specification.
Zoe
Zoe
Still screws comparison
08:07
How does Map<K,V> work?
@Zoe unless that is a lie :p
Zoe
Zoe
@Neil no u
no u!
Zoe
Zoe
No u
:llama:
08:08
:Kappa
@萝莉w What part of it exactly?
@Zoe final causes it to be treated as constant
@萝莉w depends on the implementation, but generally it's implemented using a hash map
HashMap.
String s1 = new String("test");
String s2 = new String("test");
System.out.println(s1.equals(s2));
Map<String, String> t2 = new HashMap<String, String>();
t2.put(s1, "test");
System.out.println(t2.get(s2));
true
test
yeah, it uses hashCode and an array usually with a prime number of entries, and then it gets inserted at array[key.hashCode() % array.length]
s1 and s2 both give the same hashCode value, so it doesn't matter that they are separate instances
08:13
@萝莉w My question is coming from the fact that String s="S"; & String s=new String("s"); are two different things in respect to how the underlying object creation works
which is why it is always a good idea that the same hash code is returned if for any two instances, they're considered equal
@Neil isnt the number of entries always 2^x ?
16, 32, 64, 128, 256, etc
and it doesnt always have the object in the array
it might also have a collection of objects
(usually a TreeMap iirc)
according to the javadocs, a HashMap is instantiated with 16 entries
I had always understood it was important it was a prime number honestly
but not quite sure the reasoning behind that
the prime number is for the hashcode
the 2^x is important for fast conversion
since you can do a bitwise operation (&) to get the part that is important
08:18
ah
if your size is 128, then you use a bitmask of 0b0111_1111
then it doesn't really have to be a prime number, it could easily be any number, so long as it isn't divisible by 2
assuming you always used 2^x for size
it's when they have a common factor that you get into trouble I assume
but a prime number is probably a safe pick
/**
 * Returns a power of two size for the given target capacity.
 */
static final int tableSizeFor(int cap) {
    int n = -1 >>> Integer.numberOfLeadingZeros(cap - 1);
    return (n < 0) ? 1 : (n >= MAXIMUM_CAPACITY) ? MAXIMUM_CAPACITY : n + 1;
}
> assuming you always used 2^x for size
well... it is supposed to do that
if the initial capacity is 16 unless you specify..
you're telling me that default constructors for HashMap use 2^16?
/**
 * The default initial capacity - MUST be a power of two.
 */
static final int DEFAULT_INITIAL_CAPACITY = 1 << 4; // aka 16
/**
 * Constructs an empty {@code HashMap} with the default initial capacity
 * (16) and the default load factor (0.75).
 */
public HashMap() {
    this.loadFactor = DEFAULT_LOAD_FACTOR; // all other fields defaulted
}
i expected to see it redirecting to another constructor, but it doesnt
08:27
well what does the other constructor look like?
this.loadFactor = tableSizeFor(cap); ?
Hi everyone
public HashMap(int initialCapacity) {
    this(initialCapacity, DEFAULT_LOAD_FACTOR);
}
public HashMap(int initialCapacity, float loadFactor) {
    if (initialCapacity < 0)
        throw new IllegalArgumentException("Illegal initial capacity: " +
                                           initialCapacity);
    if (initialCapacity > MAXIMUM_CAPACITY)
        initialCapacity = MAXIMUM_CAPACITY;
    if (loadFactor <= 0 || Float.isNaN(loadFactor))
        throw new IllegalArgumentException("Illegal load factor: " +
                                           loadFactor);
    this.loadFactor = loadFactor;
meh? Its always friday in this room
> this.threshold = tableSizeFor(initialCapacity);
@Neil loadFactor != size silly Niel
oh right
08:52
A general question, do we use java gui for desktop apps ?
Not often.
or is there a way to embed html for desktop apps ?
then what is used most times ?
Service.
I want to make a desktop application, its a FTP client. I want a GUI. what should I use for the GUI part ?
Python? C++?
08:55
for desktop apps, JavaFx is the most use GUI framework (iirc)
Swing if you need lower level stuff
but if you are not writing an IDE of the level of IntelliJ, then you should be fine with JavaFx
@PremRamman Essentially... What you want. There are many, many options available. As Wietlol said, JavaFX would be the way to go if you wanted to do it in Java for example.
Anyway, I am out for a bit; gotta finish a presentation. Later o/
@PremRamman if you do use javafx, ideally you should keep the style information in an fxml file for each control/window
it keeps your code somewhat clean
I think I will go for swings, I vaguely remember, this was taught in college 6 years back.
swing is obsolete
Go off work!
09:08
@PremRamman they've created javafx to replace swing
they're similar, I promise. If you've got the time to spare, you should probably take your time to learn javafx instead
javafx actually does some nice things for you that swing doesn't do
@Neil Okay I will try JavaFX
Zoe
Zoe
Deoplete is amazing owo
09:49
Little Red wearing a red cloak that keeps her from turning into a wolf in riverside of the iridescent river with winds through fairy town that tainted by the wildness of magic.
@nyconing You got my vote for most random thing I've heard this week
Little Red is cute!
Zoe
Zoe
10:15
Which one?
@Zoe The little red one
eLi
eLi
10:30
Hi
I prefer TornadoFx
but havent made any GUI desktop app lately
but soon... WietIde
beh, good solution if you use kotlin
beh?
Zoe
Zoe
@Neil but there's like a million drawn versions
11:08
@Zoe Little Red Riding Hood
Zoe
Zoe
11:42
@nyconing there's still a million drawn variants
12:00
An estimated 225 million women in developing regions don't have adequate access to contraceptives. (source)
that is less
Zoe
Zoe
The hell am I talking about? xd
nvm
@Zoe you're not talking about hell! liar!
Zoe
Zoe
@Neil no u
you got me this time.. next time it won't be so easy ≖_≖
Zoe
Zoe
12:11
It feels pretty easy every time :p
≖_≖
posted on June 03, 2019

archive - contact - sexy exciting merchandise - search - about ← previousJune 3rd, 2019nextJune 3rd, 2019: Please enjoy this comic I wrote referencing a movie from the past, which, to be fair, is where all publicly-released movies without exception reside!!– Ryan

12:35
do classloader has capability to load resources which is within application class path?
or we can load resource from anywhere withing server using classloader ?
@hemkar classloaders can dynamically load classes however you wish
getClass().getClassLoader().getResource(any_folder_name_outside_application)
though generally it is recommended to stay somewhat faithful to the general static classloader
getResource loads a file inside jars already existing in the classpath
you can't just load a file from the disk like that
nor should you try
thanks @Neil. Do u have any reference where i can go and check how exactly classloader loads resources once we call getResource()
I think everything is simply loaded in memory, and therefore every possible resource is simply a path
on a rudimentary level, it probably just goes down the list of elements until it finds a path that matches
12:52
thanks a lot @Neil. Will have to look into some resource in order to understand how classloader find a resource :P
@hemkar it's not that difficult
say you have A.jar in C:\ and B.jar in C:\someOtherFolder
They are loaded by the classpath in the order of A, then B
if you search for path/to/some/file.properties, then it will first check if it is in A, then if it is in B
If it were in both, A.jar's version would be used
and the file loaded is the internal folder of A.jar, so C:\A.jar!path\to\some\file.properties
great..got some idea . let me tell u my scenario
00:00 - 13:0013:00 - 00:00

« first day (3145 days earlier)      last day (2020 days later) »