« first day (3803 days earlier)      last day (1138 days later) » 
01:00 - 21:0021:00 - 00:00

1:12 AM
@NikiC I haven't reported a bug to php.net before, but I just tried. It is saying: "WARNING: YOU MUST RE-UPLOAD YOUR PATCH, OR IT WILL BE IGNORED". ...but I am not offering a patch.
I am declaring the following values: version = 7.3.27, affected = Regular Expressions, PCRE related. Is something not right with that?
 
preg_split ignores limit flag when pattern with \K has 0-width fullstring match ・ PCRE related ・ #80865
 
RO, please remove my two above comments, it seems I just needed to click Report Bug a second time.
 
Nah, we only remove offensive stuff. not people learning.
 
Okay, different from SOCVR. They don't mind removing noise.
 
1:40 AM
@Danack do you know if it is possible to make a php bug report without exposing my email address? Can it merely identify me as "mickmackusa" instead of the email?
 
@mickmackusa it doesn't validate the email address, so....just use something like @nospamasddasdasdad.net
And yeah, the bug report site needs some work on it to not be blatantly breaking multiple countries privacy laws.
 
@Danack now my effort was pointless because the change was logged in the History.
 
@mickmackusa I can hide it if you want to enter it again?
I can't edit details out.
 
1:55 AM
You want me to enter the original email address again as it originally was? @Danack
Or kill the report then report again?
 
? No. I meant I can kill the report so it's not visible.
 
Okay, go ahead, I'll report it again. Thanks @Danack
 
no problem.
 
preg_split ignores limit flag when pattern with \K has 0-width fullstring match ・ PCRE related ・ #80866
 
2:36 AM
Is there a better alternative to zend_include_or_eval as a general purpose require_once at internals level?
 
3:01 AM
@NikiC So that's indeed the issue, but I can't seem to fix it, I've got gist.github.com/Girgias/ddf33201380329db68f176ac887ec5ba but that makes the test runner die because of a by ref argument array &dest >_>
 
3:15 AM
not much sleep going around today huh
 
Well... I started working on intersection types
It just only works with return types currently xD
 
@MarkR that or zend_execute_scripts are about the only places where zend_compile_file is used, so i'd say yes.
@Girgias you are crazy sir ;)
 
@beberlei Well it's more a parser grammar issue
Because of & being the by-ref marker
 
maybe another symbol? +?
 
I suppose, it is pretty frustrating to hit such a sigil issue
 
3:20 AM
let me tell you about the great namespace seperator wars son ;)
 
oh no
I mean, I actually never followed this other than "it should be /"
 
i believe \ and ::: were the only serious contenders ;)
since php 5.3 took so long, this debate about the right syntax was about 3-4 years of mailing list though
 
gist.github.com/marandall/f3f8a355b7e57e40ccdadda0f8a7f7c8 so far so (probably) terrible. Any initial thoughts?
 
@MarkR you could use the lc_name in the classmap as well maybe?
hm no, that would make it work differently than with file based resolution
 
 
4 hours later…
7:04 AM
@NikiC BTW: That malloc_consolidate() issue I was seeing with PHP 8.1 ... turned out to be PCOV related.
 
I'm looking at it
not able to reproduce it yet
 
7:47 AM
@SebastianBergmann can you try head of develop, I still can't reproduce it but am not surprised ... in 8.1 the cfg code is ZEND_API and it's not clear which cfg is included when building, I sorted the build and am definitely using the zend provided one in 8.1+ ...
 
8:25 AM
@JoeWatkins Will do, later today hopefully.
 
@mickmackusa I believe that's just a warning in case you have a patch. Just submitting again should work
@Girgias You got the right idea, but why is there T_WHITESPACE in there?
T_WHITESPACE is stripped before it reaches the parser
@JoeWatkins Oh yeah, you should be able to no longer ship your own cfg code starting 8.1
 
8:47 AM
@NikiC yeah, nice ... finally some of o+ is in /Zend ...
 
9:37 AM
bccomp warning for INF ・ *Math Functions ・ #80867
 
@NikiC Can I interest you in a chat about some new RFCs that you've come up with for the podcast? I'd like to chat about "new in initializers" and "static variables in inherited methods".
 
 
2 hours later…
11:16 AM
mah, i wish the php fpm PR didn't get the eyes yet, I want to apply the patch to PHP 7.4 first and test with symfony or laravel to see if this even makes sense
 
