« first day (629 days earlier)      last day (4333 days later) » 

1:02 PM
@ircmaxell I'm not rich enough for that ;) maybe I should start a blog...
Or maybe I should be more enthusiastic about @PeeHaa and his wiki
 
what the fffffffffffffffffffff
 
Hi
i try to install pear on wamp
but it won't work...
i don't have the go-pear.bat files
 
1:23 PM
@PeeHaa: To answer your question, its 4x 2.5GHz cores, but they're listed like: CPU3: Intel QEMU Virtual CPU version (cpu64-rhel6) stepping 03
so not sure the underlying chip
 
Ok, I lolled

> makeAMultiDimensionalArrayWithSumsBasedOnMultipleFields
 
yea I saw that one too :p
 
What strange things people do, and I thought a 3 word function was bad...
 
nah.. things like getInactiveUsers are fine as a function name
 
yeah but I like to cut out fat IE: gt_inact_users
 
1:29 PM
@MikeBoutin I think this is it pear.php.net/go-pear although I'm not 100% sure.
 
user895378
Any chance anyone's experimented with automatically forking a process to start the 5.4 built-in web server to include some integration tests in their PHPUnit test runs? I know that's a really specific niche case, but I thought I'd ask anyway :)
 
Wow that is a big freaking HTML file PEAR
ah, so PEAR is for PHP extension management huh?
 
user895378
@Event_Horizon Except for almost no one uses PEAR anymore if they can help it
 
@rdlowrey Why is that?
 
user895378
Because with the ubiquity of github, PEAR is basically irrelevant.
 
1:34 PM
Definitely makes sense to me to just use github.
 
user895378
Not to mention it's often a PITA to make the thing work.
 
Also not fond of anything PITA
 
user895378
PHPUnit is really the only project of note that still uses PEAR for distribution and it causes tons of problems for people.
 
looks like there is one on github
 
Hello again
 
1:35 PM
3.6
 
Hows it going @ircmaxell
 
user895378
Mar 12 at 20:11, by Levi Morrison
@Incognito If it is in pear and it isn't PHPUnit, it's probably old.
 
user895378
> ignorance tends to cascade
 
user895378
^ lol that would be really funny if it weren't true :)
 
1:38 PM
posted on July 06, 2012 by Anthony Ferrara

There's been a lot of traffic lately about what's wrong with PHP, and counter posts about how good it is. I've even fallen into the fray in an earlier article trying to step up and defend the language. The problem with almost all of these posts is that they focus on the language itself and what's wrong (or right) with it. This is not one of those posts. Read more »

 
@ircmaxell PeeHaa's tutorial is coming along nicely, would be nice to see it incorporated as a part of the PHP site once its done.
 
That's kind of the point...
 
Well yeah
I had a question for you ircmaxell, did knowing C help you learn PHP, or was picking up PHP like starting over again?
 
I have no idea. It was a while since I programmed C when I came across PHP, so not sure...
 
1:45 PM
Do you have a lot of the stuff memorized or do you still look stuff up in the manual on a regular basis?
I know PHP is large and it would be almost impossible to memorize everything, I'm assuming its more being able to understand everything about the basics of PHP down to bitwise operators.
etc.
 
I have a good deal of it memorized
 
@ircmaxell Quick! Param order of implode
 
separator, array
 
lol @MikeB
 
trick question - they're interchangeable :D
implode() can, for historical reasons, accept its parameters in either order. For consistency with explode(), however, it may be less confusing to use the documented order of arguments.
 
1:48 PM
They may be interchangable in practice, but officially, it's that order
 
good to know, I did not know that
though I'd just stick to the default order
What do you guys think is the most important thing to learn correctly beyond the basics?
 
the language
 
Recognizing patterns
 
Knowing the quircks beer
 
what kind of quirks?
 
1:52 PM
Understand everything here: php.net/manual/en/langref.php
 
@Event_Horizon The usual WTF's
 
