« first day (377 days earlier)      last day (3483 days later) » 

00:00
RELOAD!
[Cardshifter/Cardshifter] 2 opened issues. 2 issue comments.
[Cardshifter/HTML-Client] 3 commits. 1 opened issue. 45 additions. 35 deletions.
[Hosch250/VSDiagnostics] 8 commits. 1321 additions. 141 deletions.
[retailcoder/Rubberduck] 3 commits. 465 additions. 142 deletions.
[Vannevelj/VSDiagnostics] 5 opened issues. 4 issue comments.
00:19
0
Q: Event listener can't read correct return from another function

SirPythonI have some code where I have set up an event listener. The event listener looks something like this: api.setListener(function(message) { myFunction(message); }); This is obviously not the actual code, but it's the same idea. This event listener will be called/run every single time the ap...

00:35
@Phrancis My expected finish date has been extended by two days, which is when I can put a bounty on this ^^
00:46
Can you answer this? Racetrack in... VBA? http://codereview.stackexchange.com/q/100714?atw=1 #vba
Nay, though I walk through the valley of the shadow of legacy code, I will fear no regression, for I have my tests. #cleancode
“Does Windows 10 spy on you?” It’s fun to blame MS, but truth is that it was *me* you saw going trough your trash. http://security.stackexchange.com/questions/96713/does-windows-10-spy-on-you
I'm prepared to offer a hefty bounty if I get a good answer on that question...
 
2 hours later…
02:20
added back listener for "card" messages

Added the function storeCard for storing card messages. This time, because there is no longer a global "hand", the function will read the zone ID of the card, and store it in the correct zone, which is going to be either the user's zone or the opponents's zone.
[Cardshifter/HTML-Client] SirPython pushed commit 389dc498 to game-board: started findZone (by ID) function but am getting the strangest error
02:47
I haven't gotten any good news on my post...
03:36
TTGTB. Hopefully someone answers the question tomorrow.
 
7 hours later…
10:18
hey
10:45
hey
 
