« first day (876 days earlier)      last day (4058 days later) » 

3:00 PM
@Baumr search for 'Sonim' you can drive a tank over 'em, fry 'em next to BBQ, freeze/drop/use as a hammer/etc...
 
machine rebooting and upgrading now. cu later
 
@hakre famous last words
 
yeah, let's see
I might need to upgrade the bootloader
 
@kaᵠ Overkilllll hahaha :P
@kaᵠ But thanks (it's for my mom)
 
:)
 
3:12 PM
send the recruiter your CV in editable format. Do or Don't?
 
@Gordon why?
 
@Gordon send it as PDF or a link to a website
 
@Gordon wow he has got so many good answers.
 
anything else is not acceptable
 
careers.SE link even?
 
3:19 PM
@kaᵠ because editable format means they edit it
@tereško that's what I did. just got eMail back and doesnt seem to be an issue. good.
 
@Gordon cool!
 
> I want to keep things clean, minimal, simple and pragmatic.
Shoot on sight
 
Joss Whedon's Much Ado About Nothing was filmed in 12 days. That's simply mind-boggling. http://oak.ctx.ly/r/2vvw #wiredsxsw
that's pretty long for a movie "about Nothing" but I guess that's why it was called much ado about nothing
 
I need one more vote on stackoverflow.com/questions/3264889/… to have 100 :)
 
3:31 PM
Any curl ninjas in the house?
 
@NikiC there you go
 
you got my vote
Any one can help with php curl issues?
 
@NikiC On that answer :O
Now that's some proper repwhoring ;)
 
@Gordon thanks :)
@PeeHaa Yeah, I know ^^ Seems like writing "foo is null" to check whether foo is null isn't very obvious and people have to look it up all the time :P
 
:-)
 
3:35 PM
Advantageous skills: Experienced in Agile methodology
Responsibilities: Leading the project-development team to develop and deliver the solution according to plan, making sure quality standards and best practices are applied
 
user895378
> If you are ready for some serious action
 
user895378
^ Is this a casting call for a porno?
 
@rdlowrey its in Amsterdam so it wouldnt be that surprising
 
okay now is the time of truth.
 
> The candidate should be able to assess project technical requirements from a high level view and love to roll up the sleeves to write clean, efficient code.
> Desired: Experience developing for Wordpress and open source CMS’s
 
3:41 PM
always when I read these required skills I wonder who in this world is fitting for a single of these jobs.
like actions + html + css + js + php and then native mobile development.
 
oh, I think it's a trick. They want someone who has worked with WP because that candidate then knows how clean and efficient code doesnt look like
 
anyway, going to reboot the machine now.
 
Hi guys
 
@SamBattat protip: room description ;)
 
3:58 PM
Hi Everyone, Can anyone compare features of PHP with Python?
 
@Gordon: I have a php curl problem can you help?
I m trying to process a paypa buy it now button request with curl
 
@SamBattat no. I cannot help because you did not read the room description yet
 
I have read that (fast), I need something with less details, any thing to tell witch one "is prefered to do what"
 
my bad
I just did
:)
 
Will array_keys and array_values always return the values in the same order? (IE will they correlate)?
 
@qwertymk From experience, yes they do. but i wouldnt rely on that
In one of my curl requests to process a buy it now button payment, it seems like im not passing all the cookies, because I get an error an/or I get redirected to another page instead of processing the payment. I use a cookie jar and cookie file in my curl setup
I need to know if there is anything/way to make sure I replicate the same request if it was done in a reqular browser
 
@qwertymk yes
 
@MostafaShahverdy: they are both scripting languages, powerful, but if you are doing a lot of things server side, like dealing with the filesystem or authentication, etc I would recommend python
 
@NikiC any source for that?
 
@qwertymk depends on your definition of "in order"
 
4:09 PM
Anybody knows why I cannot do:
 
@qwertymk he will likely link you to "the source"
 
<?php

$test = new StdClass();
$test->doSomething = function() {
	return ':-(';
};
echo $test->doSomething();
 
