« first day (2181 days earlier)      last day (2764 days later) » 

11:01 AM
hi
I have to find two number matching from two strings
anybody have good idea
 
user6619012
hi all, please review this code and give me your feedback : codereview.stackexchange.com/questions/143285/…
 
Hello,
I am getting an error - The total number of locks exceeds the lock table size
I did google and got suggestion to increase a size of innodb_buffer_pool_size
I tried but still not working for me
Anybody can help to sort out things as soon as possible
 
use quicksort
 
11:17 AM
@JoeWatkins It'll eliminate all the php core devs from this planet… run!
 
@bwoebi interesting what is your interpretation of netbeans then, lol
 
@bwoebi he doesn't live on this planet anyways
 
37
Q: The total number of locks exceeds the lock table size

maxman92I'm running a report in MySQL. One of the queries involves inserting a large amount of rows into a temp table. When I try to run it, I get this error: Error code 1206: The number of locks exceeds the lock table size. The queries in question are: create temporary table SkusBought( customerNum i...

 
@bwoebi /me runs
 
11:33 AM
 
@Gordon that's the best thing I have ever seen
anecdotes are fun ... while driving in and out of Manchester the other day, there is a bridge over the motorway, and it has grafitti of terrible quality that reads "voted pies" ... it would be hilarious if the people of Manchester were rebelling because upon being asked the question "Should the UK stay in the EU?" they were annoyed that the answer "pies" was not available to them ...
sadly, "the pies" are a local band ...
I think it said something about pies last time I saw the same bridge, and really did think it was just the result of a local obsession with pies ...
(which is absolutely real, and not just in my head)
 
.oO( C devs. Told ya! )
 
So.....at PHPNW and in other places I've had various conversations that have ended with people thinking "Wouldn't it be great if we could typedef new types instead of having to use classes for everything". I've written up a brief description of a variety of things typedef could be used for: gist.github.com/Danack/9e46dd0e7a31367d6dddbd92ba18eeab
 
> Array types aka very simple generics.
sounds like arrayof
they super hated that
 
Only the implementation, I think.
 
11:45 AM
sure, but good luck finding an acceptable way that deals with all caveats ...
 
Yep. Going to be tricky.
 
the same things stop everything like this from being simple, references, copy semantics, just how the vm actually works ...
 
public function getCategory( $request ) {
$category = $request->getParameter('category');

// ... rest of your controller method's code
}
 
some of it feels like stuff that has been tried pretty recently ...
I don't dislike it ... but maybe try to present it better, I dunno ...
 
@tereško what is $request here
 
11:47 AM
@beginner we have no idea what you are talking about ... we could only guess ... be more precise ;)
 
Also true, but if they failed due to the limitations of the engine, then it would be good to have a full list of stuff we could have, if we decided to change the engine for PHP8.
Rather than people keep head-butting the same wall piecemeal.
 
organizing folk is hard
 
@beginner an argument to the getCategory method
 
this is answer , can you expalin according to this
down in 1st answer
 
@tereško you confused the guy up there.
 
11:51 AM
@Gordon He explains in too much depth , anybody can get confused
 
it's not that they make anything impossible, but they tend to make really quite simple ideas very bloated, and then the patch is of the kind of complexity you and others start to worry about ...
 
may be true
 
if we could just pass an rfc that removed references, because they are utterly pointless, and PHP.NEXT will be smart enough to know, or decide for you whatever ...
this would simplify many things
I still see $object =& new thing;
wtf that means, I dunno ...
 
Would making some types of references not be writeable be enough? Also, ugh that code.
 
I think actually just deprecated ... but it shows how confused people are about references and what they were meant for ...
I don't have an idea of how that might work in my head, so can't say
 
user6619012
 
nah
 
heya
 
heyo @PeeHaa
 
yohaa
 
Anonymous
hoi pieter
 
12:06 PM
> Questions must involve real code that you own or maintain. Pseudocode, hypothetical code, or stub code should be replaced by a concrete implementation. Questions seeking an explanation of someone else's code are also off-topic.
 
user6619012
thats not complete replica of online code, i just take that as inspiration and added lot of codes on my own , if you can review that and give the feedback, that will be great.....
 
that code is mostly taken from subinsb.com/the-francium-project
and no, I will not review that
 
user6619012
okay, thanks for you support......
 
@user5348fh8y5 how many people are on your team?
 
guys where can i read about how current zend engine works ?
 
12:11 PM
/Zend
niki has some blog posts, julien has some blog posts ... some of @NikiC's are out of date iirc ... in the end /Zend is the only real answer to that ...
 
