« first day (1955 days earlier)      last day (2993 days later) » 

8:00 AM
I don't think they're part of anyone else's workflow, even contributors really, you're lucky if they contribute anything more than words, accept that I would ... once you have a workflow figured out, which I'll help with, it's not a problem anymore, and you avoided doing stupid things ...
if ever stupid things can be avoided, they should be ...
 
I agree 100%. Figuring out our workflow is what I'm pondering.
Anyway, parents in town. Picking them up so nn
Thanks for advice, whatever happens will be sweee
 
consider that done, put everything where you think it should be, and I'll do the rest ;)
submodules are a thing ...
@rtheunissen nite
 
dantudor just made a good point on the issue.
Discuss there I think
Later
 
8:15 AM
Morning.
 
my reputation is not high enough ... :(
 
@Andrew You'll get there... :)
 
8:32 AM
:3 mornin' guys!
 
@Oldskool its a long way.... but thanks :)
mornin
 
jeez, that HTTP abstraction thing I have been tinkering with has almost 2x as much builds as the rest of my libs combined
 
@Andrew Well, that depends on how much answers you give :)
@Andrew You can always check stackoverflow.com/unanswered/tagged/php to see if you can help out there if you want to speed things up :)
 
@Oldskool I have always overlooked the new question tag instead...ops...
 
8:46 AM
143
Q: Apple's open letter - they can't or won't backdoor iOS?

TTTApple released an open letter to the public outlining their reasons for not complying with the FBI's demands to modify the iPhone's security mechanism. Here's a summary: The FBI has an iPhone in their possession which they would like to access data from. The phone is locked and fully encrypted...

 
moin
 
moin moin
 
void makeNoise();
bool isWorthless() const;
That's so awful, I'm crying [with laughter]
Yes I'm also awful
 
@Jimbo the implementation is even worse
bool Nigger::isWorthless() const {
  return true;
}
 
8:59 AM
LMFAO
I mean that's so bad
It's clearly a joke though - nobody is actually serious about that, hence 2k+ stars
 
@Jimbo I think the stars are bots though
 
@JoeWatkins what is ZEND_EXT_FCALL_BEGIN doing?
 
mornings guys!
 
@FlorianMargaine Jesus, what did I log into this morning lol
 
9:06 AM
@Saitama s/rofl/disturbing
 
@FlorianMargaine WTF indeed. Very disturbing.
 
@FlorianMargaine why do I get a feeling that it's just there to bait SocJus types ?
 
@Gordon it is output when ZEND_COMPILE_EXTENDED_INFO is set on compiler flags by extensions like xdebug, it allows the debugger to collect additional information about function calls by inserting itself before and inserting ZEND_EXT_FCALL_END after ...
or even override some other opcodes or vm behaviour while between the two ...
make sense ?
 
I think. yes. thank you.
 
@JoeWatkins how can extensions define a compiler flag for zend itself? don't you need to recompile zend itself?
 
9:13 AM
moin new peepz
 
no, zend has in compiler globals an options flag here
extensions use it like this
there are various flags you can set to change various aspects of the vm's behaviour ...
they start here
 
oh, zend compilation
 
yeah
 
sorry, I thought you meant gcc compilation... ._.
 
9:17 AM
posted on February 22, 2016 by nlecointre

/* by The coding love */

 
@SergeyTelshevsky Haha, I was tempted tbf
 
@Jimbo why?
 
i am tempted to put a bounty on stackoverflow.com/questions/14996938/… but I think it might be too broad
 
@Jimbo well.. it's funny if you're into black(as in bad) humor and can take a laugh at yourself too.. but starring something like that may be a reason to not get a job :)
 
9:43 AM
@Gordon mmm, he basically wants to write his own C way of doing it, direct him to xdebug source and leave it at that
 
@Leigh question is old. not sure the OP is still interested, but I thought it might help future visitors to have a better answer
 
I think in that respect it's too specific to be useful to many others.
 
