« first day (1680 days earlier)      last day (3264 days later) » 
01:00 - 19:0019:00 - 00:00

7:04 PM
hi to all
 
asking online questions about hardware is really terrible idea =/
 
7:24 PM
argh if you do a shallow clone you need to specify --depth on git fetch as well
 
@rdlowrey there is nothing to be done unless merge it
 
user895378
@NikiC @bwoebi are there any holdups currently to prevent that ^^
 
user895378
(getting the context-sensitive lexer patch merged)
 
@Worf this will be possible after a second little patch that I can only send if the first one gets merged xD
(except the "private" return type, you can't have class private{} and this was explained a thousand times already)
 
@marcio what would it do?
allow modifiers for method names?
 
7:31 PM
@NikiC yes, there is a commented line because the RFC promised that method modifiers wasn't going to be allowed
 
Hi all

I have this rule written in htaccess:

Redirect 301 /news/ http://example.com/latest-news/

should that be affecting
http://examle.com/news/any-new/

?
 
@marcio oh, nobody cares what rfc promised
3
is there any direct problem with allowing them?
I thought we couldn't do it because traits
So x32 performance is only slightly better than amd64 for micro benchs, about 5%
 
Traits. The promising feature that has been implemented so poorly it always screws up stuff when adding new features.
@NikiC Which is typical based on the reading I did today.
 
@NikiC the trait syntax causes one shift reduce conflict for each method modifier, but you can let bison take care of it.
 
ah
 
7:33 PM
5% is a sizeable gain for high-demand sites.
 
I don't think we want to add shift reduce conflicts
currently we only have the usual dangling else if else conflict
 
use X { method as <modifier> <method-name>; } // when method name and modifier are the same you have a shift reduce
 
@NikiC Which goes away if we were to require {} on all if and on else when the next token is not if.
 
@NikiC why we use bison then if we can't use its features?
there is nothing wrong with shift reduce as long as it's intentional
 
@LeviMorrison If it's any consolation, I didn't get anything useful done today either
 
7:36 PM
@marcio Shift/reduce conflicts are grammar issues, not bison issues...
 
@LeviMorrison tell that to the traits creator
and to all the voters who allowed ambiguous syntax
 
Traits are ambiguous?
Our only shift/reduce is dangling else if else
 
use X { someMethod as protected protected; }
use X { someMethod as protected; }
 
Well, I wasn't around when traits were proposed :)
 
the "dangling method modifier or name" ^^
 
7:40 PM
use X { someMethod as protected protected; }
What does this even do?
 
^^
 
I have no idea.
 
you don't know the trait disambiguation syntax?
 
Nope.
 
(no one knows it actually, until it causes trouble :P)
 
7:41 PM
@marcio I have a suspicion that the trait adaptation syntax has been used by approximately 1 person in practice.
3
 
the creator?
 
@marcio Yes. When writing tests :D
 
@marcio So what does it do?
 
lol
@LeviMorrison it changes method visibility and method name in a row when using a trait...
to avoid conflicts when two traits have same methods or when you want to scare people away from your code
 
protected protected <- what is that?
 
7:43 PM
on my php server I have test1-10, and for some reason when I run a load more it always says "test 4"-"test 10" when i have "test 1"-"test 10" in the database for the output.
I am running a load more.
what am I doing wrong?
 
@LeviMorrison A doubly protected method
It's so protected you're not actually allowed to use the syntax
 
@LeviMorrison it means you are using trait X, but 'someMethod' (from trait 'X') will be named 'protected' and will have 'protected' visibility.
 
@marcio The former should be disallowed.
A method name of protected should not be possible (in my opinion)
 
sigh
 
nvm i think i got it
 
7:45 PM
@LeviMorrison think about enums in the future
 
wut ... I get higher memory usage on x32 than amd64 :/ something is wrong
 
enum Permission {
    public,
    protected,
    private;
} // @LeviMorrison
 
on 2nd thought how do I write a correct mySQL limit function like:
$load_num=3; //how many will you load at a time
$part1=$load_num*$count;
$part2=$part1+$load_num;

$limit="LIMIT $part1 , $part2";
 
@php_purest Do you need to paginate?
 
@marcio No. I would still absolutely 100% want that to not compile.
 
7:48 PM
NO!!, i'm doing a load more down the page as you scroll
 
@LeviMorrison why?
 
@php_purest So you need to paginate
 
talking to the tiny avatars again ..
 
@marcio Because it is confusing, that's why. In general I don't want a context sensitive lexer. Really, what I want is for list to be removed as a keyword and use dedicated deconstruction syntax for that.
 
@PeeHaa what do you mean?
 
7:49 PM
list is the only keyword/token that I've ever wanted to use as an identifier.
And I think in general it should stay that way; list was just a poorly named construct.
 
facebook paginates?
 
@php_purest I would suggest reading the documentation dev.mysql.com/doc/refman/5.0/en/select.html - in particularly the 'offset' bit.
 
@LeviMorrison I disagree with identifier 'discrimination' based on single personal needs
that's not a good criteria
 
@marcio The only reason list is an exception is because it was poorly named.
 
@php_purest Yes. Not in the traditional sense on the frontend, but forsql it works the exact same thing
 
7:51 PM
it counts kind of, but not fully
 
Not because I think it should be special cased.
 
In general you do:
 
I would much rather provide deconstruction syntax and deprecate list and reclaim it than add a context sensitive lexer.
 
offset = (page - 1) * page size
 
new protected()::private() <- does that code look good to you?
 
7:52 PM
aww
 
@LeviMorrison that won't work
 
Why not?
 
@LeviMorrison that's because you are thinking only about 'list', many other names are useful
(see RFC)
 
Link it then.
Oh, another RFC in the week of hell.
No wonder I didn't vote.
 
> but forsql it works the exact same thing
 
7:55 PM
@marcio Uh...
On purpose, it's still forbidden to define class|object constants and methods named as:

public
protected
private
abstract
final
static
 
WTH did I just type :|
 
@LeviMorrison because the patch doesn't affect class names and because if it was accepted it should probably be protected::private() or (new protected)::private().
 
That seems arbitrary, by the way.
I would have voted no onthis.
 
@LeviMorrison that's why we are talking about the shift reduce but you are really late
 
@marcio This was a really bad idea.
Had that month not been so insanely busy I would have commented more on that.
 
7:57 PM
I love when RFC feedback comes 3 months later after the discussion and vote :D
 
@marcio That month was the busiest month of my life, even if I ignored PHP.
 
But right smack dab in the middle was the feature freeze.
It was horrible for me :(
 
ok, I understand
 
@LeviMorrison If you're really busy, isn't that the best time to work on PHP?
 
8:02 PM
@NikiC Not for me.
 
I have that tendency that whenever there is a lot of stuff that needs to be finished urgently and preferably yesterday, I start doing other stuff ^^
 
8:19 PM
@NikiC If it's not used, then it's not a BC break to change it :>
@NikiC (and when there's nothing to do, you just don't have any motivation to do new stuff)
 
8:36 PM
@Andrea well, you do realize they're the same, right?
 
@FlorianMargaine they're not
Python's approach is more elegant
 
you mean more random?
 
piethon, it's like a hackathon but instead u eat pie all night long
 
@igorw are you going all the time to the toilet to eat even more pie?
 
8:51 PM
@bwoebi yes
 
@igorw Eih… I don't enjoy puking… so no thanks :-P
 
@bwoebi how would you want to change it?
 
@marcio no idea… I a way so that your code requires less hacks ^^
 
agh, shift reduces are not hacks :P
 
:-D
 
8:55 PM
but apparently most people live in the pony's land where all languages are context free
/ flees
 
@marcio we wish, yeah…
 
user895378
@NikiC I have this same problem.
 
@bwoebi s/wish/pretend/
@Danack this is perfect ^^
 
@marcio wish.
 
9:17 PM
I want to start learning how to use CMS
I'm looking into wordpress because it is free
Any advice on how to dive into writing custom code for a wordpress powered site
 
Wordpress is a very poor choice of CMS
 
Which cms would you advise?
 
The catalog of CMSes is rather poor in general, but wordpress is the worst I have seen.
So I would advice to look at anything but wordpress
 
okay
but which other CMSes are free?
 
There are several
 
9:24 PM
@PeeHaa how would I dive into learning how to intergrate a CMS
 
Well I always learn the most from my own mistakes so that would mean just write a CMS and fail
 
@PeeHaa have you got your own CMS?
 
Yes I do
 
wow
@PeeHaa how long did it take?
 
I don't know exactly how much time actually went in it. But it took me half a year to have something I could use. But I did other things in that half year so I don't know how many hours actually went into the CMS
It's also something that is not finished ever, because different clients have different needs
 
9:31 PM
@PeeHaa that sounds fun :)
 
@IPAddress If you have actual content that is stuff other than blog posts, then Drupal isn't totally terrible....
 
@Danack is drupal free?
just checked its open source
 
@IPAddress I can't be arsed to make up something funny - you're on a computer, why not google simple questions...?
 
@Danack yeah your right :) lol
 
