« first day (3588 days earlier)      last day (1343 days later) » 
00:00 - 21:0021:00 - 00:00

12:29 AM
@Sara is there an easy way to knock out FTP upload for your rmtools and just store them in a directory somewhere? (I want to upload after the fact using gsutil)
 
json_encode does not support JSON_BIGINT_AS_STRING ・ *General Issues ・ #79958
 
1:11 AM
@MarkR Sorry, what now?
 
@Sara I thought rmtools were your creation, apologies if I'm wrong.
 
/me stares blankly
github.com/php/web-rmtools ? First I've seen it. Lots of commits from @cmb in there though
 
Yup, sorry for some reason I thought they were your brainchild.
 
Long as we're chatting, you can comment on this as well.
@Derick This is a rough brain-dump of what I've been thinking of since about 2016: https://gist.github.com/sgolemon/5e3794f8b44390ffbc24cc66b79e9ab1
IF we did something like this for 8.1, old streams would certainly have to continue till 9.0 at best, but just imagine....
 
You'd have a global stream interface then everything else namespaced in stream(s?)?
I like that it's got the start of an exception hierarchy in it, but how would you see exceptions applying to io failures, network disconnects etc?
 
1:24 AM
Well, I'd like to put our stuff under Stream, but nothing stops a library from doing: class \LaraStream implements \Stream {}, but yeah
I would probably raise exceptions. \Stream\IOException\EOF etc...
I mean, I gave read() a return type of ?string so maybe I need to think more about that.
There's blocking to consider as well, of course.
 
A fully non-blocking interface under the hood would certainly be nice if it could then be wrapped in a single class to make it block.
 
Hrmmm... That's a fun idea.
 
2:17 AM
@Sara I have one major immediate concern, and that's Stream\SSL - you want to transparently use SSL streams as their individual Streams - i.e. if you have a tcp stream you wrap ssl onto, you want to half close it for example without needing knowledge of the fact that it's a SSL wrapped stream … I mean having to do ($stream instanceof Stream\SSL ? $stream->inner : $stream)->shutdown(); is not a nice API
currently SSL is just a thin layer on top of the r/w/close ops
I absolutely get that this is "proper" abstraction, but there is also some part easy implementation … I sort of wish "tcp stream with SSL applied"
sort of a decorating specialization :-D
 
a decorator pattern over the underlying tcp would call
the shutdown of whatever it was wrapping
 
can we have class Stream\SSL<T: Stream> extends T {}? :-D
 
According to the voices of the elephpants, it apparently depends on how often Nikic takes his laptop with him to the toilet.
 
@MarkR (you realize this is not generics, but actual runtime specialization of classes (as opposed to methods) as in the set of functions on the class may vary according to it's class parameter)
 
How is that not generics?
 
2:31 AM
@MarkR generics usually specialize the types of method args/retvals and props
not the actual available methods/extended class/interface
 
Thought i'd already encountered that in typescript generics but apparently not.
Interesting, in TS you can do:

class class Foo<T extends Bar> extends Spec<T>
but not
class Foo<T extends Bar> extends T
 
2:50 AM
yeah, forwarding of generics to other generics is standard
because, as said, that has no influence on the runtime behavior of what's in a class
typical generics do not have side effects apart from type checks and runtime dispatching when doing a polymorphic call
whether a class gets specialized or compile-time reified or whatever is an internal detail - but with class Foo<T> extends T, we'd request an explicit specialization of what the class is.
 
Would it need to be re-linked in a language like PHP? I'm imagining that class Foo<T> extends T { public bar(): int { ...} } would break the contract if T had a public bar(): string for example
 
duplicated and relinked, yes
because all property offsets are different for example - at least with current impl
the property offsets are determined by the parent class
 
I can certainly see the benefits, although I'm not sure why a basic decorator wouldn't work.
($stream instanceof Stream\SSL ? $stream->inner : $stream)->shutdown()

Specifically that one
 
the decorator has mainly an issue with inheritance chain
if you decorate Stream, then your class implements stream
but if a TCPStream is passed, your class is still not a TCPStream
… you need an explicit decorator for every single possible extension of Stream
 
Ah OK I think I get where you're coming from now, you couldn't narrow it based on the stream you're decorating
 
3:04 AM
yes, the decorator loses everything but the directly declared interface
Waht I really want are full decorators of concrete classes which implement (and proxy by default, unless explicitly overridden) all methods of the concrete class and for all classes the concrete class is an instance of the instance of the decorator class shall also be an instance of
 
Brain: [Buffering]
 
haha
too much "instance of", but tried to be precise now :-)
 
