« first day (1890 days earlier)      last day (3284 days later) » 

16:00
yeah, then just yield the $msg
$data = yield $msg;
it's implementing Promise ;-)
ok...
I told you I miss callback hell :p
@Leigh also, watch() isn't going after frames, but is segmenting the data at 32 KB (Rfc6455Endpoint->autoFrameSize)
for two reasons: avoiding tiny frame DOS and not having a gigabyte sized frame and having an OOM then ;-)
only a gigabyte? I thought frame size was allowed to be up to 64 bits :P
that's it. I am unsubing from BigThink youtube channel. The quality of their stuff has dropped astronomically. The latest "quantum physics is magic" video was the straw that broke the camels back.
@Leigh theoretically, but we have a limit Rfc6455Endpoint->maxMsgSize…
16:11
@Andrea Are you also willing to retag questions when needed?
@tereško that's why I'm trying to create a single table/view from all those Posts tables. Yes there is a particular reason: My website is made up of some separated parts. {dictionary, poetry, Islamic-books, and ...}.
So, I really can't to create one table from both of them
@Shafizadeh are there different columns in those tables?
well yes ...
even different in the number of columns and their type
{ sorry for bad internet connection}
16:26
Hi.
@Shafizadeh Long time no see. :P
Fanatic is the hardest badge I'd say imho.
Check this repository out by me: https://github.com/HassanAltha...
@HassanAlthaf so crude
@NikiC what?
@Shafizadeh I'm online daily. lel.. probably different times. :P
@HassanAlthaf Hello, Usually I'm in here and who is hidden these days is you ;-) !! (however maybe you are right, because my sleep-time has been changed! I'm awake all the night and sleep all the day :-( )
@Shafizadeh Btw are you shia?
uhum, why are you asking?
16:34
@Shafizadeh I wanna know more about Shias. I like to know about all kinds of people. :)
I believe Iran has quite a lot.
@Shafizadeh So, are you?
people don't depend on their religion ..! and yes I am.
@Shafizadeh Oh, don't find it offending. I just like to know about everyones beliefs, opinions you see. I don't want to sound offending to anyone, therefore, I just like to know about all kinds of people. e.g. hindus might find it offensive if you say you eat Beef.
:-)
I see
16:37
@Shafizadeh Shia believe that Ali (rali) is the last prophet yea?
Actually I like too ..! But seems here isn't a good place for knowing about people .. I tried it already about tereško and others told me stop it
Ohh.
Maybe in Facebook, some day.
sounds good ..!
When I actually bother logging in.
btw, The Prophet Muhammad is the last one
16:39
Oh, then why in Shiah azan they say 'Ali (rali)' instead of 'Muhammadur rasoolallah' (I'm sunni btw)
what is the mean of "rali" ?
radhiallahu anhu
most places thats the short form they use.
ah
@HassanAlthaf well, that's not true ..! Shia both mention to Muhammadur rasoolallah and Ali (rali) when they say azan
Oh, why is it that they mention 'Ali (rali)'
Because he is the first imam (they mention to ali (rali) as the representative of all the Imams )
16:55
Oh.
Damn Vulnerable WebApp - Showcases examples of most major vulnerabilities in web applications
3
@PeeHaa This might be a good candidate for the resources section ^
@Shafizadeh .. here is a tricky question: was he a real historical person (as in, was he mentioned in some historical records of that time)
because christianity has this problem in general - all the prophets and leaders that get assigned "the first of .." title are never mentioned outside the religious writings (which are usually dated at least hundred years after the death of that supposed person)
basically, is there same type of proof as there is for Julius Cesar (rome) or Oda Nobunaga (japane)
17:31
yo
17:53
o/
/me is making venison chili
... of course I again made the mistake or using about 1kg of meat in it (that's a bit more than 2 pounds)
18:20
Sounds like a good mistake if it turns out nice.
@tereško - hey tresko
hi guys
hey guy
i want your suggestions about showing the datas in yii
actually, i'm using yii2
and i want to if the user created a news or something like that, the datas will saved to the server but, after i added the 1 number for example, the datas will be shown
i'm already have that one which is saving on the database, but, can i use an statement for that? i mean,if the number(default is = 0) is 0 then, not show the datas and if the record is 1, show the data
how can i do that on yii2?
maybe here is a yii2 guru - I have no idea :#
tnx for mention about it :D
18:43
i've made a mistake for using statement instead of condition...the fact is, can i use a condition? my bad!
I think you should show us some code, maybe we can help, what do you think?
try it with:
https://codeshare.io/b9zWI

put your code there, maybe someone will help you
no problem, which code, which file :) A lot of codes's here
I have also some questions, but today the chat is not that active
haha I have no idea, what you problem/question exactly is..
yeah, no problem
:D
I hope someone also will help me :/
18:52
what is your question or issue then?
@PeeHaa I can do some if needed
My "problem" is, I have a new job, but my future boss said, I should send him some code, so he can see, how I code - my problem is, I never cared about code conventions or beautiful code..

now I'm fucked up, I tried to "convert" spathetti code to oop ... but I really need help about architecture and so
I dont know if some one will help me to beautify my code
*I'm a part time student
i know that the pretty code means you should use a clean structure and i think there was a book about this if you like it, i can find it for you?
all of us are students :)
I have these book here in my shelf xD
So, what is your problem then, i don't have like this book and for every problem i should ask someone...:/
imagine it, for every problems, and of course, this framework support is sucks
19:11
here is my Code.
how can I improve it?
Its so ugly, I have no idea about architecture
I worked everytime without oop
and I dont see why I should do that in php
- don't use die()
- don't put logic in constructors
- don't put multiple classes in same file
- don't use @ to suppress warnings
- the getUserIP() function is a mess
- the DB::save() is doing to much, split the code in subroutines
- your FormValidator class is tightly coupled to other class names ... also, incidentally, it's not class but a glorified function
@user3037960 those would be the obvious mistakes
@tereško wow thank you - I'll try to repair that - wait "a" minute
*why dont use die?
should I use exit() ?
no, your code shouldn't just be killed
if you have an unexpected state, log the error and render a "sorry, something went wrong" error page
"your FormValidator is a function" - yes Every thing was a function: Here is the origin code: https://codeshare.io/LPStG

