« first day (2575 days earlier)      last day (2388 days later) » 

1:00 PM
do what :O
 
1:13 PM
@RoelvanUden !!lenny
 
!!tell HéctorÁlvarez lenny
 
@HéctorÁlvarez ( ͡° ͜ʖ ͡°)
 
;)
 
!!kieran2
 
@Proxy That didn't make much sense. Maybe you meant: kieran2
 
1:23 PM
why is there no kieran?
!!proxy
 
Mar 29 at 10:09, by Proxy
i'm a fraud :/
 
btw where is satibel? have not seen him in ages
 
Morning
Anyone here ever post the JS blob object to a C# Web API endpoint before?
 
@Proxy that is a good question actually
 
I don't know what type it should be for Web API to serialize/map the data over
Last time I did this there wasn't a defined JS spec for a blob object
 
1:27 PM
@Proxy last seen in september
 
@Kieran thanks, I don't control bot commands yet
 
eh?
You can
 
I mean, without looking at the cheatsheet
!!HéctorÁlvarez
 
@HéctorÁlvarez That didn't make much sense. Use the !!/help command to learn more.
 
Eh nevermind, I'll join the sandbox later
 
1:32 PM
I know you Canadians/Europeans are only tangentially paying attention to American news, but this is kinda a big deal over here - Mueller indicts Jared Kushner ahead of Trump's Asia Trip
 
If I got client side blobbys and I want server-side C# blobbys, and I have the Web API and C#s, how do?
 
@Vap0r jQuery
 
I'm reading about how to tell somebody to not be so lazy at work. I will talk to my colleague about too much coffee break.
2
 
@mikeTheLiar way ahead of you:
            canvas.toBlob(file => {
                file.name = nameParts.join(".") + "-crop." + extension;
                let data = new FormData();
                data.append('file', blob);

                $.ajax({
                    url: "EXAMPLE WILEY WILEY WILEY replace",
                    type: 'POST',
                    data: data,
                    contentType: false,
                    processData: false
                })
            });
But I need C# to serialize/map things like Web API do
 
1:34 PM
@mikeTheLiar do you know how to do this?
 
How to do what? Move blobs from the client to the server?
 
si
 
I KEEP FALLING FOR THESE STUPID REBECCA BLACK LINKS.
 
blob.SetLocation(client);
blob.MoveTo(server);
 
@Wietlol not enough jquery
 
1:38 PM
its the C-harp room
hmm...
fixed the issue
 
@Wietlol could you please stop typing so loud?
 
:D
 
Db is funny because it's nigh the same as C#.
 
define "Db"
 
1:40 PM
Just send the JSON over through ajax to some RESTful API service
 
nah, use sockets
 
@HéctorÁlvarez I know that
@Wietlol no
 
aw
 
you just need to define the same object
server-side
 
@mikeTheLiar I know ways to do it, but I feel that ostensibly I should be able to post the blob object via FormData to Web API and use C#'s BLOB datatype (is that a thing?) to do it. Though I think blobs might be treated as a byte array stream
If so I think I have to convert depending on how the blob looks like in JS
 
1:43 PM
in JS it's an unsorted plain object with attributes, like an XML piece of crap, but noiseless
 
Yeah the closest you're going to get in C# is a byte array. There's no blob type.
 
json string?
 
@Wietlol full sentences?
 
Jason String?
 
Javascript Object Notation string?
 
1:45 PM
@Wietlol JavAScript Object Notation
 
there is NO Jason
 
My brother's name is Jason Wiley. He might disagree
 
there
is
 
Jake Weary.
 
NO
Jason
your brother is called Json Wiley
 
1:47 PM
There is no Jason, only Zuul.
 
@Wietlol this all makes sense
 
duh
 
@mikeTheLiar you guys are the second best C# room on SO behind the JS room
so you got that going for ya
 
we are the second best C-harp room?
 
I wish Kendall were here so he could lend some credibility to this room
 
1:49 PM
@Vap0r and by that you mean Kendall?
 
and Js room is the best C-harp room?
 
@mikeTheLiar well and me too
 
Funny thing is, we're also the second-best JS room.
 
I'm a pro
 
I mean what
 
1:50 PM
Wow! I saw that, reported!
 
I mean twat
 
@mikeTheLiar you guys are the best at being runner up, so there's that
@hilli_micha that hurt my sensibilities
I'm not gay, just sensitive
 
@Vap0r your sensibilities are dumb.
 
@hilli_micha ouch
lol
 
got em
 
1:51 PM
Coming in asking for help and then insulting the room....it's a bold move, let's see how it plays out for him.
 
@mikeTheLiar no no, this room is great
Just not so much for C#
I mean I think your second most active member right now is Wietlol
 
Actually you bring up a good point.
 
And I'm your most active, so there's two idiots giving you bad representation
 