@Leigh well, as Joe said, there are some hooks in zend compiler, so there is a very specific answer
@SergeyTelshevsky I'm just not sure when seeing this if it's a joke or a KKK ad
 
lemme guess ... you are offended on behalf of others
 
@tereško no, I'm only offended by you
 
9:50 AM
it's a juvenile joke, not a conspiracy
 
Jokes are supposed to be funny
6
 
that is entirely true, unfortunately some people are a lot less funny than they think they are
... and that didn't come out in english again
 
no it makes perfect sense
 
codegolf.stackexchange.com/questions/73642/… Who would want to build such a language
 
here is the saddest part - some people in that 2k star list use github stars as "bookmarks" and not "likes" .... and I am almost certain that some SJW will be combing through that star-list and trying to contact their jobs
@Saitama nobody. Languages like this are made for a singular purpose - course credits
 
10:04 AM
mmhhmm
 
@Saitama Someone having a good high, I guess. That looks just awful.
 
Hi, Can anyone help me with PayPal Direct API integration ?
 
I have another language in mind which the creator might had created when he was high..... :P LOLCODE lolcode.org
 
@SergeyTelshevsky Exactly, all comes back to whether or not a company would care about that sort of stuff. I know they most certainly would in the US (they love firing people over there), in the UK - much less likely
There's no politically correct and over the top checks over here for devs, in my experience anyway
 
@Zack maybe.. what is the problem?
 
10:20 AM
When I see a "Black star", first thing that comes to mind is Ghana
 
Me: Adobe, can I have an OAUTH2 authorization code for these permissions please?
Adobe: Sure. Here you go.
Me: Okay, can I get an access token with this authorization code please?
Adobe: Nope, never seen that code before in my life.
flips table
 
@Sean you're probably not passing the state?
 
@FlorianMargaine State?
 
ornign
 
/o
 
10:30 AM
o/
 
@Sean /o? Scratching your head? ;)
 
@Oldskool Just a lil' crack at the typo :P
 
is there a way to copy data from amazon s3 to remote server directly ?
 
@FlorianMargaine Ah, nah, nothing like that. Their endpoint doesn't use a state param and the error is specifically "invalid authorization code"
 
10:32 AM
I used scp but I got an error https name or service not found
 
Hi guys
 
@ELOISSIFIAhmed try flysystem.
 
@rtheunissen I think s3cmd sync with do job !
 
10:47 AM
Just been linked an online course tracker thing for a potential candidate. I'm guessing it's meant to show how much they know about a particular topic, but each section is listed with "achievement points" (some arbitrary number without a max cap or indication on how much they're worth) and no section completion percentage or any other indication of understanding. What a waste of a subscription.
 
@Sean Also doesn't prove he didn't google the answers
 
still looking for a job, slowly getting sick of it :/
 
@Leigh Too right.
 
> Moobs
lol
 
10:55 AM
Now that's an interesting doorbell :D
 
Morning ;)
 
moin
 
@AlmaDo Male; Female; Other
Done
 
/me is going afk for a few hours, going back to bed
 
@JoeWatkins Rest well o/
 
11:09 AM
hello does any one knows why jenkins php unit test fails to create file
 
Anonymous
do we have a function like checkdate that only accepts on arg?
 
Anonymous
@Patrick hi. I'm on my third week of doing internship right now
 
You found something? Sweet.
Where?
 
Hi all
 
Anonymous
11:15 AM
@Patrick lausanne.
 
@samayo how would that work? there are many different ways to write a date as a string
 
"one" lol
 
Anonymous
@Patrick yeah, I just hoped there might be a way.
 
Anonymous
I will do it with regex for now
 
@samayo swiss date format? Just explode dots?
checkdate ( int $month , int $day , int $year )
that param order... :/
 
Anonymous
11:20 AM
user may enter a date in any format they want, with slashes, dots, or hyphen .. I just need to check if the date is valid. This inclused string validation .
 
Anonymous
checkdate($anyTextHere)
 
