« first day (1775 days earlier)      last day (3170 days later) » 

12:02 AM
Guys, do you know how to only return ONE row on a INNER JOIN?
Preferrably the largest row?
 
Anyone know how to just get the values of a list in redis?
This is how Im getting my data so far :(
I don't want the * or $
 
@NSGod Please just go and read all of the manual. The questions you've been asking are all in there. Or just practice googling problems, so that you don't need to constantly ask questions from other people.
 
What should I search?
nothing comes up
 
12:45 AM
morning!
 
1:30 AM
Morning @reikyoushin
 
1:53 AM
@bwoebi I'm currently crawling the php docs to discover PHP internal function/method default parameter values (because internal functions/classes suck, as usual). I'm finding a lot of mismatches between docs and actual parameter names/types: where would I send a test case for those?
I'd write something like a phpunit test that uses reflection and crawls the docs
and reports a failure on any mismatch, and a skip or incomplete on anything that isn't defined
 
2:17 AM
@Ocramius The information that is returned by reflection is....more of a guide than what you would call actual rules.
 
Well, that's actually the single source of truth
 
The reflection info comes from ZEND_BEGIN_ARG_INFO_EX and the like. That information is not used by internal functions....which are free to do whatever the heck they want.
 
one of the two needs fixing. Who? Not my issue. My problem is the misaligning
Yeah, aware of that, which is a pain
But from a userland perspective, it is important to have consistency in this sort of info, especially for what I'm working on atm
 
@Ocramius The docs are actually more up-to-date than Reflection
 
@Sherif eh... the docs are just a by-product
I value the actual code first
If reflection says 5 parameters and the docs say 3... well, I trust the reflection on that
(and the code)
 
2:21 AM
That's what I'm saying though. Not every updates Reflection as often as the docs get updated.
 
@Sherif not sure what you're saying
 
@Ocramius I'm saying the docs are more reliable than Reflection, because they are updated more frequently.
 
as in the docs are outdated? Yes, they are, very often. This sort of test is just to create exposure around that
 
It's easy to change a function signature and forget to update reflection. Docs get caught more quickly because a lot more eyes are on them.
 
No, the docs are less reliable than reflection, because reflection actually exposes the truth, whereas the docs expose just some bits of it
if I subclass something and override a method and it crashes because I used the docs... and reflection was right... well :P
this happened a lot today, that's why I'm saying that reflection >>>>>>>> documentation
 
2:25 AM
@Ocramius If you're after who should you tell about this stuff, I think raising bugs to begin with on bugs.php.net would be a good start, and then assuming you're going to raise more than a couple, send an email to internals saying "I don't want to spam the bug tracker, here are 5 mismatches I've found, there are X more where should I send them?"
 
@Danack no, I'm just wondering about where to write such a test
I'd raise a bug that exposes 50~60 of these issues with such a test
and it would also stabilize the link between docs and exposed internal api
 
@Ocramius What crashed when you overrode a method?
 
@Sherif strict standards, missing params
 
Yea, I'm asking which classes and methods specifically
 
or made some params non-optional when they were supposed to
oh, I'm half way through, mostly DOM, Phar, PDO and Intl API mismatches
 
2:28 AM
> Intl API mismatches
 
And which version of PHP are you using?
 
@Sherif php 5.6 and php 7
I'm currently stubbing all the internal classes in userland via github.com/Roave/BetterReflection/pull/…
 
@Ocramius 7 I can understand because it's not out yet, but 5.6 should be pretty current in docs.
 
Morning
 
@Sherif isn't. Again, that's why I'd provide a test that avoids me from going through all this shit again and make a catalogue
 
2:29 AM
Hi there! Is it possible to create a PHP script that "writes" HTML code to a file when called upon? I am not looking for an echo since that "prints" code.
 
The actual tests might need to be in the ext directory that they're for....as people who are developing in an extension usually don't run the whole test suite. On the other hand, just phpsrc/tests/staphbeingdumbdevelopers would also be good.
 
@GustavoMontano rewrite a html file?
 
@Danack is there a docs repo on GH or something?
 
@Ocramius Sounds good. If you put together a list of specific methods that are out of sync with the docs, do let me know. I'd happy to fix the docs.
 
Yes. That's the word. "Rewrite". @HendryTanaka
 
2:30 AM
@GustavoMontano You probably want one of these two things: php.net/manual/en/function.fwrite.php php.net/manual/en/function.ob-start.php
 
@Sherif I would just write a test that loops through reflection and checks the phpdoc XML
you'd see such things in the test results
 
@GustavoMontano what r u going to do?
 
@Ocramius Yes, I get that. I was offering to update the docs if you share the test/results :)
 
