« first day (2112 days earlier)      last day (2839 days later) » 

12:00 PM
Separate configs and define those?
 
@Fabor I don't want to have 10 files with two settings each
 
I'm just theorising.
 
When deploying an app and having it read files from your GIT repository how do you get it to read and copy some files in your .gitignore? For example Symfonys parametes.yml file which shouldn't be under VC but yet is needed by the app to run
 
@Fabor public function __construct(string $cachePath, string $prefix) vs public function __construct(array $cacheConfig)
 
@PeeHaa vs public function __construct(CacheConfig $config) to prevent too many ctor arguments
 
12:07 PM
Any reading on this concept?
 
!!? peehaa's random shoutings
 
Search for "peehaa's random shoutings" (https://www.google.com/search?q=peehaa%27s+random+shoutings&lr=lang_en)
• whats that sickness that people just start shouti… - It can involve shouting out words, tics, or, in the case of one of my students, he starts giggling… (https://answers.yahoo.com/question/index?qid=20080205191739AA8iMOS)
• The Random Yelling Guy - YouTube - (https://www.youtube.com/watch?v=LawC4m8yeJU)
• Klazomania - Wikipedia, the free encyclopedia - Klazomania refers to compulsive shouting; it has features resembling the complex tics such as …..… (https://en.wikipedia.org/
 
Nope didn't post my ideas yet :P
 
Wait, am I doing constructors wrong? function JsonDatabase($path = null) { is that equal to __construct?
 
@CelestialDragonofOsiris nope
It's the reeeeeally old style of ctors
 
12:11 PM
19
A: Is a single config object a bad idea?

KramiiI don't have a problem with a single config object, and can see the advantage in keeping all settings in one place. However, using that single object everywhere will result in a high level of coupling between the config object and the classes that use it. If you need to change the config class y...

 
Assuming your class is named JsonDatabase
 
Old style constructors are DEPRECATED in PHP 7.0, and will be removed in a future version. You should always use __construct() in new code. So it's old style mentioned here?
 
yes
 
Thought's on that answer @PeeHaa?
 
user895378
@DaveRandom I still contend that a "safe for work" giphy is a unicorn startup waiting to happen.
 
12:13 PM
Where's the high res version of your avatar @rdlowrey? No reason....
 
@rdlowrey sfw + non-crappy search (or at least, better for single word terms)
 
@rdlowrey have you seen the ping from Niklas about Auryn?
@Fabor … or you do proper separation of the abstractions and pass the individual config options forward manually. Or use a config array, which would be my recommendation [at least outside the anyway tightly coupled parts].
 
lata' guys
 
Anonymous
o/ stranger.
 
Thanks @bwoebi
 
12:24 PM
@Fabor I am not a big fan of some object that contains eveything and its mother
 
@rdlowrey you can set the PG rating in the giphy api. jeeves is set to pg13 because SO ToS
 
@PeeHaa I'm thinking maybe it wouldn't be the worst idea to just make a wrapper class that interprets the config file and exposes the options. Since it's gonna be in the auto include I won't have to worry about including it... thoughts'
 
@PeeHaa SimpleJsonElement + SimpleJsonXmlElementBridge
 
@PeeHaa Nothing could contain your mother.
 
12:33 PM
@PeeHaa So what I am learning is there's no silver-bullet here.
 
@Fabor the problem with an array as config is that you will not know what params the configured class requires, hence its better to make the params explicit or wrap an interface around them.
 
Second vote for interface wrapping
 
I also like the idea of interface wrapping, but I think the site im working on is just too small for the effort, and it still doesn't make it available on all pages, so I'd still have to figure out how to automatically include it...
 
@Fabor That's the case for most things in our business
 
12:41 PM
@Fabor That's the same thing as define()
 
const is inside a class
 
excl namesapceing
 
@PeeHaa nope, it has a namespace
 
@PeeHaa but cooler
 
25 secs ago, by PeeHaa
excl namesapceing
Wasn't it written down clearly :P
;-)
!!urban sapceing
 
12:42 PM
whatchoo talkin bout willis
 
booo
@CelestialDragonofOsiris So?
 
@PeeHaa nvm that, I'm just being stupid again
 
@Gordon
!!urban jimbo
 
[ [jimbo](http://jimbo.urbanup.com/4278226) ] 1) Regurgitated cum bubble that is generally blown through a male's nasal passages.

2) Refers to an unintelligent, moronic neanderthal that finds humor in himself when others do not.

3) A male or female who receives great levels of gratification from touching "tra-la-las"
 
@Fabor This is how I wire up config stuff:
function createLibratoConfig(Config $config) {
    return new LibratoConfig(
        $config->getKey(Config::LIBRATO_KEY),
        $config->getKey(Config::LIBRATO_USERNAME),
        $config->getKey(Config::LIBRATO_STATSSOURCENAME)
    );
}

$injector->delegate(LibratoConfig::class, 'createLibratoConfig');
/also, cleanup aisle 11 please...
 
12:44 PM
Danke Danack.
 
Actually, because we don't have function autoloading, I stick all of those in an 'App' class.
Also, possible of interest: packagist.org/packages/danack/configurator
 
Danke again.
 
@Jimbo I told you not to
 
@Danack $injector->delegate(LibratoConfig::class, 'createLibratoConfig'); Can you explain what this does, please?
 
It tells the injector "when something needs a LibratorConfig object as parameter, then call the function named 'createLibratoConfig' and it will return an object of that type."
 
12:48 PM
ok, thanks
 
@Danack Did you submit for PHPNW?
 
In effect it allows lazy instantiation of everything.
@Jimbo I did......it turns out I now have a spare ticket for the conference.
 
@Danack Yay, me too, and I also have a spare ticket ;-)
 
Current emotion state:
 
Why? You'll get refunded as a speaker
 
12:50 PM
Nerves. Also means I need to do a lot of practice on the talk.
 
This is when we find out you guys are talking at the same time. And you will find out where the room 11 attendees loyalties lie.
 
Anonymous
xD
 
@Danack Go for it, we're all rooting for you. Happy to be a practicee if you require
 
@Fabor If that happens, I think I'll attend Jimbo's talk.
 
@Fabor I wanted to leave my talk and go and listen to Andrea's
 
12:51 PM
lol
@Danack You can do some usergroup ones in prep?
If you're nervous, just picture yourself naked.
 
@Fabor umm, you are supposed to picture the audience naked or sitting on the potty
if you picture yourself naked the anxiety might even get bigger
 
Anonymous
@Leigh Did you submit a talk for NW ?
 
@Fabor yeah...I've given it twice before. The first half has gone great both times - the second half needs 'work'.
 
@Danack PHPSC looks for speakers often enough if you wanna make the trek down. Maybe rope @JoeWatkins to come watch.
 
@Danack Is it a DI one?
 
12:53 PM
@Danack @Wes @Wes @Wes
 
@Gordon Depends who is in the audience if you ask me. Maybe both is best. Everyone is naked.
 
Anonymous
@Jimbo @Wes @Wes @Wes
 
@Jimbo At the risk of spoilering it: docs.basereality.com/InterfaceSegregationLong/#
 
Nice!
 
@Fabor now imagine @rdlowrey is in the audience
 
12:55 PM
lol the beard slide.
 
/nipple rubbing intensifies
4
 
@Gordon Too distracting. I'd lose all composure.
 
@Gordon On that front, I'm hoping to get enough knowledge on Amp that I can provide examples from that as well as React during the talk
Some nice publicity for him again
 
@Jimbo If you have questions ask me
@Jimbo when is your talk?
 
12:58 PM
@bwoebi End of September
 
@Jimbo May well be that by that amp v2 is out, based on async-interop/event-loop and async-interop/awaitable
 
@bwoebi I can just mention that, but I need to sit down and get a web socket example working with synchronous, I/O blocking / time consuming code offloaded somehow. So looking at what bindings AMP provides... I see process, which might work, any ZMQ libs?
 
@Jimbo @rdlowrey always wanted to write an ampq lib, until now there's only beanstalkd (and redis, but that doesn't count as zmq)
 
Beanstalkd is good, so basically shove it off into a queue and when the queue's done the result can be injected back into the event loop?
 
@Jimbo that's the point?
 
1:02 PM
@bwoebi Yes yes, I'm just making sure I'm describing it correctly! :P
BUT, in order to put it into a queue, say, using React, I'd have ZMQ listening ready to accept data back into the event loop itself, and I'd still use a queue like beanstalk
But Amp removes the need for the message transport with this beanstalk lib?
 
@Jimbo TBH, I'm not very knowledgeable of that library, just look at the public API in github.com/amphp/beanstalk/blob/master/src/BeanstalkClient.php
 
It needs docs :P /cc @kelunik
 
@Jimbo wrong cc
 
Kelunik
 
you need to cc @kelunik on that note
 
1:05 PM
kelunik
cheers
 
It's really just very small docs needed
As public API is quite small
@Jimbo but TBH, looking at that BeanstalkClient.php already tells me all I need to know.
 
I haven't played with promises in a PHP context for a long time, but I see they return an Amp promise
say "put"
 
@Jimbo well, otherwise it wouldn't be an async lib… :-D
 
@bwoebi Yeah I guess, that's where my knowledge ends. I'm used to throwing it off into a worker and ZMQ handles the response which gets sent to onWhateverMethod() in your event loop when it's done. The actual work is separate (worker) and synchronous. See this
No promises anywhere
 
1:11 PM
got my own first vps \o/
 
@Jimbo The promise is just an interface for specifying a callback upon resolution basically. It's maybe not called promise, but there is still the concept of callback calling upon resolution/event.
 
@bwoebi And whatever I put in that callback, even if I write sync code in it, like a sleep, is handled asynchronously and doesn't block the event loop?
 
@Jimbo well, you need to put non-blocking ops into it.
it's not threading.
 
Speaking of which, I did see a threading something in ampphp
 
@Jimbo let it RIP. @Trowski is working on a better library (amp/concurrent)
 
1:15 PM
I'm merely thinking in time for the talk ;)
 
@Jimbo that depends on @Trowski :-)
 
@Gordon I love that shit
 
photorealistic art
 
Speaking of promises: youtube.com/watch?v=llDikI2hTtk
 
1:23 PM
I'm giving up, can't find the symbol for the moment.
I think I need some screenshot first.
 
These are ridiculous.
 
Fabor is suit is worth watching?
 
Yeah
 
1:42 PM
hoi!
 
> the JSON file tells JDSL to look up those revisions of the JS file to find what functions are available
… wait … a … second … just … one … single GODDAMN SECOND
 
Anonymous
Well the ending was pretty disappointing
 
i been granted credit to use on your DigitalOcean account for $10.00. they have taken my card details at which point or time they will deduct money?
 
Yeah, no karma. (yet)
 
@AnmolRaghuvanshiVersion2.0 Credit or debit? There's a difference
 
1:47 PM
Tom managed to tightly couple his employment to the code base.
 
i used promo code while registering
email i got is:
You’ve been granted credit to use on your DigitalOcean account for $10.00. We’ve updated your balance
 
@AnmolRaghuvanshiVersion2.0 Sounds like they took your card just in case you overrun that credit
 
@Ocramius My little brain started to hurt.
 
@Machavity ah in which case i will overrrun my credit
 
Only if I could fix "Eliminate render-blocking JavaScript and CSS in above-the-fold content" :(
 
2:00 PM
how can I debug "too many redirect"?
 
guys i'm getting really weird behaviour when i run json_decode($str, 1); on the following string: {"logins_days_since_last":">14","logins_days_since_last":"<21"} i'm expecting an array with 2 entries but i only get 1 element in the array and it's "logins_days_since_last" not entirely sure why and i have never come across this issue before. is there something wrong with the JSON?
JSONlint.com says the JSON is valid. So it's not aht
ahha, i think i know what the issue is, i'm asking for ASSOC so it's probably overwriting it right?
which is why i only get "<21" option (the second one in the string)
 
@Andy Asked and answered ;)
 
@Ocramius omfg
 
damnit, so, any idea on what i should do? i need that string and need it to be decoded.
with the 2 elements
 
2:06 PM
@Machavity are you going to improve it? stackoverflow.com/documentation/proposed/changes/… Or shall I outright reject it for suboptimal practice?
 
@bwoebi I'll tinker with it in a bit
 
@Machavity if you plan to, please retract in future so that nobody can approve/reject it in the meantime.
 
@bwoebi I think it's retracted now
 
@Machavity yes, now
@NikiC should we perhaps allow for '(' expr ')' in class_name_reference? (In lang parser)
 
@bwoebi Yes, but I think we already agreed that such things should always happen in middlewares?
 
@Machavity stackoverflow.com/questions/13075143/… < i was right. Damnit!
 
@Andy Real men manually build their json :P
 
;)
 
