« first day (1384 days earlier)      last day (3564 days later) » 

4:00 PM
@rdlowrey I would rather go with setting up Acesync with a suggest of Addr, and have it refuse to process names in blocking mode unless it is present
Since it makes no sense to specify a name as a DNS server address, that shouldn't cause any issues
 
user895378
I don't even know what a suggest is, but it sounds like that would do the trick as well.
 
@rdlowrey Basically it means that composer goes "hey, you can have more features if you install Addr" when you do composer install
 
user895378
But it will still install the Addr dep automatically, right? Or no?
 
user895378
Because the only thing I'll ever use the lib for is async, so I don't ever want it to not pull in the Addr lib.
 
@rdlowrey No, the user would just need to add Addr to their project and do composer update though
 
user895378
4:02 PM
Hmm ... that doesn't work for me.
 
It basically means that the hard dep on Addr needs to be in the top level
 
@DaveRandom nah , the problem looks like at some point they switched the name.com dns nameservers to some hosting nameservers
 
@rdlowrey I shall think about it. I mean I could just not use Acesync in Addr, it wouldn't really gain me anything apart from consistency because I'm just dealing with a couple of UDP socks.
circular dependency is not good
 
user895378
Well it's not a pressing thing really. I was just trying to think of a good way to make the lib usable in Addr. I may or may not play with it, but it's not preventing me from doing anything I need to do as of now :)
 
@rdlowrey The only thing I can think of would be to have a ResolvingConnector (or something) in Acesync that overloads the basic connector and deals with names, where the basic connector just assumes everything is an IP address
 
4:10 PM
can anyone give me a youtube video not available in your country?
 
user895378
The other thing I was going to do is allow for elastic udp connection pooling in the dns resolver instead of just having one hard-coded connection which would likely be very useful for high-volume request environments (e.g. artax).
 
user895378
And the resolver would "checkout" a connection for each request and "checkin" the conn when it's finished with it in the same way artax maintains connection pools for persistent http connections.
 
(got distracted, following on from previous message) Either that or Acesync always assumes everything is an IP address and have another lib that sits over the top of the two and ties them together (which is arguably the correct way)
@rdlowrey I'm already on top of that, don't worry ;-)
 
user895378
Except it's a PITA to split those because who wants only IP connections?
 
@rdlowrey so in general you'd just use the top-level lib
 
user895378
4:14 PM
Which should be Acesync or Addr with a LibDNS dependency (that's what I'm suggesting)
 
user895378
But not both.
 
user895378
Make one or the other the top-level lib
 
@rdlowrey Doesn't really work like that with DNS, that would actually probably be a perf hit unless you had a crapload of sockets. Bare in mind this is over UDP, it's not like HTTP where you deal with one req/resp pair at once. The protocol allows me to send the server 65535 more requests on one socket before I receive the response to the first
And since DNS looks generally take no more than a few tens of ms (and often a lot less) I think that's probably not going to be a bottleneck
 
user895378
3 mins ago, by DaveRandom
@rdlowrey I'm already on top of that, don't worry ;-)
 
user895378
^ So is there any reason to do that at all?
 
4:16 PM
But I am working on having support for multiple sockets because of stuff like failover, and also so you can do funky stuff like allocate a server to deal with requests for a specific zone
 
user895378
Ah I see.
 
And also because if I send Google's DNS 65536 requests in <1sec they may not take too kindly to it
 
user895378
Well I don't think they'll take any more kindly to sending 32768 requests on each of two separate sockets either :)
 
user895378
If volume is a problem they'll know your IP either way.
 
No but spread across two servers (8.8.8.8 and 8.8.4.4) it's more reasonable
 
user895378
4:18 PM
Okay, I see.
 
And it's not like it will ever actually get past a couple of thousand in reality, and that's pretty unlikely
 
user895378
Though I'm not sure it makes a difference -- that sort of thing has load balancers in front anyway (I can't imagine it not)
 
Well tbh I'm mainly adding support for it so that some more interesting stuff can be done (like zone-specific authorities and failover)
In the same way as you generally enter at least 2 DNS servers when you configure it on your computer
 
user895378
Cool, well either way you're far more sophisticated in the realm of DNS than I, so I trust your judgement.
 
