« first day (3571 days earlier)      last day (1367 days later) » 

12:03 AM
What IDE do you guys use for C?
 
CLion if I use an IDE. vim for normal editing
 
vim in Linux; VS Code, Jetbrains IDEs in Windows
 
 
11 hours later…
11:03 AM
Huh, 11 hours.
 
@Tiffany not so much harder to write clean code, just a bit harder to write any code imo. it's not so much that the splfile stuff is poorly written it just starts off on the wrong path and then continues from there. If I had to break the problems down it would be something like:
i) Using inheritance when it shouldn't be used https://www.php.net/manual/en/splfileobject.getchildren.php
ii) Making an OO abstraction of some functions that don't need to be wrapped.
iii) making objects be iterable rather than being able to pull the data out of them (imagick has that also and am thinking of removing it at some point).
 
11:19 AM
I wish I could save single messages without bookmarking a convo in SO or starring. I guess the closest I can do is bookmark a link to a message in my browser.
@Danack #1 seems pretty silly, like an almost dummy method that serves no purpose. Does it even work?
 
btw the same problem affected the recent ServerRequest RFC. I can see that using objects can feel slightly nicer....it's just that everything is a tradeoff and the tradeoffs of sticking things can be 'just' functions into OO style are bad.
@Tiffany it's to satisfy the interface: php.net/manual/en/class.recursiveiterator.php .... btw it looks like either the docs or possible the code for splfileobject.getchildren is wrong....it should probably return an empty iterator or null.
 
Yeah, I can see that now. There was a comment I saw yesterday on Reddit that brought up the tired argument surrounding @, and the commenter pointed out SplFileObject, and I wanted to understand why it wasn't viable, assuming that it wasn't a viable alternative to fopen.
 
ugh.....why don't we have null as a type....
 
@Danack is it feasible?
 
@Tiffany what confuses me, there is literally no barrier to entry for building an open-source library of new nice APIs as a composer package first, try getting some traction. however nobody seems to do that approach (outside of frameworks), or they do but I don't see them because they have no traction
 
11:28 AM
@beberlei for file system management?
 
yeah, like Symfony Filesystem, but aimed at being standalone for example
i had some fun with trying this for strings, github.com/beberlei/stdlib
 
It's strongly tempting to try taking up that mantle but I'm not sure managing an open source library is I want to do long-term... but then again it is good experience...
I need to finish a project first...
 
11:43 AM
so amirite that i don't need strict_types anymore when both saner RFCs are accepted? :D
 
Can the postgres extention of amphp be used for approx. the same amount of concurrent database connections?
For example, if there 5000 connections to a PHP instance running amphp, can there be 5000 concurrent database connections to the same database server instance on a single machine?
 
@beberlei If you don't mind getting silent float to int conversions, sure
 
@Girgias i don't, my general rule about floats is, use them only for things where you don't mind precision loss. under that rule a precision loss of up to 0.99 does not cause me pain.
 
The only other weird edge case might be bool -> scalar conversion
 
11:58 AM
what about null as a state of any scalar, just like in db's ?
 
12:08 PM
I just tested that 10k+ new async connections from PHP to Postgres works like a charm.
good evening
 
Im using laravel vapor and My life is easy already. but everyone talking about kubernetes and docker. Does docker really make life more easier. ?
 
12:26 PM
@imsop Chris meant Doctrine. And replying with "but @ocramius likes things much stricter than is typical for the typical PHP project, so we heard but ignored that", would be accurate, but not exactly end the conversation.
@Fasilkk docker solves some problems for some people....if you don't need it, then probably don't use it.
 
@Danack i also work on doctrine, as does alcaeus and guilherme, we all voted for named params :)
 
You don't rant and tell people they are "doing it wrong"™ enough....in some people's opinions.
@nikic random thought I haven't really thought through properly. Rather than opt-in for whether something can be called by named params, opt-out would seem to be less work for the majority of people.
 
in addition to @@NameAlias, maybe a @@PositionalOnly attribute that can target both functions/methods and classes
 
