« first day (1723 days earlier)      last day (3227 days later) » 

3:17 AM
Happy Independence Day for everyone in the USA :)
 
 
5 hours later…
8:24 AM
@Pedram Didn't even know it was still being maintained.
@Pedram Also, congrats? I guess?
Oh, I see they added a WatermarkComboBox. No more rolling my own for every new project! Hurrah!
 
9:22 AM
Can't use dynamic in Windows 10 universal apps?
 
 
2 hours later…
11:48 AM
Interesting. In case there weren't enough binary serialization formats, MS have written another one
In Haskell, would you believe
 
12:03 PM
is it binary only?
The framework could use a good xml serializer imo
 
@TomW From their "Why Bond" page, it seems to play on similar motives as TypeScript vs [other JS superlanguages]
 
I've literally just heard about it from a Bart de Smet talk
 
Making a serialization format that's easy and intuitive for C# devs used to inheritance, generics and the like.
 
Something about representing expressions in a compact wire format
 
> Bond has first class support for text protocol like JSON and Xml.
 
12:07 PM
good
system.xml is a huge mess from what I have seen
also forces one to write dumb code with everything mutable
convenient to use the built in stuff though
 
@JohanLarsson I think you were looking for a better xml serialization lib at one time?
Try this one, I guess?
 
I don't think I've used the System.Xml classes since System.Xml.Linq came along.
 
linq to xml is not super nice imo
@TomW yeah, must do it some time
 
Truth be told I've been able to mostly avoid XML in the past couple of years.
And this from someone who likes XPath. :)
 
would be interesting to see how it compares to newtonsoft in perf
not that perf is important for the stuff I serialize
 
12:13 PM
Is there any real reason to not let you define field with name that has been used in child scope because that's a really weird thing.
 
@FINDarkside You mean, declare int a both outside and inside, say, an if block in the same method?
 
@AvnerShahar-Kashtan Exactly
 
@FINDarkside Because it complicates parsing considerably, since you now have to keep track of local variable names being overridden inside scopes.
"Parsing", in this case, for humans and compilers both.
 
Well that's not the case if the name is first used in child scope and then in the local scope.
But is that really a good reason? You can make extension methods and other fancy stuff but you can't use same variable name twice :P
 
Why would you want to? What advantage would that have?
 
12:20 PM
Well the advantage that you can use every field name once in one scope
 
I don't get it. Code example?
 
@FINDarkside Simplicity.
 
Of course you can manage without it but it sounds like limitation without any pros.
You could just as well make the compiler not to compile the code if your method names don't start with upper case letter and call it simplicity
 
@FINDarkside I think you're severely underestimating the complexity of a parser and compiler, and how removing this ability simplifies their rules and logic and (mostly) test cases.
 
You actually can. Code analysis is customisable and warnings can be treated as errors. If you want
 
12:26 PM
@TomW That's not the point, since you can't turn that variable name error to warning.
 
Of course you can't. It's an error.
 
@TomW Yes and that was the point?
 
You compared the variable naming to another hypothetical situation that you imply is stupid. I was pointing out that it's not stupid and some people do that, and find it useful.
 
hmmm any reason that can make bond better / superior / easier than Newtonsoft.json ?
 
@Pedram I literally learned about it an hour ago, but I get the impression that the primary focus is binary serialization. They do json serialization as well because it'd be useful and easy to implement, I guess.
 
12:31 PM
@TomW I did not imply it is stupid, I imply that it would be stupid if you couldn't choose whether you want to follow the convention or not.
 
- Better documentation :)
 
Ah, I knew if I dug long enough I'd find an answer from @EricLippert. :)
6
Q: Why doesn't C# allow me to use the same variable name in different scopes?

Joan VengeLike for instance: if ( this.IsValid ) { Matrix matrix = new Matrix(); } Matrix matrix = new Matrix(); The compiler warns me saying: "A local variable named 'matrix' cannot be declared in this scope because it would give a different meaning to 'matrix', which is already used in a 'child'...

 
But yeah, I'm not trying to start a war, I was just wondering if there were some reason why using the same name wouldn't be possible.
 
To quote from Lippert's blog:
> C# has many rules that are designed to prevent some common sources of bugs and encourage good programming practices.
 
> Using the same simple name to refer to two different things in the same declaration space -- remember, the inner declaration space is a part of the outer one -- is both confusing and dangerous, and is therefore illegal.
The prosecution rests.
Freedom to shoot yourself in the foot is C++'s domain
3
 
12:36 PM
@TomW Sure but that doesn't really answer anything, because you can do that in java and the inner declaration space is part of the outer one too.
You never have a case where you would want to use the same variable twice? Like x, y, z, s?
 
It'd be nice for them to refer to some stats that indicate that x% of bugs in Java code are because of that feature, but I doubt we'll get that
 
