« first day (1313 days earlier)      last day (3860 days later) » 

15:18
So anyone found any cool things recently?
@Fabien Not a thing, but the back pain I've suffered from for 3 years has gotten a lot better in the last month, and may almost completely disappear soon - which is nice.
I found what I think was a splinter buried in my chin that I think had been there for a couple of years at least
@Danack Oh yeah? I remember you talking about it a while ago. Enough to return to work?
I was considering sending it away for some kind of analysis, but I quickly lost it
@568ml Some mystery should remain unsolved.
15:21
@Fabien (Un)fortunately yes! Need to wrap up the open source stuff I want to get done first - but yeah, I am now officially being a slacker rather than being actually ill.
Got more code 'done' in the past week than previous 6.
@Danack heh. Pretty cool though. Is it something you're doing/taking? Or twist of fate?
@Danack what kind of back pain was it? Upper/lower?
@Fabien Basically I fucked up my back ten years ago by sitting at a desk with my legs straight to the desk, and upper body twisted to look at the monitor off to the left. It put a twist in my spine, which didn't hurt until I started going to the gym and started getting fit.
BTW I decided on a quote for my work profile page. Unsure if they're accept it but it's "Don't be STUPID, GRASP SOLID!".
Basically I've been working on getting the twist out, and it's almost all straight now, apart from one tiny little bit of tightness to go.
15:23
@Danack I suddenly find myself sitting upright :-/
Yep - don't fuck up your back kids.
I'd get one of those kneeling chairs if my posture wasn't already so terrible. Those muscle must be quite weak for me.
We're all significantly shortening our lives by sitting at a desk for half the day anyway
What was it, 7 years off the end of your life if you have a desk job?
So, with that in mind, I don't need to save for my retirement - I'm going to snuff it before then anyway. So, new bike, macbook, whatever I want etc to have fun now while I still can ;)
/me is not responsible
macbook. That really is living lavishly.
@Danack what kind of therapy did you go for?
15:27
I'm toying with the idea of joining my wife on some of her life goals of summiting some of the less technical mountains. But god damn is it expensive.
@ircmaxell How so?
Looking at $5,000 for one of them per person
@tereško I said the main function, or the bootstrapper. It doesn't have to be a function.
wow, we have recent starred messages as somebody's bookmarks
On many C-like languages, program execution starts from the main() function.
15:28
@568ml A very good chiropracter got most of the twist out - it was annoying though, when the twist was in a spot he could treat, he was very effective. But when it got to a position that he didn't know how to treat, he was completely ineffective and still quite expensive.
More than anything else it's worked it's way out due to me just always taking care to sit straight and sleep in decent position, and stretch most mornings.
@SecondRikudo parts of any significant scale codebase are going to be procedural. And some parts are going to be functional. OO will likely be the majority of the structure, but there are always going to be parts that need to be procedural (as properly abstracting them would be not worth the effort)
@ircmaxell For example?
For now, for all my applications, I managed to keep things fairly OOP structured.
Btw who favourited my posts on the right -> they're not at all helpful, someone delete them :P
@SecondRikudo if there are no functions to begin with .. how is it "procedural" ?
I see no contradiction between "functional" and "OOP"
@tereško A boostrapper runs as a function....
15:31
functional !== procedural
Closure all the things
function != procedural (it's not even a loose equality)
dunno ... for me bootstrap runs like a script, from start till the end
in your index.php file, you could have done appMain(); instead of require "../boostrap.php", why does it matter how you call it?
15:32
@tereško And that's exactly what your main() function looks like in most C-like languages.
@TheLittleNaruto Thanks
BTW @Danack on your avatar photo. How did you achieve such an uneven shave? :P
@Fabien Mirror fell off the wall, was shaving blind.
Kudos on your perseverance.
@Danack DI a mirror onto your razor
lol
15:34
time to ride home
Someone really needs to start a "ProgrammingDadJokes" twitter handle for those kinds of things.
I had no razor handle once back when I was student. I attached the blade to a pen and shaved. Innovation! You can have a shave, then write a letter afterwards!
@tereško Ride safe.
@tereško Have a nice trip
@Jimbo Prison knife.
15:35
No Problem ^_^
But remember in battle, you're no match for Naruto :P
@Jimbo I use a shaving machine. I find "wet" shaving to be too much of a hassle in the morning, when you're half blinded from sleep
@TheLittleNaruto We already have one @Naruto here.
How up-to-date are you?
Not much
I am a baby naruto BTW
@TheLittleNaruto Heh, well then. Don't make claims you can't keep :D
quick question for everyone, I am mainly a backend developer but recently started looking into clientside js frameworks, has anyone played with angular and ember? If so do you have a preference between the two?
15:39
@TheLittleNaruto Looks more like Minato.
Yeah
But it's naruto's chibi form
Anyway I want to see my duplicate
where is other Naruto ? :P
@Pitchinnate Try the javascript room.
@Fabien yeah i will just wanted to see if fellow PHP developers had an opinion
Fair enough. Not playing with them myself. Maybe when @BenjaminGruenbaum comes in he can give you an opinion.
Though I shan't classify him as a PHP dev strictly :P
ok sounds good thanks
so are most of the people in the this chat, here everyday?
15:53
Yup.
i've lurked a few times and it seems like everyone knows everyone else pretty well
Anyone using my silex-auth-skeleton lib that I put up as just a baseline? I added auryn integration
@Jimbo You used Slim?
@Fabien Nope, not sure I want to though - but can't give a specific reason
I'll put it down to laziness
Or the name
@Jimbo YAML? Really?
15:59
@ircmaxell I KNOW, everyone hates yaml
I just, like feeling so dirty in this respect
@Jimbo it's on the list of potentials for future projects here at work.
Not got any experience with it myself.
Also: using base64 encoded passwords?????????
@ircmaxell Default! Although I'm going to be honest, I have included your password_compat lib but didn't manage to integrate it well - I would be very grateful of a PR sorting the security aspect out
/me gives up
BTW @Jimbo I thought the C in Auryn's DiC was specifically removed :P
16:03
It's the Symfony / Security part that's the problem, not how to do the encoding properly
I do know exactly how to use the lib, it's like 3 lines of code. It's integrating it with the Symfony component that's the problem
@Fabien If you're talking to PHP people then it's better to call it a raw DI, as 'DIC's in PHP usually mean 'extend a base class that allows you to use a service locator everywhere'. The correct term is DIC though.
Did I hear base64 encoded passwords?
@Danack Fair enough.
I always thought that people using str_rot13 hashing on passwords was a joke ... now I'm not so sure
@ircmaxell So I take it that was a no then... :P
16:19
poll: last time you ate a quesadilla?
@khaverim Never tried it!
@Jimbo WUT
@NikiC yeah...
you're missing out man
Yeah man. Quesadilla are lovely.
16:24
hmm ... the smartband failed to detect cycling
lol..
Do you have a cat @ircmaxell?
@Jimbo what exactly was the "failure" ?
I too had one issue with maxell's compatibility lib, but .. well .. it was because someone was trying to run the patched CMS on 5.2.something
at which point made the judgment call an ruined it by forcing password_compat to use the old bcrypo algo
it was that or rolling back to the "salted des" as hashing algorithm
16:31
Downgrade your framework to match your php version. #thingsyouwishyourjobdidnotmakeyoudo. :)
It wasn't anything specific, more like "I tried to figure out where to put this stuff and then failed miserably because the symfony stuff goes on forever". I will however try again, I'll make a security branch and give it a go tonight
... since you an crack salted DES with pen and paper, I decided to use '$2a$' as the lesser of evils
madara@Madara-PC:/srv/www/importa-quicky$ curl -sS getcomposer.org/installer | php
#!/usr/bin/env php
All settings correct for using Composer
Downloading...
Downloading...
Downloading...
The download failed repeatedly, aborting.
Fellas, why would this happen?
I have an internet connection (obviously)
Because you're running untrusted code downloaded from the internet?
@Fabien you choose to do them. You job didn't make you do them.
16:32
@SecondRikudo ssl not enabled in php.ini ?
or sockets or curl . .
@tereško Well, given the fact that I did install composer that way once on this PC suggests otherwise.
it actually sometimes happens that the composer's site goes down
Seems to have worked itself out, thanks
Damnit
Now I get this when trying to composer install on a project:
madara@Madara-PC:/srv/www/importa-quicky$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev)



  [ErrorException]
  zlib_decode(): data error



