« first day (3551 days earlier)      last day (1380 days later) » 
00:00 - 18:0018:00 - 00:00

12:38 AM
@Alesana shareable code? If not, are you continually opening the same file, or reusing an existing filehandle?
Also, docker?
 
 
2 hours later…
3:10 AM
Is it bad practice to create a Twig function that calls a repository, getting some rows from the database?
 
3:27 AM
@SalOrozco well usually you pass the rows to template render function so it's easier to track all reads from db i guess
Personally I wouldn't do that using template extension
 
@brzuchal yeah your right.
It's just a query that counts the number of blog posts.
I'll just pass it from the template render.
 
 
3 hours later…
6:24 AM
morns
 
\o
@IMSoP I made a list of candidates for macros but am not sure if I already didn't go wild cause it's easy to qualify huge part of standard library functions as macros if you take a compiler interaction with as their attribute
Given that and taking a look at Rusts macros it's possible to plan a few steps of introducing them:
1. add macros call syntax with minimum macros asset which operates on ast like `assert|isset|unset|empty`
2. introduce simple macros which are easy to alias from a functions `exit|die|halt`
3. introduce mini language similar to Rusts for defining user macros allowing to polyfill future macros which don't operate on ast and are jsut a simple aliases to functions which interact with compiler like `compact|extract|trace|dump`
 
7:05 AM
@bwoebi regarding your example of macro for query parameters escaping that could be done by passing an encaps_list like sql!("SELECT * FROM {$id}"); where the macro implementation decides how to interpolate encapsed vars, right? I think it's sufficient enough
 
7:43 AM
@NikiC I think I found a bug in the JIT that only occurs on Windows: github.com/sebastianbergmann/php-token-stream/issues/96 Please let me know if there is anything else I can do to help with this.
 
@SebastianBergmann Drop a link to that on bugs.php.net, so it doesn't get forgotten?
 
@NikiC Sure, will do. Just wanted to make sure 100% (I'm only 99.999% sure :-) that this is indeed a bug in PHP before I open a ticket.
 
The intersection of people in "works on Windows" and "is familiar with JIT" is probably not particularly large ... maybe @cmb can take a look?
@SebastianBergmann Difference in behavior between JIT and non-JIT should pretty much always be a bug :)
 
"Uncaught TypeError: Illegal offset type" with PHP 8.0-dev JIT on Windows ・ Scripting Engine problem ・ #79798
 
8:00 AM
Uncaught Error: Undefined constant 'T_DOUBLE_COLON' in /build/PHP-Parser-4.3.0/ ・ Compile Failure ・ #79799
 
@brzuchal technically you can pass anything as encaps vars… but does that make it nice?
 
@bwoebi well the exclamation mark says something weird happens so if you think about why $id is escaped underneath instead of a normal interpolation it's because it's used inside a magic macro call
 
@brzuchal the more explicit the magicness to the user is, the better
 
ofc with Rust like macros you'd be able to handle sql!(SELECT * FROM $id);
 
@NikiC Does match have to wait for JIT support to be merged?
 
8:08 AM
trying to hide the magic a bit behind a string is not that nice - and obviously has the unpleasant side effect of having to escaping double quotes within the string :-)
 
@bwoebi fair, does the rest of macro uses we discussed with @IMSoP seems legit?
 
8:35 AM
@brzuchal yes.
I'm anyway just arguing that macros should allow for the full power of them - use cases quite surely will find themselves
 
Great! I only want to hear from Rowan if he'd like to co-author with me that RFC and that we agree on some basic list of macros candidates.
Then I can drop recently added RFC since macros can provide language changes over that RFC regarding compiler halt and declares etc.
 
For example I can imagine lightweight FFI macros - like doing ffi!(some_ffi_func(&$bar)) takes the contents of $bar and passes a pointer to it to the "some_ffi_func" ffi function
 
@IluTov no
 
@NikiC Ok cool. I'll look at the remaining 2 discussions and then it should be good to merge :)
 
