« first day (335 days earlier)      last day (4835 days later) » 

user680786
14:00
@Gordon in this case framework borns together with application. Not like "well, we done with application, let's write framework for it". Thanks for link, anyway :)
Seriously though, I didn't know half the stuff I know now.
@TimothyPerez that actually is a statement that is true at any point in time
Jon
Jon
@TimothyPerez: so when are we expecting the DoublySecureGate? ;-)
I'm curious what this secure gate does. I really am curious
@Gordon Thanks for being cynical.
14:04
i think we can fit the SecureGate in one of the following : alleg.sourceforge.net/docs/resign_patterns.en.txt
@TimothyPerez im not. actually, im serious. i say that to myself all the time as well. there is just so much to learn left. it never ends.
@TimothyPerez It's not cynical. It's true. If it's not, get out of the industry now, because as soon as you stop learning you become a liability to everyone around you...
@ircmaxell for example, if you were creating an add-on module to the site and it needed to exchange sensitive information about user account information
I was developing a CMS
@TimothyPerez That still doesn't make sense. Exchange sensitive info with what?
user680786
@TimothyPerez it sounded like confession
14:08
Don't worry about it
It's better not to even explain
@Gordon I find it odd that an autoload generator doesn't even use autoload for its own classes...
user680786
user680786
@NikiC thanks
@ircmaxell spl_autoload_register(array('\ezcBase','autoload'));
14:13
@Gordon none of the samples use that :-P
@ircmaxell its in phpab.php. it's a PEAR package
Jon
Jon
@NikiC: My highest ever upvoted PHP answer has just been made obsolete... embarassing
@NikiC Yay! Implemented closure rebinding as parameter to bindTo. (Gustavo Lopes)
$closure = function() { $this->doSomething(); }; $closure->bindTo($that); $closure();
@ircmaxell /me grumbles
@salathe is there ever anytime where you would consider using a static variable?
Jon
Jon
14:16
@ircmaxell: does that let you use instance methods from the closure then?
actually, does that let you violate encapsulation? Since you can re-bind, does it have access to private/protected scope of its object? Or does it have the same scope available as the caller which did the bind?
@TimothyPerez yes
@salathe Why?
@ircmaxell mostly because of Closure::bind()
@Jon Yes. And allows to rebind the $this var ;)
14:16
@salathe wait, huh?
@salathe thank you, and in which rare example would you use it?
@ircmaxell I just don't like that Closure::bind() exists
given "Anonymous functions are currently implemented using the Closure class. This is an implementation detail and should not be relied upon."
@salathe true
@TimothyPerez whenever I want something to be static, you'll know it when you need it
@salathe That's quite fair. perhaps a bindTo($closure, $object) would be better?
Jon
Jon
14:18
@NikiC: I got the first part, but what's really the point in being able to bind $this to anything?
if you have access to $anything then you can use ($anything) as well
@ircmaxell I'm happy with bindTo(), just not that static method.
@salathe What? They really added a static method on the closure class for that?!
@salathe Right...
@NikiC bingo
@Artefacto boo :)
Ohhh, weird
user680786
@NikiC so answer is yes?
Jon
Jon
@Gordon thanks
$new = Closure::bind($oldClosure, $newObject); yet this is also valid: $new = $closure->bindTo($newObj);
14:21
the static method already existed when I touched it :p
user680786
@ircmaxell thanks
I only added the extra parameter
for scope...?
@salathe Do we have a chance of getting it removed again, as long as 5.4 isn't released?
14:23
The Closure::bind method I have no issue with since it doesn't really depend on the implementation detail of closures (since you can change the internal representation of the closure, yet still keep the class and static method for legacy reasons). The Closure::bindTo method I kind of take issue to, because it depends on that the closure is an object with a method (therefore exposing the internal representation)
@ircmaxell I don't think you can call that an implementation detail anymore, even before 5.4. See google.com/codesearch#search/…
@NikiC probably not, the vote for it to go into 5.4 was 32 for, 1 against.
@Artefacto That's what Callable was introduced to fix
@salathe who was the 1 against?
But if projects choose to ignore the docs, that's their problem
14:25
@Gordon "Sammy Moshe (sammymoshe)" -- i've no idea who he is
@salathe dunno either
I have a situation im stuck in....I have never worked with "grabbing" xml files...I have a network monitoring tool Service Desk Plus and I want to grab its error logs and reports in xml, I dont know how to grab the xml of something...
if you look for "instanceof\ Closure", there are even more results
it was clearly communicated that "it's an implementation detail and should not be relied upon"
@ircmaxell true but that doesn't mean there isn't already a large amount of code that uses that "implementation detail"
14:26
i know i can use fwrite to write the xml with php but i dont know how to grab the xml because i havent ever worked with it
@ErrorErrorError any of these will work with XML as well stackoverflow.com/questions/3577641/best-methods-to-parse-html/…
@Gordon as far as I can he, he's not involved with PHP
and really there is no foreseeable need to change the closures implementation not use a class
Jon
Jon
@ErrorErrorError: Look into DOMDocument
well this is what I have
<?php
$dataURL = "http://www.whatever.com/whatever.xml";
readfile($dataURL);
?>
one sec guys ill read into that
i was always scared of the word DOM
14:28
@ErrorErrorError lots of examples on how to use DOM stackoverflow.com/search?q=[php]+user%3A208809+dom
/me sneaks up behind @ErrorErrorError and yells, "DOM!!".
@Artefacto True, but that's their problem :-P
one sec i will read into this
user680786
@ErrorErrorError ok, we'll wait
Jon
Jon
he's the one you should have asked about speed reading it seems
14:30
This one is interesting: google.com/codesearch#vbKtFRTBpeE/… :p
the line after is even worse
it's not just redundant like the first; it doesn't work in all circumstances
@Artefacto WTF? if is_callable fails, it doesn't matter if it's a closure...
so that branch of the code will never be true, so it's dead code...
@Artefacto: Why is the line after it even worse? (In 5.3 I would agree, but not in 5.4)
@Artefacto Should submit bug reports to Symfony and Doctrine at least
5
A: Testing for a PHP Closure without referring to the Closure internal class

