« first day (1469 days earlier)      last day (3462 days later) » 

12:00 AM
@AndreaFaulds sure, I get that
not an easy problem to be sure
 
I chose /protected because it's less restrictive... so it's more useful, I think.
 
user895378
And if you're paranoid like me you can always make your class final ...
 
Results:
                     | PHP 5.6.3-dev | ReckiCT -O0 | ReckiCT -O1 | ReckiCT -O2 | ReckiCT -O3 | ReckiCT    | HHVM - Array
---------------------|---------------|-------------|-------------|-------------|-------------|------------|--------------
 simple()            | 41998.60825   | 1296.82474  |  107.28866  |    3.84536  | **1.00000** | 1324.06186 |  944.63918
 simplecall()        | 77548.95000   |  705.31250  |  100.33750  | **1.00000** |    1.16250  |  181.77500 |  698.67500
 simpleucall()       | 39526.87395   |  663.96639  | 1493.24370  |    2.15126  | **1.00000** |  336.63866 |
also: the strcat is with a metric ton of memory leak warnings, so once I take care of those, it should get much quicker
 
user895378
nevermind. dumb.
 
@rdlowrey Hah
 
user895378
12:02 AM
@ircmaxell thank you for monospacing the graph tonight. Last night's was totally unreadable.
 
On the other hand...
Aren't protected properties rather rare?
 
user895378
Not as rare as they should be.
 
@AndreaFaulds no
---------------------------------------
[Thu Oct 23 19:59:09 2014]  Script:  'ReckiCT/src/zend_bench.php'
---------------------------------------
/tmp/recki_34785473610776731791369712712973230678/php_recki_34785473610776731791369712712973230678.h(58) : Block 0x02393500 status:
Beginning:  	Cached
Freed (invalid)
    Start:	OK
      End:	OK
 
@ircmaxell The other option is of course to make readonly work in reverse, but that'd be more confusing
 
about 20,000 of those outputted
 
12:05 AM
private readonly => public readable, private writeable (yuck)
 
yeah, it's not easy
 
So uh
I was so busy with PHP stuff I forgot to go back to the laundry room and unload my washing, and now it's 1am (I went and retrieved it). Oh well, I guess drying can wait for another day.
 
user895378
air dry ftw \o/
 
I airdry my T-shirts anyway. I'm pretty sure none of them say they can be machine-dried
 
@rdlowrey I was on a connection limit of 4 - changing to 16 and then -1 seemed to make not much difference. I will crack on with making the application testable on something other than my machine.
 
12:11 AM
Should var_export output short var syntax?
 
Short array syntax?
 
That.
Also, damnit, I need to sleep. Goodnight everyone! :)
 
user895378
12:34 AM
@AndreaFaulds night
 
user895378
@Danack okay, sorry that didn't help. I'll be happy to look into it once you have something I can fiddle with.
 
user895378
Gotta iron out any issues so we can release \o/
 
When I include 'my.phar';, how can I change the $argv it sees?
 
@QuolonelQuestions Extract it and run the code yourself?
 
