« first day (2048 days earlier)      last day (2886 days later) » 

user895378
12:02 AM
@Wes you aren't sending anything back in to the yield expression
 
user895378
That's why null comes out
 
Wes
@rdlowrey how do i do that? :\
 
user895378
 
@Wes Nikita Nefedov did most of the hard work. It was a considerable effort. But if the RFC doesn't pass now it's not wasted effort. Reboots with type inference support and/or named types support may come in the future.
 
Wes
uh. i have no idea how that could be useful to me though @rdlowrey do you have any example?
 
12:05 AM
hrrmmm... I might have missed something in the generator rfc's example and in the documentation, but is it expected that a function returning an empty generator will suppress it's content?
 
user895378
@Wes It starts being useful when what you yield from the generator is some asynchronous primitive like a Promise
 
user895378
In that case you have some "framework" code that waits until the promised value resolves and then it sends that value back into the generator
 
user895378
And if the async operation fails then it throws the resulting error back into the generator
 
user895378
So we're able to use yield to effectively "pause"` execution of that specific generator function until some future operation completes
 
user895378
And that allows us to do other processing while we wait for the async thing to complete.
 
Wes
12:07 AM
i know some of these words need to learn async
 
user895378
In the right circumstance it makes the generator function operate like a green thread
 
user895378
And that's how we start being able to do things concurrently even though php is a single-threaded language
 
user895378
And it's that concept that forms the basis for all this async standardization effort folks are working on
 
Wes
i feel i'm missing a big part of programming :B
 
@Wes … you are ^^
@rdlowrey when are you going to have a little time to work more on Amp?
 
Wes
12:12 AM
eheh
so far i'm using yield just as replacement to Iterator classes :B
 
That's one of its uses… and admittedly the one I use the least often
the power is in sending values in
 
Wes
i had no clue about that till 5 minutes ago :B
 
@Wes you even created a logo for us and still didn't even have the slightest gist of amphp… meeeeeh.
 
Wes
learning async is something i want to do. i did that because i know how talented you guys are and you deserved a bad ass logo :D
or at least, something better than a @ :B
 
Adi
1:18 AM
mornin
 
Adi
@MaryDaisySanchez are you from ph?
 
Adi
philippines?
 
2:40 AM
morning!
 
Gm all
 
Jek
3:23 AM
G'DAY ALL
no one wants to talk to me
 
Adi
@Jek good morning :D
 
Jek
Good morning :D How is ur day going? @Adi
 
Adi
quite good haha @Jek
 
3:52 AM
Moin.
 
Ekn
4:08 AM
MOrewIIIIINe
 
 
1 hour later…
5:14 AM
posted on May 25, 2016

New Cyanide and Happiness Comic

 
6:08 AM
moin
 
'nin
 
Ekn
mornin
 
Morning
 
morning!
I want to limit gallery g record with this join query
SELECT `g`.*, `gi`.`url` image, `gi`.`url`, `gi`.`is_default` FROM (`ncc_gallery` g) LEFT JOIN `ncc_gallery_image` gi ON `g`.`id` = `gi`.`gallery_id` AND gi.status = 0 WHERE `g`.`status` = 0 ORDER BY `g`.`id` desc
 
Morning
 
6:31 AM
Best. Fizzbuzz. Ever. http://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/ via @joelgrus
4
 
7:03 AM
Trying to go from 'can use MySQL' to 'can use MySQL well'. Any book/site recommendations (other than the docs, obviously)?
I'm aware that this isn't a PHP question. :) Just also aware that the overlap of users is significant.
 
ya @MattPrelude sure it's not an php question ... but ya i resolve this by php by count array
 
that doesn't make any sense, in context of the question....
 
7:19 AM
@Saitama then you have any idea for above question ?
 
@BhavinShah Stop using those horrible aliases first
 
@BhavinShah No I don't.
 
Thanks @Danack, that's the one I came across too :)
Will put it on order
The high performance mysql book
Will look into the other as well
 
sure @PeeHaa any idea for the question ?
 
Anonymous
7:24 AM
Monring
 
@JayIsTooCommon 'nin
 
moin
 
o/
 
morning
 
7:42 AM
\o
 
8:16 AM
morning!
 
8:34 AM
indeed
 
did you see the guy complaining on reddit that php folks talk about cats too much ?
@Fabor ha
 
Yeah, what developer doesn't love cats -_-
Got your PHPSC ticket? :P
 
I'll get it next week
 
@Fabor Yes, followed by a list of "the best people to follow on twitter" - i.e. the people who complain the most on reddit
 
8:38 AM
moin
And to start the day:
user image
4
 
