« first day (1966 days earlier)      last day (2979 days later) » 

10:01 PM
only one php binary.
presents the right version. php-fpm.conf doesn't seem to have a line pointing towards any php binary, which makes me wonder how it have been working until now
 
Neh php-fpm.conf is just the config file used it doesn't point to any binary. It's the other way around
What does which php tell you?
 
/usr/local/bin/php
 
That's a symlink right?
 
which is the only executable php on the file system, as far as find / -name "*php*" can tell
 
@FélixGagnon-Grenier is fpm running right now?
 
10:04 PM
hmm, no, it really is the file. ls -l would tell if it's a symlink right?
yup
 
ps axf | grep fpm
it should show you the binary
 
24148 pts/0    S+     0:00  |           \_ grep --color=auto fpm
24107 pts/1    S+     0:00                      \_ vi /usr/local/var/log/php-fpm.log
13795 ?        Ss     2:34 php-fpm: master process (/usr/local/etc/php-fpm.conf)
13796 ?        S      0:24  \_ php-fpm: pool www
13797 ?        S      0:25  \_ php-fpm: pool www
 4167 ?        S      0:04  \_ php-fpm: pool www
not exactly sure what to make of that
 
!!man ps
 
systemctl status php-fpm
?
 
[ ps -- process status ] ps [ -aCcdefHhjlmrSTuvwXxZ ] [ -O fmt | -o fmt ] [ -G gid [, gid... ]] [ -J jid [, jid... ]] [ -M core ] [ -N system ] [ -p pid [, pid... ]] [ -t tty [, tty... ]] [ -U user [, user... ]] ps [ -L ]
 
10:06 PM
oh my word. seems I have some serious configuration problems
 
What are "swapped out processes"?
 
I almost do not want to paste that here but
 
@PeeHaa processes put in swap?
 
● php-fpm.service - (null)
   Loaded: loaded (/etc/rc.d/init.d/php-fpm)
   Active: failed (Result: exit-code) since Fri 2016-03-04 14:25:46 EST; 2h 39min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 23899 ExecStart=/etc/rc.d/init.d/php-fpm start (code=exited, status=203/EXEC)

Mar 04 14:25:46 ip-172-30-0-190.ec2.internal systemd[1]: Starting (null)...
Mar 04 14:25:46 ip-172-30-0-190.ec2.internal systemd[1]: php-fpm.service: control process exited, code=exited status=203
Mar 04 14:25:46 ip-172-30-0-190.ec2.internal systemd[1]: Failed to start (null).
 
(i.e. not active in a while)
@FélixGagnon-Grenier now we're talking
 
10:06 PM
"Failed to start (null)." DAMNIT PHP
 
:p
so. my uneducated evaluation is something have been loaded, but not as a service
 
