« first day (2140 days earlier)      last day (2801 days later) » 

user895378
12:37 AM
@Trowski @bwoebi websocket client API first pass. Discussion on that thread encouraged.
 
user5189304
12:48 AM
Morning
 
2:29 AM
is there a way to set PCRE_NO_START_OPTIMIZE for a particular regex in php?
 
Wes
3:37 AM
moarning
 
4:01 AM
morning
 
user895378
4:26 AM
@Trowski @bwoebi just want to be on record as strongly disliking Awaitable as compared to Promise ...
 
user895378
It's a promise. That's exactly what it is.
 
user895378
Just because it's not a javascript-like "thenable" has no bearing on its actually still being a promise to resolve a future value
 
user895378
And the naming works so much better too ... Deferred::promise() ... it's actually a verb and a noun. So much nicer than Deferred::getAwaitable()
 
user895378
</rant>
 
@rdlowrey At this point I'm probably indifferent to the name, but I still think Promise is too well established as a thenable.
 
user895378
4:33 AM
Yeah, I definitely understand the logic ... it just gives me an internet sad face :(
 
Future was another possibility... don't recall why we didn't pick that.
 
user895378
I would even prefer Future to Awaitable at this point ... because it's a "future value" ... it doesn't actually have to be waited on. Seems more intrinsically appropriate to me
 
user895378
Yeah that.
 
user895378
And it's almost identical to the Future concept twitter created uses in its Scala finatra web framework
 
user895378
I do understand adhering to the principle of least surprise with regard to thenables
 
user895378
4:38 AM
I would actually go to bat for Future there if people aren't totally 100% committed to Awaitable
 
user895378
Also, Future is just a much shorter word ;)
 
morning
 
@rdlowrey I'd certainly +1 Future instead.
 
user895378
I'll try to find some time to create an issue on github.com/async-interop/awaitable tomorrow
 
@rdlowrey There was this issue in which many seemed in favor of Future.
I do like the duality of Awaitable and Observable
Interfaces with -able at the end give me a warm-fuzzy feeling. :-P
 
user895378
4:44 AM
Yeah, that congruency is the only thing that gives me pause as well
 
user895378
I may or may not have another instance of "bumping old thread terrorism" tomorrow on that issue ... will see
 
user895378
Question ... I used to hate having a directory inside my library specifically for exceptions but I find myself needing a ton of very specific exception types in this artax rewrite as diagnosing the specific cause of errors was always a major pain point in the old implementation.
 
user895378
Would it be the worst thing in the world to bite the bullet and just add a lib/Errors/ dir and stuff them in there just to keep the real code clear of all those files?
 
Good Morning
Sir i am doing work on sending push notification to iOS application through PHP
In this i am getting error
can some one help me for this
i am using Curl metod
by this i am getting error:- �@@�HTTP/2 client preface string missing or corrupt. Hex dump for received bytes: 504f5354202f332f6465766963652f353465653231653633
 
Mooarning
 
5:07 AM
@Saitama please help me
@Saitama i am getting this error :- by this i am getting error:- �@@�HTTP/2 client preface string missing or corrupt. Hex dump for received bytes: 504f5354202f332f6465766963652f353465653231653633
 
first of all, I do not have like, any idea about your problem, so, asking me would be the worst possible decision
and secondly, no need to ping random persons, if anybody wants to help, they will do so :)
 
monring
 
ohaio o/
 
5:23 AM
moin Gordon,Saitama
 
@LeviMorrison why does it need the ^ in front? can't we infer that somehow? In Java I can just write some_func((x,y) -> expr) or some_func(x -> { multiple expr }).
well, admittedly thats somewhat comparing apples and oranges, but I dont like introducing a new symbol. ruby uses symbols galore and its a mess to read
 
@rdlowrey I used to always put exceptions in an Exceptions directory. I think it helps declutter the main dir and make it easier to find the actual code.
@bwoebi preferred otherwise, and I didn't have strong feels about it.
 
user895378
@Trowski Agree. I never liked it before for some reason but I'm doing it in this artax rewrite, at least. Too much clutter otherwise
 
If there are a lot of custom exceptions, a separate directory may be warranted, but I hate inconsistencies :-P
 