Good start
Mornbo
 
@DamienOvereem "Image not found"
 
@DamienOvereem imgur pls
 
damn slack!
 
8:40 AM
Hi All anyone know about peoplevox open api
 
boom!
 
user image
6
HOLD THE DOOR!
 
HODOR! xD
 
:'(
 
Anonymous
8:50 AM
hahahaha
 
> German has two commands, BEER and SCHNITZEL
 
Happy Towel Day to all of you!
8
 
SCHNITZEL BEER BEER BEER BEER BEER BEER BEER
SCHNITZEL BEER SCHNITZEL SCHNITZEL SCHNITZEL BEER SCHNITZEL BEER
SCHNITZEL BEER SCHNITZEL SCHNITZEL BEER BEER SCHNITZEL SCHNITZEL
SCHNITZEL BEER SCHNITZEL SCHNITZEL SCHNITZEL BEER BEER SCHNITZEL
SCHNITZEL SCHNITZEL SCHNITZEL SCHNITZEL SCHNITZEL SCHNITZEL SCHNITZEL BEER
SCHNITZEL SCHNITZEL SCHNITZEL SCHNITZEL SCHNITZEL SCHNITZEL SCHNITZEL SCHNITZEL
SCHNITZEL SCHNITZEL SCHNITZEL SCHNITZEL SCHNITZEL SCHNITZEL SCHNITZEL SCHNITZEL
SCHNITZEL SCHNITZEL SCHNITZEL SCHNITZEL SCHNITZEL SCHNITZEL SCHNITZEL SCHNITZEL
 
Ekn
ôÔ
a day for towels
 
lolwut?
 
8:51 AM
@Ekn wear it with pride
 
Huzzah! Free eBooks every day \o/… meh… by Packt Publishing… but still free
 
Ekn
wait
that towel day?
 
feels like a reference I should get, but I don't ...
 
8:54 AM
!!wiki towel day
 
!!? towel day
 
oh come on @Jeeves
 
@Jeeves are you dead?
 
Towel Day is celebrated every year on 25 May as a tribute to the author Douglas Adams by his fans. On this day, fans openly carry a towel with them, as described in Adams' The Hitchhiker's Guide to the Galaxy, to demonstrate their appreciation for the books and the author. The commemoration was first held 25 May, 2001, two weeks after Adams' death on 11 May. == Origin == The original quotation that explained the importance of towels is found in Chapter 3 of Adams' work The Hitchhiker's Guide to the Galaxy. A towel, it says, is about the most massively useful thing an interstellar hitchhiker can...
 
ah, hitch hikers guide ...
 
8:55 AM
VS is taking too much time to install Windows 10 sdk...
 
Anonymous
@Saitama @PeeHaa CPR pleasseeee
 
!!version
slaps @Jeeves
 
ugh, really?
 
Anonymous
somebody call 911 :'(
 
9:00 AM
@PeeHaa got milk logs?
wait, let me fire up my test instance, see if we can track the issue down if I have a console in front of me
!!version
 
!!alive?
 
!!version
 
OK running tip of master
 
9:04 AM
 
@Saitama Yeah, programmers who start their curlies on the same line, and people who are wrong.
Also
 
:P
 
@MadaraUchiha !!kill @MadaraUchiha
 
@DaveRandom Operation failed.
 
tho, tbh, I would go with the right one...
 
9:08 AM
@Saitama Yeah well, if you went with the right one in JS, you'd be punched in the face.
return
{
  foo: "bar"
}
 
meh...
 
You'd think that this returns an object {foo: "bar"}
It doesn't.
 
what does it do then?
 
@Saitama Thanks to automatic semicolon insertion:
 
null?
ah!
 
9:09 AM
return;
{
  foo: "bar";
}
And { foo: "bar" } isn't an object in this context
It's a block, with a label foo and a single expression statement "bar"
That won't be reached
 
js.. is wierd..
 
Because you already returned.
 
unreachable!
 
@Saitama That's not weirder than the arcane function naming PHP has. All languages have legacy.
 
btw, this all ^^^ is because Javascript is insane, not because of some magic sauce that makes this sensible
 
9:11 AM
:P... for example, all the array_*...
 
@DaveRandom It's because it opted not to have the same level of ambiguousy as PHP's syntax
Nothing more, nothing else.
labels are something no one today uses, they're legacy.
If they weren't there to begin with, there would have been no reason for that to not work as expected.
 
I'm not saying that PHP is any better, but automatic semi-colon insertion was never a good idea
 
@DaveRandom It's implemented badly, when implemented well, it's still not a good idea, mind you, but it works well.
 
