« first day (1771 days earlier)      last day (3180 days later) » 

Abe
12:19 AM
morn
 
12:57 AM
ppl getting drunk huh
 
Abe
in HTML / CSS / Web Development, 18 hours ago, by Kitler
> TIL that the first person to jump off the Brooklyn Bridge was a professional high diver who "wanted to demonstrate that people did not die by simply falling through the air". He proved himself correct by falling 135 feet safely through the air, only dying when he hit the water.
 
1:53 AM
I hope that was diplomatic enough yet still gets the message across...
 
2:15 AM
@ircmaxell Scott's writing an RFC. It's obvious that there is no consensus and that people just disagree with the RM's opinions, so just ending the drawn out discussion and putting it to a formal vote seems the only sane thing to do.
Longer term, I'm mildly disconcerted over the attitude that a time-table is more important than avoiding releasing software with massive security deficiencies.
 
I am more than mildly disconcerted...
But I am playing the politics game. Or trying to. Better to work with people than against them.
And I will draft a 7.1 rfc for an exception policy as well as adding them to existing functions.
 
@Danack Agreed. It almost feels like releases have been rushed to avoid discussing issues that exist.
 
Almost as if a certain company, whose name rhymes with Bend, is running out of cash and is banking on a new version of software magically raising their revenues.
 
Then raise that point on list. That "isn't the entire point of an RC/beta program to identify issues that were missed?". This isn't a new feature, but a missed case.
@Danack I am not going to comment on that
 
@ircmaxell Nothing really has been done on an RFC. I was thinking about starting a draft tonight/tomorrow. I think this needs to be done for 7.0, but it's important to be accommodating and avoid making people feel like their opinions don't matter.
 
2:27 AM
Actually, i f that happened and they went under, so would php die. Because they hold copyright over the engine, which we could jo longer release.
@Trowski which is why I am not just going to list with one.
 
9 hours ago, by Danack
But what I'll try and do tomorrow is do a patch that does the error checking.
9 hours ago, by Danack
And then try to write a reply that doesn't involve lots of name calling.
It's not obvious how to point out the problems in the relese process without.....being confrontational.
 
Go for it
 
@Danack Was this in reference to CSPRNG?
 
They are in a hard position. So I see both sides and don't think it is constructive calling things out.
However do express your concerns. Just keep it constructive.
 
@Trowski the preg one is equally insane.
 
2:31 AM
I'd almost argue more insane, since you can't just check a return value, you actually have to call another function.
 
And there's no way to say "If you think that it's acceptable for functions to silently fail, you are insane" politely.
For the lolz, it would almost be worth just replying with: gist.github.com/Danack/8cf1e8954abf48122c9f
/laters, need to finish some drinking.
 
I don't have enough clout with internals for anyone to care what I do. @ircmaxell would you assist with and sponsor an RFC for throwing from random_*() and preg_match()?
 
@Danack sure there is. Calmy start a new thread about the risks of the accelerated schedule. That too much pressure is being put on get it out that important things are going missed.
 
Hello everyone. I just want to ask if passing javascript value to a php variable can be achieved through this?For example, on my javascript: $.post('signage.php',dir); then on my php tag I have $dirNameproj = $_POST['dir']; . Is this the right way?
 
Or a better question, is that you think should be done?
 
2:36 AM
@Trowski if and only if the RMs agree to it. I don't want to superseded there authority with brute force unless absolutely necessary. Adn I am not convinced it has come to that yet.
 
@ircmaxell It doesn't sound like the RMs are against a possible change, just that they want to see an RFC for it.
I have to agree with Pierre, that if an RFC were made, this could be settled.
Should an RFC targeting 7.0 address how Exception and Error should be used in core functions in general, or just look at random_*() and preg_match()?
I had planned on addressing both, but it sounded like you'd rather separate them.
 
