« first day (1745 days earlier)      last day (3425 days later) » 

01:01
Space
The final frontier.
01:52
lets go to space
02:07
@RonaldUlyssesSwanson i guess some people figured out how to use earths energy to send anything to space i.sstatic.net/NxCvL.jpg
02:23
that i believe is the wrong direction
02:46
@RonaldUlyssesSwanson You win like, seriously, a bajillion intarnet points
Guys, can I ask for advice on SO, or is it just for Questions and How-Tos ?
I want to Ask this : prestashop.com/forums/topic/…
SO is more for questions on solving specific problems.. not really for opinions
@Pedram See here
03:24
k Tnx
 
2 hours later…
05:44
Hey, guys. Can anyone help me with PayPal IPN? I'm receiving a blank POST from IPN. Here's the question: stackoverflow.com/questions/31606715/…
06:25
hi
anybody there?
@BasitSaeed I don't understand how you've determined that IPN isn't working. My understanding of IPN is that PayPal sends a separate HTTP request to a designated URL with information about the transaction and you're required to resend the request information back to PayPal to confirm. The redirect that happens from the Buy Now button would be something that happens in parallel to this step.
anyone can help me... i am really in problem while working on quick chat.?
@Sherif I've done all that, as described in my question. My designated URL receives an empty POST from PayPal.
@BasitSaeed Well that still doesn't answer my question. My question was "how you've determined that $_POST was empty".
@Sherif and for that reason, I can't proceed with posting that information back to PayPal with a cURL request. I have tried enabling 'php://input' using 'ini_set("allow_url_fopen", true);'
I dumped the POST I'm receiving from PayPal.
@Sherif As per PayPal's IPN code sample (https://github.com/paypal/ipn-code-samples/blob/master/paypal_ipn.php) This is what I'm doing:
$raw_post_data = file_get_contents('php://input');
$raw_post_array = explode('&', $raw_post_data);
var_dump($raw_post_array);
06:32
@BasitSaeed allow_url_fopen allows you to use a URL in something like fopen or similar functions. It really wouldn't have anything to do with cURL since that extension is specifically designed for dealing with HTTP.
@BasitSaeed Right, but how would you ever see the var_dump since the request would never come from your browser?
moin
That's what I'm asking.
var_dump sends output directly to STDOUT. The IPN request will come directly from PayPal's servers. You'd never see the output unless you logged it somewhere that you could go back and check later.
@Sherif I'm not reaching the cURL part. Some servers disable php://input and ini_set("allow_url_fopen", true) is supposed to get around that, no?
Yeah, I thought of that too and tried saving it in a log file. That's empty, too.
@BasitSaeed No, that's not what allow_url_fopen does at all. Read the manual on what it does here php.net/manual/en/…
@BasitSaeed How did you try saving it to a log file?
@Sherif log_message('debug', $raw_post_data); --> empty
06:37
@BasitSaeed Where is the code for that log_message function?
What does it do?
@Sherif It's a codeigniter funciton. The log function works if I just put hard-coded string in it.
@Sherif Basically it creates an entry in application/logs/ directory.
@BasitSaeed That's precisely what I'm insinuating. It's possible that function doesn't accept an array, but only strings. In your example code above $raw_post_data is an array. Which is exactly why I'm asking for the code, to determine that for sure :)
@Sherif $raw_post_data is a string. It is what file_get_contents('php://input') is returning
@BasitSaeed I see. You assign $raw_post_array as the array. Well, I'm sure PayPal offers you a way to send a test to your postback IPN URL. Why not try that and if the result is the same try a simpler test by just sending a POST request yourself directly to that URL and see if it logs anything.
Using var_dump() there will undoubtedly break the IPN ping back.
@Sherif Done the latter. Sent a sample POST using postman and it was dumping the data/logging it.
06:44
@BasitSaeed Hmmm, do you if PayPal specifies in their documentation anywhere what Content-type header they send in the request?
@Sherif I just tried IPN Simulator and it seems to be working fine. I seem to be reaching if (strcmp ($res, "VERIFIED") == 0) on Line 106 here github.com/paypal/ipn-code-samples/blob/master/paypal_ipn.php
I don't know what that is specifically, but how else were you doing it that it wasn't working at all?
@Sherif According to this developer.paypal.com/docs/classic/ipn/gs_IPN my function is supposed to send a cURL request with Content-Type: application/x-www-form-urlencoded header. PayPal then matches it to check if it was tampered with. I'm assuming that's what they use at their end.
@Sherif It was failing when I integrate a Buy Now button in sandbox environment and perform the flow that way instead of using the IPN Simulator.
@BasitSaeed I'm not referring to the request your script sends back to PayPal, but the IPN request PayPal sends to you.
The reason I ask about the Content-type header PayPal is sending, is because with certain content types, like multipart/form-data, for example, PHP will not have the input stream available to your script. However, $_POST will be populated correctly, which is why that's the recommended way to read the POST body of the HTTP request in PHP.
Clearly whoever wrote that PHP code doesn't know a lick of PHP.
@Sherif I didn't see that in the documentation. However, I tried to use $_POST and it was empty as well.
Ha! It's on their own GitHub account! :)
06:50
@BasitSaeed I'm suspect of how you determined it was empty since your initial response to me was that you used var_dump and that your log_message function only accepts strings.
yeah. I just used json_encode($_POST) in CodeIgniter's logging function.
omg, got rebecca rolled !
@BasitSaeed That doesn't really speak volumes of its worthiness. There's plenty of bad code on Github.
@Sherif But it coming directly from them does
Clearly not
I guess whatever you're doing in the sandbox might be the problem since it works in that simulator thing you're referring to.
Maybe comb through their docs a bit more to try and figure out why.
Doesn't look like PHP is your problem from here.
06:52
I'm not doing anything in Sandbox. The code's same. Just the request to my function comes from the sandbox button instead of a simulator.
Yeah. They're pain to read as well. But I don't see any other option here as well.
Right, I didn't mean something that you specifically did, but that it works differently somehow.
@Sherif Thanks for your help! I'm diving into their documentation :)
Maybe check API keys, authentication tokens, etc??? It's possible the sandbox has other restrictions?
I have no idea since the last time I touched PayPal IPN was about 6 years ago.
@Sherif No, this method just requires a merchant account. There was a problem there, it wouldn't take me to the sandbox payment page -- happened before in a different project with a different account.
I don't know. I'm just guessing at this point. It's PayPal, so who knows what nonsensical voodoo wizardy they use.
06:56
@Sherif Tell me about it. I have to test the entire thing rigorously because it's the matter of customers paying actual money.
The point is you have but to narrow down the problem from here through trial and error. Find something that's different between the sandbox and the simulator thing (whatever that is) and see why one works and the other doesn't.
More than usual, I mean. I tend to do unit and integration testing a lot.
Yeah, I'm on it. Trying to fiddle with the POST request sent by the simulator.
Good luck
@Sherif Thank you. And thank you for the help.
posted on July 27, 2015 by kbironneau

