« first day (809 days earlier)      last day (4153 days later) » 

6:00 PM
The other way is less familiar and, to be honest, blocky.
I hate it.
If we are going to cite other languages like C# as an acceptable way then I'll play the same card and use Dart.
I've actually used this syntax.
I like it. It works. It's familiar.
The proposed way gets only the 'it works'.
 
So you are familiar with Dart, nice
So who else is familiar with Dart? Exactly, nobody :D
And who is familiar with C#? Yes, also nobody, but less nobody ^^
 
I dont' meant that it is familiar because I know dart.
It's more familiar because it's almost identical to a function declaration.
Where in any of PHP do we have something that is remotely like this at all:
class TimePeriod {
    // Accessors are implemented just like you would define an actual accessor, but without a body
    public $Hours {
        get;
        set;
        isset;
        unset;
    }
}
 
lol
 
It's ugly.
 
public $id {
    get { return $this->__id; }
    set { $this->__id = $value; }
}
 
where is that ugly?
just taking your above code
 
@LeviMorrison classes
Right, really going now.
 
and not some bullshit example that includes isset and unset
 
Laterz
 
@NikiC I think it's REALLY nasty.
 
6:04 PM
it's nicely grouped
 
Same line method declaration bothers me a lot, to begin with.
So lets' get more realistic:
public $id {
    get {
        return $this->__id;
    }
    set {
        $this->__id = $value;
    }
}
When looking at set and get it isnt' inherently clear what it is get/set for.
Nor is its visibilty
Contrast that to:
public get $id() {
    return $this->__id;
}
public set $id($value) {
    $this->__id = $value;
}
No such issue.
 
@LeviMorrison You mean because the important part is in one place and one place only, rather than repeated again?
 
@NikiC I'd argue for the boilerplate in this instance. It's helpful, not harmful.
 
boilerplace is never helpful
 
Then pick a different word for it.
 
6:07 PM
else it wouldn't be boilerplate ^^
 
The verbosity helps in this case.
 
@NikiC Yes. I don't think it's worth while now, but eventually perhaps...
 
At least in my opinion.
This proposal isn't PHP-like in nature at all. It doesn't resemble the PHP style or ideology at all. I think we can do better than this.
And as I said, at least Clint has taken feedback.
The current proposal is better than it was when it was proposed.
 
@LeviMorrison I think both approaches have their merits, but have different semantic value. One variant emphasizes the fact that they are properties the other emphasises that they are methods implementing those properties
 
In the declaration I'd say that emphasis on the latter is more important.
In usage the former will be evident:
 
6:09 PM
And I think the one that values properties is closer to the reality
 
$hours = $timestamp->hours; <- evidently not a function.
 
Because they will be used and seen as properties, hopefully as normal properties, rather than methods
The fact that they use methods is not or rather should not be relevant
 
I disagree.
And that's fine; we can disagree.
I'm partly upset because this was proposed right as I was working on a proposal.
He beat me to the punch and because of that he gets what he wants.
 
no
 
It's not truly democratic in that sense.
 
6:12 PM
this proposal is year old
we only pushed the new version out now because we want it to go in 5.5
 
@NikiC You don't remember me participating in its discussion back then?
Trust me: I've been following this all along.
 
i do remember
i just don't understand what you meant by "I'm partly upset because this was proposed right as I was working on a proposal."
 
I was working on a properties proposal back then.
 
back then?
 
And I was hoping my feedback would at least be acknowledged. Unfortunately it was mostly ignored.
@NikiC Yes.
One thing that still bothers me about the proposal, personal feelings aside, is this:
public $Hours {
    get;
    set;
    isset;
    unset;
}
 
6:15 PM
@LeviMorrison If you were working on this back then, then why the heck did you never propose it?
 
@NikiC I was working on it, I didn't have it fully worked out.
Rather than try to compete I tried to collaborate.
 
