« first day (3883 days earlier)      last day (1065 days later) » 

mr5
1:13 AM
@Freerey are you trying to send a response to the client?
 
[Freerey] nvm I figured it out
[Freerey] I was trying to do an HTTP GET
 
 
2 hours later…
3:12 AM
is there any reason why Xamarin uses NSString("Name") instead of simply "Name"
  var name = Person.ValueForKey (new NSString("Name"));
 
mr5
NSString != String
 
ok
so Apple string object vs C# string object
would it be safe to use arrow functions in all my projects?
button.action += (sender) => {}
Can you cancel setters?
    public string Name {
        get { return _name; }
        set {
            WillChangeValue ("Name");
            _name = value;
            DidChangeValue ("Name");
        }
    }
I'm guessing the WillChangeValue() is cancelable like in JS
 
mr5
dfuq happened to nuget
 
if (event.preventDefault==true) { }
fyi nuget works for me
 
mr5
@1.21gigawatts it's okay when you know you did it only on initalization
 
3:21 AM
ok
 
mr5
do you know why?
 
3:35 AM
why what?
!why
 
it is lambda exp, of course its safe, why is it harmful?
it was just a method, you can create as many as you want, downloadmoreram.com
just kidding, make sure you arent duplicate them (same context / same usage but creating it multiple times), it was nothing to worry
it was a method without name, it will run on any thread, as long as your involved object is thread safe
 
 
7 hours later…
10:23 AM
[Captain Obvious] !tumbleweed
[Captain Obvious] (I know that doesn't work from the bot but whatever)
 
Should consider adding something to the relay that relays only the command if it starts with one of Botler's trigger phrases
 
10:54 AM
ok wtf I just had a coworker thanking me for fixing something for them, and then ending the email with "also nice car btw" 🤣
 
11:10 AM
[Captain Obvious] But what car is it?
 
Jeep Compass Latitude
which needs to be cleaned cause a bird decided it'd do its thing on one of the handles (which I fortunately never touch)
 
11:37 AM
can you cancel a KVC setter?
C#
    set {
        WillChangeValue ("Name");
        _name = value;
        DidChangeValue ("Name");
    }
JavaScript:
    set {
        var event = new Event("willChange"):
        delegate.dispatchEvent(event);
        if (event.preventDefault==true) { return; }
        _name = value;
        DidChangeValue ("Name");
    }
 
how is my msg from decemeber still on the star board
 
because it is pinned
 
not been pinned the whole time tho
see is still there
 
if it is not pinned, it is still there XD
 
maybe it just resonated with this room :)
 
11:50 AM
I think someone starred it in the past few days
hence it is bumbed up on the board
iirc, it was 17 earlier
 
im sure its been on 19 for ages
 
oh
 
lol idm it should be the room description anyway
 
1, fuck Java
2, Java > C#
:)
 
do you guys think software developers shouldn't be allowed to make suggestions to clients?
 
11:53 AM
depends
 
if the client is asking for something stupid they should be told
 
^something I've only recently started doing
one guy once wanted me to automate a process that another page already took care of
 
ye
if they know what theyre talking about fine but if not..
 
a suggestion I was going to make to a client is adding tutorial-like elements to a page so that users would know why a certain thing didn't seem to work when it actually did....ofc, this is on top of the UI fixes I've already done
 
mr5
12:10 PM
@Wietlol you are using comma wrong
should be like this:
1. fuck Java
2. Java < C#
 
Anybody used IEditableObject before?
 
Hi all
How do you increase the timeout period with SignalR? It's throwing these errors every ~3 minutes: The client has been inactive since Thu Jun 03 2021 08:06:28 GMT-0400 (Eastern Daylight Time) and it has exceeded the inactivity timeout of 50000 ms. Stopping the connection.
Have tried a dozen ways to increase the timeout
 
[Captain Obvious] It shouldn't close the connection IIRC
[Captain Obvious] It should keepalive by itself
 
Wondering if it's an Edge change, to put the tabs to sleep
 
@mr5 heh, localization
for me, it is commas
just like 1.000,00 is one thousand with precision to hundredths
 
12:25 PM
[Captain Obvious] EuroDecimals are weird
 
not really... except for french numbers
 
[Captain Obvious] What's wrong with Baguetteimals
 
It's this issue, I think: github.com/SignalR/SignalR/issues/4536
 
       10
      100
    1.000
   10.000
 1.00.000
1.000.000
 
[Captain Obvious] Wait what
 
12:31 PM
yes
 
[Captain Obvious] @Alex nice spot on that one actually, I've noticed some frozen numbers on some clients who use a project of mine which might be left inactive in a seperate tab for a while
[Captain Obvious] Certainly not a critical problem, but not ideal. However a newer project I've got coming soon this will be problematic for
 