/* by Dpz */

07:13
good morning
Guys , what are these in a bash ? "<% %>"
07:25
is there a way to add the fields using setParameter ?
07:36
good mornin
07:53
I understand the concepts of the OOP, Classes, Abstarct Classes, Static properties and functions, Interfaces, Constructors, Destructors, Inharitance. But the problem is how can I solve a Problem in OOP. For example, I create a calculator in procedural programming, it's ok for me to create as many functions as I needed like add, subtract, multiply, , division, square etc. But when convert it in OOP, there is a bit of confusion due these possible solutions:

    Create an abstract class with a function calculate which takes two int parameters,each class will implements that class and defines 
@M.KhuramJaved 'class Addition extends Calculator' nope
Avoid 'extend' whenever possible. Composition > inheritance
so ... have we seen the web server written in assembly ?
this seems way over the top ...
I can't imagine worse code to work on ...
@JoeWatkins Is that a challenge?
They're either genius or......not genius.
I wonder how people are meant to do code reviews on it, to check for backdoors.
08:09
can we even see a real world advantage in that ? is static content really the bottleneck to more throughput anyway ?
it surely isn't ...
@JoeWatkins There are people that still write such software in assembly?
@JoeWatkins I stopped reading at "compete with the likes of nginx"
Sounds like a support play, honestly. Clearly job security there in having written in x86
I mean who wants to fix a bug in assembly code, let alone debug one, unless they're getting paid exorbitant sums of money.
Anonymous
Mornin o/
Mornin :D
There's a typo in the first paragraph of that rwasa site
But we're expected to trust their assembly code
If for example I have a language selection on a form. Rather than keeping that list of languages in a DB I just store them in an array (or something) somewhere. Where would you put that file and how would you include it, where in the model at least?
08:47
@Fabor I tend to have just a data directory outside of the normal src dir and just have it return an array of stuff...you can then load it with:
$injectionParams = require_once "injectionParams.php";
anywhere it is needed. I'm reasonably certain that doesn't have a performance hit.
> where in the model at least?
I'd load it via a delegate function that returns an object e.g.
Cool thanks.
function createLanguageList() {
    $languages = require "data/languages.php";
    return new LanguageList($languages);
}
$injector->delegate('LanguageList', 'createLanguageList');
That rwasa reminded me that steve gibson (well known security expert) tends to write all his software in assembly because that way he knows exactly what it does. He even has a page up describing how to write windows gui applications in assembly (so they are only kilobytes in size). grc.com/smgassembly.htm
09:11
Did you guys see this patent for indexing a DB based on a date field? :P
@JoeriSebrechts if you are a murder investigator you probably have never slept in a house with an open window, and don't bother with a wife, just a large pile of weapons in the bed next to you at night ... that doesn't make it sensible ...
i don't actually think it's a good idea to write this stuff in assembly, but i wouldn't assume the software is bad or hard to debug because it's written in assembly. it all depends on who is writing it, you need to be the right kind of crazy to make it work.
devil's advocate: what if by having the codebase in assembly you are selecting for the sort of skill needed to write a secure web server (because you really have to understand what the code is doing after compilation)?
counter-argument: if the number of bugs per 1000 lines of code is roughly fixed for every programmer regardless of language (and there is evidence this is true), then to reduce the number of bugs you need fewer lines of code, hence a higher level programming language
@JoeriSebrechts Or less programmers :)
same argument basically, being able to write the same code with fewer lines means you can get away with fewer programmers
09:29
@Fabor Yes
@JoeriSebrechts In a world where technology is constantly evolving and highly skilled engineers are rare and hard to employ, I would say there is very little objective reasoning to want to build at such a low-level. You can always find clever ways to make something faster. The real question is does anyone actually want/need it.
I mean if they found a niche market where serving up static content is truly a bottleneck that can't better be solved on the vertical then great, but otherwise, these are solved problems and you really wouldn't want to over engineer them unless your intention was to make money off the support.
You gotta learn to recognize the marketing hype vs. the actual technology value people present in web servers these days, because realistically it's a very tough market to make money in.
ThW
ThW
09:50
Morning
@PeeHaa It was developed by @RonniSkansing from here
@MadaraUchiha Read a couple of lines up
@PeeHaa I refuse.
Jul 22 at 13:34, by Ocramius
Wasn't there an awesome "uninstall" plugin?
09:52
Jul 22 at 13:35, by PeeHaa
@Ocramius Yeah by the great @RonniSkansing
@PeeHaa the unistall plugin banner is just fantastic. i wonder who is the handsome man who designed it
Can I send feed back form in mail itself only
@prashanthi I don't know. What prevented you from doing it when you tried?
10:06
is it possible to do the task
@prashanthi Did you find it impossible to do so when you tried doing it?
yeah..but i saw same thing in tcs webmail
@prashanthi Yes, you found it impossible to do so?
thank you!!
You're welcome!!
No idea how thank you was an answer to my question, but hey at least you were excited about it :)
10:40
lol, I just love when bugs make something even more awesome: grunt for php
@SergeyTelshevsky hmm?
I don't get it.
10:57
"here's how I use", then blank?
Yea, but how's that a bug? For all we know it was intentional.
first I thought the same, but view source
oh
Maybe he was intentionally trying to be funny?
every time i try to use monads i think - how is that better than if{}s? - not so sure it's because of lack of closures in php :\
11:01
mo' nads
2
lol
my nads! ouch
ping @PeeHaa
ping @Baba
hey a wild @Baba!
I was just wondering you were still alive last week
@Danack hi
@PeeHaa stackoverflow blocked my IP ... over almost a year ...
11:13
WTF?
@PeeHaa i even sent them a mail ... no response
Assholes
@PeeHaa good to see u .. you owe me a lot of beers
@PeeHaa $totalBeerDept = PHP_INT_MAX ** PHP_INT_MAX ** PHP_INT_MAX ;
lol :)
How's SOless life for you?
@JoeWatkins ... ping
11:15
How did you get any work done?
@PeeHaa it was fun ... busy developing applications in golang
Anything public / in the wild?
@PeeHaa worked on Insurance project in PHP too
@PeeHaa Certificate expired but it works :) capvalve.com/web
cool
@PeeHaa I can give you my password if needed :)
11:18
Looks cool
@Baba neh screenshots are looking cool don't want to spoil it :P
@PeeHaa Not done yet .. so there is a lot of comments in the in the source ....
@PeeHaa let me get you a long in information one sec
Can't even remember how to do private chat again .... hehehe
IIRC: you can't
But we won't judge your secret love affair if you and @PeeHaa wanna discuss it here :D
11:24
@tereško hello, how's your "vacation"?
@tereško 'I probably hate you' :)
@SergeyTelshevsky good. I understood how game loop has to work for stable game speed at any framerate
@tereško looking forward to move away from web development?
nope, still using javascript for this
when are you going to go fulltime again?
11:28
@SergeyTelshevsky I am aiming at September
.. ish
found something already?
haven't looked for
ping me when you will be, maybe you'll want to join us :)
heh, maybe
though I might have some questions for you then
@Baba were you in some blocked range?
11:41
@bwoebi ... No explanation till now .....
@tereško sure
@bwoebi How are you doing ?
@Baba life goes on… But not that much changed except that I've nearly finished my first year of university…
@bwoebi congratulations .... have also seen your contribution to php as increased
Anonymous
@chozilla I was on Friday but you weren't ... stood up me thinks..
11:46
@Jay yea it was kind of a long week
@Baba true… I'm trying to become a core dev ^^ still not knowing enough… sure, I'm probably one of the 10 people with most knowledge of the engine, but still failing to know enough side-effects to introduce less bugs when fixing bugs ^^
but i uploaded the first forum code-draft
@Jay do you want a new game?
@bwoebi cool .. well done .. you would only get better with time
@bwoebi could not stop laughing when i saw this:
good mornings
Anonymous
@chozilla When are you next gonna be on after 6 ? UK PM.
11:51
I do not know today. I kind of stay online untill 1900 gmt
Anonymous
alright, will see if i can catch you when i'm out of work
@Baba I'm wondering whether we should trigger an E_WARNING if using too big ranges…
good evening
@Jay ok but i have no clue on what to show you since it is really a game where you need a group of people
Anonymous
@chozilla Are you saying I have no friends?
11:56
@bwoebi at least or better sill .. change the behavior as suggested in bugs.php.net/bug.php?id=63174#1437000589 (Note since 2012)
no, but it is also not ready to play yet so maybe to really play it you wait and just now have a small look at it.
Anonymous
@chozilla I was joking :P Yeah, sure sounds good. Looks awesome up to now though.
@Baba fixing the behavior isn't really an option I think, as it'd break every mt_srand().
@bwoebi I was thinking php7 is a clean slate (kind of) ... and since it so many people depend on mt_rand .. it should be able to fly
@Baba Nah, we're not trying to pull a python 3.
@bwoebi lol ....
@Baba, @bwoebi I would be a fan of a Random Sequence Object to get rid of the global state of mt_rand()
@bwoebi What do you think about just forbidding ranges outside of mtrandmax?
@NikiC may i ask a question about what mt_rand() is in terms of a php-Feature?
@chozilla not sure I get what you mean there
12:06
@NikiC what happens when the its outside mtrandmax ??
@NikiC: I use it to generate large sequences of predictable numbers but i guess everyone else wants to get some random things.
Good afternoon everyone (London).
@NikiC thats why I use this and not mt_rand since it always screws me up because of the global state. -> gist.github.com/chozilla/f56bc882f52859c0bf20
@DaveRandom Good Morning .. long time :)
12:09
I have a simple enquiry regarding PHP, MySQL and AJAX; if you are willing tell me whether or not this is a good or bad idea.
Very, simple question: Would it be a good idea to make a social network on one page and access other pages such as Profile, Main Page, Settings, Login page using AJAX to load the content
Morndom
and inbetween, use CSS and Javascript transitions to smoothly animate between pages?
i.e. the sign in div element transforms into the users profile and then the users profile is loaded into this said div?
@Matthcw I think you may be asking about Single Page Applications (SPA)
For the record, it's not about hosting children's birthday parties
Indeed,
user924016
12:11
Mornings
@NikiC we could forbid it, but not sure if we should.
> [–]postmodest 12 points 2 days ago
Ah, but it uses 32 bit integers even on 64-bit platforms to ensure reproducibili--wait... oh goddammit, PHP
@Fabor thank you very much for that link
@SergeyTelshevsky what is there to reproduce in random numbers ?
I am just getting to grips with this and that makes a lot of sense to me.
12:12
@Matthcw It's subjective. I personally don't think SPAs should be normal websites. Gmail is an example of an actual SPA.
Keyword "application"
So, you're saying that it wouldn't be very good to make a social network as an SPA
@bwoebi what do people use mt_rand() for?
emphasising on design and art
@chozilla to get numbers which mustn't necessarily be cryptographically secure?
@Fabor emphasising on the art, design and UX
12:15
Still a nope from me, but as mentioned, it can be considered subjective.
@Matthcw It certainly used to be the case that people would forever be saying that you should build a site for the basic functionality to work without AJAX first, and then add it as layers over the top. These days I don't think that's so much the case, it's perfectly reasonable not to support people with useless browser configurations. I would personally say that you need to look at each element individually and weigh the costs and benefits for making each individual function AJAX-powered.
@bwoebi is mt_rand cryptographically secure ?
TL;DR there's no simple answer
@Baba don't know, actually
@Baba How you doing?
12:15
@bwoebi so why does it use mt19937 for that and not something simpler?
Alright, appreciate your input @Fabor !
@Baba no.
@DaveRandom am not bad ... how is your kid going now ...
He's fine, me not so much, had a house full of children all day yesterday and am now essentially dead.
@bwoebi What do you think about what @NikiC said .. '@bwoebi What do you think about just forbidding ranges outside of mtrandmax?'
12:17
6 mins ago, by bwoebi
@NikiC we could forbid it, but not sure if we should.
@DaveRandom I definitely agree with what you said, I'd also like to add security into the matter, would such a website be as secure as if it did NOT use one page for all content?
@Baba might break apps. I think an E_WARNING is more appropriate.
@bwoebi that mean a lot of E_WARNING would happen in production ...
@bwoebi Alternatively, if range <= randmax use currentl implementation if > do it properly
Yes, it will break the seed sequence, but only in cases where you're currently getting garbage...
@Baba one can easily disable them.
12:19
Please! do not break mt_rand anymore! (it is unusable already)
@NikiC that's okay too, I think.
okay, I'll implement that later
@NikiC cool
@NikiC can we please force -Wno-unused-result when compiling?
But actually, it would break the sequence whenever an mt_rand is used with > randmax, not only for the particular value
@bwoebi no
just fix the code...
12:21
@NikiC why? Is that warning in any means helpful?
and if it doesn't need fixing use ZEND_UNUSED_VALUE
@NikiC there's no such macro?
@bwoebi The warning is usually correct, even if the conditions that would trigger an actual failure are rare
@bwoebi ZEND_IGNORE_VALUE
@Matthcw Red herring. Security is not really affected by this, you're still making HTTP requests and executing code on the client and the server regardless of how it's architected.
@NikiC okay… adding them then. … :s
12:24
@chozilla Why does it break it more?
For your use-case (which is not using it :D) nothing changes :P
@NikiC I wrote a unit-test with mt_rand and a huge generated data structure ;)
not a single developer in the team understood why the test actually worked...
@chozilla Does the data structure have more than 2^31 elements?
@NikiC no but it would not be a problem. since 2^31 is the range and not the number of times you can ask the generator.
@NikiC well, it's always write() and asprintf() where it triggers. :s
when something fails to be written to stdout… it fails. I can't do anything about it.
@bwoebi Yes ... so if you have an OOM condition and asprintf fails you crash
12:30
@NikiC if I have OOM, many other things will crash too.
@DaveRandom haha thanks for clearing that up for me, I'm about to take over facebook. catch you guys later!
I believe mt19937 was invented to store pokemon in a memory friendly way.
@NikiC Also… do we ever have OOM on modern systems?
@bwoebi no, they don't. if they do it's a bug
@NikiC I mean… like nearly everything directly calling malloc()?!
12:32
@bwoebi Everything calling malloc needs to check the return value, obviously
user924016
@DaveRandom lol @ linkedin
Or else use an infallible allocator, like emalloc
@NikiC It should …… but who does that?
@bwoebi Everyone...
@NikiC AHA?!??
user924016
12:32
I am guessing someone did that to you
@RonniSkansing ?
I never actually use it, what's going on with it?
user924016
Chris has added the following comp ..

