« first day (1888 days earlier)      last day (3066 days later) » 

3:00 PM
posted on December 17, 2015 by nlecointre

/* by 1234jc4321 */

 
3:14 PM
Does anyone have any rough estimate of how much doing try/catch costs? e.g.
function foo() {
    bar();
}
vs
function foo() {
    try {
        bar();
    }
    catch (SomePHPException $sse) {
        throw new LibrarySpecificException('blah', $sse->getCode(), $sse);
    }
}
Particularly for the case where there is basically never an exception, except when the program has a bad config.
 
How often is lxr updated?
 
@Danack No idea, but should be simple enough to benchmark.
 
@Danack a try/catch without exception thrown? as much a a simple goto.
 
@Danack The expensive part in try/catch is the throw
 
ta
 
3:19 PM
is there an svg for the alternative php logo available somewhere, e.g. for this one: upload.wikimedia.org/wikipedia/commons/c/c1/PHP_Logo.png?
ctrl-k pls
 
stupid rain
 
yoi
 
Morning.
@Gordon I have one.
Somewhere.
 
moin @ircmaxell
moin @Levi
 
I actually think in the web sources.
 
3:30 PM
@LeviMorrison great! thanks for finding it for me
 
sup?
 
@Gordon :D I'm actually the one who made it too. I didn't design it - rather I took the shoddy png that was on the redesign and remade it in SVG as closely as I could.
 
Pretty sure this image could be used for a presentation in someones future.
 
Seemed absurd to not have a logo in SVG when it's pretty much just text that it italicized and then spaced a little differently than normal.
We should probably link to it on our logos page. Several people have pinged me about that but I just haven't done it.
 
When someone ask about a website which data should be externally accesible by other websites/platform to read data from. Are you immedialty thinking rest?
 
3:34 PM
1 week until I turn 11-bit: visited 2044 days, 2041 consecutive
 
When was the last time any of us spent 24 hours without technology :-/
 
/me cannot disconnect
 
@Fabor Sometime in August for me.
 
Abe
@Duikboot yes
 
And it was probably closer to 48 hours
And it was indeed voluntarily :-P
 
3:41 PM
heh
Probably a little relaxing to unplug sometimes. I'll be doing so in February for Morocco
 
Nudism helps. No pockets.
 
Hi guys... I have a Webserver that executes a login script on another server (my API) server when a user attempts to login. How can I pass the session set on the API server back to my client
 
lol Dan, the bad part is I believe it coming from you.
 