@LeviMorrison So you didn't manage to work it out in the last half year or so?
@LeviMorrison Is that from interfaces?
 
No, that's really defining a property with defaults.
 
Now that you posted that I think isset; and unset; should not be defaultible in that way
they are already implicitely auto-implemented, so an explicit version seems useless
on the other hand it doesn't really hurt either
 
Another thing that bothers me:
public $Hours {
    get { return $this->Seconds / 3600; }
    protected set { $this->Seconds = $value * 3600; }
}
^ That right there.
That's one reason I was saying that my syntax is better. That's awful.
Also, I just noticed that this magic $value is still around.
Is that intentional?
I thought that was being removed?
 
6:18 PM
@LeviMorrison It's awful proportional to its rareness ;)
@LeviMorrison Both variants are allowed
you can specify an explicit param if you like to
 
Wow.
No, please.
 
e.g. if you'd like to typehint
 
Magic constant is at least in line with PHP.
But a magic variable? Really?
 
magic variable it totally in line with PHP
php has quite a few magic vars
 
And how many are realistically used?
 
6:20 PM
I don't like them, but I don't have anything against this particular one
 
Beyond the superglobals.
 
because this one is very limited in scope
 
I'm out of chat for some time. cu l8ters
 
I'm actually shocked you would support this one, @NikiC.
 
@LeviMorrison I've been using both the header var and the error var from time to time
 
6:21 PM
It screams of bad idea.
 
@LeviMorrison personally I think that adding the other syntax with the explicit arg was the real fault here
 
@NikiC You would kill type-hints on setters?
 
because now there are two ways to do the same thing and that is something I don't like
@LeviMorrison No, I would implement them sanely
As DateTime $date;
 
As would I but that got shot down.
 
6:22 PM
and DateTime $date { get { ... } set { ... } }
@LeviMorrison That's where I started to really dislike Stas
Him and his types bullshit
 
Hey! my recent push fixed a test that even core fails!
3
 
@NikiC This is what I was saying earlier: not everyone's voice is truly heard.
I bet most people would actually be for the syntax you proposed above.
But one loud voice of opposition killed it. Stas was the only opponent on the ML yet there were multiple people voicing for it.
Yet here we are without it.
 
@NikiC no access modifier?
@LeviMorrison forget him...
 
@ircmaxell Implicit public
 
Ah ok
so protected DateTime $date; is also acceptable?
 
6:27 PM
@ircmaxell Would be if I were in charge of the RFC.
I'd do what other proposers do and cherry-pick feedback.
 
SQL room seems dead...
Is anyone in here handy with Relational Algebra?
 
@LeviMorrison After the ext/mysql debacle, I have no faith in the RFC process. In fact, I have little to no faith in the core project...
 
Specifically the case when to use a Cartesian Product over a Natural Join?
 
@ircmaxell I had the faith that I could actually contribute and change things.
It seems that I was misled.
 
@LeviMorrison had being the key word
 
6:29 PM
This is why my data-structures lib doesn't have an RFC and I'm thinking it might not ever have one.
 
@MylesGray same as room for Transvestite Philatelists ... that does not meant that people ask questions about about stamps and latest drag gear
 
@LeviMorrison things will still get done. That's why I still write RFCs. because that's what people cling to...
Perhaps I should write a mail to list about it...
 
I don't have enough confidence in my php-core to try to slip something in.
And I dont' have commit access.
 
@tereško - PHP and SQL are usually quite closely linked, simple question.
 
I've submitted patches for several things but in each case there was a detail that meant it wouldn't happen that wasn't found until after the work was done.
 
6:31 PM
@MylesGray tell it to c# developers , or java or python
 
So I don't even have access to try to slip something in.
 
Watch me get the same response...
 
Evening yall
 
@NikiC: we have contribution: github.com/ircmaxell/PHPPHP/pull/8
 
@LeviMorrison I think one can contribute and change things
 
