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

12:01 AM
Mornings o/
 
12:13 AM
@Tiffany I WANT THAT GAME!!!1
also, I started with joomla initially, then did ZF, symfony, ZF2 (contributing), SF2 (contributing)
 
SF = Symfony right?
 
yarp
but also tried all others sporadically
lately, I have a good laugh at frameworks reproducing ZF1 with composer packages. Sometimes I also cry because of that.
 
WannaCry™?
 
Does your opinion of laravel align with the others in the chat?
 
@FélixGagnon-Grenier ArtisanalCry
 
12:27 AM
wasn't sure if you were referring to laravel or something else
 
@Andrea and that's what's sometimes making problems with IS_INDIRECTs being invalidated before them being used…
@NikiC I totally wanted to bring my typed_ref_properties branch, but I absolutely do not recall what exactly the patch was missing (if anything…) ………
@Andrea well, you neither resize an array unless controlling all the use sites either … the problem is rather that if you resize a string, you resize it and expect to get a new pointer. With arrays you just get a new pointer if it's being resized … but when is it resized? Your options are basically copying the pointer upon each array call to the place holding it… or not at all.
It doesn't seem totally unrealistic to me, that moving the pointers around for every single non-pure-update op will be more expensive than what we actually gain by removing the indirection... @Andrea
what might be worth a try is preallocating the first 8 Buckets (and hash offsets) with the array.
Yeah, it'll mean 288 unused bytes on arrays with size > 8
but if your arrays are being bigger than 8 elements, the 288 unused bytes will pale in comparison.
\cc @NikiC ^ ?
 
1:47 AM
@kelunik github.com/FreeElephants/rest-daemon/blob/master/src/… … an example of Aerys being used without the binary.
 
 
1 hour later…
3:00 AM
When navigating back in the browser, the selected language is cached – #74650
 
3:17 AM
May tanong po ako :D
 
4:14 AM
Mornings
 
@Jeeves mornin
 
@Linus How are you?
 
@Jeeves fine,sir
 
@Linus That's good to hear.
 
5:00 AM
Stackoverflow has a sort option named "active". Does anybody know what's it based on? I mean, a question should has what parameter to be on the top of list?
 
 
1 hour later…
user6412824
6:13 AM
Hello guyz !
 
user6412824
need help in wordpress
 
user6412824
 
user6412824
those menu custom plugin creation
 
user6412824
i want to change dash icons
 
7:11 AM
Hi guys, is there anybody who has worked with Amazon S3 storage? I have a small query on it.
 
bob
7:22 AM
hey people, I have a simple multiple image upload script with aspect ratio resizing. The image resizing is working fine. however the issue i'm have is with the path. I'm trying to send the images to an image folder then to a unique identifier folder. however, it just dumps the images in the the image folder. here is the script. pastebin.com/JNa4Zf0B
 
@MehulJoisar I have for a short while
But I'm not an expert.
 
@MadaraUchiha : I appreciate your help. I have web and mobile app. My goal is to save images/videos on S3 storage. My query is that, shall I upload via mobile sdk directly to S3 or shall I upload it using server sdk?
 
@MehulJoisar That depends, how will you be using those images/videos later?
 
@MadaraUchiha We will be displaying those images/videos on web and mobile app later on.
 
@MehulJoisar Then you definitely want to control what's being uploaded.
Else, I can upload an "image" that tracks your users and gives me their session information.
 
7:28 AM
@MadaraUchiha
Yes
 
Upload it to your server, verify that it's actually an image and is acceptable, and only then put it on S3.
 
@MadaraUchiha we can apply that restriction on mobile app as well. My concern is that, if we upload to server, can we directly upload to S3 without saving on server? we use multipart requests.
 
@MehulJoisar No, you can't.
If I have access to uploading to S3 directly from a mobile device that I own, I can circumvent any protections you put there.
@MehulJoisar Most servers can do it pretty easily.
I don't know how it would be done with PHP, but I'm assuming it's possible.
 
