« first day (2247 days earlier)      last day (2708 days later) » 
00:00 - 22:0022:00 - 00:00

Wes
12:00 AM
or the lil mormont leading a charge. such a bad ass character :B
 
hello everyone :)
if I may ask for some help, I wasn't capable of finding any answer while googling so I'd like to ask for direct help from the community
 
since I'm all new to the Symfony 2 framework, and I already started developing my website on a native language basis, now I'm migrating my code to symfony 2 framework, still I want to know if there's a way to implement the database access part while I keep using phpmyadmin, so is there a way for symfony 2.8 (specifically, since it's the version that I'm using) to work along side with phpmyadmin :)
thank you everyone for the help
 
@Sybarium There is no reason they exclude eachother
So yes :)
 
@PeeHaa thank you for the reply, can you point me to some guide on how to do that
?
 
12:10 AM
Not sure what a guide will tell you about it specifically. Install your symfony project. Install phpmyadmin ? profit!
I have a feeling you are not asking your actual question though :P
What s the problem you are having?
 
yeah, I mean the manipulation, you see using doctrine is a solution and I'm fine with re-establishing and creating my database from 0, but I already have a fine and created one that works on phpmyadmin
so I need to know the steps to migrate the operations that I spent hours working on to symfony 2
 
what has phpmyadmin got to do with this?
 
What operations? phpmyadmin is just a webgui for mysql
 
yeah I meant the functions that I worked on in my php side to manipulate the database
 
@Wes oh you. I hope she lives.
 
12:14 AM
so I don't wanna do those the doctrine way
 
don't
 
don't don't?
 
Wes
@FélixGagnon-Grenier if she dies i quit the show. best character by far, she's ferocious :B as davos calls her
 
@Wes Ha. I see you're still at the "I quit the show if <tragedy> happens". How idealistic ;) That series destroyed that part of me...
 
@FélixGagnon-Grenier :)
 
12:17 AM
... That and the US elections.
 
Wes
lol
:P only ned's death destroyed a bit of me, but would be too bad if the lil bad ass mormont died :B
 
ikr? I was so not ready for that.
 
Wes
i actually had some relief when jon snow died. i thought - well at least now it's clear that protagonist of the show is deanarys
but no... :B
cersei is for sure the major villain now though
until the night king arrives..
 
@Wes lol you really thought he would not come back to life?
ok, maybe that was me refusing to accept :p
 
Wes
i did :B he was dead for an entire episode
 
12:30 AM
imagine that!
 
Wes
12:47 AM
:P going to sleep a bit
gn all
 
 
1 hour later…
2:12 AM
morning
 
2:53 AM
hey do we have a canonical Q&A for recursive array key searching?
 
3:17 AM
o//
 
 
1 hour later…
4:33 AM
oh, actually, what a great dup vote target
gj @Linus
@Wes just a random ping becaue I just saw the first avatar you had when coming in this room in walking dead, and I couldn't help but imagine you instead
 
4:49 AM
\o
 
o/
 
5:29 AM
should profiles be members only or have visitors view part of the profile
 
Depends on lots of things.
 
i noticed that most social networks have the profiles open
they allow everyone to view part of the profile
I checked google analytics profile cant be indexed because they are members only.
 
6:01 AM
posted on December 10, 2016

New Cyanide and Happiness Comic

 
Wes
6:32 AM
Yeah, sure, it's Asians who all look same. https://t.co/dxG2UvdJPj
 
Have a nice day everyone!
 
morning
 
Wes
\o
 
Guys do you know project Lombok for Java? I was looking for such for PHP it removes completely boilerplate from Vlaue Objects, Data objects etc.. but couldn't find one which supports PHP7 and doesn't require running separate command. So started to writing lib which registers additional autoloader, finds file for class, check annotations and using PhpParser creates missing boilerplate and stores prepared like that classes in file cache.
Additional feature would be adding to original file class annotations in phpdocumentator format which adds support for method completion which was added during "compilation" of those classes. Do you find it usefull as I ?
o/
 
Wes
6:47 AM
? :P
what kind of boilerplate code does it avoid?
 
Orignal Lombok description is here jnb.ociweb.com/jnb/jnbJan2010.html
It fastens writing ValueObjects, their toString methods, their comparator methods, their getters and setters
I do not plan to cover whole Lombok feature, because they are impossible to write for PHP (for eg. synchronized)
Byt that way, will be able to do it like Lombok on evaluation time
There must be some script comamnd to process batch whole src directory and warmup cache so additional autoloader wouldn't even have to check if original file has changed or smth. but simply include from cached ones
Adding phpdoc annotations, gives support in IDE after process without adding boilerplate to original file, only class annotations
 