@Danack I like typedef as an alias. As in, typedef pid = int;, or typedef Returner = callable(). These are beautiful.
 
@kirugan there is not much useful readings besides going into the code. try wiki.php.net/internals and phpinternalsbook.com
 
I don't like typedef to be more than just a compile-time alias though
 
phpinternalsbook is out of date also
which is a shame ...
 
as in, if we had union types, typedef Foo = int|str would be fine, since it would just be a compile-time alias of the int|str union type
 
12:13 PM
there might be a few very detailed pages if you dig about in the ng rfcs, I forgot them all
 
in C, for example, typedef is just that: a compile-time type alias
your gist is making typedef much more than just that though
so.. I like the basic idea of typedef, but I don't like everything you've put in your gist
 
just my $0.02
 
maybe there's only that one
 
@Gordon thanks!
 
12:17 PM
a lot of those wiki pages are for 5 btw
 
@JoeWatkins thank you too ))
 
someone should fix that
 
@Danack Unfortunately in the context of VOs to wrap primitives it doesn't really help though (not without typed vars)
 
@Gordon lol
 
12:27 PM
\o
 
@beginner it contains an instance of class for abstracting the user input
 
@DaveRandom "not without typed vars" - yeah....they would need to be typed vars.
 
@Gordon lol, love the LISP one
 
Also:
 
12:30 PM
The princess comic is inaccurate though. For PHP it should have said: "you realize PHP has a native library for rescuing princesses. You just glue it together and it works fine. Then you try the same with Laravel for a challenge." And then the last picture
 
@Gordon LOL I died at the PHP one.
 
@Danack that's too big of an ask, I think
I'd love it, but it's not really PHP any more at that point
 
Yea, I don't agree with the PHP one, but we all love making PHP do things it shouldn't :)
@DaveRandom does it have a trunk and *toot*?
 
@DaveRandom you mean it would be good? ba-dum-tish
 
All of those things, and more besides
 
12:33 PM
I don't think it's fair that it's the one that kills you ...
 
@Gordon s/fine/good enough
 
@tereško cant edit anymore. So it's fine now :)
@JoeWatkins but Laravel killed your mother.
 
@Wes hmmm, right
 
@DaveRandom I was thinking of the age old sandraandwoo.com/comics/…
lol, watch the video on the front page of that toggl site, wait for it to get to "legal fees" and "php refactoring" toggl.com
 
12:43 PM
https://toggl.com/programming-princess (How to save the princess in 8 programming languages)
 
sad php story :D
 
He got off easy. That's not sad :P
 
but hanging on a tree ;D
 
star all teh things!
 
@DaveRandom ping
 