@kelunik uh, did we? Well… AFAIK, starting response on status setting would be enough?
 
@bwoebi Not starting the response, but not executing any more handlers.
 
2:20 PM
yeah, that's what I meant…
 
@bwoebi Why not be consistent and do it on header setting as well?
But yes, status should definitely do, otherwise it's executing more handlers.
 
@kelunik counter example … I want to set 201 Created by default on PUT requests. Handlers shall be able to set their own status code as necessary. How would I do that?
 
@bwoebi Don't. Setting default status codes is bad. Default should always be 404 there as well.
 
But I strongly agree that it should not generate a 404 in case we altered the Status
@kelunik default is 200, so that you don't have to set the status on each of your responses (which is reasonable)
 
@bwoebi As long as you add a response body, yes.
 
2:27 PM
@kelunik this would break HEAD requests.
 
@bwoebi It's how it currently works?
If you do just nothing, your request will result in a 404, not 200.
 
oh, misunderstood you.
yeah, that's fine.
 
user895378
2:50 PM
@bwoebi I have not. Link?
 
3:02 PM
yesterday, by kelunik
@rdlowrey Maybe you can give @DaveRandom / @Danack / @bwoebi / me collaboration rights for Auryn, so we can close some of the issues?
 
@Ocramius it is absolutely terrifying
 