01-02-2016 how do you decide which one is the month and which one is the day? If you allow 2 character years it's even worse
Why don't you use a datepicker instead? That avoids the problem
 
Why does the Zend Engine let you use variables as operands, yet needs ZEND_ASSIGN_* instructions? Is it that reading from a variable is simple, but writing to a variable is more complicated?
 
Anonymous
I am using date picker, I just need to validate if the date field has been tampered with.
 
@samayo then just enforce the format that the datepicker uses
 
11:23 AM
@samayo if you just want to know whether a date string can be used with DateTime then pass it to DateTime and catch any exceptions it throws.
 
user5020521
could I ask you what the hell I'm doing wrong here...
 
@samayo if you are expecting a certain format, use DateTime::createFromFormat with that format and then format the output with that format. if it matches the input, it was correct.
 
user5020521
<?php
    //call the connection file
    require 'conn.php';
    //errors enabled
    error_reporting(-1);
    ini_set('display_errors', 'On');
	$add= "INSERT INTO tagesroma(name,
            lastname,
            address,
            zip,
            city,
			county,
			id) VALUES (
            :name,
            :lastname,
            :address,
            :zip,
            :city,
			:county,
			:rowId)";
     try {
		$result = array();
		$dbh = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
 
@Gordon I would rather just enforce the given format, allowing users to enter anything just makes things more complicated and gives more possibilities for bugs
 
user5020521
this is a php converted into json format using the json_encode function
 
11:27 AM
@Riccardo990 move the calls to enable error reporting to the top
 
and please use consistent whitespace and indentation :x
 
user5020521
is error reporting currently disabled?
 
@Patrick my second suggestion does that
 
user5020521
by the way this json fails to be priinted in javascript console
 
@Riccardo990 you are requiring the connection file before you enable error reporting, so if error reporting is off by default, you will not get any errors in that file
 
user5020521
11:29 AM
and this is the error that is returned SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
 
user5020521
error reporting should be enabled
 
A theoretical question. What kind of validation do you prefer as best practice for a password or for an username (both came via _POST) /ofc after main sanitization or filtering/
 
@Gordon I don't think validation is exceptional. Just validating the string seems easier and avoid using exceptions. But that's just nitpicking, either way would be fine I guess as long as he keeps the user from freetyping
 
@huncyrus username is completely free. If my name is <script>alert("Madara");</script> no reason why that should be invalid.
Password is completely free. Enforce a minimum character length of at least 6.
 
user5020521
@Gordon I've just moved the require function under the error reporting
 
11:32 AM
@huncyrus you don't sanitize/filter input. You escape output because the rules depend on the format
And I hope your password is being hashed, ideally with password_hash
 
interesting. given that there is a process lifecycle and a request lifecycle and php.net/manual/de/internals2.memory.persistence.php, does that mean we could - in theory - create objects in the outer lifecycle to reuse in the request lifecycle?
 
@MadaraUchiha I thinking on the same, why should i make some rule for it, I mean safety first but better if the user do not requested any special rule (like should be between 5 and 8 and so on). Just thinking on, what will be the most freely and most secure possibilities. But should be limited for max length (because of storage fix sized field :D )

@Patrick - *sanitize I mean to secure the _POST elements, via basic security (for injection and basic attacks for example)
 
@huncyrus Don't limit the maximum length
 
Wes
\o
 
My password manager can generate a random 100 character length password
Why not let it?
@huncyrus You should be hashing the password anyway
 
11:35 AM
@huncyrus that is not how security works
 
The length of the string you're getting should be consistent.
 
@Patrick yes, but DateTime will raise when it gets something it cannot handle. imo, its easier to just go that route over coming up with a regex handling a specific format. at least, if you want to make sure that months are within 1-12 and certain months have less than 31 days and so on.
 
@Gordon that's where checkdate would come in
 
its a mess in here
 
@Patrick depends on the input format. it is just something like d.m.y it's easy but if you allow for more complicated inputs …
 
11:38 AM
@MadaraUchiha yeah, I use hashing
@Patrick ... not how the security works? Maybe my bad to write it down badly. I mean originally, I will filter the inputs, before i start to validate it (simple strip tags, htmlspecial chars or with filter_ ).
 
please look up sql injection and xss
You need to validate your inputs for storage and escape your outputs depending on the format (html, json, sql, etc). To prevent sql injection please use PDO with parameterized queries (which is another form of output escaping) and not a broad input filter...
If you don't understand something I wrote, please, please ask until you understand
 
@huncyrus No, you shouldn't filter anything before it enters.
 
The way you planned to do things is very insecure
 
It's either accepted or rejected.
 
@Patrick did you please clarify why insecure for example a simple form field clearance like $posted_field = htmlspecialchars(strip_tags($_POST['field']) than $posted_field = $_POST['field'] ? Then put to validation (for example maxlenght or whatever) then put to database and escaping/hash-checking that again? Why should be this insecure - as your opinion was?
 
11:42 AM
I can understand the feeling that "everything should be allowed", but is it really that weird to block someone from adding "injection" like code? It might be a drop and/or false security, but disallowing <script> in a username isn't really that restrictive, but if some part of whatever that consumes your API forgets to do something with the name, e.g. not escape it, you have a thing.
so I wouldn't consider it really bad to just not allow certain characters in a persons name
 
@Nanne limiting it is fine, but don't do it for security reasons
 
@huncyrus Yes, I'll tell you why it's bad
Here's my password: gsC$a<t(#@zvS>325
Pretty good right?
But since you passed it through strip_tags that's not my real password.
My real password is now gsC$a325 which is significantly weaker.
 
and now it fails the length requirement which makes the user wtf
@huncyrus so you want to use htmlspecialchars twice? Or are you going to assume the data is secure once it's in the db?
 
A follower found a SQL injection risk in VK (Russian social media). Here's the before shot... and how they fixed it: https://t.co/RlX1xlTSLq
(Click the link)
 
haha
 
11:53 AM
Hey guys. Part-time PHP user here. Trying to do function sendXML($data) use ($scribe) { but get Parse error: syntax error, unexpected 'use' (T_USE), expecting '{' what am I doing wrong?
 
@Billy use only works with function expressions, not function declarations IIRC
 
Is there an alternative way to extend the scope of the variable?
Or shuld I just use global?
 
Why not pass the variable into the function?
function sendXML($scribe, $data) {
 
or use a class and make it a dependency
and clear no to global
 
Because the function is called from several different places, but the scribe variable is static
I know it's bad practice, but as it's a static variable I don't see any reason why global would be bad in this scenario
Class/dependency sounds like the best practice. Will look into that. Thanks
 
12:01 PM
@Billy use is only supported for anonymous functions just now, use global
 
posted on February 22, 2016 by nlecointre

/* by Dammmien */

 
When I allow my DB field to be empty, is there a reason I should insert NULL instead of nothing?
 
global is equivalent to use by-ref (so global $foo; is like use (&$foo)
@Duikboot I would avoid NULL if at all possible
 
+1 @Andrea
 
NULL in SQL has different semantics to null in most programming languages. It's more like NaN, it ought to be called UNKNOWN
Instead of having NULL, consider making a separate table with a foreign key relationship
 
12:07 PM
Thanks, makes sense! :)
 
To give a hypothetical example: instead of a nullable telephoneNo field in the customers table, have a telephoneNos table
NULL does have some use, I think, but often you'll want to avoid it
@Duikboot great :)
 
12:18 PM
@Patrick agree, although I could understand that you'd call it that, as it would not be for "log-in security", but to limit the chance of some sort of xss / injection situation further down the line. but it's tricky if you're talking about login systems to keep those points separate
 
@Nanne The problem arises when people start to assume that the user input (like the name) is secure and then skip the escaping at the output. Which might even work sometimes if it's just alphanumeric for example. But requirements change over time and you might suddenly end up with a lot of vulnerable code.
 
@Patrick agree completely.
 
passwords should most likely be treated differently from any other inputt... They never appear anywhere else but database (hashed)
 
@PaulCrovella ah yep, that avoids modifying the array.
 
12:34 PM
@huncyrus you might find this useful
 
12:48 PM
hey guys please answer me if you know about this. stackoverflow.com/questions/35538623/…
 
12:59 PM
Don't store lists of numbers in strings. Use a junction table instead. — Gordon Linoff 16 mins ago
 
@HamzaZafeer That's not really a PHP question is it :)
 
@JoeWatkins I think StackOverflow is now your bug tracker... stackoverflow.com/questions/35552540/…
 
any one can answer my question?
 
@Android You asked a question?
 
2
Q: insert comma separated data for Years, Make, Model in mysql database using PHP

AndroidDemo data which already have in the database table: INSERT INTO `csvtbl` (`ID`, `SKU`, `Product_Name`, `Model`, `Make`, `Year_From`, `Year_To`) VALUES (1, 'C2AZ-3B584-AR', 'Power Steering Pump Seal Kit (Eaton Pump)', 'Galaxie', 'Ford', '1960', '1965'), (2, 'C2AZ-3B584-AR', 'Power Steering Pump S...

 
1:11 PM
@Android That doesn't actually have a question in it.
Just kind of hinting what you want to do, doesn't actually count as asking a question.
And people can't be arsed to figure out what you are exactly trying to ask, if you can't be bothered to word the question clearly in the first place.
 
ok
ok Thanks for guiding me
 
btw you almost certainly want to read all the slides here: slideshare.net/billkarwin/sql-antipatterns-strike-back
as what you're trying to do is considered 'a bad thing to do' in SQL.
 
Please check and let me know..
 
:28892754
 
@DamienOvereem is there any other place on stack where i have to put this question?
 
1:38 PM
@Andrea oh… you actually aren't following me … that's why I can't DM you … thought you'd blocked me with DMs ^^
 
Goddamnit!
vendor/bin/phpunit
PHPUnit 4.8.23 by Sebastian Bergmann and contributors.

[1]    24197 segmentation fault (core dumped)  vendor/bin/phpunit
 
@Leigh Always a pleasure.
 
Just spent 15 mins getting all the dependencies for this thing set up, and now I have to do a debug build and get side-tracked for the rest of my day
 
@Leigh well, you can kinda say you ran the test (command) and no test returned a failure.... sorta :)
 
@Leigh I know the feeling. In my case, it usually looks something like this... i3.kym-cdn.com/photos/images/facebook/000/000/578/…
 
1:46 PM
@Leigh can't you just try 4.8.22 ? as in, maybe it was introduced in the last version?
 
Actually, I think it's a false alarm, from when I was constantly recompiling with new configure options without doing a clean build, while I was getting undocumented dependencies compiled in
did a clean build with --enable-debug turned on, no segfault
 
#winning
 
Nope, it actually only segfaults with debug mode disabled.
3
 
@Leigh Sounds like you're going to have lots of fun!
 
#0  0x00007ffff34bcf38 in _int_malloc () from /usr/lib/libc.so.6
#1  0x00007ffff34be1f4 in malloc () from /usr/lib/libc.so.6
#2  0x00007ffff198879b in xdebug_hash_add_or_update (h=0x12ac190, str_key=0x0,
    str_key_len=0, num_key=851, p=0x140bfc0)
    at /home/leigh/xdebug/xdebug_hash.c:166
surprise!
 
1:55 PM
Well, at least that gets it off your plate.
 
It's an old build of xdebug, fingers crossed
Yea, not faulting with latest master version of xdebug
Phew
 
Anyone knows a free download manager with scheduled downloading with a BitTorrent client for Mac?
 
2:12 PM
Hey, i want to have the numbers out of this string: "Staffel,,1,5,10,20,30,40,50,60,70,80,90,100,125,150,175,200,250,300,350,400,450,500"

So i guess i can use preg_match with a regular expression. Can someone help me? All I tried failed
 
it looks like a comma separated string? if it is really that, you could also just split it and loop, if that's easier to understand?
(and with split, i mean using the explode that machavity just linked you)
 
@aikn just do this $number_array = explode(',' , $numbers);
 
is there a command to upload a website from amazon aws to a remote server ..
 
posted on February 22, 2016 by nlecointre

/* by patoch */

 
2:33 PM
hi guys , is there a command to upload a website from amazon aws to a remote server ..
 
:)
 
@ELOISSIFIAhmed Like scp?
Not sure if AWS supports that, but should do the trick.
 
@aikn preg_match_all('~(\d+)~', $string);
but yes, you would be better splitting by the delimiter
 
Morning.
 
2:49 PM
Morning
 
Morning
 
lol look what I found in a project I am going to rewrite from scratch:
 
@Gordon Oops, too late for that. :/
 
function makeOrderNumber() {
	return rand(1000,100000000); // Random order nummer voor nu...
}
 
2:52 PM
Better stop feeding it further ;)
@PeeHaa Seems legit
@PeeHaa Also very safe to avoid any dupes
 
