« first day (604 days earlier)      last day (4351 days later) » 

4:00 PM
Yep, linux ftw. Unfortunately, the server can haz windows.
 
hmm
 
windows server === oxymoron
 
Would like to bring it down, but wouldn't like to rewrite a ton of vb scripts that were made for it.
Of course, I could just read files synchronously and process their contents asynchronously.
Or set up some limit, say 50. But that's... meh.
 
windows server === somethingwhichispowerfulbutiwonteveruse
 
4:05 PM
apple.com/server that is a joke....
 
also, are you reading those files on every request?
 
like, they are trolling us right?
 
are you even using this when serving a request?
if so, why?
 
I've got an API that allows processing of a user-specified number of files.
Files are being generated several times every minute, so there are lots of them.
 
in the thread it's said that it only depends on resources available
 
4:11 PM
Okay, could be true. But then, how can I make sure my script doesn't fail?
Should I try catch a specific error?
 
catch the error and try later
btw, if you test it, let me know how many files were open when you get the error @Oleg :D
 
I guess it's variable, so I kinda agree with the dependence on system resources available.
I'm talking about limits because I found the following SO question: stackoverflow.com/questions/10210978/…
Also, there's msdn.microsoft.com/en-us/library/6e3b887c%28v=vs.100%29.aspx which "Sets a maximum for the number of simultaneously open files at the stdio level."
 
user986408
is it possible to iterate an object with a classic for loop ? i need to assign multiple values and increment by += 4..
 
So for the moment I'm really confused about all that...
 
user986408
for(var i in obj) doesnt work becaus it iterates one by one
 
4:23 PM
well he got 4000 files opened
since he opened 5200 and 1000 errored or so
so the max 2048 can't be true
 
@ThatWebNerd Iterate an object?
 
I am processing ~6500 files and get ~1150 errors.
!!> 6500-1150
@Esailija 5350
 
Yeah, but he also says it's random: "The exact number of errors isn't always the same, but it's roughly the same amount."
 
user986408
@Oleg yea iterate through object properties
 
@ThatWebNerd Okay... and why the += 4?
 
4:26 PM
@Oleg I think most robust way is to just catch those errors and try them again a bit later when more handles are freed
 
Yep, I was thinking about a queue of some sort.
 
yea
 
But I also need to know how many elements to hold in that queue.
For the time being the only thing that comes to mind is a try catch.
But I don't feel it's a proper way to do things.
 
well errors crash the process so if you store the queue in the process memory it is lost
 
user986408
@Oleg this is how it would look like with an array:

for(var i=0; i<arr.length; i+=2) {
var img = document.createElement("img");
img.id = arr[i];
img.src = arr[i+1];
}
 
4:28 PM
you could store it in redis or whatever though
 
user986408
btw how do you guys format code as code
 
@ThatWebNerd use an array of objects for crying out loud
 
@ThatWebNerd ctrl+k
 
user986408
cant use
 
user986408
array of objects
 
4:29 PM
why not
 
? why
arr[1] = {id : 1, src : "blah.png"};
 
@Esailija I can't store it in anything else than files. My boss gets on rampage when any notion of remote service or databaselikeness is involved.
 
:|
wtf
 
^ +1
 
user986408
yea but this arr then has to be a property of another object.. because im using JSON.strigify to persist all of this..
 
4:31 PM
@ThatWebNerd so what?
 
!!> JSON.stringify( [{id:1,src:"/"}, {id:2, src:"/google"}] ) + " Array of objects like a boss"
@Esailija "[{"id":1,"src":"/"},{"id":2,"src":"/google"}] Array of objects like a boss"
 
You can use values in array in array in object in array in object in .... ...... and it will stringify perfectly.
 
user986408
ok.. then :/
 
JSON ftw.
Besides, for in doesn't respect order.
And there's no order in objects anyway.
 
or peformance
 
4:33 PM
^ ?
 
for in performs 13x slower than for loop
 
user986408
right.. dunno what i was thinking.. no sleep last night ..
 
Ah, ye, that's right.
 
for( i = 0; i < len; ++i ) {
	img = new Image;
	img.src= arr[i].src;
	img.id = arr[i].id;
}
 
^ global variable detekted
 
4:35 PM
=D
 
:P
++i works?
 
now it's assumed everything is declared in unknown code above
 
