« first day (4316 days earlier)      last day (616 days later) » 

4:11 AM
@Crell did you see my message on the ML about asymmetric vis & __set ?
 
 
7 hours later…
11:22 AM
How can i refactor this? 3v4l.org/ceQkr
I want to remove FUNCTION in every methods but don't how to do it
in log method how can i determine which method is called before the log itself ?
 
cmb
You could use debug_backtrace().
 
11:50 AM
I know that function but never used it
debug_backtrace()[0]['args'][1] ?
this function is ugly
 
12:20 PM
And slow, compared to the magic constant: 3v4l.org/Od7cd#v8.1.9
 
cmb
Nice to see a benchmark using hrtime() instead of microtime(). :)
 
3 chars less to type (-:
and since it returns nanosecond, I guess it's based on clock_gettime or similar
 
that nice man thanks
 
 
1 hour later…
1:51 PM
@Stephen Yeah, we're working on a larger meta-response to a couple of points.
 
 
2 hours later…
4:10 PM
@Crell cool I look forward to it.
 
4:48 PM
Does anyone here care at all about the semantic web? I just saw this,and have no idea why people were ever invested in it, or why they're still trying after all these years of failing.
 
JRL
the semantic web is like one of those open source purist debates. it is objectively better in the absence of capitalism, but is essentially advocating for making the stuff that underlies trillions of dollars in valuation portable and open by design
meaning that it will only be adopted where the underlying data isn't monetized
it would honestly be a great way for government agencies to approach the web/internet
 
So debug_backtrace only trace the last function called ? 3v4l.org/OIaq7#v8.1.9 i expected the isOk within it
 
JRL
5:04 PM
@Mwthreex why would you be expecting that?
 
I thought this function trace all 'called' functions not only the last function
 
JRL
that's not what a backtrace is. this isn't a PHP thing, it's a computer science thing. a backtrace shows the chain of calls that led to the currently executing line.
so it will show all the functions calls that led to the current line
if they are nested
 
(new Test)->isOk();
var_dump(debug_backtrace());
so the isOk does not count ?
 
JRL
no
 
i don't know what you mean by 'chain'
 
5:07 PM
In computing, a stack trace (also called stack backtrace or stack traceback) is a report of the active stack frames at a certain point in time during the execution of a program. When a program is run, memory is often dynamically allocated in two places; the stack and the heap. Memory is continuously allocated on a stack but not on a heap, thus reflective of their names. Stack also refers to a programming construct, thus to differentiate it, this stack is referred to as the program's function call stack. Technically, once a block of memory has been allocated on the stack, it cannot be easily removed...
 
JRL
the backtrace call is not within the scope of the isOk() call
 
stack trace is possibly the more common name than back trace.
But go and read what it is....
 
JRL
yeah, agree, reading the wiki article is probably a good starting point to understanding what's going on
 
anyway, do we have alternative to that function that shows all the history of functions that being called in the script ?
 
cmb
no, nothing built in, but Xdebug can profile
 
JRL
5:09 PM
yeah, that sounds like xDebug territory to me
 
ok so my script in trouble and total mess
 
JRL
run with xdebug, set a breakpoint. that's usually a good place to start.
 
5:30 PM
access private properties with Closure call method 🙈
 
5:47 PM
stewie_slow_head_turn.gif
@Mwthreex no way did he just write that.
A programmer has strong opinions about something he apparently didn't know about.
 
cmb
To be fair, that access to private members isn't particularly related to arrow functions.
 
JRL
i do find it amusing though. the opinions on twitter seem to looks like this:

programmers who prefer functional programming: "yeah, looks about right, that's the context"
programmers who prefer OOP: "this invalidates the OOP design and is a bug"
 
@Danack Maybe it's because I haven't slept because I'm trying to fix my sleep schedule
But I have no clue wtf is going on
 
hmm. Perhaps I am too warm to be on the internet.
 
6:02 PM
Oh I think I've figured out what's going on
yeah don't do that
 
6:30 PM
 
7:06 PM
That's clear
But maybe it's because I don't really use closures that much /shurg
 
 
1 hour later…
8:21 PM
TWeakClosure, that made me do a double-take
 
8:34 PM
@Girgias Very different use case than in the tweet. That's one of the few places I've used bind or call on a closure.
@Tiffany Templates are fun!
Though… thinking about it I think that's wrong, I should have copied \Closure(...):TReturn instead.
As it is, I'm declaring another template type on the function, which isn't correct.
 
JRL
the most bonkers and obtuse PHP code I've ever seen (that wasn't just plain bad) has always been someone mixing OOP with functional programming
 
/me 's ears are burning.
 
JRL
the main culprit is that functional programming seems to delight in eviscerating core assumptions of scope and side effects that OOP programming tends to make
"that's the feature"
 
Amp\Socket\TlsException: TLS negotiation failed: stream_socket_enable_crypto(): SSL: Success
¯\_(ツ)_/¯
 
 
2 hours later…
10:18 PM
"Avoid side effects and push them into the stack itself" is one of the core concepts of FP.
And I've largely come to agree with the current language consensus in that object-level visibility is just the wrong approach, period, and package level is the better model.
 
Ooooh, package level
General question, but is there any way to insert a token or opcode into a php script except writing it explicitly? Case in point, I want to insert [ without writing [.
 
 
1 hour later…
JRL
11:52 PM
@Crell okay, but that requires some big breaks with the current object model, and in the absence of that, mixing that particular FP philosophy with OOP is kinda a bunch of fuckery\
 
@JRL Oh, I'm not suggesting we drop object visibility. That's not possible at this point.
But IME, FP plays just fine with OOP in PHP. Some objects are just more opaque, OK, whatever.
 

« first day (4316 days earlier)      last day (616 days later) »