« first day (1565 days earlier)      last day (3382 days later) » 

user895378
6:00 PM
So, in summary: I want to see useful language level support for various http parsing tools. I don't want the abstractions brought in without significant discussion, planning and approval because we'll be stuck with those as de facto "standards" going forward. It's very important to get those right in a way that everyone can agree on.
 
user895378
At the very least I think the userland community (read: fig) would be put out by pulling in these abstractions without input.
 
I know this is weird, but :popcorn:
 
my current browser tweak is to disable webfonts.
 
@LeviMorrison Looks like we agree on something
Sounds like you guys are concerned about the RFC as well
"Add 28 classes that do tons of stuff? Here's some docs. Yes/No" doesn't really constitute a proper RFC
 
user895378
@AndreaFaulds I am agree with all.
 
6:07 PM
I'm particularly worried about having even more implementations...
PHP's approach to HTTP is already really fractured
I mean
FPM copy-pasted FastCGI which copy-pasted CGI
There were, until recently, at least three different status code to reason phrase maps
We have at least two HTTP clients by default
Some stuff is PHP, some stuff is SAPIs, some stuff is web servers
It's all a complete mess and I don't know how/if pecl/http helps it, heck I suspect it would make it much worse
 
user895378
Again, I agree.
 
user895378
It's a big mess right now.
 
user895378
@AndreaFaulds get out of my head!
 
@rdlowrey heh
So, we've now had Levi, myself, and Nikita chime in on internals within less than 15 minutes
 
omg I just saw this now
Don't forget to set date.timezone! #phpbnl15 http://t.co/cS6M0MjAlJ
 
6:12 PM
@PeeHaa Did Derick say BAZINGA in his talk or something?
By the way, I decided to vote No for the RFC for now. I can always change it later
 
PHP devs made my elevator.
 
@PeeHaa And if you forget it should end up in fatal error, it's also desirable if server crashes. :-)
Morning, room
 
ringmon etc.
My TODO/wishlist just gets longer and longer: gist.github.com/TazeTSchnitzel/0be2308a687f931442a8
 
@SecondRikudo so they put a mini sudoku on the elevator?
 
@marcio That's the floor selection screen
@AndreaFaulds I have to ask
TazeTSchnitzel?
 
6:25 PM
@SecondRikudo That's my GitHub name, it's a pun on "Tasty Schnitzel", and it originated as a game forum in-joke
 
@AndreaFaulds I read it as Taze The Schnitzel
 
@SecondRikudo then don't press the blank square.
 
can anyone tell how to split process into chunks ?
 
There was a guy called Chris P. Bacon there, and there was this meme one month about schnitzel, so I changed my name there to Taze T. Schnitzel as a play on Chris P. Bacon, and it stuck
 
@marcio 1 is missing
That's the joke because PHP skipped from 5 to 7
I was hoping I wouldn't have to explain it, but you did it. congrats
 
6:26 PM
@SecondRikudo not unreasonable
 
i relied on exec('php localhost/loscil.php?pid=';.$pid); exec not working .. how do you approach these things ?
 
@animaacija You have a syntax error
 
(err.. no need to explain)
 
well ... exec('php path/to/file.php?id=4'); where is the error ?
@SecondRikudo I just pasted the previous one and SO gave it a decoration
 
6:30 PM
@animaacija Because you can't pass query parameters like that to PHP
You're misunderstanding how PHP works.
PHP is an executable that runs on the server.
Usually, it's Apache or Nginx which run it. They get the request (to path/to/file.php?id=4) and it knows to map it to the correct file, and fill in the correct variables.
When you run it locally, input comes from different places
 
aha i still do not get this php.net syntax : string exec ( string $command [, array &$output [, int &$return_var ]] )
 
Generally, command line arguments
@animaacija Do you have experience with linux?
 
@SecondRikudo lubuntu #!crunchbag .. thats all
 
