« first day (1792 days earlier)      last day (3172 days later) » 

12:04 AM
/me bails, nn @all
 
Illuminati
 
oh, @Danack, did I answer your question on that last one? I'm not sure I understood what using the fuzz factor had to do with it
 
@PaulCrovella Oh, thought you might be an expert in Imagick... So, I believe the undesired behaviour is due to the fact that when it's measuring the 'distances' between colors, it's including the alpha channel in the 'distance'. Turning the alpha channel off makes the distance measurement not include the alpha, and so the colors are now within the fuzz factor. Which I'm going to guess is going to affect all functions that have a fuzz factor? Maybe?
Which would be worth adding to the manual if it's true..
 
Sigh. I hate coding and having no idea whether I am wrong or the library I'm using…
I'm uv_close()'ing some handle and then it shows up in an uv_walk() ...
 
12:14 AM
@bwoebi Yeah, I don't like this RFC and it's super tiny – almost guaranteed to not go anywhere.
 
@Danack Gotcha. No, I'm definitely not an expert, but what you're saying matches my understanding of the issue.
 
optional_type:
		/* empty */	{ $$ = NULL; }
	|	algebraic_type		{ $$ = $1; }
;

type:
		T_ARRAY		{ $$ = zend_ast_create_ex(ZEND_AST_TYPE, IS_ARRAY); }
	|	T_CALLABLE	{ $$ = zend_ast_create_ex(ZEND_AST_TYPE, IS_CALLABLE); }
	|	name		{ $$ = $1; }
;

algebraic_type:
        algebraic_type '|' type { $$ = zend_ast_create_ex(ZEND_AST_ALGEBRAIC_TYPE, IS_TYPE_OR, $1, $3, NULL); }
    |   algebraic_type '&' type { $$ = zend_ast_create_ex(ZEND_AST_ALGEBRAIC_TYPE, IS_TYPE_AND, $1, $3, NULL); }
    |   '(' algebraic_type ')' { $$ = $2; }
 
left to right associativity? okay...
 
could go the other way around too, just wanted to implement it
I'll swap it
 
no, I mean, I'd make it non-assoc
@ircmaxell I really don't want to see Foo | Bar & Baz and be puzzled about what binds how…
 
12:25 AM
what about array | (ArrayAccess&Traversable)
 
yeah, hence non-assoc
I wish we could enforce && and || just like |, ^ and & to be non-assoc to each other.
 
algebraic_type:
        type_part '|' type_part { $$ = zend_ast_create_ex(ZEND_AST_ALGEBRAIC_TYPE, IS_TYPE_OR, $1, $3, NULL); }
    |   type_part '&' type_part { $$ = zend_ast_create_ex(ZEND_AST_ALGEBRAIC_TYPE, IS_TYPE_AND, $1, $3, NULL); }
    |   type_part { $$ = $1; }

;

type_part:
    type { $$ = $1; }
    '(' algebraic_type ')' { $$ = $2; }
;
 
^ that forces shifting of | in favor of &
 
huh?
you mean support A | B | C ?
 
yeah
 
12:32 AM
making it non-asscoiative for other operators
 
algebraic_or_type:
        type_part '|' type_part { $$ = zend_ast_create_ex(ZEND_AST_ALGEBRAIC_TYPE, IS_TYPE_OR, $1, $3, NULL); }
    |   type_part '|' algebraic_or_type { $$ = zend_ast_create_ex(ZEND_AST_ALGEBRAIC_TYPE, IS_TYPE_OR, $1, $3, NULL); }
;

algebraic_and_type:
        type_part '&' type_part { $$ = zend_ast_create_ex(ZEND_AST_ALGEBRAIC_TYPE, IS_TYPE_AND, $1, $3, NULL); }
    |   type_part '&' algebraic_and_type { $$ = zend_ast_create_ex(ZEND_AST_ALGEBRAIC_TYPE, IS_TYPE_AND, $1, $3, NULL); }
@ircmaxell ^ precisely.
the main point is not mixing | and &
but still allowing lists of &/|
 
algebraic_type:
    	algebraic_or_type { $$ = $1; }
    |   algebraic_and_type { $$ = $1; }
    | 	type_part			{ $$ = $1; }
;
 
yeah, that's the same
 
well, that's the root level
 
oh, right…
 
12:38 AM
either that, or remove the parenthesis from type_part
 
