« first day (3078 days earlier)      last day (1863 days later) » 

12:16 AM
ext/intl/intl_convertcpp.cpp fails to buid – #77775
 
 
2 hours later…
2:29 AM
Would function_alias() be a practical thing? It's not unheard of (like I have done it maybe 3 or 4 times) to have some polyfill with a conditional functional decl, where one branch is an impl and the other just forwards the call to some existing func... I know it's not exactly a huge deal but it would be nice to lose the wrapping fcall
 
3:11 AM
if inline goto – #77776
 
4:10 AM
huh I wish this foaas.com/ballmer/%3Cscript%3Ealert()%3C/script%3E was in the official foaas api
they kept the best one for their own :(
 
4:41 AM
@DaveRandom why do you need a wrapper for that? if (!function_exists(some func)) { impl some func } - the other branch is you don't do anything, the existing func is already there
I do use thin wrapping fcalls basically as nicely-named partially applied functions, but that cries out for inlining more than anything
 
4:56 AM
str_word_count function for Chinese text – #77777
 
5:41 AM
o/
a machine that knows how to make hot chocolate ... we truly do live in the future ...
 
@StatikStasis if you're available tomorrow, I may have some questions for you regarding accounting. My boyfriend is having doubts with his current major choice and might consider accounting, he isn't sure yet.
@JoeWatkins is there an HTTP code for it?
You know, like 418
 
ha, no, but you can probably get a bluetooth one ...
 
You know, I'm in bed, teeth brushed, lights are out, about to go to sleep, and now I want hot chocolate
I even bought mini marshmallows a couple days ago
Do I indulge a last minute treat or do it in the morning?
!!should I drink hit chocolate now or in the morning?
 
You should in the morning.
 
Fair enough
\o goodnight
 
5:51 AM
o/
 
i'm showing images that is outsite the public_html with PHP, when the image is on the cache i only send this header:
if(isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])){
    header('HTTP/1.1 304 Not Modified');
    exit;
}
should i also send the Content-type?
header('Content-type: image/jpg');
 
6:15 AM
@NikiC what if lpthread reports the guardpage is 0 size ? (rust panics)
I wonder what rust's thread model is, I wonder if you actually need to be in a (other than main) thread for these apis to work ...
lastly I wonder if we really need to query the size from pthread, isn't it going to be PAGESIZE ?
 
6:54 AM
krakjoe@fiji:/opt/src/php-src$ cat overflow.php
<?php
class Cloneable {
	public function __clone(){
		return clone $this;
	}
}

$c = new Cloneable();
$a = clone $c;
?>
krakjoe@fiji:/opt/src/php-src$ sapi/cli/php overflow.php
overflow at Cloneable::__clone in /opt/src/php-src/overflow.php on line 4
Aborted
 
7:12 AM
now I wonder if I need pthread at all, because we don't really want to link against pthread all the time ... can I save rsp at the top of main possibly ?
and I have real work to do now, so when you have a minute nikita, holla ...
 
7:36 AM
> can I save rsp at the top of main possibly ?
no
 
7:59 AM
I notice this ...
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x0000555555c03b1b in zend_mm_alloc_heap (heap=0x7ffff2c00040, size=72, __zend_filename=0x55555649ca90 "/opt/src/php-src/Zend/zend_objects.c", __zend_lineno=195, __zend_orig_filename=0x0,
    __zend_orig_lineno=0) at /opt/src/php-src/Zend/zend_alloc.c:1364
