« first day (1773 days earlier)      last day (3169 days later) » 

5:00 PM
guys pls help me with this questions...
$valid = TRUE;
$cnt = 0;
while ($valid = TRUE) {
$cnt++;
if ($cnt > 10) { $valid = FALSE; }
}
echo "$cnt";
whats the reesult
11,10,0,no output--options
 
since it's = TRUE it lops forever
if it were == TRUE it would evaluate
 
@user12688 If you want the result, why not just run the code. And your real question is probably to do with the typo of $valid = TRUE instead of $valid == TRUE
 
reminds me of the "linux backdoor attempt"
 
yep.
 
What will the output of this PHP code be 'function x () { function y () { return "y"; } return "x"; } echo y();'
 
5:04 PM
user12688 are you trying to solicit help for a programming exam?
eval.in / 3v4l.org
or set up PHP locally
we are not your shell
 
Which company are you having an online interview with @user12688 ?
 
@tereško yw
 
(been going through my "watch later" list)
 
btw you should tell them that 'gotcha' questions like the above are terrible ways of interviewing people.
 
yeah
work-sample tests > gotcha programming questions
 
5:09 PM
The actual output of someone in a company I worked for writing 'function x () { function y () { return "y"; } return "x"; } echo y();' would either them being fired, or me quitting the company...
 
if I were hiring, I would go: "give us your SSH public key, clone this private repository, check out the develop branch, fix the security vulnerabilities and/or add a new feature, email us a patch, and let us know if you need help with anything"
lol
you can gather more facts from a small sample of them actually doing the work than any bland generic test can ever give you
did the developer add unit tests to the tests/unit directory without being told to? etc
they're also more fun for the applicant IMHO
 
@ScottArciszewski when you get older and can drink beer, you will learn why this is a really terrible idea
 
@tereško a short question: when I allocate 1 GB for a OS on my Vbox, when I close Vbox window, It will be free for my laptop ? or for ever it will be allocated ?
 
@Sajad it does not take away memory from your laptop
it only sets the upper limit for how much it can use, while the VM is running
 
5:23 PM
@tereško I'm speak about RAM
 
it's like, if you could set a max-limit for chrome
 
btw @tereško I'm 25 and the drinking age here is 21 ;)
 
@tereško alright
tnx
 
5:43 PM
thanks to @Ocramius I'm back in the saddle again, trying to understand more rationale behind some DDD practices...
#1)
------
$spec = $user->getFriendsSpecification();
$user->mountFriends($userRepo->getFriends($spec));

#2)
------
$user->mountFriends();
.
can anyone tell me why #1 is better?
The client has to now "know" to use a domain service to do what the entity could just handle.
 
hmm .. maybe I should switch to faster internet
it say that it will take more than 4 hours to download all Stargate seasons (73gb)
 
6:06 PM
I'm a bit concerned about all these positions that require MongoDB experience :|
 
@prograhammer probably because the second method requires bidirectional dependencies.
 
Guys, RapidPHPEditor (rapidphpeditor.com/buy.php) says that by sending an SMS I can buy the software for 4.34 EUR instead of 49.95 EUR. Maybe someone knows what's the catch behind it?
 
probably something marketing something sell your number to third parties
 
@ScottArciszewski I think that that might be the case too
 
6:13 PM
Well, the Privacy Policy say that they would never do that. Though the offer seems too good to be true
Well this is interesting
I tried accessing the same website through a proxy and it doesn't show the offer while when I access from my IP, it shows that the offer is limited to my country
 
Seems fishy... 90% discount seems a little rich even if they are whoring out your phone number.
 
Using a separate pre-pay sim for those things is wise....
 
I just randomly discovered it through stackoverflow and that massive discount really interested. Not in a way that "I want to buy it" but "what's the catch?"
 
"what's the catch?" - It's not PHPStorm....
 
I think that they probably silently sign you up for some "special services" that bill you annually. Now that I reread the Privacy Policy it only talked about email and credit cards and no mention of a phone number nor anything related to it
 
6:29 PM
Who would want to join with me on anonymous social platform I'm developing?
I need a PHP developer for Application Management System
 
Oh and I found what was hogging all of my server's RAM @Orangepill - systemd-journal was at fault. I disabled it for now.
 
Anonymous
6:52 PM
@tereško you have already the fastest internet connection I have heard of
 
Afternoon, room.
 
it's the cheapest one I can get here
 
Anonymous
Still it's fast enough imho
 
Anonymous
4 hours wait is nothing
 
Anonymous
specially for 73gig
 
6:56 PM
@Orangepill I'm curious what bad could happen if an entity actually referenced a repository?
like specifically
I'm just not seeing it in my head at the moment
It seems the trend is to add a property of "ID" to an aggregate root (ie. Customer has OrderID property). Then some domain service can grab that OrderID and call the repository then turn around and fill in the Customer entity where it needs it. And perhaps any other behaviors needed from Order the domain service can perform for Customer.
I'm trying to see how the unidirectional advantage of using service helps here. I think it has something to do with transactional boundary. Trying to get it clear in my head...
@Ocramius Vernon says that aggregates may hold references to the root of other aggregates: dddcommunity.org/wp-content/uploads/files/pdf_articles/…
lol nevermind I just read further
 
