« first day (2528 days earlier)      last day (2417 days later) » 
00:00 - 20:0020:00 - 00:00

8:06 PM
> PHP 7.1.9-1+0~20170902060745.8+stretch~1.gbpebe5d6
WTF
 
@PeeHaa sup?
 
Nothing much besides wtfing on debian version numbers
 
Sep 24 '15 at 16:02, by Danack
/* For the love of God.
     *
     * Debian doesn't include the function "ImageColorMatch" as it has been included by the PHP developers and
     * and so is considered a branch of GD library - and so is a security risk. Because the PHP developers wrote it.
     */
@PeeHaa it could be a nightly build, with the hash of the built files, so they can check the build is reproducable?
 
Dunno :P
Also somehow landed in a new vim which does fucky things in terminal
I hate linux
 
@Danack Where is that from?
 
8:18 PM
@MadaraUchiha I wrote it, back in about 2010.....when I found out that the Debian maintainers make modifications to PHP to make it fit within their religious practices.
 
I see
 
Anyone used both the PHP redis extension, as well as predis?
 
I have a virtualhost with the name project.com and when I go to project.com it goes to the project public directory.
 
In Predis, you can do:
 
Now I want it to be on port 8080
 
8:19 PM
redisClient->set(
                $lockKey,
                $lockToken,
                'PX',
                $lockTimeMS,
                'NX'
            );
To set the timeout for a key while setting it. That.....doesn't seem possible with the PHP extension?
 
But this requires me to do project.com:8080
 
@Danack Maybe the extension is written for a pretty old Redis version?
 
@CoderDudeTwodee The app is on port 8080, and you want users accessing from port 80?
 
Probably the first one...
 
I want project.com to actually go to 127.0.0.1:8080
@MadaraUchiha Can't the app name resolve to port 8080?
 
8:23 PM
@CoderDudeTwodee No, that is not possible.
Your hosts file only affects hosts, not ports.
 
How about I let it listen to both 80 and 8080?
 
Then what are you solving?
 
I figured it out, nvm.
I just wanted to test it across my local network, so SOME_IP:PORT is what I need to use in another device on the network and project.com can be accessed from my server.
 
Normally, in apps that are not tumors upon Apache or something of that sort
You listen to some port only locally
Then you have Nginx or some similar webserver technology acting as a gateway
So that a request to my.ip gets internally redirected to 0.0.0.0:8080
That also allows Nginx to handle TLS and all those fun stuffs
But that's more for production.
</random-rambling>
 
@MadaraUchiha you mean a unix socket? :)
 
8:31 PM
@FlorianMargaine Hmm
Never did that, but that would be better, probably, yes.
 
