« first day (2139 days earlier)      last day (2806 days later) » 

2:00 PM
Mu? will check it out. I need something small, and mu seems to be small. I am also using "fatfree" framework, is also small (~300k) and has all on board.. routing, db, views..
 
somewhat lol
 
@blackhatmario or just go and get through these materials: stackoverflow.com/a/16356866/727208
 
@blackhatmario I'm kidding (guess it was too subtle). You probably don't need MVC either
 
@tereško yeah.. know most of it already.. I wish my coworkers would know what unit tests are.. or clean code.. or comments. ;)
 
you mean //increment $i?
 
2:05 PM
@Machavity LOL, that's actually not bad for 4LOC
 
@blackhatmario then, can you explain in your own words the single responsibility principle ?
(I will take it as "no")
 
that's like when you go away to college and your asshole parents make you pay your own cell phone bill.. gosh
 
nope.. don't need it. If something needs to be changed, I do it.
don't give a f.. about priciples.. what matters is the output.. and clean code of course.
 
:( I was hoping to see a first case of someone saying "I know all of it", and that it's actually true
@blackhatmario do you realize srp is actually a great way to write cleaner code?
 
not really.. but I am ready to know.. no one is perfect ;) will check it out
 
2:12 PM
@bwoebi Ah, yes... I was trying to fix the circular dependency issue with file depending on parallel and parallel depending on socket which depends on file...
@bwoebi Combination of not waiting for a listener before emitting values and deferring the start of the coroutine in Emitter.
 
@Trowski Ah okay. I've left a few comments on the other commits
 
@bwoebi Yep, I replied to them already.
I never did manage to solve the circular dependency issue.
 
Ahh, don't we all love credentials in repos \o/
 
No idea what you mean, I've certainly never accidentally committed private keys to github or anything like that. No sir. Not me.
 
it's true, that was on purpose.
 
2:19 PM
Just basically what you'd normally keep in config files and such.
 
Ash
hey guys, does anyone know any good articles on how to get started with good practice for PHP architecture in a dynamic site / web app?
i thought there would be millions but google is failing me
 
There are millions of articles, almost all of them are terrible
 
!!? good practice for PHP architecture
 
