« first day (259 days earlier)      last day (4682 days later) » 

12:54 AM
Hi. Anyone here?
 
 
9 hours later…
9:26 AM
Good morning folks
 
9:37 AM
morning
 
10:10 AM
morning ;)
 
Hello @KamilTomšík @nikic
 
@KamilTomšík I tried the -S (it's available already ^^)
Doesn't work yet well
Can't use subdirectories
 
wheeere? :)
gimme win download :)
 
...
 
10:13 AM
^^
 
ah, yes, it's there!!! :)
thx
 
/me is going crazy because PHP does very strange things sometimes...
How can a code that calls two more methods be 20 times faster?
(And still calls all the other methods)
 
@nikic example? :)
@nikic btw: it worx exactly as I wanted...
C:\www\_php\php-5.4-nts-windows-vc9-x86-r312789>php -S 127.0.0.1:8080 ../router.php
PHP Development Server is listening on 127.0.0.1:8080 in . ... Press Ctrl-C to quit.
[Sat Jul 02 12:17:39 2011] 127.0.0.1:64729: /
[Sat Jul 02 12:17:39 2011] 127.0.0.1:64730: /favicon.ico
every request is then handled by router.php
 
10:48 AM
<omg> I have outspoken badge :D </omg>
 
which one is the outspoken?
 
@pros Does PHP always copy zvals when using the ternary?
 
 
1 hour later…
user379888
12:03 PM
-4
Q: Unable to display horizontal line in HTML

JustAnotherProgrammerI am new to HTML and I am trying to learn by making real life websites. I have started with creating website like Google just for learning but I am stuck in it. I am unable to display the horizontal line after the menu list. I would be thankful if someone could help me out. Thanks in advance. &...

 
12:24 PM
Morning
 
12:43 PM
@ircmaxell hi
 
what's going on?
 
good afternoon , guys , gals and everyone in between
 
Hello @ircmaxell @teresko
 
sup
 
@PHP What's wrong with you!? >:(
 
PHP
12:56 PM
@Robik why? what happen? did you miss me ? :P
 
The built-in web server don't work!
 
PHP
>:( opps! not my fault
 
it's alpha. It's not supposed to always work.
 
You don't support short array syntax too! :P
 
PHP
wait for my new version
 
12:59 PM
Will you be bugged?
^^
 
Short array syntax is useless.
They didn't implement the good change, short object syntax
 
But at least there is add_header_callback :)
 
PHP
agree with @ircmaxell..
@Robik sorry :P
Bbye :) have a nice weekend :)
 
later
 
What, saturday is today?
 
1:07 PM
@ircmaxell People do expect to work it at least basically
And currently it's really unusable because one can't access subdirectories...
 
Well, it should work, but don't be surprised if it doesn't, that was my point
 
@ircmaxell could you please check whether the chat on edit.php.net works for you?
It stopped working for me yesterday
And diffs don't work either anymore :(
 
sure
works fine for me
 
:(
 
try doing a cache refresh +
 
1:19 PM
hm, works in chrome
seems like mozilla has broken something in the nightlies
though fetching the svn-diffs still doesn't seem to work
 
ahh
 
user379888
1:45 PM
HEllo all
 
user379888
 
user379888
I dont get a reason for closing it
 
It's more HTML design than programming :P
 
user379888
Yes it is
 
user379888
But there is no reason closing it
 
1:47 PM
Probably your hr is hidden behind div
 
user379888
it is a repoen
 
user379888
And it has got more downvotes now
 
user379888
@Robik:hidden behind?
 
Sorry, i was wrong
Just remove border from hr
 
@Robik builtin server works for me
@ircmaxell for what would you want "inline" object?
no offense, just curious :)
 
2:09 PM
@JustAnotherProgrammer there is no question there
 
@teresko +1
I more dv and it will classify here :P
 
2:30 PM
@KamilTomšík What dyou mean by inline object?
 
2:46 PM
@nikic short syntax for objects
 