@FélixGagnon-Grenier can you look at the /etc/rc.d/init.d/php-fpm file, there should be a start function in there (it should be a bash file)
the binary itself should be shown
(since it's calling it)
 
hi everyone
 
yeah, we're getting somewhere. it appears the binary is in fact /usr/local/sbin/php-fpm
 
@DaveRandom you're the centos guy, right?
@DaveRandom do you know anything like sources.debian.net for centos?
 
10:10 PM
i'm login to a website like word press using curl
 
@FélixGagnon-Grenier pkill php-fpm and systemctl restart php-fpm should make your system stable
 
@FlorianMargaine not off hand and am going to bed like right now, but will have a look tomorrow if you can't turn anything up
nn @all
 
night
 
10:11 PM
now i don't know how to get specific content after log in to website
some one help me please
 
what are you trying to get @mahdiazarm?
 
user first and last name for example
or other info
 
@FlorianMargaine well it did kill the process. however restarting throws. The process /etc/rc.d/init.d/php-fpm could not be executed and failed. hmm, let me check if that file is even executable
 
@FélixGagnon-Grenier systemctl status php-fpm
 
@mahdiazarm which part is not working? You login with curl, keep the cookies, request another page, scrape the info? Many urls woud require correct wp_referer and nonces
 
10:15 PM
hmmm weird. the same as sooner. seems still loaded, but the server is throwing a bad gatheway
 
@FélixGagnon-Grenier ?
 
● php-fpm.service - (null)
   Loaded: loaded (/etc/rc.d/init.d/php-fpm)
   Active: failed (Result: exit-code) since Fri 2016-03-04 17:11:42 EST; 3min 7s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 24167 ExecStart=/etc/rc.d/init.d/php-fpm start (code=exited, status=203/EXEC)

Mar 04 17:11:42 ip-172-30-0-190.ec2.internal systemd[1]: Starting (null)...
Mar 04 17:11:42 ip-172-30-0-190.ec2.internal systemd[1]: php-fpm.service: control process exited, code=exited status=203
Mar 04 17:11:42 ip-172-30-0-190.ec2.internal systemd[1]: Failed to start (null).
that is the present result of systemctl status php-fpm
 
@FélixGagnon-Grenier what happens if you just run /usr/local/sbin/php-fpm?
 
@RonniSkansing this part scrape the info
after i request another page
 
which url are you trying to scrape and how does it fail?
 
10:17 PM
obviously restarted php-fpm, with the correct php version \o/
I think however there is something really wrong with the box configuration
 
what is sceape
 
I used setcap for the first time today. It feels magical.
 
!!man setcap
 
@FélixGagnon-Grenier Command not found. Have you tried Windows instead? It's great and does all the things!
 
!!man fuckyou.jpg
 
10:18 PM
@mahdiazarm try googling it =) I meant, which url are you trying to get info from
 
@FélixGagnon-Grenier Command not found. Have you tried Windows instead? It's great and does all the things!
 
yes that is it
ok
for example user profile
 
thanks a lot @FlorianMargaine. It obviously works now, and I'll try to fin what I actually did wrong in that service configuration
 
10:20 PM
Moment I just have to see how the uri looks locally
 
@FélixGagnon-Grenier you should thank @PeeHaa
 
yeah, let's ping @PeeHaa, and tell him how thankful I am
 
:P
 
seiously, I might be over @PeeHaa pinging you for naught, but I mean it
:p
 
10:22 PM
@FlorianMargaine did most of the work :-)
 
for a moment there, I really thought you would ban me for a minute, just for the lulz
 
Not drunk enough yet
 
@mahdiazarm okay, so the data you get back from the curl request to the profile, what is wrong with it?
 
I thought about it again. Remember that first time when I got here and I established a new being banned in a short time record?
 
i don't know how to parse them
 
10:23 PM
I sadly realized that finally... their stupid hat actually had the expected result... make me understand / learn very fast about a chat room and it's "culture"
 
It worked didn't it? :P
 
@mahdiazarm could you paste the code and the responses (curl results) in pastie.org and give me the link
 
for example get user first and last name from the returned data
how i have to get curl results?
 
oh I am not going to write the code for you
 
10:26 PM
yes
but give me some docs
 
1357
Q: How do you parse and process HTML/XML in PHP?

RobertPittHow can one parse HTML/XML and extract information from it? This is a General Reference question for the php tag

 
does anyone use php storm?
 
Yes
 
Wes
@rtheunissen mornings. check your github i've added you to the rfc repo :P
 
@mahdiazarm give you some docs? on how to use curl in php?
 
10:29 PM
@PeeHaa i'm trying to transfer my working filezilla connection to php storm, what do i need to do?
 
@LeviMorrison I disagree that Map and Set should be interfaces. Generally speaking, and if this was Java, I would agree. A Java HashMap can't be sorted, so you'd use a tree-backed always-sorted Map instead. ds::map can be sorted, like an array can also, similar to Python's dict, Ruby's hash etc.
Another thing for the future, is that if the requirement for an always-sorted map arises, we can turn the class into an interface, thereby not affecting any typehinting or instanceof checks.
 
@PeeHaa ps if you ever do that, expect me to go to the end of it and raise a flame war on meta the extent of which you have never seen
 
