« first day (3196 days earlier)      last day (1738 days later) » 
06:00 - 13:0014:00 - 21:00

6:14 AM
@Wietlol abstract class ProgrammingTask : Task { public void Run() { throw new IGaveUpException(); } }
 
good morning
 
\o
guten tag
 
6:38 AM
morning
 
guys, what do you think they're asking here: open.kattis.com/problems/bestcompression
is there some way of calculating theoretical maximum compression of which I'm unaware?
 
@Wietlol That is an inteface, it starts with an "I"
 
7:07 AM
ohayou
 
I figured it out (and by figured it out, I mean I cheated)
 
@Neil Is it connected with LZW?
Lempel–Ziv–Welch (LZW) is a universal lossless data compression algorithm created by Abraham Lempel, Jacob Ziv, and Terry Welch. It was published by Welch in 1984 as an improved implementation of the LZ78 algorithm published by Lempel and Ziv in 1978. The algorithm is simple to implement and has the potential for very high throughput in hardware implementations. It is the algorithm of the widely used Unix file compression utility compress and is used in the GIF image format. == Algorithm == The scenario described by Welch's 1984 paper encodes sequences of 8-bit data as fixed-length 12-bit codes...
 
7:24 AM
@bradbury9 Int32 also starts with an "I"
 
@ntohl I don't see why it would be. They didn't even mention it
even though I have the solution, I still don't understand why that was the solution
 
7:44 AM
Room.All(m => GoodMorning(m));
 
in theory LZW is the yet best compressor
 
But have a bad name
everything invented should not like T_PAAMAYIM_NEKUDOTAYIM
 
8:24 AM
@Neil I understand example 2 and 3, but not example 1
 
@nyconing Hey, Paamayim Nekudotayim is an excellent name.
I think @AvnerShahar-Kashtan and @misha130 will agree with me on this one.
 
brilliant name
those php boys were ahead of their time
 
@Wietlol how do you understand any of that?
 
I have no clue
 
in what world can you compress a file of 1000 bits into 0 bits?
 
8:28 AM
ahoy mateys o/
 
considering you always compress the same bits, your algorithm could say "decompress anything to this exact 100 bit sequence"
so, using 0 bits, you can compress 1 file
using a max of 1 bit, you can compress 3 files
nvm, I also understand example 1
 
morning guys
 
there is a special word for this operation
 
our office is so hot its not even funny
D:
 
over here it will get hot again
from staurday on 30° and more every day for atleast 2 weeks straight they say
r.i.p. hans
 
8:33 AM
@Neil
return if ((0..b).map { 2.pow(it) }.sum() >= n)
    "yes"
else
    "no"
 
@Wietlol but the bits are random
 
yes
which defeats the purpose of matching duplicate sequences and such, like zips do
I guess my solution gives yes for example 3 tho
in which case, I have no clue what the formula is
the only contraint I can really think of is "every compressed file must be different, since equal compressed files should result in equal uncompressed files, which doesnt exist"
the compression algorithm must therefor result in different bit sequences for every compressed file
 
matching duplicate sequences is not useless. Still. With LZW you would use them with dinamically built up dictionary
so the compressed files still code sequences with fewer bits
 
I think my calculation is actually correct
slightly wrong since Int doesnt have a pow function, but that is easy to solve
if ((0..b).map { 2.0.pow(it.toDouble()).toLong() }.sum() >= n)
all examples succeed
and it satisfies the only constraint I can make up from the question
only thing that might be an issue is performance (and possibly the .toLong() not being exactly accurate)
since its a 2^x, you could do bit shifting tho
should be pretty damn fast
if ((0..b).map { 2L shl it }.sum() >= n)
considering that b is at most 50, it wouldnt exceed the long limits
(except that I make the mistake that 2^n == 2<<n)
 
8:49 AM
it would be 2^(b+1) - 1
again, not obvious to me why that would be the case
 
^ that
well... there is no obvious formula
you dont know the algorithm
you dont know how it compresses or how well it works
all you care about is "could this black magic algorithm compress all my files into compressed bit sequences?"
and because all your files are different, all compressed bit sequences must also be different
 
well I mean if we're being pedantic, we could argue that it requires 0 bits to compress the entirety of shakespeares' works, because you know that if you receive no bits of decompression, then it's the entirety of shakespeares' works
but I mean that's trivial and pointless
 
