« first day (3344 days earlier)      last day (1587 days later) » 

12:14 AM
Sorry for asking this question here. I added a public key of a repository, but now I want to remove that, but I can't! Can anyone help me? I know how to remove the key! It's simple.

apt-key del [id]

The problem is that I can't find the id. I think it's supposed to be the output of this command:

apt-key list

But again, I can't find the id

OS: Ubuntu
 
cmb
@Girgias, is it about LF vs. CRLF? If so, this looks fragile anyway.
 
I don't know?
 
cmb
@MarkR, there are Docker containers which are used by some RMs, e.g. github.com/sgolemon/php-build
 
Ta @cmb
 
@cmb 007_variation11.phpt is one which has this behaviour
 
12:35 AM
Erf, one of the win variations tests I thought which was identical uses the t mode ...
Meaning that it's larger than its NonWin counterpart
Should I just convert the expected size to %d ?
 
 
7 hours later…
cmb
7:41 AM
@Girgias, for 007_variation11[-win32].phpt, I'd probably use a regex, i.e. int(%r37|39%r). Not sure what to do with -win32-mb.phpt.
 
8:18 AM
@cmb pls don't use regex
 
cmb
Would you prefer two separate test cases instead?
 
Actually %r might be fine...
@cmb var_dump($x == y || $y == z)
If bless_tests.php doesn't choke on %r it's fine :P
 
cmb
Ah, yes, checking expectation in FILE is of course good.
Should check bless_tests.php then. :)
 
8:57 AM
o/
 
\o
 
cmb
o/
 
9:12 AM
\o
 
o/
 
9:47 AM
\o
 
10:13 AM
o/
 
10:25 AM
\o
 
10:35 AM
o/
 
\o
 
o/
 
10:56 AM
\o
 
o/
 
@cmb I think I'll use Nikic's var_dump trick probably a bit better
 
cmb
+1
 
lol
well, it filled up my phone screen
@salathe if I'm looking for other places to contribute, should I just dig through bugs related to documentation?
 
11:15 AM
@Girgias ruined it D:
 
Wait what did I do :(
 
You broke the wave :(
 
Sowri
 
Now Joe will have to start it all over again.
 
Let me start a new one
o/
 
11:18 AM
\o
 
o/
 
Hi, I'm looking for resources about how to write a "simple" PHP C Module. I simply want to use a few functions (with parameters) but most documentation I can find is like 10 years old and a "broken link collection". Already checked out the PHP Internals Documentation.. but it's useless since I can't find any sources for the exemplary counter module. Best writeup I could find so far is stackoverflow.com/a/32575493/3828957 but not sure if it's up to date.
 
cmb
See phpinternalsbook.com (far from being complete, but likely the most up-to-date starting point)
 
@cmb exactly what I was looking for, thanks.
 
@Tiffany Sure. Another useful place to help right now would be to look at the PHP 7.4 migration guide and update the main pages as needed.
 
11:31 AM
Alright
Also, regarding kittens: youtu.be/hvW_lQ5eopI :D
 
:)
 
Though all the adult kitties are on screen now, but there are a couple of kittens growing up in there, somewhere, hiding
 
Hi
 
cmb
\o
 
This code is to show trainers name in a select option menu
 echo "<select>";
while ($row = $stmt->fetch())
{
echo "<option>".$row['trainer_name']."</option>";
}
echo "</select>";
So I want the site visitor to insert trainer_id when he\she chooses an option
Any suggestion?
one of solution in my mind is to change line
echo "<option>".$row['trainer_name']."</option>";
to
echo "<option>".$row['trainer_name']-.$row['trainer_id']"</option>";
o/
 
cmb
11:46 AM
Are you looking for <option value="...">?
 
12:05 PM
on php-web, 534 exists as a country code mapping to other things 3 times.
 
12:22 PM
is there a way for script to detect that it is executed during preload stage?
 
cmb
@MarkR, that looks like a bug. According to en.wikipedia.org/wiki/ISO_3166-1, FO is 234, BL is 652 and SJ is 744.
 
Are there actual versions of the full website in other languages, or is it just the docs the language selection relates to?
This is actually the first time I've seen the alternative loop style used in production, ever.
 
cmb
I don't know for what it is used, but using country codes for language selection looks generally wrong to me.
 
So far I've moved a fair chunk of static data into classes, or accessed through static helpers, moved about 25 pages over to controllers, i'm going to spend a few more hours today on it.
 
Most annoying mistake to make with Amp … forgetting to use() all the functions input params in the call() callback :x
 
1:27 PM
Morning!
 
1:51 PM
o/
 
cmb
\o
 
@cmb I'm curious why there is an object handler get_properties_for with the purpose ZEND_PROP_PURPOSE_ARRAY_CAST whereas there is more logical object handler cast_object for that, but it is not used for casting to array....
 
More php-web Qs, is there a particular reason the change log for each major is one huge file or is it compiled from somewhere?
 
cmb
@lisachenko, you have to ask @NikiC about that. :)
@MarkR, yep, that's basically compiled from NEWS via bin/news2html
 
