« first day (2077 days earlier)      last day (2887 days later) » 

4:00 PM
i's pretty reliable, except case when multiple notifiers set and first one triggers exception
the rest one will not be called
that's due to exceptions model in php
 
Wes
so with notifier() you can add more than one notifiers?
 
but i guess it's same in most langs
 
Wes
or you are talking of multiple Reference objects?
 
@Wes let me check the details
 
Wes
anyway i'll have a proper look at it soon
 
I can smell it
 
user5900092
Hey y'all I have a question I have a plugin that runs on wp, and it is basically a form when submit it sends the user a confirmation email ext. and then copy all the data into a db table it suddenly stopped tracking the data and insert them into the table. last thing i changed with the form is that I added DOB and address input fields would that stop it from tracking>
 
frydai tommorow
 
user5900092
tracking i mean inserting data to db
 
vacation next frydai
 
4:05 PM
@Wes you can have multiple weakrefs to the same object
but if one notifier attached to one of those references will throw, the rest one will not be called
initially i had only callback notifiers support, but later added array notifier
it simply add reference object itself to it when tracked object get GCed
like in java
 
Wes
@pinepain that's a bit of a bummer indeed
will need to pay attention
 
yeah, another case was to allow callback notifiers to run even after first exception
but this approach looks even more dangerous
and yeah, this caveat applied only for those exception which propagated outside from callback notifier
inside it try-catch block is absolutely fine
it's the same like throwing exceptions in destructors
 
Wes
maybe pass the exceptions to other observers?, like function(Reference $r, Throwable $previous = null){ if($previous){ /* an exception was thrown in other observers */ } }
doesn't look right either but that is not good imho, observers must be able to know if the notification is not going to work
 
it introduces some additional complexity, but it need closer look
i personally don't like idea of catching someone exceptions, is a bit non-obvious
on the other hand, alternative to this is to bail and yield some fatal exception and interrupt process
which is also doesn't look good
 
Wes
yeah that was a shit suggestion, but again i think remaining observers must be able to take action if the notification will fail
 
4:19 PM
i do like the idea of passing exception to next observer, but not sure about how clean is catching user exceptions
for me adding one parameter more in case of exception is not a big deal
initially i tried to run all observers regardless whether exception was thrown or not
as a result there was a nested exception, afair
which is also looks to hacky to let that happen in userland
 
Wes
@pinepain no that was a shit suggestion :B imho you should just call remaining handlers, and pass a $previousFailed = true|false thing as second argument.
 
hello i change route to
$route['users/:num'] = 'users/profile/:num';
in code igniter
but when i read url parameter as following

function profile($profile_id) {
$profile_id come as :num not the actual number
example : /users/5 i want 5 but i get :num
 
@Wes I actually like idea of passing exception
 
Wes
i don't know... :-\
 
pass exception to the next observer and re-throw it if there are no more observers
it's like wrapping observers into try-catch block
and when next observers happens in finally block
more or less like this
 
Wes
4:24 PM
i don't like it
 
it's hacky
 
Wes
because you are assuming that handlers will be added in order
each handler is not supposed to know of other handlers imho, neither if they failed
 
afair notifiers called/executed in a reverse order they were added, LIFO
i don't know whether they should not know
I'll look into this more later today
now I have to go out
 
Wes
ok, we'll continue this
 
It would nice. Thanks!
 
Wes
4:28 PM
thank you for the ext, will look at it soon hopefully. later
 
hi
phplovers
which framwork is the best
 
cakephp - obviously
 
for what
 
your mom
=p
 
@tereško have you looked laravel and yii
 
4:31 PM
I was not being serious
 
I used both
plenty
 
laravel is his favorite..
 
actually I am yii lover
 
lol
 
4:32 PM
codeigniter
 
:P
 
gods below
 
@AnmolRaghuvanshiVersion2.0 lol =)
 
@Hikmat it all depends on "for what"
 
these are are for webapplications
 
Gon
4:33 PM
hoi!
 
o/
 
@Hikmat are you sucking stupid ?
 
hahahaha
 
all php frameworks are for web applications
 
4:33 PM
Someone an idea : When a user connects to a wifi-network I Would like to force him to go to a website where he has to enter his e-mail before he can use the network... Should that be hard to setup?
 
ahahah no,
it seems u are :P
@Duikboot this is php room
 
@Duikboot dev.wifidog.org (I have used this one - openVRT router software, php+pgsql authentication sute)
 
@Duikboot Depends on the router brand and model
 
I have no idea what other room, and I now some people here have good knowledge about networks :)
 
okl
use backtrack linux
 