@Fabor lol, would I lie about that?
Seriously, it was liberating; technologically, psychologically, etc.
Hit up a nude resort for a week; one without sexual undertones (unless that's your style, then go nuts)
 
Abe
@Duikboot should have given a better answer. rest is the only sensible way to do things via http, because rest is actually http. other forms of api over http would be just redundant with what http already offers
 
3:50 PM
Sound like a really stupid question but what other data is being send on the web not over HTTP? XML-RPC = also http
So what's not using HTTP?
 
Abe
xml-rpc is a format, which can be served by a rest api
 
user895378
@PeeHaa this is correct. I love the attention, even if it's silly attention ;)
 
user895378
/cc @Jimbo
 
Go nuts at a nude resort aye? I'm okay with bath houses but nude colonies aren't really my style :P
 
Can I use REST to create a website login system?
 
3:54 PM
@rdlowrey Glad mate, didn't want to offend, just laugh with :-)
@Fabor I have literally no idea of the context of those sentences but I found them hilarious
 
@Jimbo @DanLugg Is a nudist apparently.
 
@Fabor I fucking KNEW it. All those cactus pictures he sent me.
 
Abe
haha
 
^^ True fact.
Awe, that message sent later than I wanted...
 
:D
 
Abe
3:55 PM
rofl
 
@Abe you know something that is being used for sending/retrieving data not over http?
 
@moh.ABK yes
 
lol. I would've assumed cacti are a dangerous thing to keep around for a nudist.
 
@Duikboot smoke signals
 
@Gordon I've been at it for days and for some reason I can't get the session cookie set on the client side. I'm using Slim framework
 
Abe
3:57 PM
@Duikboot http is based on sockets, sockets are a more generic way of transmitting data
 
@Fabor @DanLugg's middle name is danger
 
@Gordon I have a webserver and an APi server. I use AJAX to run the login script on my API server. I use DynamoDB to manage sessions
 
@Fabor You would've assumed correctly for the non-sadomasochist
 
@BobNocraz :D lol
 
Sadomasonudist.
 
3:58 PM
@moh.ABK its funny when someone uses session cookies in REST
 
Freesadomasonudist
 
@BobNocraz I think we'll need a spec for that
 
We own the world, and we do it naked.
 
@DanLugg You a freemason?
 
No, lol.
 
3:59 PM
@Gordon What happens when u use session cookies in REST?
 
@Gordon @Duikboot So how do I know to display 'Log Out' to the user after REST call to API is successful... I'm not talking about access to the API, I', saying plain old login to a website system which everyone implements using sessions.
 
@Duikboot this might help stackoverflow.com/a/3105337/4815044
 
@Duikboot see Misusing Cookies in infoq.com/articles/rest-anti-patterns /cc @moh.ABK
 
@BobNocraz Can I implement a cart system using REST? How can I know if user has a cart in the DB without creating a session and identifying the user that way. How do I know a user is logged into my website?
 
Abe
4:07 PM
@Gordon meh.
 
It's easy for everyone to say REST should be stateless but can anyone please provide an example of a website login made with REST? Just like logging into SO and SO knows you're logged in and to display 'Log out' instead of 'Log In' without using any sort of cookie or sessions
 
I think you are misunderstanding the term "stateless" in this situation.
 
@LeviMorrison All I need to know is if I can do that.. Can I have a simple login website with the login scripts accessed via REST on a different server than the webserver and have it behave the way setting sessions would
 
Yes, via cookies.
You need to send all the state on each request.
This also means that you need to be careful what you trust in the cookie.
(Which you should be wary anyway, since it is always client controlled)
 
@moh.ABK you can send a token with each request too
or really, use sessions (which means minimal cookies.)
 
4:16 PM
@Fabor not even when homeless
 
@LeviMorrison @FlorianMargaine I'm using DynamoDB session handler to set a session when ever the user logs in... Now naturally, a client side session cookie PHPSESSID is set... I'm not getting this when accessing my login script via REST
 
@moh.ABK what does "via REST" mean?
 
I could have done with a room 11 moving party ... where I sit about and smoke, and you bigger chaps (Fab, Anthony, probably others) lift all my shit into the van ...
 
@FlorianMargaine It means I'm submitting the login form via AJAX to my REST API created with Slim framework
 
@JoeWatkins What's that? Party at your house... omw
 
4:19 PM
and you @Leigh ... I'm tiny, I shouldn't have to lift stuff, manual labour is not my forte ...
 
So my setup is Client -- Web server -- API server
I set a session on my API server, will that be sent back to my web server and then my web server sets the client side cookie? This doesn't happen on the other hand with just my client and web server, everything works fine
 
@JoeWatkins did you just call fab and anthony fat?
 
no but I'm like 4 foot nothing, and they are proper man sized men ...
 
thx for the reference @Gordon
 
@JoeWatkins I'd do it. And by "do it" I mean sit, drink beer, and watch the company we paid for do it.
 
4:21 PM
@ircmaxell :)
 
I'll drink to that
 
:-D
 
Well... I don't smoke or drink, but I'll lift my cup of water to your success.
 
I just downloaded the current phpstorm EAP. It has a new icon. It's purple and says PS_. I totally confuses me because I always think it's the icon for Photoshop … not that I have PS installed, but still confused me … what were they thinking?
 
@LeviMorrison no you won't
 
4:24 PM
@Gordon I like it lol
 