1364			ptr = zend_mm_alloc_small(heap, ZEND_MM_SMALL_SIZE_TO_BIN(size) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
 
hamartia a flaw in character that brings about the downfall of the hero of a tragedy : tragic flaw
 
can you explain that, and can we rely on it ?
 
8:16 AM
Good morning.
 
@JoeWatkins on what?
 
stack pointer being at the start of stack when it's about to overflow
 
you sure that's the start of the stack? ^^
or wait, which end is the "start"?
 
@nobody only 304 is enough. However - just isset(modified_since) is a bit too loose, you should also check the value against the actual modification time of the resource
 
@NikiC it's what pthread returned as the stackaddr, I think it's the bottom (lowest address) ... which is start if stack grows upward, right ?
but I had another thought, even if we could rely on that, it would slow execution to make the comparison, probably best for to wait for the signal ... I still don't really know why rsp is there ...
 
8:24 AM
@JoeWatkins which api do you get this from?
getstack or getstackaddr?
because at least for getstack what you get is the low address
 
pthread_attr_getstack
 
so for a down-growing stack that should indeed be the overflow address
that or within one page below it
 
here's what I got so far ... I didn't check for the page below, that doesn't seem to happen, but I guess just on my platform ...
it's not finished ... but testable ...
I'm getting confused with what below and above even means :D
 
@JoeWatkins that address check is a bit broad ^^
you do need to bound it on both sides, otherwise you're going to treat half the address space as an overflow :P
But yeah, generally that looks like what I had mind
 
okay then, I'll come back to it later today some time ...
 
 
1 hour later…
9:32 AM
!!rfcs
 
There are no RFCs in voting. Sorry, but we can't have nice things.
 
10:26 AM
morns
 
10:38 AM
PHP Internals News episode 2 is now online! — "PHP Compiler and FFI" with @ircmaxell: https://drck.me/pin002-er8
 
11:14 AM
@ircmaxell just saw that you're also going to be at phpkonf :)
 
Yup :)
See you there?
 
yar
 
@ircmaxell @NikiC you know of other people going to phpkonf?
cc @room
 
My wife is going (@gabidavila). She talks in PHP circuits as well
 
Cool
Let me buy you all a beer / soda :-)
 
11:25 AM
And Derick apparently too
 
Is it in Istanbul or in Constantinople?
 
It's the same city :P
but Istanbul
 
@PeeHaa that is indeed the joke - youtube.com/watch?v=7sl4XCVmoXg
 
I am too much turk for that :P
 
12:00 PM
!!rfcs
 
\o/
 
if you don't mind can you help me stackoverflow.com/questions/55276297/… Thanks
 
@Jeeves This is history in the making, right here :)
 
that makes me tempted to vote
 
12:12 PM
@ircmaxell do it ^^
 
jit to vote, one week ...
one week votes should probably be the next thing to be removed ...
 
one week?
jesus
@NikiC I'll wait until the end, and if it's needed, I'll step in :)
 
I'd rather you done it now, sets the tone ...
people who are not sure may be swayed be experienced developers voting choice, rightly or wrongly, that's what we see ...
 
yeah?
done
 
cool
I hope it works, we're a few months away from release cycle of 7.4 starting, it's come along leaps and bounds in the last few weeks, but the rest of us haven't, it's still way way too soon ...
 
12:22 PM
One week of voting? wat
 
yeah, this "I'm going to get what I want, however I can" is now the modus operandi of zend ... we'll scrap one week votes, there's no good reason for them, ever ... even if something has been discussed for 5 years beforehand, we still need two weeks, at least ...
 
that-is-a-no-for-me.pnga
(for 7.4)
@JoeWatkins Sorry but, belayed Happy Birthday my friend! o/
 
thanks
 
I'm turning 30 this year, not sure if ready yet :/
 
delay it until next year ... I'm staying 35 ad infinitum ...
 
12:29 PM
I wish, at least I'm out of reach for my friends from denmark from doing the usual "traditions" which includes putting trash on your property if you are not married (Why I cannot tell) lol
 
I turn 36 this year... Meh
 
12:49 PM
It's been mentioned before, turning 7.4 into a long term security supported version would allow more changes to target 8 with less turmoil.
 
Personally, I think at least one minor release for every major should be a LTS with 5 years of support
but that's me
 
I think we don't have the resources to commit to that, and I think it's a lot to ask anyone to be an RM for 5 years ... let LTS be the domain of LTS distros imo, let us just work on pushing out those major releases on time ... but same, just me probably ...
 
yeah, I think having the same RM for the whole of an LTS version would be unfair...
 
1:08 PM
o/
 
love the simplicity
 
@JoeWatkins yes, quite a few but I need to do work before my boss shouts at me. But for example "The voting period must be declared when voting is started and must not be changed during the vote." is kind of self-contradictory if people are being contrarian, as if they forget to set it....then they aren't allowed to change it?
 