@PeeHaa Cuz PHP is a shitty language. Maybe?
 
Aaaaah right. I tend to forget that sometimes
 
cause it is not javascript
 
4:10 PM
@tereško right...
Yet they are stealing pieces of the syntax
But are not doing a good jub at it
Not JS perse though, just in general :P
 
i have been thinking about investing some time to learn serverside JS
might be a good "way out"
 
In that case I would lean towards dart
Or something like that shit
 
-1
Q: I need a list of every deletable file in php's source code

user2152910I am trying to get to the bottom of how PHP works. i would like to compile php with : -disable-all all i want to see is PHP being compiled, installed with the most basic things. if there were less files i could study and figure out how php works. what can i delete from the php source code file...

 
@Gordon in order,, will each index on key be the key for value?
 
@Gordon I don't think that would help him ^^
 
4:12 PM
please see this for more details on my curl problem: x.com/developers/paypal/forums/paypal-sample-code/…
 
@NikiC but it would be funny
 
@Gordon here you go ^^
 
@PeeHaa bcoz PHP thinks its a variable. you have to call_user_func it
@qwertymk "any 'source' for that" -> lxr.php.net/xref/PHP_TRUNK/ext/standard/array.c#2442 ;)
 
@Gordon you're too late...
 
@NikiC no, you wrongly assigned your reply to me
 
@Gordon I did?
 
@PeeHaa for some reason the following works just fine :
<?php

$test = new StdClass();
$test->doSomething = function() {
	return ':-(';
};

$foo = $test->doSomething;
echo $foo();
 
@PeeHaa eih, that was phrased weirdly. what i meant was that php does not understand that there is a method assigned to the variable. it cannot dereference it
@NikiC no you didnt. my fault. sorry
 
That's just stupid
:(
Just remove StdClass from the language until they can implement a real StdClass please
 
@tereško For some reason? Why would it not work?!
 
4:18 PM
that is not the question
 
14
A: Calling closure assigned to object property directly

GordonNo. You'd have to implement the magic __call method to intercept the call and invoke the callback (which is not possible for StdClass of course, because you cannot add the __call method) class Foo { public function __call($method, $args) { if(is_callable(array($this, $method))) {...

 
Mornings
 
Thanks @tereško @NikiC @Gordon for telling me PHP still sucks
morning @DaveRandom
 
thanks guys
 
@PeeHaa Yeh that element of PHP totally sucks, it has annoyed me before :-(
 
4:21 PM
So annoying when you try to write a proper answer with explanations etc...and in the meantime someone posted one line of code and that gets accepted as the best answer. :-(
 
@SamBattat Thanks for your response, currently I am a PHP developer myself, and I know some basics about Python.
 
@DaveRandom It's not something you have to do often, but it just feels broken :(
 
@MostafaShahverdy: what are you trying to do if I may ask?
 
@SamBattat Nothing special, I want to know if I am in correct way or not, As you know PHP has a bigger community,
So this may be a big advantage
right ?
 
@MostafaShahverdy: I'm a big fan of php as well, so if there is nothing special that requires python, then stick with php unless you like to learn python
 
4:25 PM
How about PHP vs ASP ? What do you think?
 
ASP for sure
It's the best thing before we had Ruby
 
@MostafaShahverdy: are you good with php curl?
 
Just so so ... I need manuals .. :D
 
@MostafaShahverdy: I dont use ASP but I know that its easy and one of the advantages is that you can use the same code for web applications as well as desktop
 
@MostafaShahverdy If you are asking that question I'm pretty sure you don't know what ASP is
Unless you mean ASP.NET
 
4:27 PM
I haven't used ASP(.NET) at all!
 
@NikiC I'm pretty sure he means ASP.NET as we are talking about web development languages
 
@PeeHaa The only time I have ever tried to do it was as a work around to something else that feels quite broken, namely that you can't name a method the same as a language construct, particularly the thing I have wanted to do more that once is have a method called list()
 
@PeeHaa it's short for Awesome Scripting Processor
 
@MostafaShahverdy see this link if you can help: x.com/developers/paypal/forums/paypal-sample-code/…
 
@DaveRandom YES! GOD! PLEASE! LIST!
 
4:29 PM
thats the exact problem I have
 
@Gordon :D
I think everybody in here cried a little at some point because he/she wanted to use List
 
@SamBattat have you tried to make that connection from outside of your program? I mean first simply test it with some basic forms ... Paypal has banned my country so I can not test it myself
 
@TillHelgeHelwig what is Chris doing there?
 
Rep-whoring? ;D No idea.
 
4:35 PM
@PeeHaa no , the usually reaction is blank stare when you look at the code and cannot figure out whats wrong with it
 
Those "How to ... preg_replace... HTML..." questions...
 
@tereško hehe true
 
@TillHelgeHelwig it's why I made gist.github.com/1358174 (yes @PeeHaa I know it's still not having your suggested edits)
 
Nifty. ;)
 
@Gordon hehe no worries. I still blame GitHub for making gist repo not real repos. And I'll leave my comment as a constant reminder :D
 
4:38 PM
@Gordon Thanks for the "cannon" answer
I didn't know about that one
 
@Gordon: Well I don't think that people necessarily think that using DOMDocument etc. is more to type than preg_match_all...I think they just read about it in some crappy tutorial and never actually searched for a solution properly.
 
@Chris np
 
The only thing I would add, though, is a simple example of each.
 
Hey @NikiC I have been mulling over something to try and implement in C to try out my mad skillz and I was looking at PCRE and wondering if there might be any value to an OO API (hear me out) which takes an regex for the constructor and pre-compiles it, so that if you are using an expression many times the compile step is only done once. Thoughts? /cc @EveryoneElse
 
@DaveRandom no
 
4:40 PM
lol
 
php caches them anyways ;)
 
