« first day (3420 days earlier)      last day (1750 days later) » 

00:13
@NikiC that _bad_state_ex() hack, wat
I'm not 100% sure what the hack is here. Basically, it's enforcing that the constructor is called, right?
@LeviMorrison I did not look deeply into it, just saw the commit on php-cvs, but if thats the case it should be an easy fix as most other objects save their state in the object struct, like ext/sqlite3 for example
01:04
@MátéKocsis You'll be fine! :-)
01:41
@IMSoP WSL works quite well, only thing you'll get as failing tests are Linux sockets/permission related tests
At least on WSL1
02:23
@DaveRandom ping
@MátéKocsis practice in the mirror, take a few deep breaths :)
@MátéKocsis alternatively, if you're stressed, try progressive muscle relaxation
Something I've been taught in therapy to help with anxiety, no prescription drugs necessary :)
 
4 hours later…
06:00
morning
06:11
I like the recent RFC about the tokens as objects and was wonddering if similar approach could be adopted to debug_backtrace() with returning an interator instead of an array. The iterator itself could return objects which share common interface for eg. TraceFrame the same could be applied for Exception::getTrace and there could be some predefined specialized classes like EvalFrame, RequireFrame, IncludeFrame, RequireOnceFrame, IncludeOnceFrame...
The iterator itself could create objects on read without a need to rewind all and populate all trace if not needed
Looking at Symfony source code you can see many places where debug_backtrace() is called but only some chunk of the real trace is used or even more only for eg. file names. Which in current approach requires to populate all the data from zend_execute_data but as objects these could populate data on demand when actually reading for eg. filename.
Specialized classes could be extended to FunctionCallFrame and MethodCallFrame. Dunno if more is needed, probably not.
Any thoughts?
 
2 hours later…
07:53
What a silence here today :/
cmb
cmb
\o
08:24
0/
08:41
\o
08:56
Madainn mhath!
o/ morning
@brzuchal I like that approach with debug_backtrace(), I did a similar thing for a common set of functionality I had many years ago and even integrated it with Reflection. Being able to skip some frame can be essential for readability as it shows all the way down to where the debug_backtrace() is called (so multiple if triggered from a set_error_handler() callback). I would all in all be very happy for any improvement to that area to allow removing boilerplate code
@Kalle Cool, I agree there is a lot of boilerplate code when dealing with debug_backtrace() frames, the same goes for Exception::getTrace() cause the output there is the same
09:11
Yeah it even uses the same code internally. The only thing I could see as a potential issue is the DEBUG_BACKTRACE_PROVIDE_OBJECT option (if the intend would be to replace the old functionality in long term)
Going further some may think of introducing magic variable $arguments handled like the getThis() which could be an ArrayAccess like object with ::getTrace() - similar approach is used in JavaScript where arguments is an object with callee available in that, given that no additional function might be needed,
Treat it like a loose thoughts
I don't think Exception::getTrace() populates that internally (but I could be wrong), but it will increase the refcount
Hi, for everyone who use Symfony, I invite to the chat chat.stackoverflow.com/rooms/208543/symfony.
if anyone looks into how backtraces work on exceptions, perhaps they could tackle my long-standing bug-bear that they increase refcount on any object that's been passed anywhere in the stack (because they capture all arguments)
^ That is exactly the issue with provide_object
09:22
it messes up RAII patterns, because destructors might not be called until the exception is handled and destroyed
it also prevents making exceptions serializable, because you can't know if one of those objects is unserializable
I thought to do not extract arguments from zend_execute_data unless someone asks for it explicitly, that's where frame objects can be created with specific zend_execute_data and provide for eg. arguments only when asked through the method like Frame::getArguments() or something like that
but particularly with an exception, isn't that too late?
didn't go that far yet
@IMSoP zend.exception_ignore_args=1
@NikiC oh, cool!
I either didn't see that being introduced, or completely forgot
09:40
On the topic of exceptions, and on the theme of debug messages, can I add a new method to Exception for getDebugMessage and have it do:

[Exception] [Message] at [file]:[line] (Previously: ...)