and those news files are in php-src rather than php-web?
 
2:21 PM
@cmb @NikiC Any reason I shouldn't announce 7.4.1RC1?
 
@Derick weell preloading still broken ^^
@Derick If cherry-picks are an option: github.com/php/php-src/commit/… github.com/php/php-src/commit/… (these make symfony work)
 
If we want that fixed in 7.4.1, that means 7.2.x and 7.3.x need to be delayed too
 
@NikiC could you please check my previous message? Maybe there is a reason for that? Otherwise it's a good thing to fix... and make cast_object responsible for all casting logic.
 
@NikiC I am not keen on cherry picking this.
 
@lisachenko I believe mostly a question of convenience. If you override (array) cast you usually also want to override other cases where "all properties" are fetched
I think we need to talk about release process. I feel that RCs right now are useless
 
2:30 PM
I agree
it's not that people test them anyway, apparently
 
cmb
well, they do test: github.com/php/pftt2/issues/89
These two commits look like plain bug fixes (without any API/ABI break), so could still be applied for 7.4.2; well, users have to wait 4 weeks longer to get a working preloading, but if they'd tested more during pre-release cycle, that might not had happened.
 
@NikiC ok, I see then.. but still want to move this logic into the cast_object handler ) because for my Matrix class I want only casting to array to be overloaded. The same can be used for Doctrine entities and collections - just return list of items. All remaining cases should be preserved by default
 
preloading will still be broken even if you delay ... so don't, imo @Derick
 
3:02 PM
You ask for small things, you get generics, method overfloading, full error handling overhaul
 
@NikiC just ignore these points, I'm sure there still are people reading the question right
 
I mean, the names are small
 
FYI if you are using the Nginx: Rambler filed a lawsuit demanding to recognize the exclusive rights to Nginx, since Nginx was developed by Sysoev during his work at the company 15 years ago...
 
Doubt it'll go anywhere unless he has a contract saying he wasnt producing work for hire
 
3:18 PM
@NikiC there are a few huge, but many of those are seemingly small...
 
@ircmaxell How are things going your way?
 
I'm just playing about with some modernising the php-web repo and I'm trying to combine all the information about individual branches into a single page. I'm wondering if it would be worth trying to parse the changelist to present the changes for just that build
 
@StatikStasis good, just crazy busy, and about to get even busier for the next 2 months :)
 
Unless someone can suggest a way of extracting them from somewhere else?
 
@NikiC I think people do consider the error handling changes as small… as in, the individual functions can be gradually improved on their own in small independent steps
 
3:26 PM
@MarkR sounds brittle...
 
I'm surprised the entire thing hasn't already fallen appart irc :P this is genuine 2005 level code xD
 
@ircmaxell Same here... unbelievably so. Such is the life of job security- which can be a good thing as long as you enjoy what you're doing; which I do! =)
 
hahahaha
For me, job security is making yourself 100% redundant. Because you can never get promoted if they need you in the current role
11
 
@MarkR With some creative shims and workarounds your 2003 code is still working fine.
 
Yes, but think of all the kittens that have given up their lives every time I encountered a global $
 
3:46 PM
@NikiC Pretty sure method overloading is dead in the water now that we have contravariance.
 
@LeviMorrison without annotations, definitely
 
@ircmaxell Just be careful with the Peter Principle ;)
 
If you're after small things, a way of sealing a property so it's not exposed via print_r(..) wouldn't hurt. I print_r() one of my ORM's and it dumps almost every object in existence because it links to the DB, and the DB links to the service container that has the factories in it (yes, service locator is an antipattern)
Then again... maybe I could use WeakReference, that doesn't get propagated through print_r...
 
4:04 PM
@MarkR You have two more options: first one is to add __debugInfo method to your entity class. Next one is required 7.4 to redefine get_properties_for object handler to return only required fields ))
 
Fair point on __debugInfo, there's a small possibility I had completely forgot about that bit of magic
 
I'am using __debugInfo a lot with FFI, because var_dump-ing zval will immediately cause a segfault.
 
Hmm that works, didn't realise it worked with print_r as well
thanks!
 
cmb
4:36 PM
@lisachenko, var_dump() should not segfault. Please file a bug report (unless there is already one).
 
5:06 PM
@ircmaxell This is true!
 