if I have a Config interface and an implementation that returns hardcoded values, what would you name the impl?
HardcodedConfig sounds weird
 
automatic semi-colon insertion just makes programmers, just lazy...
 
9:14 AM
did you just call requiring a semi-colon ambiguous ?
it sounds like you did @MadaraUchiha
 
@Patrick What config data does it contain?
 
@Gordon it's in the namespace queue, so just queue config values
 
@Patrick Then call it QueueConfig
 
@Gordon but that doesn't really describe the impl. Usually I try to be as explicit as possible (DbalConfig/DoctrineConfig/FilesystemConfig/YmlConfig etc)
I just need a good name for something that has it hardcoded
 
@Patrick If it's hard coded config, presumably they are default values?
 
9:23 AM
@DaveRandom for now there is no way to overwrite them except with a different impl.
 
@Patrick It's still a "default" though, the thing that is used unless you provide something else
DefaultQueueConfig is my suggestion
Although tbh I'd suggest that maybe your design here is wrong, and rather than creating a hard-coded config object you should hard code those values into the thing that uses them and make supplying a config object at all optional
If most of the time you are going to be doing new Thing(new ConfigImpl), why bother?
 
@DaveRandom tests. Otherwise I wouldn't have created an interface
 
Anonymous
jollow
 
@Patrick You can still provide a config interface
class Thing
{
    public function __construct(ConfigInterface $config = null)
}
 
9:31 AM
@DaveRandom it's used in multiple classes
So I need it in it's own class. And a separate impl for tests
 
Then I definitely think it's DefaultQueueConfig
 
makes sense. thanks
 
I like config value objects :-)
Even if they're just built in a factory from a configuration file
That's my default approach actually
 
@Patrick why is it more important how its implemented than what config values I actually get out of it? the only reason you would do that is when you want an abstract class for the interface you then subclass the queueConfig from
 
What's 1.0 in this header("HTTP/1.0 404 Not Found"); ? Is that always fixed?
 
9:41 AM
!!google http protocol version
 
Search for "http protocol version" (https://www.google.com/search?q=http+protocol+version&lr=lang_en)
• Hypertext Transfer Protocol - Wikipedia, the free… - The Hypertext Transfer Protocol (HTTP) is an application protocol for distributed, collaborative,… (https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol)
• Hypertext Transfer Protocol Version 2 (HTTP/2) -… - This specification describes an optimized expression of the semantics of the Hypertext Transfer Pr… (https://http2.github.io/http2-spec/)
 
@stack It's the HTTP version.
^ that
 
@Gordon because the interface already describes what you get out of it
 
@Oldskool Ah
 
@Patrick huh? You said its called Config. That doesnt tell me what I get out of it. QueueConfig does
 
9:43 AM
interface Queue\Config
class Queue\DefaultConfig
use Queue\Config as QueueConfig
 
I wonder whether you actually need that interface to start with
 
only for tests in this case
 
why? can stub/mock the concrete thing
 
@Gordon not a big fan of doing that with phpunit. I prefer to create a clean stub that implements the interface
 
@Patrick waste
 
9:46 AM
@Oldskool Just may you please tell me how do I understand what HTTP version am I using?
 
@Gordon meh, I like to follow DIP and it worked out well so far. Also less code inside the actual tests, so easier to read
 
@Patrick assuming that the config is only used within code in that namespace/package, I dont see why this would create an issue with DIP
 
@Gordon because you are depending on an implementation not an abstraction. I agree it's not really a big issue since it's all relatively close together, but there are already 2 implementations (default and test) so I don't see a problem with using an interface
 
@Patrick except for finding a name for it and it being superfluous :)
bit I agree its not a big issue
 
it's like code reviews, the smaller the PR, the bigger the discussion :)
 
9:58 AM
random fun fact: I hate code reviews.
 
what? I love them
so many benefits
 
@stack That depends on your web server. It should show you the version is uses/supports in the response headers it sends, like: HTTP/1.1 200 OK
 
I dislike paying for code reviews ..
 
Help me in the following query if anyone has any idea about it: - In over-the-app android app installation, User redirected to app store if clicked on download the app link. But I dont want my user to redirect to anywhere. What I want is when user clicks on download app link on my website he should get a popup where he will sign in thorugh gmail , select mobile and agree to the permission , then app will automatically download on his mobile
 
@DamienOvereem That depends on what you plan to do with the code. If you expect it to turn in a good profit for you(r company), then a little investment wouldn't hurt to hire a true professional.
 
10:03 AM
@sumitsouda are you developing malware?
 
Yes, code reviews -can- be usefull. But only if the reviewer and coder are decent in human interaction/communication. When they are not you get useless worthless endless discussions about insignificant things.
 
No I m not
why is this question??
 
Anonymous
Why are there hollow and filled stars now ? >>>
 
I just want to restrict the user to redirect anywhere
 
No clue..
 
10:05 AM
@JayIsTooCommon hollow = pinned stars
 
Anonymous
@HamZa Is that new?
 
@JayIsTooCommon nope.avi
 
@JoeWatkins No
 
ok NP thanx @Damien
 
The fact that { foo: "bar" } can be an object or block based on context is ambiguous.
 
10:06 AM
@Dami
@DamienOvereem It will be great if you share your views about that
 
@HamZa... Your views on this??
 
Anonymous
@HamZa Hmm, never noticed that before
 
Hi all
 
Any overwatch fans in room 11? :p
 
10:14 AM
@Sean Yup yup
I played the open beta, but don't currently have a computer to play on :( will have tomorrow
I bought it shortly after the beta ended
 
@Patrick I find them tedious and time consuming and the more LoCs, the less effective they become because you just don't see stuff anymore. Pairing can take away a lot of that pain.
TIL: for years I was wondering if there was a shortcut for ctrl-tabbing between the same applications instead of between open windows. turns out the solution was so close all the time… it's the key above tab
 
@MadaraUchiha Oooh, aah! Loving it so far. Played the open beta, but played a little last night too ^^
 
@Sean Of course.
Awesome game.
 
d:
lolfail
 
10:32 AM
@Sean Gonna rock widowmaker tomorrow :)
I've been practicing airborn headshots in the open beta
(climb hook, launch to air, aim, headshot, land)
Most satisfying moments ever when you finally get one right :D
 
