« first day (874 days earlier)      last day (4060 days later) » 

12:00 AM
@DaveRandom One thing I just thought of. How are we going to handle cv-pls.pieterhordijk.com i.e. the dev version download?
 
Has anyone here used Idiorm/Paris?
 
ick.
@PeeHaa I used to play in unreal tournament tournaments...and we also had unreal tournament tournament tournaments to see who could come up with the best ideas for an unreal tournament tournament
 
@PeeHaa I don't see the issue... if they're separate repos they can all be updated independently, you just need to change the path in the cron job. Even if stuff was clone in subdirs it wouldn't matter, there won't be any conflicts
I was considering a daemon at one point although right now I can't remember why i thought that would be a good idea
 
@Lusitanian :P
 
> // be a real daemon: fork myself and kill my parent
 
12:04 AM
@DaveRandom The thing is that the latest builds are automatically being dumped in the download folder with a specific numbering.
 
@Lusitanian What's a better alternative ?
 
@NickFury writing your own datamappers (preferred) or doctrine2 is okay
not doctrine 1 though, not that you'd use an old version
that implements activerecord
 
If I add download link to cv-pls_0.20.2.1.crx it will be outdated and the link will stop working
 
Oh, you mean linking to the alpha downloads on the site and dynamically updating the link
I see
 
@Lusitanian Alright thanks, i'll check it out
 
12:05 AM
one second, I did have a plan, let me remember what it was...
 
lol k
I could just read the dev directory btw?
 
@NickFury :) if it's more than just a quick lightweight application btw, you really might be better off writing your own persistence layer tailored to fit the needs of your app
 
@PeeHaa Nah it's all good, I remember what it was, it's a little ugly but cleaner than that - the nightly script can just update github.com/cv-pls/site/blob/master/config.downloads.php which is one of the reasons I made it in the first place. If you set up the build-tools repo on an update cronjob like the site is on I'll sort it out now and it will automatically deploy
 
site and the build tools repos are both ran every minute. The nightly builder is ran every 2 hours
 
@Lusitanian I've never tried writing my own, do you have any examples?
 
12:09 AM
kk
 
@NickFury idk offhand, but @tereško has written at least one answer with an example of the type of api you might consider implementing for a datamapper
more abstractly, i'll link you to a description of the pattern
 
This was a fucking waste of fucking good woman flesh
 
idk who that is
 
Well remember that picture above and now:
img.pr0gramm.com/2013/03/l1rzkzq.jpg let me un onebox this :P
Kate Elizabeth "Katie" Piper (born 12 October 1983) is a former model and television presenter from Andover, Hampshire in England, UK. Piper had hoped to have a full-time career in the media, but in March 2008 sulphuric acid was thrown in her face. The attack, which blinded Piper in one eye, was arranged by Piper's ex-boyfriend, Daniel Lynch, and carried out by an accomplice, Stefan Sylvestre. Lynch and Sylvestre were arrested and are serving life sentences in prison for their crimes. The attack took place in North London and Piper was treated in Chelsea and Westminster Hospital, where th...
 
@Lusitanian :) Thanks man!
 
12:15 AM
@PeeHaa Oh right her, well I'm not saying I don't sympathise but I bet she has a way better TV career now that she would have before, she's on TV here all the time now
 
@DaveRandom I would much rather see her on tv before that. Think about the children
BTW do you run your own mailserver now? @DaveRandom
 
@DaveRandom Yeah but that won't last long, and she'll always be known as the acid chick.
 
@PeeHaa No I just set up a catch-all redirect to my google account, @webarto kindly provided me with some VPS goodness recently that I have yet to really investigate, I may set up a VPS of my own though, I was looking at those guys you use and I could probably persuade Her In Charge that it is affordable (although money is pretty tight :-( )
 
It's yours :P Thanks for waking me up.
 
:)
 
12:20 AM
@NickFury I dunno, I mean she's mostly on TV promoting awareness of that kind of thing, seems like its got good scope for a prolonged career
 
By the way, "best way" to execute a script asynchronously that receives few MB as stdin?
 
@webarto I woke you up? Maybe turn the volume down on your computer? :-P
@webarto A few MB ?
Probably a wrapper PHP script
 