Search for "good practice for PHP architecture" (https://www.google.com/search?q=good+practice+for+PHP+architecture&lr=lang_en)
• PHP: The Right Way - An easy-to-read, quick reference for PHP best practices, accepted coding standards, and links to au… (http://www.phptherightway.com/)
• PHP Best Practices: a short, practical guide for… - 21 jun. 2016 - It's an attempt to compile a set of basic instructions for what can be considered be… (https://phpbestpractices.org/)
• PHPBuilder - Top 11 Best Practices for PHP Develo… - 20 jun. 2014 - Right from its inception, PHP was widely used to develo
 
First hit is a good reasonable one
 
2:21 PM
:D
 
17 hours 38 minutes to go.
 
Aug 19 at 12:23, by tereško
http://www.phpthewrongway.com/
 
@Fabor You are gone tomorrow?
 
No, to make things seem faster I am only counting working hours.
 
despite the name, that also actually has some good info in it @Ash ^^
 
2:22 PM
is it just me, or US media is imploding? reddit.com/r/politics/comments/4zb5wd/…
 
@Fabor :P
 
@tereško lolwut
 
Ash
@jeeves cheers! yeah it might be a little beyond me.. was more looking for something that would just layout a super basic structure for building a dynamic site.. as in keeping seperate php files for header, footer etc.. parsing URL on single file and then loading in seperate files for specific content etc
the whole concept of dynamic pages is still a bit alien to me to be honest
 
That Jeeves guy is always so helpful.
 
@DaveRandom keep in mind, if a campaigning politician has a book, he/she will hand it out as candy in rallies (fact that media is trying spin it, make me really really scared for "what will happen when this election cycle ends")
 
2:24 PM
@Ash If you're in the super early stages don't worry so much about getting it right and focus more on getting stuck in.
 
Ash
@Fabor and i think i just realised he is a bot :S
 
There's a proverb...
 
!!is Jeeves always so helpful?
 
> Lose your first 100 games quickly
 
2:24 PM
maybe we should put @Jeeves in charge of guide.room11.org
 
oh ffs, doing it right now
 
lol
 
fix the blog too -_-
 
I'm sort of a bit apprehensive about creating a new vhost on @PeeHaa's server than actually does useful stuff but I will just jump in a break shit
 
2:25 PM
I'm going to post all my migration photos there.
 
Ash
haha im so confused lol who is real??? :P thats a good point though @Fabor , im only making this thing for fun so i might as well just hack it together and see what happens
chances of ending the world are minimal
 
@Ash Yup. Build it over and over and over and over.
 
@DaveRandom As said just do break it
 
!!is Jeeves blue elephant
 
Ash
2:27 PM
is jeeves real?
 
yes, no
 
Define "real". Are any of us actually "real"?
 
depends on your definition of "real"
 
Anonymous
What is life?
 
Ash
hmmm my mind just exploded a little
 
2:28 PM
Baby don't hurt me.
 
... queue bohemian rhapsody again
 
Anonymous
11 is in Friday mode
 
Ash
maybe we are all just dreams inside jeeves head
8
 
Ekn
"granted"
 
2:30 PM
:8080
 
Well, now I have to listen to that song.
 
there's also github.com/PatrickLouys/no-framework-tutorial, I forget how good it is but it had contributions from a few people in this room @Ash
 
I'll do you all a favor and provide a link
 
2:32 PM
lol. I miss classic Jim
Miscellaneous Jim Carrey Sentence, He did a cover of The Beatles - I am the Walrus which I actually like.
 
more for the runtime, but he's a bonus
 
Ash
ah cool cheers @DaveRandom. Looks like some handy stuff in there. The more I read, the more i realize i dont know!
 
It's more like opening doors.
 
@Ash Hi! Welcome to life. We're sorry. You'll get used to it.
 
> there are known knowns; there are things we know we know. We also know there are known unknowns; that is to say we know there are some things we do not know. But there are also unknown unknowns – the ones we don't know we don't know - from the existential poetry of Donald Rumsfeld
 
user895378
 
user895378
not having an options array in those parameters is a big API mistake
 
user895378
This is me making a sad face
 
@DaveRandom Hello Sorry. I'm Félix. Do you mind if I just call you So?
 
user895378
We've already spent countless hours figuring out the right APIs for these things. Please don't let one well-meaning but misguided comment derail that ...
 
@rdlowrey Just to clarify, why do you need a watcher disabled at start and cannot disable it only in the next line of code?
 
2:36 PM
Good morning
 
user895378
@bwoebi because that's dumb
 
user895378
But beyond that it's a bad API not to support options about which we don't yet know.
 
@rdlowrey Let me disagree.
 
user895378
18 secs ago, by rdlowrey
But beyond that it's a bad API not to support options about which we don't yet know.
 
Ash
@DaveRandom haha its all good fun
 
user895378
2:37 PM
That's how you end up with APIs like this: php.net/manual/en/function.stream-socket-client.php
 
So today I got to create an interface to search our pirated content db. This would be so easy to use to find stuff -_-.
 
@rdlowrey ...the irony there being, it always looked like that :-/
 
> Incur extra fcall overhead just because (slowest thing you can do in php)
@rdlowrey ^ not really. Doing array checks is also a cost
 
@Fabor I trust you used this in the logo
 
user895378
@bwoebi it's not about cost. It's about the right API design to accommodate change
 
2:40 PM
@rdlowrey Then do not include that in your argumentation :-P
@rdlowrey This is literally the only point I'm willing to debate about
 
user895378
It's stupid to create something in an active state and be forced to immediately deactivate it. That's a failure in the design of the creation API.
 
Have anyone used Atom for php-src? Which package should I use for autocompletion? atom-ctags seems to be not working due to a known issue
 
@rdlowrey a) it's a relatively rare case and b) it's creating it with enabled state. Not activating it. Activation only happens in next tick if still enabled, c) I do not think this is a failure in the API design.
 
user895378
It's not just that one thing.
 
user895378
There are other potential options we don't yet know about.
 
user895378
2:45 PM
By having a parameter there at all we're admitting there are other valuable options for watcher creation.
 
