« first day (2173 days earlier)      last day (2768 days later) » 

11:01 AM
@Wes pls no
 
Wes
why not
 
@Madara have you watched the fate series?
 
@Saitama No
@Wes Because a throw statement doesn't return anything
And it doesn't make any sense for it to return anything
 
hmm, I found a question tagged fate/stay night you asked in anime SE, thus, asked
 
Having something as an expression implies that it return something (even if it's undefined)
 
11:03 AM
;-)
 
@Saitama People die if they are killed
8
 
^^
 
@Saitama @Jimbo @PeeHaa pin operations are RO-only (because that's sort of the point of being an RO...)
 
-.-
 
It could be optionally made RO-and-admin I suppose, but that should be a per-room setting if we do that
although that said, I still want to implement a proper granular permissions system
 
11:05 AM
@MadaraUchiha I marathoned fate/stay night yesterday and finished it in one go... was really anxious to try fate/zero but everybody recommends to wait for Heaven's feel... which I doubt will come out, even in 2017... :/
 
Wes
@MadaraUchiha short circuiting or ternary/_pelvis_ operator can be used as shorter if/else, not necessarily i want to get a return from it. eg i often see and i occasionally do myself !foo() ?: bar(); with no assignment or whatever
i hate you md.
 
pelvis ??
 
I assume ?:
 
Wes
!!wiki elvis operator
 
In certain computer programming languages, the Elvis operator ?: is a binary operator that returns its first operand if that operand is true, and otherwise evaluates and returns its second operand. It is a variant of the ternary conditional operator, ? :, found in those languages (and many others): the Elvis operator is the ternary operator with its second operand omitted. == Example == In a language that supports the Elvis operator, something like this: x = f() ?: g() will set x equal to the result of f() if that result is a true value, and to the result of g() otherwise. It is equivalent to...
 
11:08 AM
okay....
 
Wes
@MadaraUchiha function raise(Throwable $e){ throw $e; } works for me (cc @PeeHaa add it to the book)
 
> People die if they are killed
Besides @Jimbo's mom
the sidebar ^^
 
A real man never dies, even when he's killed
 
@PeeHaa ask what?
 
@AllenJB .
@MadaraUchiha Also,
 
 
> "Just because you're correct, doesn't mean you're right" makes perfect sense in context. "Correct" takes on a more matter-of-factly meaning as in logically accurate, while "right" referrers to his righteousness or how justified he is in his actions/mentality.
 
Looks like varvars are another way to get a broken symtable.
 
hi all can you help me please with my code i identified the error but can't seem to find a solution
 
@Saitama I think that guy is the most stupid MC I've ever seen in anime.
 
i have a loop that display data from database inside a table
here is my code
 
11:21 AM
@MadaraUchiha well.... it's somewhat true
 
if ($t['qte_disponible_f'] == 0){
echo "<td style='background-color:#FF0000;'>".$t['qte_disponible_f']."</td>";
}else if ($t['qte_disponible_f'] == $t['alert_f']){
echo "<td style='background-color:#FFF820;'>".$t['qte_disponible_f']."</td>";
}else if ($t['qte_disponible_f'] > $t['alert_f']){
echo "<td style='background-color:#86FF33;'>".$t['qte_disponible_f']."</td>";
}
 
but still most of those things are translation mistakes
 
@baktetemiloud ugh :-(
 
the problem is the if blocking everything in that page
 
And PHP and HHVM treat that differently on top ... looks like hhvm treats symtables as symtables while PHP doesn't ^^
 
11:23 AM
@NikiC just deprecate all that crap already
 
@Saitama People die if they are killed is also somewhat true, you know.
 
@NikiC ugh. ...
 
@PeeHaa how can one avoid that ? *
 
@NikiC nothing @Jimbo was complaing as usual :P
 
if ($t['qte_disponible_f'] == 0){
    $bgColour = 'FF0000';
} else if ($t['qte_disponible_f'] == $t['alert_f']){
    $bgColour = 'FFF820';
} else if ($t['qte_disponible_f'] > $t['alert_f']){
    $bgColour = '86FF33';
}
echo "<td style='background-color:#". $bgColour . ";'>" . $t['qte_disponible_f'] . "</td>";
@baktetemiloud that at least is a small improvement ^
 
11:29 AM
@Joseph Either prevent deadlocks in the first place. Or provide a way (GUI) to release the lock
In most cases you want to do 1 when possible
 
the main case where you don't is when you are trying to justify your job by creating broken software that only you can maintain
 
That's a valid point
 
@PeeHaa I would love to prevent it. But i can't see how. Can i have your view on the issue please ?
 
It heavily depends on the use case
 
i was thinking about detecting this event 'beforeunload' in javascript but not many people encourage doing so
It is ok if i describe my use case ?
 
11:33 AM
@Joseph you need to have a server-side safeguard
beforeunload or whatever is all well and good, but what if they trip over the power cord for their computer?
or it just crashes?
 
What would that be ? i mean how can i tell that the client crashed ?
 
That's the point, you can't
Sounds like you generally have too heavy reliance on the client continuing to talk to the server. What you need is a daemon which deals with the execution, and simply informs the client of the status.
so that if the client goes away, the procedure will continue to execute in the background and release the lock when it's done
or if it's something that needs user interaction, place a time limit on each interaction (again, monitored and controlled by the server) which and aborts the procedure and releases the lock if they don't respond in a reasonable amount of time
or try and come up with something that doesn't require a lock in the first place
 
client-side thing is always unreliable, as a rule of thumb
 
so yeh, maybe go ahead and explain what the actual real-world use case is @Joseph because what the appropriate solution is will depend heavily on what you are trying to accomplish
 
@Joseph Sure :)
How can I copy a schema in mysql workbench? @tereško?
 
11:44 AM
@PeeHaa @DaveRandom will do. Here ? When i type YUGE texts some of you are not happy :)
 