But why can you take parameter that has same name as local field?
@TomW Well no bugs if you use this even if you don't have to :p
 
Typical C# user's answer: If Java does it, it's bad, therefore C# doesn't.
Bashing Java is not uncommon in here :)
2
 
@TomW No wonder, lot of things seem to be way better in c# :P
And i love that I don't have to write those multiline getters and setters so much :P Even if the IDE generates them they are still ugly.
@TomW How can it actually even lead to bugs? If you have field named f, you can name a variable f.
And that can more easily lead to bugs than having two same name variables in different scopes :p
 
12:58 PM
@FINDarkside A method scope is supposed to be a small scope. If you're redefining x in a method scope, there's a good chance you're doing something iffy - if you just defined x a second ago, why do you need a different x again? Field references, however, aren't necessarily even relevant to each method, and thus aren't part of the method's conceptual declaration space.
 
@AvnerShahar-Kashtan Yeah at the time I said that I thought that you can't have variable and field of the same name.
 
For me, having the use the same var name twice feels wrong. If I have a variable called node, and then I iterate over its children, I'll call them childNode, not node again.
The fact that a variable is inside a scope will usually have semantic meaning.
 
1:17 PM
Yeah my situation was just a quick debugging thing and that's why i had simple names, I was just surprised that you can't do that.
 
Gently urging you to give proper names even in quick spikes. :)
 
@AvnerShahar-Kashtan Yeah might be a good idea :P
 
 
1 hour later…
2:25 PM
Anyone used CefSharp in WPF ? , i used this tutorial :
it ruin my markup designer window , but it works :|
i get error ChromiumWebBrowser does not exist in namespace
but it work when i click run
 
I got same kind of thing with extended wpf toolkit, but it started working in designer when i installed it from nuget.
 
i installed it from nuget from the start :|
but i think it's becouse it does not support the toolkit
maybe i should make it from the codebehind
can i make a grid with a name
then make this webbrowser from code behind and then make it show inside that grid ?
 
Sure
 
@FINDarkside well u know how can i do that ? like myGrid.datacontent = MyWebBrowser ?
 
So you want grid with only one thing inside?
 
2:41 PM
well i rather have 2 buttom + web browser , but for that i can make 2 grid inside each other , so it's ok if a grid with only 1 thing inside
 
It's probably myGrid.Children.Add(MyWebBrowser);
 
aha
i just didn't name any of my grids till now to use on codebehind :P
tnx
Worked Like a Charm :D
 
Nice :)
 
 
4 hours later…
6:37 PM
Why does the dispose pattern feel so clunky?
 
 
1 hour later…
8:05 PM
Damnit, I hate these reporting tools. They're always some pseudo-programming language, which you can't debug nor reason about.
 
8:16 PM
...Java? :P
 
Nah, proprietary software for an ERP system.
Right now I hate its guts, because I can't see why it doesn't work :(
 
Bashing Java is a fun and rewarding pastime the whole family can enjoy
 
The worst part is that it's not atypical that it's the software that has problems
And this bloody heat isn't helping, at all.
They're the same right, or am I completely losing it?
 
ugh what is that
 
That thing is what I do most of my good days.
 
8:24 PM
What's the question?
 
It's more of a frustration vent, but it should be that the yellow item on the right will be compared to the yellow item on the left. If they're the same, my condition succeeds, which will be inverted by the "Not" element above.
It's a world full of joy and alcoholism.
 
not a 'special underscore' or some ridiculous unicode BS like that?
 
Not that I know of. I copy pasted the text.
So most likely it's the piece of software that's bugged. But I still need to solve it before tomorrow :(
 
I've once had to debug an issue that came about because some import from excel of freeform text had a different kind of space character to the one you get when you hit your spacebar
Failing to do a string match on strings that (appear) identical
 
holy fuck now other parts of my report are failing. I didn't even touch that part!
 
8:29 PM
Set fire to it and go home
 
I am home :(
 
Go to the pub?
 
Drunk @ home. Best kind of drunk.
 
Regretted that this morning. Followed that advice a little too eagerly
 
:D
Pff, I always get stressed out when stuff doesn't work and people (especially my boss) depend on it, or need it by that date.
 
8:36 PM
Is this boss 'need', or actual need?
You know, "I've set an arbitrary deadline and am incapable of changing my mind" need, or it's in the contract and we'll incur a large fine need
 
Nah, I like the boss. It's just that the client wants to start testing tomorrow, and I've said it would take a day =/
Kinda my own shit
 
Is this not one of those times where there's a maybe 50/50 chance that the client will sit on it for a week anyway because they're not ready, and might actually appreciate a delay?
 
They already had a delay of more than a month because of a colleague. I guess that chance is long gone :D
 
Hm. D'oh
 
Eh, I'll see what happens tomorrow.
night!
 
8:45 PM
g'night
 

« first day (1723 days earlier)      last day (3227 days later) »