« first day (2732 days earlier)      last day (2214 days later) » 

12:00 PM
Yeah, I have to agree with kendall, because the end points actually propagate to the middle it actually is not an early optimization, and it actually does matter for large arrays too.
 
@KarelG no JS
 
css animations
 
365842150
321843439
835112083
242217503
414905072
303915395
653484194
326646799
538593961
586551860
635202712
510614814
43921811
803871248
555984164
748596060
544874507
698909286
546721592
444191229
500890544
745756186
442637001
464728634
345570051
329801985
462864222
241092309
970322053
558309104
426544057
188369816
961412568
260340632
113453826
350115119
708042065
960759242
640288281
630026259
206496605
638269077
68238929
61021045
980683923
318047000
355749112
339417123
410350476
293464331
997151361
there, go
 
@KarelG but you want the greatest numbers at the edges
 
I wonder what happens if ... + x_n * x_0 would be added to the ruleset.
 
12:01 PM
@Wietlol why?
 
@paul23 well, the starting element no longer matters because it becomes cyclic
 
the result of that function is an array.
 
@KendallFrey You don't wish to have largest_number * semi_largest_number :P
 
that array must then provide a minimum value if doing N1*N2 + N3*N4 + ect
 
it would be biggest, then smallest, then second biggest, then third smallest, then fourth biggest, then fifth smallest...
 
12:02 PM
> f([1,2,9,10]) = 1*2 + 2*9 + 9*10 = 110; f([10,1,2,9]) = 10*1 + 1*2 + 2*9 = 30
 
@KarelG no, third
second smallest would go before the biggest (at the end)
 
a*b + b*c + c*d + d*e
 
@Wietlol fx([10,1,2,9]) = fx(10,1,9,2]) ....
unless I read the requirements wrong
 
@KarelG not true
10*1 + 1*2 + 2*9 != 10*1 + 1*9 + 9*2
 
ah it is reusing the second element
 
12:04 PM
the first and last elements are the only ones not being used twice
its like the numbers pyramid
but then only two layers
 
@KendallFrey nah, they are for a banner
I need more specificity and selection
 
except that this one uses addition and paul wants multiplication
 
Wasn't my problem :(
 
@KamilSolecki fontsquirrel.com ?
 
and paul wants the sum of the second layer (from bottom) to be the lowest based on the order of the bottom layer
 
12:06 PM
dafont is the only legit source
 
Hmm, I wonder how to minimize the number pyramid of 1*2 + 2*3 + 3*4...
 
or, font squirrel
 
@paul23 wut?
 
might just be the same
 
12:06 PM
question came from Roy Namir
 
how do I quote :/
 
"> text"
or at least add a non space character after the :###
 
38 mins ago, by Royi Namir
Nice programmer interview question( I don't have the answer , nor interested , I just got it from a friend.).
You have an array : `[X1,X2,…,XN]` . Write an algorithm that its result is a sorted array such that a MIN value will occur in `Min(X1*X2+X2*X3+…+Xn-1*Xn)`
@paul23 ^ ?
 
or paste hyperlink
 
yeah that
 
12:09 PM
still, the pyramid formula applies :D
in any case, did anyone yet find the right formula?
 
@Wietlol kendall did
 
@Wietlol can you retry that with 20,1,9,2,18,3 ?
 
in that specific order?
 
[20, 1, 9, 3, 2, 18] , using the ruby tool @Cereal built .
 
you mean 20,1,19,2,18,3?
 
12:16 PM
me ?
 
Well you and @KarelG I suppose
 
yeah but what is its output ?
 
..., 18, 3] is never the answer
 
I got 119
 
i've just answered KarelG
 
12:16 PM
@Wietlol input: [3, 18]
 
well that would be wrong
 
..., 18, 3]
@KendallFrey
 
def fn(arr)
  arr.each_cons(2).inject(0) { |s, (a,b)| s + (a * b) }
end

arr = [ 20,1,9,2,18,3]
p arr.permutation.min { |a, b| fn(a) <=> fn(b) }
 
but I am nut sure if that is the minimum of the sequence
 
it means there is a leading element
 
12:17 PM
@Wietlol Not in the normal usage :/
 
ah yes. 18 got called twice. skip that
 
Okay... this is weird. I have this piece of code gist.github.com/SaitamaSama/aac6e7dc21a1a1e9f57edf9ba843b6fd and try to inject the script into chat.stackoverflow.com from console, and due to the absence of CORS headers, I get a SecurityError on firefox. But when I add plImage.crossorigin = "anonymous" (to fix the CORS issue) the on load event handler isn't even called
am I doing something wrong?
 
@paul23 Again, it plays a role. If you're very strong, but I think that adding you to my team is a bad idea, I won't add you to my team
 
