« first day (1404 days earlier)      last day (3537 days later) » 

5:01 PM
I now have two (2!) packagist packages, wow...
 
@Fabien Ahh. So weirdo then.
 
@SecondRikudo Ok, was going to ask you about some code I'm using but ill just put a question together :) Thanks anyway
 
@CodeX Sure
 
@AndreaFaulds funny.
 
Hi PHP :)
Can anyone recommend a good PHP book please?
I have done some PHP before but I want to move on to build more advanced stuff now.
 
I need a book which covers the basics(as a refresher) and offers advanced stuff
 
don't buy this ^
 
More serious. We had some list somewhere at some point
 
The reviews are epic @peehaa
 
@tereško ^
 
5:09 PM
@FlorianMargaine Pretty sure he was trolling :3
@PeeHaa you got the link?
 
At least I think it was @tereško who had a nice list
 
I have only czech books so. I'm sure they willn't help you :P
 
I got some off Google, but I'm not sure
 
@Sabಠ_ಠ yes. Wasn't sure if you knew though :)
 
@TomášAresakMalčánek Maybe there are English version?
What about PHP Bible?
 
5:10 PM
I will take a look
I have knihy.cpress.cz/mistrovstvi-v-php-5-d2.html this one, I will try to find english version
 
@Gordon Amazing
 
@Sabಠ_ಠ I'm trying to find it in the chat search, but that thing is one big fail
 
Daww
I'll borrow PHP Bible for now.
 
@bwoebi Serious answer :p
 
I'll be back in an hour from the library. Then we can discuss. :3
Brb!
 
5:15 PM
later
 
Anyone familiar with PHPSpec? I'm having a hell of a time trying to stub PDO::execute.
 
@PeeHaa dafuq
 
:D
 
I have a question about the PHP name. I figure it wouldn't be a good stack question, so here I am in chat.
Originally it was Personal Home Page
Then people didn't like it so they made up the hypertext preprocessor
 
PHP: Hypertext Processor
 
5:20 PM
The question is when did they make the change. I have the book PHP programming and in the front there are the original e-mails from the creator of the language and he never mentions the name change even though the site history claims it was mentioned around version 3
 
PHP/FI FTW
 
I personally started after v4 rolled out and I never heard it called that until v5 was in the works
In version 3 they shed the /F1 portion of the name, but in the official e-mails that were sent out it never indicated they changed what PHP stood for.
 
Your best bet might be finding a decades-old archive of the php-internals mailing list, but I doubt you'll find it...
 
5:27 PM
They have the official e-mails of releases printed in the book
 
@SecondRikudo that's terrible
 
@tereško Yup
 
I've seen a "design" where ALL logic was done in every object constructor and you wound up just calling something like $object->doWhatever()
 
Can there be a better answer
 
5:30 PM
Hi
 
1
Q: How can I use PHP implode on an array of objects

PaulloI have an array of objects which I want to implode. I am only interested on one of the properties of that array. Is there an easier way of doing this without having to iterate through the collection? class Item { private $id; private $name; function __construct($id, $name) { ...

 
@charles Brilliant. Thanks for the links. I can't believe the info is still around.
 
@Ekaterina The internet never forgets. Usually.
 
@Charles Very True Statement
 
5:46 PM
@TomášAresakMalčánek so it turned out better than expected?
 
Nah unfortunatelly :P
 
@TomášAresakMalčánek but it is a cute kitten dancing around a pole. that's awesomium
@Fabien heh, what do I do with that?
 
Revel in awe!
 
Hi
 
A 1KB HDD in MC
 
5:48 PM
and it's now, I think the time of getting re open votes
 
@Fabien while I respect the determination those folks have building computers in MC, I never understood why they do it. I guess, just because it's possible
 
Yup. One day we'll have minecraft in mincraft.
 
@Ekaterina here's a piece of internet history: the vote on the PHP name meaning :)
 
anybody can help me here
 
ok people I have a math problem that is making me go round and round
A = 455.61
B = 827.22
C = 1282.83

C = A+B
now B also = 64% of C
If I wanted to increase the 64% to 70% how do I work out what I need to add to B to get this increase of 6%
 
6:01 PM
add 6% of C to B
 
That wont work
 
get 70% of C and substract B
 
But I want b to be 70% of C
 
without knowing C?
 
@StephenWolfe are does fictional values?
 
6:08 PM
s/does/those :-) @RonniSkansing
 
64% of 1282.83 is not 827.22?
 
Ok so A is the purchase price of the product, B is a calculated markup C is the selling price
 
Hey @PeeHaa thanks man, I will try to remember that
 
:)
 