GordonYou can also use ReflectionFunctionAbstract::isClosure — Checks if closure Example: $poorMansLambda = create_function('', 'return TRUE;'); $rf = new ReflectionFunction($poorMansLambda); var_dump( $rf->isClosure() ); // FALSE $lambda = function() { return TRUE; }; $rf = new ReflectionFu...

@NikiC Right, in 5.4 that's fine, but in 5.3 it could fail significantly
Jon
Jon
14:36
@ircmaxell: I had that wait what moment as well -- but is_callable isn't documented to work with closures (never mind that it does)
maybe that was simply the result of lacking docs
@Jon Hmm good point
it should be updated
but then, the weekly sync of Friday already happened, so not point in updating the docs for another week :p
@Jon It is supposed to work with closures (actually, any stringCallback, array('class', 'callback') and $obj (as long as it implements __invoke). So that's a doc issue...
Jon
Jon
@ircmaxell agreed
@ircmaxell file a bug, assign it to @Artefacto :) (and fix it yourself on edit.php.net :D )
@salathe I'd just update it myself if I had the motivation to file a bug for it...
14:40
@ircmaxell oh you can, yeah go do that :)
:-D
Perhaps tonight... If I can get the ballmer peak correct...
apple uses automated schnaps ivs? Oo
user680786
@Gordon for designers only
I have a feeling that would hurt... a lot
i dont understand the tooltip
Jon
Jon
14:46
@Gordon: because you are not Steve
user680786
@Gordon IV here means
user680786
In substance dependence and recreational drug use, drug injection is a method of introducing a drug into the body with a hollow needle and a syringe which is pierced through the skin into the body (usually intravenous, but also intramuscular or subcutaneous). This act is often colloquially referred to as "Slamming", "Shooting", "Banging", "Digging", "Rigging", "Smashing", "Pinning", or "Jacking-up" Although there are various methods of taking drugs, injection is favoured by some users as the full effects of the drug are experienced very quickly, typically in five to ten seconds. It als...
thx
iv == intravenous
user680786
@ircmaxell "==", hehe :) coding everywhere
14:54
ok , ignoring the search thing , the final version of that small thing i had to make
have i missed something ?
the autocomplete thing is on first input only
user680786
liitle Bobby Tables was there
autocomplete itself is kinda crappy , though i added wildcard support
user680786
user680786
picture: dark blue font on almost black background
15:00
i actually found a bug .. brbr
user680786
@all see you later, thanks for todays portion of knowledges and fun, bye
i have a form that requries a username n password to submit. I dont have the users put the login and pass in, instead i use a default account's credentials in the backend. But i want to hide the credentials from view source..any ideas>?
							<input type="hidden" class="txt" NAME="username" value="jodeful" style="width:200px;" />

							<input type="hidden" class="txt" NAME="password" value="v*j8k5657"  style="width:200px;" />