@tereško why? looks like a perfectly valid way of building something..
NOT!!! also mornings
 
Anonymous
O/
 
3:17 PM
re
 
@RonniSkansing you here?
 
hey anmol
 
@PeeHaa You maintain strict hours?
 
@Fabor Invoice wise or internal wise? :)
 
3:29 PM
Oh you charge hourly? :P
 
@Fabor Depends on the project
 
You try to work 9-5 though?
 
9ish - at least 5 mostly
 
also, what's happening with all these jokes about bars and tables, is it the 10k day frenzy seizing everyone?
 
3:44 PM
not sure if you guys are into that kind of shit but... these are really impressive glass players
 
I always find it weird for people to learn to play odd instruments.
Like the PVC Pipes
Granted I love that sound -_-
 
:)
nive, those pvc really rocks
after getting out of the musical professional trade because gaining money is actually hard... I can understand the urge to do things that may make you a little bit different to get gigs
 
Suppose he can always become a plumber if it doesn't work out.
 
How often do you guys expire your secrets like DB credentials?
 
3:57 PM
when I die.
 
:P
 
@Fabor Yeah ain't nobody got time fo dat
 
@Fabor my db credentials are well known
I don't even have a password
and username is "user" because lots of software is broken is you don't supply no username
 
mo r n in
g
@Fabor rotate it all the same
Else untrusted or previous workers have access
 
