« first day (453 days earlier)      last day (3568 days later) » 

9:08 PM
@bazola I registred on that forum thingy and downloaded the application, it does look like it's a real thing. However, I'd question the cleanliness and flexibility of the code for this. It seems to be primarily made up of 231 xml files, an example of such a file here:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<HREngineRules card="NEW1_014">
    <PlayRule condition="0">
        <Rule entity="3" method="6" operator="0" paramValue="0" paramString=""/>
    </PlayRule>
</HREngineRules>
 
Huh, I answered a question, and it's not showing up on the front page.
Oh, there it is.
 
well i don't know much about parsing xml but that doesn't look very easy to work with
 
@rolfl Wait, he didn't specifically ask for code review, optimizations, and best practices? That's new.
2
 
@bazola It also seems to support some customization by extending some C# classes, an example here:
      protected override HREntity GetNextAttackToAttack()
      {
         var enemyState = new PlayerState(HRPlayer.GetEnemyPlayer());
         if (enemyState.Minions > 0)
         {
            var list = enemyState.TauntMinions;
            if (list.Count == 0)
            {
               list = enemyState.AttackableMinions;
            }

            var sorting = new Sorting();
            sorting.SortByHealth(ref list);

            foreach (var minion in list)
            {
               if (minion.CanBeAttacked())
 
I know, it's odd, but his solution is wrong.....
so, I don't review it, other than to say it is wrong....
and then I post something right.... which, is that a review?
 
9:12 PM
@rolfl sounds more like give me teh codez ... almost?
But then again we could say you are reviewing his approach to code...
 
I've been watching my badges for the past few weeks, thinking.... maybe I can get 6, 66, 166 badges.
 
@rolfl I've wondered about that too, answered a broken, weird question with some code, ended up coming back and adding a full review under my solution
 
and, it's going to be close.
@DaggNabbit It is perfectly valid as a review to say: "It's broke".
there is no need to add in the working solution.
but, sometimes, it is easier to explain with the code, than the text.
 
well the broken code was also long and contorted and the working solution was just a few lines so I thought throwing it in there would be good
 
@SimonAndréForsberg what would be awesome to know is how exactly it gets the information from Hearthstone to begin with, you think it caps the screen and analyzes the image, or do you think it gets the information from the game directly somehow?
 
9:16 PM
same was true for this answer I just gave.
 
yeah, very similar situation
 
Also, we have a newly re-activated user getting all enthusiastic:
 
@bazola According to the description I read, it seems to attach to the process and use the memory from the process.
 
@DaggNabbit I have been waiting for you to say Dagg Nabbit (as a curse), been a long time since I have heard that aloud
 
@Malachi I think the next SE site I join, it will be as Dad Gum.
 
9:19 PM
My older Brother would say that all the time, but he passed away almost 20 years ago
@DaggNabbit TSG
 
damn thats rough... just saw my older bro last week for the first time in ages
 
Uhm, not so Funny, just picked up my parents from the airport last week, been more than a year...
 
close family is nice, not so big on extended family
 
@SimonAndréForsberg funny it should be mentioned today, when I talked about it the other day in this post
4
A: Wrapper class for the Rotten Tomatoes API

MalachiThis looks really silly to me: try { using (var response = (HttpWebResponse)request.GetResponse()) { var serializer = new DataContractJsonSerializer(typeof(MoviesDataContract)); return (MoviesDataContract)serializer.ReadObject(response.GetResponseStream()); ...

 
why is it tomatoes and not potatoes
that always bothered me
should ask on ELU :p
 
9:24 PM
@DaggNabbit it is
 
it is potatoes?
 
yes it is
 
holy shit
 
tomatoes and potatoes
 
that doesn't look right
neither one does
I'm filing a complaint
 
9:25 PM
spell checker didn't yell at me
 
@Malachi That is not exactly the same though. In the blog post, there was no throw inside the catch. So the Exception was effectively swallowed.
 
@SimonAndréForsberg oh right it wasn't thrown... this one is thrown
@Jamal, that user created a profile so they could collect the Rep
 
@bazola Here's an entire Git repository filled with Hearthstone bots that should be usable with that Hearthstone crawler: github.com/noHero123/HRCustomClasses (Might be interesting for @skiwi as well?). I imagine there are some AI ideas that might pop up by reading some of that code.
 
@SimonAndréForsberg thanks I will check it out :)
 
Not sure if many people have seen this CSS answer of mine: codereview.stackexchange.com/a/58545/27623
 
9:27 PM
i saw it
 
Also, there is another guy's answer that is pretty good on there too, who gave some useful tips on optimizing CSS3.
@PeterVR, his links are gold
 
hmm, didn't vote on anything there
I'm on a really old laptop right now and that animates perfectly smoothly for me
 
@DaggNabbit Yeah, though occasionally there was a hiccup (for me at least); try @PeterVR's version
 
And I just fixed the question's syntax-highlighting. I'm surprised 200 didn't catch that.
 
0
Q: How to pass configuration to a handler

Archimedes TrajanoI'm building my own JET Parser and one of the things I am trying to do as per the JET specifications is to allow changing of the start and end tags from the default <% and %>. Right now I have a parser handler modeled after javax.xml.parsers.SAXParser and org.xml.sax.ext.DefaultHandler2. The h...

 
9:31 PM
@syb0rg i think the hiccup is from the layout changing
 
Just sounds off-topic ^^^
 
that last link jumps up
 
@DaggNabbit Yeah, I think so too.
 
how the heck is he measuring frame rate for css transitions anyway
 
jsperf?
 
9:33 PM
but css transitions aren't js
and jsperf wouldn't measure frame rate anyway
 
True, I'm not sure.
 
123 rep to cap
@syb0rg I voted on it
 
@Malachi Got you too!
 
Not much attention on this question so far, even from the OP. Although, hardly any C++ reviewers (and C++ questions) around today.
 
maybe you could use requestAnimationFrame and poll whatever property is changing, and see how often it changes
but that would add enough overhead that it should hurt the framerate
 
9:37 PM
@syb0rg TS
 
@DaggNabbit I asked the OP in a comment:
Out of curiosity, how did you measure the FPS? — syb0rg 53 secs ago
 
starring oneboxed things does not work well
 
@DaggNabbit Upvote the comment then ;)
 
oh right
 
Perhaps he used Chrome DevTools
 
9:42 PM
maybe there's some profiler thing in the browser?
what's DevTools, an extension?
 
or just the normal stuff that ships with the browser
 
That's what this website uses ^^^
I think
 
yeah I've used that but it doesn't show fps does it?
 
No
Well, I can't really say cause I haven't used it ;P
Oh, apparently he did use DevTools to find the FPS:
Open Chrome Devtools > hit escape to open the console > click on the 'rendering' tab > check the 'Show FPS meter' option — PeterVR 2 mins ago
 
9:45 PM
> Error applying setting showFPSCounter: Compositing mode is not supported
hmm
good to know though
 
@bazola It's official, that repository really needs a review: m.charge = (entitiy.HasCharge()) ? true : false; (line 344 in Silverfish.cs)
 
hahaha, what a joke of a line
 
"compositing mode" sounds like GPU accelerated maybe?
 
Hopefully the compiler optimizes that
@DaggNabbit Probably
 
wonder if it's named "entitiy" all the way through
 
9:48 PM
@bazola I would guess that the bot and stuff probably works, I don't think it will beat the top players but it can probably win some matches every now and then. The code is not written in a very flexible way though IMO. At least not the code that I can see (which I think is the most important code of it all)
 
another Silver Thank you Santa
> You've earned the "Necromancer" badge (Answered a question more than 60 days later with score of 5 or more) for "Wrapper class for the Rotten Tomatoes API".
 
:-)
Cool! The OP did create an account here.
 
my question on Moderators was reopened!
 
heh... I got some badge for making an invisible edit to an answer today so I could remove a downvote
 
@DaggNabbit be careful talking about cheating around here there are mods online you know
lol jk
 
10:01 PM
hey it wasn't cheating, it was a workaround ;)
I saw a month-old "why the downvote" comment and realized the downvote was mine... had just carpet bombed the question and all the answers bc the Q was so bad
the answer was mostly good
 
@PeterVR Welcome to the 2nd Monitor!
@DaggNabbit I totally do that sometimes as well!
 
Hey @PeterVR!
 
thx, and hi
 
TTQW
be online later maybe
 
@PeterVR Ever been in a chat room on SE before?
 
10:04 PM
not really, but there has to be a first for everything...
 
0
Q: Passing Anonymous Type to a Bound Control

Matthew HaugenGenerally speaking, I'm fairly opposed to the use of anonymous types in real-world code (except in LINQ and some other specific scenarios), but I'm looking right now at a situation where I need to bind an ASP GridView control with a collection of tuple values and they're looking pretty tempting. ...

 
oh hi @PeterVR
 
Feb 3 at 18:07, by Simon André Forsberg
Once you're in The 2nd Monitor, there's no way out.
 
now we just need to get @Flambino in here
 
In other words: Welcome :)
 
10:06 PM
lol, thx
 
And @Bobby (non-Tables)
 
@DaggNabbit I've tried that before, he occasionally visits.
 
And everyone else
 
@syb0rg he used to be in the JS room a lot but that room was nuts
 
@Simo
 
10:09 PM
serious help vampire issues
 
@PeterVR Try Tab instead :)
 
