« first day (1679 days earlier)      last day (3269 days later) » 

1:00 PM
@DaveRandom God you suck :P
 
@DaveRandom Technically, everything in "the cloud" is basically a "local machine", with a wire hanging out of it
 
@tereško Sure, just saying that the idea of free higher education is not necessarily totally stupid
 
@Epodax we in Latvia have stipends for the "budget seat" students too .. but it's tiny
 
@Jimbo Oh I thought he was talking about his butt
 
You don't learn anything useful regarding coding at university... just a bunch of theoretical mumbo jumbo :P
 
1:01 PM
I could see why he didn't want to store it there
 
haha
 
:D
 
Now it's "fredagsfika" here in sweden, so, see ya
 
@tereško It's not stipendium as such, although it's properly the right wording for it :)
 
@NikiC yes, when it comes to social policies, USA is at the level of some African countries .. you could not hope to introduce anything like that there
 
1:03 PM
I don't think I see any improvement by using ocsp stapling in terms of speed. It's still nice people don't need to go through the CA though cc @rdlowrey
 
@tony.gustafsson yeah, well, I had to learn 4 programming languages in my 3-year programme
=P
java, c#, c++ and php (well, most of time was spent on c++: 4 semesters)
 
@PeeHaa The main advantage is actually for the CA, not for you or the end-user. It massively reduces traffic for them, reducing their infrastructure costs. I'm not in any way against it, but you won't see any meaningful difference in terms of load times or whatever, even vs CRL probably at the moment
OCSP stapling is one of those rare things that's solving a problem we don't actually have yet, before it happens
 
@DaveRandom Yeah @rdlowrey said exactly the same thing when we discussed (read I was bugging him about) it
@DaveRandom FWIW the privacy thing is real
imo
But that is indeed not the actual reason it is invented
 
@tereško Did they do actual C++ or was that glorified C with classes?
 
Well historically very few certs actually get revoked, it's far more likely the the CA intermediate would get revoked than the end of the chain, and in that case it's more likely that the client libs would push an update which completely bypasses the need for any kind of remote lookup
 
@NikiC most of it was glorified C, we had only 1 semester of proper C++
 
heh
 
@m6w6 literally in the middle of writing those tests now :-P
 
hi any one here
 
Subjective. It's Friday so no-one is really fully anywhere.
 
1:19 PM
 
For example, I am at work, but only in the literal sense, not in any kind of practical sense.
I'm actually considering going and buying some beers.
 
i have a api which returns the three dimensonal array .. in jeson encoded format ..

i am doing jsondecode and printing the full array and it's showing me full array but when i try to print it like $array['key']['key2'] it's not showing me the result
can any one help me with this
 
Did you pass true to the second argument of json_decode()?
 
no
like this right ? : $result = json_decode($res , true);
 
Then for simplicity, you probably should. This makes it return arrays, whereas at the moment probably at least one of the layers is an object.
@abhi yes
 
1:22 PM
okey it's coming now txs @DaveRandom
 
Somebody really went the extra mile on this one penisland.net via room 29074
7
worksafe and rebeccasafe btw ^
 
@PeeHaa lol
 
:D
 
@PeeHaa Genuine things that have also existed at some point include therapistfinder.com and expertsexchange.com (now that hypenated site)
 
1:26 PM
ermargahd never heard of therapistfinder. perfect!
 
@DaveRandom I was like... what's wrong with "therapist finder"?
and then it hit me
... oh ._.
 
:P
 
I disabled HTTP for https://ocrami.us/ - your security is important!
5
 
@Ocramius WTF why?
 
Just couldn't be bothered with setting it up :D
 
1:42 PM
 
I'm gonna open it and don't close it until the end
 
@PeeHaa PSR-7 made him do it :(
 
@PeeHaa thanks, exactly what I was looking for
 
I also just found out yesterday thanks to @ircmaxell :)
 
You guys know about anchoring? Well I'm starting to like this song already...
 