Wes
@Saitama HOLD THE DOOOOOOOOOOOR
 
heh
 
@Oldskool Ah I see, thx
 
Wes
10:47 AM
need to buy a big batch of hold the door hodor stickers
 
:P
 
hey evryone
 
@Gordon yeah the PRs should be small. Pairing works too of course, but I only find it beneficial for hard tasks. For most work working alone and a review is more than fine and occupies less team-hours compared to pairing up. But if it's something hard, pairing up is the right thing to do imo.
Do you always pair program?
 
@sumitsouda weird
 
Is this mean my server supports just HTTP1.0 and HTTP1.1 and not HTTP2.0 ?
 
10:59 AM
No, that means your client sent an HTTP 1.1 request
 
ah
ok, may please someone tell me what's the difference between HTTP1, 1.1, 2? Which one is better? And how can I tell to my app use that one?
 
It's not really your (or your application) choice, it's what the client supports
Neither does it really matter at this point
 
Wes
does http2 exist yet
 
Oh ..! Ok then I am relieved :-)
 
In a few years it might, but it's not something to worry about at the moment unless you are writing a browser or an HTTP server
@Wes I think Chrome unstable branches have it as an experimental feature disabled by default, nginx has a module to support it
 
11:02 AM
@Wes Yes.
 
It's backwards compatible with 1.1 though, it's a negotiated upgrade
(like websockets)
 
@DaveRandom My app going to be used both for web requests and mobile-request. Still I don't need to be worry about that?
 
No, the web server abstracts this away from you, PHP works exactly the same regardless of the HTTP version
 
@stack Stick with 1.1 Unless you want to be on the front lines and have an SSL cert for your server.
 
unless you are doing something weird, it should never affect the average PHP developer
 
11:03 AM
ah ok
 
at least, not for a few years
 
@Sean That's cool and all, but is pointless unless companies actually make the change.
 
Err, not usage, support* haha
 
@MadaraUchiha Meh, give them time. You can't expect people to start using things like that in the trunk from day 1.
 
11:05 AM
@DaveRandom HTTP2 is hardly in day 1
Also, it's a reactive thing, only if the client asked for HTTP2, that's what it'll get
 
Look at IPv6... which I realise is a shitmess in many ways, but people aren't going to invest in it until it starts causing them actual problems not to
 
@DaveRandom Exactly
 
and we are finally, just now, getting to that point, however many years down the line
IPv6 is just now leaving EA phase, HTTP/2 is much younger
@MadaraUchiha do you know if they removed the user id from star messages or am I just blind?
(as in the data that lets you see who starred things)
 
@DaveRandom They did a while ago.
 
damn, I wanted that for !!repin
 
11:15 AM
Can you type hint for string in 7?
 
in 7, yes
 
Sweet, cheers.
 
you can hint for everything except resource
 