I'm asking all this stuff because I'm probably going to have a lot of free time at work and would like to get more involved with learning PHP, getting better, develop my first MVC, etc
 
PHP WTF's are reputation gold on StackOverflow as well
 
1:55 PM
@PeeHaa I like the way he numbered the single line in that post lol
 
man if rep could go negative some people would be screwed
 
:)
 
hrm... I didn't realize I had access to edit reject and delete php.net comments
 
time to clean up mysql_* comments!
 
Any plans to clean up old comments? ^
 
1:57 PM
just put 10 comments saying "USE PDO"
 
old? Nah. Obviously bad, perhaps
 
anyone use kohana
howtf do you get uri segments, kohana v2 used to do it like CI did where you can pass the params to the class method and it would auto relate the two.
 
while($any_database)
{
echo "Use PDO or mysqli, do not use mysql_* .";
}
 
or use mysqli
 
2:00 PM
@ircmaxell I've got something for you 1 sec...
 
@MikeB gone...
 
@MikeB Not sure whats wrong...besides saving user info to file
 
@ircmaxell Arrrggh I should write this stuff down when finding bad comments at thye office. nvm will find it one day
@ircmaxell lol. I like it
 
@ircmaxell ha
 
2:05 PM
wow, 1k page views in less than 30 minutes
 
Hi all ^_^
 
#6 on HN right now...
 
@ircmaxell I'm not sure I agree
I.e. I agree with the problem, but I don't think I like the solution ^^
 
@NikiC That's fine. I'm not sure I like the solution. But it's a start. It's an idea...
 
At least I definitely would not contribute to a wiki
 
2:07 PM
@Event_Horizon It added nothing of value and was too localized
 
@NikiC why not?
 
@ircmaxell Sounds like what I suggested yesterday. So I'm all for it
 
Hey @tereško
 
yay
 
@ircmaxell Attribution
 
2:09 PM
Fair enough
#1 on HN :-D
I should never underestimate the power of HN. 500 page views in the past 5 minutes...
 
question, why would you ever use this: <script language="php"> </script>
 
user895378
@NikiC Perhaps you could have a hybrid solution where there are parts of the wiki that are "protected" (like questions on SO) where you farm out the work to specific individuals who really know what they're doing so they can get attribution credit.
 
also, someone suggesting using Heredocs instead of echoing html, is that good advice?
 
@Event_Horizon , trauma. Sometime children get dropped at birth.
 
@tereško I would expect nothing less from someone using those tags...
 
2:15 PM
@Event_Horizon , you have echo the HereDoc anyway
yes, you should not echo html .. you should close php script and open it after the html tag
 
@tereško Why, whats the advantage to doing it this way?
 
?><a href="<?php echo $url; ?>"></a><?php
or
?><a href="<?=$url ?>"></a><?php
 
first, however I seem to recall shorttags being enabled by default in one of the upcoming/recent releases of PHP
 
the advantage is that php was initially a templating language
 
Shouldn't short tags be avoided?
 
2:18 PM
IMHO, <?= is an abomination that should be removed from the language
 
in general : yes
but when you are dealing with templates, it becomes a gray area
 
@ircmaxell Agree 100%
 
@tereško I still feel it's an abomination...
 
@ircmaxell true, but a lot of people (one of them - Rasmus) disagree
 
Which is why it's not a dictatorship. It can still exist even though I disagree with it.
 
2:20 PM
Rasmus hates what his language has become :p
 
but if I was to be a part of a fork, I'd pull it imediately
 
Why is that?
 
@MikeB yeah , i got that impression too
@Event_Horizon why is what ?
 
@ircmaxell Another thing that I don't like about having an authoritative wiki is that it is authoritative.
 
@MikeB Why do you say he hates what its become?
 
2:21 PM
@ircmaxell For kicks, what else would you immediately destroy?
 
@MikeB almost the entire standard package...
@NikiC can you elaborate?
 
@Event_Horizon He wrote a very unfair article about the direction frameworks were taking 'his' language.. he doesn't think PHP should be used for applications since it's only a scripting/templating language
 