@Neil exactly
an algorithm that can only compress the entirety of shakespeares' work, compresses it to 0 bits
I assume that the entirety of shakespeares' work doesnt fit in 1000 bits, but at least it fits in 0 bits as compressed
that makes the black magic algorithm possible compress it with a limit of 0
aka, example 2
 
that's why second example is 0
 
if that were true, then it would always be "yes"
but it isn't
so there's some compression technique other than "trivial compression"
 
8:54 AM
as long as there are 2 files, it's not the case
 
@Neil 2 0 cant be true
because there is 1 option for 0 bits
aka []
and you cant compress 2 different files into the same compressed sequence
 
well you can, but you'd need some sort of system to differentiate the two files
 
yes... by their bit sequence
 
like a compressed sequence header
 
9:00 AM
which is contained in the bit sequence of 0 bits?
 
first 2 bits indicate how many files there are, and then 2 bits to indicate length of the first and another 2 bits to indicate length of the second, etc
@Wietlol no, in fact, I didn't say you were wrong
 
im confused
why would I think you would say I am wrong, if I am clearly Wietlol?
silly Niel
ohai avner
 
Morning kiddies
 
Morning grandpa
(I am just kiddieng)
 
Hi
anyone familiar with winforms?
 
9:09 AM
!!welcome-c# Dimuth Ruwantha
 
@Dimuth Ruwantha Welcome to the C# chat! Please review the room guidelines and tips. If you have a question, just post it, and if anyone's free and interested they'll help.
 
Great!
I have a problem with updating sizes for controls
at the time I initialize the size let's say height is 200. then value changed to 192 in the runtime. then if I try to get the updated value, it still says height is 200. but if I explore the instance with a breakpoint it shows me 192 and update the height to 192.
does any one has any idea how to fix it?
 
hmm, maybe it doesn't mean actual height but preferred height
I don't know, it strikes me as odd
 
Nah with Winforms there's only 1 height on standard controls
Is it a custom control?
 
@Harry were u b boi
 
9:22 AM
No its a ListBox
 
@CaptainObvious is it a billion degrees over your neck of the woods?
not sure if its our office or just the temperature today but its hot as fook
 
Nah it's a pleasant 21.7 degrees in the office and outside isn't particularly warm. I little humid though
I think your office is just fucked mate
 
Prefered size is more likely WPF rather than winforms.
@DimuthRuwantha Consider adding a [mcve] or creating a question with that code example
Personally I never experienced that behavior
 
@DimuthRuwantha Listboxes IIRC round their size to the height of a child item + their frame
For example if your items are 25px and yourr frame totals 10px, your heights will be 35px, 60px, 85px, 110px, etc
I just made 2 brews, mine with less milk than the other, and it's came out white
wtf
 
@CaptainObvious sure!! thank you for the help
 
9:33 AM
@CaptainObvious feels like it
Canne wait to get to the new office ._.
 
@Dimuth That might not be the exact behaviour but I think it's correct. Try resizing the control in the designer and if it snaps to particular heights then that will be it
 
First week of september tho T_T
 
It's very annoying behaviour because it makes resizing look really bad
@CaptainSquirrel Where you moving to>
 
@CaptainObvious IIRC just outside paddys wigwam
 
-_- sigh, I am missing an IEnumerable<T>.MaxBy() again
 
9:36 AM
As long as you aren't moving to our planned new office it's good
 
where's that? lmao
You coming to town?
 
Except it's more of a big fuckoff warehouse down the road from where we are now
 
....why are you moving to a warehouse?
 
Cheap
 
Because I'm in a warehouse noe
Because we're not a development company
 
9:40 AM
oic
 
Of the roughly 40 staff we have, 3 are IT/development related
 
That sounds about right
 
10:12 AM
IM THE IT
atleast in my Company...
 
IM THE IT
at least... in the world
 
:O
theres pros and cons to it
i have to fix everything on my own
 
as do I
 
but i can do it the way I want to do it
noones gonna interfer
aslong as it gets done
!!Will you help me ?
 
@Hans1984 Doubtfully
 
10:17 AM
;(
 
can anyone explain to me why visual studio has a sqlite and what does it do with it
in the .vs folder
 
@Hans1984 that sounds like a great and a bad thing
 
yes
its very challenging at times
when you have to fix stuff you never did before
and your only help is google
but it can be exciting too
and depressing...
!!Go make me a coffee will you ?
 
@Hans1984 Not at all
 
screw you!
your good for nothing...
 
10:27 AM
@misha130 It's to have a more binary optimized (I'm guessing) place to store the metadata it tracks for a given sln/csproj/file.
Not structure/tabular, though. It's just used as a key/value store for blobs.
 
