« first day (1873 days earlier)      last day (3301 days later) » 

18:00
these are view objects @bwoebi. but a single instance of the controller would use many of them, in a loop, to produce a single output. I guess I'll need to inject a factory
foreach ($this->getActiveIds() as $id) {
    $output.= $this->renderer->render('template',new viewObject($id));
}
vs
foreach ($this->getActiveIds() as $id) {
    $output.= $this->renderer->render('template',$this->viewObjectFactory->create($id));
}
hope you have a beer then @RonniSkansing :)
user924016
=) heh yea something like that
user924016
thx btw
Abe
Abe
y r u concatenating templates @FélixGagnon-Grenier
oh, now I understand @bwoebi. What is the problem with naked new()s. Well, not hiding dependencies is the general problem I've lately associated with them
well... why not? should I rather use output buffering and return the output at the end of the function @Abe?
@FélixGagnon-Grenier It depends. Objects holding simple structures are fine. Objects exposing external behavior aren't.
18:06
ok. In this case, the view object really just contains data, but would be constructed with a pdo object
Abe
Abe
no, wat
Abe
Abe
views aren't supposed to know of pdo
Abe
Abe
in every interpretation of mvc. even with cqrs is it better to at least have data mappers
Abe
Abe
correct, but if you do more abstraction it will look better (it's much more work, though)
blessed be my employer, I can do things that take more time when I find it relevant.
Abe
Abe
also, try having views asking stuff to the model directly, rather than having controllers populating views
my current understanding and usage of a view is a data structure passed to a template. if that holds, you mean the view would actually know of the model, and ask things like getPersonsByIds() ?
Abe
Abe
the lesser the controllers know about views, the better it is, imho
18:19
A view should be presentation logic
I everyone, What you all do when you want a PRIVATE CONSTANT inside a class in PHP? did you use static property? What YOU will do?
which by defnition means a template is a component to a view, not the other way around
hmmm... I think I took a wrong turn somewhere in this regard.
Abe
Abe
@FélixGagnon-Grenier it's that mvc is interpreted in many, many ways...
@forX You cry because php sucks
18:22
yeah, it does seem that way @Abe :p
I'm hoping it will be added at some point soon though
@Abe It builds when I ask Anatol to make a build ^^ It's not on PECL or something, so no automatic builds
@PeeHaa almost, but I still need to create the equivalent. I use static variable
@forX just document above the constant that it's part of the private API and shouldn't be relied on to not change value. And then point and laugh at anyone who complain about it changing, as they ignored the documentation.
@bwoebi Forward compatibility for named parameters
In case we want to interpret foo(...["bar" => 1, "baz" => 2] as being equivalent to foo(bar => 1, baz => 2) or whatever the syntax
18:23
@forX There is no real equivalent.
Abe
Abe
@NikiC ah, i thought pecl was all automated
@bwoebi fbc = function being called
@NikiC makes sense… except that we don't want them :-P
@Abe It probably is, but that extension is not on PECL
PECL requires an XML configuration file
I think I've gotten to a point of no turning back. I now have dreams about writing quality answers on SO, and gaining much rep with them.
18:24
You know how I feel about that :D
Abe
Abe
about xml? :D
@PeeHaa I know, but something like private static $VARIABLE = ""; self::$VARIABLE look alike
And zend_vm_def.h is really bad to reuse code… I'm literally duplicating a hundred of lines…
Abe
Abe
i need to figure out how to compile php on windows. i can literally see my hair turning gray just by thinking to do that
@Danack I prefer idiotproof.
18:25
Yeah you could do that, but it sucks @forX
@PeeHaa why you say it suck?
Abe
Abe
@FélixGagnon-Grenier how does your front controller look like?
@bwoebi I know that this may sound odd to you, but using functions is not exactly forbidden...
@forX Because it isn't constant
@Abe Yes ^^
18:26
@NikiC the issue is that the thing is full of HANDLE_EXCEPTION, FREE_OP's etc.
I dare say that you can refactor it into a function that returns a status code
Abe
Abe
or, i could just run php in a vm...
I'm trying to currently…
@PeeHaa It's slower, but its private and cant be changed. it worked, its just not quite beautiful, (that's why I ask here).
18:28
@Abe That is most certainly a better option than compiling it on Windows
@PeeHaa call of a static function is slower than calling a constant, at least elsewhere.
hrmmm... do I really have to answer? @Abe :p the app is a huge procedural code base which I try to refactor while not throwing everything away. So the front controller is in fact a long index, with a lot of switch cases, calling different objects. Mixed with that are routes calling specific controllers. So... no real front controller, I'd say.
@bwoebi Bob, you have bug
@NikiC hmm?
Abe
Abe
18:31
@NikiC i have a huge mysql db with work stuff on it i don't really trust running in a vm considering my lack of linux knowledge... do you think it would be easy to configure the vm to use the mysql that runs in the host os?
@Abe it is.
vagrant?
Abe
Abe
@FélixGagnon-Grenier it's not uncommon that index.php === front controller, though :P
@PeeHaa your link to rfc is interesting, but it doesnt work for the moment, so I will do my best. (It's easier when your junior in a language :) )
happy to read it :p
Abe
Abe
@Danack worth trying? i am kinda familiar with both vmware and virtualbox
18:33
@NikiC exception thrown into wrong stack frame I guess?
@Abe Yes......it's not that it's better, it's that it's automated, you can share VMs with other people easily (so they can share your exact config), and it makes the provisioning be a lot easier, rather than having to fiddle with each of those things.
@bwoebi Something like that ...
@NikiC right, I've forgotten some zend_throw_exception_internal() there.
in the failure branch of get_delegated_value()
@Abe And anyway, MySQL should 'just work', or at least it did for me. Just inside the VM connect to the host machines IP (which is probably 10.0.2.2) on the MySQL port, and it should just connect to the MySQL instance running on the host.
@NikiC thanks for assigning, I'll fix that later when not in the middle of something else ;-)
Abe
Abe
18:41
@Danack in fact i don't see why it shouldn't work just by setting the ip and the port, but linux appears as synonym of 42 in my dictionary...
will try though, scalar_objects is in my gunsight, for the happiness of @NikiC
:D
iptables -A OUTPUT -o eth0 -p tcp --sport 3306 -m state --state ESTABLISHED -j ACCEPT
If you have iptables running, that might be necessary to allow outgoing mysql connections.
Abe
Abe
is iptables usually bundled with server distros?
maybe? I'm not a sysadmin guy....
@forX Performance is a non issue in this case
Abe
Abe
btw, any suggestions for the distro? the only distro i'm minimally familiar with is debian / ubuntu
but desktop versions...
18:44
@PeeHaa in my particular case, no. but somethings, it is.
I don't have much experience, but Centos if you want stuff to work, maybe Fedora if you want stuff to mostly work, but have more up to date stuff, or Unbuntu if you want to be fixing stuff constantly....
If using single a variable either in static or object context is your bottleneck you are most likely doing it wrong
Abe
Abe
centos looks scary
Centos helps you grow a beard.
Abe
Abe
lol
18:49
@Abe iptables / firewalld
Abe
Abe
i think i would prefer starting to learn with the simplest distro possible... because my ocd will force me to understand everything bundled and running in the os. and the fewer the better... :P
server distros afaik are tiny, but there are differences, no? i imagine like ubuntu having a larger bundle...
@Abe Depends on the distro whether it is indeed tiny
abr
abr
Guys, hope you can explain something to me as I'm a rookie at programing XD
You may want to have a look at arch @abr
abr
abr
so, I've got this .txt file, which contains json, but it has about 50k lines (fyi, its items_csgo file in the game CSGO) and the thing is, I can read the file but to be able to read it as json hierarchy, I have to create a class to deserialize it to?
18:56
Sorry that ping was meant for @abe
json_decode decodes json strings to a php variable php.net/manual/en/function.json-decode.php
@abr $data = json_decode(file_get_contents($filename), true);
Abe
Abe
oh. is there a comparison of bundles of server distros?
abr
abr
gona try that, thanks in advance
@Abe When you say bundle what are you asking?
Abe
Abe
18:58
anything @PeeHaa from the bundled firewall software to the bundled web server..
Most distro's have different setups when installing
From minimal to webserver to OMFGWTFBBQITHAZEVERTHINGINSTALLED
@ircmaxell does that mean templates are somewhat tightly coupled to view objects?
@FélixGagnon-Grenier other way around
the template shouldn't know about it
the view is the one that executes the template
Abe
Abe
moving on, is there a formal name for classes, namespaces, constants, etc? like "\A\B\C" not strictly being a class but either a ns, class, function, constant...?
something like FQCN
@Abe "name"?
Abe
Abe
19:04
and, is there a name for the "single piece" in a fully qualified name?
or maybe "namespaced name"
namespace part I would say
@Abe there's just the namespace, and the 'thing' name, so classname, function name. And yes, I use fqcn....
Abe
Abe
like, symbol for the former? would that work?
oh, just checked php fig phpdocumentor proposal, they call it FQSEN, stands for fully qualified structural element name
19:07
Catchy.
Abe
Abe
lol
@Abe eeeeek
Abe
Abe
okay, will call em $yogi and $bubu
:D
@Abe uaaaah… no.
Abe
Abe
FQSEN also includes root scope variables though, and fields
19:14
mornin'
I am at home at last
it has been way too long using unfamiliar laptop and slow connection
user924016
wb
19:30
ugh… fqn is good enough
whether it is a class or function or whatever is irrelevant to resolving the name.
@LeviMorrison ah
@Sara FYI, I plan to call a vote on Dec. 14th; so if you can get me your opinion before then, that'd be great :)
abr
abr
19:45
@FélixGagnon-Grenier @Danack still here? I'm working on laravel, I've placed the json_decode($file) and it shows blank (also tried json_last_error() and its blank). with file_get_contents I can see the content of the file but can't organize it with json_decode
@abr This is a great opportunity to either use a debugger, or look in the log files to examine the exact error, rather than trying to guess the problem.
abr
abr
plz ignore me, I think I found the problem and the json is somewhat invalid
im a newbie programer =P
That reminds me though.....
@Ocramius that json stuff you were doing; isn't there already a package out there that replaces json_decode with one that doesn't fail silently already?
Abe
Abe
20:11
is there anything in php that can be used without wrapping it in userland? just one, to keep faith alive? :D
Can't you just wrap it?
json_real_decode()?
Will do a decode, check json_last_error and throw if appropriate, return result?
@kelunik How's the php client for lets encrypt going? :-)
Abe
Abe
for one reason or another (broken functionality, weird behavior or just silly api) everything gets/should get wrapped
@NikiC can you please recall me when exactly we need a SAVE_OPLINE();?
Abe
Abe
ah, pdo is kinda usable as is. THERE'S HOPE
20:16
'just' - I really don't like that word........yes it's not difficult to do, but it would still be better to use a library that had been tested, rather than to just re-inimplement everything....
Abe
Abe
@LeviMorrison would adopt this as php slogan :D
Does json_decode ever return null as a valid return?
...
Abe
Abe
yes @LeviMorrison
Well that sucks (if true)
20:21
maybe.
I thought you meant as an error.
Abe
Abe
@LeviMorrison what do you mean with "if true"?
@Abe It does?
Abe
Abe
var_dump(json_decode('null')); // NULL
That's not valid?
'null' isn't valid JSON so yeah.
20:23
it's valid JSON as per PHP's parser
Abe
Abe
json_last_error() is empty
Was valid @bwoebi
json_decode("");
Abe
Abe
20:23
@PeeHaa NULL is invalid in js. needs lowercase
@PeeHaa no, still valid in master … at least looking at source…
JSON has to be an object I believe…
ugggh shit language
So null should never make sense for a valid return.
Abe
Abe
@LeviMorrison idk, because JSON.parse('null') returns null
20:24
I was wrong and I feel bad @abe
Abe
Abe
lol
@Abe Again, that doesn't mean it is valid JSON.
I blame douglas cockford
@LeviMorrison jsonlint says it's valid fwiw
Abe
Abe
@LeviMorrison or an array...
imho, also other types are valid json
Ah, json allows [], {} and null at the global scope.
So you need to check json_last_error after each call.
Interesting: 3v4l.org/vtdLc
Woah! Why does this comment have so many downvotes?
20:31
The lack of brackets for the last 'if'?
Abe
Abe
7 has the most reasonable behavior
Even Hacker News is tweeting PHP7 released when they simply mean tagged
The cat is out of the bag. Everyone and their dog knows it's coming
@Abe Did you mean single quotes or..?
Abe
Abe
not really, focused on other types mostly
it is consistent with chrome's JSON.parse though
also float exponential notation seems to behave consistently with chrome
20:46
@Danack Looks interesting: packagist.org/packages/json/json
@bwoebi Before the first potentially throwing operation I'd say. Or do you have something more particular in mind there?
@LeviMorrison No idea. Well, other than the fact that it isn't checking for errors during the encode. That can happen also. Try encoding NaN./
@NikiC No, I just wanted to be sure…
@Charles I think I'll reset its votes (or maybe just downvotes).
Yeah, doing all votes.
Yeah, see if it sinks down to the bottom with zero again. Very odd.
20:56
@LeviMorrison A bit dated - we have a function to get the error message nowadays
@NikiC But even still those downvotes…
Abe
Abe
how would you call a function to merge a relative "path" to an absolute one? resolve? concat? this is not actually paths but php FQN's
concat
@Abe merge-pathnames
but pathnames are a different beast in lisp anyway :P
Abe
Abe
even if it's not actually a concat? like $aliasmap->concat('\\rootns') is not relative
21:28
@DaveyShafik I feel dumb, wtf was your rfc about again?
:D Was just about to say I found it. :D
@DaveyShafik Would it be terrible if I asked you to do the copy_handle move in a separate diff (one not needing an RFC vote) so that your patch to add push support is more readable?
@Sara yes; it's only refactored because of this change...
Same for find easy handle
Well... this change prompted the refactor, but it's a refactor that probably should have been done anyway
I can split them into separate commits, so you can see just the other changes in it's own commit, will that work? :)
21:36
but fine, don't want to make trouble for you
@DaveyShafik It'd be helpful, but not if it's a PITA
Give me 5 :)
@DaveyShafik "refactored" means "modified" ?
But overall, I have no objections with this. It's basically what I was expecting...
@Shafizadeh in general, refactoring means "reorganizing code"
21:41
@Sara including the decision to not support CURLOPT_PUSHDATA ?
@FlorianMargaine tnx
what type would CURLOPT_PUSHDATA be?
php.net denizens - can anybody tell me who I need to contact to get help trying to create an account on wiki.php.net so that I can create an RFC there? I've tried registering via wiki.php.net/rfc?do=register but consistently get a "That wasn't the answer we were expecting"
@ircmaxell any, but passed by reference
@DaveyShafik huh? couldn't push be called multiple times during a request?
21:43
which is where things get sticky, because curl_setopt()'s third arg isn't by reference
@ircmaxell sure
@ircmaxell in C-land it's a pointer
why not take a callable, and call it every time a push data frame comes in
it does ;)
PUSHDATA is just passed into said callable
(in C-land)
so why does it need to be taken by reference?
@ircmaxell I guess it doesn't have to be
but as I understand the C api, that would be how best to translate it
isn't it in C CURLMOPT_PUSHFUNCTION ?
Abe
Abe
21:47
2 days ago, by Abe
every time you use a reference a very specific kitten dies
int curl_push_callback(CURL *parent,
                       CURL *easy,
                       size_t num_headers,
                       struct curl_pushheaders *headers,
                       void *userp);