12:53 PM
i want to play some pingpong too :(
 
@PeeHaa pyoiyoiyoiyoiyoing
(your ping hit an exposed spring)
 
@Traxstar therions are hanging on trees all day long. do you hear them complain?
 
soooooooooooo :P
 
what did I break?
 
Nothing yet
 
12:54 PM
Oooh goody, what would you like me to break?
 
I am looking to move some stuff around in the twitter client. Mostly the exception stuff you added
 
@Gordon what does therions mean ?:D
 
@DaveRandom ohh, your spring is showing... kinky
 
Are you depending on it yet?
 
@PeeHaa as we speak I am refactoring BetterTweet slightly but nothing's committed yet. I was just planning to catch RequestFailedException anyway (which is a base class for all the more specific ones)
 
12:56 PM
@Traxstar it's an animal. a very cute and relaxed one.
 
@Gordon ouuhhhh send me a picture !
 
!!giphy therion
 
@DaveRandom kk. Carry on. Will be an easy fix in that case
 
@Jeeves you are useless
1 message moved to Orphan GIFs
!!wiki therion
 
Therion, Greek for "wild animal" or "beast" (θηρίον), may refer to: Therion, the name the Greeks gave to Lupus (constellation) ("wolf") Therion (band), a Swedish metal band Therion (Thelema), a god in Thelema, consort of Babalon Therion (software), a cave cartography programme Master Therion or To Mega Therion, a title assumed by Aleister Crowley The Beast (Revelation), a monster from the Book of Revelation == See also == To Mega Therion (disambiguation)...
 
12:58 PM
I will probably try to fully implement the rest API either way before fixing some other stuff
 
hmmm doesnt sounds so sweet :D
 
hmpf. thats what you get when half of the world doesnt speak latin properly anymore
 
haha :D
 
@Traxstar I mean "sloth"
 
1:01 PM
@Traxstar exactly
 
Anonymous
@PeeHaa decided to use pusher instead btw
 
@JayIsTooCommon Isn't that a 3rd party service?
 
Anonymous
yep
 
Anonymous
@PeeHaa I feel like you're judging me.
 
Anonymous
love me.
 
1:10 PM
meh whatever floats your boat. I personally don't like to rely on 3rd parties like that
 
Anonymous
but cake
 
@Gordon you mean this: youtube.com/watch?v=YY-EOYJQMMY ?
 
@tereško I meant a sloth. The only relation to the band is their song To Megatherion. The latter being the latin name for a now extinct giant ("mega") sloth. Hence Sloth == Therion.
 
@JayIsTooCommon :P
 
Although I guess To Megatherion is about Aleister Crowley
 
1:14 PM
bingo
 
but it's also a giant sloth
 
"great" in this context
btw, have you read Crowley's "The Book of The Law"?
 
nope
 
it's a strange one
 
that doesn't surprise me given the author
 
1:19 PM
it's the origin of "Do what thou wilt shall be the whole of the Law"
 
isn't that also what the CoS proclaims? True anarchy?
 
only if the law was intended for everyone
 
btw, I think you could like thedevilsdictionary.com
 
@PeeHaa also request factory plox
(don't tell Bob)
 
1:32 PM
Will look into it
 
@tereško Sir can you write little bit code for that class
 
I have a lot of code for that class ... but I am not sure if it wouldnt be harmful for you at this stage
 
@littlepootis It's beans… thus … edible??
 
it probably is
 
@tereško May be you explain in too much depth
 
1:38 PM
^ that wasn't in english
try again
 
is That class only for variables
@tereško I mean i can use only action($match[1]) in method argument for user input
 
2:09 PM
in Casual Chat Chess on The Stack Exchange Network Chat, 18 hours ago, by Geobits
@mbomb007 "Easy" would be a room-bot that responds to something like /move Nxe6 and posts a nice pretty picture. It would have to be hosted somewhere that can be up 24/7 though.
^ if someone is bored and wants to play with Jeeves :-D
 
Is what I have in mind.
 
2:26 PM
@bwoebi I do not understand chess, which is probably a pre-requisite for that, however other than that it looks pretty trivial. Could even dynamically render actual images in a worker without too much difficulty
 
@beginner I can't understand, what you are trying to say
 
@DaveRandom It actually should be quite trivial…
 
I might work on a helper to upload images to the SE imgur account
is amp/process usable yet?
(or a replacement)
 
Evenin'
 
@DaveRandom amp/process should be usable
at the very least for *nix
 
2:33 PM
google pixel looks nice...
 
evenin
 
too bad it's Verizon Wireless only here in the states
 
@DaveRandom Eventually it will be replaced by amphp/parallel (is that correct @bwoebi?), but at the moment that's for v2 only.
 
@Trowski yeah
 
2:45 PM
@Trowski @bwoebi cool, ty
 
@bwoebi #Hacktober?
Though you would have to question how much noise that would bring into SO chat rooms lol
 
@Sean If you want to … I'm not too interested in this hacktober thing
 
3:28 PM
Any PECL/Win32 devs want to chime in there?
https://github.com/m6w6/ext-http/issues/55
 
@m6w6 I'm using pecl/pq and am having an issue when the previous query fails due to a syntax error: travis-ci.org/amphp/postgres/jobs/165260955#L578
I have a mutex in place to only allow one query at a time per connection. Seems to work except in that case.
Trying to figure out where I'm going wrong.
The mutex is a promise that is resolved after a query executes. Waiting: github.com/amphp/postgres/blob/master/lib/… Resolving: github.com/amphp/postgres/blob/master/lib/PqExecutor.php#L143
 
Is there any examples of asymmetric protocol parsing with Amp? (i.e. not request/response models). Specifically looking for how buffer building is being handled, and yielding back control if the buffer doesn't contain a complete message
 
@Trowski Are you sure, you definitely fetched the result?
 
@Leigh yeah, just look at our websocket parser
 
Ah, of course, else you wouldn't raise
 
3:35 PM
@bwoebi I was scared you'd say that :/
 
Because the last time I looked at it, I lost interest :p
 
@Leigh Be happy I haven't referred you to the HTTP parsers
 
My SSH message stream parser is a little nuts at the moment too ;)
 
@Leigh github.com/amphp/aerys/blob/master/lib/Http2Driver.php#L384 … If you look at that, then you loose interest
@Leigh may I peek at it?
 
3:37 PM
Nope
Not yet
(I have everything up to (and including) key exchange implemented - in a single function :D). Now trying to break it down
 
@Leigh I'd like to see it before breaking it down though
 
@m6w6 Hmm... actually I'm not sure $connection->getResult() is called in that case.
 
@bwoebi did you enjoi the conference? any interessting new topics? ;)
 