I dunno why its triggering me but I guess thats fine
 
Would it have felt better if it was a json file?
 
y..yes..
 
What if you could have a Json file strucutre in a database
 
A folder with a JSON file used as index and randomly-named binary data files?
 
10:30 AM
Introducing: MondoDB
6
 
actually a light doc db would've been the best of the two worlds
but legit I would do the same thing as ms did and use sqlite
 
It would be nice to have a docdb with the easy deployment/usage of sqlite.
 
probably litedb
 
@CaptainObvious SHOO! WE ONLY TALK ABOUT SQL SERVER C# IN HERE
 
Yeah I know it's really weird
 
10:48 AM
The internet Wifi here is so bad
 
The internet is pretty terrible everywhere.
 
Just dropped my actual connection to the WiFi
brb, firmware updates
inb4 brick
 
Company is moving to a new building in about a year. The promise is that there won't be any ethernet ports anymore. Just wifi.
 
that sounds like a terrible idea
how are your servers supposed to get internet
servers don't shouldn't do wireless
 
Servers will have ethernet. Meeting rooms probably too. I'm talking about the developer workstation areas.
 
10:54 AM
That also sounds silly
 
Yes, they're moving to open-plan offices as well. Divided into "neighborhood" clusters.
 
WiFi Adapter dies
WHERE IS YOUR GOD NOW
 
Well, you go and fix it. Same as if your ethernet adapter dies.
Or your screen dies. Or your laptop catches fire.
 
Just having no ethernet ports sounds silly
you should always have some readily available without having to move all your shit about
 
10:55 AM
What happens if your office WiFi goes down
 
What happens if the switch in the wall goes down?
 
Then switch to WiFi
 
It's a brand new building, built from the ground up, with a lot of redundancy. We'll see how it holds up.
 
To just rely on one method of getting yer internet, just sounds like a disaster waiting to happen
oic
 
People rely on one method 99% of the time already.
 
10:57 AM
True, but it doesn't hurt to be able to plug a wire into your machine should you need it
Will your company own the new building @AvnerShahar-Kashtan?
 
The question is probably the cost/benefit ratio here. Probably makes managing the infrastructure much easier.
 
That's true
But if you had to lay power lines
you may have done ethernet as well
 