entire schema or single table?
 
@Joseph if it's enormous maybe put it in a gist
 
entire schema
 
is there any difference between 'enormous' and 'humongous'?
 
server > data export
 
11:46 AM
...
tnx
 
and then select "dump schema only"
youtube.com/watch?v=MPV7ffLD9J8 //cc @FélixGagnon-Grenier
 
> Top 3 cursers
> PeeHaa : 2369
> tereško : 1748
> DaveRandom : 1496
Big surprise there :P
 
Yeah. That list officially offends me :P
 
@PeeHaa Yeah, fuck it.
 
Fuck that shit list in the ass damnit
 
11:49 AM
Most unique number of curses, once again, is topped by Peehee.
 
@PeeHaa you cactus
 
> PeeHaa : 61
> DaveRandom : 61
> Northborn Design : 47
 
@Sean top of what?
 
@Sean tbf @DaveRandom has some really good ones in there
 
@Sean How do you count that?
 
11:50 AM
@tereško Oh i'm just parsing the gist posted a while back with the curses
 
ncurses.md :P
 
PHP script and a nice little usort.
pasted.co/cbdfe55d forgive the terrible var names etc., just hacking it together over lunch for funsies
 
Jay
whats the best way to unset all areay keys less than or = to 3?
so I got an array with 1,2,3,4,5,6,7,8,9 keys and I want to unset all the keys <= 3
 
Also fixed line 55. Heh
 
!!docs array_intersect_keys
 
11:54 AM
[ array_diff_key() ] Computes the difference of arrays using keys for comparison
 
