« first day (2370 days earlier)      last day (2592 days later) » 

12:02 AM
@bwoebi @kelunik I'd like to change Message, but that's about it.
It should just be removed from amphp/amp, then we'd be ready to tag 2.0.
@bwoebi Yes, I'll make a post there explaining what I did change (forwarding the exception to the loop error handler instead of just throwing) and close the issue.
I like the name Stream, but it seems most people assume that stream means "stream of bytes."
I have no suggestions for a better name though.
 
12:17 AM
Would it be possible to detect which file (on my own server) made a POST request to another file on the server? Or should I simply just include a dummy POST variable? - It's an automated POST request through curl, so I dont have to worrie about users messing with the request headers
 
Wes
12:33 AM
why not @bwoebi ? 3v4l.org/r2vrs
 
Wes
1:01 AM
cc @PaulCrovella
 
@Wes what did you do
 
Wes
what i do best
 
that explains the result, but not what you did
 
Wes
i pressed right mouse button while a modal window was open i think
 
I was gonna suggest that maybe you should find a path in life that doesn't involve computers, but everything that comes to mind would only be more dangerous.
Keep on keepin' on, I guess.
 
Wes
1:12 AM
i can have a career in software testing actually
 
you'd break the testing tools
 
Wes
i meant manual testing obviously :B
 
@Wes Windows is your problem
 
Wes
could be
 
@littlepootis I wish it were that easy.
 
Wes
1:16 AM
but i have this problem, photoshop doesn't run on linux, and i hate apple
 
and gimp is a sorry excuse as a replacement
 
Use Windows for photoshop and gaming.
 
Wes
and that, exactly
 
And Linux for everything else.
 
Wes
i don't think that can work @littlepootis unless i get something like two computers and a kvm switch or something
i don't think photoshop will run well enough in a vm
 
1:19 AM
@littlepootis you underestimate @Wes's abilities. Don't assume he won't break shit cross-platform.
 
Wes
lol
 
I just realized @Wes is the physical embodiment of java.
 
Wes
not php?
 
morning o/
 
@Wes the physical embodiment of php wouldn't be able to type
@Valentincognito \o
 
Wes
1:23 AM
@PaulCrovella only in ascii
 
@Wes I mean like it wouldn't have proper limbs. It'd just be ooze on the keyboard.
 
Wes
ahah
 
The more I read news the more I want to leave alone in the forest with my computer
I wouldnt even need internet I can entertain myself enough locally :D
I would come to town once a month for a git push and go back to my lair
 
calling it a "lair" improves any home
 
Wes
1:40 AM
would be great if for once php returned null instead of false, for no value
$parentClass = $thisClass->getParentClass();
$parentClass = $parentClass === FALSE ? NULL : $parentClass;
Atomic Blonde is a 2017 American spy action thriller film directed by David Leitch and written by Kurt Johnstad. It is based on Antony Johnston's 2012 graphic novel The Coldest City, which revolves around a spy who has to find a list of double agents who are being smuggled into the West. The film stars Charlize Theron, James McAvoy, John Goodman, Til Schweiger, Eddie Marsan, Sofia Boutella, and Toby Jones. This will be Leitch's first solo credit as director, after co-directing John Wick with Chad Stahelski. The film had its world premiere at South by Southwest on March 12, 2017. It will be released...
wow that really looks like a crap movie
 
@Wes that's a long-winded way of saying $parentClass = $thisClass->getParentClass() ?: null;
 
Wes
i never compare different types @PaulCrovella
 
sure you do. you did above
 
Wes
you are right
or rather, you are comparing a boolean, so there is no casting
still sucks having to do that though
see that's my problem with implicit coercion
 
false vs null where it's clear either way is pretty low on my give-a-fuck list
 
Wes
1:58 AM
do formal names for the scopes that may access private, protected and public exist? specifically, how do you call public's? i.e. private = class, protected = class hierarchy, public = world
i've read world sometimes in other programming languages, not sure if it's ok for php too
 
hello
 
Wes
\o
omg @JoeWatkins i got everything working
apart the occasional crashes on exit
 
