« first day (683 days earlier)      last day (4280 days later) » 

7:00 PM
@NikiC only the more falsy ones :)
 
,____,
// '`
 
pce
i have stupid problems with namespaces...
 
@pce yes?
 
pce
namespace x {};
PHP Fatal error:  No code may exist outside of namespace {}
 
7:01 PM
@LeviMorrison I want to make it an E_STEP_AWAY_FROM_THE_KEYBOARD error in 5.5...
 
pce
^ Thats solved, no semicolon allowed
 
$a; var_dump($a); # null with notice
someone care to explain this?
 
$a is not defined
 
pce
@Neal But call_user_func with namespaces...
 
@webarto 'splain what?
@pce but what?
call_user_func("\namespace\function");
 
7:02 PM
I don't have to check if things exist or anything.
 
boo
 
pce
@Neal i register the Callback in the global scope:
Zend\Registry::get('mediator')->register("user.register", "\XHooks\sendMail");
wait a second i'll try again.
 
@pce ok?
 
@pce that code makes small children bleed
 
@ircmaxell I was nervous about it when writing it but I like that it works. Whether it was a great decision or not I don't know.
 
pce
7:07 PM
@tereško why?
 
@pce It's using a Registry to get a mediator. Does that not scream awful to you?
 
@ircmaxell @Neal just did another test... echo $x === NULL? 'NULL': '!NULL'; # NULL + Notice ... wanted to say, it defaults to NULL?
 
@webarto huh? I am not sure what you are saying....
 
Nevermind :)
 
@webarto yes
 
7:14 PM
anyone have a good AppStore lookup class? I'm bad at writing original things
 
pce
@LeviMorrison Yes, that sounds not good, i dont like the SingletonRegistry and i want to get rid of it, but for know its easier than a ServiceLocator or DI. <ironic>And i'm thinking about a big XML File which maps all Dependencies ;) </ironic>
 
@ircmaxell thank you
 
@pce I've done that before
 
pce
depencies in a xml file, like some J2EE Frameworks do?
 
@pce SingletonRegistry is easier to use than DI, maybe. It allows you to be sloppy. However, DI is much easier to maintain and test.
 
7:19 PM
0
Q: css vertical menu issue in wordpress

rahularyansharmaI am new to wordpress development and i have html file to change that into wordpress theme. I have read some good tuttorial to check how to create wordpress theme and so far i made the index.php and header.php and footer.php side_bar.php also changes the path of all files (images and js) to t...

wordpress & css menu issue
 
Error suppressor: As evil as eval? Opine.
 
Depends, but no. Context?
 
Most developers are willing to brand eval as typically evil, to the degree that context is not slowing anyone down from trotting out "considered harmful", even though there are contexts where it is the right tool. So, without context, I am curious to see if you guys place @ in the same boat.
 
@webarto not enough F-bombs in the angry one
 
7:24 PM
@webarto @ircmaxell reminds me of this
 
lawl
 
yeah, that's good
just not nearly enough profanity
 
^^
 
15,000 records moved in 100-record batches from Access to mySQL, check! Damn that was tedious.
 
funking chat tabs
@Chris eval is a hack
 
7:28 PM
there is a weather situation outside.
should I shut down my computer now?
^ would this be eligible to post as a question on SO ?
 
nope, let the mofo burn
 
pce
@hakra hi! flashes?
 
flashes and thunder ;)
 
@hakra apparently, no one will stop you to post.
 
@webarto Error suppression is a hack
 
7:29 PM
yes but I fear the rage downvoters who say that this is not a programming question
 
I'm not sure why would one return access_token via URI fragment after login ._.
 
@hakra Have you got a surge protector?
 
@Chris I've seen functions that sort of rely on @, but I haven't seen eval used anywhere (e.g. in the manual)
 
@ShaquinTrifonoff Well the thingy where those sockets are in says so.
 
@Donut because JS?
 
7:30 PM
but I do not have any of these fallback-batteries on my workstation.
 
I want PHP
 
Well, it's up to you then if you want to shut down your computer or not, @hakra.
 
@Donut POST is issued for PHP
 
@Donut I don't
 
Now I have to create script that passes fragment to server. Not sure if possible with disabled JS
 
7:31 PM
@ShaquinTrifonoff but what is common?
 
@ircmaxell There should be some parameter at least that makes accessCode post/fragment/get
 
or what is suggested?
 
I don't care about disabled JS, go shoot yourself... I disable JS for pr0n or torrenting...
 
@webarto You can make a case where @ is the easiest way to do something, you can also make a case for eval. For example: php.net/manual/en/function.eval.php#107377 <-- solving math equations from strings.
 
