« first day (1550 days earlier)      last day (3395 days later) » 

2:00 PM
@Fabor lol
 
@HassanAlthaf Get people in there, then it would be active :)
 
@ircmaxell BTW nice staircase. Pretty fancy! Can't be easy after a few beers.
 
it's not bad at all
 
Looks like a nice place. Should engage old habits and put a fireman's pole in :P
 
lol
 
2:13 PM
@PaulCrovella I put up a question for the RabbitMQ stuff if it's any clearer.
 
@Fabor I understand what you're after, I don't understand why you think c1-c3 are all going to get copies of the same message. What you've drawn up should work just fine.
 
Currently if I send a fanout message C1-5 all receive the message.
I only want one of C1-3 to get the message and both C4 and C5. Unsure how I would set that up code wise. (If possible with RabbitMQ)
 
@Fabor maybe you need to create two queues each with its own route
and both would feed from the same exhange
 
@Fabor lol, love how @ircmaxell puts his avatar at some point :P
 
it's turning webcam off while I go somewhere else (usually making tea)
 
2:19 PM
this way one producer will be able to send messages to only one exchange and rabbit would route them accordingly to the route
 
yep, you turn it off then you got a cup, I guessed it
 
Should use an animated GIF and fool everyone in to thinking you're still there.
@nikita2206 Oh?
 
@Fabor I don't know what does this oh mean :)
 
Can you declare mutliple queues?
 
hi all! please, help me! how can I read local PHP files without fopen/fread?
 
2:23 PM
@Fabor can you describe the problem less abstract? (as in why do you need this)
 
Okay, so basically say I have to insert a bunch of records in to a database. I'm passing the data for the insert in rabbit MQ. I also need to check the data for a certain value. So I have a fanout exchange with two consumers. One for inserting. Another to check for a value.

But now the database insert is no where near keeping up with the influx of messages. So I need to scale that insert consumer. I duplicate the server so it now has two running. Problem is both of them receive the same message and would insert the content twice to my database.
 
@Fabor Oh so you need to process this stuff in parallel, then you need a direct or a topic exchange, not fanout. Fanout is the simplest messaging method you can imagine. It's just like network broadcast, for example.
 
Ahh. I see.
 
hello all. I am looking a php sending email code that works. Does anyone have experience with that?
 
@macroscripts rm -Rf whatever you have now && php composer.phar require swiftmailer/swiftmailer @stable
 
2:36 PM
@PeeHaa I cant believe you are still here and active. You helped me a long time ago. Waht is that you wrote?
 
@macroscripts Yeah they tried to get rid of me, but failed :P
@macroscripts Use either swiftmailer or phpmailer if you want to send mails
 
or write your own mail sender
but beware.
 
@FlorianMargaine Troll meme
 
2:38 PM
come on, I told him to beware.
 
:)
 
@macroscripts lol
 
I just want something that works. Tried that code and didnt get anything
@PeeHaa how to use this php mailer?
 
@macroscripts That code should work
 
can u help me. It dont ask for free advice :)
 
2:43 PM
Have you checked what mail returns?
 
no error
 
SwiftMailer is a fair bit better that PHPMailer IMO
 
yes, but the latter on is much easier to deal with for newbies
 
@PeeHaa Can we speak on private?
 
@macroscripts Neh. Just in here is fine. There is not a lot of talk going on now anyway and perhaps somebody else can also help
 
This should get you started with swift swiftmailer.org/docs/sending.html
But I would rather try to find out why your first attempt didn't send
tail -fn1000 /var/log/maillog or tail -fn1000 /var/log/messages hwn sending the mail
 
@PeeHaa looks like sf docs
 
@FlorianMargaine Also sensio
 
so many codes
can u point me to example I can use
like form and sendmail.php
and try that
 
2:56 PM
I thought we were only doing capacity building here :D
 
as I said ... not so simple to grasp for newbies \
 
