« first day (1413 days earlier)      last day (3538 days later) » 

user1994804
3:00 PM
Ok, @BadHorsie I hope this makes sense
http://www.your-adrenaline-fix.com/ajaxexample.txt
 
What I've asked before today. How is possible that:
`echo Config::session_lifetime;` - Freezes website
`echo $config->session_lifetime;` - Works fine?
 
because session_lifetime isn't a static property, probably
 
user1994804
Updated echo within Page A
 
@TomášAresakMalčánek I didn't say anything about visibility
I said static
 
"?:=" operator, short-ternary/assignment. Use case "return $this->foo ?:= new Foo();" is equivalent to "return $this->foo ?: $this->foo = new Foo();"
 
3:03 PM
Three character operator? :(
 
@YourAdrenalineFix OK give me a min
 
@LeviMorrison Alternatively, "?="
 
@FlorianMargaine Well you are right then because my structure is just public session_lifetime Thanks for the help. I still have to learn ;P
 
user1994804
Thanks so much, Take your time.
 
@LeviMorrison well, there is ===
@TomášAresakMalčánek it's alright
we all do
 
3:04 PM
@LeviMorrison A 3 character operator isn't that bad either; if we ever had a null coalesce operator, I'd hope it'd be "??" with a null coalesce/assign being "??="
Also, as @FlorianMargaine said, "==="
 
@DanLugg that's not horrible...
 
hehe
I like how php is becoming like perl
:P
 
@ircmaxell Having a null coalesce operator?
Or the 3 char operators in general.
 
Maybe I'm just crazy, but I don't want a null coalesce operator.
 
user1994804
Edits done to description of Data.php3
 
3:07 PM
In my experience, if you need to do something like:
 
@YourAdrenalineFix OK, so you can send some of the values over with your request like this:

var params = [];
for (var i in data) {
params.push(i + '=' + data[i]);
}
file += '?' + params.join('&');

xmlhttp.open('GET', file, true);
xmlhttp.send();
 
Well, ?: is already a "falsey coalesce" operator ;-)
 
var params = [];
		for (var i in data) {
			params.push(i + '=' + data[i]);
		}
		file += '?' + params.join('&');

		xmlhttp.open('GET', file, true);
		xmlhttp.send();
 
@DanLugg as a null coalesce operator
 
That is in your shipping function
 
3:08 PM
If you do this $object?.property?.value, what are the chances that next line will work? I feel like you should be explicitly handling null conditions there.
 
user1994804
??
 
Sorry for bodging the formatting hold on
 
I like that, but null isn't really a thing for users, how would you treat an empty string, or array ...
 
OK, so in your ShippingData function, where you have

xmlhttp.open('GET', file, true);
xmlhttp.send();
 
@ircmaxell Yea, it'd be good. I'm fine with our current falsey coalescence, but something with an assign varient.
 
3:09 PM
Add this above it:

var params = [];
for (var i in data) {
params.push(i + '=' + data[i]);
}
file += '?' + params.join('&');
 
@LeviMorrison Well, that's null-safe dereferencing (isn't it?)
 
can you stop posting the same code over and over again @BadHorsie
 
@JoeWatkins as non-null
 
Like Python, I favor explicit over implicit, particular on error(-like) conditions.
 
user1994804
@Joe, He's leading the less knowledgeable Thank You
 
3:09 PM
??$foo would return $foo unless isset($foo) was false, and at which point it would return null...
 
@YourAdrenalineFix don't care, please use pastebin/eval if you want to talk in code ...
 
^^ Or create a new room.
"$a = $a ?? $b" --> "$a ??= $b"
 
that hurts my head
 
Really?
 
??
??=
yeah, really ...
 
3:12 PM
I'm so used to seeing "return $this->lazy ?: $this->lazy = new Widget();"
 
@DanLugg I misread something you said earlier; my bad.
 
@DanLugg compiler error
 
That simplifying it to return $this->lazy ??= new Widget(); would be lovely.
 
I would make ?? be a unary operator
 
user895378
@Danack This is the best I could do. I will be accessible over the next few days though I will be away from the office if you have problems.
 
3:13 PM
@ircmaxell wat.
 