Sophisticated? Not sure about that. Hey, why is this computer on fire? Dear god this parachute is a knapsack!
 
user895378
4:22 PM
It would me more useful to use Acesync in Addr if you needed encryption, but since all you need to do is establish the udp connection there's not a compelling need to pull in a separate lib just for that.
 
@rdlowrey Yeh exactly, basically all I do is stream_socket_client(), stream_set_blocking()
 
user895378
I'll push that lib up in the next couple of hours after I write up a readme and add some more tests.
 
user895378
I have a feeling I could massively speed up composer by implementing its http retrieval using parallel artax.
 
@ircmaxell youtube.com/watch?v=Oe0aYXZ9V-o not available in UK, or do you want something not available in US?
@rdlowrey probably so
 
user895378
I did away with the non-pthreads version of the amp dispatcher but I may add a proc_open-based dispatcher back so it can do filesystem things without blocking the main process (and not php-uv or pthreads).
 
user895378
4:28 PM
Because it's ideal for use in conjunction with processing the results from massively parallel artax retrieval (and would be more helpful for something like composer if you didn't have to have pthreads).
 
@rdlowrey Yeh the pthreads requirement makes Amp a lot less useful in the real world
 
user895378
I'll do that after I finish the artax stuff this week. Then I'll go back and add amp dispatcher support for the non-blocking filesystem things in artax like you mentioned.
 
user895378
SYNERGY
 
Aynergy
 
user895378
that too, even if it's impossible to pronounce.
 
4:31 PM
You should call a project Aynrand and make it into something that just hogs the cpu and does nothing for you
 
user895378
function ayn_rand() {
    while(true) {
        if (rand(0,1000) === 4) {
             break;
        }
    }
    return 4; // fair dice roll
}
 
that might be a little bit of an abstract joke even for you lovely people
 
user895378
There we go. Ten edits later.
 
No, Ayn Rand shouldn't return anything because implies doing something for someone else
 
user895378
4:33 PM
No, it trickles down.
 
user895378
4 == let them eat cake
 
user895378
Here's a sliver of randomness for you plebians.
 
function ayn_rand() {
    foreach (array_keys($GLOBALS) as $var) {
        unset($GLOBALS[$var]);
    }
    return 4;
}
 
@DaveRandom thanks, we've moved on ;-)
 
@rdlowrey You really ought to stop naming things A.* at some point.
 
user895378
4:38 PM
@Danack every time I try people hem and haw.
 
user895378
I don't even know what any of my libs do anymore because the names are confusing/similar.
 
@ircmaxell What, from Chelsea losing a match in 2012? I would hope so by now
:-P
 
@bwoebi It basically saves one uint32 for non-lists
 
@rdlowrey Yes - while not particularly good libs like php-di.org get more people using them.
 
Rename All The Things?
 
user895378
4:39 PM
I think for a complex application-sized library (something like a full-blown http client or server) a non-descriptive name is good.
 
I don't know if it was worth for that, but it turned out to have some pretty nice side-effects. In particular there no longer is any need for create_binary, create_ternary etc because the number of children is encoded in the kind
 
@rdlowrey You're just gonna have to stop giving them abstract names, and start using hilarious dictionary words.
"Come use Awful, my new library for doing wonderful things with your code!"
 
Am I doing this right? pastebin.com/ZS5aDdHg
 
user895378
But for libs designed to do something specific it's probably more helpful to use something descriptive.
 
Its a login stmt.
It seems to work, but not sure if its the best practice, im wanting to add a verify to it tbh.
 
4:42 PM
@NikiC ah. Just wondering if you need zend_ast_kinds there where you have dynamic children counts? Then you could just use an union there?
 
@Charles I can't wait to find out what Anus will do
 
@bwoebi not sure what you mean
 
typedef struct _zend_ast {
    zend_ast_kind kind;
    union {
       zend_ast_attr attr;
       zend_unit children;
    }
    zend_uint lineno;
    struct _zend_ast *child[1];
} zend_ast;
@NikiC actually I see no use of zend_ast_create_ex where the child count is dynamic…
 
@bwoebi yes, it's always fixed
dynamic ones all use zend_ast_create_list
@bwoebi attr is uint16_t, so this is doesn't really help ;)
 