@bwoebi that's still stupid
 
@rdlowrey The plan is to release new majors if that's the case.
 
user895378
We're just dedicating an entire parameter to one and presuming there should never be others.
 
can you, like, strive to never have a new major version?
 
user895378
But when you build an API that allows non-breaking changes you don't have to and everyone isn't forced to update their code.
 
user895378
2:46 PM
the one thing php-src gets right is the avoidance of BC breaks whenever possible.
 
"right"
 
user895378
We should create APIs that make it easy to avoid BC breaks.
 
I.e. if there should ever be others, we anyway need a new major version. Because we're providing the interface and all implementations of it will break as they do not handle the new option properly
even if it were an array
 
user895378
There shouldn't ever be 4 parameters.
 
user895378
You're doing it wrong if so.
 
2:46 PM
I agree on that.
 
user895378
So the only way to correctly support that in this API is array $options = [] at parameter 3
 
user895378
we're not supporting interop in this particular function API, we're preventing vendors from doing cool things.
 
> Vendor specific options arrays defeat the purpose of interoperability. If code depends on an option provided by a certain loop implementation, then we're back to the same place we are now where libraries only work with a specific event loop.
^ quoting @Trowski in that thread
 
@bwoebi hey, I got a vibrating pad that you can plug on your phone. Delivery is for tomorrow... I'm expecting it.
 
user895378
@bwoebi that's wrong
 
user895378
2:47 PM
the important interop still works.
 
user895378
Options are optional. By definition
 
user895378
Requirements are what must be interoperable
 
@FlorianMargaine for waking up?
 
@bwoebi ya
 
user895378
There's nothing wrong with saying all implementations must support $options["callbackData"], for example.
 
2:48 PM
Hmm, I've got an interesting discussion going on here: security.stackexchange.com/questions/134397/… Does is_uploaded_file even make any sense nowadays? I can't really think of any use cases that makes it add any real value nowadays.
 
@rdlowrey so, if my code wants to use a vendor specific option, it will just break if I put any other loop impl behind it
 
user895378
Anyway, don't have time to argue. Need to code. But I don't like that API for the reasons I've mentioned.
 
user895378
People can agree or disagree but I have no other color to add. I'll immediately disable upon creation for now.
 
@rdlowrey I want it to be argued. Your input is helpful in recognizing eventual errors
 
user895378
And hope other folks eventually agree :)
 
user895378
2:50 PM
I don't have time to argue. It doesn't prevent me from doing what I want, just makes it uglier.
 
@rdlowrey Even if others agree, I still want to understand why.
 
user895378
Code now ;)
 
@DaveRandom lemme guess. Your read the title and didnt actually think it through :)
 
@rdlowrey Feel free to explain it to me anytime else then ;-)
 
@tereško Actually what struck me was the "the F.E.C. stated that the practice was allowable..." quote
because it really does not seem like it should be
 
2:52 PM
not sure why - I get the "you cant get royalties for this", but how would it be illegal, @DaveRandom ... it's kinda like, using your own catering company. Besides, if you hand out some book in rallies, it meas that you endorse it's content.
 
@bwoebi given that it uses mcrypt and is not IND-CCA3 secure, I'd suggest severe modifications if it were approved
but I sadly don't have the free time for that right now
 
@PaulCrovella it is indeed tempting.
 
user895378
@bwoebi I've updated my comment. It contains all my logic. Feel free to comment there if you want to discuss further.
 
... picking some some book from a different republican would have a way to backfire really hard
 
> "and so long as the books were not resold or given away to people who had not made donations"
I'm sure they are checking that people have donated
 
2:56 PM
is any politician?
maybe they get sent to people who donated by mail .. who knows
 
Ahh yes, the "but everybody does it" defence, that makes it totally fine
 
it's not like he would buy them to make a "TinyTrump tower" in a yard
@DaveRandom yes, everybody does is, so there is a way to make sure, that only people who should get books are the ones taht actually get them
 
Hello folks, can I have a little help with my apach2 setup; I am a linux user, just starting to learn a little php; having a bit of trouble getting the configuration right.
Would appreciate a hand with this if possible ...
 