11:38 AM
@beberlei I think it's promising conceptually and it would be surprising if there's no benefit at all.
 
@beberlei didn't get the eyes yet? You mean wasn't visible by general public?
 
12:06 PM
@Tiffany i didnt send an email to internals, because I hoped only core people and people here would see the draft PR and let me discuss this and test a little before I make it more public for consumers. :)
many questions that would be answered by an RFC, which i dont have yet ;)
 
you're under no obligation to answer questions ;-)
 
12:21 PM
@beberlei just haven't heard the phrase "didn't get the eyes" before, I was wondering if I understood correctly
:P
 
hah, probably my amazing skills to englishify german proverbs in a stupid way ;)
 
We could use new idioms :P
 
@beberlei I got a card game for Christmas called "Now goes me a light up" full of badly translated German proverbs ^^
 
oh awesome, mistranslations of proverbs is a favorite kind of comedy for me ;)
including mixing up two proverbs
 
Missing bytes with DB2 column type LOB ・ PDO ODBC ・ #80868
 
12:55 PM
Morning all
 
@Tiffany maybe he just doesn't want FPM to become sentient and evolve eyeballs. yet.
 
1:43 PM
@NikiC Well I thought of adding a mandatory space between the type and the & marking the by-ref arguments so that's why the T_WHITESPACE, but if it gets removed before then yeah doesn't make a lot of sense
 
@Girgias Why would a space be necessary?
 
@beberlei Want me to link to Don't publicise draft work and start berating people?
 
$var is not a type name, so there shouldn't be any inherent ambiguity
 
@Girgias What are you working on? Caller side pass by ref?
 
@NikiC Well without the T_WHITESPACE I still get the shift reduce conflict
@IluTov Intersection types
 
1:45 PM
@Girgias Oh, got it.
 
So I currently have return types working but not arg/property types because of the grammar issue with & that I'm still strugling to remove
Also @NikiC can I just merge github.com/php/php-src/pull/4123 ?
 
2:01 PM
@Dharman I've granted you php-src karma, so you can directly commit future patches (don't forget to squash!)
 
@NikiC Are you sure it is safe?
 
@Danack i think its fine :) just the risk of me publically falling flat on my face, i can deal with that ;)
@Dharman "git remote add DANGER git@git.php.net" is the way I workaround safety ;)
 
git push ARE-YOU-SURE
 
youtube.com/watch?v=oHC1230OpOg - slight volume warning.
 
@Dharman nope
 
2:11 PM
Just thought I'd stop by and let you know it seems bots now have their own opinions about things
user image
2
 
@Sean Bot opinion's matter
 
@Dharman this page explains the workflow wiki.php.net/vcs/gitworkflow - though its not always 100% clear, however I always got helpful infos here in the room
 
@Dharman With great power comes the ability to majorly fuck up.
 
2:28 PM
@Girgias I left some comments
 
Aye thanks :)
 
Q about the tests, how should file paths be handled in error messages? I'm writing the files to the system temp dir, is there a better alternative that would allow the test suite to ignore the path?
 
EXPECTF and use %s
Or are you talking about writing it?
 
I'm writing a set of fake classes to disk to be loaded, and the error messages contain the path to them

Error - Classmap entry "Foo" failed to load the class from "/mnt/s/Projects/php_internals/php-src/ext/spl/tests/ThisFileIsEmpty.php" (Class undefined after file included).

So if I use %s should I do that manually and skip bless tests?
 
I mean, both, really. Use the sys_get_temp_dir() or tmpfile() to write your files, AND use %s with EXPECTF to not care if it's /tmp or C:\TEMP
The former avoids spilling shit that'll piss off your VCS by having untracked files around, the latter to not have to worry about matching random strings of file paths.
 
2:47 PM
Sara, this is PHP!
We write temporary test files into cwd :P
 
github.com/php/php-src/compare/… just trying to get back into it slowly
 
@MarkR wouldn't it be more efficient to check that the value is a string only in the perform autoload instead during setting?
iterating a 10-20k list of items to check for string values sounds "expensiveish"
otherwise nice nice nice :D
 
