« first day (1447 days earlier)      last day (3492 days later) » 

6:04 AM
moin
 
morning
 
6:23 AM
Hey
 
posted on October 02, 2014 by kbironneau

/* by MonsieurLeMarquis */

 
7:17 AM
good mornings
 
Anyone wants a Google Domains Beta invitation? US only. I have 5 left.
2
@JoeWatkins could you pin that? (You're the most recently active RO)
 
yep, morning all :)
 
So thanks.
 
good meurning
 
@SecondRikudo gimme
 
7:28 AM
@tereško Email?
 
martins dot teresko in gmail
 
Sent
Though I don't know if you'll be able to use it
 
felt it already (smartband vibrated)
 
They say it's US only (although everything seems to be working for me)
 
7:48 AM
Morning
 
emm ... guys'n'gals, what is the status of PDO::PARAM_ARRAY ?
 
@DaveRandom Fizzbuzz? For what purpose?
 
Aug 12 '11 at 16:34, by ircmaxell
@Charles It would be nice if MySQL supported array semantics for this sort of construct... Mapped to pdo: $stmt->bindParam(":foo", $array, PDO::PARAM_ARRAY | PDO::PARAM_INT)
 
@tereško As an alternative to manually escaping values that go into an IN clause?
 
yeah
 
7:57 AM
Is it feasible to do with actual prepared statements?
 
it's pain in the ass
 
@tereško Will (?, ?, ?) work?
 
you have to generate query with ? placeholders and then you have to bind values in a loop
 
see: "pain in the ass" for clearification
 
8:03 AM
is it good behaviour to have one route -> two methods (two controllers)?
or just go with two routes
 
depends on how is your routing implemented
 
@iroegbu The same controller can handle viewing (GET) and updating (POST) of the same resource
 
Mornings
 
In my config this rule directs most of the request to the proper controller:
"main": {
    "notation": ":resource[/:action][/:id][.:extension]",
    "conditions": {
        "id"      : "[0-9]+|[a-z0-9]{32}"
    },
    "defaults": {
        "resource"  :   "site",
        "action"    :   "main"
    }
},
 
The same route can apply to both (/user/id) but with different request methods
 
8:06 AM
that makes sense....
I didn't want to put the "if POST or GET" condition in controller
 
$action   = $request->getParameter('action');
$method   = $request->getMethod();
$command  = $method . $action;

$controller->{$command}($request);
=P
 
^ (y)
thanks
 
I never understood how (y) translates to "Like"
 
the World is mad...
 
@SecondRikudo skype shit
 
8:12 AM
@tereško Didn't facebook do it first?
 
It works in fb?
 
@SecondRikudo skype used that notation in 2005th .. and maybe some other IM used it even before then
 
I'll take your word for it
 
mornings
 
@DaveRandom morning
 
8:18 AM
yo
 
1 more work day until phpnw \o/
 
indeed
 
AKA BeerNW
 
what's the modern practice for showing client's primary email in the site, while protecting it against being picked up by bots ?
 
show a primary email of a member in a public section of the site ?
 
8:21 AM
public
in the "contacts" section
 
oh I see
you might generate an image, which might stop most bots ...
 
Pretty sure there's very little you can do. Anything more than the very dumbest bots will be able to find it.
 
so , what do we do these days to protect it ?
 
if they are determined though and the information is in the page ...
 
8:25 AM
ok , tnx
 
I think an image is all you can really do, an image with normal hotlinking protection and whatever ... most bots are dumb, they aren't sophisticated at all, they won't bother to decompose an image ... but I would still warn whoever owns the email that putting it in public is an invitation for spam ...
 
Morning all
Does anyone here have experience with Kohana?
 
@JoeWatkins yeah, but client will want the "email " to be clickable
 
contact form with recaptcha
a contact form is probably better than an image actually ...
 
yeah , that's exactly what I passed on
 
