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

12:00 AM
RELOAD!
 
YES IT WORKS WOOHOO ᕕ( ᐛ )ᕗ
 
[Cardshifter/Cardshifter] 8 commits. 2 opened issues. 1 closed issue. 8 issue comments. 284 additions. 232 deletions.
[Cardshifter/HTML-Client] 5 commits. 3 opened issues. 1 closed issue. 1 issue comment. 62 additions. 48 deletions.
[ckuhn203/VBEX] 2 issue comments.
[Hosch250/VSDiagnostics] 4 commits. 399 additions. 155 deletions.
[rubberduck-vba/Rubberduck] 11 opened issues. 1 closed issue. 2 issue comments.
[Vannevelj/RoslynTester] 1 issue comment.
[Zomis/BrainDuck] 28 commits. 3 opened issues. 2 issue comments. 594 additions. 146 deletions.
 
@SirPython have time for a Python question or two?
 
can't believe I just linked to a PCG question on a Github issue...
TTGTB
 
12:04 AM
lolol
Good night Simon
So in the .cardset files I have a bunch of commented lines that include a URL like https://commons.wikimedia.org/wiki/File:Jade_Record_1.PNG - All of them should be the same up until the /wiki/ part
I want to scan the file to match the beginning of the URL, then grab the rest of the string so I can do something with it. Is that possible? How do I do that in Python?
I know, I'll use regex!
0
A: Extracting a URL in Python

dranxoHere's a file with a huge regex: #!/usr/bin/python # -*- coding: utf-8 -*- """ the web url matching regex used by markdown http://daringfireball.net/2010/07/improved_regex_for_matching_urls https://gist.github.com/gruber/8891611 """ URL_REGEX = r"""(?i)\b((?:https?:(?:/{1,3}|[a-z0-9%])|[a-z0-9.\...

 
12:31 AM
Python is pretty cool. Except it's kind of ugly.
 
12:59 AM
@Phrancis Sure thing!
@SimonForsberg Have a good night!
@Phrancis str()
 
directory = "/Users/francisveilleux-gaboury/IdeaProjects/Cardshifter/extra-resources/mods/Mythos"
file_list = []

for file_name in os.listdir(directory):
    if file_name.endswith(".cardset"):
        file_list.append(file_name)

print file_list
Well, I'm starting to answer my own questions
I can't believe how easy this is
@SirPython What's the diff between 'single' and "double" quotes for strings?
(if any)
 
There is none, AFAIK.
 
What's the "r" for in open("file.txt", "r")
 
Read-only.
As in, you are only going to be reading the file.
 
Ok perfect :D
 
1:13 AM
The file itself may not only be read-only.
 
Gotcha
I see some strings (regexes) with an r in front of them, what is that for?
 
Automatically escape characters
For example, this:
foo = "bar\"
Will (probably) cause an error because the " is being escaped by the \, right?
However, this:
foo = r"bar\"
The \ will automatically be escaped so it does not cancel out the "
It is used in regexes because there are quite a number of characters that need escaping, and it just gets ugly.
This exists in Java.
Er, never mind; I don't think it does.
Does that answer your question?
 
1:29 AM
Yes, wonderfully
url_regex = re.compile(r"""http[s]?://     # http secure or not
                           (?:[a-zA-Z]     # Match any letter
                           |[0-9]          # Match any number
                           |[$-_@.&+]      # Match other allowed symbols
                           |[!*\(\),]      # Match exclamation, parens, commas
                           |(?:%[0-9a-fA-F][0-9a-fA-F])     # percent (%) sign followed by 2-digit hex
                           )+""",
                       re.VERBOSE)
Verbose regex FTW
 
Ooh, I like the comments. You don't often see comments on a regex.
Well, at least not section-by-section like that.
 
IKR
is None the Python equivalent of null?
 
I believe so.
I see you are delving into Python.
 
1:53 AM
for file_name in file_list:
    file_content = open(source_directory + "/" + file_name, "r") # read-only
    for line in file_content:
        url = re.findall(url_regex, line)
        if url:
            print url
I can see why many people like Python. It's simple, compact, and fast
 
It definitely can make things a lot easier.
May I make some comments about that code?
 
You certainly may
(or save them for Code Review post ;)
 
You are going to be posting this for review?
 
Maybe, maybe not. By the time I'm done, it's going to have quite a few things in it
 
Ah, okay. Whether or not I share my comment now is up to you.
 
1:58 AM
Just go ahead
 
In Python, it is best practice to open up a file with with:
 
