« first day (1505 days earlier)      last day (3436 days later) » 
00:00 - 15:0015:00 - 00:00

12:06 AM
I have the hello world working at least :\ does everything have to be done through dom manipulation or should I just download some kind of templating engine?
 
@corvid use react, learn react, learn flux, be educated :-) All of them will help a lot.
ps use bare dom if you are trying to learn DOM, I'd just use react anymore
 
Hmm okay what I am trying to do is grab some json data and render it. That's pretty much it. Maybe 3-4 methods
 
m59
Can you guys help me tweak my obsessive tendencies here? I'm not sure if this is overkill
Let's say you want to call function foo
but you actually need to do this:
crap, I forgot lol
 
m59
12:37 AM
haha, I wrote a simple function and it works, but I for some reason can't explain it at all.
3 hours sleep ftw
 
m59
12:53 AM
Ah yes, given the case where you have a bunch of functions that all need to be called through another function that takes a callback
 
Hi m59
 
m59
@user3732216 yo
 
Bored?
 
m59
I dunno, why?
 
How skilled are you with js?
 
m59
12:56 AM
var foo = function() {
  fnThatWraps(foo);
}
vs.
var wrap = wrapFactory(fnThatWraps);
var foo = wrap(foo);
@user3732216 depends on who you ask.
 
Funny.
I have some javascript code that I need looked at in a post.
I'm wondering if its written well enough to be understood.
 
m59
Just post a link. No need for all the explanation
 

JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
 
m59
@user3732216 that's just a link to this chat...
 
@m59 dafuq is a wrapFactory?
 
m59
1:10 AM
Well, it's a factory, and it returns a wrapped function ;D
 
Also note that your use of foo is confusing
@m59 ...can you flesh it out?
 
m59
Not sure what you mean. It's just a function that I used to make one of my scripts neater
 
What does it do? Can you write it?
 
m59
Oh, sure.
 
Because as far as I can see: function wrapFactory (fn) { return fn; }
 
m59
1:12 AM
In this case, it's to fix twitter's retarded library.
 
In mathematics and computer science, currying is the technique of translating the evaluation of a function that takes multiple arguments (or a tuple of arguments) into evaluating a sequence of functions, each with a single argument (partial application). It was introduced by Moses Schönfinkel and later developed by Haskell Curry. Uncurrying is the dual transformation to currying, and can be seen as a form of defunctionalization. It takes a function f(x) which returns another function g(y) as a result, and yields a new function f′(x,y) which takes a number of additional parameters and applies them...
 
Side tip: If you're thinking of using the noun "factory", rethink what you're doing
 
m59
@Zirak is that right? I thought it made it clear that it creates something. Dunno...
 
Implement it yourself first
@m59 Java scarred me for life
 
m59
1:16 AM
@phenomnomnominal I've gotten the impression that libraries are kinda bad for the web.
 
When people start saying things like "factory" and end names with "Impl", I get both a hankering for blood and to curl up and weep
 
m59
If underscore were modularized, you could reuse it optimally client side
 
@m59 erm, what?
 
m59
Underscore/lodash have so much code I wouldn't need. I can't justify using it client-side.
 
@m59 that's fucking retarded
 
m59
1:18 AM
Is it?
 
m59
Why woudn't it be better to just require what I need?
 
Include it from a CDN, people will already have it downloaded most likely. Then you have battle worn, likely tested code, that you don't have to write or maintain.
 
m59
I agree with all that, it's the library part I disagree with.
took a while to convince me, but some people suggested libraries should just be a ton of modules instead.
 
That depends
 
m59
1:20 AM
There's a jQuery like thing that does that. Can't remember the name..
@Zirak I'd love to know better how to make those decisions ;D
 
0
Q: Improving Javascript and Modal HTML

