« first day (1627 days earlier)      last day (3321 days later) » 

6:00 PM
@RonniSkansing hehe that would be noice :P Remind me that the first sales are going to the "help ronni through the winter fund":D
Moreninign
 
@Jimbo you could get that guy to be quiet more effectively by showing him how to extend the Auryn class to a bridge implementation to implement the interface.
Also, did ereg get removed from PHP?
 
@Jimbo nope, that's how standards work. you don't need a standard interface if there aren't different things to standardize. :P
 
@Danack I offered to write an adapter for him :(
 
@DaveRandom lol always classy :)
@rdlowrey God yes
 
@Danack From 7? Yeah.
 
6:03 PM
@Charles thanks. I was obviously looking at the wrong directory....
 
btw @rdlowrey I was a bit disappointed in finding out that Auryn\Injector doesn't have an interface, how's that so?
 
user895378
@StefanoTorresi It used to. I decided it was superfluous and that the implementation should be coupled to the API in this case.
 
@rdlowrey do you by any chance have some library hidden somewhere to check whether an ipv6 ip falls within a range? cc @DaveRandom cc anybody :)
 
user895378
@PeeHaa I don't! I would love to find one.
 
user895378
I've needed this before.
 
6:06 PM
would, could, might
you are useless
;)
 
@rdlowrey i see. well, poor that guy that wants to make an adapter :D
 
Called that class WorseAuryn :-)
 
I really thought I could get away with ipv4 for a while, but people actually seem to use ipv6
 
user895378
class MyContainer implements InteropContainer {
    private $injector;
    function __construct(Injector $injector) {
        $this->injector = $injector;
    }
    ...
}
 
(I'd prefer inheritance here as it still exposes the non-interface methods implicitly…)
 
user895378
6:10 PM
Yeah ... I don't have a problem with inheritance there either
 
oh lol I didn't even notice the april fools thing until now. I was about to check why adblock didn't remove it :P
 
@rdlowrey an interface would still be useful for that guy, he may want to decorate, extend, adapt, bridge, whatever. the lack of an interface is only a sign that you didn't want anyone to do that :p
 
I think there are some cases where being able to use a service locator are valid....having an interface would help there as well for testing and a tiny bit less coupling.
 
good mornings
 
What about if he made an interface, extended auryn, and made his extension implement the interface? He could use that interface then? :-)
 
@Jimbo That's exactly what I wrote…
 
@bwoebi Yeah, I just re-read that and face palmed. Tired :P
 
TIL: doing chown -R foo:bar / is fairly easy to manually fix
 
easy? :o
 
sudo chown -R root:root / ? :D
 
6:18 PM
yes easypeasy
@StefanoTorresi That was the first step yeah :)
 
that's irony?
 
second step being start using root for anything ? :DDDDDDDDDDDDD
 
@StefanoTorresi I don't always open a shell, but when I do I am root
Most stuff is owned by root either way. Only needed to fix some 100 things manually
 
oh the irony, i always open a shell for everything, and i am never root, ever
 
I usually only am not root when I forget to input sudo -i as primary command…
 
6:20 PM
@LeviMorrison Okey. But the main issue for me was the building part. Since I've constantly been getting some errors.
Sorry for multiple pings
 
@Danack You definitely can use an interface for a service locator… but not for a simple DI.
 
@bwoebi function foo (AllTehThings ${'"container"'}) {}
Damnit 3v4l is downish
¯\(°_o)/¯
 
149.210.207.117 is the IP for 3v4l.org … just add it to your hosts file…
 
seriously though, @PeeHaa y are u root? don't be :(
 
@StefanoTorresi Why wouldn't I?
 
user1642018
6:27 PM
hi all.
 
cos chmod -R foo:bar /
 
wtas chown
 
ye, typo :p
you get the point
 
And it would have been sudo chown -R foo:bar / so same effect more typing
:)
 
