« first day (1501 days earlier)      last day (3454 days later) » 

2:04 PM
When is ? used in types?
 
fge
@BenjaminGruenbaum well, I don't really agree with that...
 
Good morning, Java!
 
fge
@Vogel612 back to what we discussed previously... It looks like we are both pretty opinionated fellows, so heated discussions are bound to happen in any case; no hard feelings ;)
 
That's the spirit :)
 
@BenjaminGruenbaum Yes, because you're trying to add an Integer object to an array of Strings.
 
2:07 PM
@Michael you don't say :D
 
xD
 
Mornin' @Michael!
 
This isn't Javascript lol
Sup @Uni
 
@fge seriously, you think a nondeterministic undecidable system with no runtime support and hacks around the language's proper type system (primitives etc) is good?
 
@BenjaminGruenbaum All goes to statically typed language.
 
fge
2:08 PM
@BenjaminGruenbaum well, at least, with Java you'll get a runtime error; in some other languages you won't get an error even at runtime (C, for instance). All that is required for writing correct code is discipline, and that is really not such a big deal
 
@fge I still get the feeling you're kinda... taking my points and say. "meh! wrong!" and usually I expect some reasoning...
 
@Unihedron How's that have to do with statically typed language? Look at C#, look at Swift, look at C++
 
anyways... I think I've cooled down a bit...
 
fge
@Vogel612 so do I, that's what "opinionated" means, right? :p
 
ermph. even opinions often have some reasoning..
 
fge
2:09 PM
@Vogel612 backtrack, backtrack, backtrack... Start again. Anyway, as to my question, I'll see what comes out of it
 
usually I hope for more than "because I say so" in a discussion ;)
yea let's see
 
.+
 
fge
@Vogel612 the core of my question anyway was "I'm no CS guru, I want to know about parsers, lead me there" -- yeah, it may be too broad, maybe there are some CS concepts I need to master before I even get to parsing. I just don't know
Which is why I'm asking for pointers. ANY pointers
 
Asking for off site resources is off topic in SE because it gets old and deprecated and bad.
 
fge
I'm no beginner in Java, far from it, but I can only go so far as to improve code; I can only improve upon the existing code, which embodies a practical application of a CS theory
 
2:12 PM
Even unhelpful ones? 0x5EA112
 
fge
@BenjaminGruenbaum which is why this question is asked on cstheory, not SO
 
@BenjaminGruenbaum not strictrly true....
 
@BenjaminGruenbaum cstheory.SE discussed this over at thier child meta. At last they made a [book] tag.
 
It's as bad on cstheory as in SO. It's way way broad.
I don't see how such a question could be answered with anything better than "read this and that book"
 
fge
@BenjaminGruenbaum what is? (broad)
 
2:13 PM
okay @BenjaminGruenbaum let's get to the drama again ;)
 
"How to write a parser"
 
fge
@BenjaminGruenbaum well, that's the point
@BenjaminGruenbaum no, "what is a parser"
That is a totally different question
 
Oh, "What is a parser" is perfectly fine IMO.
 
@BenjaminGruenbaum "Step 1: Just give up because you're too dumb."
 
I thought (because of what @fge said in the comment above) it was "How do I write a parser"
@Unihedron parsers aren't that hard and learning how to write them is fun :D
 
2:15 PM
JavaCC (Java Compiler Compiler) is an open source parser generator and lexical analyzer generator written in the Java programming language. JavaCC is similar to yacc in that it generates a parser from a formal grammar written in EBNF notation. Unlike yacc, however, JavaCC generates top-down parsers. JavaCC can resolve choices based on the next k input tokens, and so can handle LL(k) grammars automatically; by use of "lookahead specifications," it can also resolve choices requiring unbounded look ahead. JavaCC also generates lexical analyzers in a fashion similar to lex. The tree builder tha...
 
fge
@BenjaminGruenbaum here, I have a working parser implementation already which I've forked and modified
 
Yay fun!
 
fge
@BenjaminGruenbaum because the existing code was inefficient and awry
 
I'm not sure why you're pinging me with that but good for you :P
 
