« first day (361 days earlier)      last day (3499 days later) » 

00:00
I wonder if there is a way with JavaScript to completely re-write the HTML of a page with another page.
@SirPython isn't it possible to have jQuery (or something) load HTML from another file and set it to an element?
RELOAD!
@SirPython jQuery? :)
[Cardshifter/Cardshifter] 2 commits. 3 issue comments. 103 additions. 10 deletions.
There might be.
00:00
[Cardshifter/HTML-Client] 32 commits. 1 opened issue. 1 issue comment. 809 additions. 157 deletions.
But I am not too familiar with jQuery.
[Hosch250/Rubberduck] 8 commits. 5516 additions. 4260 deletions.
@SimonAndréForsberg I'm pretty sure we did pretty much exactly that with our website and the Java that Marc-Andre made (except that's dependent on Tomcat)
[rubberduck-vba/Rubberduck] 2 opened issues. 1 closed issue. 9 issue comments.
[Vannevelj/VSDiagnostics] 1 opened issue.
Hey look, we beat the duckies today!
00:01
[Zomis/Server] 2 commits. 31 additions. 3 deletions.
@Phrancis I believe that uses a templating engine, which is server-side based, which is not an option in this case.
Right, figured as much. But surely that could also be done client side right?
@SirPython You haven't done much front-end webdevelopment stuff, have you? :) Or if you have, how have you survived without jQuery?
@Phrancis with some JavaScript anything is possible.
3
^^ quotable
@SimonAndréForsberg I have done front-end development (JavaScript was my first language). I don't know how I have survived.
@SimonAndréForsberg Sadly.
00:04
I think jQuery is a solution for the "one-page/multi-page" problem, I'm not saying it is the solution.
Definitely worth looking into
@Lokkij might have other ideas as well.
My first thought would be to hide and show groups of HTML elements that are the different pages, but that is not a very smart idea.
I can highly recommend that you explore the world of jQuery, @SirPython. Believe it or not, but I think it does make JavaScript slightly better.
@SirPython doesn't sound like a very bad idea either.
> jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers. With a combination of versatility and extensibility, jQuery has changed the way that millions of people write JavaScript.
00:06
I wonder if AngularJS would be of any use (dynamic pages).
@SirPython I'm pretty sure it could be of use. I personally have no experience in it, but I think @skiwi has used it a bit
Yikes! I just noticed something that JSHint didn't catch: line 70 of server_interface.js should be var types = this.messageTypes;. If someone could make that change, please.
(It's too small for a pull request).
It'd be a breeze to include jQuery from Google CDN it looks like.
On it
[Cardshifter/HTML-Client] Phrancis pushed commit 27bd9a8e to master: fixed ine 70 of server_interface.js
@Duga Thanks @Phrancis
00:15
@Simon Can you go ahead and add @SirPython as contributor? Make life easier for us :)
@Duga Sorry. I didn't mean to create the PR.
@SimonAndréForsberg Thank you.
So have we decided how we are going to handle the problem I mentioned?
Don't switch page?
00:22
So keep everything on one page?
either by dynamically loading other HTML files and injecting their data into the main page, or by writing a very long HTML file...
as we're aiming for moddability sooner or later, I'd try dynamically loading, as it is likely that you'll need to dynamically load stuff later on.
Good thinking
Holy crap
Is it really that easy??
I guess so.
So now, I guess we can create multiple HTML pages, and have one main one that will dynamically load all the others when needed? Or <suggestions> ...
00:26
Worth a try for sure
@Phrancis lol
One word: jQuery.
I'm starting to believe it
I guess I understand now why people say, "I see that you are using <language> for <problem>. You should totally drop that and use jQuery."
I thought it was a running Stack Overflow joke for a long time.
00:28
it becomes a joke when it's used excessively
like "How do I add two numbers in JavaScript?"
the answer then is not to use jQuery
function add(a,b) { returns a+b; }
There are many things that jQuery can do, but there are also many things that is just unnecessary to use it for.
OK cool
00:30
Which version of jQuery should we use?
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
</head>
May I suggest ^^
Do we plan on supporting IE6, IE7, and IE8?
Sure. Also, as a future note, using jQuery may make making this game mobile slightly more easy.
@SimonAndréForsberg I hope not
@SimonAndréForsberg So we're going to use ES standard 1? </joke>
00:32
> jQuery 2.x has the same API as jQuery 1.x, but does not support Internet Explorer 6, 7, or 8.
IE is really good for downloading Chrome or Firefox
I'd go with using jQuery 2.x
Okay.
TTGTB here, you enjoy yourselves now :)
Hahah, will do!
Wonder if there's a CDN for jQuery 2.x - or if we should just install it client-side... (is that how it works?)
00:35
@Phrancis We could install it client side, but I don't know how inner folders could access the jQuery folder (I've seen it done before, just I've never understood how).
https://code.jquery.com/jquery-2.1.4.js
Having it client side would definitely improve page loading speed.
True
Although...
I've read that jQuery is cached so if you use a CDN that's common, like Google for instance, most users will already have it ready
Ah, that is interesting.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>‌​
Just a thought, but perhaps you could create a html file or two on your machine and tinker around with some jQuery? Meanwhile I can mess around trying to figure out some more server comm stuff
I would really like if the first thing we implemented was a server console on the page, to just print messages back and forth. Simple Show/Hide button for it. Maybe a good place to start with jQuery?
00:41
Maybe. Although, it may be a little overkill; all it is is a log of messages.
True
Should I still be working in my fork, or should I be working in a separate branch of the main repo?
Probably easier if you just branch from now
You can still do PRs if needed, but most the time as long as the code works and it's not blasphemously ugly, we just merge
When should new branches be created? When working on a new feature?
[Cardshifter/HTML-Client] Phrancis pushed commit f544815d to connection-test: extract connection_test.js from main login page
00:53
@SirPython Pretty much: Always.
@Phrancis Could you be a tad more specific, please?
Sure :)
Wow, I'm tired. I did not mean "allocation".
As a workflow in general, we never commit directly to a "main" branch. In our case, right now we only have master which is production; we'll probably have a develop at some point too
For the main repo, we always work on branches, and then merge when we're done
(by that I mean the Cardshifter primary game repo)
It helps avoid merge conflicts and just generally the PITA if two or more people happen to be making changes to the same files
And easier to back-track if something goes wrong if it's been implemented in a branch rather than committed directly to a main branch
Gotta make a trip to the grocery store, I'll be back later
Oh @SirPython I had to make a little change to the HTML form, you might need to adjust your JS a little bit
    <div id="server_other">
        <label for="server_other">Other Server:</label>
        <input name="server_other_input" id="server_other_input" type="text" />
        <br/>
    </div>
