« first day (789 days earlier)      last day (4152 days later) » 

5:00 PM
That can easily be done with CURL
why is it an issue
I want to check if another machine is generally responding with PHP.
pinging is not the only way to see if marching is responding
 
user895378
"Generally responding" could mean anything.
 
user895378
Though in all likelihood you really mean, "accepting socket connections on a specific port"
 
@rdlowrey .. that's exactly what am saying
file_get_content can be valid in that context
 
user895378
@Baba Yes, I'm just chiming in to help you help @Lenin :)
 
@Baba Actually that's true, you could arp for it, but you still aren't going to be able to do it if you can't create raw sockets and you can't exec something
 
5:03 PM
how about just get_header?
 
@rdlowrey Even "responding to ICMP echo requests" falls largely into that category. A lot of my machines don't.
 
Hello
 
user895378
true ...
 
@Lenin Relies on an HTTP server being running and not being firewalled and accepting connections from your IP and running on a known TCP port and...
 
user895378
I'd say PHP, with its vastly simplified HTTP abstractions, is at least partly responsible for all the web devs with no idea how the internet actually works. I don't know if that's a good or bad thing. Probably good because it helps the internet move forward with more new content. And for those who want to dig deeper ... well they just have to learn about the underlying protocols.
 
user895378
5:09 PM
That said, I still have plenty tons to learn.
 
if you compare that perspective to other frameworks how would be the scenario?
say RoR, Python, C#
 
user895378
@Lenin ? PHP is not a framework. Neither is Python or C#. RoR is a framework ...
 
user895378
The underlying language of RoR, Ruby, is also not a framework.
 
but do they require to learn deeper than in PHP?
 
@DaveRandom ... valid point ....
@DaveRandom .. you mean even FTP would not work ?
 
user895378
5:13 PM
@Lenin PHP makes it pretty simple to crank out web sites and applications without knowing the first thing about the HTTP protocol. My only other experience in that area is Python, which also has a lot of abstractions for HTTP apps, but IMHO requires a bit more understanding of what's going on behind the scenes to use it effectively.
 
user895378
IMHO PHP's treatment of HTTP as a first-class citizen is largely responsible for its massive popularity.
 
IMHO,,,,,:P
 
user895378
New Year's resolution: stop prefacing everything with "IMHO"
 
lol
 
user1125394
@rdlowrey don't flame me, but ruby also is great also for this
 
user895378
5:16 PM
@cyril I'll take your word for it -- I have zero Ruby experience.
 
user895378
/me back to work
 
user1125394
for sending many requests, with an event IO, but reactPHP maybe does it
 
okay guys it was nice being here. I'll comeback here sometimes. :)
I got some deadlines to meet.
reactPHP is just new ain't it?
 
user1125394
don't know, it's probaly unstable :p
 
I haven't used it yet.
 
user895378
5:18 PM
FWIW, I think the reactPHP is a crap ripoff of the .NET react libraries ... that's not to say it won't eventually be useful.
 
user1125394
don't say that to @igorw working on it
 
user895378
I know :) ... like most new projects they take time to hit their stride. He's working hard and it's moving in the right direction.
 
user895378
And most useful code is a rip-off of someone else's really good idea anyway
 
user895378
I think it would be better to wrap all php streams into event-emitting "push" objects instead of only doing it for socket streams.
 
New IMAO (In My Arrogant Opinion). ...
 
user895378
5:22 PM
Aren't all opinions arrogant? Because an opinion necessarily requires any differing opinion be considered wrong?
 
user895378
The key is to have the wherewithal to listen to logic and change your opinion if shown to be wrong or substandard.
 
...it was lol ..
 
user895378
Any informed opinion will appear arrogant to people who don't share it. You have to be confident in your opinion otherwise what are you doing? :)
 
@rdlowrey me...???
 
user895378
@NullPointer No, I'm just talking generally
 
user895378
5:25 PM
/me really going back to work to this time
 
