« first day (2488 days earlier)      last day (2458 days later) » 

12:00 AM
can the globally accepted standard year start at 1970 already?
@Arrow where?
 
god I have to look at it again ok
 
I should sleep
 
I don't understand this maths book
 
going for a run in 5.5hrs
picking up a friend from the UK in 10hrs
 
You should sleep.
 
12:02 AM
likely seeing the slovak girl in 28hrs 😃
 
ill smuggle myself out of the UK then
 
then I'll be seeing my parents in 35hrs
then they'll try to not make me go back to bratislava
to feel like a failure so I can lose any confidence in my life and come back to be their child
and go to university, and follow their dreams
I'll sleep now
 
hey I have the same damn problem
 
omg you have parents too and happen to be a teen?
that's so cool!
 
well im 25 but heh
 
12:05 AM
Slovak chicks are hairy
 
my parents are messed up too
ill prolly murder em soon
 
@Arrow fluffy
 
@LaserLemon livestream it
slovak girls are the hottest I've seen in europe
 
does this make sense:
var costheta1 = bob.velocity.dot(diff) / (bob.velocity.mag() * dist) || 1,
    costheta2 = obob.velocity.dot(diff) / (obob.velocity.mag() * dist) || 1,
    u1 = bob.velocity.copy().multiply(costheta1),
    u2 = obob.velocity.copy().multiply(costheta2),
    v2 = u1.copy().multiply(2 * bob.mass).add(u2.copy().multiply(obob.mass - bob.mass)).divide(obob.mass + bob.mass),
    v1 = v2.copy().add(u2).subtract(u1);
bob.velocity.multiply(1 - costheta1 * costheta1).add(v1.multiply(costheta1));
obob.velocity.multiply(1 - costheta2 * costheta2).add(v1.multiply(costheta2));
 
12:07 AM
@Tobiq as I say (to you): yes, roll with it. It's not like anyone's input but your own matters anyway
so yeah, it works, go
 
thanks so muc towc
always helpful
 
indeed
 
ya, fluff... and they have chiseled faces like Arnold Schwarzenegger. You are essentially meeting a woman in a man's body.
 
then I can finally be little spoon for a change.
 
some men want to be dominated, If you are into that kind of thing.
I'm a vanilla type of guy, uninteresting one flavor, no toppings.
 
12:25 AM
How can I read more
I hate reading
 
Learn to love reading
 
Its very weird, should I just change the font
 
Otherwise you're int he wrong field
 
but its so long
howd you get into reading
 
wow redis X-Response-Time:2.111ms
 
12:37 AM
@Tobiq By reading
 
@Arrow the wires in your computer aren't very long
 
wifi
@mosho are you saying it should be faster
 
no
 
it's an in-memory store. of course it's fast
 
My automocker now does a sinon stub on everything you give it! 😎
 
12:41 AM
X-Response-Time:0.401ms, but if I do it again I get X-Response-Time:825.434ms
 
object[key] <- 0ms
 
Is that because I am overwriting that last response when I make a new request
 
what are you using?
what is X-Response-Time from?
 
Ill spit out the code right here so you can see it
small script
// require the dependencies we installed
var app = require('express')();
var responseTime = require('response-time')
var axios = require('axios');
var redis = require('redis');

// create a new redis client and connect to our local redis instance
var client = redis.createClient();

// if an error occurs, print it to the console
client.on('error', function (err) {
    console.log("Error " + err);
});

app.set('port', (process.env.PORT || 5000));
// set up the response-time middleware
app.use(responseTime());
 
@phenomnomnominal Oh? Show?
 
12:46 AM
so.. how does redis participate in that? I don't see it.
 