How is life?
 
6:10 PM
This week is pretty busy
 
work stuff?
 
Yeah sadly :P
 
=/ well work is work. In bout 5 min I think the foodz are ready =]
 
Ahh its all gone wrong i need a beer
 
Nice. I just ordered, because I'm a lazy prick :D
 
6:12 PM
nice, what did you get?
 
pasta
\o/
 
@StephenWolfe my gf is a math wizard imo.. she can help you in 5 min or so, if you want?
@PeeHaa hehe nice, I rarely order pasta always end up with pizza, burger..
 
Flags a post because the word shit is in it jesus christ what a wanker :P
/nuance :D
 
6:31 PM
You didn't saw that!
 
user895378
@PeeHaa I'm offended by your use of profanity.
 
user895378
;)
 
@ThW In FluentDom what's the simplest way I can just retrieve all links href from given html?
 
Cool. Thank you. Guess it wasn't just me being silly.
 
ThW
6:34 PM
:-)
 
@StephenWolfe she says. "B = C * X", X being 0.70 as "C*0.70= 70% of C"
 
ThW
@Fabien You're not the first one with that particular question :-P
 
user895378
@ThW I suspect that's a very popular question.
 
@ThW I was doing it but I am doing it inside @rdlowrey artax which is causing it to either pause or freeze.
So wanted to confirm I wasn't doing that part wrong.
 
user895378
Define "pause or freeze"
 
6:37 PM
echo something before it echoes. Do it after it doesn't.
I have to kill the script.
 
ThW
Well it is the simplest, but not the fastest
but still it should be fast enough
 
user895378
Yeah, DOM is somewhat slow just because
 
user895378
But it shouldn't be prohibitively slow
 
user895378
We should maybe start referring to Lusitanian's mother as "LM" so as to avoid offending anyone.
 
:)
 
ThW
6:45 PM
Using FluentDOM\Xpath::evaluate() could be a little faster (removes some abstraction), too
 
user1994804
Hey @DaveRandom I was wondering if I could send you a few files from my shipping implementation with hopes you could assist me in any way. Ive been staring at it for ~ 2 weeks and could use some clues
 
7:05 PM
hmm ... so this week we got a new coworker at AurumIt
the first impression is quite positive
it's nice that I do not need to spend a half an hour on explaining shit
 
user895378
Happy birthday to @webarto! Old guys unite!
16
 
oh .. yeah
almost forgot
my deepest condolences in your birthday, @webarto
 
what's up
 
user895378
 
user895378
@NicolasArdison coding and goofing off. The usual.
 
7:17 PM
:P
 
.. aaand while you are still online
@rdlowrey , when making the header for Set-Cookie, shouldn't the name too be escaped , not only the value ?
(well .. urlencoded)
 
user895378
@tereško oh, I completely forgot to answer that, sorry. Yes, I think you're right.
 
in that case we need to update our respective classes which are handling that shit
 
what's wrong with this
$db->prepare("select * from kill_type where id = :id AND creature= :creature LIMIT 1");
it's pdo
 
we noticed
 
7:21 PM
k
 
what's the error that you are getting ?
 
Fatal error: Call to a member function prepare() on a non-object
 
$db is not an object
 
how do i fix it?
 
your constructor failed to establish a connection
 
7:23 PM
it works for all the other connections on the page
 
or, there is no variable "$db" in that particular scope
 
does pdo connect seperately
 
?
you will have to give a bit more code
 
also, your naming convention could use some .. emm ... refinement
 
7:24 PM
@AndreaFaulds Question.
 
can i just do this: $statement = prepare
 
A closure as a static function vs a normal one.
 
what do you mean?
 
Since the closure itself isn't part of the class, you can't delegate it to late static binding.
It's going to call the closure.
That means inside of it you can use static or non-static calls on $this
 
@LeviMorrison it should be anormal one
 
