« first day (1586 days earlier)      last day (3375 days later) » 

12:00 PM
@DaveRandom :P
 
@tereško Man! The guy who has answered is non other than teresko :O I am using it for one of the Product of my company to connect mobile app with the server database. So, It's completely a scratch.
 
@PeeHaa Was definitely PEBKAC, but general comment: when adding a repo to feedr, could do with the "Add" button being disabled until something is checked. I went to add a repo, put the URL in and clicked "add" and the box silently disappeared and didn't add it, I didn't realise I had to click the search button and select a repo at first
 
@DaveRandom Ah yes. Good point
 
As an android Dev, I thought of some Sauce work at server side, hehehe
Anyway Thank you haters, I'll try to stick on Core PHP then.
of course from next project
 
12:08 PM
you should assemble what you need from composer's packages
the important question you should ask yourself should be "what exactly is the reason why you use a framework X?"
if the answer is something like "for routing" of "for ORM" then you really don't need a framework
 
ORM is what I wanted to reply
And why I dont need framework for that ?
 
you would be better off using Doctrine instead
 
Never heard
 
follow the tutorial and after that you can include doctrine with composer
 
lol (The Name)
Nice
Where is Uncle Gordan ? Just wanted to say Hello.
Anyway Thanks Guys :) @tereško @Marcel
 
12:16 PM
And thanks to @Patrick for the no-framework tutorial (he's in here too ;) )
oh and while we're at it NikiC and rdlowrey because the tutorial uses FastRoute, Auryn ;D
 
:P
Cya later
 
1:13 PM
why so quiet?
 
Well shit. 8 hours wasted trying to figure out a symfony form when it wasn't the form that had the issue, it was the bloody controller
 
1:39 PM
heh
that kind of shit sucks
I've learned to get back to the basics very fast
for example if a bundle doesn't work, I've spent hours trying everything because the controller didn't work
turned out I didn't enable it
so I check this kind of stuff right away nowadays
 
We0
Hey guys, I have an array array(array("id" => 1, "price" => 12), array("id" => 1, "price" => 12), array("id" => 1, "price" => 12))
I want to extract all the ids
array_search doesn't work, neither array_filter
 
@We0 Just do it simply with php.net/manual/en/control-structures.foreach.php then?
 
We0
Cause it would be too easy, but found the function I want, array_walk, just couldn't remember it
 
"Cause it would be too easy"
 
We0
It feels like a waste to use it if php already has reallly good built in functions
 
1:43 PM
ftr, I rather use foreach instead of "obscure" php functions sometimes...
 
+1
 
I write code for my colleagues, not just for myself
 
We0
why is it obscure?
 
and even for myself... I don't want to go read the doc every time I see a function...
can you say what it does without reading the doc?
 
We0
I just can't remember names, but array_walk is pretty simple
Yes, walks through the array passing every item in the array to the call back
 
1:44 PM
btw, your use case would be array_map actually...
$ids = array_map(function($item) { return $item['id']; }, $items);
 
We0
Yeah, that is better
thanks :D
 
@SebastianBergmann why are you against removing the date.timezone warning?
 
for the same reason I tend to NOT use regex
so you don't come back one day later and you don't know what the f... you have done ^^
 
@MarcelBurkhard depends...
 
"I tend"
 
1:53 PM
I can use/read regex pretty well today tbh
so I'm more liberal
couple years ago I didn't use them because I couldn't read them...
 
what good reason is there to remove it ?
 
user895378
morning
 
morning
 
because it makes life easier for internal developers seems like a really bad reason to me ...
 
user895378
1:55 PM
@Fabor it's not really that exciting except for people who write HTTP servers /cc @JoeWatkins
 
> “date.timezone” is the only setting that is required to be set. Every other setting, including those that have security implications default to sensible values silently; defaulting to sensible values does not appear to cause any problem for users.
 
any idea why a new laptop will be cheaper than a refurbished one?
 
user895378
There should be zero impact in userland web sapi PHP from http/2.0
 
this is a package maintainance I think more than anything
 
Hey guys, do you know where can I read about how to configure properly a mail header in order to be sent via our mail client on a server but to be indicated that it is sent from the original sender?
 
1:55 PM
@ziGi it's hard
@DaveRandom ^
 
The server coonfiguration is the problem
 
the DNS needs some configuration too
 
user895378
Mostly it's addressing the inefficiencies in HTTP/1.(?:0|1) to make it easier to service more clients faster.
 
@rdlowrey So cue lots of hit-counter chasing misinformed posts about what it'll do for userland?
 
For example I had a mail "support@duolingo.com via zendesk.com"
 
1:56 PM
@ziGi Meaning you want to host an SMTP relay server?
 
basically the sender is support@duolingo.com
@DaveRandom exactly
we have one already
 
user895378
@Fabor Exactly. You shouldn't notice it at all if you're writing php web applications.
 
@ziGi Using what server s/w
 
Furry
 
1:57 PM
but where can I find a way to configure it properly in such a way that gmail, yahoo, microsoft etc
get it
@DaveRandom what is s/w
 
software
 
ah, using google smtp server
I guess I have to check google manual
 
then it's not your own server...
 
true
 
OK, so you want to get rid of the "foo@bar.com on behalf of bar@bar.com" in the receiver's display?
 
2:00 PM
but when sending a mail through the google smtp, the mail is still not shown as "via" their server, but their server is shown as a sender
no, I want to keep it
but I guess the problem is the header
ok let me give an example
 
If it's not showing up, that means you sent the mail directly as the gmail account
 
well I set some headers
 
user895378
@Fabor The biggest thing about HTTP/2 is that it allows you to multiplex multiple request/response "streams" on the same connection. So a client can request lots of resources on a single TCP connection and have each serviced asymmetrically from the others. With HTTP/1.1 clients have to open multiple TCP connections in practice to pull resources concurrently (and TCP connection overhead is high). So it should enable servers to service more users at once because connections are less scarce.
 
They changed the way their systems work quite recently actually, you can no longer add sender addresses like you used to be able to, you have register a domain (or something, I forget, not actually tried to do it for ages)
 
@FlorianMargaine Why not just array_column($items, 'id')?
 
2:02 PM
@rdlowrey 14 years of progress :)
 