or better: use iptables rules
 
4:10 PM
oh.. tell me moar, like for internal accesss?
 
only allow incoming 3306 from 127.0.0.1
or wherever php is running
 
Anonymous
iptables is the way to go, but I would still have a password
 
@Fabor Saw this a few days ago: youtube.com/watch?v=-0gED3rn2Tc
 
@FlorianMargaine yea, internal is way to go but it also opens up vectors.. but I guess any route does that ;)
 
@FlorianMargaine So every machine on the internal network has free access to sql?
 
4:14 PM
coughssrfcough
 
@PeeHaa no, 127.0.0.1 is loopback only
 
Are your database servers on the same machines as your e.g. webservers?
 
So no loop back address?
 
I just use another IP address, but the idea is the same
 
4:16 PM
Yes so every machine on the internal network has free access to sql
 
yeah, I just put the IP address of the php webserver
@PeeHaa no, I put the IP address of php in iptables
 
and how does that prevent any application (malicious) or otherwise from accessing the db servers?
 
@PeeHaa ???
 
Just trying to figure out why you think that iptables makes user+pass obsolete :)
A.k.a. am I missing something here?
 
@PeeHaa I don't understand how iptables is less secure than user+pass there
 
4:21 PM
You have one user (without even a password) and you have access to all databases
You don't see anything wrong with that?
 
ah
there's one database per php application
there's one database server per application
 
