« first day (1359 days earlier)      last day (3596 days later) » 

10:06 AM
@SomeGuy can I just straightway jump to node.js?
I don't feel there is much to learn in dom
 
Haha, sure, try it out
 
sorry, dom I meant
node.js certainly has many things to learn
the inbuilt module names for instance, which I once tried
 
@SecondRikudo LOL
don't micro optimize, also no.
 
node helped me solve a practical problem yesterday
I'm prototyping an application using knockout by handcrafting the html (no stupid web framework guff in the way) and I needed a way to serve a static page and IIS was giving me the finger. Solution: npm install node-static
 
Python comes with a built in HTTP server
For example
Most languages do
 
10:17 AM
I don't have a python install atm, I do have node :P
 
10:32 AM
0
Q: Installing linux on a macbook pro - boot broken

Florian MargaineSo I tried to install ubuntu 14.04 on my macbook pro (completely replacing OSX). I had refit installed, but not it seems gone. And every time I boot, the PC can't find any OS. I tried using boot-repair with all the possible options, but it never fixed the boot. I have the following partitions: ...

tl;dr can't boot my mbp
life sucks :(
 
10:43 AM
@SomeGuy what the fuck
 
awesome :D
Does anyone know why UK keyboards have a key for ¦ and ¬? I've never even seen those characters in any text before (besides ¬ in some computer science papers)
 
Hello
are questions about angular welcome here or is there a different room for that?
Nvm that. I found an angular room, it's empty thought :/
 
in here is probably the better place
 
woohoo
fixed my boot
installing ubuntu upgrades now
then I'll install git and get my setup back :-)
.dotfiles on the way!
 
Congrats!
 
10:58 AM
unity sucks
quick, updates... I want to download stumpwm
31k/s :(
 
Ok then. My issue is that I'm trying to use $cachefactory and I keep getting Error: $cachefactory is not defined and I'm unsure why. Is there a dependency I need to include? [Example on plunker](plnkr.co/edit/2ZMnrWBbSd6Zm2yWtkH4)
uhh.. what's the proper way to hyperlink
 
http://
 
@MrPlow have you injected it? do you have some code to show?
 
welp, too late to edit now. Let's hope this works
 
oh
 
11:04 AM
@MrPlow no multiline
 
@MrPlow you forgot to include angular
 
@Mosho it's included in index.html
at the top
though I should put it at the end of the body probably
if you try the example and click on the Test link it'll show a view which means that angular works and ui router works
 
@MrPlow oh, you forgot to include that script
hmm
or not
 
@Mosho what script? Both services and controller are included
 
11:07 AM
hmm
 
every single example i see on the net uses a single js file for controllers, services and everything
 
remove 'use strict'
 
@Mosho from?
 
js files
first line
 
from every script?
why?
 
11:09 AM
because it makes it work :P
 
xD
 
@MrPlow I think it's because it doesn't let you declare globals
 
@Mosho nope. Removed 'use strict'; declarations and i still get the error. And i did refresh the page to reload the scripts
 
such as angular
 
hmm
what should I do then?
 
11:13 AM
give me a minute
no errors
changed order of scripts to services.js before app.js
because your Test module requires Test.services
so that has to be first
 
@BenjaminGruenbaum Nah, I tested
 
@Mosho I still get the error
 
It does reduce loop time by a factor of 2, but loop time is negligible anyway in comparison to the work done inside.
 
@MrPlow what error
 
@Mosho gimme a sec i'll paste the error and full stack trace to pastebin
 
11:19 AM
in my plunker?
I'm getting no errors
 
@Mosho yea, in the plunker link you gave me
@Mosho which browser are you on?
 
chrome
but I'm getting it now, I made a controller
and injected the factory in it
and now I see it
@MrPlow typo
capital F in $cacheFactory
 
@Mosho holy ****. Bloody camelCase
good find
thanks
 
anytime
 
11:48 AM
< built a camera app with filters that run on ~60 fps in javascript [ WebGL | WebRTC = Oh my ]
 
12:23 PM
@SecondRikudo no it doesn't
If it reduces loop time by a factor of two your benchmark is broken
Source: I RTFC'd
 
welll ... of course if you are looping over two different things, then actually a "factor of 2" difference is possible
(I'm thinking about HTML collection vs Array as an example)
 
Yes, in an HTMLCollection there might be a considerable difference if you loop in different ways if it's a live collection, since it's a DOM calculation each time - it has to calculate the .length over and over.
That's why doing len = a.length is important in those scenarios
 
@SecondRikudo The ecmascript spec implies that dropping the 3rd argument of a for loop would have a minute performance increase
> If the second Expression is present, then
> Let incExprRef be the result of evaluating the second Expression.
> Call GetValue(incExprRef). (This value is not used.)
 
WebGL is dope
@copy do you use webgl in your emu ?
 
12:47 PM
Nope (not yet)
I don't know if it would be faster, since I only need a pixel buffer
 
I thought so [atleast for 20% part]
but i am now having 60fps at camera [with no filters ... so just buffering]
 
I need to verify that. Drawing only makes up around 10% of CPU usage though
 
Hmm
you have an android device ?
 
Yeah
 
wanna test something ?
 
12:55 PM
Sure
 
gimme a min lemme set up a local tunnel :-)
okay everything else disabled and using the real awesome seriously.js
tap on the camera FAB at the bottom
and it will take a lil while .. slow web
my this is hell slow .. embarrassed
 
I tapped the icon on the bottom
Now it shows a black screen with a bunch of icons that don't do anything
 
Fellas, is it possible to get the URL on a res.on('data') event when using node's HTTP client?
 
@copy thats weird, does your android supports getUserMedia ?
i will fix it later.. i guess
gotta run bbl
!!afk running
 
1:05 PM
@BenjaminGruenbaum I'm having many requests running in a loop, is it possible to associate the event with the request object it was acted on?
 
@SecondRikudo use promises
 
@AbhishekHingnikar No idea
 
Then use map
 
Promises fix everything
 
@BenjaminGruenbaum I will need some serious assistance with that since promises are a completely new concept to me XD
Do you have some time?
 
1:07 PM
@SecondRikudo no, I'm busy - sorry
I'm studying for an exam, I'll have time tomorrow evening probably
 
=(
@BenjaminGruenbaum Tomorrow evening would be about 30 hours too late :P
 
You could hire someone to explain promises to you. Or you just learn by yourself like everyone else
 
@copy I'm actually trying a simplified example here
I want to send requests in a loop, parse the response, and console.log the relevant part of the response alongside the URL (or some other identifier)
I already have the sending of requests in a loop, and that's "good enough", but I want more than "good enough"
 
Use .bind
 
@copy Hmmm, how? The event function only accepts a certain argument
 
1:11 PM
Then you change the event function
 
var request = Promise.promisify(require("request"));

Promise.map([1,2,3,4,5,6],request)...
 
@BenjaminGruenbaum wait what?
 
Sorry, I'm really afk
 
Isn't request an object of some sort?
 
1:15 PM
No client side, I'm only sending out requests via CLI
 
var results = [1,2,3,4,5,6,7].map(function(i){
    return $.ajax("http://"+i);
});
$.when.apply(null,results).then(function(){
   ...
});
I'll be back later
 
Actually promises are a bit problematic in this case I think
Since the on 'data' even can happen multiple time, no?
Or am I misunderstanding things
 
You only want the whole page though
!!afk studying
 
1:42 PM
Why is the Promise object not available to me in node? (i.e. console.log(Promise) gives me an error)
 
Your questions are getting ridiculous
 
I know -_-
I'm just trying to understand the examples I'm seeing
 
^-- Interesting presentation
 
ok, now that I am done with codecademy, and still not having learnt complete js, is mdn a nice place to start with other js things?
I keep hearing a lot of jargons here
but I don't know what they do
where to learn about them, in a way codecademy taught me the other things?
 
Actually creating something would be a good way to move on
 
1:52 PM
@copy but what about things like promises, __proto__ etc. I dunno a penny about them.
 
you'll figure out what you need when using stuff
 
ok, do you have any recommendation on what to make? I have an idea, maybe silly, but making wordpress in JS?
The only problem is, it involves database things
and I don't know node.js yet
 
then learn node and build wordpress in js
read a bit of that and start coding nodebeginner.org
 
would it be fruitful enough going straight to node without doing what you told me (making something in only client side js)...
 
node is only js
you won't find jquery in it
 
1:56 PM
hehe, ofc.
I meant, client side js
sorry, I made a typo there
 
what do you want to do, exactly?
 
and it seems I have read the nodebeginner.org book (the free part only). I felt a need of learning more about client side js (basically the specs) because of things like callbacks etc, thats why I stopped in between.
 
Is javascript your first language?
 
Okay, so I managed to use promises to send my requests (yey)
 
@FlorianMargaine just learn client side js and node.js, then port my project from php/mysql to node/mongo
 
1:59 PM
But I still have no idea how to get the URL XD
Promise = require('q');
var http = require('q-io/http');

var publishers = ['reuters-network', 'ynet', 'blumberg'];

promises = publishers.map(function (i) {
    return http.request('http://cdn.taboola.com/libtrc/' + i + '/loader.js');
});

Promise.all(promises).then(function(results) {
    results.forEach(function (result) {
        console.log(result.headers);
    });
});
 
@Meredith php is first, and I know only basic turbo c++ (borland compiler)
 
Yeah I'd recommend delving deeper into C++ first
I mean if you have an idea for a javascript project, go for it
 
@Meredith Absolutely not
 
But if you're trying to learn how to program, then javascript isn't the best way
 
2:00 PM
@SecondRikudo which url?
 
@FlorianMargaine The URL of the request
 
But it's infinitely better than C++
 
The request I sent
 
90% of javascript is trivial to learn if you understand languages like C++
 
@copy I feel the same :P
 
2:01 PM
@Meredith C++ and JS are nothing alike.
 
nah, C++ recently got lambdas.
 
You missed the point
 
ok, so I will go straight to node.js for now...
considering it is js as well, so I reckon my js tune would not be lost in midway, right?
 
So any idea @FlorianMargaine?
@AwalGarg Not at all
 
@SecondRikudo err, why not?
 
2:04 PM
@AwalGarg Why what?
 
@SecondRikudo q-io/http doesn't keep the request, only the response is returned?
 
@FlorianMargaine At least that's what their docs say
It accepts a URL and returns a promise for a response
 
but the request object isn't kept anywhere?
console.log the result...
 
It's a reponse
(An epic long object which is basically a response)
 
If you have a promises question, ask @BenjaminGruenbaum; @BenjaminGruenbaum, I have a promises question - "Should I care what is a promise?".
 
2:08 PM
@AwalGarg Promises are a very powerful tool, if you can learn how to use them :D
 
is it a replacement/helper thingy for events?
 
@AwalGarg It isn't
events have their own usecases, and promises have their own.
 
are they related?
 
Good read with a good example ^
 
yeah, thats what I just read
 
2:10 PM
Read it all
slowly
 
and at the very start, it shows why events aren't always good
thats why I thought so
 
@AwalGarg Promises cannot be called twice.
 
but ok, I will read it thoroughly
 
If you want an event to happen on hover, promises aren't for you.
Promises are there to control the flow of async code.
 
ok, so they say it arrives with es6. so no old browser support then?
 
2:12 PM
@AwalGarg There is a polyfill.
 
the government should put people using IE behind cells...
 
@SecondRikudo @BenjaminGruenbaum
 
and also take away their smartphones, laptops etc...
 
@copy Hmm?
 
2:14 PM
another jargon in my list ah, I get it
 
@SecondRikudo bluebird supports IE8
 
all supporters of IE8 should also be put behind the bars...
 
@FlorianMargaine Interesting
Lemme see to make sure I understand all of it
 
13 mins ago, by Awal Garg
@SecondRikudo err, why not?
@SecondRikudo please clear that point to me ^
 
Read a tutorial, like the one Domenic Denicola wrote.
 
2:19 PM
15 mins ago, by Second Rikudo
@AwalGarg Why what?
Please clear that point to me ^
 
@SecondRikudo did you figure it out?
@FlorianMargaine ie6 too
Also, netscape 7
 
@BenjaminGruenbaum Sorta, although getting the URL is still not trivial even with promises.
 
@SecondRikudo you told me not to do this :
17 mins ago, by Awal Garg
considering it is js as well, so I reckon my js tune would not be lost in midway, right?
 
@BenjaminGruenbaum lol seriously?
 
@FlorianMargaine why not just use the original publishers array?
 
2:20 PM
@SecondRikudo oh.
 
Why the need for a publisher object for each promise?
 
@SecondRikudo promisify request, then use .map, it's trivial. If you use node use --harmony and use coroutine and it's even simpler.
 
actually, I'm not sure it's even going to work
 
I'd explain in more detail but I'm afk studying for a test
@FlorianMargaine yep I checked
Well, anyway,
 
you need to make sure the promises are resolved in sequential order
 
2:21 PM
!!afk studying again, good luck and all
 
@FlorianMargaine Wouldn't all take care of that for me?
 
No, it wouldn't, use .each or .map with the concurrency param
Or .reduce, or anything else that has to do with sequencing
 
But I don't want to sequence it
 
The whole concept of stuff like .all is concurrency, things happen at the same time.
 
The idea is to request them all at once
 
2:22 PM
Good, you shouldm't
Anyway, afk again for real
 
Otherwise I would have used bash, curl and a for loop
 
You can do that with a for loop in bash
 
@copy concurrently?
 
Yeah
 
While parsing the response and displaying the original request "name"?
 
2:24 PM
Sure
 
You must be really good with bash then, because I have no idea how it could be done
 
First you google run for loop in parallel bash
 
Noted
I still want to do it with node.
 
hmm, did I not yet clear the point, Madara?
 
2:27 PM
@AwalGarg No, you haven't. What are you asking?
 
25 mins ago, by Awal Garg
ok, so I will go straight to node.js for now...
^why would you deny to this?
did I now?
 
@AwalGarg That's not what I denied.
You asked if you would lose the "js tune" and I said that you wouldn't.
 
then what did you deny?
ohhh my goodness.
I thought you answered the last thing - _"right?" as "noooooo"
ok, then
node, I am coming
Madara, thankyou, you cleared the point now :P (btw, whats the favicon at madara.ninja ?)
 
posted on July 06, 2014

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); try { var pageTracker = _gat._getTracker("UA-3727700-1"); pageTracker._trackPageview(); } catch(err) {}

 
@AwalGarg renmets from the server
 
2:40 PM
what is renmet?
 
!!tell AwalGarg define remnet
 
@AwalGarg It means I aint got time to learn your $5 words.
 
lol
I meant remnants
Needs moar coffee
 
I want to see what that bottess said, but who has the time to un-ignore her, then read, then re-ignore...
can someone please quote her message...
 
@AwalGarg Why are you ignoring Caprica?
 
2:45 PM
@SecondRikudo she put me in mindjail, I am upset with her.. and that welcome spam.. ugh
 
3:16 PM
"I misused her and that was the only way my primitive mind could retaliate"
 
@SomeKittensUx2666 lol, the former part is true :D
what the hell is this Ux2666 ?
is it the unicode code for the mod diamond symbol?
oh right, it is
 
@BenjaminGruenbaum @Zirak you might want to chime in reddit.com/r/learnprogramming/comments/29yzlm/eli5_coroutines
 
@FlorianMargaine BenjaminGruenbaum is afk: studying again, good luck and all
 
Heh, how long do you think sending out 2204 HTTP requests should take? XD
 
3:56 PM
around 7
 
hi can anyone please tell me how to imports all the javascripts files, say jquery.js, angular.js, bootstrap.js, flot.js....etc within a single js file
 
any ideas why document.createElement("br") doesn't work?
 
@AwalGarg is this normal DOM? Creating an element doesn't add it, how would the document know where you meant?
 
@TomW I do use newLine.appendChild. Is that what you are talking about?
 
yeah, I think so
is this random documentation I found by googling talking about the same thing?
 
4:07 PM
yes
I first need to make sure its not just bad css
wait, I will brb
hehe, my silly typo was causing the error
does anyone know of mdn's dev console easter egg?
 
silly typos are always the way
annoying that browser's default behaviour when it encounters something wrong is to ignore it, I'm a C# kinda guy and I like compile errors because they tell me something is wrong
 
ignore it?
oh
 
Chrome lets you know in the console
 
pretty good they let you disable it
I like a plain white console much more than the ascii mascot
 
I am making a video @JAndy one on common mistakes by Indian programmers when learning programming.
 
4:25 PM
any one know about .aspsex file?
oh sorry i had to say any one know about .aspx file?
 
@AbhishekHingnikar do u have answer to Question
 
@PratikJoshi nopaaa overflow style [ nop nop nop ] nopaaa overflow style
eeeeeeh you are in wrong room matey, nop nop nop noppaa overflow style
 
? :) why wrong room?
 
we love sex but we hate asp
 
4:32 PM
I also hate asp ,so i asked aspSEX file
 
@FlorianMargaine sigh Now I'll have to sign up to reddit?
zirak is probably taken, too...
Fuck them
 
@Zirak you'd rather have a question on programmers.se?
 
I need a new name for these sites. One which isn't apparently a common Kurdish name.
 
@FlorianMargaine wait what you don't understand co-routines ? or just asked the question on purpose ?
@Zirak $$$__Zirak__$$$
 
And one which doesn't make me look like a wannabe pimp
 
4:43 PM
xD
__Zirak__ would do that ?
 
@AbhishekHingnikar I don't understand their purpose, or in which case they're useful. For example, I don't know for sure if you can run parallel functions with them
 
How about I take Moby Dick, make character ngrams out of it, and choose the least common 6 letter combination?
 
@Zirak should be perfect
 
@Zirak ZirakLime
 
easy do in nltk
 
4:44 PM
hah, zirak_ isn't taken
 
@Zirak VisualZirak
wait Zeemacs ?
 
Get Zirakertan!
 
Fuck Zirak Ertan, I hate that name. It's a hack
 
> there doesn't seem to be anything here
:'(
 
@FlorianMargaine I haven't used coroutines all that much in parallel contexts, so can't comment a lot on that
 
4:50 PM
@copy i got the issue, the thing is you have to test it in Chrome Beta for Android aka chrome 36+ I had chrome 36 because of android L the webgl filters won't work on lower devices.
 
@Zirak I don't really get their usage over callback or promises then
or a simple closure, dunno
 
I'll try and explain that, then
 

« first day (1359 days earlier)      last day (3596 days later) »