@LeviMorrison a cup of anything except water is ok, just not water (that's bad luck)
 
@ircmaxell Really?
 
@moh.ABK I would think that your sessions would need to be on the middle man (web server) so that it knows whether the user has been authenticated or not
 
@Gordon Their new logos look similar so you can tell they are from the same company.
On that point they succeeded. But I agree that PS_ is kinda meh.
 
@ircmaxell I drink loads of water, no wonder nothing ever goes my way
 
4:26 PM
@LeviMorrison to an Italian, yes :-)
 
@BobNocraz So I need to set the session on my web server based on response from API?
 
@ircmaxell same in France
 
@ircmaxell Fortunately Joe isn't Italian because I had already raised my cup.
 
lol
 
@LeviMorrison he'd rather have you raise a cup of tea however
 
4:27 PM
@moh.ABK I'd assume so. it won't filter down automatically. The session on the api server will just remember the webserver, not all the different clients trying to access the web server
 
@bwoebi I'm having trouble breaking down the problem to a minimal example, but github.com/icicleio/socket/blob/master/examples/http.php works fine under 7.0.1 but blows up on master.
It seems like it's continually executing the first yield statement, though I'm not exactly sure what's happening.
 
@Trowski I see no yield stmt there, only yield from?
 
@bwoebi Does the same thing if I replace all the yield from with yield.
 
humm
@Trowski so, not related to yield from?
 
It would seem not.
 
4:42 PM
@Trowski can you please dig a bit deeper so that I'll have a starting point…?
 
@bwoebi I'll keep digging. This script github.com/icicleio/socket/blob/master/examples/echo.php just sends "Want to play shadow?" over and over again to a connected client.
As though send() is failing to move to the next statement but is executing the same yield statement again.
 
is send() throwing an exception?
if yes, it's probably related to liveness changes and some case had been missed…
 
@bwoebi It doesn't seem to be. If it was it should reject the coroutine.
 
well, will have a look later or tomorrow
 
hi
why this doesn't working ? paste.ubuntu.com/14072742
seems like the problem is on the closing the tags
i'll appreciate your suggestion or help
 
5:00 PM
@bwoebi Here's what I have so far: gist.github.com/trowski/b5cdf8a1fea2219b9947 I'll update that gist if I find something smaller that exhibits the same behavior.
 
4 messages moved from HTML / CSS / WebDesign
 
@Trowski could you please remove the need for the external endpoint (e.g. by creating a socket pair or similar), that'd help debugging…
 
Hello guys
Am newbie to back end programming
could i get some answers?
 
I've just earned "A NEW HOPE" hat for "ask, answer, or vote on December 18th"..... what's todays date? And shouldn't I have earned a "Back to the Future" hat instead?
 
5:11 PM
@MarkBaker Star wars premiere?
 
Hello guys, can someone please help me run the php code on here https://developers.google.com/gmail/api/v1/reference/users/messages/list
or walk me through on what or how i can run the http request .. Thanks
 
Is it advisable to have both webserver and api server on thesame hardware?
 
@moh.ABK It makes caching stuff across the two be easier, but it shouldn't be either necessary or a bad idea.
 
How this is possible? ^
 
What's the issue?
 
5:15 PM
There is just 174 watch. but 2,742 stars, How?
 
watch is not views
 
oh really?
so what is that?
 
yes watch is for getting notifications
 
@Shafizadeh Keep me updated - Watch
 
oh ...! Alright then ..! tnx
 
5:16 PM
np
 
any ideas about these codes?:paste.ubuntu.com/14072742
@Shafizadeh - it's good to see somebody from my country is here :]
 
Yeah ..! that's good ..!
@RonniSkansing well, if a code on github has 174 watch, it means it is not a good code, right?
 
no
watch has nothing to do with the quality
 
why no? that code has been edited 174 times
 
I wonder what you think "watch" means
 
5:21 PM
because they are synonyms ..! (veiwd and watch)
 
you "watch tv"
 
not quite
 
which means you're interesting in what's happening on the tv
otherwise you wouldn't watch it
 
I see
 
you watch something changing and you view something immutable
 
5:22 PM
@Shafizadeh those numbers have nothing to do with code quality
 
@bwoebi good explanation ..!
@RonniSkansing ok well, what number is important ?
fork? star?
lemme ask my original question
this is good or bad :-)
 