I did see some examples with that too
 
while open("file", "r") as f:
    [interaction with f]
This is because with will safely close the file when it is all done and will free up system resources
 
Ahhh makes sense
for file_name in file_list:
    if file_name.endswith("/"):
        full_file_path = source_directory + file_name
    else:
        full_file_path = source_directory + "/" + file_name
    with open(full_file_path, "r"):
        for line in full_file_path:
            url = re.findall(url_regex, line)
            if url:
                print url
That ^ a better approach then?
Found a bug
Should be if source_directory.endswith("/"):
Hm. How do you reach the actual content of the file this way, do you need to open() again??
Oh found it
with open(full_file_path, "r") as file_content: nice shorthand
 
Sorry, I lost connection.
 
2:16 AM
No worries
Urgh
 
Problem?
 
Found the solution - re.findall was returning a list of strings, so I needed and additional for
for file_name in file_list:
    full_file_path = source_directory + file_name

    with open(full_file_path, "r") as file_content:
        for line in file_content:
            url_matches = re.findall(url_regex, line)
            if url_matches and (line.find("wikimedia") != string_not_found) \
                    and not (line.find("User:") != string_not_found) \
                    and not (line.find("upload.wikimedia") != string_not_found):
                for url in url_matches:
                    url_list.append(url)
Man I really dislike snake_case, I wish PEP8 allowed camelCase
 
2:35 AM
Hey @SirPython is it bad practice to reuse variable names if the prior occurrence is clearly out of scope?
            if url_matches and (line.find("wikimedia") != string_not_found) \
                    and not (line.find("User:") != string_not_found) \
                    and not (line.find("upload.wikimedia") != string_not_found):
                for url in url_matches:
                    url_list.append(url)

for url in url_list:
    print url
For example my use of url there^
 
In this case, I don't think it's that bad: the two urls are very clearly in different places/loops and are very clearly different values.
However, in other cases, it may not be the best choice.
 
ok
Also, just noticed double-negative conditions in my if statement
 
I don't know what it will be later, but this seems repetitive: you are looping over an array and putting all the values into another array, and then looping over the values in that new array. Couldn't you just do all the work in the first loop?
 
Are you talking about url_matches and url_list?
 
Yes.
                for url in url_matches:
                    url_list.append(url)

for url in url_list:
    print url
 
2:40 AM
The problem is with this: url_matches = re.findall(URL_REGEX, line)
re.findall returns a list of strings
I couldn't find a regex function that just returns one string, so the additional loop over url_matches is needed
 
I'm talking about the additional loop over url_list.
 
O.
 
Why can't you just work with the values in the first array/loop?
 
Well, maybe. But that one will have a fairly large amount of stuff in that loop, not sure if I should. It will have the logic to tell Firefox to go to the URL, click on that link, click a checkbox, and then grab the value of a form element. I think it might obfuscate things too much if I put that in along with the loop to just get the URLs
 
Okay. It just seemed a little unnecessary to me to 1. Copy an array into another array and then 2. Work with the second array and trash the first
 
2:45 AM
I think the readability benefit will outweigh the little extra memory/processing of having an extra array
 
Okay.
 
But, I've been wrong before :)
Have you worked with the time import much?
 
A little. Do you have any questions about it?
 
Well I'm kind of wondering how I should handle Firefox automating, as in, should I hard-code some waiting times or just let Selenium run at its own pace?
 
I am confused as to what the scenario is.
 
2:51 AM
And why the hell is my PC so slow right now
Hmm, my kernel_task is using almost 5 GBs memory, that's weird
Better try and reboot
 
3:19 AM
Phew
@SirPython It looks like Python was running stuff in the background, possibly from my not closing out of a script properly. Do you know a way to make sure to close any running process that a Python script created?
 
Hmm, I don't know. I don't think it has anything to do with Python, though.
 
I was thinking of using a try/catch/finally construct, but not really sure what I would put in the finally block
 
How did you run the Python script?
 
From IDEA
 
That could be it.
I don't know how IDEA handles starting and stopping a python script.
 
3:22 AM
When I tried exiting the module, it told me something was still running, even though the script had exited
 
Perhaps the IDEA runs the Python script, and automatically updates it every time the code is updated.
Similar to how NPM works.
 
Possible...
 
I've always just run python from the terminal.
 
OK. Guess I'll keep an eye on the task manager as I run the scripts to see what IDEA might be doing behind the scenes
Weird weird, I had a process running taking up 500 MB memory from _mysql (hint: I'm not running MySQL right now)
 
3:59 AM
I'm off. Have a one @Phrancis.
 
Have a one too, @SirPython :)
 
 
4 hours later…
7:47 AM
Um. Python r0x for scripting. That is all.
 