Anonymous
not really sure if drupal is a newbie-friendly tool.
 
Anonymous
9:45 PM
it's like driving through a busy road without traffic lights, signs ...
 
9:59 PM
It's not that exciting.
 
10:16 PM
A client is complaining to me: Well it's been several weeks now and you still didn't develop the database I've asked for and there's no website yet either!
Me: Well it's been several weeks and at least 5 emails from me about it now, and you still haven't given me any server info to put it on xD
 
hi
ヽ༼ຈل͜ຈ༽ノ
 
sup kids
 
10:31 PM
Not much. Trying to come up with some new ideas for projects to develop
 
what kind of project? fun stuff or monyz stuff?
 
Probebly fun
 
in my fun todo there's a php api generation thingy that works (like phpdocumentor, apigen) and a php ide using js (O_O) did that help?
 
lol. Recently helped a student out here on stack with a db problem. He mailed me a $10,- gift card for Starbucks. That's pretty nice
 
ahah, lol
 
10:35 PM
Hmm, I'm probebly in over my head for something like that
Always wanted to continue an old project of mine
Been working on a PHP chatsystem using Sockets. Actually works pretty good. But everyone keeps spamming me I should redo it with NodeJS
Problem is, I hardly know anything about JS xD
NodeJS*
 
uh? why do you think nodejs would do that better
 
