« first day (401 days earlier)      last day (3148 days later) » 
00:00 - 17:0017:00 - 00:00

5:03 PM
http://www.commitstrip.com/en/2015/09/07/when-i-forget-to-turn-off-debug-mode/
CommitStrip - Blog relating the daily life of web agencies developers
When I forget to turn off debug mode
CommitStrip
1441644730
 
from clearState test 'Body Armor enchantment' using {
    def enchantment = to you zone 'Hand' create 'Body Armor'
    def creature = to you zone 'Battlefield' create {
        creature 'Bio'
        health 1
    }

    assert creature.max_health == 1
    assert creature.health == 1
    uses 'Enchant' on enchantment withTarget creature ok
assert action.isAllowed(performer)
       |      |         |
       |      false     Entity #43
       Enchant for entity Entity #51
 
@StackExchange lmao
 
@SimonForsberg What am I doing wrong?
 
@jacwah You might need to give #43 some Scrap resource as the Body Armor has scrapCost 1
 
@jacwah body armor costs scrap, you don't have any scrap I believe
 
5:12 PM
Ah of course!
 
you.scrap = 1
 
The error message could be more informative
 
<3 Groovy assert
 
@StackExchange lol
@jacwah Yes and no, normally the client would need to prevent this from happening ;)
 
@SimonForsberg "HEALTH_ALL could be implemented as an array of HEALTH and HEALTH_MAX." What do you mean by this? I tried to just put HEALTH_ALL = [HEALTH, MAX_HEALTH] in Game.groovy but that didn't work.
 
5:28 PM
[Cardshifter/Cardshifter] jacwah pushed 34 commits to groovy
Add test for enchantment health bug

See #384.
 
@skiwi there is no "client" when writing tests
@jacwah well, the change XYZ by x DSL doesn't support arrays/lists yet, so it would have to be added in the DSL as well.
 
@SimonForsberg Ok
 
> Is this issue a) solely about deciding on a limit, or b) is it also about doing the actual testing? If a) it should be closed.
 
@SimonForsberg Maybe it's useful to have an unit test client somehow that prevents those basic errors?
Instead of the actual server code failing
 
> The naming of these two resources is inconsistent. #384 is related if we also add HEALTH_ALL.
> or c) about enforcing the limits on the client-side (JavaFX + LibGDX), which is why it has been changed to the "Postponed" milestone.
> Thanks for bringing this up, this has been bothering me too!
 
5:36 PM
@skiwi umm... what do you mean?
 
[Cardshifter/Cardshifter] build for commit 44e6cf7a on groovy: The Travis CI build failed
BUILD FAILURE!
 
@Duga yes, we know. Ever heard of TDD?
 
@SimonForsberg When you in a test indicate that you want to play a card, that the preconditions are then checked inside the play action, before teh server attempts to handle it
@jacwah I have no clue which part actually plays "Body Armor" though
 
@skiwi uses 'Enchant' on enchantment withTarget creature ok
 
But it's applied after the asserts?
 
5:41 PM
I just posted the first part of the test :)
^ Full code here
 
Ah, those asserts were still passing I see
And the you.scrap = 1 was missing?
 
Yeah that was it
 
Where can I find the uses 'Enchant' on enchantment withTarget creature ok implememagic?
 
TestCaseDelegate.groovy
 
Still looks very much like magic to me :P
 
5:44 PM
@skiwi You mean like Groovy? ;)
2
 
@skiwi what is it that you would want to accomplish really? "the client would need to prevent this from happening"? "unit test client somehow that prevents those basic errors"? Game clients can't perform illegal actions, and neither can unit test clients. I don't see the problem here...
@skiwi I wonder if @jacwah also thinks it looks like magic...?
 
@SimonForsberg @jacwah indicated that the assertion failure was hard to understand, what I am saying is that playing the card should not have been allowed if you have no scrap
(Does that make sense?)
 
@skiwi It wasn't allowed, that's the whole point of the test (i.e., it revealed that it could not be played)
 
@skiwi playing the card wasn't allowed also, because the player didn't have enough scrap. So I don't know how exactly the assertion message should be improved
 
All I'm exploring is the possibility "could the test have failed earlier with a better message"
 
5:48 PM
Ideally it would say Assertion failed: Can't play card: Not enough SCRAP
 
Or is the action.isAllowed call part of the uses DSL call?
 
@skiwi exactly.
 
@skiwi Yes
 
Then I missed that part
And action.isAllowed shouldn't be throwing exceptions obviously
 
@jacwah okay, now I understand what you're getting at. That would require a significant change to the event-handling system, which is planned already.
@skiwi it isn't throwing exceptions normally, it's only throwing if your assertion is wrong in a test.
 
5:52 PM
Testing the tests :)
 