@animaacija Do you have experience with command line?
(or terminal, whatever it's called there)
 
only as much to fix grub :D to boot insmod
 
6:33 PM
@animaacija exec executes a shell command
 
BUT
 
$output is an array of lines resulted from the command, and $return_var will be populated with the exit code.
 
But i will need to distribute this, on remote server i will not have access to cli
 
@animaacija What are you trying to do?
@animaacija PHP has access to the underlying OS commands
 
@SecondRikudo split processes by passing process locations via GET variable
well i develop on mac but remote server will be Linux web8.garmtech.net
 
6:36 PM
@animaacija No, that's the solution.
What's the problem?
 
"I need to do ____________ and for that I want to split processes"
 
@SecondRikudo Process exceeds 15 minutes (900) , and provider said he cannot change that apache value
I need to scrape a lot of websites and for that i want to split process to scrape 10 websites per process
 
@animaacija I feel like PHP is not the right tool for the job.
It's possible (and @JoeWatkins is about to yell at me), but it will be easier with other technologies.
 
6:39 PM
@JoeWatkins LOL
 
@SecondRikudo why not? I have done exactly that with php, python and other languages in the past
 
@Patrick beautiful soup :)
 
@Patrick It's not easy to do async stuff in PHP. Not easy enough
 
/me is thinking of watching "Farscape" again
 
too stoned to yell, or care ...
 
6:40 PM
@animaacija you can either use something async like artax or use a queue + background workers (see gearman)
 
In Node you can do it and keep it all under one process if you want to. And serve multiple people on the way, all in the same thread.
In Python I'm sure you can do it pretty sanely too
 
the programmer is not the right programmer for the job, but whatever ...
 
@JoeWatkins have you seen that series ?
 
In PHP? Sane? lol
 
@tereško I haven't
 
6:41 PM
you should
 
Wll but to the point!
 
that .. and Babylon 5
 
@Patrick Well then there you have it. Wasn't aware of that. @animaacija ^
@Patrick How's async done in that case? Extra process/thread? Event loop?
 
6:43 PM
@SecondRikudo you better ask @rdlowrey for that, I'm sure I'll say something wrong... :)
 
user895378
event loop :)
 
it's event driven asynchronous concurrency, in a single thread ...
 
ouuuh my application is ready , just on how to pass these variables scrip to script
 
user895378
^ that
 
user895378
Not parallel, concurrent :)
 
6:44 PM
I do not use libraries (hard to learn) and cannot install extensions on remote server
 
user895378
pthreads is definitely the best way to do multiple things in parallel
 
@rdlowrey oncurrent .. file to file .. one user scraping at a time ... once a month!
 
@animaacija is there actually any reason why you need to do scrape those sites at the same time? Why cannot you a cron script or have 10 stages for ajax-driven "processing" progrss bar ?
both of those would be easier then messing with multithreading
 
@animaacija not using libraries? sorry but we can't fix stupid
 
user895378
lost me at "I do not use libraries"
 
user895378
6:46 PM
/me resumes code.
 
we'll miss you pretty :)
 
@tereško well because script begins with reading in urls with csv files (who contains even more urls)
 
@animaacija there are two types of libs: the ones which do everything and these which do just what they should and nothing else. I think you've made bad experience with the former category…
 
I need to ear something
 
^typo
@bwoebi you might be too. U know this so well, i had the worst times with switz knives there
 
6:49 PM
@animaacija And that's why I like @rdlowrey libs… because they really just do what they should. They provide every functionality you need with a minimal API.
 
user895378
NB: @bwoebi is probably being too kind about the frequently broken state of my code ;)
 
@rdlowrey I'm talking about your API, not about your bugs :-P
 
user895378
hehehe
 
but everyone does bugs… and you make a good job fixing them when they pop up.
 
I'm very new to web devl, I'm passing a command to php but it doesnt work $command=$_POST['command'];
 
6:51 PM
Artax is asynchronous i do no know what to do, and how to implement. I think faster will be to rewrite and use tereško suggestion
 
<div id= "test" >
<form action="/errMsg/test_shri.php" >
<b>Execute command:</b><br>
<input type="text" name="command">
<input type="submit" value="enter">
<br><br>
</form>
</div>
but the command i'm sending doesnt appear in command which test_shri.php has
 
BUT back to the point... nobody answered on how to pass these arguments to exec ?
 