install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]
16:35
the current package is broken
congrats
i.e. artax?
Because that's what I'm requiring...
{
    "require": {
        "rdlowrey/artax": "dev-master"
    }
}
my composer.json ^
Well, I think it's the same problem as before.
I bet my connection is too slow and it's timing out too fast.
lol @webarto no way that's real
0
Q: PRG not passing values to other pages

iheartbreakzI am having problem with the post-redirect-get. It works fine but when I try to pass values from one page to another, it doesn't work. When i take the prg code from the header it works fine but when I put it back, the values don't get passed. My main function: function simple_prg ($start_prg = ...

16:49
@iheartbreakz why are you sending header("HTTP/1.1 303 See Other"); ?! and why the hell are you doing this $_POST = $_SESSION['post'][$uniqid]; ?!
Bobrovsky != Boobtitsky
exactly
lols. ok
no, pointing out his real name (#72, Goalie for the Columbus Blue Jackets)
is there some joke about this guy i'm missing
16:56
@ircmaxell You don't always have the choice. Just like I don't choose to use Drupal 6. It's the head of devs choice. Unless by choice it's referring to my choice to work there :P
no
@Fabien you always have a choice. It may be one you don't like, but you always have a choice
you could also put your foot down and refuse to do what you don't think is right. Not saying that's always good. And not saying it's the right thing to do, but there is a choice there
Hi guys, I have a quick question. I keep getting the following message in my error_log when trying to resize an 7.8k x 8.2k png:

[21-May-2014 18:52:42 Europe/Budapest] PHP Fatal error: Out of memory (allocated 502792192) (tried to allocate 27520 bytes) in /includes/UsefullStuff.php on line 416

How can I fix this?
make your program use less memory
that is a monster png file
7800x8200 pixels?
It's just imagecraftefromstring and imagepng functions
16:58
@ircmaxell When there are work opportunities approaching me rather than me approaching them I'll be more willing to put my foot down. At the moment i'm focusing on making that happen.
@Pitchinnate yes
@DJDavid98 from string? Why are you storing it in a string?
@Fabien Oh, I'm not saying what you're doing is wrong. Not by a long shot. Just realize that it still is a choice
Fair
@ircmaxell I accept several different file formats and I did not want to create a separate switch/case thing for just that
@DJDavid98 no, meaning why isn't it in a file to begin with
17:01
@ircmaxell It is, I just read it out first then passit over to that function
@DJDavid98 well, you can save a good chunk of memory by accessing the file directly
// this is the code that does the resizing
ini_set('memory_limit', '2048M');
$img = file_get_contents(UPLDPATH.$path);
$img = imagecreatefromstring($img);
imagesavealpha($img, true);
$background = imagecolorallocate($img, 0, 0, 0);
imagecolortransparent($img, $background);
imagealphablending($img, false);

$new_img = imageCreateTransparent(1000);

imagecopyresampled($new_img, $img, 0, 0, ($gt=='width'?0:($$gt-$$st)/2), ($gt=='height'?0:($$gt-$$st)/2), 100, 100, $width, $height);

imagePng($img,UPLDPATH.$path,9);
@ircmaxell How can I edit the code above to use the file directly?
@tereško I got the 303 header part from here electrictoolbox.com/php-303-redirect
which leaves the second part of the question open
I was testing with the second part
i originally had @at session
in case i get errors
but even without that line
it doesn't work
if i remove else {
simple_prg(null, 'PHP_SELF');
}
from the header line... values get passed
17:19
hello all
can i use sleep in a foreach?
SELECT SUM(PM_Amount) THISMONTH ,
  (SELECT SUM(PM_Amount)
   FROM `payments_master`
   WHERE PM_Date BETWEEN CAST(DATE_FORMAT(DATE_ADD(CURDATE(), INTERVAL -1 YEAR) ,'%Y-%m-01') AS DATE) AND DATE_ADD(CURDATE(), INTERVAL -1 YEAR)) LASTYEARCURMONTH
FROM `payments_master`
WHERE PM_Date BETWEEN CAST(DATE_FORMAT(CURDATE() ,'%Y-%m-01') AS DATE) AND CURDATE()
any better approach for this ?
thank you :D
I need to get current month upto income summery and last year current month upto salary
@samitha what's wrong with the one you're doing now?
17:21
@ircmaxell Are you speaking to tiny avatar people again?
@ircmaxell Nothing
And he's on my tiny avatar list, that means something.
@samitha You don't need the casts. MySQL will automatically interpret a well-formed YYYY-MM-DD string as a date when asked to do so.
@samitha then what's your concern?
It working perfect @ircmaxell
i'm asking better approach
17:23
@SecondRikudo No, he's talking to himself
@NikiC Oh, I guess that makes sense.
Removing unwanted functions as @Charles suggest @ircmaxell
@samitha well, then qualify what you think should be better. Or what flaws you see. Or what you may think is wrong
@NikiC He's doing it again. MAKE IT STOP!
17:25
and that's another tiny avatar for me
I wish I'd eaten more pizza in NY. :(
@Fabien you should have
I ate pretty good while I was out there tbf. But more pizza should have occured.
Every place seemed to suggest they were the best too.
ah, good old New York
@ircmaxell Are you sure about MySQL always rolling back on error? I thought there were client side errors that will throw exceptions without triggering an error (and rollback) on the server side, which would leave the transaction open until it timed out.
17:28
check out that reddit thread
yeah - I think I agree with this guy en.reddit.com/r/PHP/comments/263pbs/…
In what version "MySQL always rolling back on error"
:o @Danack
MySQL will roll back on a table level error (constraint violation, table full, etc)
mornings
Don't we need to use TRANSACTIONS ?
17:30
btw @ircmaxell How'd you end up with 'Listen to me' appended to your name on /r/php ?
Hello @DaveRandom
I basically only came here to brag about how I have palindromic rep
@Fabien Subreddit mods can append flair to usernames.
@ircmaxell which are not all of the things that can cause an exception when you're calling query.
Also a UKIP van just crashed pretty much outside my house
I see. Don't see them much. That's a good one to have :P
17:31
@DaveRandom Pics?
@DaveRandom Did you help them out by pointing and laughing?
Annoyingly they crashed into a wall and drove off, I only saw them driving off
I'll take a pic of the wall though if you like, it's pretty difficult to crash into
@Fabien I dunno. It just showed up one day
@Danack What other kinds of errors do you normally see?
@ircmaxell I don't normally see any because I write code defensively, but I have seen errors that occurred before they hit the server, such as sending too large a string which is bigger than max_packet size. Yeah, they should be picked up by validation, but if they get through, then rolling back would need to be done manually.
17:37
Threads in PHP will change the world!!! We´ll show you how and why in our Talk at #phptek today in Chicago! #php_appserver #appserver.io
ballsy ...
yeah ... zactly ...
@svenvarkel In deed, it is. But using #php_appserver They can use multithreading without the need to implement threads by themselves :)
lolwut?
I know ... sometimes they don't make much sense ... they are so enthusiastic I don't want to dampen their spirits ...
but they do sometimes say pretty crazy things in the pursuit of selling (funding) their product ...
Dammit who upvoted me??
17:40
threads at the frontend doesn't make any sense, it just doesn't ... ever ... anywhere ...
I can't actually figure out waht their product is.
A persistent PHP daemon?
Something built on top of PHP that hijacks threads?
yeah, php's tomcat basically ...
you know what I'll bet
I'll bet it's FPM, but instead of using process isolation, they are using thread isolation
@Charles ...as opposed to those daemons you get that aren't persistent?
(possibly not fastcgi, but)
17:42
@DaveRandom You mean your daemons keep running!?
Sometimes. Most of the time they explode very quickly, but that's just because I'm a terrible programmer.
What reasons wouldn't you use a DI in your code?
@ircmaxell yeah something like that I guess, haven't looked ... it's a cool project ...
@Fabien Well, legacy code with forced global state is a real impediment to DI...
heh indeed. But thinking about new code.
17:44
but ....
@Fabien Laziness?
I'm not sure I like it being written in PHP, I mean if we're going to take it to production, not that I think pthreads or php will fail, but, I think C will fair way better, be more manageable, easier to debug, and if you're putting in all that effort so that users can thread at the frontend, then you are barking mad ...
I ask because using one (not that I fully understand it) for the first time recently everything seems peachy. Everything has cons. So far my only con is that it kills my IDEs click to definition.
@Fabien ...because?
I hope they get their funding and ship me out to germany sometime, and I'll write the thing properly where it should be written and they can do whatever with it :D
17:47
@ircmaxell Another case is when you have STRICT_TRANS_TABLES enabled. If you try to insert a value that is not valid, that insert will fail with an error when it hits the server, but it will not cause the transaction to be rolled back.
@DaveRandom Attempts to gather a better understanding.
s/valid/valid for the column you're trying to insert it into.
@JoeWatkins it is written in PHP?
@JoeWatkins I dunno, I think the problem they're trying to solve is the same thing someone mentioned here the other day. The entire application bootstrap process kills PHP performance in comparison to almost everything else... Having everything ready when the request comes in could be huge.
@Fabien No I mean the "click to" problem. That tells me you are either basically using it as a service locator because you are injecting the injector, or you are using a crappy IDE (i.e. not PHP Storm), or possibly both.
17:49
@ircmaxell it is yeah, every line ....
weird
(PHP Storm gives you "click to definition" on strings, btw)
@DaveRandom I 'was' using it as a service locator till I refactored on everyone's advice.
inorite, they asked me at phpuk what they should do next, and I said great project, but for god sake write some of it in C, you are asking things of streams never meant to be asked, cool that it works, but concurrent code can execute a billion^billion times and be wrong, it's too hard to get right here, the mission critical parts should be C, they said they might ship me out to germany to do it if they get funding ...
where does client code run? in the same process?
17:51
@DaveRandom it does? Googling
yeah one process for the whole thing
@Fabien Just ctl + click. If it's a valid class name, it will work
I'll have to check it tomorrow. Seeing as it's a work project.
@Charles that is the problem, but the place you solve that, the only place you have reasonable control is in C, it's not okay to ask a single request (from the perspective of the engine) to do the work of a million requests ...
I've somehow lucked in to this API project where I was given near enough full control. The front end of the site hasn't changed in over a week. The back end has gone through some serious changes over that time. Actually enjoying it.
17:53
while we are in a lab, and we are benchmarking, all good, in the real world, where code calls functions in extensions never intended to be used in this way, you cause yourself a huge headache that you don't even know is there, and probably won't be able to trace all that reliably ... because it will appear to come from everywhere, because it will ... outside of a lab ...
brb shops
@Fabien Even works in JS, just tried it
@JoeWatkins Right, and while you can mitigate that somewhat with like request handling limits, you're still doing something that probably isn't supposed to be happening...
The PHP string you check was in ->make()?
17:54
from C, or rather from /Zend you can redefine what request startup and shutdown are, from a sapi that is core with access to /Zend, that's doable ...
@Fabien Literally any string literal anywhere that is a valid indexed class path
@DaveRandom Cool. So I am back to zero cons.
@Fabien PHP Storm is awesome
Indeed.
17:56
@JoeWatkins I'll have a KitKat Chunky and a packet of kingsize silver rizlas please
I eat the chocolate first.
I've still yet to try buying 4 and melting them together. Freeze them after for one super kit-kat
@JoeWatkins which is something we discussed earlier. A SAPI that defined register_request_handler(callable $handler). Then loaded and ran a "index.php" to completion. Then rather than shutting down, saved state. Then, on incoming request, fork() and call $handler->handle(Request). Then shutdown.
evgening
anyone know why PHPUnit will convert Test Failures to Errors when I enable logging/coverage?
when I remove the <logging> tags from the phpunit.xml I get the (correct) output FFFSFFF. When I enable it, I get EEESEEE.
weird
is logging gneerating an error, which causes the test to error (within the test executor)?
i dont think so, but let me run it again to make sure
There were 7 errors:

1) Blah\SessionControllerTest::testMethodsRequiringAuthentication with data set #0 ('GET')
Failed asserting that 404 matches expected 401.
now when I run it without logging:
There were 7 failures:

1) BlahSessionControllerTest::testMethodsRequiringAuthentication with data set #0 ('GET')
Failed asserting that 404 matches expected 401.
and nothing else
18:05
weird
yeah
18:24
should I go and buy a beer
or try to write some code ?
@tereško yes
Write some code...
After you buy the beer
it was an either-or question, @CarrieKendall =P
yes, and my answer still stands :)
i see
actually I will just pick the "write some code" option, because otherwise I wont get anything done today .. again
18:29
Plus it's Wednesday and beer is best reserved for a zero responsibility tomorrow.
@tereško you said or not xor :P
18:44
@tereško depends on the kind of beer some are better than others
all beer is better than no beer though

« first day (1313 days earlier)      last day (3860 days later) »