7:27 PM
anyone running redis "locally" on windows for development?
(virtualbox or the like counts too)
 
How do I only grab the value of 'name' in this array
[{"name":"Penguins.jpg","featured":"0","category":"0","caption":"","alt_text":""‌​,"blog_ide":"ugNQpbo6G7E"}]
 
@Tsea after json_decode it would be $arr[0]['name'] I assume
 
template<typename Return, typename ... Args>
auto call(void * method, Args && ... args) -> auto {
        auto fn = reinterpret_cast<Return (*)(Args...)>(method);
        return fn(std::forward<Args>(args)...);
}
This is like, pointless, but was fun to think about.
 
im getting Warning: Illegal string offset 'name' when i do that @MarcelBurkhard
 
If you look at my page here. Take a look at the first two forms lines. Now click the icon in the top right corner and look at the Trip Name and Description lines and how they don't match the what's in the form.
 
7:34 PM
@Tsea did you try
$array = json_decode('[{"name":"Penguins.jpg","featured":"0","category":"0","caption":"","alt_text":""‌​,"blog_ide":"ugNQpbo6G7E"}]');
echo $array['name'];
?
 
I think it has something to do with the ' character because thats where it cuts off in the form
 
@LeviMorrison Why the void method?
 
@NikiC Take an arbitrary pointer and pretend it's a function pointer of some signature.
But like I said, it's pointless ^^
Something like that might be useful in Zend Engine for parameter parsing.
(but not this)
 
@LeviMorrison I was more asking why it isn't a generic type
 
If you already have a signature, why pass it to this function?
template<typename Return, typename ... Args>
auto call(Return (*method)(Args...), Args && ... args) -> auto {
        return method(std::forward<Args>(args)...);
}
^ This one is literally pointless… I don't think there is a single piece of value that this one adds.
 
7:39 PM
@deadsource that didnt work
 
it shows me an error in json
 
any ideas how to work around the ' (apostrophe) character issue
 
Maybe you need to escape it?
 
When I get the data from my db and it shows up in my form for me to edit it, it gets cut off right before the apostrophe character. So if it should say something like Ben's August Test it will just say Ben
@deadsource does that make sense? I think I do need to escape it
 
I've got memory problem while executing code it uses to much memory like 500MB, I'm trying to debug it to find out problem, what are best tools for it?
 
7:49 PM
@benlevywebdesign Try htmlentities
Convert it to HTML and then the browser will submit it back to you as an apostrophe
 
So the data is being shown cut off. Ok let me try somethings
 
@deadsource and @MarcelBurkhard you guys pointed me in the right direction thanks
 
@Machavity There is no issue when submitting the form its only when I go to edit it. Thats where it cuts/truncates it.
 
I know. Your form is probably wrapped like this <input value='I have an apostrophe I don't like'>
that would truncate as-is. But convert the output and it won't truncate
 
It looks like this: <input type="text" class="input-text edit" placeholder="Trip Name" name="tripname" value='<?php echo $tripname; ?>'> </input>
currently
 
7:58 PM
Yep. That's exactly what I was expecting. And that's where htmlentities would solve the problem
 
why don't you use value="" instead of value=''?
is there some new specification or what?
 
@deadsource what do you mean?
oh the ' ' vs " "
 
my Twitter timeline is empty, so I probably can't tweet about it :(
#firstworldproblems
 
Well I just switched to using " " and it fixed my issue of the characters
 
@Tsea you're welcome
 
8:02 PM
is it valid html to use single quotes instead of double? First time seeing someone use single quotes
 
The closing keynote for php[world] 2015: @ircmaxell (Anthony Ferrara) on "PHP7 and Beyond: The Future of PHP" https://world.phparch.com/schedule
 
Awesome. Congrats man
 
oh they're valid
and congrats
 
@deadsource You can use both but I dislike inconsistency where people use both in the same tag
 
awesome :)
 
8:06 PM
in Root Access on The Stack Exchange Network Chat, Aug 18 at 11:13, by Oliver Salzburg
@marcusdoesstuff The 0 in RAID0 stands for the number of files you get back when a drive dies
4
 
@ircmaxell hey sorry for random google related question but do you happen to know where should I be asking a question related to this: support.google.com/webmasters/answer/63757?
 
@tereško the more you know
@Machavity Say, do you feel the same when people use echo 'this and that'; versus echo "this and that"; or the other way around?
I myself like more when people use single quotes in PHP versus doubles, though double quotes really seem appealing sometimes
 
@deadsource In PHP those are similar but not the same. echo 'this\n'; vs echo "that\n";
 