@staabm I doubt he can remember, he was drunk the whole time, and chatting up the ladies
 
@staabm sure I did :-P // The most interesting one was from the lady obviously
(kidding, but Lornas talk was actually the most interesting one in terms of being eventually inspiring)
 
3:46 PM
Quick question... since PHP now supports new class etc... how hard would it be to dynamically create a proxy class at runtime?
 
@Trowski getting lots of errors, and finally it hangs, when running the test suite locally...
 
I envision something like this: create_proxy(\ReflectionClass|object $origin, callable $invocationHandler) : \ReflectionClass
 
@m6w6 Really? That's interesting.
 
@bwoebi Is there a reason you're not just doing yield 0; in those loops while you wait for data?
               do {
                    $buffer .= yield $frames;
                    $bufferSize = \strlen($buffer);
                    $frames = 0;
                } while ($bufferSize < 2);
 
@Leigh because I want to count the number of parsed frames for statistics?
 
3:48 PM
And any call to to this object's instance would actually trigger the $invocationHandler callable, providing the following arguments: object|null $object (null if method is static), \ReflectionMethod $method, array $methodParameters
 
Hm... actually it hangs on the first pq test...
 
testQueryWithTupleResult?
 
@Trowski yep, and any PgsqlConnection test fails
ERROR: relation "test" already exists
 
I get that sometimes if some tests fail… in the last run. I must not be cleaning up properly.
 
Now: EvLoop::run(): Libev error(9): Bad file descriptor
 
3:55 PM
Ah, you're using EvLoop. Maybe that's why you're seeing those errors.
I haven't tried it with that extension.
 
ohhhkay, which one should I try?
:)
 
@m6w6 any other? Native/Uv?
 
So, I could just disable ev?
 
@m6w6 Try that.
 
wayyy better
1) Amp\Postgres\Test\PgSqlConnectionTest::testConnectInvalidConnectionString
pg_connect(): Unable to connect to PostgreSQL server: missing "=" after "invalid" in connection info string
2) Amp\Postgres\Test\PgSqlConnectionTest::testConnectInvalidHost
pg_connect(): Unable to connect to PostgreSQL server: could not translate host name "invalid.host" to address: Name or service not known
only these errors
I reset the connection string to the empty string, though
 
3:59 PM
You shouldn't be getting any errors.
 
PHP-7.0.11, Xdebug 2.4.1, pq 2.1.1 (libpq 9.5.4), raphf 2.0.0
 
Just try the pq tests, since apparently there's something going on with ext/pgsql that I'm not seeing.
 
Running while ./vendor/bin/phpunit test/PqConnectionTest.php --no-coverage; do :; done for a while now... no errors
still running like a champ
killed it, cause it's filling my journal :P
 
@bwoebi topic?
 
@staabm This queuey thingy amqp…
 
4:10 PM
@bwoebi ah cool. we also use such a queuey thing in our next product ;-)
need to leave now, cu later
 
@m6w6 Frustrating when errors are only reproducible on Travis.
 
/me nods
 
Also looks like I have some ev compatibility issues to work out.
 
;)
 
Can't imagine why that would behave differently…
 
4:19 PM
@Trowski you've tried on the same ubuntu version locally? And with using valgrind on it?
 
@Danack Well no. OS shouldn't matter… but maybe it does.
 
@Trowski ubuntu is......'not as careful' as centos when it comes to packaging libraries. I can't run the Imagick test suite on it successfully, as there are various bad memory reads from the image libraries present on Ubuntu.
Grabbing an ubuntu vagrant from puphpet.com would probably be worth trying.
 
@Danack Will do, thanks.
 
Also, in case that doesn't work: gdb -batch -ex "run" -ex "bt" --args /home/travis/.phpenv/versions/5.6/bin/php -d extension=imagick.so -d extension_dir=modules 2>&1 might come in handy at some point..
 
What's more unusual is that the error comes and goes on travis. Sometimes the test suite passes.
 
Wes
4:29 PM
\o
 
o/
 
@Trowski We have enough of these in the php-src testsuite too :s
 
5:10 PM
@Wes you know about BEM? That's just godawful
 
Wes
@PeeHaa if you followed my twitter you would know twitter.com/WesNetmo/status/778932618993737728
 
oh lol yeah. I have seen the homer.gif but didn't know about bem at that point
 
Wes
:B
and yeah, it sucks
 