!!> ["wibel","wobel","time","whime"].join('y.. ') + 'y stuff';
 
@rlemon "wibely.. wobely.. timey.. whime stuff"
 
!!> var i = 0; ++i;
 
4:35 PM
@Oleg 1
 
yay
 
@rlemon "wibely.. wobely.. timey.. whimey stuff"
++var = increment the variable, then return the value
var++ = return the value, then increment the variable
 
Learned something new today.
 
in for loop it's no different though
 
I bet that JSLint would throw a tantrum over that.
 
4:37 PM
I don't think JSLint appreciates the elegance of ++ in any case
 
!!> this.top
 
Agreed, as much as I like JSLint I think ++ is actually quite good.
 
@rlemon undefined
 
!!> this
 
!!> console.log(this);
 
4:38 PM
@rlemon [object DedicatedWorkerContext]
undefined
Logged 1:[object DedicatedWorkerContext]
 
!!> console.dir(this);
 
@rlemon TypeError: Object #<Object> has no method 'dir'
trolololo D:
 
dafuq?
 
worker doesn't have console
it's custom console I made just for you
 
:(
 
4:39 PM
ohhh i c
 
!!> console.log("just", "for", "you");
undefined
Logged 1:"just"
Logged 2:"for"
Logged 3:"you"
 
!!> var x = this; for( var i in x ) { console.log( i ); }
 
@rlemon Security Exception: cannot access WebKitBlobBuilder
don't you love that WebKit is written like that?
undefined
Logged 1:"WebKitBlobBuilder"
Logged 2:"XMLHttpRequest"
Logged 3:"DataView"
Logged 4:"Uint8ClampedArray"
Logged 5:"webkitNotifications"
Logged 6:"Int32Array"
Logged 7:"location"
Logged 8:"WebSocket"
Logged 9:"MessageEvent"
Logged 10:"MessageChannel"
Logged 11:"webkitIDBObjectStore"
Logged 12:"FileReader"
Logged 13:"navigator"
Logged 14:"ArrayBuffer"
Logged 15:"Uint8Array"
Logged 16:"onerr
 
!!> var x = []; for (var i in this) {x.push(this[i]);} x;
 
when it's usually webkit
@Oleg Security Exception: cannot access WebKitBlobBuilder
 
4:40 PM
damn
 
webkitIDBObjectStore vs WebKitBlobBuilder
do you know how often that WebKit gets me?
it should be Webkit ffs
 
!!> var allo = this[4].createNotification("","Testing","123"); allo.show();
 
@rlemon Security Exception: cannot access webkitNotifications
lol why does worker context have all this shit even
@rlemon TypeError: Cannot call method 'createNotification' of undefined
 
WWDC keynote in 20 mins.
 
"no dom for you but have desktop notifications"
 
4:43 PM
I was hoping to be able to spam your desktop with notifications.
 
:)
 
the bot has passed government security audit... it's bulletproof
!!> Math.random()
@Esailija 0.5750178571324795
 
!!> new Date().getTime().toString(36);
 
@Oleg "h3brx3sx"
 