ooooooh :)
Knew I was missing something :)
 
ugh… why does (*SKIP) not work in lookaheads :x
 
@bwoebi not {}?
 
@NikiC for arbitrary expressions
 
4:25 PM
@bwoebi yes. it should be new {expr}() not new (expr)() right?
according to the usual convention
 
but {expr} is only for vars only?
or where do we use {expr} for anything but vars?
 
@bwoebi it's for "names"
 
ah, mh
 
$this->{expr} $this->{expr}(), self::{expr}() etc
 
any idea how Edge/Chrome works with redirection?
In FireFox, my website works fine. On 2 others, I have a "too many redirection.."
 
4:30 PM
new ${!${''}=foo()}; best thing ever :)
 
@NikiC yeah, okay.
 
so... I'm at a sort of "speed dating for companies" event
kinda embarassing
 
@Jean-philippeEmond dont do that many redirects
you sure your not doing infinite redirect?
 
4:45 PM
dunno.. ^^
 
Then maybe you dont wanna know how a or b works with redirect
sounds like its more of a config/code thing
 
yeah I guess but its just because guys here can help me with my wp stuff :P and I asked my question into the WP exchange site and I got an answer..but I got this msg after installing this code.. well.. just to be sure .
 
can i create multiple sessions in putty?
 
I dont think you need wp help, I just think you need to get into debugging
 
4:53 PM
@AnmolRaghuvanshiVersion2.0 yeah, just start another putty
 
stackoverflow.com/a/38642146/2153758 … sorry that I'm promoting it here … but PCRE regex is quite awesome :-D
 
Anonymous
@AnmolRaghuvanshiVersion2.0 better try conemu then.
 
Anonymous
@bwoebi downvoted as evil
 
:-P
 
@bwoebi That looks too complicated for that problem
 
4:59 PM
@NikiC feel free to do it better … At least if you want to be really dynamic…
 
@bwoebi yeah its badass, but i think its way to much XD
 
The more constraints you have here, the easier the regex gets
 
that picture
lol
 
lol
took me a moment to realize it's unserialize^^
 
ah glad I am not the only one to think thats funny
 
5:02 PM
@RonniSkansing s/am/am not/? :-D
 
lol =p
You probably already noticed.. dunno why, but when I write... not code.. but like chat.. words just vanish. Like I was sure I wrote the full sentence, but on review. .. lol, If you hadnt said it, I wouldnt noticed that I just said the opposite of what I wanted
 
@NikiC regex101.com/r/hS3aI4/1 … Is there any any way to make it work how I intended? i.e. that I can control from the first match that the foo in the middle does not get matched without including any other characters in that first match?
 
@samayo @FélixGagnon-Grenier thanks :)
 
5:57 PM
@bwoebi @Jimbo Basic docs are done now: amphp.org/docs/beanstalk/reference.html
 
@kelunik good job :-)
 
I wish we could generate the API reference automatically in that format.
 
can someone update the ? wiki.php.net/rfc/session-use-strict-mode is not in vote
 
!!rfcs
 
6:05 PM
@Ocramius Done.
 
hmm, still there
weird
 
@kelunik so, you have to run reserve() in a loop in the generator, right?
 
RFC page out of date then probably.
@bwoebi Dunno, probably.
 
@kelunik dunno? well… you wrote it? :-P
 
@Ocramius Status says voting.
@bwoebi Just look at the protocol. But yes, I guess that's it.
 
Anonymous
6:08 PM
@PeeHaa prong
 
@kelunik well… you typically write documentation so that you can hide the underlying layers (code, protocol) from the user…
 
@bwoebi Anyone working with Beanstalk will know what it is.
I won't replicate the whole Beanstalk docs.
 
@AnmolRaghuvanshiVersion2.0 Happy Prebeccaday!
 
6:26 PM
@kelunik yeh, but voting is closed, weird
 
@Ocramius then fix the status^^
 
@Ocramius Just edit it or write an email to yasou.
 
Done
 
6:43 PM
@DarkBee - exactly. If PHP could jump forward in time, it could intermingle with JavaScript. Think of the beautiful children they could produce! — devlin carnate 8 mins ago
 
heh. I was just now working on some kind of frankenstein with a react frontend calling a php api
 

« first day (2112 days earlier)      last day (2839 days later) »