« first day (2384 days earlier)      last day (2567 days later) » 

Wes
4:00 PM
@Leigh i'm not asking if i should do that, but if it's possible :B (php-parser gave me that sensation) but i assume it's just for covering "new class(){};"
 
posted on April 26, 2017 by CommitStrip

 
And the answer is no, there doesn't seem to be any SPL feature that allows you to use CURRENT on an object and map it to the current function in your object, sorry about that... — Mathieu Dumoulin Jan 10 '12 at 14:52
is this still true?
is there really no spl/iterator that allows current($obj) to call $obj->current()?
 
Wes
why you want to do that? @shadowhand
 
^ that
 
Wes
current() is just a global iterator's ->current()
 
4:04 PM
$collection = new Collection(); $first = current($collection);
 
$first = $collection->current();
 
i mean, yeah sure i can do $first = $collection->current() but meh
 
its nicer
 
@Wes I'd like to, I think you vastly overestimate my ability to help in any shape or form
 
@Patrick "nicer" is subjective ;)
 
4:05 PM
The idea is that you normalise an array to an object with ArrayIterator, rather than trying to shoehorn iterators into an object that work with array functions
 
Dan
> This non-exclusive license prohibits modification and/or distribution of this software, including source code and/or compiled binaries, without the express permission of the copyright holder.
 
@shadowhand its just the oop way. tell don't ask
 
