i feel bad for neglecting it. time just flies by so fast though. easy to realize that when you are looking through the chat transcript and what you were looking for is 60 days ago
yeah, Cardshifter has been painfully silent recently. I am much to blame there as well, but the beginning of this year has certainly not been as planned... Only the visit to Ukraine went pretty much as planned.. but doing some work on Cardshifter should hopefully be good for me.
I wish I could pull my own weight on Cardshifter dev, unfortunately learning Java has been painfully slow for me because "life", as @Simon was also saying
@SimonAndréForsberg The only thing that has changed is I moved the game rules from Github wiki to the site itself, that must have been... two weeks ago?
Oh shit that was on March 12, over 5 weeks ago! (good grief times flies)
@skiwi I have realized that it could be implemented using a kind of tree. It parses expressions recursively. For more information, see the documentation source ;)
> Sometimes you would like to inform someone that you have made a commit and what that commit contains, so you want to copy the link to only one message and paste in another chat. Currently each commit causes two chat messages, for example: 1. [Zomis/Calculator] Zomis pushed commit 1b78c459 to master 2. added support for random parenthesis I'd like to see something like this instead: [Zomis/Calculator] Zomis pushed commit 1b78c459 to master: added support for random parenthesis Feedback...
@Simon @skiwi Here are my thoughts on the JS part. I've been learning some JS lately, and realistically, JS is far more within my reach right now than Java. So, what I think I'd like to do is, first, go through what is already there in the JS branch, document thoroughly (so I can familiarize myself with the existing code) then start adding to it with your assistance of course
So it would help me become better at web dev learning more advanced JavaScript, all the while contributing to the game logic, which is something that is high on my list of interests into Cardshifter
> The only solution is for the package author to provide an explicit index of the package. The import statement uses the following convention: if a package’s init.py code defines a list named all, it is taken to be the list of module names that should be imported when from package import * is encountered. It is up to the package author to keep this list up-to-date when a new version of the package is released.
> Package authors may also decide not to support it, if they don’t see a use for importing * from their package. For example, the file sound/effects/__init__.py could contain the following code:
@sᴉɔuɐɹɥԀ The JS code will probably primarily be used to call Java-side things. There are many 'Systems' existing already that is created in Java, with the possibility to 'add them to the game' from JS. It should also be possible to create 'Systems' within JS I think, but that is probably not something you have to do very often. Other than that, the JS will probably primarily be about declaring the available cards and their effects.
@sᴉɔuɐɹɥԀ im not totally sure why I don't have a description for all of them. I made that list by going through the ECS written in Java though so you would pretty much have to read and understand the java code to write the description
a lot of the ones that don't have a description would have a description that is almost the same as the name of the system, but some of them are a bit more complicated i think
/**
* Represents a book.
* @constructor
* @param {string} title - The title of the book.
* @param {string} author - The author of the book.
*/
function Book(title, author) {
}
> There are plans to eventually move the PhrancisGame logic into JavaScript to make changing/modding game more approachable. The JS files need to be documented, starting with this one.
Location of file: https://github.com/Cardshifter/Cardshifter/blob/js/extra-resources/test.js
@SimonAndréForsberg Yep... Though what you see is a generator expression, which is used to create a generator, so sum is bein called on the generated elements, hence no lists are stored
@SimonAndréForsberg well, do you think it will be mostly converting java 8 stuff to java 6? and also rewriting anything that is totally incompatible with GWT
@bazola No. At the moment it will be primarily about getting rid of the Jackson dependency in the cardshifter-api module, also getting rid of the log4j dependency. Also about replacing Arrays.copyOf and String.format with other alternatives. then maybe we can get somewhere...
I'd say I do, yes. Definitely not as well as Java though.
@bazola one more thing, once this stuff compiles, we need to figure out how to get the reflection things working... Did you manage to do make Java reflection and GWT work some time, or have I dreamt that?
@skiwi I don't know at what point you can say that you "know" a language, but I did do this in Python:
Lately, I've been, I've been losing sleep
Dreaming about the things that we could be
But baby, I've been, I've been praying hard,
Said, no more counting dollars
We'll be counting stars, yeah we'll be counting stars
(One Republic - Counting Stars)
The 2nd Monitor is known to be a quite star-happy...
Imagine that you want to develop a non-trivial end-user desktop (not web) application in Python. What is the best way to structure the project's folder hierarchy?
Desirable features are ease of maintenance, IDE-friendliness, suitability for source control branching/merging, and easy generation o...
well i am picturing having to hand write that much the same as I have done for the mmo. its going to have to be string based web sockets if we want to have one server work with html/desktop/ios/android. or at least, i haven't found a way to get anything else working yet
the "byte" serialization stuff that I have looked at simply converts the byte to a string anyway, so i think it actually ends up sending a lot more data than just sending a string
well i have spent some time thinking about it, and i don't have any better approach yet. basically it boils down to an integer at the start that specifies the type of message, then it unpacks the message with a static deserialization factory method
i have 22 types of messages already and it was really fast to write
well, i looked at the client and it is using regular sockets, so that is a non starter for gwt. i could convert that to use the libraries that i am using for web sockets, but the server has to be changed also for that to work
I think that the socket part in LibGDX can be written in a quite flexible way. So that Android, iOS and Desktop can use regular sockets, and GWT can use websockets. If that doesn't work, than we can use the approach you use in your mmo.
14:53:57.723 [ERROR] [org.gradle.BuildExceptionReporter] Could not resolve all dependencies for configuration ':core:compile'.
14:53:57.724 [ERROR] [org.gradle.BuildExceptionReporter] > Could not find com.cardshifter:cardshifter-api:0.6-SNAPSHOT.
15:20:13.082 [QUIET] [system.out] Validating units:
15:20:13.086 [QUIET] [system.out] [ERROR] Errors in 'jar:file:/Users/baz/.m2/repository/com/cardshifter/cardshifter-api/0.6-SNAPSHOT/cardshifter-api-0.6-SNAPSHOT.jar!/com/cardshifter/api/ClientIO.java'
15:20:13.089 [QUIET] [system.out] [ERROR] Line 11: No source code is available for type org.apache.log4j.Logger; did you forget to inherit a required module?
15:20:13.089 [QUIET] [system.out] [ERROR] Line 11: No source code is available for type org.apache.log4j.LogManager; did you forget to inherit a required module?
class Calculator:
def evaluate(self, expression):
"""
Evauluates a string and returns a Decimal implementation thereof.
:param expression: The input string
:return: A decimal representing the string.
"""
return Decimal(expression)
Although Java and other C-like languages can be a bit too verbose in that aspect. In Delphi for example, you can do function someFunction(a, b, c: String): String to define multiple parameters at once of the same type.
@Simon you seem pretty neutral about JSDoc, I was thinking of putting it up for review since it's my first time. Are you OK with this? Or would you rather just look it over yourself and call it a day?
@sᴉɔuɐɹɥԀ Can't say I have anything against you putting it up for review. I think perhaps parts of it is overly-redundant documentation, and parts of it are not entirely relevant, and parts of it can perhaps be formulated in a different way. Overall though, it's been way too long since I worked on that part of the code and there's so many things left to do there that I can't really care much about the documentation at this moment.
@SimonAndréForsberg Understood. I have to say for the most part I understand how the JS code flows the way you wrote it. To continue on that, would it be mostly a matter of having PhrancisGame.java and the JS file side-by-side and mostly "translating" from Java to JS?