« first day (2309 days earlier)      last day (2636 days later) » 

12:05 AM
@HatterisMad Boston Pizza sells them on valentines day
 
@Allenph node is javascript
 
well... if we're splitting hairs it isn't
you write js in node, and node is built using js (amongst other things)
 
I suppose you could just make a room called "binary" and by extension just talk about every language
 
node is an environment, js is a language
 
node -> js as jre -> java?
or should that be v8 -> js as jre -> java
or is it just plain wrong
 
12:11 AM
If I am passing an untrusted numerical variable to PHP, which will then be used in the page's HTML/Javascript, would removing all non-numerical characters be a safe replacement for escaping the variable?
 
strings can have pretty much anything.
oh..numerical value.
 
Right
It's an ID
 
I'd say so.
 
I think so as well
I don't think there is a way they can do anything with just numbers.
 
can't use php's built in escape function?
 
According to OWASP's Cross Site Scripting Prevention Cheat Sheet you should never put untrusted data, even escaped untrusted data, inside javascript tags.
 
Any untrusted data shouldn't be used at all anywhere tbh but if it's not earth shattering then use it with care.
But definitely sanitize the data before using it.
 
What do you mean shouldn't be used at all?
That would mean that you should not send data with an Ajax request o.o
Or am I misunderstanding
 
Talking about npm packages and etc.
Anything that's executable to be more clear.
 
Oh, I see. I am just talking about untrusted data in general. Any data that comes from JS is by default untrusted.
 
12:27 AM
From JS? As in ajax responses?
 
Yes
Well, the response is from PHP
So the Ajax request contains untrusted data
I have $("#mydiv").load("editentry.php", {"entryid":entryid}); which loads the php page with untrusted POST variables.. Therefore on editentry.php it is unsafe to put echo $_POST['entryid']; because the entryid variable is untrusted as it came from js
Does that make sense?
 
12:44 AM
> On branch master
> nothing to commit, working directory clean
ahhhh
 
1:37 AM
does the 2d canvas context have a better name than 2d?
software canvas (instead of the hardware webgl canvas)?
 
no
 
was thinking of a good name for a lightweight non hyper-optimized library that allows for 2d context syntax but using webgl
CanvasGPU was an idea, but urgh...
2d context is basically a more immediately useful version, or dumbed down, depending on your way of looking at it
smartCanvas suggests that I can actually do amazing optimizations
and we all know that's not true
 
2dgl
 
but that feeds in the conception that the 2d context can't be used for 2d and viceversa
 
maybe to you
 
1:44 AM
and at most, gl2d
but that actually says nothing unless you know some context
if you just saw "gl2d" you'd be like "k wut"
 
How about PixiJS?
 
fuck you too
 
and if you saw GSAP or npm or Node.js or jQuery or any of the other stupid nonsensical names you'd be like "k wut"
(ofc they make sense once you know context, or the acronyms)
 
What kind of name is Matei, anyway
 
1:46 AM
what is the name of the site that tells you what the site was made in and what it is hosted on?
 
note: I even picked bad examples of this. there are horrible library names out there
 
only point is that I'm thinking of something lightweight and that allows you to use the same syntax as the 2d context, so that I can easily port most of my animations to webgl by simply changing the reference of ctx to a new thing
@rlemon well, those are big names that are "marketed" and all. But yeah, you have a point
 
if you google "what is this website made with" the top result (for me) is builtwith.com
 
@KendallFrey you're going to hell XD
 
@towc they were not big before they were big
 
1:47 AM
i'm an idiot
 
everyone started small (okay, not true, but you get the point)
 
yeah, sure...
I'll go for gl2d for now
 
bluebird .. that has nothing to do with Promises. the dude who made it used to be a regular here
 
Anyone here good w/ Mongo?
 
just make a good product, who cares about the name
 
1:48 AM
How would I find documents where a field is present in array
like lets say I have array subjectList
 
@rlemon oh srsly?
 
Subject.find({"name": subjectList}, function (err, subjects) {
})
 
yup
 
how would i get that to work?
 
yeah sure. Don't want to spend half an hour on the name, but also didn't want to not think about it at all
 
1:50 AM
rlemon any ideas?
 
nope
 
I know I could search all of them and check if its present using indexOf
but i was hoping there was a more efficient approach
 
@towc In my opinion you should name your product when other people give a shit
 
it has to have an ok name before people give a shit though
 
I mean this in a nice way
It really doesn't
The cms I made is used on a few bigish wow websites and serves content to thousands of people atm. No one really knows the name, we named it after 3 months of development
I spent most of my time saying what it did to people, who rarely asked the name
 
