« first day (2844 days earlier)      last day (2108 days later) » 

11:00 AM
Above is just for one channel of course. Rear left.
So it's full volume in the bottom left quadrant, and then falls off in the other quadrants.
 
That's a bizarre way of displaying it, and I already knew what you were on about anyway
 
I wanted to just do a color plot, but I couldn't get it to :P So it's a contour plot apparently.
3d plot :P
 
Does anybody else use sandcastle and know why it takes so long to build?
 
11:15 AM
@LeeButler What, the XML help-file builder? Wow, I don't think I've heard it mentioned in a decade.
 
It also makes MSDN style web docs
 
I'm thinking of writing a bot that scans softwareengineering.stackexchange.com for questions starting with "Is it bad practice if I ..." and add a reply saying "Yes, probably".
 
You can just feed it a project or solution, and it'll take all the xmldocs and spit out things like this
 
@Xariez hunter2
 
@Neil Huh?
Had a coffee break so was AFK, but what?
 
11:28 AM
someone had hunter2 as a password copied here
 
Why do you go afk for a coffee break?
 
Oh
lol
Whats that show called where people can contact the owner of the show to get help but in front of a crowd?
Constantly has families with troubles on stage etc
 
There's loads, what country
 
I'd really want to say UK
Probably England
 
11:35 AM
The most popular in the UK is probably The Jeremy Kyle Show
 
And thats exactly it. Thank you
Why does trying to set a nullable datetime to null (because of the current database value) throw a NullReferenceException?
 
because you didn't specify it as nullable in the class?
 
It is nullable in the class though
That's the thing
 
That wouldn't cause a NullReferenceException ...
Don't say stupid things Wietlol
 
Because you're trying to access its .Value without checking to see if it has one?
 
11:42 AM
The object you're trying to access the member on is probably null.
 
yea... that would not compile at all
 
Damn, sniped by Avner ...
I should've just not even tried when he's here.
 
lol
 
Hey, I wasn't even around for the past 10 minutes! I just happened to glance back when he asked!
 
Sure ...
 
11:43 AM
@WilliamMariager actually, it not being nullable might throw a null reference exception when EF tries to convert the database record to a class instance
 
select new Event {
       FromDate = q.FromDate,
       // DateTime? Event.FromDate
       // DateTime? Models.Database.TableName.FromDate
},
 
EF wouldn't allow you to even try
 
That's basically what I've got as far as the select goes
In this case, q.FromDate is null
 
@LeeButler sure it would, if the database schema and the class model are unsynchronized
 
And throws the exception
 
11:46 AM
@Xariez is q null or FromDate ?
 
Let me check. I'm pretty sure it's FromDate that is null, but let me check
 
q is not FromDate, it's an object that has a property named FromDate, or null.
 
I could also just do FromDate = q.FromDate != null ? q.FromDate.Value : DateTime.MinValue I guess?
If it's FromDate that is null?
 
@Wietlol In that case EF wouldn't even start up properly, it'd complain the model doesn't match and bail
 
in that case, doing q.FromDate != null ? q.FromDate.Value : null should also work
@LeeButler trust me, it will
 
11:48 AM
True
Ah shit.
It's q that is null
 
at our first EF project, the devs made a manual change to the model to remove nullability at some parts in the code, while the database column was still nullable
 
Welp, that explains everything
 
@Wietlol and let me guess, they didn't migrate properly
 
FromDate = q != null ? q.FromDate.Value : DateTime.MinValue
I guess that is what i'm doing then
 
@M.Aroosi it was a database first one though, im not sure how migrations work on that
 
11:50 AM
@Xariez q?.FromDate?.Value
 
or just q?.FromDate
 
since FromDate is already of the correct type
 
or .Where(q => q != null)
 
FromDate = q?.FromDate ?? DateTime.MinValue
 
11:51 AM
but FromDate is nullable
so FromDate = q?.FromDate ?? null
so FromDate = q?.FromDate
 
From the looks, he wants DateTime.MinValue as the default value?
Not null.
 
wait, iirc expression trees (Expression<Func<...>>) don't support null-operators (?.) stuff, so if it's for EF's select for IQueryable you'll need an explicit null check
 
@WilliamMariager he wants the NRE to go away
 
2 mins ago, by Xariez
FromDate = q != null ? q.FromDate.Value : DateTime.MinValue
I was looking at this.
And reduced it to the above.
 
