« first day (2482 days earlier)      last day (2691 days later) » 

Does anyone have any experience with node js? Im trying to send a variable from the server to client when they connect
@SterlingArcher D:
@RachelDockter sockets.
@RachelDockter If you mean HTTP, HTTP doesn't do "variables". It's just text.
@SterlingArcher yep im using sockets
no its javascript
can i send a pastebin of what i have? it connects the user and sends them an id. but not another variable i want
20:13
.
Thanks for the new title Rachel
I've been looking for one for days now
what do u mean new title?
Shh shh, use your sockets fam.
pastebin.com/0Ku7JwWN - im trying to send the variable "komi" at the bottom. if anyone knows why its not sending id be really grateful
yeh im using sockets
You probably should have mentioned you're using socket.io from the start
is that differnt from regular sockets?
20:16
Yes
sockets are a concept, socket.io is a library
oh my mistake, im using socket.io
sockets.on("connect", socket => {
    socket.emit("connectionVar", someVariable);
});
or connection.. idk
this.socket.of('game').emit('updateRules', rules);
When the socket establishes a connection, emit an event to the client, which listens for said event
i have this at the bottom which should emit it
20:18
Sounds like you want a broadcast, not an emit
hold on let me put a console log and see if its event getting in there
io.of('/foo').on('connection', socket => socket.emit('bar', 'baz'));
oh i can kind of understand this
//i haz a bukkit
I know, my comments really make it readable
//MAKE SURE REDIS IS RUNNING THIS TIME, YOU ASSJACK
Gosh, I really know documentation
20:21
lmao
i was dreading the node js part
always confuses me
you can tie sockets into almost any sort of design pattern, so long as you agree on a messaging format
protobufs are a nice structured way
My middleware is... sketchy. But stable.
So I spent the last 3 days on what looks like a 1-character fix.
its mostly just communicating between documents, on my old project i was sending info from the client to the server app, when then emits to the actual server file, then back to app to do something with, then back to server to send back to client
it was a nightmare
It took me weeks to sync the node session with the socket session and make sure they remained synced
20:23
@RachelDockter are you using JSON or anything for your messages?
Thank fuck I'm not paid by lines of code
no its just pure javascript
JSON is part of pure Javascript
I'm starting with JWT now. @SterlingArcher get on the JWT train with me
oh ok then i guess im using json
20:24
if you pass messages across the socket in JSON, you can treat them as objects on the other end and write decent code
(there are binary options, but JSON is easy)
@rlemon que?
Java with Trains?
i wouldnt even know where to start for that
JSON.stringify
@SterlingArcher json web tokens jwt.io
if i get it done once im fine but what u said just said nothing registers
are u talking about making an array varriable into json then converting in back?
or any variable
20:26
yep
Is this the new babel
well, anything
lol
dude read the site
oh yeh i can do that easy thats not the problem
JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object. This information can be verified and trusted because it is digitally signed. JWTs can be signed using a secret (with the HMAC algorithm) or a public/private key pair using RSA.
20:26
i just have trouble communicating between the client and server
no i will wait 1 year, and then use JWT right before JWT2 comes out.
@RachelDockter once you have that, pick a common field name like messageType and put the thing you want to do in there
I just realized I can use ctrl+alt+fX session to quite quickly move around 100 workspaces 0.o
@SterlingArcher express-jwt makes it some stupid easy middleware bs
at least, at a glance.
I might dedicate one to just vim, so it runs fast af
20:27
don't have it working yet
@ssube did u see the pastebin? i was trying to send a variable from the server to client but it wouldnt send
@rlemon yeah but does it sync node sessions with socket sessions
that's like my career highlight yo
that's not its purpose
sync node sessions with socket sessions
what does that mean?
@ssube it puts the cupcake in its mouth or else it gets the fish again!
2
20:28
@RachelDockter no, I didn't
not the gold fish
would u be able to? - https://pastebin.com/0Ku7JwWN.
im getting the error that server isnt defined when i try send the variable at the bottom
@RachelDockter yeah, I can read the code before making more suggestions. :P
that would be amazing, thankyou
@ssube consider this, sockets don't have access to req.session in node. You have to force them together. So in a socket call back, you can use socket.request.session.sessionID and in a node req callback you can use req.session.sessionID and they're both the same
So it's linking the session context so you can access them safely in separate callbacks
@SterlingArcher if you pass a token with every request/message, that's not a problem
20:30
It's also not a problem if you had shut the fuck up and told me that 2 years ago
GOD DAMMIT SSUBE
I SPENT WEEKS ON THAT
I'm not a fan of JWT specifically, but that way is so much better than traditional sessions
152
A: How to share sessions with Socket.IO 1.x and Express 4.x?

