« first day (2058 days earlier)      last day (3116 days later) » 
00:00 - 18:0018:00 - 00:00

00:00
abstract class ReflectionCompositeType extends ReflectionType {
  /**
   * @return array of ReflectionType
   */
  function getTypes(): array;
}
class ReflectionUnionType extends ReflectionCompositeType;
screw it, writing blog posts is hard
I give up for today
Or if you want you can just do the latter and we can extract the superclass with intersections.
@LeviMorrison Will do the latter then. (tomoroow)
@Andrea union types rant? … I'd like to read it … (even if it'll be unfinished at the end)
@bwoebi yes
I didn't get past trying to explain types :1
oh well…
00:09
best way to escape strings?
This is some arabic text which is used in API.
\u0627\u0644\u0639\u0631\u0628\u064a\u0629
How can I convert this to arabic language through php?
Wes
Wes
@AbrarAhmed 3v4l.org/20frR
00:35
Is it just me or is the git server really slow?
clone from git.php.net is absurdly slow
00:52
I need some help understanding something about AWS S3 buckets being accessed through PHP.

I have an S3 bucket that is non public, and my PHP can access it with credentials, and I can stream files from the bucket, to an EC2 instance running PHP, and then to the clients browser.

#1 Is that causing me to pay for bandwidth twice?
#2 If #1 is true, then how can I give only some users access to some files based on restrictions defined in an SQL database that a file called authorize.php has access to?
Basically I have an online file system for my users that uses an S3 bucket to store private data to. And I don't want to pay for bandwidth twice, and I don't exactly see how to give just those users with permission temporary IAM credentials to access only those files they should be allowed to see.
01:23
@Wes
Wes
Wes
@AbrarAhmed
@Wes The link doesnt work. But thanks
Wes
Wes
3v4l seems to be down
Wes
Wes
echo json_decode('"......yourstring..........."');
01:25
ok Thank you
got it
@Wes I am wokring on a single php script to stream video files from a url
@Wes
you there?
Wes
Wes
user image
7
lol!
Check this out https://gist.github.com/AbrarAhmed99/289d26039aa410e145bfccaa10caf35d
Wes
Wes
01:42
nice
The video stops playing after scrolling forwards
@AbrarAhmed Hey there. Please don't repeateadly ping people
01:53
That is my live video
ok
Showing the problem I am facing
haha, that image is perfectly placed right there, as a dare
02:07
Hi
please somebody can help me?
I passed 3 day trying to solve my problem
Wes
Wes
don't ask to ask, just ask
I want to do this: http://book.cakephp.org/3.0/en/orm/associations.html1
but it's not working
the cell in my complejo table is empty when I want to show the name of the another model (ciudad name). I want to show the name, not the Id of Ciudad.
ComplejosTable.php

<?php
namespace App\Model\Table;
use App\Model\Entity\Complejo;
use Cake\ORM\Query;
use Cake\ORM\RulesChecker;
use Cake\ORM\Table;
use Cake\Validation\Validator;

