« first day (919 days earlier)      last day (4255 days later) » 

17:00
@Lusitanian Killer, hard to configure, hard to communicate, worst ui ever. etc...
Tons of hidden fees here and there..
@Ihsan @DaveRandom Hola!
Hi Appu!
How are you doing?
Fine...Bitter nowadays, having health problems an d you?
gotta go for a moment brb...
17:02
Oo What happened dear? I am good.
Okay.
@crypticツ your domain is password protected? O_o
sorry.. back...
Hello everyone !
Hi @HamZaDzCyberDeV
17:13
How are things going ?
Is there some way to str_replace with a limit without using preg_replace(_callback) or another ugly constructs like substr_replace with strpos in a loop or exploding the array and then unshift the first, insert there the replacement and implode it?
Is there no built-in function which can do this?
@bwoebi with a "limit"
give an example
??
@HamZaDzCyberDeV only replace the first occurrence when $limit = 1 for example
@Ocramius gotta hide all the pr0n =oP
@crypticツ but I went there for that :(
17:24
lol, no I just haven't gotten around to finishing it up so there are broken pages and all
@crypticツ kk ;)
@crypticツ finish it up
@Gordon I will, I gotta dump my code code since I now have a Gist so will just use it's API, and finish up like 3 pages. I will keep my blog section blank since I have no life to write about.
gotta love cakephp. Im currently migrating an ancient version of it to a less ancient but still ancient version. I followed the Migration guide (which is only available via the Wayback machine - yes, it is that ancient) and did everything they want. But Cake now tells me View::setLayout is not a method. So I checked and indeed it was deprecated. The solution is to use $this->layout. Mmmmkay :)
17:31
@crypticツ you can write about us (the people in the room)
@Gordon ancientception
@Gordon Entry 1: Today in the PHP chat @tereško said he hated his job and will resign, @Gordon said he hated Git, @Lusitanian banned him from the interwebs, and @Ocramius went looking for pr0n.
16
@crypticツ +1
@crypticツ hey hey! TODAY?!
you're minimizing it
She needs something for tomorrow.
17:36
@NikiC i can relate to that one ... oh how i can relate
How about:
As a pink cat, I always had something for Pink Panther, Peter Sellers and Hanry Mancini's music?
@Gordon well contrary to SVN, git comes with online help installed.
use git *command* --help for the HTML version (or the manpages depending on your environment), or git *command* -h for the short version in shell directly. And git --help for a list of common commands.
@Gordon Necromancy?
And Atlassian released a very nice GUI for Git some weeks ago.
@TillHelge SourceTree is good.
17:39
btw, if you find git too compicated, install tig.
@TillHelge git already has a quite nice interface: it is called "THE TERMINAL"
@tereško I'm all for CLI tools and I like Git's. However, there are people who don't. Or so I've heard. :D
@tereško Man of the hard ways... John Wayne of the coding world...
@TillHelge we call those people - webmasters
@tereško eh, that convoluted pile of commands is a nice mess
17:41
compared to ... ?
I heard the git source code was run through a code obfuscator and somebody lost the original source.
@igorw yeah, they probably used git to version it
yeah, somebody added the experimental filters feature.
This thing with 8px letters in green and black background? (my settings, I find them nice ... as terminal)
I like it but it is too far away from what I expect from an useful git GUI...
@Gordon I guess the clicketty of the keys, watching the command line getting longer when you type is just giving some kind of satisfaction, that TERMINAL users feel themselves jumping outta matrix or war games... :)
@Gordon Lol
17:43
@tereško did you quit?
no , the boss is sick
@tereško how does that stop you from quitting though?
.. hmm .. i could start ignoring stupid questions from this day on .
@tereško I guess it would look like back stabbing?
dramatic, sick boss, let down by worker...
Good evening guys i have a quick question, what i have done is created a html table by converting JSON data from mysql database. I have added a column to this table called 'Value' , is it possible to use ORDER BY value in the mysql statement?
17:53
@user2201189 Are you asking that ORDER BY actually works?
Ahoy hoy; not a PHP (exclusively) question -- Given a file of strings (permutations like aaa, aab, aac and so on) are there any ways to automate matching each string against an English dictionary lookup on a Windows box?
To find dog and cat and egg and so on.
I want to order my table using a column i have added myself where the column is a row of values i have put in, the column isnt part of the mysql database
@user2201189 so you want to sort the HTML table?
@TillHelge i think that the git CLI is less of an issue than what they call stuff. Some of the command names are confusing, especially bc some of them carry a lot of implications. So the visual aid of a GUI might be helpful for those people.
<?php eval("global ${$name} = '{$value}';"); ?>
17:59
@Bracketworks sure, why not? I mean what do you think into which problem would you run?
@hakre Not so much a problem, I just don't know how to do a dictionary lookup against a built-in dictionary from MS (say, from the Office 200X suite)
Im going to try and ask a question on the website i think my code needs to be viewed to solve my problem cheers for your time :)
Ah okay, the file-format. I dunno where that file lies nor which format they use, sorry. However if you're okay with the free world, there are files and so on. Also I've got a plain wordlist from a wikipedia dump.
My next bet was to download a wordlist dump from Wiktionary or something. ^^^ Yea, that's where I'm looking.
The ones I'm looking at are XML, you have a plaintext sans-definitions? (I dont need definitions; just determining word spelling/validity)
18:03
@Bracketworks where are the ones you're looking at?
IIRC a good way is to get the page-titles only - from the english wikipedia for example.
@hakre That sounds good. I thought I knew of a wordlist archive...
What I'm ultimately going to do, is filter them to 6 character words, then apply them against a list of 6 character strings.
hmm.
@Hiroto ahh +1 :P
18:10
@tereško This is a syntax error I'd bet. Variable variables are also parsed inside of strings I thought...
@ircmaxell when you were talking about hating os x bc it kept beach balling, what version were you talking about?
@dyelawn I actually found out that Git is much easier to understand since I heard a talk about how it works internally.
@dyelawn not beachballing
just in general having crappy CPU scheduling
@ircmaxell oh, nevermind then, thought i remembered something about beach balling. just asking bc 10.8 is about to make me throw my machine out the window.
@Bracketworks Some tools that might be useful: hashcat.net/wiki/doku.php?id=hashcat_utils (most are with speed in mind) and for the wordlists, check with goolge and the like, e.g. hashcat.net/forum/thread-1236.html
18:14
@Bracketworks can you not use the "all titles" gz and match to that? that appears to be plain text when it's opened
However, I still have to see a project where Git really is used and not only by some nerds who use it to access the SVN. Git isn't really popular with my company so far.
@bwoebi tnx, fixed now
eval('global $' . $name .'; $' . $name . " = '$value';"); // the ultimate tool in making maintainers cry
@TillHelge it took me a while, but i think i've finally gotten the hang of it. still, for a n00b like me, a lot of the names are either counterintuitive or appear to overlap.
This isn't beautiful anymore :P

