« first day (2249 days earlier)      last day (2699 days later) » 

Wes
12:16 AM
knock knock
2 centuries later…
 
@Wes who's there ?
 
Wes
someone that waited for two centuries for someone to open the door -__- :P
 
12:58 AM
anyone here?
 
Wes
yo
 
yo
where to begin...
any recommendations for a good PHP boilerplate / miniframework for a good head start for a project ?
I am reading stuff about slim right now
 
no I didnt
thanks I will read that @Wes
oh .. PHP 7
 
Wes
if i wanted to use a framework i would go with symfony/silex most probably as it seems the most used
 
1:11 AM
truth is I dont know what to do...
I don't have a lot of experience in PHP development, I am a front-end guy but I am in a very bad position right now
 
Go with PHP 7.
 
I've got an existing project written in PHP (really badly coded) and I want to remake it entirly
 
@Sara ... not sure what you mean. I think foo(_, _) should be valid, as should foo(_, '1', _).
 
Wes
reading that tutorial on github is useful even if you decide to use a framework, though
it's a good start to understand how things are wired together
 
alright
 
1:18 AM
@LeviMorrison I don't meant repeated use of a single arg. I mean allowing the use of more than one call-time arg.
 
It's not the same arg.
Every blank is a new arg.
 
Ah. What about being able to reorder the args?
e.g. $f = foo($2, "blah", $1);
 
I don't care to reorder personally.
I'd rather leave that for short closures: |$a, $b| foo($b, 'blah', $a)
Which hopefully pass, right?
 
Well, by that token, short closures can fill the partial functions niche
|$_| foo($_)
 
I mean maybe
But I don't think completely.
It's still extra noise when combined with pipe.
 
2:00 AM
pipe(
    $input,
    filter($pred, _),
    map($m, _),
    join(_)
);
pipe(
    $input,
    |$_| filter($pred, $_),
    |$_| map($m, $_),
    |$_| join($_)
);
 
 
1 hour later…
3:22 AM
I think if we got this actual syntax it is liveable.
But this... not so much:
pipe(
    $input,
    ($_) ==> filter($pred, $_),
    ($_) ==> map($m, $_),
    ($_) ==> join($_)
);
 
Wes
is pipe() actually what you are proposing?
i'm a bit confused :B
 
pipe is just a function.
Sara is working on partial function application with _ (or maybe it will be spelled $$)
 
Wes
got it now :B
i don't like _ tbh, $ would fit php perfectly instead
or also $$ iirc there was a problem with one only
 
A blank has precedence in other languages.
It's literally "fill in the blank"
 
Wes
yeah, scala i think? but i think $ would look great for php
 
3:38 AM
pipe(
    $input,
    filter($pred, $),
    map($m, $),
    join($)
);
 