I would forget about forms for now I just create a minimal example <?php var_dump(mail('you@mail.com', 'test mail', 'yolo'));
 
yeah but I use html form to pass the data to php code
 
Does not matter. You have a problem with mail not with your form
 
sec
bool(false)
 
2:59 PM
That probably means there is no MTA on the machine
 
what is mta?
 
Do you have access to the machine? As in shell access?
 
Within Internet message handling services (MHS), a message transfer agent or mail transfer agent (MTA) or mail relay is software that transfers electronic mail messages from one computer to another using a client–server application architecture. An MTA implements both the client (sending) and server (receiving) portions of the Simple Mail Transfer Protocol. The terms mail server, mail exchanger, and MX host may also refer to a computer performing the MTA function. The Domain Name System (DNS) associates a mail server to a domain with mail exchanger (MX) resource records containing the domain name...
@macroscripts from the cli do a echo test | sendmail -v your@mail.com and check whether it completes
 
@macroscripts what OS are you running it on ?
 
3:00 PM
centos 7
 
gimme a second
 
exim =/
 
ive got the email on my spam folder
 
yeah looks good. If you still cannot send mail from php change your php.ini to use the correct sendmail program
 
3:03 PM
 
ok where in ini file
can I do that?
 
hi all
need some advice...
 
3:18 PM
Is there a "right way" to build a web app today?
Mean that, last one i built, i had to do it with 75% js, and the 25% were "basic" html "templates" and php (for ajax queries) because the app (website) had to be dynamic, had to react to user actions (clicks, & so on). In this project, i had oo javascript, but no oo php at all since the php part was only for ajax queries...
 
@Julo0sS the right way can be subjective... but maybe this tutorial I wrote is a start. That's how I do it these days
 
@Julo0sS no, there is no such thin as "the right way"
but there are quite a lot wrong ones
 
@tereško Spoken like a true @tereško.
 
... I should point out that you don't seem to be vehemently disagreeing
 
ok, I'm reading.. ;), just note that I have to do another project now, but it is, once again, something that has to be "reactive". So i just wonder if my way to do this job is good or not, and why... I always manage to catch events on my "form" (if I can call it like this), most events fire an ajax call or something that will get data and update it into the page (getters) and finally, user can then "save" its changes... & so on...
 
3:31 PM
@tereško Never said I disagree.
 
in fact, i realize that i use some oo js, but no oo php at all... that's what makes me curious about my way to do the job... I'm thinking that i'm maybe missing something...
 
Although, speaking from a purely technical perspective, the right way is a way that works (i.e. the application is correct), and the wrong way is a way that does not.
 
@SecondRikudo I agree ^^
 
^ false
 
That means that there are a lot of right ways (anything that works), and a lot of wrong ways (anything that doesn't)
However, there are a lot of bad ways (which incur technical debt), and a few good ways (which aim to reduce that technical debt), because both are equally correct
There's a big difference between correct and robust, you should aim for robust.
 
3:33 PM
@SecondRikudo just because you can load the article with ID 42 does not mean that the page is done right, especially if you can also use the same SQL query for dumping a PHP file on the file system (which is one of more practical ways of SQL injection)
 
meh really, you guys are complicating
 
@tereško Writing your app with pure HTML pages, all static and serving all the pages from static files and editing it there works too.
 
code should be: correct, readable, performant. In this order.
end of story
 
With minimal server interaction for forms.
@FlorianMargaine There's a bit more to it than that.
 
@FlorianMargaine in best case it's one of those
 
3:34 PM
brb
 
Somewhere between "correct" and "readable" there's "usable", "looks good", and most importantly "sells".
 
@DejanMarjanovic webarto?
 
Somewhere between "readable" and "performant" there's "verifiable (tested)", "deployable", etc.
@FlorianMargaine Yeah
 
the name change was confusing... hopefully you didn't change your avatar too
 
@FlorianMargaine remember that @MadaraUchiha guy? ;)
 
3:39 PM
@FlorianMargaine I didn't change my name, only alias :-)
 