@MadaraUchiha Ok, I understand. Can we utilise cURL over here to forward multipart file which we got from mobile app?
 
No idea.
It's been a while since I've done PHP.
 
7:33 AM
@MadaraUchiha Ok, no worries. Thanks for your time and suggestions !!
 
@bwoebi Hard to say, needs an array size distribution analysis
 
@PeeHee (et al.) you should be able to log in to the online editor again now. :)
 
Anonymous
mornin
 
good morning
@Jeeves Should I quit my job today or next week ?
 
8:15 AM
@Valentincognito Do you like your job?
 
@Jeeves that's not a valid answer
 
@Valentincognito Okay fine. I'm curious because you said you miss him and I want to know what his name is.
 
do redis hashes stay in the order you set it in?
 
!!should @Valentincognito quite his job today or next week?
 
@‌Valentincognito should quite his job today.
 
8:17 AM
good
then it's settled
 
Not sure when you quit it, but you should definitely quite it today
well, I see it's going to be one of those days
 
does redis hashes stay in the order you set keys in or does it change?
 
@NikiC I rather think it needs a good session of real-world benchmarking. Too many factors in play: better locality, an alloc less, compared to sometimes 1/3 more memory used...
 
Anonymous
!!wotd
 
8:22 AM
chinwag: an idle chat.
 
Anonymous
you've got a hot chinwag @DaveRandom
 
Anonymous
24 hours ago, by JayIsTooCommon
I think I used that right.
 
@JayIsTooCommon Can't afford it I think I'm afraid
@MadaraUchiha Sean#2321
Morning 11
 
"We stand by the numbers," Trump budget director says of $2,000,000,000,000 error that uses same money twice.… https://twitter.com/i/web/status/867416713243111425
...that is a headline
 
Anonymous
@Sean :( sucks balls
 
8:33 AM
@DaveRandom did they ever hear of the word trillion?
 
Anonymous
guessing you're still not in the employer good books?
 
@bwoebi has less psychological impact than a lot of zeros
People do it all the time, they'd use the word "million" though because that sounds really big
billions and trillions look far more impactful to Joe Public if you write them out as numbers
 
@DaveRandom at the very first moment, maybe… but then you count the zeroes and are disappointed
 
Joe Public doesn't do that, though. We do it because we are nerds.
 
hmm.
 
8:38 AM
that's the theory
I don't know how true it is
but people spend a lot of money researching things like this
 
@JayIsTooCommon Not sure on that front but I doubt they're willing to spend more money on conferences
 
@JoeWatkins o/
 
Anonymous
jo jo
 
8:59 AM
What is worse - two redis hashes per post one hash for the replies in json and one for replies order vs one bigger hash per post but I'll have to do one extra loop to put the order in array and that use that to replace the other hash.
excuse my sentence structuring
 
@DaveRandom I see you are an expert in CURL SSL options, but I have a doubt. Is it only private certificate info files (or whatever the thing downloaded from curl.haxx.se/docs/caextract.html is called) that need password protection? Or should it be set for the curl pem file also?
 
@Danack Those are the trusted root certificates, they contain no private data and don't need to be protected as such, although it might be worth verifying the integrity of the file with a checksum for added security (although tbh if someone is able to compromise the system such that they can replace that file, you're probably fucked anyway)
you should chown root.root and chmod 644 it
There's no private keys or anything in there, only public
What are you actually doing @Danack?
if you can use streams then you should, because they deal with this for you using the OS's trusted root cert store (since 5.6)
 
9:14 AM
I should have seen this at the beginning of my day
 
If you really have to use cURL then you should still try to use the OS's cert store, how you do this will depend on the OS but in many cases they will have a system-managed equivalent file
I should probably update that post
 
Reckon it's safe to give our deployment service SSH access to run a few post-deployment commands?
It just forces sftp atm
 
what are the commands?
 
I'm making a little project where Curl is 'good enough' for now. I'll switch it to using Artax if we do any more work on the project - but for now Curl is good enough.
 
