« first day (806 days earlier)      last day (4160 days later) » 

9:07 PM
hi
I have 4 projects in my solution, 3 of them are different low-implementations for the 4.
where would I define a common interface for those 3?
 
In WTF XAML, how do you reference an image outside of the project? Like in "C:/" @JohanLarsson
 
Managed to optimize the code from 12s to 56ms!
 
what is your code doing?
 
wait, I did that too some time ago
 
9:11 PM
@CCInc is this any help?
@BeatMe do you happen to remember what time you got?
 
well, I just found the old euler-folder
4439ms -.-
:D
 
@JohanLarsson can i do that from XAML?
 
brute-force
I gave some more effort in the later problems ;)
 
ok, I just started
@CCInc most likely. Can it be an embedded resource?
gtg now, back in 30'
 
Problem 10 in 124ms was my first result that wasn't bruteforce I guess
 
9:17 PM
hey guys
 
hi
 
I've something that should be very easy. It's a regex problem. I want to get every other backslash in a string. just the backslash.
Currently, I've a regex that gives me everything in between every two backslashes
and I don't seem to be able to invert hat
*that
 
6
Q: Can't escape the backslash with regex?

Eton B.I'm using the following regex ^[a-zA-Z0-9\',!;\?\$\^:\\\/`\|~&\" @#%\*\{}\(\)_\+\.\s=-]{1,1000}$ I know it's ugly, but so far it serves its purpose other than the backslash not being allowed as I think it should because it's escaped, I also tried \\ instead of \\\ but same results. Any ide...

 
[^\][a-zA-Z0-9_]*[\][^\][a-zA-Z0-9_ []:\!,@/="\-\^\+]*
that's my current regex
teststring would be: \testest\sometestvalue_ withspaces\testtest2\sometestvaluewith:and!
I can't make them bold?!
well, the first and the 3rd backslash should be found
 
what are you doing with that?
 
9:30 PM
a split...kind of
 
why aren't you just using String.split?
 
I'm in vala
also string split would split too often
even in C#
 
never heard of vala :D
 
It is supposed to be modern, but the syntax looks esoteric to me.
OMG Jon Skeet is in here?
 
@SteffenWinkler it would but all you need to do then is pull out odd/even pairs from the array via index and rejoin - probably a lot more simple to handle than finding a regex
 
9:33 PM
it's a syntax alternative to C
hmm
maybe
but...I still want to do it that way because it should work
 
where would you like to split your teststring?
 
That is just too cool.
 
on every second backslash
 
@TravisJ Why did you do that?
no offense just curious
 
9:36 PM
@JABFreeware no doubt because @JonSkeet just owns, period
 
so that
\testest\sometestvalue_ withspaces\testtest2\sometestvaluewith:and!

converts to this

testest\sometestvalue_ withspaces

testtest2\sometestvaluewith:and!
afk for some minutes
 
@JABFreeware - In fact, Jon Skeet was an owner of this room for a very long time, since it began actually. Recently the owners list was cleaned up and someone removed him from the list, so I re-added him. The guy is a legend :)
 
@TravisJ I can tell that from his rating!!!
its cool. I was just curious
 
@SteffenWinkler ideone.com/gaG0Y0 ?
wait, something is missing :D
 
@BeatMe well, that'd for C#
 
9:47 PM
and it's skipping every second item instead of combining them
 
@TravisJ for real?
 
@JohanLarsson - I guess he left
 
scared ;)
 
@JohanLarsson Will you help us with Windows 8 image sources in WPF?
 
@TravisJ for real?
 
9:51 PM
@Johan - He was here!
 
FOR REAL!!!
I SAW HIM!!!
 
@CCInc I know nothing about Win 8 but it will be an honor to try to help you with wpf
 
I SAW JON SKEET!!!!
 
And you did not take his autograph?
 
9:52 PM
He didn't speak
I looked at his profile, and it said he spoke 2 days ago
 
Nope, he just came in and observed
 
But you could have asked right?
 
@TravisJ I thought it was 3, but a couple of days ago
 
I actually wanted to ask him, if he would edit an old answer that was incomplete :D
many examples on a shuffle extensions that all miss some small feature another has
anyway
now that some people woke up, back to my question :D
I have 4 projects in my solution, 3 of them are different low-level-implementations for the fourth. Where would I define a common interface for those 3?
 