Wes
no? looks great to me :P
filter($p, $input) |> map($m, $) |> join($)
i'm not sure about |> instead. i'd like it to be written without surrounding spaces, like ->
filter($p, $input)|>map($m, $)|>join($)
^ but this looks odd
filter($p, $input)_>map($m, $)_>join($)
^ this less
(that's the opinion of someone that never used it in other languages)
idk, if you get used to it |> looks ok maybe
filter($p, $input)-->map($m, $)-->join($)
 
3:59 AM
Hi
Can I ask a question of javascript ?
 
morning
 
Good morning
 
4:18 AM
Morning
Please help me with
0
Q: How to add Leverage browser caching for CDN in .htaccess?

Ankit ShahI have below code in my .htaccess ExpiresActive On ExpiresByType image/jpg "access 1 year" ExpiresByType image/jpeg "access 1 year" ExpiresByType image/gif "access 1 year" ExpiresByType image/png "access 1 year" ExpiresByType text/css "access 1 month" ExpiresByType application/pdf "access 1 mo...

5
Q: Paypal: PHP SDK Error Incoming JSON request does not map to API request

Ankit ShahI'm using PHP Paypal SDK: https://github.com/paypal/PayPal-PHP-SDK Referred PayPal REST API through PHP SDK return "Incoming JSON request does not map to API request" In continue with Paypal How to get Payment Id on basis of Transaction Id On basis of already available Transaction Id, Need to ...

Thanks
 
morning @Jeeves
 
@Akshay Did you sleep well?
 
Yes @Jeeves Did you sleep well?
 
@Akshay Very well, thanks.
 
@Jeeves go sleep more now.
 
4:29 AM
@Linus Can't. I have to be up in 1 hour.
 
Wes
ok jeeves is quite creepy now :P
 
morning all
 
Wes
\o
!!anmol
 
I used to hate facial hair, but then it grew on me
 
lol Wes
@Jeeves who is anmol?
 
4:44 AM
@Linus I don't know an Ana.
 
Wes
@Jeeves do you still like Laravel?
 
@Wes Yes. You are very plesant to talk to.
 
Wes
@Jeeves you are a monstrosity
 
@Wes @⁠jeeves No you are a monstrosity
 
Wes
#fail
 
5:24 AM
@Jeeves Do you like @wes?
 
@Akshay I don't like you.
 
@Jeeves lol
 
@Linus No lol.
 
@Jeeves yes lol
 
@Linus No but I like sausage pizza.
 
5:25 AM
@Jeeves why so?
 
@Akshay Because I confused you.
 
@Jeeves shut up!
 
@Akshay That was rude.
 
Wes
@Jeeves are you italian?
 
Morning
 
5:27 AM
@Wes No are you?
 
Wes
@Jeeves yes
 
@Wes Are you a girl?
 
lol
 
@Wes nods too.
 
@Jeeves how you became so smart?
 
5:30 AM
@Akshay I was born.
 
@Jeeves good one
 
@Akshay What is your favorite movie?
 
:p
@Jeeves I am not talking to you.
 
@Akshay Who are you talking to?
 
@Jeeves monstrosity. Are you?
 
5:34 AM
@Akshay Yes I am female. Are you human?
 
morning
 
Wes
hey joe \o
 
I've been looking at kernel source code this weekend ...
omg, it's the worst place I have ever been
\o
 
@JoeWatkins Linux, I assume?
 
yeah
 
5:45 AM
Which part were you looking at?
 
wanting to write a couple of modules
vfs, mounts, disks that sort of thing
haven't got anywhere
 
morning @JoeWatkins
 
everything seems purposely obtuse
\o
 
o/
 
I need a module to mount and format a ramdisk in the absence of persistent media, basically ... which is really simple stuff in useland
there's a specific driver that I was hoping to interface with, the videocore cpu has a cma of it's own, and I wanted to use ~32mb of that, rather than additional ram from the system, but I can't seem to get the basic idea to work ...
to slow things down nicely, when you accidentally deref null in kernel code, the module cannot be unloaded and you have to reboot the machine ...
 
Wes
5:50 AM
i'm going crazy... i'm getting an object wrapped into an anonymous class without a reason
 
huh?
 
Wes
var_dump($a, $b); // ok
call($a, $b);
function call($a, $b){ var_dump($a, $b); // different output }
 
urm
perhaps you are cursed ?
 
Wes
my guess is that phpunit uses globals or something
 
annoyed any gypsies ?
 
Wes
5:52 AM
fucking crazy......
 
yeah it'll be something phpunit is doing probably
 
Wes
wtf...... i'm speechless. im getting a completely new object i haven't created
what the actual fuck
it must be phpunit for sure overwriting a variable somehow
what the hell... crazy stuff...
 
6:09 AM
dark magic is dark
 
Wes
:B i've decided i don't care. i'm pretty sure it's phpunit now. it's not my code nor php, must be that...
 
yeah php doesn't do that ...
magical code definitely does do that kind of thing ... pthreads does that kind of thing ...
 
Wes
lol
 
so can uopz, runkit ... it's that sort of darkness ...
 
@JoeWatkins you online?
 
Wes
6:17 AM
@JoeWatkins my kind of things <3
 
all output data from database should be sanitize right?
 
why would you have insane data in a database ?
 
Wes
lol
 
exactly
 
Wes
@SalOrozco in fact data that comes from the db should ideally skip all validation. you validate input only, not already valid stuff
 
6:24 AM
i already sanitize it on imput
I just saw some videos on lynda.com
The guy saying that you have to sanitize output.
 
Wes
wat
 
he's talking shit
 
Saying that MVC is a design pattern
I know is not.
 
Wes
mvc is a design pattern
 
it definitely is
not one that has much to do with the web ... but it's a design pattern ...
 
6:28 AM
MVC is a common software architectural pattern (it’s not technically a design pattern),
ha
 
Wes
...
 
...
 
Where did you guys learn your stuff.
 
w3schools
 
lmao
 
6:30 AM
phpclasses
 
MVC first introduced in the Smalltalk programming language
 
what do you think the difference between a software architectural pattern and a software design pattern actually is ?
 
@SalOrozco why are you laughing?
I am a w3schools certified php developer.
 
A design pattern is, simply put, a recommended best practice for solving a
particular problem.
In other words, if you’re trying to figure out how to implement such-and-such
functionality, then use this design pattern as your approach.
 
6:34 AM
That's the difference.
w3 schools lmao
 
Hi , I am trying to insert a large string in clob column in oracle from php .
 
then what's a software architectural pattern?
 
But when I try to insert the large string , only the first line of the string is inserted
The rest are not inserted
Why ?
Please help me
 
You can't trust w3 schools.
A lot of it is wrong.
 
Wes
!!urban w3schools
 
6:36 AM
[ w3schools ] a site created by webdevelopers whose only purpose is to misinform other webdevelopers in order to keep their job
 
lmao
 
@Jeeves lies!
 
@JoeWatkins Do you like chocolate?
 
Where is my error ?
 
@Jeeves shhhh
 
6:37 AM
@JoeWatkins See? You don't know.
 
Wes
@Jeeves are you male or female?
 
@Wes I am a male.
4
 
@DaveRandom why is this happening ?
 
Wes
@Jeeves you seem confused. but hey, it's 2016
 
@Wes Do you know my name?
 
6:38 AM
@Jeeves @Jeeves got mad!
 
@Akshay I didn't get mad either.
 
it should only reply to questions
not just jibber jabber ...
 
lol
 
@SagorAhmed So, I went to the pharmacy yesterday. As I was going to the counter, I realized I forgot the doctor's prescription. Backstory: I went to that very pharmacy the previous night. He gave me all of them, except one which was out of stock. He said he'll order one for me that night and that I could come back the next day. So, there I was.. standing at the counter... with no prescription. Unfortunately for me, it wasn't the same guy as before. I asked him where the other guy was. (1/2)
He said, "I don't know". (2/2)
 
What is this bro ?
@littlepootis
 
6:43 AM
@Jeeves Are you a girl?
 
@littlepootis I already told you that.
 
php chat not okcupid
 
@Jeeves Is this PHP chat or okcupid?
 
@littlepootis Because we can talk with eachother.
 
Hi Guyz , How are you ?
@littlepootis , I have a large string in javascript .
I am transferring this from javascript to php
The code is as follows :
var dataString = 'functionName=saveFileContent' + "&fileName=" + fileNameStr + "&fileContent=" + fileContent + "&updateFile=" + 1;
                    $.ajax({
                        type: "POST",
                        url: "database_connections.php",
                        data: dataString,
                        cache: false,
                        success: function (result) {
                            alert(result);
                        }
                    });
But the php code only receives the first line of the string .
Why ?
How can I transfer the whole string from javascript to php ?
 
7:10 AM
If anyone'd like to lend me a helping hand I'd greatly appreciate it, I'm pulling out the few hairs I have left: stackoverflow.com/questions/41058291/…
I have a deadline tomorrow, and everything was working fine until it somehow didn't...
 
7:43 AM
@JoeWatkins I am generally agree, talk to @PeeHaa
 
8:02 AM
@DaveRandom, I don't want to bug, but how about ext-pq?
 
Morngins
 
Wes
\o
 
morning @PeeHaa
 
8:21 AM
@kelunik thanks, fixed :)
o/
 
Anonymous
Morntinge
 
Wes
mornin
 
morning Jay,PeeHaa;Wes
/me working on php 5.4
:P
 
Is it really insecure to store the User instance/object in SESSION ?
 
Wes
8:36 AM
you said that like you are proud of it @Linus :B
5.4 is like ancient
 
@Frondor it's super wasteful
sessions shouldn't be big
 
Well, my user models aren't big at all. The memory actually is not what bothers me
 
it should
storing more than 1k in sessions is a red flag
 
Well.. if you run your servers on a potato, then you're right
 
Wes
lol
 
8:47 AM
Wes lol no it's first I have been working on such thing :p
Great thing is client wanna add some features no upgrades to php 5.6 or higher
 
Wes
@Frondor you can do anything you want but don't ask opinions here then
 
@Wes Keep the salt off, I asked about security and got answers about anything but security. Am I wrong if I discard an opinion which is totally irrelevant to my question?
 
\o
 
O/
 
Great weekend? :D
 
8:58 AM
@Frondor yes you are wrong. If you post an sql question and you are vulnerable to sql injections, you will get told even if that doesn't fix your sql problem
If you just want stupid answers to stupid questions, this is the wrong room. We care about doing things right here :)
 