Use:
eval("global \$$name = '$value';");

and the world is okay again
@tereško foreach ($_REQUEST as $key => $value) { $$key = $value; }
and that in a random location
18:17
@Ocramius register_globals are evil :o
.. or just global $i; ..
@bwoebi I know =D That's why it's fun
while we are at it: $GLOBALS = $_REQUEST + $GLOBALS;
(but unluckily this does not work :/)
@hakre Too much chars. Use: $GLOBALS += $_REQUEST; (Does this fail too?)
@bwoebi it does work, but it won't overwrite existing globals.
18:20
@dyelawn I found a different one; should be good for the time being -- Moby project, seems long dead, but certainly sufficient.
And the fun with register globals is overwriting existing globals ^^
Like $_REQUEST has super powers.
Hi guys I have a big problem I need help . this all I see : Our crawler was unable to access your page to determine its content and display relevant ads. When our crawler can’t access the content, often we won’t show ads resulting in lower revenue and coverage. Other times, we’ll show ads that are irrelevant resulting in lower CTR. Follow the links in the ‘How to fix.’ column to correct these errors and improve AdSense performance
and it droped the performance of my adsesnse
@hakre Can register_globals overwrite thinks like $argc, $argv or even other superglobals?
@humphrey you might want to click that 'How to fix' link.
@bwoebi I think you need to enable register superglobals for that ^^^ :)
No honestly, no clue out of my mind. I would say no, but that's just a guess.
18:24
register_globals "0" PHP_INI_PERDIR PHP_INI_ALL in PHP <= 4.2.3. Removed in PHP 5.4.0.