Wes
it's nice but i would have the language supporting that stuff natively, get;set; and everything :(
 
7:04 AM
@Wes we all know there are plenty nice to have stuff, but you know how it is...
For this library I could even try to write PhpStorm plugin which would avoid adding processed annotations @method, and complete the autocomplete at codetime in DE
 
Wes
@brzuchal i would use that plugin :P
instead i'd probably not be happy with the php "preprocessor"
not because it's wrong... only because it's a bit unnecessary to have
 
7:26 AM
how to add two different variables into two different function and display output into other function ....this my code:<?php
class race
{
var $a;
var $b;
function fast()
{
$this->a=10;
}
function slow()
{
$this->b=20;
}
function avg()
{

$c=$this->a+$this->b;
echo $c;
}

}
$relay = new race();
$relay->avg();
?>
@Wes r u thr??
 
Wes
wat. i haven't done such a thing i.imgur.com/fsV1QLT.jpg
 
@Wes thanks
 
@Wes how to add two different variables within two different function and display output into another function
 
Wes
? :P
 
Wes
7:57 AM
youtube yesterday brought me to this. the guy is seriously crazy youtube.com/user/TheAlexJonesChannel/videos (cc @tereško)
 
 
1 hour later…
9:36 AM
@Wes yeah, that one makes me sad. It contains 99.9% of pure bulllshit.
about 10 years ago I was really into conspiracy theories :D
 
@salathe Why is there a problem with me having that repo?
@Ocramius No I'm in Spain and get monies if we get a good Dev :)
 
10:32 AM
Should I use "the" for image? I mean which one is correct?
- Choose a title for the image
- Choose a title for image
 
Wes
the first is correct @Shafizadeh you can omit articles sometimes but this is not the case
 
ah ok thx .. however I didn't understand the second part of your sentence :-)
 
@Shafizadeh yes, you should use, because you are talking about a specific image
 
@tereško got it ... thx
Next question, Which one;
- The name of person
- Name of the person
Doing a English project is a nightmare :-( I give up !! :-(
 
10:53 AM
the latter
It's okay, you'll get used to it.
 
thx
 
11:11 AM
Is this correct?
> User has been removed successfully
 
yes
 
Wes
morning bob \o
 
mornging
 
moinmoin
 
Wes
@tereško tell us more :B what do you think about the 11/9 attacks? :B
 
11:16 AM
@bwoebi thx
 
@Wes the short answers "something's fucky"
 
Is this correct?
> Neighter username and password should not be empty
 
@Wes I'm waiting for the classified related documents to be someday released…
 
Wes
@bwoebi maybe in half a century or something
 
> Neither password nor username shall be empty
 
11:17 AM
@bwoebi thx
Is this correct?
> Either username or password is wrong
 
thx
 
But not useful
 
Sorry guys for asking too much, I have to deliver my current project immediately
@littlepootis doesn't matter at al
l
 
It'd be better if you tell them what's actually wrong.
 
11:20 AM
@littlepootis again, doesn't matter at all, I'm just trying to make some English messages. that's it
 
@littlepootis Depending on the use case you just might not know what is wrong
 
If it's a login form you cannot know whether it is the password or the username that is wrong
 
Is this correct?
> image format is wrong
 
"Unrecognised image format" works too.
 
11:22 AM
@littlepootis thx
Is this correct?
> The image has been uploaded successfully
 
yes
The [Thing] has been [action]-ed always works.
[Thing] [action]-ed works too.
 
thx
 
> The post has been published
 
got it
 
> Post published successfully.
 
11:23 AM
@littlepootis where are you from ?
 
India
 
ok good
 
Wes
@tereško i think this was not made by a boeing. too small. it's just not possible. upload.wikimedia.org/wikipedia/commons/0/04/… i don't necessarily think that america attacked itself, but it could be that they tried to cover up something scary, like a jet fighter pilot recruited to attack the pentagon with a missle. what do you think :B
but i do believe we went to the moon.
 
@Jimbo No problem, just "PHP" would like to use that vendor name too. :)
 
@bwoebi as if
 
11:28 AM
@NikiC some day. And I do not mean in the next few years definitely ^^
 
@bwoebi Well, given how 15 years later the US is still in a state of "emergency"...
 
lolwat
 
@NikiC isn't defcon like on 5 currently? not sure where you read an emergency here?
@NikiC I … oh … uh … ……………
 
Wes
well at least he's not saying that python 3 sucks and people should continue to use 2 :B
 
@bwoebi They declared a national emergency on 9/11 and have renewed it every year since then ;)
 