12:42 PM
$query = DB::table(table);
$item1 = $query->where(key, val);
$item2 = $query->where(key, val);

When I try $query->toSql(), it shows that where is being repeated twice. One of them is the condition of $item1 and the other one $item2

SELECT * FROM table WHERE key=? AND WHERE key=val

When I comment $item1 or $item2 it works fine.

Why? How can I solve it?!

#QueryBuilder
 
@X4748-IR that sounds like a bad API in the library you're using. Is there a "andWhere" method?
 
No! It's Laravel's query builder API.
When you chain where conditions it means `AND WHERE`
 
that seems... a bit odd? I can imagine ->where building up an array of ANDs but... why would it ever have the WHERE included each time
 
Somehow it chains the same query. Maybe it keeps the last query in a cache or something! But it's weird anyway. 🤷‍♂️
 
1:16 PM
@Danack Yes, I think opt-outs (both for positional-only and named-only) are a good idea :)
 
@X4748-IR: It looks like you need to chain the methods / use the return value of the first call the ->where() to call the second: laravel.com/docs/7.x/queries#where-clauses
 
1:34 PM
@NikiC I know this is pretty much too late but have you thought about only allowing named parameters for params with default values? When are named params really useful other than for default values?
If you just want labels, PhpStorm can do that.
 
@IluTov Nope, it can't
PhpStorm is (apart from the "constants only" case) too all or nothing
Enabling the parameter hints to be always displayed is just way too noisy, because a non-human can't reliably distinguish where they are useful and where they are just noise
To give one example where named parameters are often (but not always...) useful without a default value is constructors :)
 
If you make named parameters only usable with default values, I would bet money people will start adding default values to every parameter inappropriately so they can use named parameters
 
@AllenJB But that makes you responsible for maintaining it. Library maintainers wouldn't do that.
@NikiC Yeah I guess. I've disabled them because I find them too noisy.
 
2:19 PM
@NikiC Would you like to chat about wiki.php.net/rfc/namespaced_names_as_token and how the whole parser shift/reduce things work (which "fixed" the @@ conflict) for the podcast?
 
3:00 PM
OH FFS VCS update on the online doc editor while I'm working on it :(
 
3:19 PM
@Girgias testing you're paying attention?
(bad joke)
 
@Tiffany :(
 
@MarkR how's your kitty?
 
right now, stood on my chest refusing to let me brush her teeth but demanding I feed her the toothpaste
 
lol
you said you had to bring her to the vet a few days ago
 
oh ya, once i got there it was cancelled because they hadn't told me about no food or water for her, so it's been pushed until tuesday
 
3:22 PM
morns
 
I'm going to be bringing mine to the vet tomorrow, hopefully both are okay (your cat and my cat)
@mega6382 \o
 
@Tiffany you, nice avatar, when did you change it?
 
a couple weeks ago, I commissioned an artist off twitter for something new
@mega6382 here's what more of it looks like i.stack.imgur.com/Rhli4.png
:D
 
hahaha, that's really cool
 
3:26 PM
is it in your likeness?
 
yes, I sent the artist a few photos
 
wow, it looks great.
 
thanks :D
 
:D
 
i don't know what to think of the renamed attributes RFC, this propoes two changes which were the most discussed parts of the original proposal and explicitly mentioned as such
 
3:29 PM
@beberlei renamed attributes or renamed parameters?
 
@Tiffany parameters
 
I've reading to do
 
@Tiffany its essentially a.) move userland functions from "all are enabled by default" to an opt-in only approach b.) allow specifiying an external name for an argument
 
cmb
FF is in a week
 
RIP namespace RFC for 8.0 D:
 
3:40 PM
-for 8.0 :p
 
Yeah but eventually it'll get to PHP 10 after 500 more classes have been added root and people will be going... shit we should have adopted those RFCs 8 or 9 years ago.
 
that would be pretty exponential growth, from 2 new classes in php 8, to 500 in 9 and 10? :D
 
@beberlei Well if things end up moving to (optional) exceptions that's potentially a couple of hundred across all the differing extensions.
 
