« first day (1417 days earlier)      last day (3524 days later) » 

12:03 AM
@Leigh Well, in master there's ZEND_CTOR_MAKE_NULL().
 
@Ja͢ck I was plucking my technique from DateTime :P but then I realised GMP had an additional resource attached to it
 
@Leigh that doesn't sound like a good idea
 
Not sure whether ext/date is a shining example of good practices though ;-)
 
^ this
 
ah I see why said in master...
because, not before
 
12:04 AM
yeah :)
 
I guess to rephrase, will an object whose zval type is set to null be garbage collected properly?
or, if you guys can think of another object that has an additional resource, and can fail during __construct() due to bad params... I'll take a look at that
 
PDO?
 
hm, good call
 
Do a zval_dtor() before ZVAL_NULL()
 
Or really any OO DB
 
winner
 
^_^
@DaveRandom Ever had this problem?
 
so how do you pronounce tjerk anyways... need to get it right when i grope you later
 
pragmatically, it's pronounced as Jack.
 
so not, tea-jerk
 
12:13 AM
A more technically correct pronunciation is: chair + k
 
ok good, because my brain was saying..tyerk
 
@Leigh yeah, not that :)
 
Mine said sort of tchyerk
 
@Ja͢ck didn't know you're from Singapore. I always thought you were like Dutch or something.
 
My dad gave me a Frysian name .. the joys :)
 
12:15 AM
I always forget to explain leigh = lee, until people call me "lay"
 
@crypticツ That's because I am Dutch :)
 
the concept of a silent leading T does not play well with my English brain
 
@Ja͢ck *mind blown*
 
@DaveRandom Related, I reserve the right to call you Dave IRL no matter what your 'real' name is.
 
@Leigh Jet Leigh? :)
 
12:15 AM
like that, but lazier
 
@Leigh meh, @Jimbo thought you were a girl
 
also rounder eyes
 
That is lacist
 
=.=
heh
 
@Danack @PeeHaa and Joe have both said the same thing
 
12:17 AM
\o/
 
I may ask Farkie to have my name badge made up so it says Dave on it
Which will probably confuse all the people from my office...
 
just spent the last 10 mins running php -r <stuff> instead of sapi/cli/php -r <stuff> and swearing loudly ... time for bed
 
12:38 AM
Fix it, fix it, fix it!
 
@Ja͢ck sudo rm -fr /
 
@crypticツ NYET!
 
12:54 AM
for composer say I put require "acme/something": "1.2", and then require-dev "acme/something": "dev-master" and do a composer install to include dev packages does the require-dev package override the require one?
 
@crypticツ It shouldn't do, it should just clash. What are you trying to do?
I guessing that doing require "acme/something": "dev-master as 1.2" is probably going to be useful.
 
@Danack is there a way for me to specify a stable package for production install, and if someone wants to develop the app it will install the proper dev versions of those packages basically.
 
@crypticツ No.
at least, none that I'm aware of.
 
1:32 AM
@Ja͢ck will INI_SCANNER_TYPED be available in 5.6.1 or is it being added to 7?
 
Does anyone here know why the following code doesn't work: `<Directory /var/www/>
RewriteEngine On

# No redirect, if file or directory exists
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule .* - [L]