"dont put multiple classes in same file" yes true, was just for sharing

"dont use @ to suppose warnings" I dont know what I should use instead, but I'll google it

thank you!
I like the function version much more
Is it a shame? haha
don't suppress errors, prevent them
19:26
@user3037960 the @ is just suppressing an error. It's not stopping it. And code which creates errors/warnings is measurably slower
if you need to get a value from an array, check if that key exists in the array first
that's what you were already doing in the code below those multiple @
yes, dont look at the second file please! haha
the fist one with classes is that one I want to improve
https://codeshare.io/b9zWI < this
so, you inherited a clusterfuck or are jsut improving your own code?
ok and can I use a loop for the validation of my form elements?
because its now so long with the same tasks over and over again
19:29
well, all the form fields, that are submitted, are usually contained in $_POST
clusterfuck? what? haha

its my own code I wrote for a client ... it works, but I had only limited time, so I gave a fuck about beautiful code .. and now I have the chance to get a really good job - my first job after university - thats why I'm trying to improve my code - because I must send it with my cv...
you can loop over all the entries in $_POST array and then validate each entry base on predefined list of "what it is supposed to be"
your post array has "field -> value" and you can internally define "field -> type" array
for example $fields = array('name' => 'text', 'email' => 'email', 'title' => 'text', 'content' => 'text', 'captcha' => 'captcha');
so you just loop over $_POST and ask that array, how you should validate that particular field
@PeeHaa sure, but most of the stuff in the tag seems to be PHP 7-specific so far
20:08
Do we predeclare variables in php?

