« first day (3628 days earlier)      last day (1320 days later) » 

1:00 PM
so what
if you re 25 now you re 40 in 15 years
its not a lot better
you re fucked ether way
 
just be young lol
 
indeed
 
think young like Bill Clinton
or just write a bunch like me
 
@Hans1984 just imagine you are queen elizabeth... you will be 700 years old
 
yeah shes unique
she probably lead a very healthy life
unlike me
 
1:05 PM
No she isn't
 
do you guys pronounce squirrel as "skwerl" or as "skwirrel"
 
Someone hands me a squirrel
Says it's a king
I look at the squirrel and it's blinking at me
I say "Man, this ain't a king
This is a squirrel."
I threw it on the GROUND
 
"skwi'el"
 
As in "filthy rodent"
 
1:08 PM
skwirrel
 
I say skwerl
but I grew up with rednecks
 
lol
 
@JansthcirlU the latter
 
lots of Brits here eh
 
only a few
we can keep them in check
 
1:10 PM
@Freerey Also you don'tr dont engrish, you talk gibberish
Wherer u From @JansthcirlU?
 
I'm from Belgium
 
we now know that squirrel in training is from Japan
 
Bloddy French..
Heil ze Kaiser of Japan!
 
you know the one country that got steamrolled by virtually every neighbouring country during WW2
 
if all the countries in ww2 were dogs, Germany would be a chihuahua
and America's a pitbull
 
1:12 PM
@JansthcirlU Luxembourg?
 
everyone got steamrolled by us
 
ok maybe not Luxembourg
 
@Freerey 😂
 
if it wasnt for the fucking yankes
 
1:12 PM
Still haven't found my mug lads
 
ZE GERMANS STOLE IT
 
@Squirrelintraining Xamarin forms
 
Also all what US&A did is, steal the kell.
 
ew germans
 
Hirohito wasn't joking around when he said he woke up a sleeping giant
 
1:13 PM
yikes I shouldn't have mentioned WW2
 
Like GB took the beating and US&A Just came from the behind to push ger of its feet.
 
we were trying really hard to stay out of the war okay 😂
 
so anyways how's software development in Japan @Squirrelintraining
 
japan was totally useless
 
1:14 PM
isn't it super outdated over there
 
worth allies ever
 
@Hans1984 ^
 
they owe us
 
aye
 
they were supposed to take over asia
but anyway, enough of that
 
1:15 PM
you can always try again in the 2040s
third time's the reich
 
We already had the 3rd Reich..
 
obviously it has to be 2044
44=hh
 
third time's the fourth reich then
 
hail hans
obviously
 
1:20 PM
@JansthcirlU soft softdev in Japan outdated?
idk about Japan, but I've seen some Korean sites and you can tell they're still using Java way too much
 
Java for life!
you cannot use enough Java!
 
@Wietbot votekick Wietlol
 
sure you can, when your app's look and feel is fugly
 
@Wietbot dont!
 
@Wietlol @CaptainSquirrel Would you do me the honers and kick Wietlol?
 
1:22 PM
I'm trying to remember the look n feel that I thought looked kewl asf, but looked like it camef rom 2000
 
IJ look and feel is quite good... and you dont want to know what that is written in
 
here it is....Nimbus
 
Windows XP had the best UI ever in the entire history of Windows XP
 
*Media Center Edition
 
@Squirrelintraining I guess Wietbot is ded
I moved it from a Windows server to a Linux server
but I also downgraded the server
Wietbot might now be an overkill for a 0.5GB ram server
 
1:26 PM
lerl
 
my own server that hosted Mirre has about that much memory, you srs?
 
I have no clue why it crashed though, have to take a look when I have access to it
 
@Freerey It's written in Java..
 
maybe it crashed because it is not entirely cross platform
I developed and ran it on windows for a year now... and just switched to linux yesterday
I think the cause is either RAM or my silly ssh
if I open a ssh connection... and then call an executable, which takes over my terminal... and then close the connection... it might have stopped the application
I think I have to do nohup java -jar wietbot.jar & instead of java -jar wietbot.jar
Wietbot only needs like 50MB max
the question is how much the OS needs
 
1:35 PM
or how much Java needs
 
Java + Wietbot <= 50MB
 
Wietbot < 50mb
Java = "as much as I can find!! OwO"
 
in new version (perhaps next week) I hope to have a slightly more interesting api to get the information from that machine as well
although, you might be correct
Java has reserved memory
which might choke the OS
 
did you hear about that time Sun made a full-on OS using Java?
 
if Java says "I reserve 100MB" then Wietbot is having 50MB reserved, unused memory
nope, never heard of that
 
1:38 PM
 
> IBM and Sun announced the cooperation for JavaOS for Business at the end of March 1998
> In 1999, Sun and IBM announced the discontinuation of the JavaOS product
lol
 
