« first day (1067 days earlier)      last day (3895 days later) » 

1:00 PM
@JoeWatkins The simplest setup, first arg is any non-zero-length string. That should effectively translate foo to \66\6f\6f. In a nutshell the function takes a subject string, 2nd a list of chars not to escape, 3rd is flags. If either of the two recognised flags is passed, only translate the relevant char list(s), otherwise translate everything, except the chars in the ignore list
 
hey, I have a question about jobs command in linux. I have no which jobs success, nor alias | grep jobs success. Also there's no man -a jobs result and no success with find /usr - name "jobs" or something similar. Despite this when I type jobs -l I see empty output, instead of expected -bash: jobs: command not found
I'm under Slackware 14 (google gave irrelevant result)
 
I actually had it all working at one point (without the ignore list) but it was a bunch of nested loops and it was a bit O(scary) and generally not very good. The idea of this approach is to pre-process a translation map and then apply it to the subject.
 
any ideas how this ghost command could exists?
 
I'm also not enormously happy with the loop the subject once to find the output length -> emalloc -> loop again to do the translation but I think that's really the only way that wouldn't involve a bunch of reallocs?
btw, the map should just be an array of 256 1/0 for translate/don't at each byte value, it's not a string
 
ah one sec ...
static void php_ldap_make_escape_map(unsigned char **map, const unsigned char *ignores, const int ignoreslen, const unsigned char *chars, const int charslen)
{
        int i;

        if (!*map) {
                (*map) = (unsigned char *)calloc(256, sizeof(char));

                if (!chars) {
                        for (i = 0; i < 256; i++) {
                                (*map)[i] = 1;
                        }
                        return;
                }
        }

        if (chars) {
 
1:10 PM
morning
 
morning yo @CarrieKendall
 
see the problem ?
I mean you know why it works?
 
@JoeWatkins why the calloc? :(
 
should be ecalloc, I'm outside of zend
 
@JoeWatkins I mean, why do you initialize to zero?
 
1:13 PM
not my code ...
 
ah
okay
 
@JoeWatkins maybe, one sec just let my brain process that
@NikiC Because I want (effectively) an array of bools, initialised to false
 
@DaveRandom I won't pretend to understand that code
It has too many branches with unclear dependencies for me
 
Yeh even I can see that it's a pretty bad way of achieving what I want tbh, I've just not wrapped my head around what the right way is
 
can you see what other change should be made so that the code will run/work ?
and can you tell me why it had to be changed at all ??
 
1:19 PM
Oh yeh I can see that I'd need to pass the arg as &map, I'm just trying to explain why (I have a piece of paper in front of me and everything :-P)
 
I have it working as you intended, you are nearly there, work it out and you'll spot how to make it run as you wanted it to ...
 
Hello!
 
@PeeHaa lol
I also modify all my PHP files in the middle of execution :)
 
@NikiC and then use runkit_function_redefine on it additionally
 
1:25 PM
@DaveRandom I'd really like to put you out of your misery, give you the working code and tell you which chapters to read next ... don't torture yourself ...
it's not giving in if you are moving forwards ...
 
@JoeWatkins I figure the way to make it work like I want is to do the same thing with result in the do_escape() function (it looked wrong when I wrote it without the & tbh). It's all pointer-to-pointer issues, I need to visualise the mechanics of it
 
you got it ... you need to read more about pointers, how to reference them, how to pass them ...
you can compile outside of zend
 
@ircmaxell I submitted to Confoo and SunshinePHP, so if you have an idea for anything additional we could hold together, let me know.
 
http://stackoverflow.com/questions/4595964/who-needs-singletons
 
@NullPoiиteя You have already voted to reopen this question :-(
 
1:30 PM
@bwoebi yes :) but why so sad ?
 
@NullPoiиteя because I can't cast a vote now? I'm just getting the error??
 
@JoeWatkins Presumably none of this would have been an issue if I'd kept the whole thing in a single routine, it's the process of passing those pointers to other entities that was "breaking" it (right?) - that's the bit I'm not getting. So a pointer is effectively an int, why can't I just pass that int to another routine and it will still point to the right bit of memory? Or is that the wrong way of looking at it (presumably it is)
 
@PeeHaa Gotta hand it to the guy, he knows how to remove distractions and get shit done
 
Sep 13 at 7:43, by Simon _eQ
@Gordon thank you. Now please suspend me for a week. you'll probably enjoy it this time :)
 
1:35 PM
lol
 
@PeeHaa he asks about it frequently
was the third of fourth time
 
@DaveRandom I'll have a go at explaining ... I think NikiC might have a better explanation, but I'll have a go ...
C is pass by value; when you declare func(char *str) and call str(data) the pointer received by the function is a copy of the original pointer to the same address, when you declare(char **str) and call str(&data) again the function recieves a copy of the pointer to the pointer, by de-referencing the pointer (*data) you are accessing the same actual pointer to the same address is memory ...
it is a rather tricky thing to put into words ...
 
Is Simon currently suspended?
 
usually you say "a pointer to a pointer" to someone who doesn't write C and they stop listening that's overload ...
 
@Gordon No need to defend yourself :)
 
1:42 PM
I thought he was being quiet...
 
school run, back soon ...
 
@Fabien yes. he asks me to do that for him when chat distracts him too much from stuff he needs to get done
 
@Gordon you can ban a user from a particular chat room?
 
@Mr.Alien no
 
@Gordon oh ok, cuz I don't see any ban notice on his profile page
 
1:47 PM
Why are always so few malteaser ones in the Celebrations pack? :(
If they sold one with pure malteasers, I would buy it.
 
hi to all
 
@JoeWatkins That all makes sense, amazingly. What I don't get is: why does this only seem to matter in a write context? The behaviour is a lot like pass-by-ref in PHP - you only need to do it if the sub-routine is going to modify the data that the pointer points to.
 
i refer this site for making clickable phone link in smart phones but not working
so anyone help me
 
@JoeWatkins I'm going to stop bugging you now and go read some more, thanks for all your help :-)
 
1:51 PM
@karthys not really PHP specific huh. Anyways, what doesnt work? the tel:// way or the writing the numbers correct way? And do you have a example page to look at?
 
@karthys what's not working? where are you testing it, and what code have you put?
 
Hey everybody.
Someone here who already used the CouchDB ODM Bundle for Doctrine? I'm trying to figure out what's off with the documentation as I'm constantly running into an error. Want to narrow it down before asking a question on the main site.
 
@reikyoushin @hank i am using dolphin framework in php
 
+1 php-errors as php synonym please.. rediculous tag.. stackoverflow.com/tags/php/synonyms
 
2:01 PM
my code is <a href='tel:".$aProfileInfo['Business_Phone']."'><button>".$aProfileInfo['Business_‌​Phone']."</button></a><br>
@reikyoushin @hank
 
and the generated code? the guide states you should write tel://phoneno
not tel:phoneno
 
thats also i try it but not working
 
@karthys you mean <a href='tel:<?php echo $aProfileInfo['Business_Phone']?>'><button><?php echo $aProfileInfo['Business_Phone']?></button></a><br>
 
Needs just 1 more vote
 
@karthys if you view source code, what do you see?
 
2:04 PM
its mobile app
 
@Gordon im supposed to ask you something but i forgot about it. @levi said im supposed to ask you about it. T-T
 
@reikyoushin in that case: 42
 
@karthys so, it still spits out html somewhere, look at it.
 
@karthys yes, but if you look on it on a normal browser, what does the source code say?
@Gordon what's 42? >.<
 
2:07 PM
 
<a href='tel:+919944470958'> and this is what we see in source
 
@karthys try removing the button?
 
which is wrong.
 
hank you're pulling th ephone number
what are you expecting ?
 
@reikyoushin but my client ask button there, it should need
 
2:09 PM
I expect exactly that, its not my code. :)
 
:}~
<?php echo $aProfileInfo['Business_Phone'];?>
back in my day a phone was tired to the wall
 