But I mean you can't decide that an isAllowed call should throw exceptions suddenly instead of return true/false, so it would need to be solved in another way
 
what needs to be solved in another way?
 
Giving a message like Assertion failed: Can't play card: Not enough SCRAP
 
I have no intention of having the action.isAllowed throw an exception.
I have intention of having the event-handling system figure out which systems that are changing the value of event.allowed and then show information about what system(s) that denied the action.
 
5:57 PM
@StackExchange Skynet incoming?
 
That sounds like a good approach. In a way, I also think that the tests are going to be written largely by developers, which (I would expect) have read enough of the modding documentation to figure that an enchantment may require Scrap to play :)
 
@Phrancis Haha... Developers... Read the manual...
2
 
So I don't know if spending a lot of time on restructuring test error messages would be that beneficial
 
Is it possible to find out how many users are online in a single message received from the server, or must the UserStatusMessages be counted up?
 
String.join(", ", l.stream().map({it.toString()}).collect(java.util.stream.Collectors.toList()))
There must be a better way to stringify a collection without [] in Groovy
def l = [1, 2, 3] -> 1, 2, 3
 
6:13 PM
@SirPython ServerQueryMessage with STATUS
 
ServerQueryMessage("STATUS", ""); Like this? Or, like this: ServerQueryMessage("USERS", "STATUS");
 
@Phrancis if developers are writing the tests, then they should also know that an enchantment requires scrap to play, as that is what themselves have specified in Game.groovy
@SirPython what are the two parameters?
 
Request and message.
 
Oh, sorry. I was looking at the wrong branch.
 
6:16 PM
request parameter should be STATUS, no message required.
make sure you're testing against a somewhat updated server.
 
I have installed the most recent snapshot locally; is that good?
 
should be enough yes
 
@SimonForsberg Right, that too :)
 
@SirPython hmm... I think that one might not be sufficient enough, I'll give you a new snapshot just to be safe.
 
Now, re: tests, I would like to see modder-facing errors have good messages, for example if they made an error in the DSL syntax or whatnot
 
6:20 PM
github.com/Cardshifter/Cardshifter/commit/… says that it was authored September 1st 19:33 CEST. Snapshot says 18:51...
 
@SirPython ^^
 
Thanks!
 
Add HEALTH_ALL and use for enchantments

The change and set effects can now take a Collection of resources to
change. This is utilized by HEALTH_ALL in CC. Fixes #384.
 
BTW.VBA :|
 
What does the in progress label mean?
 
> Some checks haven’t completed yet
^^ Maybe it's because of that.
 
In-progress means that it is currently being worked on, in issues and PRs
 
[Cardshifter/Cardshifter] build for commit a99b4515 on groovy: The Travis CI build passed
> How about resources.stream().map({it.toString()}).collect(Collectors.joining(", ")) ?
 
I just want it reviewed before it's merged. Maybe we should create a label for that? The functionality is done, does in-progress still apply?
 
6:33 PM
> @Phrancis
> For playing from hand, we would need to change the actions structure a bit to where a Scrap action would show on cards in your hand as well, granted you have the Mana to actually "play" the card so they can be scrapped. @Etrisa was that the intention?

Almost, only you would not have to pay the many cost in order to scrap the card.
I do realize that this opens up the possibility to scrap an "infinite" number of cards, witch might be too powerful. Then again you could put a lim
 
@jacwah Waffle.io stuff
 
[Cardshifter/Cardshifter] build for commit a99b4515 on groovy: The Travis CI build passed
 
@jacwah maybe we should have a review label?
 
@SimonForsberg Sounds good! I plan to open more PRs for things I'm adding instead of pushing them directly to develop.
 
> I don't think we need any limit to how many cards you can scrap each turn, except for a limit that you can only scrap cards that you have on hand ;) I like the ideas of having triggers for when you scrap a card.
 
6:37 PM
@jacwah sounds good. I think I should start getting into the habit of doing that as well.
 
@Duga Which label? :)
 
Merge pull request #391 from Cardshifter/groovy

Fix "Enchanting health only lasts until end of turn"
 
@Phrancis in-progress. I deleted that label completely and also removed the waffle.io webhook.
 
> HEALTH_ALL has been merged. Now just need to update the documentation.
 
6:44 PM
BBL
 
@Duga bloody... I almost forgot about the documentation
 
[Cardshifter/Cardshifter] build for commit 6e04c869 on release-0.6.1: The Travis CI build passed
 
VBE feels so dated
Hello @Etrisa!
@SimonForsberg Can you make it so @Etrisa is able to speak here? Rep is below 20
 
he should already be able to
 
6:55 PM
My rep may be below 20 but my rap is... well below 10 i suppose...
 
hahaha
 
Hey @Etrisa!
 
