« first day (1780 days earlier)      last day (3151 days later) » 

2:01 PM
posted on August 31, 2015 by nlecointre

/* by Barbu */

4
 
good morning
 
Mornig @Orangepill
 
good morning @Orangepill
 
@PeeHaa what's wrong with libreoffice? if ugly is your only problem with gimp, try gimpshop and how about evolution for a mailer?
 
@Gordon libreoffice fucks up my document markup even worse than ms office
 
2:04 PM
@PeeHaa document markup? its wysiwyg. if you want markup use an xml editor ;)
 
Sorry I meant the actual visual end result
And evolution looks decent. Does it allow you to save attachments even if they have the same name at once?
And how does it handle a lot of messages in a folder? Including search
 
@NSGod instead of HAVING distance < ? try WHERE distance < ? (will have to go before the group by clause)
@NSGod also I am suspicious of the reference to time in the order by clause... use posts.time instead
 
Hello i wondered if anyone here can help me with the basics of setting up a development server. Im a junior php developer currently and im working on my application which is just localhost at the minute.
 
@MatthewSmart What environment?
 
php running mamp
 
2:11 PM
@kelunik What value does that latter bring?
 
so .. what's up ?
 
@tereško o/
 
yo
 
47 mins ago, by PeeHaa
This weekend I learned I am too old to do a 2 day festival without any sleep...
That's whatsup
 
@JoeWatkins Are you rolling in $$$ yet from your youtube screencasts?
 
2:13 PM
@LeviMorrison It's backwards compatible then? Maybe we're just talking about different things, I don't know.
 
@kelunik do I have to do a special rain dance to poke coveralls? Because it doesn't works :P
 
Security Misconfiguration Vulnerability in Doctrine (CVE-2015-5723) - Please check if you are affected http://www.doctrine-project.org/2015/08/31/security_misconfiguration_vulnerability_in_various_doctrine_projects.html
3
 
@PeeHaa What did you do so far?
 
@PeeHaa too old for the festival or the recovery?
 
bugs.php.net/bug.php?id=43283 can this be fixed in real?
 
2:13 PM
@Orangepill Mostly recovery
 
@PeeHaa I have the same issue :)
 
@kelunik 1) added repo to coveralls 2) Added .coveralls.yml with the directive pointing to my src dir 3) added coverage config + coveralls repo thing to .travis.yml
 
Highly recommend watching these two screencasts from Joe Watkins if you ever wanted to learn a bit more about PHP extensions.
20
 
@peeHaa could you help me with a quick 5 minute chat please?
 
I know a fair number of people here who've expressed interest.
 
2:15 PM
Travis seems fine, but coveralls says there are no builds yet
 
WTH WTF do they hide that info...
Not that the error tells me anything though :P
 
@Ocramius Why's the cache set to 777 at all?
 
It isn't because I am missing this is it?
 
@kelunik because dumb and we assumed safe umask
but you know, assumptions are bad :)
 
2:20 PM
@PeeHaa Nope, that's just the code fixer.
 
Yeah thought so
 
@PeeHaa Same here currently...
 
protected function process(array $yml)
Of course yml is fucking things up again...
 
@PeeHaa IDK. havent used it in a long time. am using thunderbird for some reason
 
I am not alone
@Gordon Now that is a bad piece of software
 
2:24 PM
@PeeHaa it reads mails. thats all I need
 
Yeah, but it cannot handle the amount of mail I receive in a day :(
I always got javascript timeouts when looking at a large mailbox folder
 
@PeeHaa :D
unsubscribe from the pr0n newsletters
 
lol
 
there are porn newslertters?
 
Damnit. Don't think coveralls is going to work for me ATM. Oh well at least I have something now
@tereško I just searched. And yes there are :)
 
2:34 PM
.. I wonder
 
@Trowski is this a Flarum instance?
 
@Ocramius Am I missing something in the "Is there a proper fix or security best-practive to avoid this issue?" bit ? Namely why 0775 and not 0755 if you're also always using the same user.
 
@Danack group access is ok
the problem was the "other" access
 
@marcio I think so.
 
...that kind of sounds like an assumption.
 
2:39 PM
@Trowski Flarum is great, they did a better job than discourse in many parts :) I haven't checked if the email notifications are as perfect though.
 
It is an assumption, yes, it was discussed carefully
You can obviously be more restrictive and apply a stricter umask if you want
the problem was with misconfigured environments
 
@tereško yes, you get them automatically if you click on any link in them
 
I was just wondering, what would they would be pushing
 
um... porn
 
@tereško fire up incognito mode and go hunting for some :D
 