@brzuchal and on the topic of that ffi! - while & would be representable with ast, ffi!(some_ffi_func(*$bar))(dereferencing) wouldn't.
 
8:43 AM
Rusty macros use $ sigil as a variable prefix, this won't work for PHP
I don't know how it should be handled but I guess that could be provided in future improvements
 
@brzuchal why not? you just need to substitute exact matches immediately
 
One thing I'm not sure if going the Rusty way of macros with mini language for suctom macros then it's obvoius you wanna resolve the macros and see how they resolve. Given that how could macros like halt!; resolve?
With the ffi example you'd also want to be able to see how it resolves into what
 
@brzuchal A debugMacro!() macro would be probably great, which essentially does print "resolve!($macroContents)";
 
One thing about macros which I also like is that it could potentially free up some function names not for it's reuse but for optimised lookup on runtime since I believe those should be non namespaced symbols
IMO ideally would be to have as many macros as needed to write a short program without standard librarian functions, but I'm a weirdo :P
I mean kind of like with error/exception handling and autoload etc.
 
9:04 AM
@brzuchal An important question first… how do you load macros?
i.e. include/require are runtime statements
 
I guess first should be built in only till user defined one will be introduced at least
 
but macros are compile time
 
Well in Rust it's done by attributes
 
@brzuchal do you have a quick example at hand?
 
9:08 AM
@brzuchal Those are very old docs, it hasn't worked like that for a long time
 
okay, but that's not applicable to PHP in that form
 
@NikiC how do you import/export macros then? can you ref?
 
@brzuchal like all other symbols
 
so include "macros.php"; should load all macros into PHP and if there's anything inside in "macros.php" what is not a macro it should be executed after all macros definition read, right?
 
@brzuchal sure … but if you have include "macros.php"; myMacro!();
if you resolve macros natively at compile time… well, you haven't included macros.php yet then
 
9:11 AM
then we should turn include into include! :P
that sucks
<shrug.png>
I guess you'd need a macro loader then, but that sucks
or a macro which loads macros from specified destination
 
@brzuchal I think it would be sufficient to be able to do compile time includes which are compiled and executed before the current AST is compiled
so you could include e.g. the composer autoloader which then includes all registered macros or such
I have no idea how good or bad that is … but at least something solving the problem :-D
 
9:28 AM
The biggest issue is my C programming skills
 
@brzuchal first we need sound concepts :-)
 
ok, how could macro declaration look like? it should be similar to function declaration in PHP? and follow PHP syntax?
 
Other question … do we want to allow macros to emit code fragments, or shall the return value of each macro be a valid expression-AST in itself?
 
If we want macros like halt!, exit!, die! then there's no return value.
I guess emitting code fragments would be the easier path, right?
 
user13657604
9:43 AM
Hi
 
user13657604
@brzuchal
 
@brzuchal no.
 
cmb
@SebastianBergmann this might be related to pcov (which does not yet support PHP 8 officially). With a debug build, I'm hitting the unreachable assertion in zend_compare(), because the types of op1 and op2 are IS_CALLABLE.
 
@brzuchal the easier path would be if we could substitute the macro-AST parts during compilation by ASTs returned by the macro evaluation
 
9:59 AM
macro!(eval, {
    ($e:expr) => { eval((string) $e); }
});
 
@brzuchal I mean expression or statement to be precise
 
so things like that would be resolved into eval((stirng)$ast); right?
I said wrongt
 
yes
 
This could declare an eval macro which when used resolves into evaluating ast
 
or well, just ($e), not ($e: expr)
 
10:01 AM
you need to know what to parse upfront
macro!(foo, {
    ($f:expr) => { if ($f) echo "Foo!\n"; };
    ($($args:expr,*)* $l:literal) => {
        foreach ($args as $arg) {
            var_dump(eval!($arg));
        }
        echo "Literal: {$l}";
    };
});

