« first day (1944 days earlier)      last day (3000 days later) » 

9:01 AM
Mogguh Chris
 
@DaveRandom o/
 
morning :D
 
@Oldskool @Sean Consider an apartment building. Two neighbours might trust each other and not mind each other coming into each other's apartments, but they wouldn't have both apartments fitted to use the same key
@Oldskool this
 
@DaveRandom Nice example :)
 
Quite apart from anything else, encrypting back-end traffic in a private network is a waste of CPU time
 
9:04 AM
Is sushi2k someone in here?
 
posted on February 11, 2016 by nlecointre

/* by daMax */

 
@bwoebi Facebook don't think one is needed ;)
 
@Andrea they don't? source?
 
@bwoebi is this in response to my struggles with Haskell and PureScript? yeah I'm very tempted to try
 
9:17 AM
@Andrea yes, it is ^^
 
@Jimbo \o
 
@bwoebi HHVM lacks support. But I'm being silly if I claim Facebook don't think one is necessary
 
@Andrea hhvm has no cycle collector? or only hack?
 
@bwoebi PHP on the client side might be fun. You could map DOMDocument directly to document
@bwoebi actually a good question, no idea
 
@Andrea Lester, get out of this body
 
9:18 AM
LOL
 
@Andrea On a VM at home somewhere, I have a very hacked together build of Chromium with the PHP embed SAPI festering inside it
not wired up to much
certainly not the DOM :p
 
@Leigh why :p
@FlorianMargaine D:
 
@Andrea hmm, hhvm indeed has none
 
There's a good reason for that.
 
@Andrea Think PhantomJS, but with PHP
 
that was the intention at least
 
@Leigh oh, that makes sense
 
Dammit, I suck at rewrite rules. Anyone know how to check for a url containing /v2/ and forward to a different site (vhost)?
RewriteRule "^/v2/(.*)" "http:/new-site/$2" [R]
^doesn't bloody work
 
@Sherif no, not really. well, if you have no cycle collector, you should have at least a cycle debugger...
 
@Jimbo Drop the first /?
 
9:27 AM
@bwoebi Performance is probably the primary concern there
 
My experience is that cycles sometimes sneak in through callbacks which are stored somewhere and it's hard to find where exactly the cycle happened.
 
@PeeHaa Noice
Danke
 
@Sherif cycle collector in a cycle-free env has nearly no impact
(less than a percent at least)
 
A percent is relative.
Just sayin'
 
a percent of time in longer running scripts
 
9:29 AM
@Jimbo \o/
 
@bwoebi If it's a cycle collector wouldn't the time complexity be based on number of cycles and not amount of time?
necessarily
 
@Sherif I'm talking about a cycle-free env…
 
@bwoebi Is it a cycle-free environment though?
 
For php development on windows would someone of you recommend using XAMPP / WAMP / What ever or install MySQL, PHP and Apache from scratch on a windows machine?
 
@PeterS The latter
 
9:32 AM
@Sherif it?
 
@bwoebi Is the HHVM runtime a cycle-free environment?
 
@PeeHaa May I ask why? :)
 
@Sherif it depends on the code, not on the interpreter…
 
@PeterS Neither. I'd use Vagrant with a Linux VM ;-)
 
@PeterS Less dependency on a specific vendor to update to new versions
 
9:35 AM
@bwoebi Right, but it's possible to write code that would cause the cycle collector to hinder performance -- was my point...
Not saying it's a smart move.
 
@Sherif only if you're having unbroken cycles…
but your mem is leaking then … ;-)
 
Sure but a 0.1 second memory leak is negligible in the face of performance-oriented scale.
 
Ok, thanks :)
 
In my experience running PHP at that scale you find it cheaper to just buy more memory for your hardware than to worry about memory leaks.
when your primary concern is performance
Again... not saying it's an ideal solution...
 
@Sherif how do you quantify memory leaks in seconds?!
 
9:38 AM
Well I'm just taking into account the request lifecycle and the average number of requests until the parent process recycles
Admittedly I pulled that number out of my ass
 
If I install (a bootable) Linux Ubuntu distribution on a Drive in my computer, could I open it as a VM with VirtualBox?
 
well… is hhvm having a custom allocator too and just freeing all memory at request end?
 
@PeterS No. VM boxes have a specific container format
 
Well, ParallelDesktop (Mac) is able to run a bootcamp partition, hoped that VirtualBox could do something simular
 
ok
 
Wes
9:41 AM
mordjsfoning
 
o/
 
@Wes \o morhsfkshfing to you too ;-)
 
anyone knows a good free barcode generator?
 
@Naruto zend_barcode
 
9:43 AM
without having to use zend? :P
 