Why just 36? ;(
 
4:46 PM
that's all letters in one case and numbers 0-9
 
!!> new Date().getTime().toString(2);
 
@Oleg "10011011111011100011100001101111101010100"
 
Why not uppercase? :(
 
I actually have no good explanation for it
it would be base 62
 
!!> new WebSocket();
 
4:49 PM
@Abhishek Security Exception: cannot access WebSocket
 
!!> var obj = this; new obj();
 
@rlemon TypeError: object is not a function
 
!!> (function(){ console.log(this); })();
 
@Abhishek SyntaxError: Unexpected end of input
 
!!> this.constructor
 
4:50 PM
function DedicatedWorkerContext() { [native code] }
:4076780 undefined
Logged 1:undefined
 
!!> new this.constructor();
 
@rlemon TypeError: Illegal constructor
 
!!>new this.prototype.constructor();
 
!!> var x = []; for (i in this.__proto__) {x.push(i);} x.join(', ');
 
@Abhishek TypeError: Cannot read property 'constructor' of undefined
@Oleg [object Object]
 
4:51 PM
!!> this.constuctor();
 
@rlemon TypeError: Cannot read property 'call' of undefined
 
!!> this.__proto__.constructor.call();
 
@Abhishek TypeError: Illegal constructor
@rlemon TypeError: Object #<DedicatedWorkerContext> has no method 'constuctor'
 
are we on the hack frenzy ? lol
 
!!> var con = this.constructor; new con;
 
4:52 PM
trying to bypass Esailija's security ?
 
@rlemon TypeError: undefined is not a function
 
!!> var con = this.__proto__.constructor; new con();
 
@rlemon TypeError: Illegal constructor
TypeError: Illegal constructor
:4076794 ReferenceError: i is not defined
 
!!> var x = []; for (var i in this.__proto__) {x.push(i);} x.join(', ');
 
@Oleg "postMessage, webkitPostMessage, close, importScripts, setTimeout, clearTimeout, setInterval, clearInterval, addEventListener, removeEventListener, dispatchEvent, webkitRequestFileSystem, webkitRequestFileSystemSync, webkitResolveLocalFileSystemURL, webkitResolveLocalFileSystemSyncURL, openDatabase, openDatabaseSync, TEMPORARY, PERSISTENT"
 
4:54 PM
!!> Array(3).join("hacky ")
 
@rlemon "hacky "
@rlemon "hacky hacky "
webkitResolveLocalFileSystemSyncURL that's an interesting method name
 
!!> this.__proto__.x = function () {return 'hey';};
 
@Oleg function () {return 'hey';}
 
The context is wiped on subsequent requests, right?
 
yes each line runs in its own thread
 
4:56 PM
!!> this.__proto__.x = function () {return 'hey';}; this.x();
 
@Oleg "hey"
 
!!> this.__proto__.postMessage = function () {return 'hey';}; this.postMessage();
 
@Oleg Maximum execution time exceeded
 
o_O
 
lol, you overrode postMessage so the main window couldn't get response in time
 
4:59 PM
^^
 
!!> this.__proto__.postMessage = function (a) {return a;}; this.postMessage('hey');
 
@Oleg Maximum execution time exceeded
 
boo
I don't understand workers.
 
!!> var postM = this.__proto__.postMessage; this.__proto__.postMessage = function(){return postM({lol:"lol"});}
@Esailija [object Object]
that could be problematic...
 
okay, WWDC time
 
5:01 PM
ok
@Oleg you mean you are not using them in node either? you are using only single process?
 
wow myclientbase.com what an excellent piece of software
only like ten minutes in but I understand how to use it already
 
@Esailija What do you mean?
 
intuitive menus and navigation.
simple interfaces
 
var i = 0, pm = postMessage, tInt = null;

this.postMessage = function() {
    var a = arguments, self = this;
    tInt = setInterval(function() { if (i++>=5) { clearInterval(tInt); } pm.apply(self, arguments); }, 200);
}
 
I mean if you are using only single process for node?
you could use as many as you have CPU cores
 
5:04 PM
How do I do that? (I have just recently started dabbling in node)
 
anyone else benchmarked their pc while running D3?
one core.....
D3 uses one core and almost no GPU (WTF?!?!?!)
 
But really, can it solve the issue?
 
when doing .append("<blah>") in jquery does that invoke the use of innerHTML?
I would assume yes
but just wanted a dinfinitive
 
5:05 PM
well on windows if the handle limit is per resources it won't probably increase the amount of handles you can get
 
hmm it does an appendchild
 
but having all cores doing processing is faster anyway
 
that is if you pass a node
 
oh wait nm
yeah
 
5:07 PM
I think my bottleneck will probably be the disk.
But I will check it out, thanks!
 
if some process is too busy to take the request some other process will take it
 
wow looks like jquery creates a fragment
smart
 
so smart
like electricity
 
lol yeah looking at some code a potential candidate sent
its riddled with jquery
 
it also caches small html snippets
 
5:08 PM
but so far its not terrible
 
user image
4
LOL of the day!
 
That's true about Chrome.
It's so heavy you need a tank to mount it on...
 
thats the IE support gun
one gun, 10 versions.
shoot yourself at will.
 
mysqldump is so convenient!
 
^ I want me some of dem
that is me btw
ok back to work.
 
5:15 PM
ok noob question...
really noob.. but I havent done it before
when you do new func() wtf does that become?
like when you dont assign it?
is it just an anonymous object at that point or what?
 
then it will be lost in a black hole
 
thats what I assumed
thats why I have never done it
 
5;
 
he has it when initializing all of his object
ty btw
 
yeah if you are doing it, something must be wrong
 
5:17 PM
lol
 
he has everything like this var blah = {blah:func(){};}
 
it means that constructor does real work
which is an anti pattern
 
@Esailija agreed
 
then hell do new blah.blah()
 
@Oleg looks to me like a handheld minigun
=> A lightweight Rambo weapon
 
5:18 PM
Chrome is fantastic.
But it feels more and more like bloatware.
 
though it's somewhat heavy, every tab is its own process also means a lot more memory usage
 
Chrome Summed up usage < Firefox
on same number of "facebook" tabs
 
but what the hell, even 16gb of memory is dirt cheap these days and you couldn't use it on a home desktop if you tried
 
heck yea
 
maybe running 10 instances of diablo3 or something
 
5:20 PM
I've got 4gb of memory and with like 40 tabs in my main browser, and like 40 tabs open in the VM and Poof... no more system
 
4gb stick costs like 20 euros
 
+ 10 gimp images, + 5 nautilus folders, + like 10 terminals.
ugh i need to close shit
 
Kingston Valueram 4 GB 1333 MHz DDR3 23.9€
 
that is what I have
> Corsair Vengeance Low Profile Blue 16GB (4x4GB) DDR3 1600MHz CL9 1.5V DIMM
$110 CAD
 
hmm
 
5:23 PM
home pc
just runs Diablo
:)
 
that corsair vengeance shit costs 115€ here :D
 
~$1000 pc for Diablo :) i love it
 
