« first day (1438 days earlier)      last day (3507 days later) » 

8:00 PM
or maybe it was never inline
one of the two, for timing safety
 
php also has never-inline annotations in a few places: lxr.php.net/…
 
I have some starter work on inlining done for Recki
going to introduce an @inline annotation for it :-)
 
as far as I understand, there's no Z_IVAL_P?
i.e. int?
 
LVAL
 
'annotation' ;o;
 
8:07 PM
also: trunk? or 5.6?
 
@ircmaxell yeah, but that's long
@ircmaxell trunk
 
@FlorianMargaine PHP has no int type, only long
 
@Danack recki also uses @param and @return annotations...
 
I need to cast to int then
 
8:07 PM
why do you need an int?
 
because this method requires it: xmlNode *php_dom_libxml_hash_iter(xmlHashTable *ht, int index) /* {{{ */
and I get a zval *offset
 
ah ok
 
so... int index = (int) Z_LVAL_P(offset);
just wanted to confirm
 
Well
you don't want to directly get that
because it may be a different type than a Long
 
oh, fun things
 
@FlorianMargaine the zval might have a different type
 
yeah
I tried with a string index... I get fun stuff
UNKNOWN:0
going to see how I can check out the type
to have a clear error message
 
Z_TYPE(zv)
 
thanks
hm
 
8:13 PM
alternatively you may want to perform a cast, using zval_get_long(offset). Depending on the context
 
in this case that may be apropriate
 
trying out
hm
it's casted to 0, I guess
that sounds like a hard to find bug, doesn't it?
or is it in the spirit of php, i.e. very dynamic?
 
@FlorianMargaine What was the input that cast to 0?
 
offset is the index... like Object[index]
'test'
 
That does cast to 0
What else would you expect?
 
8:16 PM
should I let it cast (i.e. use zval_get_long) or throw an error?
 
> To prevent bending, iPhone 6 Plus owners may want to remove their iPhones from their pockets before sitting or bending.
hahaha
 
@FlorianMargaine Cast, because of the promiscuous nature of PHP, people expect '1' to behave the same as 1
 
@DaveRandom k
now... how can I refactor...
 
@ircmaxell LOOOL … I miss the nicely small iPhone 4s…
 
8:20 PM
I find it funny that Apple spent years making fun of Samsung and other manufacturers that "nobody needs large phones". They sued Samsung, publicly claiming that they "just were imitators". Then they decide to do a large phone, and they couldn't even do it without screwing it up. Really quite funny
 
@ircmaxell Well. That's because Jobs isn't there.
 
bullshit
Jobs was a salesmen
he could sell a catsup popsicle to a woman in white gloves on the hottest day of summer
he knew how to make people want a product. And he knew how to make people believe in a brand image...
 
still, Jobs had its own ideas how the product should look like.
 
Yes, he knew how to make a product he could sell
 
8:24 PM
/me is cooking, later
 
@ircmaxell that. Today people just buy iPhones, not because they like it, but because Jobs had given them once something they like (or made them like it) and now they're used to it.
 
@PeeHaa awesome
 
@webarto youtube.com/… :)
 
user895378
> To prevent bending, iPhone 6 Plus owners may want to remove their iPhones from their pockets before sitting or bending. If a pocket is unavoidable, then customers may want to place their device in a roomier pocket that allows the device to slide out the way.
 
user895378
8:33 PM
Wow, target demographic.
 
have you guys seen how igor's issue turned out? github.com/igorw/retry/issues/3
 
I want a iPhone 6s mini next year… ^^
 
@JoeWatkins ^*2
 
Hope I won't wreck it first month :)
 
Yup. Spend $400+ on the newest lightest and thinnest phone, just to wrap it in 6 cm of foam and plastic. Because fragile
 
8:39 PM
everything less than 2/3 cm is too thin…
 
lol
 
@FlorianMargaine :D It seems like everyone missed that igor was just trolling
 
@ircmaxell I don't need that, I need power and options and not fragile.
If there was not-so-fragile fat version, I would opt for that.
By the way it's Galaxy S5 for me, not iPhone.
Because I'm not f* insane. iPhone is viable option only in USA; here it costs like 1300€, S5 is 400€.
 
@FlorianMargaine And then I cannot believe that… github.com/igorw/retry/blob/master/src/retry.php#L13 he didn't write if (!$retries--) instead of that if check and then a separate decrement later!
@webarto 1300? lol
 