Thanks, Botler. Just updated to 2.4.2 to see if it fixes it
 
[Captain Obvious] Did you make sure to update the client JS side too?
 
Been using this to auto reconnect on disconnect:
$.connection.hub.disconnected(function () {
    setTimeout(function () {
        $.connection.hub.start();
    }, 2500);
});
I think so. I'll double check
 
[Captain Obvious] Yeah the issue is that setTimeout is being throttled so it won't fire until up to a minute after the connection drops
 
12:38 PM
Ahhhhh, that explains why it takes a minute to restart it every time. Been logging it
Good of the browser makers to do these changes
 
[Captain Obvious] Which is why the connection drops in the first place
[Captain Obvious] Internally signalr uses setTimeout of 20s to send keepalives, and 50s inactivity if nothing happens
 
@Botler sorry, indian, not french :D
 
Good grief
 
The Indian numbering system is used in the Indian subcontinent (Bangladesh, Bhutan, India, Maldives, Nepal, and Pakistan) to express large numbers. The terms lakh (100,000) and crore (10,000,000) are the most commonly used terms (even in English, such as in a local variety called Indian English) to express large numbers in the system. == System == The Indian numbering system corresponds to the Western system for the zeroth through fourth powers of ten: one (100), ten (101), one hundred (102), one thousand (103), ten thousand (104). For higher powers of ten, the names no longer correspond. In the...
 
[Captain Obvious] So say the browser last allowed a setTimeout 5 seconds ago, and signalr wants to send a keepalive, it "schedules" it for 20 seconds from now (so at 25s)
 
12:40 PM
although, i did it a bit wrong
 
[Captain Obvious] Meanwhile, the keepalive is sent after the last activity, so it will be doing inactivity in 50s
 
it appears they just use 2 digit grouos except for the last one which is a 3 digit group
 
[Captain Obvious] The inactivity appears to not use setTimeout, so that triggers as it's meant to, at 55s
[Captain Obvious] And nothing has happened, as the keepalive hasn't been allowed to execute yet, despite the fact that it was scheduled to run at 0:25
 
Hmm. Wondering if my code above is doing anything then
 
[Captain Obvious] So the inactivity comes along, sees nothing has happened (because the keepalive wasn't sent) and kills the connection
[Captain Obvious] Probably not tbh
 
12:49 PM
Well, before I added it, the connection would drop and stay dropped. So thinking it's helping
 
[Captain Obvious] Oh I mean sure it'll bring it back eventually
[Captain Obvious] But it won't stop it breaking in the first place
 
Yep. No way right now to stop it from breaking. I've tried all kinds of timeout config settings. In one case, they made things worse!
Maybe ver 2.4.2 will help
 
[Captain Obvious] Should stop it disconnecting on the lcient side
 
đź‘Ť
 
1:10 PM
@Wietlol Collectors.toMap takes two lambdas, one to select the key and one to select the value, right?
 
iDunno, havent used that one in ages
shouldnt intellisence give you the answer faster and more reliably than me?
keep in mind, I dont use Java :D
 
Intellisense gives me like one DIN A4 page of stuff that is not the method signature
But I got it now, too many parentheses to keep an overview^^
 
I mean...
the most disturbing thing of that is the indentation
 
@CaptainObvious because literally 90 in French is literally "four pairs of twenty plus ten"
 
there are 2 optional parameters (provided by 2 overloads) to
- provide a mapper function to combine values with identical keys
- provide a factory function to supply the map to insert to
 
1:20 PM
[Captain Obvious] <@226165836899942410> but why
[Captain Obvious] That's so fucking dumb
 
do extra math while you count
honhonhonhon
 
1:37 PM
[Captain Obvious] Merci Monsieur Baguette
 
Folks, I have a question pertaining to the following:

An HMAC can be used to determine whether a message sent over a nonsecure channel has been tampered with, provided that the sender and receiver share a secret key. The sender computes the hash value for the original data and sends both the original data and hash value as a single message. The receiver recalculates the hash value on the received message and checks that the computed HMAC matches the transmitted HMAC.
My question: How do both parties share the same secret key?
They must transmit the secret key in a secured channel first?
If so, how is the secured channel established? It seems to be a chicken-egg problem, right?
 
[Captain Obvious] The key could be agreed AOT
 
1:54 PM
It is indeed a chicken and egg problem, except somebody found a solution
Let me check if I can find a nice diagram, there's a very nice example explanation with mixing colours...
Found it, Diffie-Hellmann
You do basically this but with keys
Diffie–Hellman key exchange is a method of securely exchanging cryptographic keys over a public channel and was one of the first public-key protocols as conceived by Ralph Merkle and named after Whitfield Diffie and Martin Hellman. DH is one of the earliest practical examples of public key exchange implemented within the field of cryptography. Published in 1976 by Diffie and Hellman, this is the earliest publicly known work that proposed the idea of a private key and a corresponding public key. Traditionally, secure encrypted communication between two parties required that they first exchange keys...
 
@Squirrelkiller wtf that looks more like an xkcd comic than a Wikipedia image
 
Assume both communicate publically "Let's use a base key of 3"
Alice has a secret key of 2
Bob has a secret key of 4
Alice sends 5 to Bob, because it's 3+2
Bob stores 9 because it's 5+4
Bob sends 7 to Alice, because it's 3+4
Alice stores 9 because it's 7+2
Both now have "9" stored as shared secret.
Except the operation is not "add" but "hash" or something, so you can't just undo it.
 
Thank you @Squirrelkiller as usual!
@Botler The agreed AOT keys most of time are not practical, especially when both parties are geographically separated. :-)
 
