« first day (1415 days earlier)      last day (3533 days later) » 

1:02 PM
sigh, i still have that ++ / -- rfc in draft status =/
on one hand i would like $a = false; ++$a; to yield int(1) ... but at the same time i want to alert the developer that something might be up.
 
is there a way to commit and have travis ignore the commit ??
 
nope
well, no easy way
 
not really in the spirit of ci, I know, but does it really need to build when I change README.md
 
I think you can disable the project from Travis itself.
Then when you're done, switch it back on ...
 
annoying ...
 
1:06 PM
yup
that's why i typically don't care.
 
such wasteful though, would be better if it only done a build if I change a file extension that matters ...
 
@JoeWatkins hmm, no update yet on the php-daily interpreter option.
that would make things go a lot faster.
 
for ustring yeah, but it doesn't make sense to do a rebuild for a C repository if I change some markdown, or php, or anything else for that matter ...
it cannot possibly effect the outcome ...
well I guess it could if you were parsing it or whatever, but that'd be strange ...
 
just don't worry about it ... let travis suffer for your markdown ninja skills
i should probably donate some money to travis .. now that i think about it
it's quite useful, that
 
yeah, guess ... but I might need those cpu cycles in another minute ...
it should be funded ...
a year or so ago I went into their irc room, and suggested that they let anyone run vm's for them, rather than needing this very specific setup, they'd have a bunch more processing power if we all ran a little vm for them ... a vm with 2 cores could run all the time on my machine and take up all the cpu they want (from those two cores) and it would never really matter to me ...
 
1:14 PM
now that would be CI in the cloud :)
 
doable though I think ...
 
@JoeWatkins You can just kill a build in travis if you care that much.
 
effort though
 
I have a VPS if needed to run daily builds... not sure it'd be useful though. It's only one architecture.
 
Nobody will want to run a VM on my machine ... especially @JoeWatkins
 
1:20 PM
I take it from that ... it's a mac ...
 
yup, the biggest one too ... not counting the iAshtray
 
ok... I give up on this bug: bugs.php.net/bug.php?id=67706
 
@FlorianMargaine that's not an easy one :)
 
one does not just fix date bugs ...
 
^ that
is the whole ext/date thing a homegrown beast?
 
1:23 PM
started reading the code, couple ok functions... then got there: git.php.net/?p=php-src.git;a=blob;f=ext/date/lib/…
(the function taking the string and parsing it)
(... character by character)
 
that's generated code
 
@FlorianMargaine It's generated code :)
 
thank god
 
lol
 
hey guys, would you like to participate in a simple code readability test?
 
1:24 PM
and where is it generated from?
parse_date.re, I guess
yeah that's better
 
yeah
 
yep yep
 
it is homegrown yeah, also, full of pretty complicated stuff ... github.com/php/php-src/blob/master/ext/date/lib/astro.c#L128
dunno why ...
 
@BartekBanachewicz sure
 
What, on your first glance, wil this line of code do:

filter ((== Redosia) . (^. owner)) units

?
 
1:27 PM
no clue
 
@JoeWatkins it's missing astro_sunpos_after_apocalypse() though ..
 
lol
 
@BartekBanachewicz no clue
 
filter something equal to Redosia where owner or something lol.. no clue really @BartekBanachewicz
 
@RonniSkansing well the part before "no clue" actually made sense :P
 
1:29 PM
Well maybe it more filter stuff in Redosia
 
it returns all items from units where owner property is equal to Redosia
 
which language is it?
 
Haskell (with Lens library)
 
that's not obvious ... at all ...
what is Redosia, do you mean Rodesia ?
 
Is Haskell becoming the next gen Brainfuck?
 
1:30 PM
pffft, becoming ...
 
@JoeWatkins that's just an enum value.
 
heh
 
data Player = Redosia | Bluegaria | Greenland
 
Morngin
 
1:31 PM
Bulgaria ... why make things purposefully hard to understand ...
 
If you'll do 9 mistakes in word "haskell" you'll type it as "brainfuck"
 
So (== Redosia) is something of a closure that takes one argument and yields the result of the == comparison?
 
you'll be asked to write things in haskell as many times as I'll be asked to act as a hitman ...
 
@Ja͢ck precisely.
 
kay
 
1:32 PM
@JoeWatkins lol
 
@JoeWatkins those are the names of fictional countries in the video game. Redosia = red, Bluegaria = blue, Greenland = green, Violetnam = purple.
 
