« first day (1352 days earlier)      last day (3602 days later) » 
03:00 - 19:0019:00 - 00:00

3:54 AM
Anyone here?
 
4:37 AM
sometimes
 
 
3 hours later…
7:18 AM
Is anyone online?
0
Q: Unable to access a variable in the other class

Hassan AlthafMy problem is that, when I try to run this code: <?php require_once('classes/class.users.php'); use Users\UserService; use Users\UserMapper; if(isset($_POST['login'])) { $result = $userService->handleUserLogin($_POST['username'], $_POST['password']); } ?> I get t...

Someone help me, lol
 
7:39 AM
0
Q: Unable to access another class

Hassan AlthafMy Problem is that when I run this code: <?php require_once('classes/class.users.php'); use Users\UserService; use Users\UserMapper; if(isset($_POST['login'])) { $result = $userService->handleUserLogin($_POST['username'], $_POST['password']); } ?> I get this erro...

 
8:38 AM
Morning room 11
 
morning
 
8:58 AM
WTF IE:
5
Q: what does this comment /*@cc_on!@*/0 do inside an if statement in javascript?

user3019105just a little question about this comment I found on an ebook about HTML5: /*@cc_on!@*/0 this comment should be somehow bound to the recognition of the IE browser in order to use the document.createElement() to create the unrecognized HTML5 elements, but I didn't find useful infos about the meani...

 
9:27 AM
mornings
 
Morning @RonniSkansing
 
nm waking up is heavy again
you
 
abit sick, canceled some family stuff.. so just chillin.. drinking coffe, baking up
 
9:47 AM
Do you guys do authorization at the routing layer or at the business model layer or both?
 
9:57 AM
@RonniSkansing Sounds like a perfect way to spend the sunday :)
 
PHP Programmers
Hi
1
Q: Unable to access another class

Hassan AlthafMy Problem is that when I run this code: <?php require_once('classes/class.users.php'); use Users\UserService; use Users\UserMapper; if(isset($_POST['login'])) { $result = $userService->handleUserLogin($_POST['username'], $_POST['password']); } ?> I get this erro...

Help me out, lol
 
@David When you say authorization you mean authorizing a user or actually granting / declining user access to certain routes?
 
@PeeHaa help me please.
 
@HassanAlthaf you already got a answer?
 
10:00 AM
That answer creates another fckin error.
-.-
I wanna do dependency injection, and if I instantiate it in the constructor
it will not let me to do dependency injection
-.-
 
well, you should not post question about "Notice: Undefined variable: "
It is normal to get one warning/error out of the way and meet the next
 
Ronni.
I could try to instantiate
but
I dont want the UserMapper to contain any DB Details like suggested by a guy in CodeReview
 
Show me a minimal example (put it in pastebin or something)
I will help you out
 
@PeeHaa More about access control. Example John want's to generate invoices but his user type doesn't allow that so you could prevent him doing that by doing access control at the routing layer and prevent him going to the route or you could have the security sitting just outside/around the domain model using some sort of proxy maybe. I could call $someService->generateInvoices(.....) which the proxy would then do some authorization and then call the real services method if everything is ok.
 
For fuck sake, this message is timiing out.
 
10:06 AM
and what did you expect to happend? (and what did happen, if you got a error mention it)
 
So, now when i try to fill in the HTML Form to login
<?php
require_once('classes/class.users.php');

use Users\UserService;
use Users\UserMapper;


if(isset($_POST['login'])) {
$result = $userService->handleUserLogin($_POST['username'], $_POST['password']);
}
?>
 
@PeeHaa The problem I'm thinking with the proxy is let's say the real service method returns boolean, int or whatever, what to return if the proxy finds out this user is not allowed to perform this action, I don't want to throw some AccessDeniedException because then I have to try catch every time I want to use the interface of the domain model. What do you think about this?
 
please no code in here @HassanAlthaf or atleast format it =]
 
@HassanAlthaf maybe read the error message before you post on SO? ... :x
Someone bored enough to give some feedback? github.com/PatrickLouys/http
 
morning
 
10:13 AM
morning @JoeWatkins
 