@SimonAndréForsberg I just move this tab to my second monitor, is that a bad sign?
2
 
@PeterVR Nope, that's right how it's supposed to be.
 
once you pin it (like I did) you're stuck
 
@SimonAndréForsberg do you think blizzard can tell if the bot is running? it sure would be fun to do a live test but I would hate to lose all my cards :)
 
10:11 PM
0
Q: Loading dictionary using trie in C very slow with large data set

AndyThe code below works for very small dictionary files I used to test (two words). However when I run this using a more typical dictionary file, my machine slows to the point of near crash. I would like a review of what the potential bottleneck may be which I believe to be in the load() function....

 
@bazola If the bot works as it should, I don't think that they can. I think that they could make modifications to the game executable though to detect if the bot application is running.
 
its not that I want to cheat but it would be a lot of fun to improve the AI and see it win. and after all, if you program the AI to play according to your optimal strategies, its really just like you are playing yourself, right? ;)
 
Not quite.
If the game had no timer, then yes. But the game has a timer. You have a limited amount of time to make your decision.
Programming a bot to make the plays for you gives you an unlimited amount of time to make your decision.
 
0
Q: Modification of the headline line-height in the Compass vertical rhythm module

rpkOne thing nagged me about the compass vertical rhythm module; in the case the headline is too long and it occupies more than one line the line-height between the two lines looks waaaaay to massive and off. Based on the following article i've taken the adjust-font-size-to mixin source and modifie...

 
Sort of, but you can sit around and think about what you would do in different situations versus different cards and opponents, and apply that knowledge to a live game
When the bot is running during a live game it has the same time limit as a player to make the decision
 