One updates the current deploy revision in a text file, one pushes a deployment log over to codebase
 
9:17 AM
@Danack I was thinking more along the lines of file_get_contents() when I said "streams"
 
@DaveRandom you can do POST with file_put_contents() ?
 
@Danack no you use file_get_contents() still, confusingly
 
@Danack Yes.
 
because you are still "getting" the response
@kelunik no
at least not afaik
you have to use ctx options to set the entity body in a get_contents
it's counter-intuitive
 
428
A: How to post data in PHP using file_get_contents?

Pascal MARTINSending an HTTP POST request using file_get_contents is not that hard, actually : as you guessed, you have to use the $context parameter. There's an example given in the PHP manual, at this page : HTTP context options (quoting) : $postdata = http_build_query( array( 'var1' => 'some...

 
9:19 AM
@Sean basically as long as you can do it in such a way that you can create a user only has permissions to do those specific things and couldn't e.g. apt-get or vim /some/other/file then yes, ideally you would chroot it
Personally I'd probably prefer to do it with some kind of web-hook, maybe with a client SSL certificate
 
pastebin.com/d5ar5CHS , Im doing that for every post with replies. Should I just instead have two hashes per post with replies?
 
Hmmm... why does that check for \t and ' '? github.com/php/php-src/blob/…
 
@DaveRandom weird apparently they should be in /etc/ssl but they don't seem to be there. I'll have to get our guy who likes Debian to investigate.
@DaveRandom good lord.
 
@user7594714 There's no way I'm going to attempt to work out what that does. Make your code readable first please, there's no reason to write your code with no spaces like that.
@Danack worth doing php -i | grep cafile
(and capath)
Most likely they are unconfigured but they might be, if the system is putting it in a non-standard place
what PHP version are you running?
 
9:38 AM
7.0.19-1 - but it's Debian so fuck know what they've changed under the hood.
 
OK, give me a minute or two
 
# php -i | grep cafile
openssl.cafile => no value => no value
 
morning
 
@DaveRandom we figured it out - the box isn't configured properly and doesn't have a trust-store installed.
 
:-S
 
9:45 AM
'box' => docker container btw
 
@Danack before you fix that, please can you just check that php -r 'var_dump(file_get_contents("https://google.com/"));' fails?
just for the sake of sanity
make sure that the haven't changed it so that it's not verifying certs
 
@DaveRandom I hope this is clearer pastebin.com/5ewJAqtf
 
much better :-)
 
So what im trying to figure out is use one big hash vs two "smaller" hashes per reply. Its either one hash with the list:order and reply data but requires on extra loop vs two smaller redis hashes which is the second option in the paste
 
PHP Warning:  file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed in Command line code on line 1
PHP Warning:  file_get_contents(): Failed to enable crypto in Command line code on line ˚
 
9:54 AM
Hey Guys, What is the best way to run amphp servers ? putting them behind nginx doesn't seem to be most elegant solution
 
@user7594714 I'm inclined towards the former, the latter is a lot of round trips
 
@PayamB you also can just bind them on the public port if you like to.
 
The latter looks like when people use select-in-loop instead of a join
 
@bwoebi But how would you go about managing them as service ? in case they need to get restarted
 
but it looks alot cleaner
Is the first option expensive on the cpu because if it is then I rather use up ram memory
 
9:57 AM
@PayamB well, you're talking about Aerys, I guess? So, Aerys comes with a process watcher … for soft restart, there's even an API for that. (have a look at CommandClient)
 
Let me give you a bit of context, I like to use amphp to parse a series of logs distributed over a few servers frequently, I'm looking to deploy a watcher to each server to continue-sly watching them log files and parse them. I'm talking about nearly 20 servers, Running them manually doesn't seem to be good solution. What happens when for some reason server get restarted etc ..
Would be it be possible to kinda run them as unix daemons ?
 
@PayamB sure
 
@user7594714 it won't noticeably be more expensive in CPU or memory, but it will be slower
 