@DaveRandom Oh maybe, I never watch TV haha
 
@DaveRandom Can't pass more than e.g. 100kb via shell_exec and similar... e.g. nohup script.php <<< 'random data'... dunno...
@DaveRandom Yeah, I turn the volume up so I can hear if someone needs me at chat, and I sleep in meantime, like Homer in nuclear plant...
 
@webarto Like exec('nohup php wrapper.php /path/to/input/file > /dev/null 2>&1 &');, where /path/to/input/file contains the data to pass to the actual target program, and in wrapper.php use proc_open() to relay the data from the filesystem to the target program's stdin
 
12:26 AM
@PeeHaa That's pretty horrifying.
 
Yeps\
 
@DaveRandom I think files are probably better option, attachment is in question, it can be up to 25MB... Is this the only (simple) way to do it?
 
@webarto It's the only way I can think of to do it async. Passing 25MB to a process' stdin is going to take a couple of seconds, if you want to be truly async you need to sub that out to something else. Or I suppose you fork a child process to do it, but it sounds like this is a web page (?) which makes that inadvisable if it's even possible. Can this target program not take a file path though?
Although of course, dumping 25MB of data to disk is going to take a little while as well
Where is the data coming from and what are you actually doing?
 
I was trying to do it automagically, e.g. you have `send_mail` with some args, and you just change to `send_mail`, and it's a fairytale, but now I see that is stupid, I have everything on disk already, I'll just pass ID's and do it properly ;)
Is pcntl_fork() expensive operation (in general)? (not a fan to say upfront)
 
12:38 AM
:D
 
@webarto Define "expensive". I mean the operation itself isn't particularly, but really it depends what the child process is doing ;-)
 
@DaveRandom For example if current process takes up 25MB, will the child also take 25MB of memory? :)
 
The multithreaded model is normally less expensive than the multiprocess model because of the implied shared memory space, but a) it's really, really difficult to write good multithreaded code (I can't do it) and b) using pthreads in production at the moment is a ridiculous idea, it's about as stable as a not very stable thing on a windy day
@rdlowrey Can probably point you in the right direction there more than I can though, he's been doing a lot of work with process and resource management lately
 
1:07 AM
@PeeHaa Right, done with edits, will make sure I haven't broken auto-update tomorrow, right now I'm heading to bed
Night @all
 
@DaveRandom coool bro
I'm also preparing to get drunk tomorrow.
later all
 
@Lusitanian I started reading up on a few Data Mapper answers from tereško and it turned into this giant research into his philosophy on PHP MVC patterns.
 
This dude just ain't getting it.
-6
Q: Dynamically put info in HTML

user2145856I have a question What i am doing is a web-gram for my site what you do is fill out a form and on a pre-designed page with a picture it will write the persons name..How do you make it where when they click submit on the form it will take the data and put it on the pre-designed page make a random ...

 
@Bracketworks xD
 
@HamZaDzCyberDeV Really, I saw that question you linked however long ago I first looked at this question; came back to it, re-read the original, and realized it's completely identical.
Like, really wtf.
 
1:18 AM
@Bracketworks i've already flagged it as too localized
 
@HamZaDzCyberDeV I think I flagged it as not a question.
 
and that PHP code o.O
$message .= "<?php echo($name); ?>"; $message .= "</p>"; $message .= "</td></tr>"; $message .= "</table>"; $message .= "</BODY></HTML>"; mail($email, $subject, $message, $headers, $html); print "Your message has been sent!"; echo(HtmlTag::createElement('a')); ?>
 
Ah well, maybe if this one isn't, the next copy/paste will be.
 
(facepalm)
 
$message .= "<?php echo($name); ?>";
wtf is that?
 
1:19 AM
exactly whahhahahaa
 