@CaptainObvious Lee, would you mind shipping me 10kg of SunPAt peanut butter?
 
@Squirrelintraining U already out?!
 
I've been out for atleast 3 months mate.
I inhale that crud.
 
1:50 PM
there's a Purdue surplus store over by the university (like a 2-minute drive from there) that has all sorts of computers, furniture, n stuff the university just gave to it to resell
among one of the common things I see there is a Sun server, which looks badass but I got nowhere to put it (and no use)
 
> like a 2-minute drive from there
This
Is
typicall
amaricano
 
nybot 139kb
 
"About 2 min dive"
"Why walk lol?"
 
uh yeah cause I'd LOVE to carry a couch on a walk
 
@Freerey you studied at Purdue? have you met a professor called Mark French?
 
1:51 PM
2 MINUETS!
 
@JansthcirlU the name sounds familiar, but I never had him; I had Barlow
 
God damnit..
That not even a km..
 
it feels like a km when you're CARRYING A COUCH
 
here's his profile
 
I carreid a couch 2km with a friend of mine cuz we where high and thoguht it was a good idea.
 
1:52 PM
yea I've seen him before, just never talked
 
We also found it
 
ok but like
you had a friend with you
and there wasn't a train track to cross, I bet
 
We actually did, yes
 
and you probably had sidewalks; this place doesn't have any
 
@Freerey Typical murrica.
 
1:53 PM
yeah it's a spot nobody walks to
 
And you wonder why we have a climate problem..
 
I walked there the first time I went
 
@nyconing is that the dll or the runtime usage?
 
@Squirrelintraining yeah because China keeps pumping out way too much factory emissions :)
 
js snippet
 
1:54 PM
ah, js
but still the code, not the runtime
 
+ c# code worker extra 30kb
 
C# chat
talk about java and js
 
Wietbot is also in the tens of KB as .jar
 
@JansthcirlU now you realized
 
it was all a ruse, the tags are all lies!
 
1:55 PM
@JansthcirlU I am sorry, I cant help it that Java is superior :D
 
🔫
 
boo!
I'm going back to Python :'(
 
removed.
 
@JansthcirlU I know someone who had Mark French, but I cannot remember what class
 
probably statics
I only know the guy because he has a pretty cool YouTube channel
 
1:58 PM
@Freerey Yayaya
 
why wield return dont support lambda delegate
 
?
 
!~>
for (var i=0;i<5;++i) yield return i;
<!>The yield statement cannot be used inside an anonymous method or lambda expression
 
because the C# compiler has to do heresy to compile it
and it cannot understand lambdas
 
var in a for loop
ew
 
2:04 PM
for loop
ew
 
loop
ew
just do everything recursively and branchlessly like a true 300 IQ Mensa level developer
 
(1..5).forEach { yield(it) }
or just yieldAll(1..5)
 
!~>
foo:
goto foo;
return 0;
-!!>SandBox: Unable to complete invocation by given 5 seconds
 
I forgot I wrote a scene where a kid drinks broth and it feels awkward asf 🤣
 
2:26 PM
yo yo yo
 
!~>
whoops
 
!=>""
 
!=> "while(True) { System.Console.WriteLine("It's true!") }"
darn semicolons
 
!~>
var str = "test";
while (true)
    str = str + str;
 
-!!>Exception of type 'System.OutOfMemoryException' was thrown.
 
2:37 PM
!~> "ok"
 
!=>"ok"
 
୧༼ °Í _▀̿ ༽? harrrr harrrr keedz
 
!~> "I threw it on the GROUND!!"
 
!=>"I threw it on the GROUND!!"
 
2:41 PM
!~>
int current = 1, next = 1;

while (true)
{
yield return current;
next = current + (current = next);
}
 
<!>The yield statement cannot be used inside an anonymous method or lambda expression
 
you cant use yield because C# succ
 
code worker run codes as anonymous lambda delegate, so code worker cant run yield return
unless...
 
!~>
IEnumerable<String> Foo() {
    yield return "foo";
    yield return "bar";
    yield return "baz";
}
return String.Join(", ", Foo());
 
!=>"{void}"
!~>{
    static int M(){
        int current = 1, next = 1;

        while (true)
        {
            yield return current;
            next = current + (current = next);
        }
    }
}
<!>Program has more than one entry point defined. Compile with /main to specify the type that contains the entry point.
<!>) expected
<!>The body of 'CodeOfClass.M()' cannot be an iterator block because 'int' is not an iterator interface type
!=>"{void}"
!=>"foo, bar, baz"
 
2:48 PM
!~>
int current = 1, next = 1;

while (next < 1000)
{
System.Console.WriteLine(current);
next = current + (current = next);
}
 
dang it ny, output the std::out
 
!=>"{void}"
 