Well in this instance I shall simply nod and say "Good luck Sara!"
 
(I do realize that this is sort of a pipe dream, at least as long as we don't even have generics)
class SSL<T extends Stream> decorate T { public T $inner; } - would need to be defined similarly to that … and without generics, there's not much we can do there
(hey @NikiC you do really not want to continue thinking about Generics, so that we can, one day have … atrocities like proposed in the message above? :-D)
 
3:22 AM
What happened to decoration? Was that something that ever made it to RFC or am I just having sleep deprived memories
I don't see it on the wiki list
 
 
2 hours later…
5:46 AM
Memory leak in zend_string ・ Scripting Engine problem ・ #79959
 
6:39 AM
Good morning.
 
6:53 AM
mornings
 
Bore da
@MarkR It is/was Pierre's thing originally.
 
Well I've got it running and building, including the profiler driven optimizations. I'm just not sure how to handle getting the resulting binaries put somewhere.
 
cmb
7:16 AM
@MarkR no easy way (the rm-tools are a big mess). Dale said he is working on a command option to suppress FTP uploading. For now, you'd either have to quick-patch the scripts, or you set up some FTP server which puts the files to wherever you want.
 
7:38 AM
@bwoebi I would expect Stream\SSL to just forward all methods to the underlying stream (which it does not change)
@MarkR Yeah, I didn't write an RFC for that one
 
8:14 AM
@Kalle github.com/php/php-src/pull/5976 Am I missing something here? I think this is the cause for all those "maximum directory nesting level reached" bug reports
 
cmb
good catch, see bugs.php.net/bug.php?id=31986; even MAX_IFD_NESTING_LEVEL 5 might be sufficient
 
Anyone know what in PHP produces error messages starting with Unknown(0):
That is File(line):
 
@NikiC I think the question is, how do you represent that in the type system? if it only implements Stream, you can't use it to forward to any specialised methods of the underlying stream
@NikiC shutdown code?
 
@IMSoP Not the unknown specifically, just the style of message
 
oh, I see
 
8:28 AM
I think I found it, looks like zend_output_debug_string in report_zend_debug_error_notify_cb
Controlled by report_zend_debug
 
@NikiC most of the hits I see are in PHP5, eg: 3v4l.org/9Dl7R and 3v4l.org/itrBq
those are the only results in 3v4l output
 
@Sjon Not surprising, as this seems to be a debug-build only "feature"
 
ah, yeah that explains it. A debug-build might be an interesting addition
 
@Sjon yeah, that would actually be quite interesting
Would let you see if something triggers an assertion failure if you suspect a php bug
 
would you prefer it on master or the latest stable release?
 
8:38 AM
Master would probably make most sense
Though it's a bit of of the way in the interface right now
 
yeah - the only "problem" is that master is rolling update and that makes it less suitable for the bughunt or batch-processing existing scripts
 
true
 
Which one is correct?

- I have been worked with Majid for over 3 years
- I have worked with Majid for over 3 years
 
@Shafizadeh "I have worked" or "I have been working"
 
ah .. does "I have been working" convey that I'm no longer his coworker?
no longer = I'm not anymore
 
8:42 AM
@Shafizadeh In that case "I have worked" is probably a bit better
 
@NikiC maybe it makes sense to compile master with debug-symbols by default on 3v4l?
 
I see .. thanks @NikiC
Is this sentence correct?
> Both as his manager and coworker
 
@cmb Hm, I'm getting OOM conditions while fuzzing with this change :/
 
cmb
Maybe MAX_IFD_NESTING_LEVEL is too high, or do you try with 5?
 
@cmb Too high nesting level should only cause stack overflows ... in theory
I suspect that there is some way to create a "loop" in exif ^^
 
cmb
9:02 AM
I wouldn't be surprised :)
 
wiki.php.net/rfc/remove_php4_constructors Shouldn't we have removed PHP 4 style constructors a long while ago?
 
@IluTov We did
If by "a long while ago" you mean in PHP 8 :P
 
@NikiC Oh did we? In PHP 8? I missed that.
 
cmb
9:27 AM
@NikiC maybe, as mitigation, also count the number of IFDs (like before) and check against a high value (say, 500)?
 
9:54 AM
json_encode(JSON_NUMERIC_CHECK) works differently between 5.4.x and 7.x ・ JSON related ・ #79960
 
@cmb yeah, I did that
 
cmb
+1
 
Reflection Type method "GetName" returns different values then old gettype() ・ Reflection related ・ #79961
 
10:29 AM
I still cannot believe that the first mulligan RFC actually passed, for what are essentially cosmetic issues, and now people are still arguing about BC, FC, completely different syntax...
 
@NikiC yeah, that would be the minimum thing, but it's a bit sad $sslTcpStream instanceof TCP === false :-/
 
Application Scope Object ・ JIT ・ #79962
 
10:56 AM
@NikiC I mean, I'll be then unable to pass $sslStream to any function requiring Stream\TCP as it's type
 
I once used a superbly magic Perl module which patched the inheritance hierarchy so that all TCP streams were automatically SSL streams
surround your code with ssl { ... } and magically everything uses an encrypted stream
 
@bwoebi The function should be asking for Stream, not Stream\TCP :)
 
