« first day (863 days earlier)      last day (4099 days later) » 

10:00 PM
ok, so could you do something like this:

function waitFor(ass, fn) {
  if( typeof window[ass] === "undefined" )
    setTimeout(function() { waitFor(ass); }, 1);
  else
    fn.call();
}
 
this is assuming the asset will attach to the window object in some way you can determine it is there
 
yeah of course
but if the last asset to load is the one I want
then yes, now the action taken by the user will result in the correct outcome
instead of nothing happening
I'd like to load it next
shuffle the queue
 
anyways - 5pm - i'mm be back on in a bit. \
 
but it'll take forever
@rlemon thanks anyway
 
10:02 PM
if you can try to provide a small code example (pseudo or other) I may be of more help. not really conceptualizing too well today
be back in like 40 mins
 
@rlemon hard to, to be honest :/
I'll be gone to bed
11pm here, work early tomorrow
I'll be on soon again though
I'm simplifying the problem too ya see
to give an example would be difficult
this wouldn't even solve the problem fully, it's a piece
 
Duck-Typing is best typing
 
Mhmm, to run for moderator or not, that is the question.
ney ..
 
@OctavianDamiean Do it.
 
Austrians will only lead us into world wars
2
 
10:16 PM
I've already tried but it didn't look quite so good back then. That was when @ThiefMaster became a moderator. I withdrew my nomination before it entered the primary stage, if I'm not mistaken.
@copy Yea, that was one of my biggest fears.
 
OT: I'm looking for the CSS spec that defines min() and max(). Can't find it :-/
Were those functions dropped?
Found it: they were in /TR/css3-values/, dropped since last year.
 
10:40 PM
@FlorianMargaine my girlfriend wants to learn Lisp. Help her
 
alright - i'm home now and I have beer and prescription meds. Tonight is going to be awesome!
 
good news from the doctor?
 
yea that was so 2 hours ago :P
 
I was out drinking lol
 
knee should be fine - however as it turns out I have tendinitis in my Achilles
 
10:48 PM
Aw, lame
 
separate issue I just asked while I was in there.
however this is a conflicting diagnosis from my last dr who looked at it
 
How bad is it?
 
when it does hurt - bad - but just momentary pain then it subsides quickly.
but it's not always - just when I move certain ways on it
 
Oh. Sounds like something I might have
 
I get odd pain sometimes in my Achilles, but only when I swim for long
 
10:49 PM
Happens to me sometimes
 
well mines like bending over to put my shoes on - leaning on it certain ways like when you put your weight on your backfoot opening a heavy door, etc.
and the pain is a sharp pain - like someone is sticking a needle or nail in there
soon as I take the pressure off my ankle is starts to go away
the knee business is just my shit luck and that fucking asshole black ice
 
@rlemon What?
 
then I guess it wasn't you
 
Haha, what?
 
2 hours ago, by Kendall Frey
Using the word 'gay' in a negative sense is just gay.
was Kendall
@KendallFrey I'm taking it back!
Gay does mean Happy... we really should start using it appropriately.
 
10:58 PM
Jon Skeet, Reading, United Kingdom
537k 165 2803 4220
 
Lol @ ChatBot... randomally posting Jon Skeet
 
Er.. I've been thinking of using passportjs for auth on node, but just noticed there is no registration option (w/ captcha and whatnot). What are common solutions? Just do everything to google/wlm/facebook for auth and not support local?
 
You can use everyauth but I hear passport is better
Have you read passportjs.org/guide ?
 
Yeah, sure, but it's just logging in. No registrations. Hence my question :D
 
Oh! You want to do both local and OAuth??
 
11:02 PM
Hello!
 
@siluaty hi
 
I think so. I'm polling a bit @BenjaminGruenbaum. Is it weird to NOT have local registrations for a website? Using ONLY OAuth is.. strange, isn't it?
 
@BenjaminGruenbaum hi Benjamin
 
@RoelvanUden I think it is, I haven't seen many web sites that don't support local registration
 
11:03 PM
@JonSkeet ^^
it's a bad idea to not support local registration
 
@BenjaminGruenbaum Exactly. So my question leads me to, what are common modules for local registration? Passport is logging in, not registrating.
 
what if google (et al) openID servers crash
registration systems (hand pressed) generally are super simple
 
How about anti-flooding? E-mail verification? Captcha? Proper security considerations?
 
^
Also, taking care of CSRF in every request
 