class MyClass
{
private $var1;
function __construct()
{
*
Do we predeclare variables in php?

class MyClass
{
private $var1;
function __construct()
{
$this->var1 = "xx";
}
}

Or can we just do this:


class MyClass
{
function __construct()
{

$var1 = "xxx";
}
}
depends
usually you would do
class Foo {
     private $x = 'qwerty';
     private $y;

     public function __construct($param) {
        $this->y = $param;
    }
}
@user3037960, you probably would benefit from watching lectures listed here: stackoverflow.com/a/16356866/727208 (don't be scared by the title .. only the last section actually applies to it .. and those are all books)
most of it is about best practices and code structure in general
@Andrea That's not my experience. I think at least 9/10 I had to retag. But if you people cc @Leigh want to try to prevent it from rotting you have my blessing :-)
What kind of stuff do you think belongs in ?
thank you!
I will read it!

I have read so many of these tutorials and books, but I forget everything - I have to practice more! But my new job isn't even about php, its about java and spring mvc
@Andrea Stuff about features that didn't exist in PHP 5.
20:22
@Andrea Stuff where the behavior changed
hmm
@PeeHaa that is a PHP 7 issue
No it is not
or at least the user thought it was one
20:24
yes
which is exactly how the tag is going to be used
I upgraded to php7 my issue has nothing to do with this but it's 7
-1
Q: could not find driver with Laravel - Homestead - PHP 7 - MariaDB 10

Juliatzin del ToroI'm trying to configure a local Laravel environment using Laravel 5.1 - Homestead - PHP 7 - MariaDB 10. I can reach localhost, I can connect MariaDB via MySQL Workbench, so almost everything works. But then, when trying to connect laravel with Maria I checked phpinfo() and it seems that I don...

...
related but not my point
Damn you're fast :P
@PeeHaa I saw it before you did :D
:-)
> and you can have the type hints be strict or non-strict depending on a setting in PHP. Laracasts set this using define, IIRC.
Wut. I doubt that
URL question "/foo/" vs "/foo" ; is there any SEO or other hidden reason to prefer one form over the other?
If it has the same content it's considered dupe content by google
actually, I just really don't like trailing slashes.
Burning em...
20:39
20:49
Anyone knows about any great premium Magento 2.0 theme?
Currently setting up IPv6, TLS and PHP 7 on my server :D
Why all three at once? They all require modifying my nginx configs...
why aren't you automating your nginx configus? ;-)
I will someday
21:01
:-)
I automate setup of my sites by using a little PHP script
I should probably switch to a proper tool, but this works well enough
Chef +1
21:15
Aha, and now I have properly-verified TLS on all my domains, thank you @LetsEncrypt! https://blog.ajf.me ^^ https://t.co/U6FjbtwFd3
that was incredibly easy
this is without automatic configuration, too
@ircmaxell how does Chef work?
I dunno
21:39
heh
now I have over-ate and happy
The meal's not over when I am full, the meals over when I hate myself.
that sound like louic ck ^^ :)
@Fabor you are doing food wrong
.. then again, I am also quite well beered
21:50
Question: How many SQL tables in a row is too many? EG: I have something like this:

http://pastebin.com/3whv3xwV