I wish PHP had something like linq :-(
 
[ array_intersect_key() ] Computes the intersection of arrays using keys for comparison
 
even just the wrapped iterator stuff as functions would be nice
 
11:55 AM
^ Hey that's nifty.
 
yeh but it's all eval()
 
Which only makes it that much cooler
 
OK I will rephrase, "I wish PHP had something like linq that didn't suck"
 
11:57 AM
I've yet to see a lib like that
@Gordon more eval :-(
 
24
Q: Is there something in PHP equivalent to LINQ in C#?

eomeroffIs there something in PHP equivalent to LINQ in C#?

also
 
:-P
 
Should such question be really closed?
 
@TomaszKowalczyk The result in outdated self promoting answers
 
I get it that they are broad and unrelated to any technical problem, but if it has several good answers then maybe they could be locked or something?
 
12:01 PM
@NikiC Nice! I love the “zend_symtable_clean() didn't plan for this” bit. You can never have too much faith in symtables being used correctly.
 
@TomaszKowalczyk well that's what closing sort of does, I don't think anyone is suggesting it should be deleted
 
@Andrea I find it particularly ironic that the one thing that is actually a symtable in the usual meaning of the word is not actually a symtable :/
 
@TomaszKowalczyk they could be locked if they had historical significance. but I dont think it applies. when it doubt ask @MadaraUchiha
 
@NikiC I wonder if, in order to prevent this sort of mess in future, it might be worth hiding the inner zend_hash API behind aliases. Like, opaque zend_proptable (though, btw, I made that name up, there might be a better one), zend_symtable types.
 
but yeh I'm often on the fence about things like that, it is valid to ask for tool recommendations. It's a shame that SO doesn't have an area specifically for that.
 
12:03 PM
@NikiC That's the problem, symtable sounds like “symbol table” but it's more like “array” (in the PHP sense, obviously). This catches me out every time.
 
uınbɐɥs: Cursed 0 times over 4696 messages, congrats to our cleanest room 11 member :P
Okay, that's enough stats dumping I think.
 
12:16 PM
!!sudo
 
@SagarNaliyapara absolutely not, now make me a sandwich.
 
Hey everybody
 
why is there no word "everymind"?
 
12:36 PM
can anyone give me reference link OR book name(s) which is good for OOP study ,it must be basic to advance..
 
ThW
@Gordon no minds without a body yet, no telepathic communication, ... :-)
 
i have two cronjobs runnng at the same time
one as root and one as www-data
how can i stop the root one and keep the www-data ?
 
@virepo the user is usually visible when running pgrep to show what is running.
@Wes if you make the throw be contained by a function....that would do what you want.
/also, summon demons. But everything is a trade-off.
 
Wes
2 hours ago, by Wes
@MadaraUchiha function raise(Throwable $e){ throw $e; } works for me (cc @PeeHaa add it to the book)
 
@virepo try to find out the PID and then kill ?
 
12:46 PM
PID?
Pelvic inflammatory disease
 
Process ID
 
Process ID
ps ax
list all process running atm
 
lol
 
u can concat with grep to filter whatever you are looking for like :

ps ax | grep mysql would list all running local mysql servers
then just sudo kill -9 PID
 
okay cool
thats done
thanks
 
12:50 PM
np :)
 
@ThW I object to being reduced to a body though, especially on the internet where you mostly communicate with my mind only and am not physically present
 
@virepo if u want to read more to ps : wiki.ubuntuusers.de/ps
some of u visited codefights.com ?
 
I totally forgot that @param can't be inherited by name, but instead should be inherited by parameter position...
 
can you recommend a book or any online resource that explains in-depth differences between ORM approaches (like DataMapper and ActiveRecord), with mechanisms like IdentityMap? I'm looking for something that can be referred to as a canon definition of what certain term means.
 
@TomaszKowalczyk POEAA
 
1:04 PM
I am well aware of many of those terms, but when you are discussing things with people we are many times arguing over slight meaning differences, which can be annoying :)
@Gordon thanks, seems like I'll need to finally order a physical copy to have it at hand :)
 
well worth the money
 
@bwoebi @Trowski Do we have anything yet, that makes it easy to run something like the following in chunks?
foreach ($result->getClassList() as $class) {
        $classDoc = $classStorage->load($class);
        $new = yield $classRepository->put($package, $normalizedVersion, $classDoc);

        $logger->info("Adding class '{class}': " . ($new ? "new" : "already exists"), [
            "class" => $classDoc->namespace . $classDoc->name,
        ]);
    }
 