@NikiC Well, that depends on whether we want to do tcp specific operations though?
like tuning buffer size, half-duplex shutdown etc.
> I mean having to do ($stream instanceof Stream\SSL ? $stream->inner : $stream)->shutdown(); is not a nice API
 
am I missing something about the name of CachingIterator in SPL, that it does not in fact cache (and thus allow to rewind) another iterator?
 
^ That was my original point
 
11:30 AM
Morning everyone. is there a replacment for the set_magic_quotes now that it is deprecieated
 
@JukEboX You're about 10 years too late
Magic quotes were depricated more than 10 years ago, and removed completely 5 years ago.
 
LOL yeah I know. Its been a while since I did some of this.
I am trying to figure out a replacment for its function for textareas
 
Use the database specific escape functions.
 
.... can you explain a little more what you're trying to do
 
@Stephen Trying to clean data entered into textarea of " and ' for doing an update or insert statement
into a DB
 
11:35 AM
for SQL queries you generally want to use parameterised queries, for e.g. putting values into markup you generally want htmlspecialchars
right
ok so the solution is to use parameterised queries
so the user entered data is never actually treated as SQL
 
I have never heard of this before
 
I am using prepare
The statement gets stuck because there is a " or ' in the data being put in
 
also, for reference, 'depreciated' is what happens to an asset over time (i.e. relating to tax). 'deprecated' is what happens to functions/etc that are no longer supported.
right so it's not just about using prepare
you need to actually write a parameterised query
the first example on the prepare() manual page shows an example of this
the idea is that rather than eg
prepare("INSERT into FOO (col1, col2, col3) values('{$data1}', '{$data2}', '{$data3}'");
you do something like
$stmt = $pdo->prepare('INSERT into FOO (col1, col2, col3) VALUES(:data1, :data2, :data3)');
 
So isnt' it different for an Update statement?
 
11:41 AM
$stmt->execute([':data1' => $data1, ':data2' => $data2, ':data3' => $data3]);
parameterising a query is not specific to an insert
 
$stmt = $pdo->prepare('UPDATE table SET col1='{data}'
 
it works for updates too
 
ohhhh ok
Cool I will try that
 
If your code depends on magic quotes, you have a few choices.... 1) Delete it. 2) Rewrite it 3) Escape all the _GET / _POST at the start of the script
 
