« first day (1520 days earlier)      last day (3654 days later) » 

13:03
Hello, I'm a first timer here can anyonce see my messages ?
user924016
Tharindulucky, Yes and welcome
Ok, great, My name is Tharindu and I'm a beginner on PHP and Wordpress development. Nice to see u all. :) (please let me know if I'm breaking any community rules here)
@Ronny nice to see you too. And welcome !!!
In this chat room, can I ask questions from developers ?
user924016
@Tharindulucky you can read "the rules" here -> room-11.github.io
OK thanks @Ronny
Can I ask a wordpress related question here ?
user924016
I think you can ask anything here, but noone has to answer. wordpress.stackexchange.com is recommended for wordpress related questions
13:11
OK @Ronny
user924016
btw attention to details like, my name is spelled Ronni also makes me happy..
user924016
Morning @PeeHaa; wb
Morning Ronny :D
Morning PeeHee, Ronny :D
Mr @salathe o/
13:13
I asked my wordpress question at wordpress.stackexchange.com, but no one has answered it yet,
user924016
=]
I'm creating a theme option page for my theme and I want to create something like this...
Does any body know a turorial or something to create something like this ?
@Ronny are you into wordpress ?
user924016
nice to hear... :)
So, you should be interested in my question I just asked
user924016
Did you look at my plugin?
13:20
yes I went to the plugin page. But didn't download
I will in case of I need in the future,. For sure
user924016
You will need it in near future, trust me.
aha good to know..
:)
user924016
Could you link me your question on wordpress.stackexchange, I will create a user there and rate your post
@JoeWatkins Video works on laptop.
That would be great @Ronny here is my question wordpress.stackexchange.com/questions/172249/…
user924016
13:27
@Tharindulucky, Seems I do not have enough rep to vote on your question. Your question is not suitable. Read the wordpress.stackexchange.com/help/on-topic
could u pls tell me, where I have gone wrong.
just copy a part of it and paste here
user924016
no, I will not talk anymore of it., you can reply to my comment on your question
@RonniSkansing your comment has two links to help/on-topic
@Tharindulucky Your "question" consist of: I want I want I want
What it needs is: I tried X, but I failed because of Y. What is the solution for specific problem Z?
13:31
Yeah I'll fix the problem.. Won't happen again...
user924016
@PaulCrovella thanks.. seems I need 125 in rep to vote how I wanted..
user924016
waste of a created user..
c'est la vie
Hey @JoeWatkins made an mp4 \o/
@PeeHaa I'm basically a media god now ...
13:36
:-)
OK I edited the question. Sorry about it.
And just at the moment a am about to use pthreads for a project :)
we need this as a close reason
6
@PeeHaa cool, let me know how that goes ...
I surely will and / or bug you when I am stuck :P
13:38
cool
gravatar is not working for someone ...
I would add a bit of explanation of how pthreads work. I.e. what can you do with it. Use cases etc
Bas
Bas
14:03
Hey guys
Could someone review my second try on my database class?
Usage of that would be :
$mysqlServerConnection = new MySQLServerConnection("127.0.0.1", "root", "");

