« first day (3587 days earlier)      last day (1353 days later) » 

12:20 PM
@Hans1984 Get a towel, make it wet, swing it around for a moment.
Cools down the air
 
yeah tried that before
unfortunatly only helps a little bit
 
"We couldn't even test him! He just coughed once and then suicided with 3 shots to the back of the head!"
@Hans1984 Next level: Put the towel on your back after swinging it. That will cool you down.
 
:o
might try that
what also helps is to let cold water run down your arms
for like a minute
and then leave it there
cools you down for a while
 
and now the intern didn't check in his work yesterday which means I basically need to undo ALL THE WORK HE DID YESTERDAY!!!!!!!!!!!!
 
12:33 PM
wtf is with the French racism?
 
mr5
Has YouTube purposely making old vids in low quality?
a decade ago, all vids I watched are like 480p, now old vids are almost all pixelated (240p)
 
I think that's just nostalgic resolutionary syndrome
 
I remember PS1 giving amazing graphics.
Like, WOW, HOLY SHIT amazing.
Looking back it's just a few blocks moving about...
 
man even back in the day I thought it was disappointing how the box art on spyro the dragon looked more detailed than the actual game
 
I remember gameboy classic having amazing graphics
but nowadays..
:/
 
12:40 PM
@Freerey The truth?
 
and pixel art has not aged a bit
also, cartoons age very slowly
 
@Wietlol Oh you joker.
 
goes for games too
usually games graphics age very fast
but there are some games that go for this drawn/cartoonish look
you can play them years later and they dont look outdated
for example Dishonored1
or the walking dead game
Borderlands
 
They looking fucking awful now, tho
 
not sure I would call Dishonored a cartoon though
 
12:49 PM
they dont look awful at all
 
meanwhile, Skyrim has more graphic mods than there are games for the playstation and xbox combined... probably not true, but still Skyrim has a lot of graphic mods
 
Too bad that graphic mods don't fix the awful animations and controls :D
 
it also utilizes your hardware... it spawns real smoke from your PC
there are also animation mods
control mods, not so much
I remember not being able to find a mod to overhaul mounted controls
not being able to look around while riding in a straight line is really annoying imho
there are mods that fix ui control thingies
 
@Hans1984 cough Jet Set Radio
 
I just always want game controller-style animations, controls & camera, third person with a slightly delayed camera following your toon.
 
12:54 PM
Dishonored 1 was cell-shaded? I remember it having some kind of style,b ut I also remember it didn't look great
 
@Freerey neve rhear dof it
but yeah judging by the google images it sure looks cartoonish
 
it's an awesome Sega game that needs to come back already
or at least its sequel needs an HD rerelease cause it's been 8 years since the first one got that treatment
 
eeehhhh?
looks like something my dad played
 
it is factorio, it is amazing... it is a time sink
release upcoming fredas
 
12:57 PM
I, too, like my graphics.
 
@Freerey lol
 
1:21 PM
Hey I still remember Silent Bomber on the PS1. Good graphics for back then. Not so great now of course. But you could see the bomb thingies on his arms.
 
ever played nuclear strike ?
that was a fun game back then
i think like '97
it got hard af over time
 
The one with the helicopter?
I remember a game where I flew around with a helicopter bombing everything
At least as long as I had missles
 
@Squirrelkiller yes
 
I remember when I started college in 2015, we started playing Skyrim one day and was like "omg the graphics are awful!"
and Skyrim probably still has the most pleasant-looking character models of any bgs game
 
1:41 PM
Still think satisfactory is better than factorio
 
I just realized the people who made Satisfactory are the same ones who did Goat Simulator
 
I like factorio more because of blueprints
and construction bots obviously
those go hand in hand
 
mr5
what ya think?
typing code these days are just few keystrokes.
 
1:56 PM
dang it mr5, stop using var :p
 
mr5
took me like 10 keystrokes to generate that code.
 
USING VAR IS CORRECT
 
mr5
why?
 
val
 
vAR VAR VAR VAR
 
1:57 PM
vAL VAL VAL VAL
 