user895378
Last note to @igorw regarding reactPHP ... please please please incorporate error handling on the socket stream operations. Every single one of them can trigger PHP errors (and they're used a lot) -- this makes it impossible to use reactPHP for good OO code, especially considering the inherently unreliable nature of socket data transfers.
 
user895378
I know @ error suppression sucks, but for library code it's basically a requirement for native functions that work with sockets.
 
user1125394
if no reply then the server is down, how can it helps you more?
 
user895378
Think about it: you're servicing many requests in parallel with non-blocking streams.
 
user895378
One triggers an error.
 
user895378
5:33 PM
You, in your infinite OO wisdom, throw exceptions on php errors (which everyone should be doing)
 
user895378
Oh, no! My app died because one of the 50 different socket connections spazzed out! All the other connections just have to deal with it.
 
@rdlowrey Stop being so humble...
 
user895378
@DaveRandom I'm the most humble person I know! :)
 
user1125394
ok I see, having an error report, and if one of stream fails, it should affect others, and even less make the app crash
 
@rdlowrey You need new friends then :-P
 
user895378
5:36 PM
lol I was trying to make a paradoxical joke about being humble
 
user1125394
except if they are dependant of each other, then you print the error
 
user895378
@DaveRandom yeah I'm really good at that too.
 
I'm better. I'm the best at everything, especially being humble.
5
:-P
I know what you are saying though, exceptions and async code are largely incompatible. You have inform the rest of the app of error state via a callback instead.
(or ignore it, but that's not going to be good for anybody...)
 
morning
evening
 
user895378
5:40 PM
Exactly. Handling socket errors in parallelized environments is hard; it fractals out beyond just supressing the original PHP error. You have to hold state for all the concurrent connections. Then you have to handle each error. And that means you have to test that your code works correctly when an extraordinary condition happens on one of the many sockets.
 
user895378
And you can't test on live sockets because then you're introducing multiple variables into your test case (potential false positives from network failures). So you have to start fiddling with custom stream wrappers -- which I can't stand.
 
...but to be fair you and I are preaching to the choir here. And @NikiC is probably seething over the very idea of async code.
:-D
 
user1125394
if you have n parallel request and m possible HTTP status there are m^n tests to do
 
user895378
@NikiC 'afternoon
 
user895378
that's not what I'm talking about ... every single socket operation is capable of triggering a php error ... it's unrelated to the http status response. you might fread on an async socket stream 50 times while retrieving an http response.
 
5:43 PM
@rdlowrey The problem with network sockets is that literally anything can happen. Even if you are just writing a core architecture/interface for the sockets and ignoring the actual data, the scope for "something unexpected" is enormous, at any given point in time.
 
user895378
@DaveRandom Exactly.
 
user1125394
ok replace http status, by php error
 
@DaveRandom if it's for sending concurrent requests, then I'm okay with it ;)
 
user895378
So that's my beef with reactPHP ... it doesn't even consider the possibility of errors on the socket operations ... so it's totally unusable in its current form.
 
though i have no idea what ya'll talking about
 
user895378
5:45 PM
minutiae <--- that's what we're talking about
 
@NikiC Pretty much that
 
I AM THE MOST EVIL NINJA OF THEM ALL!
 
@cyril There's a reason for the OSI model to exist - trying to worry about the status of your TCP socket in the same bit of code as the status of your HTTP request is an insane thing to do.
@MadaraUchiha
 
user895378
@MadaraUchiha lol -- I don't understand it but your new avatar is funny
 
5:47 PM
I like the giant candy-cane, nice touch
 
user895378
same. candy-cane really pushes it up another notch.
 
:D
Bow down before me! Or I shall splash your faces with glitter!
 
user895378
/me really really really going back to work now
 
believe it when I see it
 
$color = imagecolorallocate($im, '0x' . $rgb[0], '0x' . $rgb[1], '0x' . $rgb[2]);
how to pass "real" hex number?
 
user1125394
5:52 PM
youtube.com/… for @tereško and mvc likers
 
@webarto errr... what? what are $rgb[0] etc? ints or strings?
 
@DaveRandom Sorry, that is just 00-FF as string.
 
@webarto hexdec() then
(without the 0x)
 
@DaveRandom Right... idiot. I thought it accepts hex only.
 
5:55 PM
:-P
 
$color = $_GET['color'];
if( ! ctype_digit( (string) $color))
  $color = 0xCC0000;

$rgb = array($color >> 16, ($color & 0xFF) >> 8 , $color & 0xFF);
@DaveRandom I didn't want to do that, because I would felt inferior to you :P
 
@webarto You'd need to convert $_GET['color'] to an int before that bitwise stuff would work as expected. Also, it won't work correctly unless you spell it "colour".
 
O_o
I hate you.
 
I'd go for:
if (preg_match('/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i', $_GET['color'], $matches)) {
  $rgb = array(hexdec($matches[1]), hexdec($matches[2]), hexdec($matches[3]));
} else {
  $rgb = array(0xCC, 0, 0);
}
^^ that probably
(there might be a better way to do those capture groups)
 
I think that is the best way.
Q: can you convert string to hex?
I mean typecast it...
'0xFF' => 0xFF
 
6:09 PM
@cyril funny how smart people can ignore that MVC has evolved in past 30+ years and that Rails was NOT that evolution
 
@webarto That's what hexdec() is for. It would work with 0xFF because it ignores any non-hex characters so it would just see 0FF which is still 255
 
@DaveRandom dechex(hexdec($hexAsString)); ?
 
@cyril its awesome ...lol
 
@webarto ...would effectively just strip leading zeros
 
Right, thanks, I guess fiddling with hex is not that easy in PHP :P
But I don't know where is, so.
 
user1125394
6:16 PM
@NullPointer its RoRzz
 
its funny....
 
@webarto It's no harder than it is anywhere else. The issue is not that it's hex, the issue that it's hex represented as ascii
 
I know, that's what I actually meant, it is always a string unless you type it in code. But all is cool.
 
user1125394
what scares me about the author, is
 
user1125394
> He has authored "landmark" books on Agile Programming, Extreme Programming, he is one of the software industry's leading authorities on Agile software development
 
6:20 PM
Thanks for your answer! I am trying to comprehend your answer but I don't understand it. Could you illustrate your point maybe? — Orhan 6 mins ago
Hi all .. am back :)
what did i miss
 