@Naruto Isn't a barcode just a checksum and a font?
 
@Naruto you can use it as a standalone component
 
Could you guys please check out my question I don't know how to fix it.
0
Q: Foreach Insert into with same IDs

Vintage BeefI want insert into data with same IDs. EXAMPLE: tbl_products +------------+--------------+-----------+-------+ | product_id | product_name | vendor_id | price | +------------+--------------+-----------+-------+ | P1 | A | 1 | 500 | | P2 | B | ...

 
@PeeHaa I haz no idea @Gordon do I need to install something fo that or can I just find the class and include it?
 
@Naruto That's at least what I did when I was still doing print
 
9:49 AM
 
IE totally cockblocking again. Need to refund that SSL certificate
Multiple websites on one domain, can't use SNI because of bloody IE/XP.
 
@Andrew @Andrew, this question is rather irrelevant to PDO, (to me it sounds like "Do you recommend to use INSERT or UPDATE?").
 
@Sean Domain doesn't matter
Get a wildcard
 
Err, server*
 
k
But thefuq are you supporting xp for??
 
9:52 AM
White label
 
So?
Did you recently check your visitors?
 
Companies are notorious for having lower grade OS / browser versions?
Lemee check.
 
If you really still need to support it I am very very sorry for you
 
1.7% on our main site, I guess I can try and get it set up.
 
@Sean Do you have any weight in the decision process?
 
10:00 AM
@PeeHaa Yep.
 
Nice. I wouold totally bring it up rather sooner than later
 
@Sean btw is that total xp users or xp and ie users?
 
IE8, XP. IE6/7 don't even have figures
 
Because iirc chrome also uses the windows tls stack
Not sure what ff does
 
10:04 AM
Looking at caniuse for support
 
I am so happy I have to care less about legacy crap like you :)
 
Sure wish I was in your shoes right about now :P
 
:-P
 
quite pleased that i've only gotta support IE10+
 
@Naruto you'll figure it out
 
10:09 AM
I miscalculated. It's 0.28%.
 
@Gordon well I better figure it out xD
 
@Sean Nice
 
As it stands I'm in a strong position to push it. No other domains on our site use SSL right now but we're planning to put them on a few in the near future. The reason this domain needs it is because we're starting to use OAuth2 for some parts of the system.
That and general account handling etc. etc.
 
@Sean Imo everything should use TLS by default
 
@Naruto and if not, there is plenty of barcode generators at packagist.org/search/?q=barcode
 
10:11 AM
@PeeHaa Absolutely agreed :P
 
Another nicety of dropping xp support is the ability to have a saner ciphersuite
 
@PeeHaa Where TLS version >= 1.1
 
Exactly
@Leigh Unless you have one legacy debian box like me which cannot be upgraded for now :(
In the process of getting rid of that asshole though
 
Bom dia! (good morning) ...i want to say that a var is equal to he´s own result +1...don´t i do this: myVar += 1 ?
 
why not $myVar++; ?
 
Wes
 
lol
 
@BobNocraz ops!...didn´t think about that one...lol...thanks man
 
no problem
 
:)
 
@Wes man I'm crying at that
 
Wes
10:23 AM
:D
 
@Wes lol, that's me nearly every morning with my kids =)
except it doesn't include the other parents/children rushing to get outta my way
i hate school runs. probably the most stressful part of my day
 
@Wes :)))
btw, happy new name ^
 
10:39 AM
@Andrew By no means you should be "always" using transactions. Just use them when it's required: for the data modifications that have to be done either all or none.
 
Wes
transactions are not only for data modifications. they are also for maintaining data consistent between two or more adjacent queries
naming help: looking for a short way to label something that can be modified as an existing entity, but can not be modified by adding more data to it. like, if it was a file, you'd be able to remove and replace existing lines, but it'd be disallowed to add more lines to it
 
is this legal in an trait for adding properties to parent class?
parent::$field=$value;
 
Wes
is $field a static field?
 
@GeoPhoenix why would you even try an abomination like that?
 
no its added after a query in db is performed
 
10:51 AM
please don't use static variables
5
 
Wes
and especially static methods
 
@tereško can't find any helpful articles online, so i thought i would ask somewhere
 
help to do WHAT?
 
i want to add properties to parent class that use a specific trait
 
hi guys!!
 
10:54 AM
Hi All
 
@GeoPhoenix don't, it is a terrible idea
 
SET @rank = 0;
SELECT t1.teamid,
       t1.teamname,
       GROUP_CONCAT(t2.name SEPARATOR ' / ') AS teammembers,
       IFNULL(t3.overallscore,0) AS overallscore,
       @rank := @rank + 1 as rank