I'm using trunk here... And I'm too lazy to download such an antic PHP version like 5.3^^
@dyelawn
@dyelawn i DID BUT IT DOES NOTHING
as an expert in terribly frivolous pings, that was literally the worst ping ever
extract($_REQUEST)
@bwoebi FYI global $$foo; is supported by PHP
@NikiC Why is ${$var} parsed as variable variable and $$var not?!
18:29
@bwoebi huh?
@bwoebi whot ?
php > $var = "text";
php > $text = "Some text";
php > echo "$$var\n";
$text
php > echo "${$var}\n";
Some text
ah, you mean in strings
@NikiC Yes, @tereško has used a string before... (when eval()'ing)
@NikiC And now... Why is the one working and the other not?
@bwoebi I think the real question is why PHP ever supported the "${...}" syntax ;)
I mean it's not like interpolating variable-variables in strings is this super-big usecase requiring special syntax, right?
18:36
@NikiC Right. That {...} exists is good, but if {${$var}} would work, the question is: why should ${$var} not work?
Because PHP is an everyday growing big animal which became impossible to tame...
@bwoebi Because it's unnecessary?
If {$$foo} already works there is little value in making ${$foo} work too, right?
@NikiC Yeah. Why ${$foo} then ever was introduced?
no idea
@NikiC I agree, allready PHP carries too much ambiguity in design because of inheritance at evolving. So pruning it a bit is a good idea I guess.
18:39
And now ... as it nearly every time is ... you cannot remove it because so many people might use it!?
yes... backward compatibility hounts us.
we should only go forward
@Ihsan There should exist some little snippet at every bc-incompatible change which makes the code fully supported in the new version...
For example some script which searches the filesystem for *.php* files and then operates on these files...
For functionality, may be... But I do not think it is the case. PHP is flooded with functionality. It is the habits I guess.
Our habits
So the more I read about MVC, none of the frameworks (CI, Cake, Fuel etc) actually implement it correctly do they? :S As in, today at work our Java developer was telling me that your model is just simply data, whereas in CodeIgniter, your model has methods etc to get and manipulate data
I have no clue which to listen to ):
18:46
If someone can know PHP, kudos to him/her... Thousands of functions, libraries etc... There are many expert functions, which do specific tasks. Not like classical lego... I mean, you build your xwing fighter with lego. But with php you can build xwing fighter from parts or (possibly) find a xwing fighter part...:)
@emma.fn2 he's wrong. and code igniter is wrong too
@Ihsan Too much functions to know them all, but at least we're having a not as badly documented manual
@bwoebi thanks god..
Well he didn't specifically say the model is just data, he said you have a service layer which deals with the getting of data, think of the model more like key value pairs
It's a good idea to take every day a few minutes per day to look into the manual and learn two new functions...
18:49
@bwoebi why don't you want to use preg_replace ?
If there aren't no more functions to know, you're a god...^^
@HamZaDzCyberDeV because this looks ugly with preg_quote etc. if needed when you're using user input.
Well the workaround if "existed" will be more ugly ...
Listen to your heart.
1) What is the problem?
2) What do you have to build?
3) Can you figure it out with normal php programming?
4) Do you have time for choosing and investing a framework....
@emma.fn2 wrong, too. Service Layers only orchestrate other components in the Model. They dont have business logic or even state of their own. And if the data was just key/value pairs, your application would not do anything.
@emma.fn2 its really like I told you yesterday already
18:52
1 work say I should learn to use MVC, because I need to eventually learn Java/JSP etc.
2 ^
3 Yep, currently I'm just doing my own interpretation of MVC, basically I have a request/response class to deal with either sending HTML, or JSON based on the request
4 I've got time
@Gordon sorry lol, this is just a really confusing concept to me!
@HamZaDzCyberDeV while ($limit--) $string = substr_replace($string, $replace_by, strpos($string, $to_replace), strlen($to_replace));
This is one possibility, but not really self-explaining when looking at it without knowing it's purpose
@emma.fn2 You do not need to get confused. Just patience is needed. MVC is a hype of overbloated "techno-words", behind that curtain you do the same old trick.
MVC stands for "My Very Code"
@tereško :D
@bwoebi
$search = 'aaa';
$replace = 'bbb';
$string = 'This is aaa test to replace the first aaa and not the other aaa';

$tmp = explode($search, $string, 2);
$result = (count($tmp) == 2) ? $tmp[0].$replace.$tmp[1]:$tmp[0];
echo $result;
18:56
everyone says that they are using it , and something like 99% have no clue what they are talking about
uglyyyyy !
@Ihsan thanks, but I'm confused when I'm finding a million different resources trying to explain MVC to me, each site telling me a different thing! This is probably as close to how I'm doing it now: i.imgur.com/4wQDoVX.jpg
@emma.fn2 and that is wrong
But the java dev at work says that I shouldn't be getting/modifying data in my model, instead I should use a service layer to do that, but I have no clue how to implement that or even what I'm supposed to do >.<
@HamZaDzCyberDeV waaah ^^
18:57
@emma.fn2 that structure basically mimics Rails
I would really use:
$search = 'aaa';
$replace = 'bbb';
$string = 'This is aaa test to replace the first aaa and not the other aaa';
$result = preg_replace("/$search/", $replace, $string, 1);
echo $result;
user1596138
Hey all I have a pretty basic question I'm having trouble with... I have been searching, apparently I'm just stupid though.
@emma.fn2 That is exactly what @tereško means!. 99% have no clue what they are talking about and they start to teach! :)
That's a very high percentage :o
user1596138
I have an associative array (Formatted like $info[***] ) and i need to access only the last element in it.
18:58
@HamZaDzCyberDeV And what when I now want to $replace = '/';?
@HamZaDzCyberDeV Blame @tereško, I am his liar...
@tereško I;m back, bad news is they use DreamWeaver ....
@Ihsan lol
@emma.fn2 , them main issue with this structure is that your "controllers" already have multiple responsibilities, and since views have no direct access to the model layer, your controller will eventually start to accumulate business logic
user1596138
Assuming I have $info[1], ` $info[2]` and $info[3]. I need to access only the last value in $info[2]
@tereško ohh, maybe that's where I'm wrong. I assumed all of the business logic is in the controller, and all of the app logic is in the model
18:59
lets tart from the begining

« first day (919 days earlier)      last day (4255 days later) »