11:44 AM
@JukEboX like I said, the example shown on the manual page shows parameterised queries in use, I'd suggest reading that example through to compare with your existing query. I've probably missed a quote or semicolon or something in the quick examples above
@MarkR you forgot option 4. Move to North Africa, and live in denial.
 
12:26 PM
@Stephen or move into the mountains and become a hermit
 
12:38 PM
@salathe Your vote is currently being rejected, because you picked one option more than once.
 
@Derick I know
 
OK. You're welcome to spoil your ballot of course :-)
 
12:54 PM
@Stephen tried your suggestion and I am still getting the error
 
@JukEboX can you post the code?
 
sure standby
@Stephen 3v4l.org/nudIi
 
@Derick I got a response for the %Z issue on musl ... The problem seems to be that musl tries to use tm_zone at all, while glibc directly uses the global timezone. The maintainer suggested that it might make sense for us to explicitly expand %Z with the abbreviation we want to use.
I think that might actually make sense, because it would also make us independent of the TZ environment variable
Just date.timezone would be enough then ... I think
 
Abbreviation != Identifier
   %Z     The timezone name or abbreviation.
But that's OK though.
Our docs state "%Z The time zone abbreviation. Not implemented as described on Windows. See below for more information." date.timezone isn't always set though
 
@JukEboX don't put quotes around the parameters in the query
 
1:03 PM
@Derick date.timezone should already be set to at least UTC (default), right?
 
please just read the example in the manual.
 
@NikiC Yes
 
@Derick It seems like a better idea to respect date.timezone than TZ env var though, as I don't think most php date functions do anything with that, right?
 
only strftime, because of BC. IMO, strftime should not be used at all.
 
cmb
deprecate it :)
 
1:13 PM
maybe we should do that with date, and everything that just takes a timestamp, and DateTime for PHP 9 (and only leave DateTimeImmutable)
 
heh
 
(I'm not entirely serious)
 
Dropping everything but DateTimeImmutable sounds good to me. :-)
@NikiC Re the bug report, preloading doesn't handle constants? Just define, or does it ignore const, too?
 
1:31 PM
@Crell both
 
Well that sucks.
So the preloader/require is smart enough to skip the symbol declarations, but not skip the whole file, because there might be other stuff you do want a second time. Ugh. Messy.
So does that mean if you have a file that is all function declares, and you require_once() it manually after preloading, it won't actually get you a perf benefit?
 
@Crell Well you would require an empty file in that case. I think the require also gets stripped in that case (if the file after stripping declarations is empty)
 
I just removed a snaked from my MIL house.
 
But the file isn't empty? I have no idea how this works under the hood, but it sounds like there's a lot more subtlety here that should get documented, hence my questions.
 
@Stephen A snake daemon?
 
1:43 PM
I have a list with checkboxes in and a select field. When I check multiple items in that list and press submit then they are resulted in an array.
I am trying to combine it with option selected in select. So if I check an item and select and option in result I will get checked item an selected option in one array.
I have something like this but this is not good:
<input name="send_checked[]" type="checkbox" id="sending_devices_send_checkbox" value="'.$id.'">
<select name="send_checked[]" id="sending_devices_sending_method">
	<option value="test1">test1</option>
	<option value="test2">test2</option>
</select>
 
@NikiC no I don't mean the MIL, I mean an actual legless reptile.
 
I think result should be somthing like:
        array(
            array(
                '0' => 1,
                '1' => 'test1'
            ),
            array(
                '0' => 2,
                '1' => 'test1'
            ),
        );
 
@luffy you can give explicit keys in the field name as well as using [], e.g. <input name="send_checked[0][]">
 
cmb
@Stephen you wrote "snaked" :)
 
it works exactly the same way as writing $_POST['send_checked'][0][] = $foo
 
1:48 PM
oh. I didn't notice that.
I meant to spell it correctly.. "snek"
 
