« first day (1598 days earlier)      last day (3341 days later) » 

12:00 AM
Lexer, Scalar Types, array->string, pecl_http, all voting.
 
http is closed. Array->string has basically passed.
 
i.imgur.com/nNCXnX1.png < Why's there a black star?
 
@kelunik just popular amongst the plebs, not the room owner pinned.
 
@rdlowrey scalar types → voting ;-P
@Danack thanks.
 
@rdlowrey oh, add strict arg count
 
user895378
12:03 AM
DANGIT.
 
"Generator Return Expressions" needs abbrv or won't fit
 
Simply "Generator Returns"
 
user895378
1 message moved to Trash
 
user895378
1 message moved to Trash
 
12:07 AM
I saw "github awards" and thought "cool, a ruby based web app to inspect" pff github-awards.com
> GitHub Awards is performing some maintenance, come back soon !
^ since yesterday
 
12:30 AM
lol
http://t.co/Qkn2Fe2b8w
 
12:48 AM
hi
 
12:59 AM
@ircmaxell why there is no shortcut for using namespaces something like this for example
use Data\Communication\Example\Blah {Class1, Class2, Class3, Class4};
instead of
use Data\Communication\Example\Blah\Class1 as Class1
use Data\Communication\Example\Blah\Class2 as Class2
use  Data\Communication\Example\Blah\Class3 as Class3
use Data\Communication\Example\Blah\Class4 as Class4
 
@someone #1 why are you asking me directly?
#2 it was just accepted for PHP7: wiki.php.net/rfc/group_use_declarations
 
@rdlowrey So I found a repo test case for that "Unknown socket" issue, and so commences the:
 
epic one
 
Im curious as to why the script_only_include RFC was voted against. As a former DC tech, I saw PHP exploits all of the time and thought it was an interesting idea
 
@taco at least in part, because you don't make apps be secure by closing security holes one at a time. Instead you need to avoid programming in a way that has the possibility for security holes.
 
1:13 AM
make sense
 
The hole it closed of people including files dynamically by doing require $someFilename; is stupid, unless you have whitelisted what the allowed values of 'someFilename' are.
If you've done that, the change has no benefit. If you haven't done that, although it will prevent some attacks, it won't prevent all.
 
Oh okay. I thought the goal was to make it so you did 'include file' and PHP would tack on .php so it would only read .php files
as opposed to say /etc/passwd
 
@taco That would probably actually be a better idea than what was suggested. It was going to attempt to validate that the included file was php.
Or from a set of allowed extensions.
 
yeah, that would make sense; for templating and such
 
Hey guys, my googling skills have hit a new low and wondered if anyone can help.
Thinking that Reflection is costly. Now that property_exists returns true for static variables (5.3) is the only way to determine how to call that variable: return array_key_exists($property, get_object_vars($object)) ? $object->{$property}: $object::$$property;
 
1:28 AM
> Thinking that Reflection is costly.
It's not very expensive in PHP.
Why.......do you want to access property variables like that dynamically?
 
I was trying to enhance my small tempting script to expose methods and properties from the controller.
The controller has a static variable ::$name and in my template I had $::name$ - running it trough some parsing.
Unfortunately internally, it calls $controller->name, as property_exists returns true.
I guess the real solution is to agree with the developer that its a static variable since the use of :: and should come up with another convention for accessing class properties, probably $->name$
 
Not sure what you mean. echo $controller->$name; is valid syntax.
 
^ Huh, I was getting undefined property, but if $controller->$name; can also access static properties then I need to turn my attention else where.
 
If you want to do it for static properties dynamically, you need to use the syntax:
class foo {
    static $bar = 'whatever';
}

$foo = new Foo();
$name = 'bar';
echo $foo::${$name};
But I'd really question the benefit of allowing that in a template. It's far too magic imo.
 
1:50 AM
Indeed, I managed to get into a situation whereby I didn't know whether I should be calling a property, statically or not. Hence the ternary statement above. But agree its too magic and should stick to regular convention. Good chatting Danank :)
 