I don't want to extract it
I tried to eval(file_get_contents('my.phar')) but it didn't work
More accurately, eval('?>' . file_get_contents('my.phar'));
That fails with PHP Warning: Phar::mapPhar(/usr/bin/env(4) : eval()'d code): failed to open stream: No such file or directory
It doesn't like being evaled. It only works when included, but I can't seem to alter the args passed to it
 
12:48 AM
I didn't realise that eval was meant to work - I have extracted phars before to get the to work:
10
A: Run composer with a PHP script in browser

DanackYes you can run Composer with a little PHP wrapper. All of the Composer source code is available in the Phar file, so it can be extracted and then you can run it after setting up an InputInterface to replace Composer expecting the commands to be passed in via the command line. If you setup your ...

 
Actually, I'm trying to do more or less the same thing
That is, write a wrapper to run Composer
That said, I really don't want to extract the contents
 
You can just include composer as a dependency in your project and call it directly like:
//Create the commands
$input = new ArrayInput(array('command' => 'update', '-vv' => 'true'));

//Create the application and run it with the commands
$application = new Application();
$application->run($input);
 
@AndreaFaulds no
 
Yes, but about using it in phar form, is that possible?
 
@QuolonelQuestions you cant
 
12:55 AM
If you really want to get into this it gets pretty deep
I'm building a Linux container that just contains PHP and Composer
Nothing else, not even a shell
 
o k . . .
 
The problem is that, while I can run php composer, I cannot just execute composer directly because its shebang line is invoked as /usr/bin/env php
And env is not installed
So I am writing a shitty env emulator that just invokes Composer
Or trying to
I can't use any of PHP's process spawning functions because they all require a shell, and there isn't one
I can't eval the source because that doesn't work
 
why run composer from there? why not do it on deploy
 
There is no deploy
 
huh?
 
12:58 AM
It's just a base container for other people to use to build applications on
 
"while I can run php composer, I cannot just execute composer" Why is that a problem?
 
It is not expressly a problem but I would like to be able to do it
 
drinks beer
 
I would prefer to keep composer's invocation as simple as possible for users of the container
 
alias composer='/usr/local/bin/php composer'
 
12:59 AM
How is that alias going to work in an environment where there is no shell
 
So how are they invoking it?
 
Through Docker
Within the container there exists PHP and Composer and absolutely nothing else
 
This is not something I'm that good at - but if the command is being run through docker, there will be a user inside the container that's processing the commands right? Just because there's no visible shell, doesn't mean that alias won't work.
Otherwise, how would 'php composer' work?
 
php composer is shorthand for sudo docker run -it --rm composer php composer
 
Yes....and inside the image, php is an alias for /usr/local/bin/php or similar?
 
1:03 AM
don't use the .phar distribution of composer, use the normal code, and write your own wrapper for it
 
Is that really the only way? I thought it was supposed to be possible to work with packed phars
 
as you said, it has the shebang, so unless you package it without it...
 
I also don't understand how it picks up the arguments passed to the script that invokes it, ignorant of any changes the script tries to make
 
What kind of beer
 
@QuolonelQuestions there is $argv which is a normal global, and $_SERVER['argv'] which is a super-global, and they aren't the same
 
1:06 AM
Yes, I tried to modify the shebang line to invoke /usr/bin/php instead of /usr/bin/env, however it tripped a CRC check failure in the PHAR integrity checking code
Oh really? Let me try changing the global one then
 
@self Budweiser in a can.
 
@Danack you are dead to me
 
I actually like the metallic taste.
 
@Danack very nice, about to grab some blue moon myself.
 
@ircmaxell It works :D
 
1:08 AM
@ircmaxwell I just saw your video
on that new website.
 
@Danack I don't care about the can... I care about the beer... Which is fubar
 
Where you were drinking scotch
 
phproundtable?
 
That's all I needed; to use $_SERVER['argv'] instead of $argv
 
yes
 
1:09 AM
Thanks maxell
And thanks Danack for entertaining my nonsense
 
Ales in bottles are no good.....my local pub has one of the best pints and I've been spoiled by how good it is. Most other lagers are worse....I'm pretty sure the brewing is done differently of 'Bud' in the UK to the US. It tastes reasonably similar to Budvar to me.
 
Gumball head by Three Floyds is my favorite beer
So hard to find though.
 
1:48 AM
Ok so this is really weird. I have a working project, which I zipped up. I uploaded it to S3, downloaded it, and try to run it from the command line....and it fails in the middle of execution saying that it can't find a particular class. Running the same code through PHPStorm....and it works.
Also - this is bullshit: bbc.co.uk/news/business-29751124
 
2:06 AM
@rdlowrey So I just sent you a link to a zip file containing a complete version of my app. It should be run by running php bin/bastion download in the root of the project. However shit is fucked up and bullshit. I've tested the zip file before I uploaded it - it works the same as I'm seeing in my projects directory.
After uploading the file to S3 and downloading it again, it just doing run correctly from the command line, giving an error Fatal error: Class 'Nbsock\SocketException' not found in /temp/wtf/Bastion/Bastion/vendor/rdlowrey/nbsock/lib/Connector.php on line 142 - I can see no possible cause for this.
What makes it even weirder is that running the extracted downloaded code from inside a vagrant VM or PHPStorm doesn't get the class error.....and it also doesn't seem to get the transfers dying problem.......instead it gets an error of Crypto time out exception 10000ms
So basically I have no idea what's going on.
 
Sup
How is everyone doing?
 
Getting confused.....
 
Everyone enjoying his/her friday morning already>
?
 
@rdlowrey May have found it: `PHP Warning: include(/temp/wtf/Bastion/Bastion/vendor/rdlowrey/nbsock/lib/SocketException.php): failed to open stream: Too many open files in /temp/wtf/Bastion/Bastion/vendor/composer/ClassLoader.php on line 382
PHP Stack trace:`
@MikeM. Not enjoying it yet......hate it when stuff is just going bizarrely..
 
2:21 AM
@Danack You know
It'z magic :)
Let's enjoy this friday :) don't be hatin <3
 
2:39 AM
@rdlowrey I can't see anything obvious in the dtruss output. The crash is occurring at about the same time during the programs execute that the 'hang' was occurring before I zipped and unzipped the project. So although the behaviour is bizarre, there's a good chance it's related.
Final bit of info for the night, for the thing that I was originally seeing (the request processing just stalling) dtruss reports that the system calls being made are lots of:
select(0x6, 0x7FFF5FBFD120, 0x7FFF5FBFD0A0, 0x7FFF5FBFD020, 0x7FFF5FBFD1A0)		 = 0 0
select(0x6, 0x7FFF5FBFD120, 0x7FFF5FBFD0A0, 0x7FFF5FBFD020, 0x7FFF5FBFD1A0)		 = 0 0
select(0x6, 0x7FFF5FBFD120, 0x7FFF5FBFD0A0, 0x7FFF5FBFD020, 0x7FFF5FBFD1A0)		 = 0 0
select(0x6, 0x7FFF5FBFD120, 0x7FFF5FBFD0A0, 0x7FFF5FBFD020, 0x7FFF5FBFD1A0)		 = 0 0
select(0x6, 0x7FFF5FBFD120, 0x7FFF5FBFD0A0, 0x7FFF5FBFD020, 0x7FFF5FBFD1A0)		 = 0 0
select(0x6, 0x7FFF5FBFD120, 0x7FFF5FBFD0A0, 0x7FFF5FBFD020, 0x7FFF5FBFD1A0)		 = 0 0
 
Which is also file descriptor related.....and on that bombshell good night.
 
Good Night @Danack
Going to sleep aswell
Cya everyone
 
3:01 AM
Good night
 
 
1 hour later…
4:28 AM
Hello
 
4:41 AM
Anyone know what algorithm SO use to handle a page view?
 
> Copying and modifying SO system.
Night folks.
 
Any problem?
I do a study about this system.
 
5:15 AM
@HendryTanaka What do you mean by algorithm to handle page view, exactly?
 
moin
 
5:40 AM
morning
 
moin
shall we have a go at property setter/getter patch ?? can anyone think of a syntax that isn't a carbon copy of C# and isn't stupid ?
 
It's sane api and huge time saver. I'd love to see getter/setters
Also getter/setters are not exclusive to C#, you can see them in other languages.
 
yeah but the last patch was real similar to that and got knocked back for complexity ...
so where else can we draw inspiration from is what I'm asking ...
I will still vote no on anything as complex as the patch we had before ...
 
@JoeWatkins Actually, I am against of prefixing functions like C# or Haxe does.
However, that would require one more array for keeping track of getter/setter functions and that'd suck...
Basically, getter or setter should be a normal function of instance, but that's calling for problem (as far as I understand internals, atm).
 
I haven't looked at the old property get/set rfc for a while ... it's so massively complicated ... there has to be a simpler way, do we really need abstract properties, abstract accessors ... so complicated ...
 
5:54 AM
Since properties are just regular functions, yes, we do.
 
abstract properties ?
 
Yes. As an end user I want to be able to override property or define property in interface and implement them later.
 
but that's how normal properties work, why abstract ?
 
For example, I have a base class that implements interface which has property defined and I don't know what should that property do in base class. What I want in such cases is to define that property as abstract in base class.
That's what I normally do in C#.
 
that seems so complicated to me ...
and 21 others ... evidently ... at least ...
 
5:58 AM
@JoeWatkins I'm sure it wasn't for complexity, but not everyone would like to have them at all...
 
@bwoebi most people do cite complexity ... we had clint in here before talking about it ...
 
It's... but without that getter/setter won't be complete and I'd vote no for incomplete thing if I had karma.
 
Here're my thoughts about implementation: having keywords get and set, once parser sees that function has those keywords, prefix those functions with __get_*, __set_* and add some mapping to it, so when parser sees $foo = $bar->property; it actually do $foo = $bar->__get_property.
I know that's little bit complicated and I also don't like auto-magically prefixing methods, but this seems easiest way to me.
It'd be great to have lua style getter/setters but that's impossible in php (__get, __set sucks and we all know that). :-)
 