@Trowski no, they are against the change at this point.
@Trowski do one at a time, since they are different issues.
@Trowski no, the convention vote should be separate, since that will be bike shedded to death.
 
@ircmaxell I'll wait and see what the response is to the email you just sent.
@ircmaxell That's a good point. Best to just stick to those specific functions then. I haven't followed the preg_match() issue closely. I assume all the preg_* functions are affected?
 
I think so, haven't had time to look deeply into it.
There are aces up sleves though...
 
2:52 AM
Looks like it does affect all of them.
 
good morning
 
Abe
people that is forced to use windows somehow: do you prefer 2 machines and a kvm switch or run it through a vm? can i smoothly run photoshop and illustrator in a vm?
 
3:11 AM
i imagine it would depend on how much direct hardware accesss the vm has to your graphics card and how much ram you can throw at it..
I think photoshop and illustrator throw a lot of there processing onto the video card if they can.
@teresko would probably be a better resource then I though
 
Abe
@JoeWatkins makes me feel better that someone can be a good programmer and be not-good with git. git is a mystery for me. order is: 1- meaning of life 2- git 3- women's logic 4- reason ruby exists
 
3:23 AM
5 - why is bra singular and panties plural
6 - why do we drive on parkways and park on driveways
7 - why is it when you transfer something on a ship it's called cargo but if you put it in a car it's a shipment
8
 
@Abe gis is less understandable than women? Let's teach each other. Because for me it is reversed.
 
Abe
:P
@Orangepill ahaha good ones
 
more examples of how inconsistent English is :)
@ircmaxell you've been a part of larger corporations... how does the politics there stack up against php internals?
 
 
1 hour later…
4:55 AM
@ircmaxell @Danack I started an RFC. Feel free to edit it in any way: wiki.php.net/rfc/core-function-exceptions
 
Hello all
I have a doubt regarding php composer
 
5:17 AM
moin
 
5:49 AM
@ircmaxell Are the librarys you worked on a while ago for cryptographically secure functions in PHP still secure and up to date? Things like github.com/ircmaxell/RandomLib
 
morning
goodnight peeps.
 
6:26 AM
Morning
 
@Orangepill night
else moin
 
6:56 AM
moin
 
7:16 AM
GUYS! can someone help me on this problem? please stackoverflow.com/questions/32153437/…
 
7:28 AM
@Orangepill what?
what's the subject?
 
Guys, is it recommended to use an ORM?
 
it depends
 
If I am building a blog?
 
it might be a good enough usecase
 
(y)
Any godo ORMs?
*good
 
7:30 AM
ORMs are good for fast prototyping and projects with flat database design
 
Oh.
Stuff like SQLite?
 
@HassanAlthaf Doctrine2 is the recommended one
@HassanAlthaf no, stuff like "your SQL queries do not have more than 2 joins"
 
Oh, I have never used a JOIN.
 
maybe then you should (a blog might be a good place to try)
 
What do you think of 'Propel'
 
7:33 AM
and yes, you should be good at SQL before you start playing with ORMs
@HassanAlthaf it's active record.
 
Yes, I've used the ORM in Laravel. I forgot what it is called..
 
Eloquent, that's active record too
 
@tereško What do you mean by active record?
Yeah, Eloquent is so nice.
 
Oh.
So, an active record is like an object that represents a database?
 
7:35 AM
and please, learn to write SQL before you start relaying on ORMs
 
@tereško Yes, I have learnt SQL in my course and i have done an accounting system with SQL.
 
3 mins ago, by Hassan Althaf
Oh, I have never used a JOIN.
 
@tereško Because I never had the need to use it. :P
We do have a beautiful documentation by MySQL.
 
@HassanAlthaf that's like saying that you have never needed to use WHERE in SQL
 
Lmao.
It was because my tables were never normalized.
 
7:37 AM
it actually has about the same amount of implications
 
They were a mess.
Let me setup the basic stuff of my application so that
 