Most of the former C# experts left/only come back to shitpost after..... the incident
Actually
 
@mikeTheLiar I'm interested, tell me more about this incident
 
1:54 PM
Now that I think about it
what the fuck am I doing here
 
@hilli_micha oh we don't talk about this incident
@mikeTheLiar good point
 
But I want to know about this incident apples for apples, is it worse than Chernobyl?
 
@hilli_micha tl;dr room got frozen, there was a whole hullabaloo.
Paninis may or may not have been involved.
But a lot of the old regulars (aka the vast majority of the C# knowledge) left or only come back sporadically.
So yeah @Vap0r I take back what I said. You're right.
 
It seems that you would need a base level of old regulars to entice those that do come back sporadically to become a more permanent fixture
And I don't know if you have that base right now
 
We most certainly do not.
 
1:59 PM
Didn't you say there was an external chat?
 
Yes
We periodically poach the good ones from this chat into Slack
 
Maybe it's best to reverse that process and just have the slack as a contingency plan
It's always good to have an escape plan
 
I mean, what
 
@mikeTheLiar all chats aren't that great
 
I mean, what
 
2:02 PM
But if it was even decent back then it's a great way to make it so you're not just sitting here, lord of the flys
@mikeTheLiar kendall does that
 
inb4 kinky kendall
 
no plz
But seriously you have dominion over who? I don't know if it's worth the minimal effort you put into it
 
Eh. Once I think we have enough new ROs I'll just bail. I don't want to just leave because I'm at least partially to blame for the mass exodus.
 
> partially
 
When I'm here and things start to go really off the rails I step in
 
2:04 PM
I mean, what
@mikeTheLiar one point you do have though is I can't emoji like I can in slack
:+1:
doesn't work
 
I would get into a debate about the merits of various different types and methods of moderation and what lead to The Incident but I don't really feel like it and I think the nuances of my original protest point were lost
👍 bro do you even dark theme
😆 look at this pleb who can't emoji
 
I'm going to have to dig and figure out this incident, for research purposes and totally I'm a shallow butthole.
 
:(
@hilli_micha good luck
It's been erased from the internet
 
@hilli_micha it was over the course of time. It was a direct result of tomfoolery in this room that resulted in....unappreciated moderation. Which led to protests, which lead to hammers being dropped.
 
@mikeTheLiar "unappreciated moderation"
"tomfoolery"
 
2:07 PM
I don't think many of the old core regulars would want to mind every word they utter, just because some baby can't take a little backtalk and NEEDS IMMEDIATE HELP NOW. Then moderators get involved, with mostly an out-of-context view, and ban a certain someone from talking. At that point the core should all move to the alternative chat? Lolno toomucheffort :D
 
@mikeTheLiar are you running for office?
 
I see, so people meme'd too hard, mods intervened to get the room back on track, and then they resented those mods and etc.
 
@Vap0r a moderator deleted the original panini message because it offended him
 
If my assessment is correct
 
@RoelvanUden oh I've had this happen. They accused me of being homophobic
 
2:08 PM
s/hom/hydr/
 
One of my roommate's is gay and he showed me brunches and I'll love him forever for that
You drink in the morning on a sunday, like any other day
but get this... it's classy!
 
But yeah. A historical room meme was deleted and people didn't appreciate that. There was some back and forth and the room got out of hand (myself included or perhaps especially) and the room was frozen.
 
@mikeTheLiar I don't know what a panini is supposed to be other than a sandwich
 
Honestly I'm embarrassed by the whole thing. The point that I was trying to make was lost on everyone who just went HURR DURR PROFANITY MODS PLS
!!tell vap panini
 
2:10 PM
Long story short, most of the regulars just use Slack now. Some regulars still use both, me included. But personally, I'm far less active here now.
 
But what I was trying to say is that no one is willing to enforce the letter of the law but no one is willing to codify the spirit of the law.
 
@mikeTheLiar That sounded smart. That's so unlike you.
 
Even the meta "a guide to moderating chat" is a lie. It's not followed
 
@mikeTheLiar basically what you're saying is that when discretion is practiced then punishment is applied unevenly
 
 
2:12 PM
You know, regardless of a rooms topic matter, when people spend any amount of time in a room, it almost always inevitably directs towards this point of in-jokes and room culture that, on a typical day deviates away from the topic matter at hand.
 
Applicable. Good job Feeds.
 
@Vap0r yes but also that "be nice" != "don't curse"
 
I still don't understand the panini thing though
Was it that swede guy?
 
It's okay. The pannini is okay with it.
 
They can point to the "be nice" policy and the "guide to moderating chat" but they're both fucking bullshit.
 
2:12 PM
> to all stupid put all "Panini" in your asshole
like wut?
 
Half of the shit in there is either a lie or not enforced.
 
oh!
He wants to shove a whole panini in my bumhole!
 
@Vap0r tl;dr dude showed up and demanded help. We continued discussing lunch. He got mad.
 
Yeah that's not near as nutritious
 
But anyway
 
2:14 PM
@mikeTheLiar that's absolutely true. I guess you could play machievellian politics and really exploit there lacks attitude and inequitable application of the rules, but continue
 
The point of my "extremely vulgar but extremely nice" message that got the room frozen was lost on...well, basically everyone who wasn't a regular of this chat room.
At any rate
C# chat is dead, we killed it, you and I.
 
me?
I mean I have the same attitude
But I wasn't around for that
 
!!bing god is dead we killed him you and i
 
@mikeTheLiar bing.com/…
 
2:16 PM
lol gotcha
 
Whatever, I'mma go smoke. Try not to burn the place down while I'm gone.
 
I'm out boys and bot
 
@mikeTheLiar thanks for the explanation. If your slack is pretty good I'd like to check it out sometime. We use slack at my company, can you be in multiple at the same time?
 
Yeah but I like to keep work/other slack separate. I use the desktop app for work and the web client for shitposting.
 
So, I'm getting this error: 'IDataRepository' does not contain a definition for 'UpdateOperator' and no extension method 'UpdateOperator' accepting a first argument of type 'IDataRepository' could be found (are you missing a using directive or an assembly reference?)
But the method is there
 
2:21 PM
That makes sense. I use the web client for work because then I have an excuse for all the inactivity (chrome sleeps inactive tabs)
^ you should try it
@Euridice01 the method might be there but does the interface have a definition for it?
 
ohh no
I should put it in the interface then
the method signature
 
@Euridice01 yeah that sounds right, as long as you control that interface. If it's third party you're probably just supplying the wrong argument
But if you control it in my experience it's normally just an interface definition issue
 
yeah I wanted to add a new method with arguments, so I added the method
but I didn't realize I need to add the signature to the interface as well
I'll give it a try thanks
Thanks, that was it lol
 
sweet @mikeTheLiar can you add a point for me to the scoreboard
?
 
2:39 PM
I see, that system.web.mvc.controller doesn't have Async execution method
is it true?
and how should I call for async calls from Controller?
in C# MVC
 
@mikeTheLiar how do you link it up to my slack? Do I use my work email?
 
That's entirely up to you. I don't know about the desktop app but I'm logged in to both C# chat and work chat on my phone.
 
You can do both on desktop
source: i use desktop
 
Sweet. I sent an email with an address I don't use for slack currently, but I'm pretty sure it'll ask if I want to sign up when you send the invite. If not let me know
Mines "apache"
 
2:56 PM
what's the easiest way to put throw new NotImplementedException() in an async method so it will compile
 
Sent
 
@im1dermike in comments
@mikeTheLiar thanks
 
@Vap0r and we're all trogs. You have to be a trog to join.
 
i'm expecting something like await Task.WaitAll(() => throw new NotImplementedException())
or run or something
just so my code will compile
 
@im1dermike if you prefix all that with // your code should compile
If that's all you need
 
2:58 PM
ha
 
@mikeTheLiar I'm a proto-trog
 
it says my method lacks await
so no i can't just comment the body of the async method out
 
well I sure as hell wouldn't take an insult like that
But unfortunately I'm not used to the concept of async programming in C#
 
Hi,
Is there a way to call an actionmethod immediately a web page loads in an ASP.NET MVC web application?
 
@gbade_ how would you call an action method normally?
 
3:02 PM
@im1dermike try await Task.WaitAll(async () => await Task.FromException(new NotImplementedException()))
 
@Vap0r If you trigger say, a button
I want something similar to window.OnLoad
 
I found it by searching google for "call action method on page load mvc"
So you can say it required some intense sleuthing
 
3:14 PM
Hey guys, what have you done or worked on that made your code skills "over 9000" so to speak?
What was that defining moment that made you level up as a developer?
 
We just wrote 9001 lines of code
each line of code provides 1 exp
and when you have written your 9001th line, you have over 9000 exp
 
lol nice
Might need to refactor that though
 
@Wietlol 1xp huh?
 
why runescape?
runescape sucks
 
cuz runescape is the greatest
 
3:18 PM
(now)
 
better than roblox
 
both suck
 
Runescape is great
 
wehn is ref necessary?
 
when you want to change the ref(erence)
 
3:23 PM
Your references are out of control.
 
@RoelvanUden no
 
@SebastianL You're lucky, Jon Skeet actually answered this question
 
@SebastianL when a parameter of a function is declared as a reference parameter
 
77
Q: When to use ref and when it is not necessary in C#

Rex LoganI have a object that is my in memory state of the program and also have some other worker functions that I pass the object to to modify the state. I have been passing it by ref to the worker functions. However I came across the following function. byte[] received_s = new byte[2048]; IPEndPoint t...

 
@hilli_micha I can write when it is necessary in one line
no need for a full SO question
 
3:25 PM
Copy pasting that link is way easier though, considering it's the first google result for "when is ref necessary"
 
depends on the context
 
@hilli_micha thanks for posting this, clarified it pretty well^^
 
you are only required to use it if the parameter is declared as a reference parameter
otherwise, its never necessary
 
@Wietlol in my case it seems to be necessary, since i use it in a method which can handle LinqQueries parsed from string on runtime generated typeAssemblies
 
when it is meaningful to use it is a different question
@SebastianL nah, not necessary
 
3:28 PM
@Wietlol The amount of confusing statements you're outputting is staggering.
 
@Wietlol if you have select or selctmany the output type changes so i ref the type
 
@RoelvanUden there are 2 kinds of people in this world.
1, those that make clear statements
2, those that make unclear statements
...
and then there is me
@SebastianL then use generics
not refs
 
@Wietlol not possible, since generics can't be change once generated
 
im not really sure what you are after then
which is ussually either me being drunk, or a code smell
 
lets say you have a source IEnumerable<Car> and perform Select(car => car.Color)
 
3:31 PM
ok
 
the method header is : public static IEnumerable<object> PerformLinqOn(IEnumerable<object> source, ref Type type, string query)
how would you use generics when the IEnumerable<Car> changes to IEnumerable<Color>
based on string query
 
public static IEnumerable<Output> PerformLinqOn<Input, Output>(IEnumerable<Input> source, string query)
 
but then you'd have to parse query twice
 
why so?
 
once to get Output
and then to get the LinqQuery
and what about anonymous types?
 
3:34 PM
depends on how you use "ref Type type"
you cannot use it as variable type
because those are compile time constant
 
@Wietlol except if you compile assemblies at runtime
which i do (have to do)
 
compile them at runtime and read them in by the same application?
 
yes
because the user can map datasources to custom types
 
can you give an example of how you use ref Type?
 
if (webApiQuery.Query.Length > 0)
{
    sources = dataModel.GetAll<object>(webApiQuery.Name);

    foreach (IQueryable item in sources)
    {
        var convertedItem = item.ElementType;
        if (convertedItem != type && !ignoreTypeDifference)
        {
            throw new InvalidCastException(type + " expected but " + convertedItem + " found.");
        }
    }

    values = DynamicLinqTool.PerformLinqOn(query.FirstOrDefault() as IEnumerable<object>, ref type, webApiQuery.Query);
}

return Serializer.SerializeObject(values, type)
and in PerformLinqOn(...) type gets adjusted for each expressiontree if necessary
 
3:40 PM
@Vap0r Not exactly what I was looking for
 
but i actually meant, how do you use it in PerformLinqOn()
 
the method is quite complex let me try to shorten it
 
ok
 
(edit: fixed naming)
i thought about using a tuple or something as returntype, but i hate tuples
 
so... the type is the type of the values in the IEnumerable
then why add it as return type?
you can do value.GetType()
either inside the Serialize() method
 
3:51 PM
oh yes, im dumb :D
thx
 
or where you call it by querying the IEnumerable
 
^^
i feel really dumb right now
 
also, I find GetSelectTypeFromObject() rather an overkill
 
why?
 
what it does is it fails if the argument is null, it returns the type of the argument and it fails if that type is not found inside the assemblies
i have never dealt with assemblies, but I assume that the GetTypes().Contains() checks can be removed
 
3:55 PM
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HL92QCF9OPCS": An unhandled excepti
on was thrown by the application.
System.TypeLoadException: Method 'Apply' in type 'Microso
ft.EntityFrameworkCore.Metadata.Conventions.Internal.Rela
tionalColumnAttributeConvention' from assembly 'Microsoft
.EntityFrameworkCore.Relational, Version=1.0.3.0, Culture
=neutral, PublicKeyToken=adb9793829ddae60' does not have
an implementation.
at Microsoft.EntityFrameworkCore.Metadata.Conventions.
Internal.RelationalConventionSetBuilder.AddConventions(Co
i cant set up the sql database in asp.net core
 
hence shortening the method to "if argument is null, it fails and if it is not null, it returns the type"
hence... equals "value.GetType()"
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.EntityFrameworkCore;
using HelloWorld.Models;


namespace HelloWorld
{
    public class Startup
    {
        public Startup(IHostingEnvironment env)
        {
            var builder = new ConfigurationBuilder()
 
@Permian pls dont post code in chat
 
ok
 
@SebastianL again, refs and outs are code smells
it either means your method is wrong, or your return type is wrong
in some cases, it does make sense, but those are very rare
even the TryParse variants of Int32, Boolean, Single, etc are questionable
 

« first day (2575 days earlier)      last day (2388 days later) »