Oh. Well good, I guess I'd better go and try and find something else clever.
 
(it may take some considerable time)
 
@DaveRandom Implement unicode
 
4:41 PM
@Chris I thought about it. But it's too much effort. We basically have answers for 80% of what people want to do with ext/DOM so I'd prefer linking to them instead of repeating them there. It's why I put the link to my how to get href from html in it.
 
@PeeHaa Brilliant! Just give me half an hour or so. I wonder why no-one has ever thought of this idea before?
 
@TillHelgeHelwig but they do.
 
@DaveRandom :-D
 
@Gordon Really? Haven't seen that argument yet. But I haven't been around as long as you have, I guess. ;)
 
@TillHelgeHelwig you wouldnt believe how many people think one-liners are the shiznit
> With the DOM parser, I need to get a list of lis, which is not enough, as some important info is in a p, a div, and a a. Then for each li, I need to check if the li contains "Né le" or "Née le", which is either to ifs, or a regex - the to check if there is a parenthetized birthplace, and extract it, which is at least two more operations. With a regex, I can get it in one line of code. - stackoverflow.com/questions/12439631/regex-vs-parsing-engine
 
4:47 PM
@Gordon Yeah well...it's a common misconception that it's better to have the programmer do less work than having an application that is fail-safe. ;)
I would expect that from managers and people without any IT knowledge...but not from programmers. But there are a lot of them who think this way.
And I think the reason for that is that for a lot of projects the definition of done is "works right now".
 
@TillHelgeHelwig I added a DOMDocument based answer, I know there's little chance it will have any effect on the OP but maybe there is a tiny chance some future visitor might see the light
 
@NikiC any chance to get xpath_match_all as a native function?
 
@Gordon probably there is chance ^^
 
@NikiC any chance you'd do it?
 
lol
It's XML related :P
@DaveRandom You just reminded me that I wanted to write a blog post on that
 
4:52 PM
@Gordon Until libxml support XPath 2.0 it's not worth it IMO, you just can't do enough with XPath 1.0 to persuade people to use it.
I like the idea of the extensibility of DOMXpath with PHP functions, but it is so sloooooooow that I never use it.
 