Wes
and null #shotsfired
 
shotsfried
 
Wes
11:19 AM
#shotsdrank
 
!!wotd
 
hypnagogic: of or relating to drowsiness.
 
@Patrick not as much as I'd like
 
so, it's @cv-pls taking control today...
hmm
 
Apparently so.
RIP Jeeves
 
11:24 AM
Rest In Pieces.
 
Wes
is jeevs on vacation
 
Do I need to escape user input from Jeeves arguments? If so, are there any helper methods to do so?
(If I'm repeating that user input back into jeeves' response)
 
unclear Complex time interval check in PHP - RiaanZA - 2016-05-25 10:32:21Z
@Wes Maybe. Haven't heard @PeeHaa all day either, so maybe Jeeves finally escaped his custody ;-)
 
Wes
he must be in brazil by now then
 
Also not particularly sure how to write tests for a plugin.
 
11:40 AM
@Sean What do you mean by escape it?
 
@DaveRandom Say if I had a plugin which just repeated everything a user says after !!repeat, would I need to escape the input before postReply?
Not sure if there would be any funky characters or anything to look out for,
 
Wes
wth is towel day
 
Oh right no, we deal with all the encoding and such, you can just pass a bare string
 
 
ChatClient#postMessage() and ChatClient#postReply()
 
11:42 AM
@Wes and I was thinking I am dealing with nerds and geeks…
 
Wes
@Gordon lol. i even read the book
 
However, if you were to do something like !!repeat, you'd want to prevent !!repeat !!repeat !!repeat !!repeat !!repeat @Sean this will really piss you off because it will ping you a lot of times
 
Hah :P Aye.
 
You should probably strip pings from the response in general as well
 
!!ping @Jeeves
he doesn't pong :(
 
11:45 AM
3 hours ago, by Gordon
@Oldskool he's dead, jim
 
!!version
 
I'm running ^ this to try and track down the issue that we seem to have, we're hitting a deadlock somewhere I think but we have no idea where or even what provokes it
Message#getText() will give you the bare (HTML decoded and tags stripped) message string, Message#getEvent() will give you the underlying websocket event (MessageEvent) and MessageEvent#getContent() will give you a DOM document instance that has the raw HTML fragment we recieved loaded into it @Sean
 
Hey roomies
 
Command also has hasParameters(int $minCount = 0), getParameters() and getParameter(int $index), which is basically just a wrapper over the resulting array from preg_split('/\s+/', $command->getText())
 
Anonymous
11:49 AM
@PeeHaa o/
 
@PeeHaa Jeeves is dead again :-(
 
I see :) well... fix it :p
 
@PeeHaa morgnglsgddsfi
 
I'm guess you set up some logging since Travis is now failing and there's a warning on startup :-P
pastebin logs pls
 
My internet is also broken atm
:(
 
11:50 AM
Yeh yeh, whatever :-P
 
@DaveRandom it worked locally!
:P
Let me check travis first
 
The notice on startup is just because of a missing entry in my local config file, there are other places where that needs handling I now realise
@PeeHaa The travis fails are because of too few ../ in the path to the log file used in testing
(i.e. issue with tests, not code)
 
Yeah forgot to commit the empty dir
Stupid git
 
Well you can just add an extra ..
and have it write the test files into the default data dir
 
some should slap @Jeeves with a towel
 
11:53 AM
Nope. I don't like having test stuff leak into production dirs :(
 
Alhtough actually could probably do with a test data dir
 
@PeeHaa That's why I usually just touch an empty .gitkeep file in empty dirs. Not the most elegant solution, but it works.
 
I do the gitignore hack
 
Yeh it took me ages to figure out why that extra .gitignore file was there :-P
 
Anonymous
@Gordon You're really a fan of this towel day...
 
11:54 AM
@PeeHaa There's a gitignore hack? o_O
 
But that logger is full retard anyway @DaveRandom. Somehow I forgot to async and used fgc / fpc for somestupid reason
 
@Oldskool put a gitignore file with !.gitignore in the "empty" dir you want to commit so it isn't empty any more
 
@DaveRandom That's... weird.
But I guess that'd work, yeah.
 
And I didn't push it yet :(
@Oldskool better than a non standard file imo
 
11:56 AM
I can't :(
No internet and tethering is slooooooow for some reason
Not sure why it doesn't work
 
@PeeHaa I guess you went over your plan's data limit with all those porn downloads? ;-)
 
But but but fair abuse policy
 
Why is your internet down anyway?
Have you accidentally transported yourself back to 1998 again?
 

« first day (2048 days earlier)      last day (2886 days later) »