so acc to him view is stupid piece of code youtube.com/…
 
user1125394
extreme programming = coders slavery ?
 
@DaveRandom hex is not a type in PHP therefore string? :)
 
Revelation: Wordpress has a function called _doing_it_wrong() :o
 
@webarto hex is not a type anywhere. It's just a way of representing an int. Just like '1' !== 1 - only the internal type-casting mechanisms don't look for hex because... well, I have no idea why. So you have to know what base the string-representing-a-number is in before you can convert it.
It is very confusing though, took me a very long time to wrap my head around it
 
6:27 PM
Yes, you had your fair share fiddling with it, I understand it's a number representation only.
0xFF === 255 # true
 
user1125394
works in python (with 1 less equal) and javascript
 
6:38 PM
beer .. check , green cheese ... check
 
stackoverflow.com/a/2922934/1723893 he is linking w3schools.com (is 200k rep user ) lol
 
@webarto Yeh but '0xFF' == 255 # false :-( because (int) '0xFF' # 0
> Great. Now you're going to have to make a _doing_doing_it_wrong_wrong function.
 
@rdlowrey regarding react, there is extensive error handling on fwrite, which is where most errors happen. but error handling definitely needs to be improved in general.
 
@DaveRandom var_dump(255 == '0xFF'); # true :P
 
6:51 PM
we've had a websocket server demo app running for a few months now without downtime, so that part seems quite stable actually
 
user1125394
with heavy load?
 
nope :) at that point there will likely be some issues
 
@webarto var_dump((int) '0xFF'); # int(0)
 
;D
That makes sense actually :P (int) '1xFF' would be 1, etc.
 
user1125394
@igorw is there something for a server that send Serversent (text/event-stream)?
 
6:54 PM
@webarto So why does the comparison work?
 
@DaveRandom I HAVE NO FUCKING IDEA
 
@DaveRandom @webarto So I see you discovered the convert_to_long/is_numeric_string peculiarity :)
 
@NikiC Captain Hindsight :D
 
@cyril the HTTP server supports streaming response bodies and I have a library for generating SSE: github.com/igorw/EventSource. you can easily combine those two
 
user1125394
ok will check thx
 
6:56 PM
The former doesn't do hex, the latter does. Both don't do octal and binary though
I actually wanted to get rid of that hex casting in the string comparison for 5.5, but I kinda forgot about it
 
@NikiC Is there any way to force that behaviour with a cast? (without, obviously, using hexdec())
 
@DaveRandom Sure. filter_var with FILTER_VALIDATE_INT ^^
can do hex and octal if you tell it to
but not binary :D
 