redis.createClient(()
 
ohh, more code. i didn't click
 
client.get(username,function
 
it('should let you stub all functions', () => {
    ineeda.config({
        intercept: (value, key: string, values, target) => {
            if (value instanceof Function) {
                target[key] = () => { };
                return sinon.stub(target, key, values[key]);
            }
            return value;
        },
        unproxy: {
            keys: ['restore', 'calledBefore']
        }
    });

    let weapon = ineeda<Weapon>();
    weapon.sharpen();

    expect(weapon.sharpen).to.have.been.called;
I added a mechanism for intercepting the proxy values
You'd just do that once in your test setup, and then you could do:
foo.bar.baz.bot();
expect(foo.bar.baz.bot).to.have.been.called();
 
Neat! I may have to steal this
 
12:50 AM
seems more consistent now, since I up'ed the time from 60s to 700
 
If you are just using Redis for caching, why not use a proxy and do something with shared caching instead, if you are not going to use Redis as a DB? Is this a stupid question to even be asking?
 
No, not stupid.
caching at the http request level is valid and better suited some some cases
but consider redis for more custom caching. say, logged in users, a list of in-progress tasks, etc.
caching is probably the wrong word for that example.
 
So Redis is more suited for things you need more control over, like tasks etc..
 
it can be either. caching OR an in-memory db
I use it to store use session data, for example. You could say that I cam 'caching' users, but I think of it more like my "application state".
 
12:57 AM
this is an amazing name for a theorem: "Argument principle"
maximum ambiguousness and generality achieved
well done cacuchy
 
What does this mean:
i know what dot is
 
randomly dropping in
 
!!afk randomly dropping out
 
@Tobiq dot product
 
1:02 AM
yes i know what the dot product is
 
The n thing is a unit vector.
 
im talking about the bracks
 
@phenomnomnominal Do you need to unproxy native promises?
 
what do the bracket
s represent?
 
Multiplication
 
1:03 AM
interesting, so you use it to manage your application state. that means your client relies heavily on the server. Client side logic using session storage seems more efficient for state management at least to me.
 
oj, i thought it was way more complex than that
so (1,2)(1,2) = (1,4)?
square bracket is the same right, used to differentiate between round?
 
So, vn2 is a vector of magnitude v2 and is in the direction n_.
@Tobiq yes
 
thanks
 
Mathematical notation is so much more terse than programatic notation. Sometimes I wish they'd taught programming in school before math
 
@littlepootis mmm no it's not
 
1:06 AM
Yeah, it's not.
The magnitude is |v2|. |n_|.cos x. x is the angle between n_ and v2.
I derped.
 
@monners shouldn't do
 
Schweet
 
unless you're using .then to work out if something is a Promise
 
which is a perfectly valid way to do it
 
sure, just causes issues if you have a proxy that will go "YEP I HAVE THAT!" if you ask about any property.
 
1:17 AM
Hi JS friends
 
mildly interesting
 
far right
 
Is there a correct answer?
 
or second from left
 
1:32 AM
brb betting mildly baked
 
oh god
 
The first
 
Whoever made that is a jerk
 
yeah the first
 
@monners Yeah, it's not that tricky once you think about the whole thing
 
1:32 AM
shit. there are two single characteristics
 
I mean the circle is the only one that differs on edge count
 
and green on color count
 
and it is green
no it isnt
 
probably square without border
 
It really depends on what characteristics you're measuring against. Otherwise they're all unique in some way
 
1:34 AM
But which one is the most unique?
 
although I guess the first is "unique" in that it's the only one that shares a characteristic with all the others
 
ooooohhhhh
 
@phenomnomnominal What characteristic is that?
 
Good call
 
not the same one with them all
but one with at least one other
 
1:35 AM
THEY'RE ALL SHAPES!!!
 
mmm shapes
 
It's unique in that it's not unique
 
Actually the first one is the only one that shares three characteristics with each of the others.
 
good morning lovelies
 
@littlepootis feel the extrasolar energies flow through your chakras
@KendallFrey only two with the second no?
 
1:36 AM
@FélixGagnon-Grenier Size, shape, and colour
 
ah no, size
:)
being two years old is hard
 
The first one shares exactly two characteristics with each of the others
So what's the answer then?
 
Get out.
 
You could also word it as 'the first one is the only one without a unique characteristic'
 
1:39 AM
@monners No, three
 
@QuantumRobin Welcome to the JavaScript chat! Please review the room rules. Pleasedon't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
@KendallFrey List them
 
@david how paradoxical
@monners For which other one?
 
1:39 AM
Oh, wait, size
Derp
You're right
 
oh god, paradoxical makes me think about someone confused op asking stuff in the chat and greatly miswriting some term, but I can't remember the term!!!
(actually, I'm not convinced it was in r17, but I think so)
something about polymorphicalistic or some shit like that
 
oh that lol
 
yeah, you remember?
there was a great "say polymorphistical one more time" meme out of it
god I wish I had kept a bookmark
 
Jul 28 at 17:48, by Tobiq
    I want this:

https.get(URL, killConnection)

http.get(URL, killConnection)

http.createServer((req,res)=>killConnection(req) )

killConnection = req => {

    /// how polymorhphicsally kill conection?

}
 
... is it mean if I would assume it's tobiq who was asking?
LOOOLOOLLLLLLLLLLLLLLLLLLLLLL
 
1:43 AM
@FélixGagnon-Grenier Well, it's correct
Jul 28 at 18:26, by Sterling Archer
user image
 
awwwwwwww <3
 
1:58 AM
does anyone ever use the docker community edition?
or is the standard the go to download
 
Well
I'm poor, so..
 
you are saying only poor people use the community edition
 
No, p => q doesn't imply q => p
 
do you guys usually keep all your scripts on one file?
I'm reading that it should be because of load times, but I find it's a bit harder to keep track of everything
 
2:06 AM
poor people are equal to or greater than q( I am assuming q stands for quality) does not imply q(quality) is equal to or greater than poor people?
@littlepootis you are a funny person
@Chenny ya, it's called using uglify and minify
@Chenny you should sperate your code into different files for your own sanity, and for scalability so other can also work on the code. However, you should have a build time task that compact all your code into one file and there are many packages that will do that for you.
 
@Arrow oh I see, so minifying is for when you put script up and want it to be loaded faster. But I'm wondering, people just have 1 script file for a page these days right? Even if it's a pretty complicated script that could span like more than like 2k lines?
oh
So while i'm working on it, split it up, but once I put it up, compress it and put it all into one file
 
If you ask me, I think one file makes sense. but IDE's effectively allow you to treat your different files as a single file
 
@Chenny most the time, the file you see isn't how the structure actually exists for the developer. They most likely use gulp or webpack to bundle it all into 1 file.
 
If you are by yourself, and it makes sense to keep everything in one file, then do that, if it makes it easy for you. However, if you expect other people to be working on it with you. Follow standard conventions.
 
do they? I'm using brackets, I dont see how I could split this up besides like getting a word finder or something
Right, no I'm going to be working with some people on this, but I just came from learning java so I'm not sure what's standard
 
2:19 AM
I know I personally have a project that has about 150 different JS modules (it's a huge site), all in their own files, that then get webpacked all into 1 file that the end user can see if he/she views source
 
@Derek Oh okay, so for that site you just minified everything after putting it into 1 file when youre done right?
 
Standard depends on the tools you are using? what framework are you using?
 
@Chenny we have a bootstrap file that includes all the files we need, then we webpack that and it spits out a single file.
 
I'm literally just using vanilla js
@Derek
 
Do you plan on having a front end framework?
 
2:23 AM
@Derek I don't know, this is like my first own project that I'm working on to learn, so I'm not sure what I'll need
 
Well, have you ever used a front end framework?
 
No, should I stop to learn about those?
 
Vanilliajs is fine I would not recommend anything else. but you are going to have to make a big effort to structure your code
 
Personally, I prefer VueJS github.com/vuejs/vue
Most big companies are moving towards front end frameworks
 
Cus I think I will need to. This will be very script intensive, essentially just going to be a canvas and a bunch of frame drawings using the scripts
 
2:25 AM
@Derek that's because you have experience with Javascript
 
truee, I love it
I need to learn react tho lol
 
@Arrow Oh really, interesting. Are you just saying that to get me to learn without the frameworks first?
 
@Chenny yes, you need to learn the patterns for separation of concerns, model, view, controller
Or you can learn angular, java guys love angular
 
i use ampersand.js and react
just to chuck a few more in the ring
 
@Arrow which angular lol
How many are there now that are still supported? 3 different ones?
 
2:31 AM
@Chenny if you are going for performance I would recommend react, express and jsx.
 
Performance, definitely Hapi over express. Express doesn't scale well lol
 
@Arrow Oh okay, I don't know, would I just be separating all my code with like comments I cant see how much more I can try to organise this
oh man lol, so many frameworks, Ill take a look at some of them I guess and ill try to figure it out haha
 
there are, it is overwhelming to start with. I just picked one and went with it.
 
@Derek I don't know much about hapi.
ya sometimes you got to stop thinking and start doing.
 
@Derek Why?
 
2:35 AM
@Arrow check it out, it's really nice. Very opinionated though
 
@Arrow yes, my life is a joke
 
@Derek what makes it so performant?
 
@Arrow well one, it runs a "catbox" with redis
 
preconfigured?
 
Yea
 
2:42 AM
it says "catbox does not include the external caching strategies"
 
It also caches routing
and relies on config more than code
You also get a very short rope to hang yourself with. If you "mess up" (again, it's very opinionated) it won't even run
Plus, the module styled routing setup is heaven
All, again, in my personal opinion
Express is good for starting off just getting up and running
 
looks interesting, but it seems like it relies on Redis for caching. I am sort of interested in a shared caching architecture. However, it says more configuration oriented. I don't know but it looks promising.
 
You can use a shared cache with redis
hell, you could have servers dedicated solely to redis
We have 8
 
why did you guys go with Redis as opposed to proxies?
 
what do you mean? There's a whole caching layer over our database. There's no time that a user hits the database, it goes straight to the cache then gets pushed to the DB
at a later time, of course, or in batches
with a different server
 
2:53 AM
Shared proxy caches
A shared cache is a cache that stores responses to be reused by more than one user. For example, an ISP or your company might have set up a web proxy as part of its local network infrastructure to serve many users so that popular resources are reused a number of times, reducing network traffic and latency.
 
We have a static caching mechanism, but most of the site isn't static, and that's something you'd use it for
 
That makes sense. I've seen proxy caching mechanisms used dynamically, even for chat across clients.
 
Hmm...I'd presume it was used when everything dynamic was loaded with Ajax?
 
I'm not certain. The architecture was the difficult part because communication order mattered
 
Oh the joys of DevOps
 
3:07 AM
There is a Last-Modified and If-Modified-Since headers
 
Yea
 
In fact, it's the architecture that flicker uses
and they serve 5 billion photos
 
Ahhh - we went more of the facebook architecture route just because of the sheer volume of actions per second a user does.
 
do you guys use Nginx?
 
We do
 
3:12 AM
I'm starting to think Redis might be the same thing as proxy caching
 
it's not
 
Nope
 
@ssube what's the difference?
 
the proxy cache holds responses, whole or in sections, where redis holds pieces of data
memory, redis, and the database are like CPU cache, RAM, and HDD
each one has more capacity at the cost of more latency
 
@ssube memcacheD or Redis?
which do you prefer
 
3:19 AM
@ssube can't you use the proxy cache responses in a data like fashion?
 
@Arrow often your app is unaware of any caching on the proxy. Think cloudflare et al.
@Derek I've used both in anger and haven't regretted either, but redis is easier from the developer side, I think.
 
It's so much easier. Plus, I think MemcacheD doesn't handle race conditions well
 
"𝑝 ⇒ 𝑞 (Although this symbol is often used for logical consequence (i.e., logical implication) rather than for material conditional.)" -- seems like the skinny arrow p→q would have been more clear :P
 
@ssube couldn't you update the cache data outside the application flow and just consume cached data on the application?
 
3:36 AM
for small amounts of data (<10GB in memory, say) there's no real performance increase, but it's much more complex
for larger data sets, that's the idea behind map/reduce and eventually consistent databases
 
Well, it's clearly architecture heavy, but it makes sense for applications that need to scale, while still being performant.
 
is this water-like
 
Netflix uses EVCache
 
needs gravity
 
70+ clusters, 200 applications, data replicated over 3 Aws regions, over 1 million replications per second, 65billion objects,30million ops second,160tb of data stored
 
3:48 AM
@david its a birds-eye view
it's like this, right:
 
proxy-prod-> api-prod they are basically nested collections cashing architecture lol
 
4:10 AM
trying to get my app through closure compiler is a nightmare.
 
4:52 AM
simple optimization should be easy, but for advanced you would have had to have written your code targeted at the compiler
 
just had a nightmare in which that code I sent in for production wasn't working
there was a realistic skype chat with the client and all
I was reading syntax errors from babel outputs ffs
it wasn't funny
the issue was that the css wasn't properly being built because it required specific names
but then it wasn't syntax..?
but it all made sense, bit by bit
I must have spent 3 hours in my sleep just working on the issue. So detailed. Then at one point I'm like "this feels slightly unreal. Let me try waking up"
I touch something to my left. It's a phone. Slowly try to open one eye. Insert pin. Go on skype. No new messages.
I laughed so hard
anyway, as a result , I woke up 1h10min early
slept 4h20min
tried going back to sleep again, half managed
 
looking at my phone always makes me wake up
it's not so bad when I have those night time filters on
 
but then I thought the apartment was a mess and I was about receive guests and all so I better get to work
but guess what? That was mess that I wasn't cleaning up in the dream because I really had to get the job done
wtf towc
don't listen to yourself
sterling hasn't acknowledged my xml/json parser, has he?
 
5:07 AM
no
 
:/
chances are he's got real things to take care of
a'ight, out for that run I promised
 
5:36 AM
i have this string a(bc)de now how do i get only 'bc' out of this string ?
 
is the target always in parentheses?
 
split('(') returns ["a", "bc)de"]
yes
 
given string de(xyz)bc do you want xyz
I'd personally use regular expressions
 
yes but it may contain nested parentheses also
 
do you want those?
 
5:39 AM
not parentheses but content inside parentheses
 
ab((c(d)e))fg = (c(d)e)
 
s = "abc(cba)ab(bac)c" => "abcabcabcabc"
it has to be reversed also
 
\(.+\)
but uhh im not sure that would work with parentheses inside parenthesis
 
no
 
but i wants to know only that how to get data inside of ()
 
5:43 AM
\((?'match'.*)\)
that's how I would do it
you can remove the () from the result using a string replace
and you can reverse it yourself
 
solved it with this (([^()]*))
why can't i access picture[1].length
where picture = ["abc","ded"]
errod: Cannot read property 'length' of undefined
 
6:16 AM
HAMMERTIME
 
are you sure picture is that array?
 
 
enterprise code === shit
 
that's the idea, yeah
 
6:20 AM
> are you sure picture is that array?
I don't think I ever want to be informed of the context of that sentence
inb4 "ffs Felix, stop getting here and railing out our fun, ur drunk"
 
7:18 AM
moornin
 
what is enterprise code?
 
> This document updates RFC6761 by requiring that the domain "localhost." and any names falling within ".localhost." resolve to loopback addresses. This would allow other specifications to join regular users in drawing the common-sense conclusions that "localhost" means "localhost", and doesn't resolve to somewhere else on the network.
 
@towc When you have night terrors about about css, you know you're doing it right
 
7:50 AM
HAhaha I work on enterprise code hahahah
 
@BenFortune reading that, it feels like enterprise code is a good thing
is it?
 
Im creating a sass transition mixin , mixin should take one string in , but in code my mixin will be called with comma separated values , "include transition(opacity 1s , transform 3s , height 3s)". Can I just combine all of them into one string in my mixin?
 
I thought it was always a way to mock code that has been made too structured
 
@Paran0a my sass is really rusty, but you should, yeah. It's probably highly discouraged
maybe if you escape the comma?
 
7:55 AM
It's a transition css propertys , I have to combine then in one string one way or the other
Hmm I'm currently researching what I could do
 
morning room 17
 
why are you including and not just setting transition btw?
 
Mornin'
 
do you always add another set?
 
@towc It can be, but a lot of it is over the top, like that repo.
 
7:57 AM
@BenFortune oh! Do you have an example of good ones?
 
We currently have compass leftovers , compasses transition mixin is mentioned in a lot of files , so I'll just remove the compass dependency and add my own. That way I don't need to touch ton of code , just the source
 
@towc Not really, not many corporations are willing to share their codebase.
 
hmmm enterprise code is in enterprises. Not sure how did I not see that far.
there was a book someone mentioned about good programming patterns
 

« first day (2488 days earlier)      last day (2458 days later) »