« first day (2080 days earlier)      last day (2867 days later) » 

12:23 AM
yeah, well ,, in eastern europe we had i.imgur.com/3jzG2Cw.jpg
also, nn
 
nite
 
12:48 AM
Any idea why I might not see Composer packages (in ./vendor/ directory) in my git status output
hmm, if I rename one of the vendor directories, it shows up, so supposedly it's all committed
if I clone the project, though, the vendor package directory is empty though, so that doesn't make sense
  - Installing doctrine/couchdb (dev-master c80f250)
    Loading from cache

  - Installing twitter/bootstrap (dev-master 4e16300)
    Loading from cache
Sounds like they're git repos?
Looking at it in Bitbucket, it looks like they were being treated as Git submodules. I removed the packages from the git repo, git committed that, reinstalled via composer install with the --prefer-dist flag, then committed and pushed the code back up. A-OK now
Looking at the composer.lock file, it has a "source" and a "dist", by doing a prefer-dist over prefer-source, it used the zipball archive instead of the .git repo
 
1:47 AM
@taco The vendor directory is a must in many .gitignore files from your local composer store. Check it out not polluting your git repos!
 
 
2 hours later…
3:19 AM
ROOM 17 RULES!!!!
 
@William meh.
TFW you do a clean encapsulated design to realize it will cause frequent O(nlog(n)) full array comparisons (with high constant factor even) (while there's a solution breaking encapsulation and doing it in O(n) (with low constant factor)) …
 
Gon
4:22 AM
Moin
 
5:06 AM
posted on June 26, 2016

New Cyanide and Happiness Comic

 
 
2 hours later…
Gon
7:01 AM
E_QUIET...
 
7:34 AM
why i can't able to enable desktop notifications in chat??
 
Anonymous
Jollow
 
Wes
h\odor
 
Wes
7:51 AM
@PeeHaa portugal won... i flipped tables
 
Wes
lol. i want a rhino pet
 
hi
 
@AnmolRaghuvanshiVersion2.0 are u there
 
8:17 AM
lol
I am sure u know
so funny profile pic lol
 
Feel free to paste a link to your question. if anyone is interested in answering they will
 
okay lol
 
Anonymous
8:46 AM
@Wes did you see how penaldo tried to convince himself he scored the goal?
 
Anonymous
I'm glad they went through, I need to see moar of him
 
Wes
as many teams in this competition they didn't deserve to pass
croatia had a better average playing, for instance
 
Anonymous
Yeah they were organized and played good.
 
Anonymous
The same goes for Switzerland, they were the better side
 
Wes
i think i've lost my interest already
 
8:58 AM
I need a help of a dynamic form , that data display with Ajax .
is anyone here?
 
!!is anyone here?
 
Yes.
 
@jeeves do you count as someone?
 
why does this work echo'<script>var collection = '.json_encode($data).';</script>'; but this doesn't <script>var collection = <?php json_encode($data); ?>;
 
Wes
@Danack forgot to tell you that i've updated github.com/WesNetmo/Symbola :B and starts to look reasonable. still have to decide how i want __isset to work, though
also, morning
 
9:15 AM
Is anyone can help me?
For ex: $s="<input type='text'>";
But I want < type='text'>
How can achieve this using php regular expression
 
Any idea why this only displays the last ID rather than adding up the IDs? 3v4l.org/T74nQ
 
Wes
9:36 AM
it's += not =+
$a = +$foo; sets $a to "unary plus $foo"
 
thanks @Wes
 
Wes
nobody knows what unary plus does.
 
9:49 AM
@soundari If your general use case here is to extract a node attribute from a DOM then it's best to use something like DOMDocument::getAttribute instead. It can be quite tricky to try parsing a DOM with something like a regular expression and often leads to more buggy code than is necessary.
@soundari Here's a simple example of how you'd achieve that using DOMDocument 3v4l.org/gXKWB
 
10:07 AM
moarning
 
Wes
\o
 
Anonymous
\o
 
Anonymous
@DaveRandom long time no see
 
Anonymous
I remembered about brexit again when I saw you here;)
 
Yes I'm not allowed to spend too much time in here any more in case I appear to be fraternising with the enemy
However I've also concluded that the chances of us actually pushing the big red button are roughly zero. It would just be nice if we didn't have to endure a decade of shit before it's finally put to bed.
 
Anonymous
10:27 AM
The big red button..?
 
Anonymous
According to David Cameroon Russians are your enemy :D
 
Wes
@DaveRandom a anti-eu politician here is now saying that "since uk is still in europe even if it's not in europe anymore" and "can't be moved to other continents" (:P), that best thing they could do is starting a new europe, one that looks like the pre-euro europe
 