8:31 AM
posted on October 02, 2014 by nlecointre

/* by datafreak */ Hi all,As for datafreak here, we are huge fans of your ideas and submissions,...

 
Nobody around able to help with a Kohana routing issue?
 
8:48 AM
@Styphon unlikely tbh, I doubt any of the regulars have much/any experience with it
@JoeWatkins Actual page reads as if written by someone whose first language is not English. Slightly weird.
 
someone mentioned they are going to send a grammar report lol
E_TOO_MUCH_YELLOW_HURTS_EYES
can't read it ...
 
moin @Jimbo
 
Contract signed for the new place I'm going to be living in for at minimum the next 3 months (renting)
Really scary!
 
Good morning, could someone help me out with this: stackoverflow.com/questions/26157176/…
 
9:00 AM
@DaveRandom I actually have .. long long time ago
 
@Jimbo I suggest you celebrate by going and getting apocalyptically drunk before lunch.
 
@DaveRandom Nah, that's friday. Work taking me out, getting me trashed, throwing me in a river.
 
@tereško Presumably this is a patch of memory you have tried hard to erase, though?
@Jimbo Sounds awesome. You aren't hackathoning then?
 
@DaveRandom yeah , it was terrible, but I have also worked worked with codeigniter and yii ... it gives some perspective
 
> PHP developer up to 50k depending on skills
I call bullshit
 
9:03 AM
which currency?
 
@DaveRandom London?
 
and is that gross or net?
 
@Jimbo Yeh but still
 
@DaveRandom Mate, honestly, the average in or around liverpool or the north west, for a non-web-agency company using PHP, is 30-40k, for a non-senior
 
@TobiasGies It'll be gross, it always is
 
9:04 AM
@DaveRandom that actually translates as "you will get 30k max, no matter how skilled you are"
 
Or 46-48k if you're bloody good and they want you
I think 50k+ your work/life balance is going to suffer a bit
 
@tereško exactly
 
this solves the issue with traits (valgrind said no leaks although I'm not sure if it can lose anything), any reason why we don't update function_name for aliased methods currently? gist.github.com/nikita2206/8c8cee8c88f0ce4832e3
 
Does anybody have a clue on how to do this? stackoverflow.com/questions/26157176/…
 
9:20 AM
hehe
 
vim?
 
that'd explain it, but no. just nano.
 
nano ftw :-)
 
^ oh, someone agrees with me.
 
9:25 AM
Actually think they are all ftl. Text editing is always better done in a GUI, there's almost no reason to ever not do it.
 
I've been told that I need to use emacs
 
@Jimbo no :-D
 
So, from what I've heard (having never used it myself), my chin and elbow will be pressing key combinations soon
 
@DaveRandom Reason number one: Even it's a smart text editor with automatic upload, I don't like to first wait until it's ready.
 
Stop writing insanely big files then...
 
9:29 AM
@DaveRandom no, it's the 3 seconds about establishing connection etc.
@DaveRandom I have 50 MBit/s upload here, the file size is really not a problem.
 
Seriously, I don't have any source code files, in the usual way of things, that don't upload quicker than I can change windows
@bwoebi 3 seconds? wtf are you doing?
 
@DaveRandom stupid sftp?
 
Seriously, an SSH connection shouldn't take more than a few hundred ms to establish, it's only a few round trips
(also: 3 seconds is not that long in the grand scheme of things...)
 
also: don't want to always switch windows. Sucks to type the cmds into the text editor.
 
Ummm... wat?
 
9:36 AM
@DaveRandom yes, I always like to make after editing? (Or execute via php <file>)
 
@bwoebi Willing to bet that CLion will have that as a feature by the time GA comes out
 
A C IDE ??
NO
 
^ that's the line, I drew it ...
 
NO C IDE'S ARE ALLOWED PAST THE LINE
 
^^ there's another one
 
9:38 AM
@DaveRandom Does it efficiently load a whole php-src project?
 