I don't mind which to be honest, but it doesn't seem to like FromDate = q != null ? q.FromDate.Value : null , that's for sure
 
11:54 AM
FromDate = q?.FromDate ?? DateTime.MinValue will assign the value of FromDate if it has one, if not it'll assign DateTime.MinValue.
 
2 mins ago, by William Mariager
2 mins ago, by Xariez
FromDate = q != null ? q.FromDate.Value : DateTime.MinValue
 
It'll also assign DateTime.MinValue if q is null.
 
But thats the same as that one in the end, yes?
 
Not really, you try to access .Value without checking if FromDate is null.
You only check if q is null.
 
Hm, true
 
11:55 AM
q != null ? q.FromDate != null ? q.FromDate.Value : DateTime.MinValue : DateTime.MinValue
 
@WilliamMariager Great, thanks. Makes so much more sense than a data grid.
@LeeButler Toy shovel too small?
 
har har
 
Funny Héctor is here!
 
my strategy isnt working
 
what strategy
 
11:56 AM
as long as funny hector is here, noone will respond to my question seriously
 
putting it in there probably
 
what question
 
You make questions worth taking seriously?
I thought you just complained.
 
@M.Aroosi dont mind, ill ask when funny hector leaves
 
FromDate = q != null && q.FromDate.HasValue ? q.FromDate.Value : DateTime.MinValue
What about that? Unnecessarely long I guess but would it work?
 
11:57 AM
If it's a nullable (?), just check .HasValue before trying to use it
 
@WilliamMariager I literally just asked a question... without complaining
("just" might be an hour ago)
 
@Xariez, Why not just use the line I wrote? It's short and concise.
 
I might, but i'm still curious what works and doesn't work
 
@M.Aroosi it is about a pattern matching engine
 
just use regex
 
11:59 AM
im clueless on how to approach the walking of a pattern
 
And now you have two problems
 
@LeeButler this isnt regex though
this also isnt for strings
 
@Wietlol what is it then
 
and regex doesnt support some things that are fundamental for the desired behavior
 
@Neil Did you see the pattern matching he's got? He's got way more than 2 problems
 
12:00 PM
Then problems++
 
@M.Aroosi I made this small example: paste.ofcode.org/LAhSb5RBa27whCRxMRASFM
 
y = min(x, 0)
 
@Wietlol I'm pretty sure Match? FindMatch(TokenIterator<?> tokens) isn't valid in C#
 
it is C-sharpenized code of some other language, so dont bother with the syntax issues
 
You can't solve the above for x right? since min is destructive.
 
12:01 PM
@Neil two?
@M.Aroosi in basic terms, that FindMatch doesnt care about what generic type the TokenIterator has
 
What actual language are you using
 