@Patrick Wonder where he went
I know he's still active on Anime & Manga
 
I'm going to propose to my girlfriend.
9
 
@DanLugg Good luck man! Any special plans?
 
Working on it; few ideas, but still deciding :-)
 
@DanLugg She doesn't know you use this room aye? :P
 
3:40 PM
^^ Correct.
 
@SecondRikudo and how do you explain disappearance of Rikudo Sennin?
 
However, it's not much of a surprise, because we've been talking about it already
 
@DejanMarjanovic Or Truth? Don't forget Truth
 
And she already filled out the forms to elope in Vegas; lol
 
@SecondRikudo I was getting there... "Tell us the Truth"
 
3:41 PM
@DanLugg My advice is "just do it". For me and my wife it didn't matter too much as long as it wasn't some grandiose thing and it wasn't some lame thing.
 
=)
TBH of all the anime characters I named myself as, Truth is the strongest and most terrifying.
 
@Fabor That's pretty much where we're at :-)
 
@DanLugg I also heard some great advice from a ring buyer on reddit the other say. "The proposal isn't the surprise, it should be known that you will propose, it's how you propose that is surprising"
 
@Fabor Also, precisely what I'm going for :-)
 
My wife was super sly and covert in letting me know what her answer would be if I asked... she said "If you asked I would say yes you know...". Covert level over 9,000!
 
3:44 PM
My girlfriend was slightly less covert; "I want to marry you", were the words I believe she used.
 
user895378
morning
 
lol
Hello @rdlowrey ltns
 
user895378
</vacation>
 
<work>
 
user895378
2 hours ago, by Fabor
It's hard to focus on this Coding Securely in PHP when I am too busy staring in to @rdlowrey's eyes.
 
user895378
3:44 PM
you bastards
 
lol
 
Watching PHPRoundtable atm... I remember @ircmaxell having a much more serious look
 
Lol
Not to mention I was/am sick
 
@DanLugg good luck, propose better than me
 
@rdlowrey Morning \o/
And wb
 
3:49 PM
@DanLugg I proposed when she got out of the shower, so it's not hard to do worse than me.
 
user895378
@PeeHaa Thanks :)
 
@rdlowrey you have fascinating eyes :-P
 
user895378
Every year the month of December seems to end up being a complete waste for me.
 
user895378
6 mins ago, by rdlowrey
you bastards
 
:-D
 
3:58 PM
Day after I fell and cut my leg.
Be careful.
 
If she said no... would you have pushed her?
 
lol
 
There's no boolean with women, only mixed.
 
lol
 
define('true', rand(0, 1))
 
4:00 PM
(SCAN_TimeStampRR, '%b-%e-%Y %l:%i%p') ?? i know SCAN_TimeStampRR, But what does other two variables usually mean?
 
StdClass::__maybe()
 
StdClass::__maybe()->call_me()
 
I always think about miami cheerleaders before the singer(in?) when I see this...
 
I really hate late static binding.
 
user895378
4:13 PM
@LeviMorrison That makes at least two of us.
 
Soo... seems like I'll be working from Bristol in the next 6 months
 
I can actually compile master today \o/
 
anyone in the area?
 
Now I can test Dmitry's updated patch for return types.
 
4:20 PM
Anyone?
 
@Fabor Let me know if you need any clarification on stackoverflow.com/a/27926701/3942918
 
@PaulCrovella Amazing thank you. Will give it a read through now :)
 
Hey folks. I'm looking for a framework that will help with token-based authentication and routing, but I don't need ORM. Any suggestions?
 
ok can someone here help me confugure my mail server
 
I'm pretty sure there are plenty of libraries for what you want
 
4:32 PM
@Ocramius BRIZZZLE! West country posse yo!
 
Hmmm. I'll give it a look.
Thanks!
 
@PaulCrovella Amazing thank you <3 :)
 
@Fabor You're welcome :)
 