Simply amaze
 
@PeeHaa I guess it was a case of "We don't want order # 1, it looks silly"? ... facepalms
 
@PeeHaa especially the "voor nu" is great :) . "i'll fix this next week" (2012)
 
Temporary permanent non solutions FTW \o/
 
Every developer knows that any comment that says "for now" means: I'm never gonna fix this sh*t, but if you feel up to it, go right ahead! ;-)
 
2:54 PM
So true
 
@Oldskool yeah I tried using SCP but I got an error https unknow ...
 
3:11 PM
I'm creating files in a folder, and then I need to zip this folder. But in order to avoid conflict, I'm gonna have to give this folder a unique name. Should I be exploring a temporary folder/zip type option if possible?
I don't know anything about temporary directories so not sure if this is something I should even look into.
 
@Waxi you can write into php.net/sys_get_temp_dir
@Waxi and you can use php.net/uniqid to create a random unique name for the folder
 
oh right, folder, ignore me
@Waxi if you're creating those files from PHP, and creating the zip from PHP, you don't need to write the files to disk at all. ZipArchive has an addFromString method
 
3:31 PM
a wild krakjoe appears
sleeping didn't work, got nasty pain in the my neck, it's still there ... stupid human body ...
 
You use ellipses ... it grows stronger ...
 
