« first day (3110 days earlier)      last day (1854 days later) » 

12:24 AM
hello
 
12:40 AM
User must be able to register-user must be able to see in a list the barbecues available near his area (radio
From 10km)-user must be able to bookear a barbecue one day and for a number of user hours must be able:
-Create barbecues (with basic properties, photo, model, description). -User must put his ZIP Code when registering a barbecue-user should be able to see the bookings of their barbecues-if a barbecue is already rented for a specific schedule, the application should not allow it to rent and show an appropriate message.
 
 
1 hour later…
1:43 AM
@EduardoHerrera sounds like homework
 
2:06 AM
yea
can you help
 
2:25 AM
#lazyweb is there any poly-fill for the lack of RefelctionNamedType::getName() it seems PHP7.0 gives us ReflectionType instead and ::getName() isn't there.
 
Wes
@marcio i don't understand why there are two classes
ah probably because __toString includes ?
or something like that
 
3:00 AM
From by-refererence passing on ... in arrays:
> [I]f elements in the array to be unpacked are stored by reference, they will be stored by reference in the new array as well.
This seems reasonable. Any objections? Especially cc @NikiC @bwoebi, @ircmaxell.
(but open for opinions from everyone -- be sure to ping me, I'll be driving)
 
3:44 AM
@EduardoHerrera we won't do your homework for you. However, if you've a specific question related to a part in your homework, that is appropriate to ask.
Otherwise, you need to be specific on what you want help on. For example, are you having trouble understanding what is being asked? Are you having trouble with a part... and if so, you need to ask that question rather than pasting your homework assignment.
An example: I was working on a homework problem in CS50x. I was having trouble understanding why a part of my program was not outputting correctly. People in the room gave me hints that led me to solving it. That's suitable.
@EduardoHerrera see: meta.stackoverflow.com/a/334823/2524730 specifically: "Asking about homework"
 
4:07 AM
https://stackoverflow.com/questions/5888089/when-to-use-php-template-engines

The previous consensus: "Don't use a template engine". Where are we at on this in the PHP community after 8 years? Thoughts?
 
 
1 hour later…
5:13 AM
@Jesse Twig, or plain PHP: chadminick.com/articles/…
 
5:47 AM
Each product has a product manager, is there any job position for a guy who manages all product owners in a company?
 
 
1 hour later…
6:49 AM
\o
 
7:08 AM
o/
 
@JoeWatkins Thank you for your birthday present ;-)
 
you're welcome, but but ... what did I do ?
 
You sent me a pull request on my birthday :-)
 
ah, another one is coming ... then some words ...
Happy Birthday @SebastianBergmann
8
 
Spent the last ~ 10 minutes reading and then re-reading words you already wrote.
@JoeWatkins Thanks!
Trying to understand github.com/sebastianbergmann/phpunit/issues/…. What is this change to is_callable() about?
 
7:20 AM
https://lxr.room11.org/xref/php-src%407.4/Zend/zend_API.c#3122 < - PHP-7.4
https://lxr.room11.org/xref/php-src%40master/Zend/zend_API.c#3000 <- PHP-8
I hate markdown, and mornings, and mondays ...
 
can you see there what's going on, or want more words ?
 
No need for more words, I think. Quicky glanced at it. If I want to understand it more deeply then I'll know where to start reading code. Thanks!
 
I think actually when I was voting for this removal, I did not for see this as a consequence, but probably nikita did, it's probably intended ... and the removal makes sense anyway ...
on a side note, down with is_callable in general ... if you do start digging around you'll see what an awful lot of mess there is ... in cases where the callability of a method is enforced by the contract of the interface it is implementing/extending you want to use method exists because it's only a few lines ...
 
Yes.
I am refactoring the method in question to not need is_callable() anymore.
 
7:28 AM
cool
 
7:43 AM
@JoeWatkins As you predicted, after getting rid of is_callable() there's only 1 failure left: github.com/sebastianbergmann/phpunit/issues/…
 
excellent
 
Probably won't look into that today, though. It's time to go to the kitchen.
 
