« first day (1642 days earlier)      last day (3303 days later) » 

12:29 AM
@marcio yesterday for fun i tried to write a parser for generics syntax (in php :P). i wonder how php works internally. i guess it first splits the code into tokens, rather than parsing code byte per byte, correct?
i wish i had the time to help guys, there's too much to learn and not enough time
 
@Worf well, yeah, that's what you usually do with tokenizers :D
 
i've imagined that :P i did char by char instead
i have no knowledge at all of php internals
 
Productive night:
Released: doctrine/collections v1.3.0 - http://goo.gl/xIBMAV #doctrine2
Released: doctrine/annotations v1.2.4 #doctrine2 http://goo.gl/ddzd1J
Release: doctrine/cache 1.4.1 - performance/memory optimisations, stable Predis support and SQLite3 fixes http://goo.gl/tFVwHW #doctrine2
 
spam all the things! :D
 
idd
 
12:36 AM
i'm working on collections too. after 5 attempts i think i have found the best approach
@LeviMorrison u around?
what i ended up doing with the generics syntax is:
interface Foo<K instanceof Baz | (Foo & Boo & (Php | Goo)) | null | float>
this or method overloading (to avoid the "or" in generics expressions and methods)
the & is instead inspired by java (multiple bounds)
 
what is that
You are proposing all of that in one RFC?
That should be at least two: union/intersection types and Generics.
 
nope, just dreaming :D
 
@Worf PHP uses a parser and a lexer generator, then the parser creates an AST and the ast is compiled etc.
 
i wish i had the knowledge to try tho @LeviMorrison
 
Could you post the code which causes the error in addition to the debug log? — Marc 16 hours ago
0
Q: HowTo? Debug PHPMailer function as it is not working

Tim SalabimI have a couple of websites and my host has PHPMailer enabled. On a wordpress site I also installed a plugin which returned this result: bool(true) The full debugging output is shown below: object(PHPMailer)#81 (69) { ["Version"]=> string(5) "5.2.7" ["Priority"]=> int(3) ["CharSet"]=>...

 
12:51 AM
@Worf something something go read this nikic.github.io/2012/07/27/…
 
no idea @marcio need to study C first
 
oh, then it all get's much harder ^^
 
@LeviMorrison what do you think of method overloading?
 
@Worf If you mean overloading a la Java or C++ I don't think it will work well in PHP.
 
reason?
 
12:54 AM
because PHP
 
It'll slow down every method call.
 
:P
@LeviMorrison that's what i thought too, but groovy for example resolves the overloaded method at call time
but it uses some kind of cache
 
@Worf but if you really really want to learn things bottom up you shouldn't give up because of that. C is a PITA but it's not rocket science.
 