algebraic_or_type:
        type_part '|' type_part { $$ = zend_ast_create_ex(ZEND_AST_ALGEBRAIC_TYPE, IS_TYPE_OR, $1, $3, NULL); }
    |   type_part '|' algebraic_or_type { $$ = zend_ast_create_ex(ZEND_AST_ALGEBRAIC_TYPE, IS_TYPE_OR, $1, $3, NULL); }
;

algebraic_and_type:
        type_part '&' type_part { $$ = zend_ast_create_ex(ZEND_AST_ALGEBRAIC_TYPE, IS_TYPE_AND, $1, $3, NULL); }
    |   type_part '&' algebraic_and_type { $$ = zend_ast_create_ex(ZEND_AST_ALGEBRAIC_TYPE, IS_TYPE_AND, $1, $3, NULL); }
^ is full grammar then?
 
yup
 
Do you think too this is best?
 
I think it's reasonable
now just to implement this :-P
 
I literally have to look at the grammar file to know that & > ^ > | in precedence table…
 
12:42 AM
hola
 
yeah, I agree
 
@ircmaxell have fun, it's bedtime here ;-)
 
Is there a workaround syntax for doing the following in < 7 without the temporary variable:
    $this->fn = [$obj, 'doBar'];
    $foo = $this->fn;
    $foo();
 
no.
 
poop.
 
12:52 AM
dood.
boob.
 
@Danack ${'_'.!($_=$this->fn)}()
 
reminds me of javascript syntax
@ircmaxell Is that in php 5.3+ or something?
 
all versions, including back to 4
 
nice ok
php4, lol
 
@ircmaxell he specifically asked for without a temporary variable…
this is an one-liner, but still using a extra variable…
 
12:56 AM
call_user_func($this->fn);
 
doesn't work always, especially with weird callable syntaxes, but yeah, that's the generic way ^^
 
1:09 AM
@bwoebi getting a shift/reduce conflict, and not sure where (not familiar with debugging yacc)
ah shit
function foo(Bar &$bar)
@bwoebi so perhaps A && B or A || B?
I don't like it, but may be the only option there
actually, I know
always require () surrounding an algebraic type:
function foo ((A | B) $a) {}
 
Anonymous
1:27 AM
Is it right to assume a DDD model is mostly made of a service, an entity and a value object?
 
1:44 AM
@samayo maybe a service, repositories, entities, at least one aggregate root, value objects. But in DDD your model might be anemic too.
 
Anonymous
Ah, forgot the repository which is the main part imo.
 
Anonymous
@andho What is the aggregate root for?
 
1:55 AM
@samayo Aggregate Roots contain transactional boundaries, and encapsulates 0 or more entities and enforces the validity of all that it contains.
 
Anonymous
@andho do you have a simple example or link implementing all parts of DDD in application?
 
@samayo there are whole books about DDD so there is not one single link that can explain it. But there is an excerpt of the DDD book available in PDF for free. Let me get the link.
 
Anonymous
I got this from zf2 but did not understand it entirely.
 
Anonymous
Thanks. I'll check it out
 
2:14 AM
@samayo you're welcome. And join the PHP DDD google group. groups.google.com/forum/#!forum/dddinphp
 
 
1 hour later…
o/
morning
 
@Orangepill morning
 
3:58 AM
what.... constant arrays... didn't know that was a thing
CSPRNG entry in 7.0 feature list should be updated in light of Random Function Exceptions RFC being accepted right?
Both functions will emit an E_WARNING and return false if a source of sufficient randomness cannot be found.
 
4:31 AM
@Orangepill Did you decide if you're going to MadisonPHP?
 
Does anyone know if new'ing up an object in an argument makes mocking/testing hard? (Assuming dependency injected)
The object was dependency injected. But later in the code the object calls a method like "$obj->foo (new Something ())"
The dependency injection allows for testing, but what about the "new" in a method argument? Is that ok?
 
Hi, I have a pretty simple issue that I'm ashamed to ask - pastebin.com/uGyYwYQU but I haven't sleep for 35+ hrs so hoping someone can point out
 
4:49 AM
@Ekin Your issue is you need to sleep. You also need to use an editor with proper syntax highlighting, but more important is to go get some sleep.
 
@Trowski haven't decided yet... in the throws right now of looking for another job so there's a lot of stuff up in the air
 
yeah I guess you're right
 
@Ekin your </optgroup> statement should be outside of your inner loop
I realized I use php very differently when I'm using it as a templating language vs a programming language.
like I use the foreach($list as $val): .... endforeach; style instead of brackets.
 