I seem to use that pattern a lot. Because it frustrates the holy hell out of me that the stack trace doesn't include where the exception is actually thrown. (I do appreciate the error itself is not on a new stack frame)
(Basically just add a method to return the top line of __toString?) ... or am I missing something entirely obvious
10:10
@NikiC That setting already caused bug reports for Xdebug: bugs.xdebug.org/view.php?id=1745
Huh, it's snowing
@NikiC why is this still undocumented :-/
cmb
cmb
10:33
because we're bad at docs
morns
@cmb Is there anything we're not bad at? :P
cmb
cmb
well, we're good at being bad, at least ;)
@cmb the best at it, actually :D
@cmb yay
10:48
migraine's gone finally, back to whatever I was working on before I was interrupted with sheer brain pain
When I get migraines it feels like I've got a fork shoved in the back of my eye socket. Tis rather unpleasant.
I want to curl up in my bed and die
Guys, I politely want to ask why nobody wants to join the Symfony room. Is it so unpopular framework?
because it's not room 11
room 11 is <3
curl -X DIE bed
10:50
So what, it's the room 208543.
if people want to join the room you've created, they will join
Is it even legal to advertise that room here?
No. Very illegal. The overflow police will come and arrest you.
And throw you in so-jail
It's like a forced labour camp, but instead of breaking rocks, you have to answer questions about VBA

Trash can

