« first day (1418 days earlier)      last day (3545 days later) » 

12:00 PM
but I don't want to duplicate code...
 
@Fabien it's the same thing that Alert does
 
@SecondRikudo Any jquery function where you can use the slidedown effect 2 times, 1 to come in screen and 1 to leave the screen?
 
Loopio does something similar, although the problem it is solving there is a little different
 
@DaveRandom I think I am not comprehending it well. What happens if you now have "Thing2". You have create a Thing2Factory class too?
 
@FlorianMargaine I've not really looked at the compiler warnings, PHP always produces a crapload of them in general (I think a lot of this is due to cross-platform support) so I only pay attention to the ones generated by code I actually touched :-/
 
12:03 PM
the things I see are not related to cross-platform support
 
@Fabien Possibly. Depends how closely related to Thing it is, and depends whether it's public API or internal impl detail.
I though you were talking internal impl details, but for public API I'd do something like ^^^^ that sample
@FlorianMargaine Yeh I'm sure there's a lot of just sloppy coding in there as well
 
yup, lot of implicit castings for example
 
@DaveRandom For me it was PHPMailer being so different from SwiftMailer. Swift requires 3 classes to mail. Message, Transport and itself. Whereas PHPMailer only cares about having PHPMailer. So when I have my factory to handle these two things it's quite different.
 
my biggest issue with refactoring is stuff like return_value that is used implicitly by lots of other macros
 
@Fabien For the record, Swift has a better OOP model. I would probably try to engineer a lib like that so that it had an OOP model that makes sense (at a minimum you need a Message class) and then make the actual adapters an internal implementation detail
 
12:08 PM
I'm not making a mailing library though.
 
@FlorianMargaine Yeh that bugs me a lot as well. It's fine if you only ever use macros and never reference the var explicitly, and it's fine the other way round, but the mix-and-match of global macros that assume it exists and code that actually manipulates it directly is messy
@Fabien No you're making a unified interface where you can plug in adapters for other libs - the whole point being that the interfaces of the libs are different. So you need to create a unified interface, so you should make it a good unified interface...
 
How do I make a library that doesn't have a message class have one?
well...
 
@Naruto slideToggle()
 
nm I can figure that out
 
@Fabien You create you own Message VO. For the lib that has its own message class, you use you VO to populate one of its messages when you need to, for the lib that doesn't you populate that data into the object, or however it works
 
12:13 PM
what is faster
 
VO sorry?
 
@ziGi poop.
 
Ferrari
 
echo $a, $b, $c;

OR

echo $a;
echo $b;
echo $c;
 
->slideLeft()->slideRight()->crissCross();
 
12:14 PM
@Fabien Value object (i.e. a class that just holds all the data for the message without trying to do anything with it)
@ziGi irrelevant.
 
@DaveRandom well, it's fine as long as you keep everything in one bigass function...
 
echo "$a$b$c";
 
Ah I see. Cool. That sounds like a good plan. I will do it. Thanks @DaveRandom
 
Good morning
 
12:16 PM
yo
 
ThW
Morning
 
@ziGi They result in the exact same opcodes 3v4l.org/sFLcL/vld#tabs 3v4l.org/urdUl/vld#tabs
 
@DaveRandom ah thanks
 
@SecondRikudo It has to enter from top and disappear below, toggle won't do it :(
 
@DaveRandom BTW "The Killing" on Netflix had the last season go up recently so put that higher on your list. Show is sooooo good.
 
12:20 PM
I really didn't like that show
 
Stop lying. Everyone likes that show.
 
Yeh but he doesn't like anything
 
Though the end ending was a bit wank.
 
Or am I confused with another show?
 
0
Q: Buffer (tampon) Page between two php pages

user3864308So I need a Buffer (Tampon) page between two pages. The first page contains an form that redirects you to a second page that sends out an email then redirects you back to the first page. I do have a Buffer page between them but it does not do what is supposed to do. I need to redirect to the buff...

dat title
 
dammit
:-P
 
perhaps sanitary pad is a better term for that :)
or Belgium.
 