Why wouldn't you want your language to evolve into doing more (and possibly more useful) things?
 
@ircmaxell Just general attitude ^^ I feel like everything that is "official" in some way or the other will suck sooner or later
 
@NikiC A non authoritive wiki will suck right from the start imo
 
2:24 PM
do you feel that way about MDN?
 
(Compare PEAR and Composer)
 
I gotta be honest, I have almost always liked Mozilla's web page styling
 
@Event_Horizon How would you feel if managers started asking why YOUR application can't handle more complicated tasks. I'm sure you'd answer something like "Because it wasn't initially designed to do any of that"
 
@NikiC Pear is authoritative by policy. I'm talking about authoritative by location only
 
So management started building on top of your application.. constantly frustrated by its lack of support for the more complicated features
 
2:25 PM
@MikeB Yeah, but if the community is willing to help me build it up to something better I would want to.
 
Blaming you for not having the foresight.. I can see how one would become spiteful
 
a general access wiki where anyone can contribute, anyone can help...
 
@MikeB Yeah I guess
 
@Event_Horizon All too often the community becomes the hero and Rasmus is the villain who couldn't think far enough into the future
 
@ircmaxell , that site is more like a general reference. If i need to solve some JS issue, i usually end up on quircksmode page
 
2:27 PM
true
 
@MikeB Yeah I see what you mean, you can't please everyone.
 
To be clear I'm not blaming him at all.. just trying to convey my understanding of the general sentiment towards him and the opinions he seems to have about his own language evolving well past what he thought when he first sat down and wrote his templating language
 
Wow, that's a new record. 4k page views of a post in the first hour...
 
user895378
the PHPUnit documentation makes me want to punch my LCD.
 
@ircmaxell Maybe one of those is Jeff ^_^
 
2:29 PM
@rdlowrey , yes , yes it does
 
phpunit is pissing me off
the fact that it hard-codes the path to the php binary in the executable...
 
so much fun
two more lines were added then it was promptly squashed
 
@ircmaxell I think the one often leads to the other
 
@NikiC perhaps
 
Especially if you consider that people have very different notions of what is "right" and what is "wrong"
 
2:33 PM
hrm, I need to figure out how to alias a path for a single process only (via env variable or whatever). I need to change where /usr/local/bin/php points to for different processes
any thoughts?
 
Let's say I'm running WAMP... what does it take to run a GUI program from PHP?
 
@rlemon Thats great
 
@ircmaxell Well, I know you know enough C ;)
 
@Event_Horizon yea it made me smile.
 
@Leigh I'm not making a kernel patch for that...
 
2:35 PM
@ircmaxell So, I'm really not sold on the wiki. What I'd consider more realistic is creating another post aggregator that matches our notion of "good". Thought that would probably be a futile effort
 
@rlemon Haha nice
 
@ircmaxell for phpunit? Sure that you need that?
 
@NikiC Why would it be futile?
@NikiC Among others, but yes
 
@ircmaxell What would be futile?
 
@NikiC you're the one who said it
 
2:36 PM
@ircmaxell Oh yeah, right :D
Well, wouldn't it be futile?
I like the word "futile". It sounds funny
 
@ircmaxell Wasn't thinking of that, do you know how the process is invoked? Any way to walk the process tree and work out the calling process?
 
I'm trying to get jenkins to be able to run a build against multiple target versions of PHP. So I'm setting PHP_VERSION in a build step, but phpunit has it hard-coded as a she-bang line
@Leigh it's in a shebang line, so I don't think so...
 
@ircmaxell Well, create a small wrapper script
 
@ircmaxell both invocations you want to differentiate between are from a shell script?
 
How do I run a GUI program in the current user session from PHP, on windows?
 
2:39 PM
E.g. on windows you can change the phpunit php binary via an env var
 
@NikiC wrapper script that would do what? It's still hard-coded in the she-bang line
 
