« first day (1074 days earlier)      last day (3874 days later) » 

4:01 PM
 
@Lusitanian Yeah I know. But I have already handled a shitload. Basically everything that is not a service is done
I think the actual services should be pretty doable because they are mostly the same @Lusitanian
 
@PeeHaa services should be easy. once we have one done, they're basically all done
@PeeHaa shouldn't be bad either, it's not like they're crazy complicated
 
@Lusitanian I will see what I can do this weekend if I'm bored
@Lusitanian Also tnx for totally breaking the tests... ;)
 
4:28 PM
@PeeHaa oops
 
How do you handle HTTP abstraction? Have you rolled your own which you use across projects, consume something like HttpFoundation, deal with it per-project, or something else?
 
user895378
@DanLugg Is "I wrote my own server because PHP's web SAPI was insufficient" an acceptable answer? :)
 
@rdlowrey Certainly ;-) Though I'll definitely have to file that under "something else"
 
@rdlowrey Who made you a room owner and why?
;]
 
user895378
@Lusitanian Someone was high, no doubt.
 
4:32 PM
@DanLugg I didn't go so far as @rdlowrey but I rolled my own I use across personal projects or sometimes if I'm working with Silex/Symfony I'll use the HttpFoundation
 
@rdlowrey @PeeHaa was drunk when he owner-ified me so I guess it makes sense
 
@DanLugg only if you have sufficient reason to
 
@tereško So would that be "deal with it per-project"?
 
yes
 
4:33 PM
@tereško Do you have a self-rolled library, or preference to a 3rd party's, when you feel that a full abstraction is necessary?
 
user895378
@Danack Anytime I see "composer" and "@rdlowrey" in the same sentence I just assume I've done something stupid and broken composer. In those scenarios it's always my fault.
 
@PeeHaa fixed
 
@cspray So you use your own in absence of a 3rd party implementation (if you're not using a 3rd party framework for example)
 
Wow most stupiest reaction ever:
> It is your fault in a way if you add a composer.json and don't submit it to packagist...
 
@DanLugg Yep
 
4:36 PM
@PeeHaa wut
 
@PeeHaa Yeah. Composer is great. Running your own packagist repository is great. Using Packagist.org probably borders on the criminally negligent.
And that's speaking as someone who accidentally did a man in the middle attack against a few hundred people who installed my fork of Guzzle, rather than the correct version.
 
Since HTTP can be implemented objectively, do you feel PHP would benefit from having an OO-HTTP abstraction natively? If you don't need the full layer, you can obviously fall back to a different library or non-library alternative, but regardless, should one exist?
 
@Danack :-)
 
user895378
@DanLugg I think this would be fantastic. Moreover, a new OO abstraction would eliminate the need to retain backwards-compatibility with the existing design mistakes because it could be a separate thing entirely.
 
user895378
4:43 PM
And you could have an .ini entry to determine if you wanted to use the old garbage superglobals or the new shiny thing.
 
Perhaps an RFC is brewing.
 
@DanLugg Not a pecl package?
 
@Danack Pardon my expletives, but: fuck that.
;-)
@Danack (were you being serious?)
 
@DanLugg I think so. It sounds like it could be developed separately from the core PHP, and so would be a lot easier to get it implemented like that (I think, obviously it might not be). And then once it's working and wonderful then spend the 2 years hammering people on the internals list to integrate it.
 
@Danack Ah. Well, that's a different story.
However, the argument will probably be "It's in PECL. Leave it there.". In light of the new attitudes and efforts, I think we need the go-for-broke approach.
 
@DanLugg Yes, I believe that it does. But only if it is designed in a way that actually adheres to the HTTP protocol and names things correctly. I don't want another $_GET-like design wrapped in an object
 
@cspray Precisely. The HTTP spec is pretty non-ambiguous (though, I'd be interested in @rdlowrey's opinion on that). Deviation would be plain irresponsible and obvious.
 
I also believe that it belongs in the core. If PHP is a web development language then maybe we shouldn't bastardize the HTTP protocol.
 