> Navigation must be flexible like old one. Like can easily move between pages also have left navigation as well
^ That's a comment on beta php.net. What on earth are they talking about?
 
@Pogrindis this code assign for one variable then this variable bind for mobile template
 
i see
 
2:13 PM
@LeviMorrison maybe the next/prev links? but really, just delete it :)
 
@NikiC Oh, good call. That's probably what they are talking about.
 
@NikiC Noooooo it is a valid point
When going through some book I really loved those next/orev things
 
@NikiC never heard of Variadic functions, but me likes .. too bad i can't vote.
 
@DamienOvereem It will go through with or without your vote ;)
 
I noticed :)
do wonder bout the reasons behind the 1 "No" vote
 
2:17 PM
@karthys then do this instead: <button onclick="window.location=tel://<?php echo $aProfileInfo['Business_Phone'];?>"><?php echo $aProfileInfo['Business_Phone'];?></button>
@DamienOvereem yesterday i was like that too.. ^_^
 
@PeeHaa Wish the same for named parameters. This is my second favorite feature after getter/setter syntax (I hope the latter will be implemented in 6).
 
(it's not levi but teresko, my memory sucks!)
 
@PeeHaa Then you don't need them at the top, but the bottom of the article.
 
@reikyoushin question bans never wear off. You have to actively work to lift the qban. See meta.stackoverflow.com/questions/86997/…
 
@reikyoushin k
 
2:21 PM
@gordon Benelux?
 
@karthys tell me if it works
 
also, want to do a solid workshop or something like that together?
 
@Gordon ooh. hope i dont need to be in their shoes.. >.<
 
@ircmaxell No. Canadada and Miami. When is Benelux?
 
January.
I know, saw your message. Was asking if you are planning on Benelux, since its way closer
Oh and hello from Miami airport...
 
2:23 PM
@ircmaxell ah well, I can submit the same three I submitted to the others. Benelux has good beer I hear
@ircmaxell yeah, SOLID workshop would be fine.
 
Yes, great beer.
 
@LeviMorrison I'm not sure where I need them, but I do miss them
 
let's discuss the details and submit tomorrow. Once I am home and have time to think. And not worry about flying through storms...
 
@ircmaxell cool
 
Yeah. The rain is FUBAR right now...
 
2:29 PM
On this bash, how I do I tell it not to wait for the return of the command it runs and just keep going? If I was running it in the terminal & should have sufficed.
 
@ircmaxell why are you in Miami anyway and not flying from NYC directly?
 
Work trip
Going home for 3 days. Fling to Prague on Saturday night
 
@karthys but the best way to do this is: create a CSS button with <a href="tel://123456789">123456789</a>
 
@reikyoushin not working
@reikyoushin without button also not working
 
NM got my answer. The backticks were gimping me over.
 
2:38 PM
@karthys try this? http://jsfiddle.net/vCUWm/ jsfiddle.net/vCUWm/1
 
evening
 
@tereško evening, there i just used strikethrough again. XP
 
@PeeHaa ohhh I see...
 
These Mario 64 Speed Runs are something else.
 
@Fabien still looking for a cheap vps on germany?
 
2:48 PM
@reikyoushin Nah. We picked some place. France too.
 
@Fabien if you still need one though you can check here (there are other locations too)
 
@reikyoushin cheers. I think we went vps9.net for Germany and edis for France.
 
> I asked more questions than i could answer here. I am very much impressed with the way how the experts answer all my typical questions in a matter of minutes. Though i cannot compete with them here, i would at least like to contribute some useful questions that help other developers in the future. Some of the experts i would like to mention are: Pekka, Gordon and ircmaxell.
from blog.stackoverflow.com/2013/09/… /cc @ircmaxell @pekka웃
 
@Fabien oh, cool. that's different from the vps you were setting up yesterday right?
 
@reikyoushin Yeah this was work asking to find something.
 
2:54 PM
lol ... "experts" usually answer questions with about 1-4 day delay
 
hello guys
 
Is my assessment of the problem here accurate?
 
@yvonnezoe Whats your question?
 
do u know where should i ask about how to create a sql table
and using php
 
@yvonnezoe yes, ask here google.com
 
2:56 PM
i'm kinda lost.... and dunno how to get started with my assignement
not funny
 
@yvonnezoe Am serious
 
@yvonnezoe Mr. Alien is not teaching you how to do it, but showing you how you can teach yourself to do it.
 
HAHAHA.
nice bs
 
@Fabien ignore ;)
 