6:38 PM
@NikiC You perhaps. Nobody seems to even listen to me.
 
But I guess that in a situation such as this the only way is through a concurring proposal
 
I even get flamed off-list sometimes.
Although I thought the latest one was pretty funny. It was regarding the prototype website.
> Pathetic, pull your fingers out. Get some work done instead of debating meaningless rubbish
 
@LeviMorrison: keep up the good work...
 
user1596138
Would anyone be willing to try and point me in the right direction for my false session timeouts?
 
I had committed significant improvements to the documentation pages the day before he sent it.
I'd never seen him before in any of the lists. Was pretty funny.
 
user1596138
6:41 PM
I use limesurvey for a yearly survey. Now every single time I try to submit, even if only after 2 seconds I get a session timed out error.
 
@ircmaxell lgtm
 
lgtm?
 
looks good to me
 
"Looks good to me"
 
user1596138
Sloppy code is here... pastebin.com/wzpRgSzd
 
6:42 PM
I hate manually merging pull requests... Such a PITA
 
@JosiahSouth What is this if ($_GET['page'] == NULL)?
 
@ircmaxell Don't :)
Always better when people rebase it
 
user1596138
Forgot to remove it. It was for another part of the website. I tried removing it and it still happens
 
@ircmaxell Btw, I really like the speed at which this is moving
 
By the way, Stas might be writing a CurlFile class to fix a deficiency in the curl API. That's really funny to me because I introduced classes in some of the website code and he didn't like it at all, but here he is introducing a class to a completely function based API.
 
6:43 PM
If you guys can keep it up :)
 
What a character, that Stas.
 
@ircmaxell And also, I have an idea of what this might be useful for, depending on how close to internals we'll stay
 
@NikiC Oh yeah?
@NikiC definitely! More and more tests are passing... I have a feeling the objects change is going to make a bunch more pass...
 
@NikiC PHPPHPPHP ?
 
@ircmaxell Remember my plans to move PHP two a two-phase compilation process?
 
6:45 PM
Although I guess it should already run itself
 
When I was working on that my approach was basically to port my PHP parser definition to C code (automatically)
 
Acutally, it's not that far from self-hosting... Once we get object support properly (meaning with inheritance), in theory it should be possible to self-host
 
I didn't go through with that, but that was the plan
 
@NikiC Yeah, I was thinking about that. Use this as a code-generator...
 
PHPPHP would provide the basis for the second part of it
It could be more or less directly translated to C
which is obviously still a big hassle, but at least there would be some basis to work off
 
6:46 PM
actually... I wonder something... Could this be used to "compile" PHP code into a PECL extension (for sane code)...?
 
@ircmaxell can and there are other projects doing that ;)
 
@NikiC other projects that actually work?
 
like I'm talking compiling Symfony into a PECL extension...
 
@ircmaxell afaik phalcon is compiled php code
 
6:48 PM
@NikiC wut? really?
 
It is? I thought phalcon was completely in C... As in it may have been generated, but not from a userland version...
 
no not sure
 
user1596138
So we are putting up a poll tomorrow that usually has over 3,000 participants... And today the script starts "timing out".
 
sort of like how xcache is generated C code... But it's not written in PHP...
 
user1596138
Does anyone know if it's possible to just completely disable the timeout?
 
6:49 PM
I was just remembering that the code looks so ugly that it has to be generted ^^
 
@JosiahSouth Nobody is going through a 13021 lines page for you
 
but yeah, I don't know whether from PHP
 
user1596138
I've tried adding time, making the timeout longer. Nothing changes. From the second the page loads it says it's timed out.
 
user1596138
@PeeHaa Man, you always do this. I didn't ask anyone to. I posted for reference. It's a courtesy.
 
6:50 PM
Wow. Thanks you so much. You are far to kind
 
user1596138
My question though; can I disable the timeout on an average php sform?
 