Hello fellas, I need a framework advice from you geared specifically towards learning curve. I need to choose a framework which is beginner friendly and marketable, by beginner friendly I do not mean for complete beginners as I already have tried CodeIgniter and liked it altough I am not going to use it because of its announcement and I want to invest my time in something that pays of in future. I need a framework that is easy to pick up and I can build a real worl app while leraning it and I should not find myself stuck learning the framework.
 
@BartekBanachewicz not really talking about the names ;)
 
"I want to invest my time in something that pays of in future" stop focusing on a framework and learn how to program
 
we're all pretty experienced programmers, the only answer you got was "no clue", we could have guessed, but we don't know, so readability fails ...
 
1:34 PM
@JoeWatkins Well I don't think that this line of code is hard to understand; precisely why I asked here.
 
If anything it could be useful as a Shiboleth ;-)
 
nothing is hard to understand if you understand it ... that doesn't make sense ...
 
@JoeWatkins what if it got rid of operators? filter ((equalTo Redosia) . (property owner)) units
 
. is still throwing me off, it's harder to say now you already explained what it means ... but I would guess so ...
(property owner) . (equalTo Redosia) because we are (mostly western) human beings that would have made more sense ...
 
The (property owner) is definitely clearer than (^.owner)
 
1:37 PM
yeah but we already know what the operator means ...
 
@JoeWatkins that's not how function composition works, though ;)
My friend also told me recently that the order is throwing him off
(f . g) x = f ( g ( x ) )
 
I'm not sure what you hope to learn from this, it's pretty obvious that none of us seem to use haskell ... which I guess is why you were asking us ... what is there to learn ?
 
@JoeWatkins You didn't know the operators and the syntax; nothing is hard to understand if you understand it was my reason.
 
@BartekBanachewicz So ^ is a functor of sorts?
 
@Ja͢ck no, (^.) is a complete operator.
 
1:39 PM
so you're just trying to discover the most readable form of that ...
 
Lenses define a lot of weird operators.
 
Oh, that's the operator? dafuq
 
@JoeWatkins yeah, kinda.
 
Haskell in a PHP chatroom? I blame @igorwhiletrue
 
it'll be with words, but had you showed me the original example with words, I might still have felt like it was a guess ...
 
1:40 PM
though I love me some functional programmings
 
If I start writing code in that manner, please get rid of me by any means possible.
 
@JoeWatkins you can add [ci skip] in the commit msg
 
oooh, that goes in the ci bag o' tricks
 
@NikiC excellent
thnx
 
I am in a situation where I need to have a framework portfolio in order to upgrade my Resume.
 
7 mins ago, by PeeHaa
"I want to invest my time in something that pays of in future" stop focusing on a framework and learn how to program
 
I'm not clicking that stuff ...
@Shashi I know, write your resume in CI
 
@Ja͢ck well, they are constructed according to some rules. ^ is view, % is modification and so on. It also defines += for example :P (which I don't think you consider weird)
 
@Shashi lolwut
 
and I am totally clueless , should I invest in mastering vanilla PHP or should I learn a framework just blank.
 
1:42 PM
@BartekBanachewicz That's like combining Haskell with Perl ;-)
 
@Shashi if you want to compete with people who call themself experts, but are not (and work for 10$ in hour), say they follow best practices and do not, use Laravel, CakePHP, etc.
 
@BartekBanachewicz they are math operators, everywhere ...
that's strange ...
 
Perl + Haskell = Perkell(ator)
 
Del, or nabla, is an operator used in mathematics, in particular, in vector calculus, as a vector differential operator, usually represented by the nabla symbol ∇. When applied to a function defined on a one-dimensional domain, it denotes its standard derivative as defined in calculus. When applied to a field (a function defined on a multi-dimensional domain), del may denote the gradient (locally steepest slope) of a scalar field (or sometimes of a vector field, as in the Navier–Stokes equations), the divergence of a vector field, or the curl (rotation) of a vector field, depending on the way it...
 
@RonniSkansing than who are the others ?
 
1:43 PM
so is this.
 
so German
 
oops sorry
 
E_TOO_GERMAN
 
@Shashi Sorry, Do not compute. Anyways invest in vanilla php, you need that to success with anything even as low as wordpress
 
@Ja͢ck can you define arbitrary operators in Perl too?
 
1:44 PM
I stopped reading at "vector calculus"
 
@BartekBanachewicz the == Redosia part makes sense, but getting the property via ^. owner is really odd to someone not familiar with it...
 
@Ja͢ck why? You don't like vector math?
 
you have to listen to niki, he is always right ...
 
I apply vector math when I need it ...
 
@Shashi if you felt comfortable with vanilla, you would also have a opinion about the framework you would want to use
 
1:45 PM
@Ja͢ck and you never need it? ^^
 
Yeah :)
 