1:47 PM
@DaveRandom Have you considered printing the keys out - jabberwocky.com/software/paperkey
 
stackoverflow.com/questions/30382827/… anyone have any suggestions on this? :)
 
It no longer answers OPs question, flag was disputed. Retardedness ensues
 
@chronotrigga Yes, I would suggest googling the error message which gets the previous question that appears to be identical and is already answered.
 
What does shared hosting use for isolation?
 
@NikiC Optimism.
 
1:51 PM
i'll take a look at the resource, thanks
 
@Danack It's a serious question
 
@Danack That's a surprisingly not-insane idea
 
@NikiC I believe a lot of them used to just use standard linux user restrictions to isolate things. The more modern approach is to use a flavour of linux that is designed to do that properly - e.g. cloudlinux.com/about/tech.php
 
72
Q: Where do you store your personal private GPG key?

Florian MargaineSo, I want to start using pass, but I need a GPG key for this. This application will store all of my passwords, which means it's very important that I don't lose my private key, once generated. Hard disks break, cloud providers are generally not trusted. Not that I don't trust them to not mess w...

 
@Danack I tried something similar. You only get so far.
@ircmaxell No need for recursion! Opcodes are linear :D
 
1:58 PM
@Andrea Yep, I got that far and stopped.
 
@Jimbo answer OP seems to be not a total arse, should probably just update the answer to match the question
 
@Danack hrm
 
@DaveRandom Try reading that yourself and answering it, I mean, think about how you would... it's basically impossible, it makes no sense. My brain is fried from it
 
@Jimbo Then Q should be deleted and quibling over answer is redundant...
 
@DaveRandom It's almost voted to re-open, and I can't vote to delete or anything
 
2:00 PM
@NikiC user permissions
 
@NikiC I was only slightly joking when I said optimism - people used to use scripts like this to do the management of the shared host, which is not a technically sound way of isolating stuff. Dare I ask why you want to know how shared hosting is implmented?
 
Here's the thing: Zend Engine opcodes compiled to JS need only be as inefficient as the Zend Engine itself
So performance would be pretty good!
 
@NikiC faith
 
Compatibility too
 
hi guys
 
2:02 PM
Though having zvals in JS is a bit silly
 
from last 1 day I am not able to solve mysql problem which is ----


Error
MySQL said: Documentation

#1045 - Access denied for user 'root'@'localhost' (using password: NO)
Connection for controluser as defined in your configuration failed.
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
I am not able to login in mysql
I changed root password from localhost/security
still not result
any idea plz
 
You are not using a password to log in
 
yes no password
 
@Danack Ah, just wanted to drop in a sentence along the lines of "An intermediate degree of isolation is offered by XYZ, which is commonly used by shared hosting providers", but if they don't actually use anything, there's no point to that ^^
 
username root
password blank
 
2:04 PM
Yeah....this is why you don't get access to ssh on shared hosts....
 
no its on my localhost
 
@Andrea do you have a reference resource for the way object/class scoping works in ZE other than just pointing someone to lxr?
(thinking in terms of the work you did on closure binding)
 
posted on May 22, 2015 by kbironneau

/* by StelianMorariu */

 
@Danack iirc WHM has some funky way of doing it, no idea what it is though
 
@DaveRandom The PHP spec
But it's a bit of a mess and the spec is inaccurate or incomplete in places
I can explain things if asked :)
 
2:09 PM
You cannot be told what PHP class scoping is, you can only be shown.
 
It's fairly simple really
 
#FamousLastWords
 
Closures are functions with two extra pieces of information: a this pointer, and a class entry "scope"
 
@Andrea In PHP 7 it's fairly simple, you mean to say.
 
the this pointer is what $this is when it is called. The class entry determines what private/protected stuff it can see
 
2:11 PM
@Andrea It's not closure specific, the context is stackoverflow.com/questions/30358583/…
 
@NikiC 7 changed little :)
 
It's crappy question but I'm avoiding work
 
@DaveRandom encapsulation
You wanna implement bigints but not expose the raw data
for example
 
