« first day (726 days earlier)      last day (4216 days later) » 

6:00 PM
@Sawny What is the point of creating static class, if you can make it namespace?
 
Less code to write for the user.
 
@Sawny a. he's not the user, he's the author
 
Actually less. :: becomes \
 
b. The point of PHP unit is to provide an easy framework for code unit testing
 
But then I need to do $test = new test();
 
6:02 PM
I said namespace, not class :)
 
They succeed all-to-well
I think your class is nice, and I appreciate your effort and all, but I know I wouldn't use it :)
 
wait... can I do test\assertEquals(); in PHP?
 
@Robik And one step further, you'll use test\assert\equals instead of test\assertEquals so the assert namespace can be imported and you only need to write assert\equals() :)
 
wait, aha, normals functions + namespace, right?
 
@Sawny yes
 
6:04 PM
@NikiC Yes indeed. I was talking more... general :P
@Sawny But beware, it's PHP 5.3+
@Sawny Is there anyway I can implement custom way of returning results in your library?
 
@robik What do you mean? Can you give an example of what you want to do?
 
I would like the test results as JSON, or XML or just plain file. What should I do?
 
is there any plugin available to do so?
 
user895378
To whom it may concern: PHP chat is a brutally honest forum for discussing code efficacy. Think twice before posting a link to your pet project and understand that any criticism is meant to help you improve, not to demean your ability.
 
which is a problem that I'd like to fix
it wasn't like that in the past
 
6:10 PM
@Robik Maybe test::assertEqual('someFunctionThatReturnsJSON', readfile('json_file or xml file'));
 
@jhonraymos What? Diff?
 
i want to perform this task.Is there any plugin available or i have to code?
 
I mean output as plainfile, not input :)
 
aha...
 
@PeeHaa i want to add this type of functionality in my site .Is it a plugin?
 
6:12 PM
No, you can't do that right now.
 
@jhonraymos Search for diff php or something like that on the Google
It would surprise me if it doesn't exists
 
@DaveRandom heh! Just telling the truth.
@DaveRandom hardly. He's been through a suspension once before. Mellowed down a bit for the first couple of weeks, then went back to his old behaviour.
Ah well.
I like the cv-pls and delv-pls culture in this room. It's a good way to do some quality control and it's really needed
 
Glad you like our work ;-) And yes it is really needed
 
Yeah. Whenever I log in to SO, I'm really depressed these days. And my activity log looks like downvote downvote downvote closure downvote closure closure...
 
user895378
@ircmaxell I see positives and negatives about it ... If you know people will be very honest in their criticism, you're likely to spend more time ensuring the code is well-written before looking for review. On the other hand, people shouldn't be afraid to share code. The general delivery of criticism shouldn't border on intimidation (and certainly not rudeness).
 
6:23 PM
@rdlowrey Should that be pinned?
 
@Pekka It's a great day to when you are able to find 1 decent question these days (at least for )
 
user895378
@NikiC Perhaps not -- I do think a lot of people are afraid to share code for fear of harsh judgement. Maybe best not to reinforce those fears :)
 
@rdlowrey Sometimes an @peehaa you code sucks!1!!!!11einzeinzeinoneoneeen is needed. Keeps me on the right track
 
user895378
I know that I started hanging out here for this reason:
 
user895378
Apr 24 at 12:43, by rdlowrey
This room is excellent because it's a low-stress, low-judgement (relatively) forum for learning how your code can improve
 
user895378
6:26 PM
Which was immediately followed by:
 
Actually it's worst when you don't get any feedback than getting negative ones =P
 
user895378
Apr 24 at 12:44, by Carrie Kendall
low judgement my ass, where's @tereško :P
 
lol
 
@rdlowrey :D
 
Now this is rep whoring:
0
A: How do I substitute a label in JQuery?

Abe MiesslerHave you tried using attr? $j("optgroup[label=Available]").attr("label", "Options");

 
user895378
6:29 PM
At the same time, who really wants to preface every statement with, "Don't take this the wrong way and I'm not attacking you personally, but your code is really poor in the following ways ..."
 