@hakre @DaveRandom cmon deal with it: stackoverflow.com/questions/14127407/…
 
@LeviMorrison Sorry about that. I do actually have the patch sitting in my local repo. I haven't committed it yet because I was tied up with moving my server to a new host. I'll get it done by tonight if someone hasn't fixed it already.
 
hi all, I want to submit amazon feed. download amazon simple script. but its not running. do any one have other example url etc. where amazon submit api feed is used.
 
@GoogleGuy That I know of it hasn't been touched.
I'd appreciate it if you got it resolved fairly soon because I get messages about that problem all the time :)
#1 reported issue
 
6:54 PM
@LeviMorrison Yup. Will push it tonight when I get home.
 
@GoogleGuy Thanks.
@ircmaxell Do you have a preference for things like isset vs array_key_exists?
 
@LeviMorrison in what sense? In general?
 
I prefer isset(). because I consider null to be the same as not set (lack of a value)
especially in that case, since the array contains objects. so array_key_exists would be faulty in that case...
 
@ircmaxell Depends if people clean up properly or not.
I was just curious, that's all.
Not claiming one is better than the other. They have different uses.
 
7:01 PM
sure...
 
@ScottW Most people have multiple. Congratulations for nearing perfection.
 
Closed that Objects PR
 
Best comment I have found in code this year:
// Closing PHP tag intentionally left out - yes, it is okay
?>
 
user142019
Hello friends.
 
More trolls.
 
7:07 PM
What is it?
 
user142019
Does anyone know why Set is not an instance of Functor?
 
@PeeHaa And then \r\n after closing tag...
 
user142019
Is it because it doesn't satisfy fmap f . g = fmap f . fmap g?
 
one more test case...
 
7:08 PM
@yetihehe \r\n is lame. \n is the new carriage return line feed
 
Erm, that's why I wrote \r\n.
 
@NikiC: what do you think about adding github.com/ircmaxell/PHPPHP/commits/master/lib/PHPPHP/… as a contributor?
 
@ScottW Reading isn't easy for some people I know
@ScottW Please do. I don't want to hurt your feelings. My parents told me not to make fun of the simple people
 
@ScottW Is finally mandatory when doing a try/catch in java?? (honest question)
 
> It’s like clearing your desk or emptying your inbox. Ahh, a fresh start!
Clearing it isn't problem. Keeping it clean is :(
 
@PeeHaa When emptying your inbox doesn't impact you, maybe your communication has no value?
 
@yetihehe If only clients would finally get that
 
7:22 PM
@PeeHaa It's not.
 
Pfeeew. Was somewhat scared there for a moment
 
If you have finally, you can also skip catch block (like: try {} finally {})
 
Then what's the point of having an empty finally just sit there. Feels a bit like try { shit } catch (Exception e) { // I should have done something here } to me
Or am I missing something here?
 
@PeeHaa It's just a way of being lazy
 
yay! lazy! :)
 
7:25 PM
There's no point, his IDE probably auto-generated it or something and it didn't get deleted
or perhaps it's part of their style guide
 
There really is a style guide stating please leave useless code in there just for fun? I thought PSR-x was going to be bad :P
Although I can think of some cases where useless code is kinda useful for consitency so yeah...
Yes!
Dog is yelling he needs to go out and do his thing. brb
 
function (){
Whoops!
 
speaking of reducing boilerplate in PHP, I'd really like syntactic sugar for constructor instance var assignments
 
user1125394
does @ircmaxell 's project just reimplement php or improves its syntax?
 
7:39 PM
@igorw Reduce boilerplate in PHP? NEVA!!
@cyril Reimplements, at least for now.
 
@cyril it's a PHP impl for now, but prototyping syntax improvements will be an interesting use case.
 
★⋰⋱★⋰⋱★⋰⋱★⋰⋱★
★ Happy New Year ★
★⋱⋰★⋱⋰★⋱⋰★⋱⋰★
 
@igorw someone has been bugging me the whole last year to allow assignments a la function __construct($this->id, $this->name) ^^
I like the concept, but don't like that particular idea
 
> You earned Bushido on Stack Overflow!
 
What I'd rather prefer is something more Scala-esque, like class User($id, $name) { ... }
Though that's not very PHPish ^^
 
7:51 PM
@NikiC not sure about the exact syntax :) it's just something that I think would be quite valuable for PHP. coffeescript also has it, with
`class Thing
constructor(@foo, @bar) ->`
 
