« first day (1783 days earlier)      last day (3391 days later) » 

00:05
does Visual Studio code come with a debugger?
Never used it but I heard it's more like a text editor
yes it come with a Very good debugger
oh it uses mono
weird, why is Mono debugging in VSC only available for Mac and Linux? Not that it matters (since anyone would normally use VS on windows)
@KalaJ no that is the Mono version
hm?
00:11
@daOnlyBG was talking about Visual Studio Code to debug his stuff
Normally, I would use Visual Studio to debug my stuff
but looks like he's running Visual Studio Code on a mac
or something
that's why he can't figure out how to debug?
Visual Studio Code ~ Visual Studio what is one word sometimes
Ohh I missed that part - sorry
Well never used Visual Studio Code, never had to. Just curious if it even came with a debugger (I thought it was only a text editor) but it does, they're using Mono
thought they were named the same on Win & Mac/Lin
.net is ported over to them, most of it
no they're not. There's no support for Visual Studio currently (I believe) but there is Visual Studio Code
for mac and linux
At least that's why I see developers load up virtual machines on their macs to run Visual Studio
just to debug?
 
3 hours later…
03:26
Hey everyone. Yes, Visual Studio Code debugs, but I'm not sure how intuitive the process is. I've used Eclipse (for Java) before, and VSC isn't as user-friendly, I don't think.
 