i know, my only problem is lack of time :(
 
ok but if you have the willpower, try something small first.
 
12:59 AM
from my poor understanding, given some argument types, the check for the best method to call is performed only the first time
 
1:55 AM
@Worf Only if it can determine that the type of the variable won't change the next time it runs ;)
 
nope, it caches types, not variables
 
@Worf Whenever you say anything, I hear Lt. Worf's voice shouting it haha.
 
function x(A $a, B $b, C $c){}
function x(A $a, C $c, B $b){}
$x->x(new A, new B, new C); // preferred is the first of the above
$x->x(new A, new B, new C); // already knows what's the preferred for the given arguments types
 
@Worf Qapla'!!!
 
lol
i think i can try that using __call :D:D:D just as proof of concept
 
2:40 AM
does this look off to you at all? :/
`select conversations.*,unread_pms.*,unread_pms.count(*) as count from conversations
left join unread_pms on unread_pms.conversationID = conversations.conversationID where participants
like '%username%' group by unread_pms.conversationID;
 
unread_pms.count(*)?
 
many-to-one, it gets the number of unread messages by conversation ID
 
count(unread_pms.*) as count then?
 
oh crap
thanks
huh....
This works.
`select *,count(*) from unread_pms where sender_fsid = '53E8B520CEFFA9A1' group by conversationID;`
How do I turn on monospaced font in chat
`code here`
    code here
 
Hello Everyone
Could some one please give me some assistance with a unit test?
0
Q: Unit test UploadedFile.php in PHPSpec

FreeManI am trying to test a data transfer object class which constructs with Symfony\Component\HttpFoundation\File\UploadedFile.php class in Laravel. I've had no luck testing this implementation in PHPSpec. Here is what I have so far: Test public function let($event_id) { $prophet = new Prophet; ...

 
2:48 AM
    +------+----------------+-----------+------------------+------------------+---------------------+----------+
| pmID | conversationID | messageID | sender_fsid      | recipient_fsid   | timestamp           | count(*) |
+------+----------------+-----------+------------------+------------------+---------------------+----------+
|  575 |              1 |       503 | 53E8B520CEFFA9A1 | 5A1C1E20A312582F | 2015-04-13 00:56:16 |        4 |
|  626 |              4 |       528 | 53E8B520CEFFA9A1 | 53E8B520CEFFA9A1 | 2015-04-14 21:40:30 |        1 |
How do I do this hm.
 
@AustinBurk, what are you trying to count?
 
@FreeMan `The number of unread messages per conversation. I did it though! :D
` select conversations.*,unread_pms.*,count(unread_pms.pmID) as count from conversations left join unread_pms on unread_pms.conversationID = conversations.conversationID where participants like '%53E8B520CEFFA9A1%' group by unread_pms.conversationID;`
 
good deal
 
select conversations.*,count(unread_pms.pmID) as count from conversations
left join unread_pms on unread_pms.conversationID = conversations.conversationID where participants
like '%53E8B520CEFFA9A1%' and unread_pms.recipient_fsid like "53E8B520CEFFA9A1" group by unread_pms.conversationID;
Well now I'm only seeing ones with unread messages
:/ but I need to also show ones with no unreads
 
3:05 AM
@AustinBurk Mysql?
 
@FreeMan yes
 
have you tried aliasing the tables?
 
Oh I haven't done that before
 
```
select conversations.* as table_a
```
and
```
left join unread_pms as table_b
```
eh no MD on this chat
disregard the backticks
 
markdown?
 
3:10 AM
yeah
I am too used to slack
 
would aliasing allow me to specify where clauses on both?
non-conflicting ones
 
If you are have conflicting columns then yes, otherwise it will just overwrite the columns with the joined table. I am not entirely sure what is happening without seeing the result
But then again my SQLfoo isnt as strong as I would like it to be
 
brb getting food
 
good luck with your problem hope you find a solution
 
3:51 AM
SELECT DATE_FORMAT(designDate,'%d-%m-%Y') AS designDate,dNo,dWet,item.itemnm
FROM designmaster
LEFT JOIN item ON item.itemId = designmaster.itemId
WHERE workerId = ".$workerId."
OR designDate = ".$fromDt."
OR designDate <= ".$toDt
this is my select query i want select records between date range and also for that worker id which i got in post
 
 
1 hour later…
5:00 AM
@LeviMorrison why SortedMap and SortedSet can use a comparator for sorting automagically while Lists are sortable only upon request?
 
Link to the List, please?
 
in general, i'm asking why they are usually designed this way
 
Oh, I see.
SortedMap and SortedSet maintain an ordering at all times. They rely on this ordering in their implementations to efficiently perform operations.
 
Hello :)
 
at first i'd make them sortable only upon request - and never automatically
 