4:35 PM
its kali not backtrack
 
Thanks @tereško !!
 
bactrack is outdated newer versions is called kali ..
 
:P
 
lol
 
lol
all updated champs :P
 
4:36 PM
@Duikboot sorry, OpenWRT
@Hikmat did you come here to troll?
 
because if you did, I would really recommend you to reconsider
 
@tereško please dont agree with any one
 
how much memory does it have?
IIRC the wifidog software needed 32MB
 
can any one help
 
@Duikboot they have started on trash can business ?
@Hikmat congratulations on earing the "ignore list achievement"
 
I really need help
please
 
Dammit where the hell online have they written the memory capacity :D
 
@Duikboot if it is not specified, then it is not intended for users to overwrite the router's firmware
 
4:43 PM
Which means wifi dog is not an option for me?
 
which means that the short answer to
9 mins ago, by Duikboot
Someone an idea : When a user connects to a wifi-network I Would like to force him to go to a website where he has to enter his e-mail before he can use the network... Should that be hard to setup?
is: YOU can't
 
On most PHP distros is GD installed by default?
 
Defuck flagged that?
 
the current troll .. obviously
 
:( Bummer
 
4:45 PM
Get lost filthy flagger
 
I've got it
 
Seriously...
Thanks @Undo
 
@samayo Is that character face from tekken or something?
I remember it from my childhood
 
@Undo could you please killban the one who's flagging those posts?
 
@tereško Yeah, working on it
 
Anonymous
4:46 PM
@Jimbo yeah, the best character Imho
 
@Hikmat and stay out
 
Anonymous
@PeeHaa can't u see flaggers?
 
nope
 
@samayo Nope. They removed it from the WS frames
 
that bug was fixed
 
4:50 PM
=)
 
Wes
too lazy to try, will $foo = '' . $hugeString; enable the copy on write semantics?
 
my public folder is doc root and contains js/css/ etc now there is some ajax calls to php script which is outside doc root that in src folder.
how can i call such php scripts??
 
Wes
seems yes, right @NikiC 3v4l.org/sbo0U ? also it seems hhvm does perform that optimization
@AnmolRaghuvanshiVersion2.0 need more info
 
@Wes hum
 
i have project named kk in C drive and i am using php built in server so my doc root of project is set to be kk/public/ containing js,css etc now these js files have some ajax code and calls php scripts in kk/src folder outside public folder so i get error localhost:8000/php/script.php is not found on this server.
 
5:01 PM
int64 = uint32 - uint32 … ending up with 2^32-1 :x
 
@AnmolRaghuvanshiVersion2.0 Are you using a router?
 
no
is that only a solution for that??
 
Anonymous
Where are you starting the server?
 
Wes
paths must just match
        C:\foo\public\bar\baz\lol\foo.php
localhost:8000/bar/baz/lol/foo.php
 
5:04 PM
Does the built in thing support fallback file?
Oh you just pass the file that handles stuff
 
@PeeHaa never heard of that..
 
@AnmolRaghuvanshiVersion2.0 php.net/manual/en/…
You can do a simple url path match and include the file you want from outside the docroot
 
Anonymous
There is a small bug related to the php sever in Windows you should remove the last trailing slash when stating the server as php -sS localhost:8080
 
Anonymous
If you are using windows
 
let me try.. PeeHaa,samayo
 
Wes
5:09 PM
why don't you install apache wamp or something tho :B
 
@Wes yeah that make me confuse..
i had but not now
 
Anonymous
Or virtualbox
 
Anonymous
If you choose centos I can give you a complete guid
 
yeah i have vagrant setup
 
Anonymous
So it won't take you 4 months like it took me
 
5:11 PM
oh boy it's ubuntu
 
Wes
lol
just 4 months :D
 
i will install centos samayo
 
Anonymous
4 months and a couple of grey hairs @Wes
 
Wes
well done. me, it's ten years i'm (still) trying
 
try try but don't cry :P
 
Wes
5:13 PM
i'm waiting to get alzheimer so i will have an excuse
 
Anonymous
I got 10 grey hairs from vbox and about a 1000 more from php
 
lol
but you still have hairs
 
Wes
@NikiC i always have the sensation that i'm giving you guys more work to do :B
@AnmolRaghuvanshiVersion2.0 ish
 
ARghghgh
 
@Wes Don't worry, we're good at ignoring work :P
 
Wes
5:23 PM
@NikiC :P ha
 
Gon
Night o/
 
@NikiC so true :-D
 
so , it looks like steam sale is starting
 
woop
 
either that, or they are getting DDoS'ed
.. hard to tell the difference
 