try {
$mysqlServerConnection->initialize();

$database = Database::useConnection($mysqlServerConnection)
->select("databaseName");
user924016
@Bas what is the purpose of the wrap around the pdo? (the MySQLServerConnection ?
Bas
Bas
Practice :)
it's the constructor's job to initialize a class instance. your initialize method is therefore redundant
user924016
I mean like, why did you create that class, as far as I can read the code, it does nothing, other than wrap around the pdo?
assuming that it does what its name lets one assume
Bas
Bas
14:09
@foobar Do you mean inside my MySQLServerConnection class?
Bas
Bas
@RonniSkansing It does initialize the connection the server (mysql)
With the initialize method then.
theres that class
you'd usually establish the connection within the constructor and terminate the connection in the destructor
that saves you from having the check if your object is completely initialized on any member function call, because the constructor ensures that
and from having to clean up manually as the destructor will do that job
and in the end that's exactly what PDO will do...
Bas
Bas
Alright, but what about my Database class?
I'll change that real quick then
But what about allt he variables then, inside that class
do i still need them?
your Database class uses static members where they should most likely be not
Bas
Bas
14:17
also some member functions are non-static while accessing static attributes only
Bas
Bas
I dont get that one..
@Bas why you insist on using singleton-like syntax ?
that whole class seems to be a bit weird to me
s/weird/pointless
Bas
Bas
14:20
Am i Teresko? I dont even know haha.
But what's weird about it then
what is the point of getInstance() method ?
Bas
Bas
To get access to the functions of PDO
because that $instance variable is either null or instance of PDO
Your wrapper provides nothing. Use PDO directly.
Bas
Bas
The MySQLServerConnection right?
The Database class provides access to the database functions (making a query builder)
he's not listening to us
any of us
Bas
Bas
14:34
Yes i am...
I'm trying atleast..
and he has been at this for at least a week
Bas
Bas
more*
You're telling me about that my DB wrapper (which initializes the connection to PDO) is useless
user924016
I tried to say that also.. and Paul said it
Bas
Bas
Did some of you guys seriously block me?
@RonniSkansing morning :)
user924016
14:38
Morning @kelunik =]
Bas
Bas
Morning.
Well this is kind of akward, now what.
@Bas Morning, it's useless, because it doesn't add any functionality.
Bas
Bas
Yes, alright. So should i better delete it then? (The MySQLSERverconnection class)
Yes.
user924016
Yes
14:40
@kelunik it actually removes functionality
Bas
Bas
lolol
Alright
user924016
@Bas, what are you practicing?
Bas
Bas
Would the right way be then:

$pdo = new PDO(...);

$database = Database::useConnection($pdo)->select("databaseName);
@RonniSkansing OOP.
@Bas What is the use of that static call?
Bas
Bas
I thought, i dont have to instantiate the class (purpose of static?)
14:42
OOP does not mean just throwing classes in files
@Bas And how does that relate to OOP?
Bas
Bas
@PeeHaa I dont know, that why i asked to review :)
Don't do that. The first O in OOP means Object. So you do want to create instances instead of that static thing
Bas
Bas
at this point i have no idea what this static means, i thought the only point was that you dont have to instantiate the class?
Do you know what an object is?
Bas
Bas
Because i'm creating an instance right, assigning an object to that variable?
Yes, could be anything.
int, text, float, class and null
14:46
wut
Are we still talking about php here?
Bas
Bas
Yes?
none of those are objects...
And one of them can never be an object
Bas
Bas
Hmm, i thought that that was it.
$var = new Class();
that's an object right?
yes
Bas
Bas
And this? $var = 1;
14:48
Hell no
Bas
Bas
So objects are instantiated classes?
within a variable.
yes kinda
@JoeWatkins I'm thinking I'll reserve integer and boolean too, but not double, long or binary - sound good?
Bas
Bas
Is that the only thing, or can some other datatype be an object aswell?
14:50
@Bas In PHP, yes, that's the only kind of object. Some languages have their primitive data types be objects, but PHP doesn't.
Read the link provided by @PaulCrovella
Bas
Bas
Yeah i did, thanks :) I dont get what they mean by "compound" though.
Alright, so just an instance of an class is an object.
Bas
Bas
15:13
@PeeHaa So should it be something like this then?

$pdo = new PDO(....);