@CCInc - Can you permalink what he said?
 
9:56 PM
@TravisJ A few days ago? Sure.
 
Star ready...
 
in Discussion between Freddy and Jon Skeet, Dec 27 at 14:25, by Jon Skeet
@Freddy: Well it would have to interfere with the underlying stream - otherwise it couldn't get the data. But I would say that the enumerator enumerates the file, not a stream. This is the approach that LINQ takes all over the place - the query is just the representation of the query; no data is fetched (and GetEnumerator isn't called) until it's required. The whole problem here is that the reader is being created earlier than it should, IMO. If each call to GetEnumerator created a new reader, all would be well.
in Discussion between Freddy and Jon Skeet, Dec 27 at 14:25, by Jon Skeet
@Freddy: Nope - see the code at the end of my answer for an example which works fine.
in Discussion between Freddy and Jon Skeet, Dec 27 at 14:25, by Jon Skeet
@Freddy: No, calling First() or Last() would create (via GetEnumerator()), then read, then dispose.
in Discussion between Freddy and Jon Skeet, Dec 27 at 14:25, by Jon Skeet
@Freddy: The problem isn't the disposal - it's that calling GetEnumerator should always create a new reader IMO.
in Discussion between Freddy and Jon Skeet, Dec 27 at 14:25, by Jon Skeet
@digEmAll: Right. Interesting. The joys of semi-lazy IO...
 
@CCInc WOW! Did you get to talk to him?????
 
in Discussion between Freddy and Jon Skeet, Dec 27 at 14:25, by Jon Skeet
@Freddy: Everything which uses an IEnumerator<T> should dispose of it.
 
no one? ;)
 
10:00 PM
I see. He was not in here at all.
 
@JABFreeware Nope
 
@CCInc thats sad
 
That was a group of comments on an answer he posted to a question which somehow got migrated to the C# room, and thereby also joined Jon Skeet into the room.
He never chose to be here :(
@BeatMe - which framework are you using?
 
visual studio?
 
Adorable. :)
 
10:03 PM
mvc, wpf, winform, etc.?
 
console for now
 
So it is pure c#, with nothing but .cs files
 
more of a library to be honest
yes
 
Ok, I can dig that.
 
@Billdr wb
 
10:04 PM
Thanks
since this data will never be cached, I'ma switch over to jquery for the call.
see if that fixes it.
 
Cool, let me know how it goes
 
of course I could just move the low-level-implementations into my usual project, but I thought different projects would be neat
^^
 
@BeatMe - What do you mean by a common interface? If you mean that each one would implement a single interface, then that would more than likely reside in a fifth project.
 
and it was easier to test the implemntations seperately
 
I'm here now, if anyone's interested.
But only for about 30 seconds, probably :)
 
10:06 PM
;)
your Shuffle<T>(this IEnumerable<T> source)-Extension could be done better :D
 
@JonSkeet - Cool! :) Thanks for coming in :)
 
@BeatMe: Which one? I suspect I've got several on SO :)
 
there are a few different versions all over stackoverflow and the most can be optimized ;)
 
I think I've got one lazy one and one not..
 
WOAH!
 
10:08 PM
@JonSkeet ok, can we have your autograph? :)
 
hello everyone
 
hi zneak :D
 
@JonSkeet I need you to do an AMA on Reddit.
 
Jon, if you say "Hi zneak", I'll screenshot it and frame it.
2
 
@Billdr: AMA? Sorry, not a Reddit person...
 
10:09 PM
@JonSkeet stackoverflow.com/a/1287572/66674 it's just the rng that could be moved outside in a static variable, thats all :D
Ask Me Anything
 
@JonSkeet "Ask Me Anything"
 
even Obama did one and crashed the site ;)
 
@BeatMe: Absolutely not. It should be a parameter. Aside from anything else, Random isn't thread-safe.
 
damn
 
Hey! Jon Skeet is back!
 
10:10 PM
@BeatMe: See csharpindepth.com/Articles/Chapter12/Random.aspx for various thoughts about Random :)
 
I'm curious to know how you got to be such a baller. Also more about your google-fu.
 
Hi, anyone familiar with creating C#/XAML apps for Windows 8 ?
 
then other answers are wrong :D
 
@miloszmaki I've written 3 half-completed programs for Win8 in XAML. I can try.
 
@miloszmaki did you try the code I pushed?
 