6:14 AM
In computer science, a mutator method is a method used to control changes to a variable. They are also widely known as setter methods. Often a setter is accompanied by a getter (also known as an accessor), which returns the value of the private member variable. The mutator method is most often used in object-oriented programming, in keeping with the principle of encapsulation. According to this principle, member variables of a class are made private to hide and protect them from other code, and can only be modified by a public member function (the mutator method), which takes the desired new value...
 
setter returns value? hmm..
 
we would need attributes/annotations first, but I like that better ...
 
Despite that I've been parsing annotations for ages, I am against implementing them. And totally with @rdlowrey's point, comments should not tell code what to do.
 
class Foo {
    protected $bar;

    public function __construct($bar) {
        $this->bar = $bar;
    }

    public funcion setBar($val) {
        return new Foo($val);
    }
}
heh
 
Adding keyword property looks better for me.
 
6:18 AM
well we could use another syntax ...
<?php
class Foo {
    public $name;

    :property function name() {
        return $this->name;
    }

    :property function name($value) {
        $this->name = $value;
    }
}
?>
off the top of my head, it wouldn't need to be annotations ... it looks like it is there (it is, attributes)
 
class Foo {
   private $foo;

   public function get foo() { return $this->foo; }
   public function set foo($foo) { $this->foo = $foo; }
}
Looks more fluent, imho. ^
 