2:43 AM
@PeeHaa maybe link some code? :-)
 
 
2 hours later…
4:27 AM
morning
 
 
1 hour later…
5:39 AM
morning
 
6:38 AM
morning everyone
 
morning @RonniSkansing, @SergeyTelshevsky
 
6:57 AM
mornin
 
moin
 
7:26 AM
Since room is quite I'll ask one off-topic question. What do you guys think about mazda rx-8?
Does it worth buying?
 
well ... they look real nice ...
they are however extremely expensive to keep long term, their wantonly complicated rotary engines need new seals every 30K
they're not really worth any money in this country because of that ...
 
morning
 
posted on March 02, 2015 by kbironneau

/* by el_dudu */

 
@JoeWatkins is the font you have issues with Calibri? Just asking, because it's not antialiased for me.
 
^ Jenkins build back to normal: app#632
hehe
 
7:33 AM
@Leri this is four years old, fully loaded, it's under £10k and has done 30k miles ... it is no coincidence that they have all done just under or just over 30k, they either require a rebuild or their owner just had them rebuilt (and is trying to recover losses) autotrader.co.uk/classified/advert/201501150193028/sort/ageasc/…
 
Good morning
 
I see. Thanks very much.
 
what else is on the shortlist ?
@kelunik it's not that, characters are missing from the set apparently
 
good mornigns
 
7:41 AM
'nin
 
user1804599
8:24 AM
@bwoebi echo "a"; foo: echo "b"; comefrom foo; echo "c"; echoes "ac"
 
hello ppl
I have created a sql db in SSMS... now I want to connect it to a php how I can do it
 
8:40 AM
good morning all!
 
8:54 AM
Fair morrow, gentle Room 11. :)
 
+1 wtf && greeting;
 
@salathe you may hate me now
 
@salathe :D
and morning
@rdlowrey @bwoebi As weird as it sounds, it looks like the internals list actually managed to raise a valid point. Any ideas about what to do with the yield * syntax?
@marcio great BC analysis in your arguments rfc :)
@rdlowrey arrays should also be valid input to yield*
arrays and Traversables that is, wouldn't even limit to Iterator
basically anything "iterable" ^^
 
9:23 AM
guyz
 
ThW
Morning
 
9:34 AM
posted on March 02, 2015 by kbironneau

/* by Arekibian */

 
Mornin
 
@райтфолд no idea what it then should actually do
 
user1804599
It comes from a label.
 
user1804599
It's the opposite of goto.
 
that makes no sense…
 
user1804599
9:44 AM
comefrom is to AOP what goto is to function calls.
 
@NikiC I like yield use...
@райтфолд AOP?
 
@райтфолд PHP doesn't need any more AOP
 
@bwoebi You do? Seems pretty random to me. "yield use generator" doesn't really make any "sense" to me (unlike "yield from generator")
@bwoebi You missed the part where this is a joke ^^
 
@NikiC In sense of using a generator to yield values from it
But… we could make "yield from" a single token… then we don't have BC breaks… hmm…
 
@bwoebi good point, didn't consider that
 
Hey, can someone help me with pthreads?
 
@NikiC Only issue there is that we can't emit an appropriate T_WHITESPACE for spacing between yield and from…
But not sure how much of an issue it'd be…
 
don't think that's an issue
 
@NikiC it prevents exact reconstruction of file from token stream.
but…
 
@bwoebi why?
the T_YIELD_FROM still has an associated string in the code
not a prob from ext/tokenizer perspective at least
 
9:51 AM
it has…?
okay then it's fine
 
Are environment classes good or bad?
 
@bwoebi tokenizer returns the string of a token based on offsets, not based on zendlval or something like that
 
okay okay
then it's fine
 
yield goto $it, yield list $it, yield foreach $it
That's the other keywords I could find that make a tiny bit of sense
but well ... nothing particularly nice
 
