« first day (12 days earlier)      last day (4939 days later) » 

8:02 PM
so, downloading that CTP
Let's see how awesome it is
 
It's pretty awesome
I've played with it a bit - very, very nice
 
I like the link density in your new blog post
 
thanks
I'll try to keep it a bit lower like that
 
Hmm, the await and async spec is shorter than I had imagined
 
there's not a huge amount (publicly) required to add it
it's really complex internally, since it has to build a full state machine to handle all of complexities of pulling the info back into the right context
but from a user's POV, it's pretty simple
(provided you understand Task/Task<T>)
 
8:12 PM
i cant get my pinky and ring finger to work properly on my right hand for touch typing im about to chop them off out of frustration AmIA?
 
C:\Users\Joren\Documents\Microsoft Visual Studio Async CTP\Samples\(C# 101) Tutorial walkthrough\TutorialCS\TutorialCS.csproj : error : The project file 'C:\Users\Joren\Documents\Microsoft Visual Studio Async CTP\Samples\(C# 101) Tutorial walkthrough\TutorialCS\TutorialCS.csproj' cannot be opened.

The project type is not supported by this installation.

C:\Users\Joren\Documents\Microsoft Visual Studio Async CTP\Samples\(C# 101) Tutorial walkthrough\TutorialCS.Web\TutorialCS.Web.csproj : error : The project file 'C:\Users\Joren\Documents\Microsoft Visual Studio Async CTP\Samples\(C# 101)
 
that sucks @joren
 
hmmm
 
mmm
 
thats what happens when i try to open an MVC project before installing MVC
for example, it might be something like that?
 
8:13 PM
let me see if that one works on mine
 
I was just thinking did he need to update a .NET lib?
 
does the 101 samples project work?
I know it works here for me
 
Yeah, that seems to work
No errors at least
 
Do you have SL 4 sdk installed?
I think the tutorial uses SL
that may be the problem
 
Silverlight?
 
8:14 PM
yeah
 
No, don't have that
 
that's probably why, then
a lot of the samples are for SL
 
/me waits for the Mono team to implement it in a week so he can play with it.
 
I always wondered, with silverlight could you make a drop down box that falls outside of the canvas?
 
SL examples required for the new Async CTP? Interesting ... are the modules primarily focused around SL or they just happened to use it for that?
 
8:16 PM
this will take longer than a week, I suspect
 
i mean if it's WPF isn't it the same as windows rendering a control on a form?
 
@drachenstern No - it's full C#/.NET, including desktop + server + silverlight
 
because i know in flash you can't do that
 
so it's got samples for all three - but the tutorial uses SL
 
@ReedCopsey just being hopeful. (:
 
8:17 PM
thanks
 
@Shogun: Nope - You're kind of constrained to the SL canvas in the browser
 
ah I see
 
here's an interesting question: (try that again)
1
Q: Determine size of ASP.NET page's viewstate before serving page

slolifeWhat ASP.NET page lifecycle event can I write code in to determine the size of the viewstate that being sent out? Also, is it possible to determine the size without parsing through the rendered HTML (like a property on the page object) or is parsing the only way? What I'd like to do is log the ...

 
So how does it decide what compiler to use?
Or has my entire C# 4.0 compiler been replaced - I hope not ;)
 
@Joren - Yeah, it's been replaced
 
8:21 PM
Then how will I debug my code
 
how won't you debug your code?
 
it's backwards compat
 
should just be drop-in-compat with the VS IDE no?
 
KNOWN ISSUES

Debugging is not yet implemented.
All I mean is
 
ah
did it take a backup...?
 
8:23 PM
oh - it debugs, just not debugging across await boundaries well
 
I don't really trust this experimental preview compiler to not behave in weird ways when I just want to work with my old code :P
 
there are some issues with debugging C# 5 features
yeah - it's a CTP - you can uninstall it when you're done playing
or install in a VM
 
Yeah, I suppose I'll do that
 
(I installed it on my laptop - since I really dont' use that for my "real" work anyways)
 
For now though I just work on my other machine like I happened to be doing anyway
 
8:24 PM
btw - this is what you need for that tutorial: microsoft.com/downloads/en/…
 
Of course I sort of want to immediately use await and async in all my code now :P
But best not to do that two years or more before I actually have a fully-featured IDE to work with them
 
hehehe
well, and there's no Go Live license for it yet
unfortunately
if there was, I'd probably just start using it in real code, and not worry about the debugging exp.
 
the debugging experience for F# async is just as bad, and F#'s been in production for a while
you try to remember not to step through the complicated parts
 
your compiler has been replaced? @Joren what did I miss lol, sounds tragic
 
real men write tests instead of using a debugger anyways.
 
8:30 PM
Yes ;_;
 
@Shogun The Async CTP includes a new compiler
 
I just use throw new Exception("the code got this far");
;P
 
@Shogun That's a bit odd with async code, though
 
oh yeah good call
 
or multithreaded code
 
8:31 PM
I just use MessageBox.Show
 
The Task debug window is brilliant
 
because it does strange things in the background thread, and pulls things back
@Joren Exactly - better to debug appropriately using Task stacks
though it helps if you use the TPL ;)
 
@TimRobinson haha yeah, im doing asp.net over here or i would probably use that one too
 
@Shogun it's fine, just make sure you're standing by the server
 
wait what?
are you telling me... O.O
what I think you're telling me? lol
 
8:33 PM
make sure you click the 'OK' button quick, so the users don't notice
 
that isn't really going to work will it
 
lol
you really did have me going for a second..
 
hehe
 
in terms of a debugger, you don't really need one really right, I mean it's more like a luxury, you CAN just use your eyes and look at the code and your brain to figure it out?
unless i guess you are coupled to some other system or something and not know what values it is sending
 
8:38 PM
"look at the code" - together with the behaviour at run time
 
looks like async discussion here
 
we 'await' your response
 
that's what I do because I haven't figured out how to hook up my MVC app to the debugger because it uses custom subdomains
 
@TimRobinson did you lock on your closure yet? ;)
 
8:41 PM
localhost is not going to work right with the app, i just havent looked into figuring it out
 
@drachenstern: Remember that talk we had yesterday about parsing/validation and error handling? There was one option I hadn't considered: return the parsed value in an out parameter and an enum value as the actual return value, just like int.TryParse. It should be just as readable as just throwing exceptions, but a bit more elegant.
@everyone: How do you choose between exceptions/error codes, for cases where you validate some user input, and want to send the user a message if he entered invalid data? With the message being as specific as possible, of course
 
@Joren yes, but I didn't think you wanted to much about with a lot of OUT params
 
depends on what the context is @Joren
for example if it's a login page I have to always say 'wrong username or password' no matter what the error is @Joren
 
depends on how you're passing them through the stack. What we discussed yesterday provides short circuit exit evaluation, of course.
 
@Joren: I don't think error "codes" are ever a good idea
 
8:45 PM
use exceptions for exception behaviour
 
but in general make a pretty message that is secure and gives the user enough info to either get help or continue, and then write the rest of the stuff to a log for you
 
if the method can't do its job, throw an exception
 
I'd use exceptions and interfaces for more information when appropriate
 
if int.Parse can't parse an int, it throws
 
then again maybe I am confused about what you are asking judging by others responses..
 
8:45 PM
if File.Open can't open a file, it throws
 
@drachenstern: So does 'return Validation.Whatever' at various steps, that is whenever you would otherwise say 'throw WhateverException'
@Shogun Specifically, I have the user enter a "hostname-or-IP-address:port" string in a WinForms text box
 
@Joren ~ true
 
depends - what is your architecture/presnetation layer using?
 
And want to say specific things like 'no port entered' or 'could not DNS resolve'
@ReedCopsey But in cases like int.TryParse, the boolean you return is basically an error code
 
I say if you are making a specific validator for this, then it should return a status struct/class.
 
8:47 PM
See to me those are just UI behavior, and you just have to check those on a per item basis ...
 
@Joren you could probably find some regex to determine if it is valid and then you could say 'invalid [thing]' and otherwise if it is valid, and then you attempt to connect and it does not work.. it all depends on how savvy your users are
 
If you are just consuming the string in a consumer class, it should throw if it encounters a URI that's invalid.
 
I usually use IDataErrorInfo and related
 
@TimRobinson yeah, we talked about this yesterday ... I thought that an enum return was more appropriate, but then we branched off on other thought patterns
 
for what I'm going to present to user
and exceptions to handle anything internal
 
8:48 PM
Much like File.Open throws, but File.Exists returns a status result.
 
@Shogun The validation is several steps, and like I said, I want to be as specific as possible about which step went wrong
 
/me missed yesterday's discussion
 
@Joren is this a web app?
 
@TimRobinson most everyone here did
;)
 
@drachenstern No, winforms
 
ah, and do you need everything to check validation or can you check when focus leaves the control?
 
@TimRobinson Yes, and int.TryParse returns an error flag ... so yeah
@Shogun I'm not sure what you're asking
 
@Joren do you need all 4 steps of input before you can validate (4 is an example)
 
@Joren Yah, I remember, where did I say that wasn't valid? I still maintain those checks should be done at the UI layer, but I recall what we discussed yesterday
 
@Joren or can you validate them on the fly
 
8:51 PM
@Joren It's your implementation, I'm just trying to help you flush it out :D
@Shogun he's looking for encapsulation
 
@Shogun There is only one input, a single string in the format I said here:
4 mins ago, by Joren
@Shogun Specifically, I have the user enter a "hostname-or-IP-address:port" string in a WinForms text box
 
why doesn't it onebox the chatlog?
 
Starting with a dictionary<ulong,MyType>, I have myDict.Values.AsEnumerable().ToList().ForEach(value => ...)
that sure seems oververbose to me
 
@Joren I guess I'm confused as to what you are asking then :/ is this a question of usability?
 
@drachenstern think you have to link to individual messages?
@MichaelGoldshteyn it is
 
8:52 PM
@Shogun No, this is a question of framework design
 
is there a more succinct way
 
foreach (var value in myDict.values) ...
 
it's built in, and designed for this
 
@Reed let me check that out
 
(plus, if you use SL or WPF, it automatically handles the error reporting, too)
 
8:53 PM
IDEA: an MSDN OneBox
 
@TimRobinson ahh that suxors
 
so what's a better way than that: .Values.AsEnumerable().ToList().ForEach
 
@TimRobinson yes, the MSDN onebox would be nice
 
@MichaelGoldshteyn ...what I just mentioned?
 
@Joren oh.. eh, I'm kind of a noob when it comes to that, in fact I don't even know exactly what that means, the word Framework is so vague..
 
8:53 PM
@Reed: How would you use it? The documentation tells me nothing
 
oh, just a basic foreach
 
do you mean, the objects you use?
 
@TimRobinson don't blame him, he doesn't need to read ... /facepalm
 
It depends on your architecture - but basically, in WPF/SL, you have your DataContext implement it
 
@drachenstern I'll raise it at meta.chat.meta.stackoverflow.com
 
8:54 PM
sorry, I missed that..
 
@MichaelGoldshteyn I'd use a basic foreach - it makes more sense
 
I create like a ValidationStation object one time and then i could pass it things and it would tell me if it was valid or not
 
I pretty much don't see the point in the List.ForEach method
 
why can't I do a Value.ForEach
 
8:55 PM
yeah - it's pretty horrible
 
Values.ForEach, I mean
 
i only called it that because it rhymed
 
@TimRobinson a) quit pulling my leg, b) somebody needs to get Jeff Atwood on that right away, c) I wish
 