@bwoebi You have a bug open - bugs.php.net/bug.php?id=55451 Are you going to ask about whether that can be merged on internals, or are you no longer interested in it?
 
@Danack not sure how that bug is related to me… not being assigned it and nothing alike!?
 
4:39 PM
And by you, I meant Jack....
 
Then ping him… and not me…
 
@Ja͢ck - I meant you above ^^
 
MSDN is the worst documentation for anything I've ever had the displeasure of working with, bar none. It's almost like it was intentionally designed to be ungoogleable.
 
@DaveRandom Is, and always has been, and probably always will be. Have you encountered the "the information you need is on this other page, which we've now deleted" thing yet?
 
Many, many times
I guess we are spoiled with PHP, which has awesome documentation
 
4:48 PM
Still not awesome enough documentation though.
^^
 
can always be improved
 
well, mainly translations of PHP docs are out of date or a lot of pages just not translated at all.
 
easy solution: write the translations
 
that solution isn't easy… It's much hard work -.-
 
@bwoebi more easy solution drop those translations
 
4:57 PM
haha
 
I was kinda serious. If you are programming you have to be able to read english docs imho
 
@DanLugg dafuq
Document All The Things!
 
They finally added some additional descriptions, but for a long time, everything was only documented with that line.
 
@Danack uhmm... what does that mean? O__o
 