yeah actionscripty ...
I like that too ...
means set/get are reserved words though .... lots of breaking gonna happen ...
 
And do we really need that unset thing from previous rfc?
 
anywhere you have a get/set method/function in user code today ...
 
nvm, was a silly question.
 
6:24 AM
+1
:)
 
hehe
I remember @bwoebi had rfc that was giving end-user possibility to use keywords as names.
 
@bwoebi way around ?
 
yeah but again that was complicated, wondering if there is a new way around, or a way to lift some of the restrictions without the same kind of complexity that got it rejected ...
 
Well, I can't really tell, parser is dark side for me in php internals. Let's wait for others.
 
6:29 AM
maybe AST makes it way easier?
 
we still have the same parser ... so I dunno ... bob will know ...
 
No, the AST is only a first necessary step, but AFAIK not enough. Maybe I'll tackle it again once I'm finished with phpdbg work and re-analyze how complex it'd get.
 
that'd be sweet ...
too often we come up against the keyword problem ... it's a stupid problem ...
 
+1 ^
 
posted on October 24, 2014 by kbironneau

/* by mELt */

 
6:36 AM
@Joe you got my recent ping about working on phpdbg issues?
 
I did, haven't looked yet ... coming to it ...
 
7:09 AM
good friday morning everyone
 
@SergeyTelshevsky morning.
 
it's really good :) and i wiith the same to you! :))
 
