« first day (2852 days earlier)      last day (2313 days later) » 

00:00
"Core passions and aspirations should be consistent and in sync." -Lorii Myers (source)
00:10
does java know what constructor I'm using based on a method descriptor if I use object::new if there are multiple constructors?
based on inference
val constructor = Object::new; is ambiguous
but if the context requests a specific thing, it can resolve that ambiguity
so in many normal cases, Object::new is fine
remind me why they chose not to allow methodrefs to be declared with descriptors to reference a specific method explicitly?
why would they?
to enable actual pseudo-FP
Suppose I want to choose a specific overloaded method with varying parameters. Function<Object, Integer> would be an ambiguous type to infer which overloaded method we want if that is the type of a field or variable.
The only way to remove all ambiguity is to do perform arbitrarily infinite lookahead to use the environment to determine which method we choose. However, in this case, it is difficult to do so, since we supposedly can pass any object to this function. To attempt such an ambiguous guess would mean UB in Java, so the only solution is: let the programmer declare an explicit methodref.
00:37
the only way to remove all ambiguity, is to make everything be named uniquely
That, or make it so that everything can be inferred from all contexts.
that cant be done elegantly though
or you can go write llvm ir manually
Ya got me there.
Oh, by the way, what would you say is the classification of this Parser?
I've gone so far as to declare it a Top-Down, recursive descent, non-Predicting, non-LL(k) parser.
Based on what little I learned from this
Are you sure it's a parser and not a tokenizer?
Also forgot non-backtracking (unless you want to count caching incomplete Tokens and processing them later to determine what to do with the current Token, and it is only the immediate Production).
@JennaSloan I have an example class (pseudo-class) that has more documentation than code in it, explaining the algorithm I choose to use.
Thought you could technically just call Productions really big Tokens if you want to call it a Tokenizer ;)
00:52
Well, since one of its arguments is a List<Token>, I'm going to say it's not a tokenizer.
Did you glance at the algorithm per chance?
@JennaSloan the List<Token> would be the result of the tokenizer, not the input (iirc)
I believe I had it at one point to be Set<Token>, but then I realized, "Oh wait, I'm using shared Token objects."
@Wietlol exactly
I use antlr as tokenizer :D
being lazy works quite well
00:56
Yeah, but what are you going to learn from being "lazy"? :P
I'm doing this academic challenge so that I have something actually challenging. It has definitely also provided me with a deeper understanding of the JVM, as one might expect. It's a compiler. The Tokenizer and Parser are just components.
After I get a working, debugged parser, I then need to convert those Productions into a usable Context and an IR which the Compiler will read natively, so that I can just copy and paste this Compiler to make one for another language (apart from making all the Productions), and also for maintenance and versatility, as using an IR allows me to Compile arbitrary IR code to Java bytecode instead of just Tokens and Productions.
@AMDG Hmm, yeah I guess you're right.
It also greatly simplifies the Production-to-bytecode (compilation) process, as I can just create primitive constructs using the same algorithm as the parser. I suppose you could say my compiler is a fractal :P
@AMDG that I get stuff done faster, focussing on one thing at a time, etc?
doing only half of something doesnt mean it isnt challenging though
I can treat certain Productions as Tokens, and groups of these Productions as Production Productions. The Token Productions would be abstract bytecode sequences, such as for creating a new object (push <type> onto stack; push <parameters> onto stack; invokespecial <type.ctor>;), and the Production Productions would be methods or more discretely, code blocks.
@Wietlol I don't follow what you just said.
oh now I see
answer to my question.
Well yeah, but the purpose I meant to say, is to do something challenging for the purpose of learning something new and achieving a deeper knowledge than I had before.
Anyways, 9:07 PM here; 7 minutes late to night prayers. Good night everyone! :D
gooooooood morning channel
01:08
@AMDG Night!
morn
morn
user8622974
morn
@michael you forgot to put that in OakBot and alisha
night
@AMDG Oh no one told you. It's always morning here.
Ah, that is absolutely true XD
(G-get it? Because you could use negative values for night- nevermind)
01:14
@Michael waves hand
@AMDG Wow, a bad joke. You're in good company. xD
@Tavo Hey man
how's it going?
hya tavo
01:26
Effective Java errata: docs.google.com/document/d/…
Apparently, he's already working on a 4th edition! :O
Errr, might not be an actual edition. I guess you can fix typos and stuff between prints.
 
