« first day (3048 days earlier)      last day (1904 days later) » 
01:00 - 14:0014:00 - 00:00

V.7
2:01 PM
@RoelvanUden oh, you think this exception is overrated?
It has a checked checkbox like "Break when this exception type is thrown". I've disabled it and now everything works.
I knew this was a fix, but is it right, all in all?
 
ya it's a little strange your catch is not the one reporting the error, return doesn't have throw
 
V.7
I mean, catching an exception of try catch
 
Ohh you're stepping it
 
V.7
@RoelvanUden Thank you. This worked, but ...
@juanvan No, I didn't. Just ran.
 
mr5
You guys still active at 10 PM huh
 
V.7
2:08 PM
Red Bull gives you wings(c)
 
14:08 here soldier
 
@V.7 You can fine-tune how VS deals with exceptions. It shouldn't put the debugger on hold when a KNOWN AND HANDLED exception is thrown, as is the case with a try/catch. After all, code was written to handle that exact problem, there's no point to debugging that one anymore...
The reason you didn't get it with CDN is because VS only breaks on exceptions in your own code. It now is considering the lib "your own code" because it's local.
 
2:31 PM
@AvnerShahar-Kashtan Your fluent cast doesn't work for impliciit operators, right? Might want to switch to the implementation of FluentAssertions' version:
[Pure]
    public static TTo As<TTo>(this object subject)
    {
      if (!(subject is TTo))
        return default (TTo);
      return (TTo) subject;
    }
Wait it still doesnt work for implicit operators fuck
 
V.7
@RoelvanUden Roger that. Thank you very much.
 
You're welcome :-)
 
Wait the as operator cant implicit operator either
!!Revert notification to Avner, it's all bullshit
 
@Squirrelkiller That didn't make much sense. Use the !!/help command to learn more.
 
No reason to mock me
 
mr5
2:37 PM
@Squirrelkiller why would you name a type such as TTo?
 
generic type parameters generally have the prefix 'T' for Type
 
mr5
if (subject is TTo instance)
    return instance
return default(TTo);
 
for a func there is ofr example one type parameter 'TResult' for result type
 
mr5
what does To stands for?
 
TTO is the type you cast to - the to-type
to stands for the english word 'to'
 
2:40 PM
Hello guys! Can you help me with Cmake?
 
yes.
1) download cmake
2) add to path
3) cmd.exe /C cmake
 
mr5
@Squirrelkiller why can't it be TDestination?
 
I am trying to use this library
 
guess it could, but destination is longer and...doesnt seem to fit properly, since destination is a place, and TTo isnt a place but a kind
 
mr5
I use the word destination in my object mapper to refer the the destination model
C# C has a built-in function that copies bytes to another has a parameter named dst which translates to destination
 
2:42 PM
@QuicoLlinaresLlorens Do you have the newest cmake build and a C99 compiler?
 
I did the cmake .
command
 
@mr5 Ok but what do yo uhave to say against "it's way shorter"
 
And I think it worked
 
mr5
@Squirrelkiller it's less descriptive. If it's less descriptive, I automatically assume it's unmanageable since you need to explain to the next developer what is it
 
Next dev doesnt have to look into the method, he can use it or not.
And if he looks into it, it's literally 3 lines. He'll figure it out.
 
2:45 PM
When I did the cmake . I got that
 
Or maybe it's just a single line - if I use Avners implementation.
Well why did you write C99 into your shell?
 
hahahaha
just did not know how to look if it was installed
was waiting for a response
 
if what was installed?
c99?
 
c99 is a specification
not an application
> you will need a C99 compatible compiler
 
2:47 PM
ah ok
 
you need a compiler capable of compiling C99 compliant code
Which is probably any kinda new compiler, since 99 was quite some time ago
 
so, the cmake process
is being done badly?
 
No idea, haven't had much to do with c/c++
can cmake compile c99?
does it just need a flag? Does it run ootb? Do yo uneed a special version? Or do you need another compiler?
 
3:04 PM
any reason an array, would not convert correctly to json if initially it is a string array, im being told by the API it is valid json, but i cant convert it to a Jobject
 
cuz it's not a jobject, but a jarray?
 