try {
$database = Database::useConnection($pdo)
->select("databaseName");

Because i dont really get what you mean by the static functions?
user924016
@Bas maybe he means the ones that use the static keyword
Bas
Bas
Both the functions (with the variables) are static
user924016
Yea, remove all statics =]
Bas
Bas
Alright, but then i have to instantiate the object right? Whats the difference then?
@Bas Do you understand what an object is yet?
user924016
15:18
The Database class (judging from your question) is almost the same as your MySQL class, you can delete that as well
user924016
It is also just wrapping around pdo doing nothing.
Bas
Bas
@PeeHaa Yeah, a variable with an class in it right
$var = new Class();
Imho you should learn about more about classes and objects and understand what they are before even attempting to look into OOP practices
$0.02
Bas
Bas
@RonniSkansing I thought it will be the class where all the functions come from (for the query builder)
@PeeHaa Meh :( Alright.
user924016
@Bas imo database abstraction of all sorts is a bad place to start learning about how objects work
user924016
15:21
It is very common to start out doing exactly what you are doing right now, writting a wrapper around pdo, in a attempt to make a super crud thingy
Bas
Bas
@RonniSkansing Can you give me an example of what to build? I've watched those video's btw which Teresko gave me i believe
@AndreaFaulds Will you please stop calling them "hints"? They aren't hints.
@LeviMorrison We call them type hints, the name has stuck, sorry :p
> If return types were added, such as with the Return Type Hinting RFC, scalar type hints should be supported. A possible matter of debate would be whether or not to allow conversions in that case, given that some of the reasons cited for parameter type conversion may not be applicable.
^ This is actually indicative of why we shouldn't convert parameters either.
Bas
Bas
Anyways, brb
15:29
"Oh we convert parameters... but not return types." <- feed that to the consistency haters and they'll love it.
nononononono
Those are not the same reasons.
user924016
@Bas, I do not have anything at top of my head. But I would still discourage starting out db stuff
@LeviMorrison Input and output have different requirements.
@AndreaFaulds Cite a language will type convert parameters and not returns, please.
@LeviMorrison PHP (internal functions)
That is not a language.
15:33
JavaScript (internal functions)
(also not a language, granted)
But it's how types flow in weakly-typed languages usually. The output type is probably consistent, while the input types might vary.
I say probably because that's not always true
Kudos for your tenacity on this subject.
Heh
@LeviMorrison I should point out that I'm not really decided on whether return types should be converted or not. But I'm leaning towards saying they shouldn't be converted.
They should not be converted.
The whole point of types is they are strict.
All of our current types are strict.
In userland, yes.
If you provide a type then we strictly obey that type.
I see no valid reason to deviate from that behavior for new types.
@AndreaFaulds I'm working on cleaning up return types RFC before putting it to vote.
I'll probably ping you a million times for review and stuff.
15:42
@LeviMorrison Alright :)
Is ReflectionType gone for good? :(
@AndreaFaulds Nope. Why do you think that?
@LeviMorrison Did you revert that part of Dmitry's changes?
Dmitry's changes aren't committed anywhere.
They won't be committed anywhere, actually.
Once parameters use zend_string then both of our implementations need to change.
Supposedly that should be committed soon.
Ah.
So does that mean we'll get ReflectionType? ^^
Probably.
15:52
By the way Levi, how do you feel about type names?
Specifically, the fact that every scalar type has at least one alias.
You mean int and integer and allowing both?
Or just one?
Yeah.
Same thing with bool/boolean.
Part of the problem is that our error messages currently say integer and double
Wait they say double?
Oh dear...
15:54
And ZPP still says long for int, though userland typehints don't (consistency! what's that?)
I would say fix all of that but I'm not sure how people feel about changing the message language.
Actually I think it gets worse, I don't think we're even consistent between expected and actual types
Hi Everyone!
oa-res-26-240:~ ajf$ php -r 'fread(0, 0);'
PHP Warning:  fread() expects parameter 1 to be resource, integer given in Command line code on line 1

oa-res-26-240:~ ajf$ php -r 'fread(fopen("data:text/plain,test", "r"), fopen("data:text/plain,test", "r"));'
PHP Warning:  fread() expects parameter 2 to be long, resource given in Command line code on line 1
15:56
Almost certainly if we change things to be more consistent gettype() won't behave properly.
@LeviMorrison No, gettype has its own implementation, it's separate from parameter types
Err, I mean we'd either break BC or it has this strange behavior where the return type doesn't match the type hint.
Did you see the fread example above?
Holy crap is PHP inconsistent...
oa-res-26-240:~ ajf$ php -r 'function foo(foobar $x) {} foo(1);'
PHP Catchable fatal error:  Argument 1 passed to foo() must be an instance of foobar, integer given, called in Command line code on line 1 and defined in Command line code on line 1
function i(int $i) {
    return gettype($i); // integer
}
function f(float $f) {
    return gettype($f); // double
}
id | name | other cloumns
10 | abc |
9 | abc |
8 | zx |
7 | tv |
6 | tv |

