« first day (1503 days earlier)      last day (3445 days later) » 

11:07 AM
@ziGi He's right, you know.
I mean, sure it depends on a lot of things, but generally all electronic devices emit electromagnetic radiation
And you're almost always better off without it.
 
I do know that
 
Just build a faraday cage around your bed. Problem solved.
 
when you have a wire which has electricity passing through you always end up with electromagnetic lines around it
haha
exactly
 
@DaveRandom before commenting on the issue… I still think that the PSR cache interface is still overengineered and should use Anthonys proposal in his open letter. Feel free to use that one instead…
All you need is a ttl, so add it transparently in a child interface.
 
This is a part of a wp plugin I am changing the price calculation.
So for every day this calculation is made. But then I got dayprices. Is there a way to do 'night' prices.
Wich is the same as your booking period -1 day.
Because everything is in this foreach I cant accomplish the result I want.
 
11:15 AM
Hahaha, korting
 
;)
 
it is really funny to see half of the things in English half in Dutch mixed
 
$vk = vaste kost ;) = Fixed cost.
 
well I am not understanding the context here,
is a $day 24 hours or 12 hours and then you have $night?
 
> When a derived class overrides a method, if there is no abstract decl (either abstract decl in an abstract parent or a decl in an implemented interface) in the inheritance hierarchy then whatever signature you want can be used for the derived method.
ehhhh
 
11:17 AM
anyone know why I might not get parameters from a request (POST)... I can get everything else.
 
@iroegbu nothing was posted?
 
@DaveRandom also, if you split the cache layer out, I'd rather prefer that you return a Future instead of accepting a callback.
 
@bwoebi It has a bunch of stuff that we don't need though...
@bwoebi I will be doing that
 
@ziGi For a user without a discount and $vk this should be 50: i.imgur.com/LpKJDDP.png
 
11:18 AM
@ziGi ff shows data was posted... after that nothing
 
Now it's counted as 2 days, instead of 1 night.
 
@Ja͢ck Means that if there's no abstract method, or interface method, in the parent class, you can define the method signature how you want. (Basically, obvious)
 
@DaveRandom cache PSR? Yes, that's the issue with it.
 
@iroegbu so var_dump($_POST) is empty?
 
yes
 
11:19 AM
@bwoebi Oh you meant use Anthony's suggestion. Yeh, I'm game for that.
 
@iroegbu I am most certain that you don't post any data, check your request
 
@DaveRandom yes I did.
 
@Duikboot you are a bit confusing. Where in your code do you see that a $day is counted twice (as during the day and during the night)
 
@bwoebi kk cool, I've created the repo, I'll try and lift the current dns cache as-is into it over lunch and can refactor according to your suggestions from there
The fact that we don't have any async impls at the moment bothers me a bit
 
@DaveRandom well, that's why amphp is there :-)
 
11:21 AM
With memory/apc it's just a case of doing some Reactor->immediately
but with redis and memcache it needs a proper async protocol impl really
 
@ziGi it's AJAX, I'm using Symfony's HttpFoundation so, I can see other details of the request except the data sent
 
@Jimbo Yeah, but they're talking about "when a derived class overrides a method" ...
If there's no method in the chain, then nothing is overridden, right?
 
@Ja͢ck They mean a derived class method :P
 
ohhhh
dafuq
 
Or a derived class contains an overriding method
 
11:22 AM
@DaveRandom do you really need a Reactor->immediately() there? Just return a new Success($value); ?
 
Was it E_INDIAN?
 
@iroegbu check your browser developer tools go to the Network part and see what the request that is made sends, you should be able to see what POST data is sent with the request
 
I can see the JSON string I'm posting there
 
@iroegbu you are confusing me
 
@bwoebi So the problem with that is that it breaks the async model. There are case where code assumes (and should be able to assume) that the line after the (in this case) cache lookup request will be executed before the cache lookup result arrives
 
11:25 AM
1 min ago, by iroegbu
I can see the JSON string I'm posting there
 
The foreach loop is doing that? The loop is 'looping' all days and adds the discount for it... but I can't say -1 day .. because that is what I need to do for getting the nightly prices.
 
@DaveRandom why?
 
@iroegbu yes, I see, with what parameter name is it posted should be something like param: {...}
 