@DaveRandom i dont think it's that. I think the main reason people dont use it is because it requires you to have the boilerplate code, which is understandable when all you want to do is /get/that/node/value/
 
@Gordon it just really sucks that XPath 1.0 is missing quite a bit of fairly basic stuff. I mean, how does it not have ends-with()? I often end up writing these nasty ass workarounds for stuff it's missing. Same goes for it's lack of support for token lists, particularly with HTML class attributes it's a real pita.
 
@DaveRandom sure it sucks, but that's not a reason not to use it. And you can use PHP in XPath, so you could write a lib that provides these instead of using the workarounds and reuse the lib in other projects.
which is actually a nice idea
 
6 mins ago, by DaveRandom
I like the idea of the extensibility of DOMXpath with PHP functions, but it is so sloooooooow that I never use it.
(it really is quite noticably slow, I have tested)
 
@DaveRandom my main issue with the php:fn stuff is that I find it akward to use. it always feels foreign
 
5:02 PM
@Gordon That too. I looked into the whole XPath 2.0 thing a while ago, there was a big push to get it implemented in libxml but the guy in charge "found that it was a larger task that he initially thought" (or something) and the effort died :-(
Ugh, is a real shitfest today
Oh yay my tags are working again
 
@DaveRandom there is explain.com.au/libx but it seems dead, too and the license doesnt allow for commercial purpose
@DaveRandom s/today//
 
Ehm guys, could somebody tell me in which way PHP does not support Unicode?
 
5:18 PM
5
Q: XPath 2.0 : Open implementations

subtenanteI find it very difficult to find an XPath 2.0 implementation outside of Saxon. What are the XPath 2.0 options in other languages ? Note : This blog post made an interesting summary of the situation in 2007.

maybe one of these could be adapted for PHP
i think to remember that the zorba extension has a php wrapper
 
@NikiC Exactly.
 
@NikiC Support without hassle or just support?
 
@PeeHaa Dunno, whatever you like
When is there usually hassle?
 
Well imho the entire thing feels like a hack
 
@PeeHaa I'm also interested in concrete issues that you had ;)
 
5:32 PM
For example the whole mb_* hack
utf8_*
 
@PeeHaa what's hacky about it?
 
Why would I care to use mb_* that should not be my problem
Simple stuff like string manipulation in unicode strings. It's just clunky
It just all feels like a hack is a hack
Which results in userland hacks (cough mb overloading)
 
why i am getting this image not found error guys
i upload pictures
in picture folder
 
what should be done about this answer? flag as NAA?
 
and link is correct as well
anybody help me out
folder permission is 0777
 
5:42 PM
Are you sure it's a jpeg?
 
@PeeHaa not having native unicode support in everything leads to horrible hacks
 
yeah i am sure
1679091c5a880faf6fb5e6087eb1b2dc.jpg
 
extension means nothing
You know that right?
 
this is the name of my picture in my pictures folder
 
You probably have some router in front if the thing @MalikUsman
The image contains:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /watermark/picturesfoldername1679091c5a880faf6fb5e6087eb1b2dc.jpg_640_393.jpg was not found on this server.</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
<hr>
<address>Apache Server at earngoogle.info Port 80</address>
</body></html>
Now that I look at it you forgot a / I think
 
5:45 PM
@PeeHaa When would you need to use the mb_* functions usually?
 
@NikiC Well... to quote rasmus "everything is a string"
 
sure ^^ but doesn't mean you need to use mb_* everywhere to handle utf-8 ^^
 
@NikiC go to a site that does string manipulation on user data in php, type unicode, and watch their site blow up/squirm
 
@NikiC No but often for day to day string manipulation you will need it
 
@PeeHaa Like?
 
5:48 PM
The most used will be len
 
anything not using mb_* with utf-8 strings being manipulated will choke hard on utf-8 and result in invalid unicode
 
@PeeHaa and why the heck would you want to use mb_strlen over strlen?
 
I want to have characters and not bytes
 
@PeeHaa why?
 
:D
 
5:49 PM
?
 
you want your length in characters more often than bytes
 
Why how?
 
one character can be up to 3 (or 4?) bytes
 
8
 
@PeeHaa and why do you think mb_strlen would give you the character length? what is a character, actually?
 
5:50 PM
16
 
oh yeah
utf-8, 8 byte coding, etc
 
@NikiC Depends
:)
 