Can someone tell me why working directory of a thread is the location of apache and not the location of the script that run it?
 
9:54 AM
@ksg91 Why do you care about what the working directory is?
 
A part of my application uses relative paths and I wrapped it in thread to process several instances in parallel. So that part doesn't work
 
thread as in ext/pthreads?
 
@NikiC yes
 
okay, that might be an issue with the ext if it doesn't take over the parent cwd. Might ask @JoeWatkins about it.
 
@NikiC so is this issue specific to my installation configurations or with php build?
 
9:59 AM
Morning
 
10:11 AM
@NikiC okay, mailed to list.
 
hello is there anyone here experienced integrating threatmetrix to their wesbite?
 
@marcio wrt to your RFC... say, I have functions called with 3 parameters by my framework. I only need the 1st parameter. If I add it and don't use it, static analyzers will throw me errors. If I don't add it, your RFC will throw a warning. How do I deal with that? ^^
 
@FlorianMargaine add it and fix static analyzer
e.g. by not marking params starting with _ as unused, that's a common convention
The "unused param" problem already exists now with interface implementation / extension, so nothing new here
@bwoebi nice
 
hello
 
10:22 AM
@FlorianMargaine yes, which is why "fix static analyzer" ;)
declaring unused params is totally legit in some cases, the analyzer must support some way to suppress it
 
moin
 
morning @Dave
 
10:42 AM
@NikiC And passing extra params is totally legit according to LSP.
 
@Danack feel free to vote no on the rfc
just saying that the static analyzer issue exists completely independently of this rfc and needs to be solved in any case
 
whats the story morning glory
counterfeit counterfeit that's what your shouting at me
I was told that wasn't 10 minutes to lose
 
@NikiC yep… when you have some implementation having an extra optional param… and another one without that extra param. You decide to pass the extra param… but you get an error when you pass it to the impl. without it. … Yes, you can then instanceof it… but that's ... :x
 
The RFC makes sense at the first look, but it also opens a can of potential issues. \cc @marcio
 
11:05 AM
nobody likes you when your 23
 
You couldn't find the problem could you? This is all the code related to the arrays, inputs and the for loop. Maybe Specific wasn't the right word. — Loko 12 mins ago
Don't make me punch your face.
 
@Ja͢ck ::facepunch
 
Is that C++ fight club?
2
 
@Ja͢ck lol
 
11:21 AM
 
@Danack Why should I "get a move on" when others already volunteered to create a new RFC?
 
@SebastianBergmann Because there is a deadline for RFCs for PHP 7 of March 16th?
 
@Danack One reason for Throwable to not being userland-implementable would be consistency with Traversable. Another that it "just feels wrong".
@Danack I do not have time at the moment to write an RFC, I'm afraid. And Guilherme volunteered.
 
I'm not sure either way. But forbidding it to start with means that if required it could be changed to be allowed - the opposite, making it be allowed and then restricting it wouldn't be possible.
 
@Danack Also an excellent reason.
 
11:33 AM
monday ...
I hate monday ...
 
11:46 AM
everybody hate MONDAY :P
 
Slaps Monday Around The Head With A Trout
 
@JoeWatkins Isn't Monday part of the weekend?
 
morning
@Danack thx for that RFC by the way
@LonelyRanger you're
 
12:17 PM
@Ocramius np. btw I seem to be lucky in my choice of people who don't like it.
 
12:44 PM
I'm alone?
 
You're never alone, simba.
 
:D i am here to ask a question. Is there any free /less expensive way to find ISP details from my users ip. My friend is getting heavy spam attack in his chat rooms and the spammers are using some vpn/ ip hiding service with which they get thousands of ips to change. It's impossible to ban each ip so I'm planning to ban the whole ISP with every ban
 
@ShubhamNishad If you can define the behavior and put it in a log file then: fail2ban.org/wiki/index.php/Main_Page
 