10:21 PM
Yes, but bots don't forget. Nor is their decision making process effected in the slightest by any sort of emotions.
 
You could write out the list of what to do in the situations so that you don't forget, and take emotion out of it by always doing what the list says
 
If I spent 10 hours thinking about the optimal move for this specific scenario, I might make what I've decided to be the optimal move at some rate very close to but not quite 100% of the time. If I program a bot to make the optimal move, he will make it 100% of the time.
If I write out a list, I will have to spend time looking through the list. Given the massive list of all scenarios, I can't reasonably scan the entire list in the time I'm allotted in a single turn--but a bot could.
 
hehe true but you could write a program that searches your list based on card names to drastically shorten the search time
 
Most importantly, let's remember this is a card game with random draws in the mix. A bot can more accurately make percentage-change-based decisions. "I'm 34% likely to draw a card from this group on my next turn, so it's best for me to do X right now."
"My opponent is 12% likely to be holding this card right now, so I should do Y move right now."
You can do these as a human, yes. But a bot will be better, especially considering a game as complex as Hearthstone (that's what we're talking about, right?)
Bots also have a disadvantage versus a human, particularly in strategic card games, where a human playing a sub-optimal move might force the bot into making poor assumptions. I'm not sure there's that much bluffing per se in Hearthstone, but in poker for example, it'd be hard to make a good bot, I think.
 
Ya we are talking about Hearthstone. There is certainly the element of wanting to wait to play cards that will identify the deck archetype you are using to your opponent, because certain cards will reveal your overall strategy
 