user895378
@DanLugg I agree with you. The spec isn't changing. Once you get it right, it's right.
 
It'll eliminate much of the bike-sheddery. "Paint it green! Purple! Hamburger!"
 
5:07 PM
@DanLugg "It'll eliminate much of the bike-sheddery." I like your optimism; however you should read amazon.com/SYSTEMANTICS-THE-SYSTEMS-BIBLE-ebook/dp/B00AK1BIDM/…
 
@Danack Will do :-) I'm assuming I'll be cynical and jaded after?
 
@DanLugg More like a sense of Zen calm will wash over you, and you will know to struggle is to fail.
But to be clear - bike shedding goes on forever. And if you make the important things be clearer and require less debate about them, then people will only have the less important things to talk about, which are more open to debate and bike-shedding.
 
@Danack Well, that's the goal. Present an OO-HTTP abstraction that so closely follows the specification that the only response will either be "implement exactly" or "do not implement".
"But we should name--", "19.4.5 or GTFO"
 
urm ... I wouldn't go for that ....
 
Mind you, extensions to the abstraction; those will be an ever-lasting debate. "What should we name a convenience method that {foobar}'s"
 
5:14 PM
I don't think many would ...
 
@JoeWatkins Wouldn't go for?
 
I wouldn't vote to include it ...
 
@JoeWatkins What, the whole thing?
 
you have to ask what would there be to gain from including it ... could it function any better, take advantage of internals, do things you cannot do from /ext ... if the answer to all those things is no, then why include it ?
 
@JoeWatkins The gain would be conformity to a very specific set of rules that apply quite completely to the problem domain that PHP was built to attack. Moreover a predictable, and common interface to work with.
Or, by example: it'll gain us no longer having to deal with the following: "Project A's HTTP abstraction doesn't work with Project B's abstraction. Now I need to waste time and brain power."
 
5:20 PM
did nobody tell you we don't live in an ideal world ?? you would not have to "no longer" deal with that, possibly less often, but it makes no difference that I can see ...
 
there's already a world class interface to HTTP protocol functionality in the shape of cURL, furthermore PHP does already have abstraction on top of, or next to ...
 
@JoeWatkins How does cURL apply here? And what abstraction, $_GET and $_SERVER?
 
ah I see, you're not talking about http client stuff ...
I thought it would be a bit mental to re-invent the wheel ...
clarify, what is it that you're talking about then ??
 
45 mins ago, by Dan Lugg
Since HTTP can be implemented objectively, do you feel PHP would benefit from having an OO-HTTP abstraction natively? If you don't need the full layer, you can obviously fall back to a different library or non-library alternative, but regardless, should one exist?
 
5:24 PM
saw that ...
 
Preceded by:
54 mins ago, by Dan Lugg
How do you handle HTTP abstraction? Have you rolled your own which you use across projects, consume something like HttpFoundation, deal with it per-project, or something else?
 
dunno what that is ...
give it to me in a nutshell, what is it that you're talking about ??
 
aka getting rid of the magic super globals $_GET and $_POST and the almost as magic header() functions, to something that isn't as hacky.
 
Creating a spec-compliant OO-HTTP abstraction for incoming requests.
 
right, that's SAPI abstraction
 
5:25 PM
@JoeWatkins Yes.
 
ok, I'm listening, what's your intention, or what is the purpose of HttpFoundation ?
I suppose I don't really get what is wrong with using _GET|_REQUEST|_POST etc ?
 
@JoeWatkins HttpFoundation was just an example of a commonly used set of components to abstract HTTP into an OO layer.
 
show me an abstract or something, I don't get what an OO abstraction of the SAPI would provide
 
@JoeWatkins Look at what Symfony's HttpFoundation does. Something like that should be supported natively. I don't know how closely that specific implementation follows the HTTP spec, however it's going in the right direction.
It would provide a more mature and sensible interface to the SAPI. We've lived with the rather rudimentary superglobals and header(), etc., for quite some time. Given the problem domain that PHP was intended to work in is HTTP applications, it would make sense to have a robust, spec-compliant interface.
 