i use to prepend sudo only after i see a "you're not root" kind of thing.
that would force you to read the command again
 
6:29 PM
@bwoebi it looks like chrome does a reverse lookup first and fills in the hostname for me :P
 
but then again, personal habits
 
@PeeHaa nah, it's a 301
 
ow
 
@StefanoTorresi I'm not that masochistic that I'd always first fail, then prepend sudo
@PeeHaa as said… add to hosts file
 
ofc, but as a rule of thumb you could start doing that for any recursive write.
 
6:30 PM
@bwoebi Ugggh broken solution is broken. It will be there for the rest of my life :P
 
^^
 
@Fabor can you explain to me how that Skyrim Nexus works ?
it seems to want money
 
yay :)
 
@tereško is your new pc finished?
 
user895378
@StefanoTorresi There's nothing stopping him from implementing his own interface, though.
 
user895378
6:36 PM
In particular, someone who wants interop can implement either a wrapper class or a child class of the Injector that implements the interop interface.
 
@rdlowrey yep. all I was saying is that if I was him, I would have desired to have an InjectorInterface provided by the auryn package, that's it ;) that doesn't make your decision to remove it less legitimate!
 
so there is this RESTful thing
I was thinking to use that to make websites, does that make sense? My thinking is it would be easier to unit test
like writing an "API" and consuming it with smth like angularjs
 
Anonymous
@DaveRandom are you still working on CentOs?
 
7:16 PM
blah
 
@ircmaxell kinda dead here right now..
 
@RonniSkansing how's things with Yii? :P
 
better every day.. starting to accept how is it, and just get the issues fixed. From in progess to commited and on to the next
How is your life going? All good? =]
 
7:32 PM
sounds cool
yeah fine, working a bit of overtime since 2 weeks due to some "resource" issues (i'm the only dev...)
while we're trying to find somebody
at the same time trying to actually learn a shitload of things at home
 
Have you implemented a Login with FB/Google feature on a project? If so, did you learn the method for each different system (a few days to learn FB, a few days for google, etc.) or a library that abstracts all this stuff?
 
@MarcelBurkhard sounds like all code all day.. =] But it can be hard times getting home late from work and feeling the time of "freedom" is limited
You dont have any kids or etc also right?
 
yeah pc all day
 
any experience about that @ircmaxell
 
should workout more etc...
 
7:37 PM
hehe
 
No kids :) Girlfriend though, should spend more time with her aswell
 
I also have the "have to do more workout" in the back of my head... mostly I make it a good walk now and then
Hard choices =]
 
oh I used to do sports ~7 times a week until 2 years ago
and now, like never
 
Hi everyone, I'm new to this chat about PHP
 
@MarcelBurkhard yes, but I still need some accessories .. like a desk, joy stick, probably a good chair and a deks pad/mat
the desk is in shipping
 
7:47 PM
I want to ask you something about security with PHP
I have a web server, which provide some services, which required username and password
Of course with an HTTP request with POST, those values will be in plain text
 
this is why we have https
 
My idea, is to use HTTPS/SSL and when the application is open, requests login
To comunicate/access the private area, the client/application, will not send every time username and password, but just the PHPSESSID which it takes from the cookie
When the application will be close, it will request session_destroy()
What do you think about this settings ?
will it be safety ?
 
@Ilovecoding It will be vulnerable to snooping the traffic over HTTP. Anyone on the network can grab the session ID and spoof the authenticated user.
Whether that's safe enough or not depends on what the application is.
 
I will use HTTPS/SSL
No longer HTTP
It is simple manager for a soccer league
 
That would be fine....in fact you're never storing the username + password anywhere are you?
 
7:54 PM
Well the username and passwords will be stored in the settings of the phone/clients
And in DB with HASH method
Not directly interaction with client and DB, but all via PHP
 
lol
 
Once logged, (so client send a post in https/ssl with username and passwords), it gets the sessionid, and this value will be use as authentication
 