@Oldskool github.com/php/php-src/blob/… and github.com/php/php-src/blob/… (uses OS level temporary file functions where available)
 
@iain you have to install mod_php and enable it in httpd.conf
 
2:59 PM
@Oldskool is the check done on the file name or a hash of the file itself?
 
@tereško Ok, thanks por the pointer, I'll go check that out ...
 
@PaulCrovella See second link above
 
ah, ty
 
GetTempFileNameW on windows, and mkstemp where available
 
@ScottArciszewski whenever you get a few mins rime - there's nearly nobody who can do that :s
 
3:02 PM
Heh, MCRYPT_BLOWSHIP
 
Go Mutex handling is fun... Doing it in PHP is much nicer being single-threaded............
 
heh, that linked document:
STATUS:
Approved by Elias Nicolas
Approved by P0lT10n
Rejected by Leigh
For the record, my reasoning:
* This is an important subject, too important for minor details to be incorrect.
* This document is opinionated and gives a specific implementation for a very broad subject.
* It recommends the use of an unmaintained (and as of PHP 7.1, discontinued) extension.
* Using CBC mode without an some kind of integrity assurance is insecure
* The example code actually provides an oracle that can be exploited.
And that was my 5 minutes worth
 
I want to rewrite http://vivule.ee/api/game/2 to http://vivule.ee/vivule/api/game/2
In the htaccess file I use this rule "RewriteRule ^api/(.*)$ /vivule/api/$1 [NC]"
But when i go to http://vivule.ee/api/game/2 incorrect content is displayed (as if no rewrite happened at all)
 
@ScottArciszewski mcrypt itself doesn't respect open_basedir when opening the fd to /dev/urandom. So your userland check can fail even if mcrypt can open it just fine
 
@Jimbo this will hurt, won't it?
 
@tereško Not yet, but it may do within the next few hours
 
I will check tomorrow then :D
there is nothing I can say on the subject, because "it depends" is not what he expects
 
that's when he replies "on what" and everything goes down the toilet
 
since when does fb run uploaded images through image recognition. I just realized images have alt attributes and they are scaringly good
 
3:20 PM
since years ago I believe
they've been doing face matching for a very long time now, at least
 
oh boy!
 
@Leigh I thought the opposite was true. People complained when we didn't have the urandom check before attempting mcrypt_create_iv()
 
I get to set up a shiny new web server!
 
@PaulCrovella face matching, yes, but the alt texts say stuff like "motorcycle, 1 person, outdoors"
 
@ScottArciszewski Looks like it just straight up uses open() github.com/php/php-src/blob/…
Also, why is it still in master? :)
 
3:24 PM
haha :P
 
When is RC1 due? Are you going to get it removed on time?
If not feel free to poke me and I'll do it
 
@Gordon dunno, I'd guess that's trickled in along the way - natural growth from face matching.
 
Anyone else get an email regarding "How do you use Facebook mention-bot?" @PeeHaa @DaveRandom?
 
Nope
 
user895378
@bwoebi presumably the interop spec says nothing about whether callbacks that return generators should be auto-resolved the way the are in amp? I assume we'll have to do something like this example instead:

Loop::defer(coroutine(theActualFunctionIWantedToUseAsTheCallback()));
 
3:30 PM
Last message I got is
> @SjonHortensius, thanks for your PR! By analyzing the annotation information on this pull request, we identified @DaveRandom and @PeeHaa to be potential reviewers
 
user895378
(which is what I wanted to do originally anyway lol)
 
user895378
but I gave into peer pressure
 
user895378
That's a fundamental break of a lot of existing amp code if so
 
user895378
And I'm not sure it would make sense to have the interop spec require auto-resolution of generators as coroutines
 
does this page work for anyone? microsoft.com/web/downloads
now it works
nevermind
and now it doesn't, wtf is going on
 
3:40 PM
Having only eaten a 5/7 banana, I feel this way too.
 
I had soylent for breakfast
and a chocolate pastry
the thought of food: meh
 
Sorry if this is the wrong place to ask, but does anyone have a good resource for creating a simple admin page? I keep finding out of date examples or ones that don't explain what is happening. Thanks (new to php!)
 
