« first day (4318 days earlier)      last day (613 days later) » 

2:17 AM
Apparently PECL is down.. And it does seem to be.
 
 
4 hours later…
6:10 AM
posted on August 12, 2022

 
 
1 hour later…
7:37 AM
Morning all
It just came to my mind
We all know that it'd be nice to have real generic types, but I was wondering if in all previous discussion the topic of ::class constant name that exposes the type as a string was ever touched.
There was a GH repo somewhere where all previous thoughts were materialised
 
 
2 hours later…
9:40 AM
@dhiaagr Not even DTOs?
 
@OlleHärstedt The only DTO is I ever needed are either dicts, or json objects
 
@dhiaagr Maybe you're the only maintainer of your code?
 
I believe I should point out that I'm not a PHP programmer, not since discussion boards were all the rage. Server side, I use Python.
I was just surfing chat rooms and the conversation about FP vs OOP caught my attention.
 
kk
Never used Python, so no opinion there from me :)
 
May I take a minute of your time to tell you about our lord and savior Guido?
I'm kidding. ; )
 
9:47 AM
I prefer community driven approach to languages, I think
 
What do you mean by that, if you don't mind me asking.
Oh as in opposed to having one decision dictator?
Well, I can understand.
 
10:33 AM
where is your /public/ url in the route?. remove /public/ in your address bar or define in route like $routes->get('/public/test', 'Home::test');starlings 14 hours ago
Can Anyone Help me here. I am stucked here for last 3 days.
It's Codeigniter 4 configuration issue
 
 
1 hour later…
11:38 AM
Morgens 11
 
11:49 AM
Happy Friday
 
12:26 PM
o/
 
 
1 hour later…
1:32 PM
\o
 
@NomanJaved the path shouldn't have 'public' in it. The location / in your webserver should point to the directory public on your hard drive.
 
2:27 PM
@cmb Just wanted to draw your attention to: bugs.php.net/bug.php?id=81072&thanks=1
 
cmb
@Derick Thanks. Your explanation makes sense; although DST does not.
 
DST never makes sense :-D
Ideally when doing negative operations PHP would do underflows, but that's not consistent, and will definitely break code. I don't like the current way either, but it is what it is.
 
@Derick what is the proper way to do calculations across DST in a given timezone then? short of subtracting seconds on the unix timestamp …
 
If you want actual physical minutes, you will need to use ->SetTimezone("UTC") first
 
that's … unintuitive.
 
cmb
2:38 PM
It's also not intuitive, that there a hours which are 0 minutes, and hours which are 120 minutes long.
 
@cmb it's an hour which is repeated 0 or 2 times, not an hour which is 0 or 120 min long :-D
 
3:31 PM
There are so many shitty comments underneath all the date time stuff. Removing them all (and incoroporating the useful ones into the manual).
 
@dhiaagr You need to watch my "Never use arrays" talk: youtube.com/watch?v=nNtulOOZ0GY
@Derick yay!
 
4:01 PM
@Derick You're truly a star. If I could I would give you a cookie.
 
cmb
If you're surfing the Web nowadays, you get cookies all the time. :p
 
4:32 PM
nom nom nom
Take #1 done. Let's hope I didn't break anything.
 
@Crell Tf is this datatype, lol
This is insane.
 
Which?
 
The associative array.
I don't understand how the looping over the array would fail.
 
Hey, does anyone want to discuss where the best place to put {} is in code? Should it be the same line as the function declaration or the next line? And what about if/else statements?
 
If it's similar to Python's:
 
4:41 PM
@Danack I do 100% not want to discuss that!
 
I can't wrap my head around it. It's neither a list nor a dict.
It's actually the worst of both world. I'll keep watching the video.
 
@Danack Everybody talks about the same line or the next line. I wanna see a blank line between the function declaration and the brace.
 
re: github.com/php/php-src/pull/9304#pullrequestreview-1070449987. I was looking into delegating to php_setcookie there, but all the session globals are plain char*, whereas php_setcookie expects zend_string. Is there some easy way to convert a char* into a zend_string or will I need to update the globals to be a zend_string?
 