I want to sort it like
id | name | other cloumns
9 | abc |
10 | abc |
8 | zx |
6 | tv |
7 | tv |
15:58
@LeviMorrison Yes, gettype sucks, but there's nothing we can do about that now :/
I think you need to support the aliases or change all of them to be consistent.
Obviously it'd be less likely to succeed doing the latter (more breakages).
Bas
Bas
@RonniSkansing I must say, i've created enough Person classes xD
gettype can't be changed, but the error messages can and should be
I might even be able to automate the updating of the tests with a little sed magic...
I want to sort id column in descending order based on group + sort the id column in ascending order
@AndreaFaulds I'd probably shoot a message with a patch that makes the internal language consistent.
Separately from the RFC, I mean.
16:03
@LeviMorrison Wouldn't it technically be a BC break?
That's what I'm not sure of, and that's probably what should be discussed.
Someone, somewhere, is parsing the error messages (insert horrified face)
Also test breakage.
Right, but if some use long and some use int and some use integer that means they have to support all three, yes?
What, the error messages?
See the fread example.
16:05
The error messages variously use integer and long
Syntax-wise, the cast operator supports pretty much everything
user924016
@AndreaFaulds I wonder if they ever say int.
Bas
Bas
Thanks :)
@LeviMorrison Pretty sure they don't.
Bas
Bas
But your thought about the DB wrapper, is that just you or is it like a rule in PHP? :P
i'm sorry if i keep asking, but just interested.
To me it looks much easier, but thats just me.
16:09
Ooh, at least userland type hints and internal types share the same type name-getting function
Every change is technically a BC break (with eval all edge cases are possible.) If someone is doing something horrific, just go ahead and break BC with it.
@PaulCrovella Yeah, but if Wordpress is doing something horrific then now most PHP users can't upgrade :-S
I suspect many projects won't be upgrading until 7.1 anyway.
Probably ^^
However, I think yolo will move to PHP 7 very soon after its release.
16:11
And where yolo goes, the community follows, of course :p
sed 's/\(\) expects parameter (\d+) to be long/() expects parameter \1 to be integer/g'
I am become sed wizard
I'd like to title a project "MVC" as a recursive initialism where "M" stands for "MVC", "V" stands for "MVC", and "C" stands for "MVC"... all the way down. Is there a succinct way of writing that, preferably with inscrutable mathematical symbols?
hi guys
I wanna ask something
can I ask?
@AndreaFaulds How do you created a namespaced function in Zend Engine?
user924016
@Harish Go see your doctor…
16:20
@LeviMorrison One sec
@LeviMorrison I... actually don't know. You might be able to do it with ZEND_NS_FE
I think you'd just do ZEND_FUNCTION(foobar) then ZEND_NS_FE(somenamespace, foobar, blah), I think?
I'm pretty sure that's it.
16:41
@AndreaFaulds Bleh, we need Z_PARAM_ITERABLE ^^
Well, I guess technically all objects are iterable so Z_PARAM_ARRAY_OR_OBJECT counts
Hi all can u guys help, i need to know how to display images in directory from recent to old
16:57
I find it odd, that the code you allegedly "wrote" is exactly the same as this year+ old post: nau4i.me/forum/index.php?topic=15630.0
strange that
well im not russian...or whatever language that is and i found the code here: forums.codewalkers.com/php-coding-7/…
lol
then I must ask: what have you tried ?
<?php
// outputs e.g. somefile.txt was last modified: December 29 2002 22:16:23.
$filename = 'somefile.txt';
if (file_exists($filename)) {
echo "$filename was last modified: " . date ("F d Y H:i:s.", filemtime($filename));
}?>
but i dont know what it means and how to replace it to fit in with my code. Since im only a beginner at php
that not a code that you wrote
only another piece that you copy-pasted
what have YOU tried ?
Thats the only thing i've tried based on the answers provided by this site's users
17:08
There are a billion and one* examples of the very same question on StackOverflow, many of them with answers, some of those with good answers. (*may be an over-estimate) Have you looked through those?
@salathe he probably copy pasted sever of them and none of them worked
yeah...cause im a beginner
it's as if you expected him to understand those answer or something
i understand some of it...
I was only asking if he'd looked… don't read too much into it. :)
17:10
there is a huge difference between "beginner" and a "leech"
and that is?
effort
ugh...and you can judge the effort i've put in because you've seen all the codes i was working with since 2 am
well anyways, thanks for the help
Oi oi.
17:34
Turns out OS X's sed really, really sucks.
s/'s sed//
Nah, OS X is a great OS
@AndreaFaulds you spelled "terrible" wrong ...
I couldn't pass up on the joke.
@JoeWatkins What's so terrible about it?
17:37
@AndreaFaulds its sed, for one thing
extreme expense, mediocre hardware, limited choice of software
take your pick ...
I pick the first… and still not extremely expensive.
@JoeWatkins the first two are criticisms of Macs (and the hardware isn't mediocre), and what do you mean by "limited choice of software"
OS X can run any app for Unix-like systems, plus it has its own ecosystem of quality desktop apps
well yes it is, but I've never been able to get osx to run properly on anything that wasn't a mac, so they sorta go hand in hand ...
@AndreaFaulds brew install gnu-sed
17:40
@salathe screw it, I'll do that
how much would an i7 machine be, with 16gb of ram and decent sized screen(s) ?
vastly more expensive than going out and buying comparable hardware ...
@JoeWatkins Let's see...
all that money so that I have to sign an agreement before I get access to SDK's and an IDE that works ... no thanks, balls to apple, they suck ...
@JoeWatkins Er, you don't have to sign an agreement to get a C compiler. You do in order to use Xcode, I guess, but that hardly counts as an "IDE that works"
17:44
there's another ide that works, that will allow me to build OSX software ?
could be ignorance on my part, but I looked at the time, and it really did seem the only real option ...
I think my mobo+cpu bundle was 230, ram was 100, screen was 100, disks were 120 ... no money at all really ... it would be at least twice that for one with a fancy apple on it ... curious how much, at least 2x I think ...
woospie
@JoeWatkins Oh, if you want to build OS X software, well, you have to sign an agreement to build Windows software too...
a wild PirateHaa appears. he uses search - it's not very effective.
:-)
I'm just glad it wasn't pr0n :P
well I don't use windows either, haven't in forever ... and even still it's not the kind of agreement that you have to provide a home address for, it's a software license agreement ...
(accept button, no home address, normal)
17:48
@JoeWatkins You don't need to provide an address to do OS X dev either...
yeah, you enter once a command to agree to the licence, that's all. nothing more, no personal info.
pretty sure I had to give home address to get developer access ...
@JoeWatkins You do if you want to place shit in the store
Yes, but you don't need a developer account with Apple
for an apple id, to sign into the mac store in the first place, possibly ... I can't remember the detail but I had to give an address at some point ...
17:49
Unless you're trying to sell through the Mac App Store
They didn't even take P. Hordijk
@JoeWatkins Oh, right, yes.
user1804599
PeeHaaPee
They use Digital Distribution, so what?
I think MS ask for your address if you buy Visual Studio ;)
@JoeWatkins you don't need an apple id…
17:50
@bwoebi Can you skip it for free apps?
What really bugs me is their fucked up review process
possibly not, it was the first and only time I dealt with any of it ... I didn't enjoy it at all ...
user1804599
Any decent OS X application is available outside of the Mac App Store as well.
If somebody has sand in their vagina they just think of a random reason
17:52
jup @rightføld
@rightføld Plenty of decent OS X apps aren't even in the Mac App Store
can't say I really use it
user1804599
I only use iTunes, Chrome, Vim and Terminal.
user1804599
On my work machine I don't even have a file manager. Z shell w/ coreutils works fine. :)
I use Firefox, Mail, iTunes, Terminal, Steam, LibreOffice, Microsoft Office, GIMP, VLC, FileZilla
Oh, and Calendar
17:57
@AndreaFaulds LibreOffice is not a decent application :P
@PeeHaa it's alright
user1804599
lol mysql_
18:20
@AndreaFaulds boo on the new RFC
@NikiC heh
It's one of those RFCs I can safely vote no on reading only first line
I take it you don't like zend_parse_parameters's behaviour much?
yes
18:26
Hi
I'm working on a half built wordpress site.
And my condolences
18:38
(also see email sent to internals)
@NikiC Fix zpp's behaviour then. ZPP Failure on Overflow may only be the first step
What's the name of the package that converts configure.ac files into usable configure scripts?
autoconf ?
@AndreaFaulds If I "fix" the zpp behavior no old PHP code will continue running :P
@NikiC By "fix" I don't mean make it strict
Also, strict type hints are never going to happen, nor should they
:p
Strict type hints are the only that can happen
@NikiC no, they won't.
18:51
orly?
> PHP is and should remain:
> 1) a pragmatic web-focused language
> 2) a loosely typed language
> 3) a language which caters to the skill-levels and platforms of a wide range of users

« first day (1520 days earlier)      last day (3654 days later) »