1:55 AM
@SterlingArcher drinking in Crystal city...
 
@towc what are you making if you don't mind me asking?
 
10 mins ago, by towc
only point is that I'm thinking of something lightweight and that allows you to use the same syntax as the 2d context, so that I can easily port most of my animations to webgl by simply changing the reference of ctx to a new thing
 
That's pretty interesting :-)
 
it's supposed to be fairly stupid and basic, but it would have helped me so much to have something like this to go through when learning webgl
also, now I don't have to rewrite the whole thing if I want a previous animation of mine to be using webgl
 
Anyone really talented with Mongo?
 
2:03 AM
Here's the thing if your making this for yourself, Just name it something interesting that's memorable. If you think it has potential to be something lots of other people want make it something meaningful. Though ultimately from experience changing the name early in the product life cycle is easy and when you start getting traction later it won't prove to hard to change unless it get's stupid popular.
 
hi
 
well, I'm mostly trying to get loads of libraries made so that employers can have code samples (and so I can show that my ability to use vanilla without other libraries and stuff is actually worth something even in the industry)
 
Ahh so your building a portfolio?
 
basically
 
do you use any cms for node.js?
 
2:07 AM
I spoke to my friend with pretty much the exact same question @towc
 
if you really want to be marketable you should show your competency with using industry standard tools. not ones you made yourself.
don't not make those tools.
but understand that it isn't going to make you marketable as much as being proficient with the tools they're already looking for
 
^ this, A better approach would be to find a tool that's capable of doing what you want and building the functionality in
 
yeah sure, I am still learning the common frameworks and technologies, and I can't deny that it's probably the best way for me to be a successful employee
 
if you want to make a cool open source project: wicked. pour your heart and soul into it.
if you want to find a job asap in the js industry: learn the toolchain that will get you that job.
 
but I've been reflecting on the fact that I should like the path I will choose, and I noticed that I actually don't like building apps for users as much as providing tools for learners and peers
@rlemon I have 4 more months in which I don't have to worry about dinner
 
2:10 AM
then start an open source project, work for the man to get capital, make a patreon, and hope for the best
 
I am already fairly employable with a meh pay, but I can do better
@rlemon that was the plan. Except for the patreon thing
unless by patreon you don't mean the website
in which case I have no idea what you mean
 
no I mean you need a way to get paid
 
ok right
 
patreon is a decent way about that
 
oh wait you meant what I thought you meant
 
2:12 AM
you don't start a patreon on day one.
 
I guess...? It would kind of feel like "hey look I don't have enough skill to get a proper job. I am still doing things. Please give me money"
@rlemon and sure on that too
 
> start an open source project
 
yes, I'm doing that
 
@towc when we started, we sold websites, did work on freelancer, posted on gumtree, found more freelance work.
 
if you want to start your own gig you need capital. even if that gig is a one man show.
 
2:13 AM
We didn't get to do our main project all day everyday but it did give us freedom
 
completely agree rlemon
 
so you can get a 9-5 or you can get a 9-5 and try to get money on the side to shorten that time
 
and yeah sure li x
9-5?
 
a "real" job
 
I mean you probably already have all of the skills to do freelancing, though it's a lot more effort then getting the standard 9-5
Both give you certain benefits
 
2:15 AM
@SterlingArcher women here
 
freelancing when you're starting out is almost impossible
you need some experience
 
I mean he does have some, I checked out his github and he's got a range of stuff
 
not the experience business types care about
 
hey, I know react/node and stuff
surely enough to get a junior position
I'm definitely not an expert, but I have the basics going
 
Knu
Iv read that global corresponds to window in node.js; what would be the pendant of self in node.js? this?
 
2:18 AM
it's just that I think I can do better
 
To be fair, freelancing from the start is a question of how are hard you willing to work.
 
one of the ways is getting better at using those technologies, the other is taking another path. Trying to do both
 
and I'm not even talking programming exactly here
Client management, who you choose to develop with, splits all the business shit that companies take off your shoulders
 
@Knu self?
 
@towc Maybe try to get a remote job as a junior that is time flexible
 
Knu
2:21 AM
@rlemon yes self
type self in your console
 
that's a Window thing
so you want to know what Window corresponds to in node?
 
What's self?
 
Knu
Ill ask differently.
 
Window.self points back to the window object
so self just gives you window
 
self === window
 
Knu
2:24 AM
What would be the name of the global that references the top-level scope in node.js?
(hint it's not global)
 
but that's just what you asked for
 
@towc I guess we may be in similar positions if you have time we could continue on steam chat or something? :-)
 
