« first day (2012 days earlier)      last day (3158 days later) » 

20:14
Where I can I download all of wordpress including it's tests from, without touching SVN?
apparently not - the tests like these: develop.svn.wordpress.org/trunk/tests aren't in there.....but actually, I've already grown bored of trying to investigate the problem.
A shame. It's just svn co though
alias pain="svn"
20:23
It's always nice to find a comment in your code saying "@todo I should really handle errors in a less horrific way..." without having any idea why on earth it works like that in the first place :(
I learned about destructuring in PHP today. Nifty stuff
@PeeHaa Things like Wordpress gets CVE entries … I'm feeling sorry for humanity…
@AnmolRaghuvanshiVersion2.0 o/
@bwoebi Things like wordpress need cve entries (and a lot of them)
user924016
20:29
my wp ssrf I think got a cve registered
@PeeHaa the problem isn't that the issues are CVE-worthy, but that bugs on wordpress in general are CVE-worthy…
s/bugs on/
21:14
Can libsodium-php read your GPG keyring's public keys and use them to encrypt data just like pear/crypt_gpg? /cc @ScottArciszewski
21:24
@Ekn there's a problem with your coproductivity site
@NikiC Generators do suspend and resume type operations.
How hard would it be to generalize this to reuse in async stuff?
user6116249
unless I have lost my mind
user6116249
$sql = "SELECT * FROM forums WHERE cat_id = cat_id";
$result = query($sql);

while (($row = mysqli_fetch_assoc($result)) != false) {

$cat_id = $row['cat_id'];
$forum_name = $row['forum_name'];
user6116249
WHERE cat_id = cat_id it should only display results with same id right?
Like... I mean consider a thread which may handle multiple HTTP requests. When a blocking operation is performed could we suspend the code running for one request ourselves (not the OS) and have the thread work on another request?
Basically cooperative concurrency?
21:27
@William it will display all rows.
user6116249
what if I only want to display those with the same id
I know from previous experience this could result in huge speedups.
We are already "thread safe" but I don't know exactly how this is accomplished.
@William the same id as what?
user6116249
cat_id
user6116249
cat_id has same cat_id
21:32
I meant in the more general sense - i.e. describe what you mean by "the same" in english words.
i.e. "the forum posts which have the same cat_id as....."
user6116249
ok so if I have a topic general discussion and it has a id of 2 when the click on it displays all topics in the cat id
So in the request that comes from the user clicking, there is a cat_id of 2. So you want all the things from forums where cat_id is 2 ?
user6116249
yes
@William I think you want to use a parameter in the query - e.g. "SELECT * FROM forums WHERE cat_id = ?"; and then pass in the parameter (in this case '2') via bind_param
user6116249
i have tried that it still shows a topic with different cat id
21:44
Well I still think sounds like what you want. How about running it, and saying what it does wrong exactly?
user6116249
it displays the same result
It displays all forums where the cat_id is 2?
Zeev is out of touch.
Many things are not done today because they cannot be expressed nicely in the type system.
See patterns such as Optional or Maybe or tons of other generic code that isn't done despite PHP not rejecting it.
It would radically change the way modern PHP code is written.
But no, that's just syntax and not important at all.
No wonder PHP is so horrid.
That mindset is horrific...
> Sure, a bunch of frameworks would adopt them once they become available - but it will not enable them to do things that are radically different from what they're doing today.
False; see Java's ecosystem when generic types landed.
It didn't stop them from doing what they wanted - they just stopped using Object as much.
But it radically changed how Java is written.
> I fail to see how adding C++ templates to PHP takes it to the next level in anything but the complexity scale.
wtf is he talking about C++ templates?
> Sure, a bunch of frameworks would adopt them once they become available - but it will not enable them to do things that are radically different from what they're doing today.
21:54
Is he actually involved in any projects?
Given what we achieved via reflection I'd be able to counter that immediately
heck, I'd be able to get rid of doctrine annotations for entities just by having typed properties
even most mappings become useless unless overrides are needed
As I said earlier:
10 mins ago, by Levi Morrison
Zeev is out of touch.
He doesn't understand the difference between C++ templates and generics. He doesn't understand the difference between syntax and type systems.
Yet he talks as if he knows what is important for PHP.
How can he know if feature X is good for PHP when he doesn't understand feature X at all?
@Ocramius Please chime in on list to say how it would affect you.
He will probably marginalize it but at least it is something.
@LeviMorrison which thread, exactly?
"See, just like I said, some frameworks will use it but you aren't doing anything radically different."
Improving PHP's type system
ok
doing that, brb
22:03
I emailed him but its off-list.
I didn't see any point in posting what I posted publicly.
@LeviMorrison dropped
22:25
Thanks.
23:00
@LeviMorrison apparently, the php user-base is wordpress, according to private mail exchange
1 hour ago, by Levi Morrison
Zeev is out of touch.
@Ocramius if you understand user base as those who use it, for a large part, yes. If you understand it as those who write it, not so much.
Ekn
Ekn
@Leigh I bet there are many, but what did you spot?
it's just a placeholder for now anyways, nothing really more
It has the unfortunate property, of requiring the user to have a facebook account to see what you're doing
how are us real people supposed to see what you're up to? ;)
Ekn
Ekn
ah, it's because we just use it internally for now :)
it's just for us to test stuff and it actually has gmail too, but not now :p
23:10
at least with gmail I can sign up with leight+ekinisspammingme@....
email tagging is probably my favourite gmail feature :P
Ekn
Ekn
hehe :)
it's been more than a year we started actually making this thing but
it's a fairly large application, it will take a few more months
@Leigh you have something with namespaces
@Ekn as the girl with +1 curiosity, you know what it's like ;)
@FélixGagnon-Grenier I have many things with namespaces, what are you asking specifically?
posted on April 19, 2016 by bwoebi