should a valid json array not convert to an object?
i am hitting about 10 endpoints of this external API, and all apart from one converts from a string to a jobject
 
well yeah, a string becomes a jobject
 
mr5
@QuicoLlinaresLlorens afaik, compilers such as gcc. clang are backwards compatible. you just need to put those as flags when compiling
 
I obtained a VS solution
 
3:12 PM
I'm so sorry
 
mr5
@Squirrelkiller I used to think like this when I was coding in JS and C++, now that I learned C#, I want to be very verbose in my code
 
But in the solutions, I have these projects:
 
mr5
@QuicoLlinaresLlorens Then why do you need to deal with CMake? Isn't msbuild enough to do all the builds?
 
now I build
and all is succeded
but then I do not know where is my binary file
 
mr5
Usually, projects like that have a specific build config to build all the projects in the sol'n
 
3:14 PM
generally in /bin
 
mr5
Look in bin folder
@Squirrelkiller do you still play dotka?
There's this new arcade game, which is really fun to play
 
Si Senor, but I just finished building my PC literally two days ago. That's when I played my first game since...about a year probably.
Gotta get back in the game
Don't tell my girlfriend.
 
mr5
Seriously, you're missing a lot of fun
 
I have no bin
 
mr5
I'm playing Dota Autochess
check the output directory in the project properties
 
3:17 PM
@QuicoLlinaresLlorens Then where do you put your trash
 
@Squirrelkiller directly in github
 
Obviously
 
mr5
I'mma report this convo to Bill Gates
 
> mr5
ohshi
 
3:19 PM
@Squirrelkiller My latest version indeed doesn't support implicit or explicit cast operators, which is intentional.
 return objectToCast is T typedObject ? typedObject : default;
 
Ima just call my old friend Billy...
 
but did you cook pizza rolls for Bill Gates
 
mr5 got a promotion over the weekend
 
mr5
yeah I know. I'm the boss now!
 
Mr. Manager
 
mr5
3:20 PM
I can edit TAGS!
 
I see Avner, since it now behaves exactly as the 'as' operator
 
Is is as or is as is?
 
@Squirrelkiller except or supporting value types.
 
Neither
 
mr5
@Squirrelkiller hey, why didn't you notice my solution while avnir is the 2nd version of it
 
3:21 PM
scusi?
 
> lisardggY created this gist on 31 Mar 2015.
 
mr5
Is that Bill Gates?
 
I. Did Not. Have. Type Coercions. With. That. Variable.
 
Did you have a fluent cast before that?
 
3:22 PM
To be fair, the pattern matching variant was only added last month.
 
I am the ninth letter of the alphabet.
 
Also...@Avner does it behave like the 'as' operator though?
 
mr5
I * is
 
No, I is the ninth letter of the alphabet
Refer to Neil's starred message
 
mr5
3:23 PM
@Squirrelkiller BindingContext as ViewModel viewModel you probably can deduce the explanation from this example
 
@Squirrelkiller the new pattern matching variant? It returns the object as a T or a default(T), which is null for reference types, which is exactly like as. But it also works for value types, returning default(T) for them (so 0, 0.0, false, TimeSpan.Zero, Guid.Empty, etc)
 
mr5
@AvnerShahar-Kashtan can this still be shorten to this: return objectToCast as T ?? default;?
 
Ah right, 'as' won't cast value types
 
@mr5 as only works for reference types, so it's identical to return objectToCast as T.
 
mr5
:facepalm:
 
3:28 PM
Hey! I have a 'problem' ..
I am currently making an API(server side) which takes a few requests. One of them is
/Customers?$orderby=Code&$skip=100
 
*an API
 
That looks like OData, sure, go ahead.
 
But I have a problem with the naming of the variables
 
mr5
use the standard query names: page=1&pageSize=10&sort=columnName
 
I don't have access to the 'client-side'
 
3:29 PM
The most difficult problem for developers across the world: naming things.
 
[HttpGet]
public IEnumerable<Customer> Get(string $orderby, int $skip)
this isn't possible as the dollar signs gives errors
 
You really shouldn't be implementing yourself what is obviously an OData endpoint.
But the easy solution is to specify in an attribute what the HTTP parameter name is, even when it's different than the C# parameter name.
[HttpGet]
public IEnumerable<Customer> Get([FromQuery("$orderby")]string orderby, [FromQuery("$skip")]int skip)
 