morning gentlemen
 
morning @Jack
 
i've been burying myself in iOS development =/
 
@JoeWatkins I really don't get your out-and-out rejection of IDEs. I only really want it for navigational purposes and frilly workflow stuff, I usually turn autocomplete off
I basically want a live OpenGrok in my editor
IS THAT TOO MUCH TO ASK?????
 
time to set up an IDE Anonymous club.
 
9:40 AM
@DaveRandom you are on windows, right ?
 
@bwoebi It's... pretty broken atm. But it's still the first EAP release.
 
all of the stuff opengrok does I can do on the console, near as makes no difference ...
 
Hi, my name is Jack and I use my IDE without changing a single setting.
 
@DaveRandom ping me back when it's nice.
 
@JoeWatkins Yes (mostly, as a workstation), and no to your next question
 
9:41 AM
@JoeWatkins you can do a recursive grep, but not a specific search for a definition ?
 
do C projects usually have deeply nested structures ?
 
what could be easier than ctrl-click on a method and you jump to its definition?
 
@JoeWatkins "Usually" and "PHP" are two different entities...
 
As are sensible and php.
 
@Ja͢ck I do generally turn auto-complete off
 
9:43 AM
@DaveRandom why?
 
@DaveRandom doesn't bother me.
 
well, it's not hard to match what you need, even within the php-src tree, you generally know where you are looking /Zend ext/*/*.c main/ and so on ...
 
@bwoebi Because it promotes laziness and a lack of knowledge about your own codebase (IMO)
 
wat
that's such an anthony thing to say :P
 
@DaveRandom So, you'd like to remember the definition of each php-src macro and function?
 
9:44 AM
it's pretty ferrari ...
 
@bwoebi I would probably have it switched on for php-src. I also have it switched on at work, because the codebase is insanely big.
 
Laziness and programming is something that is always together
 
But for a project I am writing, I will turn it off.
 
@DaveRandom that maybe. But once it gets big... ;-)
 
I don't out and out reject that IDE's are useful, I reject that there are any good ones ... I'm not going to install 4 or 5 IDE's, if I'm going to use one, it has to have all bases covered as well as a text editor and a console does ...
 
9:46 AM
I use autocomplete only for good :D
 
where "big" is defined as "I'm forgetting stuff about this codebase at an annoying rate"
 
@nikita2206 true
@JoeWatkins OK. So, you don't really write any PHP code do you?
 
@Joe so you probably will like idea once they finish clion and port functionality from it
 
Because for PHP, PHP Storm really actually does All The Things
 
@DaveRandom only example code and helping for code snippets. I think^^
 
9:49 AM
I do yeah, I also work on (debug and develop stuff other people can't) a 3m loc PHP codebase ...
but I also have a lot of C to maintain, some java, some node (if you tell anyone, I'll kill you) ...
 
@JoeWatkins btw. do you debug using phpdbg?^^
 
there are no ides that have all of that covered as well as a text editor does ...
 
mysql 1205 deadlocks!! :)
 
@JoeWatkins Seriously. Try PHP Storm. If you hate it, that's fine, but you cannot comment until you have tried it. You can go get a 30 day trial of it.
 
I've installed it ...
does it work with C/Java/C++/C# ?
 
9:50 AM
Sublime does almost all languages well...
 
Work with? It can read it ... :)
 
almost ...
a text editor works with all of them, even ones that haven't been invented yet ...
 
@JoeWatkins Not relevant. Right tool for right job.
 
@DaveRandom he can even get a free license, since he's an open source contributor
 
uh, well. you can also use phpstorm like an usual text editor…^^
 
9:51 AM
^^^ also this
 
I started out by saying I'm not going to install 5 ide's, if I'm going to install one, it has to have all bases covered ...
 
don't let "perfect" be the enemy of "good"
 
lol wth chat just showed me some messages out of order
@JoeWatkins Yeh but it's still a single eco-system. It's not like you are going to be working on Java and PHP in the same window...
 