I'd rather eliminate the need for the word function inside of a class block.
 
I'm having a brain fart...How do I set a container to go all the way to the bottom even if there isn't much content
 
@LeviMorrison I'm constantly being told PHP has no methods, and only argument is, how can it be a method if it's declared as function :P
 
@LeviMorrison Thinking about it a bit more, PHP is virtually crying for the DateTime $date syntax...
I mean, not only from a user perspective, but also from an implementational perspective
 
8:09 PM
hello
 
I got constructors working :-D
 
user1125394
tuples would be cool $a, $b = (1, 2); or {1, 2};
 
@cyril array-based destructuring was discussed earlier
[$a, $b] = [1, 2];
 
@LeviMorrison Maybe we should try a last effort to get that syntax?
Like, make a small RFC for it
 
user1125394
8:18 PM
@igorw and wildcards [$a, *] = [1, 2]; or [$a, _] or [$a, ]
 
@cyril we already have all that, don't we?
just with list() ^^
 
user1125394
in the new version 5.5?
 
no, since pretty much always
 
extract?
 
yep, list(, $foo, ) has been possible since forever
 
user1125394
8:20 PM
 
// Or let's skip to only the third one
list( , , $power) = $info;
echo "I need $power!\n";
 
user1125394
yet another list keyword, without would be better
 
It would cool if you could link to LoC in example.
 
class List <-- unexpected T_LIST
 
user1125394
php = too many keywords/names :(
 
8:23 PM
class Array|Echo|Print...
 
user1125394
$compact ($php's functions)
 
@igorw Especially that one is pretty annoying
 
sup php room
 
hiya @ShotgunNinja
 
@NikiC I try to help how I can.
 
8:30 PM
@igorw figured out the dynamic routing issue
 
@dyelawn alrighty, what was it?
 
[meekly] dumping the dev cache...
still not sure why it happened in the first place, or why dumping the cache fixed it
so i guess "figured it out" is the wrong way to say it. but working nonetheless
is there a better approach to including those routes? it seemed the other day like you thought my method was overly complicated
 
@dyelawn What does your routing scheme look like?
 
@dyelawn seriously? geez!
 
8:42 PM
What that guy said :)
 
@dyelawn well they are cached, so it doesn't really matter :P
 
Also please don't mix tab/space indentation. :)
 
@PeeHaa what's wrong with it? not trying to be a jerk, just trying to learn from more learned
 
Without looking at what actually is going on in there I just saw one monster of a load() method
 
@PeeHaa noted. don't know if it was you or somebody else, but somebody said the other day that tabs were bad, so i'm trying to convert to spaces. old habits die hard...
 
8:45 PM
@dyelawn Wasn't me, but I am a spaces type of guy :)
 
@PeeHaa it does add a significant amount of routes to the collection. but the spec from the client was to use all of the available services in the google api php client library other than those in the $skip array
 
Besides that huge load thingy, you might want to decouple some pieces like RouteCollection, Client and Route. I would also rather inject the services instead of hardcoding it in the class
Anyway just my 2c
 
@PeeHaa you mean inject the services into the route loader?
no problem, it's 2c i asked for :)
 
It looks like it (the class) is doing to much
I would indeed rather inject services
 
i guess that makes more sense. i was hoping to avoid causing conflicts and to accommodate updates by not renaming anything
 

« first day (809 days earlier)      last day (4153 days later) »