I'm not sure exactly what the precise ownership situation is. It's not technically my company (I'm a contractor), but it's a big enough company to assume they will either own it or have a very long-lived dedicated lease.
@CaptainSquirrel And manage all the ports? Keep track of which is live and which isn't? That's a lot of management.
It was built to their spec, in any case.
 
@AvnerShahar-Kashtan My last place had both WiFi & Ethernet Ports
Lots of management, sure
But its part of the job for IT Support/Network Engineers
 
I assume the IT support department will have all the ethernet they need.
 
11:01 AM
You get ethernet
You get ethernet!
Everyone (inside the IT Support Dept) Gets Ethernet!
I should probably mention my last place also owned their building, the office was quite big and had 4 floors
And there was also about 6-7 outside companies working on the 1st floor that got network support too
But, each to their own
 
The new building is supposed to house about 1500 employees, I think. I don't know if some parts will be leased to other companies.
 
oh damn
We had 200~
 
It's a big company. :)
 
Including other companies
 
that amount of wifi may cause cancer
 
11:08 AM
I can see that lmao
Just make sure its not 5g WiFi
 
I won't be making sure of anything.
 
:o
I've restarted my VM and somehow borked this project
wut
!!quote get kieran
 
Feb 27 '17 at 16:02, by Kieran
Thank you for confirming im an idiot c:
 
oh god what did you do
 
The vm has lost internet somehow
 
11:22 AM
Wired connections are always better than wireless
 
yup
The router is behind me but cba moving
 
I have network ports in every room in my house
Including the shed at the back
 
Wired phones, for instance, are always better than wireless phones. Those will never catch on.
 
We have 2 wireless phones
Only because they're in the warehouse and the warehouse supervisors have them because they don't sit at a desk
Everyone else has wired desk phones
 
I hope by wireless phones you mean mobile phones
 
11:25 AM
No-one has a wired desk phone here.
Or a wireless desk phone.
 
We have a singular wired phone in the office that is the support line
brb restarting again
 
In most places I've been in in recent years, either most offices didn't have phones, or were assigned phones because that was standard operating procedure, and those phones lay dusty and unused taking up space on the desk.
 
I have an IP Desk phone but I usually use the softphone on my PC because my phone is awkward to reach
 
Desk phones in a bigish company are good
because then you don't have to walk around to the other side of the building to see if someone is there
 
We just use Teams.
 
11:34 AM
That works too
but you work for an actual tech company, no?
 
There's why :P
 
Most of my insights are relevant to tech companies where even the non-tech staff are expected to be tech savvy enough to use such tools.
 
We use Teams too
 
I feel like if we had tried to implement slack or whatever into my last place, our support tickets would have gone up by 2000%
 
11:37 AM
The presence on teams is shite though
 
"I can't add custom emoji"
 
Teams is actually pretty good
 
Some aspects of it are, sure
 
11:53 AM
It's improved over the last year. It's no longer dog-slow.
Their API story is a mess, as I've discovered a while back.
 
They still don't have read notifications
 
Microsoft?
Release an unfinished product?
Surely not!
 
But they can find time to piss about adding emoji reactions like Facebook did
 
so.... how do I solve this?
public class Stupid : IExpression
{
    public IExpression Expression { get; }
    public Operator Operator { get; }
}

new List<IExpression> {
    new Stupid(Literal(10), Operator.Plus),
    new Stupid(Literal(2), Operator.Multiply),
    new Stupid(Literal(5), null),
}
I want a proper expression tree, not this stupid lists
but I get stuff in lists with operators
but this doesnt have precedence
 
Why not use System.Linq.Expressions?
 
12:07 PM
@Wietlol Stupid should have a list of IExpression instances
and there you go.. tree
I see what you were going for with the one literal and operator (like you were typing 10 + 2 * 5 in the calculator
but this way, order of operations is not respected
 
do you actually create a list and then assemble it to an expression?
one after the other?
 
should be new Stupid(new Stupid(Literal(2), Literal(5), Operator.Multiply), Literal(10), Operator.Plus)
actually operator should be in front so you can use variable arguments, but still
 
@Neil because Stupid is a library
@AvnerShahar-Kashtan ^
 
convert expression trees to lists
 
I set up the models that I do want to use perfectly fine
but I need to convert them now
in the models I want to conver to, I have an IBinaryExpression, which is basically two operands and an operator
 
12:12 PM
but also you are converting a tree to a linear list
 
but... I am not sure how I could do the convertion nicely
@misha130 I am not
 
i understand but it just smells
 
// todo operator precedence
private static IAmANewExpression ParseExpressionSet(IEnumerable<Expression> expressionSet)
{
    List<Expression> expressions = expressionSet.ToList();

    if (expressions.Count == 1)
        return ParseExpression(expressions.Single());

    Expression lastExpression = expressions.First();
    IAmANewExpression lastNewExpression = ParseExpression(lastExpression);
    foreach (Expression expression in expressions.Skip(1))
    {
        lastNewExpression = Combine(lastNewExpression, lastExpression.Operator, ParseExpression(expression));
this is what I use now
which doesnt take operator precedence into account since it just builds up the tree like this
((((a) + b) + c) + d)
I need to refactor that function to do it properly
 
if you use postfix notation, then you don't have to have a tree at all
of course you need to interpret proper ordering to know how to order it in the stack
 
true, but even then, I need to understand the operator precedence
 
12:18 PM
I read that as postmix
 
I get an IEnumerable<Expression> and I cannot change that
 
Common postmix notation is 5.2:1, or 5:1 with ice
 
I must work with it so I cannot change the formula notation
 
Oh god who would star the MongoDB message? We don't want that shit in here
Oh fuck I just realised it's spelt wrong after I corrected another typo in it
 
I always star the things potential future employees might read looking at chat history
 
12:22 PM
how to delete another user's message?
damn this isn't google
 
I don't think the starboard is a very good example of quality content.
 
@CaptainObvious i could remove the stars
But i'm not going to
 
Good plan
:(
 
adds star
 
12:29 PM
nonono
 
....or don't its your choice i guess
 
I prefer the latter
 
MongoDb for all your headache needs
 
I grinded some reps from searching for [c#] [mongodb], and choose easy questions on SO
 
MondoDB*
(According to @CaptainObvious anyway)
Somehow this redirect i got working before is now broken again
no changes
y u do dis sitecore
y
👀👀👀👀👀👀
 
06:00 - 13:0014:00 - 21:00

« first day (3196 days earlier)      last day (1738 days later) »