Like the recycle bin, but trashier.
I want to answer questions about Symfony.
I work on this framework.
Yeah, I know, but it might be useful for growth to talk about it also in chat.
So today I've reached 100 reputation and decided to create a room.
About it.
it's not going to become a popular room in a day
(if it's popular at all)
patience
I know that it's not very popular framework, so I'm afraid that it can be deleted for inactivity. That's why I'm inviting people.
create a chat bot that gets the word of the day off a site that does that sort of thing, and posts the wotd in the room each day
it's how I got around keeping a room active I wanted to keep active, until I stopped caring
granted, I used the already-provided room11 chatbot, Jeeves, when he was still working
@Clarity and FWIW, it won't get deleted, it will get "frozen" and you can ask a mod to thaw it
Do I need an alternate account for chatbot & write sort of browser plugin for it? Or there is a built-in option in SO?
11:03
o/
\o
Ayup Joe o/
@Clarity this is what we used originally github.com/Room-11/Jeeves but some of the plugins are bugged and don't work, it's in the process of being rewritten github.com/Room-11/async-bot-jeeves
dedicated account - preferably, but you can use your own
Ok, thanks.
11:54
I think ... there are now so many emoticons in the world that they have become the &nbsp; of the people ... 10 years ago when someone said ":)" I knew what they were feeling, now I never find out if I can decode the stream of letters into an emotion because I skip over them completely ... discuss ...
@JoeWatkins :P
12:08
@JoeWatkins that's what "lol" has become for me. Whenever I see it or type, rarely does it translate to actual laughter IRL, it's more of a "this amuses me" feeling
type it myself*
:-þ is my favourite
@Tiffany it might be a weird question, but how do I use PHP-written bot on SO-chat? I thought I can't upload PHP files to server.
Maybe it's just easier to bump the chat manually.
12:28
@JoeWatkins :-D
Yeah, a lot of people are exaggerating their usage
@JoeWatkins 🤔
@Gordon or just "hm" instead of that emoji
@JoeWatkins I think that people in chats may show emotions which they aren't currently experiencing IRL. For example, I can write "hahaha, lol, :)" or something like that, but remain completely calm & emotionless behind the screen.
Do my ping work at all, by the way?
12:50
Unexpected length of unicode string returned ・ *Unicode Issues ・ #79308
I recently added emoticons to our corporate webinar platform because clients were demanding it... one of which requested the poop emoji
Morning All!
@Clarity it needs to be ran on a VM, server, computer, docker container or something with which PHP is installed. The machine would have to be on 24/7 for it to be of use.
@Clarity it displays a notification, but I have sounds in SO chat muted.
Nothing is more daunting while in the middle of code and music than the bloody SO ping noise
13:07
Got it, so I think that it's easier for me to write a message every day/week in the room to bump as I can't run my machine 24/7. By the way, the room already has 3 users
^-^.
13:19
o/
Can someone reference me to a more detailed run through of Preloading. More like can i squeeze out more performance from it?
13:36
@Clarity Probably not.
@ZobjoysJeirmov is it me you're looking for?
3
I can see it in your eyes
cmb
cmb
13:55
hello
14:14
3 of 5 answers contained emoticons ...
14:44
@JoeWatkins oh, you
how often are scripts/pages on 3v4l cleared? I bookmarked a page, wondering how long it'll "last"
Any thoughts on me adding a method to Error \ Exception which returns the top line of getTraceAsString ?
[ExceptionType] [Message] @ [File]:[Line]
15:15
__LINE__ . ': ' . $e->getMessage()
That would be the line of the catch, not the throw
@Tiffany I think not at all
At least I've never had it happen to me that the code disappeared there
@bwoebi thanks
15:36
That's kind of what getTrace()[0] would give you. It's easy to build a string out of it
If I wanted to repeat the same pattern over and over I'd just compose it from getMessage, getLine and getFile
It just seems like it would be a useful helper to have
15:51
@MarkR IIRC, code base at former employer had something similar to this. I remember reading docs on getTraceAsString to figure out why that was used instead of another method (I forget which), and the answer was simply: it didn't give me the info I needed.
16:01
@MarkR You're free to add it in userlands formatter implementation and even pack it as a vendor maintained by you :D
Me: Here's something that would be useful in a lot of cases that we could easily add

R11: Here's 10 other ways you could do it, all of which would be more bothersome than an easy inbuilt message.

Me: *boggle*
 
1 hour later…
17:18
@MarkR on the one hand yes, on the other that's how you end up with clutter like utf8_encode() :-P it's where stuff like extension methods comes in handy, and more generally it's kind of the point of frameworks. I do understand where you are coming from but providing data that's already available in a different format is a rocky road to start off down, it becomes much harder to argue against "I don't quite like that format, I want another method which is very slightly different"
It's a fair point, but speaking of which, aren't we currently working on changing the format of every single type error in the next ver? :p
there's not all that much difference between $e->getFirstTraceLine() and get_first_trace_line($e), the latter of which can be bundled into some shared base package and used everywhere without modifying the language in a way that has to be maintained for everyone forever
ewww procedural D:
@MarkR yes, changing, not adding another format
@MátéKocsis changed the format Twice already :p
17:21
@MarkR no, functions != procedural :-P are C# extension methods procedural?
OO and instance methods are separate concerns, the former being a structural paradigm and the latter being syntax sugar
Welllll I would argue that a method to produce an output from an internal state would be considered encapsulation.
@MarkR you have a) your object with encapsulated state and b) helper methods which just transform/combine the anyway exposed state. These latter are procedural, just possibly attached to an object in some way, but that doesn't change its true nature.
That argument doesn't apply here though, because all the state you are talking about is already public, this is more of a decorator
also hidden state isn't strictly required for OO (look at JS) - I will stop arguing now though because it will get annoying v. quickly :-P
That's fair. I still think it would be handy to have considering we have in-built mechanisms for dumping the entire call stack as a string, but not the call point
what i'd really like, and what would serve your purpose is a StackTrace class returned by getTrace() which is a collection of StackFrame objects, which would encapsulate their stringification routines (then you'd just do echo $e->getTrace()[0];) but that's not really possible
17:29
can anyone help me with "autoloading", I can't understand how composer autoloading works or autoloading in general works
@DaveRandom the state is not hidden, but simply not supposed to be consumed … sort of. And native objects do have a lot of hidden state still :-P
That was my first thought, although the stack dump omits the point it's thrown
hey
i have a question
wiki.php.net/rfc/pipe-operator I think we should have that in PHP … The examples are just shit :-D
At least in some form, I don't care very much about the precise syntax
cmb
cmb
@MarkR well, then new ExceptionTraceFormatter($e)->getFirstTraceLine()):p
17:42
@MarkR yeh that's very confusing at first, but it also betrays the fact that what we have atm is generally not quite right, the stack trace and exception components are intrinsically coupled, despite the fact that debug_backtrace() is a thing. Annoyingly this is totally academic because "fixing" it would be an unacceptable BC break, probably even for new major
@bwoebi sure, but what I mean is that the "pure" abstract concept of OO doesn't strictly necessitate hidden state. Encapsulation is about providing a rigidly defined public API that doesn't require knowledge of the inner structure, it doesn't require enforced private internal state. i.e. the responsibility for keeping encapsulation is just as much on the consumer as it is on the provider
@DaveRandom then we are on the same page :-)
The existence of reflection means that there's very little "true" private state anyway. I mean even in this specific case, it's perfectly possible to manipulate the inner state of pretty much every property of an exception
...which I have done before, and no-one should ever do :-P
18:18
Could someone tell me where _zend_module_entry.module_started flag is cleared after each request? I can see this only in the module_destructor function, but it doesn't called between requests...
@lisachenko uhm, why should it be cleared between requests?
@bwoebi I don't know, it is module that registered via FFI
it works well, all information is preserved between requests, but this flag is modified between requests...
@lisachenko are you re-loading the module on each request?
nope, module is persistent between requests
well then the flag should not be modified either
18:26
@bwoebi I also expect that )) but I'm missing something, as it is modified somewhere...
18:37
@TauseefShah In short, the interpreter sees a class and can't find its definition (The PHP file where its defined is not included), it will then trigger a specific handler that your autoloader has registered. The handler knows where to look for unimported classes. For example, you say if the class name is X look for x.php in /vendor directory and include the file. Composer has its own autoloader that it generates. I suppose you can understand the rest of the details from the documents.
 
3 hours later…
21:34
Does anyone else use and hate OneDrive?
22:19
ibase_fetch_* makes server crashes because of out of memory ・ InterBase related ・ #79310

« first day (3420 days earlier)      last day (1750 days later) »