7:26 PM
So... why do some people want a closure to be statically bound to the object?
 
and you can bind it, so that it can use $this
 
i haven't written a pdo select before, but i have other working ones
 
Also, what happens when yo umake a static closure and then bind it to an object?
(Reminder, static closures are actually a real thing)
 
static closure?
 
user895378
7:27 PM
@LeviMorrison s/a real thing/a real terrible thing/
 
user895378
Late static binding ... the gift that keeps on giving.
 
@IGotRoot , I am still waiting for more of the code , to have some context
 
i still do includes, and functions
no classes
 
@rdlowrey No argument from me :D
 
user895378
Also, whenever I read the acryonym, "LSB," I think "least significant bit," and not "late static binding."
 
7:29 PM
what do you want besides the error line?
 
user895378
Probably in the same way that @JoeWatkins equates "TLS" with "thread local storage" and not "transport layer security."
 
@IGotRoot code
 
previously on the page i'm doing: $sql_c="SELECT * FROM creature_stats WHERE id=$creature";
$result_c = mysql_query($sql_c, $con) or die (sql_death($sql_c));
 
emm .. wut
 
sql_death is my storage for errors
 
7:32 PM
Wait...WAT
 
So you're using mysql_query and PDO within the same script?
 
in the same page of procedures
logical step down section
i was told to learn pdo
 
Stop.
You should learn PDO definitely
But do not mix the two APIs
 
you still have not givem me the code which I asked for the context
 
7:34 PM
If you use PDO you need to use PDO for all the queries
 
Is an ActiveRecord pattern similar to the purpose of using prepared statement in some way .. Because in rails i see no prepared statement .

I see not statement at all , maybe because they are encapsulated by a model or business logic .. I am not clear ...
 
is pdo better than mysql(i?)
 
@IGotRoot Yes and usually yes.
There are some things that mysqli can do slightly better than PDO, but there are also way more annoyances in mysqli that can make it a real bear to work with.
 
so i should write a connection for when i do pdo, it's not connecting because i can connect with something else?
 
I think things like count , max etc are faster than pdo
 
7:37 PM
@shortCircuit No, ActiveRecord has nothing to do with prepared statements
 
user895378
And there are some all things that Postgres can do better than MySQL :)
 
One is the correct way to write SQL queries that involve user input
And the other is an abomination
 
user895378
Hurray for RDBMS tribalism!
 
mysql is going away :(
 
@shortCircuit rails is piece of crap
an AR is an architectural pattern, it can sitt on top of SOAP for all it fucking cares
 
7:38 PM
@rdlowrey I've been using Postgres on my personal projects and I'm actually really like it so far
@tereško I would semi-argue that it is an anti-pattern
 
Oh, speaking of the abomination that is activerecord, does anyone have any thoughts on the new version of phpdatamapper / "spot"? At first glance it seems particularly sane, and their switch to Doctrine DBAL has removed all of the mysqlisms that it used to have...
 
user895378
Yes, pgsql has some really nice features.
 
@cspray I would say that it has extremely limited usecase at which it is the pragmatic approach
 
i'll ask for help at the meetup before hand coffee shop
thanks
 
@Charles Interesting. I'll have to give that one a look
 
7:40 PM
MySQL is dead! Long live MariaDB Drizzle MySQL!
 
@Charles I read "mysqlisms" as "muslims" for some reason.
 
I have got this 'is a piece of crap' review from a lot of ppl ... But I have to use it,. So I have to know it ... I can't just leave a job I got into ...
Does this pattern in anyway prevent SQL injections ... Do the model use prepared statements implicitly?
 
@Charles emm .. lets see: phpdatamapper.com/docs/entities
 
@shortCircuit Rails does a lot of things for and against you implicitly
 
fuck-noe
 
7:42 PM
When I see the log , I see just a simple SQL query ...
 
@tereško Minor SRP violation, but I tend to prefer using "anemic" classes at that layer anyway so it doesn't really bother me too much. /shrug
 
@shortCircuit if you see a logged query with already data filled in, then it is not using prepared statements
@shortCircuit prepared statements work by sending the query and data separately
 
@tereško Well, Rails could be doing something to log the query filled out but send it to the DB as a prepared statement
 
@Charles the use-cases that I am referring to are "persistence of glorified value objects" and "scaffolding for fast prototyping"
 
Yes , I thought that , but it was hard to believe ... That it does not use prepared statement .. I wish they had some documentation like the php.net manual ..
 
7:45 PM
@cspray that would seem like impractical waste
@shortCircuit rails is a framework, not a language
 
@tereško We're talking about Rails
That totally seems like something Rails would do
 
The one gotcha on PDO is that, by default, it makes prepared statements by escaping the data and sending it. You have to disable that to make it run proper prepared statements
 
To be honest there's way too many variables to go into answering that question @shortCircuit
What version of Rails? What database? Does the database adapter Rails is using support prepared statements?
 
@shortCircuit you will have to dig into Rails source to make sure that it is using prepared statements
 
Are you actually using the API correctly to make prepared statement
 
7:47 PM
@tereško Ah, but I like me some glorified value objects :)
 