Incognito Mode FTW
 
7:32 PM
You could parse all the numbers and operators out and avoid eval... when you use @, there's another way to do approach it.
 
another trick is to let it pass through the PHP tokenizer first and filter based on that.
 
@Chris php.net/manual/en/… maybe for functions with "unpredictable" outcome...
 
So... we can sit here and bat around the particular merits of the two things, or you can say: do you consider @ to be generally something to avoid, on par with eval? I say yes. You say no, but it doesn't seem like your exception is consistent with your attitude toward eval
 
I don't always forget what I wanted to say... but when I do
3
@ircmaxell meetings with whom :P ?
Sirius question: how does one keeps hands on laptop (let's say Macbook) and keep it clean (non greasy)...
 
7:39 PM
My website is going on and off, so I'm going to make a backup and transfer it to another account.
 
the only place i've ever used error suppression in production: @file_get_contents('php://input');
 
@webarto I don't, I use an external keyboard...
@orourkek
 
@orourkek You should use set_error_handler.
 
I have one, however I saw some very, very funky results from file_get_contents at the time
 
@ircmaxell Care to share what keyboard, I really like laptop one... but I clean it everyday... I keep hands clean but still...
 
7:41 PM
you like the mac keyboard? Good god, it's one of the worst I have ever used
3
 
True, @ircmaxell.
 
user895378
@ircmaxell same keyboard here.
 
that's what I use (right now, and at home)
 
Hi @Lusitanian.
 
hola
 
user895378
@ShaquinTrifonoff If you're writing library code you may not necessarily have control over the error handler in place outside your code. Also, registering a custom handler and then restoring the previous handler isn't a very good option for a single line of code.
 
@ircmaxell I don't like Mac at all, it's similar to one I have laptoping.com/wp-content/uploads/… and I can see filth on aluminum case... and yes, that is the best keyboard I guess...
@ircmaxell #firstworld
 
@rdlowrey Ah, I see.
 
pce
@ircmaxell yeah, trackball! i also use a trackball but logitech.
 
<- #thirdworld
 
user895378
7:43 PM
@ShaquinTrifonoff But you're right: if at all possible errors should be treated as exceptions.
 
@webarto it's that expensive because it hasn't been made in like 6 or 7 years, and they were the best trackball ever made, so the used market is $$$...
I payed $20 each for my 5
 
ah I see, well that is great...
 
personally, i just use the jquery keyboard
 
I guess best thing MS produced is Keyboard and a Mouse...
 
7:45 PM
the ironic thing is i like their hardware better than their software
 
And support for jQuery
 
i've used their mice for years
 
@Lusitanian I NEED THIS PRODUCT. Does it come in iPhone White?
 
@Chris the jquery keyboard?
You can just do this:
$('keyboard').css('color', 'white').mockApple().dontGetSued(); with the power of method-chaining
 
@Chris You speak in such a fashion that I don't understand a word, but yes, @ is evil, but eval is eviler
 
7:49 PM
disagree
@ is worse
 
I am agree
 
you just said the opposite
 
I would say they're both in the "don't use this, ever (unless you're expert enough to know when you should use it, in which case you still won't because you'll find a better way)"
 
I can't argue with you...
 
eval('return @file_get_contents("php://input");');
 
7:50 PM
Which boils down to "do not use"
 
@ShaquinTrifonoff toss @ at the beginning as well...
 
Oh, yes, I forgot.
 
29 mins ago, by webarto
Depends, but no. Context?
 
@eval( return @str_replace( @file_get_contents('php://input'), 'test', 'this' ) );
 
:p
 
7:51 PM
@eval('return @eval(\'return @file_get_contents("php://input");\');');
 
$.ready(function () { @eval( return @str_replace( @file_get_contents('php://input'), 'test', 'this' ) ); });
 
@webarto That flag you suggested earlier was denied. No evidence (please don't link to the earlier chat msg)
 
I've changed my mind about backbone.js, actually seems to be a useful scaffolding structure for building structured objects quickly
 
You can't mix JavaScript/jQuery and PHP, though.
 
@ShaquinTrifonoff Can't I?
 
7:52 PM
but it requires jquery
 
@eval('`php -r "@eval(@eval('`php -r "eval("`');"`');
aaaaand I'm lost
@MikeB so double standards?
 
@webarto Probably.. last time I flagged something like that I was banned for a week
 
@Lusitanian wrong tool for the job
 
@ircmaxell backbone?
 
check out backbone JS if that's what you want
 
7:54 PM
that jquery thing was a joke :P
i thought the "car design pattern" might've given it away -- guess not :D
 
@MikeB I didn't wanted to flag it because outcome was obvious, I guess they couldn't do that to 100k or respected users...
 
@webarto you mean sometimes moderators have double standards?
tell me more about this "bias"
 
@Lusitanian not sure if sarcasm? :)
 
it was
stupid internet
 
yeah they do have :)
The best solution is to flag a question for moderator attention, and including a link to the suspected duplicate user profile.
and get banned in the process @MikeB :P
 
8:00 PM
It was a good week :)
Apparently there's things to do outside
 