5:02 AM
Somone have skill in DNS / Hosting / hostname ?
Im totally lost :(
 
Lists do not rely on the ordering at all.
Sorting is not a critical operation for a List to have to be able to perform its function.
So the comparator is given to the List the moment you do a sort, since it doesn't need one for anything else.
The SortedMap and SortedSet need the comparator for every operation, so it is provided in the class constructor and used throughout.
Does that make sense?
 
i'm still missing the reason :P
i mean, given that a Set must be sorted in a certain way
why does it have to be sorted while performing operations
sorting only upon request should be always better than sorting while modifying
the only reason that could be useful is when you are inside a foreach
idk?
 
hi i want to learn Magento module development, anyone suggest me tutorials or any website where is should read. thanks
 
5:17 AM
Raja learn prestashop ^^
no one with dns/hosting skilss ?
 
prestashop looks definitely better than magento. magento was ok at the very first, then turned bloatware
@Mepps don't ask to ask, just ask
 
so suggest me prestashop tutorials, i have little knowledge about prestashop so that will be helpful for me
 
https://www.siteground.com/tutorials/magento/
magento tutorial
raja read this for magento
 
worf all right
I have huge problem... our website adigitalife.com seem's down
I don't understand why
When I ping it from my laptop I got Unknow host
But if I used tool from internet (like pingdom), the url ping in the good website
 
I am facing "Fatal error: lost connection to mysql server during query" on my live open cart website when i am going to export products form admin. can any one help me to solve this ?
 
5:32 AM
morning
what happened to stars
 
@Worf No, it shouldn't always be better. It will sometimes be better or worse depending on your requirements - particularly which operations you're doing a lot of.
mornin @JoeWatkins
 
6:14 AM
'nin
 
how to get Current Date in yyyymmddhh24miss format in php
?
 
6:41 AM
moin
 
@marcio will this be a thing with your patch? 3v4l.org/dkKuV
morning all
 
good morning
 
6:59 AM
how can we do object injection
 
Anonymous
@Patrick it has good spec, give me your price and i'll think about it
 
Anonymous
@abhi what?
 
0
Q: Parse XML and set data to Model class

StringI have an XML below file to parse: <API version="1.0"> <response> <operation name="GET_REQUEST"> <result> <statuscode>200</statuscode> <status>Success</status> <message>Request details fetched successfully.</message> </result> <Details> <parameter> <name>id</name> <value>53481</value> </parameter>

help please?
 
@samaYo object injection
 
Anonymous
new class
 
7:11 AM
@abhi You mean Dependency Injection
 
Anonymous
^^ most likely
 
good morings
 
good morings
 
Hello! Anyone who knows on how to connect mysql workbench 6.2 to xampp?
 
mysql workbench... not xampp workbench
 
7:22 AM
@Dannehkown step 1: don't use xampp
step 2: connect to mysql
 
Im studying php, mysql, and a blog there says that i need to use xampp for localhosting
 
morning
@Dannehkown And you trust just 1 blog? :)
 
Link us to the blog
 
Ok so guys, from now on, im going to trust you ^_^
 
Don't trust anyone
 
7:32 AM
it's weird that this doesn't work:
die(count($array));
I get why but still...
 
I just released that Lumen was created by TaylorOtnob. And I thought he was only writing crap code because Laravel was legacy now....
4
 
Anonymous
@Dannehkown for learning purposes it's ok to xampp, as long as you use it locally
 
Anonymous
@Jimbo lumen is just yet another concept stolen from the symfony guys, to make something comparable to silex
 
Anonymous
@MarcelBurkhard does it show any errors? or maybe $array is null
 
@samaYo Normally I support healthy competition between frameworks, but every time I see such crap code being produced and everyone going mental for it... I lose my faith in the community a tiny little bit
 
7:40 AM
Did you see the reddit comments? :(
 
Anonymous
tylor does not like critics :)
 
He's not a nice person, and is pretty much a dick to other members of the community who don't agree with him. Let him do what he wants
It's just sad there's so many people out there that don't know better than to follow without thought
I use Symfony / Silex, but I know it's crap in parts and I know where
So do most of you guys too, he writes beginner-focussed stuff crap and builds a following that way, and I don't agree with that
 
Anonymous
he does not call it beginner-friendly , they call that expressive-syntax nowdays
 
7:55 AM
hi


can some one help me with this


$wrap = file_get_contents('http://www.exp.com/include/stemming.php');
// var_dump($wrap);
$wrap .= '\nyooooo\n';
file_put_contents('http://abhiranpura.blrsoftware.com/test.php', $wrap);

i am getting error like this :