property = flip (^.)
there. :)
 
@BartekBanachewicz Is ^.^ an operator too?
 
lol
 
@Ja͢ck ((.).(.)) is ;)
 
1:46 PM
hehe
 
well, not an operator per se ^^
 
(╯°□°)╯︵ ┻━┻)
Flips yo' table.
 
(\_/)
('.')
(> <)
 
@NikiC actually that's the composition of composition! :)
@Ja͢ck no, but <^(*)^> is used sometimes
 
we should totally add a bunny operator ...
 
1:47 PM
I call it the starship operator :D
 
oh yeah
 
@RonniSkansing Yes I do , I didn't liked frameworks that much. For simple app I have to write a lot of code and have to dig a lot to learn the framework whereas if I had to do that in vanilla I would just use some of my prebuilt class , import it in the project and I am good to go.
 
Actually it's <^ applied to (*), followed by a ^> I think
 
But I believe it will be hard to convince recruiters about that philosophy
 
@BartekBanachewicz that reminds me of the c++ hackery for "custom" operators...
 
1:48 PM
@NikiC yeah, that was funny.
 
I have great respect for how Haskell works internally, don't get me wrong, but it just gives me a headache reading it.
 
was something with overloaded < and > so you can write a <div> b I think
 
Well some operators in Haskell really do help readability, like >>= and <$>
 
@Shashi so why would you not like a microframework? Sounds like it suits your needs. Pick a framework, add you dependencies, autoload, go
 
@Ja͢ck certainly needs a bit getting used to
 
1:50 PM
@RonniSkansing I wonder because I have never tried one, plus will a recruiter understand my urge of not using a full fledged framework.
 
@Ja͢ck You need to understand that by-design Haskell requires you to write a dissertation to accompany your code.
 
@NikiC Reminds me of Uni days ... proving three lines of code with three pages of proof o.0"
 
@NikiC no, that's Epigram :)
 
@Shashi where are you from?
 
India
@RonniSkansing
 
1:53 PM
Yeah, says so on your profile :p
 
Anyway thanks for feedback guys, I appreciate that a lot.
 
Yeah, please contact the authors of Lens and have them make it more like PHP :)
 
I now feel kind of bad that you were much calmer and balanced when I went here talking about Haskell, than I am here talking about PHP.
Lesson learned.
@Ja͢ck Actually it's one guy mostly, I think.
 
@Ja͢ck you mean like add more $$$
 
"$" is great.
 
1:56 PM
Of course, a language without $ just makes you feel poor writing in it.
 
$ is what makes haskell different from Lisp :D (it replaces parens, sort of)
so instead of (f a b) c you write f a b $ c
 
The only time I took a Lisp book out of the cupboard was to make a joke with my PR, saying that the book helps you speak like Daffy Duck.
 
@Shashi hmm. I would put know your php at top imo, frameworks you can always learn, but when you start having troubles with the frameworks, you need some vanilla php skill.
 
@BartekBanachewicz Lisp-like curse detected
 
@Shashi same goes with Wordpress, it is horrible, and that why it is not suited for the large audience it is targeted, newbies, designers etc. Because they can not just rely on wordpress's core, they can not audit a plugin (which is important when they are soo bad), soooner or later all wp projects with inexperienced developers crash and burn. So in any case I would always recommend you to learn the language.
 
1:59 PM
@BartekBanachewicz I get that feeling when I start talking about how nice Objective C is ... everybody just mocks me .. why .. WHY, it's just misunderstood!
 
@Danack oh, interesting.
 
@Ja͢ck wait, you think objective c is nice?!
 
You see what I'm talking about?!
 
@RonniSkansing I was in the middle of a project and planning to build this in a framework, I believe now I would choose a microframework for URLs and use my own classes with it.
 
It's too close to smalltalk and C for me to like it.
Also Apple dumping it isn't a very good sign for the language, I am afraid.
 
2:02 PM
Yeah, that's kind of a bummer ...
 
Especially considering that Swift isn't particularly great, to say the least.
 
But on the upside, new opportunities for rep whores in .
Haven't played with Swift yet, but I didn't hear much positive things about it.
Time to watch some more Fargo .. later chaps!
 
> Influenced by Objective-C, Rust, Haskell, Ruby, Python, C#, CLU
 
I was influenced by the late 70's ... apparently.
 
This list is impressive. Too bad the language isn't :(
 
2:04 PM
@BartekBanachewicz the list is missing PHP, obviously.
 
@Ja͢ck I don't think that PHP is very highly rated on modern language designer's list.
 
hehe
ctrl-shift-eject .. bbl
 
@salathe lol, the elephpant easter egg
 
