« first day (2363 days earlier)      last day (2601 days later) » 

12:00 PM
Although they just get money and don't do much
:P
Even better
 
dmitry is basically full-time emplyed by zend to work on php-src though, right?
 
right
 
yea
 
@PeeHaa Well, I don't know how much Zend is participating in PHP contribution, but I can imagine some foundation that pays for support, for bug fixes, new features to people which contributes it
 
Joe
@DaveRandom thank you very much ,, I did not understand "internet-connected sex toys"
 
12:01 PM
I thought mike was too (not by zend though)
@DaveRandom Does Jimbo's mum count when she's using her phone?
 
@Joe I suggest you do not google it at work. A more serious answer would be "whatever you want it to be good for"
 
@Joe this with a webcam on the end
 
Probably there are PHP contributors out of Zend, right?
 
@JoeWatkins WAT.
 
@brzuchal Like... many of us here?
 
12:02 PM
Yes
 
@DaveRandom what, you don't have one of those ?
 
Joe
thanks
 
who has just one?
 
@JoeWatkins No I don't. I have to wear mine myself, I don't have some fancy dummy to do it for me!
/me is outraged
 
12:04 PM
we are such children ... well you are, I was just watching ...
 
... and showing...
 
@DaveRandom started it
 
You started it. You invaded Poland.
 
Joe is German now?
Or Austrian?
 
Russian
 
Joe
12:06 PM
did you hear about dollar collapse?
 
Everyone below Birmingham is southern, and therefore German, right @DaveRandom ?
 
@DaveRandom Better would be who didn't invade Poland :P
 
Why does unicode not have subscript and superscript markers
It really should
 
Unicode is good - said no one ever
 
12:09 PM
or a combining modifier, at least
 
wait, isn't there a combining modifier ?
 
Hah, we have finally found you, Josef von Insel
 
you can combine some chars, I think ... memory is weak, but you should check that thereis no combining modifier
 
not unless they added one recently
I guess they have their hands full with adding emojis
 
I heard something related to it on a podcast but can't recall details
 
12:11 PM
@FlorianMargaine You a fan of ISO-8859-1 ?
 
@DejanMarjanovic it's not because Unicode is not good that others are good...
 
damnit, I'm a late luncher.. I always forget on Wednesdays there's an all-hands meeting right when I want to eat
 
@Leigh Josef Jughashvili dze Insel :-D
@FlorianMargaine True dat
 
@Leigh ha, I work with US people, any important meeting is after 4pm, I'm good :P
 
...until they want to have one at 1am
 
12:13 PM
Why would they want that?
Or did you mean 1pm?
 
No, at the end of their workhours.
 
4am maybe.. at the start
I guess 1am on the west coast
 
@Danack can you enlighten me about the Imagick or "shed some light" :-)
 
@DejanMarjanovic heh.
 
Wes
@JoeWatkins is this posted daily? please post it daily :B
 
12:18 PM
URL rewrites and static files serving is always awkward :(
 
@Shoe It's because you are doing it wrong :)
 
@Leigh 4am in France is 7pm in west coast US
@Shoe what @PeeHaa said
 
the trick is KISS
 
Like if you have a website on https://example.com/folder/ and your URL is https://example.com/folder/home then you can't use relative URL in HTML because it would bring them to /folder/home/a.css and you can't use absolute URLs because /a.css isn't correct.
While the correct one would be /folder/a.css
 
12:21 PM
> use relative URL in HTML
there's your first mistake
 
I said that you can't. How is that a mistake?
 
I will argue til the end of time that you should never use relative URLs for anything ever in any situation
 
Ok, so what's the solution?
 
Use absolute URLs (and file system paths)
well, absolute paths
<link href="/a.css">
 
2 mins ago, by Shoe
Like if you have a website on https://example.com/folder/ and your URL is https://example.com/folder/home then you can't use relative URL in HTML because it would bring them to /folder/home/a.css and you can't use absolute URLs because /a.css isn't correct.
Maybe I meant absolute paths there, but the point still stands.
 
12:23 PM
oh right I see, well also don't put web sites in sub directories
subdomains are cheap free
virtual host containers in webservers are free
 
That's necessary for the moment because on the main root there's another website
 
why not folder.example.com
same web server, different vhost
 
Because I don't have free subdomains and can't be bothered to set them up for having a simple playground to test few things before deploying
 
@DejanMarjanovic what do you want to know?
 
@Shoe then you need a better hosting platform :-)
 
