« first day (1251 days earlier)      last day (3688 days later) » 
00:00 - 18:0018:00 - 00:00

6:28 PM
84 is easy to fix ;)
@KendallFrey You can write it something like:
class Something
{
    Task<Foo> SomethingAsync() {...}
}

class Foo
{
    int SomeResult()
    {
        return 42;
    }
}

class FooExtensions
{
    public static async Task<int> SomeResultAsync(this Task<Foo> instance)
    {
        var foo = await instance;
        return foo.SomeResult();
    }
}
then do var result = await something.SomethingAsync().SomeResultAsync();
(sorry that took so long - got a phone call ;) )
 
yeah, cool
Is there a less complicated way to keep async method chaining uninterrupted?
 
@ReedCopsey it is the 84 that are left after fixing 5k the last 24 hours :)
 
@KendallFrey not really
 
it's usually easier to just have var x = await y; var z = await x.Foo();...
which is a bit more clear, too
 
6:34 PM
In JSON.NET how can I map the JSON string not in value:pair format like following? I decided to use this because `{"id":2, "nick":"CEO"}` would take almost double the size!
`[[2,"CEO"],[4,"rambo"],[5,"A-Z"],[6,"hello"]`
 
I was thinking of keeping away from extensions and using GetAwaiter, but time will tell whether I need this at all or not
@DilipRajBaral It's not JSON anymore when you do that
At least not in the format you want
You could always change the format
 
@KendallFrey I could then do
{"nick":id, "nick2":id2}

But how do I map such JSON string? I need both value and pair.
 
now I'm confused
 
Is there something like a stack with a max size? I want to push the last 1k events and want the 1001 even to drop off the other end
 
@KendallFrey does it seem possible?
 
6:40 PM
Im looking for opionions and ideas. I work for a company, and we would like a secure way to access a list of passwords from the office or remotely. What suggestions do you guys have?
 
@WilliamRiley VPN??
 
@JohanLarsson use a Queue<T>
 
ok ty will check it out
 
user1804599
Hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii‌​iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii.
 
user1804599
@KendallFrey a queue is not a stack.
 
6:49 PM
@rightfold he doesn't want a stack
 
I just want something that works
 
user1804599
What do you want to do?
 
LinkedList<T> is easy to do that, too
 
user1804599
You know.
 
user1804599
It would be cool if the async/await stuff worked with LINQ.
 
6:53 PM
@rightfold just a log of the last 1k events
never used a queue I think
think I used a linked list once
 
@WilliamRiley could the authentication be made by a file? Something like PuTTy enables you to do
 
user1804599
@JohanLarsson Ring buffer.
 
C# has one?
 
user1804599
I don’t know if there is such an abstraction in the BCL.
 
Could the Visual Studio test runner somehow swallow first chance exception handlers?
 
user1804599
6:55 PM
4
Q: CircularBuffer highly efficient implementation (both thread-safe and not thread-safe)

javapoweredCould someone suggest good CircularBuffer implementation? I need both "not thread-safe" and "thread-safe" versions. I expect following operations: ability to provide size of the buffer when creating adding elements iterating elements removing elements while iterating probably removing elements ...

 
@JohanLarsson No
 
user1804599
Apparently Queue is a ring buffer.
 
@rightfold if you manually make it into one
 
user1804599
Oh, wat.
 
user1804599
Meh, that answer I linked is useless.
 
6:56 PM
I found public static class Object{...} in our code today
 
user1804599
lol
 
with extension methods for object
 
nice
 
you can create a queue using arrays or linked list both
choose wt u prefer
 
user1804599
A circular buffer should not be very difficult to implement in C#.
 
6:57 PM
a circular array would help
 
mentioned it was not very nice but the reaction was wtf are you talking about noob
 
well, LinkedList<T> isn't the most efficient, but it "just works" for that, since you can just push to the front and pop off the end if your size is too large
 
user1804599
Lemme write one.
 
via AddFirst/RemoveLast
 
7 warnings left
 
7:00 PM
@JohanLarsson You can use a circular array which behaves like a queue
and u can enqueue and dequeue
 