@IMSoP Ooh ok I will check
 
 note that no debug function in PHP will show you an array like that, because every element has a key (even if generated automatically) and numeric keys are automatically integers not strings, so that example would actually look like this:
        array(
            0 => array(
                0 => '1',
                1 => 'test1'
            ),
            1 => array(
                0 => '2',
                1 => 'test1'
            ),
        );
.
 
@IMSoP Ok thanks
 
string keys also work, <input name="send_checked[primary][]">
 
2:03 PM
What will it be in my case?
This is kind of close but not for each speciefiek item it will be then for all cheked items.
<input name="send_checked[sending_devices_send_checkbox][]" type="checkbox" id="sending_devices_send_checkbox" value="'.$id.'">
<select name="send_checked[sending_devices_send_checkbox][sending_devices_sending_method]" id="sending_devices_sending_method">
	<option value="test1">test1</option>
	<option value="test2">test2</option>
</select>
 
Meh I'm just more confused now
glibc does use tm_zone after all, but other implementation don't necessarily do
So on Linux using %Z uses date.timezone, but on macos it will use TZ (?)
 
it uses the system's strftime for locale settings
so it can do %D as that's part of the locale
but the data comes from us
we build a "struct ta" from the timestamp and timezone information, which comes from date.timezone
I don't think it uses env TZ, unless an OS ignores the fields we set in struct ta:
        if (gmt) {
            ta.tm_isdst = 0;
    #if HAVE_STRUCT_TM_TM_GMTOFF
            ta.tm_gmtoff = 0;
    #endif
    #if HAVE_STRUCT_TM_TM_ZONE
            ta.tm_zone = "GMT";
    #endif
        } else {
            offset = timelib_get_time_zone_info(timestamp, tzi);

            ta.tm_isdst = offset->is_dst;
    #if HAVE_STRUCT_TM_TM_GMTOFF
            ta.tm_gmtoff = offset->offset;
    #endif
    #if HAVE_STRUCT_TM_TM_ZONE
 
@Derick The problem is that those fields are non-standard. Sometimes they just don't exist at all (Windows) and sometimes they are not interpreted the way we want (musl)
That effectively means that this will either use date.timezone (if the fields exist) or use TZ (if they don't exist)
 
Yes, that's why using strftime should be deprecated... alternatively we can implement our own intepretation?
 
@luffy the trick is to generate each of your inputs with a specific key that you can group by
 
2:14 PM
timelib now can do formatting with specified prefixes (as MongoDB uses the strftime style formatting, and it needed different letters too)
 
e.g. for ( $inputNumber=0; $inputNumber<$maxSelections; $inputNumber++ ) { echo "<input name='foo[$inputNumber][]' value='checked'><select name='foo[$inputNumber][]' value='option'>"; }
each input+select pair in the HTML will then have a key in common
 
@Derick I'm currently trying something along those lines: github.com/php/php-src/pull/5933/commits/…
 
@IMSoP ok Thanks you!
 
the key point (pun not intended) is that the logic creating the form is the only thing that knows the fields are grouped in pairs, not all in one set, so needs to encode that knowledge in the HTML
it's always worth keeping in mind what different parts of the system know
 
@NikiC That's a ghastly workaround (not your code, but the necessity of it).
I'd vote for upgrading this line in the docs "Not all conversion specifiers may be supported by your C library, in which case they will not be supported by PHP's strftime(). " to a more prominent warning and let it be.
 
2:21 PM
@IMSoP Thanks a lot man. That was a lot of help for me!
 
no worries, glad I could help :)
 
I have used this method before I don't know how I mis that
 
2:42 PM
@Derick Yes, that may make the most sense. And we should deprecate strftime and strptime
strptime is not even available on windows :(
 
The only feature that strftime has, and is not available easily otherwise is locale based date and time formatting — although Intl can help a little
 
@Derick "locale based" -- removing that is a feature :P
 
I agree, but I bet there are others that disagree
you know, the folks that are still using PHP 5.3
 
cmb
@NikiC we could probably implement it on top of std::get_time, if we really wanted to.
 
no
no new formatting tools
 
cmb
2:50 PM
it about implementing strptime() on Windows :)
 
Note:

Internally, this function calls the strptime() function provided by the system's C library. This function can exhibit noticeably different behaviour across different operating systems. The use of date_parse_from_format(), which does not suffer from these issues, is recommended on PHP 5.3.0 and later.
We should bump that to a warning too then.
 
Looks like someone already added a stub for strftime to the deprecation list
Added strptime as well now
 
@NikiC I've already added strftime() along with gmstrftime() to wiki.php.net/rfc/deprecations_php_8_0 a few weeks before. Though, strptime() isn't added yet.
ok, you noticed it earlier than I finished writing my response :)
 