Hah, I'm going to flag it now
 
Flag what
 
‎‮Hello‎‮‮
‎‮‮duplicate account
duplicate account
 
flash video stuttering on linux -- a problem apparently better left unsolved
 
flash video pixelating on brand new machine with win7
 
user895378
8:08 PM
None of this would be a problem if Flash would just hurry up and die already.
 
@rdlowrey but then we'll have Flash-Flash backs
 
@rlemon rotten
 
user895378
@rlemon So cheesy, but I couldn't help but laugh.
 
Hey guys. I got a small code problem..
if ($login_admin != 4) works, but if (($login_admin != 1) || ($login_admin != 4)) doesn't work for the value 4.
 
if( ! in_array($login_admin, array(1, 4))
 
8:10 PM
@AlexCastro lies codepad.org/FsYjULV0
 
@AlexCastro that's always true
 
I'll go with your way webarto
 
don't go my way, I'm lost
 
Someone today explained to me that he uses Internet Explorer because "Microsoft's Internet has more than the other one's internet, microsoft is the one with yahoo"
 
internet, can you put that on bread?
 
8:12 PM
@webarto lol thanks it worked.
 
of course it worked, it's taken from jQuery.inArray
 
jQuery cures problems in php
amazing
 
($login_admin != 1) || ($login_admin != 4) should be !($login_admin == 1 || $login_admin == 4)
 
@ircmaxell ding ding ding
 
@Lusitanian and that was 2 years ago... wow...
 
8:14 PM
@Lusitanian yes you do stackoverflow.com/questions/5833790/… Anyway as I said I'm putting up the website for demonstration purposes, so not online. — Matthieu 14 mins ago
 
LOL demonstration purposes, offline
 
@webarto i'd watch but it uses flash
 
// GoTo
function GoTo($page)
{
    global $FullPath;
    @header('Location:'.$FullPath.$page);
    echo "<script language='Javascript'>
                window.location='$page';
                </script>";
}
 
:)
@webarto please don't show me that ever again
 
@Chris
haha
 
8:16 PM
> Nothing in the core throws an exception, why would this?!
 
lol
 
@ircmaxell who said that :P ? (and where do you guys hide)
 
news.php.net
 
cheerio
 
8:19 PM
@webarto i will now be singing this song in my head for weeks. i hate you
 
:)
deploying PHP websocket server in production, wish me that I don't get fired :D
 
@webarto I hope you do get fired because DYL-an BER-lin BayofpigsinVA-sion
 
user895378
@webarto You mean a socket server listening for ws:// and wss:// protocol messages written in php? (sorry for super-ping)
 
@ircmaxell plain wrong, actually throw throws exceptions and is part of core.
 
@dyelawn pigs eat my liver in berlin?
 
8:23 PM
@hakra which is why the
 
@rdlowrey I like ping, I stole it from SO for this... i.imgur.com/nJxUm.png
 
@webarto it's the part of that song that gets stuck in my head anytime i hear it. the most asymmetric rhythmic accommodation to his string of pop culture references.
 
@webarto Wut?
 
@dyelawn ah sorry, forgot :)
 
@webarto but yes, pigs do eat your liver in berlin
 
8:25 PM
@Chris nothing, look at teh code using @
 
thank you, lightning, for giving me a calendar reminder two hours after it happened
 
yup
 
@webarto since you posted that song i figured you should see this
 
@Lusitanian I saw it ... 3 years ago :P
 
@Lusitanian as a Floridian, quitcherwhinin'
 
8:26 PM
i saw it nearly 5 years ago :)
 
I haven't had 'puter back then
 
all you need is jquery though!
 
I got a question you guys might know about. I want to style the "Choose File" button of: <input name="uploaded" type="file" />
But if I style that input it also styles the text next to it
and not just the button
 
@rdlowrey i.imgur.com/GrGn3.png I decided to use websockets, there is 50 users online, but each will have about 10 tabs opened, it is important that they receive notifications as soon as possible... I couldn't really figure with long polling how can all tabs "update", I could just update one per first come first served basis...
 