2:44 PM
especially since software companies seem to send ads for same exact content
just curious, but not curious enough
 
any way to have a trait with private functions( functions only accessible inside class that is using the trait)
 
yes
 
peehaa, link?
 
facepalm
 
2:48 PM
indeed
 
don't you think thats the first thing i read lol
remember the manual, and keep it holy
 
considering it answers your question - no
 
it doesn't answer my question
 
... emm .. what question?
 
Why doesn't it answer your question?
 
2:49 PM
unless you're telling me my only option is to make them public then declare them private in my use clause
 
questions end with "?" ... I don't see any questions by r3wt
well, aside from the one asking for the link
 
@r3wt Nobody said that
What's wrong with defining the visibiliy?
It does what you want roight?
 
But not in the way I want to solve my problem!!
 
the trait has about 30 functions, all need to be privately visible to the class using them
 
So? Make them private?
 
2:56 PM
I don't even see what the problem is - 3v4l.org/EaFaj
 
Also I would say that having traits are the wrong tool for the job and that a trait with 30 methods is definitely the wrong tool for the job
 
@r3wt I hope you know that traits are considered to be "kinda bad"
 
@Danack see the result for HHVM
 
just make sure you name the trait fuckSRP
 
lol
 
2:57 PM
why would I want to look at HHVM?
 
@Orangepill with WHERE CLAUSE i get "Unknown column 'distance' in 'where clause'"
 
@r3wt this is php chat room
 
Fuck this. I aint going to support somebody who doesnt give any info
 
i didn't know you were on the rag man, sheesh
 
/me resists the urge to reply to this with "your mother"
 
3:00 PM
\o/ It's sushi time
 
@NSGod the error seems self-explanatory
 
@PeeHaa even if it makes sense for the usage case? say i have two api controllers. each needs to support file uploads. one api is for the admin, one api is public. wouldn't it make sense to use a trait to share common utility functions between the two?
 
@PeeHaa homemade or take-out?
 
@r3wt No
 
@tereško yeah already know that, but we trying to find solution for the query with different clause
 
3:00 PM
Composition makes sense
@tereško take-out. I am still too wasted to do anything other than sitting and typing :P
 
@r3wt so, you are saying that your "api controllers" would have 30+ methods? That's just plainly bad code.
 
Or should I order chinese?
 
@JoeWatkins Reddit is a toxic shithole.
 
@r3wt why are you using traits instead making it a dependency proper?
 
agree
 
3:03 PM
@JoeWatkins lol wtf
 
s/Reddit/the internet/
 
What an asswipe :P
 
yeah I don't even know what he's talking about
 
It's a real shame that their business model involves deliberately enabling trolls (e.g. the lack of an ignore button) and I can't say an alternative site that has anywhere near the numbers of users, but I just can't stand reddit any more.
 
the trick is to never read comments
 
lol! @JoeWatkins 13 seconds in the first screencast and joe is already having joe problems setting things up :P
 
Happy Monday people!
 
@PeeHaa at one point a button comes off ... I think I handle it pretty well ...
 
@Sherif did you make that? O_o
 
@Ocramius yea
 
3:06 PM
@JoeWatkins hehehehge
 
nice work!
 
yeah nice production
 
@Orangepill maybe a UNION ALL to bring in other table (votes, userVotes etc), Unfortunately MYSQL don't support FULL OUTER JOIN, I have to emulate LEFT JOIN , but i just want to know if you know any efficient way to this. :/
 
Thanks :)
 
@NsGod did changing the group by to posts.time yield anything useful?
 
3:09 PM
Who was the PHP PR guy again?
LawnGnome?
:p
 
@Sherif nice work. awesome production quality.
 
just when I'm thinking to myself, youtube is awesome ... youtube.com/watch?v=ZdP0KM49IVk this is q'd up after @Sherif's video ...
 
@Orangepill Thanks. I think I'm finally starting to get the hang of this video editing business.
@JoeWatkins heh
Yea, well... at least people are trying to teach.
 
@Sherif great work
 
@Orangepill Yes, I change that to posts.time, incase that could be the issue, but is still same result. However i do believe that distance should be before GROUP BY.
 
3:11 PM
@Sherif It's Monday \o/
 
@JoeWatkins The net is full of wonderfull movies like that :D
 
@bwoebi Indeed it is.
 
@Sherif And it's 7 days until next Monday :-(
 
monday monday gettin' down on mondayy
 
@bwoebi That's OK. It's also 14 days until the Monday after that so I have at least 2 Saturdays to look forward to in between.
 
3:16 PM
@PaulCrovella you asked for it
 
@Sherif stupid weekends… nobody is in this chat during that time…
 