amphp/mysql v0.1.3

Ekn
Ekn
@Leigh :)
23:17
Not really a question... more like shallow emphasizing on you playing with funny domain names and identifiers.. kthxbai runs away
oh right, yea, I namespace my emails. I like to know when someone has stolen my email address before the site that got hacked does
23:35
@Ocramius You're going to scare people by inverting the generics syntax
haha, yeah, lemme edit that :P
oh, damn, the syntax includes no array support @_@
@NikiC betr? I didn't yet familiarize with the RFC
@NikiC inverting? what do you mean?
I put the generic declaration on the return type
@Ocramius TBH, I'm also scared by Generics
I don't think you need to be scared by the syntax. I'd only be scared by the implementation details
the syntax itself is, like any other thing in the language, something to use carefully. Nesting 3 generics is obviously probably irresponsible
23:43
@Ocramius The problem is that I have a hard time to imagine how this will look in real world code
@bwoebi most use-cases I have involve typing value-objects correctly. Usually putting a type marker on generic data-structures
@Ocramius yes, it is… and there are my fears … People do irresponsible things… and sometimes they even think they're writing nice code
@Ocramius Three dimensional Maps are fun … when typed with generics.
I'm more scared by closures than by generics
Three-dimensional maps of generics seems ok-ish. It's still just a data structure + a type or a set of types
what's so scary about Map<Map<Map<Banana>>> ?
it's just a banana grid
I said Map
and that looks like:
Ah, the index
Map<int, Map<int, Map<int, Banana>>>
23:46
Map<string, Map<int, Map<string, Banana>>>
yes
Yeah, that still looks ok to me, tbh
still better than documenting Banana[][][] and then having the same thing without type specification
(because I currently document Banana[][][], fyi)
@Ocramius That's where I begin to dislike them, TBH
Nowadays function signatures nicely fit on one line
One thing I coded the other day was also annoying and easily replaceable by a generic. I had to code a CopiedCommitHashes value-object and write logic to validate all keys and all values, while instead it would just have been following with generics:
but pass in a 3D map and return one and it's far too long already
class CopiedCommitHashes
{
    private Map<CommitHash, CommitHash> $commits;
    private function __construct() {}
    public static function fromCommitHashes(Map <CommitHash, CommitHash> $commitHashes) :self {
        $instance = new self();
        $instance->commits = $commitHashes;
        return $instance;
    }
}
no checking needed at all
instead, I had to write a shitload of tests and validation logic around this with my current impl
and tests to ensure immutability too, btw (not included in example above)
23:54
@Ocramius also, the comfortable PHP dev will not want to write new Map<CommitHash, CommitHash> but just write new Map and have the generic type inferred
You mean for the property? Yeah, possibly since it's private
still, this is very very very far from being scary at all
I mean:
$map = new Map;
$map[$commitHash1] = $commitHash2;
$copied = CopiedCommitHashes::fromCommitHashes($map);
(instead of $map = new Map<CommitHash, CommitHash>; at the instantiation)
no, that's what I have now and that's what is being problematic. If you infer it, it would be an O(n) runtime operation again
being forced to specify that at instantiation time is one of the things very annoying in Java
That's the scariest thing about them for me
I think that's the beautiful thing about them
I actually got to touch just a bit of java the other day to tweak something I needed for my own project. It is damn slick to use, and self-documenting too.
23:59
LOOOOOOOOL
You're kidding me, right?
At least I hope so…
:x
no, I'm not. I was able to touch someone else's codebase, edit what I needed, compile and run without even testing it first, and it just worked as expected

« first day (2012 days earlier)      last day (3158 days later) »