FROM teams AS t1
INNER JOIN (SELECT * FROM team_members) AS t2 ON (t1.teamid = t2.teamid)
LEFT JOIN
  ( SELECT SUM(score) AS overallscore,
   teamid
   FROM stage_responses ) AS t3 ON (t1.teamid = t3.teamid)
GROUP BY t1.teamid,
         t1.teamname
ORDER BY t3.overallscore DESC
How to show the row number to the above query?
I already added "rank" as column which adds as row number
 
@Mr_Green by writing more SQL
 
Wes
@GeoPhoenix what's your actual goal? because that doesn't exist in programming
 
@tereško I tried using @rank := @rank + 1 but it is adding the number twice all the time
 
10:56 AM
not really
it' probably looks like it adds multiple time because you have GROUP BY there
 
well a trait i wrote it adds an function which performs an query when its called,i want to be able to to add properties to the parent class with the values from query result
 
@GeoPhoenix why are you using a trait to begin with?
 
How should I manage then?
It is just for my learning purpose. actually I can add the rank easily using php or javascript
 
Wes
@GeoPhoenix that's not what, it's how. and it's probably wrong. show the code?
 
@Mr_Green are you iterating through the results in PHP? if so, as you are already ordering them correctly, not just an incremented var ($var++) as your rank ?
 
11:06 AM
@BobNocraz no it is purely related to mysql
 
bottom line is this, you cannot use the @rank variable to get the position
 
@Mr_Green does this answer help? stackoverflow.com/a/15930609/4815044
 
only way would be to wrap it all in another subquery
and you already seem too fixated in using subqueries for everything ... like this part: INNER JOIN (SELECT * FROM team_members) AS t2 ON (t1.teamid = t2.teamid) .. it makes no fucking sense
 
I was actually trying to reset rank variable in it
@BobNocraz I just did. It didn't work
thanks
Here is the updated code:
SET @rank = 0;
SELECT t1.teamid,
       t1.teamname,
       GROUP_CONCAT(t2.name SEPARATOR ' / ') AS teammembers,
       IFNULL(t3.overallscore,0) AS overallscore,
       @rank := @rank + 1 as rank
FROM teams AS t1
INNER JOIN team_members AS t2 ON (t1.teamid = t2.teamid)
LEFT JOIN
  ( SELECT SUM(score) AS overallscore,
   teamid
   FROM stage_responses ) AS t3 ON (t1.teamid = t3.teamid)
CROSS JOIN (SELECT @rank := 0) AS dummy
GROUP BY t1.teamid,
         t1.teamname
ORDER BY t3.overallscore DESC
 
@Mr_Green maybe this is a better answer stackoverflow.com/a/4474389/4815044
 
(object)array();
 
@BobNocraz I am doing same in above query right?
 
O.o
 
i'm not sure, @Mr_Green the above SQL is a bit difficult to follow for me.
 
Wes
@GeoPhoenix gives no hints on what you want to achieve
 