There was an id conflict between the div and the input, so I changed the input id and name to server_other_input (instead of just server_other)
Or I can just change them on my branch :)
01:17
[Cardshifter/HTML-Client] SirPython pushed commit bc9d61e2 to dynamic-page-allocation: rearranged form, updated js
01:27
Added protocol addon functionality

When the user is logging in, they may or may not enter the server name with
a ws:// or a wss:// preceding the server name. With a simple regexular
expression, this code will now add the correct protocol to the beginning of
the server name string before the socket is created.
[Cardshifter/HTML-Client] SirPython pushed commit b3ccb6aa to dynamic-page-allocation: fixed typo in ternary operator
TTGTB. I will work on this tomorrow.
regexular? nice ;)
 
7 hours later…
08:14
hey
 
5 hours later…
hey @SimonAndréForsberg
I noticed you mentioning you were afk in the coming 2 weeks from some point, having a vacation?
yup. Going to France again. Leaving on Saturday
Sounds nice
This is fun... I need to connect this app to a WebSocket;
currently it has a C++ Socket.IO library (still the Qt5 app), but I don't know why it is being used as WebSockets can also be done in pure QML
So I want to replace it, but there is no documentation about what the websockets do
And the guy I need is on vacation
13:29
Monking!
hey @Phrancis
@skiwi Isn't that fun?
@Phrancis So much fun, when the deadline is kinda Friday
@skiwi "kind Friday" eh?
@Phrancis Maybe the deadline is on Friday, but I don't know yet
And you made me worried there that I accidentally wrote "kinky Friday" or something
13:44
@skiwi lol nice
Do they have a manager/supervisor you could ask?
There's people I could ask, but none that would know
Also funny that after starting the NodeJS server it crashes after a minute
var timeBeforeBoom = setInterval(function() {}, (1000*60));
^^ Internal-facing, legit production website used for call metrics QA. :)
wow, you have many tabs open
Look who's talking ;)
Ha haha
> View all 759 tabs
13:55
I only have 16 open, which is probably getting real close to what IE can handle
I've started using Vivaldi for nice tab management
It still needs improvements, but tab stacks are sweet and I like the look a lot more than other browers'
Screenshot?
If it exists for Chrome I might have a look, it's a bit annoying the way Chrome manages tabs (or rather, the way it doesn't)
@Phrancis Vivaldi seems to be a webbrowser of its own
Drag tabs on top of each other -> creates stack
Ohright, yeah it's a browser
14:05
Ohhh ok
Looks pretty sweet, what's the backbone behind it? Looks a bit like FireFox to me?
It's chrome, I think
Which means chrome extensions (mostly?) work on it
@Simon I was thinking about the API possible documentation, and wanted to ask you if you thought that having a JSON-formatted example in code comments for each message would be a good idea?
Damn, on my next PC I'm really going to need mre than a 256 GB SSD
@Phrancis That's a very good idea! I'm loving it on the Philips Hue API
@skiwi Are you allowed to post an example? (is any of the API code public?)
@Phrancis I think it's public, all you need to do to access it is to create an account
14:14
Oh nice, what's awesome
Where is the pom in the main repo?
Eh... isn't it converted to Gradle?
Maybe
Seems to be
So there's no pom
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <version>2.6.1</version>
    <configuration>
          <links>
            <link>http://java.sun.com/javase/6/docs/api/</link>
          </links>
          <detectOfflineLinks/>

          <!-- ADD FROM HERE -->
          <tags>
            <tag>
              <name>example.</name>
              <placement>aoptcmf</placement>
              <head>Example :</head>
            </tag>
          </tags>