@NikiC Thank you for info, nice to know :) I know that behavior (or something), just didn't know how to word it :)
LOL LOL LOL
 
@NikiC Yeh either all or nothing. I'm easy either way but consistency is the key.
 
Everything's so consistent in PHP, innit?
 
6:57 PM
lol
 
FUCK LOGIC
THIS IS PHP
It's OK, we still <3 PHP
 
Right I'm off home, catch y'all laterz
 
^ noob ... pedal safely :)
 
user895378
@igorw I get that, but not addressing a problem because it only occurs every now and then is how space shuttles blow up. The other issue I've had browsing the source code is lines like this ... there's nothing inherently difficult to test about those lines. They're artificially inflating test coverage numbers. If something is hard to test, it means the design isn't right.
 
user895378
I get leary when I see @codeCoverageIgnore annotations that don't deal with very difficult to test native functionality.
 
7:03 PM
1
A: Speeding up XML schema validations of a batch of XML files against the same XML schema (XSD)

hakreYou can safely substract 30 seconds from the timing values as overhead. Remote requests to W3C servers are being delayed because most libraries do not reflect caching the documents (even the HTTP headers suggest that). But read your own: The W3C servers are slow to return DTDs. Is the delay ...

 
user895378
coverage ignores should be an ultimate last resort ... otherwise you're essentially saying, "Eh, I don't need to test this because I'm sure it can't possibly contain problems. Trust me." ... maybe I'm the only person who has been bitten by that sort of behavior, but it can lead to massive failures. Enterprise code can't afford that.
 
@rdlowrey fair point, I will fix that. I appreciate the feedback.
 
user895378
@igorw All that said, I'm super OCD perfectionist, so take my criticisms with a grain of salt. I think you're definitely doing good work that will advance the PHP community going forward :)
 
user895378
The improvement from when I first looked at the code a few months ago to now has been exponential.
 