I don't consider those to be much of a hassle to write. mind you I don't do this in anything but php :/
 
11:06 PM
In php it's more of a hassle to write :/
@RoelvanUden To be honest I tried several modules but I didn't like any of them, I'm asking a friend
 
in PHP most of us (like in JS) have a grab bag of helpers or "classes" we've written over a period of time and just use now
 
I don't claim to be an expert in security so I might overlook something that is common knowledge to those in the field. I like passport because it deals with all of that, but no local registration.
 
also community resources go a long way in taking on a common en-devour
 
@rlemon Is there really nobody in the PHP community that thought, "Hey we are repeating this, lets make a single class out of it"?
 
they have - which is why there are so many frameworks and microframeworks
 
11:08 PM
@RoelvanUden wait, I knew I remembered something about passport. It does support registration, look at 'username and password' under guide)
 
i'm not boasting php over node.js or anything
I'm just saying ..
 
I don't know node.js I know php so i'm using it as a comparison
 
I understand @rlemon. All information is appreciated either way D;
 
@rlemon I'm sure you take care of your corner cases. Personally I've seen so many bad login/registration systems written in php I developed a tendency not to like it (the idea of implementing one). It's a fallacy I know, there are plenty of good login systems built in php.
 
11:09 PM
I should get reading on the zend framework. I hear it's like the PHP standard now.
 
@BenjaminGruenbaum This is authentication again, no registration. Or am I being blind?
Isn't there CakePHP and Symfony too?
 
@RoelvanUden passport has local
 
@SomeKittens Authentication, yes. Registration, ?
 
@BenjaminGruenbaum personally I often just need a simple registration - for this I just press my own. If i'm working on something more involved then yes I will opt to use a framework with well established modules.
 
No you have to create that yourself, but it's pretty much a db call
 
11:10 PM
1) because i'm lazy
2) time is $$
3) I suppose security can come into this
 