8:40 AM
@Phrancis re.search
That commit name....
@Phrancis You should probably do git pull --rebase before pushing
 
9:15 AM
@Phrancis that's a good sign of progress!
@Phrancis those comments are now part of the regex string, aren't they? that's probably not intended...
 
@SimonForsberg Nope it's Python's re.VERBOSE
Hi BTW
 
okay, I'm no Python expert so don't listen to me :)
 
Do you think it might be useful to create a release-0.6.1 branch for staging the release, so new features still can be added to develop?
We should freeze new features to 0.6.1 now I think
Except for the card images
 
I think 0.6.1 is pretty much good to go, don't you think?
 
mods has to be merged first if we want to include the card images
 
9:26 AM
well that can be accomplished
 
And before the merge Phrancis has to fix the attributions
 
oh crap, I thought that was done already
 
No, that's why he's messing with Python :)
 
okay
then yes, we could create a release-branch from develop
 
9:32 AM
^ Merge mods into this when it's done. Then merge this into master and develop to release.
 
[Cardshifter/Cardshifter] build for commit f550baba on develop: The Travis CI build passed
 
Time for me to get going
Later!
 
@jacwah for the release process there's a need gradle task that can be run.
 
 
1 hour later…
10:55 AM
[Cardshifter/Cardshifter] jacwah pushed commit 322e3501 to release-0.6.1‌​: Update authors
[Cardshifter/Cardshifter] jacwah pushed commit 5f45ac70 to release-0.6.1‌​: Fix typo in javadoc
[Cardshifter/Cardshifter] build for commit 5f45ac70 on release-0.6.1: The Travis CI build passed
 
11:42 AM
 
11:57 AM
add an additional reduced version of FizzBuzz, with less flexibility

see http://codereview.stackexchange.com/a/104022/31562
 
12:23 PM
[Zomis/BrainDuck] Zomis pushed commit 2cf793d7 to master: Update README.md
[Zomis/BrainDuck] Zomis pushed commit c77d9245 to master: Update projectname in settings.gradle
 
> Inspired by the Rubberduck project for VBA, this project is called Brainduck (it was either that or Rubberf... erhm...)
lol
 
hey
@SimonForsberg So... what's stopping you? ;)
Sep 3 at 18:41, by Simon Forsberg
now all I need is a new girlfriend
^^
 
@skiwi myself, what else?
 
@SimonForsberg You should try getting out of your comfort zone :)
 
@skiwi why do you think I got a new job in Gothenburg?
 
12:38 PM
I don't know... being out of your comfort zone?
 
> Different interpreters use different settings, such as:

- [ ] Memory tape size
- [ ] 8 bit, 16 bit, Wrapping or non-wrapping, Signed or unsigned
- [ ] New lines
- [ ] End of File

See also https://esolangs.org/wiki/Brainfuck#Implementation_issues
> To embed assertions, debugging and other stuff, there needs to be a way to do that.

How about something like `${instructions here}` ?

A problem about Brainfuck is that all non-BF characters are treated as comments, which means that it's much harder to add special meanings to certain characters.

Related to #2
[Zomis/Brainduck] Zomis added label dsl to issue #2: Assertions
[Zomis/Brainduck] Zomis added label ide to issue #7: Status bar
 
1:01 PM
Labeling intensifies
 
1:59 PM
Playing Cyborg-Chronicles with a friend
 
2:12 PM
 
Monk*!
 
2:33 PM
> Ever since we changed #287, enchantments in Cyborg-Chronicles only lasts until end of turn.
> Sometimes, in BF, a single command, or a pattern of commands may be repeated quite a number of times. It would be nice to have some sort of easier way to write repeated commands.

Perhaps it could look something like this:

(++>)*100

Which would execute `++>` 100 times.