11:21 AM
someone can explain me this rejex /[-a-zA-Z0-9@:%_\+.~#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?‌​/gi;
i have just learned regExp from w3schools but this rejex is so complicate
 
@Phoenix please never go to w3shools again
 
@Ocramius easy fix, just tell them to stop writing software and start writing about writing software… @GeeH @ircmaxell @beberlei
Here we go again...
 
@bwoebi what is that aerys??
 
@GourabNag a webserver implementation in PHP.
 
11:34 AM
oh i get it.. but why does it need PHP 7 strictly??
 
@GourabNag it's using features which exist in PHP 7 only. There are some things related to streams which even don't work properly at all in PHP 5.
 
LOL i see :P
 
There were admittedly a few tiny changes to PHP which were just done to make aerys possible. ^^
 
does websocket work in it... i have been searching for 'websockets' - things in PHP ... ???
 
yes
 
11:38 AM
u made my day @bwoebi !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
but it would take me a lifetime to go through the source code for the websockets part....
 
a lifetime for barely 8.5k LoC ?^^ (and that's the whole server)
 
I have a table named tags, It is containing three columns: id | name | explanation ...! name column is unique. every thing is fine?
 
thnx @bwoebi gimme a minute...
 
Wes
@Shafizadeh get rid of id. name is the primary key already
 
oww.. good point
@Wes The number of your reputation is less than your knowledge
 
Wes
11:49 AM
no, it's reliable. i know nothing
 
@bwoebi i'm in love with github.com/amphp/aerys !!
5
 
12:08 PM
have a look at this question
0
Q: How to make this file input disabled in jquery validate?

NevermoreI have a form which contains a file input element. I have not set its required to true. Still, it is telling me to select a file. The message reads "This field is required". I dont want jquery to validate it. Here is what I have done. jQuery validate rules and messages: $.validator.addMethod("...

 
thats not PHP-ish in anyway i guess...
 
@Nevermore Hm. If you don't insert a file, does your file_size_validator trigger?
Also, yes

JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
 
yes it does.. But I have taken care of it.
Since the file[0].element[0] doesnt contain anything; it will return false. However, I have not made the rule; img{ required: true, file_size_validator: true}
 
@Sean Y U WANNA ABOLISH BLISS???eleven
 
@Gordon Hey whoa now, don't look at me, look at those weird JavaScripters. Them with their foreign syntax and non-blocking heresy.
 
12:17 PM
Gordon shakesfist at @FlorianMargaine
 
@GourabNag that's warming my heart :-)
 
@GourabNag If you have any questions, you're welcome ;-)
 
thnx mate....
atm im doing this -
C:\Users\toton\Desktop\aerys>composer require amphp/aerys
Failed to decode response: zlib_decode(): data error
Retrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info
 
@Gordon I'm not RO anymore, don't blame me :D
 
12:22 PM
@FlorianMargaine Why did you get booted?
 
@GourabNag I don't know that error … that's a composer issue though …
 
@GourabNag packagist probably down again?
 
yeah it is... ik .... my interent is damn slow atm
 
@PeeHaa I removed myself, too much drama
 
@FlorianMargaine JS room drama?
 
12:23 PM
@bwoebi yea
 
@FlorianMargaine Did it improve now with discussions being on github?
 
@bwoebi afaik, yes
but that's not something I want to deal with, unROing myself is just easier :)
 
How to escape drama: by just not engaging with it…
 
yup :)
being RO makes me engaged though
 
hey @bwoebi can i install it using anything other than composer??
 
12:29 PM
@GourabNag sadly not … try to find a way to make it work :-(
 
@bwoebi okay.... np....
does any of you guys here play Clash Of Clans??
 
@GourabNag I could download it and zip it :P
 
could you send it over to me
 
I could
When composer require you need?
 
what??
 
user3119231
12:39 PM
I was just wondering if it is possible to echo an error code instead of error message (Especially to detect if username OR password were wrong)
 
user3119231
	}catch (PDOException $e){
		print "Error!: " . $e->getMessage() . "<br/>";
		die();
	}
 
use $ex->getCode()
sorry $e->getCode()
 
user3119231
Wow, exactly what I've thought of.
 
user3119231
Thank you.
 
@GourabNag What are you trying to composer?
!!package amphp/aerys
 
12:40 PM
[ amphp/aerys ] A non-blocking HTTP/Websocket server
 
Y U LINK TO GITHUB INSTEAD OF PACKAGIST? @kelunik
 
arent you that guy from the js room @Maurice
 
user3119231
@GourabNag I am.
 
What version?
 
12:43 PM
the latest one i guess.
👍👍👍👍
 
This rewrite rule:
RewriteRule ^v2/(.*)$ http://symfony.local/$1 [R,L]
Says to me, "if the url contains v2/anything then redirect to symfony.local"
and it's the last rule to process
Doesn't work
 
@Jimbo LGTM
 
@tereško inb4 someone says "but there's always a use-case for statics!!?SOMGZZ"
 
@Jimbo should work. Given there are no other rewriterules above it that match and that the rewrite engine is on.
 
12:51 PM
@PeeHaa ____-------____------____
 
@GourabNag Sorry I broke my php7 install yesterday :(
 
hehehe @PeeHaa actually i just downloaded php 7 the day before yesterday in my windows....
 
Not sure why it doesn't work anymore
 
@Jimbo can we autoload functions yet?
 
np... i would download it later then...
 
user3119231
12:55 PM
Lol is this an issue for bug tracker? I do try - catch 2 times. 1. try to create new PDO with just host username and password (I insert wrong username) - catch doesnt fire. 2. I create pdo with host, table, username, password - wrong username gets noticed and catch fires
 
@Maurice Code or didn't happen
 
user3119231
	try {
		//$db = new PDO("mysql:host=$safe[0]; dbname=$safe[3]", "$safe[1]", "$safe[2]");
		$db = new PDO("mysql:host=$safe[0]", "$safe[1]", "$safe[2]");
		print_r("everything fine");
	}catch (PDOException $e){
		if ($e->getCode() == 1044) echo("wrong username");
		if ($e->getCode() == 1045) echo("wrong password");
		if ($e->getCode() == 1049) echo("wrong database");
	}
 
user3119231
Enter key did not fired first attempt
 
Oh wait
yeah isn't that to be expected?
 

« first day (1944 days earlier)      last day (3000 days later) »