Hello! =)
I'll just copy paste the quick introduction i made over at github.
Quick Intruduction:
Hello, I call myself Etrisa and I'm a big fan of games, playing them, discussing them, creating them.
I'm Zomis younger cousin and Tejpbits big brother.
I'm an excellent bug tester and often a good person to discuss things with.
 
Hi @Etrisa
I don't many people around here knows Tejpbit though, he isn't very active on Code Review.
okay, @Phrancis and @jacwah, who wants to do the documentation for #384 ?
 
I'd prefer if @jacwah took the time to document since he understands the code better than I do. But if not I can document, lmk
 
7:11 PM
@SimonForsberg What type of message is sent after the server receives ServerQueryMessage("STATUS", "");?
 
Hey look, documentation! :)
2
 
Thanks!
 
> Seeing that a `ServerStatusMessage` includes the games that are currently running, I thought it would be interesting to utilize this information in creating a feature where you can spectate currently running games.

For example, there might be a button in the lobby that says, "Spectate", which would then bring you to a screen where you are presented with a list of all running games, and the users in the game. After choosing a game, you are launched into a screen where you can watch the game
 
@Duga I think that one's been on @Simon's bucket list for a long time!
 
Observing games and replays is my specialty ;)
 
I hate VBA.
 
Use Rubberduck!
 
Stop using VBA!
 
7:38 PM
@SimonForsberg I'm on it
 
Awesome! ^^
 
7:59 PM
> The name of the resource must always be ALL_CAPS_WITH_UNDERSCORES.
Is this really true?
 
@jacwah nope, that's bullshit.
 
Removing it then :)
 
ALL_CAPS_WITH_UNDERSCORES just happened to be the de-facto standard. But there's no requirement that it has to be that
I thought that had already been removed...
Aug 18 at 13:02, by Duga
> Technically, the resources don't need to be with ALL_CAPS, that's just what I used originally (they used to be Java enum values once upon a time, where the naming convention says to do it like that). They can absolutely be shown lowercase. But all this is irrelevant to the actual issue here.

Specifying the full mod-dir every time might be a bit excessive, `imagePath 'chinese/jade-emperor.jpg'` perhaps?
 
I remember that, which is why the line still being there confused me
 
confused me too
 
8:16 PM
Update effect DSL docs

Bring up added set and change behaviour and improve some parts.
 
Hm. I think PascalCase for those values would probably look best on the cards' FX text. Should we change it instead of displaying ALL_CAPS?
 
For UI I think we should use sentence case, i.e. "Max health"
 
[Cardshifter/Cardshifter] build for commit c335aa29 on release-0.6.1: The Travis CI build passed
 
Sure, if that's possible. Was mostly concerned because we can't use a regular space in naming things
> My
name
is
Fizz
How
Buzz
Fizz
today?
I
Fizz
Buzz
pretty
Fizz
myself!
The
FizzBuzz
is
gorgeous,
Fizz
you
Buzz
 
s/_/ /
 
8:23 PM
I'm gonna get lynched if I keep this up ;D
 
Done ^
@Phrancis lol
UI and groovy code doesn't have to name things the same way
 
I want to use something like that to aggregate some data from mails I get @ work, figured this would be a good warmup :)
Sub LoopOverWordsInString()
    Dim wordArray() As String
    Dim space As String: space = Chr(32)
    Dim sentence As String: sentence = "My name is Francis. " _
        + "How are you today? I am doing pretty fine myself! " _
        + "The weather is gorgeous, don't you think?"

    wordArray = Split(sentence, space)

    Dim i As Long
    For i = LBound(wordArray) To UBound(wordArray)
        If FizzBuzz(i) <> i Then
            wordArray(i) = FizzBuzz(i)
        End If
        Debug.Print wordArray(i)
 
> what is meant by a behavior-specific resource?
 
Better get back to my SQL project though, some improvements needed after I got a code review from a colleague
 
> maybe add a note that mods are free to change resources as they see fit. Not all resources are guaranteed to exist in all mods.
 
8:27 PM
@jacwah those comments were not directly aimed at you, just random things I thought about ^^
@Phrancis the string that is displayed doesn't have to be the same as the identifier in the DSL. It is already possible to change this freely.
@Phrancis My = 1, name = 2, is = 3, Fizz = 4... ? or is My = 0 ?
 
@Duga Feel free to!
 
lol :)
Aug 23 at 19:52, by Simon André Forsberg
@jacwah erhm... docu... docume... do-cu-ment-a-tion... that's a hard word for me.
 
Practice makes perfect
 
true that
remind me and I'll fix it
 
@SimonForsberg 0-indexed in VBA
Hm, maybe I need to adjust for that
 