@beberlei That's what I had originally, but I thought error at point of use with a ValueError made more "sense". Moving the typecheck to the include wouldn't be an issue
Also, aliasing spl_autoload_register to autoload_register would need a separate RFC right?
 
i am unsure about unstatic zend_include_or_eval, i havent seen that yesterday night (was tired ;)). wondering if there is something a layer higher
yes, i wanted to ask about missing spl_ prefix :P
i know you have opinions about these things, but still better to fit into the current "consistent" system
otherwise you open up a flank for disagreeing that isn't actually related to the issue at hand
 
Well I think there's universal agreement that autoloading shouldn't be in SPL, so one RFC to alias everything into autoload_xxx and if that's approved add it as autoload_set_classmap otherwise add it as spl_autoload_set_classmap
 
3:05 PM
If we're doing a more global autoloader in core it shouldn't not just be classes tho IMHO, I was going to look into github.com/Danack/FunctionTypes/blob/master/… as Danack prompted me
 
@MarkR lets say universal agreement for classmaps is 75% and universal agreement for autoload_x is also 75%, then depending on the no voters this is < 66%
 
@beberlei Yeah sorry I meant two RFCs, one for the aliasing and one for the classmaps. So they're independent.
 
@MarkR If you submit a PR, I have comments
 
@NikiC Sure thing. I'll submit a PR once I've changed the type check location.
 
3:26 PM
@bwoebi @IluTov Thoughts on EnumSet, finally.

Interesting! If I read it right, despite being an object, the bitwise operators mean that most of the time it can be treated as just a value and you never actually see a "new" command, yes? The only place would be in param/return typing.

It both feels a little over-engineered as well as well-targeted, at the same time. Probably because it leads with all the object stuff and not the bitwise common-cases. I suspect that may be a matter of presentation.
 
@Crell I'm also concerned about the generic part. But on the other hand type hinting just EnumSet would also be horrible. The question is, are generics ever going to happen? Because if not, we don't really have another option.
 
@IluTov Agreed. From what Nikita has said in various places... I grow increasingly pessimistic about user-space generics being a thing. Every conceptual idea I've thought of, Nikita has said he's tried and it doesn't work. :-( But extension-only features are... sad making. That said, it wouldn't be the first such feature. Operator overloading is already extension-only, and the world hasn't ended.
That said, I have no idea if C-code-only generic are any easier in the first place. Way over my pay grade.
 
a poor mans generics is manually instanceof $this->currentType though, wouldn't that be something like that?
 
That was basically what I was thinking for generics generally, basically materailizing if ($foo instanceof $this->currentType) a lot. But Nikita has indicated that cascades way way farther than we think.
 
@IluTov @Crell The alternative would be an inner class, Set to all enums
so you'd typehint MyEnum::Set
It's a bit less cool, but will probably just work as well
 
3:40 PM
We don't have inner classes, either. Do we?
 
… or was just a rejected RFC by Joe
I do not remember :-D
 
Hi there. Quick clarifying question PHP arrays from Javascript user. In order to assign key-value pairs in a PHP array, you use Array(key=> value). However, to access that values based on a key, you need use brackets likeso: array['key']. You cannot use the double arrow syntax to access array values, correct?
 
Also, MyEnum::Set would then preclude an enum value named Set.
 
wiki.php.net/rfc/nested_classes … okay never caught on
I was misremembering then
 