@Knu why not?
 
it's quite late here. Maybe tomorrow?
 
Knu
@littlepootis because it is so
 
2:26 AM
Sure, I'm also UK.
 
Hello UK
> That means that in browsers if you're in the global scope var something will define a global variable. In Node.js this is different. The top-level scope is not the global scope; var something inside an Node.js module will be local to that module.
 
but node isn't a browser.
 
Knu
no shit :)
 
There's no "global scope" akin to browsers' global scope in nodejs.
 
Knu
(hello pootis)
 
2:27 AM
Hello :)
 
Knu
alright that's not the answer I wanted
 
There's one way to emulate that, using php as a preprocessor.
 
Knu
but OK Ill take it
if you have a module with var self = typeof self !== 'undefined' ? self : this;
it should be enough right?
I mean I was trying to side step re-assignment of global variables
by using self everywhere
but I don't think Ill find an alternative in node.js
 
what is the end goal? modules are cached, and they have their own scopes
 
Knu
it's probably a non-issue in node.js
because requiring not in the top of the file is shunned on
 
2:41 AM
why pootis
@lix london? I'm near Oxford
 
@towc close reading :-)
 
oh nice!
are you coming to render conf?
 
Knu
man what a cool name
 
I don't really leave my pc lel
 
Knu
rx conf sounds even more l33t
 
2:43 AM
Though this looks pretty neat :o
 
Knu
> from the organisers of jQuery UK
I am grossed out
 
there's no jQ going on, I can assure that
 
jQuery is alive and well in the UK apparently
lelele
 
have you heard of the meteorology team in Reading?
 
@towc I'm attending a hackathon at about the same time :/
 
2:55 AM
@littlepootis I gave up on you a long time ago
we're not friends anymore
 
I'm as reliable as haskell.
I'll probably be going to this.
this looks cool too
afk, commute
 
@towc from my knowledge of the programming scene in reading, it doesn't really exist
 
oh. There have been hackathons and events with them
 
> This includes, but is not limited to: women, people of colour, LGBTQIA+ people, disabled people, and people facing economic or social hardships.
Can I be denied scholarship on grounds of not being dark enough?
 
> social hardships
 
3:07 AM
Anyone can be part of an underrepresented group
 
you have no social life @littlepootis, go for that
 
@towc That's rich coming from you
 
(inappropriate?)
 
Inaccurate
 
@KendallFrey I will always have my dreams
@littlepootis 'd you get a boyfriend yet?
 
3:08 AM
Why am I going to bed before someone in Europe
damn you towc
I'm tired
 
I came home from PE today and probably slept like 3 hrs as soon as I touched the bed, it was sad
cross country 5km run. I hadn't practiced running in ages
so now it's 3am and I feel like I've slept enough. I'm obviously wrong, but I don't know what to do
I tried closing every electronic device, putting the blinds down and all of that at midnight. Stayed with my eyes closed hoping to fall asleep for like 1h30mins
then decided that if I'm going to waste the night, it might as well be because of something productive
I blame politics
going to try again in a few minutes
 
@towc wait until it's 6am
You'll regret not sleeping
 
I'm waking up at 6am you fuck
6:40
I know I'll regret not sleeping
oh wait do I smell sarcasm?
 
@towc People here are way too immature for me
 
@littlepootis is he 60?
how much does he pay you?
 
3:15 AM
A candy
 
and all you have to do is get in the van? fair enough
btw, how white are you?
do you have a pic of you not trying to look dead?
 
Whiter than average I guess
There's one guy and three girls in this class of 60 that are whiter than me
 
wow, that's white
ok, going to try to sleep again
if you really want to be annoying, you can ping me every 10 seconds
 
Is whiter even a word?
 
anyone fancy a game of chess?
 
 
1 hour later…
4:47 AM
does the chess game made of html5?
 
5:00 AM
 
5:13 AM
well a cat also needs a bath
 
5:26 AM
hi, why this checkbox is death jsfiddle.net/6tgbf2wu
if($('#vit').prop('checked')) {
  $(function() {
    $("h2[data-type='vitamin']").parent().show();
  });}
else {
  $(function() {
    $("h2[data-type='vitamin']").parent().hide();
  });
}
ok, got it.
 
5:55 AM
Hi, I need a regex that matches all characters between two words, except the string "he" in JS-regex... i.e. it would match "wordone foobarbaz wordtwo", but it wouldn't match "wordone he wordtwo".
 
 
1 hour later…
6:55 AM
Can you try this /(wordone )((?!he)(.*))( wordtwo)/?
 