@David Not saying it is the way to go, but I have a ACl container (decorator) in my router. And it throws up some AccessDeniedException.
Moptning joe
 
@Patrick anything specific you want feedback on?
 
@RonniSkansing Not really. Just looking for things I can improve as it's my first public repo
 
@Patrick why are you hardcoding the http status texts and not give people the ability to change it?
Or am I missing something?
 
should be addCookie
 
10:20 AM
@PeeHaa I assumed they are fixed, but seems like I was wrong
@JoeWatkins good catch, thanks
 
Hello.
Can anyone help me?
@RonniSkansing I'll give you the pastebins now.
 
Im still here
No worries I will be most day, but now and then I move away from the screen @HassanAlthaf
 
getCookieIterator -> getCookies ... just because ...
 
Ok, Ronni?
The errors are included in other code.
 
I don't like everything being a function call ...
wasteful, these calls to get should be reading array elements and not creating new fcall stacks and what not ...
 
10:23 AM
Btw guys,
 
@HassanAlthaf is the error undefined variable?
 
Ronni
the undefined variable userMapper is defined.
its an instance of the class userMapper
 
The UserService has no knowlegde of the $userMapper variable
 
@PeeHaa Yeah I have something similar. It's just I saw ircmaxell say he does access control at the domain business layer. I'm creating a SPA in Angular and obviously I have partial/small templates that need to get loaded and doing it at the business layer is no good there because it's templates I'm loading and nothing got to so with business model interaction. I'm just going to leave it all at the routing layer
 
@RonniSkansing how would I smash that knowledge in to UserService's head?
 
10:25 AM
has > isset, isset is operator
everythingVars, Vars is superfluous ...
has > isset, isset is operator
my internet sucks
 
@HassanAlthaf you could add a constructor with 1 arg to the UserService
you should try and open a fresh file
forget the code you got now for a moment
 
whatcha mean
 
@JoeWatkins I still want to return an immutable array though, so is the increased code complexity worth the perfomance gain? I have no idea how this works under the hood
 
:D
R im on it.
 
10:28 AM
@Patrick example ?
 
@JoeWatkins well I need to convert the arrays to the ImmutableArray class, so I guess I would have to inject a builder for that
 
I can't make sense of the storage package, seems like it's not really required
interface GetSetter extends Getter
 
@JoeWatkins I'm having fun fixing phpdbg bugs :-)
 
I don't see the logic there, there's no reason a getsetter should extend a getter
 
@David yeah imho that's the easiest / cleanest
 
10:36 AM
@bwoebi cool
 
@JoeWatkins I plan to extend it in the future. I just don't like using plain arrays for the request parameters as those can be changed. Just having a Getter seems to make sense.
@JoeWatkins How would you have it instead?
 
a plain private array cannot be changed, it would seem altogether simpler to say an array is private if you don't want another unit to change it, rather than wrap that array in a class an incur a function call whenever you want to access an element ...
 
@JoeWatkins How's life going?
 
@JoeWatkins it can't be changed inside the class. But the response from say getParameters() can if it is just a plain array
 
@bwoebi thanks for asking ... nothing good to say ... still terrible ...
 
10:42 AM
@JoeWatkins that was a bad day start..
good morning
 
@Patrick you return a reference ?
 
Fellas, how do I properly escape CSS in both attributes and in stylesheet?
 
@JoeWatkins No, it won't change the array inside the class. But the resulting array can be manipulated (now that I think about it that could actually make sense...)
 
@JoeWatkins :-/
 
The application allows end users to input CSS that gets directly injected to stylesheets and style attributes
(I know)
 
10:44 AM
@Patrick why do you care what the caller does with the information returned, that's not a concern f the current class is it ?
(that's not a question, it's not)
 
@PeeHaa what would you prefer? Defaults set in the class and a method to modify them or inject the array in the constructor (and make a builder that handles the defaults)?
 
How can I escape it so that malicious users can't break out of the rule or the attribute?
 
@JoeWatkins Got you. Thanks for the feedback. I'll change it to arrays :)
 