a 24k user copying a 41k user's comment. repwhoring at its finest.
Is there a badge for that?
 
user895378
 
Blank page means you didn't enable error_reporting. Don't come back until you do. And the character list placed there might need to be escaped, see preg_quote. — mario 13 secs ago
You see. It is good to get directly to the point :P
 
@rdlowrey exactly. This room used to be warm and welcoming
then it devolved into utter chaos and ego stroking
I'd like to see it return to its former glory
 
Anyone knows the character opposite of ✔?
i.e. an X, but one that's meant for negation/cancel/whatever is the opposite of a checkmark
Maybe ✘?
 
6:45 PM
@MadaraUchiha looks good
 
do you ever have the uncontrolable urge to tell project managers to go fu@$ yourself when the ask for stupid, redundant and meaningless items...
 
user895378
Can I get that icon in "Corn-flower Blue"?
 
@ircmaxell I usually get the urge to smack them in the face with items you don't need to hear about, but I guess that works too.
 
lol
 
Too many pinned messages, stars won't show for me
or pinned messages are too long
 
6:58 PM
@MadaraUchiha Yes :D
 
user895378
Damn it this person is so wrong and I'm going to get nothing done because now I have to write an elegant response to counter his insidious-but-seductive arguments.
 
@MadaraUchiha Why are you asking me?
 
can someone give me personal opinion about using zend_form to render whole form or render individual elements.
 
user1125394
@rdlowrey don't waste time he is strongly convinced
 
user895378
7:09 PM
@cyril Yes, he's clearly a Potenciophile. They always misconstrue, "this is the only way I know how to do it," with "this is the best way to do it."
 
@rdlowrey looking forward to it.
 
@PeeHaa liar
 
@ircmaxell Every time you think the USPTO cannot screw up any more they come with shit like this
I can't really blame them. I mean it's easy money, but at some point somebody should be getting an idea that this doesn't really work to improve innovation.
Everybody should just stop delivering electronics to the USA at the same time to pass the message. Doubt it will happen in the near future though
And worst thing is in the EU they are also talking / revising the patent system now to be better compatible with the US patent system
 
CI rules
 
??
ircmaxell ??
@ircmaxell
??
 
that reddit comment
I was seriously considering replying with: It's so obvious, I am such an idiot. Please do all my future talks on this subject for me, as it's obvious that I have no idea what I'm doing and you're much smarter than me
 
ahahah
i red you are able on mongodb
great thing
i love mongo
!!
i had a short experience with but it impressed me
i tested it out on my envoirment with 6 milions records
6milions mysql vs 6milions mongo
paginating data:
mysql at latest page 6 seconds
mongo at latest page about 4,5 seconds
@ircmaxell
 
user1125394
7:48 PM
what about couchdb
 
user1125394
8:00 PM
well getcomposer.org is funny, it failed 3 times (Connection timed out) then worked at 4th try
 
user1125394
php ~/composer.phar install -v
 
couchdb is great db i think but mongo is tooooo simple to use :D
@cyril
 
user895378
@NikiC Jesus ... there's an hour of my life gone. ralphschindler.com/2012/10/10/di-dic-service-locator-redux/…
 
Evenink
 
user895378
Chat conditions me to not worry about spelling/grammar because I can edit right after posting. I need that functionality in other places because I inevitably leave comma splices etc. in text for things like blog comments ...
 
user1125394
8:08 PM
@Ispuk don't know well , but I think they are similar, I ve been using cassandra which is really different (more raw/low level)
 
@cy
@cyrill
 