@Andrea Not much changed, but now all the weird special cases are gone
 
I know the answer, I just cba writing it out, was wondering if there's a sane existing resource I could link to that could be understood by someone who knows nothing about src
 
2:12 PM
@Andrea I thought a closure has a use () and that's what differentiates it from a lambda?
 
@DaveRandom This is more a language design q than an implementation one
 
@NikiC Doesn't that basically mean the entire language is gone?
 
@Jimbo use() works the same way as global
 
@Andrea But, it's not as ... evil... right.. ?
 
@DaveRandom Ah, I was referring to closure scopes only there, of course ;)
Otherwise yeah, might not be much left :D
 
2:13 PM
@Jimbo If you want to get into a semantic argument, the existence of use() makes it not-a-closure anyway
 
@Jimbo probably. use($a) actually adds a static variable named $a with the same value :p
 
@DaveRandom I'm not, I'm trying to learn the proper way of saying it - semantics in programming imho are important so we're all speaking a common language. See: "mvc", "model"
 
user895378
morning
 
no help :(
 
@rdlowrey Buit it's not morning here!
trololol
 
user895378
2:19 PM
;)
 
@Jimbo it's not morning where he is either
 
user895378
haha that's almost true
 
@FlorianMargaine I propose we decorate UGT and add a non-specific time greeting, as we're just defaulting to one that may or may not be correct. How about adding a new one
 
@rdlowrey morning
 
@Jimbo like, "hi"?
 
2:21 PM
@rdlowrey Morning.
 
@FlorianMargaine Nah, too complex
 
@Jimbo what about supercalifragilisticexpialidocious?
 
Guaranteed you copy/pasted that from google :P
 
:D
I changed the s though
it was in uppercase
 
@Jimbo Good ElePHPants to you
@Jimbo it's easy to spell though
 
user895378
2:24 PM
@Jimbo I've always been a fan of:
 
user895378
o/
 
user895378
(waving to everyone)
 
user895378
lacks the time inaccuracy, demonstrates a universally understood greeting
 
What is this the greeting internals committee?
 
user895378
@Fabor Well it's not like we can actually do any work on Fridays.
 
2:25 PM
heh. True
 
@rdlowrey dir /o <-- you have the flag argument syntax wrong
 
user895378
hehe
 
/o\
 
Oh human, I just had the BEST new idea
 
Trying to decide if that's hanging upside-down, or hands on head head-desk because we use PHP
 
2:28 PM
Microsoft: high-fiving you over the back of the head since 1981
 
@Andrea Yes, however you may need to compile differently depending on what the next opcode is that's executed (which isn't always linear)...
 
@ircmaxell If you want efficiency, yes
 
@salathe Was pinging you to saw awesome about the editor thread :-)
so while you can compile directly from opcodes, sometimes it's easier and more efficient to compile from a CFG instead
And if you are compiling to native, you have to do it from a CFG since register allocation is basically impossible without knowing the dominance of variable usages
 
Happy friday!
 
@ircmaxell The code I'd produce would mostly just replace each zend opcode with a matching JS function
So:
var $0 = { type: IS_FLOAT, dval: 1.0, flags: ... };
var $1 = { type: IS_FLOAT, dval: 1.0, flags: ... };
var $2 = { type: IS_UNDEF, flags: ... };
ZEND_ADD($2, $0, $1);
 
2:39 PM
@Andrea that's not really compiling to JS. It's compiling to a VM written in JS
 
At least initially, yeah.
But you can start to optimise beyond that.
 
@rdlowrey \o
 
For example, the code above can be improved:
var $0 = { type: IS_FLOAT, dval: 1.0, flags: ... };
var $1 = { type: IS_FLOAT, dval: 1.0, flags: ... };
var $2 = { type: IS_UNDEF, flags: ... };
$2.type = IS_FLOAT;
$2.dval = $0.dval * $1.dval;
 
that's still a VM
you're just inlining the operations
 