I think I would rather do something like public function setStatusCode($statusCode, $stausText = null)
Also this if (!array_key_exists((int) $statusCode, $this->statusTexts)) { should be removed
I am allowed to use both custom numeric http status codes as well as the texts
 
morning
 
10:47 AM
Morning @NikiC
 
@JoeWatkins any thoughts about github.com/krakjoe/phpdbg/issues/93 ?
 
Check out tools.ietf.org/html/rfc2616#section-6.1.1 @Patrick. Or perhaps the entire rfc might be of use
 
@bwoebi I like display inline if we can make that tidy
 
@PeeHaa Thanks. Would you throw an exception if no statusText was supplied and no default text is set for the given code?
 
@JoeWatkins but only of the small things. it doesn't help when we output 10 lines for each var…
 
10:52 AM
@SecondRikudo for attributes, follow each rule, owasp.org/index.php/…
 
yeah that's why i didn't do it that way in the first place and used placeholders that are easy to remember, or I thought they were ... probably just try it out and see what fits and set a sensible limit ... as you say only display small data sets and abbreviated versions of bigger ones ... but I'm not sure how it should look ...
 
@RonniSkansing Problem is there are some characters that I want to allow
I allow the user to insert CSS! He can enter #ABCDEF, or rgb(1, 2, 3) or whatever
 
IIRC the reason phrase is not mandatory @Patrick
 
@SecondRikudo I think you need to consider it as two different context sanitation/validation
 
@RonniSkansing love you lol, you helped me out alot! :)
@RonniSkansing are you good with interfaces and abstract classes?
 
11:00 AM
html attribute and css (watch out for content)
Here is a sheet for the css part https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
@HassanAlthaf you are welcome.. make sure to read up good on the php manual. I am familiar with those, yes..
 
@RonniSkansing can you come back and write me a dummy of abstract and an interface?
 
@HassanAlthaf sorry nope, neither of us would benefit from that
 
why lol?
 
I would probably also make some crappy implementation compared with some of the great libs out there already
 
btw whats pthreads
 
11:04 AM
You should search for that instead of asking =]
Machine gun questions that are searchable often make people grumpy
 
lol
ill just continue my project.
 
have fun
 
/me slaps @JoeWatkins for using tabs as fine-grained indentation. github.com/krakjoe/phpdbg/blob/master/phpdbg_info.c#L161 Here, in output, use spaces :x
 
How bad (in terms of practice) is it to use require_once or include_once statements?
 
Lol
I've heard its better to use require_once() than include()
 
11:08 AM
@DilipRajBaral it is not bad at all, do you have specific case in mind?
 
Ronni.
How would I avoid any error being displayed and instead being written down in a .txt file?
 
@RonniSkansing No. I had a doubt this could be a design flaw. I tried designing so that I didn't have to check if a file has been already included, but as it got more complex, it left me no choice. :)
 
@HassanAlthaf please search stackoverflow.com/questions/3531703/…
@DilipRajBaral well.. =] sounds like the complexity has spun out of control. How are you structuring your app atm?
 
@RonniSkansing The problem are actually classes. I have a class named LoginHelper that does things like checking if user is already logged in, logging in from presence cookie, etc. Some functions require config files like db.php that creates database connection, and some doesnt.
@RonniSkansing and if I try to include that particular file in the particular funciton of the class, there might be a chance that the file has been incuded already.
 
@DilipRajBaral Are you using dependency injection? The LoginHelper class should not be responsible for fetching the Db class
 
11:23 AM
@Patrick I just looked up about Dependency Injectiona and that doesn't seem to be the problem.
 
11:38 AM
@DilipRajBaral could you make a pastie/pastebin with a minimal example?
 
@RonniSkansing okay! Please hold a minute!
 
@DilipRajBaral include_once is to be used in definition files. When you don't want to be able to redefine a class or a function.
require_once is to be used when you must include the file, and cannot work without it (but only include it once).
 
include and require are for files that you can allow yourself to include multiple times. For example, template parts which may repeat.
 