user1804599
You want “dequeue” to happen automatically.
 
I can do it manually or write one myself
my question was more if there is already a framework thing that does it
0 errors
now I must get tfs to refuse checkins with bs
 
if anyone interested htmlroom.weebly.com learn sinhala
 
I plan to visit Kandly soon. So maybe I should learn it well.
before my trip.
 
msdn.microsoft.com/en-us/library/… is intermittently throwing exceptions on my instance of EventSource. It used to work, and nothing that I know of has changed. Everything looks good when inspected by eye.
 
7:09 PM
Inspect using a test-case.
Don't trust your eyes.
 
It is in a test case
and it's failing
 
so your test case is no longer testing as before.
i mean no longer passing.
 
correct
It only fails sometimes
 
@KendallFrey is tfs slow for you? I wait on average three minutes for check in & build
 
even though it's checking my code that hasn't changed
@JohanLarsson Oh, a build for me takes around 5 minutes
 
7:11 PM
@JohanLarsson Are you using build scripts in TFS?
 
3 minutes isn't terrible if you're doing a gated build
 
ok a build on local takes < 5 s
@abhi yeah
need to figure out StyleCop gated check ins now
 
@JohanLarsson even a rebuild?
That's a darn small project
 
yeah we started a month ago
 
7:12 PM
it is not going to be very big either, perfect size
 
ours is a year maybe, and has all kinds of fancy stuff, like PostSharp
 
The other issue I'm having is that AppDomain.FirstChanceException isn't firing for some reason
this is in a unit test as well
OMG IT THREW THE EXCEPTION IN THE DEBUGGER
sweet sweet debugging
 
@JohanLarsson I haven't - I just modify the build files manually
that seems like a nice idea, though
 
user1804599
7:33 PM
@JohanLarsson ideone.com/ZtCvDD :)
 
user1804599
Also what is this abomination of a string.Join not accepting IEnumerable<T>.
 
user1804599
Or even IEnumerable<string>.
 
i've never used build scripts.
 
@rightfold Because it accepts arrays
 
is there some kind of tutorial online that one can look at and figure out the build scripts option in TFS?
 
user1804599
7:39 PM
@Shoe Thank you, Captain Obvious.
 
An IEnumerable isn't necessarily an array
 
user1804599
It’s completely irrelevant.
 
user1804599
I’m not asking for a technical reason (I’m not that dumb).
 
user1804599
Somebody has designed this function so that it takes an array. Why did he do it this way?
 
The same person probably made Join<T>
Which will take an IEnumerable
 
user1804599
7:41 PM
That’s weird.
 
user1804599
I tried that but it didn’t work.
 