Would the first be slower than the first?
 
...read that again :-P
 
10:06 AM
My bad
Thanks for the help!
 
So in your first one, you are only sending a single request to redis
in the second, you are sending the initial request, plus 2 more for each record
 
so it could be faster
 
mornin all
 
mornin
 
o/
 
10:16 AM
@user7594714 It's It's likely to be faster to only send a single request, yes
@user7594714 pastebin.com/rvPC3iJr is the same as your first version but (IMO) quite a bit more readable.
You really should name your variables better... $c and $l are terrible names for things
they don't tell me anything about what data they contain
 
yeah it does look alot better
 
The only acceptable 1-letter variable names are (IMO) $i and $j - everyone knows they are counters and $x, $y and $z - everyone knows they are coordinates
$j is pushing it
 
Ahh, will keep that in mind in the future.
 
@DaveRandom I sometimes use a and b when referring to items in a sort
 
What you saw is probably the better parts of my codebase
Im pretty much just spewing out code to get done with my project asap
 
10:25 AM
@MadaraUchiha oh that's true, a/b OK specifically in comparison functions
@user7594714 do you use an IDE?
 
I think it was teresko who linked to a video about code structuring
Which im gonna watch
 
@user7594714 Do you at all care about this project?
Most projects don't end when you finish writing them
They need to actually work, and then you need to be able to respond to bugs and changes in specifications after it's already written
 
@DaveRandom I use atom
 
It's worth reading php-fig.org/psr/psr-2 - I personally disagree with parts of that but it is a good jumping off point, at least it is a standard way of working. Once you get used to it you can always tweak the way you use it.
 
10:29 AM
@MadaraUchiha Im probably going to fix the code after all the features are done
 
@user7594714 I recommend that you at least try PHP Storm. There's a 30 day free trial. One of the things it can do for you is automatically fix your coding style so you don't even need to think about it.
 
@user7594714 That's what they all say.
It never happens.
 
^
Everyone thinks that
I've probably said that before
 
@user7594714 You know what's going to happen after all the features are done?
 
Not even once, in the whole history of computers, has that actually happened
 
10:30 AM
You're going to move to the next project. Most likely.
 
It's not your fault, it's just what happens
 
yeah i guess
 
But then one day, in 2 years or so, you are going to need to touch this codebase again for some reason
you won't remember anything about it
You need to write code to be read, by humans
 
Your best bet is usually to write code in a way that future you (and far future you) would be able to read and understand it.
 
you will write it once, you (and often other people) will read it many hundreds of times
In many ways these are lessons that can only be learned with experience. I remember being told this, and making the same mistakes over and over despite having been told
tbf I probably still do it occasionally, but I won't notice until I have to come back and touch it in ~2years
 
10:35 AM
@DaveRandom Sometimes you need to do a mistake a hundred times to finally stop doing it.
 
100%
 
10:54 AM
@bwoebi When are you going to stop writing undocumented code? :P
 
@kelunik When I'll start wondering about my own old code … which hasn't happen often…
 
@tereško yep you sure are a SO member, get off your high horse — panthro 1 min ago
 
Is there any tutorial available for rest api development for laravel
 
@kelunik done
@tereško why do you even shout instead of just ignoring him then?
 
Anonymous
10:59 AM
^
 
because help vampires piss me off
 
Can someone give me a brief info on what is difference between amphp and reactphp please? )
 
@PayamB it won't be unbiased in here
 
its okay
i've already decided to work with amphp
 
Ah well fine then, amphp Is Great And Does All The Things
:-P
 
11:04 AM
:))
 
More productively, what aspect specifically are you looking for a comparison in?
 
I just want to know if there was a reason for amphp team to not contribute to reactphp and start a new project, what was missing with react or what has been done better in amphp
 
@PayamB Main difference: amphp uses coroutines, so you write code like normal synchronous code, just with some "yield"s sprinkled in it. React uses raw promises, so you essentially chain callbacks...
 
