« first day (1907 days earlier)      last day (3048 days later) » 

user3119231
1:00 PM
We don't have a graveyard where I live. So yeah, useful :D
 
crl
the event.target in mouse events, it's always an Element? not a shitty Text Node?
 
user3119231
I would say it is always an element. Isn't a text node not only plain text?
 
crl
a text node is a Node
document.createTextNode('shit') instanceof Node
 
user3119231
nevermind. still saying it is just for elements.
 
crl
var x=document.createElement('div'); x.innerHTML="ok"; x.firstChild instanceof Node
 
user3119231
1:05 PM
looks fine to me.
 
user3119231
firefox mdn is unclear.
 
crl
want just to know if someEvent.target can be a text node, probably not
 
user3119231
A reference to the object that dispatched the event.
 
user3119231
The DOM element on the lefthand side of the call that triggered this event, eg:
 
crl
1:07 PM
yea, pretty vague
 
user3119231
Just elements.
 
crl
ah Element, ok, so father of text nodes, thanks
 
user3119231
no problem.
 
+10 reps to maurize
 
user3119231
 
crl
1:13 PM
@Neoares make a post on meta for this, it makes sense
 
what?
to give reps on chat?
 
user3119231
Only admins and mods should do this. Because abuse and stuff.
 
hey guys
am having trouble trying to use jquery validation plugin with ajax
 
user3119231
Just ask. If someone knows you will get an answer :)
 
okay let me try do a fiddle
 
1:24 PM
kinky
 
@rlemon I like it when you say that word
 
@FlorianMargaine whispers Well done Draco
 
I honestly don't understand why people even use these silly plugins anymore.
What's wrong with the HTML5 attributes?
 
browser support, lack of customizability
or w/e the word is
 
1:32 PM
its driving me nuts
I think I will just do my own custom validation
 
glad to help
 
@GotaloveCode Don't you do ASP.NET MVC normally? Is this validation part of that?
 
@RoelvanUden yea am doing php right now
 
Ah okay. Then I won't suggest the obvious solution for MVC :P
 
@GotaloveCode if you want something simple that'll just work and is customizable through (arguably ugly) dom-attributes, use parsley
 
1:38 PM
hehe model binding @RoelvanUden?
 
@GotaloveCode Yeah. :P
 
this should be easy right?why the hell can't I figure it out. @RoelvanUden I've gotten so rusty with php jquery combo now yet thats where I started off
 
I dunno PHP nor jQuery :-P
 
I figured I would get someone who understands jquery much better here
maybe web developers group
 
user3119231
1:42 PM
Whats this? Why isn't my profile in this elite team?
 
because it is for elites
 
user3119231
ヽ(#゚Д゚)ノ┌┛
 
@AwalGarg shorts fired
 
@RoelvanUden I don't use mvc's validation I pretty much hate it :D
 
user3119231
shorts -> I'm better with shots.
 
1:45 PM
@BenjaminGruenbaum why
 
@BenjaminGruenbaum It's pretty nice though. Why the hate?
 
Well, it makes it very tempting to mix domain objects and entities and it feels a tad too magical for my taste.
Sort of like the way github got hacked twice. Not the correct place to validate entities IMO.
 
@Maurize I hate @Luggage's role
 
2:00 PM
@ssube I've been reading about it a little. The biggest advantage Mongo has over Postgres's JSON type in that regard is the tooling.
Node has relatively mature libraries that handle Mongo nicely, Java's Spring offers out-of-the-box mapping between Mongo's JSON objects and objects in memory, etc.
With Postgres, you need to build you own abstractions.
 
user3119231
I would be "The Kraut" :D
 
@Luggage this is for you:
 
2:16 PM
so what is the solution when you are building for the browser but you want to use modules + babel?
because atm it just converts to a require call
 
browserify
or webpack can handle that, iirc
never used it tho
 
the other option is just to have no "modules" and concat everything in specific order
 
@FlorianMargaine o/
@AwalGarg venky says call him
 
2:32 PM
@ssube: Which sourcemaps gulp tool do you use? There are a number.
 
user3119231
jo rapping lemon y u know invite me now? (advantages or something?)
 
Guys :| What do you use so you can do import 'Thing' from MyFile? That's called a module loader, right? I see lots of them, but I am not sure what the differences between them are
 
listen you jquery nerdos. I want to create a new jQuery instance which is bound to an element different from document. how
 
user3119231
Nerdos you say? Tzz.
 
say I have a div element called myDiv. I want a jQuery instance $div on which I can do $div('.someEl').someOperation().
 
crl
2:37 PM
@corvid example github.com/m59peacemaker/gulp-browserify-livereload-starter, you can use require wit that
 
@AwalGarg $div.find('.someEl').someOperation()
 
@corvid thanks nerd
 
th-this is the first time I've been called a nerd on a programming chat room, I am truly ascending to greatness
 
lol
 
user3119231
(」゜ロ゜)」 neeeerdo
 
crl
2:39 PM
I guess jquery's find is O(n^n^12)
 
That sounds really bad
 
fuck yes! babel + gulp + browserify is working
I am the best
:D
 
@rlemon got that open source? Can I pls see?
 
crl
@rlemon is it like the GH repo above? ^
 
user3119231
I don't know what you mean @rlemon
 
2:40 PM
it isn't really that bad.
just convert 6to5 before you bundle it
the streams are not compatible in the same task :/
 
@crl I see, but index.js has no code :\
 
crl
that's a boilerplate, see the browserify doc to use require/export (it's like nodejs)
 
man the output is funk tho
love that the last line of the file is this:
},{}]},{},[1]);
 
Isn't browserify using require? What is the difference between require and import?
 
browserify makes require work afaik
and bundles modules
(for me)
I've been using it for all of 25 minutes tho
 
2:49 PM
I have a page that uses a script and it's the only page that uses the script, so I'm tempted to just leave it in the page and not in my main .js file. Thoughts?
 
@corvid you need to transpile es6 code to es5, no browser supports import yet. they transpile to require. then you can use a stub for require to make it work.
 
@Waxi makes maintaining the page harder.
you now have two possible places instead of one
is the script large?
 
@RoelvanUden I don't really understand fully how build processes like gulp works. On production, do you just bundle everything into a single file and use a module loader to put them in the right order in the index.html file or something?
 
@Waxi Sounds fine to me, if its small.
@corvid Or something, yes. You first convert all es6 js files to es5 js files, for example, with gulp (using babel, of course). Then you bundle them up into a single file, for example with webpack or browserify. Then you load that up in your html, and tada.
 
The step I never got to was loading it into the index.html file, I don't see that anywhere. I also think templates have to be loaded into the index.html, right?
 
2:55 PM
@corvid Why does it have to go "into" the html?
 
In a "traditional" web site, doesn't it load the scripts at the end of the body?
 
@corvid It's recommended, sure.
 
I wouldn't call it a tradition, but a good idea :)
 
user3119231
It is a common method.
 
user3119231
If you load it at the end of the body it is easier to work with DOM
 
2:56 PM
@corvid So it's just a reference. Say your entry point is app.js, your final single file build can also be app.js
or you can just manipulate the html with a task
 
crl
entry point = root of requires?
 
Okay entry point, THAT is what I don't get. Do you just import everything in that file?
 
@corvid Pretty much, yeah. I generally use a start.js that does setting up of app. It includes some files that need to start right away. Those files may include other files, but my start.js doesn't care.
 
import App from './app';
import './models/user';
import './views/user';
// every file included in my project
App.start();
 
why do you import the models and views if they arent needed in that file/
 

« first day (1907 days earlier)      last day (3048 days later) »