You can probably eliminate the zvals entirely in many cases
But to support things like references you'd have to keep them around
You also need them if you want to maintain the integer/float distinction PHP has
 
2:45 PM
you don't need to keep the semantics
just the behavior
 
Easy ways to implement references are probably going to look like zvals
When compiling to JS you can get away sometimes with poorly optimised output if you run it through Closure compiler :p
 
user895378
When you folks start talking about compilation techniques and optimizations I always feel like the dumb kid in the back of the classroom who goofs off to hide that he's not as smart as everyone else.
 
@Andrea you can also simulate references with closures in some cases...
 
@ircmaxell oh?
 
some cases
 
2:53 PM
An example?
 
function foo() {
    $a = &$b;
    bar($b);
    return $a + 1;
}
function bar(&$a) {
    $a++;
}
 
Hmm, I don't get ZendTech+IBMi trying to get a seat in FIG. Does anybody even know how an IBMi box looks like?
 
that can be compiled to:

function foo() {
    var a;
    (function() {
        a++;
    })();
    return a + 1;
}
 
I see
 
won't work if you store a reference
 
2:54 PM
@Ocramius Oh, they want a seat so they can force EBCDIC support in PSR-7 :p
@ircmaxell No, it could in some cases.
 
but if you're only using one (meaning the parent governs the lifetime), then you're good
 
@Andrea LOL
 
function foo() {
    var a;
    bar(function (newA) { a = newA; });
    return a + 1;
}
 
@Andrea well, foo() still governs the lifetime of a in that case. Hence it works. But if bar does this.a = a;, then the technique breaks down
 
2:56 PM
Yeah
@ircmaxell References are really tricky because anything, anywhere can make a given "variable"/zval slot/whatever be a reference. You need to analyse the entire program.
 
@kelunik I've only cloned minifine for now. I have spend the entire night yesterday setting up proper ssl. Next step will be either to install the others like requestable, hexdump, jsonparser etc tonight or I get drunk
 
Having references work across compilation units probably won't work except in limited cases
 
@Andrea no, because you know at function entry if it's a ref or not (for parameters)
globals are more difficult
 
@ircmaxell nope
 
@Andrea inside the function, you do know...
 
3:00 PM
Is everybody still tearing their hair out whenever they use DateTime?
 
function &(SomeClass $o) { return &$o->a; }
 
@Andrea $o is not a reference at entry (it's forced to not be one), but then one is created inside to point to a
 
@PeeHaa I've a pretty weird issue with those GitHub avatars...
 
this doesn't make o a reference
 
@ircmaxell I haven't done anything to $o
 
3:01 PM
I know, and it's still not a reference
 
The problem is its property
 
@PeeHaa Why not both?
 
@kelunik What is it?
 
i tried to redesign my pdo/load data infile.. getting an internal error -- anyone have any ideas? codepad.org/AGNEMshb
 
@Danack You know me so you probably realize that is what we all end up with. A drunk PH fixing his server :)
 
3:03 PM
Sigh… Xinchen wants it to be zend_ something.
 
@PeeHaa It returns always Access-Control-Allow-Origin: https://dev.kelunik.com, that's pretty weird.
 
I don't understand.
I really don't.
How has adding zend made it better? I think it has made it worse in two ways:
 
user895378
@kelunik sounds like a bug in github's code to me
 
1) It's not a zend API function; in fact it should not be used outside of the file.
2) It's longer.
 
@LeviMorrison Let us assume that you had indented your function with spaces and Xinchen had asked you to use tabs instead.
 
3:05 PM
@kelunik Why is that weird? Aren't I doing the same thing?
 
Would that request have been reasonable?
 
The difference, Nikita, is that the C language reserves an entire class of identifiers for 1.
 
Oh nope. I just do *
 
And sure, I can change it.
 
But it returning your host makes sense to me? cc @rdlowrey
 
user895378
3:06 PM
@PeeHaa but it's not my host. It'll do the same thing if you request it in your browser.
 
The whole point of these commits is to improve the code.
 