then my recommendation is: write a blog, use raw SQL, publish it on github
 
It's easy for me. :)
 
@tereško Alright, I am doing one for personal use, I will put it on GitHub too.
 
7:38 AM
@JoeWatkins some day I will ask you to tell me about pthreads
 
Aren't threads used to run multiple lines in code at the same time ?
5
 
... cute
 
lol ...
 
You can correct me. I haven't still studied my text book yet. cbf
Exams in December or January.
 
7:41 AM
you will be having an exam in php?
 
@HassanAlthaf contains explanation of synchronous/asynchronous/parallel ... and some whining about communicating precisely (you can skip that, probably) blog.krakjoe.ninja/2015/07/the-universe-is-not-aware.html
 
@tereško No, exam in C# and Java. Including other topics such as OO concepts, DBMS, Project management, etc.
@tereško Basically this course: esoft.lk/computer-studies/other-diplomas/…
@JoeWatkins Thanks. :)
 
that seems similar to what I learned few years ago
 
Damn worth it for like $200
lol
Get a certificate signed by Pearson at the end of the course.
Not bad yeah?
 
you know how many certificates I have ?
none
 
7:46 AM
My country does consider education a lot.
I'm doing this course to be able to get an internship while doing my degree.
Of course PHP internship. :D
Or Java if I'm fluent enough.
 
aren't most degree courses based on Java ?
 
Yeah.
 
.. I was thought that when I was getting a degree
no additional courses required
 
In Sri Lanka, it is usually C#, Java, and C++
 
I started a degree, but couldn't fund it right now ...they are enormously expensive ...
 
7:48 AM
They take up multiple languages, and during internships, they really teach you some extra stuff which can be very useful for your degree. :P
@JoeWatkins I know, I want to take a proper Computer Science degree, but my parents are not rich enough.
Student loans are very hard to get here.
Lets try to get a scholarship by performing well in Advanced Levels.
 
you're supposed to get funding help in this country, but red tape got in my way, believe it or not, I cannot prove my identity satisfactorily enough for the student loan company .... dicks ...
 
Lol.
My country will experience a brain drain very soon.
It doesn't value educated people, and salaries are just 80k or 100k a month, which is very low.. :/
Its like 600 to 750 USD^
 
anyway, my original point before getting mad at bureaucrats was that you shouldn't put off learning because you think a degree will teach you "properly" ... it sounds like you're doing that a bit, a degree isn't going to teach you 10% of what you need to know to be a good programmer so get on and start learning asap ...
 
Yeah.
I learn whatever I can now, because I know, university is gonna make you research and not spoonfeed.
 
anthony has a degree, but it's in math
 
7:52 AM
Maths <3
 
some of the best programmers I know never studied CS
a lot of them studied english, history, languages and stuff like that ...
 
I did take Computer Science for Ordinary Levels, but it was toooooo basic.
It's a bit complex at Advanced Levels though.
But the programming part is still too basic.
We use the ancient language 'PASCAL'
-_-
I can't even find a working compiler for it to use on OSX.
So, after reading all that,
 
what language you use is not really important
 
how do I determine if the code I wrote is asynchronous or not?
@JoeWatkins the compiler has got ebola.
 
if you have interleaved instructions, you have asynchronous code, simple as that ...
 
7:55 AM
As in?
I don't get that.
How can instructions be interleaved?
 
@HassanAlthaf the point was that you can learn concepts and patterns in any language and they are widely applicable, that's often why a course will use a language like go to show some particular concept that it excels at ... I can't think of what pascal excels at but I don't know it that well, but whatever you can ignore the language you are using for the purposes of education ...
okay ... gimme a second
 
The options were, Python, PASCAL, Delphi or VB.
I think Python is a decent option. :)
 
@HassanAlthaf 3v4l.org/JjIPb
like that ... that's a silly example, nobody is ever going to write that, but if you imagine the tasks aren't just counting from one number to another, and are for example reading data from a stream
 