RewriteRule ^([A-Za-z0-9-]+)/?$ link/index.php?a=$1 [L]
</Directory>`
I'm getting the following error: Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden
 
@Jack Do you have a moment to try helping me sort through why my opcode handler isn't run?
I've added an opcode to Zend/zend_vm_opcodes.h and a handler to Zend/zend_vm_def.h. I ran php Zend/zend_vm_gen.php after a make distclean.
The entire opcode handler is assert(0);... so I am sure it didn't run.
Oh, and I told it to emit an opcode in zend_compile.c where I did my other return type stuff.
That code runs; if I swap the emit with an assert the assert is triggered.
 
2:04 AM
@crypticツ Yes, and yes.
@LeviMorrison did it update the zend_vm_execute.h ? i think that's one of the things it generates.
also, what's the definition of the opcode handler you've added to the vm_def ?
 
sec
185 #define ZEND_CHECK_RETURN_TYPE 169
 
btw, did you fix your push issues? :)
 
No, ssh still doesn't work. I have to push over HTTPS
2821 ZEND_VM_HANDLER(169, ZEND_CHECK_RETURN_TYPE, CONST|TMP|VAR|CV, ANY)
2822 {
2823     assert(0 && "If this runs, yay!");
2824 }
 
okay .. well, good enough, so you can show me on github then ya? ^_^
you've added the opcode itself to zend_vm_opcodes right?
 
Yeah, that's this line:
2 mins ago, by Levi Morrison
185 #define ZEND_CHECK_RETURN_TYPE 169
I just pushed the updates.
 
2:10 AM
oki .. linkee?
 
did you check whether the opcode is correctly emitted?
 
Not sure how (phpdbg not building atm)
 
VLD ?
 
But according to NikiC that code emits the opcode and the returns a pointer to it in case you need to do more stuff.
 
2:17 AM
my best guess would be that zend_validate_return_type() doesn't run.
 
It does.
I can set a watchpoint on it and it runs
 
which test case are you running?
009?
 
Running this atm:
<?php

function foo(): array {
    return array();
}

foo();
 
Yeah well .. return emits a ZEND_RETURN opcode.
So, that's basically "bye bye new opcode, i'm skipping past ya"
 
I hook in before that, I think.
 
2:20 AM
I hope so.
But I don't see another explanation.
 
5822     if (return_type_ast) {
5823         zend_validate_return_type((zend_function *) op_array, return_type_ast TSRMLS_CC);
5824     }
5825     zend_do_extended_info(TSRMLS_C);
5826     zend_emit_final_return(NULL TSRMLS_CC);
 
If the opcode is emitted, it's bound to be handled when the VM reaches that opline.
 
I mean... maybe that's not doing what I think it is doing...
 
:) the body of the function was emitted before that line
the final return is just ... if you don't have a return statement at all.
it creates an implicit one for you.
just create an empty body function and try again.
 
Well good
I removed the return statement and:
Fatal error: Invalid opcode 169/8/8. in /home/levijm/Projects/php-src/tmp.php on line 3
 
2:23 AM
Awesome
Something works.
 
But... dunno why it thinks the opcode is invalid? What's the /8/8 mean?
 
The 8/8 refers to the CONST|TMP|VAR|CV ...
The operand masks
 
Hmm... so where do you think I should emit this new opcode? It should be before return statements.
So I guess I need to find the part that actually emits the return opcode and emit this new one if applicable.
 
The ZEND_RETURN handler has to inspect the owning function and determine whether it has a used return type.
 
No. That won't work.
It needs a new opcode that is only emitted when applicable.
 
2:27 AM
Okay, then you have to find other spots where ZEND_RETURN is emitted :)
 
\o/
php: /home/levijm/Projects/php-src/Zend/zend_vm_execute.h:31410: ZEND_CHECK_RETURN_TYPE_SPEC_UNUSED_UNUSED_HANDLER: Assertion 0 && "If this runs, yay!"' failed.`
 
you added USE_OPLINE? :)
 
No, I changed the parameters it takes to UNUSED
 
ahh
oh right, because it takes no operands lol
bbiab
 
What does bbiab mean?
 
2:46 AM
be back in a bit
 
2:58 AM
Hmm...
 
i'm back from a bit :)
 
\o/ I have it running.
Well, it asserts false :D
 
that's good enough
 
Oh crap
 
so i guess you've modified the part where the zend_return code is emitted?
 
3:03 AM
It runs on all functions instead of just ones with return types :/
@Ja͢ck Yeah.
I guess I have a bad initialization somewhere.
 
:)
 
Okay, fixed :D
Now I need to write the type check stuff.
 
:D
good luck!
 
Thanks. I need it.
 
 
2 hours later…
4:50 AM
good morning
 
5:11 AM
morning
 
morning
 
 
1 hour later…
6:22 AM
What the hell is this circlefest
 
"named parameters" tops reddit's list. dafuq
 
if you have so many parameters that you need to call them by name you really ought to smell something.
> There are plenty of good languages with without this feature that can be used for web applications. This just illustrates how narrow and short sighted you people are.
This community is a constant disappointment.
Agreed :)
 
posted on September 02, 2014 by nlecointre

/* by Panda313 */

 
... I guess they really want the annotations: reddit.com/r/PHP/comments/2f7t9v/…
=/
I wonder If any of downvoters even watched the lecture
 
6:40 AM
Odd, Travis CI reports a whole slew of failed FTP test cases, but locally they pass ... =(
 
@Jack in php, named parameters would make some functions easier to use, because there is lots of api smell :p
 
Right, but ... wouldn't that be something that default would also solve?
 
default?
 
Assuming this would be used to pick optional parameters.
 
I mean that many arguments orders are weird...
 
6:42 AM
@FlorianMargaine Okay, I should say default RFC :)
Just what we need then, everybody applies their own ordering. </sarcasm>
 
Who cares if the parameters are named
afk
 
You'd rather deal with inconsistently named parameters than inconsistently ordered parameters?
 
not sure which is worse :)
what's this request for tuples ... like return ('foo', 'bar'); ?
because apparently return ['foo', 'bar']; is just a hack o.0
 
6:57 AM
morning
 
7:26 AM
moin
@LeviMorrison sorry levi, fel asleep, just got up
hands up if you're on ubuntu or can spin up a ubuntu vm in the next half hour
 
Hey.
I was wondering why this prints "B::i" instead of "D::i" ideone.com/my4sSA
I'd either expect it to give an error (in case private methods are non-virtual) or print "D::i" (in case they are)
 
recki-ct is trending two places from top
 
@PolymorphicPotato The f method was not overridden.
 
take over laravel ... star it star it star it ...
 
So when you called it, it called the f method of the parent, and the parent has access to i
 