corrections, 4 classes Attribute, PhpToken, WeakMap, Stringable
 
@beberlei That's ignoring all the resource to object conversions
Based on INIT_CLASS_ENTRY I think we're up to about 140
 
3:50 PM
@MarkR We should call the vote... It's not like it's impacted by feature freeze, though, since nothing could change pre-8 at this point anyway.
 
@Crell Aye go ahead. Shame we couldn't have got all the extension classes into it but I guess we can always alias down the line
 
I always expected that to be the case.
 
If it passes hurrar, if it fails, wouldn't be the first time PHP shoots itself in the long-term foot :P
 
OK, so what's the process for activating the voting widget thingie?
heh.
 
Steal the code from one that's already open for voting
and just change the tag attributes to the question
and then set the status at the top to voting
Probably want to change the target to 8.1 as well , and then announce on the forums.
 
3:58 PM
It never ceases to amaze me at how PHP still operates given the amount of duct take and bubblegum holding everything together.
 
@beberlei how would you specify an external name for an argument? And I'm curious how the implementation for opt-in would look...
 
@Tiffany function foo(@@NameAlias("bar") $foo); and @@PositionalOnly function foo($foo) { }
 
@Crell we're filtering comments on bugs from a user by using regex to match his Gmail account and his domains... but I dunno what would be a better way to do it
There's no "block user" in bugs.php.net
@beberlei not sure if I like that :/ using attributes to get the job done feels a little hokey
 
@Tiffany Er, huh?
 
@Crell At the top change under discussion to voting
 
@Tiffany attributes have the benefit that they dont pollute the keyword space and leave much more room for extensions or alternative approaches later. in addition since this feature has a primary use case of being "named + positinal enabled by default" and aliases being discouraged, sort of a workaround for refactoring, using attributes makes it clear that is only secondary functionality
 
Done. Also moved it on the RFC index page.
 
!!rfcs
 
There's too many for poor Jeeves
 
@Tiffany Um. I am still missing context. Are you perhaps trying to talk to someone else?
 
4:08 PM
@Crell you said you were amazed at how much stuff was held together by duct tape and bubblegum... that was something in my mind that felt like a bubblegum fix
 
It's not entirely surprising though, internals has more experienced C programmers than actual PHP programmers I would expect, let alone full-stack.
 
@MarkR one of the reasons I'm trying to avoid contributing to internals, I don't want to become a C dev :P
 
I burnt 2 months on php-web.markrandall.uk when I should probably have been focused on C, then Covid hit and other than one resource to object conversion and get_debug_type I'd managed to do sod-all in the src
 
COVID threw a wrench into a lot of things :/
 
I was hoping to deploy the latest revision of my product and then rest... instead we ended up moving the entire company onto virtual events and going 20x the number of users.
 
4:16 PM
hopefully at 20x of the revenue? :D
 
@Tiffany Ah.
 
Wouldn't know, I'm just a consultant, but I know we're doing rather well... every association moved into virtual events overnight, and we were already one of the most well known companies for it
 
@MarkR So anything else before I inform the list?
 
@Crell Have you sacrificed the virgins? or at least a book by Richard Branson?
 
I sacrificed a goat. I don't know if it was a virgin or not...
 
4:22 PM
It will have to do.
 
Email sent. Hopefully I didn't screw anything up. :-)
crosses @MarkR's fingers
 
FWIW I think it's a realistic RFC that solves a legitimate long-term problem.
But don't forget to vote wiki.php.net/rfc/php_namespace_policy (sorry, I forgot ._.)
 
5:05 PM
I don't actually have voting rights yet. :-)
 
Aye I remembered only after I said it. We should work on getting you them, you certainly qualify due to your involvement in discussions.
 
> you certainly qualify due to your involvement in discussions.
People need to do some actual work, not just take part in discussions. Otherwise Lester and Tony would qualify for votes.
 
I'm not familiar with the names
 
Well let me narrow it down a bit... productive discussion.
 
5:16 PM
No (imo). Doing work is the barrier for getting a vote.
 