<form method="post" .....>
 
exec('php file.php', $array(?????????))
 
@animaacija stop being stupid
 
6:52 PM
+1
 
can anyone plz help how to send command to php script
 
can we ?
 
@user1977867 I already told you what you need to do
 
ok thanks @tereško , i missed it sorry. I'll try this
 
<form method="post"> did not work @tereško, do i need to put those 5 dots aswell?
 
jeez
<form method="post" action="/errMsg/test_shri.php">
do I really need to fucking spell it out ?!?
 
paint a picture better
 
you might consider a different hobby =(
 
im sorry @tereško ,
do i need to remove input type = text ?
 
7:02 PM
@user1977867 Are you trolling?
 
guys im not here to abuse anyone, but i just tried what was suggested, its not working
 
<form>will contain a lot of input tags</form> html codeacademy @user1977867
 
its not working on linux
is supported
 
@user1977867 linux tiny core ?
 
ubuntu
 
7:13 PM
so u r saying ubuntu not support html ?
well this is exciting!
 
no, but this post thing is not working
 
have u ever seen working example ?
 
although in the link i can see test_shri.php?command=gdfggfd
and in the php script i use $command=$_POST['command'];
echo "$command" gives nothing
 
in the url variable you pass only GET not POST
 
A wild @JeremyLindblom appears!
I tweeted at mtdownling, but as you're here - when are you guys going to start testing aws-sdk against PHP "7"? Or where are the test-suites so that other people can run the tests?
 
7:27 PM
thanks @animaacija, have a great day, and yes i didnt realise i was using POST.
 
7:40 PM
@Patrick Hi :). About your Http component (patricklouys/http). I have a problem with that when I set both session and cookie in a page.
It's because that when we do something like this in PHP:

session_start();
header('Set-Cookie: aaa=7deae7dcd; Max-Age=1453577417; expires=Wed, 14-Jan-1925 08:32:18 GMT; path=/');
$_SESSION['a'] = 2;

the session doesn't work. But it can set the cookie.
 
"the session doesn't work"
 
@Danack What? wrong?!
 
It stays at home and plays xbox?
 
oh shit.
 
Saying that something "doesn't work" doesn't tell anyone what is wrong.
 
7:42 PM
i don't know.
laugh.
I'm not good in english.
 
@user3002233 Your English is fine - let me find a link that says what I mean more clearly.
>"It doesn't work."

Give the programmer some credit for basic intelligence: if the program really didn't work at all, they would probably have noticed. Since they haven't noticed, it must be working for them. Therefore, either you are doing something differently from them, or your environment is different from theirs. They need information; providing this information is the purpose of a bug report. More information is almost always better than less.
3
 
@Danack Yeah, You are right. It works. I mean, It can store the data on the server. but it can't send the header.
 
@user3002233 Which header do you think it's not sending? And how are you determining that that header isn't being sent?
 
@Danack Good question. I'll be right back.
 
8:02 PM
shouldn't we bundle ext/curl?
 
getStatusCode method on Response class, useful or not? I got a PR but I can't see how it would be useful on the top of my head
 
to all: drafting a RFC here... I need a good example of a functional PHP composer package, anyone?
 
@Danack When I use that header to set a cookie PHP can't set PHPSESSID cookie anymore. I know that I should use setcookie(). but It's part of the component. any by the way I just want to know that what is the solution.
 
@Patrick with tests, yes. Otherwise... yeah, kinda useful if you use the response object in several places and needs to know the status code
 
@user3002233 one sec, let me read everything
 
8:04 PM
found github.com/nikic/iter but need more examples.
 
@Patrick thanks.
 
@user3002233 Can you describe the problem better? In the example you showed, you are not using the http package
 
Does anyone have any idea why lines written only once to file get get written twice? It's weird bc line 2 and 22 are the same, etc, etc. I have echoed the foreach that writes to the file and each only comes up once. I am using file_put_contents with FILE_APPEND.
 
@FlorianMargaine how do I do that? merge and then write the tests? Or is there a way to add them to the PR?
 
@Patrick you usually ask the guy to add tests...
 