5:03 PM
Good Evening. I remember a discussion about introducing a hackish lambda syntax into php7 when hacklang was first introduced (well, I could've imagined that discussion). Was this ever discussed again somewhere or does anyone have a link to the original discussion? (internals, here on chat)?
 
@Ocramius People in Bristol pronounce it 'brizzle' because hard consonants are for posh people. It's located in the west county....I was saying that you are now part of the west country 'posse' - when are you arriving here?
@Ocramius Prepare your auditory canals: youtube.com/watch?v=XhgUeY1BExk
 
user895378
Danack has a posse.
 
Regarding the translations. @PeeHaa @bwoebi Does php.net keep statistics about requests to translated pages? Maybe a first step should be to reduce the number of offered languages from 11 to 3 or 4 (en, pt_BR, zh, most used language that isn't in the list)
 
posted on January 13, 2015 by kbironneau

/* by Cyrus McDugan */

 
@Danack wat
Anyway, I don't know yet
 
5:11 PM
@Rangad No....even when a translation set isn't complete having some pages translated for a language is a lot better than none.
 
@Danack Yes, if outdated pages fallback to the en version. I'm not sure if they do now, but until I changed to use en all the time it occasionally happend that the translated version and the en page would contradict. (Maybe I had bad luck and ended up on a different mirror after clicking/pasting a link in usercomments more than once).
 
@Rangad It does....I think some mirrors have been removed which has also lead me to some dead links recently.
 
@ircmaxell yeah, nice… new paid products…
 
i've also run across some pages without an en version
 
5:22 PM
@Ocramius It's a pretty nice city. There's actually quite a bit of dev stuff going on, as lots of companies have realised that London is far too expensive and have moved out to be somewhere a bit cheaper.
 
I have a php.ini with an auto_prepend_file in it. It doesn't seem to be working. Any thoughts on why that might be?
 
@Danack I'm likely flying in on thursday, but I'm not sure yet
 
The file I'm trying to prepend echos some text, and that text is not shown when I view my page.
 
Yes, because who plans international travel more than 24 hours in advance.
@RyanKinal You haven't restarted the server or php-fpm for it to take effect?
 
I restarted the server. Still no effect.
auto_prepend_file = "config.php"
Is that correct?
I don't think php-fpm is running... at least, not as a service.
 
5:31 PM
Is config.php in your include_path? If it is not you might need to specify the full path (depending where it is located).
 
It's in the same directory as the php.ini and the index.php
That should be in the include path
 
@ircmaxell "Fixes to security problems (CVEs) under the Zend Server Long Term Support policy" - that's actually trouble for us at ZF =\
 
phpinfo shows no additional ini files. Huh.
 
@RyanKinal Modified the correct ini file
ah to slow, sry
 
What does the ACC part of ZEND_ACC_* stand for?
 
5:36 PM
Wild guess: accelerator
 
My first guess would have been accessor would even fir for some of the constants.
*fit
or rather access. Assuming we talk about this ?
 
@LeviMorrison access
 
As in visibility access?
 
yea… final access, private access etc.
 
yeah visibility modifier, or access modifier ...
(I think of it access modifier, we don't really have visibility)
 
5:51 PM
So... ZEND_ACC_RETURNS_REFERENCE is really poorly named.
As are a few others, I think.
 
I would say yes, but I can easily be wrong ...
they'd be better named ZEND_FLAG_, they are flags and are always used in *_flags, if you wanted a name that could replace ACC en-masse ...
 
I guess I should be using .htaccess instead of a php.ini? True?
 
Anyone wanna be my saviour this evening? Beer the next time your in stockholm promised
Trying to make my system print out xml-files with UTF-8 format on the file, the content is UTF-encoded, but not the file itself
and I've only got a link to print the file, in where that file is printed with an echo
 
6:11 PM
@RyanKinal xy problem.
 
Rephrased: I want to automatically include a config file on every one of my files. What is the best way to do that?
 
Why do you want that?
Don't you have a front controller?
 
So I have access to values in every part of my code
 
Or at least a bootstrap file through which every request goes?
 
@Ocramius
 
6:13 PM
Oh hey. That's a good idea.
 
Usually we reroute every request to index.php. in reality, every request is like index.php?route=foo/bar and we use apache mod_rewrite to .make clean URLs (I.e. strip off the index.php part of the URL, for the user)
 
Right
I guess I don't need to prepend a file, since there's that single point of entry.
I can just use a regular require
 
@RyanKinal sorry I gotta go, but yeah this single point of entry loads everything needed for the current request. Also, look up autoloading
 
Thanks for the help
 
6:21 PM
morning
 
@NikiC Moin, just the man I was looking for.
@NikiC What's the URL to your PHP7 zvals and arrays blog entry?
 
Not nikic, but are you refering to this one? nikic.github.io/2014/12/22/…
 
@Rangad That's the one, thanks. :)
 
6:51 PM
Congrats @Gordon !
@NikiC @ircmaxell what do you guys think about ES7 abstract references for PHP?
This sort of scheme means you can keep your base class library pretty similar and bind methods in a scoped way from the outside. (Only the syntax would have to be different)
 
Abstract references?
Not familiar with that
 
Yes, it's a way to bind methods to an objects from the outside. It's very new. An example would be something like:
$arr2 = $arr:map($x ==> 2*x):filter($x ==> x < 12); // made up syntax and hack lambdas
 
OIS
you mean something like github.com/zenparsing/es-abstract-refs ?
 
The idea is that you can late bind a method to an object - so the object does not own the method but it can be applied on it.
@OIS yes, that's very early on but that's the idea. To take scalars or objects and add them abilities (without actually placing it on them) from the outside.
For example if you want your strings to learn how to "contains" you might do something like:
 function contains($other){
      strpos($this,$other) !== false; // made up syntax focus on the semantics
 }
 "Hello World":contains("World"); // true
 
OIS
that sounds like war of the frameworks
 
7:05 PM
@BenjaminGruenbaum hmm, what's the benefit of writing contains($str, $other) or $str:contains($other)?
 
@BenjaminGruenbaum isn't it essentially call in js?
 
@FlorianMargaine in JS it does call chaining.
@bwoebi you're asking what's the benefit of a contains function or what's the benefit of abstract references over a free function?
 
@RyanKinal btw, you should really take a look at the tutorial link I gave you earlier, you're exactly the target. It will take you 30 minutes and you'll be clear
 
@BenjaminGruenbaum the latter… contains function is just an example I suppose.
 
or a bound closure, for that matter
 
7:08 PM
@bwoebi readability mostly. If you have code that chains for instance this is a lot simpler - it's also conceptually a capability of the class. Sometimes extending a class isn't practical or you want to work with a scalar and it provides really nice and readable syntax.
If we look at the example from the site, contrast:
 
@BenjaminGruenbaum if you chain or nest, doesn't make a big difference, both get unreadable when too much operations are performed
 
 // abstract refs
getPlayers():map(x ==> x->character):takeWhile(x ==> x.strength > 100)
// regular
takeWhile(map(getPlayers(), x ==> x-> character), x ==> x.strength > 100)
 
class Foo { private $bar = 'bar'; public function foo() { return $this->bar; } } class Baz { public function foo() { $foo = new Foo(); return $foo->foo->call($this); }
@BenjaminGruenbaum is this what you mean?
 
It's not just collection methods that chain nicely - you can extend stuff from the outside.
 
Written on mobile...
 
7:11 PM
@FlorianMargaine I mean a syntax for allowing you to do this without the coupling.
 
@BenjaminGruenbaum still not persuaded of abstract refs
 
You've also only seen one example - there's that.
 
I'm not convinced either tbh...
 
100% of the examples seen have been unconvincing
 
OIS
array_filter(function($x) {return $x>100;}, array_map(function($x) { return $x->character;},getPlayers()))
is //regular
arg, array_filter other way around
so you basically want something like getPlayers()::map(func here)::filter(func here)
a unix pipe
 
7:16 PM
Yeah but it's really not just about collections (although it's super useful for those)
 
OIS
The point with objects is you don't want everyone adding methods to them...
 
@OIS I still vastly prefer how perl does this kind of thing. grep { $_ > 100 } map { $_->character } getPlayers()
Short, simple chaining of list data.
None of this function callback crapola.
 
@OIS as long as they're not interfering with eachother - why not?
 
None of this bullshit bizarre functional language syntax that makes me want to murder things with dull, rusty garden tools.
 
OIS
@Charles well, if you're from asia that's ok, but I prefer it like unix pipes
@Benjamin program towards an interface. if you need an object that does other stuff, make your own class implementing that interface, and all is well.
 
7:20 PM
@OIS Except for the fact that pretty much all assignment works from right to left...
 
@OIS .... how does that have anything to do with anything? You'd extend arrays into your own class just to add a really useful utility method to them overriding every method?
 
OIS
@Charles aye, but you could do $myArrayClass->map(fun())->filter(func())
 
You don't even want a subtype when you execute that sort of operation - you just want it to work.
 
if you're adding methods to a thing you're giving yourself a subtype, whether you want to call it that or not
 
@OIS True about method chaining, yes...
 
7:23 PM
@PaulCrovella the point is giving the object a scoped binding - so it is not that "subtype" to the outer world but you can treat it as such in your own code.
 
OIS
@Benjamin yes, and everyone wants to add their stuff to that object. You can do it today with binding "closure functions" to an object
 
@OIS and that would look really bad today although it's in fact a really useful ability to have.
That's all I'm saying.
 
OIS
and would you make namespaces for 3rd party "abstract references"?
 
You could do that if you'd like. A good analogy is how LINQ is implemented in F# vs how it is implemented in C# if that's something your familiar with.
The point is authors don't usually think of anything when they release a class and you don't want to alter it - subclassing is not always possible but extending from the outside is often useful. In JS land it's very common but it has a big binding scope issue (you don't want your addition to affect other peoples' code)
 
so bind a closure to it and use that
 
OIS
7:28 PM
a class should do as little as possible
@Benjamin tbh that just seems like making it more complex then simpler... maybe you need to find a better example...
 
lxr.php.net/xref/PHP_TRUNK/Zend/zend_language_parser.y#56 … isn't that %code requires {} block superfluous now?
 
7:48 PM
@bwoebi yes
 

« first day (1550 days earlier)      last day (3395 days later) »