Yeah /end that conversation
 
3:01 PM
guys. be nice.
 
i'm a bit torn between thinking to be nice to newcomers YET not babysitting them.. (so i'll just sit on the sidelines)
 
Fucking PHP references.
 
@DanLugg not behaving?
 
@Gordon I was just helping gordy, anyways @yvonnezoe if gordon says, than I am sorry if you felt I was rude with you but am still going to tell you the same thing, use google,read articles, fiddle the things, if you hit a wall, come back, we will help you
 
@Orangepill Not at all.
So, $a = ['a' => &$a]; behaves as expected, creating a recursive reference.
But given:
class B {
    private $b;
    public function __construct($bf) { $this->b = $bf(); }
}
If I do:
$b = new B(function () use (&$b) {
    return $b;
});
Its $b->b is null; I would expect the late binding to make it work.
Or.. wait. I've got the timing wrong I think.
 
3:04 PM
@Mr.Alien I'd appreciate if you'd not abbreviate my name like that. thanks.
 
@Gordon aah am fine with Gordon ;)
 
@Gordon Abbreviate it? From what, Gordon the Great and Powerful? ;-)
"We're off to see the wizard the wonderful wizard of ... E_NO_WIZARD"
@Orangepill I swear I've created self referencing objects, passing via the constructor using late binding.
 
@igorw y u no answering my DM? :)
 