2:20 AM
@JayIsTooCommon laptop
 
Wes
but the code gets executed fine
!!remind help
 
Usage: !!reminder [ examples | list | <text> [ at <time> | in <delay> ] | unset <id> ] Try !!reminder examples
 
Wes
!!reminder examples
 
Examples:
• !!reminder foo at 18:00
• With timezone: (ie. UTC-3) !!reminder foo at 18:00-3:00
• !!reminder bar in 2 hours
• !!reminder unset 32901146
• !!reminder list or just !!reminders
• !!in 2 days 42 hours 42 minutes 42 seconds 42!
• !!at 22:00 Grab a beer!
 
 
2 hours later…
4:05 AM
morning
o/
 
morning @Akshay !
 
4:27 AM
morning
 
/o\
 
4:44 AM
@Jeeves \o
 
Mornin
 
morning brzuchal
 
From now on Phan is handling @internal tag like package private github.com/etsy/phan/issues/353
\o @Linus
 
missing from doc: extract() doesn't change $this in a method – #74418
 
@brzuchal o/
 
4:57 AM
O_/
 
Wes
5:25 AM
@DaveRandom i could search "symbols" definition for macros in lxr before i think, now i get all usages, not just the definition. what am i doing wrong?
 
moin
 
Wes
mornin \o
 
\o
@tpunt dunno how I missed it, but notify == notifyAll, notifyOne is the additional notify method
 
5:43 AM
mornin Joe,Wes,Gordon
 
\o
 
@bwoebi @kelunik Thinking of going with a refactored, simpler version of ReadableStream based on the current version of Message so that Message remains basically the same as it is now (except in the stream package to compliment WritableStream).
 
are there any downsides to including non-C code in a shared extension as outlined in stackoverflow.com/questions/4864866/…, stackoverflow.com/questions/1997172/…, stackoverflow.com/questions/4158900/…
or more precisely: is it possible to include plain PHP scripts within an extension and use them in module startup
or phrased this way: I want to execute php scripts from an extension, but I do not want to distribute the scripts separately but as part of the extension. is that possible?
 
Wes
5:59 AM
#PHP https://t.co/d1BJcW1Bxf
@JoeWatkins is there a PHP_FUNCTION that supports namespaces?
or, how do i define a function in a namespace?
also mornings
 
@Gordon I think I saw somethong like that on github it was a tool which ables to bundle scripts into extension
Can't remember the name and am on my way to work driving a car right now, but can look for it later
 
@brzuchal thanks. the three links above pretty much say it's possible in various ways. I am wondering if there are any downsides to doing so.
 
6:36 AM
posted on April 12, 2017

New Cyanide and Happiness Comic

 
@Gordon I was thinking about something like that github.com/reeze/php-ext-embed/tree/master/sample but I saw on github a better one implementation which wasn't only for PHP 5 AFAIR
 
I was just looking at that. it seems abandoned, but maybe I can get a few ideas from it. thanks.
 
@Wes in zend_function_entry, with ZEND_NS_FE
I wrote some code for that not long ago but I can't find it @Gordon
I know how it's done on nix, no idea on windows though
 
Wes
thanks joe
 
you should not execute user code before request startup by the way ... (RINIT, not MINIT) ...
 
6:52 AM
@JoeWatkins sorry, I wasn't being clear. I don't really want to execute it, but include/require it
 
same thing
 
ok. any reason why?
 
I don't understand the question
include/eval is same
only we usually include stuff that just compiles code ...
if you include stuff that echos or whatever, it's executed ... because same thing ...
 
but why should I not do this in MINIT?
 
oh I see
the engine is just not ready to execute during minit
 
6:58 AM
does it make a difference whether the file is evaled or run through zend_compile_file like in that reeze extension linked above?
 
does what make a difference to what ?
 
is the approach with zend_compile_file somehow better or worse than using eval?
 
he uses compile file because he registered a stream wrapper, I use eval because I read the file directly from current binary
is same result
 
7:05 AM
will files included this way get opcached? not sure it even matters whether they get opcached
 