Will 50,000 tables in a MySQL database be significantly slower to query over a MySQL database with 1,000 tables?
 
5:36 PM
it's the right direction for symphony, probably, but I don't agree that it's something that PHP requires in the core ... PHP is not a soley OO language, I would totally, obviously agree if it were ... and in the context of symphony it makes perfect sense, but php in general not so much ...
 
@JoelKidd Where does a question like this come from I have to ask?
 
@PeeHaa I'm designing infrastructure for a database at the moment and it's looking like it could grow to around 50,000 tables
 
yeah, about that
 
@PeeHaa And it's looking pretty impossible to have it smaller than that
 
@JoelKidd why would it be 50,000 tables?
 
5:37 PM
WAT!?! lulwut
 
how?!?!
 
Because of the sheer amount of data I'm dealing with
 
qua-qua-qua-quadruple wat
 
No every single record has to have its own table you know
 
@JoelKidd that means lots of rows. not lots of tables.
 
5:37 PM
@JoelKidd you're not designing, you're probably missing it entirely :|
 
Right, but its a intermediary table
 
that doesn't make sense
 
Read here
Oops wrong link
4
A: Normalizing a database column

mattytommoYou have a many to many relationship between Stop Codes and Journeys. To eradicate this, you need to decompose the relationship. In order to do this, you need an intermediary table, let's call it JourneyStopCode, which will look like: JourneyStopCode: JourneyStopCodeID (primarykey) JourneyID S...

The fu
 
Is MySQL really equipped for big data?
 
uuuuhhmm again WAT!>!?!!?!
 
5:39 PM
 
o_O
 
Really even the wikipedia page about db normalization would prevent you from creating 50000 tables
 
you uh
 
don't create 50,000 tables, it doesn't matter what engine or data they use, it's a horrible horrible idea ... design another way ...
 
@PeeHaa said it
 
5:40 PM
Ok thanks, but really im not dealing with small data lol
 
it
 
That might sound a bit extreme but I did need to know
 
doesn't
matter
 
the amount of data you have makes no difference in the number of tables you need
 
Ok, but I can read sentences
 
5:40 PM
Really you only need a link table.
There I just saved you 49999 tables
3
 
:P
 
the answer on your question actually explained it quite nicely
idk how you take that you need 50k tables from that answer
 
Ok so I'll put it this way
 
ow wow. didn't even saw that answer. yeah do that please
 
@JoeWatkins Fair. Agree to disagree.
 
5:42 PM
The problem is I can't do it that way without scaling it up
Because the Journeys will be overwritten
Journeys are not unique
 
yeah stop using mysql
 
Hence why I need lots of tables
 
No you don't
 
no
no you don't
 
Ok, but srsly I'm new to this so please stop talking to me like I have 10 years experience :p
 
5:43 PM
cassandra, hadoop etc...
 
Let me put it this way
What is unclear about the answer?
 
Nothing, the answer is perfect
The problem is in the data
These "Journeys" you will see are repeated across many different data sources
 
@DanLugg I'd read a patch if it were available, if it provided something you haven't communicated then that's something else to consider ... a pecl extension is probably a good idea, I'm not saying it's a bad idea at all
 
@JoelKidd [we occasionally often always come across as condescending arses in here but we are trying to help FWIW]
7
 
@Lusitanian Ok thanks
 
5:44 PM
anyway though
 
I need a way to make Journeys unique to each place they're in
 
okay
 
Otherwise they'll get overwritten
So I thought, fine just create another table
or 3* each table because there's 3 in the answer
 
that's why there's a unique id col
 
I had a feeling it was the wrong way of doing it
 
5:45 PM
:P
 
@JoeWatkins The problem with a PECL extension is that's where it'd stay, PECL. The whole point is to unify all of the disparate wheel-reinventions of the HTTP abstraction that every single framework, architecture, component library, etc., needs to, and does, recreate.
 
@DanLugg if there was ever a vote to include APC, or even pthreads, I'd vote no ...
 
And replace it with something that unconditionally follows the specification.
 