oh. true.
Great work anyway.
 
4:51 PM
@DaveRandom That's amazing.
 
@NikiC not criticizing anything, but what exactly is the gain of the arena allocator / how is it a performance gain?
 
@bwoebi "Arena allocator" means that nodes are not individually freed, but mass-freed at the end. This means that allocation is basically just increasing a pointer (like stack) and there is no allocation header
It's basically the simplest possible allocator there is (with alloc = increase pointer and free = no-op)
(Note: This means that when a list node is realloced, the memory it used previously is just wasted. That's basically the only negative side-effect)
 
user895378
^ shouldn't really bother anyone because opcache
 
@NikiC so, it's realloc()'ing all the time when the ceiling is hit?
 
@bwoebi it allocs a new segment when the ceiling is hit
btw the arena implementation is already there from other parts of phpng, I'm just reusing it ;)
 
5:03 PM
@NikiC so, it's maintaining a list of segments?
 
@bwoebi yes
 
good.
and this is mainly useful in AST because you always just add nodes, never remove them.
(except the dynamic ones…)
@NikiC I'm wondering if increasing this number github.com/nikic/php-src/blob/ast/Zend/zend_ast.c#L159 to 8 or 16 will make some perf or memory difference?
and why aren't you passing the tsrm_ls to the ast creation?
 
5:24 PM
evening
 
@rdlowrey Into football data? You'll like this: arstechnica.com/gadgets/2014/07/…
 
is anyone able to understand what the OP is asking ? stackoverflow.com/questions/25064493/…
 
user895378
@cspray Yeah ... and you can be sure the NFL will charge a pretty penny for access to data at that level of granularity.
 
user895378
But man, what a data source that could be for gambling purposes.
 
user895378
Unfortunately, the market will correct rather quickly and any advantage you'd have should move swiftly back to equilibrium.
 
user895378
5:28 PM
The real key is getting data that the market at-large doesn't have.
 
5:40 PM
@bwoebi it might. I'll try it out
@bwoebi I didn't want to bother with TSRM and assumed that phpng will get TLS by @krakjoe
 
user895378
No pressure, @krakjoe.
 
user895378
;)
 
That's anyway the wrong ping ;-D
 
@NikiC thoughts on when you're going to propose it?
 
@ircmaxell today ^^
I'm on vacation as of tomorrow and I'd like to have it up for discussion
 
5:45 PM
awesome
@NikiC going anywhere fun?
 
@ircmaxell mallorca
 
user895378
nice. mallorca is awesome.
 
@bwoebi At least for my tests code 4 seems optimal. 8 is worse, 2 is a tiny bit worse
@ircmaxell @bwoebi Btw, I added this section: wiki.php.net/rfc/… What do you think about that?
 
@tereško whether it's preferable to pass an object or a way to identify it later on.
It's broad and somewhat unclear.
 
5:52 PM
@NikiC definitely. I don't see any reason why not export it. Also presenting it in phpdbg wouldn't be a bad idea.
 
@NikiC Awesome! With friends? Family? Enjoy it!!!
@NikiC The generated AST can be exposed to userland via an extension, for use by static analysers. <-- should include a link to your AST, and examples of the number of projects that use it
 
@ircmaxell family
 
One other thought, did you remove the reserved words for empty, isset, etc?
 
@ircmaxell nope
 
@NikiC that might be worth mentioning, since it'd now be possible, so they would "just look like normal functions"...?
 
5:55 PM
I really thought this would work.
It's an email auth.
 
@ircmaxell that's actually not a rant o_0
 
no, it's actually quite worth a read
 
Wait so Facebooks "re-designing" PHP?
 
@RahulKhosla no
 
So whats it all about?
They sent in a draft.
 