hash functions are not meant for password storage , instead hashing algos are supposed to be used for quick fingerprinting of content
 
will it be fine ?
 
@tereško but it runs fine?
 
7:55 PM
Can I post some code here ?
 
@MarcelBurkhard no issues whatsoever. I am quire satisfied
 
@Ilovecoding storing the password anywhere sounds not good. You should be storing some sort of token, not the actually password. And don't just use the Hash db method - use an better password hashing function - php.net/manual/en/function.password-hash.php
 
@tereško cool, ironically I stopped playing games since I got my 2nd 770 GTX
 
That's what I will use
I will use the same code which is on the PHP CookBook Version 3
 
@MarcelBurkhard naah, I have a huge backlog to get through
 
7:59 PM
But username and passwords will be stored in Android/WP settings preferences
So the user will not have to type each them
Once logged, client and server just talks with token, which is the phpsessionID, over HTTPS/SSL
What do you think about ?
 
emm ... is that some RESTlike API ?
 
Right now this Java method works: con.setRequestProperty("Cookie", "PHPSESSID=the_value_I_got_after_login");
The server told me I'm authorize
 
Is there a limit on how many test conditions you can have in an inline if/else?
 
@DemCodeLines No, why would there be?
 
@DemCodeLines Yes. A single one. The limit being me hunting you down otherwise
 
8:09 PM
I don't know, I keep getting an undefined offset error here:
 
Do you think my solution can be a good one ?
 
(count($group_users_names) == 1) ? "$group_users_names[0] is in this group" : (count($group_users_names) == 2) ? "$group_users_names[0] and $group_users_names[1] are in this group" : (count($group_users_names) > 2) ? "$group_users_names[0], $group_users_names[1] and $group_users_names[2] are in this group" : "";
 
That's a VY problem
Also defuck is dat
 
Undefined offset: 2
 
Good
You got what you deserve
 
8:10 PM
why is that?
 
Do you understand why you get that error?
 
It shouldn't be executing the last part of that statement with the current results anyways.
To my understanding, it's reading the last statement and saying $group_users_names[2] does not exist.
But the condition should only be hitting the middle part, since there are only 2 entries in the array.
 
How do you know? What you have is utterly unreadable
I would call it batshit crazy
 
Well, it's readable in the IDE. Just looks bad here.
 
No it is not
Thatisthesameassayingwellthislooksreadableinword
 
8:13 PM
I can read it :D
Anyways, it shouldn't be executing that last part.
The whole point of the if condition is to make sure there is a third entry in the array.
var_dump on the array revealed just size 2 of the array.
 
@danac
 
hihi =]
 
Well I am sorry for you, but if you write code like that I hardly care about your problem
 
@DemCodeLines If you could read it you wouldn't be asking for help with it.
 
Hi @PeeHaa, enjoying the night?
 
8:16 PM
@RonniSkansing Working on my generator to generate cms'es so I can use it to generate projects /yo dawg
 