Use either some unique thing / (things) of the journal and used it as key or use an auto increment key @JoelKidd
 
It's the JourneyID column I'm talking about
 
5:46 PM
still not really following the issue i guess
 
@JoeWatkins But APC and pthreads help PHP work with the web. HTTP is the web. And we've had it wrong all this time.
 
Ok I'll be totally open and straight and try to make it as clear as possible
Each company I'm working with has about 50 sets of journeys
There are lots of companies
I can't store them all in that same Journey table because eventually there will be a duplicate
So I need to separate them
that make more sense?
 
no it doesn't. there won't be a duplicate
because there's a unique id column
and if you want, add a company column to the table named "Company"
 
@DanLugg APC was never part of the core; it's the most popular extension on the face of the earth ... write it, the location of the code does not matter ...
 
that stores the name or identifier of a company (foreign key to company table if you so desire)
 
5:47 PM
Foreign key
Perfect
Thank you v much!
 
@JoeWatkins We'll have to discuss this once I have an abstract and a patch.
 
user895378
@DanLugg I do think that for such a major shift you'd almost certainly have to start in pecl, but if it works well and people like it then it could easily make its way into core.
 
user895378
It's a shame (to me, anyway) that this isn't what the PECL HTTP extension does.
 
this is not HTTP abstraction, it's SAPI abstraction ...
 
out of curiosity what do people think of this: wiki.php.net/rfc/deprecated-modifier
 
5:51 PM
 
@Danack wut
 
user895378
@JoeWatkins right, but I'm lamenting that ext/http isn't written in such a way as to allow for this kind of thing.
 
@Lusitanian Quadruple Take Masterclass
 
lol
 
user895378
I don't know how much support you'd really be able to generate for changing the SAPI, honestly -- that's historically the most stable part of PHP.
 
user895378
5:53 PM
Which is why I went off on my own server thing. I like writing code in PHP, but I think the web SAPI does a terrible job of abstracting HTTP. Fixing it would be more work than doing something new.
 
Screw you guys... I'm going home!
 
user895378
@PeeHaa later
 
@PeeHaa lol
 
@rdlowrey Well, for the sake of implementation, anything new would invariably proxy the old code.
 
Damn. 'Band of Brothers' is hitting me right in the feels.
 
5:56 PM
Hi everyone!
 
@Lusitanian I think the author of the RFC has a good point ...
 
user895378
@DanLugg True ... but at a point all the BC just becomes such a mess. It's certainly doable, but it stresses me out just thinking about it :)
 
Zend 2.4 comes with an application.config.php file instead of application.ini file, how can i add the line

autoloaderNamespaces[] = "Shanty_" from application.ini to application.config.php ?
Can someone help please ?
 
Y'know, the word "arse" is in the starred list 3 times.
5
Dammit!
 
4
 
6:01 PM
@Lusitanian so do the replies on internals thread ... it's likely to be met with the same kind of reaction ...
 
I knew that was going to happen...
 
hmm ... naming thing
 
Wait, I thought we all agreed to stop starring random-arse things.
 
it seems to me that naming a private method as getSomething() is kinda off, because it looks like a getter
should I just call it anyway or is there a better prefix/verb that I could use instead
 
fetch?
 
6:12 PM
I tend to use that one for persistence
"produce", "obtain" and "retrieve" seem like good synonyms of "fetch"
 
find, search, select, at, in, from, create ...
 
grab
Of your list obtain/retrieve seem closest to get
 
Well, if it's getting something, privately, I don't see why get* doesn't apply.
 
Hello I have sql problem, I insert into DB and then read from the same table, but the row isn't inserted when select happens... any thoughts?
 
@DanLugg because it looks like a getter
seems semi-confusing , especially when you revisit code later
@Akxe either your INSERT or your SELECT is wrong
 
6:19 PM
@tereško I can see what you mean, but if the method is "getting" a value, then I can't see any reason not to use get*. If it's building a value, then build*, etc.
fetch (to me) has connotations of remoting.
retrieve similarly has connotations of persistence.
Is the issue because it's private, and that get is idiomatically aligned with public-accessor?
 