@Wes awesome! I'll check it out :)
 
just for the lulz
 
:-)
 
10:31 PM
@RonniSkansing i don't know a lot about cURL just basics
here is my code
 
Wes
@rtheunissen it's not because you should bundle more than 1 implementation. it's for allowing others to blend stuff in. for instance, DOMNamedNodeMap implements DS\Map
 
@mahdiazarm so what happens when you run it?
 
Ok people I have been refactoring code without tests the entire night... The moment of truth!
 
the second function load the requested page but i don't want to get all of contents i just want to get user first name and last name
but i don't know how to do that
 
10:33 PM
> [22:33:53] critical TypeError: Argument 1 passed to AerysPlayground\Game\Command\Executor::__construct() must be an instance of AerysPlayground\Game\Field\Map\TrainingYard, instance of AerysPlayground\Game\Map\Park given
 
this code is all i know
 
Yeah I totally didn't expect it to work on the first try
 
@Wes composition, might even lead to a more intuitive API.
 
Wes
@PeeHaa suddenly hears an explosion
 
@mahdiazarm do you know basic php, did you write the current code?
 
10:35 PM
not completely but yes
 
@PeeHaa nice to have compile-time errors though :)
 
Wes
@rtheunissen even with composition, that class search for stuff in a bigger xml tree which is reflected by the other dom reflection objects
 
Not entirely sure what you mean by that @Wes
 
@mahdiazarm does the script return the data with the profile name and such as you expect, but you are unsure how to exactly get that info from the string?
 
@rtheunissen But affecting instantiations. right?
 
Wes
10:37 PM
if your map was the only implementation available, you'd have first to fill it, then sync it every time the reflected xml changes
 
@FlorianMargaine So very much true that :)
 
almost yes
 
@NikiC true, it would be a significant BC break, but at least not for typehints :p
 
@PeeHaa obviously the player is saved at a wrong location
 
wow
that's really nice: asm REPL
 
10:41 PM
I'm open to interfaces, just not convinced that they're a requirement yet.
 
ugh.. assembly :p
 
@FlorianMargaine nice
where are my avx registers?
 
> [22:45:15] info Listening on tcp://0.0.0.0:8081
[22:45:15] info Listening on tcp://[::]:8081
\o/
 
someone said Aerys?
 
lol
 
10:46 PM
why are you binding to 0.0.0.0 ? =)
 
... … actually not a default :-D
 
Wes
@rtheunissen but they will be eventually
 
I dont think 0.0.0.0 would be a good default
 
@Wes we'll be dead eventually, let's start acting like it :p
 
@RonniSkansing Because lazy
 
10:47 PM
@RonniSkansing why not?
 
It's my local dev machine so meh
 
Wes
@FélixGagnon-Grenier have a beer. it's friday
 
thanks for reminding me
 
@bwoebi hehe
 
@Wes then we'll implement it eventually.
 
10:49 PM
@bwoebi it could be bind to connections outside the private network afaik
 
@PeeHaa woo. Now what else is broken?
 
Wes
@rtheunissen doesn't sound like well planned progressive enhancement :P
 
@RonniSkansing which is the point of it [assuming your router does port forwarding for that specific port]
 
@bwoebi because 0.0.0.0 means "I'm listening to the world"
 
10:50 PM
@FlorianMargaine dunno what's wrong with me, but that's literally the second thing I thought when looking at it…
 
Well it started just fine. Until I typed in my first command and it broke on a half assed manual refactor cc @DaveRandom
 
you usually want to have at least a reverse proxy in front of your application server
 
@FlorianMargaine It means the world available to me.
 
Wes
@FélixGagnon-Grenier dammit. i should know that as i don't answer :P
 
which usually is separated off by the router alone.
 
10:50 PM
hehe
 
Sounds like iterative development, extending the scope as required. Rather than trying to accomodate future scope at 1.0.0
 
@bwoebi not on most hosted VMs
 
@FlorianMargaine sure, if you have a special network, you need special settings…
 