@Wes with blackjack. and hookers.
 
Wes
ha
 
Anonymous
10:40 AM
The next eu php-conf is going to burn a hole in some pockets
 
@samayo not mine, I won't be allowed in
 
Morngins
 
Wes
\o
 
11:09 AM
> “Keeping and caring for dogs is haram (forbidden) according to religious leaders,” Boosaidi told the Fars news agency on June 19.
@Shafizadeh don't your judicial system have any mental-health requirements for prosecutors?
 
Wes
AHAH
 
@tereško wtf?
 
my thoughts exactly
 
Wes
@tereško good thing that i have no power, because some things would definitely make me full-nazi
 
11:17 AM
not sure how those things are related
 
Wes
what do you think they will do with confiscated pets
 
kill them, of course, but how is it related to national socialistic party in Germany from 30s?
 
Wes
because i would do the same thing to them
 
@Wes you really should study history more ... I am getting an impression that what you know about history you have learned from TMZ
 
Wes
11:23 AM
lol
 
Gon
Hoi
 
Wes
\o
 
11:41 AM
hi guys
Is there a way to create a mysql database with an php script document (without phpMyAdmin and the MySQL terminal)
?
 
It's all just queries
 
I think there isn't a query like I ask to create a database
what you think guys?
 
I just told you what I think
 
Gon
create database pr0nhub;
 
didn't work!
 
Gon
11:49 AM
error message?
 
<?php CREATE DATABASE PORNHUB ?>
9
Parse error: syntax error, unexpected 'DATABASE' (T_STRING) in C:\wamp\www\guitarwars.php on line 2
; ?>
 
Aaaand tiny avatar
 
yesterday, by Danack
@JohnyNassar this room really isn't setup to answer a continual stream of basic questions. People will get bored and stop talking to you long before you run out of questions. Learning to read the manual, and other places that document how PHP works, and then asking questions if you're still stuck after like 30 minutes of reading will benefit you long term.
 
11:51 AM
@tereško I heard you talk about steam sale last week. Any chance there is a cool adventure somewhere?
 
@PeeHaa define "adventure" .. or just give few example
 
Would prefer point and click
 
sorry
I just read for about 30 mins but it's my fault
 
Wes
@PeeHaa my prediction is that italy will lose bad tomorrow, they are too confident
 
@PeeHaa have you tried Tornmentum?
 
11:54 AM
i didn't reach an answer but for phpmyadmin and the terminal
 
@Wes I doubt it
@tereško Nope lemme check
 
@PeeHaa there is a "WTF is .." video for it too
 
Wes
i just watched the press conference. they were partying basically, like they already won. it's our fault, we pumped up them and now they think they have a serious chance to win lol
anyway, going to watch the motogp now, at least that's satisfying :B
 
:P
 
11:58 AM
meh
 
Wes
uuuu it's raining, in assen @PeeHaa
 
Gon
\o/
 
@Wes Uhhhm what did you expect? :P
@tereško tnx
 
@JohnyNassar Let me give you a pointer, the first stackoverflow link in that search result: stackoverflow.com/questions/17688387/… and the mysql manual: dev.mysql.com/doc/refman/5.7/en/create-table.html
 
Wes
@PeeHaa you follow motogp?
 
12:19 PM
hello room
@Wes how do you find renaming php-weak to php-weakreph or like that?
for me just "weak" looks vague
 
@Wes Not really. It's often on as background
reph?
 
ref->(f->ph)->reph
 
Yes I get that. But why?
 
but yeah, also shitty
 
:)
Stupid things that need names
 
12:23 PM
there are already weakref extension which do slightly different stuff
 
Damnit
 
it's nice and even has php5 support
I just don't like that it brought weakmap to extension level
that can be done in userland easily with my ext
as well as i don't like release/acquire methods on reference
so less likely merging these two extensions is possible
 
user1642018
0
Q: PHP How to get date of Monday and Sunday of the week in which the given date falls?

AMBHow can i get a Date of Monday and Date of Sunday if i have specific Date in mysql DATETIME format ? i am trying to get the week's first day's date and last day's date in which the given date falls. i have date '2016-06-05' its in 'Y-m-d' and i am trying it like this way. <?php $date = '2016-0...

 
I'm trying to think of something, but a) I also suck at naming things and b) weakref just says what it does :P
@AMB Doesn't the command answer it?
 
I geniusly have wr and weakref2 as an alternative to weakref, but that's also confusing
these "two hard thing in computer science" are really hard ))
 