If you really want it for syntactic reasons (which I don't understand but whatever) you can use a namespaced function and use function
(but don't)
 
Wes
@Jimbo i vastly overestimate myself too, but that shouldn't stop both of us from trying :B
 
That said, the existence of iterable could be used to make it work natively
 
4:07 PM
it's all good :) for some reason i assumed that current() would magically call Iterator::current() because iterators are magic
 
I'm not gonna do it though...
@shadowhand current() has weird behaviour. It does something fucky with references, I forget the specifics.
!!lxr current
 
because we have Countable that makes it work with count()
 
[ /ext/spl/examples/class_tree.php#82 ] function current()
 
oh fuck off lxr
 
@Trowski Do we need null as items of Iterator?
 
Wes
4:10 PM
@shadowhand
getIterator(iterable $o){
if is iterator return it,
elseif is iteratoraggregate return the result of getiterator
elseif is array return new ArrayIterator()
}
 
oh it's very different in 7
 
@Wes Is IteratorAggregate iterable?
 
@kelunik Probably not, why?
 
Wes
@kelunik yes
 
@kelunik any Traversable or array afaik
 
4:15 PM
@Trowski If not, we could eliminate a method and just use !== null instead of true and false in advance.
I noticed that while thinking about implementing Stream\merge for ReadableStream.
 
evenin
 
Because first would tell you in its current form that one promise resolved and its value, but not the array key to consume from that stream.
 
@kelunik So just return the next chunk in advance? Hmm…
There's really no reason to support emitting null…
 
Can I ask a SQL question here or should I mosey over to an SQL room?
actually, I think I figured it out
 
Wes
you can ask here though. you can ask literally anything
Apr 16 at 7:08, by Hello
does anyone else not like wearing socks?
 
4:28 PM
I forget MySQL SQL requres LEFT JOIN, and now I'm lost.
 
Wes
requires? left join is one thing only, it's not optional to something else :B
LEFT OUTER JOIN is optional to LEFT JOIN, tho
 
I've never had to use a LEFT JOIN in PL/SQL, which is what I'm accustomed to.
 
Wes
LEFT JOIN === LEFT OUTER JOIN
RIGHT JOIN === LEFT OUTER JOIN
JOIN === INNER JOIN
 
I have three tables, users, user_groups, user_group_users. user_group_users has columns that connect users and user_groups together, user_group_id and user_id.
 
@Tiffany ...what
 
4:31 PM
@DaveRandom I've never had to use a LEFT JOIN in PL/SQL, which is what I'm accustomed to.
 
:-P
I use LEFT JOIN probably more frequently than INNER JOIN, in practice
 
Wes
@Tiffany it's the same for both dbs imo. i say imo because i don't know pl/sql
 
I guess I haven't had to use the words LEFT JOIN, I typically have had to use WHERE such_and_such_value_from_column = such_and_such_value_from_other_column
 
Ah that's a Cartesian join (? I think)
Those are generally not super awesome iirc
not done that for a looooooong time
 
Wes
isn't that CROSS JOIN?
never used that :B
 
4:34 PM
might be
 
shrug it's worked fine for me in PL/SQL for our ERP database
 
I can never remember what all these things are called, I have pictures in my head of what they do but I'm not good at talking about them
 
but it hasn't worked so well for me in MySQL. I dunno.
 
Wes
SELECT * FROM users AS u

JOIN user_group_users AS ugu
ON u.user_id = ugu.user_id

JOIN user_groups AS ug
ON ugu.group_id = ug.group_id
 
@Wes you weren't supposed to write it for me :P but thanks
 
Wes
4:35 PM
if you add LEFT it will include also users that have no match in user_groups, etc. that's the only difference
 
ah
 
Wes
yeah you will see "NULL" columns rather than the row removed altogether
 
thanks :)
I still have to write some stuff, but at least gives me an idea to work from
 
@Gordon you there now?
 
Wes
sql is simpler than people think it is :B good luck
 
4:38 PM
@Wes apart from the "namespacedNode" thing everything dynamic is added as attributes, not properties
 
@Wes it's powerful too
 
Wes
so how should i deal with that? ignore it for now?
 
Tiffany Steer clear of Zend Framework. Rasmus declared PHP was bad and Zend was like "Hold my beer"
 
@Wes new $foo
 
Wes
4:42 PM
not really any expr though?
 
no
but it does not make sense to explicitly specify what exactly is allowed
because the rules are complex and not expressible in the type system anyway
 
Wes
i think i get it, thanks. was just slightly confused by it :B
 
@NikiC Your face is complex and not expressible in the type system anyway
 
@Wes I want to select specific columns from users, I thought I could do SELECT users.id, users.name, ...?
 
@PeeHaa Yo mama on the other hand is so simple, even PHPs type-system is more than enough to express her
 
4:47 PM
express her?
 
Wes
@Tiffany yes
 
I don't know
 
@Tiffany She likes to be expressed
You have a problem with that?
 
wouldn't you want to impress her?
 
Wes
3v4l.org/L2ASG @DaveRandom this is much more <airquotes>readable</airquotes> :B
 
4:49 PM
@Wes "Unknown column 'users.id' in 'field list'" ... oh is this because I have a specific table opened in phpmyadmin?
 
Wes
pastebin your current query
 
sec
trying something different :P
 
Wes
if you are using an alias (e.g. AS u) it will be u.id
SELECT u.id FROM users AS u
 
@Tiffany Nope. She likes to be expressed
 
@Gordon What's your config.log?
 
Wes
yes, try a.id, a.name
 
that worked
thanks
 
Wes
because it's administrators AS a
yw
 
Wes
@DaveRandom ahahah even better
 
4:53 PM
@Wes actually that would only work in the global scope, but you can do var_dump(new ${''.!${''} = "stdClass"}());
Sep 2 '16 at 19:34, by DaveRandom
or you could just kill yourself
4
 
Wes
ahah
 
get_browser() generates incorrect error – #74501
 
Wes
god get_browser() in 2017
 
Browser sniffing is stupid, go away
 
@Trowski Could be that other APIs like Redis use null values.
 
4:57 PM
@kelunik Would redis provide a stream of values?
 
@DaveRandom is there any advantage of using left join over inner Join?
 
They are different operations, they aren't really comparable in that sense.
It depends what you are doing
 
@DaveRandom That ''. is so unnecessary
 
oh right
 
thanks :)
 
4:59 PM
I'm thinking I need a static method, talk me out of it
 
@Jimbo You don't need a static method.
3
Done?
 
:)
 
@Jimbo Really you don't
 
@Trowski With Subscribe not directly, but one could build a value of a key stream upon it that might contain nulls.
 