3:30 PM
🤦
oops, well I guess that can stay :)
 
3:47 PM
hey guys i am stuck with implementing social login in lumen
I am using passport for authentication
I want to know is it possible to use socialite and passport together in lumen
?
 
Incorrect word's form on RU doc page ・ Translation problem ・ #79963
Grammar bug in RU doc page ・ Translation problem ・ #79964
 
4:05 PM
@astrosixer most people in here don't use laravel or its variants. you'll have to specify what passport and socialite are if you want help...
links are helpful
 
4:15 PM
Try Laracasts
 
don't those require a subscription?
 
They have some free stuff.
Open forums as well.
That was a few years ago last time I was there. Things might have changed.
 
my only problem with videos is most of the time... I don't want a video, I want text. I generally have difficulty processing spoken words if they lack a transcript (not sure if laracasts have transcripts, I haven't checked yet)
but the other problem I have with videos is that they take so damn long most of the time too... I'd rather read/skim through something
 
I'm kind of the same way. I learn more from books. You can follow along at your own pace.
 
@Tiffany YouTube has 2x speed :-) (I prefer text too)
 
4:24 PM
autism.org/auditory-processing-asd :/ this is my reason...
 
Fair enough.
Books, and articles, over video any time though, for learning.
 
5:01 PM
I agree. Video is good for many things, but documentation is not one of them.
Unless it's short clips as a visual aid to written text.
 
Why does the manual say fread/fwrite changed in PHP 7.4? ・ *Directory/Filesystem functions ・ #79965
 
@Crell yes.
 
@astrosixer If you have questions about Laravel-specific tools, you're better off asking in a Laravel-specific channel. You'll find more people who know the tools you're talking about. This channel is better for general PHP questions.
 
5:19 PM
Hello guys
can anyone tell me how to secure $_SERVER['PHP_SELF']?
in my project $_SERVER['PHP_SELF'] = 'raka/index.php'
so how do i secure it from 'raka!@#%^&&/index.php' to 'raka/index.php'
i did filter_var($_SERVER['PHP_SELF'],FILTER_SANITIZE_URL) but it's not working
 
Anyone know of an internal method that exists on a base that isn't overwritten on the child (and is still internal?). I think there's an edge case in my code but I can't find an example to exercise it with.
I tried looking into iterators, but they are just so weirdly implemented I can't find one. I thought LimitIterator::getInnerIterator() met this criteria, but it doesn't; the fbc->common.scope is set to LimitIterator instead of the base.
 
5:34 PM
is php worthy to learn in 2020?
 
@Vitor Very much so.
Most popular web backend language, the fastest of the major interpreted languages, and the one with the most robust type system. It's also built for serverless. :-)
2
 
Is serverless the new buzzword?
 
