« first day (2045 days earlier)      last day (3129 days later) » 

00:15
@AhmedHillal you probably should find a PHP book
01:23
Hi, I always wondered how you deal with PHP namespace conflicts, e.g. if your project depends on the same library but each time with different version
i.e. you have two dependencies which both require library X but with different, incompatible version
02:06
Is there any way through which I can get mail whenever any error occurred in my application. Of course this mail functionality will be configured somewhere when any error (noticed,warning, fatal) occurred.
you can set a custom error handler and within that handler send an email.
02:55
πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©‌​πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©οΏ½‌​οΏ½πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©‌​πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©οΏ½‌​οΏ½πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©‌​πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©
Ekn
Ekn
morning
Hi! @Sara What happened? o_O
Shit. It happens.
Still looking for a solution to the incompatible dependencies problem btw. :)
So far my idea is to automatically rename namespaces (via composer plugin), but since there is practically no PHP parser available (or no guarantee of one being still available in the long term future), I am stuck implementing this...
03:28
good morning
03:50
@bwoebi Old style habit that PhpStorm helped continue. I don't care either way, so if you prefer I'll stop doing that.
@bwoebi Copy-and-paste oversight from Icicle. I'll fix it.
@Orangepill Morning
@Trowski morning
@kelunik Promise is almost an implementation detail of a development Deferred. Maybe it should be moved/renamed.
04:07
Moin, all!
04:31
'nin
05:03
why does installing VS take so much time?
posted on May 22, 2016

New Cyanide and Happiness Comic

 
2 hours later…
07:22
E_TOO_MUCH_QUIET
07:44
I am facing problem regarding iOS notification
please go through this for getting more details
I have implemented all things via custom server
mornin
nin'
"morning" is a strange word .. Every day is shorter ..!
07:54
wait, what? I am still suffering from caffeine deficiency pngimg.com/upload/small/pepsi_PNG7.png
I mean this:
- morning
- mo'ing
- mo'in
- nin'
I think in the near future it will be just an apostrophe " ' "
it was...
@Trowski What do you use settle for?
Anonymous
'
user924016
08:28
Mornings
@RonniSkansing '
08:41
@RonniSkansing '
Wes
Wes
08:56
buondì
Anyone alive?
;P
user924016
yea
user924016
almost
Lmao
Wes
Wes
what happened to jbafford? disappeared as many
09:10
When people say PHP is dead = Long live databases.
Was talking to a Javascript front end developer who claimed PHP was a dead language. Lmao
@Trowski What's the reason to have all these classes? github.com/amphp/loop/tree/master/lib/Internal
Wes
Wes
also marcio...
@kelunik He loves naming.
What's the benefit of extending Watcher without adding anything?
It's his love for naming. Lmao
09:12
@NikiC With the advent of static, is there any reason to ever use self? Does one resolve quicker than the other?
Wes
Wes
@kelunik marker classes have their uses :B
@QuolonelQuestions quicker? they do two different things...
anyway, depends what you are doing. if you are doing static oriented programming then you'll need both
@Comradeo No, this is probably the reason: github.com/amphp/loop/blob/master/lib/NativeLoop.php#L486-L499
@QuolonelQuestions self can be resolved compile time, but they're different things, right.
Wes
Wes
@kelunik sorry for the late answer... so without starting crusades, hopefully.... quite simply inheritance is a form of tight coupling, and method delegation is a more flexible alternative, just as composition is... to which it is complementary
you said that you don't use delegation much, but i ask you instead, how often do you use inheritance?
the better i get at programming the more i think an instantiable (non-abstract) classes should end there (basically be final) and shouldn't be extended but rather wrapped or be part of aggregates
i have now this rule to choose between extend and decorate: am i going to access protected data? If yes, it means that tight coupling is an actual necessity, otherwise decoration (or better, composition) should be used
They are different, however, there shouldn't really be a use case for self any more. If you don't want to invoke subclassed methods you should mark the class final
Wes
Wes
it's too easy to extend and too hard to decorate. i just want to give decoration equal chances
sorry for poor engrish, just woke up and i can't even focus the screen yet :B
@QuolonelQuestions could be, but i don't use static stuff so i can't tell
09:24
@QuolonelQuestions self::CONSTANT should always be self.
Wes
Wes
do you eat some java kelunik? can you tell why this line exists? grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/…
@Wes No idea.
@QuolonelQuestions Err... imho you should pretty much always use self
static indicates your design sucks
Sounds good
And yes, self may resolve faster -- e.g. we can replace self constants at compile time. Not possible with static
09:40
@NikiC Thanks for the answer :)
@Trowski @bwoebi Can we please not use Yoda notation? github.com/amphp/loop/blob/master/lib/NativeLoop.php#L171
$timeout >= 0 is much more readable, because it fits natural reading flow.
Wes
Wes
ha, yoda notation. didn't know it was called that way. i hate it too
@NikiC How much memory does an additional object reference take?
@kelunik what is an object reference?
@kelunik agree on <=. Yoda is only for === :P
$obj = new XY;
$objects[] = $obj; // <-- that
@NikiC Even then, for consistency, don't.
09:52
@kelunik it costs as much memory as the place where it is stored
In this case an HT bucket
How much is that?
Which is about 32 bytes
(amortized)
if it's the only object in that array it will be a lot more, of course ^^
github.com/amphp/loop/blob/master/lib/NativeLoop.php#L514-L516 < I wonder it a counter is better. But then we need an additional bool field in the watcher struct.
Because we're not interested in the actual unreferenced watchers, just the number of (un)referenced watchers.
But in the end the space will probably not even matter, but more the execution time.
yes
Is count on an array O(1)?
09:57
@kelunik yes
(for all practical purposes)
What's the exception where it's not?
@kelunik count($GLOBALS)
10:13
Guys
I am having trouble with my PHP Code
we all do
LOL
xD
Notice: Undefined index: somename in /homepages/29/d599905820/htdocs/index.php on line 22