@Gordon I am an expert at ignoring those things :-( it's on my todo list
@DanLugg why exactly are you doing this? also, how about $this->b = $bf ? $bf() : $this;
 
@igorw can also ping me in IRC about it if you want to know more
 
3:09 PM
@igorw Nah, that won't work.
 
@DanLugg I don't know that the object can be referenced as anything but $this in the constructor...
 
@DanLugg StackOverlord Gordon
 
@Gordon Ah, right. Sorry, your badge was covered by your medals.
 
aka Modrater aka triggerhappy monkey with guns
 
3:12 PM
guys, anybody familiar with qmail?
 
@bwoebi I think @Ocramius is just trolling you a bit :)
 
@NikiC I don't need trolls on the internals :-/ (at least I didn't expect it from him)
 
@bwoebi "I don't need trolls on the internals". Sorry, you may have missed the point of internals then.
;-)
 
@DanLugg I always thought internals would be more serious than reddit ;-P
 
He's back! Got out of detention I see?
 
3:16 PM
@DanLugg He has read-only?
 
Ohhh. Nevermind then.
 
@Simon_eQ you are banned, go away :P
 
@Mr.Alien what did he do anyway? XP
 
@reikyoushin He told Gordon to ban him
 
@Mr.Alien because?
 
3:22 PM
@reikyoushin may be cuz he wastes his tym too much in this room, so to prevent wasting more tym, he banned himself
 
@Mr.Alien i dont understand him. oh well. :P
 
@reikyoushin ya, but he is gud
 
:-)
 
blah
 
@ircmaxell Ahoy matey.
 
3:33 PM
print "a".2; results in? (without executing, you cheater!)
 
@Gordon you mean "a"..2?
 
579
Q: Why does HTML think “chucknorris” is a color?

user456584How come certain random strings produce various colors when entered as background colors in HTML? For example: <body bgcolor="chucknorris"> test </body> ...produces a document with a red background across all browsers and platforms. Interestingly, while chucknorri produces a red background as...

 
user652649
hi every1
 
@bwoebi no. I mean exactly print "a".2;
 
Anyone else struggle reading ebooks from the monitor? :-/
 
3:37 PM
@Gordon hrmm...I would think 'a2' but I have a feeling this is a trick question and it is something silly like 0.2
 
@Fabien I :)
 
@cspray 'a2' is wrong ;)
 
user652649
i have a big problem i always fall into, i think it is some php's bug
 
@Gordon lxr.php.net/xref/PHP_5_5/Zend/zend_language_scanner.l#1009 a DNUM should have precedence here
 
@bwoebi so? what's the output?
 
3:39 PM
@Gordon and without concat token it should be a parse error like unexpected T_DNUM
 
user652649
basically i'm running a batch where every loop is run inside a function scope, because i thought it would clear memory, garbage collects variables etc, but it doesn't
 
@bwoebi correct 3v4l.org/hgO2i
 
user652649
even if i don't store anything outside that function scope
 
user652649
the memory used increases at each step, resulting in a Fatal error: Allowed memory size...
 
user652649
someone interested to see the code?
 
3:43 PM
@JoeWatkins @NikiC whenever you have a minute, github.com/DaveRandom/php-src/commit/…
(and please be as unkind as possible)
 
> $sql = "SELECT * FROM users WHERE email='$email' AND password='$password' LIMIT 1";
 
@DaveRandom aaargh. my eyes!!!!!11
 
user652649
hey @DaveRandom do you remember i already had this issue?
 
@Gordon :-P
 
3:44 PM
@DaveRandom :)
 
@NullPoiиteя
 
@DaveRandom aaah! nice C code! ;-D
 
@bwoebi Oh I'll happily take reviews from you as well if you have an opinion :-)
@Wes Not really, but I'll take a look at teh codez
 
user652649
k thank you i'm preparing the code
 
@DaveRandom well, no. It looks fine at the first look… but @NikiC is the only one who can have a deeper look there
 
3:51 PM
Ok, it's official CouchDB Bundle for Doctrine is driving me crazy.
 
@bwoebi Yes, he expressed distaste at the ecalloc() earlier (without context), I'm not sure if that will still be the case in context and I'm not sure why in any case :-S
 
could be resolved via an extra rule in expr_without_variable:

| expr T_DNUMBER { ZEND_LVAL($$.u.constant) = <some code from http://lxr.php.net/xref/PHP_5_5/Zend/zend_language_scanner.l#1523 here with an if (ZEND_STRVAL($$.u.constant[0]) == '.')>; zend_do_binary_op(ZEND_CONCAT, &$$, &$1, &$2 TSRMLS_CC); }

and a change the T_DNUMBER entry in common_scalar:

| T_DNUMBER { $$ = $1; Z_DVAL($$.u.constant) = zend_strtod(Z_STRVAL($$.u.constant), NULL); }

and in language_scanner.l under the DNUM entry (http://lxr.php.net/xref/PHP_5_5/Zend/zend_language_scanner.l#1587) (ins
 
Why was end() created but not beginning() :(
or w/e you'd refer to the opposite of end as
 
@Fabien first() is php.net/reset in php
 
user652649
sorry @DaveRandom i'm reducing code amount and isolating the problem, just a moment
 
3:57 PM
@NullPoiиteя "Taking about security" seems you missed an 'l'
 
@Gordon Awesome :). When are you implementing up-voting from chat? :P
 
@Gordon isnt last() a better pair than end()?
 
@reikyoushin yupp thanks
 
@Gordon but even when we try to resolve this, what would we do on "a".0.3? "a03" or "a0.3"?
 
@Gordon Ah been a long while since I saw this page.
 
3:58 PM
@reikyoushin end and reset move the array pointer. they dont just give you first and last for that matter
@bwoebi I am not trying to resolve this. it was just trivia ;)
 
@Gordon I know. And before just putting too much C in the chat, I go back to work on the C code of the PHP source…
 
@Wes no worries
 
@DaveRandom github.com/DaveRandom/php-src/commit/… => you only need *map here, not **map. If escape is a boolean, it should be zend_bool, not char
In the main function, why do you allocate map? I'd use unsigned char map[256] = {0}; instead
 
who's using php+qmail instead of sendmail here?
 
Hey everyone!
 
4:09 PM
Hi @Appu
 
what's up
 
reading the Netsa predicitons for how the people of london will be in 2023 - had to laugh at this one: nesta.org.uk/news_and_features/future_londoners/…
 
@NullPoiиteя Is that you with that big mustache which is eye-catching
 
@Appu yes :)
 
user652649
@DaveRandom pastebin.com/AGk69Dez even with this simple code that basically does nothing, it just traverses a table, i get the memory increasing at every step
 
4:16 PM
Great
 
user652649
@DaveRandom pastebin.com/jVN87PsB memory is getting higher and higher... idk maybe i'm doing something wrong...
 
@NikiC OK I was trying that earlier, and the fix was **map. Now (and I have refactored some other stuff as well) that works. W. T. F. I do not understand how I can be not understanding some of this stuff so badly :-(
@NikiC I tried that at one point and had issues passing it around, how would that change the supplementary function signatures?
 
@Wes It's the recursion... its causing the stack to blow.
 
user652649
let me try with a while(true) @Orangepill wait
 
@Wes Yeh PHP doesn't do tail recursion. None of the memory is freed until the last iteration of the recursion.
 
user652649
4:20 PM
there are a bunch of unset() though
 
@Wes Unset doesn't do GC, it just marks things as dead. Also you know you can pass unset($multiple, $vars);?
 
user652649
yes i know xD
 
user652649
well, that was the problem, i guess i should have thought it was caused by recursion
 
user652649
i still get 4 byte increase between each step though. but it's good enough
 
user652649
thank you for help :P
 
4:30 PM
@Wes With what code?
 
user652649
while(true)
if(executeONE($mysqli)) break;
 
user652649
just that
 
@Wes Meh, that's pretty hard to say why it would be doing that, but 4 bytes is way smaller than the smallest variable so it must be something internal to PHP
 
user652649
the smallest variable size is?
 
@Wes 32 bytes
(sizeof(zval))
 
user652649
4:36 PM
@bwoebi that's a lot
 
user652649
how about bits?
 
@Wes bits? 256^^
 
@bwoebi sizeof zval is not 32...
 
@NikiC well, depends on if it's 64 or 32 bit
 
@bwoebi its not 32 bytes in either case
unless I'm totally going crazy, of course
@bwoebi maybe you mean sizeof zval_gc_info?
 
4:41 PM
2 * uchar + 1 * uint in _zval_struct and then in zvalue_value: 1 * (u)int + 1 * ptr
 
Also, check my answer on same question and see if it's correct, because I'm not 100% sure (I'm looking at you @ircmaxell)
 
@bwoebi so? that's not 32 bytes. Unless you are using something really really really weird like an ILP64 system
 
@NikiC that's what I'm wondering too…
well… you're right. It's the _temp_variable size… not zval. I'm working too much with the zend_op's ...^^
 
4:59 PM
@bwoebi I don't get what you mean
 

« first day (1067 days earlier)      last day (3895 days later) »