I got the idea from [this PPCG post](http://codegolf.stackexchange.com/questions/36645/brainfedbotsforbattling-a-brainf-tournament).
> On the effects, it only shows for example "Change ATTACK by 2 on targets", but it doesn't show how many targets that it can target. It should say "Change ATTACK by 2 on 1 targets" or "Change ATTACK by 2 on 1 to 5 targets" etc.
 
Monking!
 
Hey @Phrancis.
 
> The wording of whilePresent should probably to be changed to for example "Opponent creatures has -2 ATTACK"
> This is a quite common feature in many Brainfuck interpreters, so yeah this could be useful to support.
 
hey @Phrancis
 
2:51 PM
> Let's say that player A has played a 1/1 creature that has "Opponent creatures has -1 health"

Let's now say that player B playes a 1/1 creature that also has "Opponent creatures has -1 health"

What should happen here? Which creature should survive? Or should both of them die?

(Note that at the moment, I don't even know what actually does happen in this situation)
 
@Duga "Opponent creatures [have] -1 health" This means that each opponent creatures loses one health point, right?
 
3:02 PM
> **Cyborg Chronicles**

I am not sure if the solution to #169 is the best one, we might want to re-think that. One possible solution might be to allow scrapping cards when they are at your hand (without paying their mana cost first, and without having to wait for them to be able to attack).

The game mechanics makes it extremely hard for a player to turn the game around when he is already losing. Try having the creatures heal *at the beginning* of your turn instead of at the end, this will
 
@Phrancis should we create general "card suggestions" issues on github? maybe one for each mod?
 
@SimonForsberg Maybe? What sort of suggestions, just to be curious?
 
> The reason why I am asking this is because Player A's creature has the ability "Opponent creatures have -1 health" which leads to Player B's creature being a 0/0 when it enters play, which means that it should be removed. But should Player B's "Opponent creatures have -1 health" be applied?
 
@Phrancis a suggestion from a friend:
> Broken Power Outlet
3 Scrap
Enchant target Creautre, that creautre dies.
Falvor text: Always put pointy stuff into poweroutlets!
 
> Maybe that card should just be blocked from being placed down.
 
3:08 PM
@Duga @SirPython you mean Player B's card should not be allowed to be played in the first place? I disagree with that, it would also be extremely difficult to implement that.
 
@SimonForsberg Yeah having an issue open for each mod for suggestions might be best, just as a placeholder
 
@SimonForsberg Yes, I meant to specify player B (I edited the comment now). And yes, it would be pretty difficult.
Is there a situation like this in HS?
 
@SimonForsberg BTW, I don't think we support enchanting enemy cards yet, do we? Is that what that enchantment is about?
 
@Phrancis well, technically this could just be implemented as a normal spell.
@SirPython not that I know of, but in MTG it can happen. In that situation I believe Player B's card is destroyed before the effect is applied.
 
BTW, working from home today -But it's a holiday so it's quite slow
 
3:13 PM
> ummm...? what?
> Similar to #382, please post *specific* card suggestions here.

Please post here any card suggestions you have. Suggestions, or variations of them, may be added in future versions of the mod.
> Similar to #382, please post *specific* card suggestions here.

Please post here any card suggestions you have. Suggestions, or variations of them, may be added in future versions of the mod.
 
3:43 PM
> The reason for this is that before github.com/Cardshifter/Cardshifter/commit/…, it was it.health += card.health and it.max_health += card.health, but now only health is enchanted, not max_health.
> 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.
TL:DR will often be found at the top and/or bottom of my lengthier posts.

After playing both Mythos and Cyborg-Chronicles I've realized one thing: There's nothing that a simple Lightning bolt can't solve. http://gatherer.wizards.com/Handlers/
> Name:Broken Power Outlet
Cost: 3 Scrap
Enchant target Creautre, that creature dies.
Flavor text: Always put pointy stuff into power outlets!
 
I'm not really sure how to write the loop with Selenium instructions to Firefox, but I want to avoid the program trying to open over 100 instances of Firefox in quick succession... Is there a way that anyone knows of to make the loop wait, say 20-30 seconds on each iteration so the browser can keep up?
I saw in the exported Python script for the Firefox plugin these lines:
def setUp(self):
    self.driver = webdriver.Firefox()
    self.driver.implicitly_wait(30)
    self.base_url = "https://commons.wikimedia.org/wiki/File:Astasahasrika_Prajnaparamita_Victory_Over_Mara.jpeg#"
    self.verificationErrors = []
    self.accept_next_alert = True
30 seconds might be a bit much, maybe half of that would be reasonable enough
 
4:02 PM
@Duga How's that feedback, @Phrancis?
 
@SimonForsberg Hah nice :)
 
Monk*!
But I think you can just reuse the same driver
After you've gotten the first page, just do driver.open() on another url
 
> Hello @Etrisa and thank you for the feedback!

Mythos badly needs so balancing, I've noticed a lot of the same things as you have, it's not unusual to see cards buffed to really high numbers like 9/12 when multiple buffs stack together. We're going to go over all of Mythos again, making adjustments. If you notice anything specific, you're welcome to mention it here!

For Cyborg: The ability to sacrifice a card for scrap from the hand is a good idea that we should support. Right now the on
 
@jacwah Ah yes, that makes sense
 
Monking all
 
4:16 PM
Hey!
 
How's it going?
 
Good, and you?
 
I'm alright, just questioning the legitimacy of this guy who is offering me some work.
 
Being skeptical is good. Why do they not seem legit?
 
They invited me to this TS server
in The 2nd Monitor, 6 mins ago, by A Red Herring
<16:49:55> Our Super Bad Ass Viking Gang Hangout
<16:49:55> Connected to Server: "Super Viking Gang"
Not very professional
And they're offering between $300-$500 for potentially 15 days work... for me, $500 covers about 5 at a push
At any rate, they're not online yet, despite saying they are usually on this TS server
 
4:21 PM
That's not much for pay
 
No, it's not, but at the same time
Given the brief description I could probably do it in 5 days (I have this week off)
and $500 for 5 days isn't too bad
 
> In addition to spells that deal direct damage to creatures, Hearthstone also has other ways for players that are slightly behind to deal with powerful creatures. There are cards that can be used to "silence" creatures, removing all their special effects and enchantments. There's also cards like Polymorph and Shadow word: Death that can nullify any very powerful creature. These effects could
 
It's not stellar, but I need the portfolio experience, ti'd be my first foray into independent work, and $500 is more than I'd get just playing League all week.
 
I guess it depends on how many actual hours you put in. I know I certainly wouldn't work a full work week for $500
 
8 hours a day, so 40 hours.
that works out to about £8 an hour
It's quite a bit less than I'm being paid now, but again, it's not awful.
 
4:23 PM
Well, I guess if you don't have anything more important / better remunerating it's not too bad
 
it'd be £15k a year if you were paid over a year.
For reference I'm on £26k
But, yeah, given I have this week off and I'd be doing nothing else... might as well
 
True
£26k is about $29K (USD), that sounds reasonable, at least for early in a career
 
£26k is near the high end of what I would get in this country.
Unless I live in a hotbed like London, where £70k is average (for obvious reasons).
I don't see myself getting +/- £32k in this country at max
 
Ah, I'm guessing the Euro stretches more than USD eh? In the USA looks like pay is higher, but some areas can be quite expensive to live in
 
This is GBP, not Euro :p
 
4:28 PM
> I see two possible approaches here:

1) Edit the affected enchantments:
```Groovy
card('Body Armor') {
flavor "Steel-reinforced armor to absord damage from blows and shots."
enchantment()
afterPlay {
change HEALTH by 2 on targets
change HEALTH_MAX by 2 on targets // Add this line
}
scrapCost 1
}
```
2) Add some way in the syntax to change both values at once. The most obvious way would be `change HEALTH, HEALTH_MAX by 2 on targets`. Could also
 
