« first day (1792 days earlier)      last day (3162 days later) » 

1:00 PM
because I can eat all of it, but then I am dying for few hours
 
hehehe
Mornings @NikiC
 
@PeeHaa mornign
 
@PeeHaa usually served with bottle of cold beer
 
yummy :)
 
i tested beer yesterday and its test like poison , how you drink it ?
 
1:05 PM
I need some beer Tonight
 
@NullPoiиteя are you serious?
 
i drink twice in a year!!
 
@NullPoiиteя you have to visit europe then
I suspect that in subcontinent the beer is quite terrible
it actually could be the problem in entirety of Asia, since japanese beer tastes like cat-piss
 
1:13 PM
@tereško You're doing it wrong: kirinichiban.com
 
@Danack probably, since I have only tried imported japanese beer
 
There is a problem in the UK with a lot of imported and foreign labelled beer being not selling that well.....and so it sits around it bottles for ages, which does not exactly help it taste nice.
 
@Abe I've published a working innerHTML>DOM-update for refreshOutput online #fyi
 
@Danack I stick with latvian and chech beer \
 
Abe
still uses scrollTop hacks and things?
 
1:17 PM
i was like why the fuck people like this damn liquid
which one do you guys have ? may be it available in here
 
Tried a 10% beer a few months back, absolutely brilliant. Only had to drink two and I was smashed.
 
Abe
@Jimbo noob :D
 
damn indian beer taste
 
i should take some .htaccess lectures
 
1:20 PM
 
ill lookup edx.org
 
Abe
lol
 
@Abe none of those
 
Abe
cool @Sjon. i can slow down then? :P
 
no I want to see what you come up with! ;)
I still love the new logo
 
Abe
1:23 PM
ironically the logo took me 2 minutes work :D
wasn't really sure about it :D
 
@Sjon Could you add the max-width to the header too? i.imgur.com/kCPj0qu.png
 
you should get a smaller screen
I'll have a look at it
 
Abe
:D
@kelunik is that annoying?
 
ahh none of them will be available easily @tereško
 
1:26 PM
@Sjon Don't trust the dimension, it's 150% zoom.
 
i tried this Orangeboom it wasnt good .... it was duch though its good
 
Abe
a bunch of sites are fluid and don't have a max-width set
 
@Abe Well, the logo and those links on the right get out of focus
@Abe Maybe the perception would be different if the editor was full width, too.
 
@AnmolRaghuvanshi I suspect it would be quite impossible to get any of these in asia
 
@Danack By language construct I mean something like callable(foo) and callable(Foo::bar) which would just always return a Closure. I get that both things are somewhat tangential, but I feel that if in the future the style for aquiring a callable will change towards using closure(), as it has the more useful behavior, I think we should consider moving it another step further as well.
However, going down that road I'm not sure how to deal with the callable($foo->bar) method / callable property ambiguity
 
@NikiC So....I was planning to send that RFC to the list in a day or two to target 7.1. I always try to think about whether something is going to block future features.....but I am rubbish at language/api design, so usually fail. Is there any reason to not send that RFC for consideration, with respect to what you just said?
 
today I learned that Clojure is ungodly and not actually a lisp and anyone who claims it is has been deceived
 
@kelunik So basically, people believe that if the mix enough md5, microtime, uniqid and shuffle they'll be getting a secure token?
 
ya @tereško that's why i prefer rum in winters ;p
 
I also learned the lisp community has a word for languages with PHP's shitty namespacing system, 'lisp-2'
and some of them genuinely think it's a good idea, and Common Lisp does it
 
1:37 PM
@NikiC A lot of people...
 
remind me never to use Common Lisp
 
@Andrea I'll remind you not to use Lisp at all
 
@NikiC sorry, but it's mandatory if you want to use the best PHP framework
 
@kelunik (∩ ͡° ͜ʖ ͡°)⊃━☆゚. * ・ 。゚ base64_encode(md5(microtime()))
 
@Danack Maybe they're not all using it for cryptographically secure requirements :-)
 
1:41 PM
click-fail.
 
Is yolophp's position as best PHP framework even in dispute?
I mean, it's universally agreed to be better than Laravel
and no framework can beat it on size
 
@Andrea [snarky comment about that not being a big achievement here]
5
 
@Jimbo Not all, but way too many.
 