12:25 PM
Moreover I have a feeling hardcoding absolute paths is generally a bad idea. Just like hardcoding stuff.
 
@Danack I read the github thingy after I pinged you :-)
 
@Shoe static resources are... static, they are implicitly "hard coded"
 
@Shoe either developer.mozilla.org/en/docs/Web/HTML/Element/base or have a preifx variable
 
Why can't a web application just work locally, on http://example.com and http://example.com/folder?
 
if class B extends class A, and they both have method test, how can i change the parameters in class B, cuz otherwise i get declaration of .. should be compatible with ...
 
12:26 PM
Not sure what's so hard about that
 
@Shoe it can, but it's not simple
6 mins ago, by DaveRandom
the trick is KISS
 
@DaveRandom The fact that they are served statically has nothing to do with hardcoding their position in the filesystem for a web application that is run/tested and deployed on different websites and contexts
 
It's only hard coding their position relative to web root
 
Yup
Problem is that it doesn't work that way
 
@Izopi4a You can't, best you can do is call it extendedTest and call test from that.
 
12:27 PM
In the example the web root is http://example.com/folder and /a.css yields http://example.com/a.css
 
4 mins ago, by DaveRandom
oh right I see, well also don't put web sites in sub directories
after many, many years of fucking around with this stuff, i have concluded this is the One True Answer
 
@NicklasKevinFrank i see .. Thanks man
 
@DaveRandom Unfortunately I know
I'm just ranting
IIRC Ruby on Rails and Django both solve this problem by providing helpers to get the relative URLs right
 
@Shoe Oh, well this is not a good place to do that because we are all pedants :-P
 
@Shoe so do most frameworks
 
12:30 PM
(sorry)
 
function file_path($absolute_path) {
	$current_directory = dirname($_SERVER['PHP_SELF']);
	return "$current_directory$absolute_path";
}
I've written this, but I don't trust it all that much
 
5 mins ago, by PeeHaa
@Shoe either https://developer.mozilla.org/en/docs/Web/HTML/Element/base or have a preifx variable
4 mins ago, by PeeHaa
Not sure what's so hard about that
 
@Shoe that looks... wrong
 
!!dad
 
I have a polish friend who is a roadie for a band I have a Czech one two, Czech one too, one too
 
12:31 PM
yeah, define a prefix variable in one place, and use that
 
I wanted a dad joke, I was not disappointed.
 
@FlorianMargaine How so?
 
Mar 30 at 16:44, by Leigh
not exactly rocket surgery
 
@PeeHaa What do you put in the <base> tag exactly?
 
@Shoe that depends on the folder where your php file exists?
 
12:32 PM
@Shoe Read the link content
 
why not use __DIR__?
 
!!mom
 
Not just the url
 
@Izopi4a We haven't implemented @PeeHaa's mom yet.
 
:D
 
12:33 PM
@Izopi4a Your dliemma sounds like you need a trait, that way you can have the class B function still be called Test, by renaming the class A function test, in the use statement.

use ClassAFunctionalityTrait {
test as classATest;
}
 
@PeeHaa I read it, I'm asking you what you would put. Because I tried that already with dirname($_SERVER['PHP_SELF']) and it doesn't work.
 
3 messages moved to Trash
 
clever @DaveRandom
 
read it again
And look at what dirname($_SERVER['PHP_SELF']) does
 
It gives me the /folder in the example
I echoed it
 
12:34 PM
protip: you basically never want PHP_SELF
see also: REQUEST_URI
 
$_SERVER['PHP_SELF'] returns the PHP file that is "running"
Which is in the correct root I want to consider as web root
It just makes sense to me.
 
@NicklasKevinFrank I see, but the problem is my class isntnace is called dynamically ( for a reason ) and i dont think i can rename dynamically uses ?
 
@Shoe ok, here's a challenge for you: when going on http://localhost/folder/, I want you to use the /var/www/folder2/index.php file
 