A user registers a load of executables. Later on, I need to get one back depending on what's in one of it's private properties. If I make this static, I can access without instantiation
They're value objects
sort of
 
5:01 PM
I think it makes sense to support null in Iterator and thus use two methods.
 
@kelunik Well then we should probably support emitting null… which means we need to retain getCurrent().
 
Do you think it's worth changing first to return an array of [$key, $value] instead of just the value the promise resolves to?
Hm... for the stream merge use case we actually need race, not first, so the first failure or success, not the first success ignoring all failures.
 
@kelunik An actual use-case for race… wow…
@kelunik That's sort of too bad. I already wrote some code with while ($value = yield $stream->advance()) and it looked so elegant.
 
@Trowski Only on the first look. It's really stupid to use race for that, as it registers more and more handlers.
 
Redis could wrap values in a CacheValue object :-D
 
5:11 PM
@Trowski Just that Redis is not just a cache. ^^
 
True… just… it was so pretty…
 
@Trowski We can still have that for ReadableStream.
 
@kelunik The method should definitely have a different name then.
That might be dangerous too if an empty string could be emitted… hmm…
 
@Trowski We can just not emit empty strings.
 
@kelunik Yeah, simple solution.
 
5:15 PM
The issue is "0".
 
@kelunik Ugh, forgot about that one.
Maybe a separate method there is still better.
@kelunik @bwoebi WIP to refactor streams provide only the iterator-style interface: github.com/amphp/amp/compare/stream-refactor
At least from the examples it works as intended. I didn't take the time to re-write any tests before getting feedback.
 
5:31 PM
@NikiC nvm. You fixed it in 7.1.5 apparently and I can live with 7.1.2 until the release in May. Thanks for getting back though.
 
Any chance we can get is_anonymous() instead of (new \ReflectionClass($obj))->isAnonymous()?
 
function is_anonymous($obj) {
    return (new \ReflectionClass($obj))->isAnonymous()
}
 
@Danack Let's crowdsource generics
 
yw
 
@PeeHaa You bitch.
4
 
5:41 PM
be thankful
:P
 
@Gordon I did?
@Gordon Pretty sure that fix went into 7.1.4
So if 7.1.4 doesn't work but 7.1.5 does that's very weird
Did you actually check that 7.1.5 works?
 
@Trowski Looks mostly fine, functions also aren't addressed yet.
 
Wes
5:57 PM
@Jimbo code?
 
@Wes I solved it by storing differently :)
 
Wes
@Jimbo no. we have already a million functions redundant with reflection :B
 
@Jimbo If you need to make a decision based on its state it should be made available through its api
 
Wes
@Jimbo ok. ask me anything about "getting rid of static methods" :B
 
@Trowski What do we do with coroutine results of Producer, just ignore?
 
6:02 PM
@Wes my question is "how do you pronounce it in Italian?"
 
@DaveRandom s/how do you pronounce/what's the gesture
 
thats_the_joke.png
 
@kelunik Yep.
 
So you think the change is a good thing?
 
@kelunik I think so, everywhere I used a Stream it was with an iterator anyway… so why have the intermediate?
 
Wes
6:05 PM
@DaveRandom wasnt_funny.png
 
lol
 
@kelunik I really disliked the subscriber timing issue as well, this solves that problem.
 
Hey @DaveRandom I have an issue
 
You have many
 
@Trowski It solves all the problems :D
 
6:07 PM
I could go see a doctor but maybe you want to have a look first
 
One of which is the fact that you got like 2 minutes to tell me what it is before I have to go do stuff
 
Go do stuff
 
Wes
@PeeHaa this is not going to end well
 
It can wait
 
6:07 PM
I understand that you want to finish dnslib first
No problem
 
!!dave
 
@DaveRandom should work on DNS lib.
 
@Trowski How much time do you have the next days?
 
Wes
@PeeHaa nice too
 
Yeah looks good
 
Wes
6:13 PM
didn't do it
 
Don't think stealing the php logo is allowed though
 
@Wes Really nice
 