@ziGi imgur.com/zJiGGeL from Developer tools in ff
 
@DaveRandom you only get your result when you also yield the promise anyway.
 
11:29 AM
@iroegbu hm yeah, well I am not sure but I would try to var_dump($_POST) as a first line of the index.php to see whether the POST really has those params, if no than something strange is happening, if yes then apparently the backend deletes whatever is in the POST somewhere, but I can't tell you much more
@Duikboot Ah, I see your problem now, you want to take the previous $day value to extract some price from it
 
Indeed.
 
@ziGi still coming up empty... If I change method to GET it does work though
 
@iroegbu sorry I don't know what else to tell you
@Duikboot you should do something like this 3v4l.org/lLuVB
 
11:46 AM
@iroegbu you either have to parse the entries manually (from php://input) or add the correct header (form multiplart)
you will encounter same issue if you attempt to post JSON to php
 
@bwoebi Yeh I suppose that's true. I'm thinking in CPS at the moment :-/
 
@DaveRandom CPS can mean too many things… what exactly do you mean?
 
@bwoebi Continuous passing style
Which is the only thing I ever mean by it
What else does it mean?
 
ah ok
no, idea. I just googled for it and found too many meanings
 
11:49 AM
Found this programming gem from Reddit. http://t.co/tGXaDr1Ddg
6
 
@Jimbo lolwut
 
@Jimbo amazing such kind of troll
 
omg, welcome to 21st century overclock3d.net/articles/software/… .. then again, I suspect that OS X doesn't support those
 
@DaveRandom How comes I'm given write access there? (Not that I'd have a problem with that, just wondering)
 
12:06 PM
@tereško thanks... worked.
 
it was one of the things I had to figure out for implementing REST in my current project
 
Afternoon lovely ladies & gentleman
 
the solution was this in combination with this
 
@tereško Y U NO TYPEHINT
 
@iroegbu hm I didn't know about that but it is pretty useful
 
I'm here to receive some love
they told me PHP was the right place
could i be wrong?
 
@SecondRikudo because I am lazy and had had no time to clean it all up and write documentation
@MichaelDesmadril are you looking some BDSM or something exclusively homo-erotic ?
... or, if you have a question regarding PHP, you could actually start by asking said question
 
Excellent :D
 
please please please — Juan 3 hours ago
^^ killed me
 
12:23 PM
<?php // quert.php
require_once 'login.php';

//Establishing connection to host_database
$connection = mysqli_connect($db_host, $db_username, $db_password, $db_database);
if(mysqli_connect_errno()){
die ("There was an error during the connection/establishment" . mysqli_connect_error . "( " . mysqli_connect_errno() . ")");
}

//Query

$Query = "SELECT * FROM classics";
$Result = mysqli_query($connection, $Query);
if(!$Result) die ("Error during querry");