@Andrea the framework, IDK, but yolo has the best website
 
@marcio this is true
 
1:43 PM
for the uninformed that have been living under a bunker yolophp.computer
 
@Andrea it doesn't have enough static locators, fix that.
Make it possible to map() over a static locator :P
 
@Ocramius what the hell is a static locator, is this how laravellians' brains work
 
@Ocramius You are such an intentional troll! :P
 
@Jimbo I don't even try.
@Andrea I don't know how Brain::works()
 
@Andrea Brain::get('MyObject') amiright @Ocramius
 
1:50 PM
@Jimbo no, no, use __callStatic. We're over this thing called "passing parameters"
 
@Ocramius What would the code call look like? DB::get()?
 
that's not just a static method, it's a Facade. Go watch some Laracasts for your own good.
 
@marcio Your face is a facade
 
Probably y('(map "brain::work" (people (load-chatroom 11)))')
 
That's bloody disgusting.
 
1:52 PM
@marcio what laravel calls "facades" are just static wrapper. It has nothing to do with the actual pattern.
stop spreading misinformation
 
@tereško turn on the troll detector 4000 please
 
@Ocramius So calling brain::work would do the load-chatroom 11, and it has to be mapped at bootstrap? Is that even close to the general gist?
 
I'm still sad this hasn't gotten more upvotes: stackoverflow.com/a/32279494/538216
It's a really common question and the answers are collectively not that good.
 
@tereško IRONY
 
@Ocramius I will just add him to the ignore list instead
 
1:53 PM
@LeviMorrison <3
 
Aw, thanks.
 
@marcio I thought you were trolling - you know that laravels 'facades' are complete bollocks, right?
 
@Danack Nah, you should send it
 
@RonniSkansing huh?
 
cool.
 
1:55 PM
@Danack Does var_dump($closure) provide high-Q introspection?
 
@Jimbo sigh
 
If it doesn't, you should prob improve that, otherwise those closures won't be fun to debug
 
@Jimbo no? :|
 
@Orangepill sorry mis-ping!, got confused by a red avatar,.
 
@Ocramius That's what your code told me :) I clearly misread...
 
1:56 PM
@RonniSkansing okay ...
how is the room this morning?
 
Enjoying the weekends =)
 
@Danack Link to RFC?
 
@NikiC It should do the same thing that the generated closures via Reflection would do e.g.:
function foo($bar) {
    echo "shamoan";
}
$closure = closure('foo');
var_dump($closure);
output is:
object(Closure)#1 (1) {
  ["parameter"]=>
  array(1) {
    ["$bar"]=>
    string(10) "<required>"
  }
}
 
@Danack yeah, that's not good enough yet
if it's a closure over any "real" function/method, that should be part of the debug output, imho
 
@LeviMorrison gist.github.com/Danack/9faf4469832ae4303410 - I am still thinking about the exception types, which isn't noted in the RFC. Bob said they should just be TypeErrors....I think the reflection ones are more appropriate.
 
1:59 PM
@NikiC you mean adding the context it binds to?
 
@Danack As it's not part of reflection, that would seem kinda weird?
@bwoebi in the above example, it should include "foo" somewhere
 
@Jimbo you need to learn yolophp, not just PHP /cc @Andrea
 
@NikiC can you point me to somewhere in the php src where extra debug info is added to a class? Or how would that be done?
 
@Danack in zend_closures.c there is a get_debug_info handler
 
@NikiC IMHO, closures in general should add information where they originate from (file&line info for example) … it's annoying to have to figure out manually where a closure was defined…
 
2:02 PM
@bwoebi good idea
 
@NikiC I won't be coding for the next three days… but feel free to add it to PHP 7 if you find time for it now :-)
 
@Danack I think I would prefer different methods for each input parameter set, but that's not really a show stopper.
 
@Danack I haven't logged in here for many days, so IDK if was discussed already. But, if it's going to be a lang construct, why closure() and not callable()?
 
I didn't explain that well.
I think what you propose is good – I think we should also have different functions for each input set.
You are right that there is utility in making any callable into a closure with a single function.
I think there is also value in the rigidness.
In this case they don't really conflict, so you could do both.
 
@bwoebi plz add column if possible :|
 
2:06 PM
@Ocramius information not preserved after parsing… sorry.
 
