« first day (1567 days earlier)      last day (3375 days later) » 

12:04 AM
@ircmaxell ☝︎
 
 
2 hours later…
1:43 AM
morning
 
Hey @Sara, what if we put XHP in PHP core?
 
 
1 hour later…
user895378
2:53 AM
morning
 
user895378
My sleep schedule is totally screwed up. It's 10 at night and I'm going to be coding for probably the next five hours.
 
3:27 AM
We have to define a variable we are concatenating: $text =. '...'; won't work without notice unless you define $text = ''; prior. Is there a reason why PHP won't just create the variable that is being concatenated if it does not already exist? Like $var[] = '...' works that way.
 
user895378
Arrays are a special case ... that's why it works for arrays but nothing else :)
 
user895378
I know that doesn't seem like a good explanation but it's basically the truth.
 
4:00 AM
@rdlowrey >.< that sucks
 
user895378
@LeviMorrison Well, on the bright side I'm pretty excited about doing some fun things with generators to create a customizable gzip stream.
 
user895378
So it'll be fun work, at least :)
 
I need to finish up work for PHP 7 constructors.
Instead of outright removal I'll deprecate PHP 4 constructors.
Stop emitting E_STRICT when both are used since they already use the __construct when both are present.
 
user895378
I'd prefer to see them die, but I understand the need for deprecation. I suspect there are a lot of people who (inexplicably) still use the java-style constructors.
 
mornin
 
user895378
4:13 AM
@PaulCrovella morning
 
user895378
4:34 AM
@NikiC consider this your periodic reminder that you are awesome for giving us generators. Just had a sweet use case for which they were perfect.
 
zan
5:18 AM
Good morning
 
user895378
5:30 AM
@m6w6 It seems to me that your HttpDeflateStream and HttpInflateStream belong in ext/zlib as DeflateStream and InflateStream. This is useful (missing) functionality that belongs in zlib (especially since http relies on zlib's presence to build it). This is one of my issues with moving pecl/http into ext/http ... the extension is currently the "kitchen sink" approach ...
 
user895378
It does some things that should be bundled with the distro, some things that belong in other extensions and some that IMO belong in pecl.
 
user895378
I think that if I had to take all or none of it I would vote for none at this point because I'd rather not confuse/overlap in ext/ more than is already the case.
 
user895378
Which is a shame, because you have some really useful things in there.
 
user895378
My own opinion is that the really useful http things are the parsing tools -- this is code that really benefits from being compiled. Some of the other things ... like message abstractions are way too easy to do well in userland and offer exceedingly little performance benefit in C.
 
user895378
These are the things I would like to see bundled with the php distribution. The rest of it ... the things that cause endless API arguments with framework types and don't offer much performance benefit over userland ... not so much.
 
5:44 AM
Mornings
 
Anyone integrated facebook stuff in your website ? like post something on user wall
 
user895378
@RonniSkansing morning
 
Morning @rdlowrey was just reading the backlog, hilarious pictures
 
user895378
/me pretends not to know what @RonniSkansing is talking about.
 
=] Are you turning into a nightwalker, must be pretty late at @rdlowrey place?
 
user895378
6:00 AM
Yeah it's 1:00 here
 
user895378
3 hours ago, by rdlowrey
My sleep schedule is totally screwed up. It's 10 at night and I'm going to be coding for probably the next five hours.
 
Have to help my brother move today.. hate moving stuff... why one does not do for fam...
physical activity..
 
user895378
This is why I have only ever owned small cars. If you have a truck or something you're the first person everyone calls when they need to move/haul stuff :)
 
^
golf ftw
 
7:07 AM
Morning guys
 
7:17 AM
mon-ring
(don't know what it means but its trendy)
 
user895378
I think it originated with people being too sleepy/disoriented to correctly spell "morning" upon waking and joining chat :)
 
Now you guys got me double checking my spelling.
 
razza frazza... E_COMCAST
 
hi guys.....
The echo outuput is working but can't get the value back via ajax request..
$draft_email=$this->role->
where('draft','=','true')->count();
echo $draft_email[0];
return $draft_email[0];
 
@rdlowrey thx for the info :)
 