@AlexCastro you should write your CSS such that it only styles the button, and not the text next to it
 
user895378
8:30 PM
@webarto right -- web sockets are ws:// and wss:// (secure protocol) -- the web socket communication protocol is basically the same as http (in terms of the message parsing). Just wondering if you implemented the server yourself or used a pre-existing third party script that someone else had written.
 
websockets in php though...
 
@rdlowrey github.com/varspool/Wrench github.com/lemmingzshadow/php-websocket I looked up on second, first one is a new version, rewritten, renamed, although what was left of was hybi decode/encode, and some funky functions... it was badly coded (this php-websocket)...
Client.php  Connection.php  Server.php  Socket.php Application.php
this is what I have, and sort of daemon to run it...
and jQuery of course :)
 
ok, gotta put it out there. jQuery syntax is nice for beginner coders with a strong understanding of English language syntax
 
@Lusitanian I know, but I can you all of the PHP codebase I have... while I'm not fluent in JS, and dislike node.js etc...
 
user895378
In the humorous question title category ... if statement is not being called, it just performs else statement
 
8:37 PM
LAWL
 
I almost forgot about this function: us2.php.net/manual/en/function.ignore-user-abort.php
 
@ircmaxell useful :)
 
@ircmaxell you should place a description of the "this is why the sigh" because if you say sigh it normally is totally unclear what you mean ;)
 
hello every one ...
 
@webarto: event driven like in node.js, but just in PHP: github.com/react-php/react
probably something useful for your websocket server if you need to use PHP gg
 
8:40 PM
@hakra thank you, I'm sure there are good solutions now... I just steal decoding stuff because that is pretty complicated :) This guy is from SO?
 
eih, I'm not sure about that...
the abstractions react uses are really poor
and that tends to tell me that it's not designed well
 
user895378
first thing I looked at: github.com/react-php/react/blob/master/examples/… does exactly zero error handling and will trigger a php error if it can't connect: for example, http://totally-nonexistent-address will break everything
 
and trying to build the same thing myself (and running into major issues), without seeing how they solved those issues, I can't help but feel that it doesn't, and hence is useless...
 
user895378
Although, that's just in the examples, so maybe it's not all bad
 
8:43 PM
@Neal reddit jumped the shark years ago..
 
only thing with this is that websocket protocol is still a draft... and your code can break with minor browser updates...
 
@ircmaxell but "jump the shark" jumped the shark a decade ago
 
which is ironic
 
user895378
Nope, suspicions confirmed: Absolutely zero error handling for network failures -- demonstrates a total lack of unit testing for unexpected network scenarios.
 
@ircmaxell ehh
 
8:44 PM
@webarto isn't it finalized now?
 
@hakra maybe? I used tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10 it is currently supported by FF and Chrome...
 
@webarto I checked out react a while back, first thing you want to do is strip off 90% of the framework related code,
2
 
@Leigh haha, I like feather lite code, that works :P
 
@webarto It only requires something like 4-5 files to actually work, the rest is bloat. I used the core of it as a basis for a little crawler daemon
 
I seriously thought it was a joke
 
8:51 PM
 
obama effect ? what a shame, they cannot handle traffic when obama is using their site ..
 
I have an advertisement on r/minecraft for the next 5 days. I swear if this causes the site to crash I'll be so mad
 
@AlexCastro Don't worry, the kind of people who play minecraft aren't the kind of people who are interested in politics... oh wait.... now bush makes sense...
 
kernel upgrades suck
 
user895378
For the record ... class SomeClass extends EventEmitter is a terrible way to integrate event management into a system in the absence of multiple inheritance. And even if you have multiple inheritance it's still suboptimal.
 
8:55 PM
needs moar traits [or jquery]
 
@rdlowrey first thing I did was refactor it into a trait
heh
 
@Leigh even that is a terrible way
 
@Leigh but the entire site is down!
 
composition FTW
 
user895378
It's so easy to do well with composition and a chain of responsibility or mediator instance
 
8:56 PM
Mediator instance++
Though this Ratchet websocket server looks interesting, wtf does it use symfony2 for
 
For a small project, I'd prefer to keep it simple, no compost positions
 
sessions apparently
 
@Leigh that's like saying I don't need to worry about SQL Injection, this is only an internal site
 
user895378
Sometimes I think third-party lib authors are afraid to make people inject dependencies into classes because it's not as dead-simple as being able to do new SomeClass() or Registry::get('SomeClass')
 
@rdlowrey inject or infect?
 
8:59 PM
inject.
 

« first day (683 days earlier)      last day (4280 days later) »