@kelunik Not a lot, I'll have more time this weekend.
 
@PeeHaa I think they won't care
It's completely non-monetary
 
@NikiC nope. But the commit was tagged 7.1.5rc1 iirc
 
Wes
6:13 PM
the ones i did are terribad :B
 
So I figured this goes into the next release
 
@Wes I still kinda like the google colored one
 
Wes
yeah perhaps without the dots
i need to try another font
 
@Jimbo yeah don't think so too. But I would ask permission either way before committing to it
 
Wes
the php license even disallows using "php" for projects using php
you can however do "for php"
 
6:19 PM
@Gordon can't trust that
 
Status update @Wes
 
if you mean what github says on the commit
 
it's wrong more often than not
 
@NikiC wat
Why did you wait to tell me this till now? :P
 
Wes
6:21 PM
@Jimbo php generics tho are already crowdfunded, raised something like 1000$ so far, don't remember where
ibm donated 750$, and some other company
 
That's also pretty and clean @Wes
 
Wes
it's a bit unbalanced, and i don't know what the logo means
not that mine are any better :B
 
I see a code tag
 
Wes
i see two checkmarks
 
hehehe
fuck you wesley
 
Wes
6:27 PM
lol
 
They are checkmarks...
:P
damnit
 
Wes
yeah but they are dumb
the other one from the same user is much better
 
@bwoebi I really hate that test: travis-ci.org/amphp/amp/jobs/226116552#L993-L999
@PeeHaa Reminds me a bit about the SitePoint logo.
 
Is that what it reminded me on?
 
Not just a bit when looking it up...
 
6:30 PM
yes
it does
I was wondering what it was :D
 
@Wes I really like the current Amp draft, maybe we can finalize it for Amp v2.0.0.
 
Wes
with a website too, maybe :B
 
baby steps wes :P
 
Wes
no i've decided i don't care what you think about the website :B i will first finish it and then perhaps i will ask your opinion about it :B
 
@Wes Hey don't look at me. I already told you to just push something and call it a day :P
So what if it's a manbearpigsquidhalfmoonoctocat
 
6:37 PM
@Patrick are you considering adding support for PUT parameters in http at some point? are you phasing towards psr-7?
cc/@anybody what's our view on psr-7? will we use a unified http lib?
 
@FélixGagnon-Grenier How often have you needed to swap out or inject your response / request object and you couldn't?
 
Does anyone have a simple script to cache extensions compiled on Travis?
 
I just now was realizing the ugly fopen needed to actually read PUT from the request, and was wondering what's what
 
@FélixGagnon-Grenier wat
 
6:42 PM
@FélixGagnon-Grenier honestly if I ever touch my http package again it will be a complete rewrite. Make everything immutable and create nicer abstractions than what I have now
But time...
 
@NikiC should I still get it when 7.1.5 is released I will get back to you. To be fair: I am using ancient build tools from CentOS 5.11 for max compatibility. 5.11 went EoL two weeks ago so not sure how relevant a Bugfix for legacy is.
 
@PeeHaa how do you access PUT parameters, in php?
 
@FélixGagnon-Grenier Any half decent http request/response abstraction will have a php:\\input thing
 
@Patrick Everything immutable except for the bodies? :P
@PeeHaa \\? :P
 
6:43 PM
@kelunik just return a new response instead of having a mutable one
 
@kelunik ugh
I am a windows guy :P
 
@Patrick indeed ;)
 
@Patrick And how do you handle streaming?
 
@FélixGagnon-Grenier I am sure patrick's thing has that too
 
@kelunik I don't even want to think about it, I'm using http-foundation for my new projects... I really don't care that much about the presentation layer anymore.
 
6:47 PM
Why does stupid Travis do that: travis-ci.org/amphp/amp/jobs/226124118#L130-L140?
 
gosh, working with PUT and a multipart form body is a hassle. do I really have to manually parse a multipart? Will I really just fallback to using a POST?
 
@FélixGagnon-Grenier huh?
form and put?
How is that even possible?
 