@bwoebi Hey I pop in every now and then.
Although I have a feeling that will be a lot less often over the next few months.
 
@Sherif you. But it's usually louder on e.g. Thursdays.
 
Going to get sucked into a shitstorm at work.
 
@Sherif what's up?
 
3:20 PM
Work
Lots and lots of work
New quarter and all
New goals... blah blah
 
@Gordon I... I watched the whole thing. :(
and I've no idea why
 
@Sherif I feel you..
 
@Gordon I actually had to watch Friday to cleanse my palate after that.
 
3:37 PM
@PaulCrovella @Danack horrible, isn't it.
 
Abe
@JoeWatkins i found the two videos very interesting and pretty comprehensible even if i don't know C at all, and most importantly i realized that developing a php extension is not as hard as one could think :P don't listen to the reddit idiots, and record more!
 
@Abe thanks :)
 
@Abe +1
 
Abe
now i just need to learn C. #easypeasy xD
 
@Abe You pretty much already know C's syntax. You just need to understand how pointers and memory management works.
 
3:53 PM
like he said - #easypeasy ;)
 
Abe
lol
 
Sure, there's nothing hard about pointers and memory management... :-D
 
Well, I did get through K&R in about a week, which was easy enough but I think I must have spent years trying to master data structures and algorithms.
I guess I can't say I've mastered them yet, heh.
@Abe But seriously, these things can be learned man. If I can do I'm sure anyone can, because 10 years ago I knew nothing about any of this stuff and I never even went to school.
 
@Abe you've been talking about learning C for one entire year... just imagine if you had started to actually learn it one year ago xD
 
Abe
@marcio that's the problem. i don't have time
 
4:01 PM
@Abe do it e.g. the weekend.
 
Abe
often i don't have the time for work stuff... and C would be just fun stuff, realistically, and especially at the beginning
 
yeah, I know how it is. There are trillion things I want to do right now but compromises eat all the time. But there is one paradox, if you don't start you won't find time to start.
 
Abe
for each thing i accomplish, there are 2/3 that i must/should/wish to do :|
btw. what is actually PHP_FUNCTION(foo){} ? is it a function declaration? i understand what it does but not how. is foo a parameter or something that's being declared or declared earlier?
 
It's a macro.
 
Abe
oh. don't know that. checking
 
4:11 PM
#define ZEND_NAMED_FUNCTION(name)		void name(INTERNAL_FUNCTION_PARAMETERS)
#define ZEND_FUNCTION(name)				ZEND_NAMED_FUNCTION(ZEND_FN(name))
basically....if anything is in caps, it's a macro....and probably not documented well.
 
Abe
lol
 
just go see what it expands for - usually to other 2 macros :>
 
@marcio hey! I saw your message and forgot to respond, sorry. I'll probably write some filling for the RFC today, some examples maybe, will try to explain variance in detail (that's gonna be the toughest one)
 
@nikita2206 btw, I really want to rename it to "callable prototypes", it just seems the most accurate name.
 
@Danack ... and probably not documented well. Fixed.
 
4:19 PM
What's the term used (if there is a term) to describe functions that create other functions? "Currying" is not exactly what I want.
 
@marcio this is something I don't really care about, tbh. So, go for it if you want
@marcio higher order function IIRC
 
@Abe PHP_FUNCTION expands to some larger declaration that actually calls a function that adds the function to the engine.
 
Dynamic code generation?
Or runtime code generation.
 
stop generating the code… use self-mutating code…
 
high order function is more accurate, it does imply combining functions too but it's probably the closer definition.
 
4:24 PM
There should be a version of Google's deep dream that would take code as an input and give code in the output. Then you'd be able to train the network on images of spaghetti and try some javascript with it, I bet you'd not notice any difference between input and output
 
Abe
@Trowski i see, that's cool :D
 
@Abe There's another macro for declaring a method on a class.
 
@marcio you want it to use in the RFC? Like something instead of 'function that returns callable'?
 
@nikita2206 yes, literally "function that create other functions that follow a given signature", but this term looks sloppy.
 
@Abe Take a look at this file that defines exception classes and methods: lxr.php.net/xref/PHP_TRUNK/Zend/zend_exceptions.c
 
4:28 PM
the term "high order function" + a good example will do the job.
 
@marcio it could be function (callable $cb): callable { return $cb; } so it doesn't always create it
 
yea, return|create
 
Abe
@Trowski lol, i don't think that would work. should learn simpler things first :P
 
@Abe Eh... yeah, forgot for a minute that you need to learn C yet. Do that, then start poking around in the source.
 