[= hehe..
Company going strong?
 
@DemCodeLines Welcome to PHP
 
PeeHaa Inc
 
You've just discovered the left-associative ternary operator
 
I'll just rewrite it the long way.
 
8:19 PM
Have a good one.. nn
 
@RonniSkansing o/
 
Anonymous
@DemCodeLines honestly, how do you NOT get seizures from that?
 
@sam_io It's like three lines and I don't have to deal with it all the time, just dealing with it for now, so don't really care all that much.
Plus, as I said, it's formatted much better in the IDE than here.
7
Q: Ternary operator left associativity

Kapil SharmaIn the PHP manual, I find the following 'user contributed note' under "Operators". Note that in php the ternary operator ?: has a left associativity unlike in C and C++ where it has right associativity. You cannot write code like this (as you may have accustomed to in C/C++): <?php $...

so...php is broken?
 
Anonymous
@DemCodeLines it is not about how good/bad it looks. It's much more than that.
 
@sam_io such as?
 
Anonymous
8:27 PM
It's about creating something that works for you today vs something that will work for everyone anytime.
 
Anonymous
Plus, you don't get seizures: )
 
Python is so awesome:
a, b = 5, 3
s = "a is less than b" if a < b else "a isn't less than b"
print(s)
Damn, you can even swap a and b:
a, b = b, a
So cool
 
Anonymous
@HamZa you'r not going to drag me into python :)
 
@HamZa Man, the if in the middle of the assignment throws me. I dunno, I kinda like it. Then again, I also like perl's right-side conditionals....
 
Anonymous
But it looks nice
 
8:29 PM
I read that as "confusing as heck" :|
 
I always did like $thing->foo() unless $condition;
 
@Ocramius It's just that your mind is configured in PHP. Just think about it how clear it is
 
unless is super-confusing too
@HamZa I did python years ago: didn't get to like it
 
Who decided it's a good idea to have a left associative ternary operator in php?
 
probably because I'm not a native english speaker, nor have problems adapting to languages (therefore I don't feel that the language should adapt either)
 
8:31 PM
Oh, I see...
@Charles damn, I was like "I never heard of the "unless" construct and then I realised it's perl"
 
@DemCodeLines I expect it wasn't an intentional design choice, but an accidental one.
 
Makes my thing so much more difficult
 
@sam_io why not? Well it depends lol
 
@HamZa I'd kill for unless in PHP, just to piss people off.
 
@DemCodeLines You're not the only one in the world :)
@Charles might be a good practice to mess with php source
 
8:33 PM
@Charles implements macros ;-)
 
@Ocramius Naa, that's too evil.
 
why not? So we can code LISP and deploy to a PHP capable box :P
<(lisp (echo 'foo') )>
:P
 
Quick, make more fake examples of lisphp, sounds like an awesome april fool prank :p
 
Anonymous
Just realized it's April fools day ^^
 
not yet
 
8:38 PM
@sam_io not yet
 
@HamZa I read comma operator at the first moment an thought wtf (a), (b = b), (a)…
 
but we'll get there... quickly
 
@bwoebi hehehe
 
Python is so weird…
:-D
 
Anonymous
php.net should fool us, with "php7 is out" news
 
8:46 PM
actually it should be php 10
 
@MarcelBurkhard no one would believe that lol
 
right... how about

PHP is now available as node.js module through npm
 
hehe
 
Anonymous
@HamZa write it down, and insecure it with url shortner and I will star it.
 
Anonymous
So, everyone who comes to this room get a surprise :)
 
8:49 PM
yeah but the actual link points to rebecca black -friday
 
I don't like April fools. Why the heck lying? It's intended as a joke but kids (or even adults) might be affected by this in a negative sense. Maybe I'm just paranoid...
 
Anonymous
Nope, better one to a text in this room, that says something like 'u have been trolled'
 
Anonymous
Ok, I'll do it. @HamZa will you star it?
 
@sam_io nope. Nothing perso, I just don't promote such things
 
@HamZa well... trolling is a thing that lots of trolls like doing
 
Anonymous
8:52 PM
Ok, understood.
 
ill star it
 
Anonymous
You have been trolled.: D
 
Join us April 15 @ 9 am for Refresh Leadership Simulcast to see @MrDanack Damond John & Liz Murray. @eblencharities http://t.co/lXsKii7SBb
ROFL
 
9:13 PM
ya know what, I will make a bold decision and go to sleep before 4AM
fuck skyrim
 
lol
 
gn
 
gn
 
9:30 PM
@HamZa Is there a way around?
 
Whelp, there's my friday off sorted: github.com/getsentry/raven-php/issues/192
 
9:45 PM
@Amelia well, make it 5.4 and you'll get my +1
 
@ircmaxell I would have tried, but I feel like they'd have said no ;_;
 
:-)
 
woot somebody made the generics ultra hack long time ago github.com/TimeToogo/PHP-Generics
 
