« first day (1667 days earlier)      last day (3260 days later) » 
00:00 - 14:0014:00 - 23:00

2:00 PM
@MadaraUchiha I assure you it's not hard. Even my business partner fail to.
 
@Unihedron I'm not referring to client-side now
Pure server-side.
DOM is a whole other beast, no arguments there.
 
I'm referring to both ends.
 
@Unihedron Aside from doing really boneheaded things like "the insurance loop"
What performance gotchas do you feel server-side JS has?
 
Depends on your definition of "gotcha"s.
 
@Unihedron Things someone unfamiliar is likely to get wrong.
In Java there're plenty. And of the worse kinds too, of the kind that by the time you find them out, it's too late.
 
2:02 PM
... everything
 
"Oh, I see you picked an int for your number type there. It's going to be a shame if someone.... input 999999999999999 to it."
"Oh, I see you picked a LinkedHashMap, what's that? It's concurrency you want? lol no"
 
Java has a compiler, which alerts the programmer to many syntactical and logical errors before the program will execute. Javascript has no such tool.
 
"Object dependencies? Nah dude, no can do with threads. Too risky!"
@Michael Sure it has.
JSHint, ESLint, if you're really religious, JSLint.
Heck, take TypeScript if you like strong typing and syntactic validation that badly.
 
@MadaraUchiha And tell me: what percentage of Javascript programmers use those tools?
 
Syntax errors and types are not where I have most of my bugs as a JS developer
 
2:04 PM
@Michael Even the IntelliJ file editor set to Javascript format can alert things like null inspection and type parameter inference.
 
^
@Michael Plenty.
 
It doesn't even have to be in IDE mode for inspection and validation to work.
 
@MadaraUchiha Plenty is not enough.
 
Any respectable company, every respectable FOSS project
@Michael The problems most people have are not syntactic or type based
 
fge
@MadaraUchiha guess what? All of this is documented
 
2:06 PM
The problems are deeper, logic, architecture based. And no compiler can help you there.
 
fge
If you don't read documentation that's your fault, not Java's :p
 
@fge Did you ever read the entire law book of France?
 
Java forces all programmers to use a tool (the compiler) to check their code for errors.
 
Top to bottom?
@Michael Java treats all programmers like monkeys.
Which is fine, because most of us are.
It's not just the compiler, Java didn't invent the compiler
 
@MadaraUchiha As it should. Nobody is perfect.
 
2:06 PM
It's all those other things
 
fge
@MadaraUchiha no, IANAL
Not my job
 
All of those stupid hints I need to give the compiler, final (which was thankfully fixed), @Override, WTF Java?
@fge Oh, but you can be screwed if you don't know the laws.
You can still be punished for breaking it, even if you weren't aware of it.
 
@MadaraUchiha The @Override annotation is purely optional.
 
@fge I think Madara's point is that you can remain a lawful resident while not reading all of the law, like laws should be inferred from culture.
 
It's your fault for not reading the goddamn manual
Manuals are references not tutorials
4
 
fge
2:08 PM
@MadaraUchiha this is called being precise; the compiler is being dumb, the language looks dumb, but then again it means that it is simple -- code is WORM
 
I got to the manual when I forget the parameters of a method
I go to the manual when I want to lookup how something will behave
I do not go to the manual to learn about concepts of the language
 
fge
Well, then why do you even attempt to use a LinkedHashMap for concurrent access when it is explicitly documented that it is not thread safe?
 
So do NOT tell me "it's all documented" because there's no learner in all of Java's history to ever read all of that manual section, and understand even 5% of it.
@fge Requirements change, you don't know you'll need multiple threads down the road
 
@fge Just because a class is not thread safe does not mean you cannot use it in a multi-threaded context.
 