user3732216I have a bootstrap modal that was modified to be displayed to get a confirmation when a user clicks on a button to delete the item. After thinking about it I want to be able to use the same bootstrap modal template when I want to get confirmation from the user when they try to create a new item ...

 
@m59 For something like underscore, maybe, since it's pretty much a bunch of utility functions you'd probably end up writing yourself anyway (note that if you're using underscore, don't, look at lazy.js, and while you're looking there, don't stop and just use Rx, which you wouldn't want to implement yourself)
But when you look past "a bunch of utility methods", you may not want to do the composition yourself. Ideally, yes, you'd be using only what you need. Realistically, meh.
 
1:40 AM
M59 did you get my link?
 
So what's the deal with this io.js thing?
 
m59
@user3732216 oh yeah, forgot to reply. It seems like a really broad question to me.
 
Well how would you structure to make functions out of some of that code.
 
m59
1:58 AM
Just general principles. Write functions that only do one thing, pass in your dependencies rather than using them implicitly, don't have any global state or other scope that's beyond what it should be
 
 
3 hours later…
5:14 AM
@Zirak YEAAAAH!
Come to the dark side, and stay here FOREEEVEEEER
@rlemon Hahaha I wonder if he'll actually deliver
 
6:15 AM
Somebody Please help. past few hours i am trying to do this but no success :( pastebin.com/mARTWJCV Please take a look.
 
 
1 hour later…
7:40 AM
'morn
 
8:11 AM
ES 6 is nice :-)
would u guys want to read my pesky attempts to make something out of it :/
 
8:24 AM
hi off-room question
can I?
 
@Mahesha999 Don't ask to ask, just ask
= yes
 
8:56 AM
@darkyen00 it doesn't make sense, promises are for values that should resolve only once, it's not well suited for event streams and the likes
 
9:11 AM
Mornin
 
how to optimize image before uploading on server using javascript
 
@yogeshsingh 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.
 
@FlorianMargaine So you suggest I write a wrapper myself for that ?
using promises (orcourse)
ps that wasn't for event streams
that was to filter one single request
check ngHttp for more
you can specify http filters that occur before and after your request is made / completed
 
ah, I thought it was for app.get(), i.e. express
I don't understand what you want then
 
Say you want to perform some operation before you resolve a promise
for every request ?
like say finding the CSRF token and saving it for next request :?
or handle 401 responses for all requests
jQuery has something called .beforeAjax for this afaik
but Angular allows you to have many
I thought promises should have something like this
 
9:29 AM
@BenjaminGruenbaum o/
You're back?
 
@yogeshsingh canvas, I think.
Morning people!
@SomeGuy any luck with namecheap? (Did you even try?)
 
Haven't tried
As I said, I won't be using it for a while, so I'm not going to try to activate it
 
:(
 
I doubt I want myname.me anyway
Because I have a .com already
 
May your PC blow away
After clearing my spam-box:
\o/ \o/
I haven't seen this message for quite a while ;p
!!flexbox or write long css?
 
9:34 AM
@AwalGarg flexbox
 
kk
!!caniuse flexbox
 
9:54 AM
Hey .. Whose here. Have a career-ish question
 
Just ask
You're likelier to get responses if your question is already out there
 
I teach a course on front-end development. I started doing it for free because I like teaching and helping people at dead-end jobs move to something that's fun for them and make huge wads of money.

Well, the classes have started to get a little popular. I have eight students in a completely unorganized weekly "course" and two more students I teach privately.

All the students I taught privately before, I was able to help them get engineering jobs with a little career coaching and around six months of teaching. However, for the course work, I have them working on a group project. I'm th
Yeah, was just typing it. Thanks @SomeGuy
 
I'm nowhere near a position at which I'd be interviewing people, but hobby projects tend to convey more to me
Since you're free to do whatever you want and put in as much effort as you want
Just having a hobby project shows what you enjoy
Professional projects tend to be restricted by whoever you're making it for. They may help the interview see if you're an efficient worker, maybe
Personally, I feel like hobby projects are more indicative of the person's inclinations and ability
Professional ones may only show ability
 
10:10 AM
Those are my thoughts exactly. They're still my thoughts, I just want to make sure I'm not sinking people's time. At least they're having fun. @SomeGuy
 
You might want to wait for someone who may actually have the chance to interview people
As I said, I'm nowhere near that kind of position
So maybe my opinion doesn't count at all
 
I used to interview for companies I've contracted under so I can hire them a starter team or get them a CTO. In group interviews, almost all of us wanted guys with personal projects. But then those just might have been the places I ended up in.
 
That's pretty awesome
It's great that you're helping people
 
Thanks : ] It's mostly just really fun though, it practices your ability to vocalize your skills from memory without reference and gives you more pair programming experience.
I highly recommend it
 
That's true. I realized how difficult teaching could be when I tried a few CodeMentor sessions
It's a fun experience
I'm trying to teach some of my friends programming too, but they're not as motivated to learn as I'd hoped :P
 
10:20 AM
Yeah, I've ditched a few unmotivated students. It's not worth teaching if it's not fun.
You get a lot of different types of mental aptitudes. Some people with great communication, but terrible memory retention. Some are great at pattern recognition, but then they're also too shy to speak up.

Effort is a must. I'm not doing -any- lifting for anyone : D
 
Makes sense
 
11:09 AM
Hi someguy
 
What's up?
 
you say
 
New startup, huh?
I'm sitting around watching stand up on YouTube
 
11:28 AM
Morning
 
!!play Fable III or learn or watch some new anime
 
morning @PeeHaa
 
Bot-knuckles?
 
@Zirak or go back to bed
 
@Zirak Fable III
 
11:30 AM
@rlemon Bot's somehow not in the room, probably a network error
Oh yeah @SomeGuy I got the server-side bot to a point where it can send stuff. Having trouble keeping the websocket open for some reason.
 
You suck
That's why the WS won't stay open
 
That's why you keep coming to me
 
Hahaha, that is true
 
Oh yeah, I also bought Chivalry: Medeival Warfare
 
I don't remember if I already have it
It's supposed to be really fun
 
11:33 AM
Ooooh noice. @Zirak I would love to have the serverside bot
 
@SomeGuy If you don't, do, it's only $5 now
 
Yeah, that's the lowest it's ever been, I think!
Turns out I don't have it
But I'm not going to buy it either
Huge backlog + not enough time
 
Don't you want to behead me? :(
 
The lag would be horrible anyway :p
 
Then you can behead me in slow-mo
 
11:41 AM
No, I'm not buying it :p
I already have way too many games
@Zirak You on Goodreads?
 
Nope, looking at it
Is it any good?
 
Yeah, it's great
Makes it a lot easier to manage your reading list and to find new books too
 
-1
Q: develop an application to calculate the SLA deadline of a captured complaint based on the configured

Testdevelop an application to calculate the SLA deadline of a captured complaint based on the configured working hours. When a complaint is captured it should have a maximum time to get resolved. Some low priority complaints can have 24 hours but some high priority complaints can have 4 hours to be r...

is this a bot?
 
Can I ask a noob question?
 
NO
Yes
maybe
 
11:50 AM
Why can't I foreach this array?
arr = []
arr.push({id: '1'})
arr.push({id: '2'})

arr.forEach(arr.id+1)
 
!!welcome Unihedron
 
!!thanks
 
@Unihedron You have to pass a function into the forEach
 
Thanks!
 
You're passing a value that doesn't exist + 1
Sure
 
11:59 AM
Why can't I forEach on document.getElementsByTagName('p')?
 
@SomeGuy How can one rate something like "The Fountainhead"? The book was so absurd, it was the first time I wanted to yell at paper. But it's not the book's fault I don't agree with the author on anything.
@Unihedron Because it's not really an array, it's a NodeList. Yes, this is stupid.
You can use Array.from to turn it into a real array.
 
How to iterate through a NodeList?
I have to use a for loop right?
 
56 secs ago, by Zirak
You can use Array.from to turn it into a real array.
 
Thanks!
Aww, chrome no supports. I'll use a for loop. Thanks!
 
Just shim it
Write Array.from yourself if it doesn't exist and you can use it
 
12:10 PM
:o
 
[].slice.call(nodeList).forEach( ...
 
did I do something wrong? How is recursion (to iterate and change array elements) 1000 times faster than a for loop and 100000 times faster than array.map? jsperf.com/iteration-map-for-recursion
 
@Zirak I haven't read it
But I hear similar things
 
@towc You didn't call fn
 
woooops
makes sense
 
12:15 PM
@adeneo Thank you!!!
 
@SomeGuy The suggestions I get are...weird
 
@Zirak I am so not ugly
 
@Zirak in the benchmark setup I've declared array as a local variable, does that affect anything?
 
@towc Use map anyway
 
@Zirak yeah, was just curious
 
12:17 PM
@towc You'll probably need to make it global or something of the likes. If no errors are raised though, jolly good.
It's a weird benchmark anyway, it's not doing much
 
@Zirak I don't really get what it should do
 
@towc The benchmark misses the point that unless your logic really is that simple, the looping mechanism is likely to fade into the background
 
@Zirak I enjoyed it greatly
Atlas Shrugged as well
 
@Zirak isn't my logic that simple?
 
@towc I'm not talking about the logic in your benchmark, I'm talking about the logic in real use cases
 
12:20 PM
@Zirak oh. How do I prevent it from fading to the background then?
 
@Mosho Every page was filled with hate. It's like she knew how to annoy me.
@towc You're missing the point. What I'm saying is that it doesn't really matter, unless you're actually trying to squeeze every cpu cycle.
 
ooooh, ok, thanks
 
That the bottleneck won't be in how you loop, but in what you do in your loop. Thus, the benchmark is wrong
 
@Zirak she was a pretty angry young woman :P
 
> @SomeGuy became your friend
aaaawwww
 
12:25 PM
Even though you called me ugly :(
 
You couldn't deny me any longer
 
@Zirak I would have thought you'd like the man vs. system scenario
also, rape scene
extra points there
 
How to schedule a task to be run after 2 seconds?
 
12:53 PM
setTimeout
 
evening people!!
 
Morning @AwalGarg
 
:D
 
Morning @AwalGarg
 
1:10 PM
HAI UNI!
 
@AwalGarg evening
 
debugging lalalala
Ugh, I suck at Javascript. Why won't document.getElementById('more').addEventHandler('click', function(event){ show(); },false); work?
Oh right, it's a node. Never mind.
 
@TGMCians wassup!
@Unihedron you know you can replace function(event){show()} with just show... since you aren't using the event variable anyway.
also, no need to set useCapture to false. It would default to false anyway ;)
 
1:35 PM
@Unihedron addEventListener?
That something someone here might be interested in to work on with me?
 
1:52 PM
(F5 to skip intro)
 
2:07 PM
hi@Jonathan
i have google map with marker , is it possible to add some description with marker
hi@all
i have google map with marker , is it possible to add some description with marker
hi@all anybody is there
 
!!welcome rizwan
Cap's dead
@rlemon cc ^
 
!!revive
 
@SecondRikudo How bout you try !!live?
 
!!live
!!summon
 
let's not waste time being familiar, just tell me what cool things you can do with programming as a side project like this
like making small games?
 
2:17 PM
@SecondRikudo can you clear my doubts, i have google map with marker , is it possible to add some description with marker
 
@rizwan Please don't ping people with your question repeatedly.
You've asked your question once, if there's anyone interested they will help you.
 
@rizwan Welcome to JavaScript room! Please familiarize yourself with the room rules.
 
@ya ok sorry
 
2:31 PM
@rizwan Google has this other great tool beside Maps. It can search the internet with your questions :)
 
!!nudge 260
oh... right
 
that rules page has quite a lot of issues
 
!!>parseInt("two",10)
Hi guys
 
@Deep hi guy
@Deep NaN
 
2:42 PM
Damn
 
ever tried using the console?
 
@towc No wrapping in the quotes ;)
 