zend_compile_string (eval) is not overridden by opcache, zend_compile_file is, but I can't tell if it can actually cache the script without executing it, and I don't have php5 available
 
:)
I guess I'll just play around with it.
thanks
 
I think it can't because the stream wrapper is incomplete, it will fail to check perms/stat and so execute original compile file function
or maybe it can, I'm not sure ... I hate reading opcache ...
worth mentioning that I don't really see the point in this, someone asked about it so I created that demo extension ... but if you're going to bundle php code that the user cannot change and you cannot update, then why not just write the code in C ...
someone put forward the argument that it's easier to write in PHP ... in which case why not just put the code on packagist where it can be updated separately from the extension ... in addition, you are much more able to optimize code in C than you are in PHP, by using more suitable structures and whatever ... still it's a cool trick I guess ...
whenever I see an extension with bundled php code (and there is one, I forget which), I cringe ...
 
7:26 AM
hey folks, is there a roadmap for php 7.2 somewhere?
 
ping @Sara
first alpha will be in June and GA in December
exact dates are not yet agreed
 
@JoeWatkins I find it usefull, I'll give it a try - was looking for a way to bundle whole app without source codes which might be changed as a protection from user - I don't want him to mess something up
 
hi there, i started to learn php two month ago and i am at a project right now. it's simple i think but i can't figure out how to do it. i want to create a number guessing game with the knowledge i have. it's for two players but i don't know how i can loop a submit-fomular so that it can be filled several times and is also counted (because i want to stop the game after some time)
 
uh ok, I was under the impression that there was one even before defining the release managers, since that thread start with "With the first alpha of 7.2 due in early June".
 
1 min ago, by Joe Watkins
first alpha will be in June and GA in December
 
7:29 AM
yup, gotcha
 
we know this based on the release cycle of versions, but the exact dates are not yet approved by Remi or Sara, though I've written some dates down based on 7.1 cycle, they may fall on stupid dates (thanksgiving and whatever) that I'm not aware of, so I don't want to tell you those dates in case they are wrong
will request Sara to review my proposed schedule today and then email internals when it's approved ...
 
@brzuchal the problem is tying the release of php code to the release of the extension ... lots of people can't update extensions whenever they like, but can composer update whenever they like
 
@JoeWatkins Yeah I know, but in my case where app code is delivered to untrusted user in format of docker image where php is bundled with this extension might work for me
 
hiding code from the user is never really a good idea anyway ... it seems more likely that you will mess something up than the consumer of the code, and if you make release difficult by using some method like this, you're just making life difficult for everyone ...
what's an untrusted user ?
 
7:34 AM
@JoeWatkins I may put this as a part of my pipeline which already is producing an docker image, so basically the source code would be just buyndled and I have already finished pipeline for releasing docker images
 
/me doesn't understand docker very well
 
@JoeWatkins it is a user which should not even read source codes because he may use it for different purposes even regarding license limitations
 
presumably once the image is deployed (by the untrusted user) you or they may still want to update the php code separately from the extension
they can easily read the code
 
not easily it it's bundled in extension
 
yes, easily
 
7:36 AM
easily if it's a file in docker image
 
easily whatever, it's plaintext
 
ok, so if I would need to bundle somehow zend_op_arrays instead of source files - is that possible?
 
you could abuse opcache's file cache, but I still think you shouldn't do that ...
 
because right now I'm working on building docker images with opcache enabled and set up to don't check timestamps with already warmed up disk cache
so then I could truncate source files to 0 size
 
only works when deployed arch is same as dev arch
and also, if someone is so minded they can still reconstruct your code from op arrays
if it's so valuable then no doubt they will go to the trouble
they wouldn't even need to reconstruct it to use your ideas, op arrays are as readable as code to some people ...
 
7:43 AM
yes but those some people are not mu untrusted users, it's smaller risk
deployed arch is the same because opcache warming up happens at docker image building time
and I deliver whole image
 
what if you deliver it to someone that has a different arch ?
the kinds of people that spend their time trying to crack software and then release it on the underweb will have no problem reading the code, whether it's op arrays or plain text ...
 