@FlorianMargaine I internally compile whiles to goto loops in Recki
 
8:46 PM
blasphemy!
 
no, my backend has no notion of a while, or an if statement, or a for.
just jump and conditional jump (jumpz which jumps if the argument is 0, and jumpnz which jumps if its not zero)
 
@ircmaxell I wonder why while loops are often compiled in that particular way, i.e. using the example from your docs:
 
what do you mean? as a series of jumps?
 
label_1:
if (!$a) {
    goto label_2;
}
b();
goto label_1;
label_2:
It would make much more sense to me to do it like this:
goto label_2;
label_1:
b();
label_2:
if ($a) {
    goto label_1;
}
 
yeah, take out the 2nd jump
 
8:49 PM
php also compiles to the first form btw. seen it in various places, don't know why
seems like a cheap way to save one jump per iteration
 
so I do have some ideas on optimizing loop structures in general
which would be transforms applied to the graph, so even goto statements would receive the optimization
around ordering and removing jumps.
I did it the first way because I only had a jumpz operator initially, so to do the second would have required a second jump operator
actually, I still only have a jumpz operator: github.com/google/recki-ct/tree/master/lib/ReckiCT/Graph/Vertex
@jmikola @ircmaxell @igorwhiletrue http://t.co/uwCAM4HjHM
I also want to introduce a jumpnz operator, and then optimize to remove out ! operators on jumps
 
hahaha
ok... how is it possible to have this kind of error: pastie.margaine.com/5f43870c-4331-4263-b203-e83b03336bd7
 error: ‘tsrm_ls’ undeclared (first use in this function)
 #define TSRMLS_C tsrm_ls
                  ^
 
@FlorianMargaine well, is the tsrm_ls variable defined in that function _dom_nodelist_item?
 
of course not
oh wait...
 
then you need to first fetch it… (or pass it in the declaration)
 
9:03 PM
effin macros
 
9:16 PM
hmmm, need to implement tests for random functions :/
aside from bad args..
 
wrong number of args?
 
thats taken care of by the function signatures
 
true
checking the range
 
user895378
So all this talk about goto today ... Room 11 has been in on this for valid use cases for years.
 
something about a parser for a custom protocol between server and workers in an rdlowrey library springs to mind
 
user895378
9:23 PM
goto is the only sensible way to write a parser in php userland if you want to maximize performance :)
 
I know :) my first attempt at a markdown parser was covered in gotos
 
user895378
I haven't personally encountered any non-parser use cases in userland where I thought goto was appropriate, though.
 
user895378
Dogmatically cage the goto Velociraptor at your peril.
 
Really stuck... deterministic tests for PRNG functions, where seeding is not available
 
4
 
9:35 PM
@rdlowrey there are a few cases where goto looks cleaner than a do {} while (0); hell filled with breaks over multiple levels.
but these cases are rare too.
 
@DaveRandom is it bad if the code of dom_nodelist_item is duplicated? :>
 
@FlorianMargaine duplicating code is usually the last solution before vandalizing the original code.
 
I'll see what I can do without vandalizing the original code...
 
9:53 PM
@FlorianMargaine duplicated how?
 
@DaveRandom j/k, refactoring the code is just a little hard
 
care to share?
 
@Leigh since which version is mt available?
 
it's basically a copy paste of dom_nodelist_item
 
9:55 PM
@NikiC I think 3.x but let me trawl changelogs
 
@Leigh I hate that gmp has no decent version info
can't be too hard to include a "since xyz" next to functions
 
@DaveRandom also, has_dimension is almost the same too...
but slightly different
oh well
gotta go, I'll see tomorrow
 
@FlorianMargaine refactor dom_nodelist_item to call the new code then
 
@NikiC it was there in 2006...
2002....
I think we're safe
 
Looks like it's mostly that if/else etc tree that's duplicated, so pull that out into another function
 
10:00 PM
@DaveRandom yup, but there's many hidden variables
the macros are not very hygienic
 
@Leigh what version?
 
who knows!
 
I got something compiling... but not working
I'll see tomorrow anyway.
@DaveRandom this is what the test file looks like anyway github.com/Ralt/php-src/blob/…
 
@FlorianMargaine Don't be afraid the clean stuff up. Ideally make the change as small and self-contained as possible, but if there's something wrong then fix it.
 