how can learning php easily....give me a solution guys..
 
I could use a double foreach + array_chunk, but I wonder if we can provide a better API.
 
I install CodeIgniter as subfolder but when I add $this->load->view('bootstrap/header'); the url doesn't get rewrite to codeignitor folder, but the actual root localhost/index.php, I would like it to read my files localhost/CodeIgnitor/... I try many .htaccess rewrite. No luck
 
1:12 PM
Haven't looked in my spamfolder recently. Should do it more often...
Why Atheist Doctors Hate This Diabetes Breakthrough
@FarhadSaadatpei why are you installing codeigniter in 2016?
 
Its easier for me
You recommend something simpler? @Patrick
 
Meh today I have an -off-day-after-noon
 
Laravel. runs away
 
@FarhadSaadatpei pretty much anything is better than codeigniter
 
How about symfony?
 
but if you insist, look at something like silex
 
All those bashing at Laravel :P
 
@FarhadSaadatpei it's ok-ish. I use it at work. Only wants to make me kill myself like once per day
with codeigniter it was every 5 minutes
 
lol
Well im kinda using CodeIgniter just to get the taste of Framwork
 
1:16 PM
please don't do it
it is full of bad practices
it will only teach you bad things that you have to unlearn later
 
I have never used PHP framwork. I will transfer to Laravel afterward
 
then all hope is lost. good luck anyways
 
Well im in middle of the tutorial, 90% complete, but this folder relocation is bothering me lol
 
did you check what year the tutorial is from?
 
1:18 PM
too old.
 
Well I kinda want framework cause I mainly develop on iOS, I use PHP, Bootstrap and Angular as my Web base solution, Just thought learning any framework will make the job much easier
 
seriously, if you want to become a better program and increase your market value, work through this tutorial before you pick a framework.
 
I promise to move to laravel. I just need this quick fix (I sound like a developer Junkie now) lmao
 
"Just thought learning any framework will make the job much easier" -- Ha!
 
1:19 PM
@Patrick codeigniter.com is not dead. afaik Ellislab just pulled out of it. But people are still actively developing it
 
@Gordon shhh... it's dead to me
 
@DaveRandom well it is ready, BUT it wouldn't work with shortest abbreviations. I could add the "normalizer regex" as a helper and use that but then I started on the interval parser thing. Which, uh... works :D however, it is probably ugly, specially var names, uses regexes so I'm not sure how em, "likeable" it is. But here is what I have so far.
 
I know I won't stay in PHP field in next 5 years from now. Swift already started on Web Frameworks, Oh and is fast and modern.
 
php is from the 1980's and slow ...
 
1:22 PM
oh ... wait ... that's nonsense ...
 
also morning
 
and insecure
 
oh yeah and insecure ...
 
inherently
 
also it gives you cooties, and heard it can also make you gay ...
 
1:23 PM
inconsistent
 
and bloated! don't forget about bloated!
 
@Ekin If it works, I vote that you merge it asap, even if it's not what you would view as the "final result". That way you avoid it getting too far out of sync with master. We can always refactor it later when we have the generic interval parser in place. /cc @PeeHaa
 
moin ekin
 
I heard all it's core developers are potheads
 
1:23 PM
I confirmed
 
Are there any metrics comparing PHP 7+ to other modern languages?
I say "modern" I mean in use in today's industry.
 
it's difficult to read the last message on the screen, because my tub of weed is obscuring my view ...
 
@FarhadSaadatpei IBM javascript web framework strongloop.com
 
@Gordon yet despite this, it still has problems
 
Now all I'm trying to do is fix this CodeIgniter
@littlepootis nothing will go wrong with Javascript man
 
1:24 PM
@Sean benchmarks game?
 
we all hate CI
 
@JoeWatkins lol ok
 
@DaveRandom okay :-) then I'll do that if there are no objections
 
we don't have a very high opinion of any framework tbh
 
@Ekin pfff, shoot first and ask questions later
:-P
 
1:26 PM
hehe alright
 