my clients would have the same x64 and debian inside a docker image
 
does docker even run on 32bit?
 
no
 
arm ?
 
Wes
7:47 AM
so, all files in a composer repo are copied, right? regardless of what you defined in "autoload" ??
 
yes, but those are not my users, my untrusted user is for example an administrator which might want to look into source codes, and he is working for local government and he won't spend additional time if those source codes won't be just plain text files with .php extension
 
Wes
did it always work like that?
 
moaning
 
that's your opinion, or guess, or assumption ... in reality you don't actually know who is going to be using your software, at all ...
\o
anyway, I give up trying to convince you it's a bad idea ...
 
but I don't have any other option, previously I was using Zend Guard
and now I can't expose plaint text source files
 
7:50 AM
I don't think much of those things either, ZG, ioncube, all pointless ...
 
it is my business holder requirement to figure out how to hide source code in PHP7
I'm under the wall, I may only change a job to don't do that, and I don't want to change my job :/
 
you cannot effectively hide it
 
ok, but in the other hand I cannot expose plain text source codes
 
Anonymous
morning
 
\o
 
7:54 AM
you should have chosen another method of deployment, or another way of providing the services your image is providing ...
 
those apps are on premise hosted on clients infrastructure
 
if zend executes it, there are people that can read it, there is no escaping that fact ... there just isn't ...
 
so what hipotetically should change in PHP so this might be possible ?
 
There are so-called obfuscation tools. If needed, you can run your code through an obfuscator before you ship it.
 
@brzuchal the language :)
 
7:56 AM
@Gordon I would need to change over 30 developers to other language, because they don't learn "other language" in a short time, and new ones won't learn "domain" in a short time
 
nope
 
I think what @JoeWatkins is trying to tell you is that no matter how hard you try to hide the code there will always be people able to read it
 
that
no matter the language, the problem is the way you are providing the service, not the language you are using
 
I understand, but it might be possible to harden this
right now exposing plain text PHP source code gives no protection against all developers, I'm need a way to harden this so the group of developers who might do that would be marginally (regarding PHP developers and some like that)
 
I don't enjoy bashing my head against a wall
 
8:00 AM
@JoeWatkins I cannot provide saas on a cloud, it needs to be deployed on clients infra
 
the big question is "why do you think to need protection against developers".
 
Anonymous
again, this is a law problem
 
the legal problem is the other problem
it's not my problem, but business holders
 
if you cannot answer that, make your product owner / business holders answer that.
because they are making you work on something which cannot be technically achieved
and they dont seem to realize it
so they should clarify the goal
 
@brzuchal See here: phpprotect.info Just tell them that you will ship code with it "PHP Protected" and call it a day.
Trying to remove source code and rely on caches and so on sounds like a recipe for failure and things not working.
 
8:05 AM
@Gordon they are afraid that someone might read source codes and propose tender conditions which might exclude from the tender for the supply of software
and loose potential client
 
Anonymous
so it's a legal issue not a technical issue?
 
Morngins
 
sounds like a sales issue
 
\o
 
Anonymous
yo haa
 
8:07 AM
@Gordon it might
 
@Brandin pointless
o/
 
@Brandin lol of those things that's one of the worst
It just changes variable names :P
 
Anonymous
!wotf
 
Anonymous
ah well, i'm going back to work.
 
gl
 
8:12 AM
are you still being ignored @Jay ?
 
@Brandin Also their site is vulnerable to xss attacks :P
 
Anonymous
@JoeWatkins nah it's a bit better now that I'm working on stuff, still don't know many names but meh.
 
names are unimportant, just point at whoever you want to communicate with, or throw things to get the attention of the correct human ...
 
what Josh says ^
 
Anonymous
I'm just going to thrust my body in the direction of who I want to speak to.
 
8:16 AM
ah yes, may I recommend the pelvic thrust ...
 
Morning 11
What an interesting topic to log in to :P
 
o/
 
\o
 
o/
 
Wes
8:20 AM
@JayIsTooCommon told you trump is serious about nk. he's waiting nothing but that. he wants to "solve the problem once for all"
 