I have
 
@AwalGarg oh...
 
:p
 
2:43 PM
Should I get this?
http://www.argos.co.uk/static/Product/partNumber/2927734.htm#pdpPromotions
 
I'm going to try filling in cap's role until she wakes up again
@Deep if you have the money
 
to waste
 
Why "to waste"?
 
 
because spending 229 bucks on a chromebook with only 2gigs ram doesn't make sense to me. If it makes sense to you, go get it ;)
 
2:46 PM
I'm only going to use it for docs, koding and youtube
 
coding on a chromebook?
 
358.26 US Dollars, btw
Yeah
Using koding.com or nitrous.io etc
 
@Deep yeah, it's totally a waste
 
Why?
 
chromebooks are mainly for who hasn't got much experience with computers, but needs one to work and such
programmers I guess are the most experienced with computers
the chromebook is extremely intuitive and loads extremely fast, but that's about it
 
2:51 PM
do yourself a favor and get a laptop which comes with ubuntu.
 
or linux
 
Moneys a bit of a problem
 
@towc ubuntu is, for now, the only Linux OS which comes pre-installed.
@Deep you can make some money ;)
 
How? I can't work till I'm 16
 
Sure you can
Your parents can sign your contracts on your behalf if that's what you're talking about
 
2:54 PM
@Deep freelance? Search for a cheaper or second-class computer?
 
Usually, it doesn't matter even if you do sign yourself
 
Oh ok.
 
@Deep In my country, the age limit is 18, I am 17, and I made enough money to buy my present i5 laptop in a week :)
 
Cool
 
@SomeGuy What are your system specs?
 
2:57 PM
i5 2500k, 8GB RAM, 120GB SSD
Can't remember my mobo
Why do you ask?
Asus P8H77-M Pro was the mobo
 
Just curious...
that is a desktop, right?
 
I bought mine after I got paid for my first contract
Yep
 
o_O nice. How much, if I may ask?
 
00:00 - 15:0015:00 - 00:00

« first day (1505 days earlier)      last day (3436 days later) »