@TimWolla One way is zend_string_init.
 
function youAintNeverSeenThisOne()
 {$someVariable = "told you";
  echo $someVariable;}
 
4:47 PM
Thanks, but that doesn't qualify as "easy" in my book, because I also need to release the resulting string for what's effectively a readonly use.
 
everyone's like, next line, same line, how about next line but also on the same line as the first line of the body, with one space less
@PeeHaa should remember it, I think he's the first one commenting on that indentation style on one of my first questions, years ago
 
@dhiaagr PHP arrays are ordered dictionaries. Always. Which leads to some entirely awful problems, like the ones shown there. The second half of the talk is more aimed at your "I just use dicts" comment. :-)
 
@Danack Stick with PSRs (i.e. 1 and 12) or provide a juicy reason and example[s] of alternative. I see them (PSRs) very consistent and (therefore) easy to remember.
 
cmb
@Danack If it is a named function (or method), the opening brace needs to go on a new line. If it is an anonymous function, the opening brace needs to go on the same line. Not because it makes sense, but rather since the respective PSRs say so. :p
 
@Tpojka Except where braces position is concerned, then it's bonkers. :-)
 
5:01 PM
@Crell I implement it PSR way and never had an issue. That's why it's there 'give me better reason of why should I use it differently (i.e. what's the benefit of an alternative example)'.
 
cmb
Actually, the concrete style doesn't matter much, as long as everbody working on a particular software adheres to the same style.
 
^ the actual answer to which coding style you should use
 
cmb
@FélixAdriyelGagnon-Grenier That's called LISP-style. :)
 
@TimWolla Update the session globals to be zend_strings? :D
I might do that if needed...
 
@cmb :O hah! nice
 
5:05 PM
Having trouble to find something that I doesn't take me huge amount of times as I'm struggling to get work done
 
@Girgias I'm currently looking into that, but the rabbit hole goes deep. It would be the perfect job for Coccinelle, but I likely lack the necessary "background" in php-src for that.
If you want to have a look at it, feel free. Let me merge the existing PR first, though.
 
@TimWolla I'm used to those rabbit holes
 
Okay, I'm currently waiting for AppVeyor in my PR, because that one already fixes the issue (even if not as clean as delegating) and adds a test. Afterwards you may :-)
 
@FélixAdriyelGagnon-Grenier PeeHaa kicked @FélixAdriyelGagnon-Grenier from the room and cannot talk for 5 days
 
@Crell PHP doesn't deserve your skills.
 
5:12 PM
@PeeHaa :D
 
@dhiaagr LOL. Um, thanks, I think?
 
The framework I use has a module with many types of dicts, any I want : Werkzeug Datastructures
@Crell I guess I should reformulate:
I never had to write a class of my own, because I'm always standing on the shoulders of smart of people such as yourself. People that made classes of their own and handed them to me in the form of easily usable datastructures.
 
@Girgias Also definitely have a look at coccinelle.gitlabpages.inria.fr/website, if this kind of rabbit hole is your thing. It likely saves you some work, once you get up to speed with Coccinelle.
I have not used Rector yet, but that thing basically is Rector for C, but with a much nicer transformation syntax.
 
@dhiaagr Please learn to think in terms of formal data structures yourself. Especially with PHP 8, writing dedicated value objects for your own specific use case is incredibly easy. You need to do that. No one else can write a class that will do that for you, because it's your app.
 
Right, will have a read
Haven't been doing much this week other than playing GW2
 
5:18 PM
@Crell I don't use PHP, lol. I was just surfing chat rooms and your conversation about FP vs OOP caught my attention.
 
I know less about Python. But my point remains: Properly modeling your data in code, with whatever mechanism your language offers, is incredibly important. And languages that have very weak ways to define the problem... are inferior to those that make that easier.
 
Oh a Python user
 
Gah, snakes!
 
Let me get my flute to tame them
 
that'd make for an excellent python package name. fluteOs, taming wild python applications since time immemorials
 
5:21 PM
And what I was trying to point out, is that I see a lot of people using classes blindly just because they've been bombarded with them. Where they force their problem into a prototype that isn't ideal.
 