mr5
why is AS not warned me
 
anyone ever make a static Webmethod() that sometimes just doesn't work for no reason?
 
But Kotlin was such a great language that didn't include anything useless, so why is var there @Wietlol?
 
@Hozuki he is using private var without actually overwriting it
that is like making a private setter function for a field but never actually using the setter function
 
mr5
I blame AS
 
1:59 PM
I have to agree though, get those vars outta there
 
adult swim?
 
why not
 
I blame them, too; flcl seasons 2 and 3 would've been better if they weren't just money-hungry
 
mr5
why do I have to use Unit as a return type instead of Void? @Wientol
 
because void doesnt exist any more
a unit is more useful
Unit is a singleton, so performance wise, always returning a unit cant really harm
the advantage is that the functions are now all the same
there is no difference between a function that simply returns nothing (and hence a unit) and a function that returns another object
that way, generics become easier and you work with a more covering api
 
mr5
2:03 PM
so Unit is the base class of all types?
 
nope, that is Any
not to be confused with Any? which is used as base type for generics
so, <T : Any> still has quite a bit of meaning, which is that T is not nullable
Unit is a subtype of Any
Nothing is a subtype of every type
those are the 3 special types iirc
anyway...
> (size: Size) -> Unit
I rarely use named function parameters in the type declaration
if you like it, keep it, but you dont have to
I generally write constructors like this:
private class LayoutObserver(
	private val view: View,
	private val callback: (size: Size) -> Unit
) : ViewTreeObserver.OnGlobalLayoutListener
{
	init
 
mr5
oh right
I didn't even use its name
 
keeps it easy on the eyes
 
mr5
why do I even bother writing private on it if it's already a val?
 
private makes it invisible
:D
but yes, I usually find myself not making properties private except if I really want them to be private
the api, as described by the interface, is usable by using the interface
 
mr5
2:09 PM
oh I thought a val is implicitly private already
 
the api, as described by the class, might be useful to be more exposed
 
mr5
so there's still uselessness in the language.
 
val is readonly
uselessness?
 
mr5
and why would you want to make a property private?
 
I want a private property because it is an implementation detail
 
mr5
2:10 PM
making fields visible outside
in C#, ...I don't even use it.
 
use what?
public properties?
 
mr5
private prop
 
one place where I use a private property is in my client library classes
they have a few public properties, which serialization schema they use, which endpoint prefix they use, which AWS Lambda client they use
but they also have one private property
that is the json mapper
it is used to map the serialized byte array to a json string (because that is what AWS demands)
it is an implementation detail
one you should not be able to alter
hence why I make it private and do not allow it to be set via the constructor
anyway, the observer looks fine
I would want to ask why you are not just handing the view to the callback though
looks to me like dependency inversion
designing this, seemingly generic, observer based on a usage detail
 
mr5
I do
LayoutObserver(this) {
    val width = it.width
    val height = it.height
    cursorPosition = PointF((width / 2).toFloat(), (height / 2).toFloat())
    cursorParams.leftMargin = cursorPosition.x.toInt()
    cursorParams.topMargin = cursorPosition.y.toInt()
    cursor.bringToFront()
}
tis how it looks like now
 
2:27 PM
ok
 
@Squirrelintraining :o
 
mr5
If you don't mind, I have quston again :D
Any other way to write this elegantly? gist.github.com/mr5z/fe099973693ee47702f5f49d9acbba21
 
@mr5 is your IDE mentally ill?
 
It's Android Studio so...
Wait actually my AS tells me to make a val
 
mr5
2:37 PM
xD
it does suggest it also. but last time I did it, it won't compile
 
because "= false" is invalid
you cant have a property with a value and explicitly state the getter to not use that actual value
 
mr5
those two vars are nullable in my case
 
oh... they are vars in your case
which makes sense then
 
mr5
@Squirrelkiller yay! we're slowly making this a Kotlin room
I mean
I already have two null check before
so why do I need to unwrap it?
dereference?
 
val hasMoved: Boolean
	get()
	{
		val initialTouchPosition = initialTouchPosition ?: return false
		val lastTouchPosition = lastTouchPosition ?: return false

		val epsilon = 0.1

		return abs(initialTouchPosition.x - lastTouchPosition.x) > epsilon
			|| abs(initialTouchPosition.y - lastTouchPosition.y) > epsilon
	}
@mr5 multithreading
 
mr5
2:43 PM
wat
why do I need to consider threads here
 
kotlin's compiler understands that your vars (and unclear vals as well) are being able to change during your code execution
if one thread asks for the value of "hasMoved" and validated that the initial touch position and last touch position are in fact not null, another thread can set them back to null
 
mr5
@Wietlol waow. ?: is get else return ryt?
 
the default way to solve it is by loading the value only once
so, in simple terms:
 
val initialTouchPosition = initialTouchPosition
if (initialTouchPosition == null)
    return false
 
mr5
2:45 PM
@JackSparrow lol
 
which can be shortened by ?:
in your case, there might be a more interesting solution
these initialTouchPosition and lastTouchPosition... they start as null, right?
 
mr5
ye
 
and at some point, you change them to a non-null value, right?
 
mr5
check
 
and you never set them back to null, right?
 
mr5
2:47 PM
🎷
 
then what you have is a lateinit variable
 
Is that even English?
 
one that gets "initialized" as non-null later in the process, but never gets uninitialized
try lateinit var initialTouchPosition: Position
and lateinit var lastTouchPosition: Position
 
mr5
yeah you're probably right but, <insert aspect here>, I still think it's wrong to mark it lateinit
 
why?
 
mr5
2:49 PM
it may never actually be initialized
 
that is perfectly fine
lateinit is like nullables, except it says "if at some point, I am not null, I will never be null again"
 
@mr5 No we're not
I'm off now bye o/
 
in which case, other threads cannot interfere with the non-null guarantees made by your null checks
and therefor, you dont need to make a local reference to your initial and last touch positions
 
mr5
what would happen if I dereference it but it's null?
 
lateinit var initialTouchPosition: Position
lateinit var lastTouchPosition: Position

val hasMoved: Boolean
	get()
	{
		if (::initialTouchPosition.isInitialized.not())
			return false
		if (::lastTouchPosition.isInitialized.not())
			return false

		val epsilon = 0.1

		return abs(initialTouchPosition.x - lastTouchPosition.x) > epsilon
			|| abs(initialTouchPosition.y - lastTouchPosition.y) > epsilon
	}
you dont dereference before checking it has been initialized
if initialTouchPosition isNotInitialized, return
if lastTouchPosition isNotInitialized, return
 
mr5
2:53 PM
I still think this is more elegant than that:
11 mins ago, by Wietlol
val hasMoved: Boolean
	get()
	{
		val initialTouchPosition = initialTouchPosition ?: return false
		val lastTouchPosition = lastTouchPosition ?: return false

		val epsilon = 0.1

		return abs(initialTouchPosition.x - lastTouchPosition.x) > epsilon
			|| abs(initialTouchPosition.y - lastTouchPosition.y) > epsilon
	}
 
suit yourself
it is certainly easier to understand when you are new to Kotlin
::stuff gets complicated really fast
 
mr5
oh right. it's working fine now :D
thanks!
 
So basically
Kotlin is messy garbage
C# Superior
Sounds good to me
 
public Boolean HasMoved {
	get {
		var initialTouchPosition = InitialTouchPosition ?? return false;
		var lastTouchPosition = LastTouchPosition ?? return false;

		var epsilon = 0.1;

		return Math.Abs(initialTouchPosition.X - lastTouchPosition.X) > epsilon
			|| Math.Abs(initialTouchPosition.Y - lastTouchPosition.Y) > epsilon;
	}
}
C# looks just as much as a messy garbage as Kotlin does
 
mr5
wait wat
you can return on ?? ?
 
3:08 PM
yep
or I am too Kotlinized and you cannot actually return on ?? in C#...
 
Sounds feasible to me
I'm wokring in VB right now tho so I can't check
 
I am working on... secret stuff
 
(HES WORKING ON WIETEX)
 
dang it
I said it was secret!
@Wietbot you here?
 
3:10 PM
I have no clue what you meant right there. You can use the listCommands command to see all my commands.
 
why create a local var if you have property already?
 
mr5
you're working on personal stuff on office hours?
 
@Wietbot evalcsharp
public String Foo(String? test) {
var text = test ?? return "none";
return text;
}
Foo(null)
 
just if (InitialTouchPosition == null) return false; ... return Math.Abs(InitialTouchPosition.X - ...
 
3:12 PM
Microsoft.CodeAnalysis.Scripting.CompilationErrorException((1,54): error CS1525: Invalid expression term 'return')
 
oh...
didnt ?? return get through in C#8?
 
mr5
@ntohl the reason is to avoid extra null check and consistently use the same variable
 
I guess I thought C# was better than what it is
 
avoid? I do same amount of null check
 
@ntohl you are not including multithreading though
if another thread alters your property and sets it to null (which seemingly is a valid value to set it to), your code börks
 
mr5
3:14 PM
kind of weird that Kotlin worries about multithreading in that context.
 
well. Fluff multithreading in this case
 
@mr5 Kotlin worries about everything
which means... if Kotlin says "this is going to happen"... that thing is going to happen
 
mr5
Most of the time, authors will mention it in the docs if a particular property or method is thread safe.
 
not even multithreading, even if you just alter the value by another function or something, you can still get stung
 
imagine, that your code switches context, and sets `InitialTouchPosition` to null here>

get {
	<--
	var initialTouchPosition = InitialTouchPosition ?? return false;
 
3:16 PM
also, keep in mind, async
 
Here's a question for yall. What HTTP method would you use for emptying a container (though not deleting the container)
 
options
hides in bunker
 
mr5
GET!!!
 
i dont get it
 
mr5
oh crap, why did it become empty
 
3:18 PM
@ntohl what if it gets set to null just the part below it?
if it sets it to null above it, then it will just return false
 
mr5
hey wintol, why are you still not using async in Kotlin?
 
(given ?? return is actually in C# by then)
 
mr5
I think you need to because I'm stuck again with Kotlin shit
 
@mr5 you bet
 
just nonsense. Even if you write the event handler, and your value is null?
 
mr5
3:19 PM
@Wietlol you should renmaed yourself to wientohl so that we cannot confuse you with ntohl
 
How the helkl would we confuse them
 
mr5
last part is ol which is confusing enough
I mean, it sounds ol
 
it isnt even ol
 
mr5
o[h]l
 
we dont have any same 2 consecutive characters in our names at all
 
3:21 PM
N t owl
 
@ntohl I dont really understand
 
The names don't even sound the same in my head.
 
mr5
2 syllables, same sound on the last syllable, and you're both the same person so...
 
no u
 
Wietlol = Wheat-lol, Ntohl = Nuh-toll(as in toll booth)
 
3:24 PM
you must be the first person to actually pronounce it "wheat-lol" by themselves
or... did I ever mention the pronunciation?
 
So the only even slightly overlapping parts of their name are not even the same, as Wiet is a short "lol" but ntohls is a long "tollllllllllll"
No? What they hell else do people think it i s
 
why-at-lol
 
mr5
for me, it's Weet-lol, En-toll
 
wheat-l-o-l
wee-at-lol
 
3:25 PM
iDunno how they come up with it either
 
mr5
why would you pronounce it why-at-lol. that's just nonsense
 
probably more like... why-et-lol
 
The only other way I would possibly say it is wee-ett-lol
 
oh, and then we have the outrageous ones too
"wheat-lot"
 
It's close
 
3:27 PM
THERE ISNT EVEN A T AT THE END!
I DONT EVEN...
 
But the text is smol
 
mr5
whey-lol
how do you pronounce wheat? like wet or wheat?
 
        protected override void OnTouchMove(TouchEventArgs e)
        {
            // that's silly
            // ok ok double null check, but still...
            var touchEventArgs = e ?? null;

            if (touchEventArgs == null)
                return;

            var canvas = MyCanvas;
            if (canvas == null)
                return;

            var points = e.GetIntermediateTouchPoints(canvas);
            if (points == null)
                return;

            base.OnTouchMove(e);
 
I want wheat crackers now
 
3:27 PM
fuck
 
mr5
English is very inconsistent
3
 
wheat
@mr5 Welcome to the topic of this room
 
mr5
wey?
 
General discussions about the c# language, Squirrels, meme archaeology, and the intricacies of the English Language
 
mr5
like, do you know da wey
 
3:28 PM
@ntohl var x = y ?? return z is not similar to var x = y ?? z though
 
That would be whey
 
mr5
var touchEventArgs = e ?? null;
^ I think that would not compile
 
@Wietlol I'm saying know your enemy. Check multithreading "possible" problems where they really dangerous. I think without checking that e cannot go null
@mr5 eh. Ok. Some extremal item
 
mr5
I would not even consider multithreading if I know for sure my code would run on main thread only.
 
@ntohl in your case, e cannot possibly go null because it is a local variable (parameter)
(and not shared by closures)
 
3:31 PM
            var canvas = MyCanvas;
            if (canvas == null)
                return;
 
^ that is the pattern
 
that could go null, but still. No way...
 
if null is a perfectly valid value for MyCanvas, then yes, it is
 
while the view is building it is null at a point, but at the event handling? No way
 
mr5
p3k speak wheat
 
You need to make the language customisable
Nobody here speaks j
Or if they do they don't do it in the chat
 
@ntohl perhaps in your case
in mr5's case, his initial position and last position were perfectly capable of still being null at the event handling
 
this is pretty spot on to how I say Wietlol
 
Apart from the robotyness
 
mr5
3:36 PM
eh so you sound girl irl
 
TIL Captain Obvious is a female
 
wow
not what I mean
 
:p
 
mr5
captainaobvious is a girl
everyone!
 
Actually the female voice is probably closer than the male voice
 
mr5
3:36 PM
should we call you mistah
 
Mistress obvious
 
mr5
capitana
@CaptainObvious too lazy ugh
 
Just remove the language tag then
Then it becomes english
ENGLISH IS SUPERIOR LANGUAGE
 
mr5
it's meant to be annoying.
where is the fun in that
 
Because it's annoying
 
mr5
3:38 PM
ehh english is boring
 
Annoying bots are good if they're occasionally helpful
Or just comically bad at doing what they're meant to (Jack)
But ones which are universally annoying are not good to have around
 
mr5
no. annoying bots should stay annoying. it's quite a success for p33k
cuz he got kicked out twice already =P
 
Wietbot got kicked out several times and muted for hours...
 
mr5
@Wintol why is your Kotlin sucks. Can't even make a proper async as what I have promised.
 
> @Wintol
That's a new one
 
mr5
3:41 PM
he's wintol now
 
@miss5 I dont participate in async
 
mr5
omg. kootleen izz soo stoopeed.
 
uhm...
I vote for pebcak
 
You are certainly a problme
 
mr5
jokes on you, I don't even have chair
can't afford
 
4:38 PM
@mr5 yes, that was the same US licence project. It is working great now. But I'm unaware of text processing or AI\ML libraries and not sure if I need to use one
 
 
2 hours later…
6:56 PM
\o/ I just finished replacing WebSockets for long polling in my hobby app thingy :D
 
7:07 PM
what's that mean?
 
7:26 PM
.withUrl("/chathub", { transport: signalR.HttpTransportType.LongPolling }) ?
while we are at it...
i have blazor server side SignalR hub
I cannot connect to it through a library
            _connection = new HubConnectionBuilder()
                .WithUrl(
                    "http://localhost:39666/blazor_reporter"
                    )
                .ConfigureLogging(logging =>
                {
                    // Log to the Console
                    logging.AddConsole();

                    // This will set ALL logging to Debug level
                    logging.SetMinimumLevel(LogLevel.Debug);
                })
                .Build();
            _connection.StartAsync().Wait();
no logs, but .StartAsync() hangs
 

« first day (3587 days earlier)      last day (1353 days later) »