« first day (1493 days earlier)      last day (3681 days later) » 

12:00
@Jimbo Fab needs to for the job in hand. He's crawling the public internet, and needs to still crawl a site where the site fucked up its server-side SSL configuration
@Fabien I guess you might want to include some logic to only disable verify_peer for that specific domain or something
Aye
I hate individual clauses too :(
^ That. insert something funny about protection and @Lusitanian's mom
@Fabien Although, tbh, given what you are doing, you probably want to disable it wholesale or you'll keep having to maintain a whitelist, and the nature of what you are doing dictates that it's likely you'll run into more of these because you are hitting up some servers that are not always above board...
Pros outweigh the cons?
@Fabien The cert is there to verify that you are talking to who you think you are. You are, by the very nature of what you are doing, likely to run into people who are not who they claim to be and you want to see what they are doing
So I would say that verifying the cert in this specific case is actually counter-productive
It's all about trust, and you already implicitly don't have any :-P
12:06
heh.
@DaveRandom development stalled for about one and a half year, so I had to catch up. But I usually release stable after the docs have been written.
Should the error still show? I get an empty result rather than null now but still has the error
And as they already have been written, stable is not far away.
@m6w6 Great stuff :-) I need to migrate the scheme from MySQL and rewrite the back-end for pg so it'll be a while before it makes it into the wild, but I'll let you know how I get on. Any rough ideas if any/many apps are using it in the wild?
@Fabien No, the error shouldn't show up if you disable verification
@DaveRandom had some great contributions from someone called "Park Framework" this year, nothing else known to me yet, though.
12:11
@m6w6 you handed that down like it was written in the bible ... next line might be "and we shall see the docs, and they shall be good" ...
@DaveRandom Weird then.
$promiseArray = $this->httpClient->requestMulti($requests, [\Amp\Artax\Client::OP_CRYPTO, ['verify_peer' => false]]);
@ircmaxell On another forum a developer has pointed out that Google has a released a piece of software that includes that developers library, but has the copyright information stripped out + different license. The developer is okay with the code being used - but would prefer their name. What's the best way of resolving that without dramas?
@JoeWatkins: not sure I can follow :) My docs are usually not all that good
@m6w6 Yeh I've seen that guy on internals a few times, Googled it and found nothing. What I'll be using it for will be a small but heavily trafficked internal app so I should be able to give it a reasonable workout :-)
@Fabien You are passing request objects or URLs?
request objects
12:14
It may be that they don't inherit options like they probably should, don't have time to dig into it atm, @rdlowrey will prob know but I imagine he's still asleep
Aye. I'll try him when he's awake. @rdlowrey ping
are we all pinging @rdlowrey ?
user924016
@rdlowrey ?
Guys - don't do that.
but, it's funny ?
12:15
Spoil sport
@m6w6 out of interest, what's the motivation behind pq? (i.e. what does ext/postgres not do that you wanted, or was it just an API thing?)
Not particularly when someone has been dropping by here less, possibly in part because he keeps getting ping overload.
@Fabien Can you give the uri that you're trying to fetch?
@Danack I think he's mostly started to attain a healthier work-life balance in general actually
I will debug once coffee becomes effective...
he'll be working on his tan ... we know daniel has a sense of humour, so it's okay ...
12:18
@Danack Cool cheers. It works on my Windows machine, not on Centos 6.5 with Remi's 5.6.2.
Yeah he's cool - but when someone already has work/cognitive overload, mass pinging although fun is not all that helpful.
Problem is with the server @Danack, btw, you won't be able to make peer verification work without installing an intermediate cert
@Fabien Are you passing a cert file into the client constructor for either machine? Or just using the default.
Default. It's likely this code will be scaled across a few servers.
@Danack Default openssl cafile is working, problem is with server's supplied chain
12:20
Followed by me not being able to disable peer verification properly.
> Certificates provided 1 (1338 bytes)
Chain issues Incomplete
@Danack well someone did have a genuine question ... I think its okay to accompany that with a joke, I didn't just start pinging him for no reason ...
^^ there's the general problem, the only solution to which is 1) manually install the missing intermediate cert into your trust store or 2) disable peer verification.
Yeah, cool - it's just that one of the bad behaviours in this room is that people do pile on and take things a bit too far sometimes - not just pinging but criticising noobs, shite code, etc.
The nature of what Fab is doing led me to recommend 2), and given that I would basically never recommend that, you can assume that I have debugged it far enough to determine that it is appropriate ;-)
12:23
Bottom of the barrel solutions :P
indeed
@Danack I'm not guilty of any of that ... I casually sexually harass @rdlowrey, but I think he llikes it :D
Oh he likes the sexy harrasment.
/me queues daniel in a band meme ...
explaining the trouble with getting a passport to work colleagues and get "No wonder your Empire collapsed"
They've got a point.
12:29
@DaveRandom Did you get the same error trying the domain from non-windows? or didn't try?
Unless there's a war on, British organisation skills suck.
@Danack true
nm. Just tried a different ec2 server and same error. Extra confirmation it's not me :P
@Fabien yes
I just forgot to display_errors first time
I have started aliasing ephp to php -d error_reporting=-1 -d display_errors=1, it works quite well
Super slow with verify peer off
12:38
That's weird, if anything should be quicker
that is weird, but I haven't seen the rest of this conversation ... so that's all I have to say about that ...
@Fabien And if you comment out the OP_CRYPTO line (and only that line) it gets faster?
oh wait, it will fail, obviously
@Fabien try with and without the crypto op, but try fetching https://google.com/ and see if there's a speed difference
It's more likely to be a keep alive problem, at a guess
12:56
Is that how promises work?
I thought you had to supply a callback to promises, that are only invoked on promise resolution
it's not promises... more like coroutines there
(the ->wait() is similar to yield, as far as I understand)
Well I think promises/A has both approaches, and both approaches make sense.
@DaveRandom Fails faster. Sorry was in meeting.
@Fabien Well yeh, if it fails I would expect it to be faster because you never sent the request/received a response, it failed at the transport layer
Hence the reason for suggesting the https://google.com/ test
Google was fast
13:03
Then the problem is simply that the server is slow, I guess
Bastards.
@DaveRandom Promise/A+ only defines .then()...
Not sure, not looked at it for ages because don't like it
I don't have a strong opinion wrt it...
I like that there is a standard though
does a pattern need a standard ?
13:07
Standards are only good if they don't suck, as well
See also: unicode
@DaveRandom it's good enough, as far as I've used it
do you have any technical thing you don't like?
@JoeWatkins when many libraries implement it... yeah
Maybe I'm being unfair, as I say I haven't looked at it for ages, and my views on stuff like that tend to be quite mobile
I shall revisit it
@FlorianMargaine comparable to defining a standard for callbacks, it doesn't really make sense ...
@JoeWatkins no... it does in this case
in what case, the very narrow case of one language or framework ?
13:10
should a resolved promise return the result right away or send it on the event queue?
Takes so long it times out when called through web. Stupid rapidgator
because jquery promises don't do it the same way as all the other libs, and it leads to bugs
depends if you even have an event queue, which is why I asked the previous question, it might be good that most javascript uses promises/A but it's not good to have a standard for promises that is applicable to a wider scope than just javascript ... indeed, it is not applicable in a wider scope, and isn't really a useful standard because of it ...
well, promises/A+ is for js only afaik
> An open standard for sound, interoperable JavaScript promises—by implementers, for implementers.
you just said that whatever fab was doing was not promises because it's not promises/A compliant apparently ...
13:13
@JoeWatkins I just answered that
12 mins ago, by DaveRandom
Well I think promises/A has both approaches, and both approaches make sense.
FTR I copied an pasted from a requestMult() and changed to request();.
answered what ? you lost me ?
@JoeWatkins and what Fab is doing is not promises, according to most promises implementations that I've seen, A+ or not
and it looks like coroutines a lot though
also, I didn't ask anything, I'm just saying that for something to be promises it needs to have the pattern of a promise, not the interface of a specific implementation ...
yup
I'm saying that the pattern is not of a promise
but of a coroutine
13:17
could be true, didn't look ... I just don't think patterns always need standards
agree with that. Promises (in js land, at least) need a standard though
example: bug I mentioned wrt event queueing
@Fabien "rapid" gator
It's quick with this :-/ Not a good comparison for my means but still
@FlorianMargaine it sounded like you wanted all languages to comply ... it might well make sense to have a standard for one language, but it's a pattern, not something you can standardize in most cases ...
Hey TipRanks, the startup I'm working at for hte last two years has entered a contest and we'd really appreciate your support. Don't feel obligated, but I'd really appreciate it.
13:20
The goal is different. Mine is currently erroring on getting a final uri for a redirect link. For that purpose the answer above suits. But the issue isn't really solved
@JoeWatkins ah... yeah, all languages doesn't make sense... sorry about the confusion
13:37
quick question please: i get that with pdo statements we replace the variables in where conditions with placeholders , but what of table columns ? if i have a select $col1 from table , is the col1 variable replaceable with a placeholder ?
If you need a placeholder for your table it means your data is not normalized...
not my table my column
Generally speaking, you can't use prepared statements for things like columns, tables, etc.
some days I could punch the post man in the throat ... they never bring good news ...
Well we've moved from shooting the messenger. That's good news, I suppose
13:54
Hi All
Question: Does anyone know of a way to read multiline input from command prompt? Normally I do $handle = fopen('php://stdin', 'r'); $input = trim(fgets($handle));, but this stops at the first newline character.
In my specific scenario the input can be multiline.. so how can I actually get the whole multiline data?
Hi everyone i need one help from all of you...can anyone help me on that?
file_get_contents('php://stdin')
Nov 2 at 14:16, by Danack
Jul 27 at 21:28, by Danack
Hello, I have a problem, but I am too lazy to write the question out until some says that they will help me. http://sol.gfxile.net/dontask.html
@aliasgarvanak Don't ask to ask, just ask :)
13:57
@DamienOvereem read the doc of fgets
> fgets — Gets line from file pointer
line, not lines :)
@DamienOvereem Just loop on getting the data and keep reading until you reach your 'stop' condition?
I want to make my script work only in one server...if some one stole my script and try to run on another server then it wouldn't execute and delete my all script
Yeah, @FlorianMargaine is right. I have to use that same thing to pass data to my SOAP handler (grubles about Intuit)
The stop condition would be 2 newlines or the likes..
I know fgets does just one line.. hence the question :)
@DamienOvereem if you don't like file_get_contents, you can do $i = 2; while ($i--) { fgets() }
(if you want a fixed number of lines)
13:59
Its not about liking :) It's about the fact that I ask for user input, who then paste multi line input. But I do require a "done" Condition (ie. double newline)
I guess i just have to toss some things around then
@aliasgarvanak Not really. You can obfuscate your code but there's nothing to prevent someone from decompiling it and making it run elsewhere
yeah, toss something about fgets
@Machavity : I have seen such type of security in cogzidel script
yeah, guess I have to. Bummer though. Means some refactoring is in order. Shit happens though.
Thx :)
I couldn't find what they did ...
14:01
because you're not good enough
A wild @DamienOvereem appeared
@DamienOvereem well if you have a custom stdin ("till 2 consecutive newlines"), you can't really expect php to provide that...
Hi @PeeHaa :) Finally have time to be here again. Just released the pilot of our new website + domain/webhosting/vps management portal.
Now waiting for the storm to hit :)
@FlorianMargaine It was a long shot..
@m6w6 Docs for pq say that it optionally depends on json, but loading the extension fails if json is lot loaded before it, is that a compile-time option or is it just not optional any more? (I ask because I will add notes to the docs as I go along with any gotchas I find)
@DaveRandom, yes compile-time
14:04
@DamienOvereem honestly I'd rather take input from a file... and just file_get_contents('php://stdin');
if the users wants to, he can use cat -
@m6w6 It didn't actually ask me, is it just that the configure script automagically checks whether it's installed?
or he can use -i file, or he can do cat file | php
@DaveRandom, yes
cool, tnx :-)
@aliasgarvanak The only other things I know of would be Zend Guard or Ioncube and they both involve precompiling
14:07
Well it's actually cross-server. We generate "stuff" on one server. It calculates "stuff" which I then serialize+base64 encode. That generated sting needs to move over to a seperate server (no direct connections available), where we need said "stuff".
And you'll have to add something to your server to process those files
@DamienOvereem Cool
Anyways.. Got to be off. Going to pick up 1200 balloons and 3 electric pumps :)
Have fun!
Fill up a collegues room with balloons for his birthday tomorrow: )
14:07
@DamienOvereem sockets ain't for nothing :P
Would still require routing @Flori
its build server -> production server
meh, I don't understand what you want to do exactly...
the string will tell the production server to what versions to switch and stuff.
No worries :) I just need to get that string to my script on the production server
anwyays.. gots to go :) Cya soon all!
@Machavity : you mean to say should i put some files are included in to my server and if i run a script that is check that coming request from server is ok then i allow else i reject
14:11
I'm saying you have to have something to process the encrypted files and that requires modifying the server itself. I know for sure in Ioncube's case that it requires an Apache module or something similar
So this isn't a good option for shared hosting
@Fabien There is something quite fucky going on. On OSX I'm seeing the same large slow down. The transfer isn't completing until the remote host says that ssl connection is about to be terminated. And on Centos after fiddling around with params: zend_mm_heap corrupted
@Machavity I want to something that can't easily track by any one
@Machavity It's a zend extension
and it sucks
@Machavity Specially by any developer
The whole exercise is pointless, for the record
14:14
Yeah, obfuscation by pre-compile is just a mess
but I don't think any other way exists
Plesk uses Ioncube and it causes all sorts of fits with packages and they don't always keep pace with their packages
@Machavity The best way is to use "not bothering" and make money from support
Or make your app into a hosted solution
@DaveRandom I agree
Indeed, I think that's pretty common knowledge now, although for some reason everyone goes through the phase where it seems like a good idea
"compiling" PHP (in that sense, at least) doesn't actually throw very much information away, it can't because PHP is zOMG dynamic
Basically the only thing you can throw away is comments
meh... if it's part of a toolchain, i.e. not intrusive to developers, why not
I would agree, if that was the case, but it isn't
14:18
you know... security cost vs. price of leak... this kind of stuff
It doesn't actually add any security for people who know what they are doing, though
but finding people who know what they are doing is expensive :)
I am kinda stuck architecturally.
step 1: hammer
@FlorianMargaine true, but I just don't believe the benefits outweigh the costs. Like, for anyone.
14:20
step2: dynamite
step3: ??
step4: profit
step 5: obiwan kenobi
step 6: blow profit on a bunch of crack
step 7: blow crack
I've database with large number of stored procedures (named really ugly) and generated code (entity framework). How can I use repository or something to abstract that sh*t away?
step 8: get stuck architecturally
14:21
step 9, quit
:D
There is no step 9, recursive call ;-)
@Jimbo Step 3 is CSS3
@Leri E_CAN_OF_WORMS
user895378
@crypticツ Headers don't require the HTTP_* prefix. Your code should look like this instead:
user895378
if (false !== strpos($request->getHeader('User-Agent'), 'MSIE')) {
user895378
14:22
morning all.
morning sexy
Hey babe
Nope, not joining in on that one.
@DaveRandom This project is a trouble and I want to start it as clean as possible.
user895378
I like the harassment, yes.
14:23
It's nice to be needed
user895378
Return pings: @DaveRandom, @Fabien @RonniSkansing @JoeWatkins.
So to generalize my question. How can one apply repository pattern to sp?
It's also nice to be kneaded
user895378
^ yeahhhhh booooyyyyyy
@Leri facade pattern
14:24
@Leri SP?
@FlorianMargaine lol actual facade, or laravel facade?
@Jimbo stored proc
@Jimbo actual facade. i.e. a cleaner interface to work with an ugly codebase behind
@rdlowrey afternoon pretty ....
I don't even know what's laravel facade...
not a facade
14:25
Static calls to a service locator
@FlorianMargaine Makes sense.
user895378
Man I had such a lazy weekend. I'm riddled with Puritan guilt.
I actually heard taylor talking about it not being a facade, so he agrees they aren't really that ...
I heard a better name before... it was something like "Crapware pattern"... can't remember the name
I like it ...
14:27
Isn't Wordpress a facade for Laravel? or is it the other way around. I'm confused...
user895378
Bro, PHP is a facade for Wordpress.
10
my bad, it's anti-corruption layer
61
A: What is an Anti-Corruption layer, and how is it used?

gnatImagine you have to use someone else's code designed as about below: class Messy { String concat(String param, String str) { /* ... */ } boolean contains(String param, String s) { /* ... */ } boolean isEmpty(String param) { /* ... */ } boolean matches(String p...

@rdlowrey Screw guilt, it implies you did something wrong. Celebrate your lack of meaningful contribution to the human race by doing a bunch of drugs.
user895378
> it implies you did something wrong
user895378
^ exactly. This is the inescapable result of my upbringing. Guilt for everything, no matter how little credence I actually ascribe.
14:31
@FlorianMargaine Effectively, you're decorating the shit one with your nice one?
user895378
So, if you're going to feel guilty either way might as well indulge ;)
There must be a difference between decorator and facade anti-corruption-layer, then.
because you know the shit one "works", but it's ugly to work with. Modifying the ugly one would be too expensive/risked.
@Jimbo no idea
If you decorate your own code, it's a decorator. If you decorate someone else's code, it's a facade, because their code is automatically legacy.
14:33
decorator is around the class you decorate
> Forgive me father, I have committed an original sin... I... I poked a badger with a spoon!
user895378
lol
@Jimbo basically. Not sure of the difference between facade and anti-corruption tbh.
@DaveRandom Euphamism
I think you can surprise a badger to death ... I was once driving and saw a badger at the side of the road, legs sticking out like it was standing on all fours when it died, no visible damage to the things body, except eyes ... true story ... don't poke a badger with a spoon, it might die ...
14:37
or maybe internal damages, so you didn't see anything
Jeff Foxworthy retold a story where some redneck's cousin hit a beaver and stopped. He went out and picked it up and the thing (which was not dead) swung up and bit his nipple off
I dunno, it was really strange, so strange that I stopped to get a look at it ...
And that's when you poked it with a your spoon, right?
well, you didn't perform an autopsy, did you?
no my theory is that it was poked with a spoon, found it particularly surprising, and died as a result ... that is my batshit crazy theory ... I'm sticking with it ..
14:39
@Jimbo ugh
@JoeWatkins I'm not sure you could get close enough tbh, I believe they're pretty agressive
@Machavity That's amazing D:
it actually looked like someones pet, it's coat looked nice (didn't touch it), legs were totally straight ...
Foxxworthy followed it up with "That's probably the only story you can tell with 'beaver' and 'nipple' in it and nobody gets offended"
I once hit a pheasant at >60mph, it got stuck in my radiator grill, I got home and it was sticking out like a figurehead on my car
14:41
oh oh, I know what it was ... maybe ... maybe a stuffed animal ...
I hit a pigeon riding a motorcycle, got stuck in the motorcycle and died, I rode another 50-60 miles, then my cat pulled it out and ate it ...
</gore-stories>
:D
That must have been a pretty small motorcycle
14:42
@FlorianMargaine In my childhood it was called decorator pattern and was not meant for mega-corrupting your code-base. :P
@JoeWatkins Should just attach the cat to the front instead
@Leri decorator is something else
I'd have thought you'd need opposable thumbs to ride a motorbike, the wings certainly would make it difficult
"Oh there's a pidgeon" Pulls string to open cats mouth
@DaveRandom Only just got that -.- LOL
can only ride small ones, was one of those sporty looking two strokes with fairings, but not much of an engine underneath, plenty of pigeon room ...
I remember hitting it, but didn't realize what had happened till the cat was pulling it out of the bike ...
14:43
rofl, just got it too
> I hit a pigeon [who was] riding a motorcycle
me too
@FlorianMargaine OP wraps objects and extends/overrides functionality. Oops, just looked at implementation.
lol
wish I could tell that story ...
Mronng @rdlowrey . I've been looking at an issue Fabien has been having. It seems the op.crypto options aren't being passed all the way through when a connection is opened. Should there be something like:
if (isset($struct->options['op.crypto']) == true) {
            foreach ($struct->options['op.crypto'] as $key => $value) {
                $contextOptions['ssl'][$key] = $value;
            }
        }