What is the address you are trying to send as and why does it have to be via google @ziGi?
 
user895378
other things like compressing headers, using binary instead of ascii for protocol things, etc.
 
@DaveRandom it is not via google
 
user895378
It's all really geared around allowing servers to handle more users faster.
 
2:03 PM
the (arguably) worst about http2 though: ssl required
 
@FlorianMargaine ^^
 
user895378
That's a myth, though.
 
it is because the mail is generated from my system
 
@rdlowrey is it?
 
@rdlowrey Really struggling to resist the urge to say "So it should enable your mum to service more users at once" etc etc
 
2:03 PM
and we send it using their original email
 
user895378
@FlorianMargaine Yes.
 
oh, didn't know that
cool
 
but our server is shown as a relay
 
user895378
For a while it was going to be required but the httpbis smartened up.
 
and you see it not as a transitional
but as a reply
 
2:04 PM
@rdlowrey oh cool
 
@ziGi Ahh so basically you want a user to be able to send an email as themselves, in other words you want to send email as any arbitrary address on the internet?
 
@DaveRandom hahaha
 
If so then: you can't do that. Plain and simple. For pretty obvious reasons.
 
user895378
The nice thing, though, is that the overhead to establish an SSL connection for use with h2 is significantly lessened because what the protocol does require is the use of the new TLS ALPN extension. This eliminates the need to do any upgrade request or anything.
 
@rdlowrey what do you mean?
 
user895378
2:06 PM
Basically the client is able to tell the server that it wants to speak http2 during the TLS handshake and no HTTP/1.1 upgrade request is necessary.
 