@Shafizadeh Usually, if it has more than >200 stars you are not totally crazy in using it
 
Stars are a general indicator of interest.
Forks are a general indicator of contributors or people using it.
In either case they are rough indicators.
 
ah I see, So "star" shows it is good or not. ok tnx
 
@Shafizadeh No, it doesn't
 
5:24 PM
@Shafizadeh no, Laravel is shit, yet it has many stars.
[well, we can discuss that. It's not completely shit, but ;-D]
 
It just tells you that you aren't using some obscure library that only a single other person on this planet uses
 
@NikiC you told >200 means it is not bad
@NikiC ahh. ok :-)
 
@Shafizadeh stars show the popularity of a project
 
yes yes, I got it
@bwoebi well that's because Laravel isn't shit on other opinion's people ... It is shit just in your opinion
 
holly shit
 
5:27 PM
Watch: 532 Star 5,073 Fork 1,822
I know the quality of code is bad, but I also know that it's the most popular library for its purpose
 
:-)
 
I have been playing X3: Albion Prelude all this week
 
Mainly because it's something a lot of people need to do, and the alternatives are all awful
 
@Shafizadeh nah, I'm just regurgitating some other peoples opinion… I haven't really looked at Laravel…
 
@MarkBaker I know what is your point..! ok tnx
@bwoebi eemm, so maybe
 
5:28 PM
@bwoebi - Laravel has its strengths and weaknesses, same as most frameworks.... biggest strength is an easy learning curve for basic crud apps
 
In JS projects 5.000 stars is the default.
 
@Shafizadeh well ... if that makes any difference to you: majority of regulars in this chat room are of the opinion, that Laravel is piece of shit.
 
guys
can i get your help?
 
I've used frameworks that I consider far, far worse
 
@UmerAsif never ask this
 
5:29 PM
@MarkBaker which is why majority of its growths comes from cannibalizing CodeIgniter's community
 
hey is there a chat for vba? I've no clue if this edit is actually right, even if it changes the answer stackoverflow.com/review/suggested-edits/10601826 lol
 
why?
 
@tereško - how did you know which f/w I Was thinking of there?
 
i need to implement a server for my app
 
@Shafizadeh - and you don't need to use 'never' with 'don't' with eachother
 
5:30 PM
@tereško you were working on Laravel for a period of the time, right?
 
@Shafizadeh in English it's considered bad to use double-negation (for historical reasons ... there was a war in England a long time ago and one of the strangest outcomes of that war was the "double-negation" grammar rule)
 
@TheGuy good point ..! tnx pal
 
if i make a script in php
appache will run that script???
 
@tereško ok
 
no problem, anytime ;)
 
5:31 PM
hello guys?
any pakistani here?
 
hello guys?
jesus christ :/
 
@UmerAsif "Don't ask to ask, just ask." .. otherwise you are asking people to make blind commitments
 
@tereško interesting
 
i dont understand you guys?
 
That goes both ways...
 
5:32 PM
but am total noob
 
double negation is double-plus ungood
 
i need my views clear
 
@tereško I wish Aerys could cannibalize that community and introduce them into how to write code which scales by itself (and is easy to scale out later), alone by forcing an external I/O based thinking…
 
can you give me a link so i can read?
 
@UmerAsif well. That's a problem, because understanding English is kinda mandatory if you intend to become professional programmer at any point. Or work with computers in general.
 
5:33 PM
@bwoebi eh
 
@NikiC he?
 
I can speak English very well sir.
 
i'm not so sure :)
 
@bwoebi do you guys have docs already? "code which scales by itself" is funny to read.
 
1 min ago, by Umer Asif
i dont understand you guys?
I guess you were not talking about language
 
5:34 PM
@UmerAsif good for you ...! because I can't :-(
 
whats the point ??? i need some help in clearing basic concepts of back end programming.
 
moin :-)
 
okay i accept I cant speak English properly
 
@marcio I've started a bit, see amphp.org/docs/aerys (I know, the design is shitty…) … but I'm not that a great docs writer…
 