@rdlowrey where you put files in the filesystem is mostly irrelevant as long as you keep sane namespacing. you IDE will tell you where the file is if needed
though you could argue that \Artax\Errors\SomeCustomError is sane enough. And it probably is for common errors in Artax. I just dont like it if it's component specific errors. IMO, those are better kept inside the package/ns they are specific to.
 
5:40 AM
@rdlowrey Looks good. That's very similar to the API I had for Icicle's websocket.
\Generator<Awaitable<Data>> would be Observable<Data>
 
user895378
Why do you need observable (in this particular case) when you can just say "this is a generator that always yields awaitables" ?
 
Or better yet, Observable<Data, CloseStatus>.
 
user895378
with the generator there's never a callback requirement
 
user895378
all yields ... which is what we want to encourage, right?
 
You can use Observer to iterate over an Obsevable in a coroutine.
 
user895378
5:44 AM
But I could just use a generator with yield and not have to understand how anything else works
 
$observer = new Observer($observable); while (yield $observer->next()) { $observer->getCurrent(); } $observer->getResult();
 
user895378
foreach ($generator as $nextDataPromise) {
    $data = yield $nextDataPromise;
}
 
user895378
^ only uses php language constructs
 
user895378
doesn't require me to know how the other 3rd party thing works
 
user895378
I'm up for whatever people like in this API, of course. Just trying to understand what benefits we get from observer/observable over generator in the above case
 
5:46 AM
@rdlowrey Doesn't work for data arriving asynchronously
The code will request another value from the generator when there may not be one available yet.
 
user895378
Inconsequential because it's all a coroutine and other stuff runs anyway.
 
user895378
The example code explicitly demonstrates how you can multiplex that
 
But there's not a way to asynchronously ask "Do you have another value?"
 
user895378
But in what scenario would you actually need that for this websocket case?
 
If you're iterating over received messages, you can ask for the next message, but there may not be a next message (yet or ever).
 
user895378
5:49 AM
Right, so the promise just hangs out until there is one
 
And if there isn't?
 
user895378
We don't care
 
Do I fail the promise?
 
user895378
The generator is smart enough to bail out if you call close()
 
user895378
If the connection goes away, sure
 
user895378
5:50 AM
Otherwise there's no reason not to let that one coroutine wait indefinitely
 
Hmm... that seems unintuitive.
 
user895378
Seems way easier than callback hell to me. You only care about doing something if there's something actionable.
 
user895378
And if you wanted to timeout for some reason just do:
 
user895378
 yield first([$nextDataPromise, new Pause(1000)]);
 
Languages that support async/await usually support async iterators using await: for example, Hack: foreach ($asyncgen await as $value)
@rdlowrey But we're still avoiding callback hell with Observables.
 
user895378
5:54 AM
But you have to know about 3rd party abstractions to do it that way
 
user895378
(BTW I'm not going to upset the apple-cart on Awaitable)
 
@rdlowrey Yep, just like you need a Coroutine to avoid when callbacks on Awaitables.
 
user895378
I understand that, I just prefer to use the native tools when they're sufficient for a problem
 
@rdlowrey In your example, you could resolve the promise with null when there will be no more messages. But it's not a general purpose solution.
Observable is sort of like Awaitable, a general purpose async set.
 
user895378
Just show an alternative in that thread with observables ... I don't care that much ... that's what the thread is for lol :)
 
5:58 AM
Would be nearly the same thing.
By Data, do you mean websocket messages?
Oh, n/m, you explain it in the comment
No need to expose individual frames... and I wonder if control frames need to be exposed either. The responses to control frames are defined.
 
user895378
I would want to be able to optionally access them
 
user895378
If for no other reason than to debug my own server things. It's valuable to hide them by default but be able to optionally expose that level of detail for when you want it if you have crazy power-user situations
 
Yeah, I guess so would I.
Maybe another method that delivers control frames.
 
echo "<script>window.open('http://www.google.com','_blank');</script>";
//sleep(5);
return $this->redirect()->toUrl("/customer/view");
i want to redirect on customer view page as wel as open new tab with pdf report
i try above code it's not working
 
6:14 AM
@km8295 If you want the browser to execute some JS to open a new tab, you need to do the "redirect" in JS as well
i.e. with window.location.href = 'http://whatever/customer/view';
 