Let's say, it covers text editor at least and plus adds some functionality for languages that it knows
 
huh ?
 
9:53 AM
Maybe you are actually that bat shit insane, idk :-P
 
yes, it's exactly like that ...
 
You don't simply edit Java and PHP together ...
 
@JoeWatkins one IDE per language. You can use PHPStorm and IntelliJ, twice the same engine, but two different languages and tools.
 
you do if your backend is java and your frontend is php ... a pretty common thing ...
 
9:54 AM
26 secs ago, by bwoebi
@JoeWatkins one IDE per language. You can use PHPStorm and IntelliJ, twice the same engine, but two different languages and tools.
 
Aaargh!
 
Also known as "what the shit"
 
@bwoebi "not going to install 5 ide's" said that like three times now ...
 
or just install the php related plugins for intellij idea and have a fine java + php ide
 
@JoeWatkins You aren't really, you're installing IDEA and adding language plugins...
 
9:55 AM
@JoeWatkins netbean ?
 
eclipse does that too ... and becomes completely unusable
 
@JoeWatkins they've done it wrong, yea
 
idea isn't eclipse
 
they're not a million miles apart ...
 
they really are
 
9:56 AM
both implemented in java, both very hungry ...
 
@JoeWatkins 0.5-1 gigabytes usually for me.
(having 16 GB available)
 
you hate IDEs that don't handle everything, and hate IDEs that handle everything because they handle everything?
 
@JoeWatkins Yeh, that I will concede
2 days ago, by DaveRandom
2 hours ago, by DaveRandom
Java is wank
 
@JoeWatkins and btw. phpdbg integration into PHPStorm was started...
 
no no, many moons ago I was using an IDE, I don't work in PHP all the time, I do have to switch languages, and it was when I have to do this all the time that IDE's became impractical .... because none of them have it right, many have support, but do I want to run something that takes up 10% of my computers resources, or do I need my hardware for other stuff ... I need it for other stuff ... in PHP it's pretty hard to write code that makes a machine unstable, in C, it is extremely easy
 
9:59 AM
Hey !
Yo @JoeWatkins
How are you doing?
 
I don't have the time to wait for it to switch modes, or recover from crashes, or slow down what I am trying to do ...
 
@JoeWatkins the machine unstable in C? Are you trying kernel exploits or writing kernel modules? :o
 
@bwoebi awesome stuff, keep me posted :)
@bwoebi when you were working on phpdbg's watch points, you never had to shutdown everything graphical ??
maybe you don't make mistakes :)
 
it sounds like you used eclipse and are judging all IDEs based on it
 
no netbeans too, good ui designer, I still use netbeans for that ...
and vc
it was that long ago ...
 
10:02 AM
@JoeWatkins eih, to be serious I wrote that thing in a centOS vm I ssh'ed into. But the vm never blew up.
 
well I do run a graphical desktop, it does become unstable pretty easily
 
@JoeWatkins I never have achieved to destabilize my OS X GUI with php or C. (if not intended)
something must be wrong with your system...
 
I haven't had that problem too with my OS X gui.
 
it's pretty easy, you only have to take up all the cpu time and things get very very slow ...
you never use threads in c ...
 
Starting a basic website in 2014: 1. Install Node 2. Install Bower 3. Pick CSS framework 4. Pick responsive approach … 47. Write some HTML
 
10:06 AM
Lol
 
@JoeWatkins oh, well. I usually then just have a quick killall -9 command ready for the emergency.
 
kill all finder and it starts up again :P
 
@Duikboot finder?!?
why finder?
 
E_TOO_MUCH_L
 
It's the only think that breaks in my gui from osx :)
 
10:08 AM
@JoeWatkins
@Duikboot aha.
 
this is all just theory, in practice there are no ides I can get along with aswell as I do a text editor ...
 