2:21 PM
Well there is one use case where indeed AOT agreed keys are used
Certificates
Certs are give to you by a CA
That CA is certified by another CA
Until you get to the root authority
There aren't many root authorities in the world
Those few, they give there root certificates to manufacturers to embed within the OS
So that things like browsers can make sure, a certain cert given to them is valid
Who wants to review my java code? For some reason I can't get it to work in linear time.
actors().stream()
                .collect(Collectors.toMap(
                        a -> a,
                        a -> movies.stream().filter(m -> m.getActors().contains(a)).collect(Collectors.toList())
                        )
                )
I feel like there's an obvious mistake I'm making in iterating within the iteration
 
2:52 PM
try to start from movies
 
I did, then it's still numOfActors * numOfMovies runs
Starting with movies, I have to access each movie, iterate through its actors and add the movies to that actor's list of movies.
So I still have to access every movie and within that every actor.
 
3:49 PM
not sure how you want to get that to O(n) though
but in simple terms,
stream over movies
flatMap to their actors
collect grouping by the actor
 
4:15 PM
Where the connection between actor and movie after the flatmap then?
What does my data look like after flatmapping all the actors?
 
Stream<Pair<Actor, Movie>>
assuming you do
.flatMap(movie -> movie.getActors().stream().map(actor -> new Pair<>(actor, movie)))
afaik, there isnt a nice way to do the above... yet it is quite a common operation
 
4:36 PM
Damn
 
Ha nice
 
anyone know why Postman keeps saying "Unable to load data as you're offline?"
 
Maybe you're offline
 
MAYBE YOU'RE A SQURIREl
 
4:49 PM
Please shutdown and reboot your machine, stay calm with the IT staff they're not the ones that are offline here
 
I actually just did reboot
 
so idk it seems to be a proxy issue
but i would at least expect the front page of the postman app to look at least somewhat similar to the screenshot I keep seeing everywhere else
right now it just looks like I got the completely wrong app
 
lol
Older version? Or preview version?
 
I have just made a revolutionary invention with the following code:


public IActionResult A()
{
return Redirect("B");
}

public IActionResult B()
{
return Redirect("A");
}
 
4:50 PM
Genius
I think Microsoft SSO has that already though
 
@Squirrelkiller it's starting to look like they just had a major UI overhaul or something because the one my coworker uses looks nothing like this ._.
 
Too Many Redirects error occurs. Mission failed!
 
we'll get em next time
so I guess postman 8.5.1 just sucks??
dang I wish I got the app when it was good 🙄
 
@TheShortestMustacheTheorem Make one of them send just some <html></html> but include a small script that, after a timeout of one second, redirects to the other one again.
Like <html><script> setTimeout(1000, () => window.location('/A));</script></html> or something
Maybe fix the js syntax lol
 
yep; the new one just sucks
 
5:46 PM
A question on web security. For Insecure direct object references (IDOR), a resource is accessible through this technique: http://foo.bar/somepage?invoice=12345. But each call checks the user's authorization level. Would the app still have an IDOR vulnerability in this situation?
It's better to use an indirect ref to the record ofc
 
 
6 hours later…
11:36 PM
Folks, I'm writing unit integration tests which need to work in lock-step with the tester. The user steps can’t be automated, or mocked, or bypassed. My tests need to be done only infrequently (say, once a month) and without rush. Reproducibility has to be decent – that’s why I’m coding tests.
The test has to halt and prompt me to complete a simple actions. I do that action and indicate to the test that I'm done. Then the test continues with the rest of the operations.
What would be a good way to implement such “halt and wait for signal from tester” behavior in a test? I’m using a NUnit framework and I’m running it in the Visual Studio.
If it weren’t a unit test, I would do this with a command line input. Where do the console inputs come from and console outputs go to in the NUnit tests?
Or maybe I can do this with a message box.
What method would you recommend?
 

« first day (3883 days earlier)      last day (1065 days later) »