2:31 AM
@Danack. Thanks, I will look at this. @HendryTanaka, whenever data is received from a form, I want to "write" code to a file using this data. Furthermore, every time a form is completed, more code is written "on top" of it.
 
so I assume there's no build process for this stuff?
as in tests? :|
 
@Ocramius How much booze do you have within reach? No, there's no link between docs and source.
 
@Ocramius We only test that the xml/dtd is valid when building docs
 
afaik.
 
The build script has no direct connection from the docs to php-src, no. Historically it's always been updated manually.
 
2:33 AM
@Danack I have a drambuie bottle here, but I can't finish it unless I want to get to work drunk
Hmm... I think I saw a .travis.yml on bob's fork somewhere
dammit
 
@GustavoMontano I see. Like a file editor in Cpanel?
 
@HendryTanaka. If my interpretation of what a "file editor in Cpanel" is correct, then yes, very much so.
fwrite() seems useful. I was playing around with it earlier this morning. However, I was not having much luck. Something about chmod 777 confused me.
 
@Ocramius I dug this up from a few years ago where someone wrote a script using reflection to test for missing visibility specifiers in the docs gist.github.com/whatthejeff/… not sure if it's at all helpful for you here, but it did result a pretty decent update in the docs
I remember the huge pain that it took to update Memcached docs after the interface changes :(
Keeping docs current is no fun when a lot changes all at once
 
@Sherif that's pretty much matching what I'm doing
except that I start from the reflection (authoritative source of data) and then build an XPATH that should match the phpdoc
 
Yea, that's how people usually catch stuff that gets out of sync
@Ocramius That works just as well as long as you have all of the extensions in the docs installed locally.
 
2:43 AM
Yes, it would only check the installed stuff, but that's enough for a decent base coverage
 
Meh, the docs also include all of PECL stuff so....
Depends on what you consider base, I guess.
PECL maintainers don't always do a great job of keeping docs up to date either.
We also used to have a lot of legacy tags in that XML which made finding some of these bugs tedious.
Like the mcrypt docs were a pain in my ass
Most of the main-stream functions/classes should be pretty current though, last I checked anyway.
 
this one is particularly confusing/inconsistent btw:
@Sherif the test script could be installed in either side (docs or extension)
 
@Ocramius hmmm?
 
As in the script could do a svn checkout + run the check against a namespace or list of classes/functions in the extension
 
The test script isn't the problem. It's easy enough to put together a script that tests against reflection. It's getting people to update the docs.
 
2:53 AM
Oh, that's just a question of red/green on the build :P
 
Very often the time between a commit making into master and going into a stable release could be several months. By then the person that committed the code often has forgotten about it and someone has to catch the doc update.
@Ocramius Which build? php-src build?
 
docs build
php-src could benefit as well, yes
 
Yea, good luck with that.
 
lol, I don't really care, I just asked where to send the script
I can't be arsed with updating everything anyway
 
@Ocramius 4 signature – how lovely!
 
2:55 AM
That's the point. The script is trivial to write, as you can see by the gist one (of many) people submitted over the years.
It's the actually getting people to update the docs part.
 
@LeviMorrison yeah, I simply rewrote the phpdoc locally for now by removing all that cruft
 
@Ocramius Also the docs mailing list doc-cvs@lists.php.net
 
I'll see if I can put it together and subscribe, thx :)
otherwise I'll just bother FrozenFire until he can't stand me anymore
 
Doing the check in the build is only useful on the actual docs server, but that means you have to convince someone that maintains that server to always have the latest build of PHP and all extensions running with the build.
Which is exactly 2 people AFAIK
 
That's why I poked bob, he's to take this sort of decision, I suppose
 
2:59 AM
Bob who?
 
bwoebi
 
Oh, he doesn't maintain the docs server.
 
he's supposed to lead on docs, no?
 
He is? No idea where you got that from. @salathe is the editor. Though I can't seem to find the admins for the docs server on the wiki at the moment.
I forget who still has access to that thing.
 
aaaaaah, there we go, then I might have been confusing people -.-
dammit.
Sorry, @bwoebi, I think I was looking for @salathe for this discussion =_=
 
3:03 AM
Man, I still have Dan on all those emails. Heh, you can tell I haven't touched that mailing list in a while
@Ocramius Just send an email to the webmaster list php-webmaster@lists.php.net
Someone will get back to you. Someone removed the link from the wiki
Or maybe I just have to login?
hmmm
OK, nevermind, both salathe and tyrael have access.
 
dammit
see? reflection says SimpleXMLElement::getNamespaces.recursve
>.< damn typos
@ScottArciszewski not sure that last idea is so great... why would you rely on dynamically defined vars in first place? :-\
 
i don't know if this is the right place to ask this, but can somone please point out some good open source ecommerce php sites that is not too complex and easy for beginners to understand, i'm trying to explain to a friend about php i tried explaining one i saw with codeigniter but it was too complex and he was not getting it
 
@danidee eCommerce and not too complex. hmmm... What did they find complex about it specifically?
 
@danidee the reference for that is Magento, and it is MUCH more complex
 
i've even searched through github to find personal projects but it seems the developers forgot to export their sql file and add it to the repo
 
3:14 AM
What are you trying to do here exactly? Learn? Build something?
What's the end-goal?
 
they couldn't understand the MVC pattern about controllers, views and models he even said it's unnecessary creating all those codes when he could do it in a simple file
 
@danidee seems like a different problem there :|
 
@Sherif i want us to go through the project together and build a simple ecommerce system from scratch without using any framework
 
@danidee ecommerces are not simple, that's why we're all a bit uncertain about what you're asking
 
@danidee If they're finding that too complex and you yourself can't make it any simpler, then perhaps you should start with something a little less "full blown project" and a little more focused on a specific things like, how do you use a session, or how do you add a user to the database and pull up their information?
Trying to learn by building a full-blown site is hard. It's not for everyone. There is a plethora of technical knowledge involved and an open-ended stream of edge cases to fall into that can slow you down or throw you off your trajectory completely.
Start simple if you're just learning.
 
3:21 AM
okay it isn't going to have multiple languages and numerous payment platforms, i just want a project that has a store, a cart and a backend to add items in different categories, the payment platform is not necessary we can even simulate by having dummy credit card numbers
 
@danidee Yea, but I think you're underestimating the magnitude of what you're talking about. If you yourself don't even know where to start now and you have nothing on the table, how do you think you're going to feel when you get stuck and you have 40 moving parts on the table?
Focus on learning simple concepts like working with the database, sessions, and ajax, as an example. Then try to put those practiced skills to use to build something more complete.
 
ok i guess i can narrow it down to something like adding products from the back end and displaying them in a public area.......hope that's not too complex, because the student in question is already comfortable in using sessions to build login forms and track the user or is it?
 
I'd suggest getting just to cart management
as in creating a cart and adding/removing items and being able to stub a "check out" button
then the complexity of "all this is not needed" will already seem evident, IMO
 
Yea, start by just getting something working rather than trying to get an entire ecommerce site working together with many intricate components.
One thing at a time.
Stitching things that have already been well tested and work is much easier than trying to build it all from scratch at once.
It's a very tall order
 
yeah that makes sense
 
3:30 AM
@Ocramius I'm not. I'm literally looking for trivial phpsadness entries to whittle away so people who hate PHP can be proven wrong in debates and feel like fools :)
 