return ??$foo
 
how would that work ?
 
^^ ?
 
3 mins ago, by ircmaxell
??$foo would return $foo unless isset($foo) was false, and at which point it would return null...
 
@rdlowrey Cool. Enjoy your weekend debauching.
 
3:13 PM
I don't see a use case.
 
so you could combine it with ternary: return ??$foo ?: "default";
 
I'm not seeing the benefit, show me
 
user895378
@Danack those dates are tentative. I hope to be finished much sooner than that, but I'm trying hard to learn how to under-promise and over-deliver :)
 
Nah, I'd rather just see a port of the C# null coalesce operator with an assignment variant; as well as an assignment variant of the "falsey coalesce operator" (which I know isn't a thing, but that's pretty much how it works)
 
So...
Let's say you have this:
$a = isset($b) ? $b : $c;
I propose this cutting-edge, mind boggling syntax instead:
 
3:16 PM
@LeviMorrison basically, my unary ??$a would be equivalent to isset($a) ? $a : null
 
$a = ($b OR $c);
Y'all can thank me later (in money)
 
lol, there it is.
 
(this doesn't work quite the same if $b doesn't exist)
 
The "if a isn't falsey, gimme a, otherwise gimme a after making it not falsey" use-case is what I'd like to see an assignment variant for. All the talk of null coalescence is neat too, and I think that's be cool, but the "falsey" testing is far more ubiquitous in PHP (seemingly) and as a result, I think there'd be far more benefit to the terser syntax of an assignment version.
Also @ircmaxell I honestly don't think a unary coalesce is that useful.
 
perhaps
 
3:20 PM
Chaining it is part of the fun, "$a = $b ?? $c ?? $d ?? $e;"
 
Ow shit people. Just saw the time. I have been working the entire day
not good
plop beer time \o/
 
can i start a discussion ?
 
Depends.
 
@DanLugg this entirely depends on what you are writing and how, I don't like use cases for this reason, it's a perfectly good idea, but because we can all imagine another way to do it, maybe several, our response is "do it like this instead" ...
I don't think it's clear, which is a separate thing to usefulness
we only have so many reasonable characters we can use as operators ... and we seem to be using most of them already ... now when we want a new functionality we have to come up with strange stuff like ?:=
 
Besides, we need unicode operators like first.
 
3:27 PM
are you drunk ?
 
Julia really does this, by the way.
 
user895378
AFK until Tuesday. Will be accessible (unlike sometimes) in case my code makes 5.6 explode.
 
user895378
</announcement>
 
Ciao, amigo.
 
user895378
Have a nice weekend folks :)
 
3:27 PM
lata @rdlowrey ... some kinda holiday on monday isn't it ?? (I got day off email today ...)
 
user895378
Yep, long weekend in US for "Labor Day"
 
that's it yeah
I get US holidays off, not uk ones ...
 
user895378
I will pour out a 40oz on the backs of the down-trodden proletariat in solemn celebration.
 
so I'll be celebrating with you ... I guess ...
 
@fa
@Fabien depends on what ?
 
3:29 PM
Depends on how interesting the discussion topic is.
 
@JoeWatkins I dunno, I don't see it as strange op or op , "="
 
@rdlowrey Noice. What are you going to do? Going swimming in that pool agani I saw somewhere on your twatter feed? :D
/stalkermode
 
hummm ok
 
"?:" or "?:="
 
the only unicode operator I want is:
 
3:31 PM
@JoeWatkins got engineering approval. Now just waiting on a single signoff :-D
 
@ircmaxell FREAKIN AWESOME
wats single signoff ?
 
"one final"
 
user895378
@PeeHaa Nope just visiting friends for the "big game" between our respective universities' american football teams. I will be consuming beer like a 20-year old frat boy. Reliving my early adulthood, basically.
 
I reversed the work on async stuff, I do think I can make it work, i saw your concern the other day and didn't have a solution to the snippet you gave ... but I'll come back to it ... it's "my thing", I should be able to do it ...
@ircmaxell weeks or days or what ?
 
@ircmaxell This is approval to work more on your super secret PHP core project?
 