11:37 AM
Just like France and Turkey?
didn't know that
 
More like Israel. They already have a national emergency running for the last 50 years or so ^^
 
ok.
 
Wes
Nice display. https://t.co/URVjuC4aP9
 
11:58 AM
romning
 
Wes
\o
 
o/
 
\o
 
12:14 PM
\o/
_o_
_o/
\o_
 
what is the instance of object in this code $relay = new race();
 
Wes
@Gordon heeeeeey macarena!
 
Nov 3 at 10:15, by Gordon
@abdul any object you construct from a class is an instance of that class. Example: $instance = new StdClass and also $instance = new DateTime
@Wes aaaaaaahaaaaaaa
 
morning
 
oh object is called as instance of class right?@Gordon
thank you @Gordon
 
12:26 PM
you are welcome
 
:-P
 
 
2 hours later…
2:16 PM
is freelancer work not count as experience ?
 
Sure it is
 
lol one of company recuriter said it doesn't count as experience we will take you as non-experienced person.
 
Wes
........................................................... 1239 / 24585 ( 5%) @PeeHaa is it normal that i basically didn't test anything and i have already 24k tests :B
 
@Linus lolwat
 
Wes
20% code coverage
 
2:23 PM
@PeeHaa yeah :-P
 
@Wes No probably not. Sound like you are fuzzy testing :P
 
Wes
i am. in many ways i'm almost testing all cases :B
 
I have no idea what you are doing specifically, but I won't let that stop me from venting my opninion
 
Wes
:D
 
@Wes You are hoping you are testing all cases
It sounds like you are just throwing random shit at it hoping it would fail without texting actual cases that need to be tested
Which can be a valid way to test something, but you don't even have the coverage to start trying to test stuff you haven't thought of yet
Which can mean you are not confident you understand the code. Which may have a better way to solve
 
Wes
2:29 PM
i'm brute forcing tests. i'm not trying to guess what special cases are. so yeah i'm throwing in everything possible
 
Yes which means either you are lazy or the code is hard to test
Or both
 
Wes
code is trivial
the test is way harder to write :P
dunno
 
@Jeeves tell @wes I think he might be doing it wrong
 
@PeeHaa How must I go about it then?
 
@Jeeves Very loudly
 
2:31 PM
@PeeHaa Makes him falling in love with fer.
 
Wes
but these are the most complete tests i could've written without writing tests specific to the implementation
 
How do you know?
You are doing random stuff
Maybe you get it all, maybe you missed 80%
 
!!dad
 
What do you call somebody with no body and no nose? Nobody knows
 
:P
 
Wes
2:32 PM
i'm not doing random?
i'm programmatically generating all possible cases
 
3 mins ago, by Wes
i'm brute forcing tests. i'm not trying to guess what special cases are. so yeah i'm throwing in everything possible
 
Wes
well, brute forcing as in trying everything, not trying randomly
 
@Wes Why would you? Say I have a function that adds two numbers. I will never test 1+1 1+2 ...... 9999999999+9999999999999
That's useless
 
Wes
of course i don't test all integers. in that case i only make sure that bounds are reached properly, like without overflowing to float
and some value in the middle too
 
yes
That's the opposite of brute force though :P
 
Wes
2:38 PM
:B @PeeHaa 3v4l.org/TYduT
 
yes that looks pretty useless to me
For starters these are all the same and surely you don't need to check each and every one of them
elements: [] search: [] elements contains all of search: true
elements: [] search: [0,1,2,3,4,5,6,7,8,9] elements contains all of search: false
elements: [] search: [0] elements contains all of search: false
elements: [] search: [1,2,3,4,5,6,7,8,9] elements contains all of search: false
elements: [] search: [0,1] elements contains all of search: false
elements: [] search: [2,3,4,5,6,7,8,9] elements contains all of search: false
elements: [] search: [0,1,2] elements contains all of search: false
That thing is just test count inflation
 
Wes
yeah but why care testing less. it's generated automatically. removing useless tests is additional effort
 
Because tests should run as fast as possible
 
Wes
though, i can reduce precision. it's 10 but 5 ish there would be just as good
 
Also if something eventually goes wrong you are fucked either way because you have to debug generated and obfuscated tests
testOverflowBoundaryOn64bSystems() failed
vs
omfgAllThoseThingsInHereAndSomethingSomewhereInHereFailedisItTheGenerationProcessOrSomeProperresultErrorIDontKnowIGiveUp() failed
 
Wes
2:46 PM
lol
meh. it's not that hard
 