user895378
7:29 AM
@PaulCrovella We hates comcast, precious.
 
Tricksie comcast says they provide internet access. They lies, precious. They lies to us.
 
posted on January 30, 2015 by kbironneau

/* by Julien */

 
hey that gif must be in reverse, FAKE!
:P
 
if(id=="read"){update_value="read";}else if(id=="unread"){update_value="unread"} This is why I miss enums in PHP so much.
 
morning! Fr!day
 
@BenjaminDiele :)
SOLVED
 
@user2736704 What do you mean, solved?
@Duikboot Hello submarine
 
user895378
class Enum {
    const READ = 'read';
    const UNREAD = 'unread';
}
 
user895378
7:53 AM
^ close enough for most intents and purposes.
 
good morning
 
@rdlowrey Yeah, seems good enough. Oh well
 
@BenjaminDiele Mean I just solved my question.. :/
 
ah :D
 
moin
 
7:58 AM
It's friday........!! :)
 
LOL, Hello @BenjaminDiele
 
Well, it's 8am....I'm guess insomnia has won today and I might as well stop trying to get to sleep.
 
Morning, did I miss any friday links today?
 
user895378
@Danack hmmm ... right there with you.
 
8:00 AM
@nikita2206 look at the pinned messages...
 
@rdlowrey Lol what an awesome image ( profile github & SO) .
 
mornings
 
user895378
@NikiC in your estimation does Dmitry's new wiki.php.net/rfc/php7_foreach make a potential yield* syntax more likely?
 
@FlorianMargaine oh I see
 
Is there any reason why that horrific pass error_handler messages thread in internals doesn't just use php.net/manual/en/function.error-log.php ?
 
8:05 AM
@BenjaminDiele one could atleast use constants instead of strings
 
BTW, what do you think about having to be able to map json directly to php objects of preconfigured classes? Like jms/serializer does it, but without 'array' in this chain of transformations: json text -> array -> object graph
 
@MarcelBurkhard Indeed. It's been too long since I've last used PHP. Speaking of, do any of you guys develop on windows? I've installed a linux VM yesterday and installed PhpStorm on it, but it seems kinda slow. Do you guys develop native? VM? Magic?
 