that's like $150 USD or something
 
it's great RAM
 
it's why we can use jQuery
 
5:25 PM
Hey all
 
unfortunately my tablet and phone don't come with 16gig of RAM
and I do more web "browsing" from them than my pc
 
can you guys help me yell at the commentors here: stackoverflow.com/a/10984672/561731
 
:O
I love to browse on desktop :(
 
(I like to sit on my couch and read my news from my tablet and blogs from my tablet vs sitting at my desktop)
 
for mobile I have ultrabook
 
5:26 PM
I have a Viewsonic G Tablet loaded with ICS
 
jesus, i take a site offline for "scheduled" maintenance and i get phone calls within 1 full minute of it going offline. do people not read their email?!?
 
using scp to copy directories cool?
nope
damn
I want to copy my local /var/www to user@192.168.x.x:/var/www
 
directories? why not tar -zcf mydirectories.tar.gz ./targetDirectory
 
New MacBook Pro 15inch 2880 x 1880 resolution.
 
Is this comment too strong :D
"self invoking function" for any sane person implies recursion — Esailija 1 min ago
 
5:36 PM
@Esailija Yes. It implies that sane === educated
Or, perhaps sane == educated
 
it's too late to edit :D
 
;-)
 
I just deleted it, it got no upvotes so obviously it was too strong
should have gone with "IMO Self-invoking function implies recursion of some sort" :D
Tuning down the inner Raynos
At least someone more polite commented
The key thing to note here is that the functions do not self-execute. As Esailija stated, recursion is an example of a function that self-executes. In the examples, something IS invoking the function, but it is not the function itself. — lbstr 3 mins ago
the message has been delivered politely
 
Seems like a 'please do some research for me' kinda question... didn't think these jived well with the community. — rlemon 9 secs ago
 
actually people love these type of questions about javascript
but when you copypaste wall of code and ask why are these 134 different plugins not working together
or "how to x like here is done"
etc
 
5:55 PM
bah I feel like such a douche now
I am like crazy critical of other peoples JS
 
lol at WWDC: "new Safari ... has the fastest JavaScript, beating IE9, Chrome 19 and Firefox 13"
With tab syncing across devices apparently.
 
it's all good
because of this fierce competition in javascript speed, it's pretty much the fastest interpreted language out there?
 
Moar speed! Moar!
 
MOAR SPEED WITH MOAR LIBRARIES!!! LOAD ALL OF THE THINGS!!!!
 
safari is the best for DOM manipulation
 
5:58 PM
My fellow C++ devs frown at my JavaScripts.
 
other than this... dunno
 
Isn't Safari the same as Chrome from the point of view of DOM manipulation?
They both use Webkit, no?
 

« first day (604 days earlier)      last day (4351 days later) »