Can't wait for the sane responses once that gets pushed to internals
 
"A valid voting period must be declared before the voting is started. The voting period must not be changed during the vote."
s/started/opened/
 
1:16 PM
Or "voting period is started"
 
A valid voting period must be declared when voting is started and must not be changed during the vote.
 
@JoeWatkins I am not sure about the "extension" part. It's not like holidays just accidentally happen (just like "winter" always comes as a surprised to the road services in my country)
 
well I don't refer only to the holidays on the american calendar, but anyone's holiday
 
what I am looking at is away to abuse that rule
 
in Spain it's technically illegal to work on public holidays, some people might take that quite seriously, and want a 14+3 day vote so they don't have to break the rules in their country ...
 
1:20 PM
"My awesome proposal does not get enough votes, so I will extend it, because there was a bank holiday in Kongo"
 
well that's why you have to declare the voting period before the vote starts
 
@JoeWatkins An alternative is to have a flexible voting window based on majority.
I.e. if after 1 week you have 95% in favor it's accepted, otherwise you need to wait longer.
 
that sounds even more ambiguous
 
Which means that unanimous votes can go through quickly while contentious ones have a longer voting period
Probably too complicated :P
 
@NikiC here is a scenario: there was PHPUK2022, while vote was going ... a lot of people decided to vote against it later, but in the first week only 3 people voted to accept and one to decline
 
1:24 PM
@NikiC well it gets complicated because I can see something like "you need to sustain 2/3 majority for X days" being needed
 
week goes by, there is 75-25 split, so we can close the voting .. emm .. early (and that's hoe Laravel gets merged in php core)
 
if you have your majority after the first week, then kick back and relax, but I'd still want the other week to play out, although in most cases it won't change the outcome
 
nya, okay
 
just make the voting 2(default) to 3 weeks, with period declared at the start and with no exceptions
 
I don't like the idea of an upper limit, if someone wants to leave a thing open for voting for a month, just because it's boring and not many people care about it, that's fine I think ... it gives them time to drive voters towards the rfc ...
 
1:29 PM
@LeviMorrison Looks pretty slick! Can I use that logo in a presentation of mine? I'm publishing the slides online.
 
how do you feel about voting being opened for 9 months?
:D
 
I'd rather they left it open for a month, and drove voters in, than left it open for two weeks and it got accepted with 3 votes ...
it makes no never mind ...
 
there needs to be some upper limit
if for no other reason than just to discourage assholes
 
obviously, you'll be challenged if you behave strangely, as always ... my intent is to abolish short votes, long votes I'm comfortable with so long as we all know what is going on when they start, and if you did choose X months, you would be challenged and would have to defend your position, and I can't think of a valid justification for that ...
 
how about "no longer than php version release cycle" :D
 
1:32 PM
saying a month seems reasonable, but what if it actually isn't reasonable for someone, what if they want to leave the vote open for a month but have holiday booked at week 3, is it better to delay the vote until after the holiday, or allow them the flexibility of a 5 week vote ?
I'd rather they had the flexibility ...
the problem we actually have is that people choose the minimum, which is too short, so it solves the problem to extend the minimum to two weeks, choosing an upper bound seems arbitrary and solves a problem we don't actually have ...
 
There are some people that voted "Yes" on the inclusion of JIT in PHP 7.4 that I have never seen contribute to PHP. Do you know these people?
 
I know at least one of them is (ES) docs people
 
the other is BR doc people
 
people.php.net down?
 
very slow
I used the google site: thing
 
1:45 PM
TLS handshake times out for me.
 
Same for me
 
oh and me, I used http then gave up and used google cache
 
:P
 
@NikiC I sent you a message at gitter.im/phpdoctest/Lobby
 
2:18 PM
@littlepootis Yes? As long as you aren't implying you own PHP or that they sponsor you or whatnot.
 
@LeviMorrison that dart article was good
I like that direction
 
2:52 PM
#include <stdio.h>

#define foo(a) (a)
#define bar foo

int foo = 12;

int main()
{
    printf("Hello World, %d\n", bar(14));

    return 0;
}
weird...
 
3:29 PM
I had to ask `gcc -E ` to explain that to me, in case someone else is wondering:

# 6 "foo.c"
int foo = 12;

int main()
{
	printf("Hello World, %d\n", (14));

	return 0;
}
 
4:09 PM
that would have made life easier... I wish I knew -E
 
-S -o - is also handy ...
 
4:32 PM
Fatal error: Uncaught FFI\ParserException: '[]' not allowed at line 323 in FFIMe/lib/FFIMe.php:82
 extern char * sys_errlist [ ] ;
sigh
        $code = preg_replace('(^\s*extern\s+char\s*\*\s*sys_errlist\s*\[\s*\]\s*;)m', 'extern char ** sys_errlist;', $code);
 
4:56 PM
-0.0 and 0.0 are distinct values. – #77778
 
5:49 PM
Does anyone have an example of a twig extension that allows custom blocks with parameters? e.g. like:
{% hero_image name="steve" %}
  <img src="/images/hero-bg.jpg" />
{% endhero_image %}
 
6:09 PM
oh, I should probably just copy/extend the set block...
 
6:56 PM
incorrect syntax – #77779
 
7:10 PM
@Tiffany I'm having some now in solidarity.
 
Anyone else out there feel overloaded? Yeesh...
@PeeHaa Thinking about buying a Push 2 as well as the Waves Diamond edition for mastering tracks.
 
@NikiC Yeah, Bob Nystrom does good programming work, and also does very well explaining it too.
 
8:05 PM
I especially liked this part: in laravel the bug-reports get closed if you are not praising it enough :D
 
8:51 PM
sigh, I feel stupider for reading that
 
9:02 PM
 static __inline __uint64_t
 __bswap_64 ( __uint64_t __bsx )
 {
 return ( ( ( ( __bsx ) & 0xff00000000000000ull ) > > 56 ) | ( ( ( __bsx ) & 0x00ff000000000000ull ) > > 40 ) | ( ( ( __bsx ) & 0x0000ff0000000000ull ) > > 24 ) | ( ( ( __bsx ) & 0x000000ff00000000ull ) > > 8 ) | ( ( ( __bsx ) & 0x00000000ff000000ull ) < < 8 ) | ( ( ( __bsx ) & 0x0000000000ff0000ull ) < < 24 ) | ( ( ( __bsx ) & 0x000000000000ff00ull ) < < 40 ) | ( ( ( __bsx ) & 0x00000000000000ffull ) < < 56 ) ) ;
 }
got to parse that out :)
 
