« first day (2526 days earlier)      last day (2645 days later) » 

12:03
my whole vision grid is shaking...
I really need to get my shit together at some point
eat more fiber?
to get more shit?
hmmm
to keep it together
some coal would also keep it together and make it look black, how nice
12:08
rip pootis
So if you're little pootis, is there a big pootis somewhere?
So I tried to find the minimum of sum i=1->n (a_i - ea_i + eu - b_i)^2 with respect to e and u, which should have one solution because it's a quadratic, right? So I took the derivative and set it to 0, and ended up with a quadratic formula for e, which indicates two solutions. Did I definitely do something wrong, or could this be a case of a "phantom root" that isn't actually a solution?
the ^2 would indicate a negative and positive solution
Unless I don't know what you're asking about
@Cereal I'm looking for the minimum of the sum, not the solution = 0
12:27
thank you @towc and @littlepootis
That should do the trick now with one ajax call
<3
I have no clue what you're saying
well I build the table with my php loops and then use one ajax call and js loops to fill the data into my table
response time overall 467 ms
This is probably a stupid question, but if you're already building the table server side, why not do all of it server side
@Cereal because I was too lazy to figure out a way to have a nice and smooth nested loop for that. Its friday and since I've to do the ajax call every 20 sec in order to display changes I just rolled with it
For those of you familiar with codewars.com, I just published a challenge on there. It's still in Beta, and can probably be improved, but it may be a nice exercise :D
12:38
Codewars is my most productive way to procrastinate
It's pretty awesome :D
@KendallFrey did you solve it?
can you just sum the derivatives? 😒 doesn't feel right
well, I guess you can actually
@towc I've spent maybe 5 hours on this yesterday, I can't just snap my fingers and fix it :P
@towc Sum what derivatives?
I don't see a good reason for there not being more than 1 solution tbf
@KendallFrey of the sum terms
but nvm, that made sense, just wasn't intuitive right away for me
There is only one sum term, it's a square
12:42
well, the derivatives of the "body" of the sum
the term of the sum
also, you're deriving with 2 variables, right?
@towc Because it's a quadratic, which should only have one solution for d/dx = 0
@towc yeah
@KendallFrey well, it's the sum of quadratics
I think that has an effect
From what I understand, I can do each separately and set them both to 0
@towc That's still a quadratic
urgh, what am I thinking
go on, I'm not being helpful
so, you have this: const f = (e, u, a, b) => a.reduce((sum, _, i) => sum + (a[i]*(e-1) + e*u - b[i])**2, 0), right?
and want the minimum of f by given a and b?
pretty much yeah
12:49
window.onresize = function(){location.reload();} reloads the page each time the window is resized. Is there an event listener I can use to perform the reload after the user has finished the resize? Like a mouseup... Only way I can think of is having some function which logs resize events and some timer to measure time between last resize before firing the reload function
@Daruchini in jQuery I would do something like that
1 message moved to Trash can
@floGalen Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
var resizeTimer;

$(window).on('resize', function(e) {

  clearTimeout(resizeTimer);
  resizeTimer = setTimeout(function() {

    // Run code here, resizing has "stopped"

  }, 250);

});
function resizedw(){
    // Haven't resized in 100ms!
}