11:46 AM
Refactored things with the feedback in mind: github.com/PatrickLouys/http
public function suppressRegistration( $oauth_type ) { require_once($_SERVER['DOCUMENT_ROOT'] . '/config/oauth.php');
no... don't do that
 
@Patrick What should I do as an alternative?
 
@DilipRajBaral pass the config class/array into the LoginHelper class
dependency injection all the things
 
@Patrick No.
Pass only and exactly what you need into the LoginHelper class. It doesn't need all of the fancy app-wide configuration.
 
@SecondRikudo looks like it's just an oauth config, not a global one
 
@Patrick @SecondRikudo I have a similar problem with db.php file. It has Database access credentials defined and creates and stores a new database connection in a variable. What do you recommend in this case?
 
11:56 AM
@DilipRajBaral Pass the credentials
Return the DB instance.
 
@DilipRajBaral wait... this looks awfully like codeigniter on a second glance... Is this a new project?
 
monin'
 
morning @tereško
 
@SecondRikudo or is it a good practice to include all files at the top of the script (not classes) like `consts.php`, `db.php`, `oauth.php`. All files may or maynot be used depending on request methods and other conditions.

@Patrick Ha ha. This is a new project. Actually, this is the first time I'm implementing OOP in a PHP project.
 
@DilipRajBaral I only have includes in my templates.
The rest is done with an autoloader.
 
12:00 PM
@DilipRajBaral If frameworks were cars, using codeigniter in 2014 is like driving a horse carriage
 
@DilipRajBaral Also, please don't use OAuth.
For your own sake
With OAuth, you open a new window, without even a URL bar, and expect the user to enter credentials. The user can't ever be sure it's really Google or Facebook or whatever it is when entering credentials.
Google "openid"
 
@SecondRikudo openid also redirects you. same problem.
 
@Gordon With OpenID you at least see the URL...
Also, I rather use my own component
And I can't wait until SQRL becomes mainstream ^_^
 
@SecondRikudo you can perfectly implement oauth with a title bar
 
@SecondRikudo Since, this project has only two dynamic pages, so I'm not strictly follwoing MVC model.
@Patrick I haven't used any frameworks till the date, but I don't like the idea of using it. Seems heavy.
 
12:08 PM
@DilipRajBaral I never mentioned MVC.
 
@SecondRikudo Well, you said templates. So, I assumed it. :D
 
@DilipRajBaral PHP is, originally, a templating language. Templates were a thing long before "Web MVC" became a thing.
 
@SecondRikudo and I need OAuth. I'm trying to save users trouble to enter a form.
@SecondRikudo Oh, you meant that Template?
 
@DilipRajBaral OAuth is insecure. And doesn't prevent the users from entering a form.
They still need to enter their details to you, their name, their picture, their grandmother name. OAuth (and similar projects) only serve to replace the user/password based approach.
Which I don't think that needs replacing
 
@SecondRikudo I'm trying to implent Facebook login.
Using Graph API.
And hence will implement Twitter and Google API
 
12:14 PM
@SecondRikudo oauth is insecure?
 
@PeeHaa OAuth is insecure by default.
 
Why? How?
 
And yes, how is OAuth insecure?
 
Well, because by default, you cannot know if the window that gets opened with the Google log in page, actually belongs to Google or not.
 
Sure you can
 
12:16 PM
@PeeHaa In most OAuth implementations I saw, you don't even get a URL bar.
 
It's a browser window with a domain and a cert
@SecondRikudo If that is the case it's a user agent issue not a oauth issue
 
hey
 
@SecondRikudo Well, Im implementing Google Login/Facebook Login/Twitter Login and they are being used by tons of websites and apps. And they are based on OAuth. So, I'm not convinced they being insecure.
 
@DilipRajBaral mysql_* functions are being used in tons and tons of websites and apps as well. That does not make them any good.
 
That is not a fair comparison
like at all
 
12:19 PM
I'll just stop arguing. Because clearly one of us (probably me) is misinformed, and this argument is getting us nowhere.
 
@SecondRikudo Good? I thought we were talking about security.
 
@SecondRikudo yeah , you should have compared MySQL with Postgres instead : both are valid options but one of them is clearly superior
 
@DilipRajBaral mysql_* functions are insecure by default as well ^_^
@tereško Yeah! Who wouldn't pick MySQL over Postgres?
 
lol
 
@SecondRikudo lulz :P
 
12:22 PM
@SecondRikudo Can I ask you off-topic questions ( a few of them I am worried about) -about military in private or wherever you prefer to?
 
@BenBeri Sure
 
just bathed my laptop in tea ...
 
@JoeWatkins was it thirsty?
 
pretty sure it wanted to stay dry ...
 
1:02 PM
@JoeWatkins How did you manage to do that?
 
I dunno, just got up, and as I did, all hell broke loose ... tea everywhere, joint ruined, laptop soaked, me soaked and burned ...
smooth ...
 
Smooth
 
1 message moved to bin
 
@PeeHaa fugp
 
1:18 PM
:)
 