@PeeHaa Because there's nothing that tells them, it's my domain, but I even get that with curl or on localhost:3000. ^^
 
And by adding zend we have further removed any meaning to a zend prefix.
 
@rdlowrey oooooh lol @kelunik
 
@LeviMorrison If you don't see the problem with starting to use a different naming convention for one single function in a file where all functions use a different convention, then I can't help you.
 
3:07 PM
@NikiC What good is the convention?
I'm serious.
What benefit do we gain by putting zend_ in front of all functions?
 
If you want to change everything to drop the zend_ prefix and use _ instead - that may be reasonable (though probably not worthwhile), but doing it for one function makes zero sense.
gtg
 
@ChrisBaker What does "// expected to do jQuery" mean?
 
@PeeHaa Even if they base the allowed origin based on a referer, that's wrong, because the same resource could be cached and used by different sites. And it wouldn't make that much sense.
 
can anyone look at this? codepad.org/AGNEMshb i'll tip in paypal.. have no one to advise with so i don't know why i'm receiving an error.
 
user895378
@chronotrigga if you expect people to help then post the error message you're receiving. paypal is almost certainly unnecessary.
 
3:15 PM
it just says InternalError on my dashboard and nothing else
 
@rdlowrey You seem to have mis-spelled "fuckawful"
 
@chronotrigga 500 error code ?
 
chimichangas
ta da, ta da da, ta da, da
 
it probably means that your webserver is not configured for debuggin
open php.ini config file and enable display_errors parameter, @chronotrigga
or look at what's inside your error log
 
3:30 PM
same error when I turn parameters on. it's a LOAD DATA LOCAL INFILE forbidden error but when I try redesigning the new code (codepad.org/AGNEMshb) it just says internalerror
 
Morning
 
i.imgur.com/OTicWDS.jpg honestly no idea anymore, kill me now
 
3:45 PM
Oh dear.
 
@chronotrigga o.O
 
@ircmaxell it may be because it's Friday afternoon, but E_SENTENCE_NO_MADE_SENSE
 
@salathe you stepped up for editior position, no?
 
@ircmaxell yep :)
 
@salathe awesome
 
@Trowski Is the 'throwable cannot be implemented by userland classes' just missing or has that restriction been removed?
Or just so poorly worded I missed it...
 
Hmm... I put it at the bottom when I'm talking about the patch.
I probably should put it up in proposal.
@Danack Not a fan of my writing?
 
@Trowski Nope! \o/ I'm really picky about writing - how about replacing:
> In order for an object to be thrown, it must implement the Throwable interface.
with
> Only objects that implement the Throwable interface can be thrown. The proposed patch does not allow userland classes to implement the Throwable interface. Instead all classes declared in userland must extend one of the existing exception classes.
 
There's a reason I didn't major in english... and I wrote much of this late last night.
 
posted on May 22, 2015 by kbironneau

/* by Nicolas Guerrero */

 
4:03 PM
@Danack Much better.
 
I'm not sure how to phrase this, but the voting section ought to be clear that there are two separate things to vote on. i) The hierarchy ii) the names of the exceptions. I think most people will be able to live with that hierarchy - the names are going to be a little contentious.
 
Anonymous
first time to see reddit completely down \○/
 
As we'll now have two types of errrors...
@Trowski Actually, I do know how to phrase it. When this is discussed on the list, say that you will add any other proposed set of names to the RFC as a separate vote, and that the voting will be carried out as:
Vote 1 - use this exception hierarchy - 66% vote required.
Vote 2 - all of the different names people suggest as different options - the one with the most vote wins...
 
@Danack I would strongly recommend against doing that
 
user895378
please don't do multiple voting options ...
 
user895378
4:08 PM
Just provide what you believe is the best solution and say "yes" or "no"
 
If somebody comes up with a great name in the discussion, update the proposal to use that.
 
@NikiC Ok, that's possibly a better idea - but I think a lot of people are going to vote against it because of the exception named Error, and they can't think clearly to see that voting no would leave us with a messed up hierarchy..
 