Good morning
 
good morning
 
user895378
All right, calling it a night. Thanks for all the input @Trowski
 
user895378
@bwoebi FYI I'd conservatively estimate that I'm currently ~40% of the way through artax rewrite
 
@rdlowrey I should head to bed myself, night. o/
 
6:26 AM
Man, where are you people from going to bed now?
It's like, 08:26am here
 
Wes
mornin
 
morning
 
6:41 AM
morning
 
Hello @PrashantKasajoo @Oldskool
 
7:11 AM
morgen
 
morninVersion2.0
 
moorgen
 
room topic changed to PHP: Support group for those afflicted with PHP. Don't ask to ask, just ask. Chat Guidelines : guide.room11.org [php]
 
Someone to help me with this Q? :( I do not see to figure out what I am doing wrong
1
Q: Printing a html table with JS on window load

Marny A. LópezI need to print the contents of a table element to a POS receipt printer, I am doing it like this: <?php private function message(){ return '<!DOCTYPE html><html moznomarginboxes mozdisallowselectionprint><body style="padding:30px;">' .'<table id="print-area" style="height: 501px; bo...

 
7:28 AM
morning
 
Anonymous
mornin
 
I don't remember, do we flag plagiarized answers?
without attribution that is.
 
yes, flag it for a mod
 
@Epodax yes
 
Roger
 
7:50 AM
o/
 
o/
 
\o
 
mo the the mummy lovin' in
@Oldskool oh cool it contains the shebang fix :-)
The generator returns thing is in for 2016.3 apparently
 
I've got question about PHP getopt() function wouldn't it be usefull to provide additional argument with some flag like IGNORE_NON_OPT so the function wouldn't stop parsing on arguments?
 
8:05 AM
@DaveRandom I think it does, yeah.
 
@brzuchal I think it would be useful to provide a generally better API
 
I found it useless when you have arguments like

php script.php command --env=prod

I need to iterate `$_SERVER['argv']` and look for `--env` or substring match `--env=` because `getopt('', ['env:'])` stops on `command`.
@DaveRandom You mean completely rewrite this core functionality ?
 
@brzuchal No I mean something that doesn't require headfuck string format arguments and return a headfuck array format
probably something OO
and also something that allows you to pass in a custom string to parse, instead of using magic to get at argv
(so it defaults to the magical argv fetch but you can pass a string to override it)
It just feels like something that's too complex a subject to provide a single function that does All The Things
 
That would be nice. There are userland implementations like Symfony\Component\Console\ArgvInput but whey requires from me to provide full input definition and that sucks.
 
Basically I've found that getopt() doesn't do what I need more frequently than it does
 
Mornin' 11! Feeling good today!
 
Cheers!
 
@DaveRandom I think the same, any time I want to use getopt I drop it against other way of retrieving options. Most of the time I feel like programming in PHP is finding an userland implementation to provide satisfying libs for basic stuff because core doesn't provide it :(
 
@brzuchal well sure, but a lot of the time that's just because someone didn't get the API right first time (which of course is a problem I never have because I'm perfect) and no-one has written a better one yet :-)
 
at least when you need to do two really specific things at once php's got you covered
 
8:23 AM
OMFG, I didn't see that earlier
So it look's like there is need for API cleanup
 
@PaulCrovella that's presumably a hangover from Zeev and Andi's very first augmentation of PHP-FI
 
"a hangover" is an apt description of much of php's standard lib
 
Anonymous
!!wotd
 
mirabilia: marvels; miracles.
 
8:35 AM
\o
 
@DaveRandom Is it possible to propose such better API?
 
Anonymous
oh, bounty questions can't be closed...
 
it should be closed anyways.
 
you can try flagging it for a mod to close
really annoying that bounties protect shit like that
 
8:42 AM
i believe he is making backlinks for his fb page
 
@brzuchal I'll be able to take a look tomorrow - can you do me a favour and link me the latest version?
@brzuchal btw I forked github.com/Danack/Console so it doesn't suck.
the fork only does "routing" of CLI apps - it doesn't force you to use it to do the dispatching as well.
 
did they never accept your changes upstream?
 
@Danack You mean latest version of RFC:Object-Types ?
 
@Jimbo o/
 
8:46 AM
I believe it is deliberate that they don't want the library re-usable outside of symfony.
@brzuchal yes.
 
@Danack what a twat
 
@Danack don't bow out, keep it up
 
@brzuchal sure, the response may be "create a PECL extension" though (which is probably a decent thing to do first anyway)
 
@DaveRandom were there in history some plans to refactor whole API or wider than one simple functionality or it didn't happened yet?
 
8:53 AM
no clue
 
@PaulCrovella yes. At least he is consistent in his behaviour?
 
you can search the ml archives but I generally would say that the most pragmatic thing to do is create the thing you want and then ask for feedback. Until there's something concrete to base discussions, the bikeshedding:useful dialogue ratio is usually not good
(that's true of most things in life, btw)
 
THx, I'll think about that advise
 
@PeeHaa bookyourflightsbookyourflightsbookyourflightsbookyourflightsbookyourflightsbooky‌​ourflightsbookyourflightsbookyourflightsbookyourflightsbookyourflightsbookyourfli‌​ghtsbookyourflights
(friendly reminder)
 
yes sir
 
9:03 AM
:P
 
@DaveRandom guide.room11.org yw slacker
 
god damn it
 
Still need to clean it up and move shit to an include but at least it works now
@DaveRandom Does this mean you have to do actual work now? :P
 
I started doing some last night and currently I have 37 compiler errors and 197 warnings in resharper \o/
 
@PeeHaa I think he just liked the attention from people bugging him to fix it
 
9:05 AM
rumbled
 
@DaveRandom Did you see he fixed the guide and blog?
 
yeh yeh, whatever
 
also, what kind of bizzaro-world did I wake up in that @PeeHaa fixes shit now?
 
heh
 
don't worry, I'm sure I'll break it again soon
 
9:08 AM
Even a blind pig finds an acorn sometimes ;D
Though don't pigs have a generally great sense of smell?
 
cyka blyat
 
@Saitama 0_о
 
@Saitama wrong window, this isn't dota
 
@PaulCrovella :P
 
mornings
 
9:11 AM
Mornsko
 
momorn
 
@Danack I've always used Sf Commands like Controllers and put the actual logic in a separate object. That would allow me to unit test the actual logic and integration test the command
 
I knew that bot would be trouble
 
@Gordon May I also send you my CV for general review (gmail needed)?
 
9:17 AM
@Fabor I dont have gmail, but I guess you can figure out my email address from people.php.net if you know I am gooh
 
lol why is there a guy called "Shag" :P
 
:-)
 
probably a fan ^ ;-)
 
Anonymous
@DaveRandom The effort he went to in order to get free beer is admirable
 
9:22 AM
@Saitama not sure why one would put composite-insults in urban dictionary
 
@Saitama its not funny. its misogynistic
 
@Oldskool haha
 
those are insults you make up on the spot
 
:P sou ka
 
@Saitama :|*
 
9:25 AM
lol
 
@Gordon using a composite insult containing "dick" be misandristic then?
 
uh oh, you triggered him
 
why can't stupid insult be just a stupid insult
 
it's okay, @tereško, we'll find a safe space for you somewhere
 
@PaulCrovella DID YOU JUST SEXUALLY ASSAULT ME?
 
9:30 AM
@PaulCrovella to burn down?
 
HUMONGOUS WHAT?
 
Anonymous
lol
 
... now that I think about it ... it might be therapeutic
 
@MadaraUchiha Maybe? Yes. I mean are you into that? We could work something out I guess.
 
I think I have broken @MadaraUchiha
I'm sorry. I'm so, so sorry.
 
9:33 AM
@MadaraUchiha I've seen your avatar image from another name few months ago
 
speaking of burning things down... @MadaraUchiha you wanna torch this one?
 
@tereško depends on the context
 
@Gordon the real issue is that, the more you use some word, the less impact it has. Lately I have been seeing everything being described as "misogynistic". So much that it has most (if not all) of its effect.
 
@tereško you see so much of it because you spend your free time seeking that kind of thing out because you hate it and want something to mock
 
I spend free time playing games
just recently finished "Far Cry: Blood Dragon" - it was awesome in the 80s cheese sort of way
 
9:42 AM
@Gordon The issue for me was you needed to completely construct the "controller" before it can be added to the console app.
 
@tereško how is example #1 on that page not misogynistic?
 
@tereško I've heard good things. Only far cry I've played is 4, which I liked a lot.
 
@Gordon yes, the first example is misogynistic and the fifth example is hilarious
 
far cry blood dragon & far cry 4 were great, I really like the freedom of things to do, can someone recommend something similar (not assassins creed)
 
GTA V
 
9:55 AM
5 tabs, 17 processes
wtf Chrome >_>
 
@SergeyTelshevsky Saints Row
 
gta5 played
 
@SergeyTelshevsky Far Cry 3 :P
 
9:56 AM
as for first person ... hmm ... no idea
 
@tereško which one?
 
3 and 4
 
@Fabor far cry 1
 
Just Cause
 
@Fabor that one too :)
didn't like just cause for some reason
 