10:11 PM
@JonSkeet This would be thread-safe then?
 
@zneak are you doing these?
 
and thanks for your link ;)
 
@BeatMe: Thread-safe, but not good - creating a new instance of Random each time is bad in terms of getting the same sequence more than once. Read through the link for why.
 
@JonSkeet - In your linq site ( edulinq.googlecode.com/hg/posts/index.html ) which really helped me understand linq, you refer to what code compiles down into. What tool do you use for that?
 
@TravisJ: Reflector or ildasm
 
10:13 PM
@JohanLarsson heard about them, but I'm not really doing them
@TravisJ, you can find ILSpy, which does about the same as reflector, but is free
 
Ell
Hi guise
 
@JonSkeet Would you satisfy my curiosity? What do you do for Google? I understand they don't C# a lot there.
 
@Billdr: I work on Google Offers, writing Java for the backend.
 
Ell
@JonSkeet Boo, java! ;)
 
10:16 PM
@JonSkeet if it was up to you would you switch to C#?
 
Ell
Just kidding, of course :P
 
@JohanLarsson: I'd certainly rather be writing C# than Java - but I'd rather write Java at Google than C# anywhere else :)
11
 
^ i predict some stars
 
Yea, Kendall's about to lose the top spot.
 
Ell
I'm stuck on a problem at the minute, it's not c# specific, but I'm implementing it in c#
 
10:18 PM
I was really hoping the Oracle/Google lawsuits would end with Google switching over to .NET. My android apps would be about 95% better in xaml.
 
@JonSkeet At times I'm a little worried about C# as a language if things start to go bad for ms. Probably a hard question but do you think C# is still around in ten years?
 
Ell
@JohanLarsson We have mono :P
 
95% being the precise percentage chosen by a random number generator.
 
Ell
@Billdr Why do you think that? Doesn't android use xml wizardry too?
 
Yea, but I'm really clumsy with it.
 
user142019
10:20 PM
@Ell And Objective-C#! If I finally finish the parser and code generator. :P
 
@Zoidberg'-- what would that look like? Objective-C++ that can call managed code?
or .net with an Objective-C syntax?
 
user142019
@zneak I'm writing a C#-to-Objective-C compiler for a dialect of C#.
 
so C# syntax with Objective-C libraries?
 
@JohanLarsson You could wonder the same thing about Java and Oracle.
 
user142019
@zneak something like that.
 
user142019
10:22 PM
Not exactly.
 
@Billdr Yeah, true
 
I really wish Oracle would spin Sun off again and give them mysql and java.
 
@JohanLarsson: I suspect it will be, yes. But trying to base what language you'll learn on what might happen in the next ten years is a fool's errand, IMO.
 
I have no idea what Sun's business model was, but I seemed to work better in LAMP when Sun is calling the shots.
 
I have ran into one bug after the other trying to use mysql in conjunction with .net. I cannot wait until we can just use MSSQL and be done with Oracle.
 
10:24 PM
@TravisJ Wow, I'm the opposite. But I never had to do anything too fancy with mysql.
 
@Billdr - Yeah, the regular stuff works just fine. But complex queries can become very interesting, and by that I mean error prone. I have been considering trying to use an asynchronous approach to piece together the object graph instead of just querying for it, but all these workarounds get tedious.
@Billdr - In the bug report I submitted 3 months ago, they verified it as a critical bug, then said not to use linq-sql with mysql.
 
Hahaha
That sounds like Oracle to me, Travis :p
 
If only google had acquired java back with their stock was a $4 per share in '05. Then we wouldn't have any of these issues.
 
Didn't google try to push their own language a few years back?
 
Ell
@Billdr Go?
 
10:28 PM
Yea
 
Ell
I think they use it theirself
For server stuff, idk
 
Eve
I think that Google puts more effort in hardware and infrastructure engineering for their servers rather than the code. I'm kinda curious to see how one of them would work.
Also, how their updates propagate through the net.
 
I'm not going to comment on any of that :)
 
The code for search must be amazing.
 
Ell
I just think the whole thing is incredible
 
10:31 PM
With some people using the personalized filtering, some people not, the data shaping that goes on has to be nuts. Then the optimization...
 
Why didn't anyone tell me @JonSkeet was here!? I blame you @Billdr
 