8:10 PM
that feels a bit dick-ish, considering he made the effort for a PR. but will do
 
it's your project... you're supposed to accept PRs if they're valid (which means including tests)
I think it took the guy 3 minutes to do what he did...
 
If he doesn't do it pull the branch git fetch origin pull/ID/head:NEW_LOCAL_BRANCH_NAME && git checkout NEW_LOCAL_BRANCH_NAME, modify it, commit and merge to your master.
 
I use the component. the header was from this code:

foreach ($response->getHeaders() as $header) {
header($header);
}
echo $response->getContent();

So it sends the header to set a cookie but php can't set a PHPSESSID cookie anymore.
let me write with the component.
wait please.
 
@user3002233 Did you have it after the echo? You must set headers before you have any output
 
Or download github.com/PatrickLouys/http/pull/3.patch and modify + apply. He will still be credited for his contribution.
 
8:15 PM
thanks. I'll give it a try if I have to do it :)
But I guess even just merging and doing it should be fine, people should be only using tagged versions anyways
 
As for the question I asked a few minutes ago I think it is caused by chron executing the script twice. Probably have to restart chron or something.
 
@AndreaFaulds Definitely not ^^
 
Can you try this please?
session_start();
$_SESSION['a'] = 2;
$cookieBuilder = $injector->make('Http\CookieBuilder');
$cookie = $cookieBuilder->build('rm', 'hi');
$cookie->setMaxAge(time() + 60 * 60 * 24 * 30 * 12);
$response->addCookie($cookie);
 
8:30 PM
@SecondRikudo For all I know that's what was given in the specs ^^
 
@user3002233 hmm. the $injector->make throws an error. If I just do new \Http\CookieBuilder it seems like it works
 
@Patrick The cookie works but not the session.
!
just delete all of your cookies and try that with the component.
It can't set the PHPSESSID cookie. for me. it's like that!
 
@user3002233 I think I was able to reproduce it
 
@Patrick Ok. Cool component. but I have to change all of the cookie parts and use setcookie() instead of header()!
 
@user3002233 I'll see if I can fix this. Thanks for reporting the bug
 
8:43 PM
@Patrick Your welcome! Thanks for the component. just keep it simple!
 
@AndreaFaulds OMG Stas agrees with us too
 
@LeviMorrison Stas is a reasonable person
 
I just mean it's probably one of the few times we all agree.
 
heh, yes
 
@user1977867 no problem
 
8:54 PM
@rdlowrey Nice struct
 
user895378
@NikiC I can't tell you how many times those exceptions have saved me from debugging hell.
 
user895378
All the places where I pass around objects that aggregate public properties in one place I have the class extend Struct
 
@rdlowrey get_class($this) --> static::class ;-)
 
I like get_class($this) more
static::class smells too much of LSB
 
It ... is?
 
user895378
8:58 PM
If it had a perf implication I might do static::class to avoid the fcall of get_class() but since it's only ever invoked in debugging contexts it makes no difference to me.
 
^^
 
My issue with ::class is that it doesn't scale to other things.
You can't just append ::function to get a fully qualified function name, for instance.
 
^^ would've been helpful if it were though.
 
@LeviMorrison And I wouldn't approve of that either - if we add something like that, it should deal with all callables
I think it's okay to have something class specific here. Given how we don't have merged symtables and all
 
namespace foo\bar\qux;

function zip() { }

zip::fqn; // foo\bar\qux\zip
 
8:59 PM
I want a way to get a fully-qualified name of something that can be referenced as a bare-string.
 
also don't forget that function and constant names are runtime resolved
and that there is an ambiguity because of the separate symtables
so just using ::fqn for everything wouldn't work
 
Well, tbh, I think all symbols should be in the same table; classes, functions, constants, etc., but obv that's fubar for life.
 
hummm... should ones talk about forward compatibility on a RFC?
 
if there's relevant information for FC, sure
 
session_start();
$_SESSION['foo'] = 'bar';
header('Set-Cookie: foo=bar');
^ session cookie is not sent to the browser. Is this a bug or expected?
 