It's the standard prod stuff when possible, less overhead than TCP and more possible ACL
(although a lot of things don't know how to listen on a Unix socket, so you end up on a random TCP port)
(I'm looking at you, xdebug a few versions ago)
 
@FlorianMargaine Seems like Node's 'net' module can, which probably extends to http and express
@Saitama I especially liked the walk to your doom at the very beginning.
 
@MadaraUchiha yup, stdlibs can, it's just the frameworks that usually suck
 
Hmm, how does one create a socket though?
Or is it just an empty file that's called something.sock?
Through which traffic runs?
I mean, the official way includes C code, which I kinda don't want to do.
@tpunt Why not something like $"some string {$value} interpolation" or some such?
Why introduce a BC break at all? #{} sounds like it's something that could be used in templating engines etc
 
user379888
8:55 PM
What would be a good resource to learn Magento 2 theme development?
 
maybe their docs?
 
ik this is a php room
but i have a question about apache instead
i tried uninstalling apache from my mac
how can i verify that i have it uninstalled
 
that sounds like a mac question
 
is there a mac room
 
I would not know
 
9:06 PM
well i cant find a mac room
so im not sure which room i shud ask
but i went here because im supposed to download xammp which has apache and php
but i accidently installed apache
so i wanted to remove it
i followed some steps but i just want to know how to verify it
 
tfw the rabbit hole looks enticing but v. deep
@PeeHaa what's cracking?
 
@DaveRandom Trying to let all that git shizzle come together, but I am first settling on file based and hide it on a class so I can switch it out later
 
@MadaraUchiha Aerys can too … since a week :-P
 
I was looking at the libgit/pg thing earlier, it's not that far away from copypasta from the mysql version, I can write some code that compiles but you'll have to test it yourself. Deal? :-P
 
@bwoebi Neat!
 
9:11 PM
What I was looking at
 
My question stands though
How do you create a socket without resorting to C? :D
 
How to make the backend work with the extension?
Do I have the php extension for the libgit binding and another extension for the backend?
 
@MadaraUchiha In PHP you mean, to create an unix socket listener?
 
@MadaraUchiha umm... wat? stream_socket_server()
 
@bwoebi No, create the actual socket file
 
9:12 PM
or socket_create() if you are a nihilist
 
@MadaraUchiha uuuh … binding an unix socket creates it
 
@bwoebi So I just specify a path to a nonexisting file and the OS is supposed to magically create it for me?
 
basically
 
Neat
Will give it a try when I'm on my Linux boot
 
@PeeHaa I dunno, I didn't really look at the PHP binding. Seems to me that the sane thing to do would be for the ext to define an interface to allow for userland impls
 
9:20 PM
I think it kinda does that
1 sec
 
I dunno though, tbh I haven't really looked much into what libgit2 is doing behind it either, I just looked at the mysql impl and read the libpq docs briefly
 
@DaveRandom I guess this does that github.com/garvins/php-git/blob/php7/example/… ?
That ^ should even allow me to do in from php
If I read that right
 
ouch my eyes :-P
 
yes that
 
yeh that looks like it does that, but wtf array of callbacks :-P
 
9:23 PM
That why I want to look into doing it transparently somehow at some point
 
I mean there's not much to be gained in terms of practicality tbh
that impl is so simple that it's pretty much write once, never touch again
and perf-wise, all the significant waits will be I/O bound
reimplementing it in C doesn't give you anything, really
 
Fair enough
Still very much at the trying to see how it will work together phase so mostly just dicking around atm
 
I'm just reading code without really knowing what the point of it is here, btw, how would this thing actually be run?
like, is there a concurrency element to it?
 
Webbased Git GUI
 
OK, by which I assume you mean git server, a la github/bitbucket/etc
?
 
9:28 PM
yes
 
that's going to fuck the last company I was working for.
 
@Danack Yeah read that. I feel so bad for them
 
well I can see value in the php-ext having built-in support for a pgsql back-end transparently, I guess
can potentially leverage existing conns/pools from ext/pg and pecl/pq
same for mysql support I suppose
 
We don't really care about mysql :P
 
9:31 PM
@MadaraUchiha How would this work with the heredoc syntax? And would it still be viable to use with the execution operator? Those are the main reasons why I haven't taken the sigil approach. Upon double-quoted strings alone, it would be a good approach, but then it loses its full ability to be used in any interpolation context.
 
I will have another look and see if I can understand how that code actually works, rather than just looking how easy it would be to copy/paste :-P
 
Also just so you all can laugh at me. I also looked into implementing the git protocol in userland
:P
 
You are talking to someone who once started implementing the LDAP protocol in userland. I have no room to laugh :-P
 
:-)
 
One day I might finish that, I seem to perpetually have reason to work with LDAP
 
9:33 PM
You are just drawn to it for some reason :P
 
I do get some kind of perverse enjoyment from it, I admit
 
Either way no worries and no rush on the git thing
 
So....I need to have a deadline to get stuff it seems.
!!remind announce userland session library in 6 days
 
Reminder 39183454 is set.
 
\o/
 
9:38 PM
I need to have a deadline that has already passed in order to do stuff most of the time
it's pretty annoying
 
You're not alone
the more annoying thing is when someone rushes you for something that is due in like a month.
paid overtime and all, but rather not have the stress of them making it seem like it's the end of the world if not done tomorrow.
 
Anonymous
Evenine
 
Yo
 
Anonymous
!!wotd
 
Anonymous
Oh yea
 
9:49 PM
huh
 
Anonymous
!!plugin enable wotd
 
Plugin 'wotd' is now enabled in this room
 
oh
 
Anonymous
!!wotd
 
I dun goofed
 
9:49 PM
k
 
Anonymous
!!plugin disable wotd
 
Plugin 'wotd' is now disabled in this room
 
?
 
Anonymous
They changed their UI
 
Did they change their site?
ah
 
10:15 PM
> add($callable) - This method prepends new middleware to the app's middleware stack.
Reverse ordering FTW
 
Wes
10:29 PM
@PeeHaa sexy
 
if I want to run a while() loop until a break is encountered would I just do while(true). It feels wrong to me. =o\
 
Depends on the use case. While(true) may be perfectly fine
 
Wes
@crypticツ it's hard to write the condition sometimes. imho all loops would be more readable if they were like that
 
@Wes yep <3
 
Wes
for() like is very stupid. the first bit is just variables that you could assign outside:
$i = 0;
for(;...;...)

for($i = 0;...;...)
 
10:41 PM
yeah, it looks a lot nicer. I guess I've always considered while(true) bad because it could end in an infinite loop, but then again any while loop can.
 
Wes
and the rest isn't really readable. the third part should be much more readable if it was at the end of the block, like do while
 
I have to pass some variables to an include, is it better to use a function or global $var?
 
okay protip, if you want to contribute to PHP core, buy an AMD Ryzen 1700 CPU:
OH YEAH, FINALLY under Ubuntu on Ryzen 7 1700, #PHP builds in 22.53s and maxes out the CPU!!! THE POWER OF `-j16`… https://twitter.com/i/web/status/909541040876597249
--disable-all (plus a few extras I explicitly whitelist) builds in 22.53s
mind you that's with configure and buildconf omitted, but…
 
@yessure just include the file and declare the variables before the include statement?
 
@crypticツ that doesn't work
 
10:51 PM
…I should take the lead on parallelising make test, shouldn't I. wouldn't want to waste those 16 threads :p
 
because I'm doing it into a class' function
 
@NikiC @bwoebi out of sheer curiosity, what kind of machine do you develop PHP on?
 
pass it via the method as an argument
don't use global
 
@crypticツ yeah, that is exactly what I was thinking, thank you
 
Wes
10:56 PM
@yessure that does work
 
@Wes I'm doing it into a class' function
 
Wes
function bar(){
$foo = 44;
require("file.php"); // file can see $foo
}
 
@Andrea my MBP from early 2013 … was the second retina version I think.
 
@bwoebi quad-core?
 
@Andrea yeah, 2.7 ghz i7
 
11:03 PM
$var = 12;
class foo(){
function __construct(){
include('something.php');
}
}
 
@Andrea there's nothing more annoying than build times
when developing on a project like php
 
@bwoebi at least PHP has fairly reasonable ones even on a mere SMT dual-core (so long as you aren't building all exts)
 
Wes
i thought you guys liked fighting with cardboard swords
 
@Andrea yeah, but from time to time I have to, small change in a define or always_inline function …
@Andrea well, how long does it take you for a disable all build?
 
11:19 PM
@bwoebi on my laptop? a bit over 2 minutes I think
longer with configure included
though I don't strictly use --disable-all, my normal config line is ./configure --enable-debug --enable-phpdbg --disable-all --disable-cgi --enable-opcache
 
yeah, I usually also build common extensions like zlib, sockets, openssl, mbstring so that Aerys works :-D - takes about a minute then.
Also, often enough zend_execute.c is being processed only at quite the end and there's like a 10 seconds where all other compiling finished, and linking is waiting for the executor finishing as well
 
11:35 PM
> takes about a minute then.
points at the person who's never had to work with a large C++ codebase
 
@Danack I have compiled large C++ codebases. That's annoying enough. Thank you very much.
Also I wish ventilation would be much more effective; under full load CPU freq drops to ~1,2 GHz after a 1-2 min
 
00:00 - 20:0020:00 - 00:00

« first day (2528 days earlier)      last day (2417 days later) »