@tereško Nope works both I am sure cause if I redo the action it skips insert and select correctly
 
are you saying the expected behavior is to SKIP the SQL queries ?
 
@DanLugg whats the diff between building and setting? building means initializing, like in a factory?
 
@tereško Nope it is what it does...
 
because you are making no sense whatsoever
 
6:30 PM
get         Return an existing value, likely from the encapsulating object
build       Return a constructed value, likely from locally encapsulated values
fetch       Return an existing value, from a remote source/server
retrieve    Return an existing value, from locally accessible persistence
@reikyoushin ^^ that's how I see it.
 
@tereško Two querrys one does registration one does login. Registration is at 1st place then I have login querry, but the login querry fails even if the input is correct (I used echo $sql; then coied that into phpmyadmin and it works there)
 
I would say fetch is higher level than retrieve. A fetch could result in a retrieve by those definitions.
 
i can't see the distinction between fetch and retrieve when you use it on the code already.. feels like it can switch places?
 
@reikyoushin Yea, it's arguable. They all "get" values, from somewhere. Whether they're created at the time of invocation, or retrieved from punch cards, you're "getting" something.
 
or it seems i am too blinded by my ignorance?
 
6:37 PM
No no, I probably took the granularity too far.
 
the get vs build thing can easily be separated.. because build means you initialize something before retrieving it.. the last two seems confusing.
oh well ^_^
 
Just as per definition fetch: Go for and then bring back (someone or something). -- this has the connotation of distance, er go, remote retrieval.
retrieve: Get (something) back; regain possession of. -- this has the connotation of persistence. It was created, stored, and now I'm regaining control of it to change or view it.
Fuck it, I'm no English major. ;-)
 
I'm not even english
 
@tereško Was your concern because the method was private?
 
yes
 
6:47 PM
You could always prefix with a _ ;-)
 
why the hell would I do something so stupid
 
Winky face... winky face.
I have private accessors. I don't think it's confusing. private is of no concern to the behavior of the method.
Visibility in general, shouldn't affect the behavior/name relationship of the method.
 
Any idea why I'm getting unknown column in where clause?

"SELECT ATCOCode,Latitude,Longitude FROM StopCode
INNER JOIN JourneyStopCode ON StopCode.ATCOCode = JourneyStopCode.StopCode
INNER JOIN Journey On Journey.Code = JourneyStopCode.JourneyCode
WHERE JourneyCode = $journey
AND JourneyStopCode.Operator = velvet"
'velvet' is a field inside the Operator column
 
1
Q: I'm learning PHP, what should I know about security?

DragonLordI am currently taking a course in web application development, and the assignments require me to write PHP form code. Later projects will interface with a MySQL database. However, web applications are subject to a variety of attacks, including SQL and other code injection, and my professor does...

What should I change in this question so that it can be reopened?
 
Stack questions are there to tell you what's wrong and right about written code, or help you finish it
Whilst it's a good question it's not really meant for Stack Overflow
Although you should check out: programmers.stackexchange.com
 
6:55 PM
Can a mod look into migration, then?
 
Not sure if it's possible to migrate questions between sites, probably easier to just copy and paste it over
 
@JoelKidd it is, 3K+ users can close-vote as OT and migrate it, or a mod can move it. But looks like people closed it wronlgly, so now only a mod can move it easily.
 
Um... SQL injection, XSS, and don't run PHP code that didn't exist before runtime and don't run remote PHP code.
 
@JoelKidd Definitely possible. @DragonLord Don't copy-paste.
 
7:00 PM
@DanLugg: I know not to cross-post. Should I flag the question for migration, though?
 
@DragonLord There's a good chance it'll get closed there too; though I can't say for certain because I can't remember Programmer's FAQ.
Read the Programmer FAQ on do/don't, evaluate your question objectively, and determine if its a good fit.
 
@DragonLord I would just delete it and repost in programmers
 
I'd rather migrate than delete the question
 
Can you store a function in a class property?
 