Right around here
@Danack lol yes, fucky indeed.
14:52
Also, SSL sucks, php sucks.
but you suck more!
... no? :(
Only if you ask nicely.
user895378
@Danack yes, there should be. I think inside the } else { block just above there.
@rdlowrey the domain is rapidgator.net/article/premium
user895378
Get the advantages of premium-account now!
14:53
:P
For me it fails due to their shitty cert stuff (DaveRandom knows why). If I turn verify peer off it's pretty dang slow.
The code I was testing with is in the other issue - I have no idea what values are meant to be used for those crypto options.
FTR works on Windows. Doesn't on ec2 centos 6.5.
user895378
It's probably a derp on my end. I will work on it in a couple of hours after I finish the stuff I'm doing now.
$client->setOption(\Amp\Artax\Client::OP_MS_CONNECT_TIMEOUT, 5000);
$client->setOption(ArtaxClient::OP_HOST_CONNECTION_LIMIT, 3);
am confused
especially with this before: use Amp\Artax\Client as ArtaxClient;
:P
@rdlowrey No worries. I don't think it's a derp your end but it's just a good random issue that could help give insights in to artax stuff that might need or doesn't need tweaking.
14:56
@FlorianMargaine Copying and pasting code leads to things like that.

« first day (1493 days earlier)      last day (3681 days later) »