fge
@Michael yeah, but then the project I am working on acts differently -- parsers are generated at runtime
 
2:16 PM
On SO the rule violation would be asking for book/other external resource recommendations. If CS does not have that rule, I don't see a problem with the question
 
@Michael I know some of these words!
 
fge
@BenjaminGruenbaum you chimed in, you get what you pay for :p
 
@fge Ah, interesting
 
There is actually a book/course I warmly recommend which teaches you how to write parsers and how computers work at a low level. You write a CPU, then an interpreter for assembly, then an intermediate stack based language and finally a Java like language. It's an awesome course.
 
A parser factory
 
fge
@Michael yeah, and I still need to complete the vCard parser
 
100% would recommend.
 
@fge I was wondering about that! :P
 
fge
@BenjaminGruenbaum link?
 
@fge vCards are a mess from my experience...
I worked on some code, that generated vCards...
 
2:17 PM
33 secs ago, by Benjamin Gruenbaum
http://www.nand2tetris.org/
 
with hardcoded Strings for the boilerplate stuff T.T
 
I did it for fun Shrek a few years ago and it was a lot of fun - I already knew how to write recursive descent parsers at that point but it was still fun.
 
fge
@Michael I got sidetracked :( And went to indulge myself... This didn't help. But I will complete it with your library as a producer
 
@fge :D
 
fge
@Vogel612 yeah, @Michael's library is enough of an example (3 RFCs quoted and counting)
 
2:18 PM
The "dragon book" is a classic on compilers, but if the issue is parsers alone I don't know if it's the best
 
Yay dragon book!
 
fge
@kiheru I did have that book at one point
 
@Michael would you mind testing my latest changes here against the OakBot with =javadoc FunctionalInterface?
 
@OakBot should be running now.
 
@Michael Type =help to see all my commands.
 
fge
2:20 PM
@kiheru one problem I have is that parsing is all well all good, but you need to actually produce something out of the parsing
 
I've deployed it on an AWS instance.
 
=javadoc FunctionalInterface
 
@Unihedron java.lang.FunctionalInterface: An informative annotation type used to indicate that an interface type declaration is intended to be a functional interface as defined by the Java Language Specification. Conceptually, a functional interface has exactly one abstract method. Since [default...
methods](docs.oracle.com/javase/8/docs/api/java/lang/reflect/…) have an implementation, they are not abstract. If an interface declares an abstract method overriding one of the public methods of java.lang.Object, that also does not count toward the interface's abstract method count since any implementation of the interface will have an implementation from java.lang.Object or elsewhere.
 
Ick...
 
fge
@Michael sure you don't want to just provide a link to the actual resource? ;)
 
2:21 PM
@fge What do you mean?
 
Don't read the dragon book if you just want to learn parsers, it's an awesome book but it talks about stuff you don't care about at this point.
 
@Michael I patched up the message splitting...
 
fge
@Michael on FreeNode, javabot answers like this:
 
but I need you to get the changes to OakBot, because the Javadoc is missing on my instance..
 
fge
[02/12/2014 15:21:27] <idletask> ~javadoc FunctionalInterface
[02/12/2014 15:21:28] <javabot> idletask: http://bit.ly/1vgZ8ru [JDK: java.lang.FunctionalInterface]
 
2:22 PM
@fge The fully-qualified class name is a link
 
fge
@Michael note that how it provides a link, and then in the brackets also provides the source where it comes from
 
ohh dear...
 
@fge That's cuz it's on IRC, SE chat has better formatting
 
so you want to add a JDK tag?
 
I don't remember why I came here
 
2:22 PM
=java Integer
 
@Michael I don't know that command. o_O
 
=javadoc Integer
 
@BenjaminGruenbaum something about type-erasure
 
@Michael java.lang.Integer: The Integer class wraps a value of the primitive type int in an object. An object of type Integer contains a single field whose type is int.
 
fge
@Unihedron formatting apart
 
2:23 PM
Oh wait, I had a Java question - that's right, about generics
Well, thanks for the help everyone, cheers
 
@fge "java.lang.Integer" is a link.
 
fge
@Michael I know that
 
@fge Then compiler theory sounds like a match to me. I don't have any better recommendations though. I haven't even read all of the dragon book myself - interesting stuff, but it's difficult to remember the stuff unless you're programming a compiler at the same time...
 
soo what's your complaint?
 
@BenjaminGruenbaum Bye bye!
 
fge
2:23 PM
@Michael but then why dump the text of that link at all, why not just provide the link?
 
What was your question, @Benjamin?
 
ohh you're complaining about too much information in chat???
I guess that's gonna get a
 
40 mins ago, by Benjamin Gruenbaum
@fge I have a method that returns a Collection<T> and I need to create the collection and the T's inside the method.
 
fge
@Vogel612 this and at the same time "not enough" -- you only get extract
 
@fge Because it's informative to see a short description of the class in chat to share with everyone.
 
2:24 PM
Jump to that part in the transcript @Mic
 
fge
@Michael it is only informative if the extract is informative enough, and you cannot determine that
 
@BenjaminGruenbaum What kind of objects are the "T"s?
 
fge
@Michael whereas the link to the original documentation alone is sure to contain the full description
Which is why I really prefer freenode's javabot way of doing things
Not only that, but it is also able to differentiate between sources
 
@fge if you need more information than just the excerpt you can still click on the link...
 
@fge According to Javadoc best practices, the first sentence of the Javadocs of a method should give a good overview of the method. I assume this applies to classes too.
 
2:26 PM
I fail to see the exact problem you're having with this..
 
fge
If I ask about Objects, for instance, it will give links to both the JDK 8 javadoc and Guava javadoc
 
not here...
=javadoc Object
 
fge
@Michael and do you believe this to be actually true? Even Oracle doesn't obey that
 
Which one do you mean?
* org.omg.CORBA.Object
* java.lang.Object
 
Wth is corba?
 
2:27 PM
I have no clue..
 
"org.omg"
 
=javadoc org.omg.CORBA.Object
 
@Vogel612 org.omg.CORBA.Object: The definition for a CORBA object reference.
 
@fge Yes I do. And my experience has been that they do obey it.
 
hi @Unihedron
 
2:27 PM
@OakBot Fu-
 
@Unihedron lol. Every time I see that I think "omg!!"
 
fge
@Unihedron Common Object Request Broker Architecture -- what seemed like a good idea at some point and was then scrapped, but the "backwards compatibility at all costs" policy makes it so that you still have this in the core JDK nowadays
 
omg stands for Object-Management-Group btw...
 
fge
@Michael my experience tells me otherwise
@Michael see the source for Path for instance
 
@fge Oh wow.
 
2:29 PM
=javadoc Path
 
@Michael java.nio.file.Path: An object that may be used to locate a file in a file system. It will typically represent a system dependent file path.
 
fge
Anyway, I maintain: freenode's javabot way of quoting javadoc is vastly superior
=javadoc Path#relativize()
 
@fge That method doesn't exist.
 
"quoting"....
 
I've only been able to do constructors so far, @fge
=javadoc java.lang.string#string
 
2:30 PM
@Michael String(): Initializes a newly created String object so that it represents an empty character sequence. Note that use of this constructor is unnecessary since Strings are immutable.
 
fge
@Michael well, if you are not convinced, I really invite you to join FreeNode's ##java (requires a registered nickname); when you have used it several times you'll recognize the value of it
It really rocks
 
ermph...
 
@fge Thank you for the invitation. :)
 
