« first day (1750 days earlier)      last day (3198 days later) » 

9:00 PM
That is the result of PDO stupid default output, which also doesn;t make sense because of
'prgy_name' => string 'project' (length=7)
2 => string 'proj-A1' (length=7)
the values aren't the same
 
@Danack well, that comes with an additional hurdle: how do you set up the example code which has external requirements
 
@tereško If you're using compose, include them in the require-dev section.
/r
 
@Andrea not sure if scared or amazed.
 
hehehe
/* if a zend_string pointer's odd bit is tagged, then the pointer itself is
 * a 64-bit struct _zend_string_packed */
struct _zend_string_packed {
    ZEND_ENDIAN_LOHI2(
        struct {
            ZEND_ENDIAN_LOHI3(
                uint8_t tag : 1, /* odd bit */
                uint8_t pad : 3,
                uint8_t len : 4)
        },
        zend_char val[7])
};
 
@Andrea uh… sure that you haven't misapplied that macro here?
 
9:07 PM
@Andrea Struct needs a name :)
 
@NikiC that's stupid C89.
 
@NikiC not sure it does
checks K&R
 
If it wouldn't be needed in C89, we'd be using the hell out of anonymous unions ^^
 
@PeeHaa, I forgot to return the PDO::FETHC_ASSOC see pastie.org/10324502
 
Oh, yeah
okay
 
9:08 PM
@Andrea because the bit-order in a byte is always the same. It's only byte order changing on little/big endian
 
@bwoebi ah, yeah
what order is it, anyway?
 
first place, least significant bit, I guess?
 
If it isn't it would cause screaming.
 
hmm
checks K&R
"Fields are assigned left-to-right on some machines and right-to-left on others."
goddamnit
screw it, I'll just use a uint8_t
 
 
9:12 PM
so this is why nobody uses bitfields
 
hehe
What's the point of bitfields at all?
 
yeah :/
/* if a zend_string pointer's odd bit is tagged, then the pointer itself is
 * a 64-bit struct _zend_string_packed */
struct _zend_string_packed {
    ZEND_ENDIAN_LOHI2(
        /* bits: 4 : 3 : 1
         * padding, len, odd tag bit */
        uint8_t lowbyte;
        zend_char val[7])
};
/* On 64-bit systems, a zend_string with a length <= 6 can be optimised
 * A tagged pointer can be used to store characters with no heap allocation
 * This is the format of the "pointer". The odd bit is set to 1. */
struct _zend_string_packed {
    ZEND_ENDIAN_LOHI2(
        /* bits: 4 : 3 : 1
         * padding, len, odd tag bit */
        uint8_t lowbyte;
        zend_char val[7])
};
 
9:29 PM
I totally need git push to offer a --rebase option :s
 
lol
 
Really… It happened again… 2 hours ago I did a git push … and I noticed now that it wasn't pushed at all :-(
 
@PeeHaa, it works now I found out there is something wrong in my data.
 
9:43 PM
hmm .. I am currently stuck on this song: youtube.com/watch?v=ajIiEnKtxlQ
 
9:59 PM
php sucks really
inconsistent function names, bad OOP oh god
 
@EmpereurAiman and it falls over a lot.
/did you think you were going to get an argument here?
 
@EmpereurAiman not sure about the bad OOP though…
 
I thought the anonymous classes RFC would allow to "extend self" in cases like:
class A {
    function blah() : self {
        return new class extends self {};
    }
}
 
10:03 PM
@EmpereurAiman thank you for your revelation. Did you also bring the gift of fire?
 
yes sure teresko
 
@marcio aren't anonymous classes compile-time?
 
Came here to see how php lovers respond to critisims. Seems like I won't see it :p Bye
 
@EmpereurAiman the people here work on php source code. They know how terrible it is.
 
/How's the ruby job market doing?
 
10:07 PM
@Danack apparently, he learns C#
 
@FlorianMargaine couldn't "self" be unfolded to the current class name, just in this case? It's annoying to type the upper class name.
 
@marcio I guess you could say it's a bug, cc @JoeWatkins
 
@FlorianMargaine I can't. Reviewing the discussions, it was left out intentionally:
 