So I have this image uploading service which needs to crop and resize images into 3 variants on the server side after uploading. Does it make more sense to let a worker service do it in the background or just let it run in the normal flow and wait for the resizing/cropping to finish?
 
cmb
5:23 PM
How long does it take?
 
5:39 PM
@2dsharp Rather depends upon how long it takes to do the 3 crop processes
 
Holy shit that hat is fucked on my screen
sigh SO
 
@PeeHaa I'm back on meds finally, and my head isn't doing weird shit so I'm back in action. But I'm going to get a pedicure first before I do any work.
Because that's totally relevant information
 
:P
 
5:58 PM
Hello!

I am trying to display 'out of stock' on the homepage when the product inventory is 0 or less (back-ordered).

This is what I have but it's showing out of stock all the time I'm not sure why.

function show_popup_on_home_page() {
$product_id = '330';
$_product = wc_get_product( $product_id );
$quantity = $_product->get_stock_quantity();
if($quantity < 0) {
echo 'Out of Stock';
}

}
add_action('wp_footer', 'show_popup_on_home_page');
 
PHP is <major>.<branch>.<revision> yesum?
 
6:35 PM
morns
 
@bwoebi what version of libuv does php-uv want?
> libuv x86_64 1:1.33.0-2.el7 @epel 359 k
> configure: error: wrong uv library version or library not found
nvm needed -devel
 
@GabrielDube couple things, one, there's not enough code to determine the problem. Two, is there a good reason why you're using a string for an id number?
Also, depending on the rest of your code, it may be better to pass $product_id to the function instead of assigning it in the function
 
6:51 PM
Hmmm thanks. So that's for the full set, but php-web / git calls the major.minor a branch?
 
7:06 PM
@Tiffany Could you try to get a wireshark log of the DNS traffic when that failure happens?
 
13 messages moved to Trash can
Sorry for the ping you probably got @MarkR :)
 
i did wonder
 
Some more tests incoming sorry all
 
@GabrielDube Maybe just `echo $quantity` (without the condition) to see what you are getting from `$_product->get_stock_quantity();`

And based on your description, I think you should be doing `if($quantity =< 0)` or `if($quantity < 1)`.
 
!!imdb foobar
 
7:08 PM
Could not find the movie or series
 
!!man man
 
man - display online manual documentation pages
man [ -adho ] [ -t | -w ] [ -M manpath ] [ -P pager ] [ -S mansect ] [ -m arch [: machine ]] [ -p [ eprtv ]] [ mansect ] page ... man -f keyword ... man -k keyword ...
 
!!imdb foo
 
@Tiffany Please clone github.com/amphp/dns, composer install, then run php examples/custom-config.php distiller.com and see whether you can reproduce the failure first.
 
!!packagist amphp/dns
#sadpanda.gif
 
7:13 PM
!!gif sadpanda
 
:P
not sure if entirely broken or just 90% of it
 
@PeeHaa Did you try the HAR logging, yet? :P
 
!!lxrfunction json_decode
@kelunik Nope.Not yet
 
Do you watch how much memory it consumes?
 
The bot?
 
7:15 PM
yup
 
!!lxrfunction json_decode
 