@BenjaminDiele I develop on windows with eclipse (but don't tell anyone :P)
And I put 12 GB of RAM just to compensate Eclipse being bad
 
@MarcelBurkhard How do you handle your unit tests? Does phpunit run well on windows? Can you easily debug while in a request?
 
@BenjaminDiele dev server is ubuntu 12 tls, apache runs there and so does phpunit
 
8:09 AM
I'm currently building a simple data mapper, just to learn more about the concept. I thought it was a slick idea to use traits in my Domain Objects that hold the metadata stuff like the table name and corresponding fields. As I took a counsel with my pillow I came to the conclusion that that's a horrible idea. Domain Objects suddenly hold data they should know nothing about.
 
x-debug works fine though combined with my eclipse
 
@MarcelBurkhard So you have your code on a shared folder?
 
@BenjaminDiele but don't do it like i do, use git and so on, was just answering how I do it currently
@BenjaminDiele yeah, small projects max 2 people on a project at a time
when I find time I'll setup git on the server and probably xampp-portable on each machine
 
@MarcelBurkhard I meant "shared folder" between your windows eclipse and VM that runs the unit tests
 
although at that point I'd rather be using linux workstations
@BenjaminDiele yes I have a samba share on the server and have it mounted as a network drive
 
8:12 AM
yeah, that's my thought as well. It's just easier on linux, but I cba to format my computer.
 
Hi guys
 
Now I thought about two options. The first one is to pass an instance of the corresponding mapper along with the Domain Object to the Persistence Manager. The other one would be Convention-over-Configuration'ish. So that when I pass a User object, a UserMapper Object will be automatically instantiated and used.
 
@BenjaminDiele ever considered virtualbox?
 
@BenjaminDiele Why did you install phpstorm in the VM? You can just share the directories that contain the files.
 
@MarcelBurkhard I have it running in virtualbox now, but that is so slow
 
8:13 AM
@BenjaminDiele I use the ide native with a shared directory to the vm (which is only for running/testing). Xdebug etc. all works fine that way. I also do unit tests and debugging native on windows where possible, as most things are easy to do there too.
 
@Danack So that phpstorm can use the correct php libs like phpunit etc
 
@BenjaminDiele give it more ram/cpu cores
 
it has 2 cores and 8GB ram :D
 
I am modifying my .htaccess file on my live server in order to get rid of it default page but nothing changed. Does anyone know the reason of this ??
 
@BenjaminDiele ow - you're installing phpunit globally rather than through composer?
 
8:14 AM
That's how I used to do it. Why, isn't that a good option?
 
@BenjaminDiele hm ok, then it should be fast..
 
yeah, it should be :D
 
@BenjaminDiele how about dual boot?
 
@BenjaminDiele you should be able to run composer outside the VM to install everything and then ssh into the VM to actually run PHP unit via the command line.
 
@Danack Then how will I run my tests from my IDE?
@MarcelBurkhard No, that's just plain annoying
 
I use ssh for phpunit, composer etc. aswell
 
@PaulCrovella oooh, nice
 
@BenjaminDiele Most of the code I write isn't dependent on the OS, so I just run the tests in PHPStorm as a standard php script with php bin/phpunit -c phptest.xml
And then if there are some tests that are really dependent on the exact OS/extensions, I run those in the VM.
 
All right, I'll try running phpstorm native tonight, on a fresh vagrant install
Having never worked with vagrant, I can't see how things can go wrong!
 
8:20 AM
@BenjaminDiele vagrant isn't required, see the second link
 
even better!
 
@BenjaminDiele btw the reason it's slow is that most VMs suck at IO....and PHPstorm is quite heavy on the IO.
 
user895378
^ understatement
 
I think it's slow because it's virtualbox. I mean, even the cursor is slow. Opening the ubuntu menu is slow. Using Hyper-V on the other hand, shit flies like a banana
 
@BenjaminDiele These settings may help a little: gist.github.com/Danack/ed20e2030da10b900142
 
8:27 AM
@Danack for vagrant?
 
For vagrant to tell virtualbox to sort it's shit out a bit.
 
ah, thanks
but i'll change the memory requirement though :D
would be awesome if I could just run my server in ram.
 
oops - updated now with the line to say it's for virtualbox...
 
I am doing some OO exercises. - I made my DB connection class, what is now the best way to test it?
 
@BenjaminDiele step 1: don't run a gui on it ;)
 
8:31 AM
@PaulCrovella Step 2: run it on a linux / mac machine
I'm working on step 2 :D
 
@Duikboot define "test" ?
you mean as in "unit test" or "usage" ?
 
morning
 
Both
 
@Duikboot set up some simple entities like Car and Wheels
 
8:33 AM
also, PHP already has "DB connection classes": MySQLi and PDO
 
Don't think about the laraveldb name its just some test db with data to exercise.
 
@Duikboot that is not a "DB class"
 
@Duikboot your wrapper is... useless... anyway try set up some entities like Car, Wheels, with their relationship
 
also, since you have all of the logic in the constructor, that abomination is untestable
 
@tereško I've never understood people's hate here for making DB classes. Neither PDO nor Mysqli define interfaces, which makes writing unit tests for stuff that needs DB access be quite annoying.
 
8:34 AM
and, you have hardcoded credentials in it
 
- I was thinking about using ENV vars.
- True that's not a db connection class but it's just my 'connection class'
 
@Duikboot Load the credentials in from a configuration file
that way you can supply different credentials for each machine you want to use it on
 
@Danack we don't hate "DB classes", we just know that it's really complicated to make a good one and it's the first thing every newbie tries to do
 
So, to summarize it all.. the use of my class is useless,... because it should be used in an other way?
 
:D
No, but it does too much
 
8:37 AM
paste.jesse-obrien.ca/1zns < this thing is completely useless
 
Why is 'everyone' doing it then?
 
it has harcoded credentials and unusable "connection", because its a private variable with no way of getting at it .. oh, and your mysql's DSN should contain ";charset=utf8"
 
Oh indeed forgot that one
 
@Duikboot you're trying to find out how OOP works right? Why not start with some simple example make a class called Car and a class called Wheel
and now try to make it work that you can add wheels to a car
 
@Duikboot no idea .. also, quite of them "my first class" ends up to be a singleton
@MarcelBurkhard stop using the "physical world analogies", they actually tend to be harmful
 
8:42 AM
morning
 
okok
@tereško would an example with authors and blogposts be fine?
 
I was thinking to start with this exercise to get into a more realistic structure
 
@MarcelBurkhard yes, kinda. But the main issue is that you should not think about classes/objects in terms of "smart data" but instead "contained behavior"
 
But what is wrong on my current example ( Summarize ) :
- private $db var
- The code is untestable because all the logic is written in my constructor
- No charset defined
- Credentials are directly written into the class.
 
now you lost me
@Duikboot well additionally you're probably wind up making it a singleton, because you will be in the situation that you want to access your db connection from everywhere, one thing leads to another you make a static function to return your instance
@Duikboot (assuming you don't know of DI yet)
@Duikboot also the whole script die()s when there is an error
 
8:49 AM
> ext/curl/interface.c:74:5: warning: #warning "libcurl was compiled with SSL support, but configure could not determine which" "library was used; thus no SSL crypto locking callbacks will be set, which may " "cause random crashes on SSL requests"
 
Ok I'll setup a v2
 
If I use a db class I want it to throw an exception not die (the exception I can catch)
 
@rdlowrey The above seems like it ought to be a bit of a higher warning. Do you know if it's caused by having libmcrypt instead of libgcrypt?
 
@tereško Would you agree that It might be better to get a oop-newbie going with a rather simple Authors-Blogposts example than trying to explain them about contained-behavior from the get-go?
 
BTW: While reading on the web: codereview.stackexchange.com/questions/29362/… That one is also like mine? So also bad usecase?
 
9:02 AM
It's not like you've been told some minutes ago that we don't like that kind of db classes :P
 
hi @HassanAlthaf
 
Suggest me something to code.
 
CSRF protection
(you're probably sick of hearing that :P)
 
I am. :
Do you think you would be able to help me?
I'm gonna do it now because I dont wanna hear it again
 
9:08 AM
@HassanAlthaf A tool that generates random project suggestions.
 
@PaulCrovella Lmao, I know that feeling.
 
@PaulCrovella hah :)
 
Just came home from school
Let me tell you an interesting story which I experienced today in School.
In our Computer Science period, there's a guy who gets 90+ marks for Computer Science,
 
@HassanAlthaf I can't help you but I can send you some links of how others do it
 
Oh sure @MarcelBurkhard
He was like, I'm the best programmer out there
And I was like, tell me what 'Object Orientation' is
 
9:11 AM
@HassanAlthaf because my knowledge is limited to using the symfony csrf form token provider :-/
 
Oh
One reason not to use Frameworks
If you weren't using it, you would be knowing how to do that. :P
Agree?
 
@HassanAlthaf well in my case I wouldn't do csrf protection If I didn't have the framework
 
Sure, but you could continue on that road, going to assembly and ultimately transistors and logic gates :D
 
Wait, why not?
 
@HassanAlthaf lack of time and motivation :P
 
9:13 AM
@MarcelBurkhard Is this you? pd.zhaw.ch/portraet/images/buma.jpg
 
@HassanAlthaf but I'm not working on an accounting system so.... It's very important on that type of project
@Duikboot no thats not me
 
I agree,
The whole database can be formatted
 
@BenjaminDiele not really... it's a thing to not understand how electricity works, it's another to not understand how the level right below what you're working with works
 
Morning
 
So you guys should all know C?
 
9:15 AM
I do have some sort of understanding how the csrf token provider works, It would still take some time to write my own
 
we're talking about frameworks vs bare php...
 
I think we had that discussion before :P
 
(also, most people in this room know C...)
 
Frameworks are written in the same language that it's essentially masking.

PHP -> Frameworks !== C -> PHP
 
9:20 AM
yolo \o/
 
rebecca.blackfriday that is great
 
YoHaa
 
@BenjaminDiele YES
 
I don't know C :( (yet).
 
One of our awesome folks has written this: blog.ircmaxell.com/2013/02/preventing-csrf-attacks.html
 
9:26 AM
Aside from "programming" a homebrew pong on playstation portable many years ago
 
@MarcelBurkhard didn't you use LUA? :P
 
following a tutorial that took away all the thinking
 
morning
 
@HamZa morning
 
'nin
 
9:27 AM
@HamZa Morning
 
OK, I agree that the question could be treat as too broad. However, programmers are using new features of PHP, because they feel it is the right way to do as it brings more clarity in the team comunication. However, introducing new PHP feature (let it be "protected" keyword or other) must have something to do with performance... Otherwise there is no points of using new PHP features in small projects or very old projects (started before PHP5)... — Paulius 13 mins ago
 
Look at what you have started @AndreaFaulds
 
Andrea Fault :p
4
 
@FlorianMargaine "Dark humour is like food, not everyone gets it."
 
9:54 AM
Suggestions on this one?
foreach ($nodes as $idx => $node) {.. } How can I make a foreach but order it by a 'created' timestamp in the arary?
$node->created gives me a date... but I want to order them ASC by date.
 
Done CSRF.
 
Is that possible in a foreach? Or should I order it before I loop it?
 
@Duikboot do a usort on the array with a function that compares the created dates.
 
Allright!
 
@FlorianMargaine too much NSFW
 
10:02 AM
> Anal sex is like spinach - if you're forced to have it as a child you'll never enjoy it as an adult.
I lolled
$baz = 10; // This would error - $baz is a typeo for $bar
I would never ever use that ever
I think :P
Then again I normally don't have a long wall of code
 
baz also means "child" in a certain language. *that irony*
 
:P
What language is that/
 
@HamZa It also means Barry in English.....somehow.
 
@Danack O.o
 
@PeeHaa algerian (dialect)
 
10:09 AM
@JoeWatkins He makes a good point. I was just looking into phalcon though :(
 
ThW
Morning
 
done @PeeHaa
 
\o/
 
that is if cv means close VOTE
 
10:18 AM
Correct :)
 
how often should I update phpunit?
 
@MarcelBurkhard I don't tend to do it to often and see what is changed. I hate updating and possibly all my tests failing
I mostly only update when I need some new feature
 
ok same here
 
@PeeHaa the cv-pls extension seems to fail when many are tagged in one message (at least I think that's what's happening). lots of examples in chat.stackoverflow.com/rooms/69389/…
 
and that actually never happens (the part with the new functionality that I need)
 
10:23 AM
@MarcelBurkhard I don't remember exactly but I have somewhat recently updated for something
@PaulCrovella That thing really needs some love from somebody
Maybe @SecondRikudo can be arsed
 
@MarcelBurkhard The guy that runs it, is not good at Semver....but usually nothing breaks when upgrading.
 
Completely done, CSRF.
 
@HassanAlthaf link pls :P
your github repo
I'd like to see how you did it
 
@PeeHaa I'm not sure about that one... It might be related to programming if you programm something that sets TTL on data packages
 
10:33 AM
@MarcelBurkhard "How is a car built? I am programming a PLC"
 
I vote to close as not enough effort shown
Don't find that anymore
maybe I had a dream about that :P
 
ThW
:-D
 
oh shit I misread that and flagged it
can I undo that anywhere?
 
10:43 AM
naming convention for abstract classes?
ASomething or AbstractSomething or SomethingAbstract (Although I would no way in hell use the last one even if its convention :P )
 
I like epic sounding names SomethingTheUninstantiable
it helps if you say it with reverb
 
ThW
@MarcelBurkhard It just gets a name depending on the implemented logic - if it has no implementation it should be an interface
 
ok
as in KernelAwareTest
 
Could we please not flag messages. They tend to go over the entire network of rooms
So it is counter productive to what you are trying to achieve
 
10:56 AM
@HassanAlthaf most of the files in public are not in use anymore right?
 
@MarcelBurkhard They are.
All of them are
I'm going to use URI's in my next project
 
ah ok, because they all just include the bootstrap file
 
My current one is a mess, I didn't bother about the quality because I needed this to get done asap.
 

« first day (1567 days earlier)      last day (3375 days later) »