@Hiroto Up to.
 
That's why there are functions for it
 
@NikiC a character in that sense is a single unicode codepoint
 
5:51 PM
@Hiroto Why? When would you be interested in the "character" length?
 
validation?
 
@NikiC c'mon
 
@Hiroto for storage? like "max 100 characters"?
 
no
 
For SMS, one valid example.
 
5:52 PM
verify minimum length for passwords, creating excerpts of text whatever
 
to be honest i'm lazy and just limit fields like that in javascript (and have a max in the database, with an error returned making validation fail)
 
There are numerous usecases
 
@webarto SMS is codepoint-length restricted and not byte-restricted?
 
@NikiC I don't know, leave me alone, leaveeee me alooooneeeee! :P
 
@NikiC, real world example I use is twitter.
checkmate :D
 
5:54 PM
Thing is when working with strings (in userland) people are often working with strings and not with a collection of bytes (in PHP that is)
 
So guys explain to me why you want to measure anything in code points and why it is relevant? I mean it's not relevant for store (byte-based) and its not relevant to the user, as one user-perceived character can consist of a lot of code points...
 
a guy here two days ago was also making excerpts in russian, @NikiC
it failed horribly because of string mangling with plain string manipulation
 
@Hiroto do you have a link to that maybe?
 
3 mins ago, by PeeHaa
verify minimum length for passwords, creating excerpts of text whatever
 
@PeeHaa Okay, so lets talk about that
 
5:57 PM
PeeHaa and Gordon were there, and I was at work. feel free to trawl through the transcripts :p
 
Let's start with passwords. Give me a sec...
 
kk
 
are you playing devil's advocate here on purpose? :o
 
I might be going to eat soon, but I'll read it back if I'm suddenly gone
 
@PeeHaa Okay, let's say you have a minimum password length of 5 characters and you'll use mb_strlen to very that. Can you explain to me why "Åbcd" isn't a valid password but "Åbcd" is?
Both seem kinda the same to me, but your form rejects the first, but allows the second!
Why does it do that?!
@Hiroto sure ^^ I try to understand the issue
 
6:01 PM
@NikiC Those strings are the same
 
The use cases mostly revolve around non-english string manipulation, NikiC. splitting unicode with str_* will quite often leave you with a few (often many) � symbols
 
@PeeHaa That may be because I suck at writing Unicode ^^ One is supposed to be Å and the other an A with a ° combining ring ;)
 
they are both 4 characters in unicode
 
@Hiroto Yeah, my particular strings might be (as already pointed out). But I meant the first to be 4 codepoints and second to be 5 codepoints ;)
The point is that to the user "N codepoints" has very little meaning. "N graphemes" is what is relevant
 
@NikiC uhh, technically in a password the number of codepoints decides the entropy :o
 
6:11 PM
@Hiroto :D
@Hiroto arguing along that line I would say that the codeunits decide the entropy ^^
 
(even more technically, and i know you know this, it's the number of bytes and possible combinations, too >:D)
 
@Hiroto yeah right ;)
 