@FlorianMargaine they just are like normal runtime-declared classes
 
>It sounds like something which would be better off as another RFC as its extra features. This is just making anonymous definitions possible, not trying to take on a whole bunch of different features in one go.
AKA, let's keep it simple so it's easier to pass :)
 
10:14 PM
Hey what changed with zend_rsrc_list_entry ??
God damn it
@NikiC these crazy changes in resource API, why man?
 
Abe
@Danack best codinglove ever
 
@Sherif I don't know, I don't care about resources
 
bleah
I'm trying to get the zmq extension working with PHP 7 and it's proving rather miserable
 
@marcio "self" is a lot crazier than it looks at first glance
It is not compile-time
Because a) it propagates across include boundaries and b) it is rebound in closure scope
Always gotta be careful with it
@Sherif The trick is to support only PHP 7
 
@NikiC I have no idea what that means. I just need a piece of software working and all I know is these API changes to resources seem crazy.
I love how gcc spits out a never-ending stream of errors at you when the most useful piece of information has already fell out of my scroll buffer
heh
Well fuk me
It works!
 
10:34 PM
#define ZSTR_VAL(zstr)  (ZSTR_IS_PACKED(zstr) \
    ? (char*)&(zstr) + XtOffset(zend_string_packed*, val) \
    : (char*)(zstr) + XtOffset(zend_string*, val))
#define ZSTR_LEN(zstr)  (ZSTR_IS_PACKED(zstr) \
    ? ((((zend_string_packed*)&(zstr))->lowbyte) >> 1) \
    : (zstr)->len)
I feel so dirty...
#define ZSTR_SETLEN(zstr, newlen) (ZSTR_IS_PACKED(zstr) \
    ? (((zend_string_packed*)&(zstr))->lowbyte = ((newlen) << 1) | 1), (newlen) \
    : ((zstr)->len = (newlen)))
 
@NikiC there was a discussion about "self" + other topics related to upperclass scope, but it's not on the mailing list. I still wish to be able to extend the upper class without reference the class name explicitly, though.
 
OH MY GOD IT COMPILES
 
but does it work?
 
Anyone else pick up on the satire here? :P
 
it's not like you're writing haskell
 
10:44 PM
@Fabor "it specializes in being best for everything" :>
 
Blah
 
@Fabor "I can't even say Laravel is implemented in PHP. It's more like PHP is implemented in Laravel." lolwut?
That's a lot of overly facetious verbage
 
@Andrea why so complicated?
I.e. why does it use XtOffset instead of directly accessing?
 
@NikiC clang moaned
what happens if you have two different pointer types in a conditional and dereference
is it assumes they're both void*
aaaargh
why is clang so anal
 
@Andrea ZSTR_VAL(zstr) (ZSTR_IS_PACKED(zstr) ? ((zend_string_packed *) &zstr)->val : (zstr)->val) does not work?
 
10:59 PM
OH
I realised what I did wrong
operator precedence...
no...
argh
 
operator precedence in c is hard -- they totally messed it up with bitwise ops
 
#define ZSTR_IS_PACKED(ptr)     ((*(uintptr_t*)&ptr) & 1)
it's not what I thought.
Oh
now I see why
/Users/ajf/Projects/2014/PHP/php-src/main/output.c:113:33: error: cannot take
      the address of an rvalue of type 'zend_string *' (aka
      'struct _zend_string *')
  ...OG(output_start_filename) = ZSTR_VAL(zend_get_compiled_filename());
 
Just ((uintptr_t) ptr) & 1 is not allowed?
 
completely misunderstood the issue
cannot take the address of an rvalue
 
Yeah... this tells you that this doesn't belong in a macro
 
11:02 PM
yep
 
Apart from that you'll also get multiple-evaluation
 
I was getting confused by the type
right
WTF
zend_string_equals_literal_ci is a MACRO
 
blame @NikiC
 
what's not a macro ^^
 
It's not in uppercase
:1
 
11:54 PM
oh
so yeah, I ran it, and it segfaulted
but of course it did. If zend_string_alloc returns what's essentially an interned string, segfaults'll happen
 

« first day (1750 days earlier)      last day (3198 days later) »