« first day (3501 days earlier)      last day (1447 days later) » 

12:10 AM
Yeah, I just saw that zend_ast_create() is variadic, and didn't realize C had that.
Well, this is interesting. Compilation did NOT fail. :-) All the tests did, of course.
But the tests do segfault, so... I guess that's something?
 
12:24 AM
segfaults are never a good thing
 
 
2 hours later…
2:00 AM
no info for new users as to how to post questions to community forum ・ Translation problem ・ #79608
 
 
1 hour later…
3:21 AM
@Jeeves Someone is lost.
 
 
6 hours later…
9:01 AM
@Sarke we're all lost. And I agree with them, that the front page of the manual should have links to sites that cater for noobs. but yeah.....that's not a bug.
 
 
2 hours later…
10:32 AM
Anyone want to place bets on how extreme the drama gets on internals about those syntax trivialities?
 
@Danack re: guard stmt?
 
one of them. The drama is going to kick off when the laravel community realises that they don't have an official vote on RFCs despite _laravel being the only reason why PHP is popular again.*
 
wtf?
 
Is that about the tweet about Ruby having a proposal to add syntax to check for is a timed signed ID is valid?
 
No. Taylor Otwell just said he really wants one of them.
 
10:44 AM
:|
Well I disagree :)
 
@Girgias WHY ARE YOU BEING SO HORRIBLE AND HOLDING PHP BAKC GIGIAS?!
 
@Danack SORRY, I'M HERE TO DESTROY PHP
 
131
you can't destroy PHP. PHP destroys you when your boss tells you to fix some legacy code :^)
 
Being told that as I tried to get rid of short tags is quite funny I find
 
11:07 AM
I'm soon going to have to build/commission a web admin front end to something I'm building, but that's surely going to be in something light like Slim, and certainly not the magic soup that's Laravel.
 
11:53 AM
@Derick I have strong feelings about how to organise slim apps for a nice api writing experience and how to use react for the frontend, without having react take over the whole project. maybe have a chat closer to when you've figured out what needs building?
 
12:05 PM
Sure, happy to chat then. However, React? :-)
 
@Derick yeah. It's really cool, so long as you limit the scope of it, and use it for widgets, rather than rendering pages.
aka don't use it like how 95% of people are using it.
 
If it doesn't work with JavaScript off, I don't want it :-þ
 
12:26 PM
Morgens
 
cmb
@Derick <3
 
@Derick imo, for some things, the usability gains from javascript outweigh the downsides of it either not working with JS off, or make duplicating it with a non-JS version, be worth doing.
Also note, that I am hip, and 'down' with 'it'.
 
12:45 PM
@Sjon 3v4l is returning errors :(
> {"meta": {"source": "3v4l.org - online PHP shell","author": "Sjon Hortensius <root@3v4l.org>"},"exception":{"message": "Unexpected error 57014 from database","code": 500,"name": "Basic_DatabaseQueryException"}}
 
3v4l.org site is down
 
@Derick screen readers? Blind users? Though I think most screen readers support JS in some form. I've been out of the accessibility loop for awhile.
 
1:03 PM
I can't use a mouse really.
So I really very much need everything keyboard accessible
 
Other than people quite often do dumb stuff, designing their own controls rather than using the builtin ones, that shouldn't exclude all JS? aka, I pretty much use JS for updating info on a page, not for making a new UI.
 
I also have a hard line against using any JS hosted on a 3rd party site.....except stripe on the stripe payment page, where it is the only code running.
 
bugs.php.net/bug.php?id=68254 has anyone tried tackling this bug? Thinking of doing it maybe today or tomorrow. (TL;DR: the page for prepared statements doesn't document any of the potential negative behavior)
 
1:19 PM
It's ramblings of lester originally so I doubt anybody feels like looking at it
@Danack Not sure you are looking for this, but the conversion of dots to underscores in request fields?
 
@PeeHaa yes, that's exactly the type of thing that I'd like to document.
do you happen to have a link to a bug report for it?
@Derick this is an example of how I use react - phpimagick.com/Tutorial/eyeColorResolution would welcome testing of that widget by a person used to not using a mouse.
 
Let me check
 
@Crell Yeah this is where the debugger really comes in handy :)
 
@Danack Which widget should I test?
 
and yes I'm terrible at CSS and don't even care about it that much.
 
1:29 PM
oh right, yeah, that works fine
tabbing about is a bit annoying, but doable
 
yeah, but would be the same tabbing for html form version.
 
Not even this man know about CSS gvanrossum.github.io
;)
 
