« first day (1256 days earlier)      last day (3708 days later) » 

9:00 PM
So it needs to return true/false based on the login?
 
I also do this
app.get('/', function(req,res){
	dashboard.init(app.io);
	res.sendfile(__dirname + '/public/dashboard.html');
});
 
It's already returning a promise though =/
 
dashboard needs the websockets.
so I send it all up, and it deals with the websocket interaction, everything else is still handled in server.js
 
But the point of this was to avoid cluttering server.js with a ton of get/post functions
It seems so unorganized to have every get/post handled in one file
 
app.get('/login', User.doLogin);
idk, that is how I handle them
but I only have like 5 routes to define
 
9:02 PM
Hi
 
Hola
 
@RUJordan check this
199
A: node.js / express.js - How does app.router work?

josh3736static simply serves files (static resources) from disk. You give it a path (sometimes called the mount point), and it serves the files in that folder. For example, express.static('/var/www') would serve the files in that folder. So a request to your Node server for http://server/file.html wou...

might offer some more insight
idk personally I am as green on all of this as you are
 
anyone with retina 15 late 2013 low end? (i7 8gb 256ssd)
 
!!afk beer, pooping, coding.
 
@rlemon thanks. Enjoy that porcelain
 
9:07 PM
Does anyone know of a Javascript API for pdf editing (just cropping) on mobile?
 
does anyone have a modern version of jquery datatables.net?
 
does anyone used lungo js for mobile apps in html css and js?
 
@RUJordan in the .then handler of the result of the user operation.
@JhonnatanGonzalezRodriguez ok, I'm here if you are.
 
@BenjaminGruenbaum yep, i am here
 
@BenjaminGruenbaum OOOHHHH
 
9:21 PM
for (var i = 1; i < response.data.length; i++){
    response.data[i].unshift('<i class="fa fa-square-o"></i>');
    aData.push(response.data[i]);
}
Anyone have something faster than this?
 
@JhonnatanGonzalezRodriguez so basically, Backbone is just an implementation (a bad one imo) of some very useful design patterns like observables, router, active record etc.
It doesn't do MVC at all.
 
@BenjaminGruenbaum well some context. i am starting to go deeper in this thing about front end and basically i want to know wish paths and suggestion do u have for me taking in count i am not an egineer or something like that
 
@BenjaminGruenbaum ok - will give it a try - is the output still an array?
 
@BenjaminGruenbaum i basically goes for everything i watch in screencast and all that...but not pretty sure what frameworks and ttechnologies should i use
 
@JhonnatanGonzalezRodriguez being an engineer means very little. I think that as an artist you'll enjoy the patterns if anything :)
@JhonnatanGonzalezRodriguez it's a lot more important to have a good understanding of the core concepts than to 'choose a framework', frameworks are rather irrelevant. They're useful, but they build on foundations you should understand. Also, don't waste time trying to figure nuances of what MVC exactly is - rather, separate concerns.
 
9:24 PM
@BenjaminGruenbaum i actually enjoy this a lot like the posibility to code, hope some day to make some kind of big artistic project with all the learned along the way
@BenjaminGruenbaum what do you mean with " rather, separate concerns". srrry english is lso not my native language xD
 
@JhonnatanGonzalezRodriguez Names of patterns don't matter, it's the concept that do. Good code is art. It's more than a tool to build something, it's a mean to express yourself. A good parallel is architecture, you're trying to build a building for a specific function but there is a lot of space for art and expression in between.
 
@BenjaminGruenbaum there you go! thats really cool
 
@JhonnatanGonzalezRodriguez architectural patterns (like MVC, MVVM, MVP etc) attempt to solve a certain problem, it's a lot more important to understand the problem, why we have it and what tools we have to deal with it than to know where exactly the responsibilities of the controller end and the view start in the smalltak variant of MVC.
 