Was worried for a second there
 
2:14 PM
When talking to a service from the presentational layer to fetch some data do you like to have dedicated services just for fetching data or would the service also do other things?
 
I tend to have of a general purpose services: Inventory, Recognition, Shipment, Mail, etc.
 
Inventory is the one that does the data fetching?
 
no, it would be a service that governs shop-warehouse interaction
I do not have "data fetching services"
 
Ok so let's say you need to fetch all users in the database. Which service would query and what would the interface be?
 
the same service which you use for adding new users
 
2:23 PM
Recognition?
 
looks like you have added several concerns in the same service: authentication, authorization and management
 
I was just asking if that's what you do. I used to just talk directly to a repository from the view, I actually still don't see a reason why not to really. I used to do it where I'd talk to services from the view to fetch data but it just seemed like extra coding that was not really needed.
My services were just basically delegating off to the repository
@tereško Can you think of any specific reason why the view should talk to a service to fetch data rather than a repository? It makes more sense to me for the view to talk to a repository when it want's some data and only talk to a service to get the state of the model layer etc
 
because repository lives above storage abstraction, you would be leaking the internal structure
 
I just really don't see anything bad about $users = $repository->fetchAll(); in the view.
I'm not creating queries or anything in the view
 
ya know, do whatever you want
 
2:38 PM
If I was to call a service it would be pretty much the same thing $users = $someService->fetchAllUsers();
 
2:54 PM
@PeeHaa why do you keep binning gifs?
 
because they are annoying
 
@David The idea of a Service Layer is to act as a boundary between possible Interfaces to your application and your Business logic. If you put the repo into the interface instead of providing a single well defined entry point for all interfaces, then you will likely end up duplicating the business logic. However, there is no value in adding a ServiceLayer if it's just delegating a single call to the repo, so by any means, call the repo if you want.
 
@Gordon When I used to get data through my services is was pretty much 100% delegation and It got annoying after a while, creating the repository method but then also creating the a method with the same signature in a service which just ends up instantly calling the repository
Seemed like double work with no benefits
I did not see anything positive coming out of using the service to fetch the data so I just used the repositories. They have good enough abstraction I think to call them directly from the presentation layer, it's not like I'm writing SQL queries in the view layer
 
@David exactly. The service layer is just needless complexity then.
 
Also I found my services interface started to get cluttered up with methods for fetching data, I prefer to leave the repositories interface for that and the services methods for actions which update something in the domain model. What do you think?
 
3:02 PM
@David are you using doctrine? If so, how are you injecting the repository (instead of the whole entity manager?)
 
@David regarding cluttered services or repo, consider whitewashing.de/2013/03/04/doctrine_repositories.html
 
@Gordon I'll have a read now thanks.
@Patrick Just started using it today, about 45 minutes ago. I have a fairly good idea of how I'm going to get just the repository into the views
 
@Gordon can you eradicate a room for me please? I'll be flagging a message there?
 
@David I would be interested in seeing how you approach this when you get to it :)
 
@Patrick Have you used AngularJS?
 
3:13 PM
@David no
 
@Patrick Well in that all dependencies are automatically injected into your objects using its injector, it just reads the signature of the method. So in my little framework thing when a view method needs some dependency it just specifies it in the method signature like