there's no foreach in Dictionary.ValueCollection
and it's not a LINQ extension method
 
@MichaelGoldshteyn Alternately, lots of people will add a Foreach<T> (this IEnumerable<T> source, Action action) extension method in their projects, and then you could.
 
8:55 PM
@MichaelGoldshteyn because ForEach is a magic method that only List<T> supports
it's not a general-purpose LINQ method; use the foreach keyword instead
 
why would IEnumerable not have a ForEach extension method?
 
but - before you do that - why foreach is bad: blogs.msdn.com/b/ericlippert/archive/2009/05/18/…
 
onebox trial attempt #1
 
sorry - why List<T>.ForEach (or IEnumerable<T>.ForEach)
 
yesterday, by Joren
I want to validate some data (a host name, but the specifics don't matter) in a few steps, while carefully and elegantly handling any errors. Which approach should I take: 1) A monadic approach with a Validated<T> type (consider it an extended Nullable<T>), 2) exception throwing validation code + catching everything later, or 3) exception throwing validation code wrapped inside Task<T>? Option 3 is sort of intermediate between 1 and 2.
 
8:56 PM
how'd you do that, btw?
 
@ReedCopsey whowhatnow?
 
uh, I'm totally serious here, if I open up my project in Visual Studio, and I wanted to use my finger and point at the 'framework' what exactly does that mean en.wikipedia.org/wiki/Software_framework
 
@drachenstern To which I would now add option 4: Return an enumeration value indicating Success or any one of n different types of failure, with the validated value as an out parameter
 
is it ALL the framework?
 
@Shogun do you mean the .NET Framework
 
whatever wikipedia is talking about
 
if so, the entire set of libraries that are available by default are part of it...
 
@ReedCopsey Yeah, Eric Lippert definitely glosses over the fact that List<T> has such a method...
 
@Reed I'm not too sure how IDataErrorInfo ties in with that I'm doing, it's too far on the UI side of things
 
8:58 PM
separately Eric has said his team didn't design the List class
I think Eric said he'd have designed List differently
 
what does one mean when they say 'software framework' or the 'framework of my application'
 
@Joren It's not necessarily UI specific - you can use it on any object
it just provides an existing API that allows you to report errors per property + per type
 
good article on why ForEach is unnecessary, btw
 
via Error[string] and Error
so you can return something from your validation that uses that, and use the results any way you want
 
@MichaelGoldshteyn Which article?
 
8:59 PM
but - if you use WPF/SL, it'll do stuff already for you
 

« first day (12 days earlier)      last day (4939 days later) »