... by sending form data through PUT request? maybe I'm doing something wrong when sending the request with JS
 
A form cannot possible be put
Assuming a html for nere
 
I beg to differ
 
6:54 PM
user agents don't support that
 
irl meeting bbl
 
kk
 
@kelunik i got curious about it and i think it may be because of: 1 2 3
 
@pmmaga Yes, that, too. But the linked thing is first installing Composer 1.0.0 and then doing an update to the latest version.
 
7:06 PM
@kelunik but is that working properly?
 
@pmmaga What do you mean?
 
oh wait, i may be missing something, it's updating to 1.0.0 and immediately after back to 1.4.1
 
Yes, that's what I mean.
 
i started by the wrong end of the issue :P
 
@PeeHaa I am doing custom xhr
 
7:13 PM
ah
 
but maybe I can not transform data into FormData before sending
which would relieve me from having a multipart body
 
Dan
If I have file1 and file2 in separate branches (b1 and b2) is there a sane way with Git to diff b1/file1 with b2/file2 and selectively apply changes from one to the other?
 
Adding ready variables to foreach – #74502
 
wat jeeves
 
@kelunik The timeout could probably be widened all the way to like 600 ms. The test will still fail if the loop waits the full 1000ms.
 
7:20 PM
Yup.
 
I hate all the tests that deal with timing.
 
Otherwise we have green / non-hanging tests now.
 
@Jeeves "For example, the following can save the life of PHP programmers:" wow
 
@pmmaga No.
 
lol wat
 
7:22 PM
HOLYFUCKINGSHIT
IT EVEN CONTINUES AFTER THE FIRST EXAMPLE
MAKE IT STAHP
 
@PeeHaa HAMMERTIME!
 
@kelunik I see what you did there.
 
@Trowski Also no skipped messages anymore.
 
@kelunik Ah yes, that's nice.
 
And a php-cs-fixer config that actually complains if things are wrong. ^^
@Trowski Yes, I hate them all, too. travis-ci.org/amphp/amp/jobs/226139187#L1038
 
7:33 PM
@kelunik Another rears it's ugly head.
 
@Trowski Ah, the other two pause tests had a 1 ms grace period, but not that one.
Pushed fixes for those two tests, now there's just the execution order test that fails occasionally.
 
7:50 PM
@PeeHaa kill it with fire
 
@Jimbo Yes, crowd sourcing is exactly the best way to make changes to the PHP Engine.
Seriously though, I'm not sure I want actual generic generics.....I just want arrays of, with defined key types
Also, yes I'd be up for coming over to see your desert island.
 
@Danack I'm pretty sure I want them. Arrays are just one thing. What's with iterators, promises, ...?
 
@kelunik I think, I think that iterators with specific types are a different thing.
 
@Danack You mean you want to recreate the implementation every time?
 
@Danack Cool, /cc @Leigh
 
8:05 PM
@kelunik I mean I hate this RFC wiki.php.net/rfc/generics - and would prefer to have just arraysof this decade, rather than something more complicated next decade.
 
@Danack I don't have a problem with a specialization for arrays like Type[].
 
8:40 PM
Hello
Can anyone help me how we can solve this issue?
http://stackoverflow.com/questions/43622725/how-i-can-put-multiple-values-in-a-field-in-database
 
@kelunik Why has it been shot down so many times in the past then?
Joe + Phil's was just a simple array of
 
@pskpartha Too broad. Your question amounts to "I haven't tried anything please write my code"
Which is not how stackoverflow is supposed to work
 
@Jimbo Because they didn't implement typed arrays, in the sense of the type being an intrinsic property of the array
 
Wes
@Jimbo because type check must be implemented when element is added, not through traversal every time it is passed to a function that has the type declaration... is my guess
> Criticising @Wes's coding style for fun and sport
wait, is this going to stay :B
/me changes nick :B
 
8:57 PM
Ah, and that's a problem because it's a... scalar?
 
Wrong description of pid parameter of pcntl_waitpid() on russian translation – #74503
 

« first day (2384 days earlier)      last day (2567 days later) »