@NikiC 4.2
 
10:01 PM
I might kick it about a bit so I understand the problem
 
yea OK, I'll wrap in 42_OR_NEWER
but seriously... 2002
 
[charles@lobotomy ~]$ cat /etc/redhat-release
CentOS release 5.10 (Final)
[charles@lobotomy ~]$ php -a
Interactive shell

php > echo GMP_VERSION;
4.1.4
php > echo phpversion();
5.6.0
 
@DaveRandom I won't work on it before thursday I think, maybe tomorrow night. So feel free to pull my branch :)
 
Yay "enterprise" long-term support operating systems!
 
@FlorianMargaine I'll have a look at it in a bit, going to have to go do some cooking maintenance shortly but after that I should be good
 
10:04 PM
@Leigh I was mainly thinking whether we can expose seeding. But we can't do that if we don't have a uniform algorithm.
 
#if !GMP_42_OR_NEWER
    php_error_docref(NULL TSRMLS_CC, E_ERROR, "No Charles.... no!");
#endif
fixed
@NikiC well we can..... we can pivot the tests on GMP_VERSION
mt and lcg both use the same seed function
 
what php version are you targeting?
 
@DaveRandom k, thanks
good night everybody
 
5.6... guess it should be left at lc_2exp
 
don't know if this will be going into 5.6
 
10:08 PM
@Leigh Just be prepared for Remi Collet and all the other new-PHP-on-RHEL5 folks to cry a little, that's all. :)
@FlorianMargaine night!
 
@NikiC precedent is set ;) (by you, even)
@Charles no new-GMP-on-RHEL5 folks?
 
@Leigh It's a system-level shared library provided by the OS, and I'm ignorant enough of what impact updating it would break. I'm also not sure what impact statically linking a modern version would have.
 
@Charles you know about as much as me then tbh
 
@Charles good idea, I'll drop support for gmp < 4.2 from php 7 tomorrow
 
@Leigh Sounds like a problem best fixed by version gating and "if your GMP is prehistoric then this function no workie" docs.
@NikiC Fine with me, I suppose, I hope to have this machine dead and buried by the time 7 is really a thing.
We'll see who else whines.
 
10:13 PM
there's only things that require explicit support for GMP < 4.2
 
Also, I don't think different version requirements are a problem for distros with someone serious managing php packages (which of course includes remi)
can simply provide another gmp version
 
oh, one thing I didn't know how to address
gmp_random_bits(), specifying like 4 billion bits is going to cause gmp to sigabrt
specifying less than gmp limit, but more than php mem limit is going to cause a fatal on mem allocation
but picking an arbitrary upper bound feels wrong
 
does gmp expose it's limit?
 
Some idiocy cannot be accounted for...
 
I dont think it has a limit
I think ram is the limit
 
10:24 PM
but why doesn't it trigger a memory limit error then?
 
Fatal error: Allowed memory size of 134217728 bytes exhausted at /home/leigh/github/php-src/ext/gmp/gmp.c:378 (tried to allocate 138888880 bytes) in /home/leigh/github/php-src/test.php on line 4
gmp: overflow in mpz type
[1]    31523 abort      sapi/cli/php test.php
 
So then... you don't have a problem
 
first is less than total ram, more than PHP allowed mem, second is with 3 more 0s on the end :P
 
@Leigh So what, gmp actually tries to allocate more RAM than the machine has?
(it doesn't use zend mm routines?)
 
@DaveRandom no, it doesn't.
 
10:30 PM
tracking it down slowly
uhh, yes it does use zend mm
 
So then it's a similar problem to trying to prevent stack overflow from recursion etc - you cannot detect it sanely, the only way it will happen is if you do something stupid, so just let it happen and document that if you do something dumb, unpredictable things will happen.
 
@Leigh err, wait. I thought to have read something else in here…
 
@DaveRandom The same can be said about integer overflowing 64bits as well.
 
10:36 PM
also that
at least, if you need that, PHP is the wrong language for you (and you already know that)
 
going to bed,
 
@DaveRandom Almost anything other than a language/set of functions dedicated to large maths is probably the wrong tech choice.
 
I know, not PHP .. but imo hopelessly wrong info.
 
just accepted ^
 
God knows why, seems like a big coincidence to me.
Is Zeev seriously considering LoC as a measure now?
 
10:47 PM
@Ja͢ck Not a practical measure anyway
DaveRandom
9 commits / 1,555 ++ / 1,024 --
Huuuuuuge majority of that is tests
Also yay 1024
 
:D
It's like being thrown back into the IBM days ... "Oh, how many klocs did you do today?"
 
Yeh, massive majority is in github.com/php/php-src/commit/…
@Ja͢ck The measure of a good C dev is malloc/sec, right?
 
If my ereg removal finally gets accepted I would get -10k .. that overshadows most of my previous work :P
How the hell can anyone put a 6 Plus in their pocket?
 
@Ja͢ck Just delete every file and replace the whole codebase with a shell script that downloads the latest python, instant LoC win
> from: TradingMasters <tradingmasyers@mail.com>
sounds legit
 
11:04 PM
:)
I was watching the start of WWDC07 and realised that Apple's transition to Intel was pretty darn impressive :)
 