@rdlowrey I'm just reading through it and I've not found any glaring errors yet (assuming that you're talking about your comment you just linked).
 
cassandra is for huge sites :D and i will learn that
mongo is more user-friendly :D
couchdb is like mongo yep
never used
it's an apache extension or i'm mistaking?
 
user895378
@DaveRandom Just things like stray line breaks from doing word processing in Notepad++ and a couple places where there shouldn't be commas :)
 
@cyrill
@cyril
:D omg these names .. :D
 
user1125394
8:12 PM
you can edit your msgs
 
opsss
:D
any Codeigniter user? :D
 
8:33 PM
No, fortunately.
 
@Ispuk No :D
 
Opa SO-Style
Another day another fail. i.imgur.com/iHrp2.gif
 
9:02 PM
> But I have the pepper, so that makes it all better!
lolol
 
How would I go about getting the current directory?
Not the full path, just the parent directory the executing script is in.
 
getcwd();
oh
end( explode(DIRECTORY_SEPARATOR, getcwd()) );
 
Like getcwd(); would give me /htdocs/project/test123... I just want test123.
That is?
 
I know, so split the string with explode
I gave you enough to figure it out --- but
$results = explode(DIRECTORY_SEPARATOR, getcwd());
echo end($results);
 
What is DIRECTORY_SEPARATOR?
a PHP constant?
 
user1125394
9:07 PM
/
 
yup
 
Okay thank you very much. =)
 
yup
 
@W3Geek yes. It is / on linux, and \ on windows...
 
user1125394
"/" or "\\"
 
9:12 PM
So does $results = explode(DIRECTORY_SEPARATOR, getcwd()); make an array by chance?
 
yes
 
:-D. I love the feeling when pwning someone on reddit... :-D
 
lol
 
Well, only in that it's much harder to do because of the smaller size constraints
 
user1125394
less programming also
 
9:20 PM
Yes! It works! Thank you @Lusitanian
 
yup
 
Its perfectly fine to put in an production server correct?
 
@W3Geek Heard of basename()?
 
@MadaraUchiha lol i'm an idiot
basename(getcwd());
 
@Lusitanian Nah, you simply have RAM, not ROM :)
 
9:23 PM
Nope @MadaraUchiha
 
hehe
 
Hey guys. Does any of you have any experience with APE ajax engine?
 
> Given a string containing the path to a file or directory, this function will return the trailing name component.
@JamaicaBob Is that even PHP?
 
I'm still fighting with OO/MVC. I created an example of where I'm at here: typewith.me/p/mvcHelp If someone wants to jump in and give me a couple indications of where to go next, that would be amazing.
 
9:25 PM
Is not, but im just generally asking. I was just wondering if i need my own server box to install it or can i do it on my bussiness server host
 
I love the latest comment on my youtube video. Really says a lot about modern society...
 
@ircmaxell you gonna share it?
 
I did the other day, but since you asked:
 
Oh, I'll watch it, thanks, but I was asking about the comment.
 
@ircmaxell -___________-
 
9:30 PM
@ircmaxell I'm not sure what his point was, but if it is that in reality you can't be held liable over it, then I'm sure he's right ;)
 
> Turned the talk off after discussion about legal liability.
This one? :o
 
Well, that depends on the court and country you wind up in
 
At least I never heard of a criminal prosecution over password hashes (or rather, the lack thereof).
 
I know the case precident here is that if something is common practice, you can be held legally liable for not following it if there are real damages...
 
I would highly doubt that such a case would stand in court
 
9:31 PM
@ircmaxell "Common Practice"?
That would never stand in court. Unless you have a lousy lawyer
 
@MadaraUchiha You don't live in the USA
 
@MadaraUchiha actually, there's plenty of precident for it
 
@MadaraUchiha We're the country that let Apple get away with a patent on round corners.
 
@ircmaxell That's idiotic
 
@ircmaxell For password hashes in particular?
 
9:33 PM
@NikiC For credit cards I've seen it
 
it's called *gross negligence"...
Gross negligence is a legal concept which means serious carelessness. Negligence is the opposite of diligence, or being careful. The standard of ordinary negligence is what conduct one expects from the proverbial "reasonable person". By analogy, if somebody has been grossly negligent, that means they have fallen so far below the ordinary standard of care that one can expect, to warrant the label of being "gross". Criminal law Gross negligence is, controversially, used as a standard for criminal law for example, under manslaughter in English law. *R v Adomako [1995] 1 AC 171 Private law ...
 
Credit cards are an entirely different deal
 
I know.
 