I think cspay is right , I just found patshaughnessy.net/2011/10/22/… googling. Rails 4.0.8 is what we use mostly
 
@LeviMorrison You can't bind a static closure.
 
from the first glance, it looks like Ruby does not come with JDBC/PDO type of infrastructure , @shortCircuit
pre prepared statement are implemented on per-package basis : rosettacode.org/wiki/Parametrized_SQL_statement#Ruby
 
@LeviMorrison What do you mean by "statically bound to an object"?
 
@shortCircuit Aaand Rails + MySQL doesn't use prepared statements
Great
 
7:48 PM
@AndreaFaulds That's what Nathan wants (on list)
Unless I totally misunderstand him.
My point is even if you could do it, what does it even mean?
I think it's meaningless.
 
so ... basically: fak rails
 
They claim performance reasons
 
And that it is MySQL's fault?
But other languages can implement it just fine? What a load of crock
 
@LeviMorrison They want it scoped but with no object bound... but what's the point of that? I can't see anyone using ->call in a loop to scope a closure to different classes. In that case you'd just use ->bind, surely, as you wouldn't have a loop.
 
7:50 PM
@cspray lol .. have you actually seen the requirements of a standard Rails app ?
 
the astronomical
 
Rails is full of gems ... I want to eat rice , fine gem 'rice' .
 
@tereško Far more personally than I'd care to
 
7:52 PM
@shortCircuit "gem install rice", and if you want undercooked rice "gem install rice --pre"
 
@DanLugg pfft, you totally just put that in your Gemfile man!
 
I was talking about the Gemfile .. The one we do bundle install ..
 
@rdlowrey :-)
 
Oh. Well, fuck gemfiles.
 
I don't want to install gems. Cooler. . gem install go_away_gems
 
7:55 PM
Gratz @webarto! @weboldfarto
 
Then there is gem install tabletscript @DanLugg XD .. That guy even googled tabletscript ....
 
Fucking hell murica. Idiots
cc @rdlowrey
 
user895378
@PeeHaa Ah I saw that earlier. It's some real BS.
 
8:17 PM
( ͡° ͜ʖ ͡°)‎
 
8:27 PM
 
@Gordon hyeheheheheheh
 
@PeeHaa that's 38 points
 
:D
 
8:43 PM
Good job r/php. We're the best at something!
 
Good on GW Bush doing the ALS challenge
 
user image
4
Jack opens a connection on a "secure ip" :-)
 
@PeeHaa yeah... the IPs are always fucked off in movies/tv shows
 
8:55 PM
:P
 
I'm trying to remember what show it was where they did a 10 address and the tech was confused by it...
 
@crypticツ dunno if you seen it, but yesterday I watched a serie by the name "The leftovers".. seen 2 episodes.. imdb sounded lame but pretty okay..
 
9:14 PM
@PeeHaa You can tell it's secure because it's using 10-bit octets!
 
Maybe that's that magical IPv5? :-)
 
bison is pissing me off
such a crappy piece of software
it can't be so hard to destruct some damn values
 
This guy is the master of all trolls
 
@NikiC What's going wrong?
 
9:30 PM
So this was a thing.
 
@AndreaFaulds I want to have a parse exception
Which means that I need to free values on the bison stack on error
bison has support for that (%destructor), but I haven't yet figured out how that can be used in any sane way
without inserting type annotations everywhere
 