yes, birthday things, have fun :)
 
@LeviMorrison I asked about that on list ... got a response two weeks later and immediately after that voting opened based on "no further questions"
Yes, if you wait two weeks to discuss something then there will be no discussion for two weeks, duh
@LeviMorrison As for the behavior itself, I don't like it, but it's what array_merge does, so it's not a big problem for me
That is, it just perpetuates an existing problem further
 
8:00 AM
 
!!rfcs
 
 
1 hour later…
9:23 AM
@JoeWatkins @NikiC How was define() changed in PHP 8? github.com/sebastianbergmann/phpunit/issues/… has context / an example.
 
could be a case sensitivity thing
 
Sorry, I meant defined(), not define().
 
9:50 AM
@SebastianBergmann what are you passing to defined?
@SebastianBergmann 3v4l.org/s2lBQ/rfc#git-php-master 'tis a bug
@SebastianBergmann hah, it's a flag value clash...
@SebastianBergmann Should be fixed by github.com/php/php-src/commit/…
 
10:16 AM
Hi :)
 
 
1 hour later…
11:23 AM
@NikiC It is. Thanks!
 
11:49 AM
Any ideas why this doesn't work in php?
(["'])(?:(?=(\\?))\2.)+?\1
preg_match_all("/([\"'])(?:(?=(\\?))\2.)+?\1/i", $request->q, $matches);

returns an empty array
But works perfectly at regexr.com
I think maybe PHP doesn't count groups like \n patter (n is a natural number)
+ I forgot to say, this regex matches anything between two double quotation marks
 
MGE
12:32 PM
Hello, I have a class and I'm using __toString() magic method but it doesnt return the string
I call like this:
$name = new FullName($request->forename, $request->surname);
and the return is: "name":{"forename":"Mike","surname":"Gen"}
instead of "Mike Gen"
 
@LeviMorrison seems reasonable. But why not allow unpacking byreference?
 
12:55 PM
@X4748 you should use single quotes for the string I guess
 
/me waves
 
@ircmaxell what's the current state of the compiler?
 
@bwoebi You're saying "I guess", it means you haven't tried, hmmm... I don't think that's the problem, though I tried similar things
 
I'm learning so much in this forum. Thanks guys.
 
@X4748 It means that I had previous negative experience with not properly escaped backslashes in double quoted strings
 
1:01 PM
@bwoebi starting work on "Value" (zval) support
 
This has to return an array:

preg_match_all("/([\"'])(?:(?=(\\?))\2.)+?\1/i", ' "text" ', $matches);
 
php > var_dump("/([\"'])(?:(?=(\\?))\2.)+?\1/i");
string(26) "/(["'])(?:(?=(\?)).)+?/i"
@X4748 ^ see, it's interpreting the \1 and \2 as octal escape sequences
 
@bwoebi +1 What am I supposed to do right now?
 
though I did just run into an issue with boot time growing drastically. It's up to about 0.5 seconds. Not sure off the top of my head how to debug that, since I doubt any profiling tools are ready to work with 7.4
 
@ircmaxell i.e. for the cases where you cannot unambiguously determine the types?
 
1:03 PM
@bwoebi Right...
 
@bwoebi correct, or where types change over time
 
@ircmaxell github.com/nikic/sample_prof should be simple enough to not really break with the PHP 7.4 migration and otherwise should be fixable quite easily (given the small code)
 
o/
 
@bwoebi is it an extension or a zend_extension?
 
@ircmaxell simple extension
 
1:07 PM
Happy Monday!
 
@bwoebi Still doesn't work

preg_match_all('/([\"\'])(?:(?=(\\?))\2.)+?\1/',' "text" ', $matches);
 
rebuilding my test container
 
var_dump => string(26) "([\"'])(?:(?=(\?))\2.)+?\1" hmmm...
 
@X4748 do you want \\\\?
 
@ircmaxell I'm pretty sure it should be "PHP 8" instead of "PHP-8" (two places).
 
1:12 PM
I tried to make it consistent and use PHP-Version everywhere
 
I would write "PHP version" except obviously when the explicit branch name is meant
feels weird to me as well tbh
 
I don't think so! I copied that regex from somewhere, what I want is exactly this following regex:

(["'])(?:(?=(\\?))\2.)+?\1
I don't know why the man who has written this didn't just use " .+? " it works well too
 
@bwoebi in quotes?
the git branch is PHP-7.4
 
@ircmaxell no
@ircmaxell yeah, because it's not practical to have spaces in a branch name
 
but isn't then the - canonical?
 
1:20 PM
@bwoebi Thanks man, The problem is solved.
 
I'm sure if spaces weren't cmd arg separators, it would be a space
 
I just needed to change the string/regex to: (["'])(?:(?=(\\\\?))\2.)+?\1
 
@ircmaxell I'd say canonical is what's used in release announcements, and that's with a space
 
fine
whatever
 
yeah, too un-important
lol
my bike shed is red I guess
or maybe blue, I'm not sure :-D
 
1:22 PM
The output of simple_prof isn't that useful
though maybe it's spending too much time traversing the filesystem looking for shared object files?
@TheodoreBrown "fixed" (in qupotes because it wasn't broken)
 
1:42 PM
Yup, it is spending too much time traversing the filesystem
$start = microtime(true);
$this->llvm = PHPLLVM\Chooser::choose();
$end = microtime(true);
echo " - PHPLLVM Loaded in " . ($end - $start) . " seconds\n";
 time php bin/jit.php -r "echo 1;"
 - PHPLLVM Loaded in 0.48559808731079 seconds
1
real    0m0.616s
user    0m0.192s
sys     0m0.416s
 
2:02 PM
github.com/ircmaxell/php-llvm/blob/master/ffi/llvm9.php <- that file takes 0.05 seconds to compile...
sigh
 
2:14 PM
Ooo, that switch to glob from RecursiveIteratorIterator dropped 0.4 seconds off runtime
 
Mornings
 
\o
 
ffs.
@ircmaxell what host are you running the docker container on?
/host os.
 
@salathe ... what?
 
@LeviMorrison indeed
 
@salathe Needless to say that none of his website links work.
Oh, wait, the background changed
 
@MadaraUchiha his fiber connection must be down, give it 10 minutes :P
 
2:45 PM
:D
 
Poor Lester always seems to be flailing about in the deep end of the pool.
 
@salathe This is a common occurrence?
 
2:57 PM
@Danack Ubuntu
 
@ircmaxell I found a few other typos:
"where as" should be whereas. "straight forward" should be straightforward.
"the source code that write" I think should be "the source code you write".
 
3:14 PM
@TheodoreBrown queued up behind 3 deploys
 
@TheodoreBrown I almost expected "the source code that write" should be "thesourcecodethatwrite"
 
hehehe
 
3:30 PM
There's one other usage of "straight forward". :D
 
Considering a composer.json file has this:
"codeception/phpunit-wrapper": "^6.0.9|^7.0.6",
How can I tell Composer to use preferably ^7.0.6?
Considering I don't have control over the composer.json file (It comes from a third-party)
 
add it to your current composer.json?
(the first-party one)?
 
4:00 PM
@salathe wtf:D
 
^^ that. Or put 'conflicts' into yours.
 
@ircmaxell Good one.
Just opened a question minutes ago, though. Care to answer? stackoverflow.com/questions/55797187/…
If you don't feel like doing so, I can post an answer. Just let me know.
 
meh
go for it
 
Well I messed up my digitalocean(DO) ssh key while playing around and I have PasswordAuthentication: no is there a way to remove this config from DO the security panel didnt help.
 
@Ghostff you might be able to fix it through setting a new script to be run at startup maybe? Though you could also just nuke that instance and get a new one.
 
4:13 PM
@Ghostff It should provide a "kvm" console
a.k.a. a virtual terminal to get into the machine without ssh
 
I just made a Frankenstein's monster: Python code embedded directly in @rustlang code. Should I kill it before it escapes the lab? 👩‍🔬
 
4:30 PM
hehe
 
enum {
  LLVMMDStringMetadataKind,
  LLVMConstantAsMetadataMetadataKind,
  LLVMLocalAsMetadataMetadataKind,
  LLVMDistinctMDOperandPlaceholderMetadataKind,
  LLVMMDTupleMetadataKind,
  LLVMDILocationMetadataKind,
  LLVMDIExpressionMetadataKind,
  LLVMDIGlobalVariableExpressionMetadataKind,
  LLVMGenericDINodeMetadataKind,
  LLVMDISubrangeMetadataKind,
  LLVMDIEnumeratorMetadataKind,
  LLVMDIBasicTypeMetadataKind,
  LLVMDIDerivedTypeMetadataKind,
  LLVMDICompositeTypeMetadataKind,
  LLVMDISubroutineTypeMetadataKind,
/me sighs
 
wat
why is that enum not simply named...
 
 
1 hour later…
5:55 PM
trying to think what else really needs to get done before an "alpha" quality release: github.com/ircmaxell/php-compiler/projects/1 (ping @bwoebi and @driusan but anyway can definitely comment)?
 
6:07 PM
@salathe too
@ircmaxell If there is another Van Helsing movie- you should totally audition.
 
6:22 PM
@StatikStasis huh?
 
Wes
or a karl marx movie :B
 
Weird, running on 18.04 I get a single test failing
Oooo, it's because strings are broken, and I'm corrupting the heap
 
6:45 PM
evenin
 
@ircmaxell Are you employed right now? You seem to have a lot of spare time :)
 
shh don't tell
 
naah, he's better suited for playing a bad guy in one of those old spaghetti-westerns
 
Wes
he would do a great nightwatchman
 
6:52 PM
What is a spaghetti western?
 
Wes
a western movie made by italians... like sergio leone @StatikStasis
clint eastwood...
 
Wes
kids these days... i think you should watch the "dollars trilogy"... it's pretty epic :B
 
I just call them all "westerns."
Tombstone was my favorite.
Seems I have watched "spaghetti westerns" and didn't know it.
The Good The Bad and The Ugly.
 
Wes
tombstone is on that genre yeah
 
6:57 PM
@ircmaxell include/require? Autoloading, maybe? Maybe a better defined subset of which parts of the stdlib are required
 
I guess superglobals would be part of the SAPI one
 
My new arch-enemy:
 
@LeviMorrison ish. leaving the company. And doing a fair bit of it in between the other responsibilities
 
7:05 PM
@PeeHaa I dont even know how this is happening but when i try to access with the insite console, i get this error "[error] 26776#26776: *1517 FastCGI sent in stderr: "Primary script unknown" while reading the response header from upstream" and "request: 'GET /css/bootstrap.min.css.map HTTP/1.1' upstream: 'fastcgl://unix:/var/run/php/php7.2-fpm.sock:"

Like what does the console have to do with bootstrap.
 
@ircmaxell PDO (or some kind of DB access layer)? A dev web server? Not sure if they'd be needed for alpha status..
 
@Ghostff what is an "insite console"
 
Anyway - you have mismatched directories on where your files actually are and where probably both nginx and php are looking for them.
 
I dont have a copy of the site, nuking might cost me alot of work.
 
7:18 PM
@driusan definitely a dev web server. a DB layer would definitely be nice there. Good idea
 
@Ghostff sorry I don't have time to really dig in - why would you be getting errors from your site when you try to access that console? They shouldn't be related.....you probably need to open a ticket with digital ocean.
 
Wes
@ircmaxell the funniest part is the batman bit :D
 
@Wes I have a picture of me wearing a real batman mask instead of the photoshopped one
 
Wes
and you are not using it as avatar? :B
 
7:24 PM
@Wes ಠ_ಠ
 
Wes
i suppose you are not using it for the same reason i don't use the one of me wearing a wolf costume's head. it's not a direwolf, it's not a cool wolf, it's the three little pigs's wolf head :B
i should point out that the photo was taken before furries were a thing
:B
 
7:48 PM
Rebecca Black's Friday just got banned on YouTube from almost every country :O
I wonder if this has to do with UK's new law?
 
!!rebecca
 
@Danack Only 3 days, 4 hours and 11 minutes left until Rebeccaday, OMG!
 
still works for me...
 
@Wes My mitre saw is my favorite tool.
 
This played out funnier in my head but you just Rebecca Blacked yourself :P
 
7:55 PM
So, I am the winner.
 
What day is it? Am I off tomorrow?
 
I suppose so
I need to refresh on PSR-4, automated testing, and Agile Development
 
Wes
8:18 PM
@StatikStasis yeah it's cool. i might end up buying it :B
 
Wes
lol, if i bought that i'd force myself to become an actual carpenter just to justify the purchase @StatikStasis
 
Wes
there are some good looking 100$ ones, with the arm that extends other than just pivoting
 
Festool is very expensive.
 
Wes
8:25 PM
speaking of westerns... i am trying to watch a "western" movie... the ballad of buster scruggs... but i am so uninterested that i've stopped it at 1/4... not sure if i should continue
 
If you don't like it then stop now.
I try to never continue watching something that is bad even if I am half way through- otherwise I have fallen victim to a semi version of the sunk cost fallacy.
 
How intensive is reading class method DOC block really?
 
@Wes I only got a few minutes into it
Couldn't finish it
 
Wes
but people keeps telling you that it's great? @Alesana :B
 
Different tastes maybe? I don't know, maybe I should give it another chance myself
 
Wes
8:30 PM
it's been rather silly and uneventful so far... not sure what to make of it yet
compare that to "the hateful eight"... what a movie. tarantino is a legend
 
I'm not totally against western movies but they have to be really good for me to like them
 
@Wes oh, that, let's see what __toString is doing otherwise I'll need a wrapper.
 
Wes
@Alesana the john wayne kinda movies didn't age well
 
Not at all. I really like Highwaymen though
 
@ircmaxell Rust first class macros never cease to impress.
docs.rs/inline-python/0.2.0/inline_python/#syntax-issues the limtations imposed were not a deal breaker at all
 
8:53 PM
@Alesana that was just too sloooow for me
/me is peehaa fwiw
 
That's usually the problem I have with western movies but that one kept my interest
 
@Ekin !! So you don't really have a girlfriend and you made one up to interact with yourself over the internet... PeeHaa I am just disappointed. =p
You really went through some elaborate measures to convince us.
How resource intensive is in_array?
 
Wes
9:13 PM
very @StatikStasis linear search
i mean not resource intensive, it's just slow
if you are making a Set (the abstract data structure) you can use string keys.
isset($array["foo"]) is much faster to run than in_array("foo", $array)
@StatikStasis all makes sense now :B
 
@Wes ok- that makes sense. Thank you.
@Wes =D
 
9:45 PM
@ircmaxell It's kind of nice, yeah.
 
@ircmaxell I didn't know Rust was the voted the most loved programming language on Stack Overflow for 4 years in a row.
No ternary conditional in Rust; I like that.
 
I didn't realize their object model was that developed. That's kind of awesome.
 
@Alesana you mean this?
(bad link, I meant only first song, din't expect it to be the whole damn concert)
 
Hey colleagues, could somebody help me explain this:

```
2019/04/22 08:38:19 [error] 11844#11844: *35843 FastCGI sent in stderr: "PHP message: PHP Fatal error: Maximum execution time of 30 seconds exceeded in /path/to/app/var/cache/prod/ContainerRpx7pic/getValidator_BuilderService.php on line 8" while reading response header from upstream, client: 1.2.3.4, server: <lb-ip>, request: "POST /request HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "app.tld"
```

the 8th line in that file is `include_once $this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Comp
 
@zerkms DO?
 
9:59 PM
bare metal, own machine
 
10:30 PM
this is just my dunk-self, but it looks like the timeout is between webserver and php-fpm instead of fpm-to-fork
wait, no, hmm
ignore the first statement - it was too stupid
 
I can imagine that disks were to busy to serve reads for that very process (this machine runs A LOT of stuff), what I cannot understand is why php-fpm forks sh
what's even more curious - is that it happened twice that day and in both cases it was exactly the same line #8 of getValidator_BuilderService.php o_O
if it was just a random spike of IO so that it made it unavailable to stat all php files, then I must have been extremely lucky that it was hitting the same file while it happened
 
11:03 PM
Is $_SERVER['HTTPS'] supposed to be set automatically? I'm running into a weird problem where I'm porting a site from one version of a framework to another and in the new version, requests using the HTTPS protocol aren't resulting in $_SERVER['HTTPS'] being set to 'on'. Shouldn't PHP always be doing this automatically?
 
@PhantomWatson the magic word here is "framework" - some of them like to fuck around with the global variables
 
@NikiC do you know if it is worthwhile to try make allocations just below a power of 2? Buddy system, etc. Not sure about block headers or whether the memory manager can guarantee anything here. Is this premature optimization or a worthwhile consideration?
 
:P
 
@PhantomWatson a scientific guess: trusted proxies?
 
I'm trying to root out the framework being the culprit and want to make sure there isn't any explanation outside of that. I'm just loading localhost versions of these sites at the moment, so no proxies.
 
11:08 PM
@zerkms layman guess: would the opcode cache deal with that scenario?
 
@tereško it's enabled there (I hope), and it only happened 2 over the course of several months
 
@PhantomWatson it would be a lot more prudent to deal with https stuff at the webserver level (apache, nginx, lighttpd)
 
@zerkms maybe check the number of file descriptors allowed max and currently in use.
 
@Danack by php-fpm process?
 
in total.
 
11:10 PM
uhm, does not every process have its own limit of fd open?
 
I think there's a process limit but also a system limit
 
@tereško Yeah, but everything seems to be configured the same way between the two sites. Same server, identical virtualhost configuration (other than domain name and document roots), etc. I can't figure out why Apache would be ignoring the HTTPS protocol for one and not the other.
 
@zerkms can you use "fuck it and add code to deal with the fallout" approach there?
 
```
cat /proc/sys/fs/file-max
3279396
```

And currently opened - just 187158
 
@PhantomWatson try doing a var_dump() at the top of the index/bootstrap file, just to rule out framework fuckery
 
11:13 PM
@tereško I actually don't mind yet - those are 2 random glitches, unless it becomes pita I won't spend too much time on it
 
@tereško A var_dump() of $_SERVER?
 
@PhantomWatson yes
 
That's an excellent idea.
 
@zerkms those MIGHT be just the gremlins
 
Huh. Yeah, it's not being set at all. It's not just the framework.
 
11:15 PM
(like an admin doing some update, you making a deploy, things like that)
 
I am the admin :-D
 
sysctl fs.file-nr
 
I do everything here, so it's no one else to blame
 
that might also show available.
 
are you trying to tell me "it can't be my fault"?
 
11:16 PM
# sysctl fs.file-nr
fs.file-nr = 59520 0 3279396
@tereško it totally is my fault, I have no problems accepting I'm an (below?) average system administrator :-)
 
two incidents per day would be a problem, 2 per 6 months - it;s the cosmic rays ficking with random bits in the RAM
AKA - gremlins
 
yep, but at this point I have no idea where to dig next
 
maybe setup a script to run that command every five seconds and correlate the output if you ever see it again. As well as maybe something to monitor cpu usage per process?
 
yep, I installed atop just in case if it ever happens next time
 
11:44 PM
@ircmaxell I just read your newest blog post - https://blog.ircmaxell.com/2019/04/compilers-ffi.html - still digesting, but one thing caught my attention ofc:

> If you’re worried about performance, you should be. These macros take a while to process (about 1 second per file) [...]

Something intriguing must be happening. All your macros have a literal entry point like `compile {` or `declare {`, so no matter how big are the files being processed this is not the expected overhead. I wanted an excuse to take a deeper look at your project, now there is one xD 9
 

« first day (3110 days earlier)      last day (1854 days later) »