Unless eval() is coming up somewhere thereafter, that ain't doing nothin'.
(I don't even know about eval(), can it jump out of PHP parsing?)
Nope, it can't.
 
i would rather think that he somehow scrapped some code here and there and put it in together
@Bracketworks look at this challenging Q stackoverflow.com/questions/15283269/…
 
Man, Chome just did me a kindness;
Close tabs to the right? Ok
SHIIIIIIII music was in there somewhere
Reopen closed tab?
YOUTUBE!
 
How can you tell what web server a competitors site is running?
Most probably Apache, but that's an assumption
 
@Baumr Who cares? Just be better than them in your shared industry and never look back.
;)
 
1:25 AM
@Bracketworks Haha, answered my own Q: salescart.com/products1/netcraft.htm
 
@Baumr scan it with nmap :O thought that may be illegal :p
 
What's that? :D
 
@Baumr a security scanner, you can scan for open ports, services, OS etc...
 
@HamZaDzCyberDeV He's best to write a parser that accepts grammars for comments, I'm assuming it's gonna be a multi-language tool -- different comments. Parse comments, perhaps their context (another parser of sorts, language dependent) and then finally check for flagged words/phrases.
 
@Bracketworks i see ...
 
1:30 AM
Very non-trivial task.
 
@HamZaDzCyberDeV :D
 
@Baumr just don't do it, that may lead to "attempt of hacking da site"
 
1:53 AM
The is becoming crazy today stackoverflow.com/q/15285356/1401975
 
user895378
@webarto So what exactly are you trying to do? Pass something that's in memory in process A to process B for asynchronous processing?
 
user895378
@Baumr All a tool like that does is look for the Server header in an HTTP response. It's trivial to turn those off. If they're really enterprising they might try to generate a 404 or something and see of the server/OS token is present there. Regardless, you can only tell what the true backend server software is if the application allows it.
 
user895378
I could very easily make my app send Server: Apache/blah blah blah... headers and completely lie to you.
 
@rdlowrey I'm sure you would do that with your own web server eh? :)
 
@Jack nice regex +1 :p
 
2:04 AM
Or make it random =D
 
user895378
It's one way to throw off the h4x0rz :)
 
user895378
lol randomized server token
 
user895378
FWIW, in an effort to not be evil, my server doesn't identify itself by default.
 
user895378
The mainstream servers I'm familiar with has those tokens turned on automatically ... which is total BS.
 
user895378
Like Apache needs advertising. Really?
 
2:06 AM
It goes like: I'm Apache 0.9 with OpenSSL5.4 ... no wait, I'm actually nginx ... no no, ncsa!
@HamZaDzCyberDeV thnx :)
@rdlowrey They probably think Netcraft ftw :)
 
@rdlowrey Well, I suppose an argument for could be for feature negotiation of sorts.
 
@rdlowrey have you tried scanning with nmap
nmap -sV 127.0.0.1
?
 
Not that that argument holds any water.
 
user895378
No, it doesn't hold any water.
 
Feature negotiation is well defined with other http headers :)
 
user895378
2:09 AM
@HamZaDzCyberDeV I have not. Why?
 
Just like how browser detection's bad mmkay
 
@Jack Bleh, I have a user-agent parser and IDGAF.
 
@rdlowrey it should detect the services that are enabled on your serv.
 
@Bracketworks User agent parsers are bad mmkay :)
Except for mobile detection hehe
 
@Jack Ah ha! Quite the contrary.
Detect desktops, assume mobile.
 
2:11 AM
wud?
 
@Bracketworks wat? why would one do something like that?
 
Why would I assume mobile?
I wrote a parser for user agents way back, before I could just use GA and get the stats I needed.
 
@Jack Because user-agents for desktop browsers are more predictable; the plethora of UAs from mobile device/OS/browser combinations is ... well, less predictable.
I've gotten far better results asking "is it desktop?" instead of "is it mobile?" -- or worse, "what is it?"
 
I don't know what you mean ... there's only iPhone and iPad =p
 
user895378
@HamZaDzCyberDeV But I already know what services are available on my server :)
 
2:14 AM
@Bracketworks there's tons of combinations for desktop too
 
@Lusitanian Yes, far less in regular circulation though; and worst case. Client-side, you perform a device-width calculation and do a subsequent redirect/cookie-set if you hit something high enough.
 
@rdlowrey lolz, ofcourse :p
I though of the question of @Baumr "How can you tell what web server a competitors site is running?"
 