9:57 AM
^ same
 
That was so awesomey good looking for the time I just jizzed
 
Modded Skyrim for open world.
 
saints row 4 is a superhero/matrix game, saints row 3 is like GTA3 but with more fun and better graphics
 
And wackier
 
@tereško hence depends on context
 
10:01 AM
@SergeyTelshevsky if you can play older games: Arcanum
 
if you play arcanum make sure to max out the first evil spell and dont bother about the later ones. first evil spell is apocalypse at higher levels. drawback is you will be so evil that even the chickens attack you
also, if you can play older games: Fallout 2 and Planescape: Torment
 
y not fallout 4 then?
 
@Saitama because F2 is better?
 
haven't really played F2, is it nice?
 
let's put it this way: F2 was groundbreaking at its time.
the level of open worldness, humor, story and options were unrivaled
 
10:05 AM
i see...
 
of course, it might not hold true today
 
I dont like post-apocalypse in general
 
yeh, if you don't start until after it happens you miss out on all the fun
 
@Saitama when I saw the first trailer for F3 opening with "war, war never changes" it sent a chill down my spine only because of F2.
fun fact: it just did again, just by writing it into the chat
 
Anonymous
Fallout 4 could have been a groundbreaking game, but using the same engine as F3 along with the clunkyness and AI weirdness ruined it for me
 