some frameworks are much worse than others though
 
pfft, questions ... that's just an invitation for more work, just shoot, then hide ...
 
codeigniter is right at the bottom with cakephp and friends imo
 
I can tell, neither do I, not to brag, I develop an entire social platform in 2014 using no framework and I admire every step of the way. @JoeWatkins
 
evenin
 
1:27 PM
'nin
@FarhadSaadatpei writing anything from scratch is a little crazy ...
 
@JoeWatkins except wordpress, of course. We all do wordpress here.
 
@JoeWatkins but the amount of knowledge you get is valuable.
 
right in the middle of framework and nothing there are components, these seem to be the only sensible ... oh my god, I'm just going to tell @DaveRandom to fuck off ... fuck off @DaveRandom ... way of building applications today ...
 
@JoeWatkins I always start my software projects by mining metals
 
/me fucks off
 
1:29 PM
@FarhadSaadatpei well ... a lot of it is only valuable if you plan to write all that stuff from scratch again ...
which you shouldn't be ... because ... crazy ...
@DaveRandom :D
valuable is getting the thing out the door ...
 
The reason I need PHP framework is because of the social platform I tried to develop when I used PHP as the source of connectivity to database etc, it was a headache man, I think I literally build my own framework in the process. hahaha @JoeWatkins
@JoeWatkins very True
 
@FarhadSaadatpei yes, jabbascript is life
 
perhaps the words I am using are not very clear ... you are and were doing it wrong, using CI (or insert monolithic framework here) and writing your own framework are the same mistake, only the author of the framework is different ...
 
I know I was wrong, I was new. I still think I'm a beginner
But mistake must be made to learn something
 
1:36 PM
everyone is entitled to an opinion ... even if it's rubbish ...
 
@FarhadSaadatpei you know, you could also try to learn from other peoples mistakes...
 
when I go through this link I didnt understand one line
*after extending this class, you can create accessors and mutators that will be called automagically, using php's magic methods, when the corresponding property is accessed.*
http://php.net/manual/en/language.oop5.properties.php#98267
 
that ... it means listening ... and thinking really carefully before you act, or commit to act ...
 
@Patrick everyone has an opinion. Too many of them. At the end, you just got to pick up and experience it for yourself.
have you see how many argument goes on this site about different method?
 
listening is hard ...
 
1:39 PM
Properties have implicit accessor and mutator functionality
what is mutator functionality?
 
anyway ... afk school run, lata peepz
 
@Exception Ignore that thing
It's horrible
@JoeWatkins o/
 
@JoeWatkins bye
 
@PeeHaa may I know any reason in simple sentence
 
jeez… that c php stuff is soooo tiresome. for every little thing you have to dig into the source or google your buttocks off
 
1:41 PM
@Exception There is little point in having action_property() methods
Even worse unset_property() is one of the most idiotic things possible imo
 
why don't we just put loads of self answered Q&A on SO with the most common use cases?
 
@Exception magic is for wizards. are you a wizard?
 
@PeeHaa okay...
 
This is even worse than just your average magic
 
@Patrick haha
 
1:43 PM
@Exception Think about it. What would you gain by that?
 
@PeeHaa Yes .. I haven't thought it about a sec and asked here... my mistake
 
Without looking I'm fairly certain most of the user notes on that page should be avoided, because omfgwtfbbqappelgebak
 
yes there are -ve markings as well
but new comers will not consider this :( .. they will trust the comments ..
I think php core team must review all such comments which are not relevant ..
 
@Exception Ain't nobody got time for that.
 
There are about thirty thousand notes, so good luck with that
 
1:51 PM
@salathe Yes I guess how can someone check all such comments :P
@NikiC yes there are :P
 
We could at least delete all newly posted ones @salathe :P
 
OR atleast check -ve mark comments and take a desicion on that.
 
@Exception One of the problems is that people upvote random crap that they think might possibly work or is sane
Votes can be reset, but might as well delete crap when you find it
 
@PeeHaa Yes ..they found that useful in their project and use that unnecessary code ...what a crap..
 
@PeeHaa Thanks for volunteering! :)
 