@Machavity I am aware of that. Though I forgot that at the same time c:
It's just that I see double quotes used when there are no variables nor new lines or other things that can be used and that somehow doesn't go well with me...
 
I prefer single quotes just to reduce the processing time (if ever so slightly)
 
8:14 PM
Oh, you can even save some processing time? Neat
 
@AwalGarg Just FYI @ircmaxell doesn't work for Google anymore.
 
oh, well. ignore that then :)
 
ThW
@Machavity i think your are mistaken, at least with an opcache
 
@ThW True, but I like max performance and it's a small thing to do
 
ThW
@Machavity I rate maintainable code higher so I use mostly single quotes, double quotes for sql and often sprintf().
 
8:39 PM
I wonder what impact rate would have using single quotes instead of doubles on something like a Raspberry Pi. Though I use new lines and color codes so I can't switch to single quotes probably :/
though I should probably write a proper program instead of running a php script as my blog's backup tool :/
 
ThW
@deadsource Add an opcache, micro optimizations are not really efficient
 
Mornirnings
 
8:54 PM
@ThW OPcache description reminds me of HHVM a bit
 
ThW
optimize i/o, cache results, ...
 
I'll look into it :)
 
ThW
@PeeHaa Morning
 
@deadsource How/Why?
@ThW o/
 
@PeeHaa "by storing precompiled script bytecode " isn't that what HHVM does?
 
8:55 PM
Not really
 
hm, probably I misunderstood something
 
ThW
If you optimize your web app, start with the browser network tab. You can improve performance a lot if you optimize the resources used by a page. Yslow is a good resource to start with that.
 
If that worked on a console window, it'd be great :D
 
ThW
@deadsource console window? what kind of application are you developing?
 
@ThW oh it's not an app, just my blog's backup tool. Though it takes 10 minutes to fully resync all of the data so I was wondering how could I optimize it
 
ThW
9:07 PM
have you tried to profile it with xdebug?
 
@deadsource strace all the things.
 
ThW
blog backup sound like database operations, take care to not do sql queries in loops
 
"<...> take care to not do sql queries in loops" :I
I wonder how can I make them not in loops
 
ThW
INSERT INTO ... SELECT ..., mass inserts, collect ids and use IN conditions, ...
 
I just can't wrap my head around how to properly write the SQL queries I need. We had like a full year on databases, half a year dedicated to SQL and all we did was SELECT, INSERT, UPDATE, DELETE, INNER/LEFT/RIGHT JOIN, ORDER BY, GROUP BY and that's pretty much it
oh and who could forget TOP
 
9:25 PM
INSERT INTO table (col1, col2, col3) VALUES (val1_1, val1_2, val1_3), (val2_1, val2_2, val3_3), ...
that's one way to avoid it
 
Yeah, I'll use a query like that for creating a temporary table with the new data and then compare it with the existing on the backup database. Though that's the one query I can't think of. I mean I have to compare if it exists, if the "likes" and "source" are updated and update them. Same for new or deleted tags.
 
ThW
of course you have to find a balance between performance and memory usage
 
Has anyone ever seen Composer refuse to install a dist package, and instead is always trying to use git, which fails as it isn't installed on the server?
 
how to declear datatype in php and it is possible or not?
 
@SajjadKhan what have you tried?
 
9:33 PM
doesn't PHP pick the best suitable datatype for you? And if I remember there are (int) and such (or was it in javascript)
There's also settype()
 
@benlevywebdesign what i show to you.. i just ask it is possible or not??
 
Well, I gathered a lot of useful information today. I should probably rest for today and have a go at optimizing my little tool tomorrow. Thank you for your input everyone c:
 
@SajjadKhan you didn't show me anything. You just said how to declear datatype in php and it is possible or not?
 
I didn't get you.. it is not a error program that i show you it is general diccussion..@benlevywebdesign
@benlevywebdesign or should i show the URL i tried to find the answer
 
what have you tried doing to "declare datatype in php"
 
ThW
9:41 PM
@Danack I have seen that before, problems with https certificates.
 
@ThW that answer is worth at least 3 beers.
 
ThW
lol
 
@ThW Cancel that. 1 beer. It seems packagist doesn't validate the URL you input when adding a new repo....and it's possible for it to setup a project in a way that makes it impossible to setup auto-updating post-push hook on github......setting it to be a https url fixed one of the projects....but another is still borked....
 
ThW
interesting
 
10:52 PM
morning
 
afternoon :-)
 
lol
Anyone have any good strategies for getting errors/messages out of domain objects and query objects (DDD/CQRS)? Like some payload strategy shown here: github.com/auraphp/Aura.Payload/blob/3.x/docs/index.md
 
11:49 PM
I guess my real question is how should the domain entities return error messages (those that aren't exceptions)?
 
:-)
 
@ircmaxell When are you going to do your #nocapes?
 

« first day (1773 days earlier)      last day (3169 days later) »