but not the "oh you've pressed enter, lets recreate the whole page from scratch so you have to navigate back to the form to change a value" that some react apps do.
 
Sorry Dan. It's really hard to find in bugs. I am probably searching wrong. I am sure there are bugs about it
@Danack s/some/most/
 
np.
 
1:32 PM
try searching for "imagemap" in the tracker
 
Is that for me @Derick?
 
48597 is one
 
Nice <3
 
oh, these are actually about a broken name, but yeah...
 
php.net/manual/en/language.variables.external.php#123508 I think the first useful comment I have seen for maybe 14 years.
 
cmb
1:41 PM
Docs proper: 'Dots and spaces in variable names are converted to underscores. For example <input name="a.b" /> becomes $_REQUEST["a_b"].'
 
<input name="a[b" /> becomes $_REQUEST["a_b"].
<input name="a]b" /> becomes $_REQUEST["a]b"].
 
for context, I'm documenting things like that, so that all of the problems around the current sapi can be seen at once. So if anyone has similar ones please let me know: github.com/Danack/RfcCodex/blob/master/better_web_sapi.md
 
@ircmaxell The reason is/was register globals.
 
oooh regarding the truncation. post_max_size just clears all data when overflowing
 
@Derick but why not both...
 
1:49 PM
Trying to trap that involves comparing the request length
@Danack ^
 
@ircmaxell and when you do a[b] it suddenly becomes an array with key b … which is a classic way to trigger warnings on code without abstracted request layers
 
@ircmaxell Because PHP :-)
 
auto_append_file + auto_prepend_file - has anyone seen a sane use-case for them in the past 10 years?
 
@Danack adding a sane error handler to a legacy codebase
 
@bwoebi fair enough. but any cases for new code?
 
2:02 PM
@Danack not that I could think of - in new code you just add one more file to your composer autoloader
which shall be always included
 
2:22 PM
I used auto_prepend the other day
tests/profiler/bug01589.phpt:auto_prepend_file=tests/profiler/bug01589-prepend.inc
 
3:18 PM
I would so want to reply to this (twitter.com/taylorotwell/status/1261975072245514240) "It's only amateurs that don't use Xdebug", but that probably is not wise.
 
I'm still looking forward to replaying, that would solve 80% of my problems with debugging straight off.
 
yeah, I would love to work on that. So many other things to do though :-/
You think it'd be more useful (for me to work on, and make some ££) than easier debug connections?
 
What do the debug connections offer?
The cloud based debug protocol you've been working on?
 
yeah
e.g. no more messing about with docker and networking, etc.
it's sortof working ,but no idea if it's beta quality ready...
 
Is that going out to an external network?
Personally, while I find setting up the remote connect-back a complete PITA to get right, especially with all the mappings and such required by PHPstorm, it's manageable. But being able to take a request, and play it back potentially a hundred times, free of any other requests, that would be incredible.... as it would be if I could install a fallback server on the cloud that had failed requests re-routed to it that always dumped a fully replayable trace.
 
3:37 PM
yes, it would go out to an external network - hence me adding SSL to the protocol too
 
How about end-to-end encryption?
 
yes, that's the next step
but that needs protocol level updates, which IDEs are going to need to speak too
and I've little control over them of course
 
Sounds like a job for a client-side applet that just acts as a proxy endpoint IMO. So the IDE etc has no idea it's even remote
 
yes, that's what I have written, but am still debugging. Xdebug through cloud to my own (slightly modified) debugging client already "works".
but I would like the IDE to support it directly, so that people don't have to run yet another tool (that proxy)
 
Whats going on?
 
3:44 PM
Dè tha dol? Chan eil mòran.
 
True enough, although I'd be 100% fine with running something as a sidecar. As long as I can connect to it rather than it trying to connect to me.
I find a portmap a heck of a lot easier than trying to connect out from inside the docker network back to my local machine
 
yup
 
