« first day (2291 days earlier)      last day (2660 days later) » 

7:00 PM
Anyway, my real point is it's all really just politics; no matter what any president does in the modern age there will be major complaints.
And the real issue is that we are actually divided as a nation.
 
user895378
I would, of course, much rather see that money funneled into education, for example.
 
So until we figure out how to unify it... the cycle continues.
 
do you know where that money is going ?
do you know why they call it a gag order ?
 
@rdlowrey particularly education to help people make better life choices so they don't need abortions, eh?
 
user895378
@JoeWatkins nope, just that it's nowhere positive if it can't be talked about
 
7:05 PM
you know that federal money can't be used to fund abortions, right ?
anywhere in the world, it's not allowed
what this does is stops healthcare professionals in the poorest parts of the world giving medically sound advice to their patients if their organization receives federal funds ...
go ahead and defend that ...
 
And, from Trump's perspective... why should we be providing healthcare to the poorest parts of the world?
America first.
Make it great again.
 
make it hated ...
 
@rdlowrey you 'lowest' build is failling because of a bug in phpunit
You need to uplift the phpunit constraint
 
@rdlowrey By the way, some recent studies suggest that funding, while important, is not really why our education is falling behind other first world countries.
 
user895378
@JoeWatkins no one is defending that, fyi
 
7:09 PM
Our youth don't care about education as much as foreigners do, and we prioritize things like sports way too much.
It's a culture problem.
 
@JoeWatkins By the way I think it's sad; sorry for pulling the room off-topic.
 
Anonymous
Tbf, Sean is doing quite well compared to his last appearance
 
o.O
 
Anonymous
Spicer :p
 