6:05 PM
@BenjaminGruenbaum I've got a weird bug in my SSA generator, which is causing the Optimizer to generate invalid code in certain cases (nested loops). So I'm stalled at that. But I got the mark/sweep dead code remover working (and it's quite good as well). The optimizer also works great outside of nested loops...
 
@RahulKhosla They built a specification for the language, so that implementers can actually agree on the fiddly little details. Everyone wants to agree on a single spec.
 
Oh right.
So does the PHP Group take on these specs?
Can someone please take a look at this for me? Would help me a lot! pastebin.com/hvmHVxuw
 
@ircmaxell I know you're probably not someone I have to tell this (and I lol at the very thought of me telling you this) but writing a lot of solid unit tests has really helped me when I wrote a compiler. They go a huge way in finding bugs and shortening feedback loops.
 
Im not sure what im doing wrong.
 
@NikiC the AST stuff looks awesome
 
6:15 PM
> Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example.
 
@BenjaminGruenbaum yeah, I've been holding off on writing tests, because I've rewritten the entire project about 10 times already (8 of which in the past few days). Things haven't been stable enough to test. Now that the architecture is getting more clear, I may just stop and go back and test each of the components...
although I do need to refactor quite a bit to get there
 
@ircmaxell For the very least, integration tests are really important. That is comparing running your code and what it outputs vs what the current compiler runs
 
The current code is a proof-of-concept. And the performance numbers I'm seeing are amazeballs... So it's worth finalizing now
 
@Charles Its just an email auth script.
 
@BenjaminGruenbaum I've got end-to-end tests (verifying the outputs of the PHP function and the compiled function are identical)
which aren't a replacement
 
6:18 PM
@ircmaxell amazeballs sounds awesome :) Be sure to test it in a real world application. A 10% improvement in WordPress goes a lot longer than 80% improvement at fib(40)
@ircmaxell they're not a replacement but they're a good start
 
@BenjaminGruenbaum well, WP will have very little code that I can attack right now. I only support int/float/string types
and strings can only be passed around, you can't do anything to them
yet
 
and also this only currently works on single functions
@NikiC or @bwoebi what's Hannes's screen name in IRC?
 
@ircmaxell bjori
 
ah, I always forget, thanks
/me is really confused by that. Was my mail that aggressive?
 
6:53 PM
@ircmaxell nope
bjori can be a bit of a dick sometimes, if he disagrees with something
recently witnessed a discussion where someone suggested to add analytics to php.net and he totally blew up about "spying and molesting users"
 
OK, just wanted to be sure. I was confused there, and I have been known to get overly agressive at times
 
I think some sort of analytics on php.net would be interesting to see...
 
7:11 PM
yo! I got a question is there some cheat sheet for page default datas I mean for example Page = author, date created, published etc
 
@VeeeneX do not think there are any default datas, it all depends on the project
 
@RonniSkansing I just searching for ideas, what to add etc
 
What are you building?
 
A website with CMS
built on MVC
@RonniSkansing
 
Okay. Is it on github or somewhere I can look at the code?
 
7:21 PM
@RonniSkansing It's on my local machine
 
okay. Well good luck on it =]
 
ThW
7:33 PM
@VeeeneX I doubt that somehow :->
 
@ThW Why?
 
I honestly still don't understand why we got back to java servlets :P
 
user895378
Same.
 
@ThW I'm happy that i understood MVC model, so I don't know what i wrote but it does what i want from it
 
7:49 PM
@ThW emm ... that's bullshit
 
@tereško I agree :D
 
.. but probably not for the same reasons
 
@Jimbo Eh?
 
tfw a refactor becomes an in-place complete rewrite because almost nothing was salvagable...
The joys of decade-old code...
 
8:08 PM
I''m noob at coding. I'm trying to echo a <div style="clear"></div> every time the script loops 3 times, should I add a counter on the foreach? I would be glad if someone could point me a direction: pastebin.com/9407zC7z
 
@LucasB Yeaah,
I will take a look
 
I was trying something like this:
                       $contador == $contador+1
                       if ($contador%3)=='0' {
                            echo "<div style='clear:both'></div>";
                       }
 
$x=1;

while($x<=5) {
  echo "The number is: $x <br>";
  $x++;
}
What about that?
Or for me best one :
for ($i = 1; $i <= 10; $i++) {
    echo $i;
}
@LucasB
 
this would replace foreach?
I guess I can put it inside it, right
 
@LucasB Where is a code sequence where should be added that for function?
 
8:20 PM
@VeeeneX I am now understanding how it works, using "for" inside the foreach would echo 1234678910 for each loop
I think I can do it from here :)
 