That's what I was looking for! Thanks. Also .. I am not entirely sure what OData endpoints are.
 
(my syntax is ASP.NET Core, yours might be a bit different)
@Falcon I'll ask you this - why did you decide on $orderby and $skip for the query parameters?
 
It says so in the docs from the 3rd party client
at the 'get all customers'
 
3:36 PM
Oh, ok. Strange to be implementing a server for a preexisting client, but sure, I can see that happening.
 
I get the confusing
 
These are standard parameter names used by several server-side query processors like OData
 
Thanks a lot that will definitely help
 
Here's a standard OData-style URL:
https://services.odata.org/OData/OData.svc/Products?$skip=2&$top=2&$orderby=Rating
 
That's exactly the same
 
3:40 PM
Yeah, though the actual filter syntax in your screenshot is a bit different.
No, sorry, no, I checked, it's exactly the same. :)
 
mr5
@AvnerShahar-Kashtan that looks like obfuscated query string url
 
	/Suppliers?$filter=Address/City eq 'Redmond'
 
I do get this error though with the code you provided
Error CS1729 'FromQueryAttribute' does not contain a constructor that takes 1 arguments
 
@mr5 Not obfuscated, just a specific DSL built on top of query strings.
 
hey guys, so you've told me about geocoding.net, a github project by Chadly, I've managed to return the lat/lng of a certain address but I have no clue how to get my current location
any ideas?
 
3:41 PM
@Falcon Hmm. Maybe it's [FromQuery(Name = "$orderby")]
 
mr5
@SamIbraheem which platform do you develop?
 
@SamIbraheem The BingGeocodingProvider has a UserLocation property, doesn't it?
 
yeah thats it!
 
I'm sorry I always forget these things, I'm on win7 VS
 
I will take a look into those OData style urls.
 
3:42 PM
@AvnerShahar-Kashtan let me try that
 
Because that's exactly what I need
 
@Falcon Basically, you can install the OData nuget package for ASP.NET and simply inherit ODataController instead of the plain Controller, and simply expose an IQueryable<T> in the controller and have the platform handle all of that for you.
 
mr5
@SamIbraheem look for a LocationService. It's either from GPS, Network or IP-based location
 
Oh man.. How can I not know about all this
 
3:44 PM
Thanks! again
 
(replaced with a better page)
 
mr5
I want this helmet
 
@mr5 Does this work for PC's? or just handheld devices?
@AvnerShahar-Kashtan I'm afraid this is written in Java
 
mr5
@SamIbraheem are you referring to the helmet?
 
@mr5 LOL sorry I meant LocationService you were talking about
 
3:52 PM
Really? 9gag doesnt load the image without javascript anymore?
 
mr5
@SamIbraheem yeah. LocationService is just my preferred name to call it. It maybe named differently platform-by-platform
You just need to understand the concept how the current location will be integrated to Map control
Map control is different from ServiceLocation
 
Man this is hard
 
Life's hard
Software development is just playing around until it works
 
Same with life.
 
Can't run into a bus and then reboot
 
mr5
3:59 PM
Dotachess is hard
 
That depends on the amount of force in the collision.
 
Can't frontally run with a relatively to earth's surface positive velocity into an average bus part of public transportation that goes 100kmh with a relatively to earth's surface and then stand up and do it again within a few minutes given you're an average human
 
Some Anno 1404 would help lighten up the mood
see ya fellas
 
bye Sam
 
Random question - anyone have an inkling why I seem to have double the number of apps in my Azure registrations "preview" screen than I do in the "existing" screen?
 
4:22 PM
posted on February 19, 2019 by ericlippert

Last time on FAIC I showed how we could implement more of the standard, straightforward probability distributions, like the Bernoulli distribution; the episode before I showed the standard discrete uniform distribution, also known as “roll an n-sided fair die”. But … Continue reading →

 
4:34 PM
@SamIbraheem I have it, just didn't allocate the time to play it. Tho sometimes I feel I should play it.
 
hi
is anyone good with .net for him to help me? thanks
 
!!welcome-c# tahtoh
 