7:11 PM
What's going on @igorw?
FYI: My wishlist: given.to/w/mTjxF7 (will make sense in the context of tomorrow's blog post)
 
does anyone know some software that can be used to measure distances and angles in images?
 
user1125394
gimp for distances
 
hello
 
Hi, I have some issues with xpath. I'm doing this :
while($row = mysql_fetch_row($result)){
libxml_use_internal_errors(true);
$dom = new DOMDocument;
if($row[1] != null){
$dom->loadHTML($row[1]);
}

libxml_clear_errors();
$xpath = new DOMXPath($dom);
$results = $xpath->query("/[td = 'Kraj']//td[preceding-sibling::table]");

for($i = 0; $i < $results->length; $i++) {
$text = trim($results->item($i)->textContent);
if($text != '') echo $text . "\n";
 
Any symfony2 users here ?
 
7:24 PM
On this:
<table border="0">
<tr style="color:White;background-color:#1F3A63;">
<td colspan="5">Osoby</td>
</tr><tr style="background-color:#3D83C3;">
<td>Rodzaj osoby</td><td>Nazwa</td><td>Miasto</td><td>Adres</td><td>Kraj</td>
</tr><tr style="background-color:LightGrey;">
<td>(732) Zgłaszający/Uprawniony</td><td>Zakład Mięsny Dobrowolscy Spółka z o.o. - Spółka Kmandytowa</td><td>Wadowice Górne</td><td></td><td>PL</td>
</tr><tr style="background-color:LightGrey;">
<td> Pełnomocnik</td><td>Biuro Patentowe "INICJATOR" Spółka z o.o. Warzybok Tadeusz</td><td>Rzeszów</td><td></td><t
In order to get this:
<td>(732) Zgłaszający/Uprawniony</td><td>Zakład Mięsny Dobrowolscy Spółka z o.o. - Spółka Kmandytowa</td><td>Wadowice Górne</td><td></td><td>PL</td>
<td> Pełnomocnik</td><td>Biuro Patentowe "INICJATOR" Spółka z o.o. Warzybok Tadeusz</td><td>Rzeszów</td><td></td><td>PL</td>
 
@cyril I need a bit more than distances though. I need to measure the distance along a certain vector.
 
How can I call doctrine entity manager in a listener..I have already passed doctrine.orm.entity_manager in parameters
 
But I get "Trying to get property of non-object in"
 
user1125394
@NikiC is it ok if you draw a linear path, and measure it?
 
... line 32, which is here for($i = 0; $i < $results->length; $i++) {
Any idea would be appreciated :) !
 
7:26 PM
@cyril Maybe. My concreate instance is that I have a certain line and two more lines that I need to create that are orthogonal to it and then measure the ditance between those lines
and I don't think that would be easy to do in gimp as it's not vector graphics
I think I'll have to do this more or less manually in inkscape :(
 
user1125394
I have something called mtPaint, you can measure distances and angles relatively, and you can rotate the image, that should do it
 
user1125394
inkscape never managed to understand it, it's said to be powerful good luck ;)
 
user895378
@igorw Again, take with a grain of salt, but the only other complaints I have are ... the cult-of-symfony design style drives me a little nuts (that's a "me problem", not a "you problem"), requiring the PECL HTTP extension to parse HTTP messages rubs me the wrong way, and the Guzzle libs are ... well ... I just don't think very highly of them. I understand that piggy-backing on dependencies speeds up development, but in general, the fewer outside dependencies the better IMHO.
 
user895378
It can be a big time commitment, but learning and implementing the relevant specs directly can be a huge payoff in and of itself because you'll learn everything there is to know about the underlying protocols.
 
user1125394
@ircmaxell for the laptop in 13" I like much dell.com/en/p/xps-13-l321x/pd
 
7:38 PM
yup
 
user1125394
 
basically the same
except the one I listed is touch-screen
 
user1125394
o touch? hmm
 
user1125394
do you think there will be IDE where you program with touch? :p
 
¯_(ツ)_/¯
 
user1125394
7:42 PM
on a laptop touch screen just replace mouse pointer if you have lost it, or maybe also for zooming
 
not replace, augment
 
user1125394
yea and maybe switching windows is easy
 
user895378
I have a very hard time doing any work on a laptop or tablet ... I can only do "fun" stuff with them because I'm so used to my giant monitors and keyboard/mouse setup at the desk :(
 
user1125394
yep work is proportionnal to the screen :-
 
user895378
@DaveRandom Have you ever dealt with SSL/TLS on udp sockets?
 
user1125394
7:47 PM
I actually would like the same laptop than above but in 17"
 
@rdlowrey neither react nor guzzle depend on ext-http. I wish PHP weren't so anti-ext and I actually could do that, but it is simply not possible. imo having standalone libs is a good thing, especially if they have minimal deps. if used responsibly, they can greatly reduce the amount of overall re-inventing in PHP land.
 
for wp when using "get_content" how can I use columns like 960 grid?
 
user895378
@igorw I agree with not reinventing, but only if the existing wheel is already a perfect circle. And yes, it's lamentable that extensions aren't easier for the average php developer to procure. That's part of why I try to avoid the need for PECL extensions.
 
@ircmaxell heya, congrats on all of the confs! glad to see you're also going to PHPBenelux.
 
how is it possible
 
7:55 PM
thanks!!!
Looking forward to it
 
@ircmaxell SunshinePHP, you're in?
 
Yup. I made it there...
 
user895378
> In February it's cold in most areas of the world, but it's always sunny in Florida.
 
@rdlowrey no library is perfect, but it's often better to fix an existing library than invent a new one. of course, sometimes the goals don't align and then a new lib makes sense.
 
user895378
LIES!!! (everytime I go to south Florida it rains like a MOFO)
 
7:57 PM
I go from Cold, to Cold, to Warm, to HOLY MOTHER OF GOD COLD in the span of like 34 days...
 
user895378
@igorw also very true
 
user1125394
damn I failed an inteeligence test
 
user1125394
are you ready?
 
user1125394
a baseball bat and a ball costs $1.10, the bat is $1 more expensive than the ball, how much cost a ball?
 
user1125394
don't write the equation...
 
8:00 PM
I am using "get_content" and want to use a grid so I can make 2 columns can I do that
 
user895378
.05
 
user1125394
FU @rdlowrey :p
 
user895378
@cyril lol, if it makes you feel any better ... this is a true story:
 
user895378
In third grade I missed the day where the teacher covered "borrowing" for the purposes of subtraction. I literally couldn't do handwritten subtraction of large numbers until high-school.
3
 
user1125394
no I don't care I'm like the 90% that answer $0.10
 
user1125394
8:02 PM
@rdlowrey lol!
 
user1125394
100
-91
------------
 
user895378
How in the world is that even possible, you ask? The American public education system is awesome.
 
Fish and a half, cost $1.5, how much 5 fishes cost?
 
user895378
Apparently it's "word problem day"
 
$width = 0;
$height = array();
$strlen = strlen($text);
for ($i = 0; $i < $strlen; $i++)
{
    $dimensions = imagettfbbox($fontSize, 0, $fontFile, $text[$i]);
    $width += $dimensions[4] - $dimensions[6];
    $height[] = $dimensions[3] - $dimensions[5];
}
$height = max($height);

$im = imagecreatetruecolor($width, $height);

imagesavealpha($im, true);
imagealphablending($im, false);

$white = imagecolorallocatealpha($im, 255, 255, 255, 127);
$color = imagecolorallocate($im, $rgb[0], $rgb[1], $rgb[2]);
Yup, it definitely is.
 
user895378
8:07 PM
If I leave with @DaveRandom's mother on a westbound train from Rochester at 3pm travelling 100km/hour, and an eastbound train leaves Albuquerque at the same time at 120km/h, how long will it take before Dave's mom propositions me for "favors?"
 
user895378
lol it's a trick question because she does that before she ever gets on the train!
 
LOL
 
user895378
/me drops mic, walks off stage
 
:audience(claps|cheers):
 
how would I do it?
 
8:23 PM
Heh
@webarto 5$
and one Ten tails.
 
Heh
 
rrrrg the JS room became a religion room somehow.
 
Luckily in here, everyone worship one God.
Madara, that is :)
 
user1125394
JellySpam room
 
Evening gents an possible gals
 
8:29 PM
@PeeHaa There are no girls on the internet.
 
user1125394
hi πhaa
 
@MadaraUchiha oy.. please dont start this here...
 
@Neal :D
 
Sure there are. Any fat guy on the web cam be a gal
 
8:30 PM
Cam = can
 
Dont blamr me
Blame *
 
8:52 PM
@cyril In german this can be reduced to πh
So yeah, hi πh :)
 
user895378
wow, maybe we won't be saddled with government-sanctioned deep-packet inspection after all: zdnet.com/…
 
@PeeHaa Been drinking then...
evening :-)
 
@NikiC yeah, them are using eich instead of haa :)
 