@LucasB ok :D
 
@VeeeneX thanks!
 
@LucasB You're welcome!
 
Hello! I remember someone here having built a var_dump parser. Does anyone know who this person is?
 
hi all - what do you think about an RFC creation to change "string == string" comparison to be binary safe? (Currently numeric like strings will be handled as numbers with all side affects)
 
8:36 PM
@mabe.berlin Wouldn't that break existing (bad) code?
 
@mabe.berlin use === ?
 
@mabe.berlin I'm pretty certain that will not go down well
 
@ComFreek Sure it would break code that compares thinks like "1e1" == "10" and ensures equality - but in the years I'm working with PHP nearly nobody knows about this behavior and this generates hard to find bugs. Btw. it would be for PHP.next
 
Wipe a developer's memory and show them code they just wrote, and they would say it's the worst code they've ever seen.
 
8:51 PM
@Patrick this would/is be required for all nun numeric string comparison - do you do that ?
 
@mabe.berlin I don't disagree but I don't think it will go down well on internals
 
@DaveRandom hey. I know when I write bad code.
 
@mabe.berlin I do === for almost every single equality comparison
 
And that's usually when the codebase I work on is fubar.
 
@DaveRandom Than you says non strict comparison is nearly useless if you don't use it
 
8:53 PM
@mabe.berlin nearly useless, yes
Not totally useless
(mostly useful for vectors)
 
@DaveRandom That sounds to me there is something wrong with non strict comparison - why no fixing this?
 
2 mins ago, by DaveRandom
@mabe.berlin I don't disagree but I don't think it will go down well on internals
 
@VeeeneX Finally did it
 
Feel free to try, in fact I encourage you to try, but I doubt it will make it in
 
@mabe.berlin I almost exclusively use ===
 