@Crell Tiny nitpick, JS is faster in some workloads, but yeah overall one of the fastest interpreted language which is relatively sane (and no TypeScript doesn't make it JS typed)
@Tiffany Since 3 years, I'd say
 
@Girgias overhaul? Overall?
 
yes, autopilot typing
 
5:38 PM
:P
 
@LeviMorrison nothing springs to mind, except registering a dummy module under test
 
If anyone has an idea on how to fix the 4 shift/reduce conflicts with typed class constants (i. e. github.com/php/php-src/pull/5815#discussion_r450361292), let me know! I want to move on with the RFC since we are already past the FF but it seems that I can't figure out the problem myself.
 
5:54 PM
@moliata I can take a look later but can't promise anything, I'm not an expert on reading the output file.
 
@IluTov that would be great, thanks!
 
@Girgias JS is faster because of async. Raw engine itself, PHP is faster AFAIK.
 
@Crell Looking at benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/… and a quick glances of the JS of some of the benchmarks I don't know how much async actually plays into it
 
Hm, interesting.
 
@Girgias Depends on how much of it is CPU bound vs IO bound.
 
6:01 PM
That's where the async would matter.
 
But for PHP if you're IO bound you just use more processes
 
@IluTov Sure but does benchmarks should be CPU bounded, but the PHP code could also not have been updated recently for the relevant benches
 
@Girgias Yeah it does look so. That's exactly the kind of benchmarks the JIT should significantly improve.
 
Yup :D
 
Some of the benchmarks look kind of suspicious though. JavaScript being faster by factor >10, seems fishy.
 
6:04 PM
@IluTov The code is user contributed, and some PHP ones don't use threads/multiple CPUs which slows it down
 
@Girgias Looking at n-body for example, neither implementation uses threading or async, how is JavaScript 26 times faster?
 
The V8 engine is fast
I don't know the specifics, but there could be some weird optimizations the V8 Engine does
Also the PHP code uses a bazillion arrays instead of objects
I'll maybe give a go at rewritting that one
 
@Girgias Yeah I think that the PHP implementation could greatly be optimized.
 
apples and oranges
 
6:28 PM
man Post Redirect Get is really kicking my ass
caught in a POST horror show
Basically the problem lies on transferring login descrepancies from the header login ( which appears on all pages ) to a full login page.
I am sending xml to the client based on success or failure, incorrect username or password.. ( sorry if this is the wrong place to vent )
if there is a failure, instaneanously append a hidden form and submit it to a full login page ( that way I can display errors ) on the full login page
Now i have two login forms ( header ) and full login page
Thats were I am in a horror show
where*
 
6:44 PM
Sounds like it's just over-engineered.
 
Possibly :D
I wrote a Handler class to handle it all
:)
I know enough to break stuff basically lol
 
State 861

  271 attributed_class_statement: method_modifiers "const (T_CONST)" . optional_type_without_static class_const_list ';'

    '?'                        shift, and go to state 767
    "identifier (T_STRING)"    shift, and go to state 122
    "namespace (T_NAMESPACE)"  shift, and go to state 124
    "array (T_ARRAY)"          shift, and go to state 768
    "callable (T_CALLABLE)"    shift, and go to state 769
    "\\ (T_NS_SEPARATOR)"      shift, and go to state 77

    "identifier (T_STRING)"    [reduce using rule 236 (optional_type_without_static)]
@moliata Doesn't look too good, this grammar would require lookahead, I think this will require lexer trickery. @NikiC Right?
 
@IluTov I know :p, I tried unrolling the loop as suggested by Bob but that didn't work
 
@moliata Lol well you could've mentioned that :P
 
6:59 PM
sorry:), anyways here's the link to our old conversation with Bob and Nikita chat.stackoverflow.com/transcript/11?m=49797137#49797137
 
Thanks for allowing me to vent. Namaste. I fixed the problem; I was using reloading the page in javascript instead of changing the window.location.href to window.location.href
Take care, and have a good a good one
good one*
 
7:48 PM
@Tiffany Oh, sorry... Now I know.
 
@moliata I don't get it, it conflicts with trait_adaptations but I don't understand why. The two seem completely unrelated.
trait_alias to be specific.
The Bison output always confuses the hell out of me.
 
I've discovered a whole new worlds of javascript debugging pain.! Embedding sveltejs in webviews!
 
@IluTov Okay I rewritten it, but I don't think I can test the performance of it with this 2GHz dual core CPU
 