<input type="hidden" class="txt" NAME="username" value="<?php $myFile = "username.txt";$fh = fopen($myFile, 'r');$theData = fread($fh, filesize($myFile));fclose($fh); $_SESSION['usrnm']=$theData; echo $_SESSION['usrnm'];?>" style="width:200px;" />
							<input type="hidden" class="txt" NAME="password" value="<?php $myFile = "pass.txt";$fh = fopen($myFile, 'r');$theData = fread($fh, filesize($myFile));fclose($fh);$_SESSION['pwd']=$theData; echo $_SESSION['pwd']; ?>"  style="width:200px;" />
i know its a big mess
but i was trying to use sessions to hide the credentials
you can't
Jon
Jon
@ErrorErrorError: so basically you want a way to access something without credentials
don't populate it with the original password. Leave that blank
Jon
Jon
15:03
why do you bother with credentials at all?
@Jon the form POSTS to a servlet API which remotely logs in to a network monitoring tool to create a ticket
Well, don't do that...
so i am passing the credentials but i need to hide them from the user
you can't
Jon
Jon
@ErrorErrorError: ok so why don't you have the servlet fetch the credentials it needs from somewhere else?
doesn't have to be from the form
15:05
thats another subject but basically i cant
servlet is not mine its part of a commercial product
@ircmaxell i guess ill just hope my coworkers dont screw around then with defautl credentials
Jon
Jon
@ErrorErrorError: what you really can't is hide the credentials as ircmaxell has said
but
could you maybe create an intermediate step?
@OZ , changed
Jon
Jon
your own form submits to your own script
what else should i fix ?
Jon
Jon
script gets the data and adds credentials from somewhere else
script does curl on the servlet
what about that?
15:08
i suppose that might work but the extra trouble or time id spend on it wouldnt be worth it, my users are mainly the team so i can expect them to be sensible
Jon
Jon
@ErrorErrorError: yeah probably most practical decision
anyone else willing to hunt for stupid mistakes in 81.198.250.253 ?
@ErrorErrorError Import it better, perhaps by sending the ajax call to your server where you make the call in the background
Good morning folks :)
@tereško looks like you fixed the 1 issue I saw in it (seeing as though it comes up now)... other than that, since I don't speak foreign languages I couldn't tell you anymore all I can tell you is when i click on the 2nd tab, it takes me to that page...
15:24
nevermind then
although lots of errors on /entry
now there are errors everywhere
heh
decided to change how tempaltes get organized
ahh fun fun
this an MVC you're working on?
15:29
justin o.O do i know u?
I don't know, do you?
nvm
the coworker beside me is a dev n his name is justin too
:P
lol
yeah i'm a dev but i don't have coworkers :)
I don't have a 'job' (or so my mom says).. but I do a lot of work for people (guess you could consider me a 'freelancer'
15:31
@Justin , not really , but that thing works on a bastardization of mvc
really crude bastardization at that
@tereško only thing that made me think it was an MVC was because of the errors showing /application/ which is where all the files for codeigniter goes lol
i think this weekend I'll stop thinking about the design for my own website and work on some more code for my MVC -- that'll be fun :D
although speaking of design, thecodestar.com/codestar.png, where the hell should i put the navigation?
@Justin , wanna make a good mvc : do it TDD way from the start
unittests are good way to get a perspective for "does this make any sense ?" question
yeah... any unit testing systems you prefer?
A lot of people seem to really like SimpleTest
@Justin But most use PHPUnit ;)
@Justin A whole lot more use xUnit
15:39
@Justin i dont know any
(phpunit is a PHP implementation of xUnit, which is available in around 60 languages or so)
PHPUnit +1
being that I use aptana studio, there is also a plugin to do it right from the IDE as well.
and i have never heard about that "simpletest" thing
@tereško Me2
15:53
@salathe Do you know whether there are any plans to deprecate ticks?
@NikiC I'm not aware of any
Ticks are useful for one and only one thing
signal handling...
i think php.net should have a separate section with that name : "useful for one and only one thing"
signals and goto would have a nice place there
huh? signals are quite useful
I've used them in at least a dozen projects
@ircmaxell Why not call de3.php.net/pcntl_signal_dispatch in a loop?
16:04
@NikiC because sometimes you want to do other things besides wait for a signal
@ircmaxell Maybe I am just prejudiced against ticks ^^
@NikiC agree normally, but in this case it can be useful
Jon
Jon
@NikiC: really, everyone is prejudiced against those tiny bloodsuckers ^^
I'd be happy if it would call the handler without the need for ticks, but as implemented I'd use them
@Jon im sure psychologists would mind if ticks got deprecated
16:08
But what PHP should definitely drop support for is the $$var[dim] syntax. It's just so unintuitive.
Jon
Jon
@Gordon: not to mention that intel would release new cpu lines every other year
oh the ambiguity
@Gordon Exactly. It doesn't return the [dim] of $$var as you would expect, but it gives you the variable with name $var[dim] :(
Jon
Jon
@NikiC: ouch
although it's kind of like complex expressions with lots of operators
you 'd be putting in parens (or curlies in this case) to be sure what's going on
or hmm
actually ${$var[dim]} is the default
@NikiC just don't write it, problem solved
Jon
Jon
16:12
you can't really specify the other inline, can you?
@Jon sure you can, why not?
Jon
Jon
@salathe: neither {$$var}[dim] nor ($$var)[dim] is legal
@salathe I'm more concerned with the parsing nightmare. I was looking into ways how to generalize PHP's variable / call / variable operation handling and this really stung me in the eye.
@Jon okay, and?
@Jon ${$var}[dim]
Jon
Jon
16:16
@salathe, @NikiC: just got it :)
@Jon thumbs up
Jon
Jon
for some reason that option didn't come up
getting back to hacking on code where I can't embarass myself
or at least I 'll be the only one who will know
/me peeks over @Jon's shoulder
Jon
Jon
@salathe: it's asp.net mvc -- don't tell anyone
@Jon only if you don't tell that I'm writing XAML/C#
16:20
@Jon @salathe Whahahahaha, I overheard that conversation and am going to tell everyone!
Jon
Jon
@NikiC: if I turn in @salathe as a heretic do I escape the gallows?
@Jon :P
Just remembered:
Jul 4 at 14:19, by salathe
PHP sucks.
Jon
Jon
@NikiC: I 'm telling you! ^^
tiptoes towards the bottom of his profile blurb to make a certain edit while there's time
@Jon ?
Jon
Jon
@NikiC: "PHP is probably the ugliest language I 've ever used. So why do I love it?"
16:37
Should PHP support syntax like $this->getClass()::$property?
definitely : NO
its like asking "should 5 pills of extacy come with free extra heroin?"
.. and remember kids .. there is such a thing as "good drugs" , but they dont come in pills or require sharp implements
16:59
@NikiC it supports $this->getClass()->property so I see no reason why it shouldnt also support $this->getClass()::$property? apart from the static being static that is.
if there was one thing i could change about php , it would be "remove the statics"
@tereško and the references and the final and the private and the global keyword, yeah, i'd like that, too. But it aint gonna happen and with PHP being as it is now, it should support static property dereferencing
oh .. yeah .. the list is quite long
So, i just got some sotftware from someone that I have to alter a little bit and in the HTML I see something i haven't seen before...