@bwoebi it's not a "special network"
it's "most networks out there"
 
the fewest networks are directly open to the internet.
 
10:52 PM
I don't see why you're against secure settings by default.
 
Wes
@rtheunissen i generally agree with that but not for libraries. some things are better if being anticipated as early as possible, imo
 
@bwoebi start any VM on ec2
 
@FlorianMargaine I don't use such fancy things
 
If it was certain that it would become a requirement, sure.
 
@bwoebi lol :)
 
10:53 PM
@FlorianMargaine but I get your point ;-)
 
@rtheunissen Ah, I forgot about get_property_ptr_ptr
 
Not having to deal with potential "user implementations" is a huge win internally.
 
You need to implement that one next to read_property
(And don't ask why)
 
@NikiC temp... ta... tion...
 
> Used to create pointer to the property of the object, for future direct r/w access
+1
 
10:56 PM
@bwoebi I often use 0.0.0.0 myself, dunno how it became a habit
 
@FlorianMargaine in general, most people won't put a reverse proxy in front of it though. The few people who do, will also be clever enough to properly configure interface bindings (it's just using default 0.0.0.0/[::]:80/443 if no expose() has been called at all - If you call expose(), you are forced to pass interface and port; no default interface here.) So, if you put a reverse proxy there, you anyway have to bind Aerys to a different port (to not conflict with the reverse proxy).
 
maybe it was when I was forced to work on windows and vagrant
 
@FlorianMargaine and when you put your port, you're forced to be explicit about the interface too, so not an issue ;-)
 
@bwoebi I don't see why you're using an insecure default when a safer option exists, and is just as easy (127.0.0.1).
 
" in general, most people won't put a reverse proxy in front of it though."
 
Wes
10:59 PM
@rtheunissen but it is certain. data structures are established and unchanged since 1970 :P
 
@FlorianMargaine also to be sure we're on the same page … What exactly is the reason why you'd put a reverse proxy in front of it?
 
@bwoebi because nginx is better than aerys at handling static files, caching, and load
(and probably protects aerys from lots of attacks)
do you know that nginx has browser-specific code?
I learned that yesterday while looking for something in its code
 
@FlorianMargaine I'm not sure about that though… load, maybe yes, but static files and caching gains may quickly be lost by the overhead of the reverse proxying
 
@bwoebi ?
 
@Wes think Javascript objects, PHP array, Python dict, Ruby hash... they're all practical, not-like-other-classes tools that you can use directly or to build other structures with. That's why I'm considering a balanced tree implementation, that you could then use however you want. But not forced under a "SortedSet" or whatever.
 
11:02 PM
you realize that static files and caching means "no reverse proxying"?
well, for caching it does it once
 
@FlorianMargaine yes… I mean, it needs to reverse proxy all the dynamic content
 
@bwoebi and it's very good at that
btw, you can avoid TCP overhead if you're going through a unix socket
 
that's having a certain overhead and actually Aerys is really not that bad at static files and caches
@FlorianMargaine ... Unix sockets have their own wrapping though.
 
@NikiC starting to wonder if the behaviour I'm testing is actually not expected. $map->pairs()->first()->property = false; Should that actually change the property in the map itself?
 
@rtheunissen yes
It's an object
 
11:04 PM
Where pairs() is a Sequence, and first() is a Pair.
 
You do not want to implicitly clone objects
 
Wes
@rtheunissen yes
 
Cool agreed. Reverting... :)
 
However if it weren't an object but a different value, then it shouldn't change
 
@FlorianMargaine it's not like TCP/unix sockets would be ever a bottleneck
 
11:06 PM
@bwoebi and it's not like nginx being a reverse proxy is ever going to be the bottleneck
I've never seen that
it's like.. almost free
nginx is that good
 
I totally believe you … I'm just doubting that Aerys is that bad for static files/caches that you'd need nginx in front
 
@bwoebi Test it :)
 
@NikiC yeah, that'd give the definitive answer… not doing that now… going to bed soon, but I definitely should do a few reproducible benchmarks with Aerys once I'm done cluttering it with features ^^
 