@AndreaFaulds how's that reply for ya?
3
 
PHP too needs an "influenced by" list in the home page .. in big and friendly font
 
2:14 PM
@tereško what would be listed there?
 
@ircmaxell morning
 
what wouldn't ?
 
we got string/array sizes ;)
 
@ircmaxell Awesome as usual :)
I asked you since I figured you'd probably write something like that explaining why it was a bad idea, and indeed you did. Thank you.
 
> Perl, C, C++, Java, Tcl
according to wikipedia
 
2:16 PM
:-)
 
@Ja͢ck @BenjaminGruenbaum has good things to say about it
 
@JoeWatkins yay!
 
indeed :D
 
What are you celebrating about? (I have no context)
 
8511
Q: Why is processing a sorted array faster than an unsorted array?

GManNickGHere is a piece of C++ code that seems very peculiar. For some strange reason, sorting the data miraculously makes the code almost six times faster: #include <algorithm> #include <ctime> #include <iostream> int main() { // Generate data const unsigned arraySize = 32768; int data[arr...

 
2:18 PM
@ircmaxell awesome
 
0
Q: Error Handler in PHP

Hassan AlthafI am currently developing a Content Management System, and I have just completed the Error Handling system, which handles error's according to the user's settings. What do I want to know during the review? Every single thing I could improve to make it more flexible, robust, light weight and fast ...

 
@ircmaxell Aha
 
> If we tell that the PHP implementation is good enough, what about throwing an error (or a warning) when lengths are not equals instead of returning false. It will be more explicit for the end developer.
 
@ircmaxell woah
 
2:21 PM
SO is not fair; 3000 upvotes for:
3317
Q: What is the name of the "-->" operator?

GManNickGAfter reading Hidden Features and Dark Corners of C++/STL on comp.lang.c++.moderated, I was completely surprised that it compiled and worked in both Visual Studio 2008 and G++ 4.4. The code: #include <stdio.h> int main() { int x = 10; while( x --> 0 ) // x goes to 0 { prin...

 
LOLOLOLOLOL ikr @Danack
I guess those days, people were too jobless and they kept on up-voting.
 
afk for couple of hours ... because sunshine and ice cream (because celebrating, because grown up)
 
what's the makefile task to enable DEBUG_OUTPUT?
 
@ircmaxell Not sure how terrible an idea that is
 
hm...
setcookie should only be present once per response? bugs.php.net/bug.php?id=67736
 
2:26 PM
why would we?
@JoeWatkins enjoy it man!
@AndreaFaulds why would we error? it's not an error, it's a valid state
 
@ircmaxell Yeah, you just shouldn't use strings of differing lengths if you want to avoid leaking information.
 
@FlorianMargaine with the same name.....yeah doing otherwise would be nuts.
 
@JoeWatkins arginfo is still wrong for doCall and doBranch
@AndreaFaulds but that's not an error condition
especially when the user is submitting one of the strings
 
@ircmaxell Throw an E_STRICT or E_NOTICE then
 
@Danack the new rfc says there should be only one set-cookie header in the response
not even the same name...
 
2:29 PM
@FlorianMargaine then setcookie should coalesce those calls
@AndreaFaulds why?
 
@ircmaxell To discourage using different lengths in development? I'm not sure it's a good idea, though.
 
The only way a developer could defend against it, is to add his own length check before hand. Which would still leak the timing information
 
any way to test sapi php in CLI?
to test the headers..
 
@FlorianMargaine Which RFC?
 
@Danack 6265
 
2:35 PM
Oh, ietf RFC not PHP RFC.
 
yeah, my bad
> Though the CGI SAPI provides a way to suppress HTTP headers, there's no equivalent switch to enable them in the CLI SAPI.
:(
makes it hard to test on a dev machine...
 
@FlorianMargaine maybe you could start a instance of a php server and run integration tests?
 
@FlorianMargaine Maybe I'm misreading it, but I can't see that it says a response must only have one cookie field. It says that for request, but the only bit I can see for response is "Servers SHOULD NOT include more than one Set-Cookie header field in the same response with the same cookie-name. "
 
@RonniSkansing I mean, I can test using php -S, but unit tests?
@Danack oh right
 
@AndreaFaulds also: I always run error_reporting=~0 in production... and suggest others to as well
 
2:42 PM
@FlorianMargaine maybe something like
https://github.com/rdlowrey/Arya/blob/master/test/bootstrap.php
https://github.com/rdlowrey/Arya/blob/master/test/RequestTest.php
https://github.com/rdlowrey/Arya/blob/master/test/IntegrationTest.php
or I just do not understand it =] nvm then
 