also...
 
gersh derngit
 
dang it Wietbot, stop crashing
 
2:49 PM
am I correct in my assumption that you're Dutch @Wietlol
 
maybe next time, I may write a fake console.write
and output when delegate was void
 
@JansthcirlU you are correct, but your reasons are wrong
 
idk man the name really gives it away
 
the name is short for Karakirewiet
 
lol
 
2:51 PM
@nyconing you can take a look at the source code of Wietbot's CSharp eval
 
look up Karakirewiet, all you get are links to this chatroom's history
 
:D
it is the only place that Google can index
@nyconing
how do you do the evals?
put them in a .cs file and let dotnet build do its thing?
 
Core
code worker run framework
 
I think those are words... no clue what they mean though :D
 
lol String.IsNullOrWhiteSpace
 
3:08 PM
Hey my dudes and dudettes, I have a problem getting my methods to show in a new WebService I have created in a webforms application. It's bizarre, I don't know what I'm doing wrong here. I have an ASMX file and the public static method is decorated with [WebMethod] and [ScriptMethod] but when I visit the service page I get "The following operations are supported." followed by nothing.
I'm running VS 2017 locally.
 
> webforms application
Bruh
 
Stop, don't make fun of me.
 
That is what you're doing wrong there
 
lol. Not my choice.
 
3:10 PM
I get an oportunity to work with MVC, VB, C#, BI, and all sort of other tech here so... I'm pretty content with the occasional webforms!
But anyway... what the heck could be wrong?
If you thought you felt sorry for me working in webforms... yes, that said "VB."
: )
Good to see you're still here S.K. I haven't been here much in the last year or two.
 
Happens. I wasn't here for some time when I started my new job. Hector hasn't really been in either. Neither has Avner, although he's been around more frequently lately.
We'll see what happens when @mr5 finally actually gets fired :P
 
Yeah, I've been doing Business Intelligence stuff (that's a fancy way of saying making charts and graphs) and so half my time isn't coding these days.
 
@nyconing if you output " ", the response in chat will still be empty
 
3:52 PM
3 hours later...
!~shiba
 
Jay
4:16 PM
what's a good way to parse a filename.json file from the web with c#?
 
@Squirrelintraining What the fuck
 
 
2 hours later…
5:56 PM
does anyone here ever use inheritance with c# classes?
 
pretty much never
 
very rarely
sometimes it's the right solution to a problem, and sometimes that's the API someone else's code presents
but that's about it
 
yeah cause I'm learning why people don't use it lol
 
they use it because their SRP succ
 
Love a bit of judicious inheritance me. I have used some today in fact
 
5:59 PM
Why what's wrong with it
 
there are some times where I just need to instantiate the child object, but I also need to bring in some elements from the parent object -- which just causes an unnecessary pull on the database as we keep refilling the same object with the same data, the only difference being that the child is now different
y'know what? screw it...lemme just do proper inheritance on this one because somebody had to do it
 
sounds like you are doing inheritance for the sake of property reuse
 
ye
 
I think you should try to do without inheritance
 
so do I
and that's how I normally do it, but I just wanted to try inheritance
 
6:09 PM
Oh yeah I looked at that ages ago
Gave up on it because it just goes completely to shit
 
task: split a plank in 2
tools: hammer, saw
"I normally use a saw, but I just wanted to try a hammer"
 
HEY THAT COULD STILL BE DONE F;ASDOFUI
 
you will probably hurt yourself in the process and be left with a very bad perception of how good a hammer is
 
hows everyone doing today
 
it doesnt do the hammer justice... nor you
 
6:13 PM
meep
 
avoid structural inheritance, only behavioral inheritance is fine
 
I'm looking for a discussion on design complex api permissions, anyone here interested?
 
you can just ask the question itself
 
designing complex api permissions*
it's not so much a question, more so a conversation
i'm curious how others handle extra complex permissions for their apis
 
würst käse scenario, no one answers, but at least you wrote it down, you can copy it and paste it somewhere else ;)
 
6:14 PM
and i don't mean technically, like not "claims" etc
ok let me give an example
 
Go nuts, we'll see if there's anythiung we agree/disagree
 
I do use something quite complex for Wietbot's authorization
perhaps an overkill, but I wanted to try :D
 
I disagree
 
I built an API that handles scheduling for many different offices at my company (6000 employees accross 150 offices)
 
@CupOfJava you first have to let him talk, then disagree
dont put them in the wrong order, dang it!
 
6:16 PM
I disagree
 
facepalm
 
I've rolled a bunch of different permissions systems in the past
 
my system is project based, and I constantly have to check permissions, which generally are tested against office, project, role, and a role on a project
 
sounds good
 
i want to change my system to something more configurable, I.E. there are to many "if" statements in my code that aren't visibile to others
 