true, but [x, 18, 3] can never be the answer
because x*18 > x*3
so, [x, 3, 18] < [x, 18, 3]
 
Technical prowess is very important, and is definitely the primary factor, but "personal" or "social" traits is definitely something interviewers also look at.
 
12:18 PM
Sage advice, @Wietlol. Sage advice. We must all remember that [x, 18, 3] can never be the answer. Don't be tempted, guys.
@MadaraUchiha A colleague at work interviewed someone applying here and was asked what they do for fun. Their reply was "nothing inparticular"
 
@Neil "Sitting, alone, in a dark room, for hours"
 
Who replies like that? I mean even if it's true, anything would be better than that
 
@MadaraUchiha Yet why would I (or anyone who is hunting for a job) worry about it? You are who you are, there's no going around that. So it's not something you can just fix and hence worrying about your personality is of no importance. One might as well worry about the sun going black hole, or getting into an accident when commuting.
 
@paul23 Ok, maybe you shouldn't be penalized for having a bad personality if you're great at programming, but people do that all the time anyway
 
Yet why worry about it? It happens.
 
12:22 PM
@paul23 Oh, for sure, I'm not asking you to be anyone else (on the contrary, I think we both would be better off if we figure out during the interview that there's no good compatibility, rather than waste either of our times)
 
So yes, personality is important
 
@BenFortune holy shit, I hadn't seen that. They went to such lengths to lose/leak all that data and their only response is "we care about security." ...
 
@ssube It happened in March, but I only saw it cause it was on HN today
 
@Wietlol false
x = -1
 