<!-- <form action="https://ironfist.infusionsoft.com/AddForms/processFormSecure.jsp" method="POST" accept-charset="UTF-8"> -->
<form action="thankyou.php" method="get" accept-charset="UTF-8" enctype="multipart/form-data">

so I get that it submits to the 'thankyou.php' but does it also submit to the infusion soft one?
@Justin no. its a comment
Thats what I thought too, was trying to figure out how the hell this guy says its supposed to be communicating with the infusion soft system lol...
I think what I'll end up having to do is use ajax to run an async connection to the infusionsoft then return true so that it can go the rest of the way...
17:49
hey @Gordon :)
@KamilTomšík yo
@NikiC wow, everyday something new.
@Gordon I'd vote for extends, that could filter out huge amount of pseudo frameworks
:)
extends or extenze? two very different things :)
@KamilTomšík i dont agree with what you said about extends yesterday :)
17:54
@Gordon if you wish, I'd be very pleased to hear valid use-case for extends :)
@KamilTomšík SpecialCase pattern
@Gordon example?
@Gordon ok, later - but, how special case implies extends in any way? that's subtype (interface) not subclass
@Gordon mock is special case too (in this sense althought it's just proxy)
18:30
wow chat just died
18:45
works for me :-P
;)
19:40
@Kamil i dont mean it doesnt work.. i mean no one is saying anything.. it's 'dead'
anyone want to help me with array output?
@Justin yeah, I know - that's why I've used that smiley :)
noone will help you until you show something
@Kamil very nice lol... I went out of chat for a while, while i try to figure out this api integration for infusionsoft...
@MichaelEcklund perhaps you need to have a look at your question again. To me it looks like you have your answer.
FIREEEEEEEE
-11
A: Alternative to if(x >= 200 && x <= 299)?