I'm attempting to update a forked repo, I've cloned my fork locally, and added the other remote as upstream but when I try doing git pull upstream/master, I get the error message fatal: 'upstream/master' does not appear to be a git repository fatal: Could not read from remote repository. gist of what I've tried
 
no /
git pull upsteam master
 
doh, thanks
 
3:52 PM
yeah, git isn't always ... the same
that was a well prepared question though :-)
 
4:03 PM
Question... does php-src have an implementation of something like a generic circular buffer already?
 
I don't think so
 
OK, thanks.
Does it have a function for error reporting which is signal-handler safe?
 
@LeviMorrison I'm not getting a SIGSEGV on Ubuntu with opcache.jit_buffer_size=16M. But I'm using a build from last week before you rebased so I haven't tried an updated build yet.
 
(No buffering, etc... just sends everything directly out using raw syscalls)
 
sammyk:~/Code/Sandbox $ phpdbg -p* tmp.php
function name: (null)
L1-5 {main}() /home/sammyk/Code/Sandbox/tmp.php - 0x7fdac6463380 + 4 ops
 L3    #0     INIT_FCALL<1>           96                   "var_dump"
 L3    #1     SEND_VAL                "hello"              1
 L3    #2     DO_ICALL
 L5    #3     RETURN<-1>              1
[Script ended normally]
 
4:07 PM
@SammyK You sure you have opcache fully enabled?
Something like -d opcache.enable_cli=1 -d opcache.protect_memory=1 -d opcache.jit_buffer_size=16M -d zend_extension=$PWD/modules/opcache.so
 
opcache.enable_cli=1 yes, opcache.protect_memory=1 no - lemme try protect mem...
Yeah, even with opcache.protect_memory=1, still no SIGSEGV.
I'll update the build from the last rebase and see if I hit it...
 
Well, CI from 2days ago (before rebase) had massive failures: travis-ci.org/github/php/php-src/builds/687532118.
So it can't just be latest rebase :)
BTW, I got those specific -d flags from the test runs: travis-ci.org/github/php/php-src/jobs/687871147#L2202
 
@LeviMorrison Special request: can we not squash until we're closer to merging? That'll make it easier to pinpoint the changes you've made so I can more easily update ext/observer. :)
 
4:25 PM
Good morning!
 
Madainn mhath à Chrell!
 
De do, dee do do.
 
@LeviMorrison Did you remove return_value? The last build had it. github.com/SammyK/php-src/commit/…
@Crell 0/
 
\o
 
o/
 
4:27 PM
@SammyK I fear a rebase went a-poorly :'(
All I did was rebase master, so I bet I'm just missing a commit.
 
@LeviMorrison Haha! I'm actually already up and running again.
 
@IluTov Are you around at all?
 
Yeah, that's probably what's missing
 
I started getting suspicious because I haven't squashed in a while.
I think that's all that's missing, anyway.
You want to do the honors since I failed the last one? ahaha
 
4:30 PM
Fingers crossed! :D
Haha sure - I'll just cherry pick it
 
/cc @beberlei ^
 
We're back in business: github.com/php/php-src/compare/…
 
Thanks.
 
Np :)
 
zend_execute.obj : error LNK2001: unresolved external symbol zend_instrument_fcall_install
zend_execute_API.obj : error LNK2001: unresolved external symbol zend_instrument_fcall_install
main.obj : error LNK2001: unresolved external symbol zend_instrument_init
main.obj : error LNK2001: unresolved external symbol zend_instrument_shutdown
C:\obj\Release\php8.dll : fatal error LNK1120: 3 unresolved externals
^ Windows failure.
I assume we need to update Window's equivalent of configure.ac.
 
4:46 PM
Yeah, we just added it to configure.ac.
 
I think the file is win32/build/config.w32
 
I'm guessing we need to add it here: github.com/php/php-src/blob/master/win32/build/config.w32 but I'm not sure
Haha!
Nice.
 
4:58 PM
@LeviMorrison Ok, now I'm getting the SIGSEGV.
 
@SammyK Only with JIT on, right?
 
Yeah. With opcache.jit_buffer_size=16M. If I remove that there's no SIGSEGV.
 