9:14 PM
@tereško :P
 
9:29 PM
It parses stdio.h, math.h, libjit's jit/jit.h, libgccjit's libgccjit.h and LLVM's llvm-c/Core.h :D
 
> 100644 → 100755
 
@Paul I never did get any 😛 I had a cup of English breakfast...then spilled it on my desk...then brewed a second cup...and let it go cold... today has not been my day for hot beverages
I suppose I'll grab a cup of hot chocolate sometime tonight
 
@Tiffany Ooo, hot chocolate sounds like a good idea.
 
@JoeWatkins Would running the benchmark via /usr/bin/time --format="%M" php ... be better? That would print the resident set size as seen by time. Is there a better way to measure the memory consumption of a PHP run?
 
9:48 PM
@ircmaxell oh … you really went ahead with it nevertheless - why? :-D
 
that dart article is cool, but I wonder if they wouldn't've been better served handling those things as sequences ala xquery rather than making a new "element" thing that's kinda weird.. sequences are always flat, putting one in another instead puts all the contents in the other, so e.g. (a, b, (c, d), e, (), f) results in (a, b, c, d, e, f) .. then their spread, for, and if could all just be expressions that return sequences, and their array could be just a box for a sequence
 
@Trowski hot chocolate plus marshmallows :D
 
@Tiffany I think I had an open bag of Ghirardelli with chips around here somewhere…
 
ooooooo
I was watching some youtube videos of how to make it the best, and I guess crushing up a chocolate bar, melting it in the microwave, and mixing it into warmed milk is the best
I'll have to settle for powdered stuff
 
@bwoebi because why not :D
 