where I'm left with https is "exchange session key using asymmetric encryption then use these keys to encrypt every request during the session"
 
@ziGi Tell people to setup spf records
 
@DaveRandom no, I want the users to be able to send the email through our system using their email as a sender and reply to, and it works, but it still shows that the mail is sent through the server instead of the original
it works ok
 
@rdlowrey oh, so you mean that an http2 client needs to go through http1.1, but https2 client doesn't need to?
 
but the sender and the reply-to are different, the reply-to is the proper sender email, the sender is our server
isn't it possible the sender to be their email, but "via" our server
 
2:08 PM
1 min ago, by PeeHaa
@ziGi Tell people to setup spf records
 
@ziGi That can only be done if you inject the message directly into the internet without using a public relay service - and the users would have to configure their domains to allow this as well (see what @PeeHaa just said)
 
Yes, I guess that is the option I was looking for
 
It's muddy though. It's technically possible to do what you are asking, but horrifyingly complex and full of weird security issues - it will be very flaky
 
user895378
@FlorianMargaine Right. If you want to use unencrypted http:// with HTTP/2.0 you have to make a standard HTTP/1.1 request with the appropriate Upgrade: header first. Then the server has to respond and tell you whether or not that is acceptable before the two parties can start communicating via h2. Since the TLS handshake would have been required either way for a https session the protocol can leverage the new ALPN extension to TLS to avoid those extra/unnecessary round trips.
 
@ziGi this why you'll never have used a service that lets you do this ever ;-)
 
2:10 PM
@DaveRandom yes, it's not as simple as it sound and I understand the obvious reasons for restrictions to be able to prevent spam etc.
 
@rdlowrey pretty cool
 
Because if that is possible then I can send you a mail from the government via something
and people would believe it
 
exactly
 
@rdlowrey iiurc, the TLS handshake (using the new extension) also tells the client whether it can use http2 or not
 
if they don't understand what is happening
 
2:11 PM
Which is why generally people either settle for setting the Reply-To header or just put something in the message body explaining why the sender is what it is
 
ok, well thank you for the help
 
user895378
@FlorianMargaine I don't really recall ... I'd have to look it up.
 
user895378
In any case, I'm going to add support for the TLS ALPN extension in ext/openssl before feature freeze so full HTTP/2.0 support will at least be possible using PHP7 with my client/server libs ...
 
yay :)
better send a mail to make sure it slips in before feature freeze even if the code's not ready though
I can't see any reason that anyone would decline
 
user895378
Yeah, I'm not going to bother with an RFC. Just going to ninja commit in the next couple weeks. It's only a matter of adding a new context option to specify the alternative protocols you want to speak and then if one is negotiated successfully just storing that negotiated protocol in the context somewhere (as far as the userland impact).
 
2:15 PM
What is the fastest way to validate a dd-mm-yyyy notation in php as to be valid ?
 
@Duikboot regular expression
 
18
Q: Regex to validate date format dd/mm/yyyy

Nalaka526I need to validate Date input for the format dd/mm/yyyy with regex. This regex validates dd/mm/yyyy, but not the invalid dates like 31/02/4500. ^(0?[1-9]|[12][0-9]|3[01])[\/\-](0?[1-9]|1[012])[\/\-]\d{4}$ Can someone provide a valid regex to validate dd/mm/yyyy format with leap year support. ...

 
yeah, the tricky part is the leap years
 
@Duikboot you want to check that the date is valid?
 
2:19 PM
Yeah I chcked it with the regex which is ok
 
or you want to check that the pattern matches?
 
but now I have to check that value dd-mm-yyyy if it's not 'back in time'
it has to be > then the currentTime
 
Yay, more fun with symfony forms:
0
Q: Custom form theme breaks Form::modelData property in Symfony 2