6:17 PM
Ahah, now this is where I'm interested
 
why are there many if statements?
 
@Wietlol here is an example of my old system for an if statement
 
All permission systems: If bunch of predicates == true then granted else denied
 
CreateProject(projectDto){
if the user trying to create has the appropriate role AND is in the projectDto.Office
}
 
@hollystyles pretty much, but those are hidden... and generic, the api remains Boolean IsAuthorized(User user, Operation operation)
 
6:19 PM
yes wiet, im using IsAuthorized with .net core policies
but when i need to change a permission, ihave to change code, which feels extremely wrong
so im editing my policies
and my system is growing so rapidly, that it's hard to keep consistent
 
I half copied AWS' authorization system
in AWS IAM, the concept is like this
 
i'm listening
 
a user can assume a role
a role can have many policies
each policy can have many granted authorities
a granted authority is based on 2 values, the action and the resource
for example
 
There is a pretty simple way of soing things
 
thats essentially what im doing, but i don
't want to manage the policies mangually
manually
 
6:22 PM
action: "createProject", resource: "officeX:*"
 
Is this which uesrs have permissions?
 
in your code, you validate if the user is authorized to perform <action> on <resource>
 
right, and i'm sucessfully doing that part. the technical aspect is handled
writing a configuration system to automate that is what im after
 
the validation is handled by the authorization service, which does all the checking if there is any granted authority in any of the policies of the assumed role
configuration system to automate... what?
 
SO how are you currently specifying if userX has access to actionY?
 
6:24 PM
currently i'm writing code manually per policy...for example
When the project is attempted to be created, i first check to see if they have the approriate role, and then i check to see if they are a member of that project.Office
but everytime i make a change to my permissions, i have to go into the code, and modify the policy
or when someone asks me what they can or can't do, i have to keep a spread sheet of what i configured
 
you have the policy inside the code?
 
You're not really explaining very well. Have you got any actual code you can show us?
 
it's very hard to explain, but yeah heres a piece of code:
 
@TomCrosman That sounds like you're hardcoding user permissions
 
yes im hardcoding
 
6:27 PM
Oh god why
 
based on roles
thats why im looking for ideas as to how to mark up my classes to make the permissions configurable
public async Task<IActionResult> Post([FromBody] DepartmentDto departmentDto)
{
if (!ModelState.IsValid)
{
return BadRequest(ModelState);
}
Department department = _AutoMapper.Map<Department>(departmentDto);
var requirement = new CreateDepartmentPolicyRequirement();
var resource = department;
var authorizationResult = await _authorizationService.AuthorizeAsync(User, resource, requirement);
if (authorizationResult.Succeeded)
{
Department Department= _DepartmentManager.CreateDepartment(department);
 
I can recommend putting the policies inside a database
 
thats what i'm attempting to do
 
What you need to do is have a data storage (probably a database table would be best) which contains relationships between users (which would be in another table) and the actual permissions (which would be another table)
 
right, and that's what ive been working towards, i have a graphic that illustrates it, but it hasnt been easy to implement
 
6:29 PM
Then (assuming asp.net core) create an AuthorisationFilter which you can throw around methods or even an entire controller
 
You already have the database in your spreadsheet, just implement as tables in a DB
 
So then if you want to go "I want all users who access methods on this controller" you could do something like this:
 
so if you look at that image
I'm generating every possible permission ahead of time
 
[TomsAuth("PermissionNodeName")]
Public Class AbcdController : Controller
{
methods

}
 
and then seeing which users can subscribe to those
 
6:31 PM
That might be a bit of a mix of VB and C# but the message should be reasonably clear
 
that's what im doing, i just wanted to make sure im not reinventing the wheel
because im having to use all sorts of custom attributes to mark up my classes
to know which properties to test against and so on
and it feels way to custom
but sounds like i'm going the same direction ya'll would have?
 
It depends on what scope your restrictions need to cover, but it might be that you need attrbiutes. But maybe just 1 would suffice
 
right
 
I dont have a framework to work with, and I often have my own ideas on how to do things
I dont reinvent the wheel though
I just manufacture a new one based on the original invention of someone else
 
Like all it does it just check that the user is authorised with a valid token
Then any controllers that I want to be "secured" with that filter I just do what I did in the second file
The actual attribute being written with this code
I wrote the code once a few months back, haven't had to touch it since. Anything I tag with [ValidateClient] automagically fails if the user isn't authroised
I intend to add role levels at some point but as this service is primarily consumed for one purpose there isn't any need for any "higher level" of access.
But your code shouldn't care about policies, it should only care about the specific permissions that the policy delegates, because over time you're going to change the policies and the permissions that are part of them
 
6:44 PM
I keep finding libraries that are not in source control... what is wrong with me?!
 

« first day (3628 days earlier)      last day (1320 days later) »