awwww :(
 
@Danack Teehee:
> Due to a combined limitation between the zend engine and the programmer implementing this RFC, it will not be possible to create a closure for a non-existent method on a class that has the magic __call method.
 
not even in the new AST?
 
> the programmer implementing this RFC
 
@Ocramius especially not there.
 
2:07 PM
@LeviMorrison hack has it like that. The reason I don't like it is that it means that it's more difficult to interface with code that is returning a callable. As the user then has to do the inspection of what the type is, to call the appropriate function.....I can't see any clear benefit except the obvious one that it's slightly easier to write a correct program.
 
@bwoebi :sadpanda:
 
@Danack I didn't explain what I mean very well – read the next few messages that clarify it :)
 
@LeviMorrison nice formulation @Danack :-D (But be honest… It's just a way to avoid hacking deeper into the ZE? ;-D)
 
@marcio Callables are just insane. Although it would be good to clean them up, having this current RFC be clearly separate from callable is going to be less messy longterm.
 
did you figure out the trampoline thing @Danack ?
 
2:09 PM
@LeviMorrison "I think there is also value in the rigidness." - isn't that something that can just be left to userland?
 
also, morning
 
function closureFunction(string $function) {
    return closure($function);
}
@JoeWatkins I figured I don't care about!
 
@JoeWatkins no… that's why the "combined limitation between the zend engine and the programmer implementing this RFC"
 
@LeviMorrison that seems like a quite significant limitation
@bwoebi unlikely
 
I really wished we could get rid of the hideous [$obj, 'method'] thing too in the future >.<
 
2:10 PM
@NikiC right… but well… how do we put trampoline functions into closures?
 
ah, tramplines ... much fun
 
@Danack You already have to implement each kind internally, right?
 
@marcio well, what's the alternative?
 
For a sake of example I'm going to use Hack's names even though I think they are terrible:
 
@bwoebi only closures for all them things
 
2:12 PM
it must be doable ...
 
@NikiC well… yeah.
 
@LeviMorrison yes. There's no technical reason not to have them separate, but as i said the generic version is more useful for people who are obtaining callables from librariy code, so they don't have to inspect the type.
 
@Danack it's a new keyword, but I get it.
 
I don't see a reason you have to use the trampoline function ... you can come up with some other way of invoking the real function set at prototype ...
 
@JoeWatkins the primary issue is the different usage of common.prototype between Closures and trampolines… They're fundamentally incompatible in their implementation…
 
2:13 PM
yeah, so don't use them ...
 
@JoeWatkins ....so just close over the __call method?
 
// a little too simplistic but I think you get what I mean
function closure(callable $foo) : Closure {
    if (is_string($foo)) {
        return fun($foo);
    } else if (is_array($foo)) {
        if (is_object($foo[0])) {
            return inst_meth(...$foo);
        }
        return class_meth(...$foo);
    } else  error();
}
 
close over another internal function which invokes the call method
 
My point here is that you already made these routines internally – why not expose them?.
 
@JoeWatkins the trampoline is to buffer & automatically pass the args in the suited way.
 
2:15 PM
/me has another go
 
@JoeWatkins basically we need conversion from foo(...$args) to __call("foo", $args) … so… how do you do it?
 
@bwoebi We should unify this in PHP 8.
(I'm probably going to say that phrase a lot)
 
IMHO the only way is putting an internal function as the Closure target which then executes the trampoline directly. @JoeWatkins / @NikiC
 
I dunno yet, I'll have another go, maybe some working code will come out ... other people should also have a go ... are you happy to vote on an incomplete feature because we don't know how to do something ?? c'mon ... let's have another go ...
 
@bwoebi if closure(...) get to work with non existent methods, it would suppress [$o, 'method'] completely.
 
2:17 PM
@LeviMorrison I'll think about it and probably add it to the RFC. The biggest hurdle will be the squawking from internals list, "OMG YOU'RE ADDING SO MANY FUNCTIONS TO THE CORE!!!1!!ONE!!!"
 
@Danack Then perhaps note that is is trivial to add them but are not happy with Hack's names and ask for suggestions?
I think inviting bike-shed in particular areas helps defray it from others.
 
@Danack I doubt you'll have to tell that in the RFC… people who look at the impl won't be complaining about that.
 
So if we'd rather bike-shed on the list about this than something else… I'd say that's a win.
 
@LeviMorrison Can you think of a convincing use case of where a closure created from a function name would be acceptable, but one created from an $instance and method name would be unacceptable? I imagine there probably is....but I can't think of one right now.
aka where would you want to use the individual functions as opposed to the general one?
Unrelated:
> 1 vs 1, both players keep a hand on the chest. When it is your turn to swing, you ask "(other player's name)?" They say "yes?" You ask "Can I hit you with my sack?" They say "yes". You try to determine their location based on the sound of their voice. Swing when ready. Go back and forth, first person to 3 points wins.
 
2:45 PM
@LeviMorrison that was an idea I was thinking of
Or even just new Closure(...)
It currently has no public constructor
 
No, don't use the constructor.
Do static methods if we stick something on the constructor.
 
Why not use the constructor?
 
Closure::fromFunction(string name)
Closure::fromInstance(object $obj, string $method)
Closure::fromClass(string $class, string $method)
@Andrea Partly I don't like constructors because you can't use them as callables :D
 
Guys, I'm using this.. FastRoute.
And its on this site: hassanalthaf.com
However, I don't want fastroute to be running on the hassanalthaf.com/blog
folder
 
@LeviMorrison heh
@LeviMorrison this is nice, but verbose
 
2:50 PM
Any fix for it?
 
I still want syntax if I can have it
 
@Andrea Better than inst_meth.
 
I use apache.
 
@HassanAlthaf wouldnt it be better to use blog.hassan...
 
@RonniSkansing I did try that, but.. my host is shit.
 
2:51 PM
@LeviMorrison that and the page explaining where ==> came from suggests the HHVM team loves recreational drugs
Will @Sara confirm or deny?
 
Anyone have an idea why eio_read() reads past the end of the file? Is there something I could do to prevent this? I can keep track of the file pointer position and size to be sure I don't fall of the end, but this doesn't work when reading a special file like /dev/urandom.
 
@RonniSkansing I tried configuring blog.hassan.. but it shows the www... lol
 
@Danack By the way, putting static methods on Closure avoids the 'many functions' by adding methods, which I think is probably slightly better.
 
@LeviMorrison Instant meth?
 
@HassanAlthaf do you know if it did not work because you did it wrong?
 
2:55 PM
@RonniSkansing I simply followed their steps. All you do is add a sub domain. And that creates a specific folder for you, where my wordpress is installed into
 
Do you know if it did not work becuase you did it wrong?
Or did you just meh doesnt work, try something else??
 
@RonniSkansing Tried it, tested it, searched all over, and then meh, doesn't work, fudge it! Let's find an alternative.
 
Did you try contacting support?
 
@RonniSkansing There is only one support staff, and that is the owner of the host.. LOL
And he barely helps, his replies are just half-assed.. :/
 
=/ why are you hosted there?
 
2:59 PM
I have something
 
@JoeWatkins What do you have? :P
 
krakjoe@fiji:/usr/src/php-src$ sapi/cli/php test.php
string(12) "wowsuchmagic"
array(3) {
  [0]=>
  int(1)
  [1]=>
  int(2)
  [2]=>
  int(3)
}
@Danack
<?php
class MagicCall
{
        public function __call($name, $arguments)
        {
                var_dump($name, $arguments);
        }

        public static function __callStatic($name, $arguments)
        {
        }
}

$obj = new MagicCall;
$fn = to_closure([$obj, 'wowsuchmagic']);
$fn(1, 2, 3); //segfault here
 
@RonniSkansing I feel like sht, already spent some money on a wp theme l0l
 
what does a wp theme have to do with hosting??
 
@RonniSkansing If WP dont work, it will be a waste for buying the theme..lol
 
3:03 PM
@HassanAlthaf you are telling me, that you have that host because you already spend money on a theme?
why not switch to a real host, and setup your wp blog on a subdomain
 
I got over 4 years free on this
lol
i bought some courses from the hosting provider
 
@JoeWatkins hm. I'd like to see the impl.
 
it's hacky
maybe unacceptably so...
 
still, show it, please.
 
3:17 PM
so it leaks the closure, and would leak the info if not called ...
but it's doable ...
I kinda think might be better off to implement outside of reflection, closures are nothing to do with reflection they are Zend, if we were implementing elsewhere we can cleanup better ...
thoughts ?
 
@JoeWatkins actually, it just should be the ctor of Closure class
 
that's a good idea
that gives us a place to clean up ...
 
@JoeWatkins won't that crash if Closure called twice?
 
yeah
hacky ...
but doable ...
if we had somewhere else to cleanup, we can free the info and stuff at the right time, remove last free and dtor and it'll work ...
but moar leaks ...
I really like closure ctor idea, that is probably the way to go ...
/cc @Danack
 
@JoeWatkins why do you need that extra info alloc? you can just bind the closure with the appropriate scope/$this? and then read that info inside the php_reflection_call_magic function?
also, by that binding of $this, you'll avoid issues with copy?
 
3:28 PM
have a mess around, I got there by trial and error, it seemed appropriate to introduce a new structure ... I'm probably wrong somehow ...
 
Which you can then access via getThis()
@JoeWatkins guess you're wrong, because that'd need extra logic to clean up
 
the closure is bound to this, EX(This) is null
 
hmm?
 
fci/c.object = &Z_OBJ(EX(This)) results in undefined $this
try it ...
 
okay…
 
3:31 PM
not sure why actually, didn't question it ... we are doing strange things ...
 
3:50 PM
@bwoebi So you're thinking new Closure($callable) rather than to_closure($callable)? That seems pretty reasonable.
 
yup
 
21 hours ago, by Danack
@Orangepill I instinctively don't like that. And the first concrete reason I've come up with is that it implies that a new closure is returned, which is not always necessary:
21 hours ago, by Danack
$fn1 =  closure('foo');
$fn2 =  closure('foo');
21 hours ago, by Danack
There's no reason why the same closure couldn't be re-used.....so long as they're not 'constructed' with new closure
 
but just wait
 
there's more!
 
Hello PHP
 
4:00 PM
<?php
class Foo {
        public function __call($method, $args) {
                var_dump($this, $method, $args);
        }
}

$foo = new Foo();

$closure = new Closure([$foo, "something"]);

$closure(1, 2, 3);
krakjoe@fiji:/usr/src/php-src$ sapi/cli/php close.php
object(Foo)#1 (0) {
}
string(9) "something"
array(3) {
  [0]=>
  int(1)
  [1]=>
  int(2)
  [2]=>
  int(3)
}
 
cool.
 
I have to run a ruby script to process a critical transaction. How do I avoid a race condition from occurring? Is there a like method for mutual execution in PHP?
 
I'm absolutely sure most things are not covered
it belongs here ...
 
But I still think this should be a procedural function for other reasons, like being able to pass it around as a callable:
function createClosure($callable, $name) {
	$callable($name);
}

createClosure('closure', 'bar');
createClosure([$closureMaker, 'foo'], 'bar');
That's not possible with only having a constructor.
 
I am using exec() but is there a method that checks if this script is already running an block it until it is unlocked before it will execute?
 
4:05 PM
so create a procedural interface to the constructor, but it needs to be implemented in the correct place, this is a feature of closures not reflection ...
 
@user2984057 you're probably going to need to use something like supervisord.org and have the data stored in a transaction storage system, like a database. And then have PHP push the data into the DB, and have Ruby read it from there, and have the interlock check done via the DB.
 
@Danack Seems like a vary narrow use case that can easily be covered by just creating a function in user land wrapping the constructor.
 
@Danack I am already using PHP to store completed transaction IDs in a completedtxns.txt file, a regex is used to check if the transaction has to be passed to this script, if it isn't there then the transaction ID is added to this list. Do you think I can just read the file using ruby to ensure that the passed transaction ID is in the file to ensure it should continue to run? I know that flock() will work on this system, it is unix.
 
@Trowski scroll up to the other one?
@user2984057 I said I think you should be using something that is more reliable like a DB .....trying to synchronize stuff through a file system for mission critical stuff is just not a great start.
 
Alright, might have to use postgres or mysql for this then, thanks.
 
4:11 PM
@Danack got really busy. Regarding the bootstrap thing, it's actually in the same VCS. Just trying to get a best practice on naming and structuring. Currently I just put a bootstrap folder in the root and one inside each app folder.
 
@Danack Not being able to reuse closure instances is a good point, but I wonder how often that would come up. Plus the engine would have to keep track of the instances created.
 
@Trowski Or we can just not use OO where it's not appropriate. It's not only ok, but it's better to use a function in this case, for the two reasons I've said. Trying to force OO just because it's the hot new thing is a mistake in language design imo.
 
array(1) {
  [0]=>
  string(3) "\o/"
}
@JoeWatkins I'm close… give me a few min
 
@user2984057 if you're storing something like transaction IDs consider using a key-value store like redis.
 
@bwoebi I already got there ... probably buggy
 
4:16 PM
@JoeWatkins no, with the fixed solution and no info array
 
oh right, nice ...
 
I meant, give me a few mins, I'll quickly cleanup and push to my branch^^
 
!!! I just logged into EC2 and didn't see my instance! Luckily, just happened to be in the wrong availability zone! phew!
 
@Danack it is appropriate ...
 
Except it doesn't need to always return a new instance...
 
4:20 PM
I won't vote for a really complex solution when a simple one could be had ... if you can do something in a few lines, you absolutely should ...
everything is fixable, you can make them reusable and cache them if you wanted too, and it still wouldn't be 10% as complex as the current implementation ...
/me shrugs
I don't mean to put you off ... I'm probably wrong ...
 
4:38 PM
Hey guys, what's your opinion on being a independent contractor and having a request from your boss to teach one of their interns how to do a job that you do every week for a nice lump sum, only to have that job taken over by the minimum wage guy that you taught how to do it. Leaving you with looking for more jobs rather than being comfy with a steady income.
Would you teach them or refuse, though it took you a lot of work to learn how to do the job in the first place, but easy to teach once you have it all figured out.
I've been on the intern end and a coder has denied to teach me certain basics so it seems "strange" for me to teach someone to take over a job I'm happy with and has good weekly pay. I'd have less work from them since they'd just be giving me the harder jobs as they come.
 
@Darius concentrate on what are you goals......ignoring the short-term feelings you have, what do you want long term out of that relationship?
 
Long term I want to continue working with them, good pay. But if I teach that intern my skill, I won't have good pay anymore. The intern will take over that part and they'll call me every couple months with the stuff they can't figure out.
 
@Danack @JoeWatkins github.com/php/php-src/commit/… // no memleaks, can be called multiple times etc.
 
Goals are to pay rent I guess. It just feels nasty to deny someone knowledge but at the same time, it's protecting my ass.
 
"Long term I want to continue working with them, good pay." - do you think that would happen if you refused to train an intern?
 
4:44 PM
Yeah, the job will remain if I don't teach them.
 
@JoeWatkins sorry for taking so long, but it took me a 15 mins to figure out why the Closure leaked… (OBJ_RELEASE((zend_object *) EX(func)->op_array.prototype); has helped…)
 
Been with them for 6 years with others coming and going. Some much better than me.
 
yeah it's pretty tidy ...
 
@JoeWatkins main thing you did wrong… using EG(scope) instead of mptr->common.scope …
 
thought it'd be wrong in some detail ...
 
4:46 PM
now going to fix callstatic… min…
 
@Darius btw you just listed your desire, not the relationship...and no, they will be pissed off if you refuse to help teach juniors. Unless you plan for the relationship to be a one where you are getting what you want, without regard for what the other side wants, it's not going to be a healthy relationship.
 
@Andrea Not the /entire/ team...
 
some just like them
 
@Danack Ah, I think you are thinking from the return result's perspective.
 
Well, we do have an engineering office in Washington state... just sayin'
 
4:49 PM
In which case the answer is no.
But from the caller's perspective it might matter. Meaning they want to make sure they passed a callable of a particular form.
To be honest I don't have a strong use case, but since you have to already implement all of that behavior I think exposing them would be valuable to a few.
 
@LeviMorrison The only example I can think of only involve massive 'typos' e.g. accidentally typing closure('foo'), instead of closure([$this, 'foo'])where they both happen to work.
 
can the patch be tidied at all @Danack, are all those create_ functions really necessary ? I guess you tried using fci/fcc first ?
 
which is a typo on this order
@JoeWatkins I'm aware of those things, I am not aware of how to use them in this context. So probably it can be tidied, but probably not by me.
 
Thanks for your point of view Danack.
 
I'm not sure how abusing arg_info is going to go down with dmitry, and I'm pretty sure he won't like all those functions ... unless they are necessary somehow ...
 
4:54 PM
@JoeWatkins When he has a better patch, he's welcome :-D
 
I'll teach the intern and look for a new place to work. One where I can learn instead of just teach. I've been learning on my own for too long and should get some proper guidance and hopefully I can grow too.
 
if you merge bobs finished patch, I'll have a go at tidying it up a bit ...
did you break down the tests yet ?
 
@Darius Or tell them that you don't like mentoring, and that the hours you spend doing that will be at a higher rater than just coding.....but as I said, you ought to be focused on making the relationship one that both sides are happy with.
 
yeah.
 
@JoeWatkins Not really. I added descriptions so that you can at least see which one is a problem if it segfaults. but it would still be worth breaking them into individual ones, even if that makes a huge amount of repetition.
 
4:56 PM
you can always include stuff
 
What you guys working on?
 
the classes could be included and just run individual tests on them ?
 
or goal with what you guys are working on
 
--Magic method calls
 
4:57 PM
But food first.
 
@JoeWatkins He is particular, yes, but he is also quite helpful.
 
oh yeah definitely ...
 
@Sara wait, now that I think about it, haven't you taken recreational drugs?
 
I wasn't being negative @Levi
done call static bob ?
 
awesome
 
5:26 PM
I already love this closure() function. Can we have it in 7.0 ?
 
is it possible to generate 15 digits using rand(min,max) ?
 
it is possible, but don't do it
 
ok but why ?
 
rand() is predictable
 
ok
 
5:35 PM
hola
 
have you committed that to php-src ? @bwoebi
ah closure tree
 
man, this algebraic types patch is going to be a pita, going to change everything
 
can I ask some suggestion, we created automated metering water, I have 1 table to receive the data coming from all meter devices.I want to create bill to the consumers, do I need header and detail table for this ?
 
this may be an 8.0 thing, just due to the internal arg_info changes alone
/* type_info for parameters/returns */
typedef struct _zend_type_info {
	zend_uchar type;
	union {
		zend_string *class_name;
		struct zend_type_info *type_info;
	} u;
} zend_type_info;
 
5:48 PM
@bwoebi nice
Fatal error: Uncaught TypeError: Failed to create closure from callable in /usr/src/php-src/ext/reflection/tests/to_closure/007.php:4
Stack trace:
#0 /usr/src/php-src/ext/reflection/tests/to_closure/007.php(4): closure(Array)
#1 {main}
  thrown in /usr/src/php-src/ext/reflection/tests/to_closure/007.php on line 4
but that ...
trying to call magic
and ZVAL_ZVAL 1,1 is wrong, ZVAL_COPY
 
@ircmaxell well… we technically have no restrictions on minor versions on internal API changes… well… we'll see how needs to change. If it's an engine only change… then it anyway won't matter.
@JoeWatkins what exactly did you try?
 
--TEST--
Test to_closure with magic __call [$instance, "something"]
--FILE--
<?php
require_once(sprintf("%s/to_closure_foo.inc", dirname(__FILE__)));

$closure = closure([new Foo(), "something"]);
var_dump($closure,
                 $closure([1,2,3]));
--EXPECTF--
object(Closure)#%d (%d) {
  ["this"]=>
  object(Foo)#%d (%d) {
  }
  ["parameter"]=>
  array(1) {
    ["$param1"]=>
    string(10) "<required>"
  }
}
array(3) {
  [0]=>
  int(1)
  [1]=>
  int(2)
  [2]=>
  int(3)
}
where Foo has ::__call but not ::something
 
@bwoebi well, it changes the arg_info struct, which means it changes a bunch else...
 
@ircmaxell which probably won't be a major issue because that's all going via macros, which won't impact the actual ext code at all…
class MagicCall {
        public function __call($name, $arguments) {
                var_dump($arguments);
        }
}

$obj = new MagicCall;
$fn = closure([$obj, 'wowsuchmagic']);
$fn("\\o/");
@JoeWatkins ^ works for me?
 
not sure what's going on ...
trying to break down tests ...
some of them just doesn't make sense now, don't need to test case insensitivity and colon and a bunch of other stuff ...
 
5:59 PM
yeah, it's all just going through zend_is_callable_ex() which is covered by a multitude of other tests already
 
yeah
 

« first day (1792 days earlier)      last day (3162 days later) »