8:37 PM
@Duga remind @SimonForsberg 2015-09-08:18:00:00 chat.stackexchange.com/transcript/message/23940070#23940070
^ Would this be a useful @Duga command?
 
@jacwah yes, but interactivity with @Duga is not implemented yet
 
For i = LBound(wordArray) To UBound(wordArray)
    If FizzBuzz(i + 1) <> i + 1 Then
        wordArray(i) = FizzBuzz(i + 1)
    End If
    Debug.Print wordArray(i)
Next i
Bit better
> My
name
Fizz
Francis.
Buzz
Fizz
you
today?
 
@SimonForsberg I read the issue about command suggestions which is why I thought of it
 
Connection error: org.java_websocket.WebSocketImpl@3bd4a120
java.lang.RuntimeException: Could not read JSON expected message from 6:  @ conn
ection not open, message was: {"request":"STATUS","message":""}
Am I getting this because "connection not open"?
Or because the message is invalid? "Could not read JSON expected message..."
 
8:47 PM
@SirPython message is invalid. you're missing the most important thing
 
The command?
Because that should be there; it's there with every other message.
 
"command": "query"
yup
 
types.ServerQueryMessage.prototype = new Message("query");
I must've broken something big-time, then.
 
apparently
 
Is there a real word for "remindation" like "invitation" for the verb "invite"?
 
8:53 PM
> @Duga remind @SimonForsberg http://chat.stackexchange.com/transcript/message/23940244#23940244

For the example above Duga would post two messages at a later time like the following.

@SimonForsberg Don't forget:
http://chat.stackexchange.com/transcript/message

Could take a specified time as argument or choose a reasonable time somehow. Maybe room activity could be used to figure out a good time?

![Cardshifter TCG room activity](https://cloud.githubusercontent.com/asset
 
@Duga thanks for the mega-ping
@jacwah reminder
translate: påminnelse
(from Swedish) reminder
 
@SimonForsberg Tack
 
translate: varsågod
(from Swedish) go ahead
 
@SimonForsberg lol
 
ummm.... no... not that.
translate: det var så lite så
(from Swedish) It was as little as
 
8:55 PM
Haha
Is this Google Translate?
 
translate: Göteborg
(from Swedish) Gothenburg
well, it's not Bing at least.
or maybe they have fixed that...
@jacwah ^^
a post from last year
 
@SimonForsberg OMG haha
 
oh I remember that, was so annoying
 
@Phrancis How often did you translate Göteborg?
 
Never, why?
 
9:02 PM
What did you refer to then?
 
OH WTF, I just noticed it translated it to New York XD
 
exactly ^^
 
I was referring to (Translated by Bing)
 
Ah
 
I wonder if they've taken that out already because of user complaints
> (16112 row(s) affected)
Routine (1) completed in 3 seconds.

(3772 row(s) affected)
Routine (2) completed in 51 seconds.

(1149 row(s) affected)
Routine (3) completed in 25 seconds.

(1172 row(s) affected)
Routine (4) completed in 123 seconds.

(9854 row(s) affected)
Routine (5) completed in 0 seconds.
TOTAL QUERY TIME: 225 seconds.
4 minutes run time for all that stuff, not bad
Uh oh, flagging party going on
 
9:06 PM
I try to handle less chat flags since I became a mod
 
You handled more when you weren't a mod? I didn't know you could handle chat flags as a non-mod.
 
yeah, mods always have a binding vote, which I hate.
users who have a total of 20k+ across SE-sites can see chat flags
 
This is the first that I have been pinged (or at least, that I noticed) on a flag. Wonder why that is
I don't have 20K either
 
s/20k/10k
 
I noticed something else weird today, I was given privileges to Site Analytics on CR
 
9:09 PM
Hmm. Now I'm excited to reach 10k.
 
Said it's at 5K, but I've been over 5K for a while
 
@Phrancis so was everyone who has more than 5k CR rep. it's a new feature
 
Ohhhhh nice
Interesting data
 
9:24 PM
I hate having to re-run the whole thing because I made one small error in a string concat :(
 
 
2 hours later…
11:29 PM
TTGTB
 
Have a good night @SimonForsberg!
 
11:45 PM
200_success vs. rolfl: 3511 diff. Year: +2764. Quarter: +3098. Month: +181. Week: +226. Day: +21.
Mat's Mug vs. Simon Forsberg: 1513 diff. Year: +2403. Quarter: +899. Month: +398. Week: +109. Day: +114.
Loki Astari vs. Simon Forsberg: 3043 diff. Year: -2733. Quarter: -1137. Month: +120. Week: -98. Day: -73.
200_success vs. janos: 15069 diff. Year: -4531. Quarter: -1610. Month: +165. Week: +118. Day: +43.
 
00:00 - 17:0017:00 - 00:00

« first day (401 days earlier)      last day (3148 days later) »