@NicklasKevinFrank Traits are almost never the correct way... :D
 
@FlorianMargaine URL rewrite?
 
12:37 PM
!!canon list
 
The following canonicals are currently supported:
• class → https://stackoverflow.com/q/2206387
• classes → https://stackoverflow.com/q/2206387
• errors → https://stackoverflow.com/q/845021
• globals → https://stackoverflow.com/q/5166087
• headers → https://stackoverflow.com/q/8028957
• html → https://stackoverflow.com/q/3577641
• json → https://stackoverflow.com/q/29308898
• mysql → https://stackoverflow.com/q/12859942
• obfuscation → https://stackoverflow.com/a/232767
• obfuscator → https://stackoverflow.com/a/232767
 
@Shoe for example.
 
I see what you mean
 
@Jimbo nothing about "front controller"
 
@Izopi4a Ah, yes, won't work then.
 
12:37 PM
@FlorianMargaine Okay.
 
@Jimbo But, this case would be one ;)
 
Anonymous
@Jimbo
 
@Izopi4a why do you want to do that?
 
@FlorianMargaine But my .htaccess doesn't do anything crazy and it's considered part of the application, so if you change that you might as well change the base URL algorithm as well.
 
You have demo code by any chance?
 
12:38 PM
@Shoe I can't use your .htaccess on nginx.
 
I highly doubt it, I'll add Anthony's blog post as canon for traits
!!canon help
 