that will ban ip
based on old records
but in my case spammers come with a completely new ip
usually from the same isp
 
...
 
12:57 PM
@BenjaminGruenbaum +100 internet points for Lion King reference ...
 
@ShubhamNishad the only effective way I've found to combat spam is machine learning
 
1:10 PM
Blocking a whole ISP doesn't seem right to me...
 
@HamZa, I know it will cause problem for some genuine users but there is nothing I can do to stop spammer other than blocking the whole isp
 
Define your spammers? Do they share the same links? Are they just posting garbage? Or trolling?
 
yeah, they are trolling and abusing users.
it takes them only 1 minute to change their ip and login to chat room again
 
How about suspending their accounts?
 
any user can enter our chat rooms without a need to register an account
 
1:18 PM
@ShubhamNishad sure you can - recognize the spammers' surfing patterns and block/capcha accounts that exhibit these patterns.
 
@Danack well, it seems to me that it's not "they don't like it" rather than "they don't understand it"
 
@Ocramius WhyNotBoth.jpg - and I realise anyone could pick apart my code as well, but this is code that Stas has in a finished product
I don't care what their argument is...they're wrong.
 
@Danack what the flying fuck
D:
 
@Ocramius The person who wrote that votes on PHP internals - and you don't....
 
Someone find me an excuse for having a @php.net account without any actual contributions except for HHVM
 
1:30 PM
@Danack do you have a 900k LOC project?
@Ocramius didn't you contribute tests?
I find criticism easy, but this kind of code is not especially weird in very old/big projects
florian@florian:~/tmp/sugarcrm_dev$ cloc .
    6803 text files.
    6301 unique files.
     828 files ignored.