Yeah
 
is PDO::ATTR_EMULATE_PREPARES still enabled by default in 7?
 
@ScottArciszewski Don't
It's only feeding the trolls
What you pointed out is more of a reflection on people writing bad code than PHP being bad.
It's actually trivial to implement such a function, but I can almost promise you that no one will actually find it useful in practice.
To me that just wins the debate all on its own.
 
heh, get_defined_vars() is a thing?
:P
yeah, that's pretty neat :P
 
@ScottArciszewski Yea, and if you're actually doing that in code, you have worse problems.
 
3:36 AM
lol
 
Why are you initializing variables to null and then not knowing which ones were initialized that way?
 
but I need register_globals!
 
just sayin'...
 
obvious sarcasm there
 
FWIW 3v4l.org/XagEA @ScottArciszewski
for the edge case, this is good enough
 
3:37 AM
lol I saw the email
that's why I said get_defined_vars() is neat above
 
ah, alright
but yeah, if you REALLY need that functionality, I wouldn't add a function to core, I'd rather tell the user to fuck off (seriously)
 
yeah if anyone for whatever stupid reasons needs to know which vars exist in that scope, that functions is perfect
aye
who even maintains that?
 
@Ocramius Your example would be better initializing the variable to null since the actual use case was isset(). What you have there works fine with isset().
 