Log it, and manually review it later for inclusion in the parsing expression.
 
user895378
@HamZaDzCyberDeV Oh I see what you're saying now :)
 
user895378
In all likelihood an nmap is just doing the same thing I described earlier. I'm about to test it and find out, though.
 
2:17 AM
ok :)
 
@rdlowrey Have you thought of a name yet btw?
Also, does it do jQuery? :)
 
user895378
Alas, there is no jQuery. I do have a name: Aerys.
 
Oh yes, that's right.
 
user895378
FWIW ... these are the requests nmap just made against my server to try and determine the server software (it failed, BTW, because my responses didn't send a Server: header):
 
user895378
127.0.0.1 - - [08/Mar/2013:02:21:02 +0000] "GET / HTTP/1.0" 200 79
127.0.0.1 - - [08/Mar/2013:02:21:02 +0000] "OPTIONS / HTTP/1.0" 200 79
 
2:19 AM
I used to have a very small web server written in C to demonstrate to my colleague all the cool system calls you could do to speed up static file serving.
 
@rdlowrey not bad :3
 
Once I saw nginx I canned that though lol
 
user895378
> service unrecognized despite returning data.
 
user895378
Suck it, h4x0rz
 
@rdlowrey next step, ddos =D
 
2:20 AM
lolz
 
user895378
@Jack way ahead of you
 
@rdlowrey It ddoses back?
 
user895378
lol not yet, but I've considered it.
 
user895378
Right now I just have a super-legit rate-limiting mod.
 
user895378
Enabling it decreases the total number of requests the server can serve per second by about 5% but stops DDoS dead in the water.
 
2:22 AM
How would you guys go against a ddos ?
Buy/rent an expensive anti ddos machine, or do it with some software, i once read a tutorial that uses some kind of redirecting to balance the load with several VPS
 
@rdlowrey global or per ip?
 
user895378
It rate-limits per IP, so of course if you had a very large botnet ... enough to generate 10s of thousands of requests per second it would create problems.
 
ddos is a bit more difficult though, because of the multiple sources.
right
 
user895378
But at a certain point there's only so much you can do at the server software layer.
 
yup
 
2:24 AM
guys check this out
http://blog.unixy.net/2010/08/the-penultimate-guide-to-stopping-a-ddos-attack-a-new-approach/
 
We all know the ultimate way ... EMP =D
Preferably from the Sun while the magnetic force field is off
 
@Jack EMP = ?
 
user895378
hehehe
 
user895378
Electro-Magnetic Pulse
 
2:26 AM
just make sure you put your ham radio inside a faraday cage
and maybe your ipad
and the power generator
 
user895378
Back to the DDoS topic, it's fairly straight-forward to immediately blacklist IPs at say, the iptables level, if they get rate limited and it looks like a DDoS.
 
user895378
So it can be managed if you're prepared ...
 
Architecture wise we've picked AWS as our platform; I'm not sure how their load balancers are equipped to handle an attack though
 
@rdlowrey there is one problem though, some countries have providers that has 1 IP for several clients, and in some cases 1 ip for a couple of 1000 clients
 
But I'm sure they're prepared :)
@HamZaDzCyberDeV Of course, shared hosting is sheer folly :)
 
2:30 AM
@Jack xD and when there's no option ?
 
user895378
@HamZaDzCyberDeV Well, unfortunately the health of my server takes precedence over the few people who suffer collateral blocking when I'm under DDoS attack.
 
@HamZaDzCyberDeV Move countries I guess.
 
user895378
And yes, shared hosting is a joke.
 
@rdlowrey lolz true +1
 
user895378
And if I get to the point where my operation is large enough that I have market penetration in those places ... well there will be people smarter than me around to handle it.
 
2:31 AM
@Jack if it was that simple ...
 
@HamZaDzCyberDeV Oh you meant that several people are coming from the same ip and would therefore be blocked from the site? Misread you there I think.
 
user895378
If your country's internet infrastructure is garbage there's not a whole lot I can do about it.
 
@Jack yup, i read that one provider had 1 ip for about 8000 clients, i was amazed :O
 
