« first day (1129 days earlier)      last day (3826 days later) » 

9:01 PM
sup
 
Hi
 
@webarto something weird is happening with the timestamp O_o
oh nvm, it's my eyes playing tricks with me =oP
 
A question, for you MVC folks
How do you handle 404 errors etc?
For instance I have a resource that takes an ID as param. If the ID doesn't exist in the database, I want it to show a 404 error.
 
@MadaraUchiha if($id === null) { $this->show404(); exit; } or something like that.
 
Nov 9 at 12:36, by Simon _eQ
@Gordon Make it 3 months this time.
 
9:10 PM
@Gordon Lol, that settles it
@Gordon Weird though, he was here today.
@qwertynl Where is this? On the controller?
 
@MadaraUchiha Depends on the day. But usually.
That was just pseudocode.
 
Yeah, I get that
But isn't this View related stuff? (i.e. select which templates to show etc?)
 
@MadaraUchiha i think you handle that in the view
 
@MadaraUchiha I guess it could be.
 
both the header code and the template
 
9:14 PM
@RonniSkansing I wouldn't put the header in the view... seems out of place, no?
 
@qwertynl i think i would.
 
@rdlowrey done. works.
 
Potato potato I guess.
 
user895378
@ThomasWeinert no libevent problems?
 
Hmm that works better when said out loud
 
9:15 PM
not tested yet, disabled libevent in the php.ini
same problem, timers work, streamreader doesn't
 
user895378
what kind of stream is it?
 
user895378
Is it something from ext/sockets?
 
user895378
Because I haven't added support for those yet ...
 
user895378
Although that's only in the stream_select() version ... ext/libevent supports ext/sockets out of the box.
 
local file
 
user895378
9:19 PM
oh -- yeah libevent doesn't support file descriptors.
 
user895378
I could've told you that :)
 
user895378
ext/libev does, though.
 
@crypticツ where did you decide the other day the header code should be set?
 
user895378
I've played around with libev implementations but the extensions I've tried have been buggy and TBH I haven't had much need.
 
9:22 PM
yeah same here, my implementation is still missing a lot, but no need so far
priorities :-)
 
@RonniSkansing how I was doing it already. Use that way to set globally, and then use Response object in controller method to set per page, and @igorw pointed out using StackPhp middleware if I plan on making the code open source so it's not dependent on the framework.
 
@crypticツ thanks
 
@crypticツ working OK? :)
 
@rdlowrey
$onError = function(\Exception $error) { $this->error = $error; };
I didn't know you could do that :o
How come $this is still in scope? Thought this was supposed to be a closure
 
user895378
@MadaraUchiha As of 5.4 closures automatically have access to $this scope.
 
9:31 PM
Huh
Good to know
 
user895378
It's a big part of why I require 5.4 for all of my libs.
 
You like using callbacks I see :P
 
user895378
I can't be bothered to work around it by passing in $that or $self or whatever
 
@tereško or... just downvote and delete?
 
9:33 PM
hi @tereško, i saw Elysium the other day.. hooorid
 
@RonniSkansing i have been avoiding it myself
 