user1804599
> prog.cs(45,50): error CS1502: The best overloaded method match for `string.Join(string, string[])' has some invalid arguments
 
You have to specify to use the generic function
 
user1804599
Oh, Ideone.com uses an old version of the compiler. Nevermind.
 
String.Join<string>(IEnumerable);
 
user1804599
7:43 PM
@Shoe That’s not true.
 
user1804599
Generic arguments on methods are deduced from the method arguments when possible, and in this case that is possible.
 
user1804599
This is how Tuple.Create(1, 3.14, "spam") works, for example.
 
user1804599
As opposed to Tuple.Create<int, double, string>(1, 3.14, "spam").
 
So what's the problem
 
user1804599
It works on my machine, but Ideone.com had an old version of the compiler. Presumably one that shipped with an old version of the BCL that didn’t have the generic method yet.
 
user1804599
7:46 PM
macbook :: ~/Desktop % mcs ring.cs && echo Works fine on my local machine
Works fine on my local machine
 
I think it was put there in .NET 4.0
You can use Aggregate() to acheive the same thing I think
 
user1804599
Yup.
 
user1804599
Fold is called Aggregate in C# for unknown reasons.
 
use the .NET fiddle
 
user1804599
> Run-time exception (line -1): Constructor on type 'Program' not found.
 
user1804599
7:51 PM
> public static class Program
 
user1804599
.NET fiddle is a wonderful tool, yes.
 
I just found it today.
Apparently many such fiddles exist on the Interwebz.
.NET / Ruby / Python / Javascript / Sql.
the only one I used a lot was the sql fiddle.
 
8:07 PM
When I use JavaScriptSerializer to serialize an array I get &quote;mystring&quote; for some reason
 
Pretty sure there's a setting some place.
I had a very similar problem with T-SQL in sqlserver.
I had to set something called @XMLTYPE in my SELECT queries.
I just wish I knew what the answer for the Javascript Serializer was.
 
@Html.Raw fixed it
 
@rightfold looks nice
@rightfold I think aggregate reads poorly, prolly a matter of beeing used to
 
@rightfold reduce is called Fold in your head for unknown reasons.
 
in Lounge<C++>, 6 mins ago, by R. Martinho Fernandes
C++ is not C# therefore it sucks
@R. Martinho Fernandes become reg here imo
 
user1804599
8:20 PM
@KendallFrey rightreduce
 
I've spent about 4 days just trying to write 2 working unit tests
 
user1804599
Your code is too complicated.
 
Bad code?
Beat me to it
 
50 mins ago, by rightfold
@Shoe Thank you, Captain Obvious.
yesterday, by Kendall Frey
If I could time travel, I'd go back and tell my coworkers to write threadsafe code.
the number of race conditions is astounding
 
user1804599
Writing thread-safe code is pretty easy.
 
user1804599
8:30 PM
Oh wait, you probably have mutable state in your program.
Nevermind then.
 
not for them
@rightfold :P
get your pure shit outta here
 
user1804599
// screw purity
void increment(ref int x) {
    ++x;
}
 
This room is so sassy atm
 
i love having 800 new email messages from our cms, that i can't opt out of
 
user1804599
8:48 PM
@Steve create a rule that automatically deletes them.
 
i created a rule that moves them into a separate folder, but its still annoying
 
9:00 PM
have them forwarded to your manager and see how he likes it
 
Those rules will only work on the client and it needs the client to be running.
I wish the rules would operate on the server and that would save a lot of time.
 
@rightfold flame if you find dumbs ^ also, what do you think about testing many things or the same thing many times in one test like that?
@Reed If you have time and an opinion about the testing strategy lemme know :)
 
user1804599
Fine.
 
testing like that is fine?
 
@JohanLarsson I don't mind that - but a lot of people don't like tests that test >1 thing
(I've been flamed for that before :p )
 
9:09 PM
yeah I'm beeing flamed for it constantly!
 
lol
 
my thinking is that as long as the tset is not more than one screen and reads reasonably it is ok
better than ok in fact as it minimizes setup code
another neverending battle we have is mocking dtos, they hate me cos I want to use the real dtos
I hate them for introducing interfaces and writing mocks whose setup is much bigger than using the real class
When I say it is not the end of the world if one find a bug in another class than the one under test by accident they frown. In fact it is the opposite of the end of the world imo.
slightly annoying to fix sure but still a caught bu´g
 
@ReedCopsey I often find it more manageable to add on something to an existing integration test than to write a new test that does 99% of the same thing.
My main battle is I hate random data. And my coworker loves random data.
 
9:30 PM
@rightfold yeah, threadsafe code is pretty easy. You just have to careful be of .conditions rcae
 
user1804599
Only when you deal with external resources.
 
user1804599
(Or mutable objects, but you’re screwed there regardless.)
 
:P
I was just trying to be a clever smartass
 
d:
 
whats the easiest way to a "binary byte" into an enums marks with flagsattrib
 
9:40 PM
www.whatever.youre/talkingabout/confuses/the/shit/outof/me#mylifestory
 
@NETscape a bit mask?
 
right, do i have to mask every bit?
or can I do FlagsEnum flags = (FlagsEnum)myByte;
 
@NETscape that should work.
Keep in mind that an enum is integer-based by default
so even though the flag 1<<31 will fit as a flag in the enum, storing it in a byte is impossible.
 
Today's view:
office with yachts
that's Sitecore UK. Nicer office than ours, for sure
 
@rightfold no tests?
 
user1804599
9:48 PM
:P
 
user1804599
The main function is the test!
 
user1804599
It’s just not fully automated.
 
#testing in production
I would need tests for that code chances are I would not just be off by one but off in the wrong direction :)
 
Whoever is in charge of maintaining the youtube playlist feature needs to be fired. Like yesterday.
 
why?
bot code was still #1 btw, they had not even fixes the obvious bugs :)
 
9:59 PM
Because they break it on a daily basis.
 
if they have stopped copy it would be doable to 2.0 it
not sure if motivated enough though
 
Yeah having it stolen is kind of a deterrent
I mean, it is a clear exploit. We even went over the process to double check that one time.
 
but mostly a good thing, made me stop wasting time :)
 
:)
 
@TravisJ chances are js is an even bigger? deterrent (not sure if bigger is correct here)
 
10:04 PM
Yeah that's proper
At least for the most part, your c# was pretty simple to port
 
They may take our lives, but they will never take our freedom!
 
@TravisJ Question dude.
 
Sweet.
 
I hate how youtube switches to the sharing menu when a video finishes. "Want to check out the description now? WHOOPS TOO BAD"
I hate how youtube channels usually have some stupid overview video that the owner set, I just want to view a list of uploaded videos.
I hate how youtube keeps suggesting the same videos on my homepage, despite the fact that I've already seen them.
I hate how when clicking on a video on someone's channel, youtube defaults to playlist mode.
 
Any idea why this:

<div id="Header-Menu">
     <div class="Social">
           <div class="Sub-Header">
                  <a href="#">My Profile</a>
           </div>
           <div class="Sub-Header">
                   <a href="#">My Profile</a>
           </a>
     </div>
</div>

When I try to basically level the items on the header in the middle, then hide the two sub-menu items, then draw a square in the header for where the persons photo is.  The sub-header is visible though I explicitly put: `display: none;`.
 
10:09 PM
There is a markup error
<div class="Sub-Header">
                   <a href="#">My Profile</a>
</a>
 
I have correct markup, I recreated it super fast.
Could it be because I'm floating the Social class?
@TravisJ It has to be because of the float. I utilize display: inline-block; and the issue disappears.
 
@Greg - Can you recreate it in jsfiddle?
 
@TravisJ Yeah, that is where I'm doing test markup.
 
10:31 PM
Wow... PHP with static typing is quite possibly the most hideous combination ever (Source: code.facebook.com/posts/264544830379293/…)
 
waffle envy
 
Compared to what:

using(SqlConnection connection = new SqlConnection())
{
      string command = "" // Some SQL Command
      using(SqlCommand cmd = new SqlCommand(cmd, connection))
      {
              // Db Stuff / Params
       }
}
@RoelvanUden That is still ugly, but the link you posted is even uglier.
 
11:24 PM
so yeah, vs just decided that intellisense was done for the day or something
 
@HansPassant hi :)
 
@JohanLarsson - Don't do that to me lol, I actually thought he was in here for a second
 
he is in c++
not active though
 
11:40 PM
i just don't understand why intellisense wont work.... i've closed and reopened VS, i deleted what I had and started over, and its still not there
 
@Steve - It wont work anywhere, or it wont work in one spot?
 
anywhere :/
 
any build errors?
 
i even disabled it and re-enabled it and it didn't work
 
@Steve - Is there a vs update available ?
 
11:49 PM
oh thats a good thing to check, brb
it was just working like 2 minutes ago though, and yes there are build errors in diff projects in the solution, as i'm working on them
 
build errors have messed with intellisense for me in the past I think
try unloading the projects with bs?
 
@JohanLarsson unfortunately, that didn't work, but it was a good try
@TravisJ ha, thats probably it, i have windows update disabled because forced restarts literally make me want to hunt down ms execs
 
hopefully :)
I am off for today, c u all tomorrow
 
bai
@Steve still strange that it stops working out of the blue
 
00:00 - 18:0018:00 - 00:00

« first day (1251 days earlier)      last day (3688 days later) »