5:06 AM
hey thanks.. though that gave me illegal string offset 'name' for the option line
 
as a result though anytime I mix too complex of php in with html it looks wrong to me... I think that might be a good thing
changed line 6, 11 and 12
 
yep I just saw
I didn't even add the id bit
duh
 
now sleep :)
@Sara o/
 
Thanks a lot, have a great day everyone
 
moin
 
5:13 AM
you too
@JoeWatkins o/ good morning
 
5:30 AM
/me walks dogs
 
5:48 AM
@prograhammer depends
If Something is a VO then okay. Or even an Entity.
 
6:02 AM
If you have a multi-app project, where do you keep your shared bootstrapping files?
 
6:22 AM
I hate rain, it ruins everything ...
 
@andho Here is the question I made in nice format...
0
Q: For test-ability, we avoid "new" and use Dependency Injection. What about "new" in an object's method argument?

prograhammerI understand this is not easily testable/mockable: public function index(){ $jedi = new Jedi(); // <-- "new" operator used here ... return $jedi->getLightsaberColor(); } Using Dependency Injection, I understand this is now easily testable/mockable: public function index(JediInt...

lol, instant downvote
that's sad
I took good time to phrase the question, and research it
I see that mockery can mock arguments and such, so I was curious if once we get the object we are good or not.
 
 
2 hours later…
8:31 AM
@prograhammer very hard to guess the purpose of the code. But if the index function is a specialized concrete implementation, you can expect it to instantiate a specific instance of the LightSaber interface.
I think you should come up with a more realistic use case.
 
9:29 AM
@andho If they share the same bootstrap file - why aren't they just different aspects of the same app, and so should live in the same VCS?
 
9:41 AM
hello danack
Can you pls help me out to rectify problem
 
Mornings
 
morning buddy
yesterday i asked a question related to mysql but i cant find a solution

http://stackoverflow.com/questions/32534903/how-to-get-product-order-by-two-custom-taxonomy-in-wordpress
 
Abe
wait a sec, is @rdlowrey also the frontman of Maroon5? and he hosted xfactor?
 
Did you consider using wordpress.stackexchange.com instead @Jason
 
Abe
morning :P
 
9:47 AM
@RonniSkansing i did that but not find a solution
 
/me grunts
 
@Orangepill I think the first answer to your question kinda got a point. Coupling the index() to be depend on passing concrete (introducing tight coupling)
 
10:42 AM
Hi all
i am stuck at one place i need help from php ninja
i want to convert .doc file to .pdf using php
i am using linux server
I have tried with unoconv
it is working from terminal but not exccute from php file
anyone is there to spread some lights on this
 
@DhavalBharadva you probably could print it using CUPS
 
i have tried this solution but dint work
 
what does "didn't work" mean?
 
Morning people... long time no see
 
When i run code from php it doesn't create pdf file
 
10:47 AM
There is cruical issue im having can any one please..
 
well, were there any errors?
did it work from terminal, if you execute it as apache user?
 
no neither gives any errors
 
Rewrite .htaceess so router catches even if subdirrectory accessed
 
@tereško when i run this command from terminal then it will convert test.doc file to test.pdf
sudo /usr/local/bin/unoconv.sh /var/www/html/wordpdf/test.doc
 
1 min ago, by tereško
did it work from terminal, if you execute it as apache user?
 
10:49 AM
Yes
 
with the apache user?
 
@tereško sorry it will work from terminal
<?php
# Provide the full filepath to a document you want converted into a PDF
$file = "/var/www/html/wordpdf/test.doc";

echo "Running: 'sudo -u root /usr/local/bin/unoconv.sh {$file}'";
system('sudo /usr/local/bin/unoconv.sh ' . $file);
?>
 
Good weekend all o/
 
this is my php code its not creating pdf file
even its not generation any errors
 
10:50 AM
for fuck sake, if you do not understand the question, say it !
 
@animaacija Long time
 
@PeeHaa yeah!
 
@tereško what you are asking?
 
@animaacija How's life?
 
@PeeHaa livin a dream
 
10:51 AM
Sounds nice :)
 
morning @PeeHaa
 
Hey niklas
 
Hi all
i am stuck at one place i need help from php ninja
i want to convert .doc file to .pdf using php
i am using linux server
I have tried with unoconv
it is working from terminal but not exccute from php file
anyone is there to spread some lights on this
 