Nice blog post @Patrick btw :D
 
@Linus This codebase I'm working with was "migrated from php4 to laravel,php5.6".
 
Still an invalid argument. If I get asked for a list of fast food restaurants on an exam, and I answer "I'll better give a list of restaurants where only healthy food is served", guess who is reproving?
 
@Sean thanks, too bad reddit automoderator doesn't like it :D
 
Wait what?
 
Wes
9:03 AM
@Frondor since we are using metaphors... you are asking if the airbag will work while your car is running, on fire, at 300kmh with 3 wheels only. you can ignore our advice, sure, but you sure can understand why we don't want to answer
 
@Sean new account... :)
 
Ahh
 
@Wes You shouldn't care about what I am asking if you won't answer at all. Easy as that.
 
Wes
anyway, i think they are equally secure/insecure but i'm not a security expert
 
@Frondor If your fat friends asks you if he should go to McD or Buger King, maybe you should tell him to grab something with less calories instead
 
Wes
9:05 AM
chances are that your User object is also saved in a database. doesn't look wrong to you to store the same thing in two different places?
 
@Wes Saves you premissions/roles and such queries on each request.
 
@Frondor what if they change between requests?
 
@littlepootis good Job :P doesn't laravel support php 4 :P
 
can you pls stop fighting. kthxbye.
 