foo!; // ERROR
foo!(true); // echo "Foo!\n"
foo!("Hello", 'World', SOME_Lit3ral);
actually there should be return in eval! macro declaration
and actually it should be a build in macro so we can get rid of eval as a function, right?
in last foo! invokation it could be foo!("Hello", upper('w') . 'orld', SOME_Lit3ral);
then you can use a literal I guess for the SQL example?
 
@brzuchal no, eval() has the capability to do runtime evaluation
 
@bwoebi gut it's the only way to evaluate some ast, right?
*but
 
some string.
@brzuchal yeah, you're right.
 
Wrong documented ・ Documentation problem ・ #79800
 
10:17 AM
@Jeeves We should hit #80000 bug on bugtrack till PHP 8.0 release, cause now it looks like we're close to 8.0 with #798... :D
Some macros won't be able to substitute I guess. For instance debug_zval_dump!($var) cause it's not possible to resolve into ast which doesn't impact refcount
I'd apply the same to exit!, die! and halt! - imo they could resolve into themselves only
like unresolvable ones
We also cannot resolve unset($var)
so we should emit code fragments in those cases and substitute for user-defined, so we're doing both
@bwoebi when you say emiting code fragments you mean emiting op codes, right?
 
10:38 AM
@brzuchal no, I mean partial fragments like foreach ($var as someMacro!()) where someMacro!() evaluates to $foo => $bar
i.e. unparsed actual code like in C macros
 
ah, ok, then nooooo
 
I see we're on the same page :-)
 
Great
It'd be possible to implement completely different gramma, using <?php plusplus!(string $foo = 'bar';);
macro which catches everything passed to it if only parentheses match
or if any specified delimiters
and then we introduce file scoped macros, <?plusplus!php string $foo = 'bar'; :P
 
11:18 AM
@brzuchal haha :-P
don't dream too much
 
that was just a joke
 
The only thing I'm unsure is if it'd be possible to parse anything what just match parentheses, and then parse for instance a custom arguments section behind it. I guess it won't be possible
\o
 
11:41 AM
is there any major problem with having two tables in a db with same data expect a different colum ?
 
11:52 AM
main[-1u]={1}; is a very special C program: codegolf.stackexchange.com/questions/69189/… ;-)
 
@cmb Is it possible for you to approve the sergeykleyman request, or tell him no, or tell him what needs to be changed?
@SebastianBergmann .....I am not going to look, but something something multidimensional arrays.....
 
@Danack these are code bombs, with multiple lines of code they produce hube binary files on compile time, one of shown examples produce 16TB binary
 
12:14 PM
@brzuchal no it won't, but what would you need it for?
I mean, you can like trivially declare ($($arg: expr), $($arg2: expr)) => $arg + $arg2
 
@bwoebi I thought it'd be possible to parse named arguments like for instance for trace!(limit: 1) macro but also for instance for sql!(SELECT * FROM users WHERE id=$id, compat: 'mariadb');
 
@brzuchal I understand what they are. I was commenting on what the effects of a program of size 16 GB ** 16 G might do.
 
and we may default $($arg) to expr
 
@Danack Ohhh, got it :D
@bwoebi How would you define a macro with named argument? it suppose to be arg2: true for instance? when invoking?
 
@brzuchal so, like $($arg:raw)(, compat: $(compat: literal))?
I'm not so sure about how the meta-language for macro input parsing shall work
 
12:22 PM
I miss out on r11 for 1 day and when i come back everything looks like jQuery!
 
@MarkR you missed the CSS bits
 
@bwoebi here's something about the matcher doc.rust-lang.org/reference/macro-ambiguity.html
 
!!rfcs
 
@brzuchal looks sound… but I have absolutely no idea how good that is in real settings :-D
 
12:34 PM
looks complex
 
@bwoebi do you have any idea why I'm getting different test output for MySQLi on release/non-debug builds?
 