Oh.
But how do you say that you want it to work asynchronously? Or does PHP automatically determine?
 
no, you did it, or I did it, when I wrote the code ... I executed the tasks in such a way that interleaves their instructions
 
8:05 AM
Wait oh nvm.
I see.
Thanks a lot (y)
You're an awesome teacher. :P
 
Man, one thing annoys me a lot,
Is it annoying for a teacher when a student asks a doubt?
 
I don't think so
 
My teacher claims that I'm trying to be 'too smart' when I ask questions..
 
@Sjon ...
Failed to initialize central HHBC repository: Failed to initialize schema in /tmp/hhbc.sq3: RepoQuery::step(repo=0x7fc14541e000) error: 'COMMIT;' --> (10) disk I/O error Failed to open //.hhvm.hhbc: 14 - unable to open database file
Process exited with code 1.
 
8:18 AM
Morning
 
/me tips hat
 
Hey joe
 
yohaa
 
Damn, FastRoute is not working for me. :(
404 - Not Found. :[
 
morning
 
8:26 AM
Sup @RonniSkansing
FastRoute fucking me over
 
Morning @RonniSkansing
 
@HassanAlthaf pastie the codes
Finally weekend
 
I will enjoy today! =]
 
@RonniSkansing pastebin.com/ESAULnz7
Routes.php:

<?php

return [
    ['GET', '/hello-world', function () {
        echo 'Hello World';
    }],
    ['GET', '/another-route', function () {
        echo 'This works too';
    }],
];
 
8:30 AM
Hello Everyone! I just want to ask what causes this error ? when I echo the value from ($_POST['subDir']) I got the following error: Undefined index: subDir in C:\xampp\htdocs\signage\signage.php on line 184. please help <?php
if(isset($_POST['subDir']))
{
print_r($_POST);
}
else
{
echo('fail');
echo($_POST['subDir']);
}
?>It always fails but my ajax call was success please refer to this link :http://stackoverflow.com/questions/32153437/passing-of-javascript-variable-data-to-php-variable-in-the-same-php-file# I realy need help
 
The above makes no sense
You are trying to access an index only when it isn't set
 
What?
 
please refer to the link. thank you
 
@HassanAlthaf reading it now
 
Alright. @RonniSkansing
Error I get now; Whoops\Exception\ErrorException thrown with message "Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/Portfolio/src/Routes.php:5)"

Stacktrace:
#3 Whoops\Exception\ErrorException in /Applications/MAMP/htdocs/Portfolio/src/Bootstrap.php:73
#2 Whoops\Run:handleError in <#unknown>:0
#1 header in /Applications/MAMP/htdocs/Portfolio/src/Bootstrap.php:73
#0 require in /Applications/MAMP/htdocs/Portfolio/public/index.php:2
 
8:35 AM
ah
whats on line 5 in the routes.php?
 
echo 'Hello World';
 
oh, well if you echo before using the header() it will give you that error
 
Oh.
I changed it to return now
But I get white screen
And still 404 for /hello-world URI
 
have you tried var_dump( variable ); die; inside the dispatch switch to check if it really finding/not finding the route
it kinda makes sense if you return a string in the callable like "hello world"
 
Let me try
 
8:40 AM
you call the callable with call_user_func($handler, $vars); but you never capture the returned value
like
$r = call_user_func($handler, $vars);
 
ye, this is what patricks
tut does
What was that new router in PHP?
 
new router?
I think it was failing because there was headers being set after output
Now it is failing because the string returned from the callable is not used
you can test it quick and simple, inside the switch echo 'FOUND'; DIE;
echo 'NOT FOUND'; die;
 
Nevermind.
I got that part working.
Just the other routes don't work
return [
    ['GET', '/', ['HassanAlthaf\PersonalWebsite\Controllers\Homepage', 'show']],
    ['GET', '/lol', ['HassanAlthaf\PersonalWebsite\Controllers\Homepage', 'show']],
    ['GET', '/fuck', ['HassanAlthaf\PersonalWebsite\Controllers\Homepage', 'show']],
];
The first route works fine
Second and third give me a 404 error.
 
which php version are you using?
this isnt the error that you are debugging, but just a tip
in the file..
use HassanAlthaf\PersonalWebsite\Controllers\Homepage;
and in the array, Homepage::class
 
I don't get you.
 
8:47 AM
so
['GET', '/', [Homepage::class, 'show']],
is abit easier to read
 
lel
But if it returns
it might not work
-_-
 
return the data
put it in response::setContent( $responseString );
 
I did.
In the class
The first URI works perfectly fine
But the other two dont
brb lunch
 
8:56 AM
good morning
 
moin
 
9:16 AM
Back
 
wb
so if you go to /lol and you put a die('42'); in the case \FastRoute\Dispatcher::NOT_FOUND:, it will output 42?
 
Let me try
Not Found

The requested URL /lol was not found on this server.
 
looks like it did not hit the die
are you running apache?
 
Yeah
MAMP has got Apache.
 
is the project in the root folder?
 
9:21 AM
ye
 
and do you have a .htaccess file in there
 
Made a custom URL for the project which points to the public folder.
Nope, I don't.
 
try adding a .htaccess
 
what do I put in it?
 
is the index.php in the root?
 
9:22 AM
Yes
It requires the bootstrap.php
 
put it in the root
the htaccess as a sibling to the index
 
Yes, it is in the root. ;)
Got it to work.
I used the Laravel's .htaccess
 
