« first day (2271 days earlier)      last day (2903 days later) » 

00:08
I can see it's point.
 
1 hour later…
01:31
hi all. happy new year!
Obvious joke is obvious:
So, prediction for me tomorrow morning, and everyone else who had the whole of Xmas week off. https://t.co/N67DYAhG0s
@Danack is that avatar a photo of you run through the Google deep dream?
retweeted your php5 to 7 thing
Not deep dream. There's a plugin or website that does cool photo sampling. Someone else made it for me....I can't remember the name right now.
@Wes you still around?
nice
 
1 hour later…
02:50
is there ever a good reason to have a second 'vendor' folder inside of the 'public' folder??
I'm looking at this project someone else built, and that popped out as really weird. Wanna make sure my feeling is just, and I'm not just inexperienced
03:37
@bwoebi If you don't trust people using your API to make sensible type declaration choices, that's… uh, concerning. Especially since if they choose the wrong types and you're using “weak” mode, PHP will mangle the data you're passing back. That being said… you can choose to call a callback with weak typing if you really want to.
@LeviMorrison I didn't downplay it so much as be quiet about it. I don't feel great about that. Unfortunately for me, the “solution” to this issue (callable type signature enforcement) was later rejected.
@bwoebi @LeviMorrison One thing we could do is add a built-in function for making weakly-typed calls to callables. But it's trivial to do yourself, and I'm not sure it's a good idea to use weak typing here anyway.
<?php
function call_user_func_weak(callable $function, ...$args) {
    return call_user_func($function, ...$args);
}
04:14
Belated Happy New Year r11!!!
04:31
@Andrea Users with weak types may declare a type expecting a cast, so having strict types enabled in the file invoking the callback imposes strict semantics no matter how the application is written.
That goes against the philosophy of having a by-file selectable mode.
 
2 hours later…
06:30
posted on January 03, 2017

New Cyanide and Happiness Comic

06:53
http://stackoverflow.com/questions/41296520/stream-third-party-audio-through-function-in-php-laravel

Anyone can help me for this ?
 
1 hour later…
07:56
gm o/
Anonymous
08:21
SO thinks I'm popular i.sstatic.net/R3mxC.png
Anonymous
moin
moin
08:51
moin
morning everyone
I'm a little late, but I'd like to wish everyone all the best for the new year :)
btw everyone should go watch Moana
Anonymous
Frozen without the snow?
And with a POC! (very important, more than the plot apparently)
\o Moin 11
Hope you had happy bug free holidays
09:05
I had!
Mostly because I wasn't working
Anonymous
!!wotd
murmuration: a flock of starlings.
09:25
I would like to remove all values from an array that "don't have" a key.
EG: ['key' => 'value', 0 => 'value'] becomes ['key' => 'value']
@MattCowley key?
@PeeHaa associative array
Why?
XY problem...
1010
Q: What is the XY problem?

GnomeWhat is the XY problem? When asking questions, how do I recognize when I'm falling into it? How do I avoid it? Return to FAQ index

@PeeHaa sql returns keyed and non-keyed values in the same array, i would like to clean it before outputting it
Are yo using PDO by any chance?
09:28
@PeeHaa Yeah
@PeeHaa Sorry if its a stupid question.
@PeeHaa Oh it was my birthday on NYE :P
@MattCowley It's not so much a stupid question as it is the wrong one
Hence I said XY problem
What you need to do is set the fetch mode
fucking hell who made that thing
@PeeHaa Ah, found it. I was looking at the fetchall docs
its under the fetch docs
I need to use the assoc flag
56
Q: Is is possible to set a default PDO fetch mode?

MattBefore I retrieve data I always have to type: $STH->setFetchMode(PDO::FETCH_OBJ); In the interest of making my code more readable it would be great if I could set a default mode somewhere.... Thanks! Edit. I was originally hoping I could add PDO:FETCH_OBJ to the setAttribute code I run when ...