7:38 AM
@SecondRikudo Yes, I noticed that. :v
I'm asking why i isn't.
 
Had you overridden the f method on the child, you owuld have gotten an error.
@PolymorphicPotato Because you haven't explicitly overridden it.
 
I think you are missing the point.
You can call overridden methods from a parent class method, and it calls the overriding implementations, but apparently not when the parent class method is private.
I'm asking about the latter case.
 
in HTML / CSS / WebDesign, 23 mins ago, by k111ky
ALL HEIL THE DESIGNERS - http://mapglyphs.com/maps
:D :D
 
hi
I have a question
would it be possible to have a php file triggered when a csv file is modified
 
bleurgh mornings
 
7:50 AM
moin @salathe
 
morning
 
morning
any idea guys?
 
@insanityCode yes
next please! :D
 
productivity++
 
how can it be done?
 
7:52 AM
@insanityCode most *nix distros have "inotify" available... if you're on windows then, good luck.
 
its is on apache server not windows
 
then you'll have something running on the server, watching a file(s) or directory(s) for changes using inotify... google around there'll be programs, samples, examples, in all different languages and probably PHP too.
 
though I think people just use the cli thing ... not sure ... I'd use that ... or C ...
 
yeah, i'd use a separate cmd for it
 
I will try to find something about hits
this*
 
7:56 AM
@insanityCode what would make that csv change anyway?
 
an export file
coming from a pos
its an automated export
 
right .. then i would definitely run it outside of apache
 
the cli is in the inotify-tools package on my system, anything redhat based should be same ...
(I'd probably whip up something myself but guess you don't know C)
 
I would prefer something separate than php
 
inotify-tools it is ...
 
8:00 AM
i can't run C on the server
as its a shared hosting
 
huh ?
oh then you'll have a hard time using the cli too ... or installing a pecl package ...
 
ok then ... get a proper server ...
 
I don't have the funding to get a proper server
 
how much are you paying for shared hosting ?
 
8:02 AM
€7.95 a month
 
The poor man's inotify would be to write a cron job.
 
but is it any good
?
 
@JoeWatkins I have a better one
 
yes, I have one ... I've had one for ages ...
 
8:02 AM
8 pounds a month for shared hosting ... that's rather hefty.
 
they are better than shared hosting at any rate ...
that's euros @Jack
 
same same
:P
 
these are quite fast
 
Good morning
 
8:03 AM
This is an affiliate link btw, if you buy, I'd appreciate it if you did it through that ^
 
even though they are shared
 
@SecondRikudo that's much more expensive for same hardware
 
@JoeWatkins True, but you often don't need the same hardware.
Depends on the application you're making.
 
hm.. so, it's @JoeWatkins to blame in infecting @Ja͢ck by a virus with secret code name "php-src" ? :p
 
you don't need to spend money needlessly, like ever ... I'd go for the $5 one over the one that is 4x more expensive whatever I was doing ...
@AlmaDo he got addicted all by himself ...
 
8:05 AM
hehe
 
@insanityCode shared hosting is crap, period ...
 
I have a 2eur/mo vps... pretty good
1gb ram / 10gb hdd and a crap cpu
good enough for znc
 
@AlmaDo :) i was already doing php-src related stuff before joining SO ...
The results of which are now the laughing stock of Chris =(
 
we are talking about OAuth, right ?
"it looks like a random collection of methods"
 
Though, laughing may be the wrong word .. maybe crying is more apt
Yesh, OAuth =S
 
8:09 AM
thanks guys
you where of great help
 
Back then I didn't have enough C-fu to suggest splitting up a few things, such as separate entity for OAuth requests.
 
sounds like something simon cowell said to an X factor contestant the other day ...
 
The signature algorithm for OAuth1 is ... effected by some kind of overdose.
 
he told someone it sounded like she "swallowed a load of people and they were screaming"
 
gotta like him for that
 
8:12 AM
epic
afk an hour
 
in JavaScript, 14 secs ago, by Benjamin Gruenbaum
Happy Birthday SecondRikudo!!!
4
 
yet another fellow get older (:
 
good morning
 
morning gents
@SecondRikudo happy birthday man, I wish you a lot of health, prosperity and longevity
 
@ziGi Thank you :)
 
posted on September 02, 2014 by nlecointre

/* by strangelet */

5
 
@Feeds ahahhaha
 
@Feeds Awesome XD
 
8:57 AM
hello hello i have a question stackoverflow.com/questions/25619182/…
 
user2862309
Hi people
 
user2862309
can someone check this ->
 
user2862309
0
Q: Create a Collection of Objects from a Class Using a Transformer Function

Mr. MeshuggahIn this question I would like to discuss a problem related to building a collection of homogeneous objects from a class using a transformer function that transforms a passed array or other sort of collection. The problem lies in the fact that I want to persist most clean code as possible and at t...

 
mornign
 
morning
 
9:14 AM
@PeeHaa good morning
 
9:38 AM
mornings
 
@DaveRandom good morning
 

« first day (1417 days earlier)      last day (3524 days later) »