@BenjaminGruenbaum ok so you basically talk about doing some research before start using whatever framework...its better to really udnerstand the problem in order to choose the tools
 
The problem is generally that we want to 'decouple' the presentation logic from our core application logic. Like in @RUJordan 's example - he has Node code that mixes the user authentication with the request response cycle where in fact the two should not be aware of each other. You could give it a fancy name like domain driven design or another buzzword and sound smart when you talk to other people -
but the important thing is that the logic should be separated because it's a lot easier to reason about
All these concepts, are in order to make the code easier to read, maintain, develop and reason about. For example, in MVC presentation logic is put in the View layer and domain logic is put in the model layer. The reason is that we want to separate the view from the presentation - it's important to understand why it's beneficial to do so.
 
9:30 PM
@BenjaminGruenbaum so in certain way it is totally ok if i have a kind of separated objectcs in all my application that control just certain thing without the need to be aware of what other objects or modle do?
 
The specifics of how MVC does this are nice to know, but completely unimportant once you understand the problem (mixing our graphical user interface with our business logic directly causes us to have maintainability issues, because it's unclear which piece is in charge of what - where is the login happening? Where is data updating? etc)
 
@BenjaminGruenbaum i get your point
 
And the tools we have to deal with it like observers (notifying when an object changed), mediators (a layer between then, decoupling interactions directly) etc. People use a lot of patterns without realizing it. This is an interesting patterns book to read at your free time addyosmani.com/resources/essentialjsdesignpatterns/book it's not great but it's pretty good.
@JhonnatanGonzalezRodriguez yes. The key principles here are Single Responsibility Principle (an object should do one thing) and Separation of Concerns (things should have a clear area they deal with).
 
@BenjaminGruenbaum i tried to read that book like 6 months ago, didnt finished because at that time i tought it was so advanced for me, i think its time to give it a try and see if think hava changed
 
@cynddl Welcome to the JavaScript chat! Please review the room pseudo-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.
 
9:33 PM
@JhonnatanGonzalezRodriguez If you read one book and have some basic knowledge of JS, it should be "JavaScript: The Good Parts" - it's very short and explains the language.
 
@BenjaminGruenbaum goint to give it a try
 
Of course, you always want a balance between abstraction and writing good code with solid abstractions and writing little code. Abstractions cost. Knowing how much or how little abstraction to use is a skill you have to develop (and a hard one). Knowing how to do software architecture is far from trivial - but even ok architectures tend to work.
For projects that are not even 10K lines of code, most things generally just work. It's important to avoid common pitfalls, but really, it's important to understand the basics.
 
@BenjaminGruenbaum doesn't work for me in datatables.js
 
This is why a book like PoEAA might be good for you - it's a hard read, but it a really good reference that covers patterns. Then again, you should probably code more first. And don't be afraid of coding.
In programming lots of people like to speak in fancy terms and sound smart. Don't assume that because you don't understand something that it's hard. Lots of people sound smart and are speaking down to people. It's very confusing especially in JS.
 
@BenjaminGruenbaum none of my projects has always exeed that amount of lines, basically because most of the time i just to basic websites :p ...thats why i am trying to force me to be a better programmer
 
9:36 PM
@JhonnatanGonzalezRodriguez code a lot, write fun projects about things you want to learn - that's a good way to improve.
 
@BenjaminGruenbaum it is abusive if a post you a link to my github account so you can just see smoe of the code and give mesome advice on how to perform?...i just expect tips like "you can wrap those lines in an object " or something like that
 
@JhonnatanGonzalezRodriguez you can post the link but no promise :P
 
@BenjaminGruenbaum it really important to me because im in that process of code a lot but i found that basically people here in colombia dont concern about good practice and good aknowledge of the language nad to improve..i want to improve that knowledge doing my own projects
 
@SomeKittensUx2666 WHATTT
 
9:39 PM
@BenjaminGruenbaum thank you just if you have some time ....as i said none of the projects go as far as 300 line of js github.com/xtatanx
 
That's crazy omg
 
@SomeKittensUx2666 yeah wtf
 
I thought it was a prank. I wish it was a prank
 
VR is a fad my arse!
 
i hope mark buy my house
 
9:42 PM
omg companies are buying other companies
!!itshappening
 
@SomeKittensUx2666 disappointing.
 
@Mosho That didn't make much sense. Use the !!/help command to learn more.
 
In before Farmville 3d
2
 
I'm trying to understand closures, and wanted to ask for some help. (I'm using node.js, btw) Is the closure of a function that is called ALL local objects that exist at the time it is called?
 