/php-src/ext/json/json.c::283 /* {{{ proto mixed <b>json_decode</b>(string json [, bool assoc [, int depth]])
 
I can now
 
AsyncBot? boo
Jeeves was much better!
 
> 10166 root 1.7 php /srv/Jeeves/bin/botman.php
wait that's not right
@bwoebi He will be renamed back eventually ;)
 
7:17 PM
@PeeHaa why the rename at all?
 
I need to be able to run both jeeves v1 and jeeves v2 at the same time
Otherwise it's a proper mindfuck which one responded to what :D
Do you understand top output @kelunik? :p
 
Yup, but mostly use htop :P
 
10166 root      39  19  507928  69332  15956 S   0.7  1.8   0:01.22 php
 
1.8 is mem I guess? How much mem do you have in total?
 
let me try htop to see if it is sane
[root@pieterhordijk Jeeves]# free -m
              total        used        free      shared  buff/cache   available
Mem:           3789         265        2757          22         766        3229
Swap:             0           0           0
ah another command that also confusing the hell outta me and need to look up
:P
So 1.8% of 4G I guess
72MB if my calculations are correct
Which seems a lot
 
7:25 PM
hpack uses about 33 MB, which is a lot... that's why I wrote the FFI implementation
 
omnomnomnomnom
:-)
 
7:36 PM
I have this framework that couples with WordPress to provide a better OOP experience for developers. It's called Modern WordPress Website. For trademark purposes, I'll have to rename it. It can't have "WordPress" in the name. I had three options in mind and would like some opinions: - SolidPress | CraftPress | ModernPress - Which one you think it's best?
 
CallItSomethingWithoutWordorPressPress
 
7:56 PM
ModernPress
 
8:20 PM
Another reason for not bothering with RCs: youtrack.jetbrains.com/issue/WI-50152
 
@Derick wat
 
RCs of Xdebug that is - as nobody tests them :-)
 
The "wat" refers to the behavior
 
What wat behaviour?
 
I think I get what the feature does, but whyever would it scan into a different function?
 
8:31 PM
It does not
With only the line number, I can only really check the current active scope.
(and it will re-evaluate, but only to a scope spanning fewer line numbers)
 
I don't get it
In this case, wouldn't you determine that the line is part of a function definition?
and as such scan the function definition, not the {main}?
 
yes, it does that when that function runs
but the first evaluation is for the file scope
which already means a breakpoint gets triggered
 
At the point where the file runs, you should already know that those functions exist though and be able to skip over those lines
 
Right, but doesn't that mean looping through the function_table structure to find which ones? And that's going to be terribly slow
and it gets harder with class methods as it's two loops (one to find the class, and then the method)
 
Well, that's just an implementation concern :P
 
8:38 PM
well, people already whine that this is slow: bugs.xdebug.org/view.php?id=1725
 
I don't know what exactly you hook in xdebug, but you can have a cache of which functions are defined in a file
 
to be honest, I didn't think this would be a major issue (The false resolves) as I already write in my reply: a doc block of a following function is usually more than 5 lines already anyway.
I wonder whether it makes sense to just scan one line above and below instead of 5
 
@Derick I would assume that this problem is not limited to free-standing functions
 
no, it isn't
 
What happens if you have a closure?
 
8:47 PM
it will end up getting it right
 
won't that also incorrectly resolve the breakpoint when whatever contains the closure is called?
 
it's hard to explain on text, and I'm tired :-) Shall we have a quick chat about it tomorrow video wise?
 
ok
 
Probably in the afternoon because I'm staying up for election night :-/
 
have, uh, fun :P
 
8:53 PM
British politics tho :/
 
That last comment on youtrack.jetbrains.com/issue/WI-50152 gripes me though
 
9:14 PM
@Ghostff I got it to work, the stock levels were wrong that's why it was showing it all the time. My problem is now that it only shows the I'm logged in as an admin but not to the public
@Tiffany
 
@PeeHaa github.com/amphp/http-client/issues/230 if you have any input
 
What is considered unsafe?
 
9:30 PM
@Derick TBF, the assumption of a docblock maybe holds true for library code, and high profile app code on github … but I would really not assume this is customary in internal code or quick scripts.
 
@PeeHaa Anything not being GET / HEAD
 
@bwoebi It wasn't an assumption, more of a mitigating factor
 
10:21 PM
@Derick how can these exit pools be any good with the direct election system? seems weird to me
 
Lots of data, so call it a biased machine learning model.
If this is the result though, we're absolutely fucked.
It doesn't cover tactical voting, or the minutae of single constituencies. It's even possible Johnson might not actually be an MP in another 6 hour's time
 
 
1 hour later…
11:28 PM
Heh, friend was telling me about voting today, I guess there was someone running under the official Monster Raving Loony Party, and he voted for that person. It's about what he thinks of British politics, to be fair.
First time I heard of that party too
 
They've been around for a while. It's wasted vote, let's hope it wasn't enough to get a Tory in.
 
@kelunik I get complaints about vendor autoload file not existing, which I'm guessing is due to my include path(?) and directory path in a require call. It's something I can fix, but should I fix it?
to rephrase, do you want me to fix it so that I can continue on?
 
That exit poll is brutal.
/usr/labour > /dev/null
 
not a labour supporter, but yeah... this isn't great.
 
At least the ERG has been neutered.
 
11:44 PM
Hopefully, yeah.
I really did wish Labour/Lib/Greens would have worked together more
 
I wish Corbyn would have been put out to pasture a few years ago. I have no idea how Labour is going to recover what with all the pro-corbyn people that have been put into the NEC etc.
They're going to have to disassemble the party and start over.
 
It's curious, but here in my area, all the attacks from labour where not against the tories, but against the libdems. It's bonkers. We (in this election) mainly wanted the same thing.
 
Fighting claw and nail for second place?
FPTP needs to die
 
@MarkR what is NEC?
other acronyms were googleable but not this one
mainly cause of NEC corporation
@kelunik I'll do this in the morning when I'm awake, feeling out of it at the moment. I blame the three hour nap in the afternoon.
 
National Executive Committee -
@MarkR FPTP needs to die. One policy area I agree one with Brexit Party. (And the only one)
NEC is Labour's "board"
 
11:59 PM
thanks
 

« first day (3344 days earlier)      last day (1587 days later) »