« first day (49 days earlier)      last day (257 days later) » 

user895378
03:33
Well I missed my BCBT push window -- I just have to work out this websocket bug. I'd be shocked if I can't do it pretty quickly tomorrow. No design questions or anything. Just working out a known logic problem.
03:45
Oh well.
 
8 hours later…
11:48
Good morning.
BTW, my HHVM PR was accepted \o/: github.com/facebook/hhvm/pull/2375
How is that byte buffer problem going?
user895378
12:31
I'm about to dig into it again.
Good luck.
Hope you got a power breakfast ^^
Morning. And good luck @rdlowrey
user895378
morning :)
Just back in Luxembourg ^^
user895378
I've never really spent any time in mainland Europe. I'm told that Luxembourg is a nice place though.
user895378
12:43
@LeviMorrison excellent!
Thank you, thank you.
12:58
@rdlowrey ya, Europe is for you what America is for us :-P
Just got kernel panic on os x (no, I didn't di anything bad :o)
user895378
13:13
My computer just spazzed out
user895378
stupid windows
user895378
14:17
Okay, I think I finally located the source of my websocket problem.
user895378
Turns out that when copy/pasting some of my parsing code around when I refactored I broke the parsing code that unmasked client frame payload data.
user895378
So the parsing was correct, but I was generating bogus data from what the client was sending me.
user895378
Unless I run into any other major unsolvable bugs I should be able to push today \o/
...or you could wait until next Thursday, right? ;)
14:44
noooo :-D
user895378
or I could just change my system time so github thinks the commit happened yesterday :)
user895378
lol
lol
 
1 hour later…
16:02
./sapi/cli/php -nr 'const a = "abcdef"[0]; var_dump(a);'

Warning: String is not zero-terminated (ZZZZZZZZZZZZZZZZZZZZZZZZKI
?KI
??v?A) (source: Zend/zend_vm_execute.h:4316) in Command line code on line 1
string(6) "text/h"

Warning: String is not zero-terminated (text/html; charset=UTF-8) (source: /var/root/php-src/Zend/zend_opcode.c:382) in Unknown on line 0
PHP is kidding me oO
why the hell do I get from passing abcdef a text/html; charset=UTF-8 back oO
user895378
16:13
weird
yes, weird why that happened… a segfault is a much better error :-D anyway fixed
just running the infamous test suite now
16:44
@rdlowrey what do you think about this being possible:
const FIRST_OPTION = 0;
const SECOND_OPTION = 1;
const a = [FIRST_OPTION => 1, SECOND_OPTION => 3];

const b = a[SECOND_OPTION];
With the restriction that you cannot use the a constant outside of static scalar context?
or something like const a = [1,4,16][SOME_CONSTANT];
user895378
Sounds reasonable. How badly do I really need that feature? Not really. I suspect the "do people really need this?" question is the one you'll have to answer.
well, I just did implement it over my last few commits.
It's more a technical side effect of fixing some bug
was very easily doable, it's not new syntax (did just not exist in that specific place) and why not?
user895378
Well it seems sensible to me.
the alternative was to do something more complicated to not allow arrays in normal constants ^^
 