Ed HealPlease tell us why? The question is stupid

19:51
yes i see that. simple fix. i always over complicate php
Well, you could theoretically run a dual foreach too
foreach ($data as $row) {
foreach ($row as $key => $value) {
// do stuff here
}
}
0
A: Alternative to if(x >= 200 && x <= 299)?

Kamil Tomšíkreturn in_array(range(200, 300));

@Gordon @hakre (About $this->getClass()::$property) Misunderstanding: This isn't something PHP has. I am wondering whether one should add it (and generally allow any variable construct on the lhs of variable operations like object operators, score resolution, array dereferenciation).
@genesis I think if i had the points to downvote I'd downvote that answer myself. That's just ignorant.
@KamilTomšík damn it would be bad performance with this
19:56
@genesis I'd prefer readability over performance.
same here
@KamilTomšík Uhm, so you would create an array with one hundrer zval structs and then do a linear search in them for the sake of a quite questionable increase in readability? (I would consider a normal range check just as readable).
@NikiC in this case I don't care about those 100 iterations
@NikiC +one day, maybe... range won't return array but rather object
@KamilTomšík Sad. Really sad. I do advocate the approach to not prematurely optimize, but this is really just a waste of resources for very little to no increase in readability.
@KamilTomšík By the way, is there any progress with your language?
20:40
nope, too much work :-/
user680786
21:28
@KamilTomšík so take my downvote for your answer
user680786
other answers looks terrible too
user680786
@stevether hi
user680786
Python isn't my language, definitely. "print 'Integer A is greater than B.' if (abs(a-b)==a-b)" - wooaa
user680786
21:33
also "else 'Integer B is greater than A.' - oh, wtf.
user680786
14:37 LA, 17:37 NY - and where is all of you?
21:50
@OZ_, that's part of python's awesomeness
user680786
22:10
listening now:
user680786
@NikiC $bla::$property does work already. In my eyes, it's enough. Not much use in static class function calls anyway.
hello guys
user680786
@toopay hi
@NikiC I know. I understood how you meant it. :)
@KamilTomšík yeah, can be interface but doesnt have to be be. Can be extends as well. You dont want to duplicate any stuff that is the same in the supertype and it might not be worth the effort to do a strategy pattern for just that which varies.
@KamilTomšík i agree to favor composition, but i dont think it should be exclusive
22:21
I'm about starting to write my first technical article. Anyone here have a good title to be shared? I plan to write a series articles of how to build a high performance PHP apps.
user680786
@toopay title: How to build a high performance PHP applications
user680786
good questions contains half of answer. Or more.
That was my plan, but sounds too dead plain. Don't want to be over dramatic too, just looking for any seasoned blogger advise :) OZ_ did you have blog?
@Gordon I think composition really should be exclusive. how hard is to write your own version of composition-extends based on __call? it won't work with autocompletion and it will be little slower but you'll gain exactly what you want - reuse existing functionality, but replace certain parts of PUBLIC interface, you can't access internal state of parent, of course - and that's a good thing
"Building High Performance PHP Applications" - shorter
Or BHPPHPA
22:27
sorry, it will work with autocompletion if you define interfaces
btw: anyone read this? http://jonathan.tang.name/files/scheme_in_48/tutorial/stdlib.html
it's awesome :)
Buhhupuhupah
user680786
@toopay yes, but I can't say "seasoned" about my topics :) Except jokes: it's normal title. especially if you know something about high performance.
@OZ_ btw: it's good practice to leave comment to your downvote.
user680786
@KamilTomšík now I think it's a bad practice, because it causes only pointless arguing
@OZ I'm not going to argue with you, I'm just curious how many people will agree with your opinion, that's it
22:33
You're bad and you should feel bad for it.
@stevether huh? :-D
user680786
@stevether I do
23:23
... and the battle for good OOP in php rages on
no one will ever win
23:39
why are people always picking on no one ? what he has done to you ?
Who's no one?
@stevether You don't know him? He logged in -5 minutes ago.
hello everyone
anyone knows about paypal adaptive payment
??
23:49
paypal has an adaptive payment? must be new since they fucked me over and i stopped using them...
yes paypal has adaptive payment, if you have used then only reply..
@stevether You mean Thai? No I'm not particularly addicted to Thai cuisine... upload.wikimedia.org/wikipedia/commons/0/07/Insekten.jpg
@ChristianSciberras Once I saw that name of that jpeg I decided not to let it load any further.
Well, it looks ok except the lower-right one
hey some of those items arent bad actually ;)
yeah those don't look appetizing at all
23:52
I've tried hoppers once, crunchy!
hoppers are good...
good dipped in chocolate too :D
Man, those are some big roaches. We have German cockroaches here, but not that big.
yeah they are giant lol.. big enough they'd scare my cat
(no idea why they're called German cockroaches, maybe they dropped in during WW2?)
the cockroaches here are smaller than the hoppers hehe
23:54
@Justin Well, it would actually scare my s* off if that appeared suddenly in my bed.
@ChristianSciberras oh god yeah
@Melros , can you explain what exactly were you trying to do ?
I should buy one somewhere (even if its fake) and plant it in my moms house lol
what were you separating in different files ?
@Justin That would be something @tereško would do. That guy is evil I tell you.
23:56
ha ha
help me find a place i can buy one
@ChristianSciberras , i am not evil .. per se
@tereško Must be the effect of PHP Chatroom on you ... lol ... hmmm...red room, ever heard of that story?
as for bugs , in dorms my neighbor has a pet madagaskari tarakan
uughhhh why did I even bother searching!?!?

« first day (335 days earlier)      last day (4835 days later) »