3:33 PM
@LeviMorrison nope, already had approval from that :-D
@JoeWatkins emailing him now, it's just a VP signoff
@JoeWatkins yeah, if you could make a function call async, then we could have some fun :-D
 
that is what will be async
unless I misunderstand something ?
(also, excellent)
 
yeah, auto-parallelism of blocks... just think about it... :-D
 
yeah I will, I kinda rushed in, but couldn't solve it all tidy ... so I'll do it in a branch when more pressing matters are solved ...
 
@rdlowrey :D And you'll pay the price like a 30 year old.
 
I'll be all over it this weekend if you get your go ahead ...
 
3:36 PM
yeah, take your time
 
Aw... return types not as cool as auto-parallelization of blocks.
 
I think arrays and strings are also important, so either would work...
 
yeah they are more important, I should do those first ...
@LeviMorrison it's not that ... I'm not sure where to do the do-over
I doubt it'll get accepted for 5.6 and developing for master is totally different
but you said you didn't want to work on it for ng ...
so ... direction please ...
 
Oh, you must have misunderstood me.
I am not aiming for 5.7 for this any more.
So we'll rework it to be on top of master (aka PHPNG)
 
ok good, ng patch will come soon ... it will be a do-over, we'll re-use test suite but it'll be started from scratch, I'll get to it ...
 