@Minwoo Welcome to the JavaScript chat! Please review the room rules. Please don'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.
 
7:12 AM
can anyone help out with this ?
0
Q: Keyframe animation not working properly on IE11

ShashiThis is how it is being rendered in other browsers This is how it is being renderd on IE11 I have used the following keyframing animation .support_team_bubble{ height: 15px; width: 15px; position: absolute; top: 33%; left...

 
Hi guys, i have developed my website using Angular and REST API in Laravel. Everything works fine but i am not satisfied the way my scrolling is behaving. There is no smoothness in scrolling. I want the scrolling to be like dribbble.com. I want to achieve smoothness to the website
 
7:55 AM
morning
can someone tell me why new FormData() doesn´t work here? jsfiddle.net/94w3c22q/1
 
is there something wrong with this code ?
the alert works fine while teh css property does not gets applied.
 
hey,
 
Hey ibubu
@BayLife you can't console.log(FormData);
That will confirm there is a file there...
 
8:16 AM
is fromData constructor accepts a file object?
 
my serverside script requires the name to use .mv(). Using this form it works
<form ref='uploadForm'
      id='uploadForm'
      action='#'
      method='post'
      encType="multipart/form-data">
    <input type="file" name="sampleFile" />
    <input type='submit' id="submitImg" value='Upload!' />
</form>
but trying to do the same with code from the fiddle doesn´t work. Which is mostly because of the name attr
any idea how to overcome this?
in general i just want to fake a formula so that the page doesn´t reload
ahh writing about the problem helped to solve it ^^
form_data.append('sampleFile', file);
there we go
 
Haha there we go
 
@Alesana thanks anyway :)
 
I don't know what .mv() is :P
No problem!
 
i saw in the fiddle you're attempting to send file data to server using ajax
 
8:22 AM
@Alesana is nodejs function to move a file ,)
 
Ah I see
@ibubi Is there something wrong with that?
 
No i am just curious why does not send the file object data instead form data?
 
@Alesana Thanks! wasn't aware of the third parameter.
 
@ibubi this would be too easy
no the module i´m using requires that :P
 
bob
Hey ppl, this ajax call is being blocked by the server, due to security reasons and i was wondering how I can make it safe? jsfiddle.net/8v5e6r4q error message: 403 forbidden
 
8:26 AM
@bob what is the server saying?
 
well @BayLife
since you are working on image or file uploading on server, i have a question related :)
 
bob
@Alesana 403 forbidden, because i'm block unsafe requests and want to figure out how to make an ajax call safe. can you use jason for something like this?
 
Is the server your own or someone elses?
 
bob
@Alesana mine
 
Is it the same domain?
 
bob
8:30 AM
@Alesana wait is what in the same domain? the file i'm calling?
 
Yeah
 
set origin header?
 
bob
@Alesana yes, it is
 
@BayLife i need a free rich text editor which provides directly image upload to server, and saving the image path to the db, or saving image as base64 encoded
 
You shouldn't need an origin header if it's the same domain
Possibly it's being called from www.domain.com and its calling domain.com?
 
bob
8:32 AM
@Alesana i'm using absolute urls
 
Right
 
@ibubi i trying to do exactly the same right now, just that I didn´t follow my initial idea to save it as base64 and now doing it with the filesystem and saving the path in the db
 
@bob Sure, just call Jason
 
lol @OliverSalzburg I was hoping it was a typo but I don't think so
 
or jackson
^^
 
bob
8:34 AM
@OliverSalzburg i'm not so familiar with Jason, how would one do that?
3
 
this doens´t rly exist or??
haha
 
Hahahahha
 
Magic Johnson?
 
:D
 
i ll give base64 a try
 
8:36 AM
I don't even know what can be done at this point
 
@bob If you want to make it safe, do it on the server.
The transport doesn't really matter
 
@Loktar @rlemon @KendallFrey f-f-f-f-fries day!
 
bob
@BenFortune trying to find an example or tutorial
 
8:54 AM
hi i can't set the selected index of a dynamically created select menu
what i'm doing is a for loop which should break when my condition is true
 
bob
@Riccardo code?
 
do you need a fiddle?
 
bob
@Riccardo yeah
 
it could be quite hard to me to successfully reproduce the problem i'm stuck with
just give me 5 or 10 minutes ok dude?
 
bob
@Riccardo ok, no rush
 
8:56 AM
thank you so much come back soon
@bob I'm thinking of something else
you should be able to create a room right?
 
bob
@Riccardo don't know, why?
 

« first day (2309 days earlier)      last day (2636 days later) »