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.
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.
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.
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
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
@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
@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
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.
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?
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...
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
@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 :)
@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.
@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.
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.
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.
@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.
@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
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
== Norsk ==
=== Interjeksjon ===
morn (Bokmål/Riksmål/Nynorsk)
(som en hilsen) hei, god morgen
==== Etymologi ====
Kortform av morgen
==== Relaterte termer ====
morn da (morna)…
Noun: morn (countable and uncountable, plural morns)
(now poetic) Morning.
William Shakespeare, Hamlet, lines 165-168,
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
@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
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? ♪♫♫