cloc.sourceforge.net v 1.60  T=24.80 s (230.2 files/s, 56870.3 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
PHP                           3497          75241         224136         527523
 
@FlorianMargaine yes, but I don't think that counts as contribution
 
@Ocramius sure does for me. But see with @Tyrael...
 
Fairly sure @Tyrael would give me an account
 
@FlorianMargaine When the person who wrote it is making the argument that it's preferable for a constructor to return null when it encounters an error, rather than throw an exception, you've got to wonder if their bad legacy code is bad because it's legacy or whether they just don't understand how to write code.
 
@Danack when a person wrote a 900k LOC heavily-used project, sorry, but I think they 1/ understand code, 2/ have a somewhat valid opinion. Although this one doesn't seem to have any argument...
 
1:36 PM
His argument in this case is:
"I've never tried your X, but my Y works for me, therefore your X is wrong." 2015 might be the year when I learn to dodge such discussions.
Anyway - the RFC is going forward and is likely to pass by some margin, so I'm going to crack on with the patch.
 
@Danack I read that as "when I learn to doge such discussions"...
 
Wow.
Such efficiency.
And I know technically you didn't accept my bet, but I still am going to say that you owe me a beer @salathe
 
@Danack I didn't accept, because it was a certainty that that would happen! :)
But, I'll buy you a beer if/when we meet!
 
awesome.
 
I don't believe @salathe really exists
Real people don't miss phpnw
 
1:42 PM
There, sent my VCS account request
@DaveRandom what are real people?
 
@DaveRandom I went to PHPNW once...
... in 2011 IIRC :P
 
@Ocramius You know those pink squishy things that float past your field of vision on the edge of the monitor occasionally? Those.
 
1:43 PM
> The Google uses special URL-safe Base64. Normal base64_decode doesn't work.
 
@DaveRandom my cats?
 
well thank god I didn't start doing it on my own.
 
@Ocramius You have pink cats?
 
Depends on how much they fought with each other
 
@DaveRandom with optical illusion... yes
 
1:44 PM
My cat is no long half pink actually, she has most of her hair back now
@FlorianMargaine Maybe he just has en.wikipedia.org/wiki/Bagpuss
 
got my video card today
and I decided to buy that insanely expensive monitor
 
Hii...
 
@tereško oh, that looks nice
I'll probably re-build my rig once home... in 8 months :|
 
@tereško That the uhd one?
 
1:53 PM
yeah
 
@tereško ... 34"?
 
aha
 
oh god
you can put 3 emacs side by side, at least
 
Ah...........magad. All the Intl extensions constants are defined in the global namespace
 
@Danack well... yeh. they would be. core exts don't use namespaces atm.
 
1:56 PM
.-.
 
@FlorianMargaine well, yes, it will be really good for the productivity stuff
 
@tereško seems nice for legacy code support :P
 
@DaveRandom I thought the standard was to bind the constants to a class like \Intl::SOME_VAR - I guess maybe pre-class stuff couldn't do that....
 
@Danack most things have some kind of prefix in the name, there isn't much in the way of collision danger in practical terms. But yeh, if it's not an OO API (or it's an old ext with a pre-existing procedural API) then they won't be class constants
 
From the intl extension U_ILLEGAL_ARGUMENT_ERROR - I guess U is a kind of prefix.
 
2:02 PM
@nikita2206 and I suspect that "Elite: Dangerous" in it will be nice as well.
 
@tereško spend 300 bucks and get an Oculus DK2
worth every cent.
 
you want him to spend 3-months salary on something?
... j/k @tereško :>
 
@Ocramius not sure ... you have to figure in the cost of meds for against motion sicness
 
Is true
They're cheap though, but not exactly good for oyu
You guys know why you get travel sick?
Body thinks it's poisoned
 
"travel sick" ?
 
2:05 PM
Natural response to poison = throw it up
Travel sickness, motion sickness, same thing :P
eyes see things moving, body doesn't feel it, apparently classic signs of poisoning to our bodies. Pills inhibit that
 
@tereško it isn't that space game funded on kickstarter I've heard about? Looks nice. BTW If you'll play any action games I would suggest doing it in a window mode in 1920*1080, I get worse stats when playing on the WQHD screen =(
 
@tereško E:D is good, rarely got that, and only when there's some video lag. Since you bought a new video card, I figured that's not a problem.
 
@nikita2206 "worse stats" ?
 
TBH, the only game where I had motion sickness was Alien Isolation, and that's because it was calibrated horribly. It looked like I was walking uphill at all times.
Other than that, I played until I puked, and it was worth it :P
 
@tereško in games where your personal stats/performance matter I mean, if it's Far Cry in single player mode for example then it's fine
if you compete with other people, big screen distracts
 
2:09 PM
@Ocramius I in ted to skip first generation of VR gear. I have no direct interest in that technology.
 
I can tell you that you're missing something ;-)
 
probably
 
I sometimes just idle in E:D to look around
 
@tereško I have good news then!
 
2:19 PM
haha
 
Episode 57 is NOW LIVE with @ircmaxell! We talk PHP Internals & how to avoid community member burnout. http://j.mp/devhellep57 #php #podcast
 
how to avoid burnout ? Remove the poisonous people from the project
=)
people whose default state of personality is "asshole" (like me) are not suited for opensource projects and fuck up everything
6
 
user895378
morning
 
yo
 
moin
@ircmaxell something to listen to on school run ...
 
2:33 PM
moin moin
 
A quick question I think I know the answer to but want to check - if I've set zend_replace_error_handling(EH_THROW, IntlException_ce_ptr, &zeh); there's no way to set the error code that is attached to the Exception is there? Instead I have to write a custom error handler?
 
Downloading for the car journey
 
user895378
2:47 PM
@Danack no clue.
 
@rdlowrey np - I've just realised that I'm taking the wrong approach anyway....I'm adding actual code, when I could just add an extra parameter to the existing error handler to force the exception to be thrown...
 
user895378
@Danack this pretty well summarizes my usual workflow when doing php-src things.
 
user895378
try lots of complex additional logic => realize I can do it simply by slightly modifying existing APIs.
 
3:00 PM
What would you choice for a large tree? Adjacency list model or Nested set model? They're both aren't perfect, and each of them has its own pros and cons, but I'm wondering which one is better for a large data set
 
posted on March 02, 2015 by kbironneau

/* by Frankie */

 
@bad_boy depends on the details, but your first choice should be "closure tables"
 
Should Helper class Stateful care if key exists?
^ just a method
 
free hint: try to avoid using ternary operators
 
@tereško well, he wants ?? there...
 
3:13 PM
Where they should be used?
Just askin
:D
 
but he's not on php7 I'm afraid...
 
not sure, really
probably in php templates, because in general ternary operators make it harder to read the code
 
ok Thanks, Florian yes I am
  public function get($key){
    $key = (string) $key;

    if (isset($this->data[$key])) {
      return $this->data[$key];
    }
    return null;
  }
Seems to be nice ^
 
Good mornign again
 
And what about if I use Helper trait instead of class?
 
ThW
3:19 PM
@VeeeneX This is a valid use case for a ternary imho, But they should never be nested and the result should always be used.
 
@ThW Thanks so should I use ternary ? Right?
 
@VeeeneX why are you returning null instead of telling me what I asked for doesn't exist?
 
But you are expecting value not a boolean Right?
 
yes, I'm expecting a value (that value can be boolean, yes?)
 
3:24 PM
Could be....
 
@iroegbu null indicates the absence of a value.
 
I had had discussion with tereško or Florian, I'm not sure
 
Whether or not null is also valid for your storage domain is another question.
 
ThW
3:27 PM
@VeeeneX I would use it (with the extracted (string)$key)
 
@VeeeneX In PHP 7 you'll be able to do return $this->data[(string) $key] ?? null;
 
Thanks guys I'm taking notes of everything what you sayin
@LeviMorrison You mean ` return $this->data[(int)$key] ?? null;`
 
@VeeeneX You cast to a string; I assumed you mean it.
 
Yes now I see dummy me :D
 
it is pointless to case array keys as strings
I suspect that internally array keys already get cast as strings ... // cc @ircmaxell
 
3:31 PM
@LeviMorrison I would expect an "Undefined Index" exception instead of a null
 
But I don't want to scary user :D
 
@tereško depends on the type
"12" (numeric strings) get casted away from strings back to integers
 
hey everyone
 
$data = array(1=>null) makes things crazy
 
objects will just error
 
3:32 PM
@ircmaxell oh, so it is other way around
 
@iroegbu Some people don't like exceptions. Just because you expect one does not make it the best case. (Note that it might be; I'm just saying null means the lack of a value)
 