@JonHerbert could you elaborate a bit more on what you want? What's this page supposed to administrate?
 
@rdlowrey that's why we still have \Amp*() wrappers (e.g. \Amp\delay())
 
user895378
Yeah I think requiring coroutine() is the right approach
 
3:52 PM
basically i need to log in as admin and write to a json file and thats pretty much it, so i know i only need at max 1 database 1 table and 1 user that can be inputed manually, so no need for a registration process or anything.
 
@rdlowrey Issue there is coroutine failures are ignored.
Amp\*() functions forward fails to the loop error handler.
 
^ yep
 
user895378
yeah so how do we solve it?
 
@JonHerbert You may just as well have a password backed submission to add to that json file.
 
@rdlowrey Amp\wrap() is another option.
 
3:53 PM
do you mean do it client side instead?
 
user895378
@Trowski jackpot
 
user895378
+1
 
No. I mean a page where you add to the json file but also require a password for it to go through and actually change that file. A password verified server side. (As well as a few other security features)
 
user895378
First world problem: the cleaning lady showed up an hour early this morning and woke me up.
 
@rdlowrey Which is exactly what Amp\defer() would have done.
 
3:55 PM
@rdlowrey but if you want to just use Loop::xxx() funcs, use\Amp\xxx() instead.
 
@rdlowrey On purpose I reckon.
 
Oh i see! Thanks Fabor, I can see how that would be simpler
 
user895378
On the bright side, it spurred me to just go for a two-hour walkabout in the city.
 
Anonymous
@rdlowrey she just wanted to see you sleeping
 
@rdlowrey I hate that... don't they understand that 8 am is far to early for coders who stay up until 2 or 3 am writing code.
 
user895378
3:56 PM
Exactly.
 
Is it awkward to sit in your apartment while someone cleans it? I feel like it'd feel a little awkward.
 
user895378
It would be weird. That's why I went on a walk.
 
user895378
I walked across the Williamsburg bridge for the first time.
 
Well, silver lining is good.
 
user895378
 
user895378
4:02 PM
@Trowski @bwoebi can we require 7.1 ? :) :) :)
 
user895378
So I don't have to keep doing this? :)
 
Hahahaha :-P
 
user895378
It's okay, I can keep doing it. 7 makes more sense a requirement
 
user895378
Even though I would love to use : void return types too ...
 
4:05 PM
halp
I have an MVC-ish broblem
I am rendering a report-table which has optional hidden columns
 
Good. Now try MVVM instead. It solves all your MVC-Problems!
[and adds tons of other errors]
 
it would be make sense to keep the list of which columns are hidden in a config file , which is loaded and then altered based on user input
the problem is: how the fuck do I get the adjusted config to a template
the "stupid solution" is to have some magical service, which is there only to keep the state of config (but I really dont like that option)
 
@Fabor wut?
 
ideas?
 
ViewModel?
 
4:09 PM
please, try being just a little bit serious
 
:P
Honestly don't see anything wrong with a service
What's the problem with it?
 
Is there any problem with injecting part of your configuration, that is related to hidden columns, to your view?
 
@nikita2206 the default config has to be enhanced by user input
(I need shit from $request to know if there are any other columns hidden or made visible)
... or I could move hat config purely to frontend
 
@tereško so you need to merge what was injected through controller and what was injected in your render method
 
kinda, yes
 
4:12 PM
s/controller/constructor/
 
the first version was correct, because Request is injected only in the controllers
 
When I need stuff from request as a constructor param for a service, without coupling to framework (using request), I sometimes opt to use a factory
 
It's up to you, because I don't see the whole picture, but probably lifting this config to the client would be more appropriate
 
I am really starting to like the "move it to JS" as option
 
me too
 
4:13 PM
because hiding/showing table columns have no impact on model's state
 
@tereško When will you make it over to a conf
 
never
 
Why not? I'd like to actually meet you so I can piss you off IRL
 
I either dont have any free time (have a job) or any free money (unemployed)
wasting €1000 on a conf seems really irresponsible
 
I usually waste more
But generally, conferences are to be paid by your employer, not by you
 
4:28 PM
not in all countries
 
Ekn
we need more such employers placed in all around then
 