@DhavalBharadva I haven't ever seen a person who was both a ninja and did php personally so I would think you should loosen your recruiting requirements
 
Abe
@Sjon on it!
 
10:59 AM
@PeeHaa i need php help
 
Morning
 
@DhavalBharadva what help do you need ?
 
He still has not answered whether he could run the script using apache user
 
@tereško i am running script like localhost/wordpdf/test.php

and this will be located at /var/www/html/wordpdf
@animaacija i want to convert .doc to .pdf using php
@tereško I have installed apache into my fedora OS
 
how about converting doc to html first ?
then use some lib .. github.com/KnpLabs/snappy
 
11:10 AM
@tereško http://localhost/wordpdf/test.php
This is the url that i am running from web browser
 
@DhavalBharadva lol
 
@animaacija Can you give me any link that i can use as reference for converting doc to html
@NullPoiиteя what happened?
 
> I am working as php web developer since 2012.
 
@DhavalBharadva you still don't even understand the question.
do you run the script from terminal with apache user
 
@tereško i am running script from terminal as root user
 
11:13 AM
javascript afaik can do this ... but js serverside was node js
 
@NullPoiиteя so what?
 
there must be some libs too
 
so how you dont even understand his basic question ?
 
@animaacija thanks
 
https://nodejs.org/en/

or 3rd party tools http://word2cleanhtml.com/
 
11:15 AM
@NullPoiиteя i was just misunderstood the question.
@animaacija i don't want to do this using online tool. i want php script or any lib for that
 
i understand
 
I am new to php does mysql_query returns pointer to a null record before the first row?
and we need to shift the pointer to next location to actually fetch the record?
 
punctuation, use it
 
11:18 AM
> Warning
This extension was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0. Instead, the MySQLi or PDO_MySQL extension should be used. See also MySQL: choosing an API guide and related FAQ for more information. Alternatives to this function include:
mysqli_query()
PDO::query()
 
@tereško [root@localhost wordpdf]# sudo /usr/local/bin/unoconv.sh /var/www/html/wordpdf/test.doc
 
you do not even know what sudo does
just hire a developer
 
@androidplusios.design FWIW AFAIK the pointer is at the first record when you get the resource
Running something like e.g. mysql_fetch_assoc or similar fetches the current record and moves the pointer afterwards
 
@tereško if you are ready to help them i am gonna hire you
 
11:21 AM
But you actually just want to move to PDO instead
 
PDO? what about mysqli
?
@PeeHaa
 
@androidplusios.design its fine too
 
Is there any framework for php like we have django for python and rails for ruby?
 
@androidplusios.design Unless you need specific mysql functionality you want to use PDO
 
just curious
 
11:22 AM
@androidplusios.design Yes hundreds of them
 
which one is the best and most widely used?
 
@androidplusios.design laravel, all of here loves it except me :D
 
@NullPoiиteя you are full of shit
 
@androidplusios.design none of them
 
Mostly used now are laravel and symfony I think. About the best: wrong place to ask I think :)
 
11:23 AM
@androidplusios.design you have to be pretty good at the language before you even touch frameworks
 
yaa i was just asking
@tereško
 
@tereško :P
 
since it will take about a year to learn, the answer doesnt really matter
 
I am pretty good with C,C++,Java, python so i think i would pick up php pretty fast. maybe 6 months and not 1 year. Right @tereško?
I see same methods....and other similar things. So there is not much to memorise
 
@PeeHaa "I haven't ever seen a person who was both a ninja and did php " - that's because they're ninjas.
 
11:28 AM
Damn. You are right
 
Sighh ..
I have an issue.
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>

RewriteEngine On

# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ router.php [L]
</IfModule>
if there is file that is reachable by url , it executes it.
Other tran that, my router works ... any ideas ?
 
Of course it executes it, you've told it to
 
Try specifying your exact problem instead of making people guess what the problem is?
 
@animaacija RewriteCond %{REQUEST_FILENAME} !-f
 
@androidplusios.design to answer your earlier question, the "best php framework" is considered Symfony2. But that's like being labeled "the smartest kid" in a remedial class.
 
11:31 AM
@PeeHaa so i remove that ?
 
That lines tells apache if a file is requested and it exists in the project under the doc root somewhere just run it
 
the thing ... if there is file in the same directory where router.php and url matches that ... it executes it. But i still need to route it.
@PeeHaa thx ...
 
np
 
But good luck serving your js and css etc when you remove that line :)
You need a smarter solution than "just forward everything to the router"
 