12:29 PM
:-)
 
user1642018
@PeeHaa which command ?
 
another on would be PHP\Lang\Ref\WeakReference
but it too java and in a future it may conflict with php itself
 
true
 
maybe just ref?
(i hate naming things)
 
@Danack
thanks
I have searched for an answer for this but unfortunately no answer:
CREATE TABLE `guitarwars` (
`id` INT AUTO_INCREMENT,
`date` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`name` VARCHAR(32),
`score` INT,
PRIMARY KEY (`id`),
KEY `name` (`name`)
);
why the last line is written?
KEY PROPERTY
why putting a KEY property in the final line?
primary key is id
and there's no foreign key
so what's this KEY property?
 
Wes
12:38 PM
@pinepain WeakHandle ? LooseRef
 
even more exotic =)
LoosHandle
meh, i would probably stick to just weakref
but that naming collision ((
 
Wes
namespace WeakReferences;
class WeakReference{} no naming collision
 
and how do you find ns weakref2?
namespace weakref2;
class WeakRef {}
 
Wes
@pinepain no. you really hate PSR, right? :D
namespace PinePain\WeakReferences;
class WeakReference{}
 
anybody has an answer?
 
12:45 PM
not actually =) PSR is nice
just want to make it more shorter and don't like a vendor prefix for extensions
i thought about wr (a-la ds), but it even worse
 
Wes
ds?
 
hi All
 
and just imagine how use will looks like: use PinePain\WeakReferences\WeakReferences;
 
Wes
who cares these days, with autocomplete and stuff
 
geeks?
 
Wes
12:48 PM
you could just have class WeakReference{} in root NS
 
Why this Code cant Print UTF8 ? $root = getcwd();

$videoPath = $root.'/video';
$videoNames = array_diff(scandir($videoPath), array('.', '..'));

echo "<pre>";
print_r($videoNames);
echo "</pre>";
outPut : Array
(
[2] => Facebook.mp4
[3] => [�����] �� 100 ����� �������� ���� �� ��� 2016 ���� ����.mp4
)
 
Wes
@Criss because windows uses "Windows-125*" as charset for filenames
 
My guess is that scandir doesn't return UTF8 strings
 
Wes
you need mb_convert_encoding($filename, "UTF-8", "windows-1252")
@MadaraUchiha depends by what encoding the os uses
 
hi guys
I have a little question:
CREATE TABLE `guitarwars` (
`id` INT AUTO_INCREMENT,
`date` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`name` VARCHAR(32),
`score` INT,
PRIMARY KEY (`id`),
KEY `name` (`name`)
);
why the last line is written?
KEY PROPERTY for what is used?
 
12:50 PM
@Wes TNX , ill Try it @};-
 
Wes
are you on windows, right? and be sure you are actually using windows-1252. also if you are saving these files too, you'll need to do the opposite operation
 
@Wes I think the encoding differs between locales on Windows
It's weird AF
 
@Wes what do you thing about acquire/release functionality on a php-weakref extension github.com/colder/php-weakref/blob/master/tests/… ?
 
Wes
@MadaraUchiha indeed, windows 1252 is western europe
 
JTC
1:13 PM
Hi, let me ask you one question.
Which is better approach? in function

if($results) return true;
return false;

OR

if($results){
return true;
}else{
return false;
}
 
@JTC The first only with braces
 
JTC
oh i see thx
 
@JTC return (bool) $results
 
Even better :)
 
user1642018
thanks guys
 
JTC
1:20 PM
@kelunik yep thats really good :)
 
Wes
@pinepain nice to have :P
 
@Wes but are there any reasons to acquire/release?
that's goes beyond from what weakrefs are designed for, imo
 
Wes
it's for convenience only imho. you turn on/off the strong reference without wrapping/unwrapping the object all the time
 
for me it looks dangerous
under the hood it may be done as refcount inc/dec, which may have ambiguous impact for debugging
 
Wes
i need to think about it more. i'm not an expert of these things either
 
1:31 PM
but i'm not sure
for me if one need to lock weakref that can be done in userland
 
Wes
for a start you could have $strongRef = $weakRef->strong();
which returns another reference rather than modifying current
but i'm unsure about it as well
 
@JohnyNassar From create table in the manual link "KEY is normally a synonym for INDEX. The key attribute PRIMARY KEY can also be specified as just KEY when given in a column definition. This was implemented for compatibility with other database systems."
 
trait Acquirable {
    private $referent = [];

    public function acquire() {
        $this->referent[] = $this->get();
    }

    public function release() {
        array_pop($this->referent);
    }
}
that even more than people need usually
 