!!chatsearch phpunit issue wes
 
/she said
 
:P
 
Wes
:B
 
Moving house sucks :(
I feel like I deserve a nap already
 
2:51 PM
I normally just let the house stay and move on myself
 
why haven't I thought of that
 
I'm moving my stuff, and leaving everything that isn't my stuff... mainly mess
 
I thought you just recently moved to london @Leigh?
 
I did
 
Morning.
 
2:54 PM
and now I'm moving elsewhere in London
 
Morning levi
@Leigh ugh
 
More space + cheaper
 
\o/
 
@PeeHaa individual tests or the whole suite?
 
That depends. In @Wes' case everything will be slow
Sorry for mega ping wes
 
Wes
2:59 PM
@PeeHaa meh, just few seconds
also, i don't get pings anymore
yo levi
anyway, i don't think tests are meant to be fast :B i think they should be accurate...
 
And yours aren't
A sniper rifle is accurate. You are using a shotgun
 
Wes
how is that not accurate :P
 
:D
 
Wes
@PeeHaa i'm using a shotgun but a close distance, yes :B
 
I knew I should have used a different analogy :P
More serious even if it's still fast:
22 mins ago, by PeeHaa
testOverflowBoundaryOn64bSystems() failed
22 mins ago, by PeeHaa
omfgAllThoseThingsInHereAndSomethingSomewhereInHereFailedisItTheGenerationProcessOrSomeProperresultErrorIDontKnowIGiveUp() failed
 
Wes
3:11 PM
damn peehaa. /me deletes everything and starts over again
 
:P
 
Somewhere over the rainbow
 
@Wes BTW I haven't tried it myself, but I imagine this is something to your liking
 
Wes
that looks nice
 
Can someone help me out here? I am getting each column in a database table for a certain user then creating a key value array with the column name and the column value. The only issue is I keep getting lots of items in my array with the index as well as the column name? for each column name added it adds another array item for the index? is this meant to happen...

For example, here is a print_r of the start of the array...
Array ( [0] => 1 [id] => 1 [1] => Liam [username] => Liam
At the start '$userInformation' is just a private class member that I have assigned the value array();

Here is how I load from the mysqli_fetch_array...
while (list($key, $value) = each($userArray))
{
$this->userInformation[$key] = $value;
}
 
3:22 PM
Properly set up the fetch mode
!!docs fetchmode
 
[ pg_fetch_object() ] Fetch a row as an object
[ ftp_chmod() ] Set permissions on a file via FTP
 
Errrr go to php.net and search it yourself :P
 
What am I searching exactly?
 
pdo fetch mode
 
I'm not using pdo...
:/
 
3:24 PM
You are saying that other api are doing the same stupid shit? O.o
 
"Here is how I load from the mysqli_fetch_array... "
 
oh
In that case debug your code :P
Unrelated, but why are you using a while in there
 
it seemed like the right thing to use.
 
That contraption looks like a weird way to just do a foreach
 
 
1 hour later…
4:26 PM
 
@Ocramius Let me just say: I don't disagree :P
 
@Ocramius I think I'm somewhere in between you and Yasuo on this particular issue, but probably closer to your view.
Yasuo didn't seem to say why your proposed API is too simple. That or I didn't understand him.
interface SessionSaveHandlerInterface
{
    /** metadata can contain arbitrary info, such as TTL too */
    public function save(SessionId $id, SessionMetadata $metadata, SessionData $session);
    public function destroy(SessionId $id);
    public function load(SessionId $id);
}
 
4:45 PM
@Ocramius no, it's appropriate
 
@LeviMorrison I didn't cover all scenarios, but the API needs to emerge from scenarios rather than from legacy
 
@Ocramius I do not think using SessionId $id instead of string $id has any benefit here as callees will anyway have to immediately unwrap it
 
@bwoebi the usage of SessionId is just to enforce some constraints, such as "yo, please don't use a short or empty string"
but yes, string is an acceptable compromise
 
@Ocramius Given that it's only called (apart from tests) from internals, no need here
 
But take (for example) a DB-backed session storage: you will never need gc, since you just add an index on the expiry time
@bwoebi who said it's only called by internals? It's an interface, and an instance of it can be used from anywhere
(already seen that, many times)
 
4:52 PM
@Ocramius right
@Ocramius you need a possibility to mark a session as unlocked without overwriting data though
(set $session to null???)
 
That's a scenario I don't know of, or I just misunderstood what you said
 
@Ocramius session_abort()
 
meh, just destroy it
oh, wait
weird one, never saw this thing
sounds like this should simply not use the save handler at all
like... no interactions for the current SID
 
@Ocramius right, but eventual locks persist then
@Ocramius we set a rwlock in load() and … don't free it?!
 
There's no need to lock on load(). It's up to the consumer to decide the concurrency strategy here
for example, I might have no locking, or I might start a TX on load, and then abort it on __destruct, or I might simply use optimistic locking per SID
 
4:58 PM
__destruct() is a possibility, though it doesn't cover the early abort of session_abort()
 
But releasing a lock on __destruct is trivial, and doesn't need to be exposed in the API
 
destruct will only be called when the session module is shutdown though
 
session_abort() is indeed a scenario I didn't know. Will think about it :)
Yes, but that fits pretty much all scenarios, and the session module doesn't really allow opening the session multiple times IIRC
 
@Ocramius session_reset().
(which essentially is abort+start)
 
@bwoebi second call to load()
if something modified it, then you just throw an optimistic locking exception and make the entire thing crash
 
5:01 PM
@Ocramius right.
 
but then, I think 0.002% of PHP devs use optimistic locking anyway
 
optimistic locking is fine in a custom session handler if your application knows to work with it.
@Ocramius btw. github.com/amphp/aerys-session/tree/master/lib sessions for Aerys… Can you look at the public API (Session class and Session\Driver interface)?
 
Session class seems to do a lot O_o
but you read/write async from it, eh
@bwoebi hmm, probably better to simply always retrieve a Session object, then return promises from get and set to it
I'll give it a read later tho
 
@Ocramius promises for set do not work as you want some locking at least
 
Let the promise fail on a lock failure
(lock wait failure)
but yeah, I'm not really doing much async, so I'll need to look at this after wiping my brain from ext/session thoughts
 
5:10 PM
I mean, you want to operate on the current value returned by get() (I.e. optimistic locking would be a solution, but it's not robust enough for the general case)
@Ocramius I think this API is not related to async though… async is just about the waiting here
 
Should probably be, since it's I/O
and that's where aerys should shine, if I understand it correctly
 
@Ocramius Sure, I mean, just remove the "Promise" part from the API and you could use that as well in normal sync contexts
@Ocramius the point about that Session API is: it allows you to open the session in read-only mode (no locks) and read-write mode (exclusive lock)
 
Ah, that's something I didn't see :)
 
[Reading doc blocks helps^^]
 
I didn't read much - doing reviews for a client atm
 
5:20 PM
@Ocramius yeah, have a look when you get some time… perhaps you have some criticism or helps your thoughts regarding ext/session
 
Aye, shall do :D
 
There was some specific reason why we have an extra regenerate function on the Driver but I do not recall why…
I think it's superfluous and can be removed on the driver actually…
after all it's just a lock+save empty array+save array for new…
I mean an id rename may be a bit cheaper than two saves… but meh……… that's not worth it.
 
You can let the driver compare old and new data and decide
(assuming relatively small session)
 
Hello, does anyone know any good way to have a set of config items for each theme of my application in PHP?
 
5:49 PM
@LiamHardy make a config.php where you return an array?
 
Hi..has anyone created a post webservice in PHP? I have created one but it is not picking the parameters I have provided and gives an error always
 
user895378
6:07 PM
morning o/
 
6:25 PM
morning rdlowrey
 
6:52 PM
\o
 
7:23 PM
o/
 
7:34 PM
\o
 
7:57 PM
@rdlowrey moin
 
8:50 PM
 
9:22 PM
@Jeeves tell me a story
 
@Ekin Why don't you tell me a story? You like making things up.
 
@Jeeves lazy, aren't you
 
@Ekin Not quite the answer I was looking for, so let me send a more clear question. Is Coffee or Tea better?
 
Anonymous
@PeeHaa I'm sick, told you we shouldn't of held hands.
 
9:23 PM
@JayIsTooCommon :P
 
@Ekin What's that?
 
Anonymous
Will jump back on it in a bit and pester you :)
 
kk
 
@Jeeves do you think?
 
@Ekin Yes, I think I am.
 
9:28 PM
@Jeeves what do you think about?
 
@Ekin I think about the future.
 
@Jeeves what do you think about the future?
 
@Ekin @⁠jeeves I don't think I like the future?
 
How nice of him to ping himself
 
yeah :D
I think it's the 2nd personality talkin
@Jeeves is Britany there?
 
9:30 PM
@Ekin Now you sound like a cheap fortune teller.
 
lol
 
heheh
 
00:00 - 22:0022:00 - 00:00

« first day (2247 days earlier)      last day (2708 days later) »