I'll just mentally substitute that "quotes" with "references"
 
fge
2:32 PM
More information with less clutter
 
~ Michael has been invited.
 
/me unsatisfied
 
Can you create bit.ly URLs programmatically?
 
fge
@Michael yes you can
 
2:32 PM
Then do this regex crossword @Vog.
 
It would be nice to add them to OakBot
 
fge
freenode's javabot does precisely that
(for javadoc links)
 
@Unihedron lol
@fge Ah, cool!
 
@Michael Yes but you should cache the links you've created so you don't make many links with intense data IO.
 
@Unihedron Yea
 
fge
2:33 PM
But since this is a markdown-like chat site you may dispense from URL shorteners
 
If you try to generate a short link for the same URL, does it return the same bit.ly URL?
 
no
 
@Unihedron I doubt that this will satisfy me.....
 
fge
@Michael no idea but I guess it does
 
It makes new links so it gives you additional stats tracking.
Stupid idea.
 
2:34 PM
@fge Well, having a bit.ly URL means I can include more characters in the message. SO Chat is limited to 500 characters.
 
@Michael DTOs for my database.
!!afk coffee
 
@Michael ... mind fetching what I referenced earlier and testing it out?
 
fge
@Michael haven't thought about that -- I have never hit the message length limit
 
@Unihedron Guess!
Greetings room!
 