@ircmaxell not sure what you mean. could you gist it?
I don't see how the shebang line would be a problem if you invoke the script explicitely
 
#!/usr/bin/php
<?php
I could make my own phpunit front-end as a shell script, but eih
 
@ircmaxell Could you do /usr/bin/php4 phpunit
 
yes, but that's not how other things are expecting phpunit to run
 
2:45 PM
Hello, how do I test my code online? The ones I've tried won't let me becuase I have file_get_contents
 
@ircmaxell , you could always make /usr/local/bin/php to be a proxy script, which then hands over the parameters to binary , based on some environment varuable
@iHawk , have you installed a webserver ?
 
@iHawk Buy hosting, there's plenty of cheap options
 
No;/ I don't need one
 
@tereško hrm, that's interesting...
 
@MikeB , if you are just learning, it makes much more sense to host it locally
 
2:47 PM
so basically
 
@tereško I understood 'test my code online' to mean not localhost
 
Could someone test this for me? ;?
$arr = json_decode(file_get_contents("forums.bukkit.org/alerts.json"),true);
foreach($arr as $item) {
echo $item['_visitor_alertsUnread'];
}
 
@iHawk , it will return "file not found" error
 
if $PHP_EXECUTABLE; then
    $PHP_EXECUTABLE $@
else
    someOtherLogicToFindExecutable
    $exec $@
fi;
 
Why?
:4415818
 
2:48 PM
@iHawk , because there is no forums.bukkit.org/alerts.json file on your computer
 
I do a file_get_contents though
 
file_get_content() does not know , that you meant a URL there
 
Will it know if i add www.?
 
you are missing http://
you are missing the protocol
 
okay
If I add that will it work?
 
2:50 PM
maybe
@iHawk , you are doing this from the wrong end
 
?
 
at first you should set up a webserver on your local computer
so that you can start actually testing it all
 
My computer is too slow for that
 
@ircmaxell I was thinking if you replace /usr/bin/php with a script that does something with /proc/$$/status - get the PPid, check if it was phpunit or something else
 
@iHawk , i have been running webservers on Pentium Pro (133MHz) with 16MB ram ... what you are saying is bullshit
 
2:52 PM
;o
 
@iHawk besides , you would be only one using that webserver
 
Shouldn't it work if I run the html file in browser?
 
@Leigh well, I've got other logic to determine which to run
 
@iHawk , you can open HTML in browser , yes , but one of things that PHP does is - generate HTML
 
@ircmaxell why can't you just modify your phpunit and modify the first line..
 
2:53 PM
...
I'm making a Chrome Extension
 