@Ja͢ck It's kinda weird that they threw out ppc wholesale like that
 
They must have had very very good reasons to switch.
Both parties spent a lot of time on it.
 
Presumably, since they are now dependent on a single external entity. It's not even like they threw out ppc for x86, they went specifically for i686
 
11:20 PM
Oh, actually, I didn't realise that was their second CPU transition :)
 
I've had to do some OSX-ing recently, I'd forgotten how much I hate it
I've also recently discovered that I FUCKING HATE openSuSE
 
lol, why is that? the osx interface?
 
@Ja͢ck Well that, and the way they've just arbitrarily fucked up the file system layout for afaict no good reason.
And you give me a Unix-y OS and you won't give me gcc? Fuck you
Also, it took me a good 2hrs to get the system into SUM because they invented their own (stupid) keyboard layout that won't play nice with the 400-ish keyboards I have lying around
 
they give you clang :D
 
Basically, proprietary bullshit is bullshit
 
11:25 PM
Aren't you on Windows? :)
 
@Ja͢ck Oh sure, fuck the tried, tested, known to work (in a weird way, but still work) approach, lets just go with the new cool kid on the street that none of the things I actually want to use have toolchain support for
 
It does auto tools does it not?
 
@Ja͢ck Yeh but I don't develop for Windows. And on the rare occasions that I do I do it in C# in VS and it's basically click and play
Windows is its own special kind of retarded, I don't pretend otherwise
 
So, if Windows and MacOS are on the lousy side of the spectrum ... what's good?
 
@Ja͢ck I have never yet managed to get something to build with CLang without having to screw with m4 files to make it work.
 
11:29 PM
I've played with a few Linux flavours and just got tired of all.
 
@Ja͢ck For using on a day-to-day basis, without caring how it works, I like windows, I'm fine with people preferring OSX if that's what they want to use, all Linux DEs suck (that I've ever used)
Ubuntu is in a weird, worst-of-both-worlds place in the middle
 
I've tried Redhat, Gentoo and Debian.
 
But for a server, and for something to write useful headless applications for, I personally am a CentOS fan (so Redhat)
 
Going into X is just always perilous.
 
@Ja͢ck Do not try SUSE, that's all I will say
 
11:33 PM
Not to worry, I'm happy with my iMac and my wife is happy with the Windows desktop ... for everything else, cloud :)
 
Everything is in the cloud. I wonder when it will start raining.
brb food
 
is that fuelphp?
oh... nope
 
No no. It is something I've not seen the likes of before.
 
fascinating :O
 
11:38 PM
I thought so too. The same way a guy with 15 asses is medically fascinating.
 
@DanLugg sounds perfect for use in a server like Aerys.
 
@bwoebi :-/
 
@DanLugg It's just procedural programming with poor-man's namespacing
 
@PaulCrovella It's a mess, is what it is. I wouldn't want to use or test that under any circumstances whatsoever.
 
Oh, me either. I'm just saying it's not some abomination of OO principles - because it's not OO in the first place.
 
11:46 PM
@DanLugg But, it's protected static :)
oh wait, no, there's some public too ...
there's something in there for everybody
static (see what i did there) code analysers will have a field day with this code.
> By design, it does:

… have one variable scope for all layers.
^ That explains, it's a feature.
 
How can I echo "userid" value? 'Been trying for 30 min

processar Object ( [createResponse:processar:private] => [orderResponse:processar:private] => Array ( [result] => success [client] => Array ( [userid] => 146 ...
 

« first day (1438 days earlier)      last day (3507 days later) »