1:54 PM
@salathe I have sat on it for a month or so
Gets boring really fast
Basically master.php.net/manage/user-notes.php?view=notes&type=0 -> crap -> delete -> crap -> delete -> crao -> dlete
But it's easier to just scroll to user notes when you happen to be on a page and remove then
 
@NikiC re: namespace scoped declares, another reason to make namespaces first class citizens?
 
It has -67 voting .. it must be deleted I mean look at that code
 
> Username: peehaa@php.net
Password: jimbosmom

Nope.. That's not it
 
:P
Close though
@Exception gone
 
2:00 PM
@Leigh what does that mean?
 
@PeeHaa I can still see it :P
 
@Exception it takes some time to update after delete
 
okay .. okay..
 
@NikiC It's yet another thing that would benefit from having namespaces as a distinct entity rather than a collection of naming hacks?
 
@Leigh what do you mean by distinct entity?
 
2:03 PM
@PeeHaa do you have account over php.net?
 
Unless you mean internally, in which case it doesn't really matter
 
@Exception why?
 
@NikiC Having something like a zend_namespace struct, so attributes that are per-namespace can be stored against them
 
If yes can anybody create account over it OR any special requirement ?
 
There are several reasons to get an account
 
2:05 PM
and what are those?
 
The easiest way is to learn C and write an rfc to remore function aliases from the language
 
:P
 
@PeeHaa LOL
asking you serously.
 
The easiest way is to update docs
 
2:08 PM
update docs?
which php docs
 
The ones on php.net
 
The manual.
 
You start on edit.php.net and after a while request your own account
 
/me pings PeeHaa in 110670
 
@NikiC okay..
 
2:10 PM
@Exception Yeah docs the easiest way if you don't know c
 
@PeeHaa (y)
thanks
 
Evenin'
 
2:34 PM
Just remembered that moment in bleach when Ichigo is being thought how to fight by hat guy in this huge underground place, and got hit by how this applies with coding.
> How many times have you lunged at your enemy without a plan?
 
someone has finally captured my feelings about the presidential debate: youtube.com/watch?v=5BJjUv_TD2E
 
The only winner tonight is the Voyager probe, which is speeding away from the Earth at 17 kilometers/second #debatenight
10
 
Thought PHPStorm was smart with documenting parameter types? Passing through a variable which is passed directly into an object constructor with a @param string $varName but it's not picking it up. Ah well.
Would probably work if I could use scalar param type hinting, wish PHP 7 was a thing over here.
 
@Sean I think PHPStorm allows it because the object might have a __toString() method.
 
2:47 PM
@Trowski Ahhh, suddenly it makes more sense.
 
@kelunik You want to run them simultaneously, but only certain size chunks at a time?
 
@Trowski Right. I have that problem very often. Two times in kelunik/acme-client when checking a longer list of DNS records and when requesting challenges. And now again when using coroutines as lightweight threads.
Running 20 composer create-project processes at a time isn't that good.
 
@Sean Err... actually if the first function doesn't have any parameter types set, I don't believe PhpStorm is that smart.
@kelunik Hmm... array_chunk is my first thought, but that seems ugly.
Maybe there's something better we could do.
 
@Trowski I think we can just provide a function that accepts a callable and chunk size.
 
does phpstorm support 7.1 yet?
 
2:55 PM
AFAIK no
 
@NikiC This is a rhetorical question right?
 
BOOM
Conference talk practiced, I think I'm good, I'm about 45 minutes with a demo
 
conference talk ... demo ... uh-oh
 
Demo with torrent downloading and unreliable wifi (Y)
You know what they say, you might as well go all in like we do with @PeeHaa's mom
 
@NikiC It claims to. Under "PHP language level:" I have "7.1 (constant visibility, nullables, catch multiple exceptions, etc.)"
 
2:59 PM
@Jimbo lol. Nice one!
 

« first day (2173 days earlier)      last day (2768 days later) »