« first day (2425 days earlier)      last day (2748 days later) » 

23:00
Random question, socket heartbeats are just fancy ajax calls right?
it's a socket message sent strictly for the purpose of determining if the other side is still present
as opposed to fetching data or publishing a message
But it's still over HTTP correct? Or does the TCP socket use a different protocol
wait
HTTP is TCP right?
(making assumption) it should be over the existing channel.
yes, http is tcp
i assume webpackets are too
yes..
btw, I'm answering on general knowldge of what a heartbeat is. I barely use webockets and am not terribly familiar with what they have available.
Hmm, I'm trying to figure out how they benefit over xhr, and my initial guess is the headers make it so you can pass data faster with less overhead
mm.. that doesn't sound right.
23:05
the heartbeat ping/pong should be sent over ws[s]
which reduces latency by transfering less information, right/
> In order to ensure the message can be properly reconstructed when it reaches the client each frame is prefixed with 4-12 bytes of data about the payload. Using this frame-based messaging system helps to reduce the amount of non-payload data that is transferred, leading to significant reductions in latency.
it's a single opt code
context of that quote?
> A ping or pong is just a regular frame, but it's a control frame. Pings have an opcode of 0x9, and pongs have an opcode of 0xA. When you get a ping, send back a pong with the exact same Payload Data as the ping (for pings and pongs, the max payload length is 125). You might also get a pong without ever sending a ping; ignore this if it happens.
hm. i see. I use websockets with high level bullshit libraries, so.. I should shut up
I don't know what I'm talking about here.
I didn't know it used an Upgrade header
that i knew, since i had to configure nginx to respect it
the first request is (I think) always a http request with an upgrade header
23:09
so the server knows you are capable of websockets
So XHR and WS essentially follow the same protocol, but that initial handshake request allows WS to send more data, less headers in the requests, whereas XHR sends headers every single request
xhr is just a normal web request
1 request (always by the client), 1 response (from the server)
websockets keep a connection alive and allow the data to go both ways
(as in the server can send you a message without you making a request)
but websockets being kept alive is a succession of pings, no?
essentially headerless (less header?) xhr polls?
it's just a tcp connection that doesn't close, at one level. There may be ping/heartbeats but I don't know those details of it.
Ah, from what I'm reading a socket connection expects a heartbeat every X seconds or it closes
23:14
Okay, nuff JS for today. See yall tomorrow! o7
if we ignore "keep-alive" in normal http, that always closes a connection each and every request
So it's like a db connection pool?
http: open connection, send 1 request, get one response, close.
websockets: open connection. send as often as you like, receive as often as the server sends, close if/when you choose.
Well, maybe not. An unclosed db connection leaks memory
It sounds like sockets will automagically close the tcp connection before it leaks
sockets are cool
leaving somethign open doesn't mean leak..
db connections can stay open
and websockets aren't out to solve that either
they allow faster communication because the connection doesn't have to be negotiated each time you want to send some data
it's already open and ready.
23:17
@Luggage *for the session
;)
I think I know the problems he's faced in the past.
Faced that problem too, my server kept crashing because I never closed the db connection
learned about mem leaks the hard way
a connection pool solved that by simply not requiring you to close and only handing you connections from the pool instead of making on each time.
a shitty db is shitty tho. and someone who doesn't know much about databases will make all sorts of errors (speaking mostly for myself)
that's why I love postgres.
big community, good docs, robust db that I can't fuckup too badly
.get(/something, () => {
    new connection(); // new connection each time, bad
})