@brzuchal I think any attempt to make such matching generally useful for most use cases without having to resort to custom token parsing is going to be sort of complex. But we can though accomodate for simple cases where we just translate a few passed (positional/named) args to the macro inputs, defaulting to exprs. then have a more complex matching which is like what Rust has - and as a third option raw token stream parsing.
i.e. ensure the simplest syntax can be just written as ($target, $limit = 1) => ...
with optional restrictions on what the allowed contents are, like ($target:identifier, $limit:integral_number = 1) => ...
as a second stage then the rust like matcher
 
@bwoebi this makes sense, for instnace ($assertion, $msg, $throw) => ... when used for declaring assert macro could be invoked as assert!(true, msg: 'error!'); or assert!(false, throw: new Exception('error'));
 
and the third stage could be literally just ($tokens:tokens) => { /* parse raw tokens here and emit an AST */ }
I.e. the central goal should be that the code the user writes does not have to look more complicated than it needs to be for the use case the syntax is covering
 
12:52 PM
Should parsed arguments be ast\Node objects like?
 
@brzuchal yes
 
So the eval!() should be able to execute ast\Node objects using callee context (scope and variables), right?
 
@brzuchal I don't get your point with the eval!()
 
macro!(assert, {
    ($assertion, $msg, $throw) => {
        if (false === eval!($assertion)) {
            $throw ? throw $throw : throw new AssertionException($msg ?? 'Default error: '. stringify!($assertion));
        }
    }
});
assert!(true === false, throw: new AssertionException('True is not false'));
 
that won't work like this
 
1:02 PM
Yeah, I should emit opcodes instead, right?
 
no
you need to distinguish between what are macro contents and what is the AST to be returned
I mean, the if (false == eval!($assertion)) needs to be evaluated at runtime
but the $throw ? ... : ternary needs to be evaluated in the macro here
 
Hmmm, if ($throw) return new TernaryNode($assertion, new ThrowNode($throw));
 