file_put_contents(http://abhi.blrsoftware.com/test.php): failed to open stream: HTTP wrapper does not support writeable connections in /home/abhi/sandbox/test.php on line --
 
22
Q: failed to open stream: HTTP wrapper does not support writeable connections

Django AnonymousI have uploaded my localhost files to my website but it is showing me this error:- : [2] file_put_contents( ***WebsiteURL*** /cache/lang/ ***FileName*** .php) [function.file-put-contents]: failed to open stream: HTTP wrapper does not support writeable connections | LINE: 127 | FILE: /home/cont...

 
Good morning roomies
 
@Rizwan i do not have local path !
 
why do you think that php could write on someone else's site? @abhi
 
@Worf i am trying with my site !
and i do not have local path
 
8:01 AM
@abhi this is strange, you must have localpath
 
php is smart but enough to know that you own that site
 
what does getcwd() return ?
 
its showing path but its my local !
@Worf so is there a way !?
 
ok, and what's the url where your php script is?
 
moin @salathe, all
 
8:04 AM
adacts.com/includes/streaming.php
 
is it hosted in abhi.blrsoftware.com?
 
you can do a POST/PUT request with the file to upload. google for "curl file upload" @abhi or use ftp
 
well... that's the problem. You can't put data there
 
@Rizwan no i hv ched it while posting both get() and put url were the same .
@Worf will it append to particular file ! i need to add $obj = new class_n();
 
moin @JoeWatkins @salathe
 
8:08 AM
@abhi You're telling me that adacts.com and abhi.blrsoftware.com are same? -_-
 
Morning
 
@Rizwan i was trying to say in both file_get_content( ---url-- ) and file_put_content(--url--) here both the url are same !
 
/me is fixed on window, waiting
 
OC use DPD which is nice. You can watch from the link they send you as it shows a map view of where he/she is.
 
there is tracking but no map, it's not live tracking either ... paid for next day before 12
 
8:11 AM
@abhi No doubt. You can use file_get_contents on other sites too but that doesn't mean you can put content there..
 
because have to be out this afternoon, school run and get misses from work ...
 
Oh, almost always a map for me
 
@samaYo it dies before count() returns the count
 
8:21 AM
What is the fastest, using array_filter($array) to check for empty fields or loop trough an array and manually check?
 
@Naruto premature optimization?
 
No I was just wondering, since I've always had my own written function to check on empty fields, using a loop an check, but it made me wonder if array_filter() is better and / or faster, just out of intrest :)
But yeah maybe a little? :p
 
Use whatever is easier to read/understand. Optimize later by finding and removing bottlenecks
 
I don't know about you guys, but I've almost never had PHP code be the bottleneck. It's almost always something outside of the PHP code (disk access, database, ldap directory, etc...)
 
posted on April 15, 2015 by kbironneau

/* by ben */

 
8:34 AM
although i do keep recalling the time when i came across a piece of code trying to do sorting and filtering of a few tens of thousands of rows fetched from the database, using three nested loops, n^3 iterations over every row
that was a case where a little premature optimization would have been a good idea
 
nobody ever solved a problem with blanket statements ... if you have a really huge array, or you want to bail from the loop on the first empty element, then it's not really premature optimization to write the most efficient code from the outset ...
this attitude, that nothing matters until it's a problem, is what causes a headache when you come to scale your working successful ideas, what isn't a problem now can easily be if you have real success, it's smart to be pre-emptive of these problems, if you intend to succeed ... #justsayin
/me goes back to watching window
 
@JoeWatkins There is quite a bit of horrible code out there because someone read that x is faster than y. :(
Of course understanding big O goes a long way
 
but if you're asking in a chat room, then you're not the kind of person who takes heed of whatever he reads without checking facts ... there are circumstances where it would be smart to write the loop yourself, and it'd be more productive to have started a conversation about those circumstances, I think ...
or we could talk about how much horrible code is out there because everything is a premature optimization until it's a problem ...
take your pick ;)
 
@bwoebi Generator delegation is fun :D bugs.php.net/bug.php?id=69458
6
 
the thing with only solving stuff when it becomes a problem ... is that you end up running into a lot of problems
 
8:47 AM
@NikiC hehe
we should keep the loop ... very php ...
 
@NikiC Haha, I like that :P
 
package coming 10:24-11:24 ... can stop staring at window for half hour ...
 
nevermind , bad link
this one shouldn't cut off at 3:30
 
I had a few projects I spent a lot of time on, and I've given up on them both because the first one was already created by someone else half way through my own development (GhostInspector), and the other one involves Silex and Auryn and I just think what I'm doing is pointless because nobody will use it. So I need another project I can start. Any ideas?
 
@Jimbo session component
 
8:56 AM
@Patrick Like Symfony's?
 
@Jimbo I don't like symfony's (even though I am using it at the moment...)
It's doing too much
Would be nice to have a clean simple component
 
@Jimbo you think nobody will use it?
I used the first one :)
 