I'm trying to do this ^^
14:18
Well yeah that won't just work there
Apparently a way to create new JavaDoc tags
You need to fiddle around with the Gradle javadoc plugin
[Cardshifter/Cardshifter] build for commit 3f5350c1 on api-documentation: The Travis CI build passed
I'd want to go home, but need to wait for the bus
@Phrancis yes, it's a good idea
@Phrancis I don't think there's any need to create new JavaDoc tags. Don't fiddle around with the Gradle Javadoc plugin or anything else
14:33
OK I won't
you can use <code>some code</code> in Javadoc
or <pre>some code</pre>
Gotcha. Basic HTML in general supported in JavaDoc?
Perhaps not, looks like there's a particular syntax. I won't go heavy on it anyhow
14:56
I hate shared inboxes, especially when your colleagues move/delete emails you're working on, and when you asked what happened to it, "nobody moved it". Grr.
15:11
package com.cardshifter.api.incoming;

import com.cardshifter.api.messages.Message;

/**
 * Incoming login message.
 * <p>
 * A login message from a client to add a user to the available users on the server.
 * This login message is required before any other action or message can be performed between a client and a server.
 * @author Simon Forsberg
 */
public class LoginMessage extends Message {

	/** User name <em>generally</em> input by a client user. */
	private String username;