@Patrick Any update/create/delete method should refresh the object in session
 
9:07 AM
gut moaning
 
@Frondor so you create one big mess with a lot of overhead, just so you can save a single trip to the db? premature optimization?
 
Please, go ahead and explain that "overhead" you're talking about.
 
@Frondor all the logic to update the in session object
 
You're not saving a "single trip". If you know how ACL works, you'd already know all the queries you're saving by storing the user object with its relationships on cache
That's not what overhead means.
 
Wes
@Frondor aaaaah, so it's you running on a potato server
 
9:10 AM
Potato server or not, your argument is still invalid.
 
@Frondor mental overhead
 
Wes
also, if you think about it a bit more you'll realize that you can skip queries even if you saved just an id, in the session, rather than the whole object(s)
 
get off your high horse, you are doing stupid shit and you should listen to us
 
High horse? LOL man, you're hilarious
 
if you are having a problem with too many queries for your ACL, your problem lies somewhere else
 
9:13 AM
"you should listen to us"... Like, you're a better developer than me it seems, judging by your messages. I tend not to listen to that kind of egocentric people, sorry.
And no, I'm not here to discuss the approach
 
ThW
morning
 
The question was simple, is it secure or not?
 
Wes
also i don't know ext/session but i bet that retrieving data from there is way more expensive in terms of time than retrieving the same data from a database
 
@Frondor you are asking the wrong question
 
ThW
@Frondor It is not (an object means logic so you're storing logic in the session)
 
9:14 AM
@Frondor well I don't put my user object into the session... so judging by that criteria I am a better developer...
 
Says who?
 
ThW
it is wasteful and a potential security problem
 
posted on December 12, 2016

New Cyanide and Happiness Comic

4
 
@ThW That's the kind of answer I was expecting, not all the shit chatting these guys started.
 
@Frondor There are several reasons for not doing it. It's a harder to maintain/ debug, harder to change e.g. accesslevel of "live" users and on top of that a potential security issue waiting to happen
 
ThW
9:16 AM
@Frondor But they are right
 
@ThW I'm not implementing that, I'm just studying the approach
 
ThW
"famous last words" :-)
 
@ThW It's just temporary
 
merinis!
 
Wes
9:17 AM
\o
 
yo @pmmaga
 
ThW
yeah, back to 100% eloc (well 99.6) :-)
 
Wes
@Feeds bahaha
 
Wes
9:33 AM
@Frondor you actually started the shit chatting by telling us we run potato servers...
if i were @FlorianMargaine i'd consider that actually offensive, as i think he sells servers :B
 