[a 42 line framework](https://github.com/Gregwar/Plankton)

tl;dr 42 lines includes include()
-_-
 
STAPH
 
12:24 PM
no sir ... not a sausage ...
 
1 line framework next

<?php
 
do it
 
@DaveRandom ok, pretty useful
 
heh it got done
 
@Fabien <?php exit('Application works!');
 
12:26 PM
<?php // This framework is not a framework
 
Should have an optional dependency on boostrap, obviously
 
Ok, apparently it takes more to bootstrap the framework rather than to take and parse and output the information
 
^ this is true of many frameworks
 
from the whole 693ms request, only 0.251sec are for the DB query + parsing + outputting
 
12:28 PM
Mystery solved gang.
 
the rest is for the framework
 
@ziGi boostrap*
 
@ziGi Ignoring the "my framework is better than yours" tone of it (it really isn't) the graphics here are quite interesting phpixie.com/blog/page/4
 
this probably sounds stupid, but i only now realised: interface Traversable {} is ehh, empty :)
 
have you seen the hhvm LTS delay?
@Danack has :D
 
12:32 PM
flex
Where do I claim my prize for top comment?
 
@Ja͢ck Yeh that annoys me a bit, although I get the reasoning behind it, it's a bit leaky
courtesy of @GordonM ^
 
@DaveRandom well we use ZF1 for a REST API so you can imagine it would have been better if we used something more lightweight
but when I came to the company there were ~300K lines already
 
Wrote an AES function in PHP - faster than mcrypt :(
 
@Leigh Recki-CT?
 
vanilla 5.6
ok, so mine is optimised for a single block (basically using it as a PRF), but still, sad that mcrypt would be slow (openssl on the other hand is 10x faster)
 
12:38 PM
Interesting, pretty counter-intuitive even if the mcrypt impl is shockingly bad
 
@DaveRandom Brilliant!
 
$this->eat($lunch)
 
enjoy your lunch.
or lunch will enjoy you.
 
while ($youtube->ad > 4sec) { reload_page(); }
 
@Leigh which mcrypt functions did you use?
 
12:46 PM
Interesting uilang.com
 
@Ja͢ck while (!$adblock && $youtube->ad > 4sec) { reload_page(); }
 
Have you noticed that some people prefer caching to refactoring in order to optimize?
 
yes. so ?
 
@ziGi Both are complementary
 
Well isn't that a bad practice?
true, true
 
But I wanted to show you this
 
why should it? Refactoring is slow, painful .. and in the end - it's expensive. Often it's much easier to install more cache | add more servers. It's cheaper. We all work to get working code which can be shipped
 
Well in my case it was not true
because the guy who worked here did some N^4 stuff
 
I've not seen a cat do this before .. funny :)
 
I didn't say "always". But - it's often so
 
12:49 PM
@Leigh Did you try the non-generic functions? like just mcrypt_encrypt?
 
even slower
 
k
well, I already heard that mcrypt has crap perf ^^
didn't know it was that crap
 
loop of 30k is taking 1.5s for mcrypt_encrypt, 1.2s for mcrypt_generic, 1.0s for pure PHP, 0.12 for OpenSSL
 
yay
never can guess where to move your leg so don't end standing in the sh*t :-D
 
Who decides to use ZF1 for REST API just because he thinks that the framework has good support and then he doesn't even us ORM rather than plane sql queries
 
12:53 PM
@Leigh Really stupid question, You've checked the results are the same (if they should be)?
 
...people who don't believe that ORM is a magic bullet that does All The Things?
 
where did you see such things?
 
Where I work
@DaveRandom the reason we don't use it is because my colleague didn't know what it is when we started work and we have to first finish the whole project (which is undergoing development 3.5 years) and then change to ORM if we decide to
 
@DaveRandom ORM is an Anti-pattern
 
@ziGi let me guess, you work in Lapland, Santa-s Headquarters ?
 
12:57 PM
@Danack I was using the other implementations to verify I got mine correct, so yes I was checking results as I built it
 
@Leigh kk - was just asking because some people find 'optimization' techniques like adding "--dry-run" to their backup processes makes it go really quickly.
 
@AlmaDo that's me -> i.imgur.com/jl1EJCF.gif
 
O_O
 
Good morning
@Leigh "pure PHP"?
 
Morning
 
1:01 PM
@Danack I have optimised it for it's purpose, one-off key/nonce permutations, so it's limited to a single round only
@ircmaxell as in, not offloading to any extensions
 
zomg I swear I'm going to kill one of my co-workers on the grounds that they are the single most irritating person on earth.
 
@JoeWatkins will test
 
there is some real shit on reddit this morning ... don't go there ...
 
@Leigh I got that, what I meant was what library
 
@ircmaxell Not sure what you're asking.. what library what? I didn't use any libraries
 
1:04 PM
how do I intercept all outgoing requests from the browser in javascript?
 
@DaveRandom don't get seen ...
 
@Leigh so how did you do it in "pure" PHP?
 
@BenjaminGruenbaum ^
 
@Gordon You cannot unless you are writing a browser extension
 
1:04 PM
@Gordon "All outgoing" is hard. You can intercept XHRs.
 
What do you think about the following strategy my colleague told me:
When you read information from the backend, you create a hash of the request params in the memcache where the corresponding value is the db extracted data itself for that params. Next time you read it you use that hash to get the info directly from memcache. If someone creates/updates/deletes something on that data, you invalidate that hash in the memcache so next time it is requested from the DB again and a new hash is generated.
 
Oh yeah, a browser extension can definitely do it. You generally can't intercept arbitrary requests. For one because they might run before you start intercepting.
 
@Leigh yeah, so you're using a library (even if it's not public, it's still an implementation of AES in PHP)
 
ok, so it's my library
 
@BenjaminGruenbaum @DaveRandom well, I think have the XHRs covered. I wrote an interceptor in AngularJS and it shows me the requests Angular makes to our API, however it ignores all the requests to GMaps
and i need those. in fact, only those.
 
1:06 PM
@Gordon ...which are in an iframe or...?
 
uuh, let me check
 
If there aren't, that presumably means that your interceptor only catches requests that were made through Angular
 
@Leigh nice :D
 
Why do we have ADD_VAR and CONCAT? Wouldn't one suffice?
 
@Gordon if you want to catch arbitrary requests you'll need to do something like stackoverflow.com/a/629782/889949, and obviously you'll need that to run before any of the gmaps stuff
 
1:08 PM
^^ /cc @JoeWatkins @ircmaxell
 
@Gordon what are you using for google maps requests?
 
@ziGi Cache invalidation is Hard. Use versioning everywhere....
 
@Danack versioning?
 
@ircmaxell That looks like code you can make super-fast once arrays are supported :)
 
@DaveRandom I see no iframe. It's all wrapped in a google-maps tag. I guess sth from angular
 
1:09 PM
@NikiC arrays are already supported :-X
well, sort-of
 
@BenjaminGruenbaum whatever angular uses.
 
and if you drop some of the wrapper oo code, of course
@ircmaxell yes?
 
well, does it support offset lookup?
 
@NikiC that's why "sort-of"
actually, jitfu does support them, I just haven't added support, for reasons
 
1:10 PM
I don't count count as array support :P
 
@ircmaxell quick one-line explaination: how do I use recki-ct to improve performance on some bits of code of my app?
 
@DanLugg isn't that just the difference between $x .= $y vs $x = $x . $y?
 
@FlorianMargaine by compiling the most expensive parts to native code, leaving the rest for your normal engine
 
@Ja͢ck It's the difference between "Foo" . $bar and "Foo$bar"
 
ahh
 
1:13 PM
@ircmaxell and in a practical way? i.e. what do I have to do to do that
(is what I meant. Sorry for not being clear.)
 
@FlorianMargaine replace functionName($foo) with $cb = Jit::JitFu("functionName"); $cb($foo)
for now at least
 
ooooh ok
I had no idea it had to be used like this
 
@NikiC @Jack Yea, byt isn't interpolation just a syntactic variant of concatenation?
 
maybe it should be said somewhere? or I didn't look at the right place?
 
@FlorianMargaine for now, we were talking about replacing the function entirely internally (like upoz does)
 
1:15 PM
@DanLugg consider ADD_* as optimized variants of concat ;)
 