@brzuchal but that doesn't read nicely, try again :-P
My suggestion would be something around if! (false === eval!($assertion)) { throw! $throw ? $throw : new! AssertionException($msg ?? 'Default error: ' . stringify!($assertion); }
 
macro!(assert, {
    ($assertion, $msg, $throw) => {
        if (!assert_enabled()) return new EmptyStatementNode();
        return new TernaryNode(
            $assertion,
            new ThrowNode($throw ?? new NewNode(AssertionException::class, $msg ?? 'Default error msg'))
        );
    }
});
Ohhh I get your point
 
yeah, but is that readable? building the AST yourself
if you could just have a few built-in macros which translate to the AST 1:1
 
1:12 PM
we should add more parens or we're gonna struggle with precedence
 
It's not going to be easy to build that (I mean in C), but reading macros should be relatively easy.
I mean, once there are 20 ast nodes in a big nested construct, nobody is going to understand the macro at ease if reading it for the first time
 
macro!(assert, {
    ($assertion, $msg, $throw) => {
        if (!assert_enabled()) return;
        return if!(
            false === eval!($assertion),
            throw!(
                $throw ??
                new!(AssertionException($msg ?? 'Default error: ' . stringify!($assertion)))
            )
        );
    }
});
if! and throw! and new! produce an ast objects
but since macros can accept expressions this could be simplified
 
yeah something along these lines
> if (!assert_enabled()) return;
 
yes, produce no ast on production
 
a bare function call? Are we allowed to do function calls in macro definitions?
 
1:24 PM
that was a simplification here
was rather focusing on the second part
 
okay
 
Since if! is a macro and can get an expression it would be nice to pass an assertion directly as ast nodes, right?
 
@brzuchal yes
 
macro!(if, {
    ($cond, $then, $else) => { return new IfNode($cond, $then, $else); }
});
then if!(%$assertion, %$throw ?? throw!(new AssertionException(%$msg ?? 'Default error: ' . stringify!($assertion))));
I'm not sure if this is correct it hurt my eyes already
'%' expr - in this context passes value directly to the macro skipping parse
starts getting more weird with the %
maybe instead of it a run! macro, dunno
 
1:39 PM
Yeah, don't know. I think it would be best to actually start with just implementing some macros, simple ones and more complicated ones and then ask for a few examples what people do like, what alternative suggestions they have
Hard to decide on what syntaxes are easiest to work with with just a couple minimal examples
 
macro!(assert, {
    ($assertion, $msg, $throw) => {
        if (!assert_enabled()) return;
        $msg = $msg ?? 'Default error: ' . stringify!($assertion);
        $throw = $throw ?? new!(AssertionException, %$msg);
        rerturn if!(
            %$assertion,
            throw!(%$throw)
        );
    }
});
@bwoebi agree
there's one more thing Rowan noticed yesterday
in Swift there's a no-return return type
and I'm trying to figure out if that could work with macros
meaning not all macros should expand in expr mode, like halt!;
it should never be used like $foo = halt!;
in Swift there is no-return return type expressed by ! IIRC
 
also, we should allow for right-associative macros on statement level, which parse like T_IDENTIFIER '!' optional_parens_with_expr semicolon_or_block with optional_parens_with_expr: %empty | '(' token_stream_with_matching_parens ')'; semicolon_or_block: ';' | '{' token_stream_with_matching_curly_braces '}';
then we could actually do constructs like if! ($foo) { some_statement(); }
and only enforce parens for macro usage within expressions
 
@bwoebi I don't grasp, previously all macros had parens with args
I'd be lost in figuring out what runs in compile-time and what in runtime TBH
 
You might be right on that… needs to be not too subtle
but still subtle enough for feeling natural
 
I'm also unsure if macro declaration syntax like this follows macros themselves enough
 
1:51 PM
what do you mean?
 
in macro!(identitier, definition) the definition part is unknown to PHP syntax
but maybe it should be macros DSL
{ () => {} } would be the minimum empty macro definition
 
It needs to be a macros DSL (within macro!(...). Meaning, the contents of what's within the parens is just read as a raw token stream, and only then, if the macro impl wants the tokens pre-parsed as AST (e.g. literal or expr), it's actually parsed
 
Ok, what would be the next step then? Cause if people won't like it from the start it's gonna be a wasted time.
 
build a few examples
 
The feature is complex and can be huge with option to deliver it in partials
But I really like it
 
1:58 PM
A few simple ones illustrating the capabilities of syntax
with a bit of explanation
and a few more complex ones
 
Ok, so just examples of syntax
 
Syntax and then also more
 
I guess the assert one is a good start, right?
Got it everything on the gist I've placed here in the morning
 
Sort of. But I would not put the focus on replacing existing language constructs
But more on finding actual new usages for macros
You need to show what people need macros for, and that it's not too hard to build these macros
Don't give people the impression that it's designed as another way to solve existing things but a powerful tool on its own
 
> This is because in a macro, you can use interchangeable braces ({ and }), square brackets ([ and ]), and parentheses (( and )). Not only that, you can use them when calling the macro. You have probably already used the vec![] macro and the format!() macro, and we saw the lazy_static!{} macro in the last chapter.
In Rust it's possible to interchange braces, parens and brackets
But, well not all in one time... nvm
 
2:04 PM
We can do that as well, but not needed as a first step :-D
 
$vector = new \Ds\Vector();
$vector->push(1);
$vector->push(2);
return $vector;
how to change it into ast
with elements parametrized
 
@Danack Sorry I never saw your message. Thanks for the response though. I figured it out, it was a variable in a method that I didn't realize was loading all the users along with a team.
 
so I can use $vector = vec!(1, 2, 3, 4);
push method is void
I can pass all args into the ctor but that doesn't show much possibiliites from macros
 
!stmt $vector = new \Ds\Vector();
foreach ($args as $arg) {
    !stmt $vector->push(%$arg);
}
!stmt return $vector;
return $stmt;
maybe
the !stmt macro would take everything to the right, parse it as ast and substitute %$var by their contents
and append it to the magic $stmt variable
I mean stmt!, not !stmt :-D
 
medium.com/@phoomparin/… nice explanation of rust macros, sof tand easy
@bwoebi the issue is in different place
Where did the $stmt came from?
 
2:20 PM
from stmt! macro
 
It has to resolve to something assignable to $vector
so it should resolve into something like
$vector = (function(array $args) { $r = new \Ds\Vector(); $r->push(...$args); return $r; })(1, 2, 3, 4);
 
!stmt $vector = new \Ds\Vector();
foreach ($args as $arg) {
    !stmt $vector->push(%$arg);
}
!stmt return $vector;
return !scopeWrap $stmt;
and then $vector = vec!(1, 2, 3) is substituted to $vector = function() { $vector = new Ds\Vector; $vector->push(1); $vector->push(2); $vector->push(3); return $vector; }
with scopewrap! just being a way to do (function() { $stmtList })();
(bah I'm prefixing the ! all the time)
I think stmt! prefixing would be quite nice to distinguish to-ast-transformed code and actual macro-code
 
macro!(map, {
    {$($key:expr : $value:expr),*} => {
        return expr!(\array_combine, %$key, %$value);
    }
});
$map = map!{
    foo: 'bar',
    baz: 3 * 5
};
 
return expr!(\array_combine(%$key, %$value)); - then I agree
 
Great
I like the wrap scope, but am missing population to actually a $stmt, or is it that all statements produced in the scope of macro are wrapped into $stmt ?
 
2:35 PM
@brzuchal that was my idea, that !stmt here is pushing to an array $stmt
 
ok, how about for eg. append!($vector = new \Ds\Vector()); return emit!; ?
 
would be fine as well, but we need to be careful with the names
 
flush!; :D
the map macro is wrong, need to replace string literals into encapsed strings
 
2:50 PM
@bwoebi I'll try to think over that map, but need to rest now, my head explodes
a warp! could potentially return a (function() {})() instead of statements flush! which would be possible to use in statement context, not in expression context
 
God not again a proposal to cast objects to whatever primitive type you want
 
@Girgias problem?
 
@Tiffany Not really, it's just the nth time someone comes up with this proposal on internals and every single time it seems like people don't make any damn effort to look up prior discussions
 
@Girgias that's not a proposal to cast anything, but a macro which parses what you pass and returns an ast which substitutes macro call
 
@brzuchal I'm talking about the internals list
 
2:53 PM
Ah ok, OMG
I fear to look on it then
 
@Girgias
3
 
@Girgias "known unknown: I don't know the historical context, can someone look it up for me"
🙄
it looks like a faux RFC
 
Indeed :(
It looks like a shower thought
 
lol
 
I kinda want to make the r/phpshowerthought subreddit ...
 
2:58 PM
do it (I don't know if it's a good idea actually, I tend to always respond "do it" though)
 
Thing is, I don't even know what the tone of that would be, only sarcastic or actual shower thoughts
 
some variation of r/lolphp
 
there should be an automated response on behalf of internals saying something like please write an RFC and provide an implementation
 
lolphp seems to always be people who have no clue and just want to shit on the language tho :(
 
maybe not with the second one cause I'd fail always to get that message
 
3:01 PM
@brzuchal Meh, not sure about that, but something on how to look up externals or marc.info
 
@Girgias I've seen one internals developer commenting on posts a long time ago, but generally...yes...
@Girgias yes, that
 
@Tiffany Andrea sometimes comment, I also comment sometimes when I can be arsed to do so
 
btw. @brzuchal one use case for macros I had in mind … !async function foo($bla) { the method body } … which would essentially wrap the whole function in return \Amp\call(function() use ($bla) { the method body });
 
int!(new DateTime('now'));
 
If we support casting, it should probably be __toScalar and ignore that string is considered scalar (it's not, it has dimension just like an array...). The engine can take it from int|float|bool to whatever the cast was actually intended to be. This helps with consistency instead of having 3 separate casts.
 
3:04 PM
@bwoebi great
 
Another use case would be !defer doCleanup(); - to be executed after returning
 
macro!(ma_cast_to_int, {($expr) => return expr!((int)%expr->__toScalar())});
$int = ma_cast_to_int!(new DateTime('now'));
done, implemented
 
which could evaluate to $dummy = new class(function() { doCleanup(); }) { function __construct($cb) { $this->cb = $cb; } function __destruct() { $this->cb(); } };
 
@bwoebi defer!(doCleanup()) or with curly braces defer!{ doCleanup(); anotherCleanup(); };
 
yeah exactly
though I prefer just right-assoc without requiring parens
 
3:09 PM
yeah, but you should specify begin and end in matching group in macro declaration
that way we can parse blocks, statements, expressions identifiers, etc.
 
yes sure
 
possibly some rules wouldn't require open and end like macro!(say_my_name, {$name:ident => { echo "Var name is: {$name}\n"; }})
and then use: say_my_name! $foo; // "Var name is: foo"
 
well, when using right-assoc syntax without parens, it should parse up to the first ; or } (when }, after balancing {} pairs) found
 
but that's gonna be a complex parsing right?
 
why?
 
3:17 PM
cause you need to track if it started inside () and then terminate on matching ) or inside {} then terminate on matching ; or if used in a list foo(true, say_my_name! $foo, 1); on matching ,
consider this
defer! doCleanup(); moreCleanUp();
 
@brzuchal that's obviously two statements
I mean… that's code style
 
or if it's clear that it has to be taken into braces and macro has a match for block
 
It's your task to properly format your code so that it's obvious
 
defer! { doCleanup(); moreCleanUp(); };
isset! $foo;
unset! $bar; // it only accepts one then
 
3:25 PM
@SebastianBergmann Indeed interesting, many here would like to amend last syntax changes to short attributes
I guess
 
I see two ways: don't use @@ and go with #[] instead. Or use @@ after github.com/php/php-src/pull/5720 was merged. Assuming the latter will be merged.
 
I'd love to see #[] but probably no one agrees since the voting didn't choose it
 
@brzuchal Took 2nd, so 1st gets disqualified then I imagine it becomes the syntax.
 
@@ already caused one major issue, it's likely to cause more...
 
Ah, missed the third way: it stays <<>>.
 
3:28 PM
@MarkR Ambiguity?
 
@LeviMorrison Yeah ambiguity and the lack of a fixed closing tag makes it more likely to cause issues in the long-term IMO. Especially based on the number of places it can be used.
 
And another new RFC strict operators, what a day!
 
inb4 Nikita loses an RFC vote because it's being used to block @@ :P
 
3:34 PM
IMO, wiki.php.net/rfc/namespaced_names_as_token makes a lot of sense. Just means I need to once again deal with legacy code of mine in php-token-stream.
 
But then we might have @@atatattributes :/
 
I'm not a fan of @@. But that does not make me vote "No" on wiki.php.net/rfc/namespaced_names_as_token.
 
"[RFC] Are you sureeee you want @@? It's not too late to correct our mistakes before we're stuck with them for 20 years"
4
 
that's just being a sore loser :P
 
@MarkR You need to push it Today up for discussion to fit on time with voting
@MarkR can I use your sentence?
 
3:43 PM
@Tiffany I'm a software engineer... I don't care about democracy , I care about being right :P
 
4:15 PM
"Turns out this causes all kinds of technical problems we didn't realize/mention before" seems like an entirely valid reason to change our minds. The question is, who gets to make that call given that we're this close to deadline and we have no BDFL?
 
The people who have done the core work of maintaining.....which might still be hard to define but excludes most voters.
 
Could the release managers be empowered to decide what to do here? (Extend deadline for voting, revote after the deadline, just disqualify @@ and #[] wins by default, etc.)
 
Huh php.net/manual/en/function.levenshtein.php has a special unimplemented mode... welp let's refactor that garbage :)))))))
 
(FTR, I don't feel strongly enough about any of the syntaxes to have a secret agenda. I just want a good result with a process that people can accept in the end.)
 
@Crell I'd say let the RMs decide it, @Derick did that for the short_tags revote
 
4:18 PM
@SebastianBergmann I probably would...
 
@NikiC since you approved #5812, can you merge it? I want to rebase on php-src#master and open the typed class constants pull request.
 
@moliata I can do that for you, did you squash it?
 
@Girgias I haven't, isn't it possible for you to do a squash merge through GitHub?
If not, I can squash it and make a new PR.
 
@moliata Nope, because GitHub is a mirror: the project is hosted on git.php.net
 
4:22 PM
@Girgias Ah, I see, give me a few minutes.
 
@cmb Yeah, I think the FR should be to implement a new function instead of overloading the current one
 
cmb
levenshtein() is already overloaded; not sure if it's worth implementing the other variant
 
@Girgias squashed to a single commit (PR)
 
@cmb Thing is, by removing the 3rd param as string variant you can drop the overloading. I'll do a PR for that
@moliata Give me a couple of minutes to finish the thing I'm doing and I'll merge it :)
 
@Girgias yeah, it's okay, thanks ;)
 
cmb
4:27 PM
@Girgias there are 3 overloads; only 1 is not implemented (and could be removed)
 
@cmb I've got the code in front of me and yes, but the 2 and 5 variant are the same just the 2 one has default values, and I'm not sure there is an interest in not allowing the user to change only some of the arguments and let the others to be defaults
 
cmb
ah, yep, makes sense to use regular default params then :) (docs could probably adjusted right away)
 
@SebastianBergmann It depends on how strongly you feel against the @@…
 
4:43 PM
 
@Derick It's called git add -A -f or something
 
Yeah, but it's a bug report for PHP 7.2.0-dev
saying that some changes in PHP hadn't happened yet...
well, duh.
 
5:05 PM
Morning~
@DaveRandom Note: not a good morning. ^
 
@StatikStasis that sounds ominous
 
@moliata Welp Nikita beat me to it :p
 
@Girgias I know, just opened the typed class constants PR ;)
 
@cmb github.com/php/php-src/pull/5816 PR for sanity :D
 
5:21 PM
@IluTov wasn't the discussion of dropping vim folding been dropped itself?
 
@moliata Not sure what was decided but my impression was that everybody wants to get rid of them but we just haven't decided on how to do it (everything at once or just remove it from the code you're working on).
 
@IluTov I'll remove it then, I'm not even using vim lol
added those foldings for consistency with other methods
 
Well only one person was complaining about the removal of them :|
 
@Girgias so should I leave 'em? ;D i'm confused
 
Drop them, if he really want's them he'll add them back
Most of us want to get rid of them
 
5:29 PM
also should I use K&R or 1TBS style brace placement? Some functions do it one way, other functions do it the other way
 
Erf, no idea what correspond to what tbh, I think we use K&R? But the code of PHP is pretty vast and was written by a bazillion people, also extensions are another beast
Great the JIT broke an Intl test
 
@moliata { goes on the next line after a function declaration, and on the same line for language constructs (like if)
 
@Derick @Girgias I'm referring to C code :)
 
Yes, I know.
 
@moliata Yes we know
 
5:44 PM
Oh okay, you wrote PHP, so I confused myself.
 
"code of PHP"
 
:) ahh, I can't read well, sorry
 
cmb
5:57 PM
@Derick built on May 20 2020 23:46:30!
 
Yeah.. why would you build 7.2.0-dev on that day?!
 
00:00 - 18:0018:00 - 00:00

« first day (3551 days earlier)      last day (1380 days later) »