	/** Constructor. (no params) */
@ all ^^ Does this documentation style look good for the API?
@Simon Do you prefer the @author left out, or is it better to have it in?
alright with me
Update LoginMessage.java

Add JavaDoc
[Cardshifter/Cardshifter] build for commit e1eaaa41 on api-documentation: The Travis CI build passed
15:41
> I will be using an `@example` keyword throughout API and perhaps other documentation. If possible please have it added to the pom or Gradle so that it is recognized as a valid JavaDoc tag.

Example usage:

/**
* Constructor.
* @param username the incoming user name passed from client to server, not null
* @example Message: <code>{ "command":"login","username":"JohnDoe" }</code>
* @example Response: <code>{"command":"loginresponse","status":200,"userId":6,"message":"OK"}<
15:53
@Duga @Phrancis Is it even a problem at all if it is not added?
@Phrancis Is there no way to prevent that?
Sounds like a huge violation of that business certificate thing (ISO standard) if mails may go missing
@Phrancis For the API documentation you could consider having separate documentation pages not directly linked to the classes
But if it's available in the classes then that's a good starting point already
16:39
@SimonAndréForsberg Probably not, no. Feel free to mark if you think it is not worth the effort :)
3d export of one of my voxel models in libGDX:
@skiwi Move them to my personal inbox? Other than that, not really. It's a crappy system, but they are too stuck up in their old ways to actually use a ticketing system for day-to-day client issues
> I don't think it's worth the time to fix this. At the moment, I don't think it is a problem to do it like this, if it would ever be a problem, then change the documentation style.
16:56
my dream of being able to fly around a city sim copter style is one step closer :)
17:08
@bazola Damn that's cool!
@Simon what's up with the clazzes name? :)
private static final Map<String, Class<? extends Message>> clazzes = new HashMap<String, Class<? extends Message>>();
@Phrancis class is a reserved word in Java, I could of course make it classes, but I'm so used to naming it clazz that it automatically became clazzes
@SimonAndréForsberg Hah OK, that's a clever workaround
17:33
Update Message.java

Add JavaDoc
> this is not entirely accurate. This makes it sound like the string is the entire command, but the string is just for representing the type of message that is sent.
[Cardshifter/Cardshifter] build for commit a9c2b491 on api-documentation: The Travis CI build passed
18:12
too bad i have no idea how to translate this tutorial to libGDX as far as fixing the textures
Update MessageTypeIdResolver.java

Add JavaDoc
Update Message.java

Made correction to constructor doc (thanks @Zomis)
@Phrancis I'd focus on the messages in incoming, outgoing and both as that's the messages that will be used in the JS game
@SimonAndréForsberg I figured as much, I'll hit those next, just figured it would be good to document the overarching classes a bit
[Cardshifter/Cardshifter] build for commit 285be2af on api-documentation: The Travis CI build passed
[Cardshifter/Cardshifter] build for commit e105ced6 on api-documentation: The Travis CI build passed
OMG, Github is so ridiculously slow on this browser
@SimonAndréForsberg Is there somewhere I can look that has guidelines on what the sent and response messages should look like in JSON?
18:26
@Phrancis sent and response? How do you mean?
Like in that issue I submitted about @example
In fact, about the response, it might be better if you either just skip that, or use @see SomeOtherMessage
Hmm, not sure I understand how that works
then just skip the response.
the server is not always a pure request/response system. It can send you almost any message at any time without you requesting it
OK
@SimonAndréForsberg Is there some way to infer what the sent JSON messages should look like for each message class, or are they documented somewhere already?
18:41
@Phrancis it's not documented already. But yes, it's possible to infer it. Jackson (which does the serialization in Java) uses the field names as string keys
and serializes the value depending on its type
Is that in the API directory as well?
19:22
@Phrancis what is?
Jackson
@Phrancis Jackson is a third-party library dependency. It is not inside cardshifter-api at all.
Oh ok
I guess I could just play a game and look at the logs, if needed :)
I do want to make more progress on the HTML Client before I tinker around documenting all this stuff, I'll probably document along as we make progress
I don't think the JavaFX logs show the actual JSON strings that are sent, as those are sent by Jackson.
@Phrancis good choice
if you're interested, here's a bit info about Jackson. github.com/FasterXML/jackson-databind , you could read through the "1 minute tutorial" and see if it helps you understand what Jackson does.
19:55
[Cardshifter/Cardshifter] Phrancis pushed commit 3b2760f1 to api-documentation: Update LoginMessage.java
[Cardshifter/Cardshifter] build for commit 3b2760f1 on api-documentation: The Travis CI build passed
 
1 hour later…
21:13
woot
that doesn't look quite right
because of the lack of shading?
21:39
because of how all the buildings look so... mono-colored
yeah
well thats just a product of the process. all of the voxels that appear the same color in that picture are actually the same color in the model, its just that the models are going through a different rendering process to create the 2d images for the game
unfortunately not practical for real time because it takes a few seconds for each one to render
22:08
microbasic.net/tutorials/shadow-mapping/Full.html way over my head but this is a great tutorial for manually placing shadows
22:27
Monking.
hey @SirPython
Hello, @bazola
22:45
Hey @SirPython
Hello, @Phrancis.
stop saying hello and start coding already Hi @SirPython :)
2
@SimonAndréForsberg Sorry! I'm multitasking: I'm hello writing saying posta.
no worries :)
22:49
@bazola Whoa.
unfortunately i looked up the old sim copter and streets of sim city videos, and they actually look a lot better than this.. not sure 3d is my thing :)
I'd say that's an impressive start though!
I'm sure will a little texturing it would look really good
im not sure that the novelty of being able to fly around in your own city is worth the additional hours it will take to polish this
22:51
I've never been able to accomplish things like that.
@bazola probably not, but it might be worth it to get the practice of how to do it :)
@SimonAndréForsberg ty :) its really not too hard actually
after all, you're making a Sim City style game and not a Star Wars First Person Shooter game.
yesterday i estimated that it would probably take a year to figure out how to do this... but then i found a detailed guide for exporting the models, and today here we are, lol
3
for some reason programmers are horrible at estimation :)
Well... at least you met your deadline.
23:45
Mat's Mug vs. Simon André Forsberg: 355 diff. Year: +1245. Quarter: -259. Month: -259. Week: +166. Day: -5.
Loki Astari vs. Simon André Forsberg: 2894 diff. Year: -2882. Quarter: -1286. Month: -1286. Week: -21. Day: -20.
200_success vs. rolfl: 2837 diff. Year: +2091. Quarter: +2425. Month: +2425. Week: +150. Day: +75.
200_success vs. janos: 15916 diff. Year: -3684. Quarter: -763. Month: -763. Week: -460. Day: -5.
@Duga ah, right, Mug is on vacation this week...
alright, TTGTB
@SimonAndréForsberg See ya!

« first day (361 days earlier)      last day (3499 days later) »