@RonniSkansing I meant in php-src
 
oh lol
sorry bout the confusion
 
oh... sapi code is specific to the vendors...
so many surprises when I go from code to code :P
 
3:11 PM
strawpoll.me/2463199 - for my personal reference, how you guys feel about scalar type hints
 
sigh
 
Obviously Room 11 isn't representative, I've just never held a vote on this issue
 
tweet it out
 
@ircmaxell done
 
@Leigh Also, while i get the sentiment of common-prefix names, I think GMP_BIG_ENDIAN etc makes more sense :)
 
3:18 PM
I really couldn't decide :/ since the parameter is also simply called "endian"
 
so... I have a commit to fix a bug. However, it's clearly not done yet, but I don't know how to do it right according to php-src standards. Any pointer? github.com/Ralt/php-src/commit/…
 
@Leigh with the inverted order it should at least be GMP_ENDIANNESS_BIG i think
 
does php-src have vectors? how do you generally deal with such data structures?
 
we fake it
 
lol
any example in the codebase?
 
3:29 PM
morning
 
monring
@ircmaxell thing is, I need a struct to do this. Should I declare a new vector struct by myself? There surely are existing ones...
 
struct? in PHP?
 
Ohhhh, in core
hash tables...
 
I should use that here, indeed. I guess there is an existing implementation already?
I should use a Set there, actually
is there an idiom on where to put these kind of implementations?
 
3:43 PM
Hmm
Some SAPIs use a hashtable internally
 
@FlorianMargaine hashtable is fine for a string-set
 
I know the CLI server does, I made it use two hashtables!
 
@NikiC ok
I'll look for an existing example in core then
 
Fun fact: For every header, the CLI SAPI stores two different versions. One lowercase, one in original case
 
3:45 PM
The former for internal checks, the latter for getheaders().
 
@Andrea not surprising
Better that than using lowercase() every time
 
Er, apache_request_headers I meant
@FlorianMargaine lowercase is impossible, this is a hash lookup
You can't do a case-insensitive hash lookup. Well, you can by iterating over every key, but we didn't do that ;)
 
true
my bad
 
I said some SAPIs use a hashtable internally, but I was talking about CLI for request headers. I have no idea if any of them use one for response headers.
 
hi, please any one can reply it urgently
0
Q: XSS Vulnerability on website

Faiz RasoolI'm using these function to filter my all input variables. //filter input field function cleanMe($data) { // normalize $data because of get_magic_quotes_gpc $dataNeedsStripSlashes = get_magic_quotes_gpc(); if ($dataNeedsStripSlashes) { $data = stripslashes($data); } // norm...

i had use the prevention tool to shield from xss but still my website is full of XSS.
 
3:50 PM
HashTable it's going to be
 
@FaizRasool just try this php.net/manual/en/function.htmlspecialchars.php when you print on page
 
@FaizRasool Your code is clueless
Your first priority would be to understand what you are trying to protect yourself from
Anything else would be pointless
 
i want to protect XSS
and SQL
 
No you don't
 
i think SQL is protected but issue is with XSS
 
3:52 PM
You never do both
 
Throw it out and start again. Don't try to write a one-function-fits-all sanitisation function. Making data safe for putting in a database is a different problem to making data safe for putting in an HTML document. (And blacklists are a terrible idea) — Quentin 40 secs ago
 
Ow yeah ^ that basically
 
arginfo fixed @ircmaxell
 
You are clueless what you are trying to prevent meaning you will never be safe
Protection / prevention like this is not a matter of throwing together as much different sanitizing and filtering functions together as you can thinkn of
 
ok what should i do suggest
 
3:54 PM
You have to think about the different threats in different contexts and fix that
 
for this one what should i do
which filter for the search
 
In the context of sql queries you want to prevent for example sql injection -> fix that when you are querying
 
sql is safe.
 
it is WAF XSS
 
3:55 PM
itradesecurity, nice
 
In the context of html you want to prevent for example XSS -> fix that when you are running html
etc
 
@JoeWatkins yay
@JoeWatkins yup, it is, I can confirm. Unit tests pass again :-D
 
Do I need ; after a <?= ?> statement?
 
do you have any good code function
for this
 
@FaizRasool I'm not going to give you a canned answer, because that would only result in OP getting the answer for this specific thing without understanding what it does
 
3:58 PM
<?= htmlspecialchars($stuff) ?> or <?= htmlspecialchars($stuff); ?>
 
Both are valid IIRC, but please add the semi colon
@FaizRasool Which is exactly what got you in this mess in the first place
 

« first day (1415 days earlier)      last day (3533 days later) »