@rguttersohn Correct. $arr['key'] is the only option. There is no $arr.key or $arr => $key.
(Or rather, that syntax means totally different things than what you're trying to do.)
 
3:42 PM
@bwoebi That's basically just monomorphization with different syntax, no? :P
 
@IluTov no not really … in this very specific case it'd be equivalent
 
@NikiC I'm wondering for the set_attribute hook wouldn't it be better to enforce that on failure either an exception is thrown or a PDO error is set?
 
@Crell what we could do is maybe just create a class MyEnum\Set When defining enum MyEnum... :-/
 
Appreciate it, @Crell. One other follow up question: when would you create objects in PHP when it seems like arrays fulfill the basic duty of holding data? Are objects in PHP typically reserved for creating classes?
 
waiting for @Crell to pull out his talk slides about why PHP array are evil
 
3:46 PM
@rguttersohn It's not a 1:1 mapping from JS objects to PHP objects. You can use PHP arrays in a similar fashion to JS objects, but for the love of god, don't. They are worse than classed objects in every conceivable way.
 
@Crell actually … no does not work … because autoloading
 
@rguttersohn Rule of thumb: If you have dynamic keys, use an array. If you have fixed keys, use a class with declared properties
5
 
@Crell actually, I think the proper way to introduce that would be using generics one way or another…
Cannot think of a smart alternative where we still have proper typing
 
Right. I know it's not 1 to 1. I know there are PHP functions that can handle JSON encoding. I appreciate your help.
 
Long version, this presentation: https://www.youtube.com/watch?v=3mcGzBnSm1c&list=PLAi1rj7b0ApWScH6njlptekH-WjohZ3zs&index=5&t=1201s That's last year's version. The updated version for PHP 8.0 is even better. No recording for that yet, but the slides for the updated version are here:

https://presentations.garfieldtech.com/slides-never-use-arrays/mergephpug2021/
 
3:48 PM
I don't know if this would fall within native classes, but IMO one of the nicest things about TS is the ability to create type-safe interfaces inline:

foo(): { key: number, value: string } { ... }
 
If you're looking for the closest PHP equivalent of a JS anonymous object, then yes, it's an associative array. But PHP offers way better options you should use instead in most cases.
There is also technically a stdClass object, which is even more like JS objects, but seriously, no one in their right mind uses that. It's vestigial. Pretend it doesn't exist.
 
Don't you need to update your title in those sldies? :p
 
Ouch :P
 
At the time I gave that version of the talk, that was my title. I will update it for the next time I give that presentation...
 
Seems reasonable
 
3:51 PM
presentations.garfieldtech.com - All built off of Git tags made at the time the presentation was given. :-)
The next version will be de-platformed.
 
pfttt, do you think you're a student union or something?
 
@Crell do you have any docs you could provide on better options? I've been using stdObj. I was apparently reading old docs ....
@Crell this is a great presentation even if the jokes are bad.
 
@rguttersohn I warned people...
 
Severe underappreciation for dad jokes
 
The slide deck linked previously. :-) But basically, a defined class. (I get to that in the back half of the presentation.) Especially with PHP 8, a pre-defined, properly typed class with public properties is just as easy to use as an associative array, but more memory efficient, faster, more self-documenting, and harder to mis-use.
That said, PHP culturally tends toward not using public properties but having protected/private properties with useful methods instead. There are pros and cons to that approach depending on what you're doing.
 
3:57 PM
@Crell Yeah I am just getting to that part. I guess I should have watched the whole presentation first.
 
@Crell The pro being that you follow the cargo cult, right?
 
@NikiC The pro being that PHP has class-scoped visibility like Java rather than package visibility like Go or Rust. There's a strong argument to be made that design is wrong and package visibility is superior, and I buy that argument, but for now class is all we've got.
 
@Crell Ah so you should tend toward using methods to deconstruction rather than deconstructing .... I don't know what the word is ... manually?
@Crell one more question. Why the "\" front of the super class when extending? I've seen that in docs.
 
There's some deeply philosophical questions involved in all of this that probably warrant their own presentation, or at least long blog post. :-) But it's a question of whether an "object" is seen as a product type of other values more akin to a struct in C/Go/Rust (in which case accessing properties directly is fine and normal), or if it's an encapsulated type unto itself like in Java (in which case accessing properties directly is violating encapsulation, by definition).

Both mental models are valid depending on what you're doing, and what your language lets you do. PHP tends strongly
\Foo means "the Foo class in the global namespace. You can use` (import) it into scope instead if you prefer, but for slides it takes less space to reference it directly.
 
@Crell Package visibility would be fantastic. Getters are a pain, but I can't let my property be public since of course now it's technically API.
 
4:02 PM
@Trowski Precisely. Package visibility is why Go and Rust can get away with bare structs and a simple yes/no public flag.
 
I stay away from marking particular props/methods internal, but I have no problem marking entire classes internal.
 
The other reason for all-private objects is to simulate immutability, which you cannot (currently) do without forcing access through methods. @NikiC, did you figure out how to do do your accessor RFC without huge performance hits? :-)
@rguttersohn If you really want to go down the rabbit hole, I talk a bit more about all of this stuff in one chapter in my book, although it's overall on functional programming, not object modeling: leanpub.com/thinking-functionally-in-php
 