@Girgias Cool :) You could re-run the JavaScript script as well to compare.
> Measured on a quad-core 3.0GHz Intel® i5-3330® with 15.8 GiB of RAM and 2TB SATA disk drive; using Ubuntu™ 20.04 x86_64 GNU/Linux 5.4.0-40-generic.
 
Well I can't even finish it rapidly cause Windows refuses to allocate more than 30% of my CPU for it
@IluTov if you want to run it yourself gist.github.com/Girgias/e21b57cff72b8d05be06883d98552ee6
Command is: php ./n-body.php 50000000
Dropping the types could/should also help as I don't think they use OpCache
 
8:15 PM
-0.169075164
-0.169059907
Took 224039614869 nanoseconds, (22.4039614869seconds)
php ./n-body.php 50000000  223.11s user 0.31s system 99% cpu 3:44.08 total
@Girgias Execution time seems to be converted incorrectly to seconds :P
That's a way to improve execution time too xD
 
Right I fucked that up
So 224s
 
@Girgias Yes, and my CPU is more powerful than the one used in the benchmark.
 
@IluTov I'm spinning up a Linode box to try stuff myself
 
(Probably, hard to compare)
 
Will drop type declarations
 
8:17 PM
@Girgias This is without types
 
Type declarations shouldn't make a massive difference.
 
Oh
Welp
 
Interesting, I see #[ has peeked out into the lead
 
@IluTov Did you test it with types too or just without?
 
@Girgias Just without, I can rerun with
running
 
8:33 PM
Might be worthwhile also drop the time code
I added it because I didn't want to deal with installing the whole thing needed to get the results
But that's maybe why I get shit CPU utilization
 
@Girgias That should be negligible, no?
 
@IluTov Yeah it is, but IDK why this laptops just uses 30% for it, maybe something related to me running it in WSL
 
Check in the HyperV settings, see how many cores it has assigned
 
I'm not even sure I got HyperV
 
actually I guess that's just docker
 
8:36 PM
It's a laptop with an i3-6006U @2.00GHz
 
If it's using WSL2 it will be a Hyper-V machine.
 
@Girgias Can you run it on Windows natively? Not sure if WSL negatively affects performance.
-0.169075164
-0.169059907
Took 238159180052 nanoseconds, (23.8159180052seconds)
php ./n-body.php 50000000  237.54s user 0.30s system 99% cpu 3:58.20 total
with types
 
@IluTov Well I would need to install PHP on Windows :')
 
WSL will hammer anything which does IO or system calls
 
So types are indeed slower
 
8:37 PM
So quite a bit slower even
 
It's purely CPU @MarkR
I wonder if the foreach index => $body thing is slower than using a normal for loop due to the nesting
 
imagecreatetrucolor has Fatal error ・ GD related ・ #79966
 
gist.githubusercontent.com/Girgias/… has replaced the squares with superscript
 
Well because I typed them as ²
 
O_O you lunatic
 
8:48 PM
:')
 
Getting the scope that a method was actually called with seems subtly elusive, at least on PHP 5 (haven't dug into 7 yet). It's almost always the fbc->common.scope, but when that fbc->common.scope doesn't exist in the class entry it was called with (such as it exists on a parent), then it's not what I want.
In those cases it seems to be EG(scope), but that variable is wrong with parent::calls...
 
@Girgias Removing the type hints seems to generate a noticable increase in performance
 
@MarkR Yeah we saw that with @IluTov
 
@Girgias I don't think there's an obvious bottleneck, other than property access being slow. Commenting out the nested for (not the for itself) in advance with n=500000 makes it drop to 0.4s, adding each block makes it gradually increase to 2.3s.
 
@IluTov The count() call could be one
 
8:59 PM
Should be optimized out to an opcode and cached
 
@Girgias No count was still executed.
 
There is no OpCache in these benchmark runs from my understanding
huh
 
count is trivial, the count is stored in the array.
 
Right
 
00:00 - 21:0021:00 - 00:00

« first day (3588 days earlier)      last day (1343 days later) »