hey
hey
I wanted to ask, in which browsers I should check my website?
Is it enough: mozilla, safari, opera, ie
what people use besides those
 
What about GChrome?
 
hey
yeah, right, forgot that
and that's it, what do you think, friends?
 
3:43 PM
yo
@KamilTomšík to create stdclass objects easier
 
3:58 PM
@ircmaxell but for what purpose? stdclass object is just data-container
except references, you'll gain nothing from that. not even performance
 
Well, sometimes you want an object
I don't use them now, because they are a pita to work with
 
@ircmaxell you know... objects are useful because they can do things, stdclass can't do anything.
 
they are useful as data containers as well
 
@ircmaxell I would agree with you - in javascript, but not in php, because we already have assoc arrays.
 
but arrays have different semantics all together than objects
 
4:02 PM
sorry, but how's stdclass object (meant as data-container) different from associative array which already is data-container?
 
one is ordered, one is not
One is passed by reference by default, the other is not
 
stdclass does have order too, doesn't it?
and about that reference - you don't pass integers by reference, why would you want to pass structures?
 
Not in the same way that arrays do
because you may want to process a data container...
 
sorry, but I don't see any benefit for this - either I want to pass just data - for example to some method and then I don't need reference, or I want to pass object, which itself should be capable of at least one thing.
 
stdclass can be capable of at least one thing. Storing Data :-P
 
4:28 PM
@KamilTomšík That's nice one :P
 
hey all, this is basically what array_filter does: The array_filter() function passes each value in the array to a user-made function, which returns either true or false, and returns an array only with the values that returned true. BUT what if I want to delete an element from an array for which the expression evaluates to true. Is there a more suitable php function or must this be custom made?
See array_filter returns a new array. I want to delete from an existing array
 
@JohnMerlino either use array_diff(original_array, array_filter(original_array, callback)) or you'll need to write "negate" meta-function
ah, you want to change that array, replacing isn't enough?
 
yes
 
original_array = array_filter(original_array, callback);
 
I see, thanks for response
 
4:35 PM
np
 
Namespaces in PHP now !
that is heaps cool !
anyone actually started to use them ?
 
@OmeidHerat :-(
 
btw, Hi everyone :)
 
Namespaces were added in 5.3. You are too late :P
 
@KamilTomšík why ?
 
4:36 PM
@OmeidHerat what's cool on namespaces? you/I actually want inner classes
 
what is cool in namespaces ?!
 
Namespaces have been here for 2 years
 
you can kind of create your own syntax, do you want anything better then that ?
 
own syntax?
 
4:38 PM
when I started it wasn't there and I really haven't looked at it, I just found out about them recently.
kind of*
 
that's imho not purpose of namespaces
 
no but that is the cool thing for me :)
and what is an Inner Class ?
@KamilTomšík
 
class Account{ class Transaction{...} ... }
@OmeidHerat it's like function inside function (javascript), but for classes :)
 
so you will have like
$object = new Account.Transaction();
?
 
@OmeidHerat no, why would anybody else than Account want to create Account.Transaction? :-)
 
4:42 PM
fair enough
I kind of see the point, that way you have single purpose, No-Singletons ?
wait
why can't you just use a function ?
class Account{ private Transaction{...} ... }
 
it's not about singletons - it's about problem - you want class inside class - you don't want namespaces. with possibly package-private classes, you don't want Java mess
I don't see the point - function doesn't help - you can't make instance of it...
 
to be honest, I don't see a use for that.
like what would you use that for ?
 
@OmeidHerat okay - you have class Account and you want class for account Transactions
 
you can't name it just Transaction, because there could be name conflict, so you have to name it AccountTransaction - name duplication - and it shouldn't be public anyway.

namespaces solve just part of problem - they're good for separating library-level classes - public ones. like mybankinglibrary.Account, however you still have both of previous problems.
 
4:57 PM
@KamilTomšík I don't get what problems you have with namespaces? Do you want the possibility to extern symbols instead of all symbols being externed by default?
 