2 hours later…
12:38
Hey everyone!
hey!
12:53
@Phrancis still enjoying your new job ?
Yeah! Just learned how to write a SQL cursor, this should come in handy :)
Looks handy!
13:50
I'm taking a look at #271, but I really can't figure out how the mod files are loaded/queried/parsed into the ECS system. Anyone has some pointers on what files to look at?
14:17
Thanks @Marc-Andre
printf "%s" <<< @SirPython
Hello, @jacwah!
Did you figure that JS question out?
Nope, and I'm still facedesking over it.
@SirPython No idea, that shouldn't be possible :S — Oriol 15 hours ago
I want to blame AngularJS for this, or that fancy webpack stuff that DanPantry added.
But I wouldn't know better.
14:27
@SirPython LOL
There must be something going on...
Of course, but it makes absolutely zero sense.
for(var thing in obj) {
    if(obj.hasOwnProperty(thing)) {
What is this supposed to do? If you can iterate over attribute, why check if they're there? (I don't know JS)
I'm not entirely sure, but it has something to do with that the for in loop could possibly loop over properties from the prototype, which are not part of the actual object itself.
I've always been told it's good practice.
I'm checking the object I am returning the very line before I return it, and it has the proper value.
However, the function will always return null.
I have this tiny suspicion of the problem: this function is being called with the exact same card info message 5 times.
But I don't see how that could be causing the problem.
Maybe try to assign obj[thing] to a local variable and test against and return that to rule out race conditions and property access side effects
I have already done that.
    function findZone(id) {
        var zoneGroups = [playerInfos.user.zones, playerInfos.opponent.zones];

        for(var i = 0, length = zoneGroups.length; i < length; i++) {
            for(var zone in zoneGroups[i]) {
                if(zoneGroups[i].hasOwnProperty(zone)) {
                    if(zoneGroups[i][zone].id === id) {
                        return zoneGroups[i][zone];
                    }
                }
            }
        }
    }
^^ That is the actual function
14:38
    function findZone(id) {
        var zoneGroups = [playerInfos.user.zones, playerInfos.opponent.zones];

        for(var i = 0, length = zoneGroups.length; i < length; i++) {
            for(var zone in zoneGroups[i]) {
                if(zoneGroups[i].hasOwnProperty(zone)) {
                    var thing = zoneGroups[i][zone];
                    if(thing.id === id) {
                        return thing;
                    }
                }
            }
        }
    }
This is what I mean
I think I've tried that, but I'll try it again.
Nope, still broken.
    function storeCard(card) {
        console.log(card);
        console.log("---------------");

        var destinationZone = findZone(card.zone);

        console.log(destinationZone);

        if(destinationZone.known) {
            destinationZone.entities[card.id] = card;
        }
    }
Uncaught TypeError: Cannot read property 'known' of undefined
I'm wondering if it's a closure issue...
I'm reading this:
829
Q: JavaScript closure inside loops – simple practical example

nickfClosures are one of those things that have been discussed a lot on SO, but this situation pops up a lot for me and I'm always left scratching my head. var funcs = []; for (var i = 0; i < 3; i++) { // let's create 3 functions funcs[i] = function() { // and store them in fu...

Hm. I think this is talking about the problem with having the same card info message 5 times.
Wait, this makes sense!
Sort of. I just don't know how to apply it.
This code was working perfectly before when findZone was not a function; instead, it was part of the storeCard event listener.
That's a good clue
But all I did was a simple copy-paste into a brand new function.
Ooh, now I'm getting Uncaught TypeError: findZone(...) is not a function
15:01
What is this ?
I tried a dirty solution:
    function findZone(id) {
        var zoneGroups = [playerInfos.user.zones, playerInfos.opponent.zones];

        for(var i = 0, length = zoneGroups.length; i < length; i++) {
            for(var zone in zoneGroups[i]) {
                if(zoneGroups[i].hasOwnProperty(zone)) {
                    if(zoneGroups[i][zone].id === id) {
                        //return zoneGroups[i][zone];
                        return (function(index, zoneName) {
                            return function() {
                                return zoneGroups[index][zoneName];
The function should now return a function that returns the needed information.
However, this obviously is not working because it's going back to the same return error.
So I'm back to square one.
It has to be some sort of async problem, because storeCard is a event listener.
You ruled out a possible explanation, which puts you closer to the solution :)
That is a good way to think of it.
Maybe this will help:
195
A: How do JavaScript closures work?

jondavidjohnThe Straw Man I need to know how many times a button has been clicked, and do something on every third click... Fairly Obvious Solution // Declare counter outside event handler's scope var counter = 0; var element = document.getElementById('button'); element.onclick = function() { // Incr...

my latest attempt at nine patches:
Ow yeah, Javascript is a pain with closures inside loops
15:13
Wow looking quite cool
are all those things on a tile dynamic structures?
the stuff on the ground? no everything is just static png images
Aw okay, I thought this had to do with dynamic tiles because it looks so 3D
that would be awesome but i don't think i could get the performance to an acceptable level
someone else suggested having the buildings build themselves voxel by voxel, but again, what a monumental task that would be to accomplish both in terms of animation and performance
Also, man, the AI in the F1 2015 game is soooo bad
15:18
did the same company make the previous years game? you'd think they would just build off of the AI in that (or in 100 other racing games)
15:37
Yeah, they're owning it for quite a few years
15:51
maybe they made an intern do it for this version
Yeah... probably lol
someone needs to figure out the magic recipe to make racing games fun on mobile
i have yet to play a good one
Don't use a mobile :P
did you ever play a game called drift city for PC? would have been a few years ago that it was popular
Don't knwo that name nope
16:14
it was a pretty fun racing game where you could drive around in a big open world full of people, and then join individual races with 10-20 (although with 20 it would lag pretty bad)
Sounds cool
I'm just hoping Need for Speed Underground 3 will be a good thing :P
16:29
@SirPython That's neat
Thanks!
@SirPython You use Notepad++ quite a bit right?
I don't. Why?
Oh, thought you did. I use it a lot for taking notes, and I invented my own mark-up language, just wondering if anyone is interested I can share the template
@Phrancis You did that with notepad++?
That's pretty cool.
16:32
Yeah
See at the very bottom my User Defined language?
Hah! That's cool
I might use that so I can get some highlighting for (A:a)seembl(y:er).
It makes meeting notes and such come alive :)
2
@Phrancis That's a very smart idea. (1) It makes reading notes more interesting and (2) you can point out which parts are very important in case you don't want to read the entire thing.
Right, that's the idea
@Phrancis Are you familiar with how to change the package name of a Java project in the IntelliJ IDEA?
16:47
Right-click package in project -> Refactor -> Rename, I think
@SirPython Famous question for a sugar shaker nice :P :D
Thanks @Marc-Andre!
Sadly, that was the question that brought me my first gold on SE.
Well you do not need to be sad! You'll have plently of time to have other gold badges!
@Phrancis I really like that idea! Too bad Notepad++ is Windows only
@jacwah Guessing you're not on Windows eh?
17:13
@Phrancis I'm using it though
I'll put the files up on my Github shortly, I'm sure others will be interested as well
This is mine lol, for Fragments
So many random notes :D
17:35
I found out the problem with help from IsmaelMiguel!
@SirPython What was it?
    try {
        if(destinationZone.known) {
            destinationZone.entities[card.id] = card;
        }
    } catch(e) {
        /* Do nothing. The reason why an error
        * might occur probably has something to
        * do with how the server is sending messages.
        *
        * For Mythos, 10 cards are sent: two groups of
        * 5. Both groups are identical. However, the
        * first group will always fail.
        *
        * The reason for this is because Mythos will send
Good thing you're writing plenty comments. I don't think I've seen a single one except JavaDoc in Server.java at all :)
I know that the api-documentation branch has a lot of documentation on the server API, but I'm not sure about the rest of the code.
@Phrancis We use Windows VMs at work, but otherwise no
Oh. That's not what I expected for a custom markup.
18:11
Right, I forgot... I can't go to pastebin at work... I was wondering what it looked like
2 hours ago, by Phrancis
user image
It's just a XML file, I can put it somewhere else if you like to download it
How you define it and use it
<!-- README!
        For Notepad++, double-click on the very bottom of the window with a text file open (it should say "Normal text file")
        Then select "Define your language"
        And from there select "Import" and browse to this file on your PC
-->
I put that^ at the top of the XML file
Is HS really turning into MtG?
@Phrancis No it's ok I'll check it from home
Why
WHY
I know it was directed at me!
Did you not think to put it on github ?
18:55
... Sure I did... ;x
19:16
@skiwi they must be about to release the game, tons of card reveals today
looking at the new cards, the connection to the warcraft universe seems to be getting pretty thin
added findZone (by ID)

This function is used to get the information about a zone based on it's ID. Before, this was not a function and was instead just a part of storeCard. However, when receiving a ZoneChangeMessage, the same functionality would be needed, so this was just moved to it's own function.
create $scope.playerInfos

$scope.playerInfos is exactly indentical to the normal playerInfos. This was created so that the HTML could interact with and display information about each player.
delete playerProperties array that storePlayerInfo used

It is unnecessary to replicate all the player information that is already in playerInfos in another array when playerInfos itself can be used.
dynamically loads player information

This HTML takes advantage of the player information that is stored in $scope.playerInfos. For each, player there are three sections created: the user's name, the user's properties (health, mana, etc), and the user's KNOWN card

The user's name is displayed with an underline in an <h1> tag

The user's properties are stored in an ng-repeated list, where the property name is bold and it's value is a ": " away.

The user's cards are displayed with the name of
added listener for ZoneChangeMessages

Upon receiving a ZoneChangeMessage, `moveCard` will be called which does the following

1. Store the card from the old zone locally.
2. Delete the card from the old zone.
3. Move the card in storage to the new zone.
[Cardshifter/HTML-Client] SirPython pushed commit 9f6536b8 to game-board: changed a few html tags, started handling performing actions but then stopped
^^ Game board now displays all character information and all known cards. All that's left is performing actions.
2
19:46
@bazola They're actually revealing all cards today
maybe tuesday it will be released
i hope my 50 packs are good, but they probably won't be
hehe
20:31
everything is peachy until you try to add things. adding music to a game is easy, but making it work the way that it should is definitely not. i have 3 entry points into the game from the title screen (new game, load game, tutorial) and so I needed to turn off the title track in those 3 places. Well now I want the music to loop, but only in the title screen. so I can enable looping when i start to play it, but that looping is attached to the Music instance itself, so if i don't disable looping
then it continues playing forever
so now I need to also disable the looping at the 3 entry points to the game, too
21:06
all cards are revealed btw
Mulch is much nicer than Naturalize
Dark Bargain is sick
seems like they really want druids to play beast decks
21:29
@Phrancis Can I make a version of your markup highlighting for Atom?
@jacwah If you want to, sure! You'll probably have to do it from scratch though, unless Atom lets you import that XML file from Notepad++ format
@Phrancis I'm looking into it. Atom uses json with regex matching and css for styling as far as I can tell
Ah ok. Atom might have a nice GUI to make it like Notepad++ does, that certainly would make it simpler
If you do manage to make it, let me know. I'd like to remake something similar for my text editor on Mac as well
I don't think there's a GUI, but I do think it's fairly compatible with Textmate, Sublime etc
21:52
> This branch is 36 commits ahead, 4 commits behind master.
sniffs I smell future merge conflicts!
22:07
hey I'm back :D
Hey, @Marc-Andre!
22:51
I sure can't wait to finish this so I can go back and fix all these bad practices.
23:45
200_success vs. rolfl: 3199 diff. Year: +2452. Quarter: +2786. Month: +207. Week: +37. Day: +66.
200_success vs. janos: 15362 diff. Year: -4238. Quarter: -1317. Month: -503. Week: -21. Day: +60.
Loki Astari vs. Simon André Forsberg: 2955 diff. Year: -2821. Quarter: -1225. Month: +75. Week: +130. Day: +20.
Mat's Mug vs. Simon André Forsberg: 918 diff. Year: +1808. Quarter: +304. Month: +582. Week: +438. Day: +75.

« first day (377 days earlier)      last day (3483 days later) »