Notice: Undefined index: username in /homepages/29/d599905820/htdocs/index.php on line 23

Fatal error: Call to undefined method PDOStatement::bind_param() in /homepages/29/d599905820/htdocs/index.php on line 26
1
A: Fetch mysql data from PHP using radiobutton control

Sanzeeb AryalYour form should be like: <form action="" method = "POST"> <input type="radio" name="someName" value="ip"> IP<br> <input type="radio" name="someName" value="uid"> UID<br> Enter Name: <input type="text" name="name" > <br> <input type="submit" name="submit"> Submit<br> <...

answered since two hours
The guy that wrote the answer is extremely sloppy in his response, I have tried over 32 uploads with different solutions, and nothing is working. Halp?
The answer outputs those two notices and one fatal error
why did you accept the answer when nothing is working?
10:16
Worked once.
Never worked again.
xD
Undefined Indexes are trivial to fix
No idea what I'm doing now.
What do you mean by trivial?
incredibly easy
As in, you need to go through some basic PHP tutorial
^^^ Any recommendations?
10:17
and the fatal error is directly connected to the undefined indexes
I fixed one undefined index, and then it just kept goinngggg with the bindparam error
your root cause is that you are not sending somename and username in your post request
So I would move the post requests below if submit {
?
no. think about it for a second. look at your form and then check what your script does
Hm.. Textfield is named as 'userName'
10:21
undefined index means you are trying to get something out of an array that does not exist in the array.
Yes.. So it's 'undefined' because it's missing, it can't identify it, right?
put a var_dump($_POST); in your code to find out what gets submitted to your script
compare whats in the $_POST array with what you are trying to access. userName is not username
Trying that now
am afk now. laters.
I am no longer getting the notices
I am still getting the fatal error
Fatal error: Call to undefined method PDOStatement::bind_param() in /homepages/29/d599905820/htdocs/index.php on line 25
Wes
Wes
10:28
user image
10
@kelunik I disagree that it's harder to read but fine
@bwoebi I read it as $timeout <= 0 first.
okay…
0
Q: Fatal Error: PDO Statement Undefined Method & Undefined index?

ComradeoI have tried over 32 uploaded solutions, and nothing seems to be right -- Can anyone assist me? I am getting undefined indexes, and when I solve those issues, I keep getting the fatal error listed below. No idea what I am doing wrong. ?_? Can someone enlighten me? Errors Notice: Undefined index...

Help?_? :c
nothinggg is working T_T
10:38
@Wes how did you actually do it?
10:53
Mornrbd
@PeeHaa '
Wes
Wes
@Saitama ? i didn't, it's taken from twitter
Wes
Wes
wat
@FΓ©lixGagnon-Grenier '
that's... minimalistic :p
3 hours ago, by Shafizadeh
I mean this:
- morning
- mo'ing
- mo'in
- nin'
I think in the near future it will be just an apostrophe " ' "
11:19
@kelunik ugh, not again
Hey guys, any people with good android knowledge in here?
@bwoebi You can see it as a single hand doing a ^5.
Which version of the trunk do you prefer as a logo for @asyncphp? http://i.imgur.com/xCuIT8o.png
^ 8 hours to go, please RT if you haven't done so already.
I still think that both are a bit... evil
@SamIbraheem In some very specific areas, yes. Depends what you want really, if you are looking for help with some actual Android app code this is probably the wrong place...
Wes
Wes
yeah, RT please
@DaveRandom do you know any android chat rooms that are open? They all require nominating or high rep points
11:26
Does undo + RT again help? I can't test, it's my tweet. ^^
Wes
Wes
@kelunik nope, won't work
you can quote it though "RT previous_tweet_link"
Good guy @Jeeves.
@SamIbraheem no, I've not really spent a lot of time in Android communities, so I'm not sure
@Jeeves u drunk again?
5234642 (2017-01-27 13:17:36)
Ugh, need to resolve those to usernames
yay, that's not me. well, I guess someone rolled back the be a smart ass part
!!admin list
11:35
Danack, DaveRandom, Florian Margaine, Félix Gagnon-Grenier, Gordon, Jeeves, Jimbo, Joe Watkins, Levi Morrison, NikiC, PeeHaa, Ronni Skansing, Wes, bwoebi, ircmaxell, kelunik, rdlowrey, salathe, tereΕ‘ko
wait, wtf is going on with that usort result?
What happens if I remove @Jeeves from the admin list?
!!admin remove 5764893
@DaveRandom User is a room owner and has implicit admin rights.
Nothing
11:36
^ that
Jeeves doesn't ask for admin commands anyway
automatic chat bans... what could possibly go wrong?
Actually we should probably filter that out of the display, it's kind of confusing for the bot to have admin for itself
@FΓ©lixGagnon-Grenier Automatic?
in my dreams, yeah
11:38
@DaveRandom Probably
JS had that for a while where they put the room into gallery mode and had Caprica managing access lists... not sure if they still do that? @FlorianMargaine
(seems like a not-good idea for this room to me)
@DaveRandom AFAIK yeah. It's read only by default and cap grants auto access on enter
(I actually agree that it's not so good of an idea)
@DaveRandom looks like binary sort
11:39
can someone please tell me, how does php work ?
@bwoebi It's usort() with <=> on the strings
yeah, that's binary
Yes, you need strtolower.
Ahh right
yip
11:40
or just strcasecmp
$list = implode(", ", array_map(function($expiration, $userId) {
    return sprintf("%s (%s)", $userId, $expiration);
}, $bans, array_keys($bans)));
@DaveRandom true
nobody likes <=>
@Jeeves only funny because of who said it ^^
Would be good if we could do via but resolving Twitter handles from SO profiles only works when people set their Twitter handles, which most people don't
5/6 people above have it in their profile
11:45
happy to please @PeeHaa
But fwiw I don't think I like my own drunken tweets always attached to me :P
It's kinda nice at times to have an elephpant scapegoat
I was gonna add ChatClient#getMainSiteUser() but I ran out of patience with HTML processing
@NikiC Well, the sad truth is that nobody knows it…
12:01
o/
OK @PeeHaa Jeeves should now cancel all stars against the previous unpin message, + I undid some horrible hacks that I did to get it working in the first place
@DaveRandom do you enjoy working with Amp? :-)
Yes and no... I like working with Amp for what it is, I wish that PHP as a language had some better built-in primitives
I have to go bake a cake (seriously) be back in half an hour or so
happy baking.
!!rfcs
@kelunik how hard/easy is it to proxy :80 to a aerys backend on apache?
@PeeHaa Very easy. ProxyPass and ProxyPassReverse + mod_proxy + mod_proxy_http.
@PeeHaa But who uses Apache anyway? :P
12:25
@kelunik Not me is who :P
I'm writing something that needs to be a bit platform independant
How is Apache more platform independent than Nginx? ^^
Wes
Wes
dammit
It's two webservers suported instead of 1?
:)
@PeeHaa use this: 2ton.com.au/rwasa
@Saitama No thanks. I'm going to pass on something I have never seen before
12:28
> rwasa is our full-featured, high performance, scalable web server designed to compete with the likes of nginx. It has been built from the ground-up with no externel library dependencies entirely in x86_64 assembly language, and is the result of many years' experience with high volume web environments.
:D
@kelunik uhm, there was 500 in commitbot while logging in with github
[12:33:08] debug GET /clientaccesspolicy.xml HTTP/1.1 @ ::ffff:127.0.0.1:54423
[12:33:09] debug GET /contribute.json HTTP/1.1 @ ::ffff:127.0.0.1:54423
[12:33:09] debug GET /crossdomain.xml HTTP/1.1 @ ::ffff:127.0.0.1:54423
[12:33:09] debug GET /robots.txt HTTP/1.1 @ ::ffff:127.0.0.1:54423
hey guys. morning
quick question. How do I import data into my postgresql docker container. Can't seem to find any instructions.
afk... brb..
12:34
^ What's contribute.json?
...?
@Saitama Yes, a known amphp/mysql bug.
[12:31:43] error Amp\Mysql\QueryException: Connection went away... unable to fulfil this deferred ... It's unknown whether the query was executed...
^ @bwoebi Did you already fix it?
@kelunik inb4 @DaveRandom bitching about it being fulfill
;-)
!!blame @bwoebi
Neh it's actually correct english
Was just trolling dave
12:38
British English is correct English? :P
hehehe noope
twitter.com/MSFT_Business < Stop following me, Micro$oft.
@kelunik hehe
Wes
Wes
13:02
@Sara was reading the pipe op discussion. some arguments don't make sense to me, some show legitimate concerns, but in general it seems people enjoy the proposal. what do you think?
for instance i don't get those that say foo(bar(baz())) is natural language. it is just not... it's a math's style that was inherited by programming languages. baz() |> bar($) |> foo($) is way more understandable
@bwoebi I think we should have some responder that can be tried on error instead of directly using github.com/amphp/aerys/blob/master/lib/Server.php#L892-L913
@kelunik I agree, I'm just not sure whether to have it global or also allow e.g. per route
I tend to think it should be one single global responder (per host)
but that's probably too restrictive
Yes, I think one per Host is fine.
@kelunik you rather want one per app, not per host
It's typically the same.
13:07
Often yes, but doesn't have to (e.g. when you only have one entry in the DNS zone for the whole server)
We should care about the 99% case.
If you only have one entry, you mostly have just one app.
@PeeHaa That's not what I would complain about there... "connection went away" is probably the most common error I've hit when working with MySQL
MySQL should really go outside and play a game of hide and go fuck yourself
@DaveRandom stupid mysql only allows up to 150 normal connections by default… :-/
The whole thing is shit, really. It's a sad state of affairs when I think "great, I get to work with SQL server for a while"
Should start a MySQL sadness blog, but I don't think it's a good use of my time
13:43
@bwoebi @kelunik I'm still working on cleaning up awaitables.
Didn't have time to finish yesterday.
Also, somehow getHandle() was added as a static method to LoopDriver.
!!blame @bwoebi
#fail
@Trowski fixed and oops
too much copy&paste
Need more feedback from others
I wanted to know your opinion.
13:57
I've already said that I like the proposal?
I've said "I think I can get on board with this one." and put a +1 on the initial post…
> There is the same problem with $cbData though. Which needs to be at the end being optional.
That's a +0 for me.
@kelunik Sorry, I confused line notes there, ignore my last comment.
Going to get a cup of coffee and think again.
> Though you may argue here that you typically don't use $cbData alongside with Closure, but rather use use () construct with Closures.
^ thus this isn't a problem @kelunik
If I wanted to add a div around each array, how would I do so?
$arr = array();
foreach($data->data->InventoryItems as $value){
    $arr[] = $value->Name;
}
echo implode(", ", $arr);
14:18
@Wes I looked at the thing you sent me. It's certainly clever....but it's not obvious to me the problem is that it's meant to be solving...
Gah, I feel like I'm writing C code in PHP … I've now seriously added a delRef() function into my code -.-
Wes
Wes
@Danack well, for instance, you don't need to hardcode method names a strings [$obj, 'foo'] but rather do $obj->foo
yeah....but the IDE doesn't understand it....so that doesn't make life easier by making it so you can refactor code more easily.
@Danack and PSR-7 is focussed on the PHP web SAPI… no way to have e.g. incremental POST fields … only possible for uploads (for example).
Wes
Wes
@Danack it does if you add @property $foo callable
14:24
@bwoebi I regret tweeting already. For the record - I think all of these discussions around middleware where people are passing around a 'Response' object and acting as if that is a sane thing to do, are fundamentally nuts, and I don't want to get their taint on me.
@Wes ah I missed that...
14:35
$ php -r 'for ($row = 0; $row < 24; $row++) { for ($col = 0; $col < 80; $col += 2) { echo "β–€β–„"; } echo "\n"; }'
Wes
Wes
!!eval for ($row = 0; $row < 24; $row++) { for ($col = 0; $col < 80; $col += 2) { echo "β–€β–„"; } echo "\n"; }
[ 5.5.0 - 5.6.21, 7.0.0 - 7.0.6 ] Parse error: syntax error, unexpected end of file, expecting ')' in /in/91cjW on line 1 <br/><i>Process exited with code <b title="Generic Error">255</b>.</i>
[ hhvm-3.9.1 - 3.12.0 ] Fatal error: syntax error, unexpected $end, expecting ')' in /in/91cjW on line 1 <br/><i>Process exited with code <b title="Generic Error">255</b>.</i>
Wes
Wes
wut
wut
I'm guessing that's some kind of HTML parsing fail
14:39
ooh, looks like the < broke it
!!> var_dump(1 < 2)
[ 7.0.0 - 7.0.6 ] Parse error: syntax error, unexpected ';', expecting ',' or ')' in /in/AQ72H on line 1 <br/><i>Process exited with code <b title="Generic Error">255</b>.</i>
[ hhvm-3.9.1 - 3.12.0 ] Fatal error: syntax error, unexpected ';', expecting ')' in /in/AQ72H on line 1 <br/><i>Process exited with code <b title="Generic Error">255</b>.</i>
[ 5.5.0 - 5.6.21 ] Parse error: syntax error, unexpected ';' in /in/AQ72H on line 1 <br/><i>Process exited with code <b title="Generic Error">255</b>.</i>
@DaveRandom It translates to &gt; which is what's breaking it
&gt can be seen as "bitwise and constant named gt"
But the ; inside of var_dump kills it
flies away
14:42
It's a libxml fail, unsurprisingly
Oh, effectively double HTML entity decode actually
@PeeHaa ^
i.e. something like
[...] result 1
[...] result 2
[...] result 3
@MadaraUchiha it does, it only posts multi messages for things with multi outputs
!!> echo 'foo'
@Danack Heh, yea…
@DaveRandom Yeah, I mean things with multi outputs
14:52
@MadaraUchiha Problem is retarded multi-line MD rendering
@DaveRandom Fair
History cleanup, sorry
!!google foo
Search for "foo" (https://www.google.com/search?q=foo&lr=lang_en)
β€’ Foobar - Wikipedia, the free encyclopedia - The terms foobar or foo and others are used as placeholder names in computer programming or comput… (https://en.wikipedia.org/wiki/Foobar)
β€’ Urban Dictionary: foo - foo. An term used for unimportant variables in programming when the programmer is too lazy to thin… (http://nl.urbandictionary.com/define.php?term=foo)
β€’ Foo Fighters - Facebook - (https://www.facebook.com/foofighters/)
Hmm
@DaveRandom how do you do Google search? IIRC their API was discontinued recently
14:57
HTML scrape
It's not super-reliable but it's good enough
It just scrapes the URL linked at the top
And Google aren't detecting it's an automatic scrape and blocking you?
@DaveRandom Isn't that going to fail for multiiline messages?

« first day (2045 days earlier)      last day (3129 days later) »