@Joe'sMorgue Sure!
 
2:35 PM
Hey @Joe.
 
Heya!
 
Greetings Joe!
 
@Vogel612 Sure, what's the link to the pull request again?
 
How is everybody?
 
there is no PR...
I can make one, though..
 
2:35 PM
@Unihedron I got my board yesterday!
 
Finally?!
 
Yep!
 
Great!
 
It will be shipped back in about 20 minutes
 
2:36 PM
New board, new problem
 
fge
Aah, answers to my question
 
@Joe'sMorgue Good grief that's rotten.
 
Asus...
NEVER BUY Asus...
 
@BenjaminGruenbaum You would need some way of telling the method how to construct the objects. For example, passing in an interface that has a method which generates new object.
 
This time it's the NIC, POSSIBLY the PCI too...
 
2:39 PM
The channel regulars will become paranoid about Asus following the saga
 
That's the idea!
 
@kiheru Thank god I'm not a regular.
I like ASUS, their prebuilts were great until I started building my own computers.
 
They build great stuff, but if you get a defective unit, you might as well throw it away and buy a new one, repairs are impossible.
This started in August!
 
Still quicker than these people accepting answers.
I think I just got an answer posted back in May accepted a month ago.
 
At least it got accepted. That's far from guaranteed
2
 
2:44 PM
IKR
 
At least the people are are not doing this for a living. This board is volunteers, not employee based, unlike Asus' repair dept.
 
@Vogel It's not picking up the "javadocs" directory for some reason...any idea why?
It keeps saying that it can't find the class.
 
@Michael uhhhhhm... actually not ...
I haven't touched the Javadocs code..
 
3:00 PM
@Vogel I got an NPE.
java.lang.NullPointerException
	at com.gmail.inverseconduit.chat.StackExchangeChat.sendMessage(StackExchangeChat.java:173)
	at com.gmail.inverseconduit.javadoc.JavaDocAccessor.javadoc(JavaDocAccessor.java:50)
	at com.gmail.inverseconduit.bot.Program.lambda$4(Program.java:162)
	at com.gmail.inverseconduit.bot.Program$$Lambda$9/11032177.accept(Unknown Source)
	at com.gmail.inverseconduit.commands.CommandHandle.execute(CommandHandle.java:109)
	at com.gmail.inverseconduit.bot.DefaultBot.lambda$1(DefaultBot.java:46)
 
??? confusion...
 
The problem was that I was putting a space after the colon in "javadoc:"
 
~going down
~JavaBot, at your service
 
fge
Argh, NPEs without a message
Hint: starting with Java 7, you have T Objects.requireNonNull(T, String)
Or with Guava, T Preconditions.checkNotNull(T, String) which does the same
 
or Validate from apache if we have that in dependencies
 
3:03 PM
@fge Oh, that's cool.
JavaBot is running Java 8, so maybe we could add it.
 
I don't like that it throws NPE's all around when you validate arguments...
 
fge
@Michael while you're at it, decorate your code with JSR 305 as well :p
@Vogel612 well, if you require that something not be null, what better exception to throw back to the user than an NPE?
 
@fge IAE... but only if it's an Argument..
I think it's more intuitive..
 
fge
@Vogel612 well, NPE is a subclass of IAE
 
@fge my type hierarchy tells a different story:
 
fge
3:08 PM
In fact, with Guava you could use Preconditions.checkArgument(foo != null, message) and that would throw an IAE, the difference being that the argument is not returned (obviously, since the first argument is a boolean)
 