The real problem he (cc @animaacija) has is he has actual code in his doc root
 
11:35 AM
@Leigh maybe he's doing live pre-processing for all of his js and css files
 
Is that a thing?
 
@Leigh I have actually sean it in the wild
 
"live pre", kind of cancel each other out
 
well, you understood what I meant
I don't know the correct terms, but there even is a "correct term" for it
 
11:37 AM
@Leigh I haven't seen you in here for a while now again I think you bug ape. You busy IRL?
 
Mhm
 
s/bug/big
 
@PeeHaa assuming that you already explained it to him, there is nothing else you can do for that tiny-avatar person
 
Moving house / job again for the 2nd time in 3 months
 
@Leigh lol. That must be getting annoying :P
 
11:39 AM
you were just bad at your job and got fired .. twice
 
It's already, the new job looks like it will actually be enjoyable (and educational), which makes it infinitely better than what my current job is
No, I quit twice
 
Still a php job or you moved on?
 
Current job was for a digital agency, far too little PHP, far too little back-end altogether. So not happy there == quit.
New job is PHP, potentially some C, mostly back-end
 
Cool
 
@Leigh congratulations!
we all love new job for while
 
11:43 AM
Just got back from 44CON, had a blast
 
@Leigh well it appears to serve .js just fine
all other works as expected
 
Well it shouldn't, because you removed the line that says "do this if the file doesn't exist", so even if the file does exist, it should be going to the router
unless your router is serving the js, which is just plain silly
 
11:59 AM
hi
Is it possible for me to develop in PHP7?>
 
It will be....and being served by the php daemon probably.....
 
What do you mean by php daemon
 
@PeeHaa I plan to add chat commands like /deploy arg1 arg2 arg3 which automatically submit web hooks. Do you think those need special protection or should I allow them for everyone and push the execution decision to the webhook processor who will receive the author of the message anyway?
 
@kelunik The advantage of doing it yourself is that you can easily do /list permissions at some point I think
 
/list permissions
 
12:07 PM
@PeeHaa yourself being the API or the webhook processor? ^^
 
Oh wait I think I have misunderstand / didn't carefully read your actual question
When you say webhook processor do you mean 3rd party or chat?
 
3rd party
It's easier to have webhooks than having bots listening all the time while they're just interested in very specific messages.
 
agreed
What if I want to find out what permissions a specific user has for different webhooks. It would be nice if you could use a chat command for that. If you leave the permissions entirely up to the webhooks it means you have to query them all
WTH is it revenge downvote week or something?
Hmmm I didn't even piss somebody off today who could downvote. Perhaps my question is just crap somehow :P
 
@PeeHaa Well, if you have all webhooks at one host, that host could also provide the /list permissions.
 
Yeah...
That's true. It would also prevent duplication now I think about it
 
12:39 PM
@Leigh yes it doesn't work browser showed me cashed .js //
 
Anyone good with photoshop? :-)
I need a meme photo changing slightly from an angry facial expression to a happy one... it can be terrible, as in a smile plastered over the top, but has to be funny
 
can there be cinditionals in htaccess ? if REQUEST_FILENAME contains .j OR .c add !-f flag
 
@animaacija Yes but I have a feeling you are doing it wrong to begin with
 
@PeeHaa you are still at it?!
 
What specific files are you trying to prevent from being served directly? @animaacija
 
12:52 PM
all of them .. just not the .css .jpg and .js
 
@tereško Hey your adopted puppy is still vamping all over SO rooms :-)
 
:D
 
@animaacija Search main. It has been done before
 
I'm kinda sorry-ish
 
:P
 
12:53 PM
because im working on ancient code of mine ... and that time i mapped all logic and db based on filenames
 
BTW I haven't heard you anymore about your JS dicking around @tereško
You already done something useful?
 
I got on a manga-binge for 4 days
now I am getting back to it
 
$productivity-- :P
 
yeah, I have some aspects of obsessive personality
then again, I think all developers have that flaw
 
s/flaw/feature :D
brb food
 
12:57 PM
< just finished feeding
 
I need to go to the shop to get some :(
 
made one of my clay-pot-things again
 
noice
 
in general it looks like this: i.sstatic.net/6DwyI.jpg
 
yeah saw that previously. Looks pretty damn good
 
12:59 PM
Man, this talk is going to be f* awesome.
 
yeah, but I have begun making those half-pot-size
 

« first day (1792 days earlier)      last day (3172 days later) »