9:59 PM
@Trowski spice it up a bit - cinnamon, nutmeg, vanilla, chili powder
 
oooh but I found some unsweetened ghiradelli cocoa powder
 
@Tiffany If I was going to do it proper, I would steam some milk and use some chocolate sauce. We don't have an espresso machine set up at the moment though, so I'll settle for the mix.
@Paul Good idea, I think we have cinnamon around here.
 
anyone feel like hand writing a C parser?
(or generating one)?
I have the code all tokenized :D
 
@ircmaxell In PHP?
 
@ircmaxell you already handle cpp?
 
10:02 PM
@ircmaxell well, initially you thought it wouldn't become that useful
 
@Trowski I heated some milk over the stove
didn't get it boiling, but got it hot enough
 
You don't want to boil it.
 
how do you steam it without boiling...?
 
160-180° at the most.
 
must be magic
 
10:10 PM
The water is boiled of course, but the milk is just heated by the steam.
 
@ircmaxell from what language? I'm not sure I'd be able to do it, but might be a worthy challenge, if I can even figure out where to begin.
though, may be a good challenge just for myself
 
@ircmaxell ewww, doesn't c have quite a bit of contextual resolution regarding whether something is an identifier or a type?
 
@bwoebi yes ;)
@Trowski yes, in php
@Paul no, only c header files.
 
I'll pass :)
 
@bwoebi I do now from 2 angles: first, working with the low level lib is a bit annoying, and simplifying could help. And 2) I am curious about performance of the compilation step and the generated code...
 
10:25 PM
@ircmaxell quut.com/c/ANSI-C-grammar-y.html - don't you have a parser generator in PHP?
 
I do :)
 
> This grammar assumes that translation phases 1..5 have already been completed
 
Though I already have tokens. So need to map a to be. Otherwise, sounds good to me :)
 
Ah PHP-YACC is the name, I was searching for some repo named parser generator or such :-D
 
Actually, that's a great idea. Thanks :)
@Paul they are. FFIme already runs a preprocessor which does most of that :)
 
10:31 PM
happy to help you
 
I need to find some anti crazy pills, cuz I feel like I'm going off the deep end gear
 
I … ehm … I think you should not take these. It's fantastic what you're doing right now
 
Aww. Thank you :)
 
10:52 PM
@SebastianBergmann rss tends to overestimate usage, I tend to use lower level tools like googles perf tools, or valgrind ... the problem is that you would need the patience of a saint to run xdebug on any of those test suites through any kind of heap profiler ...
you can't just swap the allocators in xdebug source because it corrupts the heap instantly, and I can't be bothered to find out why to be honest ... there is probably some deep seated reason that it doesn't use zend mm ...
if you really want to have a go, I suggest using tcmalloc heap profiler with LD_PRELOAD, here's some help page to get you started gperftools.github.io/gperftools/heapprofile.html
you will have to USE_ZEND_ALLOC=0 in environment for both pcov and xdbg because the mm maps reigons, or you can turn on mmap profiling, but that has some drawbacks ...
running under these tools can make things up to twenty times slower, for xdebug, that means waiting about one year for any decent size suite ...
it's worth noting that even then, the numbers may not be an accurate account of what is actually being used, but with clean runs and correct usage, they will be skewed to the same degree ...
profiling c programs in general is a bit of an art, not for the feint hearted, there is no really simple way to get the right answers unfortunately, even to simple questions like "how much memory does this program use" ...
 
11:14 PM
@bwoebi that's quite tiny. I may just implement a full AST generator for that. Not sure why, but shouldn't be much more work than I am planning already...
 
11:35 PM
@JoeWatkins 5 * 7, very PHP
@Wes what's the point in modifying a copy if it isn't saved anywhere?
 
@Andrea ha, very
 
Wes
@Andrea i have no idea why someone would star that
 
@SebastianBergmann I tried to use tmalloc with xdebug, it crashed that too, I don't know why ... it took a long time to fail, nearly an hour ...
I've had enough of yesterday, I'm going back to bed ... holla if I can be helpful with anything ...
nn all
 

« first day (3078 days earlier)      last day (1863 days later) »