I think what he wants is the ability to create protected and private namespace members
(constants, classes, functions, variables, etc)
 
no, no, no, no
namespaces are great for library separation
but that's all, more levels just add complexity
I don't know, maybe it's not that bad in PHP, but in Java it's nightmare...
com.sun.netbeans.platform.subproject.subproject.events.Click
and IDE assistance is just hack, it's not solution
+namespaces are not meant to be replacement for innerclasses - myproject.account.transaction is no better than MyprojectAccountTransaction
it's still public, it still suffer from name duplication.
 
Noone one should use Namespaces in PHP until separator is \ . Code is nightmare
Dots FTW! :D
 
5:12 PM
\ ?
really ?
.
 
eih
it makes more sense. Otherwise Foo.Bar.Baz is ambiguous. Does it refer to the constant Foo\Bar\Baz? Or three global constants concatonated together (Foo + Bar + Baz)?
 
yeah, in case of php \ is better choice, sorry for that
 
i agree, the . syntax for concatenation would make it ill-suited for namespaces
 
Oh, right . connects strings :P
 
There are two sane choices that almost every langauge uses, either the object operator (such as Python), or the scope-resolution operator
PHP Chose a third, live with it
 
5:16 PM
or there are no namespaces
 
Matter of habit...
 
funny thing is... java guys were telling us "you can't do serious development without namespaces" and we did... now we have them, and I doubt it will be so much better.
now you can use >100 libraries without worrying about name-conflicts... but I don't want to use 100 libraries, if I wanted, I'd move back to J2EE
 
The only real bad thing about PHP's namespace implementation is that they were implemented only in 5.3 - and most Hosts are still on version below that
 
yeah
 
user50049
I've yet to use name spaces with PHP. It's nice to know I can .. but I have not found a need to use them (well, beyond playing with them to see how they work)
 
5:23 PM
I like the class aliasing feature
 
well, I would have use for them
but the 5.3 thingy prevents me from using it for public packages
 
I use it for public packages
 
user50049
Web hosts are brain dead.
 
yes
 
user50049
I know, I work for several of them. I would not host at any that I work for.
 
5:26 PM
lol
 
is something like
         echo something_that_returns_array()[4];

is supported yet ?
 
Yes, it is.
 
user50049
"Well, you see .. I read on some random forum on page 16 that if we .... " oh nevermind. Generally there is no 'we', you're dealing with some guy in a basement.
 
lol
 
to me namespaces:
1. say "it's okay to write as many classes as you can imagine and use as many libraries as you want, because you can"
2. say "more levels, the better, you don't want collision, do you?"
3. are another language feature - another code which can be buggy and which consumes memory and makes php and its code harder to understand
 
5:29 PM
whatever
 
then why I get an error for that ?
 
but yeah, enjoy :)
 
PHP >= 5.4
 
@KamilTomšík , please go to cause flamewars in C# channel
 
damn ! 5.3.4 here
 
5:30 PM
@teresko not going to continue on this - I just wanted to make it clear why I don't like them
 
5.4 is not stable yet is it ?
@teresko Can I give a personal suggestions ?
Guess no ?
 
@teresko but yeah, I'd like to go there and say - your language sucks because you have namespaces :-D
 
@OmeidHerat would something change, if i said "no"
 
@KamilTomšík You don't want World War III, do you?
 
@teresko no but yes might :)
 
5:32 PM
@Robik does it have something to do with c#? :-D
 
lol
 
@KamilTomšík Not really :P
 
wouldn't be so sure :-D
 
user50049
There's nothing wrong with namespaces, people who actually fork libraries really appreciate them during development
 
@TimPost yeah :) there's nothing wrong with operator overloading too... math guys appreciate them a lot...
 
5:34 PM
@KamilTomšík Yes, because most programming languages implement modulus wrong...
 
user50049
@KamilTomšík we were talking about name spaces and you came back with operator overloading?
 
@ircmaxell that's not the point :)
 