I honestly have no idea. They told me that PHP doesn't work well with Sockets. Other languages are more suitable for it like NodeJS. They haven't given me any reasons for it though
 
Yeah, existing systems in PHP are not really apt for that…
@icecub wait a few months, then Aerys will be out…
 
@bwoebi WHy not?
 
@PeeHaa yeah, just ask Daniel what he thinks about it ;-) … but don't ping him now, he's busy^^
 
10:42 PM
I've been working with code.google.com/p/php-websocket-server to develop it :)
 
@bwoebi I can ask. But if @icecub want to create a simple chat thing I don't see why ratchet wouldn't work
@bwoebi Not everybody has the same needs
 
lol
 
@PeeHaa It's not even about perf needs, but it's generally awful code full with Promises in application code and a real callback hell
 
And you need @rdlowrey to tell you that?
 
user895378
10:45 PM
@PeeHaa busy ;)
 
:-)
 
:-D
@PeeHaa No, I don't. It's just always the same arguments and Daniel is best able to formalize them ^^
 
user895378
@PeeHaa ratchet is fine and cboden is a great developer.
 
But anyway. My idea wasn't a simple chatsystem. I'd probebly develop that with my eyes closed xD I was more thinking about dynamic rooms, private chat etc etc. Bit much like IRC really. That's what pushed me to Sockets
Only difference would be the ability to lock rooms based on user profile info. Stuff like age requirements etc. But that can easily be achieved outside the chatsystem itself
 
All the stuff you just mentioned has imo not much to do with sockets vs anything else :)
 
10:51 PM
Well the reason for sockets was mainly just performance. I've tried using long- and shortpolling but the sql server gave up on that pretty fast with a high amount of users
 
Yeah polling is pretty crappy for a chat anything
 
With a socket test I was able to handle about 10.000 messages per sec using 3000 bots. So that got me convinced
 
@Jimbo Couldn't you just wrap that stuff up into a function that did the cloning of the injector, and setting up the "one-off" parameters?
 
11:10 PM
Using Generators I just was able to reduce code size by more than 1/3 :-) (in LoC)
 
