« first day (3140 days earlier)      last day (2033 days later) » 

02:25
// Could someone please tell me why this doesn't work?
public class LivingObject : MonoBehaviour, IDamageTaker, IImpactDamage, IImpactSound {
	public IRigibodyHelperHandler rigidbodyHelper;
	// InvalidCastException: Specified cast is not valid.
	rigidbodyHelper.SetHandler((IRigibodyHelperHandler)this);
}

public class RigidbodyHelper : MonoBehaviour
{
    private RigibodyHelperHandler handler;

    public void SetHandler(IRigibodyHelperHandler handler)
    {
        this.handler = handler;
    }
Fe de Errata: in the line 3 IRigibodyHelperHandler -> RigidbodyHelper. I've written that wrong in the chat, and in line 10 RigibodyHelperHandler -> IRigibodyHelperHandler.
Just found the problem: 2nd line IDamageTaker, IImpactDamage, IImpactSound -> IRigibodyHelperHandler.
02:43
Did you try to kick it?
I don't know what it means that (translation barrier)
02:59
Just a joke
:)
03:20
@EnderLook Syntax on your class LivingObject near rigidbodyHelper.SetHandler isnt valid.
public class LivingObject : MonoBehaviour, IRigibodyHelperHandler
rigidbodyHelper.SetHandler(this);
Thanks
 