@iroegbu You can't have used the first one I didn't put it public haha
Oh you mean the silex one
 
yes
 
is there a way to improvise a thermal imaging camera ? /cc @NikiC
 
9:01 AM
Yeah I guess, I should continue with that at least
 
@Jimbo Lumen/Auryn? :P
 
@Patrick Oh my god.
 
heh someone actually created a throwaway account on that lumen thread to ask why he should use lumen.
 
@Fabor did you see the hidden/downvoted comments?
 
Some, but it's too early in the week for me to feel depressed.
 
9:14 AM
@Worf No, ::class is not a constant, it's a language construct. So declaring a class constant named "class" or accessing it from a variable "$something::class" is still forbidden (and it has no direct relation with the RFC).
 
Good morning
 
@AlmaDo mornong
 
9:52 AM
damn it, not even a stock cooler ...
 
?
 
@NikiC sigh… and I still haven't fixed the mem leak completely…
 
10:26 AM
Does anybody know where I can find a benchmark table or hashcat? I cannot find it on their site?
 
Have you checked under the sofa?
 
lol @Fabor
 
10:47 AM
@Jimbo not sure why you'd use Silex here… when there's Arya?
 
@bwoebi I think about this a lot and my main reason is: authentication / authorisation
I already know how to set it up with Doctrine / Symfony authentication / authorisation, the firewalls etc
Which, tbh, is a bit of a cop out... but it'd be a huge undertaking for me to figure out how to implement all that stuff to get it working with Arya
I would learn a lot about security and how Symfony does it under the hood though, I just don't have that huge amount of time to invest right now
 
hmm
 
Anonymous
@bwoebi Why would you use Arya over Silex?
 
Because @rdlowrey is cute.
 
Anonymous
Silex has been around longer, uses symfony packages and has .. compared to Arya a huge community support.
 
11:01 AM
codeigniter has been around a while too :P
 
because it uses Auryn builtin to deploy routes … and I like the mechanisms. Also, no packages I don't need.
 
and has a bigger community
 
Also… Arya is so simple I don't need a community for.
 
Anonymous
Just did a random check, and found error supression
 
@samaYo which is fine there. Because the following exception
 
11:04 AM
Morning room eleveners
 
whenever trim() would fail, it will return a falsy value and so the exception will be thrown.
 
MornHaa
 
Anonymous
Has anyone encountered issues with gitlab overriding the nginx config rules.
 
11:29 AM
Tired to dig @github, @bitbucket and co to find an extension? Stay tuned and follow @Pickle_PHP :)
 
Anonymous
ughh another composer
 
@samaYo gitlub is running in rails app
the nginx is acting only as a proxy for it
 
@samaYo I hope it will fly
 
Anonymous
@tereško i guess that's why it it routing all my other virtual hosts to gitlab
 
hmm ... no
unless you placed gitlab directly on on 80th\
 
Anonymous
11:36 AM
i used the default config option as seen here about.gitlab.com/downloads
 
Anonymous
I'm using CentOs 7
 
Anonymous
nginx is listening to port 80 as usual.
 
How to create entity reference field in drupal 8 programmatically?
anybody can help me with this ?
 
MornPee
@Fabor so gay
 
@Jimbo Monring
 
11:42 AM
@Jimbo Only for him though.
 
haha
 
good morning
 
Morning @ircmaxell
 
what's going on?
 
Nothing much. The weather is pretty good over here so I deserved a beer :)
 
11:53 AM
@ircmaxell did you see lumen yet?
 
yes
 
I have to look up the order of arguments for strpos and in_array like everyday..
 
There is no such thing as a microframework. It either does architecture for you (framework) or it doesn't (library). micro is just marketing
in_array is easy: in_array($element, $array). Saying "is $element in $array"
 
you could say the same about str_pos
but it's actually pos_str
:P
 
@MarcelBurkhard For most things array -> needle haystack, string haystack needle
 
11:59 AM
yes and that is exactly the problem, for most
 
No it is not
Both examples you gave work like that
?
 

« first day (1642 days earlier)      last day (3303 days later) »