Off to work. Finally releasing annoying and buggy project today.
Wish me a luck! :-)
 
@Leri releasing on friday? wish you best of luck!
 
@SergeyTelshevsky Yeah, and thanks.
 
7:27 AM
good luck for that on friday! :))
 
good meurning :)
 
7:44 AM
Morning
 
8:04 AM
Morning
 
Good morning.
 
That moment when a client blames you for a mistake, while in fact it's their own fault..
And you reck them on the phone... love it :D
 
I had the same here :D
Someone who registers in the login field -_-'
only happend to 1 of to 1500 people that are on the website :D
 
8:19 AM
Pro tip: never do security test for work projects on Friday morning.
 
@Duikboot This was a fail in their accountancy packet, we basicaly wrote front end website that imports everything from their accountancy packet.. And she emaild me products not on webshop.. I check, she isright, something wrong with a cron job, manually redo and it worked.. Everything in it, problem, products still not there according to her, offcourse not if you can't assign the right groups to a product.. :D
 
'she' ...
 
@Duikboot to bad 'she' wasn't blond ;)
 
:D haha
 
Mon to the fucking friday ring
 
8:29 AM
@PeeHaa o/
 
yo!
 
Hello everyone :)
 
I think I will roll that back
 
Reason? :-)
 
8:33 AM
It changes the meaning of the question
 
lol
 
The question is about scraping website x. Replacing the link with a dummy website is counter productive
Also just a (non clickable) link is not offensive
Also OP even went as far as adding a warning
Rolled back. If you don't agree with what I said above feel free to rollback the rollback (I won't start a rollback war)
:-)
 
@PeeHaa content of the website has nothing to do with the problem. OP selects div that does not have href attribute, so url in question does not matter.
I don't care, tbh.
 
Now now kids.
 
@NewToJS ?
 
8:38 AM
Seem a bit hostile in here.
 
@NewToJS Why? Just two people who discuss something is not really hostile me thinks
 
posted on October 24, 2014 by kbironneau

/* by nukestar */

 
Never mind.
 
#php sucks
Lol instafav within 10 seconds :P
 
What is instafav?
 
8:43 AM
@AndreaFaulds I like Patrick's idea wrt readonly new syntax
 
Yeah, i get the fav part, just never seen/heard anyone use insta before.
 
E_NOT_ENOUGH_INTERNET
 
@NewToJS instakill? instagib?
 
Nope.
 
8:50 AM
E_NOT_ENOUGH_GAMES :P
 
E_NOT_ENOUGH_WEEKENDS
 
awefully quiet in here for a friday :D
 
I say, weekend is not the problem
but the fact that we work 5 days 8 hours
instead of 4 days 10 hours
how do people cope when you have to work during the week and when you finish work
you can't go buy anything since shops also work while you work
 
9:06 AM
I'm kinda stuck.
 
@ziGi 6 days 12 hours :P
 
@PeeHaa Dutch people are not allowed to work more than 9 hours a day
that's the law
 
@ziGi They are.., there a several occasions that a person is allowed to work more than 8 hours..
 
@ziGi Tell that to my boss. Ow wait ;)
 
1. I've WS that's called by other server. WS authenticates user and returns auth key to the caller.
2. The caller uses this session key as a flash variable.
3. Flash uses this auth key to authenticate socket server

Problem: auth key can be stolen.
 
9:09 AM
@Leri ssl?
ow wait. I does that by default right?
 
@PeeHaa I know you are your own boss
and btw, in English you don't say 'ow' but 'oh' instead
 
@PeeHaa ssl won't help much here. Auth key is on client side, it can be stolen with simple javascript from browser
 
@Leri Aaaaah I see
 
@Leri Write a unique encryption ?
 
@Leri What is the problem of people getting the auth key? Isn't it just like a session in the context of ""normal web
@Naruto Aaaaaaaaaand it's broken :)
 
9:12 AM
Good morning :)
 
btw, isn't a user allowed to know his own key? :D I guess you need to be logged in to find this key? So if someone gets that key, it(s his own authentication?
 