@JoeWatkins Doctor time?
 
hmm, why do I not have to specifiy the offset in zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz|l", &haystack, &haystack_len, &needle, &offset)
 
So, I have a design dillema. I have a set of request handlers that match against and handle a request hierarchically; think a controller partially matching a request, and then passing it off to another controller ad nauseum (HMVC, I guess?) Anyway, the issue comes with initialization/injection. I'm sort of stuck passing an injector around to construct the "controllers" recursively. So, I have to pass around an injector. Am I a bad person?
 
I understand that sz|l denotes haystack is a string, haystack_len is a zval, then anything else is optional, needle is a long. but what about offset?
 
3:38 PM
@MadaraUchiha driving there will hurt too much ...
 
I'm not using a singleton, or any other static state; the injector is actually immutable too.
 
@Gordon s is haystack, haystack_len ...
 
@NorthbornDesign Isn't it a service locator now?
 
@JoeWatkins Oo
 
z is needle, and offset is optional "|" l
 
3:39 PM
Can't you just pass the data from the controllers around instead of the SL?
 
@JoeWatkins how do I see that from the signature?!
 
@PeeHaa That's my issue; is it a SL? Have I transcended DI to SL merely by passing it?
 
which signature ?
 
@NorthbornDesign You are passing the injector around meaning there is no way of knowing about the dependencies of said controllers
 