can you pastie it
 
Ye sure.
Oh shit forgot to share lol
 
=] well its fine.. guess you are ready to code again
 
9:39 AM
Why does PHP allow this? stackoverflow.com/a/8450359/1592648 nested functions. Are there any use cases for such a thing?
 
@crypticツ The use case is messing with people, because it will fail the second time you cal that function
 
@RonniSkansing Yes. But it may be my last PHP project. :P
 
@HassanAlthaf =] really?
 
@RonniSkansing Ye.
Gotta move on to Java, It's a nice languag eto work with. :P
*language to
 
ok, for web dev?
 
9:45 AM
I need to show a error to the user if condition is false
here is my query:
ON DUPLICATE KEY UPDATE
  last_entry = IF(last_entry-1 < UNIX_TIMESTAMP(), UNIX_TIMESTAMP(), last_entry)
 
@RonniSkansing App dev
 
android? desktop?
 
how can I control the errors ?
 
@RonniSkansing Yeah, both.
I did make two desktop apps.
 
with swing?
 
9:47 AM
JavaFX
Swing is about to be made deprecated or something.
 
I've never had any fun in java #justsayin ...
 
Its a cute language. :P
I want an app that gets you a 6 pack in 5 mins
 
@JoeWatkins happens when multiple hhvm processes run at the same time. At the weekends I run batches of old scripts through new versions so it happens more often
 
@Sjon I c
 
Last two years in skul ;]
 
9:52 AM
So I have another script that finds those errors and reruns them :X
 
@ircmaxell So… how do we prevent the RMs to make the mistake about not allowing the CSPRNG error/exception changes?
 
10:12 AM
@HassanAlthaf As long as you do not try to do anything with GUI, I'd agree.
 
hmmm ...
so ... is there any problem in theory with having an object that is not in the object store ?
because ... I just removed serialization of objects from pthreads and passed all tests ... no serialization of any objects is extremely appealing ...
I realize there will be times when you can induce error
by writing to an object you didn't create for example ...
but, I've heard people argue that this is their problem ...
@NikiC @bwoebi thoughts ?
 
@kelunik What do you mean? JavaFX = GUI.
 
@JoeWatkins What do you mean, not in the object store? How does that work?
 