4:25 PM
SQL Server: Read NVARCHAR Unicode ・ PDO ODBC ・ #80869
 
4:44 PM
morns
 
5:24 PM
@Girgias Can you send me the PR you're working on? I might have half an hour tonight to have a look.
That is if you're still having issues with the grammar.
 
@IluTov Currently just a local branch but sure
I mean didn't really looked at it again
@IluTov I'm only trying to do pure intersections type atm: github.com/php/php-src/compare/…
As I haven't thought how to store the information for a more complex type like A&B|C or A&(B|C)
 
@Girgias It's just a tree, so IntersectionType(A, UnionType(B, C)) right?
 
I'd be fine with intersection and union types being mutually exclusive, frankly.
 
Brackets seem like a good way to go
 
@IluTov Yeah, but I need to fully grasp how zend_type and zend_type_list with all the macros work
 
5:34 PM
@Girgias I don't quite remember how they're stored, it's been a while since I've looked at that.
 
They have a type_mask which I'm using to add a bit for an intersection type, but currently if it's a list it just assumes it's a union
 
If it's not trivially possible and we have to refactor a bunch of stuff we might as well think about how to store other complex types like callable types.
@Girgias Oh ok, I see. So the type list is just a pointer to sequential class names or something like that?
 
@IluTov Basically that, thinking about all of this kinda at the same time, but I thought intersection types are probably the easiest to figure out lol
 
@IluTov It's actually to a list of types
 
@NikiC Oh ok, so it is a tree. So it should already be possible to mix union and intersection types :)
 
5:41 PM
yes, but writing the variance code for that is probably going to fry your brain
@Girgias I looked at your grammar issue, and things aren't looking good :(
 