The last time Zeev reminded everyone about the existing RFC that says contribution can be more than just code, a whole lot of people flipped their shit.
 
and discussion isn't the work.
 
Hence why I've avoided inviting that sort of shitstorm.
 
Technical discussion is the key to doing the work right. If it were not, we wouldn't need a discussion period for RFCs
 
@Danack I have to disagree with you there. Just sending emails isn't itself "work", but research, architecting, and detailed review absolutely are work, just as much as documentation is.
"You don't count unless you've written fugly pseudo-C" is a bad take, and is the exact opposite of what most healthy OSS communities are messaging these days.
 
5:18 PM
well contributions can also be doc changes, or one of the many php based infrastructure software that we run
 
Or any of the tools that people use e.g. the doc builder software.
 
I have done a few docs; plan to do one or two more at some point when I get the time.
 
I remember when I first found R11 after only participating in the ML. It was a case of "whowa, this is where things actually get debated and done"
 
@MarkR I've heard that a lot, and now experienced it.
 
Voting rights have been given to people who've had RFCs successfully voted and implemented
 
5:28 PM
I am curious as to how many people use PHP day-to-day though.
 
that vote?
 
That, and engage in discussion. It was one of the things that I did notice when I joined here, there wasn't so much discussion about the actual application of PHP
 
if you're going to propose anything close to "people who take part in discussions should get a vote", please can you look back through lester's emails, and figure out how to propose it in a way that doesn't allow people like him to get a vote. He actually had a good point (1 email in a 100), but his overall contribution to internals was massively negative, due to taking up other people's time.

If people see someone getting a vote, due to just taking part in discussions, then we are likely to be swamped by even more people throwing ideas at the wall than we are currently.
 
@MarkR i am in other channels to chat about the use of PHP
 
@beberlei On here?
 
5:36 PM
PHP illuminati
 
no, slack channels mostly, the symfony one, our private company chat, several chats with different groups of friends
plus on github PRs code review and such
the doctrine slack obviously :)
 
Ah gotcha.
 
pre corona also usergroups, conferences and such :)
 
PHP Yorkshire got its date nerfed again (it would have ended yesterday), to the surprise of no-one... at this point I just want the elephpant from it D:
 
bollocks, I wanted to try attending the one usergroup that meets every odd month...
and I forgot :|
 
5:43 PM
thinking back, everything i did with php can be traced back to that conference in 2008 where i met a few people from the then ezComponents team (a large framework at the time), got invited to their secret chat channel, they became my friends, i started working at their company 4 years later.
 
What's the plan with this mini online conference I seem to remember Danack getting starred for in here?
 
August 1st... 1PM my time...
that's like... 6PM UTC I think
 
I think it said 6pm BST, but it seems gone from the list now
 
it's just been unpinned
Jul 10 at 12:23, by Danack
1st August, 6pm UTC PHP social meetup. Suggested format will be lightning + short talks i.e. 5 minutes to 20 minutes in length, followed by some questions. Almost certainly will be using whereby.com for the communication channel. So will be hassling people to volunteer for talks closer to the time.
 
ty Tiffany
 
5:53 PM
refreshed the pin
 
ah, so 7pm BST
It's a Saturday :-/
 
@Derick bad time for you?
 
I'm usually not around on weekends :-)
 
make an exception? :D
granted, I see it as more of a social event than something work-related, which it's probably different for you
 
Like Saturday afternoon would work, but I don't think the Mrs would be pleased about the whole evening thing...
 
5:56 PM
ooh
 
I'm going to make dinner. ttyal!
 
@Danack To be clear, I don't think "X number of posts on the list ever" should get you a vote. That's why I have never applied myself yet. My point is that "code or GTFO" is a pretty terrible definition of "contribute," and that the planning/architecting/"talking" that goes into making a project fit together is just as valuable as code, if not moreso. Number of posts is not the way to measure that, I agree, but don't discount the value of architects and project managers.
 
But what if Lester tried arguing that his emails are "planning" or "architecture" related? There needs to be clear wording to shut that down immediately.
 
