« first day (3020 days earlier)      last day (2154 days later) » 

01:47
Hello, I'm a programmer you may know me from my greatest hits "Fuckkkkk" "Pushed" "It works in my environement" "What the fuckkkkkk" "No way this is broken" "God im an idiottt" "How did this ever work"
 
1 hour later…
Custom extension Segmentation fault when declare static property – #77498
03:27
@Tiffany a clean build does often fix it....
@Danack you have to look at the image to understand
@Danack That's really neat
oh lord google.com/search?q=%22Whoops!%20There%20was%20an%20error%22 funny that a lot of these are laravel projects...
What are the better ways to learn PHP? Do I need basic skills of Javascript?
04:34
moin
04:46
o/
Need to go to sleep... brain is super alert and wants to think... not about anything useful- just whatever. Sigh...
05:06
@StatikStasis Insomnia's a bitch... and ADHD is great at causing it -_-
 
1 hour later…
07:03
posted on January 22, 2019

08:00
shirty Informal. bad-tempered; irritable; cranky.
that's so engrish ...
(the sort of word my mother uses ... she's 70 odd)
08:14
git mernings
indeed
08:41
My favourite thing about working from home is the dress code ... can you work pink fluffy pjs to work if you want ? #remotework
3
@Gordon will like this one :D
08:55
less disturbing
sounds like your jealous rage has dissipated, I will assume your wife got you some fluffy pjs ...
oh that was meant to be
New "pcov" extension for #PHP by @krakjoe released https://pecl.php.net/package/pcov Of course already in @RemiRepository
I love remi, he's great ...
there's an ominous rumbling coming from one of my disks ... I'll need to turn the music up ...
fixed ...
09:37
@NikiC Are you planning on investing any work into union types?
oooh yeah, the same question ...
The most critical question is what happens with weak typing and unions containing scalars being passed a scalar...
I can hardly remember anything about the implementation, that was so long ago
@JoeWatkins enjoy the memories: github.com/php/php-src/pull/1887/files
it's so pretty ..
what happened ?
09:47
And then I desire typed properties in interfaces ... with the possibility to set constraints on them
constraints as in arbitrary code in setters
of all the ones that got away, that's my favourite I think ... it's quite elegant even ... I can't remember why it failed ...
no new instructions, no massive impact to anything really ... I don't understand everyone else, we should just sneak it in ...
we could sneak it in with the 2020 copyright update, nobody reads all of that merge diff :D
let's call that plan b ...
haha
10:29
@bwoebi What do you mean?
What's the dilemma?
Also, mornin'
@MadaraUchiha what happens if you pass 1.23 to something typed int|string?
@bwoebi What happens today when you just say int and pass 1.23?
@MadaraUchiha then it gets casted to 1
with weak types
Or rejected with strong types?
Based on a PHP.ini entry?
yes, gets rejected with strict types
10:31
When "on duplicate key update" executes, the autoincreament will be increased. Any idea how can I avoid that?
@MadaraUchiha ini? declare(strict_types=0/1)
@bwoebi SSDD, some sort of global application setting you set at "compile" time or before
Well, that's a sort of silly behavior to begin with
The expected thing to do was that both int and float are conceptually considered int | float for the purposes of weak typing
And that it doesn't actually change the value
Yeah, number in Typescript :-P
But given that it does, I'd say that any arbitrary rule to determine which wins the cast is sufficient
Like, "the first one in the union that weakly matches, gets to cast"
So you get 1 in the case you cited.
@bwoebi number is a JavaScript type, it wasn't invented by TypeScript
10:34
There's no meaning in separating to int and double when the underlying runtime doesn't support it, and only has one number type.
Or you can say that union types is only supported in strict types
@MadaraUchiha int64array and the likes do exist in JS though
@bwoebi Yes, although you wouldn't see them in everyday code.
They're mostly there for the sake of buffers, threads, and eventually WASM.
yeah, I know :-)
was just nitpicking
Saying that weak types is considered semi-legacy and that you really ought to be using strict types, and that new type features will only work there, is also a valid strategy
Although I've no idea how easy that would be to pass through internals.
The problem with weak types is that your algorithm for where to draw the line is arbitrary. Whereas for strong types your line is "the most type-safe I can make it".
10:50
@MadaraUchiha the problem is that this would essentially prohibit calling any function with an union type from a weakly typed file
as weak types are a callee-side feature (for typed props and params at least)
That's not viable
@bwoebi Eh?
*caller-side, sorry
Why are they caller-side features?
You mean that the type checking itself is done on the caller's end?
@bwoebi Generally I'd be interested, but don't plan to actively work on that right now (unless someone already has plans?)
@NikiC My main problem is that we need to revisit the semantics and edge cases to propose something to internals. Porting the code to current master is something I could do myself
@MadaraUchiha sort-of, yes
10:58
@bwoebi Yes, I think I already mentioned that we might want to do an RFC for deprecating some of the weak typing conversions first
To reduce the amount of ad-hoc rules we need for union types
yeah
That's really something I'd love to see addressed soon
is there something better than curl when wanting to connect over ftp using implicit ftp over TLS ?
@NikiC some thought that occurred to me yesterday, is there any reason to not introduce properties in interfaces? As they effectively are public API?
@bwoebi That would imho be part of a property accessor RFC
What's the point of a weak typing system when there's a union type in place?
Instead of int then casting floats, you just use int | float
And deal with the casting yourself if you want to
11:09
@MadaraUchiha the union is for the callee, not for the caller
Unless there's more to weak types than that?
Caller wants to not care about types in a weak typesystem
Callee wants a specific type though, or one of a set of types
@NikiC hm. okay. That's fair
11:22
do we really need it ?
I've just noticed it's always the same ...
@JoeWatkins I think dmitry likes to have those for perf testing
so I can safely just ignore that it exists ?
yes
fair enough
I can only fit little bits of opcache in my head at a time ... I should try harder ...
11:45
@JoeWatkins Well, I stay away from the actual cfg, dfg and scdf code. Looking just at it when actually necessary
12:08
morns
PHP crashes when loading binary data from .mdb access database with pdo – #77499
12:46
1 message moved to Trash
13:37
@FedericoFiaSare I asked what you had searched, not if you had searched. It helps eliminate what you've tried already and didn't work.
Good morning
@Gordon It's the hat that helps I think.
Plus when he was smoking it reminded me of a children's character... smoking.
13:55
guys any better word for "squash" in this sentence?
> Squash commits when merge request is accepted
I don't get the meaning of it
@Shafizadeh not really, squash is the name of that operation. In general terms it means that you'll rewrite your git history to combine a certain number of commits into one. Squashing them together. further reading
oh I see .. thx
14:18
@PeeHaa Finally got some time yesterday to work on some music. Nothing of interest- hopefully I can get some more time this week to mess around. I need a vacation. I am tempted to take a week off and do nothing but work on music.
14:41
I know that there are some web hosting services who don't allow you to create folders outside the www directory, in that case how do you prevent the view files being accessed? using the web server configurations or by changing the views with something like if(!is_defined(...)) etc. ?
@yessure use a better host.
alternatively, just because they don't give you access to anything else, I guess that doesn't mean you can't define the docroot. So, even if you only have access to www/, you can use www/public/ as the server's docroot, and you get folders which are not publicly accessible.
14:59
\o
15:29
I'd love to know your opinion in this pool as well: twitter.com/carusogabriel/status/1086425949938307072
@Danack I did email internals, just not on a different thread.
15:45
@rtheunissen I was considering adding a Ds\PriorityQueue::remove($value) method to DS that removes the first occurrence of $value. Something you'd accept?
I made one in user code that's faster for removing values than foreach'ing over an SplPriorityQueue, but of course it's slower for insert/extract.
16:00
@Trowski "first"?
Most implementations would not necessarily have any way to enforce that it is the "first".
What data structure is powering the PQ here?
@LeviMorrison I meant the one with the highest priority.
Generally the idea is that it would be the only occurrence of that value.
An array is used for storage.
0 - size indexed
I assume a classic heap on an array?
Exactly.
@LeviMorrison Here's what I wrote in PHP: github.com/amphp/amp/blob/timer-queue-refactor/lib/Loop/…
I simply looped through the data array to remove the watcher, but that probably wouldn't work if there could be multiple entries with the same value and only the highest priority should be removed.
16:17
(that might have been more funny in my head)
ZipArchive::getFromName works with path, not just name – #77500
16:52
Random Question about IP/Subnetting, incase someone happens to be around that understands it by chance: If i have been assigned the IP-Adress xxx.xxx.128.0 / 22, do I then also own the IP-Adresses xxx.xxx.129-131.0 /22? Because these have the same netID, right? I dont get this lol, it makes no sense
grrrr .... grumble grumble ...
so yes?
but I have a bit of a migraine, so double check.
@Danack I hope you are able to find something to help cope, migraines blow.
Right, I think it is that way - if you are given an adress with /22 prefix you actually own 2^10 adresses, because there are 10 bits left that you can play with.
God this topic is so confused lol
@Tiffany it's being caused by some pain/inflamation in my neck, so I'm pretty sure I can find something.
17:03
reminds me, I need to make a neurology appointment because my sumatriptan is becoming less effective in handling my migraines now :/
that's not good.
I used to only need one sumatriptan for a migraine and that was it, so I'd be taking the pill like once a month. Now I'm needing two or more each migraine, and I can't take more than two a week.
Does PDO use mysqlnd under the hood? Getting MySQL auth errors with MySQL 8, surely down to caching_sha2_password auth type, but I've verified that my build has mysqlnd extended SSL support enabled
17:21
Anyone used Coverity Static Analysis for PHP code? I don't mean the php source code, but for code written in PHP?
listen = 9000 only listens on one interface – #77501
@NikiC ping
@LeviMorrison I'm not sure your email reached the list. The last one I can see from you was about your intent to close the vote in 'a day or two', and then CMB was asking for an update: news.php.net/php.internals/103750
I'm writing a regex to not-validate if an input field ends with a /. This is what I've tried and it kind of works... but it's matching the last test string and it shouldn't. Or I'm completely misunderstanding how [^] is supposed to work.
yeah, misunderstanding on my part
17:58
@Danack PEBKAC
mine or yours? :-p
@bwoebi I think that's a solvable problem with conversion order, or just a flat statement that for unions types must match exactly (no conversion rule)
or a rule that conversion only happens if it is lossless
(hence 1.5 -> int|string would only work as "string")
@Tiffany I don't use that tool much, and I'm not sure I understand what you meant for the cases - but isn't that input box a single input string? Wouldn't using the separate tests be appropriate here?
The newlines after the last entry are messing with the result there
Tool seems clunky
18:05
I tried using (?!\/)$ but getting the same result.
@Danack usually it treats each line as a single test string...usually..
is it normal that an database query in ajax for checking through around 1300 attributes takes around 9s in WordPress with WooCommerce?
@Leigh also \o hope you are well
@Tiffany Better lately, thanks
Needed to have it start with a /, I think ^(\/)(.+)[^\/]$ should work: regexr.com/46tbe
I probably misunderstood what you wanted
18:15
@Leigh no misunderstanding, I didn't specify it 😛. I have one input field that must start and end with /, and another input field that must start with a /, but must not end with a /.
(talking outloud) trying to understand what I did wrong. Because I had (.*), it sees it as one capture group, so it sees the entire string after / as a capture group, including the end-of-string /, so if the [^\/] is included in the (.*) capture group, it will exclude these strings as matches?
The [^/] matches a character, because you had it outside of the capture group, when the last character wasn't a /, it was matched, and not captured
It's not just an assertion "the last char must not be a slash", it's "I want to match any character that is not a slash"
I'm cleaning up my variance patch, but after that I hope to get a proper array iterator landed in core.
Keeps bothering me that ArrayIterator is so terrible.
I may use capture groups more often than I should; I tend to use them to help make a regular expression easier to read for me. Ultimately, is this a bad practice? Like, could I run into instances where I think a regex should work (or not work), but because I've added parentheses to make it easier for me to read, the regex doesn't work correctly/as intended?
I think it will just capture more data than you intended in that case. You can use non capturing groups. (?:blah)
alright, thanks
18:27
You could also use PCRE's x modifier, then you can format your regex in a more easy to read way
@JoeWatkins pong
static void php_pcov_discover_end(zend_op_array *ops, zend_op **end) { /* {{{ */
	zend_op *opline = ops->opcodes;
	zend_op *stop   = (opline + ops->last);
	zend_bool finally = 0, returning = 0;

_php_pcov_discover_end_loop:
	while (opline < stop) {
		switch (opline->opcode) {
			case ZEND_JMPNZ_EX:
			case ZEND_JMPZ_EX:
			case ZEND_JMPZNZ:
			case ZEND_JMPNZ:
			case ZEND_JMPZ:
				if (OP_JMP_ADDR(opline, opline->op2) > opline) {
					opline =
						OP_JMP_ADDR(opline, opline->op2);
					goto _php_pcov_discover_end_loop;
is it wrong ?
I just can't accept getting it wrong, pcov and phpdbg are getting it wrong, no two ways about it ... it must be improved ... this is my first attempt, I expect it's wrong ... happily, it generates very very close to xdebug, I don't know how xdebug is handling switches, but that appears to be the only difference on the simple test suites I've run this one so far ... still I'm not confident I thought of everything ...
namespace {
  final class BidirectionalArrayIterator
    implements Countable, Iterator
  {
    function __construct(array $input);
    function rewind(): void;
    function end(): void;
    function next(): void;
    function prev(): void;
    function key();
    function current();
    function valid(): bool;
    function count(): int;
  }
}
@Tiffany overkill commenting, but just for an example, with the x modifier you can do:
preg_match('~
/           # Must start with a backslash
(           # Start capturing
    .*      # Match any number of characters
    [^/]    # Match any character that is NOT a backslash
)$          # End capturing at the end of the subject
~x', $subject, $matches);
Any other API that you think should go in there, such as possibly a ReversableIterator interface or something?
18:32
Lol... why'd I have to add more complexity to it. So user types ///admissions/index.html by accident, / // is captured once, / // is captured in the second group. I tried (\/{1})([^\/].*[^\/])$ which feels a bit overkill, but is still matching ///admissions/index.html
@JoeWatkins err, what is it supposed to do?
the bit in phpdbg/pcov where it checks for return with extended_value -1, and certain sequence of opcodes, that causes them both to misdetect that the end path in this function is not travelled
function () {
    if (condition_is_true()) {
        return true;
    }
}
they both show 100% covered if you travel the first path, because they don't even detect that the end of the function is executable ...
that is supposed to find the real return path
@JoeWatkins so what you want to do is detect whether the implicit return is (trivially) unreachable?
18:35
yes
sorry, I'm not doing very well with words
@Tiffany regex101.com/r/LUtiKv/3 - match slash followed by notslashes repeatedly for the whole string
In that case, yes, that code is probably wrong ^^
excellent
what have I missed ?
or is it a terrible approach ?
@Leigh I think I understand it
@JoeWatkins I'm not sure which cases exactly this misses, but it's definitely not robust. The "proper" way to do this is to build a CFG and propagate reachability. This is what opcache does in github.com/php/php-src/blob/master/ext/opcache/Optimizer/….
18:42
so there's no middle ground ...
crap ... that will ruin perf ...
I'd expect your code to fail on something like this: function($x) { if ($x) goto foo; goto bar; foo: return 1; bar: }
@Leigh What is the correct way of explaining [^/]+? In effect, I see that it means "don't match a string with an ending /" but I know that isn't the exact explanation.
@Tiffany regex101.com/r/LUtiKv/4 does this help? :P
<?php
/* 2 */ function go() {
/* 3 */ 	goto foo;
/* 4 */ 	goto bar;
/* 5 */ foo:
/* 6 */ 	return 1;
/* 7 */ bar:
/* 8 */ }

\pcov\start();

go(1);

\pcov\stop();

var_dump(\pcov\collect());
?>
array(1) {
  ["/opt/src/pcov/bug.php"]=>
  array(8) {
    [10]=>
    int(-1)
    [12]=>
    int(1)
    [14]=>
    int(1)
    [16]=>
    int(-1)
    [3]=>
    int(1)
    [4]=>
    int(-1)
    [6]=>
    int(1)
    [8]=>
    int(-1)
  }
}
@Tiffany It means keep matching all characters that are not /. In effect "keep matching until you encounter a /"
18:46
that's correct, right ?
@Leigh but it doesn't care about any / in the middle? "keep matching until you encounter a / at the end"?
@Tiffany It breaks if it encounters a / in the middle, but because the group has a +, it goes back to the start of the group to try and repeat it one or more times. And the group starts with a /
Ahhhh
Sorry, I'm dense
oh no it isn't ...
Not at all, a dense person wouldn't ask questions
18:54
@NikiC if finding the cases this doesn't work for and fixing them is a crappy idea ... would you write the cfg, or leave it as it is ? I hate it being wrong ...
strftime gets year wrong – #77502
I'm not sure its reasonable to ignore it ...
does pecl install on travis create the extension.ini ?
(never used pecl on travis)
19:19
I got some sort of russian drink ... guess what colour it is ... 10 internet points ...
@JoeWatkins PINK!
close enough, it's purpleish ... I dunno what it is, the words where it says what it is are russian ...
=(
You've been on a pink kick so I thought I was sure to get it right.
I always was, actually, but didn't let the gay out ... it made a sneeky appearance in a pair of doc martin boots that were bright pink .... now it's all out :)
19:24
it's funny, every time I tweet something a bit gay, wearing pink, or tattoos, or whatever, or just anything that directly mentions non-heterosexuality, people unfollow me on twitter ... I didn't keep the list of names ... probably worth avoiding though ...
I bought the brightest pink shirt I could find after we had our daughter. It's now one of my favorite colors to wear.
maybe they just disagree with you taste :D
imposibru
I dont want to me mean (but I am, so here goes nothing), but in the last one you looked like a survivor of an explosion in a plushy factory
pfft ... obviamente mi gusto esta absolutamente perfecto ...
19:33
it probably was the eyes - it was one of those "you won't believe the shit I have seen" looks
ha ... no but I agree, I just happen to like the explosion in a plushy factory look ...
@JoeWatkins fuschia
then again, I probably should not throw stones, since right now I seem to have 1.5 t-shirts, that could be generously described as "not black"
@tereško neon green?
one is dark gray and other ... hmm ... dark white (?)
I need colors :(
some time ago I had this neon pink shirt with Slayer logo :D
19:40
nice
yeah, don't you get sad looking down at darkness all the time ? I'm absolutely sure that being dressed in bright colours has an effect on my mood, I won't say it makes me happier, but it gives me a reason to grin when draped in fluffyness ...
still I do like the odd black hoodie ... my dogs got hold of one github one, and the other one fell apart, replaced them with 2x wes's ..
@tereško Wes' t-shirt is available in blue :)
naah, Wes hates me
no pink though ... @Wes ...
@tereško I'm sure that's not true ...
@tereško he doesn't, you guys just have incompatible argumentation styles
19:44
well, yes, but I don't blame him for being wrong all the time
it's not his fault
yeah, you're direct, like a punch in the face, he's italian, like pasta ...
everyone is always wrong about everything all the time, forever ...
being wrong is extremely enjoyable, not a bad thing at all ...
an interesting case for a home "mini-server": pollin.de/p/odroid-h2-gehaeuse-typ-1-810961
I remember when we used to put motherboards in stuff ...
I don't get it ...
I get it
I've not heard of this odroid before
@tereško I think your current relationship status with Wes resulted from a comment a few weeks ago when you told him to stop pinging you. Probably just a misunderstanding of you were busy and being short at the time- but came off harsh, iirc.
hardkernel.com/shop/ogst-gaming-console-kit-for-xu4 that's cool, I wouldn't use it, but it would look cool on a shelf near a tv ...
19:56
@tereško Instantly reminded me of the cube. Except it's probably a lot less terrible.
@tereško I think it started with this. chat.stackoverflow.com/transcript/11?m=44812830#44812830 (and sorry for the double ping =D )
@StatikStasis not sure what else one can say, when you are in a meeting and someone starts ti ping you about something you wrote 2 hours ago :D
I understand. He probably didn't know and it just came off like you were saying "I'm uninterested in your problem- buzz off."
@NikiC So there is a test ext/opcache/tests/opt/prop_types.phpt that is failing with my variance patch; here's the diff (It's small):
001+ $_main: ; (lines=2, args=0, vars=0, tmps=0, ssa_vars=0, no_loops)
001- $_main: ; (lines=1, args=0, vars=0, tmps=0, ssa_vars=0, no_loops)
005+ BB0: start exit lines=[0-1]
005- BB0: start exit lines=[0-0]
007+             VERIFY_VARIANCE string("test2")
Do you have any idea about what needs done here?
@StatikStasis it wasn't so much "uninterested" as "annoyed" because he kept "revealing" more and more insane requirements
20:07
Which reminds me I need to recheck prices on my rig build to see if anything has dropped. If it hasn't I will put off building a new rig for a while and buy the parts to finish my racing drone instead.
I am putting of it because I want to buy an apartment :(
Nice! New apartment due to space, location, other?
all three
@tereško really? congratz beforehand .. in which city?
Riga, of course
there is only one "city" in Latvia
others are better described as "towns"
20:15
ah
and why not leaving Latvia ?
@Shafizadeh he likes it there?
why would he want to leave Latvia?
the food is good, and the beer too
@LeviMorrison just change the test output
assuming the generated opcodes look right
also there are no insane people blowing shit up in Latvia
ah :-) .. I was thinking of experiencing a new country(probably a bigger one) and being totally standalone of your family.
20:18
Australia?
I like to try UK
hmm ... UK has a huge Wahhabi diaspora, which might be a problem
I would like to move to New Zealand.
...or The Bahamas.
@StatikStasis New Zealand or South Korea... actually maybe not South Korea since ADHD medications are hard to get there...
South Korea might be interesting
if North don't decide to nuke it
20:21
I would find it morbidly funny if NK attempts to nuke SK and instead the nuke falls back onto NK...
true
an that's not the worst case scenarion
@tereško They seem to be in better standings than recent history. Thanks, Trump! waits for response from room
the can miss it and hit China
@NikiC Tests are re-running on Travis. It's expected to pass. Some of your feedback items still stand though, such as this one. The contents has changed and you didn't use the permanent link. Do you remember what function you linked to?
@StatikStasis naah. that shit is still up in the air
20:23
I know- was just an opportunity to make a comment that could trigger a lot of folks. =D
@Shafizadeh if you get a job as a developer and do not aim for London, then it might be OK
but you would have to do some research regarding the town you want to move to - for example, there are towns, that have a large ... emm ... "immigrant population". You would not like to end up in a town with 80% Pakistani (they are Sunni)
Thanks.
Seems like there should be a function for all those checks lol
Ah, looks like ZEND_COMPILE_IGNORE_INTERNAL_CLASSES is only used once so far, so that makes sense that there isn't a function.
...no, it's used multiple times. lxr must be out of date or just poorly indexing that one.
20:40
@tereško ah
UK is not a homogeneous place :D
hell, it's in the name even: there are 4 regions that make up United Kingdom each with some level of autonomy
20:54
@Leigh I just realized the input field I was trying to invalidate against a string that ends in a / may start with [http|https] ... facepalm starting to think I shouldn't bother with regex for this field because I may not be able to account for all of the potential allowable differences. ... Though maybe at least check to make sure it doesn't end with a / ...
@Tiffany #^https?://.*[^/]$# Oversimplified, not sure what you're doing.
@Trowski regex101.com/r/LUtiKv/5 essentially this.
oh wait, I did the character class wrong
I'm closer regex101.com/r/LUtiKv/6 but it matches google.com and google.com as one -_-
21:29
@Tiffany This? regex101.com/r/LUtiKv/7
shouldn't match string 4
I can tweak it myself, just too tired to do it right now
also, fuck whoever made "Ctrl-Y" as "Delete Line" in Jetbrains products
I always forget it's set to that, open IntelliJ for the first time, start pressing ctrl-y and delete part of my code -_-
@Tiffany Wow- I did not know that. Yeah
I'm so used to Ctrl+Y to redo.
me too
I remove whatever keys they have it mapped to, then change it to Ctrl-Y, and remove any keymappings from Delete Line
I love JetBrains. My annual renewal is coming up. If I knew I would do more coding in Python again soon I would buy the whole package for the next year in order to get a perpetual license for it.
@Tiffany Too many of them must use Macs where redo is Command-Shift-Z
21:43
@Trowski I guess "Ctrl-Y" was know as "Delete Line" in some very, very old IDEs, and Jetbrains carried it over.
I guess, in fairness, IntelliJ has been around for quite some time, so it made sense when it first came out. However, now, having it set to "Delete Line" is detrimental.
22:05
Later!
22:35
Its raining ice out here
23:01
It's called snow armageddon

« first day (3020 days earlier)      last day (2154 days later) »