I felt so ill last night I start viewing more presentation about DI in PHP. I tried to copycat s ome code to get into it. ( Without autoloading etc.. ) But Im a bit stuck at 1 part. Can I easily couple a HTML layout with a from submission to create a user object? I would like to create a more real-life example.
 
there is no nailgun I can get along with as well as I do a hammer, but that doesn't mean I won't use a nailgun when it is appropriate
 
appropriate ?
there is nothing wrong with not using an ide, nothing wrong with using one either ...
 
@Duikboot why would you couple the html display with a post request handling?
 
10:11 AM
yes, appropriate. have you ever used a nail gun?
 
these are 2 different requests
now you could use a "form manager", that has several methods, i.e. some that allow you to display a form, and others to handle a form
 
not sure what you are talking about now ... we are talking about programming .. there's nothing wrong with programming without an ide, and nothing wrong with programming with one ... neither is more appropriate in general is my point ...
 
you seemed confused by the analogy
 
@FlorianMargaine So: I have a signupform.php class for example.. with an interface.. getForm and postForm or something?
Im totally lost currently in understanding this structure and I am so willing to learn it.
 
there might be times it's required to use a nailgun, such as the force required to drive a nail in is more than your arm can deliver ... the analogy doesn't work for us ... some people like to use IDE's, others don't ... it says nothing about anything ...
 
10:14 AM
@JoeWatkins Also, abstract all the threading as far away as possible. You start a fixed size thread pool once and then you assign task asynchronously to them. At that point you barely ever get issues with threads.
That sometimes gets a horrible mess in Java when people instantiate threads all the time everywhere throughout the codebase in Java.
 
abstraction doesn't lead to stability by default ...
 
no, a nail gun is about efficiency. it's great for getting a lot of nails into wood very quickly. it's not as great at getting one nail into wood (setting up the compressor, likely the generator, even just holding the thing takes more effort). and it sucks at pulling nails and pounding down shiners.
 
@JoeWatkins no. You need to abstract the threads away in a way that one cannot unintentionally destabilize them.
 
IDE's don't necessarily make you more efficient though, they do from your perspective, but I get along fine without them and they do the opposite from mine ...
 
@JoeWatkins what's up?
 
silence has befallen the room ...
 
RA RA RA MAKE SOME NOISE RA
 
RA
Bored, writing 'goodbye documentation' and leaving subtle little things here and there....
 
I still have a worryingly strange problem from yesterday
our servers showed load of 500-600, turned out to be our own error
what's strange is that in logs was
[01-Oct-2014 16:05:33] WARNING: [pool www2] child 6034 said into stderr: "fatal: Not a git repository (or any of the parent directories): .git"
[01-Oct-2014 16:05:34] WARNING: [pool www2] child 6102 said into stderr: "fatal: Not a git repository (or any of the parent directories): .git"
which is git being executed by php inside fpm ...
we don't do that anywhere
I see no signs of a breach ... any ideas ?
 
10:59 AM
It looks like a fatal from php?
can you register error handler and log backtrace?
 
cd /tmp
git pull
fatal: Not a git repository (or any parent up to mount point /tmp)
it's a version of that ... but we don't do that anywhere ...
 
someone exec'd git from inside fpm in php ...
 
Ah crap - I thought this was meant to be a joke: searchcode.com/?q=startsWith%28%22Windows+9%22%29
 
can we think of another explanation other than breach ?
You thouhght "7 8 9" was the real reason ?? :D @Danack
 
@Jimbo acrostic rick-roll?
 
@Danack That's a pretty good reason to skip 9 heh
 
@JoeWatkins You exec anything at all anywhere?
 
Backticks are also a great favourite.
 
dev deps do, phpunit and seb/Version, but we don't use them in production (not installed on machine)
 
11:16 AM
@DaveRandom YES. I'm going to add urls to rickrolls for some of the @link docs, thanks for that ;-D
 