@FlorianMargaine I think it's a bit premature to document usage. It's still very early, and there's a lot that's not supported
 
well yeah, but noone knows how to use that, so how it can be useful to them...
 
lol okay
 
releasing it to the world sucks
 
I suppose ADD_ can do realloc() instead of having to create a new string to hold both parts.
 
1:15 PM
:P
 
@ziGi I'm trying to find link I thought I had and failing. Basically the idea is that everything is versioned and when a write happens, the version is bumped. Any request for data has the version attached to it....so when the version is changed, although the existing entries in the cache are still there, they don't match the new hash of the params, and so the request hits the DB....I'll keep looking for the link.
 
@FlorianMargaine github.com/google/recki-ct/tree/master/examples and if you want to document it, I'll accept the PR... :-D
 
@Gordon can you show me the binding?
Angular doesn't come bundled with google maps after all :D
 
@BenjaminGruenbaum if only I knew what I was doing :D
 
@Gordon can you send me a link to the website?
 
1:19 PM
nope. employer wouldnt approve
ill figure it though. thanks for your help. /cc @DaveRandom
 
@ircmaxell done :P
wait, I have to sign a CLA for a doc PR?
 
@FlorianMargaine yup
 
k, let me google where to sign it
 
@ircmaxell out of curiosity … why does the the license of Recki say it's (c) Google, Inc?
 