11:33 PM
@bwoebi do you happen to know what, if any, extra steps need to be taken in the rshutdown or mshutdown to avoid a segfault after setting a zend_mm_get_custom_handlers? It looks like the module has been unloaded, and the the custom handlers are still active, and so there is a jump to nowhere. And there doesn't seem to be a way to set zend_mm_heap->use_custom_heap back to zero.
 
@Danack so, what does debugger tell you? jump into unmapped memory segment?
also, I have no idea why this should segfault…
 
@bwoebi The problem is, if I don't set the custom handler back, the code appears to have been unloaded, e..g the error is:
==3582== Jump to the invalid address stated on the next line
==3582== at 0x12CBCA00: ???
==3582== by 0x82B348: zend_unregister_functions (zend_string.h:97)
Where 0x12CBCA00 was the address of my function.
But you can't set zend_mm_set_custom_handlers(NULL, NULL, NULL, NULL)...as there's no code to check the values are not null.
 
zend_unregister_functions should not call your function directly… it rather should call _emalloc() and which then calls your function
 
The macro magic inlines it, I believe.
 
nope
emalloc() => _emalloc()
 
11:38 PM
# define _emalloc(size) \
	(__builtin_constant_p(size) ? \
		ZEND_ALLOCATOR(size) \
	: \
		_emalloc(size) \
	)
 
as said
@Danack I bet that's an unrelated issue somehow…
 
@bwoebi M'kay, but the address that it was complaining about, is that of the malloc function I defined...
 
weird
Especially as this function isn't calling emalloc at all
oh, there's an string_alloc
 
Aha!
phpdbg -p exists
Time to have some fun...
 
@Andrea Yeah, Nikita asked for it^^
 
11:46 PM
@NikiC saves the day once again :p
 
Is more comfortable than always opening interactive
 
Ah, I need it for something where using interactive isn't possible...
 
Hello Everybody
 
Hi.
 
@bwoebi I won't claim to know what the allocator is actually doing, but it does claim to be replacing emalloc calls with other versions:
> * zend_alloc provides familiar emalloc/efree/erealloc API, but in addition it
* provides specialized and optimized routines to allocate blocks of predefined
* sizes (e.g. emalloc_2(), emallc_4(), ..., emalloc_large(), etc)
* The library uses C preprocessor tricks that substitute calls to emalloc()
* with more specialized routines when the requested size is known.
 
11:48 PM
how goes it?
I'm learning Laravel
 
I needed a name for this project, and I couldn't come up with anything good, so I'm calling it "ElePHPants Love Coffee".
3 guesses what it is
 
@Danack try setenv("ZEND_DONT_UNLOAD_MODULES", "1", 1); and tell me if that fixes it…
@Danack maybe there's something inlined, no idea.
@Andrea First guess… Coffeescript transpiler to PHP?
 
@bwoebi Along the right lines.
Hint: phpdbg -p is related.
 
@Andrea you're dumping the opcodes to compile from PHP to coffeescript?^^
 
@bwoebi JavaScript, but yes :D
 
11:51 PM
Not sure if genius or a reason to cry… or both!?
 
yes.
 
Anonymous
@bwoebi is phpdbg useful for non-core developers?
 
@samaYo It's aimed at everyone… issue is just that very PHP people are actually used to a cli debugger…
 
Anonymous
what can I get from it that I would not get from display_errors?
 
@samaYo You can step through your code line-by-line, I think?
pause exception, run the next line, pause, observe state
 
11:54 PM
@bwoebi It might fix it, there's another issue in a different place:
==5231== Invalid read of size 4
==5231==    at 0x836108: zend_hash_reverse_apply (zend_hash.c:916)
==5231==    by 0x819B6F: shutdown_executor (zend_execute_API.c:344)
 
@samaYo Wrong question. You can do nearly everything you can with PHP, tick functions, display_errors, get_defined_vars() etc. … but generally it's much more practical to use it
 
I think might debug this tomorrow......
 
Anonymous
@Andrea seems very powerful if it can do that.
 
fyi @Danack if you want to reset custom heap… maybe try *((int *) the_mm_heap) = 0;
It's actually the first element of the struct…
this is just a hack, but it might work.
(in MSHUTDOWN)
 
01:00 - 19:0019:00 - 00:00

« first day (1680 days earlier)      last day (3264 days later) »