@Sherif same stuff
 
It's not the same at all. $a = null; var_dump(isset($a)); // bool(false)
 
3:40 AM
that's why I didn't use isset()
 
Right but $a = 'foo'; var_dump(isset($a)); // bool(true) :)
Was just hinting for how you could demonstrate the use case more obviously.
 
yes, but the scope of the discussion is defined.
anyway, feel free to correct on the ML
oh, this one is fun, case sensitivity mismatch between docs and reflection
not much relevant, still annoying when building method lookup tables
 
functions are case-insensitive so...
 
yes, still annoying tho
 
umm we have a DTD
Make sure you're pulling the right refname
 
3:45 AM
\.git\refs\heads refuses to delete because apparently I don't have permissions even though I am the admin...
 
heh, are you sure your admin rights haven't been stripped while you were sleeping?
:p
 
yes...
 
morning
 
4:23 AM
morning
 
moin
 
4:45 AM
morning
 
you on osx @kelunik ?
also, morning
 
Abe
,ptmomh
(that was "morning")
 
@Abe no, it wasn't ;)
 
Abe
that was the idea :P
 
4:49 AM
@JoeWatkins nope, sorry, happy linux user. :-)
 
Morning
 
moin
 
Is there a github repo for php docs?
 
@Orangepill You can edit them on edit.php.net
 
also, php-doc is svn
 
4:56 AM
Ohh okay..
 
@ScottArciszewski Hey, did you end up finding hired useful at all?
 
not yet
they emailed me to say "we pretty much only place people in the major cities listed"
 
Oh, wait where are you?
 
Orlando, FL
I do, however, have an interview on monday that's a) remote b) pays more than my previous dayjob and c) shouldn't prevent me from contributing to open source
 
5:03 AM
Ahhh, yea, they're only doing major tech hubs right now.
@ScottArciszewski Cool, well best of luck :)
 
thanks :)
if I get that, life will get a lot happier for me
 
Good luck
 
Abe
gl!
 
They'll be lucky to have you
 
5:05 AM
Being happy is a requirement in this business :)
Sadness brings no productivity here.
I learned that the hard way.
 
I think I'll be on the market in the next month or so
 
Abe
@ScottArciszewski working from home is overrated, you will miss your office companions
 
@Orangepill You should checkout hired. It's pretty thriving.
 
I've been miserable for 4 years, employment-wise :P
Abe: I have 5 roommates
I've got plenty of company :P
and some of my longest friendships (i.e. with @DefuseSec) are exclusively online
IRC, XMPP, Twitter, etc
 
@ScottArciszewski congrats
 
5:08 AM
@sherif you know if they serve the Minneapolis area?
 
Umm, no idea. I can check.
 
Abe
@ScottArciszewski that's not just that... life just gets wrong. like eating in front of pc, working with pajama, or without pants :P mixing personal life and free time with work is risky for your health. just don't do this mistake :P
 
There FAQs don't list Minneapolis
 
@Abe I can totally agree.
 
@Orangepill They do. I can send you an invite if you'd like.
 
5:11 AM
Cool
 
Apparently Minneapolis is more thriving than Orlando or Miami? heh
 
@Sherif I'll ping you when I'm closer to making a move.
Minneapolis is a pretty happening place
 
I wouldn't know. Never been that far north before.
But these guys are relatively new. They try to focus on major tech hubs to impress their investors.
Apparently that's one I never knew about.
 
Well I need to get some sleep. Take it easy guys.
 
@Orangepill later :-)
 
5:15 AM
g'night
 
@JoeWatkins Any chance I could talk you into looking at #391 in PHP 5.x?
 
oh fuck
 
5:33 AM
@Abe I've worked remotely before, I actually prefer it.
 
6:11 AM
anyone using mamp here?
 
Morning
 
@Abe I got a desktop notif but i hav no idea where did you messaged me
 
Abe
skype
 
cool
 