public function index(Path\To\Repository $repository)
I will just configure the injector and it will know to go into the entity manager, get the repository and inject it into the method so I can use it to fetch my data. I'm no doctrine expert so it might not be as smooth as that :)
@Patrick
 
3:29 PM
I see. I am using Auryn as injector and I guess it's possible with a delegate
 
@Patrick Yeah It probably is. Do you use your own framework or?
 
Yeah, just writing the components right now where I can't find one that I like. See github.com/PatrickLouys/http
 
Or possibly @david
 
:)
thanks for the link
@Danack Reading the comments make me reconsider doctrine, is there a better solution out there? I just can't yet wrap my head around writing proper repositories/mappers etc without a 3rd party library :(
 
3:40 PM
@Patrick If you want to use an ORM Doctrine is probably the best. Or you could just not use an ORM.
 
I just started learning how to use doctrine today, I did take a look at it 2 or 3 times in the past but always left, there is something about it, it seems massive or too bulky or something
 
@Danack what do you mean by not use an ORM? write sql instead of just persisting entities?
 
Have either of you got anything bad to say about doctrine? I'd like to hear before I start investing time in it
 
@David We use it at work, it's bulky, slow unless you cache all the things and the annotations just suck. But it's still way better than the alternatives out there and it works
 
@Patrick Any tutorials I've seen on it suck or are all over the place
 
3:44 PM
I don't recommend writing SQL queries...some abstraction is required. But currently I use a table level abstraction, which allows me to build queries that resolve to 'queries' that resolve to entities (if the result is an entity, and not say a count), i.e. like Doctrine DBAL that knows about object hydration.
@David It's an ORM. That's the bad thing about it ;)
For an ORM it's quite nice.
But the fundamental problem is that it's a technology that makes easy thing easier, and hard things harder. Which is the wrong way round.
Easy things are always going to be easy...I want tools to make doing the difficult stuff easier.
 
I don't like the static calls to get it all started even though you could say "new" is sort of static, the constructor for the entity manager I think it is has piles of stuff in it and I think I saw it was private, don't know what that's all about
 
Yeah, I don't particularly like that style either....but it doesn't have any effect on it. And there are some reasonably valid reasons to prevent people doing stupid stuff by extending the classes that have the static functions.
 
@NikiC actually, with the actual AST you're writing, we won't be able to do something like my keywords_as_identifiers.... At least not as long as we're using keywords inside of parser? I think we only will be able if we really abstract all the keywords away from parser and only operators and constructs (like T_STRING T_STRING '(' parameter_list ')' '{' inner_statements '}' remain in parser)
 
1 message moved to Trash can
@bwoebi The syntax tree helps insofar that it eliminates all mid-rule semantic actions. But no more than that.
 
@NikiC In this form, yes.
 
3:53 PM
But I personally don't care about reserved keywords in the least.
 
@NikiC meh, that was one of the reasons why I wanted the AST…
 
(Or only in that we should remove some of them ^^)
 
@NikiC remove some keywords from parser? why only some?
 
@NikiC any plans on releasing a stable version of fast-route? the 0.1.0 in packagist is outdated and using dev-master seems suboptimal :)
 
@bwoebi Because there's nothing wrong with keywords
There's only something wrong with unnecessary keywords. Like eval
 
3:58 PM
@NikiC no. Just that it makes them unusable where identifiers are required.
 
Or with introducing unnecessary keywords for features nobody cares about (insteadof)
 
@NikiC what we now can hardly remove…
 
@bwoebi yes ^^
eval is one of the few we really could drop
 
yes. We can't even drop isset() because of write-context
 
@Patrick the 0.1 version is functionally identical to dev-master. The changes after that only add additional dispatcher implementations
 
4:01 PM
ah, good to know. thanks for the heads up
 
(in php 5.6 you can do a really nice dispatcher using *MARKs)
@bwoebi yup
 
and what's the problem with making more keywords usable as identifiers?
 
@bwoebi Depends on the details
With the last proposal the problem was implementational complexity
 
Yeah. I think that this is now feasiable with the AST, but not with so many keywords.
 
though not yet ^^
need to port stmts for that. a main issue was the INTERACTIVE thingy, right?
Ah no, it was the do_extended_info, mixed that up ;)
 