@rdlowrey No. Is that even possible? Surely it wouldn't work without the guaranteed packet delivery/ordering that TCP gives.
@rdlowrey Wrong, what she in fact does is proposition you for "favours"
 
user895378
@DaveRandom I wouldn't think it would work either, but I thought I'd ask. Also, shame on me for tarnishing your mother's reputation through my bastardization of the Queen's English.
 
8:59 PM
bastardisation
@rdlowrey Actually, apparently you can
 
user895378
lol my spelling is shamefully American.
 
:-P
 
user895378
Oh, apparently you can use TLS over UDP sockets. Time to tinker.
 
Actually I now find myself regularly having to correct "color" and "center" in particular in my own typing, simply because of web standards.
I doubt PHP/openssl support it natively (yet) although I may be wrong, you may have to encrypt/decrypt yourself. Sounds like @ircmaxell territory to me, I certainly wouldn't feel confident in myself to create a secure implementation. Might have a play anyway though...
 
user895378
9:15 PM
@DaveRandom It seems you can do the encryption yourself pretty easily with stream_socket_enable_crypto if using streams, but on my initial tests it seems as if stream_socket_recvfrom won't decrypt the reads for you in that case.
 
user1125394
@DaveRandom damned en-us/uk -> Signaling (US). Signalling (UK)
 
user895378
At least it's not Referer ...
 
@rdlowrey No it doesn't because it bypasses the buffering/filtering mechanism IIRC, you read raw data from the socket. What about fread()?
 
user895378
@DaveRandom It seems to work for me on fread ... but would you run into potential errors because the UDP socket is "connectionless" if you use fread?
 
user895378
php-dns-lib is my first real exposure to udp sockets, so I'm still feeling things out (your mom)
 
9:23 PM
@rdlowrey looks interesting, I assume you have seen react/dns?
 
@rdlowrey Not really if you are stream_select()ing, you'd never try and read unless there was pending data. Even if you do you'd just get empty strings back. I guess PHP is taking care of it all for you anyway.
 