Ah amazing, so less "callback hell" i suppose , right ?
 
That, and amp has a stronger focus on performance
 
11:07 AM
@bwoebi github.com/amphp/socket/pull/28 should also be ready now.
 
@PayamB Yes, that's the idea
 
@PayamB Amp has no callback-hell, better APIs and generally better libraries in terms of production readiness. :P
 
Also note that @kelunik is not biased at all.
None whatsoever.
 
^^ you can trust this guy, he has has no bias.
 
Amazing thanks for explanation and thanks for your work on FastRoute! respect
cheers )
 
11:09 AM
oh, joy
 
@MadaraUchiha Yes, I explicitly marked that as such with the ":P" :P
 
writing "rep-whoring" in comments is against rules
 
@tereško Yeah, I remember the day that became a thing
I was the very first person to trigger that warning 😆
 
well ... now I can't answer people, who ask me "why did you downvote my hello-world example, even thought I am 100k+ user"
 
@PayamB Also, at the times when amp had been started, react was also still pretty unknown (only a few months old).
 
11:12 AM
@bwoebi oh i thought react was the first to start! well obviously i'm not that informed on all the works you guys been doing!
 
@PayamB Mainly the sluggishness of their development and the focus on performance and better APIs. They're a lot more active in the recent months, but seemed mostly dead before that.
 
Also, we were pretty opinionated and wanted to try our own APIs. Competition is a great in moving things forward and rethink them ;-)
 
Cool! I'm gonna put all of my eggs on amphp now! lol ! no srsly i love it
 
@PayamB Amp had different names before, like Alert, and was mostly focused on Artax and concurrent HTTP requests only.
 
Hii Everyone
 
11:13 AM
one last question, what would be the best thing for a new contributer to help on amphp ?
 
How are you ?
 
@kelunik Aerys also had been long in planning…
 
@PayamB You don't have to, all ReactPHP libraries are compatible with Amp v2. :)
 
Hii Everyone, any knows how use social login using Rest API with Token in codeigniter
 
Anonymous
@PayamB documentation :P
 
11:16 AM
@PayamB if you wanna write me a ground-up async LDAP implementation, that would be great
:-P
 
@PayamB Currently mostly documentation and trying v2 out and providing feedback :)
 
Anonymous
oh and throw abuse at @Wes whenever he proposes a new logo.
 
@bwoebi According to its license it was started in 2015, Artax in 2013 ^^ Recently updated the license file: github.com/amphp/artax/blob/3.x/LICENSE#L3-L4
 
@JayIsTooCommon that's really important, not nearly enough manpower on that one
 
!!dave
 
11:18 AM
@DaveRandom should work on DNS lib.
 
@PayamB well, the very first commit to Aerys was on 30 Jan 2013 … and the first commit to Artax on 15 Feb 2012 … the first commit on the react lib was on 30 April 2012 \cc @kelunik
@kelunik That's when the repos were made public
 
@DaveRandom I guess your normalize DNS function should actually move to github.com/amphp/uri?
 
mornings
 
@bwoebi On which of the React libs? :D
 
@kelunik the event-loop
it's the first
 
11:21 AM
@kelunik they are used internall in libdns (not strictly an amp lib) but since libdns is already a hard dep for amp, could sanely make it a hard dep for URI too (IMO)
or even break them out into a separate lib, that may be pushing it a bit far though
 
@DaveRandom amphp/uri isn't strictly an Amp lib either.
 
true
 
@kelunik ah, well, just looked at month/year :-D
 
Morning roomies
 
uh, is normalization an uri task?
 
11:25 AM
@bwoebi Yes, because comparison.
 
ahh right yes
 
@kelunik you compare by identity
 
@bwoebi No.
 
not the IDNA normalized form
 
Hey @DaveRandom I want to ask some question
 
11:26 AM
@kelunik an uri is just an unique resource identifier … IDNA is explicitly for domain names
 
@bwoebi I already suggested renaming it to URL, because that's what the library is about.
 
I will put it into a daverandom/idn
 