@bwoebi neeeein! :P
 
I'd already be happy if I could say "all non-terminals use this type"
 
@tereško It's Asgard! It has to be good!
 
9:40 PM
@SecondRikudo I'll make a terrible framework called TheBestPHPFramework. Nobody would ever suspect a thing...
 
@AndreaFaulds Yes... my evil plan is working...
 
@PeeHaa It can support arbitrary bases!!
 
:)
 
@SecondRikudo I look forward the the recent mangas in anime form. As much as I like the manga it can't do action scenes well imo
 
9:43 PM
That entire class function wrapper is full of awesome :P
 
@Fabien I just hope it doesn't get ruined
 
yeah, that too
 
Too many battles were ruined by the anime.
Seriously with all the budget they have as the #1 most popular series, they should invest more in the fight scenes.
And I still demand a recreation of the battle against Pain.
The abomination they created there is not acceptable.
 
Well it's not exactly a high quality production.
You hear they're remastering cowboy bebop?
 
I've actually never watched it
 
9:47 PM
Something for you to do this weekend then. :)
 
I've two side projects to continue this weekend.
And that's not including the Go project you still owe me :P
 
lol. I've become seriously busy the last week
 
Not having a job has been the busiest I have been in months
 
@RonniSkansing .........
KILL IT WITH FIRE!
 
9:50 PM
@RonniSkansing holy fuck. That's a huuuuuuuge test
 
they all look like that
 
Oh my goodness
 
I thought sometimes some of my tests looked a little rough
 
Before this guy gets smashed for his FW let's not forget that he's not exactly pushing it on us and try to remain constructive when feeding back to him :P
 
9:52 PM
@Fabien Yea, definitely I get that but whew... sometimes harsh reactions are need to get the point home "Don't ever do that". I can't speak for the rest of the codebase but that test is one of those things you shouldn't ever do
 
@cspray harsh is justifiable if constructive is with it. People do ugly things not because they try to but because they don't know it's ugly.
 
Also I happen to think that you should have a thick skin as a developer. Don't take criticism of your code personally
@Fabien Yea, I get that. But, I've also learned that's just how human beings are about a lot of things (not just programming). I try not to let it bother me.
But, I get your point. And definitely try to be constructive with my criticism
 
@cspray It's this exact reason why our codebase at work continues to suck... at the time when we had the manpower to refactor away enough of the stupid, the lead dev was so emotionally attached to the code that we basically weren't allowed to. He'd gone as far as reverting changesets in the past...
 
harsh is fine with me if constructive didn't work.
 
9:55 PM
@Charles Yeah I had the same thing couple of jobs back
 
but usually if constructive doesn't work shits given goes with it.
 
Sad part was I had to daily work in that crap :(
 
@Charles Sometimes I think being able to let go of code is almost as important as being able to write it ;)
In just the few years I've been doing this professionally I've seen a lot of that
 
@PeeHaa Yup... thankfully we convinced him that we were smart enough and he left of his own free will. And then the economy went to crap and shortly thereafter I was the last dev left. Sigh...
 
Emotional investment in the codebase and what not
 
9:56 PM
Fortunately I don't need a thick skin because I think all my code is shit :P
 
@Charles :(
 
@cspray Exactly. I recently had a project I put my heart and soul into brutally killed by politics. It took a while to let go of, but it's for the best.
 
a simple error is confusing me :(
$kill_count = "INSERT INTO `axe`.`kill_type`
(`e`, `id`, `creature`, `count`)
VALUES (NULL, ':id', ':creature', '1');
";
echo $kill_count;
no output
 
@Charles Yea, at my last job I had a couple projects like that
Part of the reason I call them my "last" job and not my "current" job ;) I can't handle with too much office politics and this place was pretty bad with it
 
@IGotRoot Remove the quotes around your :placeholders, they get quoted automatically.
 
9:57 PM
k
 
@IGotRoot if I copy paste that, it works fine for me..
 
Same
 
lol =]
 
BTW @PeeHaa, there was stuff in the RFC room I couldn't ping you about because you weren't there, you horrible slacker.
 
why wont it output then?
 
9:59 PM
@Charles When was dat?
 

« first day (1404 days earlier)      last day (3537 days later) »