@JoeWatkins it's less about being "OO" imo, and much more about being based on values. if request and response are locally scoped values, you no longer have everything globally. which is the main problem with SAPI.
 
7:03 PM
@billmalarky Yeop.
 
Question: if you embed and iframe on a page, when you load the page with the iframe does it transfer data from the iframe to the site hosting it or does it just come straight from the server hosting the iframe? In other words does the server with the <iframe> tag in it's HTML use bandwidth?
 
$foo->bar = function () {};
 
Jawesome.
 
@TheSnooker An <iframe> is just another browsing context in the client's browser. So, it'll come straight from the server hosting the contents of the <iframe>. In fact, without any extra work, you won't know if the <iframe> resolves to anything or not.
 
@DanLugg Also, wtf is the point of that? why not just call the function direct?
 
7:07 PM
@billmalarky I don't understand what you mean.
 
I guess if you needed to store a function in a property, why not just store it as a method instead?
 
@billmalarky Callbacks
 
Anyone implement a domain/service layer in php, which used by a MVC and Json-RPC consumer? I want to create a service to calculate an item code based on a models attributes. I think passing a instance of the model to the function is reasonable, but what would you do for javascript? Automatically convert the object to a php model?
 
I'm looking at the php documentation on callbacks, I'm a bit confused what a circumstance where you would use one is.
Is it just a simple way to apply a function to a bunch of values in an array?
 
@billmalarky simple example is the array_map function, you give a function and it applies a new array with each element being the supplied callback applied to the original element
 
7:13 PM
@Justin So it makes more for cleaner code than it does extra functionality?
 
@billmalarky there's more advanced usages such as using them when creating monads, but that's a bit more advanced
 
Okay.
 
@igorw I don't see the problem with having global globals, I do see a problem with every scope having a symbol table and or copying from globals into the local scope ...
 
@billmalarky if used properly, yes. Sometimes they are necessary in event based systems. For ex, you give a function and you only want the function to run if a certain event happens
 
the only way to sensibly abstract the SAPI is with OO, possibly some static-ness, the use of classes whatever ... or the use of super globals ... and they are super global, to an application responding to an HTTP request, _GET is globally relevant information, for a console application argv is globally relevant information ...
 
7:17 PM
And these event based systems require a variable/property to be passed instead of a function/method?
 
@billmalarky: in javascript, commonly you see something like $obj->addCallback($eventName,$callback);
so the object at certain part as an array of callbacks, and when its time to fire the callback, it just loops over the array and executes each function
 
hi there
 
Evening room
 
I am getting tired of Linux Mint on my Samsung ultrabook.....thinking of fedora, anyone got experience with that?
or maybe Red Star OS
 
7:35 PM
@PeeHaa github.com/php/php-src/pull/458 and I just noticed I failed to fully impl that, which is supposed to be a drop-in replacement
 
@crypticツ Including perfect comments :)
@DaveRandom Yeah you and your ldap fetish
:)
 
But it's the most awesome thing ever! Microsoft use it for Active Directory and everything. Yeh, I'll just go I think.
 
@PeeHaa I think everyone at some point in their life has the sofa dilemna
 
I once bought a sofa that was too big to fit through the front door, so I had to buy a new house. — Juhana 39 mins ago
+2 ^^
 
7:40 PM
@crypticツ clap clap!
and why is the answer grayed out?
 
@reikyoushin -3
 
@reikyoushin it was deleted, or pending delete
 
but i cannot see deleted comments yet (afaik,)
 
It's not deleted yet, it does have 1 delete vote though
 
why does the answer have +5 votes when the OP already said it "was" a reserved word
 
7:42 PM
@reikyoushin it's an answer, not a comment. You should be able to see pending deletions
 
Now it has 2
 
how i wish i can cv already. :)
 
@reikyoushin Hopefully it will continue to be a reserved word. I don't want people to be able to use reserved words as class name or you will get some bell end who does class Function {} or something
 
@DaveRandom 'bell end' ?
 
@DaveRandom or class Class {}
 
7:44 PM
class Class{ public function Function() {} }
 
class functionClass
 