is it possible to insert into a table which has a foreigh key and insert in THAT foreigh key table at the same time?
 
how do we differentiate $data = array(1=>null) from when the index is not set?
 
@Japa LAST_INSERT_ID(), google it
 
@tereško thanks for answering, iºm trying to use that, but it´s giving me a sql error saying: "INTO is not a valid imput at this possition"
huh!?
 
3:35 PM
Tereško you mean this? i.imgur.com/wOsEq7N.png
 
i have this: insert into Cliente (primeiroNome,ultimoNome,pais_idPais,idUtilizadorCriador)
VALUES (joao,santo,(INSERT INTO Pais (Nome) VALUES (LAST_INSERT_ID(),Portugal));
 
Ou
 
i mean:insert into Cliente (primeiroNome,ultimoNome,pais_idPais)
VALUES (joao,santo,(INSERT INTO Pais (Nome) VALUES (LAST_INSERT_ID(),Portugal));
it gives an error in my second insert into
whats wrong?
 
@Japa no, use two queries in a single SQL transaction (google this term too)
 
dat wrong button? :troll:
 
3:50 PM
lol
 
user895378
@bwoebi I'm with @NikiC ... I think yield use <expr> sounds totally random ...
 
user895378
But the more I think about it the less I hate it, so it's whatever.
 

« first day (1598 days earlier)      last day (3341 days later) »