@PeeHaa Unfortunately no, because the controllers are dynamically dispatched to depending on the request; consequently, you don't know which is needed, and controller A might load B, C, or D; which all may differ in dependencies.
^^ Right. What you said. So, SL, I guess.
 
3:40 PM
@JoeWatkins well, the function call. the zend_parse_parameter. and how can haystack_len be a string when it contains the length?
 
s uses char** and long*
z is zval**
l (optional) is long*
so accepting a string works like this
if (zpp(ZEND_NUM_ARGS(), "s", char**, long*) != SUCCESS)
	return;
char *chars;
long  length;

if (zpp(ZEND_NUM_ARGS(), "s", &chars, &length) != SUCCESS)
	return;
 
Consider "matching rules" defined in this pseudocode:
match "/foo/*" {
    match "/bar" { }
    match "/qux/*" {
        match "/zip" { }
        match "/gob" { }
    }
}
Where each match denotes the construction of a controller/handler.
 
@NorthbornDesign I've seen this avatar before…
 
@Gordon @Leigh Thank you...will look into this.
 
So /foo/bar is going to differ in what controllers are dispatched to than /foo/qux/zip
 
3:43 PM
@JoeWatkins so when I use s I always have to pass the actual string and the length to zpp?
 
(so an "s" in parameter spec means there is going to be two corresponding arguments, first the value then the length)
 