the best name so far is throw new IMadeAStupid;
 
@rdlowrey @NikiC Either of you have suggestions: wiki.php.net/rfc/throwable-interface
 
user895378
@Danack IMO that means the RFC is incomplete, then. It's the RFC's job to fully elucidate that
 
4:10 PM
@rdlowrey The RFC should say people shouldn't be idiots?
 
user895378
@Danack I'm just saying it's a question of self-determination. Don't leave people room to be stupid and they won't be.
 
> Let me start this RFC by saying that anybody who votes against it is a total idiot.
 
Perfect.
 
user895378
It's always been my opinion that it's your job as the RFC author to smash any opposition in your RFC.
 
user895378
To leave no doubt.
 
4:12 PM
@Danack I think that can be addressed in the discussion, and I could emphasize the importance of a clearer hierarchy.
 
@rdlowrey A slight hindrance to that is that most RFC discussions are based on "I just scrolled through the RFC, here is my opinion on it!"
4
 
user895378
@Trowski bookmarked. Busy right now but will try to read it give personal feedback later
 
> Throwable, Error, TypeError, and ParseError will no longer be available in the global namespace.
what does this mean?
 
@Trowski I like your optimism. This is how most discussions about naming things goes:
user image
5
 
Unfortunately most of my proposal is based on changing poor name choices, and the main argument against the proposal is that it has a poor name choice, lol.
 
user895378
4:14 PM
yield from rocks my socks off.
 
@Danack That's great.
@rdlowrey Ok, thank you.
@Worf It means you can't have classes named those things in the root namespace.
 
@Worf "Throwable, Error, TypeError, and ParseError will be built-in interfaces/classes and so it will no longer be possible for users to create classes with those exact names. It will still be possible for those names to be used within a non-global namespace." /cc @Trowski
 
@rdlowrey yield from will be awesome, avoids some unnecessary overhead for coroutines.
 
@Danack if people could name things properly, there wouldn't be names like Beezow Doo-Doo Zopittybop-Bop-Bop (and that is real btw)
 
user895378
@Trowski yup, that was the whole reason why I wrote the RFC ;)
 
4:18 PM
ok, yeah it wasn't clear. also please for god sake allow us throwing them. especially TypeError. please. Please. PLEASE
 
user895378
And @bwoebi's implementation hasn't blown up yet so far as I can tell lol
 
@rdlowrey While you're here.....So with Auryn, this works $injector->execute(['Foo', 'bar']); regardless of whether bar is a static or instance method. However $injector->delegate(['Foo', 'bar']); assumes that bar is a static method, and fails if it's an instance method. Is there a cunning reason for that or just an oversight?
 
@rdlowrey E_NOT_ENOUGH_BUGS
 
@rdlowrey With PHP 7, your approach and my approach to coroutines are almost identical now.
@rdlowrey I have yet to try it, I was planning on branching Icicle to make a PHP 7 only version once the API was stable.
 
user895378
@Danack No, that's just an E_RDLOWREY_STUPID ... not intentional
 
4:20 PM
@rdlowrey I may have a look at fixing that then...
 
user895378
@Trowski yeah that's what I've been doing lately ... I've been maintaining a php7 minimum requirement branch in master and doing 5.5+ dev in a separate branch
 
user895378
Been doing a bunch of optimizations to make coroutines as fast as possible over the last few days
 
@Trowski Not entirely sure, but I think: s/"may respectively be used to catch Error objects or any Throwable"/"may be used to catch respectively Error objects or any Throwable" unless it's required to be deferential to those classes.
 
user895378
Either way it makes no sense (IMHO) for an async library to support < 5.5 ...
 
user895378
Trying to do async in PHP without generators is like painting a cathedral with a toothbrush.
 
user895378
4:23 PM
It'll work, but it'll be really terrible and take forever.
 
@Trowski Are we going to change some SPL exceptions' superclass to Error too? … I mean… I wish so… not sure how much of a BC break it'd be…
@rdlowrey /me takes a toothbrush designed for giants…
 