5:28 PM
back in my time Steam wasn't widely known yet…
 
@NikiC Any opinions on 3v4l.org/73lIE ? When unseiailizing an object instance where the class definition has changed (visibility change, in this case), should we error on that difference? Or just accept the new defition (which is what HHVM appears to do).
 
@Sara does hhvm also accept private->protected|public?
As that one is class name bound
But I'd say that allowing it is the better approach here
visibility shouldn't really affect serialization
 
@NikiC Was just testing variants, yeah... 3v4l.org/ecM1Q
 
@Sara so it only works in one direction? ^^
 
Allowing it, as in letting it set two identically named props (with different visibilities)?
Yeah... weirdly... o.O
But regardless of how HHVM may be broken... I'm inclined to correct the serialized visibility, with warning on visibility change
 
5:34 PM
@Sara Not totally sure really, I can imagine weird stuff happening if say you have a private and and a protected one in inheriting class and you drop the private one
 
So in the first example, the serialized \0*\0 protected visibility would be ignored in favor of the public visibility in the class, while in the second example, the public visibility would be ignored in favor of the protected visibility in the class.
True...
 
Wes
did they make a "cards against humanity" for developers? :o
 
@Sara I'll just have it said for the record that PHP has the absolutely worst serialization format
 
Of course.... how are you meant to GET to the unserialized value? The property info table wins and you wind up with the declared prop instead of the dynamic prop that came from unserialization
@NikiC Preachin to the choir, bruv
 
@Sara Have to translate to unmanged name like hhvm does?
 
Anonymous
5:40 PM
@Wes what's the temp like man? I'm about to pass out here, it's 32 degrees
 
Steam's Summer sale has begun (ends on 4th July)
 
@NikiC is a situation when multiple exceptions thrown in a row from extension valid from the point how php was designed?
 
@pinepain yes
they'll be automatically concatenated
 
@NikiC That covers one direction, but not the other. :)
 
Anonymous
Ok I finally believe global warming is real
 
5:41 PM
… I have a working function … I … I've just forgotten to call it <.<
 
@bwoebi Classic. What I usually do is implement working code and then tear my hair out wondering why it doesn't work ... while being in a different directory on a different branch.
 
@NikiC but will try-catch catch nested exceptions, e.g. Foo, Bar and Baz exception thrown in the given order, so in a result we'll get Baz[prev=Bar[prev=Foo]], but will our catch(Bar $e) catch such exception?
 
@pinepain no, only the outer exception counts for catch
 
@NikiC Love these too … or more often "wtf does that code not segfault???"
 
/cc ^^ @Wes
 
5:43 PM
@bwoebi or that, yeah
 
@Wes I hit this when was ignoring EG(exception)
and such behavior is absolutely valid and expected
from how js and other event-driven framework/libs works, I can suppose that not iterating through the rest of observers when exception thrown from one of previous observers is valid behavior
js folks mostly got used to it, imo
though, i will look how libev, libevent and libuv handler such cases
 
6:01 PM
@Wes interesting, with php-uv both callbacks are called, regardless exception, but only the last exception thrown, without $previous set
cc @bwoebi ^
 
@pinepain both = which two?
 
    \Amp\onReadable($socket, function () {
            echo 'It is readable!', PHP_EOL;
            throw new \Exception('It is readable!');
        });

        \Amp\onReadable($socket, function () {
            echo 'It is readable again!', PHP_EOL;
            throw new \RuntimeException('It is readable again!');
        });
and then try{
    \Amp\run(function () use ($s) {
        $s->start();
        echo '.', PHP_EOL;
        yield;
    });
} catch (Throwable $e) {
    var_dump($e->getMessage());
    var_dump($e->getPrevious());
}
gives It is readable!
It is readable again!
string(21) "It is readable again!"
NULL
 
@pinepain ctrl+k ;)
:D
 
lovely, thanks.
 
@pinepain hmm, don't know. There's just no special handling here…
 
6:05 PM
yeah, it's a pretty weird use case
we had a talk with Wes about my php-weak extension where single object has multiple weakrefs with observers and in case one them throws, the rest are not called
which is also considered weird
what is the most obvious way to handle such cases?
 
I honestly don't know…
 
Hi !
 
Perhaps @NikiC has some advice as he lately has been dealing a lot with exception semantics in engine…
 
Which room should i go to have information about wordpress and banking information
 
@bwoebi i guess it is not ok to fail whole application with fatal error, is it?
 
6:13 PM
@user3206631 Those two are scary together
It's like asking where can I find a room where I can play with fire and chlorine triflouride
 
@user3206631 TBH, you should never store banking information in a wordpress site
 