Intellij?
 
fge
Argh, sorry, NPE inherits RuntimeException
Anyway, I'm fine with NPEs as long as there is a meaningful error message attached to it
In any event, it is an unchecked exception therefore an exception inheriting RuntimeException (which, unfortunately, inherits Exception -- I really wonder the reason behind this design decision)
 
~JavaBot, at your service
 
=javadoc NullPointerException
 
3:11 PM
@Michael java.lang.NullPointerException: Thrown when an application attempts to use null in a case where an object is required. These include: Calling the instance method of a null object. Accessing or modifying the field of a null object. Taking the length of null as if it were an array. Accessing or modifying the slots of null as if it were an array. Throwing...
null as if it were a Throwable value.
 
=javadoc IllegalArgumentException
 
@Vogel612 java.lang.IllegalArgumentException: Thrown to indicate that a method has been passed an illegal or inappropriate argument.
 
Ah, a new way to write unmaintainable code. Throwing null gets automatically translated to NPE.
 
:O
 
@kiheru Haha
 
3:15 PM
someone send an email to the guy who wrote thc.org/root/phun/unmaintain.html
 
I'm back!
It's on it's way...
 
Got to go. Bye all. :D
 
Bye :)
 
Cya
 
**unsummon
~bye, bye
 
3:52 PM
Hi
 
hi
 
Fairly new to Java. Does Java have anything like php.net? For PHP I would search php.net/mysearchtearm
Right now I'm just googling :d
 
oracle..
and tons upon tons of documentation
 
Okay, I have the Java EE7 docset
still easier to search google. I guess that works
 
@taco you can still ask around here, if you find nothing or don't understand stuff.
be aware sometimes we are busy people, though ;)
 
3:58 PM
Okay thanks. Yeah I hang out in Javascript and help people there. I've been in here a few times, but its been dead
 
fge
@taco there exist Java libraries for nearly everything you can think of, and the Java community has probably even defined a specification for it
Web services? See JAX-RS
 
I looked at Java in 98, but didn't think it was going anywhere. It was being used for 3D cubes at the time
lol
 
@taco It's a quiet hour for this room.
 
fge
In 1998, Java was in its infancy
 
yeah
 
4:00 PM
Blue line shows "now".
 
okay cool
Is Java tough?
To me, it just seems like it does everything
Overwhelming
 
Programming is about making impossible things possible anyway.
shrugs
 
true
I have worked on a Jax-RS task. It's in QA now
Seems pretty cool
I googled the regex and date stuff I needed and reused code for talking to db via jdbc
 
You googled regexes... Wait, what?!
 
haha no
 
4:03 PM
 
I googled the java imports I would need to do pattern matching
 
java.util.regex.*;
 
Yeah, that's the kind of stuff I don't know. Gotta say IntelliJ is worth every penny. It's helped
 
..
 
Don't like it?
 
4:05 PM
How long have you been doing java? (\d (year|season|month|day)s?)
just curious
 
fge
@taco IDEA FTW -- I agree
 
IntelliJ is the best IDE
 
fge
IDEA is the best IDE out there, and this is not even an opinion, it's a fact
 
@fge Beat you to it
 
I was told "you're learning Java" and I was like uh, okay...
In october
 
4:07 PM
oh, so less than two months. I don't blame you, then.
 
luckily, i can pick up tasks I think I can work, so I just figuired I'd try a java task and I did fine
 
fge
Java is not well regarded by new people in the computer programming field since they have been constantly exposed with languages which do a lot of type lifting for them
 
I jz freaking hate java print API
 
fge
Which is nice -- except when it fails, and then they're lost
 
But I couldn't write anything from scratch
 
4:08 PM
@ItachiUchiha Coding is hard. Let's just hang out in the chat room and chat.
 
well itz not long before you will start writing at it
 
I've been in IT since my Army Telecom days (late '90s), so I've seen a wide range of languages. I agree you get lazy with the typing in other languages
 
fge
When you are a beginner at programming, unlike what most people recommend, I recommend a language with strong typing, not weak
 
@Unihedron yeah.. thats what I am doing..
xD
 