Jimbo For context, please see my Previous Question on how I required the ability to change select and option tags to ul an li tags when rendering a dropdown with Symfony 2 forms as they look and work well with my CSS framework of choice. As a result of changing how my form element is rendered, it ...

 
@Duikboot do you mean, you want the date to be today or after today (excluding time), or do you want to be from tomorrow onwards?
 
is anyone reading the new scalar hints thread ?
 
2:22 PM
Use Symfony forms they said. It will save time they said.
 
does anyone [else] just find themselves a bit bored of the subject ?
 
The date can only be larger than the current time.
 
@JoeWatkins I do, since I don't see why "primitive" hints like (int, float, string, bool) have to be hinted
 
@rdlowrey wrt LibDNS: I merged the PR and tagged as 1.0.0, it's been in use for long enough without being touched to call it stable (I updated composer.json in amphp/dns as well). I nuked the old 1.0 and 2.0 branches and created a 1.0 branch, so adopt a proper PHP style workflow w/semver please - i.e. master should be treated as 1.1
 
@Danack I'm learning for me :P for fun
 
2:25 PM
I mean, type hints for Classes and Interfaces is ok, since you can make good architectural suggestions using them, but scalar types, meh
 
I think I've gotten pretty deep into the stuff that not that many people need to touch
Bit like @DaveRandom's mum
 
golfclap
 
@LeviMorrison SeaPHP in Seattle should be good, and possibly NEPHP in Boston. Those are the 2 that I'm likely attending. But also Tek is always good as well
 
SeaPHP is good, I've been, lovely friendly people especially to newcomers
 
@bwoebi you wanted to see my compilers talk IIRC ^^
 
2:27 PM
@Jimbo This is the thing I always say dislike about generic form and orm libraries. They're awesome at saving you time on the simple stuff, and then take it back on the difficult stuff........and the simple stuff is the stuff you can get an intern to do.
 
@Jimbo I can't even think of a good counter-insult, I tip my hat to you sir
 
@ircmaxell it's a part of your presentation, but aren't scalability problems cause by crappy architecture which translates to your code sucks?
 
@ziGi that's the first 7 minutes of the presentation
 
true, I haven't watched it all
 
crappy architecture does not translate to your code sucks, you could have beautiful code that just doesnt scale :)
 
2:29 PM
Can't be bothered to trawl 200 mails, was fn(type $var = null) discussed anywhere in the type hints thread?
 
@beberlei so I should understand that architectural problems !== sucky code?
 
i think they are mostly independent of each other
 
I kind of think I know what you mean
 
> Please refer to my other posts proposing single mode with the addition of four 'strict' scalar types at ZPP level (would apply to internal anduserland). These will be chosen by internal function implementors when they decide it, not by the caller.
and we're back to square one
 
Perforamance and Scalability are also different things
 
2:33 PM
@ircmaxell well sara writes the RFC, not sure that francois opinion goes into it at all.
 
and the performance was caused by both crappy code and crappy architecture
 
@beberlei he's writing RFCs as well
 
yes but sara is writing the scalar type hint v0.4 one
 
@Danack I completely agree. Thing is though, if you learn this stuff in your own time, and enjoy it, then when it comes to actually using it (not effing about with it, actually doing it), you could actually use it how it claims and save time
 
again here, the author of an RFC gets more rights with how it should look like
 
2:34 PM
@ircmaxell, could you recommend good reads on fixing scalability issues
 
@ziGi profile
 
thats not enough imho, in profiling you look at one request for example
 
@beberlei I've been debating picking up 0.3, making the declare tweak, allowing int to resolve float hints, and then pushing for vote
 
but you need to produce bottleneecks
 
@beberlei yeah, that's fair
 
2:34 PM
@ircmaxell I could get behind that
Though I'm afraid we'll end up in a situation with three competing RFCs on the topic ^^
 
I think it's the only sane option... I just need to decide if I want to do that
 
But if you want to do it, do it now.
 