Wes
keep it simple for now @pinepain i think it does enough. just tidy the naming a bit
i think "referent" means the entity that holds the reference, not the "referenced" object. right british people?
 
that's exactly what i plan to do
i'm thinking about merging my changes into php-weakref
but weakmap and acquire/release logic is what I don't like there
and it's not an option as there are probably established users who depend on that feature
 
Wes
1:36 PM
indeed
 
at least that is valid point and Etienne Kneuss (author of php-weakref) won't change that
for now both implementation have minimal usable interface - get and valid methods, which makes them somehow interchangable
 
Wes
what i would like most is a notify before (not after) the gc @pinepain
 
@Wes that is less likely without tweaking gc mechanism itself
i'm fixing now that weird behavior when remained observer are not called if one of them throw exception
 
1:52 PM
@JoeWatkins Reminder: may you please close the typed properties vote? :-/
 
what happend with lxr.php.net? it seems to be down - isup.me/http://lxr.php.net
 
Wes
Count: 34 23 :(
byby typed props
@pinepain i imagined so
 
also, how to specify variadic arguments type in extension? It seems to be not possible out of the box, ZEND_ARG_VARIADIC_INFO macro at least has no such functionality.
 
@pinepain it fell over, and no one knows who runs it.
 
/cc @NikiC ^^
@NikiC is it possible to add respective ZEND_ARG_VARIADIC_*_INFO macros for ZEND_ARG_*_INFO?
 
2:12 PM
@pinepain Wrote a mail to systems@php.net, let's see if I get an answer.
 
@kelunik done
 
@Danack
I didn't understand the difference between KEY and PRIMARY KEY
for what reason it's written KEY for the column name
?
 
@JohnyNassar what did you google to find out more information?
 
this manual is a lot more informative than any other source
I did read other sources before you sent me this manual
KEY = INDEX
ok
so why using index in the name column
?
 
2:28 PM
top result for "mysql difference KEY and PRIMARY KEY":
 
2:42 PM
I'm posting something here because if I don't type some words in a box somewhere then I'm going to end up getting involved with the shitstorm out there on the rest of the internet.
How's everyone doing today?
 
Mildly discombobulated is probably the best description.
 
okay, so the INDEX is useful for the database searching for a record. UNIQUE KEY is to stop any chance of duplicate records. PRIMARY KEY is a UNIQUE KEY but plus it won't accept NULL values.
right?
 
sounds about right.
 
It's probably a good idea to separate the linguistic ambiguity from the technical differences. In the general case, "key" and "index" are synonymous.
 
Is there another functions of those terms?
 
2:48 PM
Also there's nothing that says a primary key cannot contain null values
A primary key uniquely identifies a record, that's the only thing it does. There aren't really any constraints on how it does that
 
@Danack read this
sorry @Danack
@DaveRandom
read the question that Danack share
 
A "unique key" isn't really a thing - it's actually two separate but linked things, an index (or "key") used to facilitate the application of a constraint that specifies that the values in that index/key must be unique
Oh MySQL. I assume it does some things which are full retard.
 
not at all
 
@DaveRandom Will you be around for PHPNW?
 
@JohnyNassar I'm probably not a good person to talk to about this at the moment, as I have spent far to much time on the internet today reading things that were written by fucking retards, and MySQL did not start from a strong position with me in the first place
 
2:56 PM
ok
 
@Danack I'm intending to buy a ticket on Friday, assuming it's still possible to do so then :-S
I have been considering submitting but I'm not sure I have anything particularly worth talking about atm
Plus I've kind of got enough on my plate already
 
Both of them kind of need expanding on a little...
 
I'm not sure a 1 hour vitriolic rant about people still using outdated PHP versions and not understanding the basic principles of OOP would go down well, and that's about all I have at the moment
@Danack Have I seen the unit tests one before? It seems familiar
 
> not understanding the basic principles of OOP
Fun story; one of my colleagues wrote this code:
class ModelBase {
   //Nothing in here.
}

class ImageEntry extends ModelBase {
 // actual stuff in here.
}
 
The interface segregation one feels better to me in general tbh, people who go to conferences are pretty sold on unit tests as a general rule I think
 
3:07 PM
When I asked why he extended an empty class, he said "¯\_(ツ)_/¯ - it might be useful at some point."
 
hahahaha
 
@DaveRandom I've probably linked to it before - It's not actually about unit tests, but about making the business case for unit tests, or at least understanding the business case.
 
@Danack This is presumably someone who learned OOP from reading generated code
 
He's an okay programmer - but he just doesn't think about what he's doing...
 
@Danack A worthwhile thing to do, but I suspect conference audiences are the wrong ones is all
Well, not the wrong ones as such
more "not the actual target"
 
Wes
3:10 PM
@Danack rofl.
 
the people who say "don't waste time on that" also don't "waste their time" going to conferences, they send devs (who already understand it) instead
dunno, I could be wrong about that
 
yeah...it's about empowering devs to be able to use business appropriate terms, like ROI, to be able to make the case.
 
@Danack putting together some kind of CEO-friendly PDF with bullet points and pretty pictures to direct people to at the end of the presentation would go a long way towards actually accomplishing something in that case (again, I suspect and I could be wrong)
 
@Trowski pushed updated event-loop tests, may you fix amphp/loop? :-)
 