Cannot find the canon for you... :-( Use !!canon list to list all supported canonicals.
 
Chances are you are doing composition wrong
 
Hmm, what's the syntax for adding a canon
 
@PeeHaa i am extending a class , and I need to change the params to one of the functions
 
12:39 PM
@Jimbo knowing @PeeHaa and @DaveRandom, it's probably a hardcoded list
 
yes
28 secs ago, by PeeHaa
Chances are you are doing composition wrong
 
@Jeeves :(
 
@Linus What's wrong?
 
@FlorianMargaine I didn't make the plugin so it actually works :P
 
@FlorianMargaine Nobody is going to use NGINX because the application can be run locally with php and the webserver that is instanciated in is on a LAMP stack. It's a "private" application.
 
Anonymous
12:39 PM
!!canon
 
Usage: !!canon [ list | add <title> <url> | remove <title> ]
 
Anonymous
^ @Jimbo
 
Sorry, I don't recognise that as a Stack Exchange URL :-(
 
Thanks, will read that Jimbo.
 
12:39 PM
@Shoe still, not using a front controller is wrong.
 
Ah what, they can't use arbitrary urls?
 
Anonymous
you suck @Jeeves
 
given today's standards.
 
@JayIsTooCommon And you like it.
 
@FlorianMargaine What do you mean?
 
12:40 PM
@FlorianMargaine Front controller is just one way of doing it, although entirely honestly I don't see how else we could
 
@Jimbo Nope soz
They are actually meant for SO canons
 
Anonymous
you suck @PeeHaa
 
And you like it!
 
Redirect all traffic to a single index.php file that mimics a controller?
 
lol
 
12:40 PM
@Gordon like's it
 
Is that what you mean?
 
@Shoe It's not the index.php that mimics a controller
The pattern is called "Front Controller" but that's absolutely nothing to do with the C in MVC
Of which MVC doesn't even exist in PHP anyway
 
@Shoe redirect all traffic to a single index.php and use routing to load/execute the appropriate objects/functions
 
@FlorianMargaine I am doing that. Why did you assume I wasn't?
I'm using Slim2 as the framework for routing
 
> mimics a controller
 
12:42 PM
@Shoe PHP_SELF
 
@FlorianMargaine What else would I use? Slim2 doesn't provide anything similar AFAIK
 
@Jimbo Yeh, I've been meaning to fix that
 
@DaveRandom Maybe it could be something I could do. I'll take a look at the codebase when I have a sec, shouldn't be too complex
 
And dirname on PHP_SELF returns, in my specific cases, the correct base path for absolute paths.
 
15
A: Slim Framework Base URL

Dreaded semicolonYou need to set the base url manually FIRST before you can get it as in this: $app->hook('slim.before', function () use ($app) { $app->view()->appendData(array('baseUrl' => '/base/url/here')); }); http://help.slimframework.com/discussions/questions/49-how-to-deal-with-base-path-and-differe...

 
12:43 PM
@Shoe I don't know Slim2, sorry. I'm just pointing out the current (well, "current" as in "since 10 years ago") best practices.
 
@Jimbo for now you can do this:
 
@Shoe which means you're not passing all traffic to the same index.php
 
@PeeHaa I can't hardcode the base URL because sometimes it's / and sometimes it's /folder.
 
Command '!!traits' aliased to '!!say blog.ircmaxell.com/2011/07/are-traits-new-eval.html';
 
12:44 PM
So make it variable...
 
!!traits
 
you know, in current best practices, the index.php file is not even under the document root served by apache
 
@FlorianMargaine I am
@FlorianMargaine I know you should hide most things and setting up a proper webroot, but my website is static and they can already read all static files from the chrome inspect tool anyway so I don't worry about that
 
!!composition
 
12:45 PM
It's also served as http if you want to feel sick for today's standards
(no https)
It's a simple static multiple page website. Like the ones that you used to see in 1990?
 
@Shoe that is 100% not the point
the point is that static and dynamic content are different
 
@Jeeves Nice, thanks!±
 
@Jimbo You're welcome!
 
@DaveRandom And I don't have dynamic content
 
Then why do you have a PHP script at all?
 
12:47 PM
No dynamic content = just HTML :P
 
For routing
 
That's dynamic content, then...
 
Beautiful URLs were all the shit few years ago
 
still are
 
Apache doesn't need PHP ;-)
 
12:48 PM
Apache needs killing, is what it needs
euthanasia
 
Technically it's dynamic content, but it's not really
Whatever. You know what I mean
Classic useless pedantry
 
Oh here we go
Nginx is amazing. C# is amazing. Everyone should use postgres
:D
 
I'm used to it. I've been a member of the Lounge<C++> for many years now.
 
@Shoe You'll likely find that in programming, computer science etc... "pedantry" leads to fact..
 
@Jimbo yes, all of those things
 
12:50 PM
There's no use being vague about something, we should all be on the same page..
 
@Jimbo Not in this case but you are free to prove me wrong
 
Also the C++ guys all suck and this should be shared in their room
and star it
brb, done. Last time I did this it was all out war
 
COBOL+DB2 4 Lyfe yo
 
The SO chat is dead anyway, so... whatever
 
oh, the C++ lounge is dead nowadays?
that's a shame
 
12:52 PM
I never said that
 
@kelunik Ah awesome, thanks :)
in Lounge<C++>, 44 secs ago, by Shoe
He is star baiting his own message :/
@Shoe Why so serious? :-)
 
Yeah, you are terrible
 
Yeah I am pretty terrible
@PeeHaa's worse though
 
Yeah
Let me make a parody of PeeHaa:
@FlorianMargaine No, read what I wrote.
 
I'm talking to a shoe...
 
Joe
12:56 PM
is this correct grammer when I say : It would be definitely better if
 
(Florian, you actually need to answer me in order for the scene to continue)
@Joe "It would definitely be better if" is probably better?
 
Joe
thank you
 
Anonymous
@Joe what the weird shoe guy said ^
 
Joe
thanks
 
/me throws heavy stuff and leaves
 
12:58 PM
6 messages moved to Trash
 
@Shoe oops, I got distracted by work, sorry
 
@Jimbo Can I ask you a quick one? The traits article screwed a bit with my head.
 
@Shoe I did! Three times!
 
@FlorianMargaine Read again
 
3 messages moved to Trash
 
12:58 PM
@NicklasKevinFrank I'm not the author mate, although anyone in here will try to help if they can
 
I never said the Lounge is dead
 
No but I just looked in there and the people don't seem to be very cheery, last time I slagged them off they rose to the challenge and had some fight in them. Looks like Brexit in that room
 
Anonymous
@Shoe so chat isn't dead. Shit != dead
 
That was here
> Don't ask to ask, just ask.
:-)
 

« first day (2363 days earlier)      last day (2601 days later) »