5:36 PM
@tereško heh, that's funny. Always you ping people with their own comments and ashamed them ..!
 
@Shafizadeh - because he/she has a lot of reputation :)
 
However wasn't in this case ;-)
 
@TheGuy no, that's because he's an asshole
a proud one
 
:D
holly ...
 
(@marcio help is always welcome)
 
5:37 PM
okay so you guys just humiliate each other? or noobs who try to ask something.
 
@TheGuy no no, Teresko is not a proud (just because he has a lot of rep).
 
and of course you're from france too @FlorianMargaine :)
@Shafizadeh - i can hear you btw
 
@UmerAsif lol. really, if you write something and forget 30 seconds later than you wrote it, you do deserve some hard memory being thrown in your face.
 
@FélixGagnon-Grenier - jesus, you're a genius too, you guys really fucked up that person :D
 
I know him for almost 1 years. he is a really weird person and sometimes funny :-) ..! I have learned a lot of things of him!
 
5:39 PM
hmmmwat?
 
@Shafizadeh it's for their own edification
 
@UmerAsif I think people are willing to help you. But if you rush into a room starting to ask questions that can be answered by typing two simple words in Google (hint: "install php") they might not be very interested.
 
wow :)
 
okay am sorry
 
5:41 PM
@FélixGagnon-Grenier - he don't deserve more than these things dude ;) leave him alone
 
@UmerAsif basically: try something, and if it doesnt work, then ask people to find you a direction to fixing it
 
@UmerAsif Windows/Osx or Linux?
 
Windows.
I have created the front end.
but no idea where to start for back end.
 
@UmerAsif Do you have a webserver?
 
@UmerAsif do you have access to torrents?
 
5:42 PM
yes i have.
 
@Shafizadeh - good to heard that, and excuse me, what is your education?
 
ISS/Apache or Nginx?
 
webserver you mean xmpp??
 
@TheGuy computer(hardware)
 
(warez link removed )
 
5:44 PM
Oops, good.
 
i have created Database in xmpp and now need to learn php to receive HTTP requests and Do stuff in database.
Thanks for the book. I'll check it out.
 
You have several options. Here you go: php.net/manual/en/install.windows.php
 
Thanks Guys Sorry I rushed. :D
 
still stucking on a stupid mistake :-? paste.ubuntu.com/14072742
 
@TheGuy you are using Yii .. so am tempted to go with "stupid mistake"
I have deep hatred for that framework
 
5:47 PM
something like that
why ?
i hate too , but what we can do :/
 
37
A: Migrating pure PHP project to Yii framework

tereškoTL;DR : Don't do it. It's a really horrible idea. The Rant .. "Framework" is not a magic sauce, that you add to a project, to make it better and shinier. Doing some research i found Yii turns out to be one of the best frameworks out there. What a strange research you have done .. I woul...

 
that's because of the condition
 
@TheGuy you cannot put an "IF" statement inside an array definition
 
@tereško Seems you've been an active member of SO already. why you aren't now?
 
@tereško - yeah, seems like that's the point
 
5:51 PM
if you really need something like that, use a ternary operator: condition ? a : b
 
what is the suggestion then?
 
There are some excellent all-in-one Windows distributions that contain Apache, PHP, MySQL and other applications in a single installation file, e.g. XAMPP
Do i still need to install php manually?
 
okay, i'll try it
 
> that contain Apache, PHP, MySQL
 
@Shafizadeh you can answer the same question only so many times before it becomes annoying
.. then again, I think I will start posting again next month
 
5:53 PM
I have xampp.So no need to install php manually.
 
yes .. but you when you get better at it, you should look into some other solutions than XAMPP (it's the McDonalds option of development environment setups)
 
I see what you did there.
 
@tereško - that framework support is sucks, i don't know, something like that :/
 
What does appache do?
sorry i can google
 
i think you should search about these things :/
@tereško - is it okay? paste.ubuntu.com/14076187 what do you think? still-syntax error, unexpected ';'
 

« first day (1888 days earlier)      last day (3066 days later) »