10:30 PM
New user! Hi @PeterVR welcome to programmer prison The 2nd Monitor!
 
@Phrancis Hi, and thx
 
0
Q: MongoDB aggregation pipeline with node.js and php

isaac9AI am trying to run the same query in both node and php. The query works fine in node but gives me a cursor timeout issue in php. I suspect I translated the pipeline wrong. Could someone please take a look? Thanks. Node.js Pipeline: var pipeline = [{ $match: { date: { $gt...

 
That said, Goodbye, World. TTQW!
 
what does ttqw stand for?
 
Time to quit work
often said as ttgh (time to go home).
 
10:39 PM
well, TTGTB for me :-D
 
0
A: Loading dictionary using trie in C very slow with large data set

syb0rgA few notes: typedef struct names are commonly written in PascalCase today. Node* current = NULL; Initialize your variables on the lowest scope as possible. Therefore, declare your variables within your for loops. (C99) for(int c = fgetc(dict); c != '\n'; c = fgetc(dict)) //iterate through ...

 
@bazola @nhgrif Indeed a bot is smarter than a human, I've heard plenty of times that the bots at my Minesweeper Flags game cheats (especially AI Hard), but of course all they're doing is calculating the percentages and playing by a set of rules. I personally don't consider that cheating. But this alone doesn't necessarily make the bot better, as a good bot is often a complex bot, and a complex bot is bound to have bugs in it.
@PeterVR You learn quick!
@PeterVR Because you didn't think you were the first to say "TTGTB" for "Time To Go To Bed", did you? :)
 
That's ^^^^ .... a little sad.
 
@rolfl With 'that' being.... the number of times we've said 'TTGTB'?
 
Are Minesweeper games on some sort of timer?
 
10:49 PM
people who accuse the bot of cheating probably just assume it has knowledge of where the bombs are
 
This was the distinction I made regarding a Hearthstone bot. The fact that turns are timed, and given the complexity of the game, the bot would be able to do a far more complete calculation of the scenario in that time limit than a human would be able to do.
What's more, I presume the bot would actually do the clicking for you as well, and it'd do that faster than a human as well... which leaves that much more extra time for calculations.
 
<-- has no clue what Hearthstone is other than "some WoW thing"
 
It's a digital collectable trading card game published by Blizzard and with cards/characters/themes/etc from the Warcraft universe.
It's like Magic: The Gather, or the Pokemon card game.
 
sounds... interesting?
I played MTG (with the actual cards) a few times years ago but couldn't get into it, you hit the paywall pretty much immediately
 
Yeah.
 
10:53 PM
@nhgrif Nope, not at the moment. Some people have requested that I add such a feature though.
 
sort of the card game equivalent of IAP
 
Uh no..
IAP is sort of the app version of trading card games...
I first played MTG at least 20 years ago.
 
@DaggNabbit Exactly, which it doesn't. (Even though I've been wondering myself some times if I accidentally have added a cheat inside the code)
 
@nhgrif I see it as steve jobs coming back from the grave to flip me over and shake all the money out of my pockets
 
@nhgrif true, MTG was around long before IAP, wasn't really thinking about it in a historical context though
 
10:55 PM
@DaggNabbit It has taken a lot of the card names and stuff from WoW (and other Warcraft games), but the gameplay is completely different.
 
@SimonAndréForsberg "some WoW thing" is almost a meme... or something...
 
@syb0rg - also answered the C question.
 
"wth is a toon?" ... "idk, some WoW thing"
 
Yes, TTGTB x many times
 
@rolfl *C
 
10:56 PM
Let me fix that....
 
@DaggNabbit Hearthstone is a lot simpler than MTG. I've considered making an actual MTG implementation in Java, but I found that the rules - when you get into the detail of them - are just way too complicated.
 
@rolfl Got my +1
 
@SimonAndréForsberg I think it would be interesting to invent a trading-card type game that would be played with a fixed deck, so no purchases required other than the one deck... maybe even a regular deck of playing cards
 
If it doesn't require purchases, it's not a trading-card game. It's just a card game.
Like Skip-Bo, or Phase 10, or Poker.
 
trading-card type game
 

« first day (453 days earlier)      last day (3568 days later) »