Abe
also @marcio my "learning c process" requires 1- moving to linux, which i don't know either xD 2- moving to gimp/inkscape 3- winning to the lottery
 
4:31 PM
@Abe What are you running now? Windows?
 
Abe
yep
i imagine that using c on windows is not ideal
 
@Abe moving away from windows is a great idea anyway
 
Abe
just having to download visual c gives me cancer
 
@Abe Ubuntu is very easy to use. Maybe set up your computer as a dual-boot.
 
4:47 PM
@Abe You know VMs exist, right?
 
@Abe Or use a VM. VirtualBox is free.
 
I mean, I use Windows on my desktop too, but that doesn't stop me from running 12 other operating systems in virtual machine when I need them.
And there's always a dual boot option.
Or triple boot.
...etc...
Heck, computers are cheap. By 3 of them. Put one OS on each.
 
difficult to find my way around that code, never looked at it before today ...
if they follow my lead they should be able to resolve the rest ...
I think I told em what they need to know ...
/me shrugs
 
Abe
@Sherif i know. :P
 
5:25 PM
morning!
 
5:39 PM
greetings.
 
so whats up!
 
Just doing some work to fix issues
 
Anonymous
@JoeWatkins fantastic video!!
 
Anonymous
Next time, how zend engine works would be great addition
 
5:44 PM
hmm.
yeah same here.. lot of issues today..
 
I'm trying to reduce the number of pages I have in a project
 
documentation?
 
yeah. you
 
No, I have this page and a few others like it where I want to use ajax or something to show the end results like you see when you click the save and update button at the bottom
 
5:50 PM
mobile.
like the timer.. too cool.
 
Is it for mobile? Yes I designed the layout for mobile mostly. The white bar is more an effect than really doing anything.
 
and about 30 hours run time.
 
I think I need to try ajax out for what I want
but have never really done anything with ajax
 
okay..
 
Does anyone know if this is still true? Comment is 2yrs old. secure.php.net/manual/en/function.array-rand.php#112227
 
5:54 PM
@crypticツ last time I looked, half a year ago, yes. … yeah, still true.
 
@bwoebi thanks!
 
@samayo thankyou ...
 
Is there some tool to easily read the C implementation of specific functions in the standard lib?
 
lxr.php.net
 