but still, the point i argued was that string manipulation is the reason for mb_*
you can't alter it reliably without something that understands what unicode even is
(I really can't wait until I can type all of my variable and function names in japanese in PHP)
3
 
@Hiroto The only thing that I can acknowledge thus far is this one, assuming that you mean that substr with a hardcoded length will not work correctly.
@Hiroto You can ^^
 
as of what version?
 
6:15 PM
@Hiroto as of ever since
18
Q: Exotic names for methods, constants, variables and fields - Bug or Feature?

Gordonafter some confusion in the comments to Is it safe to have 1 letter class names in PHP, e.g A, B, C I thought I make into a question. According to the PHP manual, a valid class name should match against [a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*. But apparently, this is not enforced, nor does i...

 
whaaaat. brb refactoring everything
 
@Hiroto But then again, if you want "The first 80 characters" what is it that you mean and does PHP have the right to decide it for you? "The first 80 characters" to me could mean anything from mb_strcut, mb_substr and grapheme_substr.
 
@NikiC which is why i said it was all a big hack :3
 
@Hiroto You mean that Unicode is a big hack by being so complicated?
 
@NikiC yes. that definitely
 
6:17 PM
I mean, this is a decision that Unicode requires of you, there is no way around it. PHP can only do a bad choice for you ;)
food
 
@Hiroto: function £($kg) { return $kg*2.20462262; }
 
http://stackoverflow.com/questions/15325487/checking-if-sql-query-was-excuted-in-pdo
PHP experts.
 
@kaᵠ function やらないか($テキスト, $計画) { }
 
@Hiroto NO WAY !
 
6:24 PM
function 日本人彼女募集中() {}
3
 
@Hiroto pin+print that to show people how programming code looks like :rofl
 
Hi all
 
Ahoy
 
@PeeHaa ... how are you doing
 
ಠ_ಠ()
 
6:25 PM
hi @Baba
 
@Ocramius
 
@Gordon Congratulations in Advance :)
 
@Baba thanks but do not count my chickens before they are hatched.
 
@PeeHaa Check this Job Benefits kiloo.com/#benefits
 
free beer?
 
6:27 PM
@Gordon It not a counting it been optimistic
 
sign me up
 
@Hiroto how did you see that ?
lol
 
@Baba i was only fifth in the primary and they are looking for four mods only so it's not a sure thing I'll get elected
 
@Hiroto that was specifically for @PeeHaa
 
@Hiroto who when why what where?
 
6:29 PM
@Baba but thanks ;)
 
really? free beer?
 
messages in here are public, lol
 
@Gordon Am been hopeful .. don't worry you have full support
@Ocramius Yes .. am loving the Job already
They Design Subway Surfers number 6 game now
In just a short period
thanks to the beer
the working is flowing properly
 
lol
 
6:34 PM
Looking for something to do today? Apply to Hacker School -- it could change your life :) https://www.hackerschool.com/apply?r=t1
 
Never use C++ style comments ?? that is new
 
Reggie is a terrible hacker http://twitpic.com/caakyw
 
@Baba nah, not new
 
@NikiC really am seeing it for the first time
PHP supports 'C', 'C++' and Unix shell-style (Perl style) comments. For example:
Why is it so hidden
 
@Baba Uhm, that file is not about comments in PHP ;)
It's about comments in the C source code
 
6:44 PM
@NikiC Why do i keep mixing the 2 .... lol thanks
 
resen :)
 
Hello Everyone!
 
@Connor hi
 
@Gordon How ya doin?
 
@Connor good. thanks. how about you?
 
6:50 PM
@Gordon Yeah im cool, just looking for a text editor, im not a big fan of TinyMCE Though
 
yesterday, by rdlowrey
Public Service Announcement: when someone helps you in chat, please take a moment to see if they have an -worthy answer.
I assume "an" is the keyword here
 
@BoltClock how you mean?
 
@NikiC If you vote on too many answers from the same person the system will get suspicious. Votes are meant to be directed based on content and not the user who posted that content
But while I wouldn't say you should completely not look at who posted something (that's why you have reputation!), my advice is to not focus too much on the user posting something
And that means for example don't get overzealous with your votes. If you know that this person knows what they're talking about and you know that their answer is useful, vote it up. If you think they done screw-up then downvote and chide them for their drunkenness. But don't go randomly upvoting someone's posts just because you have a crush on them, is basically what I'm saying.
 

« first day (876 days earlier)      last day (4058 days later) »