@DaveRandom what i meant was, the answer just repeated what the OP already said.. so it wasnt really an answer
or something like that?
 
@DaveRandom blocked at work
 
Dammit RFCs. I wish I didn't have to remove the max-width: 55em; when viewing them in HTML.
 
7:45 PM
@DaveRandom gtfo
 
@Pheagey lol, probably for the best
 
@DaveRandom lol
 
@reikyoushin The whole question is lmgtfy material anyway tbh
 
@DaveRandom Otherwise I'd get -no- work done
 
@DaveRandom If PHP were case sensitive, I would completely support a user-land Function class.
 
7:46 PM
@DaveRandom yes, gtfo!
 
Class Array biatch
Hell I would even be happy with List
 
Although IIRC there actually is a workaround to make it work, although it is horrible
 
@PeeHaa class Default extends List implements Function, Case, <?php { }
 
@DaveRandom my actual path you mean?
@DanLugg no, <?php is not a pure alphanumeric string xD
 
@bwoebi I think I'm in the methods only camp tbh, sorry. List is the exception but it shouldn't be a reserved word in the first place.
@PeeHaa class Array? Really??
 
7:48 PM
@DaveRandom <blink>really!</blink>
 
Array should be allowed because it's not array. That is my opinion.
 
@DaveRandom if you namespace such things, it won't disturb anyone.
 
@bwoebi No class_alias() is what I was thinking of
 
@DanLugg class Array implements ArrayAccess ;-)
 
@DaveRandom I hate to have to do \My\Awesome\Lib\Parser\ArrayParser
 
7:49 PM
@bwoebi yeah I agree. Reserved words should be allowed as long as they are namespaced, but then again I have no idea what I am doing most of the time =oP
 
@bwoebi Pretty much. And alias ArrayAccess to something sensible: Indexable.
 
@PeeHaa I guess I can see that but I'm not convinced.
@bwoebi I'm not worried about that, it's about sane naming
 
@crypticツ well, they should be always allowed; to restrict them to namespaces means extra checking…
 
Oh man, and generics? Could you imagine? class Array<$Item> { }
 
@DaveRandom there are always conditions where the use of a class T_KEYWORD would make sense. Example: Parsers…
 
7:52 PM
I want support for things like function 汉语/漢語($中文 = false) {}
 
@DanLugg Still don't understand why we'd need generics in PHP…
 
中文 == Chinese Simplified, no?
 
@crypticツ Already works, I think
 
@bwoebi Because boilerplate sucks.
 
@DaveRandom really?
 
7:53 PM
As long as your source is unicode. Let me double check
 
@DanLugg what boilerplate do generics save in PHP?
 
@DaveRandom not with that slash in it
without it it works ofc
 
@crypticツ 3v4l.org/niFeB
 
@DaveRandom *mind blown*
 
@DanLugg 中文 means zhongwen and reffers to the chinese language in generall, not to a writing system
 
7:56 PM
@bwoebi Given:
interface CollectionInterface<Type> {
    function add(<Type> $item);
}

class Collection<Type> implements CollectionInterface<Type> {
    private $items = [];
    public function add(<Type> $item) {
        $items[] = $item;
    }
}
Then:
class Dingle { }
class Dangle { }
$collection = new Collection<Dingle>();
$collection->add(new Dingle()); // we cool
$collection->add(new Dangle()); // aw shit
 
More useless than typehinting…
 
As opposed to:
class DingleCollection { }
class DangleCollection { }
// ...
 
@DanLugg 简体字 = simplified / 正體字 = traditional chinese (both written in simplified characters, never learned traditional )
 
@bwoebi ... more useless than type-hinting? Suggesting that type-hinting itself is useless in any way?
 
7:59 PM
@crypticツ You wanna have some real fun, put an RTL marker in an identifier
 
@DanLugg no… that's not what I've written. I've just written that Generics < Typehinting
 
@bwoebi Well, they're disparate concepts. Generics require a type-system to begin with. It's complimentary, not less useful.
 

« first day (1074 days earlier)      last day (3874 days later) »