3:39 PM
I decided that to use the feature in existing code would be a bc break for them; may as well coincide that with a new PHP major version.
Also, I assumed we were waiting for AST to get merged (which happened recently, didn't it?)
So I wasn't feeling bad about no progress :D
 
yh done, and 64bit stuff, and settled ... can start new patching now ...
should be a no brainer for 7, I don't see it getting any resistance at all there ...
we are almost too positive that 7 will be able to do anything, bit like we could propose anything right now and 7 seems so far in the future we are all just shouting yes ...
I hope not the case ...
dmitry changed the allocator without even an rfc
 
eih
 
Well, I think return types would have made it into PHP 5.7 if I tried.
(as in, pushed it before everyone started pushing for PHP.NEXT)
 
could still happen
 
I don't want it in a 5.x release, I decided.
 
3:44 PM
it would have but we don't want to implement it twice, 7 is a different animal, I don't intend to maintain any code for 5 and 7 ... and trying to maintain a patch at the compiler ... I don't even want to imagine a way to do that ...
 
For people to use it in existing code will likely be a BC break for their users. Best to coincide that with a new PHP major version, I think.
 
@ircmaxell not sure I want it too though ...
 
I'm not arguing that ;-)
 
and for this in particular Levi's concern about bc seems valid ..
 
@LeviMorrison well, that's an adoption problem, doing a major has no impact on that
 
3:46 PM
Besides, there are no powerful features of PHP "7" that I know of at this time.
 
I think if we get our heads together and implement those things that have been argued about the last 5 years, users have more incentive than they ever had before to adopt 7 quickly ..
 
We have boatloads of internal changes (which are awesome), but no feature improvements.
 
we couldn't think about them, until a few days ago we didn't know what types looked like ...
apis might still change ... but at the very least that had to stabilize before we could move forward with any features ...
 
Eh, that's not exactly true. I understand what you are saying though.
 
it felt true, I was trying to develop ustring at the same time, it is extremely annoying to have the build broken every couple of days
 
3:49 PM
 
oh awesome
 
wat wat ?
 
@ircmaxell to make public now or to publish in some time?
 
afk 20 minutes ... doctors and can't wait ... she's saying "Joe, come on, you're going to be late" ...
 
3:51 PM
That's mongolian lamb too
 
@bwoebi To do something...
 
@ircmaxell something what?
 
... :-X
 
Something secret!
 
guys, i need some help
<?php
function Compile($page)
{
	$content = file_get_contents($page);
	$content = explode(';', $content);
	print_r($content);
	for($i = 0; $i < count($content); $i++) {
		if(stristr($content[$i], 'display ')) {
			str_replace('display', 'hi', $content[$i]);
			echo $content[$i];
		}
	}
}

Compile('page.hs');
str_replace is not working.
 
3:54 PM
Learn to debug.
 
I did.
Imeanwut how?
 
@HassanAlthaf str_replace() returns a value, you don't assign it to anything
 
What do you mean?
 
$x = str_replace(....);
 
Nope it does replace...
 
3:55 PM
I guess I need to update my return type RFC to include updates to the language spec, eh?
 
oh yea wait nvm
 
@LeviMorrison ++
 
@LeviMorrison did the font change on PHP manual for the syntax highlight? The 'r's look weird to me =o\
 
@LeviMorrison no
 
4:00 PM
YES!! ATLAST MADE THE DISPLAY KEYWORD TO WORK!!
setting variables now xD
 
@NikiC no?
 
@ircmaxell the "need" part is not right, as far as I am aware
 
well, if 7 was spec-driven, the RFC would need to target the spec, and only incidentally come with an implementation... no?
 
We need a 5.7/7 spec branch
I'd update the spec to include my changes, but we don't have a 7 spec
 
4:05 PM
@HassanAlthaf Have you found the solution?
 
@NikiC Mind if I bother you with AST questions while working on return types?
 
@VeeeneX yes.
 
Specifically, I'm not sure how to model the return type in the AST.
 
Guys pls wish me luck
 
Great
 
4:08 PM
I just did the variables assigning
I am gonna test it now
 
@ircmaxell if I want to fix the pdo tests, should I fork your fork?
 
@LeviMorrison I'd extend ast_decl nodes to have an extra child
and store it there
 
@PeeHaa it's a one bit change, I don't care about credit, feel free to not fork me if you like
 
@JoeWatkins piss artist doesn't count?
 
@ircmaxell awesome tnx
 
4:10 PM
mornings
 
@DaveRandom morning...
Don't tell me you have been working the entire day
(for once)
 
inorite
nearly pub o'clock
 
I like your way of thinking
....not sure that's english
 
Drinking does terrible things to my stomach. I don't think I can do it till I get my acid reflux fixed :(
 
Hahaha, I'm such a noob. I have no idea what I'm doing in this grammar language, especially not now with AST changes. When I ask someone for help and provide my code they're just gonna laugh :D
 
4:14 PM
The room 11 effect
 
In computer science, BNF (Backus Normal Form or Backus–Naur Form) is one of the two main notation techniques for context-free grammars, often used to describe the syntax of languages used in computing, such as computer programming languages, document formats, instruction sets and communication protocols; the other main technique for writing context-free grammars is the van Wijngaarden form. They are applied wherever exact descriptions of languages are needed: for instance, in official language specifications, in manuals, and in textbooks on programming language theory. Many extensions and variants...
 
@ircmaxell Oh no, I get BNF and EBNF; it's the yacc/bison bits I don't understand.
 
Actually I find that quite readable, although I'm absolutely positive that if I tried to modify anything it would explode and kill everyone
 
@LeviMorrison that's specified in the spec?
or in terms of converting the YACC to BNF?
 
I don't really know what the bracketed part means: variable { $$ = $1; } I understand that $1 is the first variable defined (coincidentally variable in this case) and the bracketed expression contains instructions to be executed... but that's about it.
 
4:18 PM
$$ is the result, $1 is the result of the first matched expression
 
function_return_type:
        /* empty */             {}
    |   ':' optional_type       { /* do something with $2 */ }
 
T_PUBLIC { $$ = ZEND_ACC_PUBLIC; }
that sets the result to public whenever public is found
 
Okay... but what uses $$?
Because I'll need to change that probably for this.
 
@LeviMorrison the one that referenced the call
non_empty_member_modifiers:
        member_modifier         { $$ = $1; }
    |   non_empty_member_modifiers member_modifier
            { $$ = zend_add_member_modifier($1, $2); }
so in that line $1 is $$ from the T_PUBLIC line above
 
Okay. So:
function_return_type:
        /* empty */             { $$ = 0; }
    |   ':' optional_type       { $$ = $2; }
And then here:
function_declaration_statement:
    function returns_ref T_STRING '(' parameter_list ')' backup_doc_comment function_return_type
    '{' inner_statement_list '}'
        { $$ = zend_ast_create_decl(ZEND_AST_FUNC_DECL, $2, $1, $7,
              zend_ast_get_str($3), $<ast>5, NULL, $<ast>9); }
;
 
4:21 PM
argh someone halp!!
I am stuck with defining vars!!
 
I need to modify zend_ast_create_decl most likely to accept a return type somehow.
 
I never knew that coding a parser would be so hard. :/
 
yup
 
And use $8, and change everything after 8 (oops).
 
who is PHP pro here?? :D
 
4:22 PM
almost everyone
 
Well a lot of us get paid to work with PHP. So most everyone.
 
ohk
can anyone help me?
I'm stuck
 
Not without a question...
 
No its a tiny thing
 
Becoming a little vampire-y
 
4:23 PM
display "I'm too cool";
display "I'm simply awesome";
var Something=Something I want;
display Something;
 
Also, this backup_doc_comment wasn't there in the old grammar that Joe used. It just appears to do some doccomment generation (for reflection maybe)?
 
The above language is called HassanSharp^^^
UnderDev
	public function storeVar($name, $content)
	{
		$memory = file_get_contents('memory.txt');
		$data = $name . '=' . $content;
		$memory = $memory . $data;
		file_put_contents('memory.txt', $memory);
	}
	public function getVar($name)
	{
		$name = implode('', $name);
		$foundVar = false;
		$memory = file_get_contents('memory.txt');
		$vars = explode(';', $memory);
		for($i = 0; $i < count($vars); $i++)
		{
			$var = explode('=', $vars[$i]);
			if($var['0'] == $name) {
				$foundVar = true;
				return $var['1'];
storeVar works
getVar dont work. ;/
 
weird
 
memory: Something=Something I want
 
@LeviMorrison yes, it backs up doc comments for reflection
 
4:24 PM
sum1 halp me!! l0l
 
btw, take care that optional_type is ... optional ^^
 
@NikiC I should probably put it after the return type, I guess? (I currently have the return type after it).
 
you will want to split it into type and optional_type
because return typehints need something after :
 
Yea, I am aware. I just hadn't modified that part yet.
 
@LeviMorrison yeah, after the return type would be good
could really be anywhere before the method body, but best to just keep it at the end there
 
4:27 PM
non_optional_type:
    |   T_ARRAY     { $$ = zend_ast_create_ex(ZEND_AST_TYPE, IS_ARRAY); }
    |   T_CALLABLE  { $$ = zend_ast_create_ex(ZEND_AST_TYPE, IS_CALLABLE); }
    |   name        { $$ = $1; }
;

optional_type:
        /* empty */         { $$ = NULL; }
    |   non_optional_type   { $$ = $1; }
;
^ That look good? (I want to make sure I get these first few right, so I can have confidence later)
Also, non_optional_type could really just be type, yes?
 
@LeviMorrison yes ^^
 
@LeviMorrison don't forget the :
 
@ircmaxell (I didn't; note that rule is for optional_type, not return_type)
Also, for a name do you think function_return_type or return_type is better?
As in:
function_return_type:
        /* empty */     { $$ = 0; }
    |   ':' type        { $$ = $2; }
 
Ahhh ok
so it would be | ':' non_optional_type
 
@LeviMorrison 0 should be NULL there
 
4:32 PM
Oh, the example I was looking at used 0. Thanks.
 
@LeviMorrison depends on whether it's a number of a poitner
0 would work either way, but NULL helps the compiler along (like, it would warn if you assign NULL to an integer)
 
My mongolian lamb arrived but without hoi-sin sauce. I am dissapoint :'(
 
Okay, time to test out that return type syntax is allowed... it just won't do anything yet :D
I assume the grammar regenerated as part of ./configure or maybe make?
@ircmaxell Are these types of declarations in any kind of order?
%type <ast> isset_variable
 
not sure, @NikiC would be better there
 
HassanSharp is that your own language?
 
4:48 PM
\o/ It accepted my type hint syntax.
Thanks for your help so far, guys.
 
:-)
 
@LeviMorrison nop, just random list
 
Thanks.
I'm looking at zend_ast_decl now and see this comment: /* Separate structure for function and class declaration, as they need extra information. */
 

« first day (1413 days earlier)      last day (3538 days later) »