10:07 AM
:D tho generally I don't like old games, this one seems it's worth it...
 
@JayIsTooCommon Agreed. Was just way too similar
 
@Saitama seriously, add Arcanum and Deus Ex to the "older games I must try"
 
> In 2013, GamesRadar ranked Fallout 2 number 68 on their list of top video games of all time.[13] That same year, IGN ranked it as the 28th best role-playing video game ever.[14] In 2015 PC Gamer ranked the game #3 on its list of best RPGs of all time.
from english wikipedia on f2
yeah, arcanum is really cool. I might give it another try. I only played as evil. might try good
 
@JayIsTooCommon Engine re-use is usually more due to console compatibility.
 
mage or mechanic?
 
10:11 AM
@tereško mage
 
try gunsmith
 
Anonymous
@Fabor Ah. I never tried the PC ver to be honest, I imagine if I modded it to shit I could probably enjoy it a lot more.
 
ah, the spell I was referring to was Harm from Black Necromantic School
 
@Fabor or when they already know they're making another sequel and start on it right away with what's available
 
Anonymous
When i first starting playing F4 i was buzzing, I thought it was great. But after a while.. it slowly got more clunky and glitchy and weird etc...
 
10:13 AM
> This spell causes damage to the target creature. The damage dealt is proportional to the caster's Magickal Aptitude, and can be extremely powerful at maximum.
 
heh yeah Paul
 
and it only cost 5 points to cast, that beat every other spell in that school
 
@tereško never played, might take a look
 
@Gordon you basically needed only black magic and teleportation (and few point to unlock shit)
 
@Gordon fallout 2.. finished it like ~7-8 times
 
10:15 AM
in contrast, Quench Life costs 50 and failed often enough. But one or two Harm spells finished off basically everything.
@SergeyTelshevsky good :)
 
yes
 
after the smooth handshake, I try to do this in the console ws.send("Random Message") and everytime I get hit with: WebSocket is already in CLOSING or CLOSED state.. So I am thinking, is the server do something after the handshake?
 
but you can't compare f2 to any of newer 3/nw/4 fallouts
like you can't compare GTA<=2 to GTA>=3
 