5:34 PM
@bwoebi do you think parsers would be more readable with this? github.com/nikita2206/aerys/commit/…
 
@nikita2206 readable, sure, faster, definitely not.
 
@bwoebi Oh, didn't think speed was that of a factor here
 
@nikita2206 It's pretty much a direct parser of raw input
 
Couldn't you at least specify a number of bytes you wish to read from the stream?
I mean currently you can't, but if you were doing yield [%number of frames%, %number of bytes you want to read%] or something similar (and on another side someone who gets these yields would take into account %number of bytes%), at least you would not need a buffer variable then
 
In 2016 people still trying to build server using php.
 
5:46 PM
 function __construct(&$db,$userObj) {
someone give me something heavy to throw
 
@JoeWatkins &$db? wtf?
@JoeWatkins Here, have a thick WTF to throw at it.
 
ikr
 
@JoeWatkins ... wow.
Yeah, let me just replace the $db for everyone; they definitely want that.
 
Try to imagine all life as you know it stopping instantaneously and every molecule in your body exploding at the speed of light. — AbraCadaver 15 mins ago
 
every molecule in your body exploding < that makes no sense
or like chemical bonds being released and all atoms fleeing in all directions?
 
6:03 PM
heh ghostbusters
 
o/
 
\o
 
@PeeHaa is codeformat plugin currently broken?
 
@Machavity why I am not surprised that author of this is from Texas ..
 
@Linus It's disabled because it was spammy
 
6:09 PM
@PeeHaa in Jeeves playground it's enable but i do not get appropriate message for formatting code
 
@nikita2206 the buffer variable is my least concern though
 
Anonymous
@Linus pretty sure it was temperamental as well
 
:P
 
6:42 PM
@bwoebi There is a theory.... en.wikipedia.org/wiki/Big_Rip
 
@Danack progressively torn apart … not in an explosion.
 
RFC for my Draft of an RFC https://gist.githubusercontent.com/pmmaga/54394976ea5bf10967d66ffaee48df6e/raw/6cc7640cd0e6634cd4b4619a2d62f7738e4b5ef1/rfc-inheritance-private-methods.md
/cc @Danack
 
Is it good to do isset() in a class constructor?
*to check if the user does an action
 
most likely you will want to check it before you instantiate the class
 
Totally depends on what is passed to isset()
 
6:56 PM
@PietervandenHam like this: pastebin.com/nqktzzQF
 
@bwoebi @NikiC So... arrow functions. Anything in particular you can think of before moving it formally back to discussion phase?
 
no … I just don't know what internals wants… we'll see when you do move it to discussion.
 
7:12 PM
@bwoebi Any opinion on the draft?
 
@pmmaga It's good enough for iitial submission I'd say
 
thanks!
 
@yessure Well, for starters, it is a good convention to design methods in such a way that they do one thing, and one thing only. Yours does ~20 things.
 
Wes
bleh, using raw document.cookie, like an animal. because, clearly, window.sessionStorage is actually window.justThisTabStorage
 
7:27 PM
@PietervandenHam so I have to split the constructor in multiple functions and call them separately?
 
@pmmaga probably s/invisible to the child class/not callable outside of the scope they are defined in/ as:
class A {
    private function foo() {}
}

class B extends A {
    public function debug() {
        $reflClass = new ReflectionClass($this);
        $reflMethod = $reflClass->getMethod('foo');
        var_dump($reflMethod->getParameters());
    }
}

$b = new B;
$b->debug();
Also, some thought probably needs to go into what happens when a private function foo($x) is allowd to be added to B. e.g. how will people differentiate between them in reflection.
 
nice! that explains it better
 
7:48 PM
If we are going to treat private functions like they don't exist we need to trigger get/set/isset/unset don't we?
 
hmm?
 
@Danack In your example, currently, you only wouldn't be allowed to add one to B if the one in A was marked as final. And the ReflectionMethod has the class name available.
@LeviMorrison Sorry, I'm not getting it. Can you elaborate?
 
If it is inaccessible and thus permitted to create a private method how is that really different than pretending it doesn't exist from everywhere?
Shouldn't we just make it act like it's not there for practically all purposes? Why for just new private methods of the same name?
 
In the most of the code, a parent's private method is already ignored. But when a child implements a function with the same name of the parent, the inheritance checks are triggered (whichever is the visibility of the child method)
 
8:12 PM
#88 updated :)
 
8:47 PM
Hi All
can anyone help in:

http://stackoverflow.com/questions/39883344/new-radio-button-not-clicked-but-old-can-be-clicked-ajax-php
 

« first day (2181 days earlier)      last day (2764 days later) »