@Wes what is "nk." ?
 
Wes
north korea
 
I'm sure the tool also does things like stripping comments. Suppose you write a comment "This is a secret". At minimum your secret message will not be readable by the end customer.
 
ahhh, ok
 
Wes
the north korean situation is very strange, population is basically millions of hostages unaware of what's going on in the rest of the world
 
8:22 AM
@Brandin give it up, it's a pile-o-crap ...
 
@Brandin you shouldn't have secrets in your code...
 
all my code is secret
 
Does pile-o-crap mean the same in english as piece of shit ?
 
pile of shit, yeah
 
@Brandin What others said. It's useless. Also it doesn't strip docblocks, just comments. And sane code often doesn't need comments to be read. And the site as said has xss vulnerabilities
 
8:24 AM
Just an example. You could write a comment like "// This code is a pile of crap" for your own development purposes but maybe you don't actually want your customer to see that you wrote that.
 
Wes
@brzuchal Stack<Crap> $pileOCrap;
 
@Brandin Then don't write it in code
 
No, a pile of crap of much larger than a piece of shit. It could also be a steaming pile, which is considered much worse. What causes software to be a steaming pile is mpt well-defined, however.
 
Is it as dangerous as big ball of mud or something in the middle :)
 
Anonymous
@Wes mm still Nk can't do shit, Russia can
 
8:27 AM
NK pose some level of threat
 
When I write code I can write whatever comments I damn well please. Of course, I have my own ways of stripping such comments if needed. I personally wouldn't use the PHP Protect tool. But if my boss says "you've got to obfsucate" then why not? Just do it.
 
Anonymous
yeah, with the China 'alliance' they do
 
Wes
china is the scary part
 
@Brandin because it's totally pointless
 
@Brandin If your boss tells you to do that it's your job to explain to him why it's nonsense to the point it's actively harmful imo
 
Anonymous
8:29 AM
@Wes yeah, agreed. I don't believe Trump will do anything if there's still an alliance there... but then again, Trump.
 
Maybe so. Maybe the entire product is pointless. But that decision is a job for the business people. Yes, say it's pointless. But then your boss says "well, I'm in the mood to do something pointless" then you must say "okey dokey boss"
 
That's not a boss I will ever work for
 
Anonymous
@Wes It's the first time that I genuinely believe ww3 is on the table.
 
Well, that's another question - if you want continue working but prepare for a clean departure as the opportunity arises.
 
^^^
 
8:31 AM
me neither, and I'm tired of arguing black is white today, so I give up ... run whatever shit you like on whatever shit you like, but know that it's pointless ...
 
Wes
@JayIsTooCommon me too
 
@JayIsTooCommon even without it they're a threat to sk.. and if nk were to fall completely it'd be an economic disaster for whoever stepped in to take care of the cleanup
 
yeah this, it isn't the first shot that will start a war, it's the retaliation ...
 
Anonymous
@PaulCrovella why would it be an economic disaster?
 
@JayIsTooCommon a 25 million person humanitarian crisis ain't cheap
 
Anonymous
8:36 AM
a I see what you mean
 
Anonymous
world's a bit of a shitter atm.
 
we should create our own world ... with ...
 
Anonymous
blackjack and hookers
 
@Brandin your boss is not a technical expert. otherwise he wouldn't have hired you to be. so it's your job to tell him when something is not technically feasible and what a good approximate would be if any
@JayIsTooCommon meh… I don't play Black Jack and the wife will surely disapprove of hookers
 
change wife
 
8:50 AM
then I'd need to pay alimony and could no longer afford the hookers
so nothing margained
 
damn
is "margained" a real word?
ah, no
phew.
 
I just used it so it's real now
 
speaking of, does anyone understand why people name their kids "Dick"?
in USA?
 
Anonymous
they don't normally, their actual name will be Richard
 
JSON_PRETTY_PRINT prints only Unix newlines – #74419
 
mornes o/
 
Anonymous
hoi pmm
 
\o
 
yo o/
 
they might also just hate their children
 

« first day (2370 days earlier)      last day (2592 days later) »