sure it is
 
@TimPost both of them are great at theory and suck in practice
 
There is nothing wrong with Singleton in PHP... oh wait...
 
5:35 PM
1.5 % 3 === 1.5... 3 % 1.5 === 0
 
user50049
@KamilTomšík but you just presented my nose as an argument against my toe .. I don't quite follow
 
@TimPost Why are you blue?
 
user50049
@nikic I'm a Moderator on Stack Overflow and MSO
 
Oh, you're a mod
 
Because he have sign near his nick. (which means moderator)
 
5:37 PM
@ircmaxell let me make it clear - operator overloading is not good, because it does not solve the problem - you want ability to define methods with name of your choice - which includes +,-,*,etc. - not ability to overload operators - and even treat them as something else.
if there's no ||= operator, you can't overload it - but if there were no operators at all, just methods with unrestricted names, you could do this...
 
but it depends what you are trying to do. Like anything, it might make sense to overload operators. But like any tool, don't say it's wrong because it can be abused
 
Will this topics is boring I found something more interesting, according to phpneeds.orchestra.io PHP needs Chuck Norris
anyone has something against that ?
:D
 
@OmeidHerat Chuck Norris?
 
@ircmaxell as I said - overloaded operators are great at theory, but not enough powerful in practice - you can't overload non-existing operator (as far as I know - because language couldn't infer operator precedence), so if you need ||= and there is no ||= yet, you can't overload it anyway.
 
@Robik Yup, with 201 votes that is top need of PHP.
 
5:40 PM
@OmeidHerat Implement it
No, i meant:
2 mins ago, by Omeid Herat
anyone has something against that ?
 
@KamilTomšík Well, but if there's no operator for it already, you're not overloading anything. And if the concept doesn't exist already, it belongs in a method instead of an operator...
 
oh I see, will some people might :|
 
@KamilTomšík That's why crazy languages like Lisp are so nice. In Lisp "+" is just yet another function name. (+ 1 2). (And you can overload it, btw ^^)
 
user50049
If Chuck Norris used PHP, most of us would experience spontaneous reincarnation and never feel a thing. I'm all for it.
 
@ircmaxell yeah, but you usually can't define ||= method because it looks like operator (for language designers) but it's not operator so you can't even overload it
 
5:42 PM
If Chuck Norris used PHP, he would use include __FILE__; all time
 
user50049
Chuck Norris has variable variable variable variables.
 
@nikic exactly, less is more
 
but it's non-descriptive within the context of a lnaguage
 
@TimPost and you can have that with php !
 
@ircmaxell first step - allow unrestricted method names, next step - drop operators at all
 
5:43 PM
so if you saw foo ||= bar, and the langauge had no concept of a ||= operator, the casual reader has no clue what it's supposed to do
I'm done for now
 
@ircmaxell yeah, and if there were no operators... it would be clear :)
 
$variable = 'something';
$something = 'next';
$next = 'a';
$a = 'the object!';

echo $$$$variable;
will retrun the object
 
@KamilTomšík Well, in PHP you can't get unrestricted method names. That's only possible in languages that have an entirely different concept of writing code (like Lisp ^^)
 
eih
 
In PHP there would be just too many ambiguities
 
5:44 PM
/quit "eih"
 
@nikic I know... was just academic discussion :-P
okay, let's end this...
 
@ircmaxell bye :)
 
later
 
alright
later everyone
gotta get some sleep
 
Later @ircmaxell @OmeidHerat
 
5:45 PM
@ircmaxell sorry for that - if I screwed your mood.
later
 
nah
 
user50049
Apparently, swig isn't as easy as it seems
 
Is there any programmers community(forum) for all(most) programming lanuages?
 
Maybe some forum/bb?
 
dunno
 
6:58 PM
˙sʞloɟ ɐʎ ǝǝS
 
 
2 hours later…
8:57 PM
ternary is really evil
reaaaaaallllly
 
lalal
 

« first day (259 days earlier)      last day (4682 days later) »