9:05 PM
Just not sure if it would open doors for off topic future speculations. Mailing lists tend to go off topic too easily.
@NikiC have you seen any FC issue on some past RFC?
 
@marcio I had some minor FC considerations wrt named params for the argument unpacking rfc
 
@NikiC thanks, I'll take a look at these :D
 
@Patrick Expected. See php.net/manual/en/function.header.php, second parameter should be false in order to not replace existing headers of the same type.
 
9:20 PM
@JeremiahWinsley good catch. thanks
@user3002233 ^ see above
 
@DanLugg what you actually want is $anything::symbol
or maybe $anything::name and $anything::type
 
@tereško Ultimately? Yes. var_or_name "::" "type"
Chaining the scope resolution operator, despite the implications, seems like something that should be possible too.
SomeClass::class::SOME_CONSTANT_OF_SOMECLASS seems it should be valid... ish.
^^ The example provides no value, but indicates what should be possible.
$class = SomeClass::class; $class::SOME_CONSTANT; being valid, but reducing the statements to a single expression not being valid is weird to me.
Though, perhaps normalized expressions will solve that, /cc @NikiC
(SomeClass::class)::SOME_CONSTANT
 
9:37 PM
@DanLugg that works
 
Okie doke.
 
without the parens, probably not. we're rather conservative about which scalars are allowed on the lhs
 
Understandably; string only I'm assuming?
 
strings and arrays are okay
 
Ah, because callable
([$obj, 'method'])() <-- ?
 
9:39 PM
not really, just because that's what the "constant dereferencing" RFC originally added ^^
 
Oh.
 
@DanLugg [$obj, 'method']() would (probably ^^) work as well
 
Neat sauce.
 
this all seems like "deep end language hacks"
just because you can abuse language like this, doesn't mean that you should
it wold be somewhat terrifying if code like this wound its way to production
 
In the world of syntax, I prefer openness. Whether or not that enables horrifying constructs is not really a concern, as people will create horrifying constructs out of anything.
Saying that expression := expression "::" "name" | ... is valid syntax is fine in my book.
Thus Foo::BAR::QUX::ZIP where BAR is a const of Foo, and QUX is a const of what Foo::BAR resolves to, and etc., being valid is perfectly sane. It may not be put to sane use, but that's the world we live in.
Holding peoples hands isn't PHP's job, IMO.
using the word "predicated", in the context of "...leaving X predicated on Y..." -- is that correct?
 
9:51 PM
Not having an issue with awkward syntax constructs, just having an issue with misinterpretable syntax.
 
^^ Yes, ambiguity in my examples notwithstanding.
((Foo::BAR)::QUX)::ZIP is a bit less elegant, but either way.
 
10:06 PM
Here it is: Batch Use Declarations RFC (draft) for you to scrutinize at will o/ wiki.php.net/rfc/batch_use_declarations
 
@marcio Nice. I've said it before, but I'd prefer use Foo\Bar\{ Qux }; to use Foo\Bar { Qux };
 