I added a cache && to the if conditions in execute_internal; re-running locally with JIT to see if anything else turns up.
Still some failures but at least some tests pass now lol
 
That's a good sign :)
 
5:21 PM
Hi folks. So, I have a branch wherein I've made some changes. They are causing a segfault in my tests. This is not surprising as I'm not done making changes, but how can I determine if that's because I goofed somewhere or if it's just because I'm not done?
 
5:35 PM
@Crell I'll be around later, maybe in an hour or two
 
:thumbs up emoji:
 
6:04 PM
Will we ever see data-oriented design versus OOP in PHP?
 
Define data oriented design?
 
My understanding of the paradigm is too little to describe it intellectually, tbh. I've just been reading a few articles about this approach and how it is supposed to be more efficient. Just asking of those smarter than myself. There is one video out there called "OOP is dead, long live data-oriented design."
One section of Wikipedia states "Although OOP does seem to "organise code around data", the practice is quite different. OOP is actually about organising source code around data types rather than physically grouping individual fields and arrays in an efficient format for access by specific functions."
150
Q: What is data oriented design?

ryeguyI was reading this article, and this guy goes on talking about how everyone can greatly benefit from mixing in data oriented design with OOP. He doesn't show any code samples, however. I googled this and couldn't find any real information as to what this is, let alone any code samples. Is anyone...

 
Based on the first response there, I think the answer is "PHP is so far from the CPU cache that most devs won't be able to optimize that way, even if they wanted to."
 
I see. That answers it then. My main question is whether this is a random fad or a significant shift from OOP as OOP was from Procedural.
 
The biggest shift I've seen (in my entirely amateur understanding and study) is not from OOP to anything per se; it's from struct/object as the level of encapsulation to package/module as the level of encapsulation.
 
6:17 PM
Functional programming, though I don't think it has overtaken OOP
 
You can do object-y things in Go or Rust, even if the syntax doesn't look like Java/PHP. But the access control is at the package level, not the object level. And I've seen very good arguments that the package is simply a superior level to do that kind of access restriction.
@Tiffany I foresee functional programming becoming more and more an influence in PHP, although not entirely displacing OOP anytime soon. In fact I'm working to make that happen. :-) (cf, the book I just published.)
And the RFCs I'm working on.
 
Interesting
 
Remember, an object is just a closure with funny syntax. Or, a product type with some short-hand for privileged closures.
Related: Anyone know if it's bad form to post a link/announcement of a new book on r/php?
 
What's your opinion on DDD, @Crell?
(domain-driven design)
 
A good mental model, but like any good mental model don't let it completely rule your life. And depending on the framework you're using it may be prohibitively hard to fully embrace.
 
6:24 PM
Makes sense
 
Its most important take-away is using the same set of nouns for the user, developer, and customer to avoid confusion and thus bugs. Which... Fred Brooks said decades earlier.
 
@Crell yes, but not the data caches. let me try and find a link that goes into a lot of depth...
 
I do think that PHP needs much, much stronger data modeling capability. The more I learn, the more I envy Rust and Haskell for their ability to make business logic errors unrepresentable in the type system.
But doing that in an interpreted language is, um, hard.
 
well. apparently I had the same problem a while back:
Oct 31 '13 at 20:11, by Danack
I've been trying to find decent links on data-oriented design...but they all the usefule ones seem to have been replaced by how to generate more clicks, rather than useful programming info.
and the links are even more gone.
 
lol
 
6:38 PM
okay, so. There are actual subtle important differences in how systems that are data oriented work that are not obvious, that I only just understood when I read them and now time has passed.......but,
For games like world of warcraft, if you try to make all your objects be objects you have a couple of different problems that are super hard to overcome. First all of your objects get massively complicated and second any function you want to call has basically zero cache hits.
 
I'm writing code and am unsure whether I want to just start over…
		$dateinterval = new DateInterval;
		$dateinterval->{["y", "m", "d", "h", "i", "s"][$intervalIdx]} = $interval;
 
wat?
 
Both of those can be avoid by basically not using OO, but instead using very simple types, and being able to tie those to entity IDs really loosely. the full details of how to do that well I'm not going to be able to recall.
 
I'm parsing an interval expression in form 0 0 0 1 2 0 where the numbers are years, months, days, hours minutes and seconds… And I'm quite unsure whether I'm just trying to be too clever with that
 