7:21 PM
What plugin/* handles cleverbot.io?
 
Anonymous
Terminator
 
Oh I'm behind on commits
that explains it
 
@Sean None
But if you are to implement it go right ahead :)
 
Noice
 
@Sean I currently scrape cleverbot.com, but support for cleverbot.io would be nice to also have in the lib if you want to take a stab at it
 
7:31 PM
@MadaraUchiha are you around?
 
@Tiffany I am
Sup?
 
@MadaraUchiha Do you watch JoJo's Bizarre Adventure?
 
Anonymous
Oh sorry @Sean, my bad missed the io
 
@Tiffany I don't.
Although, you might want to try the Anime room
 
@MadaraUchiha :(
 
7:32 PM

 Maid Café (メイド喫茶)

Welcome back, my Master! (お帰りなさいませ、ご主人様!) Sit wherever you'd l...
 
yeah
I know, off topic for php chat
 
@Tiffany Not that
 
I was curious if you did though :P
 
There might be people who actually see it there :D
 
I've introduced it to several people, I think only one or two people didn't enjoy it because the characters are beefcakes
 
7:35 PM
Where's it up is interesting, but that's a lot of info
 
@Tiffany 😋 yeah, I'm familiar with it
Even though I haven't seen it
 
ahhh
The namesakes make me snicker
and the fact that a bunch of weeaboos were introduced to Yes from JJBA
now I want to listen to Roundabout
 
o/
 
7:45 PM
o/
 
How are all?
You settled now @Ekin?
 
Yeah for now, how about you?
 
I guess so since I just ordered a monitor and an xbox.
If only I could solve the clothes issue though.
 
Issue with clothes? :D
 
@Fabor How can clothes be any issue.?
lol @Ekin
 
7:50 PM
^^ that :D
 
Naked is OK.
 
@PeeHaa Size 47 shoe is so far impossible to find. And my leg size too.
 
lol
Try a boat instead
 
Not that I wear trousers often.
lol
 
@Fabor easy, go on the internet and order legs of new size
 
7:52 PM
@PaulCrovella lol.
There's a real lack of websites for ordering here too. I've been spoilt by amazon.
 
Yeah, life is not easy in Kosovo.
Especially if you're a Yeti
 
hehehe
 
Easy -> Opportunity though. Necessity is the mother of invention.
 
1) Pick the name of a major river
2) Make a website that slowly starts to sell everything
3) Never actually turn a profit
4) ???
5) Profit?!
 
heh
Best thing to buy here is probably property.
 
user895378
7:58 PM
All right, anybody have an idea why my coveralls is failing here: travis-ci.org/amphp/stomp/jobs/194588726
 
user895378
?
 
Disappointed it isn't Daniel's wardrobe malfunction picture in that link.
 
user895378
hehe
 
Anonymous
Has anyone really fixed the resolution problems on gnome, kde, xfce ...
 
Anonymous
Everything is so tiny
 
8:01 PM
Yes, I moved closer to the screen.
 
Anonymous
Also tweak is terrible
 
@rdlowrey Just remove that .coveralls file
 
user895378
@bwoebi still not working :(
 
@rdlowrey github.com/amphp/amp/blob/master/.travis.yml just do it like there, without extra flags?
 
8:09 PM
Looking at my first foray into PHP. Ew ew ew ew ew.
 
user895378
yeah I tried all of that first lol then it still wasn't working so I started resorting to flags to see if I could fix ...
 
@rdlowrey uh, it searches for a clover file in the root dir… remove that flag too
 
user895378
 
user895378
oh, you mean it searches in the root_dir directory?
 
8:14 PM
@rdlowrey yes
remove that flag too
 
user895378
all right, trying again ...
 
the root dir is not the source directory
 
@Fabor I love those videos from tom
 
@rdlowrey better? :-)
 
user895378
\o/
 
user895378
8:16 PM
thanks :)
 
Yeah, he is good. Videos are the right length too
 
^.^
 
user895378
i've literally been fighting with that for half an hour
 
Live NOW! Talking PHP 7.1 with @dshafik, Sean DuBois & @morrisonlevi. Join us! :) http://phproundtable.com
nice to be invited ...
 
No one loves you @JoeWatkins
 
8:19 PM
@Tiffany Shut up :-P
 
we'll just make our own roundtable... with @JoeWatkins.. and hookers
 
I'm in ...
 
user895378
Sign me up for that, too.
 
Can we have cloaks too?
 
n... no. ya weirdo.
 
8:24 PM
@JoeWatkins It's a pretty shit podcast anyway
Pandering
 
What? I'll start my own roundtable with dope ass cloaks then.
 
Brown nosing and "why hasn't my RFC been accepted" - I stopped listening after he basically begged over podcast
 
@Jimbo I tried to do it before ... too many people ... I don't think I spoke much at all ...
I just heard that embedding php code in an extension makes it easier to write an extension ... so I'm switching it off ...
 
:'D
 
@bwoebi <3
First world problems: Amazon Web Reader displays code in a tiny ass font. My kindle can't connect to the wifi. I can't read my damn book.
 
8:39 PM
31
Q: My Girlfriend is going to prison...Save her with Math

Prisoners DilemaSalacious title, but true story. dmethyl1 = { {0, 0}, {.25, 1}, {.5, 7}, {1, 26}, {1.5, 40}, {2, 45}, {2.5, 45}, {3, 44}, {3.5, 44}, {4, 43}, {4.5, 41}, {5, 39}, {6, 38}, {7, 37}, {8, 35}, {9, 33}, ...

@Tiffany What book are you reading? 😀
 
@MadaraUchiha Modern PHP
 
@Tiffany I half expected you to say "PHP: The good parts"
 
Does using a setter in a constructor make sense?
 
@MadaraUchiha I thought you were referring to the satire site. I only just realized there's an actually book named that
 
@Tiffany I was, in fact, referring to the satire site.
But I know there's an actual book too.
@TomasZubiri Sure
 
8:46 PM
I'm not reading either :D
 
I mean the whole point of the setter is retaining control (which you nearly never need) over how a veriable is set.
Say your setter is like this:
 
I'm messing with an old form I wrote about five years ago, trying to figure out if I can write it in such a way where it doesn't rely on javascript alert boxes to output data to the user.
 
public function setFoo(int $newFoo) {
  $this->foo = max(min($newFoo, 10), 0);
}
$this->foo can only ever be between 0 and 10
And this logic is contained in the setter for $this->foo
If you want the constructor to respect that, you can either replicate the logic there, or just call the setter when the variable is passed from the constructor.
 
@JoeWatkins about the `-g` I have found the following:
- `-g -O2` are simply the defaults of autoconf: https://lists.gnu.org/archive/html/bug-autoconf/2008-08/msg00009.html https://lists.gnu.org/archive/html/autoconf/2006-04/msg00002.html
- I've made a branch with a simple change that fixes this (still respecting the user options if set): https://github.com/php/php-src/compare/PHP-7.0...pmmaga:no-default-debug based on this answer: http://gnu-autoconf.7623.n7.nabble.com/Setting-optimizations-without-violating-autotools-principles-td8882.html#a8883
 
@Tiffany I can think of a couple ways
What kind of UI do you have in mind?
 
8:49 PM
That's super helpful. I was only thinking of setters in terms of alerting the developer when he tries to set a wrong value.
 
@TomasZubiri That can also be done
 
Nothing specific. It's a simple quiz form. The PHP is originally at the top, debating on putting it at the bottom. The quiz will be embedded into another page.
 
public function setFoo(int $newFoo) {
  $this->logger->log(LOGGER::DEBUG, "Bad value for foo, expected between 0-10, got $newFoo instead.");
  $this->foo = max(min($newFoo, 10), 0);
}
 
@pmmaga hmm ...
why is it the default ?
 
I'd like to add a conditional at the top of the form that says if ($score < 21) { echo "<div><p>blah blah blah</p></div>; } or something like that. Stepping through the logic myself is not getting anywhere, so I'm trying suggestions from books.
 
8:52 PM
@rdlowrey why do you use the ugly brace style? ^^
 
@bwoebi is there any reason -O2 needs -g ?
 
@pmmaga Why should -g not be used by default?
You always want debug symbol right?
 
@JoeWatkins -g is just adding the info about names etc. so that backtraces on debug builds are not useless
 
@NikiC I would expect them only with --enable-debug
 
I know what it does, it's used in production builds
 
user895378
8:53 PM
@bwoebi just because I've given in ... too easy to just say, "fuck it, I'll do PSR-whatever without exceptions"
 
@pmmaga --enable-debug = unoptimized, with assertions
Which is orthogonal to whether you want debug symbols or not
 
@rdlowrey github.com/amphp/stomp/blob/master/lib/functions.php#L5 confusing variable … if you bin2hex, length will be actually double
@rdlowrey :-( … could you … please change it? It annoys me, really ^^
 
user895378
@bwoebi Oh, I was just doing that to make the terminal output easier to read ... I'll remove the bin2hex call once it's time to polish up for a tag
 
@rdlowrey then add a todo to not forget that
 
@bwoebi ooooh, goto
 
8:56 PM
@NikiC That's true, but isn't it kind of unexpected that they are present when you don't ask for them explicitly? Meaning, if you don give any options to ./configure and make shouldn't they be excluded?
 
@pmmaga Let's ask it the other way around: What's the problem?
Having debug symbols is more useful than not having debug symbols. Why do you want to avoid them?
If you want to reduce size, use strip
 
@rdlowrey I think we can get easily rid of these gotos in the code …
 
that's what all packages do @NikiC
I don't expect production builds to have debug symbols, I only expect them in debug builds ... which seems rather obvious ... I expect a production binary to be as small as possible ...
 
user895378
@bwoebi feel free to optimize the parser for perf improvements
 
user895378
I like the goto use there just because it makes the parser super readable
 
8:59 PM
@rdlowrey I meant readability improvements
 
Talking of which; Linux fonts, make me cry.
 
@NikiC That's perfectly valid, can't argue with that. I just found it weird to see them included on a production build. But if it doesn't cause any perf hits or security concerns I'm probably just worrying for no good reason (as usual :D)
 
I think it's a surprising default for autoconf, but reluctant to change it whatever ... there's probably a good reason for it ...
 
indeed, even if that reason is simply as niki stated: why not?
 
well, pola ... but not super important ...
 
9:12 PM
yup, it was the astonishment that made me look into it. :P But all right, case closed! :)
 
agree
 
@rdlowrey technically STOMP 1.2 allows \r\n\n or \n\r\n (especially the latter will fail to parse, and the former will contain a trailing \r) …
 
anyone ever looked at internal functions yielding ?
 
@JoeWatkins uh?
you mean like internal generators?
 
yeah
 
9:20 PM
not supported currently
@JoeWatkins just provide an Iterator
 
user895378
@bwoebi How?
 
@JoeWatkins what would that even mean?
 
@rdlowrey if there are two consecutive EOL, and EOL is defined as \r?\n … so \n\r\n is valid
 
no idea how it would work, iterators are good enough I suppose ...
$headerLines = \preg_split("/[\r?\n]+/", $rawHeaders);
        foreach ($headerLines as $headerLine) {
            $headerDetails = \explode(':', $headerLine, 2);
            $field = $headerDetails[0];
            $value = $headerDetails[1] ?? "";
            // Only the first occurrence of a header matters in STOMP
            if (!isset($headers[$field])) {
                $headers[$field] = $value;
            }
        }
        if (isset($headers["content-length"])) {
            $contentLength = (int) $headers["content-length"];
 
user895378
@bwoebi where did you see that in the spec?
 
user895378
9:22 PM
@bwoebi because I don't think that's allowed
 
@rdlowrey in the ABNF at the bottom
I.e. that part:
EOL                 = [CR] LF

frame               = command EOL
                      *( header EOL )
                      EOL
 
we're always creating arrays, would be nice if you could force internal functions to yield values rather than create arrays, without changing preg_split or whatever ... just a thought ...
 
user895378
@bwoebi I don't see the problem with the parser ... can you write a failing test?
 
user895378
Or at least paste a message with \r\n that will fail?
 
@JoeWatkins What if I actually wanted the array though?
Say I wanted to look at the length of the resulting array
Can PHP generators do that?
 
user895378
9:25 PM
Because the headers can only end in \n\n or \r\n\r\n according to that abnf
 
user895378
and both are accounted for
 
@MadaraUchiha ... sort of.
:D
 
JS generators can't
 
@MadaraUchiha without changing preg_split ... so just call it normally ... but from nikitas/bobs reaction, it's probably crazy thing to ask about ...
 
iterator_count($generator)
 
9:25 PM
You need to actualize them with [...generator()]
 
@rdlowrey can't they end in \n\r\n? \n is a valid EOL and \r\n too?
 
@LeviMorrison ugh
 
user895378
@bwoebi no
 
I see
 
But it consumes the generator.
 
9:26 PM
so there's an entire set of functions that provides array-like functionality, while consuming the generators?
Pretty much?
 
@bwoebi I'd like to move arrow functions to discussion soon; can you go through and make any style edits to the RFC?
 
user895378
@bwoebi in practice literally no server is going to mix windows and nix line endings but I suppose we should write a test case for it and make sure it doesn't bork anything in the client, at least. If they do then it's not my problem as long as the parsing code doesn't break.
 
@rdlowrey okay
@LeviMorrison can we - please, please - remove the trailing space after fn?
@LeviMorrison Uh, place the voting widget at the end please, also wrong header type
 
user895378
again, the psr people already mandate function () { so to me it makes sense for it to be consistent (even if it's consistently ugly)
 
@rdlowrey I like fn being consistently distinguished from function
 
9:34 PM
nn
 
user895378
@JoeWatkins bai
 
@bwoebi Wrong header type?
You mean move it up one level?
 
@LeviMorrison something like h3 instead of h2
 
@bwoebi Sure. I like the space and I think others do as well, but I know you and Nikita like it without it so... it's just bikeshed. Go ahead.
 
> in practice literally no server is going to mix windows and nix line endings
Oh my sweet summer child
 
9:43 PM
I need help with feedback for the following code:
I have a main function that takes an array with 2 different keys.
I made a helper function that generates these arrays by reading a csv file.
I want to give devs the option of using a hardcoded array or one read from the csv file.
So I thought I could create a class that holds 2 members. The main function would take an array of objects. The objects could be initialized with new in code. Or generated with the helper function.

The code for the class is as follows:
 
user895378
@Dereleased please. Context.
 
user895378
COMMAND\n
header1:value\r\n
header2:value\n\r\n
 
user895378
^ No server will do that
 
@rdlowrey Never ever ever ever ever trust those dirty servers, especially with line endings. I mean, I saw you were going to write the case, but... I mean, people are awful.
and servers are made by people
 
user895378
@Dereleased in which case people can file a bug report
 
user895378
9:44 PM
@bwoebi that's not legal syntax
 
user895378
they're http style headers
 
@rdlowrey Ever been to a company where you have windows machines and macs?
 
@rdlowrey "output valid, no reason to fix"
 
COMMAND\n
header1:value\r
header2:value2\r\n\n
 
user895378
consecutive EOLs signal the end of the headers
 
9:44 PM
Yeah, it happens. A lot.
 
user895378
@bwoebi your example isn't wasn't valid
 
@rdlowrey realized that too - removed
it was valid, but the "header2:value2" was no header then anymore ;-)
 
user895378
anyway, trivial to account for
 
I once had to send email to be received by a machine that would accept \r\n (as in what the original RFCs state it should be) for everything except the break between headers and body
/me vomits
(clarity: it only accepted \n\n to break headers from body)
 
10:06 PM
Many other languages have ways to write closures in a succinct form as well. TODO: decide how much summary of this topic should be given here. At minimum provide links to closure documentation for a few other relevant and major languages?
@LeviMorrison ^ what do you plan to do with this TODO?
 
Not sure yet; ideas?
 
@LeviMorrison I personally do not give much value to that - just because others do it, it doesn't mean that it's great. But it may persuade other people
So I see no harm in adding a few
 
Maybe to other popular, domain-relevant languages like... JavaScript and C#?
 
So apparently PHP works a bit differently when you give it a -e option: 3v4l.org/hskOD if you run this locally with and without this option it will give different results
 
Hello everyone, any idea how to copy of the name of select option and replicate the values in database
 
10:14 PM
It matters because XDebug forces -e behavior always
 
like squash and the new file calls squash(1).
The same idea like you do in windows
 
@nikita2206 the reason is that yielding always advances the opline before returning
@LeviMorrison yep
 
10:33 PM
I love how when I type "xam[...]" when I'm searching for xampp on Windows to open the control panel, that "Uninstall XAMPP" shows up before "XAMPP Control Panel," it's almost like I'm being told something subliminally. (Yes, I know Windows alphabetizes the search results.)
So if I hit enter prematurely, Uninstall XAMPP opens instead of the control panel
 
gn all
 
@bwoebi I'm not following how that explains the difference. The first call to $refl->getExecutingLine() is returning different values depending on whether -e was given.
 
@PaulCrovella yes, because -e adds EXT_STMT opcodes after each op, on the same line
 
ah, I see. thanks.
 
10:50 PM
How to write :// on wiki? Currently it starts monospaced font and never ending when trying to put ''://'' in RFC.
Never mind, got it '':/''''/'' works :)
 
@brzuchal try ''%%://%%''
 
@rdlowrey gist.github.com/bwoebi/57fb42a7c6979f17839508bfc1dfa5e4 removing gotos… how readable/unreadable is this?
 
@NikiC THX, worked.
 
11:21 PM
@rdlowrey it's only half the length and much more linear code IMHO, you are with the gotos jumping up and down…
@rdlowrey github.com/amphp/stomp/blob/master/example/read.php#L19 may you please add an example what to do with $subscriptionId?
 
Hello
i have in database squash
 
Hello, I am Galstaff.
 
and i want to transform next insert in database
 
@rdlowrey is there any reason why not to make properties on Frame class public? … It's a classical value object
 
row
squash(1)
if i copy
squash(2)
how to transform that?
 
11:27 PM
@rdlowrey any reason why you defer promise resolution to next tick in onServerReceiptFrame - same with error case?
@rdlowrey also: any reason why you need to directly provide a read(): Promise<Frame> function? I can see usage for debugging, but that's all … wouldn't it be better to just provide some debug flag you can toggle off and on which will dump data then?
@rdlowrey Client::OPTIONS["vhost"] looks a bit clumsy… why not just "vhost" as array key then? (same for all the other options)
I'd put the $this->connectionPromise = null; into the when() in connect() function instead of in the doConnect()
@rdlowrey the determineNegotiatedVersion switch could just use array search … if ($version = array_search($versionHeader, Version::STRINGS)) { return $version; } throw ...;
@rdlowrey Is it possible (yeah, it's early) to put a layer on top which ensures that connection never goes away, i.e. retries each 1, 2, 4, …, 128, 256 and then each 256 seconds repeatedly (configurable … your backoff thing ;o))?
I do not like to guard a lot of places against StompExceptions nor do I want to crash the whole process because of that)
@rdlowrey … well, you already have filter … then why do we need read()?
@rdlowrey I think I have mentioned what disturbed me…
 

« first day (2291 days earlier)      last day (2660 days later) »