you can compare Deus Ex with DX:HR
:D
 
completely different games
@tereško couldn't play HR for more than 2 hours, but really liked the original DeX
 
10:17 AM
... and you can compare "Deus Ex: Invisible War" to "Bad Rats"
@SergeyTelshevsky I can send you clean installation of Arcanum (I own it on GOG)
 
no, thanks, will look at it a bit later :)
I have my first one week vacation since june'15...
I'm so happy
 
Theresa May says now is the right time to tighten UK border controls, while Farage is out of the country.
 
my last vacation started on may'15 and went on for about 8 months
@DaveRandom I guess I would be naive to expect both sides to take it as a joke it is
 
The tweet is from a comedy show on TV.
!!dad
 
What did the buffalo say to his son when he left for college? Bison
4
 
10:27 AM
Chortle
 
I'm looking for experienced PHP developer
 
It's a really good account on the whole, I dunno who they got writing the stuff but it's generally pretty up-to-the-minute and usually amusing
 
I've experienced a few things and I do PHP.
 
It's run by the production company rather than the BBC
 
can you send email
can you send me your mail
 
10:29 AM
protip: don't ask for people's personal information before you've even explained why you want it
 
in order to email them. duh.
 
:-P
 
@Fabor please write your mail
 
my email is peehaa@realfakedoors.org
 
10:30 AM
@idan there is no experienced php developers in here. we are seasoned chattors
 
lol
 
I was close to using room11 there :P
 
@Gordon Lol , I need php developer for project I have
 
thanks
 
10:35 AM
OK so firstly lolwut, and secondly strtotime('c') and strtotime('cat') also return values :-S — DaveRandom 1 min ago
Derick can probably explain what's going on there, I'd look myself but timelib is black magic and I've gone too far down that rabbit hole before
 
I sent , but if there is experienced developer who want to take my project (for money of course) can send me an email moidan4@gmail.com and add his CV
 
@DaveRandom I'm guessing they're timzone adjustments of some sort
 
@JanakaRRajapaksha SecondRikudo, probably.
 
I wonder when Tokyo Ghoul se 3, Boku no Hero Academia se 2, OPM se 2, etc are gonna come out
 
@PaulCrovella any single letter seems to return time() - ($letter * 3600), where a = 1, b = 2 etc
 
But it's not every random string of letters you throw in, cat works but cas and at don't
 
Hi all
 
@PaulCrovella ah, cool, at least there is some sanity
You should answer (I assume you are already doing so)
 
link to github rather than lxr though, because that lxr will probably disappear eventually when the php.net one is back up
@PaulCrovella I can if you want
 
10:43 AM
27 mins ago, by Saitama
after the smooth handshake, I try to do this in the console ws.send("Random Message") and everytime I get hit with: WebSocket is already in CLOSING or CLOSED state.. So I am thinking, is the server do something after the handshake?
 
yeah, off to go find it in github
 
But you should get the rep since you put the work in
 
@MadaraUchiha ah yeah i remember :)
 
* server supposed to to do
 
@Saitama is the server actually still running after the handshake?
 
10:44 AM
@DaveRandom yep
 
gist teh codez plox
 
wait lemme push my current codez to github then...
 
@LeviMorrison in JS: const complement = fn => (...args) => !fn(...args);
 
const isTwo = n => n === 2;
const isNotTwo = complement(isTwo);
 
Most of the cases I can think about is a function that returns a function, and the inner function encloses stuff from the outer one.
Alternatively:
 
@rdlowrey Not strongly, but I still would've preferred Promise………… \cc @Trowski
@rdlowrey here, have your rebuttal: github.com/amphp/websocket/issues/5#issuecomment-242348202 \cc @Trowski
@rdlowrey Are you really having that many exceptions? Perhaps you should then reduce the number of exceptions you throw…
 
doStuff((request, response) => {
  doSomethingAsync()
  	.then(result => response.end(result));
}
 
@Saitama Isn't your worker thread terminating after the handshake though?
You are just accepting a socket, returning the handshake response and binning the client socket as far as I can see
 
Hello I got a question about a mysql statement, anyone who got some time please look it up stackoverflow.com/questions/39142737/…
 

« first day (2140 days earlier)      last day (2801 days later) »