@copy xD
I think I know what my problem is. I'm trying so hard not to gut my original javascript when it might be easier just to gut it and reference it =x
 
9:48 PM
you have a crush on your shitty code
ktf
 
It was a pain in the ass to setup xD
But the modal is so sexy :(
 
@Loktar I kind of wish I'd bought a devkit now
What if Facebook just runs it into the ground?!
Well, I'd be impressed if they really managed to do that here
 
@Loktar get ready for "nod your head to share this achievement with your friends!"
 
lol
 
Robert Lemon and 7 other friends like this virtual reality
 
Anyone here able to help me with my quick question on closures?
 
@DavidManheim Not sure what you mean by 'all local objects'
 
If I have read in a 140mb file to a local variable, then call 3 accessory functions simultaneously, none of which access it, it seems to use 450mb of extra ram... is this because of the closures, or something else I'm missing?
So even if I use only 1 object in a function, does the closure of that function keep a copy of EVERY local object when it is called?
 
It's because JS isn't creating a new 140MB object
It's passing around the address of said object
 
!!go get something to eat or go to sleep hoping hunger won't wake me up
 
10:04 PM
@Mosho go get something to eat
 
but I'm already naked :(
2
 
Somekittens: OK, but SOMETHING is causing my code to use 3x the size of that file... and I'm not sure what. I know that it should pass by reference, but I'm unsure if, when I convert the (JSON) file to an object, the same rules apply.
 
:P Eating is important.
 
@DavidManheim Yes, the same rules apply.
 
Hmmm...
Back to square one.
Thanks.
 
10:09 PM
Interesting.
http://duktape.org/
It could be fun embedding that in Vim.
 
@DavidManheim Square n+1, because at least you've eliminated something
 
@SomeKittensUx2666 Fair. And thanks for the explanation.
 
@Grin Welcome to the JavaScript chat! Please review the room pseudo-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.
 
Does anyone else find Caprica irritating?
 
@Loktar How do you feel about the acquisition?
 
10:17 PM
@SomeGuy @RyanKinal: Final draft version: gist.github.com/SomeKittens/9747752 Any thoughts before I publish?
 
@bjb568 no?
 
I just skimmed through it. Sorry, I'll read it properly later
 
@SomeGuy thanks
 
@RUJordan Ok, then…
 
So it's settled then.
 
10:22 PM
@wvega Welcome to the JavaScript chat! Please review the room pseudo-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.
 
can anyone tell me why something could crash in the native android browser on an HTC one, Android 4.1.2? But not in chrome, and not on the same OS in another phone
 
Morning.
 
@phenomnomnominal Android stinks. Why else would anything go wrong?
@monners Morning.
 
@bjb568 if only it were that simple
 
@monners you again.
 
10:30 PM
Morning is the period of time between dawn and noon. Morning precedes afternoon, evening, and night in the sequence of a day. Originally, the term referred to sunrise (5:00 a.m. ~ 9:00 a.m.)
The name (which comes from the Middle English word morwening) was formed from the analogy of evening using the word "morn" (in Middle English morwen), and originally meant the coming of the sunrise as evening meant the beginning of the close of the day. The Middle English morwen dropped over time and became morwe, then eventually morrow, which properly means "morning", but was soon used to refer to the
 
@SomeKittensUx2666 Back like the plague!
 
(hooray)
 
Yeah, I'm actually reading it right now!
Jeez
@SomeKittensUx2666 Is there some alternate meaning to the word refrain that I'm not aware of? That first sentence is bugging me.
 
@monners One definition is 'the chorus of a song', or colloquially 'stuff you hear a lot'
 
10:35 PM
sings
 
Why are we in Gallery all the time ?
room mode changed to Public: anyone may enter and talk
 
@BenjaminGruenbaum because users are awful.
twas Jenny again
 
Next time you want to ban someone - find them on facebook and send a message to their mom with the log.
 
@SomeKittensUx2666 Give me some time with it. I'll make my edits on my fork and let you know.
 
10:39 PM
lol, this brings me back to my advertising days... Oh, the memories!
 
She makes a strong point.
 
0
Q: Using JS Promises to Execute Multiple Async Queries to Build an Object

jt0ddAfter recently discovering JS promises, I have been studying them so that I might build a certain functionality that allows me to execute 4 async queries, use the result of each to build an object that I can finally send as a response to a request directed at my node app. The final object is ma...

 
@BenjaminGruenbaum that's not the only room she created
Another one got her banned for 30 min
 
10:43 PM
@SomeKittensUx2666 Me thinks you have a stalker (or a very jaded ex).
 
!!youtube goldfinger stalker
 
@SomeKittensUx2666 ping a mod?
 
@BenjaminGruenbaum I flagged one of her messages
 
10:59 PM
@SomeGuy hey sorry I headed home
er misping
so idk it was a surprise, that acquisition
but honestly I think its a good thing, or could be
my mom may now hear about the rift, or other non tech savvy people
making VR branch out of the niche market into the mainstream
 
@ArthurChamz Welcome to the JavaScript chat! Please review the room pseudo-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.
 
@SomeKittensUx2666 I HATE YOU
 
@phenomnomnominal you're so cute
 
I do try
 
11:13 PM
 
@rlemon Now that's the entrepreneurial spirit
 
What are dogs doing here? =0
 
pfffffff
 
11:23 PM
That's my dog
 
@third_eye you watch yourself, mister
 
in PHP, 1 min ago, by Benjamin Gruenbaum
So, @tereško my dog decided to pose as your gravatar picture the other day
 
@rlemon DON'T TAUNT ME
 
11:29 PM
I seriously miss winter. It's one of the oddest things about living out here.
 
am I safe in using directives on native HTML elements
 
user1596138
Hahaha @loktar oculus is ruined :P
 
user1596138
Not really.. But still. Might be weird.
 
user1596138
!!afk that's all
 
does anyone use sourcetree, by chance?
 
11:38 PM
 
Started doing an arrangement of this song for somebody's wedding.
I may have to tell her that it's a horrible song for a wedding.
I'll do it... but damn that is the wrong choice for a song.
 
I can think of worse
 
It's so... depressingly minor. And the lyrics... wtf...
How is this for true devotion dear ill give you all ill give you all
How is this for true romance, I fear I put you down, I put you down
How is this for honesty, I need to hear, I need to hear it now
Who do you need me to be
Ill be someone
Ill be someone for you
O.O
 
You could sing this:
https://www.youtube.com/watch?v=swunpZMkZAk
 
lol, truth
omfg
 
11:44 PM
heck, if you could pull this off: youtube.com/watch?v=Y5fBdpreJiU
 
Well, the guy getting married is kind of effeminate...
I wonder if I can happy this song up a bit
Let's see... Bm to a C...
 
@EddieC. Welcome to the JavaScript chat! Please review the room pseudo-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.
 
Hmmm. Eddie V(edder) would be more useful...
 
:D. I can sing
 
11:58 PM
What are you talking about?
 
Javascript
 

« first day (1256 days earlier)      last day (3708 days later) »