reading the article (I don't use Travis regularly) it sounds like in March they pretended it was just an outage
 
12:24 PM
@ssube My first k8s deployment using Gitlab's auto devops 😃 xbenjii-xbenjii-co-uk.xbenjii.co.uk
 
now they're finally (a month later?) admitting that they leaked or broke their entire database and anything you had encrypted
 
Skills you can learn, personality you can only nudge (which will happen all the time and if a nudge is all that is required to fit a company I sure hope a company wouldn't decide on *that*).
And if you can't change anything about it, worrying is the worst thing you can do. That's a hellhole you don't wish to fall into.
 
@ssube well better late than never..
 
@KendallFrey can there be negative numbers?
 
@BenFortune nifty. What's your workflow to update it?
 
12:25 PM
well, adapted my function
 
or neutral numbers?
 
Nobody said there can't
 
got this
function fx(arr) {
   arr.sort();
   const sol = [arr[0], arr[arr.length-1]];
   let i = 1;

   while(i++ < (arr.length / 2)) {
     sol.push(arr[i]);
     sol.push(arr[arr.length-1-i]);
   }

   return sol;
}
 
and they don't change the algorithm at all
 
@Neil sort of, but also, not
 
12:25 PM
@ssube Push to master
 
no test included non-positive numbers, so they arent allowed
 
generalize you wimp :P
 
Well, merge. It's a protected branch
 
@BenFortune dat url
 
12:26 PM
with negative numbers included, we have a problem
 
It works quite well
 
no test included fractions, are they also not allowed?
@Wietlol We do?
 
@KarelG It's auto generated haha
 
@BenFortune what is that?
 
@Wietlol Gitlab CI
 
12:27 PM
@KendallFrey sorry, im used to types, ints it is
also, yes we do
 
well?
 
unless your algorithm is permutations/brute force
 
It uses my k8s cluster for Gitlab runner, it's nice
 
@KarelG *passes empty array* HA!
Kidding, I think I would have had a very similar approach
 
@Wietlol I'm waiting
 
12:28 PM
well, you have to balance out negative and non-negative numbers
so the most of the second layer numbers is going to be negative
 
@KendallFrey What's the answer to your input?
 
also, you want the resulting negative numbers to have the largest values
 
@Cereal idk, haven't bothered
 
@BenFortune cool
 
since the larger their value is, the lower the sum is
 
12:29 PM
so you're running the runner in-cluster as well?
 
then, you have to include that in the algorithm
 
we've taken to embedding a runner in each cluster at work, has some real benefits
 
@Neil HA! *adds if(!arr || !arr.length) return []; *
 
@Wietlol Does the algorithm require changing? If so, how?
 
im not sure what your algo is though...
 
12:30 PM
@KarelG countered!
 
@ssube 50/50. It seems to differentiate between Gitlab's hosted CI and my cluster and I don't know how to control it
 
Wait I missed something
 
@ssube Thanks for all your help btw, I've learned a lot
 
@Wietlol [N,0,N-2,2,N-4,...,3,N-3,1,N-1]
@rlemon lol
 
12:31 PM
@BenFortune np. I find this a ton of fun, especially now with kube involved, so I'm happy to encourage people. :P
what do you mean it differentiates between their CI and your cluster?
 
I'm using the hosted Gitlab and not my own instance
It seems random whether it runs on theirs or mine
 
oh, that makes sense
can you/do you have any tags set on the jobs?
 
I think so yeah
 
you can probably assign the project to a single runner, but tags also work
 
@KendallFrey instagram.com/p/BhVk3y3A0yB what is a "body tool" ?
 
12:33 PM
@ssube Oh I can disable shared runners
 
a form? a mock? an actual section of the rocket?
nvm, found it
> This is a piece of tooling which will be used to construct the carbon-composite tanks of the Big Fucking Ship (BFS). The BFS is the second stage of the Big Fucking Rocket (BFR) which is designed to carry humans to Mars within 10 years
 
Oh, looks like my staging branch has extra jobs
All handled by auto devops I presume
 
@KendallFrey
[-10, 0, 10, 10]
[3, 0, 1, 2] = [10, -10, 0, 10] = [-100, 0, 0] = -100
[3, 0, 2, 1] = [10, -10, 10, 0] = [-100, -100, 0] = -200
you have to swap the numbers
 
oh hm
fuck
 
left-right-right-left-left-right...
at least... i think
 
12:37 PM
?
I think the bulk of the algorithm is still sound
 
nice
I showered and now the kitchen is wet
 
alright, supposing you had a matrix nxn and had to find the path from the top left to the bottom right such that the sum of which is minimal?
 
@Neil there are a bunch of those on project euler
generally pretty simple
 
well if you wanted to brute force it maybe
 
even without
 
12:40 PM
i know one that i found really hard
it took me half an hour to figure out that i ran out of memory
:D
 
@KendallFrey problem 202 is the best
 
@KamilSolecki which is that
 
ehhhh
idk if I'd trust a 3d printed compound bow
but neat print
 
it's so small so..
 
12:42 PM
oh fuck i need to restart my print this morning
 
just don't throw sharp things
 
@KendallFrey it's the problem 202nd.
Kendalling aside, it's laser beam in a triangle of mirrors
 
@KamilSolecki Wow, that one looks "fun"
 
ah fuck i remember that one
 
I wouldn't even know how to approach that problem
I think brute force is out of the question
 
12:48 PM
@ssube Ooh, it creates a review link xbenjii-xbenjii-co-uk-review-staging-3j2lge.xbenjii.co.uk Then gives me a manual pipeline job when I'm done. xbenjii.co.uk/i/6ed5a46467b7
 
@SterlingArcher i.redd.it/27zd2vinetq01.jpg #rektum
 
> ur ancestors incestors
lmfao
 
> you're granny a tranny
bugs me so much
 
@Neil I'm guessing by solving some algebraic equation
maybe some number theory
 
@KendallFrey well presumably if you changed the angle of entry to a decimal point insignificant enough, that counts as a second configuration?
it's a little vague
 
12:52 PM
@BenFortune Whatever you're doing is super neat
 
What do you mean?
an infinitesimal change is no longer a solution
 
@Cereal It's fun!
 
it's not a second solution because why?
 
That stop review pushes to prod, I love it
 
does it have to bounce off a different side?
 
12:53 PM
Because the entry/exit is infinitesimally small
essentially, it has to start and end at a point
 
so change the angle infinitesimally :)
 
@KendallFrey twss?
 
and then it no longer ends up at that point
 
if it is infinitesimal, then it does
 
12:55 PM
uhhhh
 
@rlemon You do recognize the meme, I hope
 
no
 
@Cereal kubernetes is supposed to be stupid easy to set up, too. It's a ton of fun to mess with and run stuff
 
@ssube Took me 3-4 attempts, and I only actually managed to do it thanks to terraform haha
It'll be easier in the future though
The hardest part was Scaleway and their stupid fucking kernel
 
12:58 PM
My filament is twisted, now I have to babysit this print :/
 
Does english have different words for the 3 main types of picked cucumbers
ones are sour
 
@BenFortune yeah, I had the same problem with OVH and OpenStack
 
ones are sweet
ones are salty
 
@KamilSolecki relish the thought
 
1:01 PM
as long as you can get docker up and running, you're usually good it seems like
 
I'm sure it's much easier if you're using GC or AWS
So much more expensive though
Only annoying thing with auto devops is it keeps assuming I want it to deploy a pg server
 
@KendallFrey got flagged or not? that is the question
 
@KendallFrey ...
 
@KarelG no?
 
1:18 PM
I fixed a bug through JS but i want to fix it through CSS
fml
 
.fixed {
  use: js !important;
}
 
:(
 
writing C# for the first time in 6 months sure reminds you how freaking awesome strong typing is
 
@rlemon spare a minute for a fellow noob
 
I don't agree to anything without seeing the question first.
 
1:20 PM
@rlemon you sure learned from those kindergarten tricks!
"Yes or no?"
 
no just say yes or no
 
@KamilSolecki use TS, noob
 
k
i'm contributing to Patternfly react, creating the Notification drawer component. here is the Storybook rawgit.com/gilad215/patternfly-react/storybook/feature/…
 
@KendallFrey I meant static typing :P
 
1:22 PM
What I said still applies
 
@KamilSolecki I find TypeScript's "DX" better than C#'s
 
@rlemon no JS joke gimped?
disappointing
 
@KendallFrey I use TS everyday tho
 
@Gilad can you just describe what you fixed with your js and what you would like to do with css?
 
@KamilSolecki I do prefer discord
 
1:22 PM
if you will resize the window you will see the drawer panels/readclear buttons are on the screen changing the size of the drawer dynamicaly
 
but I also use TS almost every day
 
i did this in js with an event listener "resize" and injected inline css to the panel-body
 
@KamilSolecki then you should know the power of static typing
 
i want to try to do this with flexbox somehow
 
!!tell 42019798 rimshot
 
1:23 PM
@Gilad so you need help with media queries?
 
what does your 'fixed' js look like?
 
sec
 
@rlemon fixed?
 
yes, he solved the problem with js. now wants to see if there is a pure css solution.
 
1:24 PM
ah
 
@Neoares ingame chat for the win
 
this func is called every resize of the window
 
@KendallFrey then I messed up the terms again
 
@Ikari depending on the game, yes
 
im retarded again
 
1:25 PM
the state panelHeight is injected as in line css to the max-height prop of panel-body
do you even understand my problem @rlemon? thanks for your time
 
not really.
 
guys :|
 
corvid :|
 
KarelG :|
 
on the Storybook try resizing the drawers in the NotificationDrawer Wrapper, and then in the Stateful NotificationDrawer, you'll see the different behaviours
 
1:28 PM
Saitama :|
 
do you keep that image somewhere in your bookmarks?
 
@Gilad what do you mean by resize? the browser window? is there a handle I should be looking for?
horizontally? vertically?
 
the browser window yes
vertically
 
diagonally
 
I see no difference in the examples
 
1:31 PM
don't you see the Drawer is changing its height? ill send a gif wait
 
the only UI changes I see on resize are the scroll bars appearing / not appearing.
 
 
yea I don't get that.
 
yes but the other panels and the Read/Clear buttons follow you when you resize
 
ohh nvm, I see it now
hard to trigger when you have a small screen already
 
1:33 PM
nice
is it achievable by css, thats the question
 
.panel-container {
  position: relative;
  padding-bottom: heightOfTheButtons;
}
.panel-footer {
  position: sticky;
  bottom: 0;
}
maybe
those css class names I just made up too
if you don't want it sticky toggled until it scrolls, add that with js
 
wow youre fast, trying now
 
er, maybe it's position: fixed/
look up sticky css menus
it's basically the same but from the bottom of the container :P
 
s/it's.*/it's maybelline
 
yeah but i want NotificationTab3 to also sticky, i mean its achievable easily by making the panel-body scrollable
if you reduce the height of the panel-body, the whole drawer will get shorter, i just want it to change dynamically
.panel-body {
overflow-y: auto;
}
.panel-body{
max-height: CHANGED DYNAMICALLY through JS
}
 
1:38 PM
no you don't change CSS with JS
I mean, stylesheets
if you want to change max-height, just do element.maxHeight = 666 in JS
(didn't read all the conversation)
 
@Gilad If you can avoid involving JS, do so
 
@Neoares yes i succeeded with JS, i want to remove it and try with CSS instead
 
you might have to rethink about what you're trying to do if the only way to obtain it now is by dynamically changing max-height
 
I want pipeline operator in js, solves so many problems
 
@Neil i want the drawer to reduce it's height when i resize the window.
the .drawer-pf does change its height, the problem is the children aligning correctly
 
1:48 PM
@SterlingArcher can go into rampage mode
 
hrm, led lightbulb died. opened it up
cap blew
easy fix.
had to destroy the bulb itself to open it
 
rollsafe.png
 
it's interesting. if the capacitor going is the common issue, replacing that is easy enough, bypassing it and not hooking the led directly to mains would be even easier.
in ~4 years I'm going to have ~24 led lightbulbs fail
could make something cool from all those leds
 
@rlemon settle down there bigclivedotcom
 

« first day (2732 days earlier)      last day (2214 days later) »