And consequently, the dependencies required through that hierarchy.
 
@JoeWatkins got it. thanks
 
@LeviMorrison Hi, I'm Dan.
;-)
 
@Gordon :)
 
3:44 PM
o.O
 
@Danack slide #77 a bit misleading, like in every situation use closure table.. otherwise a great presentation
 
@Leigh Little confused by this.
 
Anyway @PeeHaa and anyone else; each controller construction/invocation is like a sub-application being initialized and run. How am I to inject dependencies automagically if I'm not passing the injector down? The only other way I can think of is to change the implementation detail of the way each handler is constructed/invoked so that it is iterative, and the injector lives at the top level (where it "belongs")
So the ole' recurse-to-iterate refactor. Sort of.
 
why are your handlers constructing other handlers?
seems like a violation of SRP
I am not even going to ask why you are doing this hierarchical thing
 
Because a handler matches the request, and then "does stuff" which can include handling and responding, or delegating.
@Patrick Because architecture.
 
3:52 PM
@NorthbornDesign that does not explain why you do construction
 
@Patrick The handlers construct handlers depending on what the request matches. A handler can act like a junction point, with say, 5 routes to partially match the request, each of which delegates to a different sub-handler, which when matched need to be constructed and delegated to.
My pseudocode example ^^ up there, if the outermost handler is matched by foo/* then that handler attempts to match /bar or /qux/*, each of which route to different handlers. If /qux/* matches, then this process is repeated for /zip and /gob delving deeper into the tree.
 
Heya everyone, I got a question, I have to use someone's old code during my internship, and mysql_* functions are still being used.
 
@NorthbornDesign I certainly hope that I'll never have to debug any of your code
 
are there any issues I should look at before i do a mass search and replace?
differences between functions etc.
mysql_select_db has a different parameteral buildup than mysqli_select_db
 
@NorthbornDesign Your handlers should only handle the request. If they do more it's a SRP violation and you should put that other stuff somewhere else
 
3:58 PM
@JoeWatkins hmm, is there any particular reason why I have to pass the length of a string instead of detecting it by the NUL at the end of a string?
 
@Patrick lol, the code is remarkably simple. It's just a rule tree.
@Patrick But handling the request sometimes consists of delegating the request.
 
bool mysql_select_db ( string $database_name [, resource $link_identifier = NULL ] )
bool mysqli_select_db ( mysqli $link , string $dbname )
See what I mean?
 
@Gordon you're not passing the length, you are accepting it, the engine knows the length of the string already, you are just recv'ing it ...
 
@NorthbornDesign But you call 5 different handlers on a single request?
 
3:59 PM
@JoeWatkins ah, so it will do that for me automatically?
 
@CasNouwens I wouldn't rely on a replace
 
also, relying on null terminal char breaks binary compat of strings, always use the length the engine provides
 
@Patrick Well, maybe, depends on the request.
 

« first day (1955 days earlier)      last day (2993 days later) »