newUser: function(req, res, next) {
    var data = {
      username: req.body.username,
      password: passwordHash.generate(req.body.password),
      type: req.body.type,
      email: req.body.email
    };
    mongoHelper.find('users', {username: req.body.username}, function(results) {
      if(results[0]) {
        if(results[0].password !== data.password) {
          res.send('user exists');
        } else {
          //They're trying to create a user when they mean to login
          req.login(data, function(err) {
@RoelvanUden ^Thar you go
 
No e-mail verification, no flood protection, no anti-bot, etc.
But thanks.
 
@rlemon I would never write my own authentication unless I have to for some security reason
 
@RoelvanUden Those are on the to-do list, but low priority. I honestly think you're making a bigger deal out of it than you need to be
 
155
Q: user authentication libraries for node.js?

shredddAre there any existing user authentication libraries for node.js? In particular I'm looking for something that can do password authentication for a user (using a custom backend auth DB), and associate that user with a session. Before I wrote an auth library, I figured I would see if folks knew o...

 
11:14 PM
Do you never get random bots trying to clutterfuck everything on your site?
 
is there any drawback to setting a bunch of text to a cookie?
 
@BenjaminGruenbaum when it comes to personal projects - I like to write 100% of my own code . Can't be avoided. I feel uneasy otherwise.
like lememe - I don't like jQuery and bootstrap in there
bootstrap I've begun to accept, it's makes life so easy for the non designer.
 
When it comes to personal project I agree since (at least for me) it's mostly about learning, I was not under the expression this was for a personal project
 
> If i'm working on something more involved then yes I will opt to use a framework with well established modules.
by more involved I meant "not personal"
sorry - :P
but as I've shown earlier, writing code with a real tangible purpose is not always what I do. ;)
unless you really want to make sure you get that nice dismiss without js :P
 
I just extend .get .post .any etc with .sget .spost (secure...) etc and call them, I also make sure to add them to my testing but that's another story
@rlemon I wouldn't mind using these for an intranet project :P I'd still need to add them with js though
 
11:19 PM
hehe
I figured the convoluted markup would not be an issue for a server to pump out
but if you were using js already - just take away the entire checkbox hack and apply a class to it
this way you can defeat the bug about not being able to select a parent in css
 
Yeah that stupid bug that keeps you from abusing it even further :P
I love messing around with CSS, have you seen the CSS based XSS/CSRF attacks presentation a few years ago? Loved that thing
 
CSS selectors level4 is drafted to include a $ selector which is parent of child match
$ul > li:hover { /* the parent UL is the targeted element */ }
I'm so pumped about this
 
I don't see any practical use case for this outside building conditional logic in CSS
 
well yea
conditional logic in CSS is what is missing
 
If you want something fun to do you can go read an introduction to computing book and build all the logic gates in CSS, then implement addition and so on, end up with an entire language
I think it's quite possible
 
11:26 PM
but simple logic would make it so much more powerful in todays web
 
How so?
(More than JavaScript)
 
I have come a crossed many use cases where I needed to use JS to do something because css does not have a parent lookup
thats it.
negating the need to have my logic in a new language
 
I'd rather use JS over css whenever the logic is not trivial, for me it's easier to test and easier to debug
 
:hover in a sense is conditional logic, so why stop there.
 
Also, easier to maintain and understand later on
 
11:28 PM
so you would rather use "mouseover" and "mouseout" to supply a :hover class?
 
Nope, I think :hover is simple enough logic
 
and a parent lookup is not? considering all of the other lookups we have?
 
That is unless I want some logic that does not have to do directly with changing the display based on hovering over that element.
 
also things like simple calcs in css shouldn't be so crippled on the browsers that support them
yea my logic here is that clicking the button immediately changes the display of the parent element.
 
calcs in css are fun but that doesn't make them a good idea. A lot of esoteric programming stuff is fun
 
11:31 PM
in a real argument we would want to remove the element (js) but for arguments sake, say we don't.
A little more conditional logic in CSS would be nice.
 
I'm saying that :state selectors are nice to have when they save you time in trivial logic where implementing it differently makes your life a lot easier. The minute you're doing CSS logic to do anything non-trivial you're on your way to debug hell
Microsoft did it once :P
 
MS does a lot of things wrong.
doesn't mean they are bad ideas
 
They had CSS with inlined javascript
 
bad idea
but CSS with simple logical commands would not be
 
11:33 PM
width: 100% - 200px; /* would be fucking glorious */
 
I think I agree with 100%-200px, it would help
 
thats the simple calculations I am talking about ;)
the parent lookups, simple calcs, and even some more in depth :state selectors would be nice
and mobile state selectors!
 
100%-200px isn't stateful though
 
sure it is.
100% is container state ;)
 
Not more than 100%
 
:mouseover {
:mouseout {
:touchstart {
etc.
 
:mouseover isn't really a state, it makes a lot less sense than :hover to me
 
it does, but why not offer it.
and it is a state
 
Why offer features with low productive value and high probability for abuse?
 
the mouse is over the element
 
11:36 PM
That's :hover
 
it is the same as :hover ;) I know
 
:mouseout is just not-hover
 
but why not offer it is all i'm saying. :P (ok bad example, you caught me bitch :P)
touch events are needed
and there are a few JS mouse events and keyboard events that would be nice to have in css
 
There is a great article by Eric Lippert on this, one second
 
i'm on drugs and booze atm, so you will need to ask me more examples later ;) mouseover and mouseout are all I can think about now that we're talking about hover
 
and not illegal drugs **
 
^ Post on why not to add these features
 
I will write a post on why to add them. then we will debate :)
 
Just read Eric's blog post first :)
 
yea when I can ensure i'll absorb it
that isn't right now :P
 
11:39 PM
Any one mind taking a look at my Jquery code?
0
Q: How to fix jquery json scrip that is not triggering html update?

StenWAnyone can see anything wrong with this code? It is connected to a php function that echos Json data. I am running Jquery 1.9.1. I belive the problem is at the end of the Jquery script, but I can´t find any solution... var formObject = { run : function(obj) { if (obj.val() === '') { ...

 
only if you correct the title
 
I will :D
 
". It's a lovely feature and I'd be happy to have it in the compiler, but it's just not big enough bang for the design, development and testing buck, and we have many higher priorities."
 
and fix the indenting please ;)
 
@rlemon Will do!
 
11:41 PM
Like adding USB access to Javascript!!!11!
 
@BenjaminGruenbaum BAM! it's lovely and he'd be happy to have it <then some rant about how he is busy and no time because it's low priority>
not an argument for it being a bad idea all around
 
It's an argument that even if it was a good feature which is debatable (and I think it's not) , it's not important enough to spend time on
 
I would love Device I/O access from JS - I know MS has done some horrible things with it and ActiveX objects but it surely can be done right!
 
Compared to many other features mainstream JS is lacking like generators
@rlemon You can have Device I/O access from JS, just not in the browser. It's not an important or interesting feature to have in the browser. It is more a security threat then anything else
 
> it's been done and there were too many exploits
imo is not a valid argument for stuff like this. if it can be proven it can never be secure (which I find hard to swallow) then ok.
yea node.js opens a lot of doors here
 
11:44 PM
There are very little use cases and a lot of problems implementing this
 
but in the old days (and now because I'm a noob with node.js) I just use php to spawn some c console application from an ajax call
 
More importantly, there are features that are a lot more important to have
 
@BenjaminGruenbaum in fact there are MANY use cases - just not for main stream consumers
industrial automation this would be so bauce
 
@rlemon You can create a node module in C++, and then simple require() it from node
 
every single day people request how can I do this from my phone .
 
11:45 PM
Do what from your phone?
 
if I could get more rich device i/o support from the browser I could write a single HMI in HTML
 
Again, this is not the browser's place
 
why not? why do I have to write a new app for 4 different vendors/devices when I can write one.
the entire world is going web
 
The browser has APIs for interacting with IO in a way that makes more sense, I don't want to access the physical usb port (usb drivers in the browser?!?!), but I can access the camera or microhpone through an API
 
ergo the medium that delivers it must be capable of supporting newer and ever demanding needs
 
11:47 PM
I can see the posts on facebook: Hai guys post in your browser's url: javascript:window.heating.setTemperature(1e5)
 
The fact you can talk to your webcam from your browser without having to worry about drivers is a great abstractization. Why give it away in order to do more lower level stuff
 
I don't imagine how it could be done securely.
 
The code is now indented and the heading more clear, I hope.
live('change', function()
 
I'm just saying I wish it could be because I work in an industry where this would solve a LOT of issues
 
0
Q: Jquery live('change', function() wont trigger drop down

StenWAnyone can see anything wrong with this code? It is connected to a php function that echos Json data. I am running Jquery 1.9.1. I belive the problem is at the end of the Jquery script, but I can´t find any solution... var formObject = { run : function(obj) { if (obj.val() === '') { ...

 
11:48 PM
@copy javascript:window.computer.reboot()
@rlemon I'm just not sure which issues it would solve? (that are harder to solve otherwise)
 
Not evil enough yet
 
javascript:computer.run("sudo rm -rf /*");
@BenjaminGruenbaum you don't work in the industrial automation industry
building HMIs seems like such an archaic thing the way it's still being done
 
@rlemon I have no experience in the industrial automation industry. What sort of problem would it solve?
 
atm everything is done with PLCs and small shitty little displays
 
@copy javascript:window.computer.porn.replaceVocals(Vocals.Woman,Vocals.Horse);
 
11:51 PM
IF you could write a unified interface, and could deliver it to all devices seamlessly on a network you would solve a lot of issues
doing it with web just makes it cheaper because you can then use off the shelf hardware
I'm trying to eliminate the need for a central server :P
 
@rlemon How is it easier than doing it in C and then pushing it with git?
Git eliminates the need for a central server :)
 
how am I going to do that without writing an app for the ipad or android tablets
 
Not sure how we jumped to ipad or android tablets, I'm pretty sure android comes with git since it is a variant of linux
 
(this is a pipe dream. I'm just arguing for the sake of argument. I feel it can be done one day and should be done)
@BenjaminGruenbaum just throwing those out that as examples
 
Well, I'm not sure I have much opinion on that since I don't know that field at all :) Get yourself a job doing web development instead :) I love web
 
11:55 PM
think of what I deal with day in and out - and industry ever changing right now - the old owners and engineers/technicians (industrial farm equipment did I mention) are on the way out - and their kids are on the way in. The kids don't know a damn thing about technology but know how to use their laptops/tablets/phones and want to do everything in a hurry
they want everything "remote"
so now I'm looking at trying to figure out ways to retrofit 2000+ 10-current year old systems (embedded control) to facilitate this.
 
Gotta love clients :) If you ever did any web design you get how clients are awesome
 
I have a lot of pipe dreams about what should be done with the web
 
How is even basic photo editing so difficult?
 
^ sounds like my first day with gimp coming from PS :P
 
11:58 PM
lol
GIMP is awesome!
it's like 85% of PS for free!
just not the great parts
 
I'm trying to make an arrow and everything's off
and the grid refuses to exist
 
-> <- does it look like this?
 

« first day (863 days earlier)      last day (4099 days later) »