@ARedHerring Oh sorry lol
In that case, 26K is quite a bit higher than I thought, almost $40K USD, which is quite good
 
> ```Groovy
card('E.M.P.') {
"Electromagnetic pulse that damages electronic circuitry."
manaCost 8
// damage 1 to 10 Mechs on the Battlefield
spell {
targets 1 to 10 cards {
creatureType "Mech"
zone "Battlefield"
}
}
afterPlay {
damage 2 on targets
}
}
```
Spells specify the number of targets in the `spell {}` clause. Do you want filters specific to a particular effect? If a spell `targets 2 cards` and it has an effect `on 1 targets`, which of the targets shoul
 
@ARedHerring Unless you get more Pro ;)
 
> "Change ATTACK by 2 on 1 to 5 targets" is the auto-generated *description* of a spell. `targets 2 cards` and an effect `on 1 targets` should not be possible, the DSL should remain as it is: `damage 2 on targets`

This issue is about including the number of targets in the auto-generated description. No change needs to be done on the DSL itself.
 
I hate working by VPN, connection to network is crap and Management Studio feels choppy
 
4:43 PM
> I see, I thought you were talking about changing the DSL syntax.
> Funny, I was thinking that 2) would be the preferred way of fixing this :)

I totally agree about your two possible approaches though, just one thing to add: `HEALTH_ALL` could be implemented as an *array* of `HEALTH` and `HEALTH_MAX`.
 
Why do customer service reps copy sensitive client information into damn help tickets :|
If you need the stupid SSN in the ticket, at least hash it. But it's clearly not needed.
 
00:00 - 17:0017:00 - 00:00

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