@HamZaDzCyberDeV That's some serious NAT
Our providers here have transparent proxies for port 80 and 443
 
@rdlowrey i know, that's why we have to develop some proxy-fu to access your site xD
 
2:33 AM
The rest goes direct iirc
There's anonymous proxies you could use I suppose :)
We do that to pretend being American lol
 
user895378
How much can a TPROXY really accomplish on port 443 short of deep-packet inspection? Shouldn't that be encrypted?
 
user895378
I guess they can log where you're sending/getting your encrypted data ...
 
@Jack whahahhaa yes, the only problem is: when you receive only max 50kb/s and the proxy is slow, you should wait for a couple of minutes before your page is open :O
 
@rdlowrey deep packet inspection kind of goes out of the window with https for sure ;-)
@HamZaDzCyberDeV Oh right, we use our own proxy of course =D dedicated.
Hmm, OT, but I'm starting to wonder when the first phone will come out that has gps coordinate resolution done in hardware mode :)
 
user895378
Best thing about writing your own server is it's a snap to deploy for anything I want. After I finish websockets and get full test coverage on everything I have I want to work on a proxy mod so I can do all my online everything encrypted and proxied :)
 
2:38 AM
@rdlowrey But that's assuming the remote host has https no?
Wait, will your server do https too? :)
 
user895378
Already has full https support
 
user895378
I've spent a lot of time on this.
 
wow nice ... i was kinda hoping that php had something for that already lol
 
user895378
Well, after I finish websockets (should be within a week for sure) I'm going to recruit some people to use and break it if possible, so I'll let ya know.
 
cool! :)
Nice! Didn't realize the extension made it this far into the manual
 
user895378
2:42 AM
Woah, fully documented? I won't be mistaking that manual section for the Reflection API any time soon.
 
For sure, because it's written in C :)
My first serious pecl project
not sole author of course hehe
 
user895378
I have to admit, I'm terrified of OAuth. Had a bad experience a couple of years ago and have since hidden in fear.
 
OAuth is .... misunderstood mostly :)
 
3:00 AM
Any ideas on how to make that build actually fail in travis?
 
user895378
<-- has exactly zero experience with travis.
 
<-- has LIM[x:0->inf](1/x) experience with travis.
 
user895378
asymptotically approaching zero is much cooler than exactly zero ... I lose :(
 
anyone here know objc by chance? im in a pinch
 
Hi, quick question php ninjas I have numerous curl calls made in one script should I close curl after each call or just at the end of the script for efficiency
 
3:10 AM
@Dino curl resources close themselves usually, but it's good form to close them manually.
 
@jack thanks i specifically need to close it to remove cookies as you can't unlink them if curl is open. But I have numerous curl calls on a single page, do you happen to know if it is more efficient to leave curl open and just close it at the end of the page or should I close it after each call, in terms of performance (connecting to remote site) and server memory?
 
you can reuse the curl resource as well if you wish.
but if you need to clear cookies each time it's better to close it and open another.
unless ...
 
Would it be sensible that the PHP parser not issue a notice when an undefined constant matches a class name available in the current namespace scope, and silently uses the class name as a string?
If so, would it be sensible if the resulting string were qualified?
 
user895378
@Bracketworks I don't know ... I feel like that could lead to serious debugging WTFs
 
example?
 
3:16 AM
@rdlowrey You see where I'm going with this though.
 
user895378
Yeah -- I'm okay with it but I think the notice should be kept, at least. It pains me to advocate an E_NOTICE but I don't think you can just magically use the class name without doing something to notify the user of what's happened.
 
ok coll thanks @jack
 
Yea; darn.
@Jack class Foo { } $o->f(Foo);
 
Hmm, that's ... smelly :)
Wouldn't $o->f(__CLASS__) work as well?
 
@Jack Outside of class scope.
 
3:19 AM
ah i see
 
Sorry, $o isn't Foo.
 
Have a nice day/night everyone !
 
user895378
Later!
 
Oh I think there was an rfc on this so that you could use Foo::class
@rdlowrey ciao!
 
@Jack Yea, I've seen that.
 
user895378
3:20 AM
That's the second time that's happened today! I'm not leaving, was just responding to @HamZaDzCyberDeV :)
 
user895378
Guess I should use the ping going forward.
 
protip, if you're saying goodbye to @rdlowrey ... don't.
he doesn't leave.
 
Given the fact that PHP uses strings to reference classes in .. well all cases (outside of instanceof) I thought it would be sensible that a class name used in a context outside of new, it would qualify and return the class name as a string.
 
user895378
Nope. I'm like a php chat hobo ... I just drift in and out without showering for days at a time.
 
An implicit PHP-friendly typeof()
 
3:21 AM
@rdlowrey Yeah that was weird lol
 
Or just support typeof().
 
@Jack Yea, something about that strikes me as ... odd.
 
I feel it's cleaner though.
 
user895378
How useful is it to have access to the number of frames, messages and bytes sent/received for a given websocket client connected to your server?
 
user895378
3:24 AM
^ Is there any value in that (beyond nerdy stats fun)?
 
For a particular one? Besides debugging and size monitoring ...
 
@rdlowrey I'd say pretty valuable; tracing odd requests.
Add in optional stack traces.
 
user895378
Okay, I'll keep it then. Thanks for the input :)
 
Verbosity::DROWN_ME
 
Log level: Everything and the kitchen sink (tm)
 
user895378
3:27 AM
This is why I never finish things ... I keep finding new features to add.
 
Did you think you were going to spend 6-7 weeks on it? :)
 