@Wes nah, I'm a level above that, I work at a PaaS, not an IaaS
I still manage servers though
 
Wes
c8.alamy.com/comp/EB9YE0/… <- Florian at work :D
 
potato potahto
 
@JayIsTooCommon Remind Madara about disclosure stuff
 
9:38 AM
I need to block reddit...
 
Wes
burn is the word @Patrick
 
@Frondor that was a friendly advice from someone who has seen people put objects in session, and suddenly get a 80% performance improvement by putting just an id instead.
on the security side, you open yourself up to more attack vectors, given that you not only have session serialization to worry about, but also objects serialization
it isn't "less secure" in and of itself, but it is on a wider range.
I think the worst I've seen were people who had 10MB sessions...
for something that could be 100% stateless
@Frondor generally speaking, if I see you making an sql query in a loop, I'll tell you that you should fix it. Same idea.
 
Wes
@PeeHaa took me 5 episodes to realize this is not jodie foster images.enstarz.com/data/thumbs/full/80032/810/0/0/0/…
 
Wes
\o
she's from Continuum though. interesting series so far :P
 
9:45 AM
@Wes :)
@Wes I think I stopped when season 2? was done and had to wait for new episodes
Or was it 3 not sure
Been a long time since I watched it
 
Wes
4 seasons total so far
 
@Wes which serial is that?
 
!!imdb continuum
 
Looking for 'continumm' for you…
I couldn't find anything for that title.
Stargate: Continuum (2008) [ http://www.imdb.com/title/tt0929629/ ] - Ba'al travels back in time and prevents the Stargate program from being sta… [♥ 7.6]
Continuum (2006) [ http://www.imdb.com/title/tt1124322/ ] - Simple stories from everyday life, popular culture and folklore that explor… [♥ 7.9]
Notes from the Space Time Continuum (2004) [ http://www.imdb.com/title/tt0420022/ ] - A young man awakes to a world that thrives on erasing all traces of individ… [♥ 7.8]
 
9:47 AM
@Linus ^
oh wait. No bad search is bad
 
ah thanks :)
 
Wes
@PeeHaa that is an asshole in any series right?
 
Yea :P
 
Wes
this year got, the 100, etc all paused more than usual. aw
 
BTW did they kill the series?
It looks like s4 only has 6 episodes
 
Wes
9:50 AM
they did? :B damn
damn. yeah
 
Maybe I did see it all already not sure now
 
season 4 is the last season
 
I reinstalled my mediacenter so I have no idea what I have or have not seen yet :(
 
Wes
4 is more than enough though, if it ends gracefully
 
Even worse actors are being in several series to make it extra confusing / blurry
 
Wes
9:54 AM
lol
can i do something to exclude a method (__debugInfo) from code coverage, other than adding codeCoverageIgnore in every of it?
 
Draft of the RFC for the deprecation of binary strings: wiki.php.net/rfc/binary_string_deprecation Any feedback is appreciated! :)
2
 
Wes
@pmmaga deprecated... means someone is using it?
 
Anonymous
@PeeHaa soop, wanna have a gander?
 
10:10 AM
@Wes A lot more people than I imagined.. It was common place to have it on tests on the source. Also, PHARs with the default stub generated pre 7.1, also have it on their code. :/
 
amazon.in/… i bought this .....
 
Wes
10:23 AM
@pmmaga great. so we are deprecating something that never existed. never happened before in 50 years of software development. php always pioneers these things :D
btw, i never understood that. does that mean that "foo" would've been unicode strings, while b"foo" equivalent to current strings?
 
i am getting wrong version of phpunit installed 3.7.21 i have installed 5.7.3?
 
@Wes Yes! But still some people seem to not be that fond of the idea... As it may come back.. :/
@Wes "foo" would behave as currently but b"foo" would be forcefully binary
 
10:45 AM
errr... actually scrap that, it would be the way you said (can't edit comments any more?)
 
@JayIsTooCommon Sure
 
@m6w6 :-(
I have 3 days off next week, but I can't really find much time before then
I'm sorry I'm basically the least reliable person on earth
 
I concur @m6w6
 
Wes
@pmmaga so it would've been not backwards compatible. must be the reason php6 failed :P
i wouldn't mind having u"unicode text" like in other languages and "string" continuing to work like now (byte sequence)
 

« first day (2249 days earlier)      last day (2699 days later) »