@Trowski /me hides
 
6:31 AM
@Abe let me know when you are on skype after a year or two
 
Abe
i'm on call
 
6:47 AM
good moining
 
7:07 AM
morning
is there a list on downvoted posts that got edited since?
 
posted on August 26, 2015 by kbironneau

/* by Chris Laarman */

 
I need access to a mac ...
@bwoebi you still have a mac server ?
 
7:32 AM
@JoeWatkins yes, bwoebi probably owns everything that runs OS X.
 
I used to be able to log into it, but I can't remember where it is ...
 
If you have access, try 188.115.18.152.
 
awww, can't login ...
 
7:53 AM
moin
 
What is moin
Oh ok, got it.
 
It's a shortened version of "morning" because we are too lazy to type out 7-letter words
 
lol
What about variable names, etc? :P
they are written in full.
 
down with letters ... /me shakes fist
 
@DaveRandom m
 
7:57 AM
@FlorianMargaine .
 
Damn, the origin of my name: Has - is a word of Egyptian origin, meaning: Valiant and San is a word of Egyptian origin, meaning: Warrior.
 
(That's the dot off the i)
 
@DaveRandom I appreciate.
 
Lmfao so fake
 
Fair morrow, gentle elevenses.
 
8:03 AM
O.o
 
@AnmolRaghuvanshi You indian?
 
xD
Anmol
;p
 
@salathe /me tips hat
 
8:07 AM
@salathe Jubilations of the forenoon, fellow consort
 
@DaveRandom When I use "moin", I don't use it because I'm lazy. ;-)
 
@DaveRandom you might like this tutorial imgur.com/a/c4WNF#PEc4q1x
 
@FlorianMargaine wtf dude, my moms beside me lol
 
fun stuff: keyloggers, openwrt router, 3d-printed shoes
 
@FlorianMargaine oh hello -- I wasn't prepared for that!
 
8:14 AM
Is that just my impression or do a lot of people forget RUN apt-get upgrade -y in their Dockerfiles and build containers with outdated software?
 
@kelunik docker is outdated
I use lxc straight away nowadays
much more versatile, much easier to manage, much easier to backup, much easier to introspect.
 
what lxc
;p got it
 
@FlorianMargaine not sure if serious ...
 
no silly, the other thing ...
 
8:17 AM
@JoeWatkins lxc have very straightforward volumes
oh.
it's actually serious ^^
there are some nice pictures to help with the eyes, but it really has what I mentioned
 
yeah I read it ...
I don't understand it ...
boob jobs I mean ...
 
mornings!
 
morning
 
morning
 
morning
 
8:31 AM
morning
 
moanings
 
@FlorianMargaine I'm can't walk in heels, I think I weigh too much
Maybe I could do it on the moon
Not sure there's much call for pen-testing on the moon though. Plus, I find it hard to get heels that fit me.
 
morning
 
8:48 AM
morning !
 
@PeeHaa Seems like there will be no support for wildcard certs at launch, but you can list all subdomains in a single cert at least: community.letsencrypt.org/t/…
 
I just yesterday remembered about "let's encrypt" initiative
 
morning
 
@tereško Yeh, I really hope it launches when they say it will because I have a bunch of certs that expire in later Dec, really don't want to have to pay for them another year :-P
 
 
8:55 AM
@DaveRandom well, eurodns offers me one free ssl cert per domain, so I have some options
 
@tereško can I add root@localhost like sajad@localhost ?
I want to connect to root via 2-click
 
@Sajad no, because you cannot log in remotely with root
 
then when I want be as root I need to use su ?
 
remember: security reasons?
@Sajad yes (from a user, which is on the "wheel" group)
 
@tereško ok, but can you tell me connect to root directly what related to security ?
@tereško yes yes I knew it
 
8:57 AM
32 secs ago, by Sajad
@tereško ok, but can you tell me connect to root directly what related to security ?
 
do someone knows PHPExcel classes ?
 
please rephrase, I have no idea what you asked
 
@tereško "Why is it a bad idea to allow remote access under the root user?"
 
@tereško how you send a commend like this ? (Quoted by me)
 
@Sajad Paste the permalink URL into the chat box and post only the URL
 
8:58 AM
my copying the link permlink
 
@DaveRandom I should create a url ?
 

« first day (1775 days earlier)      last day (3170 days later) »