user895378
Not sure what my expectations were to start. I don't think I would have done it if I knew how much time I'd sink into the project, but now that I have I've learned a ton and I'm very happy with the results.
 
6-8 weeks, jack. 6-8.
 
user895378
I've been working on it just about every day since Christmas, I'd say.
 
user895378
So more like 10 weeks.
 
user895378
3:30 AM
The knowledge you gain is always it's own reward, of course.
 
@Jack Damn, I just saw a comic recently joking about appending TM to everything.
Markdown fail.
 
@Bracketworks That joke has been around for years, it's almost time to retire it :D
 
 
That's a good thing (TM)
 
Safe threads in php
 
3:30 AM
LOL
 
@Lusitanian lol, of course, but it was well written. It wasn't Dinosaur comics..
 
gotcha
 
Eff it; can't remember.
 
morning ..
 
user895378
Good morning.
 
user895378
3:40 AM
OMG Daylight Savings Time starts Saturday night! Mother F-ing woot!
 
user895378
Goodbye Seasonal Affective Disorder, hello sunshine!
 
50
A: Convert PHP closing tag into comment

JackComments in PHP are categorized as: Line comments, starting with // or #; they work until either a newline or ?> is encountered, whichever comes first Block comments, starting with /*; those work until either */ or EOF is encountered, whichever comes first. Fixing line comments You can br...

Should I add that this is why you shouldn't parse html with regex?
 
user895378
Why's that? Are you afraid of h̵i​s un̨ho͞ly radiańcé destro҉ying all enli̍̈́̂̈́ghtenment or HTML tags lea͠ki̧n͘g fr̶ǫm ̡yo​͟ur eye͢s̸ ̛l̕ik͏e liq​uid pain?
 
lol
well, the problem is kind of unique to html "parsing" :)
in JavaScript, 2 mins ago, by Shea
the more I think about it, the more I realize I can only think of things PHP can't do that node.js can
Beautiful words.
 
3:57 AM
@Jack and easy enough to do it
as opposed to things C can do that most other languages can't
 
@andho You talk of course of the seg fault? lol
 
user895378
@Jack But not true at all.
 
no, i mean, doing more things is not necessarily better
javascript is a damn flexible language
 
@rdlowrey the argument shouldn't really be whether you can do certain things with node.
 
@Jack I tried to make him come here, he didn't :)
 
3:59 AM
yeah, it's how easily you can do all those things
 
by now node even does friggin pcre hah
 
user895378
I only say that because, as I've mentioned, I'm currently doing things in PHP that match or exceed node's capabilities on every front. The idea that PHP can't is a farce. It's just that no one's done it in PHP yet (a state that will soon be remedied).
 

« first day (874 days earlier)      last day (4060 days later) »