@TimWolla Gosh the presentation typography is horrendous
 
@Girgias Is that what you kids call it nowadays?
 
e.g: Class user inherits from class human inherits from class being. When a ORM db class suffice.
 
That's a completely unrelated thing???
@PeeHaa Enlighten me
 
@Girgias Oh, nice. They are doing the OpenBSD thing with Comic Sans. I didn't look into the presentations, because I "learned by doing".
I'm by no means a Coccinelle expert, but here's some real world patches with different levels of complexity of mine: github.com/haproxy/haproxy/tree/master/dev/coccinelle.
 
5:28 PM
Yeah maybe examples are better
Ngl the website is, less than user friendly in regards to navigation
 
cmb
@Girgias NSFW ;)
 
Ah
Ah that kind
 
It's Friday, sorry :-)
 
@Girgias Good programmers are usually not good (web)designers :-) Coccinelle was built for the Linux kernel, I guess they are happy if it works for that without having a desire to be known elsewhere. I learned about it by my HAProxy contributions, the project lead of which also is a Linux kernel dev.
 
i'm not asking for much I feel
But sure
I feel I need to learn how PHP actually deals with INI settings
because I'm stuck in macro hell again
 
Yeah, not really
Because ext/session seems to be doing something highly non standard
 
er, you might want to get some petrol and a lighter if you're looking at the code, probably.
 