Internal Investigations
Fluids
Tantra
Urinalysis
Tower Erection
Sheep
hehehehe
@bwoebi People writing php-src code are a bit too used to doing allocation without checks and don't always check malloc return values. But if you look at any of the C library code we ship, it will be checking malloc returns everywhere.
I find that interface pretty clunky anyway, never been sure how to use it properly, certainly pretty sure it's not particularly useful for anything other than as a way for me to ignore recruiters all in one place rather than having to ignore them one at a time through various channels.
@RonniSkansing Ahh yes, @Jimbo and I had an endorsement war a few weeks ago
user924016
12:36
ah
user924016
Made me lol
@NikiC yeah, well. Question is still: do we ever have OOM on modern systems?
@bwoebi sure
I've never encountered malloc() returning NULL on todays systems…
user924016
I guess you can write skills like Tower Erection and sheep.. but CodeIgniter.. would not be okay
12:37
If you disable memory_limit and create a large structure you'll get an OOM
Do you think developers waste more coffee than any other coffee swilling profession?
@Gordon will you be able to use Rust in any practical setting?
@NikiC oh, indeed.
But I get a message like php(72361,0x7fff7a63e300) malloc: *** mach_vm_map(size=5076964154930106368) failed (error code=3) too… which explains what happened.
@tereško I can create passwords with it. Ain't that practical?
12:42
@Gordon Because you are now the man of steel?
@DaveRandom parts of me sometimes are
@Gordon that's not what I meant an you know it.
@tereško well, what's a practical setting for you?
"a project which you are paid for" seems like a good start
I certainly won't be able nor do I want to use it in a commercial setting. Simply because I am still pretty much clueless about Rust despite my little hackery there.
whether Rust will become a serious contender for anything I cannot tell
12:48
@Gordon I... uhhh... that's what she said?
@DaveRandom you wanted to know so dont complain about TMI now ;)
I was envisaging a flying man in a cape and what did I get?
@Gordon That looks non-idiomatic
You're creating a String for every char and then appending it
@Fabor I can't tell you how many times I've seen people dump what must have been a kilo of coffee grind into the coffee machine only to throw away what must have tasted like dirt and start all over again.
@NikiC I am open to any suggestions. I didn't say I know what I am doing ;)
2
12:58
It's like... you don't need THAT much coffee to get caffeinated people!
@Gordon I've never written Rust code, but I'd imagine you can do something like (0..length).map(|_| rng.choose(&choices).unwrap()).collect() into a String
let me try

« first day (1745 days earlier)      last day (3425 days later) »