That is what I would think ^ @Leri
GOOD FRIDAY FUCKING MORNING @salathe!
 
If a hacker get's that key, it means he was able to login and get that key.. and you have an other security issue? :p
 
WHAT HAPPENED TO YOUR AVATAR @PEEHEE??!
 
@salathe @WesleyCrushed holloweenified it
 
9:15 AM
ooh good idea
 
@PeeHaa you're dutch so you prob see all dumpert movies?
 
he's always posting dumpert links in here
 
:-)
 
then he prob seen the alien prank?
 
heheh yeah
 
9:16 AM
@salathe dumpert.nl/mediabase/6620725/ce90f69a/alien_prank.html I would shit myself or die due to a heart attack..
that's just next level.. you could kill someone with that :P
 
:D
 
@Naruto That does not really remove the problem. At some point client has to have auth key defined.
 
@Leri Why does it need to be secret?
 
@Leri What could possibly go wrong when a user knows their auth key?
 
@PeeHaa To prevent something similar to session hijacking.
 
9:22 AM
@Leri That's why we use ssl ;)
 
monfriringdays
 
o/
 
GOOD FRIDAY MONRING BITCH!
 
I'm curious what dave is going to say on this issue :P
 
@PeeHaa Well, there's one.. but flash is not able to read session key if it's not passed as flash var, that is variable in javascript and can be stolen from there. :-)
 
9:25 AM
SSL will prevent mitm attacks, it won't prevent someone stealing the key on the client computer, but there's literally nothing you can do about that
A more important question is: why are you using flash for anything ever??
 
@DaveRandom Gambling, i.e. online multiplayer game.
 
While I admit that relying on Adobe not introducing more security flaws is a gamble, I'm not sure it's the kind of gamble you want to take in this scenario
What are you actually authenticating here? The the client is your application, or that the user is allowed to use the service?
 
@Leri Why flash game? :(
 
@Leri The same for sessions
The cookie is available on the user's machine
Session fixation is not about stealing the session (a.k.a. the cookie) from the user's machine
 
@DaveRandom To control users. Allow/disallow things and manage them (increasing/decreasing balances).
@Naruto Not my fault, project was already started when I came in. Also, flash covers more browsers...
 
9:32 AM
@Leri that sucks :( What can a user do when he has his auth key?
 
@PeeHaa Fair point.
 
@Leri Then all you need is front to back SSL, and to request the user's auth details in the flash app
 
@Naruto Create and play game.
 
As long as there is no way to retrieve the auth key with a separate request, you don't have a problem
What you can't do is authenticate the user and then serve up the flash and key separately, but that would be silly anyway ;-)
@Leri you might find some more info that would help here
 
@DaveRandom -.-
 
9:36 AM
Flash.. So secure.. :D
@DaveRandom LOL :D
 
Much flash. So secure. Such Adobe. Wow.
 
Bottom line is: F*ck you adobe. :-)
 
@leri kinda yes :)
 
<?php
class Foo {
    public $name;

    public accessor name() {
        return $this->name;
    }

    public mutator name($value) {
        $this->name = $value;
    }
}
?>
 
/me really wants to try Google Inbox, like, today
 
9:43 AM
<?php
class Foo {
    public $name;

    public hakunar name() {
        return $this->name;
    }

    public matata name($value) {
        $this->name = $value;
    }
}
?>
 
Second one, definitely
 
How r 2 get my public ip from cli?
 
curl http://icanhazip.com/
(I know that looks like a joke, but seriously)
 
I meant running a script from cli.
 
9:46 AM
$ip = file_get_contents('http://icanhazip.com/'); then
 
furry muff
cheers
 
Although tbh the definition of "public IP" is pretty loose. It doesn't tell you much.
 
what is this day? Dumbass client-day? ><
 
@Naruto s/client/management for me
 
I just got a call, client can't take back-up.. If you work on the wrong network.. you can't thats freaking obvious right?
 

« first day (1469 days earlier)      last day (3462 days later) »