@MarkBaker I'm not sure that page is valid. php.net/git-php.php is the correct (though misleading) page for registering all accounts I think.
OK, thanks.... I'll give it a try
I thought wiki may have been separate though, maybe not
what is the negative word of "fluent" ? (influent? unfluent? or what?)
21:54
@MarkBaker hehe, you have to figure out the challenge :)
@Danack no, his link is correct
he just has to get past the challenge
@MarkBaker I think choose "doc group" and then explain who you are, and that you also need wiki privileges. Though it may be easier to get an account first, and then add wiki karma.
@FlorianMargaine The page seems broken for me.
ah sorry, wrong page
ahhh :-D
@Danack I'm deeply sorry.
@Danack what did you fill in for the last question?
21:57
blah.
@ircmaxell there's two options, CURLMOPT_PUSHFUNCTION, and CURLMOPT_PUSHDATA, the latter is a pointer that is passed in as the last argument to the CURLMOPT_PUSHFUNCTION callback
@DaveyShafik I think CURLMOPT_PUSHDATA is just a way to pass something to the function, since C doesn't have closures...
@ircmaxell which is why I didn't implement it, instead recommending you use a closure with a use if you want to pass something in
OHHHHHHH
duh
nevermind
Abe
Abe
@Shafizadeh google "fluent antonyms"
22:00
M thanks
I thought you were saying to not support push data at all
:-P
@Abe oh perfect, I really needed to this word: "antonyms". Now I can find the negative of every words. thanks pal
@ircmaxell ;)
@ircmaxell much easier patch if that were the case ;)
:-P
news.php.net/php.internals/89524 <-- shit like that drives me nuts
also, Curl 7.46.0 came out yesterday, which is the version this needs (because I found two bugs they had to fix in this release :)
22:03
@ircmaxell looks like corporate boss putting pressure
@Sara any chance you can reply your affirmative on the internals ML? :)
first compile… now even the simplest CVs stopped working… yay!
@bwoebi sounds good, ship it!
hm.
sqlite just went down in my esteem.
it apparently needs write access not only on the file, but also on the folder the file is in.
Yeah, to create temporary write-ahead logs.
22:08
which means that I can't use it for a global service having local clients... I can't put the file in /etc/foo.
I'm sure there's a way to tell it to use another directory for that stuff, as otherwise that'd be insane, but I've never seen it exposed in PHP.
hmf.
I have to ditch it :(
and write my own "database format" :(
I guess I'll go with json or something... but meh
damnit
Have you tried turning the journaling feature off?
I mean, that's dangerous as hell, but it might work.
As long as you're only reading, it'll be safe.
Another solution might be putting the database somewhere more write-friendly, like /var/lib
I'm writing too :)
It'd be entirely appropriate to have a writeable directory there.
22:12
hm
like /var/lib/foo being writeable
makes sense, yeah
Yeah.
/etc's mostly for configuration data.
well... my data is a mix of configuration and normal data
but yeah, it makes more sense to use /var/lib
Eh, application-updatable config being in /etc makes my sysadmin spidey sense go off. /var/lib will be more appropriate here.
22:14
definitely, thanks for putting me back in the straight road
Good luck
to my journey I go
Abe
Abe
PHP 7 tagged. Really thanks to all contributors #php7thankyou http://devzone.zend.com/6956/php-7-core-contributors-thankyou/
congrats guys <3
@Abe tagged == released?
Why the hell can't the release be on Friday? You know full well what we'd end up doing.
It'd be horrifying and glorious.
22:23
@ircmaxell Probably somebody at Zend just realized that tagging releases beforehand is bad PR
Abe
Abe
don't know the difference @Danack
@DaveyShafik sadly I don't have the karma to retag 7.0.0 :-D
@Charles I was hoping that it would be a surprise release on the 7th. /s
@Abe One's a release, one's a final RC really.....they apparently are waiting to test against a release of SSL, or something.
Yay, a simple var_dump() works again!
@NikiC yup :-)
22:26
We should probably stop doing it
@bwoebi ;)
Especially retagging is questionable. Imho tags should be immutable...
agree
yeah, the x.y.z branch is good enough.
:-D
@ircmaxell fun that nobody is choosing the first option
this is correct? "with full of respect, none of your business"
dat reverse psychology
@Shafizadeh "with all due respect"
22:35
ok tnx
> That's the plan, nothing else can really stop it.
Abe
Abe
@Shafizadeh webchat.freenode.net join ##english channel
@Abe like..!
22:45
@PeeHaa Still needs some work, didn't have any time during the last days.
22:57
Does anyone else use the latest EAP of PhpStorm? Is this a stupid update or did I just configure a weird color that's now used instead of another color class for parameters?
> - Is that painting yours? It's rubbish.
- It's a mirror!
2
@kelunik It is frequent that the PhpStorm's EAPs have parsing/highlighting glitches and bugs. Since I've understood that, I stay on the latest stable version.
@MorganTouvereyQuilling I don't have that usually. I'm just using the latest EAPs because of the better PHP 7 support.
@DaveRandom @I'm sure my house is haunted - every time I look in the mirror, there's this gaunt, haggard old man looking back at me, blocking my view of myself
@MarkBaker throw your wife out
23:10
@kelunik Well I suppose that these bugs are quite unpredictable. But I'm surprized that you say that usually you don't have problems. For example, when I tried the 9.5 EAP, the IDE was so broken (including static code analysis) that I had to downgrade.
@FlorianMargaine I'm not sure how one can throw their right hand out.
@MadaraUchiha ask Saw actors
@MorganTouvereyQuilling Depends on the code, but the files I'm currently working on are usually without any errors.
Seems to be my setting, at least I could change it.
@Florian Don't tempt me, but she's sitting quietly at the moment playing computer games and watching vet programs on TV (with the cats lounging over her) leaving me free to work on my RFC
Room 11, where can I get an elephpant PHP 7 plush ? :)
23:26
@DaveyShafik Yes, as Niki and I said at the time. That's an implementation detail that PHP doesn't need to know about. If there's any side data to capture, then the closure itself can do so.
@Morgan - A question that a lot of people are asking
@FlorianMargaine What would bother me is if that were back-channelled. At least he's asking in the open...
23:50
@Sara from what I've heard, there has been a lot of back-channeling of that though
though not really worth talking about I guess...
=== Total 2059 memory leaks detected ===
nice.
@ircmaxell Yeah. Hopefully just light weight nudging and not too much pressure.
Not like 7.0.0 matters much though.
7.1.2 will be the real stable release
6
7.1? lol
@bwoebi You laugh, but mark my words. x.0.z is never taken seriously
Well, maybe 3.0.x was, but there was no 3.1 :p
we should release 7.1.0 next month instead of 7.0.1
23:55
:D
DO IT
hehe
but first I need to fix my 2059 memleaks^^

« first day (1873 days earlier)      last day (3301 days later) »