1 hour later…
05:50
GoOoOoOoOoOoOoOoOoOoOoOd Mornin' neglecterinos!
@HéctorÁlvarez Why you at work so early hecti?
I'm not particularly early today
I arrived at 7.30
I leave at 15.30
I arrived at 8.30
I leave at 18.00
:(
I arrived at 7,05
There was an update in production of my doing
and we have a "if you dealt it, you smelt it" policy so I have to be the one to enter earlier to verify everything works
06:08
But do you get to leave early?
@HéctorÁlvarez Lets just say if I left at the normal time, nobody would stop me
But I don't think anyone would say anything if I left early either
I am a strong believer in putting the time and effort necessary to get things done, but I also feel that if the contract says 8 hours, 8 hours is what you get
@Arphile hw come?
I don't have a problem working more, but you don't get to ask me to work for free :P
@Neil For me that statement stands as long as it doesn't start trending.
@Arphile 9.5h oô
06:18
I don't care about doing a little more when necessary, but if it's always necessary I won't
yeah. but lunch time is in there.
1.5h
@HéctorÁlvarez I agree with that. I'll also stay longer without being asked if necessary to finish a task, so long as it is occasional
and I won't declare it as more than 8 hours
There's usually not an urgency anyway
ohayou
06:26
@Arphile say what?!
1.5 hours to eat, and I usually have spare time after eating in 20 minutes.
that's a long lunch break
by law we're required to have a one-hour lunch break.. I get that it is by law, so that people can't be forced to return to work after 15 minutes
but I also enjoy leaving early, so it kinda sucks
we have a 30 minute break
but it counts towards the 8 working hours
@Proxy well that's nice
what they should have done here is let each business define its own lunch break time, and if it is less than an hour, it counts as part of the 8 hour work hours
and it can't be less than 30 or something
At my last job it was like that,between 0.5 and 1.5 hours, but it didn't count as part of the work time
Not the current job though, here we get 1h coffee time as part of working hours. Officers only work 7 hours, -1 coffee hour
but get paid as 8-hour shifts
06:38
We have only 30 mins break for lunch
morning
Morning to all
@Neil If I could vote for you with that plan, I'd vote for you!
yay! I'm practically president already!
06:57
i am an idiot
since yesterday i have problem placing a button in my app
took me one day to figure out that i wrote tyle insted of style
zzzzzzzz
@Proxy I had a query containing whitespace characters which weren't spaces, and the db went apeshit over it
took me a while to realize why
ye
always the same things
also replacing the ; with the spanish equivalent ; is probably one of the most evil things you can do to a programmer
that or #define true (rand() > 0.001)
hmm
07:15
Morning.
that it is, sir
Yes. I am glad we have taken this opportunity to recalibrate our mutual chronological contexts.
Hello. How are you.
Eyeing the approaching weekend with undisguised glee.
good morning
07:32
I'm looking forward to the weekend, but not so much tomorrow
I've got to drive 94 kilometers to work and back tomorrow
I found da wae
private static Boolean IsNull(Object obj) =>
	obj
		.GetType()
		.GetProperties()
		.All(info => Equals(info.GetValue(obj), GetDefault(info.PropertyType)));

private static object GetDefault(Type type) =>
	type.GetTypeInfo().IsValueType
		? Activator.CreateInstance(type)
		: null;
Wae to go!
now find out a good name for dis function IsNull
GetDefault this not null this default
07:34
because it doesnt do == null
IsNullOrDefault
IsDefault could work
nulls should throw an NRE
also not info but it
:P
throw too when parametered type
@Squirrelintraining you called?
07:36
can you not use purely boxed types?
@Squirrelintraining that, I could do
@Default WoW, i must be god :D
@Neil purely boxed?
@Neil you drive that every day? or is it for some meeting?
07:38
@Wietlol yeah.. only boxed..
I am using only boxed values
@Default In theory I work at a local office unless they'd otherwise need me there, but they rarely ask me to be there and I feel like I have to pass by every now and again
07:48
working remotely?
> I work at a local office
your home could be an office, and it sure is local
it could be. But that's not what people normally mean when they say they work at a local office
Otherwise, I could say I go to my local office at the end of the day and eat dinner with my wife
You must be a hard worker!
I eat dinner with my colleagues
07:52
wouldn't that be called a "home office" btw?
and I wont be going home
am I working too hard?
working from home seems quite common in sweden, but I think we usually refer to that as "working from home" never "the local office"
nobody calls it the local office
that's just Wietlol being Wietlol
mr5
mr5
@Wietlol you could add additional check if it's value type then just to default instead of creating an instance
but then I need the default of Type
at runtime, not a static type
is it stupid to use a Stream twice?
mr5
mr5
08:07
in new C# you could just type default and that's it
@mr5 Only if the type is known at compile-time.
the whole purpose of GetDefaultValue(Type type) was to get the runtime variant of it
someone came up with an alternative approach, which is to make a decorator for the serializer, which can detect empty requests and simply return nulls (default) on deserialization
public T Deserialize<T>(Stream requestStream)
{
	String requestString = new StreamReader(requestStream).ReadToEnd();

	if (requestString == "{}")
		return default;

	return Serializer.Deserialize<T>(new MemoryStream(Encoding.UTF8.GetBytes(requestString)));
}
but the Serializer property of type ILambdaSerializer only has a Deserialize<T>(Stream requestStream)
so decoration is... weird
also... by default, you would use [LambdaSerializer(typeof(JsonSerializer))] attribute to get a JsonSerializer for your handler methods
but I assume there isnt a way how to nest calls like these
[LambdaSerializer(typeof(WarmupAwareSerializer(typeof(JsonSerializer))))]
something like that
mr5
mr5
@Wietlol ewwww
ikr
i am afraid to do return Serializer.Deserialize<T>(requestStream)
since it would use the stream twice
mr5
mr5
I'd prefer the JsonStreamReader
08:19
i cant do return Serializer.Deserialize<T>(requestString)
since that method doesnt exist
JsonStreamReader? for what?
to see if the body is empty?
mr5
mr5
so I wouldn't be dealing with strings
just streams
and it's quite faster compared to the string version
and how would the check look like?
mr5
mr5
but it would be hard to debug though
You check on the calling end
actually... there is a much faster way
I only need to read the first 2 characters
no need to consume the entire stream when the head is {"
mr5
mr5
you're putting too much weight on the deserialization. You told me before to lessen the responsibility of each module.
08:22
i might
mr5
mr5
@Wietlol I consider that a hack
I consider it a meaningful consideration
also... a buffered stream using a peek would solve my double stream issue
welcome
ohai
in c++ Chat room
08:25
no u
mr5
mr5
o:
This checks if a full name can have only alphabets and spaces:
^[a-zA-Z]+(?:[\s.]+[a-zA-Z]+)*$
how do i add a character limit to it say (0,20)?
^(?:[a-zA-Z]+(?:[\s.]+[a-zA-Z]+)*){0,20}$
maybe.. I don't know if that would work
mr5
mr5
!!> /^(?:[a-zA-Z]+(?:[\s.]+[a-zA-Z]+)*){0,20}$/.test('ABCDEFGHIJKLMNPQRSTUV')
08:36
@mr5 false
@mr5 true
@mr5 false
try lookahead
@mr5 true
lookahead isn't going to do anything if you don't know how many there are in the matched string
mr5
mr5
!!> 'ABCDEFGHIJKLMNPQRSTUV'.length
08:38
^(?=.{0,20})()$
mr5
mr5
it didn't pass the length though
!!tell wietlol sandbox
@wietlol Please go and play in the Sandbox
well pff, if that's the entire regex, then it isn't doing its job
mr5
mr5
I forgot the letter 'O' though
08:38
@Neil that is the template
if you want to do a length check in regex, use a lookahead
it works for "." but it won't work for what he's checking
^(?=.{0,20})(some-regex-you-want-to-see-length-checked)$
you wouldn't use regex to check length anyway
true
at least not purely length
08:40
is it too expensive?
it is too obscured
@Inconnu regex would count upwards
mr5
mr5
I personally do it just by using string functions only
It's clearer that way
that doesn't make a lot of sense considering you can just grab the length of the string in O(1) time
there is the common idiocity about input fields where people believe a regex is a fine and complete tool for validating the content
08:42
maybe regex could be extended to be more complete in that regard
i think that is where the regex world started a bit
as it is now, regex alone isn't enough
@Neil you mean, up to the point that regex is a full replacement of say... JavaScript?
sure
lets replace all JavaScript with regex!
on a completely related side note... how do I run unit tests?
@Wietlol ok, give me a regex which matches a full name containing only alpha and space characters of length 0 to 20
I created a new unit test project and wrote 2 unit tests, but the option "run unit tests" remains disabled
08:43
oh you were being ironic
actually, your request isnt that difficult
it doesn't need to be turing complete (even if it may be anyway)
^(?=.{0,20}$)([a-zA-Z ]+)$
ofcourse, it could be simplified
^[a-zA-Z ]{0,20}$
or you mean any number of names, of only alpha characters of max length 20, separated by spaces?
on a side note, reloading the project enabled the unit test option
18 mins ago, by Inconnu
This checks if a full name can have only alphabets and spaces:
^[a-zA-Z]+(?:[\s.]+[a-zA-Z]+)*$
how do i add a character limit to it say (0,20)?
That's just a string of anything from 0 to 20 followed by alpha of any length
yes?
08:48
yes thats all and it works :3
that's not what you asked though
i think it is
01234567890123456789Basil would match his regular expression
except for dots
the original would also match dots
ahh, i guess i had made a mistake..i cant match dots
08:49
@Neil you sure?
!!> /^(?=.{0,20}$)([a-zA-Z ]+)$/.test('01234567890123456789Basil')
@Neil false
@Inconnu regexr.com will be a gret help for you in future :D
then what the hell are you matching?
@Neil keep in mind, a lookahead only does a check on the following characters without changing the cursor
08:51
oh it's a lookahead and not a lookbehind
^(?=.{0,20}$)([a-zA-Z ]+)$ and ^[a-zA-Z ]{0,20}$ are equal
fine
!!> /^(?=.{0,20}$)([a-zA-Z ]+)$/.test('Basil01234567890123456789')
(in which case, the latter should be used for simplicity)
@Neil false
also keep in mind, the $ asserts the end of the input
you cant have trailing characters
runs unit tests
08:53
Haha, I need to learn regex well. Noted guys, thanks everyone btw!
> All tests completed successfully
what did I do wrong?
09:04
empty unit tests?
it appears that... I wrote tests that actually work
Or you messed up both the code and the unit test
I assumed I messed up the code
actually, not even necessary that you messed up the code or not
public T Deserialize<T>(Stream requestStream)
{
	if (IsWarmupCall(requestStream))
		return default;

	return Serializer.Deserialize<T>(requestStream);
}

private static Boolean IsWarmupCall(Stream stream)
{
	var reader = new StreamReader(stream);

	if (reader.Read() == '{')
		if (reader.Read() == '}')
			return true;

	stream.Position = 0;
	return false;
}
considering that is my code
(just realized I could do if (reader.Read() == '{' && reader.Read() == '}'))
I assumed the int == char would fail somehow
or that stream.Position = 0 wouldnt work
09:12
stream.Position = 0 doesn't work in every case
I bet NetworkStream doesn't work for Position = 0
I thought it would only work on buffered streams or something
I knew I shouldnt trust .net with liskovv
is there an easy way to reproduce a network stream?
!!wietlol2
Sep 13 '17 at 15:07, by Wietlol
i will most probably write my own
definitely
btw I wrote my own :D
I'll search it for you
09:14
in simple terms, it could be anything that returns a valid json that is not equal to {}
so I could just pick anything
but I hoped for a local mock
my implementation is concentrated about the async nature of the NetworkStream
null is equal to {}
i think not :p
it is.
!!> "null" == "{}"
see, even cap is like "wtf, are you an idiot for asking me that?"
09:17
!!kieran2
@Squirrelintraining That didn't make much sense. Maybe you meant: kieran2
@Wietlol You meant the value {} sometime will give struct?
See solution at app.quicktype.io
Put your json into it, or simply:
[
    {"Meow":{},"Id":"591a4e70-74aa-4575-a14e-a37199931052"},
    {"Meow":100,"Id":"591a4e70-74aa-4575-a14e-a37199931052"}
]
@ntohl but that is not a Stream, right?
I have updated with 3 files
09:23
im still confused
and it's FakeNetworkStream.
> : INetworkStream
oh. I missed that out 1 moment
and I assume INetworkStream does not extend System.IO.Stream
MyNetworkStream is the wrapper around NetworkStream
09:25
cap is alot smarter than us
dont argue with her
I have uploaded the INetworkStream too
but where is System.IO.Stream ?
it's completely wrapped
but I need that as supertype
@Squirrelintraining That's 'CaptainSquirrel2' for you
09:28
@Squirrelkiller what no, never!
I've got him on steam you know
i guess ill just do a http call
all These squirrels are driving me NUTS
squirrels,nuts get it ??
nvm
Haaaaaaans
Haaaaaaaaaaaaaans
Die wuuuuurst wiiird kaaaaalt
lol
I dont mind
let it get cold
09:31
@Squirrelkiller a
Mar 12 '18 at 17:38, by Rudi Visser
Mmmmm, nutz
@Wietlol an
h is a strange character in english
Every letter is a strange character
a, if you spell it
5
A: An 'h' or a 'h' when just saying the letter?

Colin FineIn some regions of England, the letter is called "haitch". In those dialects, the phrase will naturally be "a haitch". Everywhere else, the letter is called "aitch". In those cases, the phrase will be "an aitch". It doesn't matter in the slightest how it is spelt, or whether it might have a f...

09:36
@Squirrelintraining grzegorz brzęczyszczykiewicz
.........brzęczyszczykiewicz
grzegorz!
> In some regions of England, the letter is called "haitch". In those dialects, the phrase will naturally be "a haitch".

Everywhere else, the letter is called "aitch". In those cases, the phrase will be "an aitch".
I prefer haitch over aitch
In Spanish it's called 'Hache' and only the first H is silent
This is such a lovely place.
The most experienced dev in the room took 2.5 hours to find out where was the data requested to fill in a report.
I fondly remember my mother at a mexican restaurant, and deciding that she wanted quesadillas, only that she pronounced it "quell - ah - dill - ahs"
she clearly had heard the word quesadillas before, just never seen it written apparently
@ntohl calling a rest service, loading the json from its response also works
09:52
I have edited FakeNetworkStream, so it's a stream now
it needs some tweaking, but the main methods are implemented, which were interesting for me the most
ReadAsync, GetReadBytes, Write, Close
I will just assume my code works :)
!!meow
Wait...have any of you actually ever heard 'haitch'? I have never.
09:59
@Squirrelkiller yes
lolol
it was a chilly day watching the bird outside
but then this stupid dog appeared
I've watched about 30 loops of it and I can't stop watching
xD
I like how the dog runs, like it knew it would piss them off
10:11
Is anyone here familiar with a pattern about using database fields as variable names?
I don't know if there's an actual name for such savagery
direct mapping
copy'n'pasta
or ssot
haha its like: Now let me scare the shit out of them
dont copy, but generate the database based on your models
with a mean giggl @Neil
@Wietlol What? No no, I'm not talking about creating a database. I mean if you have Foo = new Foo(); and decide that it would be better if you create a database with object names, then assign Foo like this: array(1,0) = 'Foo' 'This is the Foo variable
10:15
0.o?
@HéctorÁlvarez it's called meta programming?
@HéctorÁlvarez I don't understand that example
It's common here to post a message on Teams or send an email saying "WFH" on days you're Working From Home. But I'm still not used to the acronym, and my mind reads it as "What Fe Hell?!"
10:30
var foo = new Foo();

// Smartass says: Oh wow programming, ew. I prefer databases and triggers.

// New strategy by smartass:
// CREATE TABLE Variables (CODE VARCHAR(MAX), NAME VARCHAR(MAX));
// INSERT INTO Variables VALUES ('Foo','QWERASDF');
var array = new []{};

array[0,0] = 'QWERASDF';
array[0,1] = 'The actual value';

// How do I retrieve my data?
GetArrayDataForValue(array[0]);
That's a very simplified explanation, because there are like 15 nested functions with about 50 variables passed by reference.
@AvnerShahar-Kashtan Happens to me with FTW => Fuck The What, and SMH => Suck My... Whatever the H is.
im sorry, what was the question again?
Whether there's a pattern that talks about doing this, because they call it "Dynamic code" since you can program your stuff using the DB but I can't find the logic behind doing it in the first place.
Apparently the core idea here is separating the code from the business logic, so if you program it correctly but mess up the variable order you can rearrange it by pointing at different fields on the DB without compiling anything in the process.
@HéctorÁlvarez Exactly.
Well, except for "SMH", which somehow gets expanded to "somehow".
FTW translates to For The Win, in my mind
WTF translates to What The Fuck, in my mind
WFT translates to Wet Financieel Toezicht, in my mind
@Wietlol true that
10:40
the weirdest acronym for me are iig and idd
because I never really knew where they came from
and they are used quite often
IIG?
I've heard IDD = indeed, it sounds like it though.
Anyway I guess nobody has heard about such practice
idd = insurance distribution directive
BTW a personal preference question, what do you think about using A: and B: to label storage drives?
idd = inderdaad (which is dutch for indeed)
iig = in ieder geval (which is dutch for in any case)
iig = interesting idea, gertrude
10:45
igg is game stuff
btw=be the wolf
isn't that IGN?
Oh well nvm might be.
iig, we used to do exams for Wet Financieel Toezicht (WFT) and it did occur several times that we said "I have my WTF exam tomorrow"
or "I have my FTW exam tomorrow"
ikr= i killed ravens
According to Googloz it's a Maltese bank, IIG
10:49
iirc = I Indicentally Rant C#
That should be IIRCS
@Hans1984 Well aslong as you've stopped doing it, I'm fine with that.
Ugh. I'm hitting walls of bad abstraction in our client code. Can't write proper tests. Annoying.

« first day (3140 days earlier)      last day (2033 days later) »