8:55 PM
@LucasB Great!!
 
                    $contador = 0;
                    foreach($pagedata['itemkeys'] as $key)
                    {
                       $contador++;
                       $loop .= $manager->paint('loop', array(
                           'foto' => $items[$key]['foto'],
                           'especialidade' => $items[$key]['especialidade'],
                           'minicurriculo' => $items[$key]['minicurriculo'],
                           'sequence' => $items[$key]['sequence'],
                           'title' => $items[$key]['title'],
 
@mabe.berlin I guess the point is this: pick your battles
 
@DaveRandom difficult to predict for PHP.next
 
@VeeeneX thanks again, have a nice day!
 
@LucasB You too!
 
8:57 PM
@mabe.berlin True, but this like this don't tend to go down well with Zend (dynamic typing defines PHP yada yada), and when Zend don't like something that basically means it won't happen - just look at the PHP [67] debacle
 
@DaveRandom @Patrick do you know other parts where strings will be automatically casted to numbers internally WITHOUT any context of numbers? - (behind comparison I only know array keys)
 
If you really want to try (and as I say, I definitely don't discourage it) I recommend you write a full RFC with good clear reasoning before you go anywhere near floating the idea on internals
 
@DaveRandom this could help but makes work that could be discarded by 1hour
 
@mabe.berlin I can't think of anything else off hand. At the very least I would like to see convert_to_long/is_numeric_string normalized
this is just insanity
 
9:16 PM
@PeeHaa ping
 
hello everyone :)
 
9:27 PM
/me just booted desktop :D
 
Yo Joe
At the new place?
 
yeah
 
Welcome to Hampshire
Order some internet :P
 
:))
must sleep
nn
 
night
Man, 'Only God Forgives' is a confusing and weird film.
 
9:33 PM
can POST request bodies be defined without adhering to key-value pairs?
like if I wanted to just send some JSON in the POST body
 
@NathanJones Sure - just set the content type.
 
@Danack ah, thanks
 
I should write a sentence about what conditions PHP parses the body for you.....but I've just realised I'm not sure. I think anything other than a form body won't be parsed.
 
Parsed meaning it gets populated into the $_POST global?
Or something else...?
 
Or:
$json = file_get_contents('php://input');
$obj = json_decode($json);
<--- seriously wondering why I can't remember having ever had to write something like that.
 
9:42 PM
I only learnt about that earlier this week.
 
9:55 PM
Okay. 'Only God Forgives' is really really dark....
Do not watch if you don't like pain/gore.
 
Isn't that by the same director as Drive?
 
No idea. But dark times...
 
#PHP 5.6.0 RC3 is out! 28 changes since RC2, and we need your help with testing! News: http://php.net/archive/2014.php#id2014-07-31-1 Bugs: https://bugs.php.net/report.php
 
@Danack s/ RC\d//
 
hi guys
what are your opinions on the new php spec facebook released
 
10:02 PM
@bwoebi Yeah, waiting for 5 months now :D
 
@NikiC Fatal error: Cannot use positional argument after argument unpacking … My function actually expects a variadic parameter. And I'd like to append something to the array to unpack here. Actually doing func(...$array, ...[$param]) what I find rather ugly.
func(...$array, $param) would look much nicer.
 
@bwoebi non-determinate code is non-determinate.
 
huh?
 
function foo(...$array, $param = 5) would also be valid and then callable with foo(1, 2, 3) - is that meant to be foo(1, 2, 3) or foo(1, 2, 3, 5) ?
 
no, that makes no sense on the function declarations.
But I don't get why it isn't allowed on function calls.
 
user895378
10:17 PM
@Danack I know you had mentioned some issues dealing with a single universal reactor instance with the artax BlockingClient before. I've become more amenable to one of your suggestions which has led to the elimination of BlockingClient altogether and the addition of some new functions:
 
user895378
Artax\Response function requestSync($uriOrRequest, array $options = []);
array function requestMultiSync($arrayOfUrisOrRequests, array $options = []);
 
@rdlowrey cool.
bleh - I'm looking after my sisters cats. I gave them some roast chicken earlier, and one of them has returned the favour by bringing in a dead mouse.
 
10:32 PM
 
Given that
this particular aspect of the feature wasn't very popular in the
first place, it doesn't seem worth the effort.
pfffffah
 
It sounds like if you are prepared to put the effort in it would be accepted though
It has no BC implications
 
Actually, I can't do everything...
 
user895378
Sounds like a sensible cut to me.
 
user895378
composer's ability to include a project's functions.php file in its auto-generated autoloader is causing me to "functions! all of the things" in all my repos.
 
user895378
10:44 PM
\o/
 
Agreed, I can only think of one case in the entire standard library where the API would make it potentially useful
(array_multisort)
@rdlowrey Aye, global constants suddenly become a lot more useful as well as well
 
user895378
totally
 
user895378
And when you consider that pecl/uopz lets you modify function behavior at runtime the "testing functions problem" is also gone.
 
@rdlowrey you and Composer are the definition of bipolar
One day you're all "RABBLE RABBLE COMPOSER" then the next "Yay Composer \o/"
 
user895378
Pretty much, yeah.
 
user895378
10:48 PM
"hard to test" and "hard to autoload" were the reasons why I was hesitant to put serious lib functionality into functions before. And both of those have been eliminated.
 
@DaveRandom I usually have two non-class files in a project. functions.php and const.php. If it's a end product (≠ library), then also config.php and the central routing file.
 
Yea, hard to autoload has been my reasoning for not using functions
 
user895378
@bwoebi I will adopt const.php as well.
 
i programmed yesterday until 6 am. is that bad for my health
 
@zeeks no, it makes you stronger. You can work for me for 23 hrs/day if you want
 
10:54 PM
@cspray uh. not only @rdlowrey. I'm too.
 
@Ocramius if you want, you can work for me
 
@zeeks depends on the pay
 
@rdlowrey but somehow the namespacing of constants sucks.
 
@Ocramius for free :D
 
user895378
@bwoebi yeah there's no way around that. And you can't really go around with use const unless you don't care about people not running 5.6+
 
10:58 PM
@zeeks that's what I suggested for your pay, not mine!
 
@rdlowrey That's why we need to make our repos 5.6+ only!
 
I still need some of that work for 5.4+ tbh :\
I mean, I can fork+backport, eh
 
user895378
I will continue to retain 5.4-compat unless I have to have Generators
 
user895378
And my recent userland work means I don't have to require 5.6 for client-side TLS at least.
 

« first day (1384 days earlier)      last day (3564 days later) »