:(
 
Let's just use the and keyword ^^
 
It's not a real syntax ambiguity, but it does seem to be ambiguous with 1 token lookahead
Maybe @bwoebi has an idea?
 
@NikiC Isn't it "just" you can add intersections but not remove them
 
5:57 PM
@NikiC Dirty solution could be to differentiate between & that are followed by T_STRING and those that aren't. Would disallow comments between them though.
Or probably rather those that are followed by $, because otherwise nesting with parens wouldn't be possible...
 
6:20 PM
@IluTov Need to take into account variadic params &...$args
 
@Girgias Ugh.
 
yes indeed
 
AMPERSAND_FOLLOWED_BY_VARIABE_OR_VARIADICS it is then ^^
2
 
Apr 21 '15 at 13:18, by Danack
Or we could just remove references from the language.
 
function foo($a {Foo&Bar}) { .. } ?
 
6:28 PM
@MarkR In that case I'd prefer to just use the normal parens, those should work fine.
 
@Danack That would be a great way too :D
 
6:48 PM
@NikiC nope, add a token more of lookahead
 
Hmm, bugger. I seemed to remember when I tried this before 7.4 autoloading using a classmap delivered 5~10% when loading 10,000 dummy classes, but on 8.0 it's practically zero. Well that sucks.
 
Disable the JIT?
 
@Danack 😍
 
@Danack … and introduce raw memory pointers instead, right? :-P
 
7:04 PM
@bwoebi nope, death to references and pointers
 
Going to have a hard time doing much of anything without pointers :P
 
@bwoebi nah. Out parameters and closure self-reference, and then hunt around for any other uses of reference that need an equivalent, but less insane, way of doing it.
 
@Danack +1 for self-ref
 
and as the original link has rotted: maven adoption curve
 
@Danack function() use (&$something)
 
7:11 PM
/me hisses.
 
@Crell you're also a maven survivor?
 
Maven as in Java? Have only barely touched it.
I was hissing at @MarkR.
 
@Danack God, I didn't know how great composer is before I tried other package managers.
 
@IluTov Amen!
 
@Danack The good thing is that plugins are quite stable. :P
 
7:13 PM
@Crell SsssSssss fellow Slytherin
 
Spaß ist verboten ok
 
It's a joke
 
Nein! Wir haben keine Witze hier! Das würde Spass bringen, und Spass ist verboten!
 
^ Genau
 
Is dis jetzt eine Deutsche Halle?
 
7:22 PM
Kann sein
 
Ok, gut.
 
Denke, wir sollten dem Deutschen hier fernbleiben, sonst muss ich mir am Ende nur Deutsch in verschiedensten Graden der Verballhornung antun. Und das muss nun jetzt echt nicht sein. :-D
 
vielleicht können wir alle PHP Funktionen auf Deutsch übersetzen
 
wehe :-P
 
Wahnsinn ... die namen sind schon manchmal zu lang auf Englisch
 
7:26 PM
@IluTov I understand that some things are shite....I find it harder to understand how people make stuff that is shite, when if their design process was "Copy what works in other languages" they do a lot better...
 
@IMSoP WENN, WÄHREND, FÜRJEDES, SCHALTER, klingt toll! :D
 
Ja umlaute sind der hammer
said no one ever
 
Excel does that, it's actually a huge pain in the arsch.
 
We should probably reinvent grass but with umlauts, for fun
 
p̈hp̈
bah, why you no combine my diacritics :(
 
7:41 PM
@Danack I don't understand it either. Some of the behavior is just outright stupid, but apparently the Java community is contempt with it so who am I to judge.
 
@il
 
Jun 6 '15 at 22:09, by Danack
For the record, this is why I do not think anyone should copy anything Enterprise level Java programmers have done. They've clearly, as group gone collectively insane.
 
@IluTov What are we talking about, union types or what exactly
 
@兜甲児 Maven
 
oh
 
7:43 PM
If you're referencing my last comment.
 
Isn't maven just a code repo ?
 
@IluTov Well, talking about recovering from maven...
 
My Java is not that strong but I think I know that far
 
@兜甲児 It's a package manager / build tool.
Wait, "package manager" / "build tool"
 
Yes I always thought about it as the composer of java
 
7:47 PM
just way more painful.....though they may have improved it since I last touched it...
 
@IluTov yes, exactly this, and please retain the typo in VARIABLE that part is important
m-m-m-m-m-m-multiping!
 
@DaveRandom It's not my fault, my fucking L key is broken -.-
 
*not you faut
 
from this article, it seems there is one thing that Maven did better than Composer: package name ownership blog.sonatype.com/…
 
7:50 PM
@DaveRandom Missed opportunity
 
I only ask myself when will we have Generics
 
yeh, totay ame
 
@Feeds swears oath of allegiance
 
@兜甲児 people are thinking about it: github.com/PHPGenerics/php-generics-rfc/issues but also....it may be hard to implement.
 
7:53 PM
@Danack fair response
 
HHVM has them right
 
@IMSoP great, so in your new role as my shill, your first task is to kick-ban @PeeHaa
oh wait is this not DMs?
 
Would wonder how they did it
 
@IMSoP though in the past I may have accidentally trojanned symfony before they locked down the rules....
 
7:54 PM
@兜甲児 Hack does most of its typing at "compile time" (i.e. offline static analysis); PHP does it all at runtime
 
I see
 
this severely limits what you can do without having your CPU spend all its time processing type assertions
one answer is to introduce an official static analyser to PHP, but that probably implies a bunch of other changes too
e.g. replacing class autoloading with a native "package"/"module" system, so that analysis can sanely span multiple files
 
IMO 8 could have waited a bit more including said features but that's a personal opinion
 
that would be "making the perfect the enemy of the good"
 
@IMSoP At some point PHP just becomes a compiled language.
 
7:58 PM
@IMS
 
@IMSoP or maybe not an analyser, but a preprocessor...like preprocess.io
 
@Crell PHP is a compiled language :P
 
@IMSoP Don't get it
 
I mean a fully AOT compiled language, not just a bytecode compiled language.
 
yeah, I realise that
 
7:59 PM
@Crell Please no.
 
but then, look at C# and Java - compiled to bytecode, full static typing
 
Oh I see
From which culture does this comes from ?
 
sorry, gotta go, my dinner's ready
 
@兜甲児 Italian, but common across Europe.
 
8:02 PM
Gutten appetit
Yes I kind of struggle with that
 
Quite a few people do.....and on an emotional level which makes it hard to escape.
 
Not sure if it's emotional I'm more about what will happen next
at least in my case
 
"more about what will happen next" - for example, someone might point out a flaw....
 
right I know I over do sometimes
But I kind of prefer that instead of cursing in the future
and cutting my arms with razor blades
that was a joke
or was it ...
lol
Typing seriously now, yes I struggle with that convincing myself it's a future feature
On the other side I was able to point flaws before releasing into the public, so
 
I'm trying to find a video, there's a guy who has some good advice that says "some of the time you have to accept the stuff you're working on is going to be bad"....
 
8:15 PM
Well if it makes your life miserable
It depends
For me it usually depends on what someone pays you for it
Since I'm not drawn to fruits or a healthy breakfast or any other in company sketchy marketing strategy a company may apply to it's employees
"I'm not drawn to fruits" <- Not the pacman guy ( <
I understand your point @danack
/me here here an apple!
 
base64_decode: Concatenated base64 blocks are corrupted ・ Unknown/Other Function ・ #80870
Incident on 2021-03-15 20:38 UTC ・ GitHub Pages has Major Outage
 
8:39 PM
Is there a way to use this chat on a console ?
the white bg is kind of killing me
 
there's probably plenty of custom stylesheets out there to "dark mode" it
 
Would you support a minimal set of scalar methods for arrays (like map, filter, values, keys, etc)? I started creating an RFC for scalar extensions last year (wiki.php.net/rfc/scalar_extensions) but it seemed internals are more interested in a fixed API that is not extensible in user land. But creating a fully fledged API will likely never happen.
 
Could you TL;DR me: What will happen once it is supported natively in PHP?
Say I extend string using 'myString'->toUpperCase() and PHP implements it afterwards
 
Jan 17 at 2:53, by Wes
@DaveRandom you are welcome html{ filter: invert(100%) !important; }
 
@PeeHaa Well, basically the first RFC would just make sure adding scalar methods easily is technically possible, and add 1 or 2 basic scalar methods, new ones can be added by new RFCs.
@PeeHaa Oh, no I abandoned that idea.
What I'm suggesting is just an internal API.
 
Ah. Sorry for being lazy. I just saw userland and thought that was what it was meant for
 
@IluTov I think leaving it to userland would be really problematic as the type hints would be mostly meaningless as they wouldn't imply the methods attached (without some kinda odd foo((int&MyExtensions) $bar)
Ye know what, I see you already thought about using 'use' to define which ones apply, interesting workaround
 
@MarkR In my initial proposal extensions were scoped to the current file. So you wouldn't have that problem. If you wanted to use an extension you'd have to import it in any file you're using it. But as mentioned, I'm not suggesting it for userland, but instead to start with 1 or 2 methods as a POC, and then extend that API with new RFCs.
 
@Danack this is decent
Thanks
 
@IluTov so internally defined?
 
8:53 PM
@MarkR Yeah. People weren't happy with that approach as they were lacking trust in userland to come up with a good API for scalars.
 
Reddit designed APIs \o/
 
Aye I'd agree with that. There's definitely some low hanging fruit in arrays and strings. Cloning some JS apis wouldnt h urt
I seem to remember the major problem was that the source had to be immutable?
 
Would be nice to have a scalar type hint
 
@MarkR Right, there were issues with references if I remember correctly. So something like $foo[0][1][2]->push($x).
 
@兜甲児 Would it really though?
 
8:58 PM
Why not, I mean we have union types now
 
@兜甲児 yeah, it'd be nicer to allow users to define it in userland. Something like `type scalar = int|string|bool|float;
 
instead of typing public function something() : int|float|string
public function something() : scalar
yeah
exactly
@dana
@Danack
Would be cool if it's defined in the core tho, less typing
 
(Sorry if you've already gone over this) That posses the question of adding immutable versions or waiting to see if that problem could be solved....

e.g. [].sort() could return a new array, which seems fine, or it could just not get implemented and wait until references work and sort itself.
 
Yours doesn't have bool though :)
 
@PeeHaa Missed that one sorry :)
 
8:59 PM
The problem is.....why would scalar be that much better? as the only benefit is a few less letters, but the cost is having to implement, and users having to understand, one more thing....
aka one more thing to learn...
 
@MarkR Yeah, I don't think we need push, and mutable methods don't seem like a great idea in most cases anyway.
 
@兜甲児 In most sane APIs you really do not need it that often
 
01:00 - 21:0021:00 - 00:00

« first day (3803 days earlier)      last day (1138 days later) »