Wes
@rtheunissen imho implementations should "do all the things" like you say, but interfaces should exist and be narrow(-er)
 
(okay, well, there's only one single feature left which won't impact runtime much I guess)
 
11:10 PM
@rtheunissen The issue with indirected writes still needs to be fixed though, independently of that
 
Yep yep
 
Incremental/promise APIs are sometimes a headache to design…
Async code is easy … async APIs not so much :-D
 
$key = 'a';

$instance = $this->getInstance();
$instance->put($key, 1);

$instance->pairs()->first()->key = 'b';

$this->assertEquals('a', $key);
$this->assertEquals('b', $instance->pairs()->first()->key);
@NikiC @Wes expected?
Not sure if I like the idea of pairs() being a view of the map.
Updating a pair in pairs shouldn't mess with the map itself.
I think? :S
 
Wes
@rtheunissen what's wrong with that?
 
My understanding :p
 
Wes
11:25 PM
@rtheunissen no, it should be like that. this for instance is a case of a class that implements Set but is not your set
Map::keySet(){
    return new class($this) implements SetView{
    };
}
this is what i did
 
@rtheunissen Looks correct to me
@rtheunissen Correct
You wouldn't be able to implement that anyway
Not without going crazy
I apologize, not without becoming more crazy
 
Wes
SetView is a super interface of Set, which only misses the add() method
otherwise it's completely modifiable and gets reflected by the map
 
You shouldn't be able to modify the key of a key-value pair in a map, and by extension not the values in a set.
 
Wes
...modify?
 
Update / write / replace whatever.
I think that's why I made Pair immutable.
 
Wes
11:30 PM
why not
 
because tradition
 
Imagine this @Wes:

$map = ds::map(['a' => 1, 'b' => 2]);
$map->first()->key = 'b';
 
it's the way maps work since early shits, isn't it?
 
What would you expect to happen?
 
@rtheunissen Nothing, it's a dead write
@rtheunissen Making pair immutable may be reasonable, depending on where it is used
Is it only used in this context, or can it also be used independently?
 
11:33 PM
Currently only in Map, but is external.
 
I.e. can users construct Pair objects?
 
Currently yes.
Up until a few days ago, can be constructed but not reconstructed or updated.
 
Is correct immutability enforcable in userland?
 
You can with __get and __set
 
I.e. $pair->key = 'a' throws, while $pair->key->foo = 'a' is correct if the key is an object
 
Wes
11:36 PM
@rtheunissen i'm unsure because i'm not there yet but i think i see that not everything can be mutable
 
I think?
 
@rtheunissen I think so too, just not entirely sure
I'm mainly wondering about the indirect modification of object properties case
 
You just return a reference.
&offsetGet
Not sure about __get though.
Pairs can be mutable, just have to not return them as reference ever.
 
Wes
@FélixGagnon-Grenier entrySet keySet etc are all mutable and changes on them are reflected by the map (in java and c# for sure, possibly other languages)
 
@NikiC re: get should throw, thanks for pointing that out. Added test, will push soon.
 
Wes
11:42 PM
but there are probably exceptions as java has "NotSupportedException" added everywhere. good design
 
@rtheunissen btw, do you forbid assignment of additional properties on collections?
Like $map->foo = ?
 
Not yet, but will.
 
great
 
Few things on the list still..
 
So, how many people already complained about everything being final?
 
Wes
11:44 PM
lol
i haven't. aggregation and wrapping ftw
 
No one so far.
 
@rtheunissen everything is final? duh, that's stupid
 
@FlorianMargaine Thank you
 
Wes
lol
 
how can I fix your library without waiting for your updates now?
I have to copy paste the whole class
woo. joy.
 
11:48 PM
Anyone know any webservers which runs php in .html files. by default configuration?
 
@RonniSkansing none that I'm aware of
 
ok thanks
much appreciated =]
 
@NikiC Thanks for your help re: handlers :)
 

« first day (1966 days earlier)      last day (2979 days later) »