1 hour later…
user895378
18:21
Oh man ... the early indications are that pthreads will do exactly what I want it to do in regard to managing individual server worker instances. Keep your fingers crossed that it continues!
user895378
If this proves to be the case it would significantly simplify the amount of work I have to do for cross-OS support.
user895378
It will also end up making ext/pthreads a requirement for aerys.
user895378
(if it continues to work as expected and doesn't break things)
user895378
Now I need to make sure Joe doesn't fall into a well or something. A pthreads dependency would gives aerys a bus factor === 1.
18:54
@rdlowrey what do you mean with bus factor?
user895378
19:13
In software development, a software project's bus factor (also known as truck factor, or bus/truck number or lottery factor) is a measurement of the concentration of information in individual team members. The bus factor is the total number of key developers who would need to be incapacitated (for example, by getting hit by a bus/truck) to send the project into such disarray that it would not be able to proceed. In this event, the project would retain information (such as source code or other systems) with which no remaining team member is familiar. A high bus factor, where many individuals...
@rdlowrey why? Isn't it already 1?
user895378
Yeah, but if I get run over by a bus I won't really care about aerys :)
Ah okay… but actually I could take over pthreads after some time if needed… I'm again and again going back to pthreads code^^
user895378
19:29
sweet :)
20:45
and… you're ready to push @rdlowrey?
user895378
Yeah I can push in a little bit. Just take note that there are a lot of things having to do with source file organization and threading that are still changing.
user895378
Anything in the examples/ directory works, so just look at that for examples of how to use things.
first push, then explain, please :-)
user895378
k
user895378
Let me spend a bit trying to tidy some things up so it's not so messy.
20:48
okay… btw. it's 22:48 here
user895378
Note: static file serving won't work at all without pthreads right now.
user895378
That means the websocket example won't work without pthreads (because it has to serve static files)
I have pthreads installed
user895378
Also, the SSL/TLS settings will change a lot (I haven't implemented the 5.6 things yet). So although you probably weren't going to run encrypted servers for testing that's something to be aware of :)
You're right… not having any TLS certificates, it's worthless to me actually
user895378
21:02
Another thing you won't do but just FYI: don't try to send requests for byte-ranges or mulitpart byte-ranges of static file resources -- it's broken right now.
user895378
$ git status
user895378
^ crazy right now.
git status | wc -l ?
user895378
240
user895378
Also, there's no synchronous threaded responder support in this push.
21:08
== 1.5 terminal windows
user895378
That's the next thing I'm working on (like, tonight)
user895378
I'm still cleaning up things for push
user895378
> Showing 161 changed files with 6,071 additions and 7,646 deletions.
I expected more...
user895378
@bwoebi Everything's in the abstractions branch.
user895378
21:16
Remember: it's not polished ... lots of things are subject to change.
@rdlowrey please list … lol
user895378
Just look at the examples/ directory to see how to use things.
will do
user895378
It will be a lot easier to use after I add the ability to execute requests synchronously in isolated threads.
github.com/rdlowrey/Aerys/commit/… … why did you change that instead of method chaining?
user895378
21:19
You can still chain ... the example just doesn't. Who knows why I changed it in the example.
oh, okay, the examples suggested me you removed that
Btw. do we need an extra subnamespace here? \Aerys\START\App is that Start namespace necessary?
user895378
No, we do not. That's one of the things I plan to collapse into the main namespace but those files are going to change a good bit so I haven't done it yet.
user895378
I'm going to try to put as much as possible into the primary namespace (where feasible).
I just criticize here what I find.
@rdlowrey put everything of public API there if possible (and modules in a subnamespace if more than one class)
user895378
Yeah I agree.
user895378
21:24
I have a feeling a lot of the things you may mention are things I will agree with that I plan to do and just haven't been able to get to yet.
user895378
That's what I mean when I say this is an "unpolished" commit.
yes, no problem, then just take it as todo list what I'll say here ;-)
user895378
Also, DO NOT run the phpunit test suite unless you want your computer to explode.
user895378
None of the tests have been updated.
lol … btw. then I'd first need to install phpunit … and I don't see any reason why I should.
user895378
21:28
Right now the plan is to add App::addThreadRoute('/uri', 'handler') so you can specify threaded resource endpoints that will be automatically executed inside synchronous workers.
user895378
That way you can mix and match blocking and non-blocking endpoints however you like.
user895378
And I will also create a FastCGI responder so you can specific routes to a FastCGI application or use the FastCGI as a fallback if no other handlers responded to the request.
@rdlowrey I prefer a boolean parameter for stylistic reasons.
user895378
lol, I prefer a separate method for stylistic reasons. In any case, that's the easiest of things to change, so it's not a big deal right now.
actually you will put the routes one below the other, but it'll look ugly if the one routes are indented by 6 chars more…
user895378
21:32
Hmm ... I can agree with that.
user895378
But the problem is that what happens if you want to route specific URIs to your FastCGI app?
user895378
You can't add a method parameter for that.
user895378
The method parameter doesn't scale out to new use cases.
user895378
You're going to eventually need separate methods so you might as well do it from the start.
user895378
And it's more explicitly readable than seeing some orphan boolean parameter on the end.
21:36
or just use constants?
user895378
Hmm ... maybe
that'd allow if necessary some bitmasks
user895378
App::addRoute('/some-uri', FAST_CGI | DOCROOT)
user895378
^ Dispatch to the Fast CGI server and if it returns 404 dispatch to the docroot handler.
jup
App::addFastCGIAndDocrootRoute() looks just weird^^
user895378
21:38
Yeah I wouldn't do something like that.
and maybe just shorten addRoute() to route()
same for Websockets with bitmask: App::route('/uri', WEBSOCKET)
user895378
What if I have multiple different websocket endpoints?
how you mean?
user895378
/widgets -> WidgetWebsocketClass
/something-else ->SomethingWebsocketClass
user895378
There's not just one universal WEBSOCKET handler.
user895378
21:43
Wait, yes there is.
user895378
I don't know what I'm talking about.
lol
user895378
But you'd still have to tell the websocket handler which class you're using to handle that URI.
user895378
Because you specify a different class for each individual websocket URI.
I was just looking at examples/009_websockets.php
@rdlowrey btw. in the normal routes you also always add some callback, no?
user895378
21:44
Yeah, you can add as many separate websocket endpoints as you want ... that example only demonstrates one
user895378
@bwoebi callback?
user895378
$app->addRoute($uri, $handler)
user895378
where the handler is any callable or thing that auryn can provision
yes, this… and in the case of websockets you pass there a class name instead of an handler
user895378
Yes.
user895378
21:46
It has to be a class name that implements the Aerys\Websocket\App interface
App::route('/uri', 'myClass', WEBSOCKET) that way I meant
user895378
I prefer having separate methods TBH.
user895378
But this interface is really easy to change.
user895378
That's why it exists: to provide a layer of insulation between configuration and the actual code.
Well. You have two choices: put everything in one method or everything in its own method. Mixing this is I think a bad idea
user895378
21:47
I agree. That's why everything has its own method right now.
@rdlowrey It's just not a long-term solution when you want to set some option etc.
These things still will have some common code I think… redundancy, welcome.
user895378
I've given these things a ton of thought ... it's definitely a long-term solution. I'm not saying it's going to stay exactly how it is now, but there are reasons why it's setup the way it is right now.
user895378
But again, the App configuration interface is the easiest thing to change in the whole code base.
adding more and more methods, just to route?
user895378
It's not just for routing.
21:50
@rdlowrey E_TOO_MUCH_METHODS_IN_SINGLE_CLASS
user895378
There are lots of configuration options for something like the static file docroot handler, for example.
@rdlowrey and at the same thing a relatively important thing for the user.
user895378
How do you tell the server you want to set Option A, B and C in the docroot handler with your method?
user895378
It's not just for routing.
user895378
There are other considerations (such as setting options)
user895378
21:51
It just looks like it's for routing because I've made the interfaces easy to understand.
@rdlowrey I said bitmask?
user895378
You'd have a neverending bitmask.
user895378
It's not a good solution.
user895378
And you can't set options for the entire docroot handler on each and every route assignment.
Never ending? Why?
@rdlowrey I mean first some general options and then specific option on each route?
user895378
21:54
My point is this: there are a ton of other things that have to be accomplished that just don't work using a single route() method with options. And they vary greatly whether they're websocket options or static file handling options, etc.
how do you manage these options currently?
user895378
Take a look at the App class.
user895378
Options relevant to the individual parts go in there. From there the bootstrap process does lots of voodoo to get those settings to the individual handlers.
user895378
Anyway, I'm taking a break for a couple of hours. Feel free to leave any questions you may have and you should have answers when you get back to the computer tomorrow :)
Actually, when you have already an options array, you also just can require the first element of it to be the type?
user895378
22:00
I prefer more descriptive methods with fewer parameters to fewer methods that have more parameters and do everything.
user895378
It's easier to understand because you don't have to know what a parameter is for.
user895378
The method name tells you.
user895378
Every parameter adds a cognitive cost.
user895378
Anyway, have a good night :)
I still can't agree… maybe we should discuss that later on when you'll have too much route methods…
@rdlowrey good night to you too!
22:24
github.com/rdlowrey/Aerys/blob/… is this supposed to be valid syntax?
fyi: github.com/rdlowrey/Aerys/commit/… I think it should be $this->endpoint, not $this->broker.
23:06
rdlowrey pushed to abstractions at rdlowrey/Aerys and I don't have time to look at it until monday :/
hehe =P
23:34
@rdlowrey I must be doing something wrong…
Aerys root# ./bin/aerys -c examples/001_start.php
Listening for HTTP traffic on *:1338 ...
And well, in the browser I get a blank page
I mean an empty answer with headers, not the text you specified in the responder?

« first day (49 days earlier)      last day (257 days later) »