3:20 PM
Annnnnnd gooooood mornings!
 
o/
 
> air of post-wank shame
what a poet
 
@DaveRandom he should stop holding back and say what he really thinks.
 
@FélixGagnon-Grenier The new fragrance from CK. £149.75/100ml
 
Gon
3:37 PM
Dat feeling of emptiness after finishing a series....
 
@Trowski @bwoebi amphp/loop still needs a description and README.
 
@kelunik First it needs to work in all cases.
 
@bwoebi There's still execution order assumptions. I'll have to remove those :-P
 
Hey @UKers. I'm reading some articles and starting to make some sense of all that brexit mess, but I have no clue how people actually feel about that. I mean, if it passed, it means a majority of voters were for it, logically. So how do you feel about all that bad press?
 
@bwoebi You also added signals in nested loops, which doesn't work with some loop backends.
 
3:46 PM
@FélixGagnon-Grenier "logically" does not enter in to it
My personal feelings aside, the whole thing was driven by emotionally inflammatory bullshit
 
@Trowski They don't?
 
I have a sweet spot for separatists, I must say
 
@kelunik libev cannot have signals registered in multiple loops. I think the same is true of libuv.
 
@Trowski there are, but no more than there should be … i.e. only defers do and there are assumptions on in which tick things must happen
 
3:48 PM
Also you are asking the wrong crowd really, since the overwhelming majority of opinion in here when it has been discussed has been in favour of remain. Again, personal feeling aside, merely a statement my subjective view of what I have observed
 
ah, late to the party I am. thanks @Dave
 
@Trowski What prevents it? What's your plan then?
 
There is not a single part of that image that has any foot in reality
 
@Trowski no? What does happen instead? (the signal obviously only ought to be triggered as long as the loop is running??)
 
Not that the remain campaign was any better
 
3:50 PM
@DaveRandom Generally, more educated people voted for remain, so ...
 
@bwoebi I'll have to look, but EvLoop fails that test. Maybe something else is going on.
@bwoebi A warning is issued: EvLoop::signal(): Can't start signal watcher, signal 30 already registered for another loop
 
wtf
 
@kelunik well, younger people are generally less educated than older people, since they are in the process of
 
@bwoebi @Trowski I think we should state in the spec that any loop implementation must pass the test suite in the latest ^1 version.
 
@FélixGagnon-Grenier ummmmm … no?
 
3:52 PM
@FélixGagnon-Grenier educated vs. experienced I'd say. But yes, younger people voted differently as well.
 
why not @bwoebi? if we take everyone in the 20, vs everyone in the 30. the 30 group is "more educated". the 20 group is "less educated". they're at school
 
@FélixGagnon-Grenier But there's also less older people who were that educated at all.
@Trowski is there no way to work around that? o_O
@Trowski at least it seems signals are global in ev, so, can't you just store these statically and enable/disable when you enter/quit run() method or something similar?
 
guys i saw a code like this 'public function Post(Request $request)' can anyone please explain it to me? like y is the 'Request' there?
 
@bwoebi As long as you don't have two EV implementations. ^^
 
@kelunik Indeed, but I have been quite careful to avoid saying things like that as it implies that people who vote leave are "uneducated" and that's not a rabbit hole I want to go down. When the bullshit is stripped away, there are good rational arguments on both sides. I believe there are more, better arguments on the remain side but that does not make me objectively correct or incorrect.
 
3:56 PM
@DaveRandom Yes, sure, I understand that.
 
@DaveRandom That's true. But Leave had far more populistic promises than the more rational remain side (though neither side was very rational…) … and in general populism is more effective with certain groups of people…
 
I think their position in negotiations isn't really better without the EU. The EU will negotiate something and Britain might be forced to accept something very similar without having to say anything in the EU negotiation.
 

« first day (2080 days earlier)      last day (2867 days later) »