@Gordon bceause it is
 
1:22 PM
"Mailing Address"?
 
@ircmaxell so this is some kind of official google project then?
 
@ircmaxell yup, already got there
 
@Gordon yes and no. It's not official in a lot of senses, but it is a 20% project that I'm doing...
 
oh wait, postal address?
 
1:23 PM
@ircmaxell good. about time google does more php
 
@FlorianMargaine yes
 
user895378
morning
 
@ircmaxell done :)
 
morning pretty
 
user895378
s/pretty/old hag/
 
user895378
1:24 PM
32 today :)
 
don't tell @ziGi ... I was called old earlier ...
happy birthday :D
 
@FlorianMargaine merged. Thanks!
 
well, that was quick
 
crap, I should have looked
need a docblock in there
 
user895378
@JoeWatkins thanks!
 
1:26 PM
@Gordon check out your directives folder
 
@rdlowrey NOOO000oooooₒₒₒₒ....
 
@ircmaxell a docblock?
 
user895378
one foot in the grave.
 
oh, so your example was actually wrong? :P
 
Happy Birthday @rdlowrey!
25
:-P
 
1:26 PM
@FlorianMargaine no, because I didn't show the definition
 
heh, true
 
fixed
 
want me to update?
ok
 
Happy Birthday @rdlowrey!
 
@rdlowrey Gratz! omfg now you are really old
 
user895378
1:27 PM
29 isn't old ;)
 
Are we counting down now?
 
@rdlowrey yes it is
 
Happy bday man
 
@PeeHaa that one was harsh :D
 
He deserves it :P
 
1:28 PM
@BenjaminGruenbaum there is none. i think we are not grouping this way. but there is a GoogleService which check for a google object. I guess in the global scope
 
user895378
Now, to address some github issues.
 
gawd, how can people work with JS. It's horrible :D
 
curly brackets are a pain
 
if ($person->getAge() / 10 > 2) {
    $person->isOld(true);
}
 
wait... isOld is a setter?
who the hell names a setter like that
 
1:30 PM
@Gordon how can people work with PHP. It's horrible...
 
@ircmaxell yeah, but on the list of horribles, JS is more horrible
 
@Gordon sorry... but I disagree
 
i personally think JS gets messy
 
@FlorianMargaine that's okay with me ;)
 
1:31 PM
the browsers are pretty messy
 
Unlike server side where JavaScript is optional, in the browser you typically have less choice.
 
user895378
return $this->isOld = true;
 
@rdlowrey aha! the man i was looking for :)
you're going to give me good news about pgsql patch? ^.^
 
$age++;
$jointPaint <<= 1;
 
user895378
1:33 PM
@Leigh this.
 
user895378
@Ja͢ck Will test today.
 
@Leigh As long as it's not $jointPaint <<= $age++;...
 
@ircmaxell :)
 
anyone tried the newest instance of the most hated framework, that is cakephp? its in the beta1 phase of 3.0
 
most hated? says who?
 
1:36 PM
people
 
ahh, people.
@rdlowrey on your birthday no less? i feel honoured .. either that, or you're bored :D
 
user895378
@Ja͢ck well I just woke up. Gotta do a little work today since I've been out of the office for the last five days :)
 
well, that's interesting... Too bad I can't share...
 
can't share what ?
 
1:48 PM
:D
 
well, in due time I will share :-)
 
in HTML / CSS / WebDesign, 8 mins ago, by Second Rikudo
@Billy I'd rather live on a planet where wordpress was a scary story they tell children in case they misbehave.
 
                     | PHP 5.6.1-dev | ReckiCT     | HHVM - Array
---------------------|---------------|-------------|--------------
 simple()            |  207.17630    | **1.00000** |    4.54504
 simplecall()        |  743.57954    | **1.00000** |    4.15977
 simpleucall()       |  393.38444    | **1.00000** |    6.80876
 simpleudcall()      | 1026.83524    | **1.00000** |    4.57372
 mandel()            |  103.50945    | **1.00000** |    4.09130
 mandel_typed()      |   70.96419    | **1.00000** |    3.22731
no segfault either :-)
 
@ircmaxell when will you start adding php "7" to the benchmarks? iirc phpng was merged into it, so it should have pretty significant improvements
 
1:55 PM
eih
:-P
@NikiC so it's not trivial to add yet, because it touches everything... It's something I'll likely do before too long
 

« first day (1418 days earlier)      last day (3545 days later) »