@MattCowley Yeah :)
4 messages moved to bin
@Sean Bit late sorry, but happy birthday!
3
:)
Have a late pin
@PeeHaa The modes are a bit confusing, is there one for compiling all results into a single dimension array if i'm only selecting one column?
09:32
Shucks, thank ye! :)
Happy birthday @Sean
Happy bday @Sean, hope you'll have a great year!
@MattCowley In that case you want to use fetchColumn() I guess
Anonymous
hide your code
Anonymous
@Ocramius moin o/
Anonymous
09:33
@Sean Happy late birthday dude!
@kelunik next is InfiniteObserver (returning Promise resolving to the future value), advance() is FiniteObserver (returning Promise<bool> (validity check))
Thanks everyone ^^ Had a blast of a time.
I hope you had a SOAPy birthday!
@bwoebi I think I prefer less API with a potentially unnecessary function call then. (both in one interface)
morning
09:43
monrnin
morings @Ocramius
tresko o/
phaa
@kelunik The Promise has different types … I wouldn't cram Promises with different types in the same thing
hello everyone
anyone knows some bootstrap theme with a lots of pages...
morning all! back from the holidays.. :)
Wes
Wes
09:49
mornings
mornings people who just arrived
Morning indeed
morning
Happy Birthday @ThW!!
11
Also, where is he on twitter I can't find him
Also,
Also, @DaveRandom I'm only in Manchester for PHPNW tonight mate. Better pull your finger out! ;-)
Also, also.
@ThomasWeinert, Cologne, Germany
441 tweets, 339 followers, following 126 users
09:55
Happy birthday @ThW!
@Jimbo I'm working on it.
Happy birthday @ThW!
@Ekin I don't hate your code. Only really uglyness is the resultparser imo
Other than that: not too shabby
> Chris, we care about you and your Facebook memories. We thought that you'd like to look back on this post from 28 years ago.
wat
How do you know today is @ThW's birthday?
09:58
Memory, I guess?
@DaveRandom Lol
@littlepootis if so, his memory is adorable
Yeah I agree that one as well really sucks @PeeHaa, need to review it again
Wes
Wes
happy birthday @Sean @ThW @Jesus :P
10:01
o/
@JoeWatkins hey I saw your doppelganger yesterday at the swimming pool
@Trucy and you let him get away ??
next time, kill it ...
It would also be an easy kill
"oh no, he's drowned"
LOL
10:08
Amazing
ha
@Trucy missed opportunity ... also, it may be dangerous ...
@JoeWatkins but then, I didn't know it was your DP, maybe it was you, enjoying a swim in the french countryside
@Trucy right ... so we need some sort of secret hand shake ... ready to accept proposals ...
I could shout "well sure PHP is a terrible and flawed language"
10:15
no
If he's not running after me to kill me, then he's not you
oh, I'm fully aware of how terrible it is ... I choose to ignore it ... like when you have a child that is a bit crappy, you just put up with the disappointment ...
@Trucy php is the best programing
PHP is best programming language
I'm pretty sure everyone here would disagree with you on that
10:18
PHP is the best programming language for keeping me employed without having to learn anything new... maybe
6
Wes
Wes
lol
Anonymous
@Wes lol
@JoeWatkins Nope.
(I don't intend to reply again, because no time to waste on that shit)
If he cared enough, he'd push for it
Wes
Wes
10:19
@JayIsTooCommon liked the buggies :B
Also, there are other tools to achieve what he wants.
@Leigh if you say something inflammatory, do it with conviction
Anonymous
@Wes it was great, not exactly hilarious but entertaining at least
Wes
Wes
@JayIsTooCommon the most important thing to me is that they are on the right track
Anonymous
indeed, season 2 will be a beast
10:21
Hey guys, I saw this operator in PHP code: "?:" What is it called and what does it do?
@Leigh yeah I don't at all agree that this is our problem whatever .... "I've set up a server or service poorly, and created security concerns" is a nonsense argument for changes ...
Wes
Wes
they just need to improvise more i think
@HassanAlthaf $foo = $bar ?: $baz; $foo is $bar if $bar evaluates to true, otherwise it's $baz
Something like $foo = $bar ? $bar : $foo?
Wes
Wes
yes, it's the short-er version of that
I see.
Thanks a lot.
return Auth::user()->notifications()->where('viewed', '=', '0')->update(['viewed' => 1]) ?: 'Success';
So I guess, my usecase here is wrong.
10:24
Ew, chaining
Anonymous
^
I like chaining though.
And ew ternary, but I didn't read that far before I ewd
there is no part of that statement I like
10:25
Helps me have thin controllers.
:)
I don't like to have messy transaction scripts.
Because that's what's important
Screw readability, screw flow control, less lines of code \o/
Anonymous
readability > thin
dude
not funny
Anonymous
no need
wow.
10:26
I just love chaining, very easy to read and understand.
Everyone has different opinions I understand, but that's just me.
@HassanAlthaf You might want to refrain using that kind of remarks here and in life in general
What happens if the result of where() is no results? Do you run the update anyway?
Wes
Wes
I don't see how ->where('viewed', '=', '0') is better than writing the sql equivalent WHERE viewed = 0
I can write
->WhereViewed(0)
*->whereViewed(0)
Plus, I will have to run SQL APIs.
Results into more lines.
+ More development time.
Anonymous
lol
Wes
Wes
10:28
just overhead, for very little "improvement"
Imagine how much more development time you'd have if you weren't here defending method chaining :)
@HassanAlthaf authentication should be inside the controller to begin with
Ifkr
It is a controller.
An API link will call that method.
*API route
Please don't flag stupid shit. It triggers my autism
8
Anonymous
@HassanAlthaf less lines of code shouldn't be your priority
Anonymous
10:29
@PeeHaa hahahahaha
@JayIsTooCommon Of course it isn't, but chaining looks more cleaner to me.
*When you point a finger, three fingers point back at you."
@HassanAlthaf Chaining because of chaning is backwards
@HassanAlthaf "looks cleaner". But when you reach that line using a debugger, step into becomes an exciting unknown.
who was the easily offended twat, that had to flag it?
10:30
I didn't flag it, but it was and is offensive
and rude, and stupid, and untrue
@JoeWatkins That was in no means offensive.
I'm sorry if it was to you.
@HassanAlthaf I wasn't arguing about it ... it was offensive, not debatable ...
Wes
Wes
was peehaa flagged?
I did flag it, don't know what the flagging policy is here
(didn't flag because it contained the word "autism", but because of the context too)
Don't worry about them others, if you find it offensive, you go ahead and flag it :)
10:32
yeah @PeeHaa is just lazy ...
autism
ˈɔːtɪz(ə)m/Submit
noun
a mental condition, present from early childhood, characterized by great difficulty in communicating and forming relationships with other people and in using language and abstract concepts.
difficulty in 'using language'
I'm not having this fucking conversation, watch the way you talk
@Trucy It is acceptable to flag something that uses static methods and/or chaining.
6
(but that's an other discussion, if you want to discuss it with me, I'll be happy to do it in private (but in 2 hours, lunch time is soon))
@JoeWatkins Chill.
@Danack Haha lol
@Trucy well, he wont be able to dicuss anything with ANYONE for the next hour
Trucy It is acceptable to flag something that uses static methods and/or chaining.
Anonymous
@HassanAlthaf Are you joking or is your intelligence that low?
@JayIsTooCommon Idk
why is it always some newly joined fuck, who thinks that flagging one of the discussing parties is acceptable
ESPECIALLY WHEN YOU ARE NOT ONE OF THE DISCUSSING PARTIES
Wes
Wes
10:35
i have used chaining. it's not bad if you use CQS :B though, i would prefer if php had a way to do it natively, something like javascript's with()
$foo&>setStuff($stuff)&>setBaz($baz)&>setBar($bar);
@tereško Who
nevermind
Btw guys, chill, I'm doing this for RAD. Client's budget is low.. It's not me who is responsible. :D
13 mins ago, by Hassan Althaf
return Auth::user()->notifications()->where('viewed', '=', '0')->update(['viewed' => 1]) ?: 'Success';
this is bad because of 4 reasons
Pretty darn sharp.
10:38
try listening to what he has to say without being a smart ass
patience gone ... fucking clown
1 message moved to Trash
Looks like I was too carried away.
1. use of globally scoped code
2. chaining (a type of chaining where the return type changes)
3. authentication code which burried deep in the codebase ... controller most likely
4. use of ORM
@HassanAlthaf here would be the reasons
Oh, what would be a better replacement for an ORM?
Traditional SQL Scripts?
use of data mappers usually helps
@tereško So, I'd do something like that and abstract the Eloquent ORM?
(for the timebeing)
@tereško Have you 1 free hour per day to join me on a project?
Yeah, but the Mapper would be having
a Datasource, obviously.
Would I write traditional PDO?
@HassanAlthaf that ORM actually is another shitty ActiveRecord implementation
Or is ORM bad there too.
@te
I think you dont understand what ORM is
10:45
I do.
A table record is mapped into an object.
and vice versa
I believe table gateways is what we should use instead of ActiveRecord? (I read PEAA ages ago, starting to forget)
it is one alternative if you just need data, otherwise repositories/mapper
@tereško I just wondered, is there only CUD on the mapper because of CQRS and repositories are for R?
@HassanAlthaf as far as I know, ORM means "writing SQL codes based on a standard which makes those SQL codes usable for multiple kind of databases (MySQL, SQLServer, SQLite etc ..)"
@Patrick I have not played enough with CQRS to be qualified to answer that. The "R" part is a bit tricky, because that's where a lot of people want to also add factory logic
@Shafizadeh nope. That's not it.
anyone who knows zend framework 2?
@tereško ok, and you don't have 1 hour in day for working on my project, do you?
10:51
@Shafizadeh emm ... not really. When I get home from work, I am pretty much all spent. I can do some code-reviews for you, but that would be all.
@ShailParas yea
... that reminds me: I need to get my ass to the office
@HassanAlthaf you can write plain old PDO, or use something like doctrine DBAL (my preference)
you could also use doctrine ORM as long as you abstract it away behind interfaces
I got a blogpost in the pipeline about that but it needs a little rewriting before I can publish it
@Ocramius - I am getting some issue.. can you please take a look at it - stackoverflow.com/questions/41440610/…
@tereško Ah, I see, thx
10:57
@PeeHaa don't worry, tay is already blocked
@ShailParas you already got an answer there
simply check the interface
also, I suggest getting a good IDE - saves you tons of headaches
@Ocramius but I've been told that real developpers use vim/emacs/ed
real developers use butterflies
@Trucy yeah, they also need a good reviewer that loads the code into an IDE afterwards :P
... I guess you have never head about "no true Scotsman" fallacy
Two English questions:
1) Does "all spent" mean "exhausted" ?
2) What's the meaning of "get my ass to somewhere" ?
11:00
I generally see when the code was edited with a textual editor without intellisense. If you got VIM with an autocomplete/intellisense then you may sometimes escape my eye ;-)
Anonymous
@Shafizadeh 1) yes 2) To go somewhere (I need to get my ass to @PeeHaa's mum == I need to go to @PeeHaa's mum)
@JayIsTooCommon I thought you'd already moved in that place ;)
Ah .. :D
@Ocramius I don't get developpers who only use plain editors. Sure it does some job, but an IDE will make your life easier
Anonymous
@Naruto :D
11:04
Anyhow, lunch time
(true developpers will drink soylent of course)
@Trucy I work with a few, and they simply get a kick in the teeth at every review
it's as simple as that ;-)
@Trucy I love good text editors
Much less which gets in the way
The only reason I use an IDE is because PHPStorm which is not that bad
@PeeHaa Have you tried sublime so far?
Yes. I love sublime
"because PHPStorm" doesn't sound like reasoning ...
11:09
good :-)
or is it ... because PHP ...
Guys I'm new to PHP, I just need to capture a value in the input box, and store it in the PHP variable which should be only one time setup. I know to use $_POST, I just need how to store it as persistent global variable. can someone help me?
@JoeWatkins :P
@Sundararajan Sounds like some config value to me
yes exactly
Write it to a config.php file :)
11:10
one time configuration
@Sundararajan $_POST is already a global variable
but it should be accessible even when we close and reopen the application
persistent and variable ... opposite meaning
@AdilIlhan It's not :)
immutable and variable would be :)
oh Thanks for clearing me :)
11:12
i'm talking based on pure php.
2 mins ago, by PeeHaa
Write it to a config.php file :)
persistent variable ^
@PeeHaa Thanks
poop
@PeeHaa Thanks
Basically you can store it however you want in whatever storage you want
11:14
will try that out and let you know :)
@AdilIlhan Thanks
or serialize the object and write to a file ;) @PeeHaa
/kick adil
it would be real persistent
:D
You don't get more persistent as a rootkit
11:18
BTW @AdilIlhan I don't see you that often anymore in here
Been busy?
yes.. dealing with a lot of stuff at same time in these days
thanks to god, you didn't forget me! :)
lol
hehehehe
My application needs two inputs to work,
1. Host, 2.Port
So I just made a form with two input boxes.
This setup should be one time and it should not erase until overwrite it
This is what my requirement is...
use a database
Isn't any other way to do it without db in php (Just to know)
11:23
@Sundararajan Sqlite does not need a database server. Depending on your requirements, you may be able to save it on client side with JavaScript WebStorage.
@NikiC thanks for checking up on me :)
You can also store it in a text file on server side. Many ways to do that, cost only a few lines.
@Sheepy Thanks a lot will try them out, I'm just a learner so would try all the ways you guys suggested.. Thanks a lot :)
17 mins ago, by PeeHaa
2 mins ago, by PeeHaa
Write it to a config.php file :)
@MadaraUchiha I guess I'm late: check bounty status on stackoverflow.com/questions/41411367/…;‌​tom-sessionhandlerinterface-implementation
@PeeHaa I guess I'm late: possible mem leak
@Ekin I guess I'm late: foo?!
11:31
What the deuce
o.O
There is something really broken in there @Ekin @bwoebi
I set two reminders one for 23:59 which is above and one for 23:59:59 which came on the right date
Also, I hate funerals.
Anonymous
@PeeHaa there's a plugin for that
@Ekin I don't think you're supposed to enjoy them ...
11:34
True...
lol @JayIsTooCommon
ah that explains some of it
Anonymous
lol
Anonymous
hides
clean up your own mess ...
11:38
!!undo please
Else I want the same privilege :P
Anonymous
9 messages moved to Trash
Anonymous
@JoeWatkins thanks :P
Anonymous
@Ekin I started that! I will try to finish :P
When I open a project in PhpStorm can I have it automatically run a terminal command? I want it to start the PHP built-in server for that project on project opening.
neo
neo
i am back with my oop doubts :D
@tereško
11:40
lol
Any way around to make "true" rather "1"?

whereBool('Job', '=', true)
dd($property. $operator . $constraint); // job=1
neo
neo
i have a different doubt,is url what determines direction of dataflow ?
or what can all be the factors that determine dataflow ?
@Ekin you really do have to clean up your own mess now ...
also, nobody else should ask ... that's enough for now ... we lost a couple of room owners that were regulars anyway ...
Thanks :-)
11:46
@Shafizadeh adorable indeed
Anonymous
@PeeHaa @Ekin You guys found any alternative to rust or are you still playing it?
I super like bits of that ...
@Jay haven't started a new one after the last wipe
Anonymous
Yeah the wipes is what puts me off, especially xp wipes. Trying to find a good alternative
Let me know if you find one

« first day (2271 days earlier)      last day (2903 days later) »