Not the first time, and I know
Well it might be "standard" but it's pretty weird
I truly hate the amount of macro usage
It can make stuff simpler sometimes, or goddamn harder othertimes
Okay the change should be easy
(yes yes I'm commenting and ranting live)
 
@Crell Terrific videos and I loved your concepts. They are necessary for a language that is severely lacking when it comes to data structures while having the concept of private and public properties.
And I took your explanation of what the code does at face value because that syntax looks like a binary file opened in a text editor to me : P
 
@dhiaagr "severely lacking when it comes to data structures" huh? like what, what is lacking?
 
5:51 PM
Excellent question.
@FélixAdriyelGagnon-Grenier Here you go: youtube.com/watch?v=nNtulOOZ0GY
 
... I am aware of the video, yes, and it is absolutely not an answer to the question "what data structures are lacking in php"
 
For starter: Purpose-built data structures.
I watched crell implement several data structures that should have come in a standard library bundled with the language
 
.. so like, you don't really use php, then you watch one video about arrays and comment on what the language is fundamentally lacking?
 
Not reasonable, I guess. But I never pretended to be reasonable.
 
6:13 PM
Ah great
I've got an ASAN error trying to run tests on master
 
I should check github notifications more frequently
 
@Derick Indeed not. It would be a tedious conversation where people mistake their own aesthetic preferences for universal truths. And more importantly, no-one has actually asked for advice, instead they would just be showing off their own preferences.
 
it's funny, I did an ADHD bootcamp last month to help me organize my apartment, but it also included time for tackling digital organization like an email inbox...which I didn't bother with because I'm okay with my inbox being a clusterfuck... github notifications however...I should organize those
 
hint-hint everyone.
 
:P
personal preference...who has those
 
6:17 PM
@Tiffany everyone.
Jul 25 at 18:02, by Danack
user image
 
6:33 PM
@FélixAdriyelGagnon-Grenier an O'Reilly book
which probably already exists in some form
 
6:47 PM
@Derick FYI we don't document PHP 5 any more on the docs
 
7:11 PM
build is broke :(
 
Deeeeerrriiiiiiiiiccckkkkk
Man fuck GC issues, you get useless stack traces
 
I'm procrastinating, I'll see if I can fix it, if someone doesn't beat me to it
oh, there's more than one issue
4 mins ago, by Girgias
Deeeeerrriiiiiiiiiccckkkkk
 
so very much that
 
7:27 PM
Looks like only 3 build-breakers. *puts on encouraging voice* You can do it! :)
 
I don't know how to fix this one
 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   &date.datetime.return.modifiedobjectorfalseforfailure;
  </para>
 </refsect1>
does it not allow <para>? or may be has to be contained in some other containers
nevermind, I'm looking at the wrong line
opened a PR because I don't trust my code
I should remove the PHP 5 thing while I'm at it
errr, actually, doing a project search for <entry>5. pulls up more than just datetime, so I don't feel comfortable removing it, as a not-regular-enough contributor
 
7:54 PM
It's totally fine to remove the one added today. The other will get swept up at some point, it doesn't need to be done all at once.
 
@Girgias I know, so?
 
You put a changelog entry in your recent commit, those you don't need
 
  <row>
   <entry>5.2.2</entry>
   <entry>
    Support for microseconds was added in both date/time parser, and
    <methodname>DateTime::format</methodname> through the
    <literal>'u'</literal> modifier.
   </entry>
  </row>
 
Oh, I think I just synced two
and it was a comment in a user note DELETED
i'm gonna drink some more beer — if it's still broken by sunday i'll have a look.
 
build is fixed :P I think
 
7:59 PM
ok even better
 
will remove that entry
 
8:25 PM
morns
 
Sad, horrible news. This is a syntax error:
```$a = [ // ?> <?php
1, 2, 3];```
Can be made shorter
$a = [ ?> <?php 1, 2, 3 ];
Anyone knows why?
Different error in PHP 7, but still breaks
 
> The closing tag of a block of PHP code automatically implies a semicolon; you do not need to have a semicolon terminating the last line of a PHP block.
From here: php.net/manual/en/…. The error message also strongly hints at that.
 
@TimWolla Weirdest thing I've heard today, haha
 
What exactly? The quote from the manual?
 
8:37 PM
The implied ;
But guess it makes sense in HTML template logic, hehe
Sadly, it hurts my cold golfing :(
I was so close!
 
It also makes sense, because it prevents you from splitting a single statement, giving the construct at least some sanity.
 
@TimWolla But why wouldn't // comment out the semicolon?
This one works: 3v4l.org/RCOdY
So it's not implied the character ;, but expression end or something?
 
purely by curiosity, what do you gain by splitting the array definition @OlleHärstedt?
 
@FélixAdriyelGagnon-Grenier Code golfing polyglot. C uses {} and PHP [] for array init.
I can use #if #endif to exclude PHP code in C, and then // ?> // <?php to exlude C code in PHP
And macros won't work, because {} are not valid identifiers. :(
It's sad.
The file, if interested.
 
... yeah. As a non-polyglot-writing person, I would not describe the fact that the following is an error as "sad" ;-)
<?php

$a = [ ?>
<p>here is some text in between that array declaration</p>
<?php
1, 2, 3 ];

var_dump($a);
 
8:52 PM
Hehehe, I mean, it's just very normal PHP code, right? :D
It irks me that I can't see the tokens php parser tries to write :d
 
9:40 PM
@Danack Update: first glass of gin&tonic
 
Random question; someone from Liverpool would be Liverpudlian which is their xxxxx, and they could be a scouser, which would be their ethnicity.
What is xxxx the term that describes where someone calls home?
Residency?
 
is origin too far?
 
yeah, I mean my family moved to where I live when I was ten....so it's not my origin, but it's my home town.
 
9:57 PM
Birthplace possibly, depending on details.
 
I'm looking for a word the other way round....where someone has lived in a place long enough to be considered a 'native' regardless of where they were born.
 
Naturalized?
I don't think there is such a word, which is arguably a cultural deficiency in English.
 
Resident works, I think
Some insurance providers use "residence address" so resident makes sense
 
people can live in a place without fitting in. 'state of mind' is close to what I need, though isn't pithy.
 
10:19 PM
Am I just drunk or is there no way to use STD_PHP_INI_ENTRY and have the struct field be a zend_string*?
 
10:33 PM
@Girgias porque no los dos?
/except a single g+t?
 
That's also an option
But with only one g&t pretty hard
 
Only one G&T sounds like a shit party.
 
10:53 PM
I'm refactoring ext/session
What are you expecting?
Me having fun?
I maybe should have gone out lol
 
yes.
Also, if there was ever a new cli sapi (with easier to use extension loading), a slightly more powerful ini system might be nice.
 

« first day (4318 days earlier)      last day (613 days later) »