it looks so ancient :(
 
6:02 PM
I think ajax would work for me
 
@AwalGarg Your mother looks ancient :P
 
lol
 
@PeeHaa :P
 
<3
BTW @JoeWatkins nice job on the first screencast. It was actually understandable
 
I was hoping for some sexy code reader where I can type the function name from standard lib and it explains me the c implementation
 
6:09 PM
a c to human language interpreter? good luck finding that
 
it sounds like you want to enslave a (sexy) c programmer ...
 
if there is such a thing
 
@JoeWatkins All sexy c programmers have beards. No thank you
 
@Orangepill the C room has one in the room description IIRC
:D
 
There is a c room?
 
6:11 PM
yeah, difficult to find though
 
Wha? Nobody uses C...
Node.js is the new hotness. C is for losers.
 
OMG this is the greatest GIF ever, anyone know the source? http://t.co/0cAtj7bKaF
 
Anonymous
@Sara s/node.js/golang
 
I lol'ed hard at the gif in the tweet
 
@Sara waait. you are the author of the php extensions book?
 
6:12 PM
@samayo s/golang/rust
 
@Sara hehehe
 
@AwalGarg ... yeah ... looks really useful declare x as const pointer to const pointer to pointer to char
 
@Orangepill xD
 
@Gordon That's a soda commercial right?
 
@PeeHaa yes, but it's h i l a r i o u s
 
6:13 PM
@AwalGarg yep
 
OMG
haaai
 
What? Is there a cheetah behind me?
 
@Sara node.js is indeed hot… just as hot as hell.
 
That smegging cheetah... :(
 
this room > js room
 
6:15 PM
@Orangepill recommendations on how to implement ajax into my forms like I was talking about
 
But but but... futures! promises! undefined~!
 
lol
 
@Sara and NaN
 
@Sara better to not touch node.js… you'll burn yourself… See, all these mindburned node.js coders?
@Sara we really ought to expose the new IS_UNDEF type to userland!!!
 
@Orangepill I found this sanwebe.com/2011/12/making-simple-jquery-ajax-contact-form but its not quite what I want...It give me an idea though
 
6:17 PM
@Sara not a cheetah, but a three-headed monkey
 
@bwoebi Well, we have defined(), why not undefined() with a completely different meaning? That'd be SO PHP/
 
@Gordon What? Dave? Nah, Dave's cool man.
 
@Sara like undefined() actually undefining the constant?
 
no, that's too consistent, just return IS_UNDEF zval
UNKNOWN:0
 
6:19 PM
@bwoebi Nono, that'd almost be sensible, I mean as a near synonym for !isset()
 
@JoeWatkins clever!
 
@JoeWatkins YES! This!
Like the (unset) cast
 
okay, time to revive the ~> RFC
 
any suggestions on how to implement ajax form submit
 
#php devs, Straw-poll for you: Are you aware of the (unset) cast? Do you know what it does (no googling)? Have you used it unironically.
@bwoebi Please do!
 
6:25 PM
@Sara yes yes no?
 
@bwoebi Also, after much discussion, we'd probably prefer if PHP used its own syntax. Then we can keep ==> as we like it.
 
@Sara I'll clarify that a bit in the RFC before officially bringing it up for discussion then…
@Sara can you please recall me what the exact binding semantics of ==> in hack are?
// afk, dinner.
 
@Sara yes yes no
 
@bwoebi If it's used, it's bound.
 
6:31 PM
@PaulCrovella I am dissapoint. That is not an isopod. This is an isopod; a fancy one at that:
 
These responses. I actually thought (unset) was better known....
 
1 message moved to Orphan GIFs
To the gif mobile!
 
@JoeWatkins nice rfc D:
 
That room should be titled "Orphaned GIFs"
 
Abe
6:35 PM
@JoeWatkins ahahah
 
@JoeWatkins a.k.a. the fuckit operator
 
Anonymous
What is the best way to deduct minus two minute from now in mysql? CURTIME() - 2:00:00 ?
 
...whichever function is correct.
 
DATE_SUB / DATE_ADD in particular.
 
Anonymous
SELECT CURTIME() - INTERVAL 120 SECOND;
 
6:38 PM
@samayo DATE_SUB(NOW(), INTERVAL 2 MINUTE)
 
Anonymous
@Orangepill Really? I need to use datetime functions just to deduct 2 minutes from current time?
 
Anonymous
SELECT (CURTIME() - INTERVAL 2 MINUTE)
 
@samayo that's giving me null
 
Anonymous
same here :/
 
@Sara it's useless, why would it be better known?
 
6:42 PM
please look at this: $p = $_GET["p"]; . this line has a notice, how to debug it ?
Notice: Undefined index: p in C:\xampp\htdocs\myweb\search.php on line 106
 
because people love to focus on stupid shit @PaulCrovella
 
@Samayo maybe TIME(NOW() - INTERVAL 2 MINUTE)
@Sajad on line 106 "p" doesn't exist in the $_GET array
 
@Orangepill yes, it is the number of page, sometimes it is empty
so what should I do ?
using issset() ?
it is not useful !
 
@Sajad That's exactly why the ?? operator was introduced in PHP7.
 
$p = isset($_GET["p"])?$_GET["p"]:0;
where 0 is the default value you want $p to equal in the event that one isn't supplied
 
6:44 PM
@Charles I don't use php7
@Orangepill ok, but a if() for a assignment ?
it is normal ?
 
@Sajad Yup, so until then, the pattern given by @Orangepill is what you must do.
 
ok tnx
 
@sajad that is just shorthand for:
if (isset($_GET["p"])){
    $p = $_GET["p"];
} else {
    $p = 0;
}
 
@Orangepill yes yes, I know what is this. but I meant was, using a if() statement just for a assignment is optimized ? (honestly I fear of if())
I can hide that notice. is it not better ?
 
@sajad you are not going to get to far without using an if
 
6:50 PM
Unfortunately yes :(
 
@Charles I googled "php ?? rfc" but I couldn't find it, do you have a link at hand that explains the ?? operator?
 
@sajad no ...it's not better... i think error suppression has a bigger performance implications then doing an if
 
@Orangepill ok tnx
 
@MarcelBurkhard wiki.php.net/rfc/isset_ternary - aka the null coalesce operator
 
@MarcelBurkhard It's called the null coalesce operator.
 
6:51 PM
thanks to both of you :)
 
@Danack One of the worst terms to type
 
quite simple yet very useful
 
@Orangepill as you said, using of if() is not good (unless Necessity cases), now I want to know isset() is like if() statement ? and we should use it sparingly ?
 
@Sajad just to restate what everyone else has said ... there is nothing wrong with if statements and the techniques used to eliminate if's require a lot of architecture and would yield little or no performance benefit
 
:-)
ok well, I need to maybe 20 If() statement in the one page, that is ok ?
 
6:59 PM
@Sajad you should us if in a case where you want to conditionally do something and you should use isset if you want to check if something is set.
 

« first day (1780 days earlier)      last day (3151 days later) »