well it doesn't need to be in the object store does it, becaue the zend_object is in the zval
until you do something in a write context
<?php
class My {
	public function get() {
		return __CLASS__;
	}
}

class Test extends Thread {
	public function __construct(My $my) {
		$this->my = $my;
	}

	public function run() {
		var_dump($this->my->get());
	}
}

$my = new My();
$test = new Test($my);
$test->start() && $test->join();
?>
 
@JoeWatkins What handle will the object have?
 
10:26 AM
well exactly, when you do this
<?php
class My {
	public function set() {
		$this->member = __CLASS__;
	}
}

class Test extends Thread {
	public function __construct(My $my) {
		$this->my = $my;
	}

	public function run() {
		var_dump($this->my->set());
	}
}

$my = new My();
$test = new Test($my);
$test->start() && $test->join();
?>
krakjoe@fiji:/usr/src/pthreads$ valgrind php tests.php
==7976== Memcheck, a memory error detector
==7976== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==7976== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==7976== Command: php tests.php
==7976==
NULL
==7976==
==7976== Process terminating with default action of signal 11 (SIGSEGV)
==7976==  Bad permissions for mapped region at address 0x8402245
==7976==    at 0x85F5F1: zend_object_std_dtor (zend_objects.c:58)
no wait, that's the parent trying to free memory that the child allocated
but you still don't seem to need a handle ...
do you ?
 
Damn.
That don't make sense
!!afk off for a bath
 
@JoeWatkins If nothing else you need the handle for spl_object_hash ^^
 
well it has a handle
oh yeah ...
I can override that
is there nothing else ?
 
"Code MUST use an indent of 4 spaces, and MUST NOT use tabs for indenting." PSR-2
Do you set a hotkey for adding 4 spaces or just click the spacebar 4 times when working? Because I clearly can see how someone might add 3 or 5 spaces instead of 4 by accident...
 
@deadsource I press the tab key. Any decent IDE / text editor will handle using spaces instead of tabs for you.
 
10:38 AM
@AllenJB Well, I probably should stop using Notepad++ then...
 
@deadsource even n++ does it
 
@PeeHaa is there a setting I need to turn on? Because it acts as if there were only tabs when deleting them or trying to navigate to the middle of the tab with the cursor keys.
 
actually, nevermind, it's hugely unstable ...
 
98
Q: How does one configure Notepad++ to use spaces instead of tabs?

user656925It keeps inserting tabs which later messes up my code. How can I make it stop doing this? Obviously, it is not just when I hit the tab key, but other times as well. I want it to use 4 spaces.

 
@PeeHaa I Google'd it after I wrote my last message. Probably should have done that first before asking... Though thanks anyways c:
 
10:42 AM
Yes :)
 
Though that could come as a default seeing how that's the recommended way of doing indentations.
 
0
Q: How to control the errors in ON DUPLICATE KEY using IF() function

SajadI want to prevent of taking back the vote by user after 5 minutes. Also because my website has both +1 and -1, I have ON DUPLICATE KEY UPDATE in INSERT query. Here is my query: ON DUPLICATE KEY UPDATE value = IF(last_seen > UNIX_TIMESTAMP() - 300 , VALUES(value), VALUES((-1)*value)) For your...

 
WTH
> OK, but incomplete, skipped, or risky tests!
Tests: 10, Assertions: 10, Risky: 2.
@deadsource Meh. It's a setting you only do once and for me it is just part of the installation process
 
Huh, apparently Notepad++ had all the settings I needed. It's "great" when you have friends that sh*t on things that you prefer to use. Even I then start thinking the same.
 
@deadsource Use phpStorm, I love it. It has all features you need including GitHub, etc.
You don't even need the php.net manual with it, it tells you what parameters a particular function requires. Neither should you worry when you forget your own code, it tells what methods are there in a class and what arguments they expect.
 

« first day (1771 days earlier)      last day (3180 days later) »