@tahtoh Welcome to the C# chat! Please review the room guidelines and tips. If you have a question, just post it, and if anyone's free and interested they'll help.
 
@MattThrower Where is this preview screen? Is it in visual studio?
cause be advised it is often broken
 
how can i deal with adding a list of object into a view
if i have a model X, i have a list<object> in that model
im in the view
 
4:47 PM
@misha130 No, Azure
 
and want to dynamiclly add elements to that list by populating its properties
how can i do this
i know i can make an ajax call on each button click to add the fields, post the list to server and reload the partial view which receives the list
but is there a better way
 
@misha130 So the top one is the "existing" and the bottom - as it says - the "preview". The latter has loads more apps in it and I have no idea why. And I suspect it may be at the root of an issue
 
I never went in to the AD section but maybe it doubles as per the "preview"
as in the newer version and older version
they had the same thing with webapp staging
Honestly I'd just trust the first one
what is the root of the issue?
 
i hate arrays!!!
 
@misha130 Trying to sign in via a Microsoft account I'm seeing the error "he reply url specified in the request does not match the reply urls configured for the application" when I'm absolutely sure it does match
 
5:00 PM
where did you create the apps? In the preview or the original?
 
@misha130 I'm adding to an existing site. So a bunch of stuff exists in the "original" but the one I've added is among those that only seems to exist in "preview"
I actually added it via apps.dev.microsoft.com but that encourages you to manage it via Azure
 
you could try adding it just to the original
disregarding the apps.dev and then trying to see about the url
but i am pretty this isnt related
 
@misha130 That's what I was planning to do. But I'm nervous of doing it when I can see they're not the same. I don't know if there will be unexpected effects
 
5:21 PM
@kingtreelo Why's that?
 
external API returning complex arrays that could be broken down, im having trouble squeezing them into my models
 
Implementing APIs makes me cry. Want any of us to take a look?
 
i am trying to convert one object of an array to a model, and one of the objects in the array, is nested..and i have no idea why..i could cry
 
Simple: API developers like to make people suffer.
 
automapper
 
5:31 PM
@Sinjai its like they are trying to set traps, or test you
 
6:01 PM
posted on February 19, 2019 by Phil Haack

Every project risks failure to some degree or other. There’s the risk of delivering late. The risk of not being able to deliver at all. Or the risk that you do deliver in the end, but it solves the wrong problem. It’s a risky business, but not the kind with Tom Cruise lip-synching in his underwear. When you work on a project, it’s important to be aware of and manage risk. There are several good

 
6:36 PM
!!tumbleweed
 
css invasion, trying to get a footer to fill the reamining space without altering bootstrap css
nm, done it
 
!!giphy clapping
 
!!bows
 
6:50 PM
@kingtreelo That didn't make much sense. Use the !!/help command to learn more.
 
!!> Array(16).join('wat'-1) + ' Batman'
 
@Sinjai "NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN Batman"
 
7:13 PM
bootstrap is both a blessing and a cruse
 
I've never been on a bootstrap cruise, how is it?
So apparently EF's UserManager eagerly loads navigation properties on its Find method.
 
its brilliant, you should try it, lots of padding that is not needed, other than it is smooth sailing
 
I've used bootstrap, but you started talking about it being a cruise.
 
i have a jar called bootstrap, sometimes it is useful, sometimes it isnt
 
7:33 PM
I have a jar called tears.
Is it Friday yet?
 
user10864482
8:07 PM
good mornin
 
glances at clock
 
8:39 PM
Hello everyone.
 
Sup Greg?
You know anything about that IQueryable stuff I'm talking about? ^
 
Honestly, I have not even looked yet.
 
Well hop to it, I don't pay you to waste time!
 
For that...
1 message moved to Trash can
 
Oof
Need a /s apparently
 
8:44 PM
So what exactly was the weird behavior?
 
Was hoping you'd say "you don't pay me" so I could say, "like I said, I don't pay you to waste time".
 
Weird output isn't very effective at describing your issue.
 
Yeah
Just hesitant to make the claim that the nigh-unreadable generated SQL is any more effective.
 
What evidence do you have?
That statement would indicate the ability to reproduce an issue.
 