And here I am trying to get my stupid ajax query to behave as expected. Stupid perspective, making me feel bad.
@KyleTrauberman My bad.
 
@Billdr - What isn't working with it? Are you still using knockout for that or is it plain jQuery's ajax?
 
I haven't swiched over to the Jquery one yet, got distracted by Jon Skeet showing up and @miloszmaki's question.
 
@Billdr - Yeah, I am stoked :D, and I don't think I saw milo's question.
 
10:34 PM
It's a win8 xaml thing.
 
@TravisJ I think I'm on it
 
I'm pretty sure it's a win8 issue, but none of my win8 code is on this pc to check against.
 
(separate room for some reason)
 
^
 
json wasn't an option?
 
10:38 PM
@JonSkeet pastebin.com/YeQtvvDw what about this then?
 
@TravisJ For my thing? Json's getting passed around. For some reason my amplify request isn't hitting the callback functions. I'm going to work around it since amplify is overkill in this scenario anyway.
 
@BeatMe I say maybe go a little easy on him, we do want him as a reg lurker in C# after all
 
;)
 
dump it in c++ :)
 
@BeatMe: Yes, that would work. I'd still write one method accepting Random and another overload which called it, mind you.
 
10:42 PM
@KyleTrauberman Should we give Skeet his room ownership back since he's actually visited the room?
 
alright
 
I'm off in a minute anyway, tbh.
 
Oh, someone already did. Nvm.
 
I'm far from a regular chat person.
 
what do you think about the ama idea?
 
Ell
10:43 PM
@JonSkeet Glad to have met you :) (sort of :P)
 
@JonSkeet I think you've been a room owner here for as long as the room's existed. To my knowledge this is the first time you've been in here.
 
@Kyle - Beat you to it ;)
 
@JonSkeet but lurking is free, we should try not to spam you with pings. DNA bans for them who do comes to mind :)
 
@JonSkeet - Well it is fun just having you in the room :D
 
@Billdr Travis already did it
 
10:44 PM
Yea, thanks for stopping in.
 
@Billdr: Nah, I've been in before. But never for long.
Anyway, off now - night all.
 
Also, thanks for all the answers/comments you've given me over the year
 
@JonSkeet good night
 
'night
 
room topic changed to C#: SKEET WAS HERE [.net] [asp.net] [asp.net-mvc] [c#] [entity-framework] [linq] [visual-studio] [wcf] [wpf]
2
 
10:45 PM
rofl
You'd think Skeet was the flying spaghetti monster.
2
 
This is the closest I have ever been to be a good programmer! (osmosis)
 
room topic changed to C#: SKEET WAS HERE goo.gl/u3lDk [.net] [asp.net] [asp.net-mvc] [c#] [entity-framework] [linq] [visual-studio] [wcf] [wpf]
 
@JonSkeet - good night :) thanks for stopping by!
 
@KyleTrauberman change the room topic as much as you want, you're not getting the lead back. :p
 
haha
that's what i get for losing my star count give-a-damn
and going on vacation
 
10:47 PM
Yea. It takes tenacity to be #2.
 
It takes Kendall to be #1
although, I still have a higher star count per message
 
I make the right people laugh consistently, apparently.
 
brb, changing the sort on the leader board
 
lol
 
damnit
My quantity over quality strategy is about to fail, hard.
 
10:50 PM
lol
 
actually, it'll backfire on you too
MasterThief will probably be in the top ten, for his one message with 10 stars.
 
yeah, but I'll still be above you
 
brb, adding .where(c=>c.userName!=KyleTrauberman) to the sort
 
brb, removing @Billdr's access to the project
 
Fine, I'll make my own leaderboard... with blackjack, and hookers! I've already got the blackjack.
 
10:53 PM
haha
 
I also already have your source code.
So... there's that.
On a serious note: does anyone have an eye for design?
 
nope
I wish I did
but I don't
 
Same.
 
which is why the leaderboard looks like horseshit.
 
I would not have thought to alternate the background.
 
10:57 PM
did you notice I made it semi transparent too?
 
Oh neat, the grid comes through now.
 
it's always been that way
 
Could you style it with a SO theme somehow?
 
... I also don't notice when my wife gets a hair cut.
 
Colors and fonts etc
 
10:58 PM
f12, ctrl+c, ctrl+v.
that's how copy and pasting works.
 

« first day (806 days earlier)      last day (4160 days later) »