pff... we use something like that in production ;D
 
His other repos are also interesting.
 
9:53 PM
@marcio yeah, but his is less polished since it doesn't use the correct syntax and exposes the namespace hack (where I hide it)
 
Code generation based on custom syntax extensions (in newer projects, not in the old ill legacy projects, from which I posted the gist earlier)
 
I'm waiting for someone to make a php binding for node.js just for april fools
 
@ircmaxell I think he made it this way so it's compat. with current PHP syntax. At least it covers inheritance and template traits etc (not saying it's better, it shouldn't be used in production anyway)
 
Wait, so what's the alternative to the left associative ternary operator issue, if one?
 
@marcio I know, I am just messing :-P
in fact, I could strip the generics implementation from mine and have mine cross-compile to his
 
9:57 PM
 
@Rangad this makes me wanting a preprocessor layer even more so we can make our own features and only bother with RFCs if a feature package get's really popular :D
@Rangad where are the gists?
 
Based on the commit history some engineer wanted to use anonymous functions a decade ago and reimplemented create_function as aot code generation
then anon. classes were implemented (halfway) and some other minor stuff. No working generics, yet....
 
@PeeHaa
 
ikr
 
10:02 PM
o_O
 
above class is "old" (ancient), below is generated
 
can anyone help with the following question:
http://stackoverflow.com/questions/29023056/can-php-5-5-5-load-phar-files-from-opcache
it has been sitting there for some time now
 
example was typed based on muscle memory, one parameter is missing from ensure_crap_is_working. And example below is missing the function name. I really should've posted a real excerpt, but there are to many things to censor -.-
 
I need someone with a knowledge of PHP internals to answer the question
 
@Rangad I don't really get your example
 
10:07 PM
@Bonner if opcache_is_script_cached is not available can't you just check the complete list of cached files?
 
@Rangad ok, you made a scary coercive scalar typehint crazy "macro".
 
@marcio There is a function that gets called on each method call that validates parameter types based on a cryptic string. Some symbols don't have a real meaning as there was some reference vodoo, which since has been removed. The only attention the code received in the last 11 or 12 was fixing it on upgrades (before starting to rebuilt the component it).
 
@PeeHaa the question has been answered now, thanks
but that is a good suggestion too
 
@PeeHaa Tackling the big issues, I see.
 