I'm trying to use queryable.GroupBy(x => x.Property).Select(x => x.FirstOrDefault()) to specify the column to be checked for uniqueness without having to bring the result into memory to specify an equality comparer. I would think that should generate a pretty simple GROUP BY query, but in reality it generates some kind of abomination I can't really make sense of.
queryable.Distinct() compares all columns, AFAIK.
This is such a tangled mess that I wouldn't consider it worth someone's time to dig into it. Was just hoping someone would happen to have an idea of what's going on just from that example, for instance if they'd encountered this issue themselves.
 
8:53 PM
Where does distinct come in, and I believe it does to ensure that each item is indeed unique compared to others.
 
queryable.GroupBy(x => x.Property).Select(x => x.FirstOrDefault()) is equivalent to something like queryable.DistinctBy(x => x.Property).
In terms of end result.
 
I'll have to look later, I am in the middle of a deadline.
But I do not think the code you posted actually creates the same SQL you are intending.
 
Don't worry about it.
 
user10864482
I drank too much coffee today
 
No such thing.
 
user10864482
9:08 PM
its my 4th extra large coffee. 1 extra large coffee is more than 500ml
 
Okay there's definitely such a thing.
I don't think I've ever topped roughly 800-1000, and I didn't feel great after that.
I don't think coffee though, so I'm stuck with pop/energy drinks/pills.
 
9:25 PM
I don't think coffee, either, I know coffee.
 
I justifiably truly believe coffee.
 
God damnit
I feel attacked.
Never forget the time the best the debugger could promise me was that it took less than ~33 days to execute. i.imgur.com/I5EfvfS.png
 
SELECT
    [Extent1].[ClientId] AS [ClientId],
    1 AS [C1]
> 1 AS [C1]
wat
Can someone explain this, plsnthx? stackoverflow.com/questions/3244428/…
 
9:47 PM
the number 1 is aliased as C1
and C1 is a keyword
for the FIRST COLUMN
its assurance of rows if all data is null
 
I get that it's a constant aliased as C1, but why? Can you rephrase "it's assurance of all rows if all data is null"?
@misha130
 
well if a row is completely null then there is no row
so its an empty table
 
Wasn't aware it wouldn't return a row that was all null.
 
10:03 PM
to be honest I am confused now too
are we even sure this is mssql?
 
Yes. What's giving you pause?
 
That is SQL, but Entity Framework does weird things when converting code into SQL.
 
SELECT COUNT(*) FROM (select 1 as c1, null as test) tt returns 1
same with out c1
SELECT TOP 0 1 as C1, null
SELECT TOP 1 1 as C1, null
I guess the mapping of these two are different
 
Not sure what I'm supposed to be getting out of that.
 
omg person just leaving chat room just freaked me out, saw this thing moving on my screen though it was a bug
that means its time to go home, eyes are fried
 
10:18 PM
Agreed.
Grrrrrr EF is not behaving
 
That is why I do not use it.
I use a micro, with my own SQL.
!!dapper
 
@Greg That didn't make much sense. Use the !!/help command to learn more.
 
!!lookup dapper.net
 
!!giphy i dont want fop
 
10:26 PM
!!giphy im a dapper dan man
 
!!wiki dapper.net
 
@Greg The Gods of Wikipedia did not bless us
 
For you Caprica!
!!fuckfuck
 
10:28 PM
hi, why adding a partial view makes the validation of required fields pop on load of the partial
 
!!wiki dapper.net
 
@Sinjai The Wikipedia contains no knowledge of such a thing
 
!!wiki Dapper ORM
 
Dapper is an object-relational mapping (ORM) product for the Microsoft .NET platform: it provides a framework for mapping an object-oriented domain model to a traditional relational database. Its purpose is to relieve the developer from a significant portion of relational data persistence-related programming tasks. Dapper is free as open source software that is distributed under dual license, either the Apache License 2.0 or the MIT License. == Feature summary == The following are the key features of Dapper: Speedy and high performance Fewer lines of code Object mapper Choice of static/dynamic...
 
Looks like a pain in the dick.
 
10:47 PM
Dapper is the best if you know whats up
@Greg do you use custom type mapping?
just been looking at this today and realized I didn't touch this ever
 
I'm inclined to believe you; unfortunately, I do not know what's up.
 