@ircmaxell I think you are mistaking theory for practice.
 
No, my point was that if you don't do it right, you can open yourself to liability
I didn't say you'd go to jail, as if there are some magic hashing police
 
9:34 PM
@ircmaxell On most sites, the user "signs" a deal by clicking "I accept these terms and conditions", which, aside from bounding him not to produce nuclear weapons using your products, frees you from all legal liability.
 
Liability means a non-trivial chance (which this is, given case precedent) that you'd owe damages...
 
If you don't normally read those, I hereby recommend you watched South Park episode: The Human CentiPad
 
@MadaraUchiha Except that every time those go up infront of a judge they get sumarially thrown out
 
What I mean is: There has been a large number of high-profile password leaks (think of LinkedIn). Still I can't find a single case where someone was sued over passwords.
 
@ircmaxell I went to court once over a slightly different matter (of content possession), and I won, because the terms of use indicated that the user relinquished all rights over his generated content.
Court took those terms into account, it's a binding contract
 
9:36 PM
If that was the case, I wouldn't have used the word liability, instead I would have pointed out the case and said "see, you can end up like this guy, who wound up owing fourty-seven septilion dollars, plus his first three children"...
 
@MadaraUchiha That's a bit of a different case
 
@NikiC A bit, but a digital contract is just as powerful as a written one
 
@MadaraUchiha Sure. But this rather about something else
 
@MadaraUchiha Case law shows that those "terms of use" are almost always thrown out. The few exceptions usually require a physical signature or some really odd edge-cases...
 
The user couldn't have registered to the site without "reading" and clicking the "I accept" button/
 
9:37 PM
E.g., if you write in your contract "By accepting this, you are not allowed to sue use.", it will not hold before court
 
Basically, you cannot, by law (in the US at least) sign away a legal right.
 
And "We are exempt from any liability" to my eyes is very close to that
 
@ircmaxell Well I don't know about the US, but in Israeli court we managed to prove that this contract is as binding as an authored one, because the user is authenticated and his identity is proven.
 
I'm just telling you that the cases I've seen have had it thrown right out
@grmpyprogrammer How can you take a monetary system seriously when it's primary denomination is called a "loony"? (sp intentional)...
(just to change the subject to a more frivolous one)
 
@ircmaxell US courtes are weird...
 