which is 16 columns. Will that perform poorly on a larger scale of say. 5000 entries?
Sorry, 18 columns
not as noticeably as having poor indexes
(not saying you have, just that indexes matter more)
oh
well, basically we'll be looking up data by at least company_id and or a combination of other fields.
unique key is just a generic incremental counter
Realistically this could end up with entries in the hundreds of thousands, but I think if we reach that point we'll look at scaling anyways lol
I would have named that column companyID .. but then again, I like my DBs to be verbose
20 columns is not an issue
@tereško I like to keep my keys the same across the board :) company_id is referenced in other db tables as well :)
you would be in much deeper shit, if you did something stupid, like using EAV table
21:56
EAV table?
entity-attribute-value
lost look
also known as "property tables" ... some newbies tend to use them ... usually it ends in tears
care to elaborate?
probably because they see frameworks use them.
21:57
@Hybridwebdev why is company_name and delivery_date in the same table?
IIRC magento loves/loved to that
Fucking horrific
I'm kinda spoiled when it comes to coding. I specialize in wordpress (cue the WP bashing) so a lot of DB stuff is done for me :)
(your tables are bad not because there are too many columns, but because there are wildly unrelated things in the same table)
@Danack No, the fields are actually all related
@Hybridwebdev which is why it's just fine
21:59
@Hybridwebdev The delivery date changes when the company changes name?
the DB table stores bids from companies on freight loads. So they fill out a form with their bid data and its stored
actually @Danack is correct (probably because he's a lot less beer'ed)
more beard, less beered.
1 min ago, by Danack
@Hybridwebdev The delivery date changes when the company changes name?
some of those fields could go in a separate table
@Danack we track what company made the bid, what company_id the bid refers to(so that company can look up all bids they've received), date, time etc etc
22:00
        day_received,
        week_day_received,
        month_received,
        year_received,
shouldn't these be just "date_received" ?
Your tables are storing not directly related things - that is going to make querying the data be horrible. In the table you linked you should be storing the company_id not the company_name.
@tereško so companies can view bids recieved by day, month, year etc
company_id refers to the company the bid is for. Company Name is the field for what company is making the bid. THey are 2 different things.
@Hybridwebdev .. WHERE MONTH(date_received) = 2;
@tereško exactly.
you need to read what functions are available
22:03
@Hybridwebdev No, they're different representations of the same thing. And one of them lead to horrible queries, the other doesn't. You probably ought to read this guys book, but it's here in slide form: slideshare.net/billkarwin/sql-antipatterns-strike-back
separating the time in 4 rows is kinda silly
not because it maks "table slower" but because it's just pointless
@tereško they want to be able to audit and I dont want to have to write horribly complex SQL queries
Apply face... to palm.
@Hybridwebdev having single statement in WHERE does not make it complex
22:05
I mean, so long as having that many fields wont lead to horribly poor performance, I could hardly care
but having a properly stored datetime add more functionality that you could need later
@tereško no, but if you have to use datetime functions in the query, it makes it harder to build queries
for example, ability to query all deliveries 2 weeks before and after a selected date
@tereško oh yeah, I know that. Full dates are stored YMD so that we can do queries like that
@Hybridwebdev, if you don't want the advice, you really shouldn't show code here
user1804599
22:07
HELLO
@tereško I'm fine with advice. I just was more looking for if it would perform well
or at least not perform horribly
@Elyse HEY
user1804599
how's it going
well, having to index one column is a lot better than having to index 4 5 columns
@Elyse Pretty good as long as it's saturday
How are youy?
user1804599
22:09
I'm working on a new project again.
is it just me, or @PeeHaa too seems slightly beered
whiskeyed, but yeah
@Elyse Another compiler!
user1804599
No. :P
user1804599
Uptime monitor.
22:11
internet sadness
@Elyse Uptime of what?
I was plenty beered last night with @Leigh. Had to have a bath this morning to wash the alcohol through -_-
user1804599
Anything.
Wes
Wes
evenings
user1804599
It's generic.
22:11
Work Christmas night out
@Elyse That's actually sounds pretty useful for once :-)
Hey ape
user1804599
@PeeHaa Like so: i.sstatic.net/B5Mlp.png
user1804599
That's a HTTP monitor disguised as a PostgreSQL monitor, because as always my dummy data sucks.
Cool
@Fabor I woke up half in bed.. my legs were on the floor but at least my head was cozy
user1804599
22:14
It's my first project with Gulp and React.
@Leigh lol. When I got home I made those grilled cheese sandwiches like I said I would. :P I had to drink a lot of water to avoid a hangover too,
Do you hate JS yet?
user1804599
Yes. It's terrible.
hmmm... vanilla js is quite cool actually.
@FélixGagnon-Grenier Wrong answer
22:17
:p
I guess I haven't worked enough with it then.
I do recommend Chibi and GSAP for JS stuff.
Pretty much covers all the generic stuff.
I have dicked around with tweenlite at some point i think
user1804599
I recommend outsourcing JS stuff.
user1804599
It's better to inflict pain on others than on yourself.
Couldn't agree more
22:23
did js bully you in your youth?
IPv6 and TLS done, what's next? Oh, yes, PHP 7! I remove php5-*, add @oerdnj's php7.0-* equivalents... done! http://ajf.me/test.php
Running PHP 7.0 in “production” now :D
It broke one of the sites I host for someone else, though. Guess why?
2015/12/19 22:22:51 [error] 9895#0: *2560 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function mysql_connect() in /home/ajf/sites/pb.ajf.me/htdocs/Sources/Subs-Db-mysql.php:58
Stack trace:
#0 /home/ajf/sites/pb.ajf.me/htdocs/Sources/Load.php(2550): smf_db_initiate('localhost', 'smf_pb', 'root', '', '', Array)
#1 /home/ajf/sites/pb.ajf.me/htdocs/index.php(69): loadDatabase()
#2 {main}
  thrown in /home/ajf/sites/pb.ajf.me/htdocs/Sources/Subs-Db-mysql.php on line 58" while reading response header from upstream, client: 2a02:c7d:6941:2b00:643f:aff6
oh, SMF. never change.
Ha! Take that, ext/mysql!
I spent like 5 minutes looking at CMake for php-src today. There are a lot of configure options to work out equivalents for but looks pretty straightforward so far.
@LeviMorrison you're looking at how we could migrate to CMake for our build system?
22:30
Also, why are we not building libphp_datetime.so or whatever? Seems silly that we link in like 14 *.lo files from that extension (and some others have a lot too).
Each ext should probably be a lib.
@LeviMorrison do you know scons?
@FlorianMargaine I am aware of it, yes.
I've had to use it at work
it's really nice
Like most tools when you use them exactly as intended they work well.
@LeviMorrison I don't think we split out undisableable libs, but it might make sense
(does dynamic linking hurt perf? would non-statically-linking ext/standard make Dmitry cry?)
22:33
that's the thing: it's python, not some kind of DSL, so it's easy to do whatever you want
(we have something really custom at work, and it works wonderfully)
@Andrea If dynamic hurts just build an *.a (or *.la but I think that is GNU specific).
It's massively to #PHP's credit that I can recklessly switch my server from 5.5 to #PHP7 with no testing... and have (almost) nothing break.
In either case it should be a lib.
@LeviMorrison Ah, yes
@FlorianMargaine This is a double-edged sword.
22:34
@LeviMorrison though I wonder if there's interdependency between ext/standard and Zend
@LeviMorrison yup :) I've yet to see the bad side though.
@Andrea Then we should push stuff from standard into Zend, such as some interfaces.
@LeviMorrison naturally :)
@Andrea Actually, in CMake we'd just say build a SHARED or STATIC library and it will generate the extension as appropriate :D
Again, this is one of the reasons I want to switch to CMake. I'd like a single build system for all operating systems.
@Andrea btw, when are we killing off ext/mysql?
:P
22:37
@tereško we already killed it
really?
13 mins ago, by Andrea
2015/12/19 22:22:51 [error] 9895#0: *2560 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function mysql_connect() in /home/ajf/sites/pb.ajf.me/htdocs/Sources/Subs-Db-mysql.php:58
Stack trace:
#0 /home/ajf/sites/pb.ajf.me/htdocs/Sources/Load.php(2550): smf_db_initiate('localhost', 'smf_pb', 'root', '', '', Array)
#1 /home/ajf/sites/pb.ajf.me/htdocs/index.php(69): loadDatabase()
#2 {main}
  thrown in /home/ajf/sites/pb.ajf.me/htdocs/Sources/Subs-Db-mysql.php on line 58" while reading response header from upstream, client: 2a02:c7d:6941:2b00:643f:aff6