Anonymous
@PeeHaa yomo
 
> Don't ask to ask, just ask.
> Ignore @DaveRandom.
 
@bwoebi We should also rename the methods on Request.
 
11:28 AM
@kelunik because uris technically also allow percent-encoded hostnames
 
@kelunik no, it's an uri that, not an url
 
url/uri nomenclature arguments - I'm out
 
@DaveRandom Do you know how use social login using Rest API with Token in codeigniter ??
 
oh joy, got my two only questions downvoted ... unexpectedly
 
11:29 AM
Holy shit
 
mostly because after reading up on that like 20 million times, I still don't fully understand it
 
It's like 30 degrees here
 
@DaveRandom I have a bit the same problem …
 
@BrijeshDubey No, I know nothing about codeigniter, and next-to-nothing about social network APIs
 
11:30 AM
@PeeHaa shows no mercy.
 
@DaveRandom ok Thank you
 
@MadaraUchiha would it be possible to delete my old questions? One of them is outdated (because, well ... twitter API) and other one ended up wrong, and I had to pick a wont receiver of bounty just to prevent a different idiot getting it auto-awarded
 
> closed as too localized by tereško
NOT EVEN YOUR OWN QUESTIONS ARE SAFE!!!11one
 
@tereško Do you know how use social login using Rest API with Token in codeigniter ??
 
why are you pinging me?
 
11:32 AM
@bwoebi stackoverflow.com/a/1984225/2373138 < It's a locator, not an identifier?
 
@DaveRandom well .. it was shit
 
yeh, not a criticism :-)
 
@kelunik the URL would give you the fully qualified name, including protocol and hostname
 
I'm voting to close this question as off-topic because you are a Laravel developer. — Jimbo Dec 19 '16 at 16:13
lolwut
 
:D
that twitter one really needs to go ... and yes, I probably will take a 500 point hit for it
 
11:35 AM
Done
And yeah, you'll take a big hit for both
 
Speaking about twitter I should probably work on it
Not sure whether to continue v2 branch or finish v1
 
@MadaraUchiha isn't there something like the rep gained before X days within deletion isn't lost?
 
@Jeeves what do you think?
 
@PeeHaa I'm not sure. That's why I am asking.
 
@bwoebi Hmmm
You know, I actually do remember something like that vaguely.
 
11:37 AM
you are awesome, @MadaraUchiha
 
@tereško Truth.
 
@MadaraUchiha I believe it was like 60 days… I'm not sure though
 
Anonymous
@tereško it's weird to see you compliment someone
 
@Jeeves @RonniSkansing @PayamB @kelunik @JayIsTooCommon Do you know how use social login using Rest API with Token in codeigniter ??
 
@BrijeshDubey Don't ping random people.
 
@BrijeshDubey Just say that you are a female.
 
Anonymous
ah god.
 
May 3 at 11:34, by Patrick
I was a codeigniter droid once
^ Ask @Patrick :P
 
@kelunik I'm not sure whether there's much point in cancelling that
 
@JayIsTooCommon doesn't it make more genuine?
 
11:45 AM
@Patrick Do you know how use social login using Rest API with Token in codeigniter ??
 
@bwoebi We currently apply the timeout per connect attempt, so it can be quite long. github.com/amphp/socket/blob/…
 
@kelunik I'm wondering, why?
 
@bwoebi Why the timeout per attempt or why cancellation?
 
the former
 
No idea, but I also don't have a better way there except for another config option.
 
11:49 AM
why don't we just apply the timeout generally?
 
@bwoebi And which timeout do we apply to the hosts?
 
@kelunik the same timeout for all?
 
Only trying a single host or just dividing the timeout?!
 
@kelunik oh… I get what you mean
 
As said, it probably needs a new config option.
v2 is so much better in so many places :D
Just that @DaveRandom guy still needs to finish amphp/dns.
 
11:55 AM
Yeah, Chris is totally unreliable in getting done things quickly in a perfect way…
5
 

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