9:41 PM
Hrm, that thread on reddit just got a serial voter (all the other guy's points were upvoted, and all mine downvoted). :-D
 
9:55 PM
going to install windows 8
 
Is there a tool to find a reference to a function in PHP. I'm using Dreamweaver CS5 and it doesn't seem to have that functionality. I'm about to update my site so I'll possibly rename some functions. I'm just editing the site files; I have not defined a site so if I do a search that means I have to open all the files (20+ files) and then to a search.
 
guessing i'll regret this
 
user1125394
@chx101 with Eclipse it works
 
Damn. I hate Eclipse. But it's better than opening 20+ files. Downloading Eclipse
 
@Lusitanian When and why exactly did you lose the will to live?
 
9:59 PM
@DaveRandom it all began with my first time installing vista...
 
@Lusitanian I guess you never experiences the pleasure of ME...
 
@DaveRandom I did
it's just blocked out of my head
 
@chx101 Yes, don't use Dreamweaver to code PHP.
I don't like it at all for coding any sort of website, but that's my opinion
@chx101 Go with PHPStorm, it's very good and has very high productiblity useful features.
 
@MadaraUchiha Thanks for the tip. I'll take your word for it.
 
@chx101 With PHPStorm, I CTRL+Click a function call and it takes me to its definition...
 
10:05 PM
How about the other way around?
 
Find all function calls?
 
Yes
 
I'm pretty sure it can do that, I'll look it up
 
Can you define sites too?
Not that I care about it that much
 
@Lusitanian Wouldn't you have been about 5 when ME was around? Or is your profile lying?
 
10:07 PM
@DaveRandom I was -- but I used it [when I was 6]
 
@chx101 Define sites? You can define projects...
 
Uh. Trials.
TPB.org
 
@DaveRandom Then when I was 8 I was setting up DSL for my grandma and she still had an ME based laptop
That experience is more memorable...oh god
 
You can deploy to a live FTP server, or push to GIT
 
sweet
 
10:08 PM
Probably supports SVN too, but I'm not using that, so I'm not sure
 
@Lusitanian I do remember trying many times to get ME to talk to XP, even in a simple workgroup setup, and I think only ever succeeding once or twice
 
@chx101 Trust me when I say, it's worth the money.
 
@DaveRandom Everything about that operating system was worthless.
Find one useful feature.
 
@Lusitanian ME - MY EYES!!
@chx101 That's not very nice :(
 
@Ma
@MadaraUchiha What's not nice
 
10:13 PM
@chx101 Piracy
 
LOL. That's why I release my code on SourceForge.
Ingenuity isn't commercial. It's meant to be shared.
 
@chx101 If you've worked on a piece of software for years, and want to make money off of it, how would you feel if someone simply came and uploaded it online for everyone to take?
 
@Lusitanian I have just been looking and I cannot find one single (useful) feature that was not either inherited from 98 or "first introduced in Windows 2000".
 
I'm sorry, my crystal ball is at the repair shop. I can't determine the cause of the problem from your thoughts and the cosmic energy of the universe. You'll have to give us more details the old fashion way, typing. — Madara Uchiha 13 secs ago
 
@MadaraUchiha Life isn't fair... Is it ?
 
10:20 PM
@Lusitanian @MadaraUchiha This sums the whole ME affair up quite nicely I feel: support.microsoft.com/?kbid=290700
 
@chx101 My philosophy is not be the one that makes it unfair.
@DaveRandom lol
They never thought anyone would still be using it after 2001
 
> This problem occurs because the algorithm that is used to calculate the checkpoint file name does not work after September 8, 2001.
 
> Microsoft has released an update that corrects this problem. When you install this update, a checkpoint is automatically generated. Checkpoints that you create before you install this update do not work after you install the update. The following file is available for download from the Microsoft Download Center:
 
@MadaraUchiha I don't make it unfair. It alternates, you know that.
 
@chx101 I evaluated, and it took me exactly 2 days to purchase a license.
Well, I'm off fellas
Gn
 
10:25 PM
lol. wait
 
@MadaraUchiha Nighty night
 
Up until 2112 lol.
 
@chx101 Great, you know how to operate a keygen
I hope you're proud.
 
@MadaraUchiha I wonder if he also knows how to operate anti-virus...
 
10:30 PM
I don't have anti-viruses. I don't use them
 
user1125394
ru on windows?
 
I know where I click and what I plug in my computers
Yes. I use scanners. That's all.
 
user1125394
@chx101 what OS windows?
 
W7-VIsta-XP
 
10:32 PM
loo. I don't have java shit
I removed it
I quit coding in java
 
@chx101 Good.
 
lol
Trust me dude.
I'm in the scene
"SCENCE"
 
user1125394
there are tons of spywares on windows
 
@chx101 Have you heard of TDL4?
 
Like I said. I know what I click on and what I plug in on my PC
 
user1125394
10:36 PM
you have an integrated antivirus in your mind
 
@ShaquinTrifonoff >> "Have you heard of TDL4"

Nope. I'll embark on a journey to find the bins and possibly crack it.

I was more of Zeus dick rider and BlackShades.

I'm coding my own right now but that's another story
 
I am quite literally speechless. Hell, why not just skip all error checking as well? Remind me never to use anything you've contributed to. I'm out.
 
Check MDN for all the compatibility issues you might have.Shaquin Trifonoff 1 min ago
 
user1125394
@ShaquinTrifonoff have you ever tried socketo.me
 
user1125394
php websockets
 
10:48 PM
I'm gone y'all.
 
@cyril I haven't. I'm using a shared host, so I don't think it would work :-)
 
user1125394
your chat was nodejs?
 
@cyril No, it wasn't Node.JS.
Just PHP with short polling.
 
user1125394
oh ok
 
I am going to change it to use Comet, though.
I figured out how to keep an infinite connection that receives all messages. (But I'll have to limit it to 50 seconds at a time, because the host doesn't allow PHP scripts to run for more than 1min.)
 
user1125394
10:54 PM
websocket>comet no?
 
@ShaquinTrifonoff Not even shell scripts?
 
I can't use WebSockets, it requires sockets to be set up on the host. I could try (PHPWebSocket etc.), but I don't think that would work either.
 
@ShaquinTrifonoff ...get a better host? Also, surely they include stream sockets? Aren't they part of the core since PHP5.somethingVeryLow?
 
I'll have to try PHP sockets, and see if they allow that.
(They use PHP 5.2.17, by the way. For all of their hosting services (~5))
Main hosting =>
    Hosting24
    Free Hosting Media =>
        000Webhost
        HourB
        PowrHost
        ...?
@DaveRandom Shell scripts? They advertise 'SSH access', which is a web-based, really cut-down version of bash. You can't even execute php -f foo.php.
 
@ShaquinTrifonoff What about $pid = (int) exec('nohup php /path/to/script > /dev/null 2>&1 & echo $!');?
(from a web page)
 
11:09 PM
disable_functions: system, show_source, exec, shell_exec, proc_open, passthru, set_time_limit, ini_restore, mysql_list_dbs, ini_alter, dl, pfsockopen, openlog, syslog, symlink, link, chgrp, leak, popen, escapeshellcmd, apache_child_terminate, apache_get_modules, apache_get_version, apache_getenv, apache_note, apache_setenv, virtual, mb_send_mail
Nope...
 
Man you need a better host.
@ShaquinTrifonoff Incorrect password.
 
@DaveRandom Sorry, I forgot to remove my joke... It says Incorrect password. unless the request is from my IP address :P
Joke removed.
@DaveRandom Which host would you recommend?
 
@ShaquinTrifonoff I am spoiled with several private boxes dotted around with which I can do whatever I want (within reason). But I'm sure that even the 1and1 hosting I worked with a little while ago wasn't as bad as that.
Do they give you cron jobs?
 
@DaveRandom They do allow PHP cron jobs.
 
@ShaquinTrifonoff Sorry to interject, but if you're looking for PHP hosting recommendations, I'm pretty satisfied with DreamHost.
 
11:18 PM
@ShaquinTrifonoff Right well I'd check if they impose a time limit on that as well. Because if not, then you might be able to fudge that around to start a persistent daemon. Although they quite possibly won't let you run a socket based server anyway :-( Is it just your personal site that you want this for?
 
@DaveRandom I am planning on selling my chat system...
 
@ShaquinTrifonoff As a service or as software?
 
@DaveRandom Software, although I could sell it as a service.
 
@JeremyStein Their VPS stuff looks like a good deal on the surface (I wouldn't even consider shared hosting for anything personally)
 
@DaveRandom I'm pretty cheap. I use shared hosting.
But it's just for personal use, so my recommendation might not be worth much.
 
11:26 PM
Are you using a local (unrestricted) instance to build it? I would say that these days any commercial product of that nature needs to prefer websockets with the option of fall back to ajax
@JeremyStein Depends what you're doing with it. If you just want to host a few pages pretty much anything will do, it you really want to play with (break) things then you need your own server really.
 
@DaveRandom Wow, I'd never heard of websockets. They look awesome. I'd been investigating comet for what I wanted to do. I'm glad I stopped by!
 
@DaveRandom I'm coding it on the server (not local), you can actually access it here.
 
@ShaquinTrifonoff Not a bad start, not bad at all. Definitely needs a little more... kick though, it's quite slow to respond after I press enter.
@JeremyStein ...as long as your hosting allows it :-P - That's the exact problem were debating, the more complicated you want to get, the more careful you have to be with you choice of hosting.
 
@JeremyStein Comet should be a fallback for WebSockets, if WebSockets are not available.
 
@David_Cameron Piss off you absolute cock-womble
I love my countrymen.
 

« first day (726 days earlier)      last day (4216 days later) »