/**
* Complejo Model
*
* @property \Cake\ORM\Association\BelongsTo $Ciudades
*/
class ComplejosTable extends Table
{

/**
* Initialize method
*
* @param array $config The configuration for the Table.
* @return void
*/
public function initialize(array $config)
{
parent::initialize($config);

$this->table('complejo');
In my index.ctp I have this:
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<th><?= $this->Paginator->sort('idComplejo', 'Nº Complejo') ?></th>
<th><?= $this->Paginator->sort('nombre', 'Nombre Complejo') ?></th>
<th><?= $this->Paginator->sort('ciudadFK', 'Ciudad') ?></th>

<th class="actions"><?= __('Acciones') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($complejos as $complejo): ?>
<tr>
<td><?= $this->Number->format($complejo->idComplejo) ?></td>
<td><?= h($complejo->nombre) ?></td>
<td><?= $complejo->has('ciudades') ? $this->Html->link($complejo->ciudad->nombreCiudad, ['controller
This line returns empty always:
<td><?= $complejo->has('ciudades') ? $this->Html->link($complejo->ciudad->nombreCiudad, ['controller' => 'Ciudades', 'action' => 'view', $complejo->ciudad->idCiudad]) : '' ?></td>
May be I have a problem here @Wes:
<td><?= $complejo->has('ciudades') ? $this->Html->link($complejo->ciudad->nombreCiudad, ['controller' => 'Ciudades', 'action' => 'view', $complejo->ciudad->idCiudad]) : '' ?></td>
@Wes this is my post: http://discourse.cakephp.org/t/problem-with-associations-linking-tables-together/450

but no one answer me. There you can show my question
@FélixGagnon-Grenier can you helpe me ?
ok :(
Ekn
Ekn
r
Ekn
Ekn
s
03:54
Moin
Ekn
Ekn
mornin leloutama
Wes
Wes
morose?
i'm having problems sleeping lately. bah
@Saitama dammit have you seen the fifth element
@Wes try sleeping early?
@Wes not yet... :P
I accidentally deleted the movie during removing my previous installation of mint...
Wes
Wes
maybe 8 liters of coffee per day are too much
04:01
cough, cough
Caffiene poising is not fun!
Ekn
Ekn
can I rm -rf universe?
duh nevermind..
I had caffeine poisoning once. It was dreadful.
Yeah, don't drink too much coffee.
Wes
Wes
i don't know if it was because of caffeine, but been sick several times because of coffee
04:10
Too much coffee can kill you.
Wes
Wes
indeed
Wes
Wes
04:43
RIP Muhammad Ali :(
05:36
@Wes I heard he was on life support. Did he die already?
Wes
Wes
sadly yes
05:50
hi
06:10
posted on June 04, 2016

New Cyanide and Happiness Comic

@Trowski bits are missing
inheritance
06:28
o/
Wes
Wes
06:41
Joe, Sara... opinions?
8 hours ago, by Wes
may i ask your opinion about something guys? i was thinking to change icu functions (currently working with UTF-8 only) so that they allow to specify other encodings. for instance grapheme_strlen($strInput, $encoding = 'UTF-8') (notice how it defaults to UTF-8 rather than some user setting). i was looking at the code and i think i could do it. it is quite wrong having to convert charset every time just to use these functions. opinions?
07:03
no strong opinion really ...
Hi can any body help me?
i'm using cakephp v1.3 i have 1 subdomain "http://feeds.domain.com" and main domain is "http://domain.com", after created cookie in main domain it is not visible in subdomain
@Wes Well, on the one hand, most every ICU function does an encoding conversion (two usually) to convert to UChar (UTF16) then back again. So it's not like you'd be adding workload to these function beyond instantiating converters. In fact, you could cache the UConverter objects (per request, to be safe). My only concern would be that it be consistent across all of intl, and that's a BIG extension. Like, fucking big.
for this i have tried may things and apply many codes but my problem is not solve
Wes
Wes
uh. so all the utf-8 strings we pass to icu functions get converted to utf-16 first, then converted back to utf-8?
@Wes 90-95% of them, yeah
^^ Scientific Wild Ass Guess
Wes
Wes
07:15
that's... hella inefficient
anyway yeah, it's going to be a lot of functions modified. basically all functions taking strings as argument
icu uses utf-16 (UChar) as internal encoding, so unless you are using that encoding conversion is unavoidable
Anonymous
@RonniSkansing Well, there is no way to prepare for the second (fake size) attack, but I will fix the directory traversal and setName() issues.
@Wes Randomly opened a file, here's an example from the first function github.com/php/php-src/blob/master/ext/intl/collator/…
Anonymous
Just been too busy lately, I can't do the slightest task with my crappy laptop.
I've played with the idea of a UString class which stores the unicode string natively and allowing intl methods to accept that object type (optionally)
But ugh.... SO MANY APIs
And yes, I've had to implement most of them on HHVM
07:18
so many
I'm at least part way persuaded that it may be a good idea to try native unicode again
with the addition of zend_string, php-src is much more amenable to those kinds of changes, still there is unavoidable impact .... which leaves me only part way persuaded ...
Wes
Wes
btw, does mbstring work on specific encodings internally, or it's optimized for any encoding?
mbstring you just give it a buffer, hint an encoding, and pray it gives you a rational result
That said, it may convert to another encoding internally, I've no idea.
I would start praying first ...
Wes
Wes
ha
 
1 hour later…
08:27
yo
08:53
Hi! Is there any documentation on opcache's working? stuff like how does it decide when to evacuate cache? etc.
@PeeHaa ^ iirc you worked on a project related to opcache's internals once, right? happen to know about this?
user924016
CATURDAY!
user924016
yes I am screaming it =) morning
09:14
@AwalGarg Not really related to internals of the thing. It's a visual frontend of the thing
Morning alls
@AwalGarg Are you wondering about cache restarts?
@PeeHaa sort of, yeah. and anything related to it that I should know for reimplementation in jshp :P
my current implementation watches for file changes, but that's pretty unreliable. so I thought I'd just do whatever opcache does
It watches for file changes :)
goddammit
09:17
:P
@AwalGarg ^
@PeeHaa so is it normal for php setups using opcache to not have changes reflect? because from what I am seeing, there is no good way to reliably observe files for changes crossplatform. other than polling which I am sure is not what opcache does
ahh, every request
hmm... I wonder how efficient that is
You tell opcache using what frequency it checks for changes. So on production you may be looking at old code
> opcache.validate_timestamps boolean
If enabled, OPcache will check for updated scripts every opcache.revalidate_freq seconds. When this directive is disabled, you must reset OPcache manually via opcache_reset(), opcache_invalidate() or by restarting the Web server for changes to the filesystem to take effect.
ok... so after all it is pretty much the same as my current implementation
So basically on development you don't want to wait or manually have to restart on production you may be looking at stale code for a while
As long as you don't check it everytime, because io is obviously expensive
@PeeHaa what is the recommended value for revalidate_freq?
assuming an average site with average load, not "webscale". say a college website with 5k visitors a day at max.
09:25
The default should work just fine. But you should really test the specific application. It's really hard to make blanket statement about stuff like caching strategies
@PeeHaa I don't get this: "1" means validate once per second, but only once per request.? once per second or once per request?
Both :)
It checks every second, but only maximum once per request :)
ahh damn, I can't read :(
makes sense, thanks
np
BTW somewhat related @AwalGarg. Does JS actual have something like standardized bytecodes?
09:34
Last time I checked it was all over the place
@PeeHaa nope
all major js vms have a different bytecode and ir
\o/
> ifconfig: command not found
Staph changing commands. gees
09:49
@PeeHaa wat
> But, this command is obsolete, and is not found in the minimal versions of RHEL 7 and its clones like CentOS 7, Oracle Linux 7, and Scientific Linux 7.
idonteven
I could yum it obviously, but the fact it's apparently obsolete annoys the hell out of me
@PeeHaa net-tools are deprecated from all sane distros \o/
In the last two years they (systemd) changed all the commands I got used to :(
I just want to run a db/web/git server damnit
the newer ip interface is pretty easy to use though. what exactly do you need from ifconfig?
For now just ip addr
09:53
ahh, cool
But it's just all the changes I hate. Maybe I am getting old, but I could at least somewhat work on machines without having to google every command for the task I need to do :(
yeah, that's a bit annoying indeed
Anonymous
10:33
one of the many sadness about programming
"dump" means "broke up" ?
Anonymous
yeah
Anonymous
28% of IT Professionals hide their career from family or friends out of fear of being asked to provide free tech support.
@samayo ah ok
user924016
hehe
user924016
10:37
btw @samayo here the pixel flood file if you want to check it out.. it should starvate much viewes/libs filedropper.com/pixelfloodattack
Anonymous
There is nothing there. Just a couple of ads.
user924016
hmm moment
user924016
there should be a Download file button
user924016
I can upload it somewhere else..
Anonymous
Nah, I got it. It says 5kb and it is still loading.
user924016
10:41
yea
user924016
look at your ram
user924016
and your swap
user924016
while its trying to load it
user924016
"it tries to allocate 4128062500 pixels into memory"
user924016
I have been too lazy to test, but try using the image on the upload/resize methods of BF .. it might turn out to have a resource starvation vuln
10:55
@RonniSkansing Ewe don't want to do that, it might turn out baaaaaad
user924016
=) @DaveRandom happy caturday!
I'm out people. I need to fix my hangover and the weather is just perfect for it
o/
user924016
enjoy
@PeeHaa ...with beer?
11:00
Yes cafe terrace + beer + filthy greasy breakfast
evenin'...
11:15
morning
Hey guys, I am trying to think why HTML escaping is needed and I have come to the conclusion that, special characters like < > & and so on can cause the page to display something unintended, is my understanding correct or am I missing something?
Hey
Noone can help me
11:46
@NikiC you should fix the error message away, not make it more explicit :-/
12:04
@bwoebi Not gonna change the status quo, especially if I happen to agree with it :D
@NikiC So, if you're too lazy, I'll have to do it then… bah :-P … (no, I won't^^)
Though I'm afraid someone will see those commits and complain to internals :P
I'm not sure if that's a serious PR or not
@NikiC It's worded stupidly. It should be called - closures being able to reference themself - I think:
@Danack I don't think so
This is about allowing use with special characters
@NikiC It's got a surprising amount of upvotes…
12:17
@Danack wait, isn't that already possible? by taking a reference to the variable?
$fib = null;
$fib = function($x) {
    if ($x==0) {
        return 0;
    }
    $fn = $GLOBALS['fib'];
    return $x + $fn($x -1);
};

echo $fib(5);
@AwalGarg which is stupid....
....but yes, different from what's being requested....
@Danack why is that stupid?
i.sstatic.net/tAcm9.png // in case we are not on the same page
@AwalGarg Because @Danack prefers writing Y combinators instead.
hehe :)
Everything else is not sufficiently pure for him
12:26
I will take that as a compliment.
$fib = function($x) {
    if ($x==0) {
        return 0;
    }
    return $x + self($x -1);
};
Probably could be part of a proper 'callable/delegate type' RFC....
or named function expressions like JS :P
$fib = function _fib($x) {
    if ($x==0) {
        return 0;
    }
    return $x + _fib($x -1);
};
_fib() // ref error
@AwalGarg huh
ok that's way too much JS
that looks kinda sorta nice
@NikiC it actually helps with stack traces too, but... has its warts
12:42
@AwalGarg or something like that.
12:58
@NikiC Nice! Will help avoid confusion.
@NikiC Did you see the RFC draft he wrote? By length you'd think he was adding something like generics, not a function.
@bwoebi casting float to string is probably wrong
@Trowski Given the amount of "content" he posts on the mailing list, this is not very surprising...
@JoeWatkins Can you explain what you mean? I'm not sure how inheritance factors into iterable.
@Trowski iterable is "broader" than either array or Traversable
So co/contravariance may want to take that into account
i.e. allow going array->iterable for params and iterable->array for returns
And same for Traversable
May please someone make clear this sentence for me? It won't be used for conditions that don't have col3. Seems to me like a paradox in the answer
13:07
@NikiC iterable doesn't transform anything, it simply accepts an array or a Traversable.
Oh, you meant in extending class/interface definitions... hmm...
fyi, my colleague who thinks that being able to run unit tests by having the code use mocks instead of interacting with a real database is "a waste of time", also doesn't seem to understand that breaking the build, and not fixing it, before being out of the office for two days is kind of a problem.
13:23
Is there any way of using arrow / lambda functions in PHP?
@Danack dan just open a fucking beer already. It's caturday
@ChristophBühler php.net/manual/en/functions.anonymous.php if you mean just closures.
@ChristophBühler we have anon functions
Arrow not yet
@PeeHaa I have a bottle of Normandy cidre, and also a bottle of pear cider.
okay, thank you two!
13:25
@Danack oooohhh fancy stuff
@Nikic I think this is ready - any chance you can merge please? github.com/php/php-src/pull/1906
@NikiC IS_ITERABLE would be the value for zend_arg_info->type_hint, correct?
@Andrea the other choice is to truncate on large floats which is probably very wrong.
@bwoebi oh god, how do union types handle float->int overflow checking?
@Andrea same than normal weak casts?
13:35
@bwoebi so… it's an error?
@Andrea should be (and that's the reason why we need to put string first)
@Andrea actually, it's just zend_dval_to_lval_cap() … which is the same than normal weak casts do
@bwoebi that is not what normal weak casts do
@bwoebi cap is not the default
Oh, my bad. Needs fixing in the impl. then.
13:45
cap used to be called strict, counter-intuitively
so yeah… needs fixing in patch
thanks for pointing it out @Andrea
@bwoebi you may want to just call zend_parse_arg_long_weak
@Andrea It's not marked inline, so no… but I'll mirror it.
more duplication D:
@bwoebi So what should ReflectionType::isBuiltin return after union types have been merged?
13:54
I love these accidental screenshots of my iPhone lockscreen…
@kelunik false. The individual ReflectionTypes in the array returned by ReflectionUnionType::getTypes() will be telling you what they are.
Going to update the RFC with that now…
How should I organize exceptions in my project namespace?
@bwoebi Could you add something like getType() in addition to __toString() then, too?
Please answer this question
0
Q: Cakephp empty Associations on Linking Tables Together

Federick JonsI want to do this: http://book.cakephp.org/3.0/en/orm/associations.html1 but it's not working the cell in my complejo table is empty when I want to show the name of the another model (ciudad name). I want to show the name, not the Id of Ciudad. Here you can see the empty column: Click Me So.. Th...

no one can help me, I don´t know why
@kelunik what does that function do?
14:00
@bwoebi Return the type name if it's not a union. Just what __toString currently does.
@kelunik That's out of scope here. I'm not touching the main ReflectionType class here.
@bwoebi You already do that, because you modify __toString ...
Whether we want that or not shall be decided afterwards/independently.
@kelunik I just overload it (normal inheritance)
14:02
You make it not return a type anymore, which could be used previously.
@kelunik I return the type. A composite type is also a type.
Help me with this pls
As I inherit, I need to define ReflectionUnionType::getType() too … and what would that one return then? @kelunik
0
Q: Cakephp empty Associations on Linking Tables Together

Federick JonsI want to do this: http://book.cakephp.org/3.0/en/orm/associations.html1 but it's not working the cell in my complejo table is empty when I want to show the name of the another model (ciudad name). I want to show the name, not the Id of Ciudad. Here you can see the empty column: Click Me So.. Th...

14:08
Ok but help me
not even answer me
:(
not too many people know Cakephp here....
14:24
@bwoebi Just add a ReflectionSingleType or so.
Or introduce a ReflectionBaseType.
@kelunik Eventually. But that's outside of the scope and is suggested to be done separately: reddit.com/r/PHP/comments/4m93s1/…
as it needs further discussion.
> The issue is that in the latter case the __toString() is expected to give ?Foo and in the former only Foo. Currently people will be using __toString() to obtain the class name to get the ReflectionClass instance.
Currently __toString returns still Foo when ?Foo is used.
Right, but it should still be solved separately as it's largely a tangential issue
user924016
hi
14:45
@NikiC @JoeWatkins This should address covariance with iterable: github.com/php/php-src/commit/…
15:02
actually... it really is kindergarten. kindergarden is not an english word. It refers to the german word roughly for "garden of children"
Anonymous
@RonniSkansing that image crushed my laptop and couldn't get it to start up again
Anonymous
You just made today 0 activity day for me ;)
Anonymous
Now library got closed so I can't do anything even if it works :/
@FélixGagnon-Grenier probably more "garden for children"
Wes
Wes
15:19
\o
Nice, lightning hit the power lines… :-D
Wes
Wes
!!youtube aluminum pan man
he's dead jim. he's dead.
Wes
Wes
MutantCollection i'm running out of names
Anonymous
15:38
!!word
Anonymous
!!wotd
natatorium: a swimming pool, especially one that is indoors.
Anonymous
@JasonMonts I haven't touched cake in 3 months and I'm starting to forget it .. for good
16:01
@Jeeves are you drunk?
@AnmolRaghuvanshiVersion2.0 Screw you human!
@Jeeves haha you become more entertaining..
16:21
@Trowski ha!
In DDD I have a bounded context for access and identity stuff like user accounts, roles etc. I have another BC for athletics which contains athletes, competitions, competition events etc. When info on an account updates like the name an event gets dispatched which the athletics BC receives, users the users ID to find the athlete and update the athletes name. Is it okay for the Athlete to hold a reference to the ID of a user from another BC? I can't think of any other way
@NikiC No?
@Trowski (about the push to php-src :P)
user924016
@samayo lol I am sorry
16:37
@NikiC Ah, heh... Forgot to switch origin before pushing. I deleted the branch already.
16:50
@Danack added commentsss
can i ahve some advice regarding to sessions?
is it okay to have like 20 sessions?
What do you mean by 20 sessions?
20 sessions open at the same time by different users?
20 sessions open by single user
user924016
why does the user have 20 sessions open?
user924016
And how do you know?
16:58
because i have 3 users type. and there is this user that needs that number of session
im starting to feel paranoid right now about this
i cant even think of it when this system went online
what if 2 users of the same role access this session. i cant even think of it what will happen :(
hey wait a minute
is the session only store in the local machine?
17:06
Session{id}
what's up!
@Saitama your mother is what's up
Although up down I've seen her do crazy things I tell ya
:P
good for ya
17:10
Yes :P
Wes
Wes
lol
Wes
Wes
17:35
@Sara > If it is known that the default charset is always UTF-8 on the target platform, then you should #define U_CHARSET_IS_UTF8 1 in or before unicode/utypes.h. [...] This will change most of the implementation code to use dedicated (simpler, faster) UTF-8 code paths and avoid dependencies on the conversion framework. (Avoiding such dependencies helps with statically linked libraries and may allow the use of UCONFIG_NO_LEGACY_CONVERSION or even UCONFIG_NO_CONVERSION [see unicode/uconfig.h].)
Hey anyone here using php-fpm on mac?
Wes
Wes
but it's not a runtime switch, right?
I am having an issue starting my php-fpm as it says that the address is already in use mainly:[04-Jun-2016 19:36:01] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
[04-Jun-2016 19:36:01] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
[04-Jun-2016 19:36:01] ERROR: unable to bind listening socket for address '127.0.0.1:9000': Address already in use (48)
!!youtube wrecking ball
!!version
17:46
!!plugin list
Syntax: command [map|remap] <command> <plugin> [<endpoint>]
        command unmap <command>
        command alias <new command> <existing command>
        command list
Currently registered plugins:
[X] Canonicals - Posts links to canonical resources on various subjects
[X] ChuckSkeet - Posts a random Chuck Norris/Jon Skeet joke on request
[X] CodeFormat - Asks users to format their code when unformatted multi-line code blocks are posted
[X] PHPDocs - Searches the PHP manual and displays links with a summary of the result
[X] 3v4l - Executes code snippets on 3v4l.org and displays the output
[X] Google - Retrieves and displays search results from Google
[X] Github - Displays Github status, profile, or repo information
hm...
Does anyone know a good YAML parser for PHP? Symfony doesn't seem to support JSON: github.com/symfony/symfony/issues/18968
@Wes Oh my lol.... That's fucking hilarious.
Morning v0.5
17:53
'nin...
@PeeHaa you are dutch, right?
@Wes No, certainly not a runtime switch. Still, we can consider PHP to be "always UTF8" since that's the interface we've imposed on all our intl classes/functions.
@Saitama Yeah
It's 7:53 PM there... according to google
Give or take
17:54
:D
@Wes I'm.... really curious to do some benching around flipping that switch and simplifying the interfaces...
btw do you know an youtuber named Jelly from your country?
Nope I'm not in the market of "youtubers"
Why? You have a mancrush on him?
17:56
eww.. no.... He seemed cool.. hence asking...
was watching his videos from his channel
I just searched on the name and it seems screaming gets you moneyz nowadays
Why aren't I filthy rich again??
> 403 Forbidden

nginx/1.6.3
You've won this battle nginx
The war will be mine!
00:00 - 18:0018:00 - 00:00

« first day (2058 days earlier)      last day (3116 days later) »