@tereško Yes that was my question haha
 
@pinepain no
 
:)
 
@tereško In fact, i have to delived a service before being paid ! Thats why i wanted to store the banking information of my client
How can i do that?
i have to deliver*
Its gonna be a monthly billing
 
6:19 PM
oh dear
 
and the amount of the bill will depend of what people do
 
o/
 
\6
 
hola
 
6:21 PM
No idea ?:p
 
@user3206631 first of all, you shouldn't build such a system on top of wordpress, seriously. You are just asking to be hacked. Second, if you HAVE TO store the card details, store the "decryption key" in an air-gapped system, which you use to create the payment order each month
 
@tereško should not because ya know :P
 
sorry .. I am more interested in going through my steam's wishlist ATM
 
:)
 
sale?
I bet there is
 
6:24 PM
started
 
@Ekin :( lulzsec were funny skiddies
 
rite, with plenty of sarcasm
 
@bwoebi Uh, no idea on that. Both options aren't great there...
 
@NikiC what about adding Throwable $previous = null to callback?
 
@pinepain not really
 
6:30 PM
@pinepain don't think that would help
people would have to deal with odd edge cases they aren't going to hit anyway
 
in my case i have observer signature as (Reference $r)
with weak references they would =)
which doesn't make me happy though
raising some warning on non-called observers is also not a solution
weird
 
@pinepain I'd probably go with calling all observers and collecting exceptions
Not calling an observer is a long-term stability problem due to leakage
 
@NikiC then it will be one large exception
 
@pinepain Sure but: So what?
In the other case you'd also only get (effectively) a single exception
 
from the other point it may be a solution to throw reference specific exception which will have all thrown from observers, e.g. getThrown(): array<Throwable> or like that
 
6:35 PM
@pinepain That may be fine as well
If this is something that happens during destruction, it's pretty unlikely the surrounding code is equipped to handle a specific exception anyway
 
true
 
So yeah, I think that sounds best
 
Steam sale started?
Oooh baby
 
even it there will some catch-all-exception rambo there will thrown unexpecetd exception type
 
@Fabor you probably should wat till tomorrow ... when the site is not crashing all the time
 
6:38 PM
@NikiC thanks for suggestion!
@NikiC here is the test for how it works now - github.com/pinepain/php-weak/blob/master/tests/…
 
@pinepain .testsuite.php aaahhhahahaha
 
yeah, I know =)
 
@pinepain but why?
 
I copied from my other pretty fancy extension
in a future it needs to be removed
for now it's is so, sorry =(
 
hey there, it might not be relevant with the group. But I need some help in WordPress (it could be a bug maybe). The 'post_type_link' filter is not working for some reason.
Here's the link to question: wordpress.stackexchange.com/q/230567/56815
 
6:44 PM
@tereško Okay i understand that i can't do that on wordpress ALSO i heard that i migh can do that with Authorize.net like storing banking info on profile then bank
 
Steam really needs to scale better.
 
@NikiC or what was your original point about?
 
@pinepain The leading .
 
ah. that's to make file be on top of folder listing
poor naming, underscore or whatever may be better
 
@Fabor bad download speed?
 
6:49 PM
No, summer sale is on and they're getting flooded
 
oh
/me runs in to check summersale
 
@bwoebi lol
 
@NikiC That's why you don't just upgrade to newest master in production … :x … because your deps may do fishy things…
 
@bwoebi Heh, mornternoon, then
 
@Dereleased Yeah, morening
 
6:55 PM
@bwoebi Not sure what your timezone is. Not sure if I recall what I was going to ask about at the time. Probably something something is it possible to get phpdbg to follow includes, but I think I figured out what I needed to know.
 
@Dereleased follow includes ? btw. CEST
 
My assumption is, for any included (or eval'd) code, it will be compiled into its own op_array, and will have its own numbered-from-0 var/tmp/cv/etc, but it will inherit/share the same symbol table as the calling scope.
Central Europe Standard Time?
wouldn't that make it like 9 PM or something for you?
I'm 3 hours west of my usual TZ at the moment
 
yeah, it's 9 pm here
 
+0300, not like a 3 hour drive or something, that's a bad measure of distance
 
Wes
@pinepain imho, the fact that an handler errors it shouldn't prevent other handlers from running and most importantly it should not prevent the object to be garbage collected
 
6:59 PM
3 hour drive in the mountains of India covers a ground distance that you could cover in half an hour or less (excepting crazy urban traffic) in the US, for example
 
Wes
in other words, if handlers fail it's their problem, not Reference's
 

« first day (2077 days earlier)      last day (2887 days later) »