and Match is nullable (which will be valid C#)
@LeeButler kiolian
 
uhm... koilain
 
koital?
 
12:02 PM
wait... Kotlin
 
Jesus christ
 
coattail
 
@Neil I dont use regular expressions, so I still have 1 problem
 

Android & Kotlin Experts

Any SO Room is nothing without you all GUYS.Thanks to all memb...
 
@Wietlol Good man
 
12:03 PM
@LeeButler the issue is not language related though
this is a general guidance/approach issue
this applies to every language you would write it in
 
I should learn Kotlin
 
Even in COBOL?
 
But you're showing some abortion of a code snippet and asking us to help
 
I've heard only good things about it afterall
 
@Wietlol The optional pattern match should be pretty much the same code as the literal one
 
12:04 PM
and since C# and Kotlin are structurally comparable, the exact same issue would be present in C#
 
except you also return a match in the case the "tokens.Current.Text" doesn't equal the query
 
@Wietlol I didn't know I had that passive ability. Serious silence, room-wide reach
 
@M.Aroosi but it must walk back if the next rule doesnt match
 
2 hours ago, by Wietlol
https://paste.ofcode.org/LAhSb5RBa27whCRxMRASFM
For the record
 
it must
- try to match a rule
- if it matched, try to continue
- if continuing didnt work, walk back to the start
- try to continue (without matching the current rule)
 
12:06 PM
Guess you want to return a|b|c?
IDK the syntax.
 
I think he wants /a?b?c?/
 
Or something like .Contains(a|b|c)
 
take the regex "a?a" for example
this must match "a"
it must also match "aa", but that is fairly simple to achieve
 
/[a?b?c?]/ ?
 
how does ? not meet this requirement?
 
12:09 PM
"a?" matches "a"
but now "a" doesnt match ""
so it must walk back, take the value from "a?" so it matches ""
then it can match "a" to "a"
 
the last question mark is my question
 
@Neil because I dont use regex
i need the implementation though
 
He's writing his own
 
or any approach to build that implementation
 
!!wietlol2
 
12:10 PM
oh
 
Sep 13 '17 at 15:07, by Wietlol
i will most probably write my own
 
My idea is that for each character, it sees if it fits all possible solutions up to that point
 
She's quite slow today
 
my requirements include several things that Regex doesnt do
 
12:10 PM
If the existence of that character voids the current possible solution, it gets rid of it
 
my requirements include matching on the type of the token
basically an instanceof check
or reference a particular pattern rule for recursion
or dynamically adding and removing rules
or postpone parsing
and it doesnt apply the pattern on strings
 
In other words, for the regex "a?a" and it sees "a", it will form two possible solutions:
one where the a satisfies the "a?" rule and another where the "a?" doesn't exist
 
yep
 
If it reaches the end and one possible solution still exists, it matches
simple as that
 
so, how would you code that?
 
12:14 PM
ok, take the "a?a" example
And you pass it "aa"
It takes the first character and formulates two solutions, one where the a represents "a?" and the other where it represents the following rule
 
a?a would be the same as Equals a or Equals aa
If you want to do it from scratch, I don't have any deeper knowledge
Of how that works.
 
@HéctorÁlvarez not really, because the optional expression doesnt know what kind of rules a and a are
 
It doesn't need to.
Whatever a is, you know a?a means a is 1 or 2 times.
 
@Wietlol you could have the PatternRule's FindMatch return a list of possible matches
 
@HéctorÁlvarez yes, but that doesnt work on (abc)?d+
 
12:18 PM
and each match will contain the "rest" of the text for that particular match
(or tokens)
 
Take the object, does it equal a? Yes --> OK. No --> Does it equal aa? Yes --> OK. No --> return false;
"a" can be whatever
 
so for a LiteralRule the list will contain a single match, or none
for an OptionalRule the list will contain either 1 or 2 matches
and you can sequence them by taking each match in the first list and applying the next rule on the rest of the text for that match
(or tokens)
 
@Wietlol That one means abc, together, may or may not exist, and followed by d 1 or more times.
I don't know where you're trying to go here
 
12:30 PM
i might try that
sounds like it will work
 
Oh by the way @Wietlol I have some haskell ardent defenders around here
Well not right now, at one of my IRL friend circles.
 
> IRL Friend cirles
What's that?
 
haskell ardent defenders?
 
I'll quote one of them, "Haskell is what Java wanted to be, useful and pretty".
!!urban friend circle
 
@HéctorÁlvarez friend circle when a [strait] man is good friends (or best friends) with a woman and has [no chance] of having a [sexual relationship] with her.
2
 
12:38 PM
No
No no no no no
 
10/10
 
No0O0o0O0o0O0o0O0o0O0.
No
Wordreference got my back.
Circle of friends, not friend circle.
 
!!urban friend
 
@LeeButler [friend](http://friend.urbanup.com/4924077) A friend is someone you love and who loves you, someone you respect and who respects you, someone whom you trust and who trusts you. A friend is honest and makes you want to be honest, too. A friend is loyal.

A friend is someone who is happy to spend time with you doing absolutely nothing at all; someone who doesn't mind driving you on stupid [\[errands\]](http://urbandictionary.com/define.php?term=err(snip)
 
That was disappointing
 
12:40 PM
well, Wietlol just said the idea I gave him sounds like it might work
 
And that's what @Hector's friend said
 
@HéctorÁlvarez haskell is everything but pretty
 
and the idea is just how parser combinators work, and I got that from haskell.
 
what I did before was giving that optional rule a continuation rule, which it would match after trying to match the optional rule
so like "try to match this, then match the remainder, else, rollback and just match the remainder"
but that is now not working because of more complex expressions
 
Totally off-topic, but jesus some people on the Jeremy Kyle show are pathetic. Like honestly, do people not have standards?
 
12:45 PM
It's jezza, so no
 
its jeremy kyle show, so no
 
Jeremy himself is tough as steel though, jesus christ
 
Whats a jeremy kyle show
 
11 secs ago, by Squirrelkiller
Whats a jeremy kyle show
 
@Squirrelkiller I thought you were UK
 
12:48 PM
I'd like to join the question.
 
go on
 
It's basically Jerry Springer, UK edition
 
I'm GER
BOO GER
 
@LeeButler this is gonna go on forever
 
its basically people showing what their problems are and shouting at each other, where Jeremy Kyle (host) is shouting the most
ow, they also do a lie detector test and then people cry
occasionally, Steve (security guy) jumps in and makes a cool comment (which results in a few hundred thousand youtube views)
 
12:50 PM
Sounds like a normal talk show here. people have problems, they shout at each other, host can't get a word out.
 
did I miss anything?
 
What's probably the greatest is when the idiots think they have ANYTHING on the security guards
Because the lie detector test didnt go their way
 
probably
 
@Squirrelkiller It appears to be roughtly the same as the Oliver Geissen Show
 
I watched the ones where Steve pops in, but everything else is basically crap
 
12:51 PM
Sounds like shit ...
 
ow, there are some vids which include pretty cool stories
 
Why do people even watch flow TV anymore?
 
I just love seeing people get put in place the way Jeremy does it
Which is basically like a verbal shotgun blast
 
Flow TV? Finally there is a name for "normal" tv :D
 
It wore me down and I ended up kinda liking it after it was always on in the crew room when I worked at McDonald's
 
12:52 PM
@Squirrelkiller I usually see it as "broadcast TV".
 
Same goes for karma compilations. I love, love, LOVE people getting what's coming to them. Just sad that 90% of those videos are using 144p cams
 
I dunno where I got flow TV from. I didn't coin it myself. Might be regional.
 
internal ArgumentException MakeException(string message)
{
    return new ArgumentException(message);
}
i love how much effort is being given to keep SLA
but this still gives me the giggles
 
@Wietlol No good. Should have done it like this:
internal ArgumentException MakeException(string message)
{
    return new ArgumentException(BuildMessage(message));
}

internal string BuildMessage(string message)
{
    return message;
}
 
there is also only one usage of it
nice
@AvnerShahar-Kashtan that is not nice LoD though
same as like this
 
12:57 PM
Right, right. You should move it up a layer. throw MakeException(BuildMessage(message));
 
internal void ThrowException(string message)
{
    throw MakeException(message);
}
 
What still gives me the giggles is a application I took part in that had to pass through 6 different classes to get to the database/linq queries from the controller (MVC project)
 
ThrowException(MakeException(BuildMessage)));
 
CreateException(ThrowException(GenerateException(MakeException(Build.BuildInfo.BuildMessage))));
 
Wouldn't you throw after you created, not before
 
1:00 PM
@LeeButler shh, let him find out
 
Otherwise your throw will surely throw ArgumentNullException
 
Well
Let's just call it a shortcut
 
Time to get recursive
 
[AutoWired] private IMessageBuilderService MessageBuilder { get; }
[AutoWired] private IExceptionMakerService ExceptionMaker { get; }
[AutoWired] private IExceptionThrowerService ExceptionThrower { get; }

ExceptionThrower.Throw(ExceptionMaker.Make(MessageBuilder.Build(message)));
 
And then you'll overflow the stack and throw a StackOverflowException
Which will just fuck everything
I think there's something wrong with Jetbrains' twitter
 
1:06 PM
What happens if you run .Replace() on a NULL string? Would it be safer to create a custom extension method if theres any risk the string we feed into it is null?
 
NullReferenceException obviously
Can't call a method on nothing.
 
Alright
Fair enough
 
string a = null;
string b = (a ?? "").Replace(...);
 
Jul 23 at 12:59, by Neil
I claim temporary idiocy
 
Just say it
 
1:08 PM
So either (s ?? "") or make an extension method like ReplaceOrDefault or ReplaceOrEmptyString or whatever you need.
 
Or a?.Replace(..."). Will return null.
 
You'll get stars
 
a?.Replace(...) ?? ""
Don't one up me Avner
 
Don't return an empty string there. You're turning a null into an empty string, which is strange and unexpected behavior.
 
I've been in C++ land for too long. I'm getting rusty.
 
1:09 PM
@WilliamMariager If a was null before, why should it be an empty string after the Replace?
And if it was an empty string before, it will stay an empty string after the Replace anyway.
 
@WilliamMariager a?.Replace(...) ?? ""
:p
 
2 mins ago, by William Mariager
a?.Replace(...) ?? ""
Too slow Wietslow
 
damn
i should read everything
I do have extension methods for making the reference null if empty
 
In my previous project we had NullIfEmpty() and EmptyIfNull(), but I never liked them.
 
public static string NullIfEmpty(this string text) => (text?.IsEmpty() ?? true) ? null : text;
 
1:13 PM
They were mostly an artifact of the fact that the system treated null strings and empty strings interchangeably in some places.
 
we have some places where null strings and empty strings mean the same, and to avoid NRE, they just use empty strings anyway
now, we dont like that any more, we only have a NullIfEmpty, not EmptyIfNull
 
Yeah, that was the reason in that project - "we don't like NREs, so we'll convert nulls to empty strings". Which is such a crappy reason to keep empty strings.
 
actually, @AvnerShahar-Kashtan any thought on signed/unsigned numbers in a language?
 
None, really.
 
afaik, empty strings and non-empty strings are the same distinction
they are structurally the same, just different values
 
1:15 PM
Not really. Null is "this field has no value". String.Empty is "this field has a value, and it's an empty string/no text"
 
I mean like signed/unsigned numbers
unsigned number is like "I want a string that is not empty"
 
Not sure I'm following your analogy.
 
and signed is just any string
I have been doing a bit designing on the base api of a language
and I cam across numbers
I have the following:
interface Number
interface IntegralNumber : Number
interface DecimalNumber : Number
 
but "empty" and "null" are different logical values.
 
but should I include signed and unsigned as actual types?
i feel like adding signed and unsigned distinction in types is similar to having different types for non-empty strings or non-empty collections
 
1:17 PM
Aight bitches, who's packing?
 
*raises eyebrow*
 
@Wietlol How would you represent the wider range without the different types? Assuming you go for default of signed.
Just use a larger type?
 
If anything, empty strings (and enforcing non-emptiness at the language level) is like enforcing non-zero integers at the language level.
"" is just a value.
 
@WilliamMariager in this language, you never really care
you just care if it is an integral number or decimal number
 
In that case, you kinda change the premise for the signed and unsigned distinction.
 
1:21 PM
@AvnerShahar-Kashtan or >=0 integers?
 
You don't care about signed/unsigned in Python either.
 
@Wietlol Exactly. "Signed" and "Unsigned" aren't a good name for what you want. "Signed" and "Unsigned" are about bit representation. You're talking about a higher level of abstraction.
 
in C# neither, but that is mostly because almost nothing uses uints
like array access should for example (i think) but it doesnt
 
If the same language feature lets you define the type as ">0" or ">=0" or ">=15" or "-5 >= x > +5", then it's not about sign.
 
Are you saying array access should use unsigned?
 
1:22 PM
uints/ulongs are basically kept in the language mostly for interop.
 
so I should keep the signed/unsigned part, but not include it as a common interface's behavior?
 
Jun 19 at 7:37, by Avner Shahar-Kashtan
Also, allow floating point array indexes so you could squeeze items between other items. Like instruction numbers in old Basic code.
 
Anyhow, i'm off for today folks. Cya!
 
That sounds horrible Avner :P
 
@AvnerShahar-Kashtan that is a sorted dictionary :D
 
1:24 PM
But really, array access shouldn't be unsigned. There's a reason it's signed.
 
@Wietlol signed/unsigned indicate whether one of the bits in the data is used to indicate the number's sign. Don't use it for other uses.
 
Array access isn't just for arrays, it's for pointers too. And using negative indices means you can move back and forth.
 
I understand that they could matter if you want to store them somewhere like in a database
 
@WilliamMariager Yes. For instance, myArray.IndexOf(blah). For a non-existent member, it will return -1.
 
so the conversion to a byte array would include such options, but then I wont add them as common interfaces
i guess that makes sense
 
1:25 PM
It doesn't make sense for IndexOf to return a different type than what the indexer receives.
(Of course, it could return uint? instead. -1 is just a convention)
 
@AvnerShahar-Kashtan no, it doesnt, not for me :D
Optional<Int>
(damn, sniped)
 

« first day (2844 days earlier)      last day (2108 days later) »