I don't want to, because I'd have to hack a lot of libraries (it's not just phpunit)
 
@iHawk , that does not require php
 
Yesitdoes. For what i'm trying to do.
 
@iHawk , you can fetch files with javascript , using XmlHttpRequest
 
2:55 PM
I'm parsing the JSON
 
lol
 
@tereško Anything wrong with doing it with PHP?
 
@iHawk , yes .. if you are making a chrome extension , it should work on the browser
if you are using php for this, then you adding another dependency
 
@tereško Great:(
 
2:59 PM
basically , you are doing it wrong
 
@tereško Want to translate this into javascript?
;p
$arr = json_decode(file_get_contents("forums.bukkit.org/alerts.json"),true);
foreach($arr as $item) {
echo $item['_visitor_alertsUnread'];
}
 
no , i don't want to
i don't get paid for this
 
yay! I unlocked the ability to downvote HN
 
your post is first post in hn..wow
 
3:02 PM
has been for an hour
boooo, just dropped to #2
 
@ircmaxell HN?
 
@MikeB are you faking serious ?!
 
haha
 
:x
 
3:08 PM
@tereško : any tut like eloquentjavascript.net for PHP ?
 
@MikeB , that's like 3-5 years ago asking "what is slashdot ?"
@Krish no , not really
 
I need to re brush my basics.. :|
 
I guess reddit fills that role for me, r/php, programming, linux, technology
 
people copy from HN and post on reddit :P
 
@Krish Apparently I need to give it more attention :D
 
3:10 PM
lol .. i'm sorry to inform you , but one goes to /r/php, when feels like slumming
 
also getting some rep in HN is kinda difficult..there are too many @tereško's there
 
@tereško Nothing too serious.. it's good for a laugh though.. especially when you see people asking questions there and not on SO
 
you don't go to HN to gather rep
 
only way I got some rep there is sqrt(x*x+y*y)+3*cos(sqrt(x*x+y*y))+5 ( search in google )
that thread was there like 2 days in the front page... getting up-votes for comments is almost nil for me
 
@MikeB , that's why the have /r/phphelp
 
3:21 PM
comment posted by @NikiC makes sense..but I am kinda sad because, I wish that I could stop my fellow citizens from using plzzzzzzz, u ...etc
oh, btw..I also starred it..
 
10k page views in 2 hours. Not bad...
 
on what @ircmaxell?
 
@ircmaxell That's all very nice
But will it happen?
(i.e. before PHP7?)
Not very likely, sadly
 
huh?
 
@ircmaxell By the way, I think the PHP website should have a basic tutorial aimed mainly at teaching language constructs. But other than that, yeah, I don't know how responsible The PHP Group is for tutorials.
 
Hii ircmaxell
 
@LeviMorrison perhaps. Just tossing it out as an idea...
 
3:40 PM
how to get a relation between multiple primary keys in a single column
in mysql
 
@ircmaxell Starting a tutorial site under the php.net domain
 
@ircmaxell It's a good post. I'm also not sure how to correct the community. Taking down bad content certainly isn't an option. :/
 
I'm not sure that will (ever) happen in the near (very far) future
 
@Truth .it can happen tomorrow if we choose...
 
@ircmaxell Depends on who's "we"
I agree with your idea 110%
 
3:42 PM
anyone?
 
There should be a strong authoritive source
@PradyumnaSharma A single column can have multiple primary keys?
 
@ircmaxell: Wow, that developer drive link... that truly is embarrassing for the author
 
I though the primary key can only be 1 per db
 
that column consists of primary keys of another table
 
@PradyumnaSharma , you are making no sense
 
3:44 PM
@PradyumnaSharma You're looking for a JOIN
 
i think he's got a table lets say users....
which has a primary key....
then he has a second table lets say department that also has a primary key
the users table, also has a relation setup to the department table on it's primary key
 
yes each department has a no of users which are specified in a column in department
 
Do we have a good question about JOINs?
Explaining what it means and how to perform it?
 
@Truth are you soliciting sarcasm?
 
3:47 PM
SELECT
    Users.user_id AS id,
    Users.name AS name
FROM Users
    LEFT JOIN Departments USING (department_id)
WHERE
   Departments.name = 'FooBar'
 
@Leigh No, I seriously think there should be a good question/answer on that subject
 
@PradyumnaSharma "primary key in another table" is called FOREIGN KEY
 
@tereško weird syntax
 
Get the idea of what i am asking??
 
@Leigh , which part
 
3:50 PM
I want to relate each of the foreign key to their primary key...
 
@tereško I guess it's just not written how I'm used to seeing it, which SQL variant is it?
actually I guess it's just the USING clause that threw me, it's probably something I should be using but never learned about :)
 
@Leigh SQL99 standard
 
@tereško I guess I just write terrible SQL :)
 
FROM Table LEFT JOIN OtherTable USING(foo_id, bar_id) means:
FROM Table LEFT JOIN OtherTable ON Table.foo_id = OtherTable.foo_id AND Table.bar_id = OtherTable.bar_id
 
3:57 PM
haha, you don't use PHP enough :)
oh, and apparently you don't grok the subject.. I think the only reason I found the php-src grok link was because you linked it
 
@ircmaxell Yeah! PHP.net and w3schools are the best!
You don't know anything!
 
shame I'd have to sign up to reddit to abuse that guy
 

« first day (629 days earlier)      last day (4333 days later) »