LOL
Please, at least read the articles that you linked. Your ignorance is physically painful. Frameworks do not implement MVC. Your code does (or more likely - doesn't). — tereško 3 mins ago
 
@BenjaminGruenbaum there is an achievement for 500 flags
 
Kind of predictable...
 
@tereško Which I got like 800 flags ago... also - achievements are pretty meaningless.
> Your ignorance is physically painful
 
9:35 PM
@webarto yep! Thanks!
 
Anyway - they both got a downvote for being wrong.
Also, a framework can implement MVC - just saying.
 
/me throws a dbal folder inside...
 
0
Q: Basic PHP issue: Is this code calling a PHP method?

abe3I am fairly new to complex web applications in PHP and Javascript. I am trying to "sign" a Recurly.js form in PHP, as in this example. This looks like PHP syntax, but I am a little confused because the class is called Recurly_js. $signature = Recurly_js::sign( array('subscription' => array('pl...

php gets as many piss poor questions as JS
it is amusing
 
9:52 PM
@crypticツ I'll push some changes a bit later to the repo, is that cool? (or pull request it)
 
@webarto what are the changes?
 
To cv-pls.sh, but I see it's not in repository, so, nevermind now.
 
@webarto oh yeah, didn't bother to put it since it's really up to the hoster how often they want to poll the server since it may use up precious resources and all =oP
 
don't throw "resources" line at me, you use that when you want to charge clients more for hosting :P
 
^ lol
 
9:57 PM
@webarto it's because you have pseudo-unlimited server resources? hehe..
 
usleep(mt_rand(2000, 5000)); ... yeah website is acting slow these days, maybe upgrade resources, no?
 
v1.2 will be run using Silex and will support composer so should be a lot easier for people to install and handle the dependencies. I'm going to use @rdlowrey's Artax for the API requests, and will be redoing the caching system, column sorting, and hopefully at a later version allows tags.
 
@reikyoushin not unlimited, but plenty to run this simple site :P
 
@webarto changed it to pseudo above.. see?
 
Code looks fine as is, to me...
@reikyoushin :D
 
9:59 PM
@webarto because people would keep comin at me with the "there is no unlimited !@##$%@!%%!" again.. ^_^
 
Well there are persistant server bans from Stack API due to too many requests at a time, there is a crude sleep() throttle but need to do better than that especailly if I want to add custom tags support so it's not limited to just the PHP tag.
 
Can't we get more requests with API keys?
(didn't see if it's already like that)
 
@webarto already use API key, it limits to 30 requests per second, which depending on speed of network can happen real quick since gotta lookup voted on questions from like 5 page requests of API data and then gotta then separately lookup the info on those questions 100 at a time.
for BOTH the chat and api sources
so sometimes it happens to go over limit and gets a short ban
 
10:15 PM
@crypticツ Smarter people than me discussed, I'm out :P
They call us... Q&A police :D
 
@webarto lol, basically the people commenting and agreeing are people who don't know how to use Google, who think their stupid localized question will help hundreds of other stupid people, people who don't know how to RTFM and people who can't read the FAQ.
 
@crypticツ don't you think we should move the key to config or similar? someone (unlikely) could abuse it.
Yes, noobs that think they know everything and don't want to learn the proper way, but just want codez.
 
@webarto the key just allows more requests for the app, but the banning is IP based.
 
Ah, it's cool then.
 
I plan on moving the key and the API filter to a config in the next version. I just need to find time to do all these things =oP Maybe x-mas break.
 
10:33 PM
I'm unemployed, so... :P
Adding cache to the repo would be nice...
I have push rights, right?
Great work by the way...
 
@webarto it already caches, but I want to be able to queue see github.com/PHP-Chat/CVBacklogUI/issues/17
 
Mornings
 
Mornings, working man.
 
morning @DaveRandom
 
What did I miss?
I seem to have had an unintentional week away from computers
It was surprisingly nice. I have a new found ability-to-be-arsed finishing up some long outstanding projects
 
10:41 PM
@DaveRandom It's been a week of redundancies.
How was your first day? :)
 
Kinda dull, in the way you might expect (induction, setting up toolchains etc)
 
Im not very good with rejex and I am curious if some one can lend a quick hand: stackoverflow.com/questions/20059396/…
 
Indeed you aren't very good with it, you can't even spell it... :-P
 
I know right
 
@DaveRandom Get a feel for the level of the people around?
 
10:43 PM
But Im trying to modify or learn how to modify this example to better suite my needs
 
@TheWebs You have (literally a few seconds ago) received an answer, and it is basically the right answer
Don't use regex for HTML parsing, use DOM
 
I saw that
But I dont see why one is better then the other
 
@TheWebs You can hammer in a nail with the back-end of a screwdriver but you should really use a hammer.
 
Ok so this makes a bit more sense
 
10:48 PM
@Fabien but what if you don't have a hammer? In fact, what if all you had was another nail? O_0
 
Heres the stupid question as im not sure what to google, ate there examples of usin gthis to take basic tables and create csv files? or at least comma dilmeted info?
nvm
 
@crypticツ Find a new job :)
 
@Fabien Yeh I think it's generally decent, really I don't want to pass any judgement until I've been there for at least a week though. I've not seen enough of the codebase or worked enough with anyone to really gauge accurately.
 
Keep quiet, they're listening.
 
@DaveRandom They build from scratch of use a toolkit or something?
 
10:50 PM
The latest iteration of the platform makes use of Yaf. I've heard the design nazis speak unfavourably of it, I don't really know enough about it to comment (yet)
@webarto Meh, I'll have opinions all up in yo grill
 
@TheWebs something like a "CSVWriter", taking a Traversable and output it as csv?
 
11:20 PM
@bizzehdee Why am I getting notifications for these
 
@jack because pings are based on username and not userid. So you share the same name, thus you will also be pinged.
 
11:36 PM
@DaveRandom Yo. Our lost son has returned
 
It would appear SE has gone crazy again
 
huh wut?
They fire you yet?
 
Anyway, yes, I am still alive :-)
I got caught up doing house-y shit during my time off
 
@DaveRandom How reallify
:)
 
@DaveRandom Happened to me once, or twice...
 
11:41 PM
I know, I'm so passe
(cba finding the right accent)
 
Man, you should see me, house is sparkling since I got laid off :D
Tea, juice, coffee, full english breakfast.
That's in the morning.
 
I'll be round in a few hours
 
I have quite a trivial question. If I have a function with a specific purpose and "helper functions" to help that function work, would it be "bad practice" to turn this into a class to prevent global pollution.
This function has no intention to be extended.
 
@webarto You get up in the morning?
 
16 hours ago, by webarto
mroaempgna
You do the math :P
 
11:49 PM
@JohnSmith Yes, it'd be bad, but it's not crack or anything. Stick stuff in a namespace to avoid name collisions.
 
Sort of then
 
@danack thanks, I'm going to have to read about namespaces. be back soon!
 

« first day (1129 days earlier)      last day (3826 days later) »