var doit;
window.onresize = function(){
  clearTimeout(doit);
  doit = setTimeout(resizedw, 100);
};
I thought there would be a nice little event listener
Why would you want to refresh on resize, though?
12:58
tbh its a bit of a hacky fix but it'll do for now: I have some d3 components which pretty much screw up when the browser is resized
Then refresh d3?
Or call the function that generates your components
Thats what is going inside resizedw
It was just easier to use window refresh as an explanation :)
@Cerbrus The instructions say every input will be a square, but the random tests give rectangles
Eh, fair point
Fixing, sec :-)
@Cereal Fixed
Fixed as in everything's a square, or I need to account for rectangles now? @cerbus
Ah, rectangles. Got it
13:10
Rectangles, yea
The random tests generate maps with sides [5-15] cells long
@KendallFrey you can quite easily bring the whole sum down to this:
(x^2)c+n(x^2)(y^2)-2xc+2xa-2xyb+c-d-2a-2ab
x = e
y = u
a = sum of a
A = sum of a²
b = sum of b
B = sum of b²
right?
idk, I did something like that
(put it in that form so it would be easier to see some patterns later on in wolfram alpha, but didn't get much useful stuff)
well, point is, you still end up with 2 quadratics, so there could be more than 1 solution
That makes no intuitive sense though
That's two flat points in a 2D function
urgh, sorry, c = sum of a², d = sum of b²
13:15
so, one minimum and one saddle?
maybe
The thing is, the function should always be positive
So I don't see how you can have two flat points in a function that diverges to positive infinity
welp, wolfram alpha thought n was a function, there might be more useful stuff going on
gives the derivative as 2(a+y(nxy-b)+c(x-1))
so yeah, might actually have only 1 solution
you have a quadratic for u (y)...
one day I hope to be good enough to instantly be able to tell what that means
today's not it
Hey guys, should the route be present in the application state? I am using ngrx.
and if you take the d/du you get a quadratic with e
13:20
right, wolfram alpha was deriving by x
how did I miss that
This all gets extra fun when you have to treat a, b, and u as vectors
@KevinB how do I instanciate a component without an init method? or do I just need to add one? <cfinvoke component="components.cdr.openIdConnect" method="init" returnvariable="oidc" />
btw, is this what you do in computer science at uni? Just a lot of formulas to minimize functions?
well, the non-technical bits, at least
he's a physicist
I doubt that's a CS thing
13:23
No, this is what Kendall does to get off.
@Neoares he's whatever I say he is
@KendallFrey, be a physicist
and you say whatever I tell you to
there
@towc sexual slave included?
13:24
you can't enslave the willing
oh, kurt G popped up in autocomplete
@towc Right now I'm working on a purely mathematical algorithm
I'm working on a purely intuitive and emotional algorithm
If I knew what I was doing, I'd be proud
> our servers use emotionally evaluated endpoints and top purely intuitively developed boxes
I guess I'm old enough to not be able to say that I'm good at maths anymore
potential I might have had gone to waste
I could have been an olympic champion, but watcha know
they said you could be president, towc. But here I am, trying to get my basil not to end it
I better get back to pretending to work
(I'm still doing that twatter thing)
we don't wanna hear about your twatter
13:30
y'all'll hear about my twatter alright
love writing a bunch of code, testing it, and my only problems are typos
good feels man
@SterlingArcher @KendallFrey i.imgur.com/K6tS1F5.jpg
@Luggage I'm playing around with relational dbs again, and trying to get stuff in as few queries as possible. For example, previously, when fetching all twats from a user given the name of the user, I'd do something like this: select id from users where users.name = <some name> → javascript gets id and calls next query → select <stuff> from twats where twats.author_id = <that id>
I soon realized this is bad, and I can just do: select <stuff> from twats join users on (users.name = <some name> and twats.author_id = users.id)
only compare the IDs in the join, and put the username filter as a 'where'.
But yes, joining is the normal way to select items from one tables based on values in a related table.
the only way I can get knex to do it though (without using raws) is select <stuff> from twats join users on (users.name = <some name>) where twats.author_id = users.id
.
no, that's backwords.
13:38
I'd guess the latter is a lot slower, but maybe it's actually the relational way of doing it?
SELECT
    twats.foo
FROM twats
JOIN users ON users.id = twats.author_id
WHERE users.name LIKE '...'
The join should only involve those values that link the tables (typically)
oh, I think I see
it semantically makes sense, yup
thanks
yeah, that's literally what I had. Welp, at least now I don't feel dirty af
Hi someone is here who know something about nodeJS + AngularJS??
user406009
@PiotrekJabłoński You might as well just ask your question.
I I have a great problem creating a board design function that has trello.
I have created lists and cards, now I have created 2 separate queries, one gets all the names of the list, the second query gets all the cards, I created 2 separate directives and now I do not know what to do next to display the list and matched cards under it
Can u help me @Lalaland
user406009
13:47
That's not really a concrete question. Not sure what exactly you are asking. What have you tried?
sec, I will prepare
a photo gallery where the user has the ability to review each photo...anyone knows one?plug-in?
what a douchenozzle
13:55
Why are these the same
what did you expect to change?
Shouldn't the bottom one be 1 less?
they look the same length to me
!!> Number.MAX_SAFE_INTEGER
@KendallFrey 9007199254740991
13:57
You're well above that
wait, do you mean the displaying or the numbers themselves?
Guys, is there a way to call a method, so it no longer has access to it's parent scope?
That's binary @towc
For example: const x = []; function test(){} can I call test so it can't access x?
since when is that binary
that is decimal
13:58
@Cereal Then stop using it as decimal
0x11110101101001110000001010000011110111110010111000010000 == 0x11110101101001110000001010000011110111110010111000001111
true
>:(
it's still well above the margin
that's hex
try actually converting them
Oops
13:58
also, yeah, that's hex
0b is binary
ur a binary
0b11110101101001110000001010000011110111110010111000010000 == 0b11110101101001110000001010000011110111110010111000001111
true
left converts to 69144998538325520
!!> 69144998538325520 > Number.MAX_SAFE_INTEGER
@towc true
0b10101101001110000001010000011110111110010111000010000 == 0b10101101001110000001010000011110111110010111000001111
13:59
hence your problem
I took 1s off the front until it returned false
!!> 0b11110101101001110000001010000011110111110010111000010000 > Number.MAX_SAFE_INTEGER
@KendallFrey true
@KendallFrey Did you see the final image from Cassini this morning?
Even in binary, still above
@Trasiva no
!!> 0b11110101101001110000001010000011110111110010111000010000
14:00
@Neoares 69144998538325520
!!> Number.MAX_SAFE_INTEGER
@Neoares 9007199254740991
@Cereal funnily enough, if you use strings:
!!> '11110101101001110000001010000011110111110010111000010000' > '11110101101001110000001010000011110111110010111000001111'
@towc true
14:01
@KendallFrey Last image before impact, facing the night side of saturn
looks boring
RIP cassini
@Cerbrus the only thing I can think of is shoving it into a webworker :s
It'll probably be better once it's processed. They've only had the image two hours and change.
@rlemon Worth a shot
It's not for production
14:03
@Cerbrus const x = []; { let x = void(0); function test(){ ... } } or something like that? What can you change in the function itself?
I hear that if you play Saturn's rings backwards it plays satanic messages,
@Luggage Forward they play NickelBack, so probably.
@towc I don't know x's name
oh, so the new function can't have access to anything from previous scopes?
or is this just global scope?
@Cerbrus btw there's an error in the statement
14:07
@Neoares What? where?
@Lalaland displays the names of the letters in turn, then at the very end they display all the cards in the ul, and wants to make each card name display cards matched after card._list == list._id jsfiddle.net/342nqkL7/56
@Cerbrus why would you need those kinds of functions :/
@Cerbrus in the first matrix, 2nd row last column
should be true
@towc you mean serialization?
or are you the one creating the question?
14:09
but we all got the point
@towc People are cheezing it by dumping the input into a global variable.
@towc I am
oh, so you're making the question
@ssube u wot now
@Neoares Aye, thanks!
@Cerbrus you might want to specify what the maze looks like
I feel like you can compress it if you know more about the maze
@Cerbrus oh you're the creator of the quiz xDDDDD
didn't realize
14:12
does it never loop? Does it ever branch? Are all straight paths with a length of multiples of 2?
what's your mother's maiden name?
are the entry and exit points fixed?
you can technically encode that maze in 0 characters
0 is the worst maze ever
might be useful to be given a big O notation of that algorithm, alongside saying that 9 is what you can get
I mean, encode that particular maze with no characters
dafuq... sokra jumped from Webpack 3.5.6 to 3.6.0 for two minor bugfixes?
scared the crap out of me when I saw the jump on npm
@towc then return an empty string if you see the reference map, see if it passes the tests
@towc: just consider it an array of true / false
14:18
you could map any possible maze within a certain range to a 1:1 string of all transferrable characters (and as far as javascript can handle, that's 2^16), that way you really have the smallest compression. And thing is you can pick where to start and it doesn't need to be incremental
There's no logic to where the walls are
@Cerbrus well, then it's not a maze :/
the last message I wrote is still valid though
although a bit bigger
the smallest compression is most likely just sensible compression on a bitmap
but still, you can get that pattern with a single character
mazes and similar things lend themselves well to RLE
14:19
Hey, Can we move 1 directiv (<my-card>) inside another? (my-list)? gist.github.com/anonymous/944cf160c67dafee94acb28063a8727b
turn it into a single-bit bitmap, RLE and/or GZIP, and all that's left is deciding where SSL termination goes and how marketing ships it
imagine something like this:

a → 0

b → 1

c → 00

d → 01

e → 10

f → 11

g → 0
    0

h → 0
    1

j → 1
    0

k → 1
    1

l → 00
    00

... 65536 times until you fill up a single character
@luggage createObject, byt i thought all components have an init method even if you don't define one
sure, this might mean that a pattern comprising of 0000000000000000000000000000001 might take A LOT of characters to get compressed, but that depends on what you're optimizing for
turns out "new" works, too.
14:22
@towc that just sounds like a more naive version of huffman coding
@ssube you're naive
with some limited spatial awareness
> I have to implement an accordion(like the ones you get with jquery-ui) that must be compatible with Internet Explorer 5 (yes, I know... but it's a mandatory request to be satisfied).
poor bastard
is that even possible? Server side rendering?
@towc maybe I am, what's it to ya
14:23
@ssube I got a basil, you can't do anything to me
Binary write:
w in LEB128
h in LEB128
then pack 8 true/false into each byte.
wouldn't that be the shortest possible?
e.g. uint8array :-P
IE5?
@towc I got a whole garden bro
IE4 for mac
14:24
so can we use fetch() ??
@RoelvanUden you can compress most of those bytes, because (assuming the maze isn't completely random noise) you'll have large groups of identical walls/spaces
> yes, I know
i think he has no idea
@ssube a'ight chill bro I don't want to start a war just coz u's got more basilz, than me
@rlemon I bet Holly can relate too.
14:26
@ssube Hm yeah, you're probably right. Not sure how you'd do that though :-D
@towc I don't have any basil in my garden, too much shade. :\
not really. I've had to buy separate toothpaste tubes because hers looks like a hot mess and mines rolled up from back to front and there isn't any goopy or crust toothpaste on the cap that always ends up making its way back onto the tube. like a fucking human.
> no basil in garden
@ssube ha!
hahahhaha yo shit weak son
14:27
@RoelvanUden RLE is a good start for this sort of thing, but GZIP or LZMA would also work. Essentially, you just want to encode it as a PNG image and compress that.
root-me.org/?lang=en <- I like that more than codewars btw
@cerbus well my one idea didn't work, rip
@ssube Sounds like a lot of overhead
It's almost exactly what you suggested, just using a well-known format. :P
and off-the-shelf compression
RLE is like 50% of my name man.
14:28
@ssube So you'd still pack the bits and put them into a PNG?
@RoelvanUden the bits are the png, but if I understand you, yes
@rlemon took me way too long to figure out the thing that you should figure out
those might be small enough that the PNG header costs too much, though, but the same compression should work
Sure, but then you'd just do the two bytes for w/h + 4 bytes for the map (=6 bytes)
I don't know if lzma helps in this case.
That said, depending on the maximum sizes of w/h, you can easily make that smaller too.
yeah, it'd be a bit simpler if the maps were much larger
14:31
Indeed.
as-is, RLE is probably your only option
there might be 2D forms of that
Indeed, hence I picked leb128 since I know it and it's simple :p
For the sizes, that is.
RLE would be useful for the map data but not on this scale
I've had good luck with RLE on 2 and 3D blocks about that size, actually
user2620028
guys i was fiddling with webpack last night, is there any way to just compile jsx or scss files into js or css files? I am only familiar with it building into one big bundle file that is minified and whatnot.
especially when it's 1-bit and heavily clustered like that or minecraft maps (air/land)
that's genius
4edgy5me
was it even meant as a protest post?
looks like the font was changed later. I might be completely wrong
I think that my webpack dev server is making requests from paths on my router (e.g., https://localhost:3000/browse/something.js). Is there a way to fix this? Public path?
@corvid elaborate, please.
@KendallFrey
@Luggage I'm hitting some deeply nested routes, such as /users/1. It will break my app completely, it seems to be requesting stuff with the pathname as well
@SterlingArcher imagine that mass, baby
14:40
dat mass mmmmm
@SterlingArcher I'm 99.9% sure you don't get the reference there
anything travelling faster then the speed of light has an imaginary mass
@corvid is it an asset that is requested via* the wrong url or a request that'smaking it to webpack-dev-server and should be internal to the SPA?
I'm familiar with the moving parts here, but I still dont' know your specific cplaint. It could be a few things.
That's because mass increases as the speed increases and gets closer to the speed of light, whereas if it reaches the speed of light (c) it becomes infinite
So yes I actually get that one Kendall. You taught me that lol
dick
14:43
@SterlingArcher Not exactly but I'll give you a point for that
"Not exactly", Kendall's mating call.
3
it's his version of "I'm mr meeseeks"
> You're wrong on the internet, sleep with me.
We need to find Kendall a woman who is smarter than him at space
14:44
Yes, of course
@SterlingArcher I like how you subconsciously link physics with space. You know we have physics on earth too.
Holy shit
@KendallFrey nobody on earth gives a shit out earth physics
owwwwch
@SterlingArcher earth physics are the same as space physics
I reject your science
that's cause the earth is in space
14:47
says you.
!!quote get sciencevsfacts
prove it
in C#, Sep 6 at 20:20, by 007
that is science friends... it has nothing to do with facts
where else would it be?
if it was in space, we'd all suffocate
14:47
@ssube on the back of a tortoise, duh
I got a solution for this, but I'm probably not thinking relationally enough and being a bad developer. Again, imagine a simplified twitter scenario. I'm trying to fetch the current user's timeline. I need to find all tweets by users who are followed by the current user. I have 3 tables: 'users', 'user_relationships', and 'tweets'. I start by having the id of the current user. What path do I take? cc: @Luggage
@KendallFrey did you see the idea to put a giant electromagnetic field between mars and the sun so that mars could recover from the constant solar winds?
You know cause mars no longer has a magnetic field
sounds expensive
And also I don't think that's how "recovery" works
14:49
phase 2 is dumping a bunch of magnets on the poles
@Luggage well, I have this vendor.dll.js file. If I go to /users, the app still works. If I go to /users/1, the whole app breaks
the atmosphere's gone, it's not gonna just come back if you ask it nicely
No but it's a step towards terraforming
I can both find all users that satisfy the "following" relationship from the current user, and get all the tweets from those users (then order by date, offset, and limit them), but I don't really know how to do the 2 first things at the same time
14:50
Mars used to have an electromagnetic field, so it can ... grow? one again with the right push
also technically there is an electromagnetic field there already
@corvid ir tried to get vendor.dll.js from aonther url? then it's probably the publicPath in the webpack config
there's one everywhere
@towc remind me of the columns on user_relationships again, please.
@SterlingArcher Sure, get a giant spoon and stir up the core
14:51
from_id, to_id, type (this is where you'd see if it's following or not)
> During the Planetary Science Vision 2050 Workshop[16] in late February 2017, a NASA scientist (Jim Green) proposed launching a magnetic dipole field between the planet and the Sun to protect it from high-energy solar particles. It would be located at the L1 orbit at about 320 RAstronomical symbol of Mars. The field would need to be "Earth comparable" and sustain 50,000nT as measured at 1 Earth-radius.
this project is frustrating me :\ nothing works right
> The paper abstract cites that this could be achieved by a magnet with a strength of 1-2 Tesla (or 10,000 to 20,000 Gauss) [45] If constructed, the shield would allow the planet to restore its atmosphere and become habitable.
SELECT twats.*
FROM twats
JOIN users author ON author.id = twats.author_id
JOIN user_relationships r ON r.to_id = author.id AND r.type = "following"
WHERE r.from_id = ?
all tweets from people the user is following (1 level deep only)
@Luggage Well one thing I notice is that the app is making the same cookies for different pathnames, e.g., there is a cookie for / with some key, but that same key under /browse
14:52
that first join is not needed..
wait, let me wrap my head around that a bit
@SterlingArcher What if we put a giant window there instead?
SELECT twats.*
FROM twats
JOIN user_relationships r ON r.to_id = twats.author_id AND r.type = "following"
WHERE r.from_id = ?
JOIN users author on author.id = twats.author_id not sure how you're joining on users there?
let the light through, but not the wind
14:53
ah nvm it's an alias
been too long, sorry
ok, I think I got it
I should have used "AS" keyword for the alias to make them more clear.
still not intuitive (that's my fault, I guess it comes with practice)
SQL becomes intuitive with practice, yes.
14:55
@Cerbrus so I compressed your maze to this 5|5|i71of
which is length 9, as you said
Looks like the solution I was going for
trying to think if I can compress the shape better
ok, thanks a lot :)
@Trasiva I've yet to see someone chew with their hands.

« first day (2526 days earlier)      last day (2645 days later) »