1 hour later…
02:46
@geisterfurz007 hi
03:27
@SpringLearner Please stop that :)
@geisterfurz007 which one needs to be stopped?
I guess you dont want me to say hi
correct?
Last time when we talked, you said not to ask how are you?
and I stopped but you never said to say hi
It would be highly appreciated if you'd stop pinging me on a daily basis with the only aim to say hi, yes.
Or other greetings for that matter.
Ok no problem
I did ping you to draw your attention of my problem that I posted here
you might have not seen as there are many discussions happened after my post
I do ping only for a cause, if you do not like that then I will stop
03:49
can i ask a question about git
04:08
@SpringLearner That is generally a bad idea in many chatrooms as chances are that that is seen as you seeing them as free personal assistant.
@Ogen Most people here use it so you have a good chance of someone knowing the answer, yes.
04:22
Is there a difference between "git diff --cached --name-status" and "git diff-index --cached --name-status HEAD"?
@geisterfurz007 It all depends how people take that. If you do not stay in touch regularly and only asks when you have problem the people will think one remembers when there is a need. every persons mind is different and so thinking also
 
1 hour later…
05:35
Day is starting great. Hibernate still not working with Wildfly 13.
06:20
TIL: When redeploying with gradle, gradle doesn't give a shit about new dependencies :)
IntelliJ does neither.
user8622974
o/
@geisterfurz007 because you use '+' ?
06:31
Nope. I changed the dependency from 5.3.1.Final to 5.1.14.Final
Ok.... IntelliJ still thinks I am using 5.3.1 when checking into the sources.
And I wonder why I get runtime issues ala NoSuchMethodError
Hi All
@Rani 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
I invalidated caches and restarted and synched the project.
@OakBot Thank You :0
@Rani Type /help to see all my commands.
06:35
:)
/help
Commands=====================
/8ball     Simulates a magic 8-ball.
/about     Displays information about this bot.
/afk       Allows users to mark themselves as "away".
/cat       Displays a random cat picture. :3
/define    Displays word definitions from the dictionary.
/ej        Displays items from the book "Effective Java, Third Edition" by Joshua Bloch.
/facepalm  Displays a facepalm gif.
/fatcat    Displays a random fat cat.
/groot     I am Groot.
/help      Displays this help message.
/http      Displays information about HTTP status codes and methods.
@Rani Please don't use chat as fastlane for your questions. Instead, wait a few days before asking here to give the people on the main site some time. If we want to answer questions there, we will look for them on our own.
1 message moved to friendly bin
Also: Your question is (to say the very least) not a good one. Just dumping a stacktrace in the body of the question and hitting Ask Question will not get you far. Show the code, describe the problem, provide a properly formatted stacktrace in addition to that.
Alright now IntelliJ performs pure magic...
I removed the cached gradle dependencies hoping IntelliJ would open the correct ones now. What happens?
IT OPENS REMOVED FILES
INTELLIJ PLEASE!
06:56
I give up
I just wasted another 2 hours trying to fix things which would just end up with hibernate hanging up on the select statement.
This is so bullshit.
07:13
o/
user8622974
\o
o_O
@geisterfurz007 Did you already try to turn on SQL logging to see what Hibernate is doing under the hood?
07:14
Seems there are too many bots
/cat
usefuk
*l
??
being able to show a gif of a cat on a single command, very useful.
@Gimby Yeah the query looks fine
It essentially logs the query and then hangs
07:26
Which might imply it is not Hibernate that is "hanging" but the database which is taking a long time to produce the results for the query
07:51
@geisterfurz007 but you are my personal assistant
also... try to use maven, maven never has issues... except when it has issues
Zoe
Zoe
@geisterfurz007 How?
happens for netbeans as well, when I change dependency versions, I always have to reload project.
Never tried if gradle run works though I guess it would...
Zoe
Zoe
If you manually deleted the caches without restarting IntelliJ, it's using a different cached version stored locally for the project. If you just did the local ones, there's a separate one. If you used invalidate caches/restart, then I agree it's weird
if I change deps in maven, it works :D
Zoe
Zoe
Maven is boilerplate though
07:59
@Wietlol good for you ;)
Gradle is good for other things though, than just pure dependency injection, also a lot cleaner file to read, when trying to determine which dependencies you're usng :)
Zoe
Zoe
Like 5 lines of code for one dependency
atleast 5 ;)
@Zoe maven is boi
@Gimby I can copy paste the query into ssms, fill in the one missing parameter hibernate displays as "?" and I get my result in a second.
The table has 17 entires and I need 1 of those.
If it takes the database over 3 minutes to get one result from 17 with a query that is essentially select 4 attributes from user where username = 'bacon', I would be really, really sad.
> private void DoCheck()
private void DoExecute()
sigh
08:06
Would have been a lot faster to write code that takes the bytes from the whole database and look for the ones I need.
I just wasted an hour of a coworkers time as well and he has no clue what's happening either.
It's time, Larrys and Gentlemen, to ask on SO.
Eventhough I have no idea what to ask...
> Henlo JPA not working, please help. Tanks in advance.
> Dis is error I am getting dumps stacktrace
Zoe
Zoe
@Wietlol No, maven just sucks
maven just wörks
Zoe
Zoe
So does grådlê
i see
It was IntelliJ's fault there I think.
08:12
@geisterfurz007 yes that query is too simple to suspect. So then there is network connectivity.
Maven is indeed boilerplate hell. So much so that I can take the pom(s) of an existing project, change a few things and presto I am rocking. I love Maven.
@Gimby There shouldn't be a lot of network involved. The Wildfly rests on C:\ and the database is a local sqlexpress
I also configured what I previously had in the persistence.xml as datasource on the wildfly and tested the connection which worked as well.
Okay then. Fair enough. Then I don't know ;) Not a bug in Hibernate (I know because I use it and boy do the most complex select queries to populate deeply nested object trees work amazingly well), not a problem with the query, not a problem with the network, well then. If you ask on Stack Overflow be darned sure to make note of everything tried so far.
Oof :/ I really appreciate you having taken the time :)
I guess I will first take a look into the source with the debugger and if that doesn't do anything, I will do that.
i still believe it is a driver issue
I have used the driver with a jdbc connection in another project.
08:20
I'd find it amazing if a driver is so bugged it won't do a bare bones select query. Nothing is impossible of course.
08:40
I wouldn't find it that amazing but yeah... I doubt it though :D
@Gimby you have to keep in mind that the connection to the database also has to be taken into account
a localhost database is always annoying to deal with
You are annoying to deal with
It had to be done, sorry.
!!!!
!!!!!!!!!!
!!!
Progress!
Hibernate doesn't find the table!
Best message of the day
09:07
what table does it not find?
this table?
(╯°□°)╯︵ ┻━┻
sorry, I have javax.persistence.noclue about this issue
you prolly messed up somewhere with the persistence.xml
Yeah, no, no!
It's all fine
(you should still use annotations though, you will get rid of all hibernate and persistence xmls)
I couldn't be happier right now.
You don't understand!
I have output
after the sql statement printed by hibernate!
ok
i also have output
dropped it at the toilet
mildly inappropriate
09:11
mildly accurate
In the end, it is never mysterious.
So how did you miss it? Wonky logging settings?
he refactored to maven
lol :)
Maven fixes everything.
tbh, the support for maven in almost every application is so much better than its alternatives and it usually works much faster and more robust
i dont care it is long... it does stuff better than others, which is the most important part
no disagreement from me. Gradle builds are more programmable, but I don't really wanna do that to be honest. Builds are too cookie-cutter nowadays, Maven does cookie-cutting exceptionally well.
09:20
@Gimby The implementation is the exact same with one single change. I now use @PersistenceContext instead of EntityManagerFactory to get the EntityManager and moved the method to a class that can be injected instead of having a static method. No idea why that fixes it but seems like the EntityManager was borked.
i still think a universal language makes much more sense than anything in this world
You have English. Which is good because I can tell you to shut up Wiedolf :D
who is Wiedolf?
Some green lion with a funny small beard under the nose.
a what?
09:22
@geisterfurz007 static methods are always code smells, but they do not explain not seeing logging that tell you a table is missing.
this is insulting to every majestic green lion in this world
@Gimby i find static methods to be quite useless
Alright! Next round of "What is happening?"
might be because im used to kotlin which has nice support for singletons
Why does hibernate use the H2 driver for an SQL Server?
> Unable to determine H2 database version, certain features may not work
Well guess what! The reason for that is that you have an SQL Server there you donkey.
> <property name="hibernate.connection.driver_class" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
And it's not like hibernate wouldn't know...
@geisterfurz007 probably the dialect configuration
09:25
Where do I find that now?
It works when using the datasource configured on the wildfly but why does it use H2 when I specify the driverclass to be an SQLServerDriver?
I go delete myself
Hibernate hangs up again
I am now 4.5 hours in office. And achieved exactly NOTHING
Motivating.
<property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect"/>
needs to be in the persistence.xml
@geisterfurz007 yesterday, I had achieved the knowledge that the 3rd party service, which we try to access via SOAP, doesnt have a good documentation and literally says "OK" independent of how you call it and what goes wrong
@Wietlol OK
it also throws stack traces to our face if we manage to break it
At least you get some kind of response.
09:30
oh yea, my response had less data than my input
after 5 hours of getting "No message found." response
because our credentials were incorrect
@Gimby Hmm, na. Hibernate likes H2 too much.
@geisterfurz007 only when it is instructed really badly
Ouch.
What can I do more than set the dialect like you said and set the driver?
who knows, maybe the datasource configuration in Wildfly itself
is this still localhost or already on the wildbeast server?
09:33
I have the full configuration in the persistence.xml (driver, url, user, pass)
which hibernate provider is configured in the persistence.xml ?
(the <provider> element)
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
@Wietlol localhost
Well that is correct for modern Hibernate versions.
I have 5.2.10.Final (with the hacky solution to exclude dom4j from compiled stuff)
but Wildfly was upgraded, so any hacks or manual deploying of Hibernate should be necessary
*not
09:45
My wildfly seems a little fcuked as well. I cannot see the deployments
@Gimby It comes with hibernate 5.1.14.Final -.- You'd think that from version 10 to 13 there would be a more recent hibernate in there.
I guess I could modify the modules.xml to have it chose 5.3.1.Final which currently is used only if you start it with ee8.preview.enabled=true or something like that.
Well if I read it correctly yesterday, the upgrade you're doing makes Hibernate go from JPA 2.1 to 2.2, it is built for JavaEE8 support. So forcing a newer Hibernate in there might be mucking up things quite a bit
5.2.10 is for EE8? Only 5.3 is.
oh sorry, no it isn't.
Testing with JEE8 support enabled is worth a shot, but I kind of doubt this has anything to do with Hibernate itself.
By now I think so too...
The problem is that I am fully out of ideas what I can check anymore.
Could also be that (by now) it is the wildfly.
I cannot even see my deployments.
10:08
hibernate is bae
I'd say that depends on the POV
10:23
true, if you dont use the good tools of it, I can see why it can be a burden
USM
USM
Morn
morn
user8622974
Morn
MoRn
Zoe
Zoe
Morn
10:30
Mörn
^ I expected this from you Zöe
or better Mørn
Zoe
Zoe
10:41
Morn is actually Norwegian :>
== Norsk == === Interjeksjon === morn (Bokmål/Riksmål/Nynorsk) (som en hilsen) hei, god morgen ==== Etymologi ==== Kortform av morgen ==== Relaterte termer ==== morn da (morna)…
Huh, it's in the English one too:
Noun: morn (countable and uncountable, plural morns)
  1. (now poetic) Morning.
  2. William Shakespeare, Hamlet, lines 165-168,
  3. But look, the morn, in russet mantle clad, / Walks o'er the dew of yon high eastward hill. / Break we our watch up, and by my advice, / Let us impart what we have seen tonight
  4. morn...
Interjection: morn
  1. colloquial variant of god morgen
hi how can i login in webview by using external xml
@bhupathituraga 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
Zoe
@bhupathituraga Sounds like Android. This isn't an Android room
okay thanks
Anyone up for another round of "What is happening?"?
Ready or not, here goes: When opening the Deployments page on my local wildfly 13, I get a red popup on the right side "Internal Error". Clicking on details, I get the following: Unable to load required resources for column 'deployment': {"status":500,"name":"indexed_db_went_bad","message":"unknown","reason":"Failed to open indexedDB, are you in private browsing mode?"}
Suggestions are accepted now! What is happening? ♪♫♫
Zoe
Zoe
10:48
Do you have an ad-blocker, tracker-blocking, DNT-request, etc?
Not that I know of. It worked fine with wildfly 10
Zoe
Zoe
xd
Lol @wonderb0lt
morno is "warm" in portugese, so there's that
why can't wildfly just setup the db from scratch if there is nothing in it?
I mean it must have been possible before as well, eh?
It works on another firefox profile
Retarded stuff

« first day (2852 days earlier)      last day (2313 days later) »