user895378
@igorw I haven't looked at that code, specifically, but that's about to change :)
 
@igorw I created it more as a technical exercise than something you'd actually use. I am fully aware that I was reinventing a wheel that has been thoroughly invented 97 times.
 
user895378
@igorw lol:
 
user895378
> Nuclear Reactor written in PHP
 
user895378
9:25 PM
hadn't noticed that before
 
@rdlowrey What's it called, "Kaboom" ?
 
user895378
 
I updated my MVC yell away! hides
 
wtf lol I'd never noticed that either
 
I'm open to delegating parsing to more specific libs if they are complete and handle more cases than the current impl. But they need to be able to parse in a streaming fashion.
 
9:27 PM
Actually, where sockets are concerned and the aforementioned blowing up on error, "Kaboom" might be a better name
 
user895378
@igorw It would be silly to implement a DNS server with SSL, but do you do anything with SSL/TLS and udp sockets?
 
I did not put the full power it in the README yet
 
user895378
(I'm specifically interested in working out the details for SSL over UDP in PHP right now)
 
@rdlowrey Is this for a specific use case or just interest/self improvement?
 
user895378
@DaveRandom interest/self-improvement
 
9:30 PM
@rdlowrey on the server side not at all, because PHP's SSL implementation is blocking in that case.
 
I'm slowly re-writing my DHCP implementation a little less horribly and then I will make a public repo, wait till you get a load of that. WARNING: Cover your computer in vomit proof sheeting before proceeding.
 
never looked at SSL over UDP, sounds interesting
 
user895378
@igorw I haven't done anything with server-side stuff there, but can you not establish the tcp connection and then enable crypto on the connection after the fact to bypass the blocking part in the same way you can do with client sockets?
 
Yes, you can
In general you don't though.
 
user895378
Yeah, I thought so.
 
9:32 PM
you're right, that may be an option.
 
Because (IIRC) the new connections are not available to accept() until the stream is established, unless you use some funny combo of flags.
Oh wait hang on, that may not be right
Let me just test sth
Don't even need to test, the flags for stream_socket_enable_crypto() are suffixed with _CLIENT and _SERVER, so behaviour is pretty obvious I think
 
yes
it looks like it should work to me
 
brb nicotine deficiency
 
user895378
hehe
 
user1125394
> brb toxic poison pollution deficiency
 
9:40 PM
0
Q: Small MVC for PHP

Neal The following is a new question based on answers from here: Small PHP MVC Template I have written a small MVC template library that I would like some critiques on. The library is located here If you are looking for where to start, check out the files in the lib directory. I would really...

hides
 
What? Really? I didn't know that! I must stop doing it at once!
@Neal How have you managed to get a different avatar on a different site? I thought they were global?
 
@DaveRandom lol with gmail you can add a dot to your email address and they are still counted as the same email address, but to gravatar they are different ^_^
so: myemail@gmail.com === my.email@gmail.com
It is cool to see the evolution of my code :-)
 
user895378
Can't you also add a +postfix with gmail as well? Like something@gmail.com+foo
 
@rdlowrey yep. but most sites dont like that and reject those types of email addys. the dot trick is handy ^_^
 
@Neal Also congrats, with that baseball thing you've managed to take the dullest game in the world and make it even more boring
 
9:45 PM
and its myemail+foo@gmail btw @rdlowrey
 
user895378
ah, I see
 
@DaveRandom haha
 
user895378
I knew it was something like that.
 
c9.io/maniator/smallfry <-- cloud9 is awesome ^_^
 
user895378
lol:
 
user895378
9:49 PM
Where am I? It’s dark… Hey there Contacts app! Whoa, Compass app! I haven’t seen you since… Wait a second. This is the useless app folder!
 
@rdlowrey lol that is exactly where I put it HA!
 
user895378
@Neal hehe me too
 
@DaveRandom can u delete for me one post pls?
 
@goodmood link?
 
9:51 PM
@Neal @rdlowrey how is the gmaps app?
 
@Lusitanian looks like it is going to be good :-)
 
user895378
fine as far as I can tell ...
 
@DaveRandom ?
 
Guess noone wants to review right now ^_^
 

« first day (789 days earlier)      last day (4152 days later) »