But it allows you to do your processing in a stream of just the relevant data, rather than touching every object in the world at random.
 
6:43 PM
So, structuring your data so that you can use CPU vector instructions rather than a for loop in your own code, essentially.
Not really something most PHP applications care about, or can even take advantage of.
 
@Crell I generally agree on that. I really wish for early runtime assertions occurring at the exact moment where an invalid value is assigned to something not expecting it.
And yes, the typesystem should represent it
available for static analysis to find it … and obviously at runtime.
 
I don't think it's possible for PHP to go as far as Haskell/Rust, but I do feel like there's more that can be done.
Enums are an obvious example. Generics another.
 
@Crell Why is it not?
 
Much weaker compile time. That pushes any checks to runtime when they're more expensive. Plus, Rust relies on its immutable and memory checked syntax to allow for zero-cost abstractions. PHP can't.
Just look at how much trouble it is to get Generics in a non-sucky way.
 
@Crell it pushes the checks to runtime, yes. But in an ideal world (regarding internals of PHP, not the PHP code executed), you should be able to elide most checks.
But yeah, that's mostly a pipe dream (for now)
 
6:56 PM
That was one of the proposals for Generics; make it a static analysis check only and do nothing at runtime. I don't know how I feel about that.
 
@Crell I'm not suggesting only. I'm suggesting both.
 
Then it's not elided at runtime...?
 
elide what you can, what you cannot shall still be checked
 
My thought was to do what Rust does and simply generate a subclass that has the types filled in. Which could be done in advance rather than just-in-time if the code is preloaded.
Lunch time, BBL.
 
@Derick Is there any particular reason DatePeriod is Traversable, but not exposing Iterator interface? I've ended wrapping it in a foreach yield-loop to iterate it incrementally…
 
Wes
7:11 PM
Nov 18 '18 at 4:53, by Wes
@NikiC @bwoebi how feasible it is to have all traversable's actually implementing one of iterator or iteratoraggregate? they don't have to actually use the methods all the time, like foreach($traversable as $a => $b){} can continue to work like it does currently, with no actual method calls
still would like to see that happening
 
@Crell I'm here if you have any questions :)
 
ah right…
 
@Crell Not sure this is the right approach for PHP. I don't think we'd greatly benefit from generating different classes for each generic variation. We need the type information for reflection anyway and we'd need to allow dynamic generation of these classes because PHP is dynamic. I think we're better off just storing the generic type parameter on the object itself.
 
@IluTov yep, Nikita was looking at that experiment shortly, but it would just lead to far too many classes
 
7:56 PM
Ah, rats.
@IluTov I've a call now, but I'll be back in ~2-2.5 hours, I hope. :-)
 
@Crell Oh, that'll probably be too late for me :) (it's 10pm here)
 
Argh! Figures.
 
Wes
@NikiC i should really follow internals more :D
@NikiC InternalClassIterator, BuiltinClassIterator, EngineClassIterator
 
I made a PoC extension for arena-allocated objects in a linked list. github.com/SammyK/cereal The benchmarks aren't that impressive but arena allocation does seem to speed things up a bit. Any thoughts or suggestions? :)
/cc @LeviMorrison
 
8:27 PM
He is right, right?
 
I think it depends on consensus if it's too similar or not
 
I understand the rule. Something that is generally undesirable shouldn't have to be voted on every few months. It does however discourage revising RFCs that are generally desirable but have been declined due to specific details that weren't agreed upon.
> While it's impossible to put clear definitions on what constitutes 'substantial' changes, they should be material enough so that they'll significantly affect the outcome of another vote.
Which is also a little silly, because you won't know if it significantly affects the outcome of the vote before people actually vote...
@GabrielCaruso But yes. He didn't say it must be postponed. He said it should be evaluated whether enough changes were made. I think that's fair.
 
8:42 PM
I think that rule should be ammended that if it's a flat rejection (2/3 No votes) then it shouldn't be brought up again for 6months but if it's a 50/50 ish vote then it should be up for debate sooner
 
@Girgias The RFC contained a feedback poll. Nobody has checked "Not interested". wiki.php.net/rfc/match_expression
 