@AndreaFaulds I'm still considering it. Hole issue for me is that:
namespace Foo\Bar { /*stuff*/ }
use TraitA, TraitB {/* adaptations */}
currently does not allow the trailling "\" + I can't explain to my brain "\" is not escaping "{" in "\{" xD
 
Well, with a Trait it would have to be ::
I suppose you have a point for namespaces
 
Do you think it could become a voting option? I've heard people hate RFCs with voting options.
 
Heh
If it's controversial enough, but I doubt it would be
The thing is that for me, use Foo\Bar\{ Baz }; looks like it modifies use Foo\Bar; but it's actually use Foo\Bar\Baz;
 
10:17 PM
@marcio Does use function math { sin, cos } work?
if functions are used it's likely that a namespace will only contain functions, repeating function there would be inconvenient
 
@AndreaFaulds your mental model makes 100% sense, somebody had a wtf moment because of that on the first time I brought the topic here :)
 
Er, I meant use Foo\Bar { Baz }; looks like it modifies use Foo\Bar;
while the slash makes it more obvious
Sort of regexy:
 
use Foo\Bar\{Baz, Qux}; is like Foo\\Bar\\(Baz|Qux)
 
@AndreaFaulds shit, NOOOO lol
 
10:21 PM
@Danack Imagick corruption hell?
@marcio ?
 
@AndreaFaulds There's a reasonable chance that there's readable information in that image....
 
@Danack Even worse...
 
@NikiC well remembered, this needs to be supported.
 
I want a language that let's me control memory layout on par or better than C++ with a better syntax that is also more resilient to changes. Nothing does this that I am aware of.
 
Can I get a pony while we're wishing for things?
 
10:23 PM
@AndreaFaulds what' it? use Foo\\Bar\(Baz|Qux)
 
@marcio ?
 
Does (Baz|Qux) means Baz OR Qux?
 
I'm saying that I can mentally map use Foo\Bar\{Baz, Qux}; to a regex sort of thing
Not that you should have regex syntax
@marcio Yes
 
well, that doesn't make much sense... use Baz if there is no Baz get Qux?
 
Foo\\Bar\\(Baz|Qux) matches Foo\Bar\Baz or Foo\Bar\Qux
 
10:25 PM
oh, I doubt this would be a recurrent idea
no known language has that, AFAIK
@NikiC I'll add support for that and update the RFC to be explicit about it :)
@AndreaFaulds but the trailing "\" is a good point... 100% sure it will pop out again on discussion phase.
 
@AndreaFaulds Yeah, for sure.
 
Anyway, @marcio +1 on the RFC
It won't benefit me much because I'm not someone who uses massive frameworks
 
:D
@AndreaFaulds I'll do some pooling about "\" and see if it's a thing, if you can do that too and bring some numbers it would be very helpful. If majority thinks trailing "\" is the best path, I'll update the RFC to reflect this.
 
@marcio Foo\Bar {Baz as X, Qux as Y}, would this work?
 
@DejanMarjanovic yes, this is already supported.
 
10:33 PM
@marcio How about a Room 11 poll? :)
(for some reason I like polls despite them being utterly useless)
 
@marcio Add it to the RFC just to avoid future questions...
 
@DejanMarjanovic +1 ok
@AndreaFaulds woot? do we have that?
I suspect people would prefer to have the trailing "\" as optional, some would use it, others would prefer to skip it.
like the array [a, b, c,] trailing comma
 
I'd prefer that we either have it or don't, but that we don't make it optional
 
me too
 
I don't really like points of style
 
10:39 PM
points of style are raw material for PSRs, so better avoid them
@Rangad fixing
 
and I really like the proposal. I just wonder why this hasn't been proposed earlier. It's just sad that most of us won't be able to use it in the next 3 to 4 years.
 
@Rangad :)
 
I love what Rasmus just did
 
btw. (yes, these are irrelevant points made) you still link to this instead of this. bzw. this instead of this
 
10:55 PM
yeah, just realized it's not [[Rust Language|rust-lang.org]]
it should be [[rust-lang.org|Rust Language]]
wow python.org looks really nice
 
Also enforcing the last \ is in some extend reasonable beyond readability as other languages (ok, rust) using glob-brace like syntaxes are also enforcing it: use std::collections::hash_map::{self, HashMap};
 
have you voted on @AndreaFaulds 's poll? strawpoll.me/3509746
 
Oh, looks like I typoed "Batch" :p
 
@Rangad BTW, rust picked a good NS delimiter. PHP \ looks like a escape. But that's a point. Let's let the poll decided it.
 
11:12 PM
The option I don't really care as long as it's consistent and only one option is allowed is missing ;) I don't think one of the options is really bad. Tbh, use Foo\Bar { A, B, C}; is less typo provoking than use Foo\Bar\ { A, B, C} when not working with an ide, imo. But I'm not sure if that is really a valid point.
anyway voted for enforced \
Having the \ would also underline that the part before the brace is not a fqn, but a fragment.
 
Someone here a nice video podcast/ talk,.. about PHP/ linux or something which is worth watching? :)
 
Oh nice Uncle bob no not yet that one, i have his book : ) Clean code
 

« first day (1565 days earlier)      last day (3382 days later) »