Nothing needs to be set in stone. If existing members think your contribution is deserving of it, whatever that contribution may be, that seems like enough.
 
nepotism/favoritism
 
6:11 PM
Yes. There's a reason there's a vote, not just an automated script.
"Code only" doesn't prevent nepotism either. :-)
 
True
It can be argued that I'm pretty lucky to have my account and possibly related to favoritism because I'm not involved with internals that much but I've hung out here for a few years and just happened to provide some doc contributions for 7.4
(though, I'd like to believe the contributions I added were substantial enough :) )
 
Nepotism usually suggests giving power to those who are friends before, in this case, people tend to become friends from working together on things.
 
Vote's not going great so far. :-/
 
Sure, it'll probably fail, but we knew that already. Opinions in this area are rigid and are unlikely to change until it becomes so much of a problem that it can't be fixed.
The only thing we can do is make the argument as best we can and hope people see the light before it's past the point of no return
If it helps, just imagine the colourful language that would be used by a project lead when doing a code review for a PR that included 140 mostly disconnected classes in a single namespace :D
 
6:48 PM
@Tiffany It for sure is also a bit a matter of trust from those who can give karma :-)
 
 
2 hours later…
I like how the top comments are random people complaining about how other people spend their time
 
@Crell it isn't "code or GTFO". contributing to docs more than a few times is also a way to get a vote.
 
Jul 2 at 16:21, by Tiffany
@Crell a trick (courtesy of @DaveRandom)
 
I'm really liking webpacks abilities, i'm going in heavy on Typescript the past couple of months. I do wish it had PHP's type-restricted catch statements though.
 
8:52 PM
What do you guys think about using the word "spearheaded" as an action word in a resume? I can't tell if it's an outdated word or if I'm just not familiar with it
Also if anyone wants to review my resume and give me tips I'd be ecstatic
 
a resume writer put spearheaded on mine
> Spearheaded mobile app project including requirements gathering, cross-functional collaboration during design and development phases, and successful deployment through Apple and Google channels while serving as project lead.
¯\_(ツ)_/¯
 
I guess it sounds good then lol
 
9:43 PM
@Crell I'm torn about which way to vote. On the one hand I think namespaces should be used for certain built-in functionality (particularly extensions). On the other, starting to introduce them after so many years feels like it would lead to even more inconsistency in the standard library. Also the restriction on only autoloadable symbols being namespaced feels arbitrary. Why shouldn't functions (say, for the Sodium extension) also be namespaced?
 
@TheodoreBrown That was my call, and it was because they cannot be autoloaded and by extension pollyfilled.
At least without the need to hit them each time, which while not a big hit, isn't exactly nice design
But regarding consistency... it'll have to be done eventually, unless our intent really is to keep adding hundreds of classes to the root. Better to bite the bullet now IMO, that way 10 years from now the vast majority of things will be namespaced (or at least aliased)
 
9:59 PM
Danack posted a tweet about it earlier :P though I wonder if it supports 7.4 or 8
 
github.com/wasmerio/php-ext-wasm this one looked interesting
 
@Tiffany It's only a subset of PHP, I wouldn't expect it to be anywhere near complete.
Ok, they actually say "Almost all of PHP 7 syntax is supported. Most constructs do vaguely what you'd expect." Not sure what that means though :) Wonder if they actually got all of the quirky behavior right ^^
 
Most constructs do vaguely what you'd expect... was the design of PHP for most of its lifetime :P
 
> Not going to happen: Copy-on-write arrays. In JS they're passed by reference.
That alone will break probably almost any PHP program ^^
 
Impressive all the same.
 
10:19 PM
@MarkR What does that have to do with namespaces?
A namespaced function or a non-namespaced function doesn't matter as far as autoloading is concerned
 
@NikiC As more features are added, or OO interfaces created, I'd expect it likely that the community would want to backport many of them as a means of providing a partial upgrade route.
Autoloading seems preferable to importing a large number of classes / constants / functions at the start of each request.
 

« first day (3571 days earlier)      last day (1367 days later) »