@SammyK What do you have in mind for using it with?
 
Warning in session_create_id Example #1 ・ Documentation problem ・ #79609
 
I think the match RFC is a bit of an exception as, IMHO, you did try to rush it through by opening a vote without giving any notice (which is not explicitly stated so understandable) but yeah it's more as a better general rule, because even something getting 61% favourable votes needs to go through a 6 month cool period but that doesn't make that much sense IMHO
 
@SammyK At first I thought you were comparing an arena against a linked-list, but it's using a linked-list structure for both arena vs freestanding alloc. The arena will avoid some fragmentation (good) and probably have a minor CPU boost (I think you are saying that you are seeing it), but the biggest advantage would come from tree-like structures where traversal is complicated; in the arena you can just linearly dtor the whole thing without traversing a structure and free it in one go.
 
8:58 PM
@Girgias The current RFC process is really bad at giving you an idea of how many people hold which position. Of course I was hoping that the RFC passes but if it didn't I'd at least know what people think. It was a bad decision in hindsight but that was my reasoning at the time. Note that I also didn't know of this chat at the time.
 
@IluTov Hey same boat, didn't know about here when I did short tags, and I agree with you that the RFC process has issues, but I do like it in the sense that anybody can just create one and see something added to the language.
I think after feature freeze I'll try to have some thoughts and see what could be done to improve it
 
@Girgias I've got no list, except for the list of PRs that are labeled as "Warning promotion"
 
@MátéKocsis Welp, I should have done that to know which ones I went through :|
 
9:19 PM
@Girgias That'd be great! Dan is working on some stuff, he might be interested in suggestions :)
 
yeah, internals is quite a bad medium to properly gather feedback if something is not generally unwanted
for discussing details you need to have a chat with somebody
mails (or even github issues) just don't solve that
 
I must say as I'm going through a bunch of extensions to try to fix [-Wundef] compiler warnings I'm finding loads of dead code
 
@bwoebi I agree. Even worse is that most voting people currently don't partake in the discussion at all.
@Girgias PRs with only deletions are the best PRs.
 
@IluTov Well it's mostly that the code is meant to only be executed during "debuging" but the macro was not changed to it always does the checking lol
 
@Girgias Oh I see :)
 
9:31 PM
Kinda like a related issue as TSRM_ASSERT
 
9:48 PM
@LeviMorrison Yeah, the dtor part is faster and simpler. It was just a PoC to see if an arena would speed things up and if so, how much. Now I know. :D But I think the idea can be expanded on when it comes to serialization. I'm thinking of a separate arena that acts as a sort of serialization buffer that is written to as properties in the object are written. Like msgpack serialization on the fly. Then you can just use the buffer directly to send it over the wire or what not.
Still just loose ideas, but probably something I might try with it next. :)
 
10:10 PM
@SammyK Using one arena per trace sounds like a good idea; any finished spans can be serialized into an intermediate format like the dd-trace-shared Rust structs using the arena allocator.
Except a few spans still get written to after finishing -- these integrations should be modified (hello Guzzle).
 
@IluTov My meeting is done. Are you passing out?
 
10:48 PM
@Crell yeah, but the same thing applies for things like databases. If you can only access things like "who needs to have a reminder sent about something important" by iterating over users, and your code is written in full OO style, and you need to read the whole user data from the DB to run that code, it can scale really poorly. But if your data/code is written more around individual snippets of data, it's much less of a problem.
As I said, I really wish I had the missing links to explain it in depth.
 
"ORM is the vietnam of computer science" :-)
 
there will be a blog post somewhere that an architecture that streams events/messages that need to be processed is quite similar to a data oriented design.....
 
11:07 PM
@SammyK Arena allocators are a lot simpler for certain things too -- would be helpful to create a ddtrace_arena that is PHP 5 and 7 compat (that is basically a re-implementation of zend_arena).
 
11:31 PM
@bwoebi No reason that I can remember, sorry.
 
11:49 PM
@IluTov There is a reason why most things in life are usually first discussed within small subgroups… And though… I often just say nothing to not repeat what others already have said… to avoid repetition - which makes it hard to distiguish where the silent majority is behind.
 

« first day (3501 days earlier)      last day (1447 days later) »