@JoeWatkins Have you found the corresponding requests in the request log?
and are you sure this is coming from fpm? Which log files do they appear in?
 
php-fpm.log and nginx is on another machine
don't know what to look for because no idea where it's coming from ...
 
Well, basically anything that has an underlying reliance on popen() is vulnerable to the plethora of bash ace flaws
@JoeWatkins does anything use mail()?
 
no using smtp directly
 
Also @JoeWatkins - is it possible that there's a way to connect to the fpm listen sock from the internet?
 
11:32 AM
nope
(not sure how it's blocked actually, allowed_clients not set, but it's not letting me in anyway)
 
@JoeWatkins Did you also check the access log at that time?
Also motning
 
(seems to listen on loopback, there's probably vpn or physical connection between machines)
 
Oooh it gets better:
> PHP Architect up to 70k + depending on skills
@Jimbo ^ identical job description :-/
 
@DaveRandom My long-term future job, hopefully :P
 
traffic looked normal according to someone with access to analytics and there's no huge difference in logsize and nothing strange that I can spot ...
 
11:35 AM
@JoeWatkins I presume bash is patched with the second round of patches? (and was it patched by that time yesterday?)
 
@DaveRandom this one would maybe be 50k max
 
tbh I'd probably burn that machine anyway
 
I sent an email and asked earlier, no reply yet ...
 
@tereško The body of the email is character-for-character identical...
 
it has to be an attempt at, or an actual breach, there's no other explanation, right ?
 
11:36 AM
@DaveRandom lol
 
> Based in London relaxed atmosphere where are able to wear what ever clothes you want.
*turns up in hot pants*
 
lol
 
turns up in no pants
 
@JoeWatkins If it's coming from fpm, it has to be. It could maybe legitimately happen from the CLI with some composer weirdness, but in fpm...
 
11:38 AM
@DaveRandom I kinda expect to see that from you tomorrow :p
 
@DaveRandom joga pants + russian cap + wife beater
 
Has anyone ever gone for a job interview and gotten the max salary from the range offered?
 
Can I just have hairgel in hand luggage or will I get frisk searched for that?
 
@PeeHaa Unfortunately my mankini is worn out
 
How do you wear out a .... nevermind actually.
 
11:40 AM
Damn you and your worn out mankini
 
@PeeHaa gov.uk/hand-luggage-restrictions/overview under "Taking liquids through security"
 
hmmmmmm
 
@Fabien If I throw the word "grinding" at you, would you like me to poke out your mind's eye for you?
 
I think I cam cram everything in a backpack than / then whichever it is
 
(actually, they're just really badly made)
 
11:43 AM
Keep your poking to yourself cheers :P
 
@PeeHaa We do have shops in the UK, btw
Just in case you didn't know
 
@DaveRandom No fucking way
mind blown
 
I know! I was surprised when I discovered they also have all the way over in Canada!
 
Do you also have blackjack and hookers?
What's next? You're going to tell me you people also have ATMs?
 
11:46 AM
:P
I wanna play at hooker! :(
 
I've done my time in rugby, and it suuuuuuuucked
 
God damn it sucks having a window with not curtains/blinds. Sun is roasting me!
 
there's no bad time for mooning someone
 
idk, I'm not sure a moon-eral procession would be such a great thing
Also mooning someone who's aiming a gun at you may not work out well
 
11:52 AM
Japan do the best pranks
 
I'm picturing an inventive way to propose to someone
 
Inventive... not romantic.
 
@PaulCrovella being inventive is easy.. But you need to be able to combine romantic and inventive :)
 
#phpdbg integration into @phpstorm finally in progress! https://youtrack.jetbrains.com/issue/WI-21414
 
engagement ring in a bowl of cereal .. that should do it.
 
11:56 AM
@JoeWatkins issue was now updated to "in Progress" :-)
 
woah!
 
w00t
 

« first day (1447 days earlier)      last day (3492 days later) »