while($row = mysqli_fetch_assoc($Result)){
 
@bwoebi Because I don't see the point in you not having it, really, since it's something you use and know what you're doing with and can usefully contribute to
 
Catchable fatal error: Object of class mysqli_result could not be converted to string in E:\xampp\htdocs\db_connect\query.php on line 17
I think i'm trying to convert a integer into a string
not sure...
 
@DaveRandom I only indirectly use it via Aerys/Artax… But, no problem with that.
 
@bwoebi I was assuming you'd need it for the mysql impl...
 
and after this i'm in for some BDSM and pure homo-erotic peep-shows
^^
 
12:25 PM
@DaveRandom no, I go via rdlowrey/nbsock for that.
 
@MichaelDesmadril because $Result is not a string, therefore this is shit: echo $row["$Result"];
 
Aye, what i thought
what could i be using as a result?
 
@bwoebi Ahh OK. Screw you then :-P
 
@DaveRandom so, the dns is completely abstracted away from my mysql lib.
haha :-P
 
Meh, I'll leave it there, it's not like you're going to break shit
 
12:26 PM
@MichaelDesmadril dunno, write var_dump($row); there and see what the row contains
 
hi who here is using laravel?
 
@DaveRandom there's no point in reinventing the perfect wheel, for me.
 
@tereško gives me the array
 
@bwoebi E_NOTHING_IS_PERFECT
 
hmm ... Don't Starve is on with -75%
 
12:27 PM
Entire Valve collection is on for 23€ aswell
woop woop
 
@MichaelDesmadril empty array or array with keys and values ?
 
@tereško Keys & values
full of them
fetch_result?
 
well ... then see what key you need and use that instead of $Result
 
@DaveRandom lim n->∞ 1/n > (perfect - perfectness of rdlowreys repos)
 
eww, maths
 
12:29 PM
@tereško But whats the use in using mysqli_fetch_assoc compared to using , mysqli_fetch_row($result)?
 
@DaveRandom yeah, doing my maths homework right now :-P
 
isn't the assoc taking the table names along?
now i have to write them down
 
@MichaelDesmadril dunno, I am using PDO
 
ah, k
PDO > Mysqli?
 
@bwoebi haha surely there must be a much easier way to express how perfect rdlowreys repos are :D
 
12:30 PM
while($row = mysqli_fetch_assoc($Result)){
    echo $row["$Result"];
}
 
@MichaelDesmadril fetch_row() probably has also the numeric keys
 
@ziGi yeah, just "perfect", but when nothing is perfect, it's what approximates perfect the most.
 
What are you expecting that to do @MichaelDesmadril?
 
Well, now i'm doing a loop where i take row per row echo'ing out echo "Name: " . $row[0] . "<br>";
but if i read correctly, an assoc fetch is taking the names into the array?
 
@tereško Same convention as ext/mysql (row -> indexed, assoc -> associative, array -> both)
 
12:32 PM
@DaveRandom Gives a conversion error
 
@bwoebi so is your statement suggesting that people should learn from rdlowrey's master works?
 
@MichaelDesmadril Yes, it will. I'm asking what you are expecting it to do though, i.e. why you wrote that in the first place.
 
@bwoebi /s/repos/tan/
 
Specifically, what data are you expecting to be output from echo $row["$Result"];
 
@ziGi that definitely :-P
@JoeWatkins pfffz, who needs to be tanned…!
 
12:34 PM
@MichaelDesmadril in my humble opinion: yes, PDO is better
@DaveRandom I havent used either on for ages
 
I'm hoping never to use MySQL ever again so... yeh
 
@DaveRandom Why?
 
Because it sucks
 
something something async, postgress something something ...
 
@DaveRandom so what do you think is a better alternative?
 
12:36 PM
@JoeWatkins From the PoV of the sanity of the DB engine, async is just a nicety, you could do that with MySQL (Bob is, in fact)
 
@ziGi postgre
 
Nov 17 at 17:48, by DaveRandom
♥♡❤ PostgreSQL ❤♡♥
 
it has always been the superior alternative
 
I've heard many good remarks about Postgre
 
Why would mysql be bad?
 
12:37 PM
because it is extremely limited
 
is it?
depends on who and what its purpose is
 
It's not actually bad, I suppose, it's just crappy when you compare it to Postgres
 
Maybe...
but its nice with PHP
 
PHP doesn't care
 
@MichaelDesmadril It really isn't, it's just popular
 
12:38 PM
Is that the reason you work with PDO?
to combine difference db's?
different*
 
The reason to work with PDO is that it's better than mysqli
 
sitting at a clients place, written a tutorial on how to use the program, gone over the entire program wih the client.. drive to the office.. 2 mails asking how something works :D
 
In the context of mysql, anyway
It's also better for odbc and sqlite
 
And what is your opinion on HiveQL
 
and probably mssql
 
12:39 PM
I use PDO because it has named parameters and better naming convention in API and supports multiple databases
 
Although I've never used sqlsrv
 
lol, how does someone actually even start to learn a language nowadays...
 
dunno ... it's kinda hard to find good materials for beginners
 
you have Mysql...used by many, Mysql is getting old so they tell you, use Mysqli or PDO.
now, Mysqli & PDO aren't the best options to some ;)
you just get thrown in there
i bought a book about php-mysql
 
that was your first mistake
 
12:40 PM
The multiple back-end support is a red herring, IMO. There are very few applications that use support back-ends, and those applications have many layers of abstraction between the application and the db driver
 
@MichaelDesmadril problem is schools don't follow the evolution of the programming language..
 
the problem is...
 
It's not like I can take every piece of SQL that I wrote for mysql and run it on mssql
 
don't buy books which claim to teach more then one thing, @MichaelDesmadril
 
12:41 PM
heh
 
Hey....lets make another language
that does 0,2% more than the old language
but lets make it a total different code
 
@DaveRandom Will you shit off with postgre-sql stuff :P
Actually I think you should do a phpnw talk on it
 
@DaveRandom I'd like to later unify our APIs for pgsql and mysql into some PDO-like wrapper. What do you think about that?
 
@Jimbo I might look at putting one together in a few months
 
I've been a developer/designer for years now...but never did php & sql, we had a different department for that
i just did the desiging
now...when you take a course or buy a book
 
12:43 PM
my condolences
 
lets start, Mysql :D
 
@bwoebi The MySQL stuff you're working on - did you look at MySQLND plugins at all?
 
an old guy appears who fucking started in Turbo Pascal ^^
who is going to explain me the inner secrets of Mysql & PHP
 
@MichaelDesmadril OK so... if you are working with PHP and MySQL (and I'm not telling you not to do that), start with PDO. It has a nice simple API that's easy to use. That does not mean that mysqli is not still useful though, as there are some things that it can do which PDO cannot, but you definitely don't need to do those things, and by the time you are writing an application in which you do need to do those things, you'll already know that you need mysqli for it
 
I started in Turbo Pascal :'(
 
12:44 PM
then...i'm writing my code and someone said...Your code is decapr.
NOt all old guys who started in Turbo Pascal are bad ;)
 
.. you're not helping
 
@tereško same here
 
I am 24, am I an old guy ?
 
@Danack why are you linking me to PHP manual? You mean the different ways in dev.mysql.com/doc/internals/en/authentication-method.html ?
 
12:45 PM
yes
 
@ziGi Dude, that's like, nearly dead
 
30 is dead
 
/me hides birth certificate
 
Your ready for a home
 
12:46 PM
"Life begins at 30" - tell yourself this to remain optimistic
 
@DaveRandom are you the Grim Reaper than?
@Jimbo 33 was Jesus age?
 
I turned 30 last week
WOOP, life starts now!
 
No, as you can see from my avatar I'm actually 3
 
@MichaelDesmadril Man, that's almost pre-historic
 
12:46 PM
@DaveRandom At least you act like a three year old :P
 
Have i told you i once knew Jesus?
 
@DaveRandom you are 1E
 
@MichaelDesmadril .. selling burritos ?
 
He told me, be prepared to get loads of shit in your face...learn something, be good at it, and once your good at it, it will be old and something new will be there
 
@bwoebi My understanding is that you're doing stuff in userland to communicate with a MySQL server. I was wondering if you looked at the MySQLND plugin stuff to be able to re-use some of the code that already works to talk to the server, and so you just have to add async capability.
 
12:48 PM
He didn't sell burritos...but he did show me something with fish...
 
@Danack You linked me to a C API. What should I do with that in a plain userland impl?
 
could it be
 
@bwoebi it has allows you to hook userland stuff into the connection calls etc. This bit of it pecl.php.net/package/mysqlnd_uh - (thought that was the documentation for it, but the documentation seems to be hiding).
 
anyway, what is your question ?
 
12:52 PM
@Danack yeah, I didn't want to introduce an extension dependency…
 
Hello All
 
M'kay. I was just wondering if you'd looked as it seems that it could save a lot of code (theoretically). And it would be nice to have that extension in the PHP distribution if it actually works.
 
@Danack there is a big flaw in the mysqluh for me. it requires the connection to be initialized in the ctor, which is a no-go.
 
@bwoebi Stick a lazy wrapper on it....not a problem?
 
12:56 PM
no possibility for me to yield something back to the event loop.
It doesn't provide any possibility to return Futures etc.
 
Hello @BhavikPatel
 
Is the change to PDO hard?
 
It's not wrong for things that require a connection to do it in the constructor to make the class not be subject to 'connection not existing' errors. If you want it lazily connected, just make a lazy wrapper.
 
@MichaelDesmadril nope, it is very easy
 
but i don't want to start using other peoples code
like use this, paste there
 
12:58 PM
Sure
 
i want to write my own, login, database, etc...
 
i want to fetch contacts from any email. User will provide their username and password.
 
only thing, not much info about PDO around
 
It is quite easy to grasp.
Are you familiar with using objects?
 

« first day (1503 days earlier)      last day (3445 days later) »