4:07 PM
hmm?
 
there's a do_extended_info act that's run before every stmt
 
yes, and what's the problem here?
 
that you only have one token lookahead to make the keyword/not keyword descision
i.e. you see just the keyword, which doesn't help you at all
iirc that was the main problem with a parser-only approach
or do I remember that incorrectly?
I think I am mixing stuff up here...
 
yeah, but the do_extended_info is only affecting whole stmts, not parts of expressions
 
yeah, what I just said doesn't make much sense ;)
that would only be problematic for a few things (like goto labels)
 
4:12 PM
but you're right that I have only one token lookahead
 
then I don't remember anymore what the problem was ^^
 
@David are you writing your own components too by the way? If so, anything on github?
 
the problem was that I have just one token lookahead. Due to these mid-expression rules.
 
@Patrick I use the symfony http foundation one for session, request, response, symfony yaml, doctrine 2(as of today) and the rest is my own stuff, no nothing on github I will actually put some up in the next few days I think
@Patrick I don't like how any of the frameworks do the "view" so I had to make my own. After about a year I have finally settled for something I'm happy with
 
views or templates? If view, how is it different from just a plain class?
 
4:18 PM
@bwoebi right, but which ones? if it wasn't the extended_info, what was it?
 
@NikiC but even with your current AST there are still issues. e.g. determine if list($a) = $b; is a fcall or a list assignment. because the parser sees list($a and then needs to evaluate an expression (in the variable part) and at that point the parser would need to know if it's fcall or list assignment. But it doesn't and gives us a shift/reduce error.
 
I have my own view components, partial views, composite view, template, resource views. @Patrick
 
@bwoebi yes
but that's just an inherent problem of allowing keywords as identifiers
Just like there's the "ambiguity" between isset($a) being the language-construct or the function ^^
It's clear that you can't allow everything
 
@NikiC yeah, but why shouldn't we allow public function isset() {} here?
 
@Patrick How do you deal with your views?
 
4:22 PM
@bwoebi there's no ambiguity for $foo->isset()
 
(actually for methods names it isn't an issue.)
@NikiC yeah, but we still need to compile a list of keywords here and write T_PUBLIC T_FUNCTION identifier_or_keyword '(' parameter_list ')'
 
@David haven't decided yet. at work we have views and controllers who are just classes with different responsibilities. Then viewmodels (template data) and templates. I think for my next project I'll just go with a really simple TemplateHandler, but we'll see. If you put your solution up on github I'll have a look for sure
 
@NikiC but do it for class names.
 
@Patrick I'll let you know when I do. The view is by far the most complicated part to get correct I think or to do it properly
 
@NikiC for class names you get an ambiguity if you name your class extends.
(In this case you can shift too; or are you getting a r/r?)
 
5:25 PM
hi all
 
 
1 hour later…
6:38 PM
@SecondRikudo Because people are annoyed by moving shit in the chat
Also evening room 11
Also most regulars do the right thing and prevent it by self regulating it @SecondRikudo
 
@PeeHaa My problem is that I post a gif, forget to edit it within 2 minutes, and then it's stuck there T_T
And I can't even clean it up myself
 
No your problem is that you don't even try to clean up after yourself
 
Just give @salathe room owner powers, then he can do that
 
@bwoebi I really don't care who is room owner and who is not. As a matter of fact imho every room owner should know what (s)he does and use it powers without me intervening. Hence I didn't intervene when we had the entire room as owners and hence I didn't intervene when @ircmaxell did the owner massacre
I did ask @ircmaxell "why the massacre" and did tell him it is not the solution to the specific issue at the time. But again: every room owner should do what he think is best (as long as it is not batshit crazy). And this (batshit crazy decision) was not the case
 
6:58 PM
@PeeHaa I don't know if it's right or wrong what @ircmaxell did, but I wouldn't say that it brought any improvement...
 
I'm not judging about improvement or not. I just said it was not a solution to the specific issue that triggered it :)
 
03:00 - 19:0019:00 - 00:00

« first day (1352 days earlier)      last day (3602 days later) »