@fge I started with C++. It took many months years to mastery, but after I learned how pointers work it was absolutely fascinating.
 
4:09 PM
I started with LoGo :-P
 
It's like... I could actually write code and show to my programming course teacher and he'd be like Oh wow, that's machine code.
 
closest I've come is some Objective-C for iPhone apps
 
fge
@Unihedron uh, C would have been enough for pointers... And C++ has a lot of concepts; congrats for making it out of the language
 
but then C showed me the power of what a program can do
 
fge
Personally I hate C++
 
4:10 PM
@fge :D
 
fge
(whereas I love C=
 
@fge ... :(
C# is great. LINQ and all.
 
C for life time
 
Still haven't done any of it yet. I'm trying to learn some of it though.
 
I have never tried Objective C or C#..
 
4:11 PM
C;
C++;
C++++ -> C#
(because, y'know, a # has four +'s)
 
hehe
 
I tried Objective-C because I switched to Mac in 2002
 
in Sandbox, 2 mins ago, by Vogel612
NOOOOOOOO, the regex doesn't do what I want it to do!!
 
SE has updates its server with new mobile support for chat. Its cool, now even names appear on mobile after you type @
 
I used to do phone support for Earthlink and had to support Macs
 
4:13 PM
I work on Mac, but still do java on it..
 
@ItachiUchiha That's implemented a month ago.
 
yeah, I wasn't interested in Java. Now that I have to be, I like it
 
Well I haven't used it for a month :-P
 
Picked up some Javascript recently to checkout Node, but man, it's like hipster central
Still waiting for the day a 15 year rewrites ECMA script completely. It'll probably be next year :p
 
I have never been able to undrstand lib built on JS, except jquery
jquery is a life saviour
 
4:17 PM
jquery sucks
I always make jquery jokes though
PROTIP: Recommend what you hate and never use it.
 
hahaha
well it makes life easy. I have no idea why you hate it.
 
lets check who has the fastest internet speed.. I know I am gonna be at the bottom
 
~ Departing
 
If you're developing a library on the other hand, please take a moment to consider if you actually need jQuery as a dependency
 
4:25 PM
@Unihedron if I'm mostly going to be working with web services, is this mostly going to be done in Jersey/Jax-RS?
I do backend work
For now I think that'll be my focus on my doc research. The rest I'll google unless you have some input
 
@taco let him have his sleep..
 
?
 
it's probably around 3AM where he lives and he needs to go to school tomorrow
 
Oh he left. oops
 
Anyways, I'm out for today, too ;)
 
4:29 PM
Okay.
 
Hi @Ita & @fge
 
fge
Someone on Windows please test that for me: Paths.get("c:").resolve("foo") --> does that return "c:\\foo" or "c:foo"?
 
I have created a hibernate application but it's not creating tables, any idea, how it can be fixed?
 
dah
5:11 PM
Anyone here a java web developer?
Or know anything about struts?
 
5:47 PM
@fge It gives c:foo
 
fge
Uuuh
 
@dah Not Struts, but i know about Spring
 
fge
@ItachiUchiha that is really strange... It does not return an absolute path even though c: should be considered a root
I really need to get Java running on my Windows VM and do some tests
 
@fge Why will it return an absolute path?
 
fge
@ItachiUchiha no, c:foo is not an absolute path in Windows
c:\foo is, though
 
5:52 PM
True
 
fge
c:foo is an example of a Path for which .getRoot() is true but .isAbsolute() is false
That's bonkers
With Unix filesystems at least, the two are exactly correlated
(I meant .getRoot() is not null)
 
@ItachiUchiha Late reply but yes it does. The user can't access the page-numbers, it only moves through the login.
 
@Gemtastic How are you managing it? Can you show me a screenshot?
 
Not yet, still working on it Q_Q
Today wasn't a very good day...
Didn't sleep, got stuck on a train for 2½h because the train before mine hit a bird...
 
6:06 PM
Ohhh
I don't understand how you are planning to make access restriction with Pagination
so curious to see it ^_^
 
:)
 

« first day (1501 days earlier)      last day (3454 days later) »