EpeliThe solution is surprisingly simple. It's just not very well documented. It is possible to use the express session middleware as a Socket.IO middleware too with a small adapter like this: sio.use(function(socket, next) { sessionMiddleware(socket.request, socket.request.res, next); }); Here...

@rlemon yup!
I SPENT WEEKS ON THAT
@SterlingArcher lmao
20:31
weeks? it's already answered bro
Yeah, the weeks before were searching for that
I'm sorry, but that's so Jordan
Dont question my methods
@SterlingArcher literally took me 18 seconds
@SterlingArcher Why not?
20:32
and most of that was itching myself.
@SterlingArcher Why do you have so many methods? No more than 6 per class.
Im going home to hit on women. You guys are jerks :(
don't you live with a man?
@rlemon hell yeah, it's like C++ all over again.
look how well that ended up :)
20:35
I dunno, I lost track around C++11
14 looks crazy
just move on to any of the alternatives now
they look better on resumes
yeah, I'll be learning Go eventually
I wanna learn RUST
for what I'm doing right now, TS is really nice
it's looking slightly more applicable to my job
20:36
isn't Rust mostly dead?
I thought it fell out of favor when Go came out
slowed down, but I don't think it ever died.
especially since the whole run-as-JS thing never really panned out
last update was July 20, 2017
tbh, I'm more interested in the WASM/SIMD stuff and typed numbers allowing us to do fast math
@ssube Is GO still going?
20:37
I'm emulating a real time process. I think thread safety and less chance of faulting is nice
@ggderas it's one of the fastest growing langs and already pretty high on the charts
@rlemon I don't remember if it was a proposal or just a whitepaper, but I read something recently about proper threading in JS.
Maybe it was the ES8 spec...
@ssube eh, webworkers already handle 'threads'
and afaik browsers now spawn os-level threads from it
having atomics means we can do mutexes and semaphores
and viola, pretty much all the usual concurrency stuff
:thinking aloud: I should use webworkers more
me too
I've used node's clustering a bunch
20:41
You guys work on a software-commercial context?
I'm working on corn
user1596138
@rlemon At least Musk isn't purely an opportunist
user1596138
WHy would anyone look to the web lottery winner Zuckerberg
user1596138
Got lucky. Nice. Not like he's an expert on anything
I don't know, I don't wanna pass judgement on a billionaire who is still involved in the tech in his company. Bill tried to keep up with programming as long as he could in MS (not writing it, but learning their own languages) --- I personally wouldn't trust him on this stuff, but I don't wanna call him stupid
user1596138
20:48
I don't think he's stupid.
sorry, that was poor wording
I wouldn't discredit the guy
because I simply do not know how much he knows. I haven't followed him to the point past "well, he's still in on their tech"
elon makes better more interesting products that make me follow him
so I can say with confidence he's a crazy ass genius
user1596138
@rlemon like which one
user1596138
Desperately trying to clone other products is all
lol. okay
user1596138
I asked which one :P
20:51
not even going to bother continuing with that.
user1596138
What product has Zuckerberg made that I don't know about
user1596138
Inform me. I am ignorant
read what I wrote first.
3 mins ago, by rlemon
elon makes better more interesting products that make me follow him
user1596138
I read "also"
user1596138
Not elon
user1596138
20:52
lol
user1596138
CapitalizationProbz
so my 'not touching that' was you saying "Desperately trying to clone other products is all" about elon
:P
user1596138
Unless he is from the future yea that would be bogus haha
@rlemon You say that as if cloning other products is a bad thing
didn't say that. just didn't feel like getting into a debate about whether or not elon rips products or is a genius or w/e
not interested in having that debate.
20:55
Actually shoulda pinged @Jhoverit on that one probably
user1596138
@KendallFrey The desperation tho....
What desperation?
user1596138
Stop spamming the shit out of your users to stop using Snapchat and use Stories
user1596138
They've had 3 versions of "stories" lmao
I'm now completely lost
user1596138
20:59
We talking about Facebook right?
I assumed we were still talking about Elon
user1596138
Omg twice in a row haha I'm dumb
user1596138
I just want to rag on Facebook :(
user1596138
Trying to find an issue with your new keyboard so you can return it lol....
oh well in that case go ahead
user1596138
21:00
Can I just be like "Bluetooth interference"
user1596138
I want the wired/wireless with fingerprint scanner
😬 my fishing app just reminded me to go fishing 😬
user1596138
Item no longer needed
user1596138
It approved. Okay then.
@rlemon what does it normally do?
21:01
I'm still just depressed about not being able to go anywhere or do anything
So yeah the totality of my work this week has been removing a single erroneous !
@rlemon I missed something, why not?
uhh, in short - medical issues made the doctor tell me to not drive and report me to the ministry until I can get them settled.
oh damn
user1596138
To the ministry
user1596138
lol
21:03
ministry of transportation
user1596138
Oh
so they can determine if they need to pull my license
not the ministry of sound?
user1596138
Ministry of Love
user1596138
@Shrek I'm getting the Modern Keyboard now
21:05
Meanwhile on @HulkHulkenberg and @KevinMagnussen's Wiki pages #F1 https://t.co/6qNYiovpuV
Holy shit this blew up
TL;DR: Magnussen told Hulkenberg to "suck my balls" after a race in which they had an incident.
what kind of incident? A ball-sucking one?
@ssube Mag pushed Hul off the racetrack
is there a tty web browser (like elinks/lynx), but with decent html/css/js support?
I mean, elinks supports html quite ok, and some css, but the js really sucks
After about 10+ reset and rebase -i --onto something, I make the git history better with fast-forward not merge...
21:22
DOW CLOSES ABOVE 22,000 POINTS FOR FIRST TIME EVER
man wish I had more invested
should have bought a ton of stuff when Trump was elected
oh well will have to after it crashes I guess
if I had invested in anything mainstream and knew trump would have won, I'd have sold it right there and then
@towc that wouldn't have been wise
Stock market has been climbing since the day after election
I would have expected a huge amount of people to have sold as well
but guess it didn't happen
Even I, who am a never-Trumper, would only expect the market to do a temporary dip, if anything, apon his election. If he's going to ruin the economy, it takes longer than that.
do you remember when the brexit vote was in and the pound was below the dollar? XD
21:26
yeah whatever happened to all the doom and gloom predicted for Brexit anyway?
oh, it's happening
britain's going to shit
That's a little different. That was a final decision on very specific change with some known economic risks
when I told people who didn't know me that I was leaving for slovakia, most immediately thought it was a move to get away from the brexit crap
I was like "sure, why not"
@towc I'd think it was due to the random acts of terror
not Brexit heh
wut? Britain's actually probably the country who was hit that was chillest about it
well, granted, I haven't spent much time in london
this is horrible to say, but I think a lot of people here were starting to feel jealous of other countries, because the country that considers itself "the brains of europe" wasn't getting attention from the terrorists
21:34
Slovakia?
here = UK
I'm not sure how here = uk, but in that sentence it was
damn do I still think I'm in the UK?
Met quite a few nice devs today, almost all of which native slovaks/austrians, who spoke english just fine. I guess I felt like I was in the UK
anyone starting up poe friday
@towc when was that though? The attacks have been going on for a few years now
2005 was a pretty bad one, that was over 10 years ago now
@Loktar the first one was a guy waving a gun near the main abbey
I'm not sure it even was from an ISIS member
then they had a car go rogue on a bridge, that wasn't too long ago
and finally the manchester killings
I don't think there were any more
yeah the thing is the foiled ones are only known foiled ones
wonder how many have been foiled that the public doesn't know about
anyway time to setup my printer woot woot
21:42
@Loktar give me back the tinfoil hat!
first possibly ISIS linked was in late may 2017
so really not long ago
@Loktar I'm sure they'd notice the reflections
Who cares about ISIS really
well.. maybe not, not much sun there.
it's all radical Islamic terrorism anyway
I guess you're right.
user1596138
21:43
It's all just organized by the US Govt anyway
user1596138
Right
user1596138
lol
same ideology different title
@Jhoverit HAH!
user1596138
Where's connorspiracy
aliens took him finally
21:44

NASA lied

Or did they?
user1596138
in NASA lied, Jan 29 '16 at 3:14, by little pootis
Cheesus Jhrist
user1596138
/me changes name to Jhrist
same tab complete, its cool with me
user1596138
Can you still do names too short to ping?
user1596138
Jh
21:45
I think it's 3 chars
so.. maybe if you add a hidden unicode?
user1596138
I raised a Meta issue forever ago because you could use 2 and you can't ping unless they have at least 3
or just make your J not actually a J, but something that looks like a J
add a reverse characted in the beginning to fuck with the autocompletes
user1596138
@rle test ping
21:48
yes, i said it was 3
@kam hallo
'think' because I don't know if it was 2 or not
user1596138
@rle does this work
user1596138
lol
Yewp, works.
21:48
I'm just turning off pinging.
user1596138
Haha
problem solved for now
user1596138
@CapricaSix sup
@ka oy
λ
ohh she's always got pings turned to silent
dude I'd hear that all day long otherwise.
21:48
@towc did not.
did not or would not?
On average, how many pings are queued on cap a day? :D
tweet all @CapricaSix pings.
I don't check daily. more like weekly. usually has a few hundred mentions and a bit of rep
21:50
wait, does she randomly gain rep?
maybe I don't clear them often enough
maybe she gets mentioned on main too .. I don't pay attention
I usually just stay in the chats and hit F5 on her once a week or so
No, she answers questions between serving !!giphy.
@towc to get rep to be an RO and move messages and things she needed 1000 rep
so Zirak and I answered some questions as her (and did not upvote them ourselves)
Oh, I always thought she was awarded that rep by SO.
is there a way to dm someone on this site?
21:52
I don't have 1000 rep
wait, does a normal user need 1000 rep to be RO?
@KamilSolecki I'm like 99% positive 'hive mind' in the chats gave most of those votes
guess that answers that
they are not bad answers tho. you can see them. click her profile.
@towc am not either 1000 rep.
21:52
@Chenny you could potentially invite someone to chat, but, otherwise no. and chat isn't private
@KamilSolecki u not RO
@Chenny you can invite them to a room.. but not really.
@towc In c#, yes.
there was a permission she needed 1000 rep for
21:53
maybe to control access?
there was a time when she locked and unlocked the room for us. before kick became a feature.
user1596138
Just go answer some stupid 1000+ upvoted question lmao free rep
user1596138
80
A: What is the correct JSON content type?

JhoveritThe IANA registration for application/json says Applications that use this media type: JSON has been used to exchange data between applications written in all of these programming languages: ActionScript, C, C#, Clojure, ColdFusion, Common Lisp, E, Erlang, Go, Java, JavaScript...

I refuse.
user1596138
80 upvotes for nothing lmao
user1596138
That's more rep than you guys even have
21:54
We have feelings.
i downvote those when they pop up on front page
damn, just cus I opened a question and this guy sent me this whole code and I went to try to duplicate it myself without copying it line by line, but mine doesn't work so I wanted to see why rather than just taking the code and continuing
@Jhoverit I'm only 19 off :P
user1596138
Feel free to downvote. I was trying to get to 1337 rep, I then downvoted every time I gained rep to stay at 1337 for like 2 months
man, I missed out. if only I was on SO like a year sooner
user1596138
21:55
Same.
i'm all out of downvotes
for the day
:p
user1596138
There are still some super outdated JS things that can be answered with ES6
but as you said, they're mostly on old Qs
user1596138
But yea it's not going to put you in 6 figures
Bad Kevin. Bad bad kevin.
21:55
jquery was such an easy topic to get rep for
with a jQuery/es3 code with 3000 updoots
user1596138
Yea. AFAICT there's nothing really new to get on SO, just vamps
as new features roll out there are a few questions
just latch on to the next react/angular
otherwise, mostly lib specific
21:56
Vue.
user1596138
Nah those are toxic tags
toxic they may be
make a framework JUST to get questions
but they're rep goldmines
@Luggage that works.
and has been discussed on meta (not to get votes, but only on SO to support the framework)
as long as you disclose, it's fine by them
21:57
what i've seen a lot of lately though is purposly answering duplicate questions.
@Luggage oh god, SO's answers for vue are so bad
good thing the docs are actually very good
user1596138
I get a badge if I get 20 more upvotes on that answer
user1596138
The json badge lmao
@KevinB I love the ones that say "ohh just look at this other SO answer" <clips answer>
@KevinB Many answerers dont even research for dupes, and Just answer If the question is easy.
user1596138
21:58
@KamilSolecki I downvote those and don't care.
or the ones where you can look at their previous answers and see the same question asked before that they answered, but they actually wrote out an entirely new answer for the next question
@Jhoverit that is Absolutely fair.
i dupe close things of my own questions all the time
easy rep
user1596138
Well no there's issues on Meta about how that's a "problem"
I dislike when I can see 9 questions posted in the chat over two weeks by a single user and it's clear that the entire project was just written on SO :P
user1596138
21:59
But I don't care.
user1596138
@towc you haven't flown these? You should get one.
@rlemon that probably makes 50% of New users in chat :D
user1596138
Me and my Dad were super into that back in the day..
@towc you should check out those videos on youtube.
people do crazy shit with helicopter 'drones'.
21:59
it's all good, until it rotates in one spot at the end

« first day (2482 days earlier)      last day (2691 days later) »