« first day (1012 days earlier)      last day (4162 days later) » 

user895378
00:01
@bwoebi It can be a little difficult at first but once you get the idea of it I find it's really helpful and you tend to start a lot of things that way. I wouldn't worry about the exact details of the implementation too much -- just focus on writing the code in such a way that you can easily swap out the backend storage for whatever data you're persisting.
@rdlowrey It is helpful… at least I found my queries more readable now…
user895378
I haven't had a chance to checkout your ws implementation yet, but I plan to do so a bit later this evening.
yeah, I'm not yet finished, wait one hour or so, then I'll commit my gateway pattern
then you can better test
@rdlowrey in which timezone do you live?
user895378
I'm GMT -0500 so it's only 20:00 right now for me.
ah okay… little difference between +0100 and -0500 ^^
user895378
00:04
yeah, when I say "a bit later this evening" it'll probably be close to when you're waking up tomorrow :)
@rdlowrey I will wake up at about 12:00 in my timezone
will you still be awake at six in the morning? :-) (your tz)
user895378
@bwoebi hehe, probably not that late
00:19
posted on July 23, 2013 by Paul Reinheimer

We recently ran into an issue where several of our ajax requests were taking an inordinate amount of time to execute. Digging a little deeper into the queries being executed, I was expecting return times in the order of 200ms, not the several seconds I was seeing. Installing XHGui only furthered my confusion: session_start() was the culprit with incredibly high run times. I started expl