.get(/something, () => {
    getFromPool(); // give you an unused connection that is left open (on purpose)
})
very abbreviated.
jesus github
23:20
@Luggage but in a connection pool it's still possible to open more connections that are pooled out
outages are now almost daily.
hm.. it IS similar in that it saves you the TIME of opening a new connectio.
the pool should manage that.. but it's possible for the pool to not know a connection is free to go back in the pool and get closed.
@rlemon maybe their blind servers were shut down because they all ended up being male
I can't imagine these recent chain of outages is helping githubs profits.
people are so quick to jump ship
@SterlingArcher I'd like to think their engineering team and their social outlook/PR team are not in control of the same shit
Key work like
23:23
I don't know what your previous memory leaks were, but connection pools are good, not bad.
shit GH is down
I can have faith in their tech and not support their public image.
if used without accidently leaking connections.
that's true for most tech companies actually.
PR is cancer now a days
23:23
pull request?
It's making it really hard to enjoy being upper middle class
yea, i imagine you are quite oppressed.
PR isn't cancer, PR trying to be PC to the point of alienating a whole new set of people is cancer.
You have no idea!
Do you even know what it's like to be eye banged everyday because you're wearing a gold watch and a bear coat?
No, because I wouldn't be caught dead in a gold watch and bear coat.
23:25
that's not a thing and you know it
Did you know a real fur bear coat costs upwards of $10,000+?
#FirstWorldGoals
they're looking at your car and thinking "fuck, if only he'd take off that gaudy watch and stupid coat"
How else are they going to notice me? Eyebrows aren't everything now a days.
get theme music
@rlemon I went to see a house today
23:27
... :O
riding on a buss, riding on a buss..
it had something called an "artesian well"
like a pond
with fish
what kinda fish?
coy
23:27
how deep was the pond
Anyways, jokes aside, you're right lemon
maybe 3 feet?
1 meter
was it fenced?
fenced how
23:28
like you would a pool
it had concrete walls
anything > 3ft and you need a fence
oh
^ insurance will drill you
there was railing
23:28
my pond is only 3ft for that reason
not a real fence
railing wouldn't do. so probs 3ft max
God forbid some idiot hurts themselves in 3 feet of water you're liable
and all the neighbours had one
good. lots of bees
23:29
it flows from one to the next
Wait do Canadians sue a lot?
not that many mosquitoes as you can imagine
fish eat them
@NathanJones love that unexpected national anthem solo
you should see the insurance on the the 6 foot pit with spikes I have in my front yard. just stupid
it was a little run down
but the yard was in great shape
23:29
@NathanJones yeah me too
i don't even need you guys
Because in VA the laws are so against pools and shit that people would break into peoples pools, hurt themselves and win lawsuits if the pools fencing wasn't up to code
200 feet lot
lol. that's like opposite of everything else going
nice house, shitty lot is the norm.
but it's close to the highway
backing on to the ramp
noise
23:30
yeah
unless you plant a shitload of trees
constant
and even then
the pond probably helps 😃
put in a waterfall.
and the house was a nice 1400 sqft bungalow
with a huge basement, so around 2800 sqft living space
with hand-something walnut floors
one of the nicer ones I've seen at this price point
ponds are very little work. I'd recommend them for everyone. you need to clean them like 2-3 times a year.. it takes no time at all. if you do it right you don't actually have to feed the fish (for the first few years)
23:32
listed at 559k
they attract a lot of wildlife. and are pleasant to look at.
but I would need to get more friends to populate the backyard
so that's a downside
buy some
another house had a 4 car garage
and a sauna
does anyone use vs code to do their js development?
23:42
what
visual studio code
What's the question?
im debugging node.js/express.js and it breaks on some breakpoints but not on others
ohh, i don't use the debugger much.. i should.
sorry.
but my guess is a source-map issue.
what does that mean? I do see this in the console DevTools failed to parse SourceMap: localhost:3000/bootstrap.css.map
23:45
source maps map the original code to the compiled or bundled code
(babel, webpack, etc)
> Client is looking for full stack engineers, knowing Java on the backend and NodeJS/React or Angular on the front end.
Oh honey
but your example says it's css.. probably not related to the JS breakpoints.
yeah, that was my thinking
im really new to this, so I can see some config for browserify and moonboots
all this was bootstrapped from ampersand.js
i don't use browserify and never even heard of moonboots.
but start by looking up "how to enable sourcemaps in browserify"
lol why does there have to be so many of these things
k, shall do
23:48
!!xkcd standards
@Luggage Something went on fire; status 403
and if you use babel with browserify, look that up, too
(anything that transforms JS into other JS needs to be considered)
ok
going forward using node.js and express.js (do I need to specify this every time or do I just say 'express'?) will I need to create an api class for each type I have? eg I have Students and Courses. in c# I would just have a generic base controller class.
im still on my first app, so its simple right now, but this is something I dont know about for future use
you'll eventually want some logic for courses and for students etc.
you might not need a class, but you'll probably end up with some form of common structure for each object.
your options are endless.
yeah, that's the issue, so many options
and I know so little
I can see me doing something stupid
i do stupid things a lot
23:53
I can't answer "how to structure my app", but when you come up with a more specific problem i might be able to suggest a pattern for that.
ah well, I will keep at it
cheers :)
Just be aware you'll change and re-organize your code a lot as you learn what it needs to do
i have been doing this for nearly 20 years and i still need to refactor my code.
stackoverflow.com/questions/44400659/… lmao they created a new account to post the same exact question stackoverflow.com/questions/44401441/…

« first day (2425 days earlier)      last day (2748 days later) »