Designing for multithreading from day one is time consuming is generally overkill
(Also requires a lot of knowledge that most people just don't have)
I've optimized JS apps before to use worker threads
It's really not as big of a deal as you guys make of it
God dammit I'm frustrated by this point to no limits, I might just have to rewrite 60% of the code at this point
This is what I rant about all the time
Java is all about "scale" and "backwards compatibility" but when it comes to the moment of truth, you're screwed over regardless.
 
fge
2:14 PM
Well, I don't have that problem
And I have not been doing Java for that long a time
OK, soon finished with IntMultiterator
 
/http 409
 
@Michael HTTP 409 (Conflict): The 409 (Conflict) status code indicates that the request could not be completed due to a conflict with the current state of the target resource. This code is used in situations where the user might be able to resolve the conflict and resubmit the request. The server SHOULD generate a payload that includes enough information for a user to recognize the source of the conflict. (1/2)
 
fge
Deary me, the code is harder to write than I thought it would be
Hoo, you have the RFCs?
/rfc 7159
 
@fge Huh?
 
fge
Well, you quote RFC 7231 with your /http command
I'd have thought that you linked all RFCs
That would be nice
 
2:23 PM
Hmm it would.
The /http command gets its information from an XML file.
 
fge
Ah yeah, the XML format of RFCs
I had to write the JSON Schema drafts using it
 
There's an XML format?
 
fge
Ewww
Yes
 
I only see HTML, PDF, and TXT versions.
 
Hi
 
fge
2:27 PM
Those are the results of the xml2rfc commands; in the RFC "registry" you have the XML
 
is Java is slower than python?
 
fge
No
 
@sunilk No wai.
 
@sunilk Python is slower than Java by miles.
 
both converts the src code to byte code and executes it.. so hows d comparison done?
 
2:36 PM
Java is faster than Python by a measure of 1 Uni's.
 
fge
@sunilk pyhton's "vm" is far from being advanced as the JVM
 
Java's VM has been under development for longer than Python's.
 
2:51 PM
I'm sure a lot more $$ has been poured into it too. At least, Oracle's version.
 
@Michael lol
 
Since many large businesses use Java.
@Unihedron :D
 
fge
In a lecture I have learned that if Java and its ecosystem were a country, its gross GDP would basically be that of Sweden's
That's kind of impressive
And it's Java alone; other languages based on the JVM notwithstanding
 
O.o
That's very impressive
 
@fge OMG
I would totally move in, I hate this place
What about Javascript?
 
fge
3:03 PM
No idea
By the way, that resume...
 
3:23 PM
@fge Don't panic!! I have not forgotten. Totally not!!
 
3:37 PM
/shutdown
 
Shutting down. See you later.
OakBot Online.
 
4:16 PM
Off to lunch. Bye Java!
 
fge
5:01 PM
^^^ interesting talk on the future of the JVM and value types
 
Really nice. Proper generics too
 
fge
feels like starring this video
 
5:43 PM
@fge: Brilliant
Made me laugh when I saw part of his job description pie chart was "regretting serialization" xD
 
fge
OK, done with IntMultiterator, now doing Double...
And then Long
Gee, again a side project which I'm spending wayy too much time on
 
6:36 PM
Hiya
If I create int[] nums = {1, 2, 3}
how many objects is that creating in total?
Is it just one? nums
Or is it 4? nums, nums[0], nums[1], nums[2]
 
fge
You only create a single array; and an array is not really an object
 
But with regards to objects being ready for garbage collection
if I was to set nums = null
would that mean 1 object {1, 2, 3} is ready for garbage collection
or 3 ?
 
fge
OK, first things first: why are you asking this? Do you have actual memory problems?
 
the array is allocated as a continuous memory block (though afaik the specification does not require that). otoh the jvm is allowed to do (and it does in hot code) interesting things with that, such as not allocating anything if you never use the array, or allocating in the stack if you do, but the array does not escape scope
 
6:54 PM
And also, integers stored in an array is not Objects stored in an array
 
Sorry. I'm studying for an exam tomorrow
The examples we were given included Integer[] arrays
and Double[] arrays
 
Where are you studying?
 
where Integer[] s = { 1, 2, 3, 4} and that totals for 5 objects
I'm in Ireland
but someone raised the thought that int[] s = { 1, 2, 3, 4 } might not be 5 objects as ints are of primitive type
 
Hmm total of 5 objects? I was taught that an integer should be considered a primitive data type and not an object?
Yee exactly my thought
 
fge
int in Java is a primitive
But Integer is an object
 
6:58 PM
How many objects are created in total and how many are ready for garbage collection at //here?

class X { private Integer[] s = { 1, 2, 3, 4 }; }

{
X[] array = new X[6];
array[1] = new X();
array[2] = new X();
array[3] = new X();
array[3] = null;
}

A. 3 objects created 1 ready for garbage collection
B. 3 objects created 0 ready for garbage collection
C. 19 objects created 6 ready for garbage collection
D. 19 objects created 1 ready for garbage collection
I'm assuming the answer is C.
 
fge
@Alan you are facing autoboxing here
And frankly that should not be part of an exam question
This code by itself is outright ridiculous
 
It's an exam that a company I'm working for has created to replace the Oracle Associate as the feedback they received from other employees is that it did not in any way help them with Java
 
fge
Ooh, really? How surprising
 
Try to be more helpful fge if you can instead of being so offensive...
 
7:00 PM
So the consensus is that if it was int[] s, there would be in total 7 created?
 
fge
Offensive? How so?
 
Well not offensive, sorry for bad choice of word, but hmm.. More like, not so very helpful
 
everything is eligible to be collected after the last }. The values are not passed or returned anywhere
 
I'm hoping that tomorrow they continue to use the wrapper classes, but just incase. I'm sure you all know they try to trick you alot with these silly questions
 
fge
Yes, this question is outright silly
I bet they wanted to make you aware of autoboxing
 
7:02 PM
I missed the //here comment which should come after array[3] = null;
 
fge
If you declare Integer[] x = { 1 } and int[] x = { 1 } the impact is not the same at all
The first example is really equivalent to declaring Integer[] x = { Integer.valueOf(1) } due to autoboxing
But you don't even need an array for that
int i = 1; Integer i = 1; <-- same fundamental problem
Hint: before Java 5 the second statement would have been illegal
But Java 5 is stone age already
 
...which interestingly means the Integers are cached, and assumptions about them being collectible may be wrong
 
fge
@kiheru at least values from -128 to 127 are
No guarantee above that though
 
yep. that's what the spec says
 
fge
Indeed
 
7:06 PM
I don't think they get collected ever, but I haven't checked the implementation
...looking at the implementation now, they won't be collected
and to further complicate things, the first reference to the integer cache will generate them all, so 256 objects :-D
So the correct answer is to hit whoever wrote that question with a stick, and shout "Foo!"
 
 
4 hours later…
10:59 PM
Guys, in order to work with dates like, add X days, calculate difference of days, start with a user entry String, can I work with Calendar only or do I need to use Date too?
 
00:00 - 14:0014:00 - 23:00

« first day (1667 days earlier)      last day (3260 days later) »