I was hoping that it gets removed in 7.0.4 ..
ext/mysql was removed in 7.0.0
too many letters
22:39
ext/mysql is dead
goooooooooood
@AnmolRaghuvanshiVersion1.0 rememeber your coworkers that didn't want to learn mysqli/pdo
@FlorianMargaine It doesn't support generating XCode, CLion or Visual Studio projects.
2 mins ago, by Andrea
ext/mysql was removed in 7.0.0
@AnmolRaghuvanshiVersion1.0 .. so, there is that
Also, increased power makes it more difficult to verify behavior.
22:41
has anyone played "Remember Me" on a PC?
Also, depending on Python to build PHP would be bizarre.
@LeviMorrison hehe
it could be worse
it might depend on Java
So yeah, Scons is a decent tool but it's almost certainly a no-go for building PHP.
3v4l needs a 32bit mode...
@Andrea You still have a m32 build about?
22:47
also, steam winter sale starts on 22nd
Wes
Wes
\o
.. in case if somebody has not paid the bills yet
After 10 months and 17 days, PHP 7 type declarations are finally merged into @PictoSwap mainline, and in production! https://github.com/TazeTSchnitzel/PictoSwap/pull/21
@NikiC I can make one quickly
I just do CFLAGS=-m32 CXXFLAGS=-m32 ../config && make, takes very little time typically
What do you need to test?
So yeah. I added type declarations to my web app PictoSwap during the RFC discussion to see how well my RFC would work in practice. And now the code - unmodified - is in use in production!
This wasn't even done for @ircmaxell's v5. I guess v5 didn't change enough stuff to break code written for v4
@FlorianMargaine ...good eye ;)
Will fix.

« first day (1890 days earlier)      last day (3284 days later) »