@NikiC yeah, which is :-(
 
And without prior discussion on internals.
 
@ircmaxell I do know that you have really nice articles, but have you come up with those solutions yourself or are they based on a more grand outlook on such problems?
 
2:36 PM
@NikiC and what, go straight to vote?
@ziGi what solutions?
 
@Jimbo answered
 
I should blog about scalability at some point... I do have some interesting stories to tell
 
@ircmaxell no, I mean announce the rfc right away (and go to vote shortly after, as it's only a minor adjustment of the existing one)
 
I don't like that everybody is now rushing it ...
 
(By right away I really only mean that it should be the first RFC on the topic that gets proposed)
 
2:37 PM
@ziGi one good resource for scalability by aneqdote is highscalability.com
 
@NikiC yeah, that's acceptable. Tho it will take flack for "not being constructive"
 
Well aren't there any common knowledge which solves problems such as scalability, or at least proposes ways to deals with the increasing amount of data
 
@Andrea ping
 
but generally the idea is to have pull based systems with queues, instead of push based systems that go down under too much load
 
@ziGi To get rid of the via, you need to set the envelope sender address, for example passing -f user@gmail.com as the fifth parameter to mail(), or the setReturnPath() method in SwiftMailer. Like PeeHaa said, you'll need SPF records set up for this to get through spam filters.
 
2:38 PM
@ircmaxell Yes, it will certainly take flack
 
user895378
@DaveRandom Okay, sounds good. Thanks for merging that. I'm always building php with --disable-all and enabling the specific extensions I need, so that ext/ctype dependency was always a PITA.
 
vlc with chromecast supper \o/
 
Would it be an idea for a "quick" RFC on reserving keywords related to type hints now, then surely there's a lot less reason to rush type hints themselves?
 
Finally my subbed anime woes are over.
 
@beberlei I'm not sure I agree with that
 
2:39 PM
@rdlowrey Yeh I'm all about LCD implementations if there's no major perf or functionality degradations, I'm just so used to ctype being there that I consider it part of the std lib
 
user895378
Totally get it.
 
user895378
@beberlei Push-based is only problematic if you're using server technologies that can't scale well or that are inefficient in the number of simultaneous pull clients they can accommodate (like the php web sapi).
 
@ircmaxell its a very simple rule of thumb, the topic is too vast and especially use-case sepcific
 
@beberlei sure, but even there, if you do true shared nothing, you can do everything pull based to incredible scale. As long as you're careful with the design of your redundant systems.
 
you mean push bashed?
 
2:43 PM
yes
 
ok i agree with that
 
especially with techniques like write-through caching, etc
 
I have used the profiling of Chrome Developers Tools so far to check for long requests on the REST API but I am not sure if that is considered a serious way of performing such checks. I did this and found a bottleneck when parsing information and re-factored it and there were code redundancies and problems with the architecture, so I have split it and applied rules from SOLID structure and there was between 40-70% increase in performance and ~50% memory usage optimization.
Is that considered proper way to go with it, because I am not really sure that is really how it goes.
 
@AllenJB I'd do that. In fact, I might write the RFC about it tonight, even if only to cover a "just in case" scenario.
 
@Jimbo you there?
 
2:54 PM
@ziGi that works for obvious bottlenecks yes. you can also copy as curl from chrome, so you can execute the call in the shell again
 
@beberlei true, I actually wrote some unit tests
and did the profiling in php so I strip some additional layers
and deal only with the back end
I was just wondering if that is a valid way to deal with it, maybe there is a more automated way, which I am now aware of
 
@ziGi shamefully self promoting here, you could use tools like my companies Application Performance Monitor: qafoolabs.com or equivalents like newrelic, appneta. They monitor performance 24/7
 
@beberlei there is no shame in that, if it helps someone, then it is ok
I have only a few years experience with web app development and software applications in general, I used to write more algorithmic solutions so for me it's quite new and confusing, that's why I am asking
 
And anyway, xdebug can let you do real profiling
 

« first day (1586 days earlier)      last day (3375 days later) »