Are you talking about the multi object mapping Misha?
 
you mean inner join mapping?
no, like making dapper recognize that a certain type has this kind of mapping
oh terrible example
 
user10864482
here is my stupid problem; I have a bunch of class, who call another class. Typically the entry point is a code-behind (.xaml.cs) who call a viewmodel (.cs) who call another code-behind. From my understanding it can be between 5 and 10 level deep. My problem is that it sometime run too deep because one code-behind can call up to 10 viewmodel. How can I keep this under control?
 
10:50 PM
Yes I do that, I also do multi object mapping.
Where you populated nested objects within a parent object.
 
user10864482
Oh, I forgot to mention it; I'm looking to make a tree of object (entry point, exit point) of the project code
 
I do that too but I do it in a very non architectury way
I wish I could define mapping like I do in automapper for example
 
I don't need it very often though, I usually need it for some dumb ass index created as a string but is represented as an int.
 
user10864482
funny enough my problem is it sometime create a stackoverflow exception
 
what I really hate is trying to deserialize jsons from sql into objects
 
10:53 PM
Why not use SQL to do it for you? SQL 2016+ can automatically parse JSON into column data or you can convert column data into JSON.
This is what I meant about multi mapping:
public IEnumerable<PlotSurveyModel> GetAllPlotSurveys() =>
    dbConnection.Query<PlotSurveyModel, ProjectModel, PlantCommunityModel, PlotSurveyModel>(getAllPlotHeaders,
        (survey, project, plant) =>
        {
            survey.Project = project;
            survey.PlantCommunity = plant;
            return survey;
        });
Project and Plant Community represent nested objects within the Survey object.
 
where do you keep your getAllPlotHeaders query
 
In a resource file that I stream in.
 
oh
 
private readonly string getAllPlotHeaders = EmbeddedResourceUtility.GetSqlQuery("Domain.Resource.Database.GetPlotHeaders.txt");
 
so you dont recompile?
mostly
 
10:55 PM
Nope.
 
maybe I'll do the same, I just keep the queries in the services and am rather unhappy about that
I do this and the multi mapping and it all comes out rather long
 
I just create a resource folder and either embed in the solution from a textfile that is included, or read it externally as a directory up to you though.
 
user10864482
@Sinjai any idea?
 
oh the reason why I keep the query as part of the code is because I try to incorporate as many as possible compileable parts
like nameof() and aliases of class names
 
@User23332 Just one: smack whoever came up with that architecture.
 
user10864482
10:57 PM
@Sinjai lol. I do what I can with what I am given. The payoff would be very high because it would mean a way to dynamically document gui
 
$"SELECT {nameof(DbModels.Person.Name)} FROM {typeof(DbModels.Person).GetAlias()}
something like this
 
I don't have a 100% grasp of what you're describing, but it sounds like you're unlikely to find a magic bullet. Usually the way you get around a stack overflow is by doing a lot of refactoring.
 
user10864482
@Sinjai understood. What I am trying to do is to create a code to document a gui. the problem is the application have no documentation and is huge. it's wcf wpf mvvm application. I figured that if I scan all the code file I could create a tree. The end result would be to get a regression of the original point of entry in the gui
 
Would manual documentation take too long or not be feasible?
 
user10864482
@Sinjai both
 
11:10 PM
You could do it like this:
public static string GetSqlQuery(string namespaceAndFileNameWithExtension)
{
    try
    {
        using (var stream = typeof(EmbeddedResourceUtility).GetTypeInfo().Assembly.GetManifestResourceStream(namespaceAndFileNameWithExtension))
        using (var reader = new StreamReader(stream, Encoding.UTF8))
            return reader.ReadToEnd();
    }
    catch (Exception exception)
    {
        Console.WriteLine(exception);
        throw new Exception("Unable to read embedded resource.");
    }
}
The text file and be compiled as an embedded resource, but you can abstract into separate text files in a folder for them all to live. But if you want to avoid recompiling, then just include the folder with the file and read them in.
 
oh I didnt know they were compiled
very cool
 
Yeah, nice way to manage larger applications with a lot of moving parts.
 
01:00 - 14:0014:00 - 00:00

« first day (3048 days earlier)      last day (1904 days later) »