1 hour later…
04:33
what is the c# equivalent regex for the following js regex: var punctuationRE = /[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,\-.\/:;<=>?@\[\]^_{|}~]/g;`
Posting that once more...
var punctuationRE = /[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,\-.\/:;<=>?@\[\]^_`{|}~]/g;
05:05
@deostroll The regex itself should be very similar, with the same escape sequences. The main difference is that it should be passed as string, rather than as a /-delimited sequence, and the g is unnecessary - it means "find all matches, rather than just the first", so it would simply be a call to Regex.Matches rather than to Regex.Match.
Oh, and you'll have to escape the " in the middle there with a \".
@AvnerShahar-Kashtan This is how I did it...
Regex punctuation = new Regex(@"[\u2000-\u206F\u2E00-\u2E7F\\'!\""#$%&()*+,\-.\/:;<=>?@\[\]^_`{|}~]");
I just fixed it. Not sure if its correct...
I think the \"" there should be \\". One backslash to escape the other backslash, and the resulting escaped backslash to escape the quotation marks.
But this is where it gets icky.
Or maybe it should be \\\" - an escaped backslash and an escaped quotation mark?
hi
how to make a assembly reference for system.threading?
when I right-click the references I can't find threading
05:21
Which version are you using ?
@kame ?
I use Mono 4.0.12
System.Threading isn't in a separate assembly. It's part of mscorlib, I think, or one of the other basic assemblies.
/home/kame/Desktop/main/programme/monodevelop/learningcsharp/learningcsharp/Prog‌​ram.cs(7,7): Error CS0246: The type or namespace name `Threading' could not be found. Are you missing an assembly reference? (CS0246) (learningcsharp)
its already der into System assembly ..
Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
It means you have to add a using reference.
05:24
I do use the reference
ooops
I see. In that case, make sure mscorlib is referenced. It's automatic in VS projects, but I don't know how mono IDEs do it.
I used using Threading instead of using System.Threading
Thank you!
Ah. That's right, the error does seem to say it explicitly. Should have noticed. :)
De nada.
Okay...now I have a linq doubt...
var indexes = keywords
                .Select(t => tokenIndex[t])
                .SelectMany(arItem => arItem)
                .Select(x => x.Value<int>())
                .Distinct();
When I do indexes.Count() it gives me an error...
Your SelectMany call seems strange.
What type is tokenIndex?
05:26
I figure that keywords contains some values that are not there in the tokenIndex
What's the error?
tokenIndex is a json object
The error from the Immediate window:
'indexes.Count()' threw an exception of type 'System.NullReferenceException'
    base: {"Object reference not set to an instance of an object."}
That makes sense...because...I know that tokenIndex doesn't contain those keywords in it...
So tokenIndex[t] returns null, and then you're trying to call Value<int> on null.
think of the tokenIndex as a Dictionary<string, int[]> but its really a JObject...
Ok, so that makes more since for the SelectMany. But tokenIndex[t] would return a JToken, wouldn't it?
05:31
morning guys :D
yes...
Oh, a JToken is also an IEnumerable<JToken>, so that's fine too. Didn't notice that before.
Anyway, you'll want to have a fallback there, I think. tokenIndex[t] ?? new JToken() or something like that.
tokenIndex[t] returns null in some case...so should I blow the whole code up in separate parts....
So null values will simply become empty values.
WPFers: I'm trying to pinpoint what's causing my MainWindow's LayoutChanged event to fire every 30ms or so, even when nothing is going on, user-wise.
@deostroll Or you can simply add a filter in the middle. After the first Select, add a Where(arItem => arItem != null).
Or the more succinct but less intuitive .OfType<JToken>, which also filters out nulls.
morning all
user1881400
05:47
good evening :)
LayoutChanged is called even on controls that have their Visibility=Collapsed. WTH?
goood morning!
Well, as it turns out, yes, there was a good reason why my LayoutUpdated was called every 30ms. Should have noticed that number, 30. Should have been a clue.
06:05
Good morning!
@AvnerShahar-Kashtan refresh rate?
06:26
@BenjaminDiele I have a UserControl showing isbusy/loading animation, with a DispatchTimer firing every 30ms to change the image shown.
Due to a bug, the timer was always on, even when the animation wasn't shown.
06:41
I am trying to decide if I need web sockets or or any other alternatives here...
We have a tririga server (something similar to sharepoint)...its mainly used as a reservation engine...
we've outlook clients with some plugin installed, that interfaces with tririga...
we are thinking of having another server setup in between the plugin & tririga to facilitate the need of taking tririga offline in a safe manner...
So...what is it that the plugin/intermediate server should have so that the offline/online state of tririga is communicated realtime...?
I thought websockets...but isn't that sort of overkill?
How realtime do you need it to be? Polling might be simpler? Or even "On error, mark as offline"
06:58
Polling, yes, but I'd have to write a lot of code in the plugin to support that...
07:15
What do you guys do, while your program is compiling?
wait do programs still spend time compiling?
some do :D
@SebastianL Unfortunately I don't work with C++ that takes a small decade to compile. I don't have time to do anything during a compile. If a compile exists at all. :/
@deostroll But.. why does it need to be real-time?
morning all
morning
@RoelvanUden iv gotten so used to the new asp that i forgot things could even compile
07:22
@SebastianL I check SO c# chat
although compile takes 3 seconds, the unit tests take about 30 secs to run
@Squiggle yeah these days it would be a better question to ask what do you do while your tests run.
@Alex What tests?
what is the complexity of your programs? i need nearly 45sec to compile my C# project (not to mention the test)
I wouldnt say mine is all that complex compiles in seconds, but my tests take forever as it needs to run past a "intergration" test
My CI build takes ~3 1/2 mins
07:33
Right now my app takes longer for the client to start than it does to compile.
And not because it compiles all that quickly.
@AvnerShahar-Kashtan Do you depend on remote connections ?
IME, test duration depends entirely how you code your integration tests. If it's just in-memory then it's pretty quick, but the moment you start to do full-stack headless browser tests or database-setup-teardown it slows to a crawl
the slowest CI build I ever worked on was about 1 1/4 hours
that was using a 4-machine cluster to run full stack UI tests
which was, in turn, only 1/10th of the entire application suite. Sometimes we couldn't get a working cut of the entire system for 3 weeks at a time.
@SebastianL No, just general inefficiency that I'm working on. Mainly heavy WPF bindings that and superfluous UI re-renderings.
@AvnerShahar-Kashtan i had a similar problem once, when i played way too much with bitmapeffects ^^
07:50
Keep finding little nuggets, like a server call to "mark item as seen" that's called on every SelectedItemChanged, regardless of whether it was already marked as seen.
It still takes about 1.5 seconds to select an item in the list. Way too long.
08:16
@Alex Tests? What's that?
@RoelvanUden why do u steal joke
@BenjaminDiele Joke? It's a sincere question. :o
I need to check a string input and accept strings that matches \w+\.\w+ so for example fgdfg46df5g4d.684dfg564dg is correct. But the string 0.0 or 5416541.5 shouldn't be accepted. I made two regex, one for the \w+\.\w+ and the other for the number match and I check the two regex to know if I can validate the input string. Should I try to combine those two regex & is that possible?
08:38
@nkoniishvt I don't understand the rules. You want a-z and 0-9, then a dot, then a-z and 0-9?
you want to validate that something isn't a number?
but that has a dot in it?
@Squiggle pretty much this
@Squiggle a string that can contain word caracters, but shouldn't be a number
@nkoniishvt So.. RegEx.IsMatch(@"\.")? >_<
Or.. value.Contains(".")
@RoelvanUden what about 0.0 ?
What do you want?
Really, truly, I don't get what kind of logic you want to achieve.
08:50
@RoelvanUden I already explained what I wanted
@RoelvanUden match a string that contain a dot but isn't a number
Something with a dot that isn't a number?

if (value.Contains(".") && !double.TryParse(value, out valueAsNumber))
so if I write \w+\.\w+ it'll match 0.0 or 14.5 which I don't want
@RoelvanUden I made two regex to check the condition I want and it works. Now I was asking if it was possible to make it in one regex
so your solution is more or less what I already have
and work
@nkoniishvt how about split by '.' and then check if the partial string is a number and if both are return false
You're trying to validate something like a C# identifier, which can contain numbers but can't be entirely numbers?
@SebastianL it makes 3 checks, I would like to make only one check
09:01
Ugh. My main DTO object, Entity, comes from the server with a string field called JsonEntityGraph, which is a JSON-encoded object. So now when I want to create a viewmodel for each of my results, I need to deserialize the JSON-encoded object and read its properties. This means that instantiating a VM takes ~15 ms extra for the decoding, which means 100 items take an extra 1.5 seconds, which is noticeable.
@AvnerShahar-Kashtan I'll parse some data, the data will contain a variable path. A variable path is composed of project_name.variable_name. A project name can contain any word caracter. A variable name can contain any word caracter plus some other (not relevant). So I would like to match that. My problem is that if I check this with ^\w+\.\w+$ it'll also match floating numbers
@AvnerShahar-Kashtan so I made two checks to remove floating numbers but I would like to combine those two checks in one
I'm not sure it's possible with one regex.
thank you!
... it depends
shouldnt you just check that it doesnt start with a number and doesnt contain any . immediately followed by a number?
I couldn't think of a solution and I wanted to know if it was possible, and if it was I would have learned something new, if it's not it's not a big problem I'll keep the solution I made
@Alex it wouldn't allow 4fdgdfgdfg.4sdsrgrgr465rg4 which would be a valid path
09:05
I'm not sure a regex can allow a string that contains both [0-9] and [a-z] but not [0-9] alone, in arbitrary order.
that's what I thought too so I asked to be sure about it, thank you!
@nkoniishvt this is the reverse of what you want, but maybe it helps /([^.]\d)/
Goddamnit, it's going to rain tomorrow and the day after
@SebastianL I don't understand the regex, could you explain it to me please?
could use [a-zA-Z0-9]*\w+[a-zA-Z0-9]* to ensure that the string contains at least one letter
for both sides of the dot
so you end up with something like [a-zA-Z0-9]*\w+[a-zA-Z0-9]*.[a-zA-Z0-9]*\w+[a-zA-Z0-9]*
:D
09:14
@nkoniishvt it splits the string by '.' and checks every match if its a digit. and i forgot you need to add the global modifier (g)
so if it returns less than 2 youre good
@StevenLiekens it let 0.0 pass. The \w contain numbers. But a [a-zA-Z] instead could work
@StevenLiekens I've to check for that. Thanks
I thought \w excludes numbers
@SebastianL thanks, didn't know this use of regex
09:20
well then what escape sequence was I thinking of if not \w?
\D if I remember correctly
\D Matches a non-digit character. Equivalent to [^0-9].
right
so there is no escape sequence for [a-zA-Z]?
I don't think so
regex just keeps on disappointing
2
is it possible to tell which instance is which if you have an object cloned, in the Debugger in VS?
09:28
WELL HI
@SebastianL If you haven't overridden it, GetHashCode() will return an instance-specific value.
For reference types, anyway.
@Sippy you sound chipper. Or manic. Which one is it today?
Probably manic
@SebastianL you can right-click on a variable while debugging and use "Add object id", it then adds an id which is specific to the object instance, and it will be shown in the debugger
didn't know that
that's cool
09:52
Is that in 15?
Or earlier?
2012
10:09
Oo
Guys does a list collection have indexes for each item?
A.. what now?
like can you reference things like list[0] list[1]?
Yeah, kinda.
I'll come back when I know what I actually want.
@RoelvanUden List<T> :P
Wrong words?
        var list = new List<string>
                   {
                       "a",
                       "b",
                       "c"
                   };
        Console.WriteLine(list[1]);
// > "b"
Right but if you were iterating through the list in a foreach, could you get the index from the object?
Probably not?
oh motherf-
ta
@Sippy But instead of doing a foreach, do ` for` so the IndexOf doesn't have to scan the entire collection just to get an index you should've known in the first place.
@RoelvanUden Could do yeah
^ that
10:14
Still trying to decide how I wanna do this anyway haha
@Sippy With the least effort.
Well yeah.
That's the plan ;)
10:36
"lazy" programmers are the best programmers
@AvnerShahar-Kashtan @Rovak thanks that helped :)
I used to think that laziness is a positive trait
but then I came across this code base full of quick hacks and shortcuts
wrong sort of laziness, @StevenLiekens
"Do precisely what you need, in the fewest possible lines of code"
the sort that creates technical debt
rather than the "KEEP TYPING UNTIL IT SOMEHOW WORKS" hyperactive developer
10:50
I'm talking about those times when you need to change something that the current design doesn't allow
so people work around the design instead of improving it
that's laziness too
Lazy, and unprofessional.
@BenjaminDiele thats what SO C# chat does :D
11:09
@BenjaminDiele That's actually really interesting lol
Guys, I got a requirement that need to protect the content of the pendrive to be used for only one machine. I mean the content when it is installed for one machine, it should not be installed on other machines like a license setup's used to be. But am not sure what to search for this doing this?
Any idea on this??
peculiar requirement
Server based licensing?
@Squiggle Over engineered?
Or under
definitely
Whenever I have a requirement I try to view it from an external perspective to remind myself if it's dumb or not.
Or if I need to approach from a much more logical angle haha
pr0gramm0r lyf
11:14
@Ganesh You'll want to generate a machine-based unique key, so, look into hardware identifiers. Then, you want to create a key based on the hardware identifier, so look into password derived key generation functions. Then, you can do regular encryption, like AES.
You may need to create a virtual file system too, in a container, otherwise it's still pretty much a moot effort.
Oh and don't forget to protect your binary to avoid simple machine key extraction and spoofing. But that depends entirely on how military grade you want to make your solution
If he doesn't use server based licensing, it can still be cracked, can it not?
Regardless of how hardcore your encryption is.
@Sippy Sure. But, if the key is a physical machine then not knowing the key makes it entirely impossible to decrypt to virtual container (other than brute forcing, that is). Therefore, even if you make it open source, and give the encrypted virtual container on a pen drive to someone that doesn't have access to the physical machine, they cannot use the encrypted content AT ALL. So, it's protected, in a way, because the key is not accessible ;-)
even with server auth you can emulate the server if your gonig to go that far
@RoelvanUden That's true.
Odd req.
Hah
I wonder if you could do the same thing in reverse.
I'm imagining an encrypted virtual porn collection container that can only be watched on a specific porn machine.
11:19
XD
i think Livestream Studio does something simlar
imagine only being able to use a specific physical machine whilst a specific physical drive was inserted
Much like a car key :P
although the drive that comes with it has some other hardware in it as it shows up as a usb hub
I bet that exists ..
"Don't lose your fucking pen drive or you won't be able to drive your machine!"
@Sippy i have it
11:21
@Ganesh DON'T LET US WONDER ANY MORE, IS IT REALLY FOR YOUR PORN?!
@Ganesh THESE ARE THE THINGS WE NEED TO KNOW.
Failed my quote.
Fuck.
Don't worry, be happy.
If anyone can tell me what movie that's from I'll give them a cookie.
my drive of my work pc is encripted and need a key generated from a yubico to decript
One of the words is wrong.
intentionally
;DDDDDDDDD
11:25
@Sippy Frozen?
@Squiggle That's LET IT GOOOO!
nop
so cold, ironically
@Sippy Krull?
Kind of warmer
Legend? The Neverending Story? Labyrinth? What's Eating Gilbert Grape? Bubba Ho-Tep? Cassablanca? The Powerpuff Girls Movie?
:D
11:28
The Powerpuff Girls Movie!
The Chronicles of Riddick
OMAIGAWD YES.
@KendallFrey You get a cookie
Fuck @KendallFrey :-(
forwards half the cookie to Google
11:29
Now we don't get the cookies.
Haha
@RoelvanUden I totally own the PPG Movie companion soundtrack. It's seriously awesome.
cookies4all
Everyone gets a cookie!
2cooky4me
11:30
.... A tracking cookie. Trolololol.
haaaaaaaaaah
oh ffs.
ffs tfs
The seniors are working on a new content type for our CMS
I've just found that they have duplicated the controls and appended V2 to them
Instead of just changing the first one
why the fuck
This codebase is cancer.
"The seniors". It sounds a bunch of senile old gray men XD
not far off.
11:34
@RoelvanUden madmusic.com/album_details.aspx?AlbumID=8045 if you liked the movie
@Squiggle I haven't seen it. I liked the cartoon. :P
bespoke tracks by Frank Black, Devo, Shonen Knife, Apples in Stereo, Cornelius etc. No idea how they pulled that off.
it's just a feature-length cartoon. Great fun, though!
I tried the "Z" version, too. That was horrid.
Its not for any PORN guys
I should get the movie harr harr
11:36
its for a video tutorials that they are going to sell in pendrives and the content should not be copied
once installed to one machine
Well, that is impossible to accomplish. :-)
@Ganesh erm. Yeah. Good luck with that.
not if the content wipes itself when it's accessed
Oh then what is the best way to achieve this? I mean protect the data to be copyrighted
or any of the many more drastic measures
11:37
@Ganesh this is why DRM was invented
DRM is horrible.
@Ganesh why aren't you doing video-streaming instead?
but the videos are already placed in the pendrive and u r saying that stream frm the pendrive?
Well.. you can record the output. If humans can see it, you can register it digitally, too, so yeah, the entire endeavor is a pointless thing to begin with
@Ganesh but what if I just copy the contents of the pen drive to a new pen drive?
then I have two pen drives with the same thing on.
Or dump the decrypted stream lol
and along with this, there is one more thing that needs to be done is like any recording applications running
should be blocked or else my vidoes should not play
@RoelvanUden yes thats the pooint I am talking here
11:39
@Ganesh Lol, good luck. MachineA => HDMI Output => MachineB => HDMI Output => Monitor.
@Ganesh what you're describing is technically impossible
MachineB records. HAVE FUN. :-)
I could even grab my mobile and record my monitor screen haha
haha... that the last case I cannot control
but almost all possible cases I am looking into it...
You can't ever control it. Face it. DRM always fails. I suggest finding a reasonable model that doesn't rely on silly concepts :-)
there are some more requirements for similar functionality
11:41
@Ganesh take a look at CodeMeter pendrives
@Ganesh those requirements were written by someone who knows nothing about IT
aww yeah, 2 hours until holiday \o/
@RoelvanUden its not about silly concepts... its a req... but guessing how would be it possible to do all these things...
If your users are anything like me, copy protection is an excuse to try to copy something.
11:42
@Ganesh but CodeMeter pendrives are extremly expensive, like above 100$ per drive with 4gb
@Squiggle yes it might be correct but what I am looking if that does not work what else I can tell them that this is not possible and these are possible to do
@Ganesh It's a requirement put down by someone who has no clue about IT. You cannot, and I repeat, you cannot prevent copies of digital content. If you have a need to present something to a human being, it must enter an output device and be transformed into something we can conceive. That transformation can always be captured, digitally or after being transformed.
@KendallFrey exactly this :D
4
A: How to create new generic items for a List<T>?

BrokenGlassYou cannot easily convert your method to handle a generic list, because well your method is not generic. It requires for each item in the list to have properties Cnt and Year, for your method to be generic you have to add this constraint. public interface IYearTemplate { int Cnt {get;set;} ...

Such var names
int Cnt
good job
good morning
11:47
good grief
bad grief
dankey
dank maymays
So I have a make target that runs my app, which is in a subfolder. How do I run the app in the subfolder with the working directory set to the subfolder as well? i.e. where I would cd dist; myapp in cmd, what can I do in a makefile?
i should stay home for 2 days

« first day (1783 days earlier)      last day (3391 days later) »