@rdlowrey hai
00:38
@rdlowrey Put this script in an empty dir on a server with MySQL and run it, then when it's done php ./api/scripts/index.php --force - it'll sync the repos and build the manual XML doc (that will take a min or two) and then it builds a structure of value objs from the XML.
@Gordon is there anyway someone can know if i've ignored them ?
I'm then attempting to burn All The Things that might have a ref to the DOM objects and the memory usage does not change
And before you laugh at that code, remember it's still very much a work in progress, and that it's a damn sight better than it was yesterday
And now I really must go to bed
nite @all
user895378
01:23
@LeviMorrison hello, sir.
:)
I have too many interests.
I really want to rewrite PHP to use LLVM
user895378
You should do it. My life won't be complete until I can compile PHP code to javascript for use on the client side.
I'm definitely not qualified to do it from either the PHP or LLVM perspective >.<
@rdlowrey I should send a hitman now - github.com/Danack/PHP-to-Javascript ?
user895378
@Danack Interesting :)
01:29
It'd be more interesting if the web page that was meant to describe it wasn't broken. I suggest looking at the examples to see what it can do.
user895378
Do you have any basic benchmarks for the speed of the resulting .js code?
Basically I use it to compile Domain Objects and associated rendering of those objects to JS, so e.g. when I load a new page of images I can either send html or raw data + use the existing 'how to draw stuff' code.
No, I haven't benchmarked it at all.
user895378
The benchmarks aren't important, I was just wondering.
user895378
That's cool, though. I'll try to play with it sometime.
The code is a straight conversion as PHP ≈ JS
Cool. I'll try and stop fannying about and write some better examples.
user895378
01:33
@Danack ★'d
ty. btw if there's anything you encounter that isn't convertible that you think should be, please let me know, if nothing else so I can document it as non-convertible. (e.g. references don't exist in JS, so don't expect them to work :)
user895378
02:00
@LeviMorrison I rewrote most of the ReverseProxy functionality yesterday. It has some cpu usage improvements that should basically prevent the leviathon server from ever showing up in your $ top output. I'm going to clone those changes to leviathon momentarily. Let me know if you experience any problems (you shouldn't).
Just ping me when done
user895378
@LeviMorrison Changes should be live now.
user895378
@LeviMorrison When I say "ever showing up" I really mean, "Instead of it running at 4-5% you should see it mostly around 0.1%-0.7% cpu usage when it appears.
Well, can't seem to find any functionality problems.
user895378
02:07
Cool. Yeah, it actually turned out to be a pretty major improvement -- when I stopped the old process it was at ~6%. Now when it has shown up it's been at ~0.3%.
That's great news.
@rdlowrey Great time to exclaim "my job is done here!"
user895378
lol the best part is that I rewrote it because the code was a little messy. I didn't realize until I was doing so that it would result in much lower consistent cpu usage. Accidental win!
A good win nonetheless ;-)
user895378
02:17
Also really cool: websockets now support streaming files to many websocket clients at once using only a single open file handle (without buffering, of course):
user895378
$fh = fopen('/some/enormous/file.gz', 'r');
$this->websocketHandler->sendBinary($arrayOfAllConnectedSocketIds, $fh);
user895378
Done.
user895378
This is much more complicated than it sounds :)
@rdlowrey You talk about websockets so much I wish I had some valid use case for implementing an app with it...
user895378
@cspray Websockets are just pure, unadulterated awesome.
02:19
@rdlowrey You mean like multicast? =D
user895378
@Jack more or less.
user895378
It makes implementing real-time file downloading via websockets a snap because all the streaming is handled automatically by the server for you.
I see a new Netflix opening up on @rdlowrey's server :)
user895378
I'm definitely going to create my own personal music locker.
user895378
Listen to my entire mp3 library in the browser from anywhere with a 'net connection? Yes please.
02:22
Noice ... hmm, do websockets automatically reconnect btw?
Like, can they survive disconnect out of the box.
user895378
@Jack Not automatically, but the api in the browsers is really simple to use. For something like that you'd just track where you were in terms of the byte position in your client-side js code and if a disconnect happened just reconnect and ask to start there.
@rdlowrey what is the complicated part? streaming? Are you just chunking the data?
I see, that's not too different from Range: request.
or what is here the problem?
user895378
@bwoebi Uh, interleaved control frames. Using the same file handle for 1,000 clients.
user895378
02:25
If you're 500 MB into your 2GB file and the client sends you a PING you have to answer with a PONG as soon as the current text frame write finishes.
@rdlowrey Now that's what I call random disc access ;-)
user895378
Because it's full duplex the client side can send you a control frame at any time and you have to respond to it ASAP when the current TEXT/BINARY frame you're sending finishes.
@rdlowrey Why cannot you just write the whole file to all the streams at once?
@rdlowrey A bit like FTP then yeah?
why do you unnecessarily frame here?
02:26
@bwoebi I think that's the control frame of the websockets protocol then.
user895378
@bwoebi Sending 100MB frames? That's just terrible design.
@rdlowrey I don't see the problem here?
I would be interested to know why the client would need to send a ping if they're still receiving data, though .. wouldn't that already mean the other side is still alive? :)
user895378
@bwoebi Because if I send you a control frame 100KB into the transfer you can't wait ten minutes to finish your giant monolithic frame write. It's not responsive. Period. There's a reason why the browsers break apart messages into 32K frames: it's because it's the only thing that makes sense.
user895378
@Jack PING is not the only control frame.
user895378
02:29
Either party can send a CLOSE frame at any time.
@rdlowrey What other games do they play besides ping/pong? :) ahhh.
user895378
And if the client wants to close it's quite rude of you to continue piping another 100MB of data at them before responding to the CLOSE frame.
hmmm… agreed.
user895378
Also, small frames makes it easier to resume where you were if something goes wrong mid-transfer.
Fair enough, that's like the credit card company trying to sell you another card when you already said you're not interested ;-)
user895378
02:31
Just because the protocol allows up to 64-bit byte lengths per frame doesn't make it a good idea.
I think websockets would be great for games ;-)
Doom II - now with web sockets!
user895378
hehehe
user895378
New goal: port all awesome old-school games to browser+websockets
user895378
MMMI (Massively Multiplayer Monkey Island)
02:39
leviathon down for a bit
Unfortunately need Windows >.<
user895378
thanks for the heads up :)
Writes "effected" ... a red line appears underneath it ... Did you mean "affected"
@rdlowrey finished here a little gateway… now I'm too tired… will push it to github tomorrow…
user895378
@bwoebi Cool :)
user895378
@Jack the only thing worse than spellcheck? autocorrect.
02:54
@rdlowrey That's true, it could have been worse ;-)
03:43
hello monring all
morning
(night here)
@Orangepill morning here :D
I'm out of the loop on monring me thinks
Just look at the kind of crap I have to come up with sometimes =(
@Jack nice crap code.
03:47
Thanks :)
Can you guess what it does?
goes back in time ???
@Jack No. :) I am not javascript expert.
@Orangepill Yeah, that's basically it. It unwinds the browser history stack.
is void valid for a js function?
But I think it will go back to previous page after some time.
03:50
@Orangepill Yes of course, I'm using it instead of the mandatory parentheses for immediate invocation.
The reason why it's done this way is because there's no way to tell where the "pointer" is in the history stack.
And doing history.go(-Inf) won't work either.
It's just madness.
agreed
Hi everyone, I just want to get an idea regarding how to integrate a layout manager into my custom CMS I am working over. A better practice, a good solution?
aside from getting a bunch of layouts and creating a selection mechanism on your admin to associate one of them with a page?
@Orangepill actually I want to integrate a system where I can manage it through admin panel
04:05
@JamshidHashimi sounds like an awesome idea... you should totally do that
@Orangepill yeah, but I am seeking for a way to do that. A practical solution. Any guide or resources regarding?
@JamshidHashimi Best resource would be to look into the documentation and source of an open source project that implements the functionality you are after.
@jack so void function(i) { }(a) eliminates you from having to do (function(i) { })(a)
@Orangepill That's right :)
Of course, +function() ... does that too, but I don't like using an arithmetic operator.
@Jack Now that is a dirty hack
It's not much different from using void, but yeah, I agree that it's dirtier :)
I don't see void used much though, except for inline code.
04:16
I didn't know return types where even a thing in js....
It's not a return type, it's an operator.
Amongst other things you can use it to determine whether something is undefined, e.g. a.b === void 0.
The advantage being that if someone has messed up your JavaScript environment by doing undefined = true; it would still work ... that's of course purely theoretical :)
let me see if i'm understanding correctly.... you are just using it's low operator precedence to force the evaluation of the function definition before the () is evaluated.
ehhh, before the () is evaluated? what do you mean by that?
I mean the function is evaluated prior to the function call
hello
i have a problem when i want to post a question it said
Sorry, we are no longer accepting questions from this account. See the Help Center to learn more.
auto-ban!!!! and i didn't get any -vote for my questions!!
@Orangepill I suppose you could see it that way; the operator just returns undefined, regardless of the right-hand side expression.
And that's how I use it; because the right-hand side of the operator expects an expression the engine is smart enough to realize that you mean to use immediate invocation.
In other words, it disambiguates a function declaration from an immediate invocation.
@jack I think I get it now.
@WalidNaceri Perhaps you could try accepting a few answers and try again? Not sure why you're banned from asking more questions.
Morning.
more ning
04:38
lol
@YogeshSuthar s/more/moar/
Or, Good moaning!
hehehe
In mumbai continuous rain from last 2 days. :( All roadways and trains are blocked.
Well, that's one reason to stay at home ... on the 20th floor that is.
Right now I am in office. Will do half day and go home early. :)
Hmm, another 70 +votes and I'll have a silver medal, how quaint.
04:43
I require +10 for PHP gold badge. :)
Wow, not bad :)
Gooooooood Morning.
The club of gold php medal holders is even smaller than legendary ;-)
Ohh wow and I will be among them. :D
@Jack Where can I see users with php gold badge?
work out for medals.
1st is Gumbo.
not found
1 got 199 to go and i'll be there :)
Surprised to see PeeHaa in 2nd most recent :)
@Jack Question for you
04:49
Nope, it's that guy :)
@Mr.Alien Sure, what's up?
@Jack Ohh yeah. :)
css gold is pretty slim... only one guy in it :)
Haha yes.
@Mr.Alien I'll brb, lunch, but just target the question to me and I'll pick it up when I come back :)
nevermind... there is 26
@Orangepill our @Mr.Alien is among them. :)
04:52
@Jack I was learning about the protocols yest, when I studied about ftp, they said that it's old and insecure, cuz it doesn't encrypt the data which is transferin, so if someone gets the packet he gets the info
@YogeshSuthar I know ... I was giving him license to brag :D
@Jack so the question is what is an alternative to ftp, they said something sshtel, and ya, what if I want to hack that particular packet which is travelin
@Orangepill haha no I won't :p @YogeshSuthar ayo
@Orangepill what you must have seen is css3
Can I create Prime Minister using css3? :P
@YogeshSuthar Specify what kind, the corrupted one, good one
@Mr.Alien Of course corrupted one. :D
04:59
@YogeshSuthar nah, than go to delhi, you'll get 1000s, no need for css3 :p
@Mr.Alien I can't travel in heavy rain. :) Can you create IRON MAN suit in CSS3? ;-)
@YogeshSuthar yEA, I can.... I can give you few animals to ride on... like
gr8, but I want suit not animal. :(
Is this kind of question allowed here?
05:14
@YogeshSuthar come on, respect them, they were used by our forefathers...
@YogeshSuthar close, low views... and that's why it survived
@YogeshSuthar Yes, it's allowed
But this specfici question is too broad.
Or even POB
@MadaraUchiha I marked as unclear
@MadaraUchiha okk thanks, I was going to CV as OT.
@Mr.Alien So you are saying that I should buy a camel to travel from Virar to Dahisar? :)
Aight
g2g n00bz y0l0
What's that? Someone used Tsukunoyami on you? @MadaraUchiha
05:18
@MadaraUchiha cyo
@YogeshSuthar rofl...
hello everyone
@user2206616 yea, what's your question :)
@EiyrioüvonKauyf There is chat.stackoverflow.com/users/997301/eiyriou-von-kauyf?tab=prefs but I think only you and mods can see that.
@Mr.Alien lolzz how you know he has question in his mind?
@YogeshSuthar am sure, wait, he will just throw his query
05:27
kk
@Mr.Alien not yet. :)
@YogeshSuthar darr gaya hoga...
05:43
any doctrine 1 experts here ?
@Mr.Alien You can configure FTP to run over SSL. It's old though, I'd agree :)
@Jack ok, but any idea if I want to test some sorta hacking, how can I get the packets which are in transit
@Mr.Alien You mean without SSL?
Would it be possible to have a sidebar layout without using percentages?
Just with blocks?
@Jack say am using pure filezilla, now that tutorial told me that the credentials are passed in pure text, infact all data in ascii.. so anyone can steal the packets and get the info, so I am asking is how can I steal my own packets, just for demo purposes.. I want to know that, how hackers get those packets which are in transit
@TheGuyWhoCouldn'tTalkToTheGirl y not
05:55
@Mr.Alien Okay, so you have to listen in on the control connection (port 21)
@Jack yes, any tutorial, how can I hack the data in transit.. I just want to know how it works, how to fetch the packets and how to read the data
I believe Wireshark can give you that kind of info; basically anything that uses libpcap.
@Jack I've heard about wireshark, so I can steal packets with that.. hmm\
@Mr.Alien As I don't want to use percentages for sidebar and the content. Since the sidebar has a minimum width and if the browser width goes down too much or the screen resolution is bad, then the width of the sidebar will get stuck on a specific number but the content area will get messed up
@TheGuyWhoCouldn'tTalkToTheGirl did you studied css?
05:58
@Mr.Alien I think we have to use % rather than px. What you say?
@Mr.Alien I have a little bit of knowledge.

« first day (1012 days earlier)      last day (4162 days later) »