@PeeHaa I'll have to restart all my code here because I've been using echo wrong :(
 
10:13 PM
:P
 
Does php combine multiple concatenated string literals at parse/compile time (or in opcache)?
@marcio It's better not to think about it. I'm happy that we will finally get rid of that with php7 (bigger rewrite greenlit and no more if(!is_int($int)) { trigger_error('We are in code that was built at a drunk night when php4 was the new big thing.'); }
 
10:32 PM
hold on a sec, i can typecheck array content types using variadics syntax?? :o
function(Foo $a, Bar ...$array)
function(Foo $a, string ...$array)
evening :D
 
yes
although that means calls have to be variadic as well
 
oh
function test(Foo $x, Bar ...$y) {}
test(new Foo, [new Bar, new Bar, new Bar, new Bar, new Bar]);
 
that fails
but instead, test(new Foo, ...[new Bar, new Bar])
 
well, that's enough :D
i'm guessing it's not a good idea using typed variadics for big arrays, correct? it would type-check all the values in the array
 
10:47 PM
exact.
There was a RFC but it got quickly rejected (or withdrawn?)
 
krakjoe's? i think that would have worked the same, no? php doesn't keep track of array contents, iirc. it has to loop over the array each time to know the contained types
 
Our front end web developer just replaced all of our pixel-defined box border sizes with fractional ems.
I am gobsmacked.
 
@Charles I've done that on things I know get resized.
(by resized I mean font size)
 
Yeah except we aren't in a font size resize situation.
It was just done.
 
@Charles lol, why?
 
10:59 PM
All of them, every last "px" in the CSS replaced with a fractional em.
@Worf I DONT KNOWWWWW
 
For the job security?
 
@Charles I'd have -literally- killed him :D my guess: a CSS holy-man (there are plenty) made CssEmAllTheThings.com and your frontend dev is now an apostle?
 
@Worf I haven't killed him yet, but I've never at any point ordered a commit to be reverted before. In fact, I swore to myself I'd never do that.
 
there's always a first time :D
 
It's first April. I just inserted * { direction: rtl; } into global css.
 
11:09 PM
or maybe it was just an april fool @Charles xD
 
@Worf s/april//
 
lol
@bwoebi it's faster than i thought pastebin.com/Q3RA8V86
unless the array is extremely big i can use that
 
@Worf yes, that's on variadics, because array unpacking and repacking is very slow already. The typecheck there nearly isn't measurable.
 
\o/ excited!
Announcing the newly kickstarted doctrine Indoctrinator project! http://doctrine-project.org/2015/04/01/indoctrinator-0-0-1-alpha-1.html #doctrine2 /cc @doctrineorm http://t.co/JiVI3GKbJt
 
11:13 PM
why can't one just pass in the array since what you would get eventually is an array? @bwoebi
 
because we may not know at compile time what the signature of the called function is.
 
can't understand that :P anyway function equal(A $a, B $b, B ...$bmore){} how do i combine $b with $bmore, array_merge as usual?
 
Quick question is SEO a technology?
 
nope @Stacker-flow
 
cheers
just having a debate about it haha
 
11:27 PM
@Ocramius good luck!
 
Thanks :D
 
@ircmaxell sounds like a good idea because ingenious pile of hacks :D
 
Anonymous
@Ocramius do you attend any dev meetups in Switzerland?
 
Anonymous
Or in the future perhaps ?
 
@sam_io I went to joind.in/event/view/3524
I'm currently way too far from the expensive country
 
Anonymous
11:38 PM
Austria? hmm, never been there. I tought you might attend some meetups considering we have tons of symfony/doctrine enthusiasts here :)
 
@sam_io well, maybe... I just attend any tech meetups I know of (and which are in my area)
 
@marcio if you guys are planning to implement generics, don't forget about set(Map<Map<Foo, Bar>, Baz> $nestedOnes) :D
 
I'm based in Frankfurt/Bristol atm, so it's kinda hard to get to Switzerland just for a meetup
 
Anonymous
@Ocramius I remember you said you were in Italy and assumed you would be close enough. Yeah, 3-4 hours drive for a meetup is a bit overkill
 
I can do that if there's a contract or such in the area (doing consulting + a talk in the evening is usually ok)
 
Anonymous
11:44 PM
I think that is very plausable, last time we had a lecture hosted by some devs, and they brought in the composer founders, Nevertheless you can bookmark this site techup.ch very useful imho
 
@Worf arrrgh... I'm playing with C++ templates right now and constantly waffling between - this is awesome \o/ - that's horrible :/
 
@sam_io the composer founders are (were?) based in Zürich: unfair :P
 
(nesting looks specifically horrible on typehints)
 
Nelmio is, at least. Seldaek now works in London as far as I know
 
Anonymous
@Ocramius I met seldaek, then he was in Zurich.
 
Anonymous
11:47 PM
Very down to earth guy.
 
no it isn't @marcio :D it's gold! how would you typecheck against a multidimensional collection then?
 
@sam_io we're pretty much all normal humans, heh
 
I have a very weird problem with htaccess. RewriteRule ^groups/(\d+)?$ groups.php?id=$1 [NC,L]. /groups/0 doesn't read the id, but /groups/?id=0 does read the value into id.
what the heck
 
@Worf it's awesome and horrible at the same time.
 
eheh
 
Anonymous
11:49 PM
@Ocramius true, even though some are prefixed with super :)
 

« first day (1627 days earlier)      last day (3321 days later) »