@rdlowrey I targeted Icicle at PHP 5.4 at first because I started writing it at the end of 2013, but in the end I decided to go PHP 5.5+ for exactly this reason.
 
user895378
Not to mention 5.4 is about to be EOL. Real programmers know how to upgrade.
 
@bwoebi Absolutely not
 
user895378
4:25 PM
@bwoebi please no
 
@Danack No, this wording is better.
 
@rdlowrey Was that a dig at Wordpress? because it should be
 
It may be a good idea to add a class named LogicError or something with a less similar name meant to replace LogicException.
 
user895378
@Machavity of course not. Wordpress is like jQuery: it's wonderful and does all things ;)
 
spl exceptions are all wrong
 
4:26 PM
@NikiC @rdlowrey I mean, if I were free to redesign the whole Exceptions system and had to retain SPL exceptions, I'd convert them to Errors… most of them.
 
But I would not remove LogicException.
 
I suspect that for Wordpress, PHP 5.4 will become the new 5.2
 
user895378
spl exceptions are is all wrong
 
@rdlowrey spl_autoload_register too? :-) … mh
 
@bwoebi Imho the vast majority of exceptions thrown by userland should be Exceptions
Errors are for special circumstances only
 
4:28 PM
@NikiC mainly unexpectedvalue, badmethodcall and the like… these are special circumstances…
 
@rdlowrey "standard" php library
 
I wish the SPL would get some love, in a code-change sense. For years now, it's just been (internals) folks pointing and laughing. :-(
 
user895378
@Worf I mean, the intention of SPL is good ... it's just the execution isn't awesome for a lot of it.
 
Mmm Cake incoming =]
 
You know what they say about cake...
 
4:31 PM
@salathe Can we do a lot about it without breaking all the things?
 
@salathe i agree
 
@Trowski as long as it isnt cakePHP?
 
@salathe I think the only way that would happen is if it was re-written in userland PHP. The actual C code appears to be,........'a bit tricky', which is why I doubt anyone wants to touch it.
 
@RonniSkansing Well... there is that too, but I was going to say it's a lie.
 
If only we could all put our heads together we could build more things like this
 
4:33 PM
@Trowski oh noes =[
 
Is there an actual reason I wouldn't want to use things like SplQueue or SplObjectStorage?
 
@bwoebi php7 could deprecate some stuff maybe?
and with 7.1 introduce a mended php5 equivalent
or at least discourage people to use some things
 
Genuine question. I haven't actually seen a lot of the criticism toward SPL. Is there something wrong with it, or is it just a naming and odd functionality thing?
I've made a lot of use of SplQueue, SplPriorityQueue, and SplObjectStorage. If they are ticking time bombs I'd love to know.
 
to me probably the biggest problem about a big part of spl is that stuff is poorly documented
 
4:48 PM
@Trowski Possible polish for the error name choice bit - gist.github.com/Danack/a4106649234cb7e6e64c
 
@Danack Thank you, I appreciate the help.
 
np.
 
tbh implementing such thing (SplObjectStorage) without having a standard hash() method is like trying to drive a ferrari that has no steering wheel in it. also you can't store scalar stuff in it
 
@Trowski IMO a lot of it could be implemented in userland PHP, in a way that is far saner than trying to do it in C code. If you want to see an example of the roughness, look at the directory iterator code.....basically there's about 4 different classes being implemented by the same backend code.
 
@Worf The hash method is spl_object_hash().
 
4:55 PM
... which is only good for identity, not value-immutable objects
 
I haven't looked at the C code, but I'm assuming that's what SplObjectStorage uses as the key to a HashTable.
 
could be, yeah
 
If you want to store only objects with unique values, that's actually easy to implement without the hash function.
 
yeah, but it's ghastly :(
 
@Danack I'll have to look at the code sometime. I could write my own versions of things like SplPriorityQueue, but why when they are available in the core.
 

« first day (1679 days earlier)      last day (3269 days later) »