also, if anyone would get bosses to for over on-month-salary-of-junior to go piss about in a conference, it would be the team-lead
and that's not me ATM
 
@tereško or, someone they want to invest in (and, imo, if they don't want to invest in you, why are you there?)
But going yourself is great for contacts, networking and getting you into places where they do send you to conferences, for free
It's an initial hurdle, but it pays off
 
riiight
 
Telling you man, it's a gateway
 
4:34 PM
Not necessarily for everyone. In general, if you're an employee and you pay for your own conferences, you're doing it wrong
unless it's stuff like comic-con :P
 
@Ocramius As a first time conference-goer though, that's what I did
 
@Jimbo I did it once with a previous employer, never again
 
what's the price for a conference ticket ?
 
Depends. From 30 bucks to 2000 bucks
generally, hotel+trip is more expensive
 
lol
 
4:42 PM
Well, depends. PHPNW is 150 euros this year. PHPucEU (unconference, still great for networking) is 40 euros
 
For example, PHPDay is quite cheap
 
ok, 150 I can afford
is there a way to control the columns in a table with css?
 
define "control the columns"
 
for example, make all rows in a table column bold
 
You'd just target tr's and put a font-weight on them surely?
 
4:47 PM
something like #yourtable tr:nth-child(3) should select all third columns in every row
 
@bwoebi It seems a number of people don't seem to think that saving 51+ characters across 3 simple inline functions don't consider that an improvement. It's becoming clear to me that these people do not want PHP to have improved support for functional programming at all.
It's not that they don't think saving characters is important so much as they don't care about the use case for it.
 
they dont understand functional programming
 
They don't write in a functional style thus they reject that PHP should support it.
This seems to me to be the basis of many people's concerns.
 
hell ... OOP is "new thing" for some of them, @LeviMorrison
 
/cc @Andrea @Sara @NikiC
 
4:56 PM
@LeviMorrison I hope that it is a noisy minority.
 
People are also worried about ^ meaning something different in unary and binary forms.
We can fix that by not using a symbol... but hey! other people are against new keywords.
 
The symbol is just fine. & means something different in unary and binary forms.
 
As does minus, technically.
 
5:12 PM
> I don't believe this is PHP's strength and I also think it's not helpful to have PHP also try to be a functional language. It's quite different to procedural vs OO, as that seems much more of a natural progression.
Direct quote from Derick regarding functional programming in PHP.
 
@LeviMorrison Really... that kind of makes me sad. I would think he'd see the potential.
 
"I don't believe this is PHP's strength" used as a reason to not strengthen PHP in an area is self-fulfilling
 
^ That's a good retort.
 
hell, I was surprised when PHP got cyclic garbage collection - at the time long-running processes weren't PHP's strength either
 
5:22 PM
@LeviMorrison where do you have that from?
 
@bwoebi Private correspondence.
 
@LeviMorrison with?
 
Derick Rethans is the main person.
But others have hinted at the same.
 
@LeviMorrison Derick :-/
He's a nice guy, but today he's lacking vision
 
I've still extracted some good feedback from him.
 
5:27 PM
@LeviMorrison namely?
 
He definitely did not read short closures as was intended and therefor missed some background and reasons why we even care.
Also he really didn't seem to acknowledge or care about automatic variable binding - he really thinks it is sugar for something we already have (but more like vinegar than sugar).
I should improve the RFC in both these points.
 
:-)
 
Room 11: show some snippets of real-world closure usage (closure meaning something is captured from the outer scope) that use single-expressions in the body.
6
 
5:45 PM
maybe pin that?
 
@FélixGagnon-Grenier good point, done.
 
@LeviMorrison github.com/… Might contain real-world usages.
 
you mean github.com/… (with ")
 
@bwoebi Your query contains symbols that ... ;-)
 
@kelunik it's just the parens. IDGAF.
 
5:57 PM
@LeviMorrison $connection ~> new PDO(...$config); kinda like this?
wait , no ... wrong
 
@tereško ^$connection = $config => new PDO(...$config)
 
$connection = $config ~> new PDO(...$config)
that seems like real world example (something that I would actually use)
 

« first day (2139 days earlier)      last day (2806 days later) »