« first day (2029 days earlier)      last day (2916 days later) » 

user895378
7:00 PM
(or use bitbucket)
 
@bwoebi Look good?
Oh, should probably say something about the BC break in the email too
 
@MadaraUchiha ohai. I'd like to donate some rep to my bot user (via a bounty), what would be the stance on this? It's rep I have earned legitimately but I'm not sure if it would raise eyebrows.
 
@DaveRandom What for?
 
While I wouldn't necessarily do all your Git from the command line, I would suggest a separate GUI for doing some things in Git (TortoiseGit, Github for Windows, etc)
 
To get it to 100?
 
7:01 PM
@MadaraUchiha Room ownership privs and trusted user +100 on new sites (to get room ownership privs everywhere)
@MadaraUchiha 200
 
Aha
Yeah, go for it
 
I can go answer some questions but is such a crapfest
 
It's a one time thing, and you're not using it to cross-vote between the accounts
 
k thanks, I've deliberately never cross voted
 
7:04 PM
@bwoebi Okay, updated draft: gist.github.com/morrisonlevi/efaf4a3b000c8f0e0c910ba30eb4ebfe. Look good?
 
@LeviMorrison lgtm
 
a20
what are you all doing guys?
 
hey guys, question incoming: (php/apache)
 
This may be the best SO answer ever stackoverflow.com/a/2276604/889949
 
I'm creating a small invoicing script, to keep track of them, and I'm generating .docx files in a folder called "invoices", and im using timestamps for filename, what can I do to make these files in here totally secure and never to be accessed by bots etc?
e.g. /invoices/invoice-34353463456.docx
 
7:12 PM
Not put them on the internet?
 
thats the easy way out :D
 
If they need to be on the net for customers to get them then you need an auth layer
 
its for my sales executive
which he will update and them maybe email the clients
 
Then he should be using a VPN or something
Or you could put them on Google Drive (or similar service)
A bare HTTP server is really not the way to do this though...
 
Yes ! that! I was thinking of sending the files to google drive
and erasing them from the server after they've been sent to g drive
 
7:15 PM
There will be a pretty simple API for that I would imagine
 
awesome
did u ever use it?
 
Never looked but google are generally OK for that sort of thing
 
super
thank you very much mate
 
BDW i haven't logged into this chat for well over 2 years
 
7:16 PM
posted on May 06, 2016 by kelunik

- Deprecate options array, use query string parameters instead, [see documentation](http://amphp.org/docs/redis/quickstart.html#available-options). - Ensure only scalar values can be sent and arrays and objects are rejected.

posted on May 06, 2016 by kelunik

- Fix setting the connect timeout

 
There's probably existing API consumer libs in PHP, take a look on packagist
 
@DaveRandom Why does it use Amp namespace? :P github.com/DaveRandom/Mutex/blob/master/src/Mutex.php
 
@aman It didn't help much - I'm unable to use the extra value in order to provide the adequate feedback to the user - yet it works, so I'm upvoting it.
 
thanks @DaveRandom !
 
7:17 PM
@kelunik because it seems like the sort of thing that belongs there and I couldn't think of a better one (Mutex is a shitty root namespace)
The idea is that it can be donated to amphp when it's worth doing so
@Scorpion np :-)
 
DaveRandom\Mutex :P
@DaveRandom Yes, probably fine. :P
 
I hate Username as a vendor prefix
irrationally so
It's like listening to yourself speak on a recording
goes right through me
 
I don't know whether we should support that: github.com/DaveRandom/Mutex/blob/master/src/…
I think we should just remove the lines, otherwise Generator can't be returned.
If you need it to be a coroutine, you can always wrap the callback in Amp\coroutine.
 
...but then it would just return the generator?
Unless I'm missing something
But in any case, that's one of the reasons you might use getLock()
 
@DaveRandom Yes, and that's fine. If you want the callback to resolve as a coroutine, you can use Amp\coroutine as said, that will make it return a Promise.
 
7:22 PM
Sample code (that still does not release the lock until the promise is resolved)?
 
/** @var Lock $lock */
$lock = yield $this->getLock();
try {
    return yield $callback();
} finally {
    $lock->release();
}
^ That should be fine.
@DaveRandom Oh, right, we have to wait for that.
(added yield)
 
Ahh yeh OK
 
OH, we need that result instanceof Promise, because otherwise we don't handle non-promise returns correctly.
 
Maybe a locked (Mutex $mutex, \Generator $coroutine) function is the way to go for co-routines in withLock()
 
Should we have Mutex::withLock + MutexDriver or MutexManager (or something similar) and Mutex (the actual drivers)?
@DaveRandom Just $mutex->withLock(coroutine(function () { yield; }));
 
7:28 PM
Yeh, my only issue is that it's long :-P
 
Because of the added 11 characters?
Should be fine if you alias it: 3v4l.org/gbVZ7 :P
 
Yeh but when you have return yield $mutex->withLock(coroutine(function() before even any use statements, those 11 chars make a difference
vs return yield locked ($mutex, function()
Fewer sets of brackets as well
I don't like lines like }));
:-P
 
Well, you changed coroutine and $mutex->withLocklocked there. :P
 
Yeh I just think it reads nicer. But I guess I'm free to define it when consuming :-)
 
Sure, it reads nicer, but it prevents you from actually returning a Generator, which is a valid return value of a promise.
 
7:34 PM
But dealing only in promises does certainly sound like a better idea
 
That's also one reason why we removed recursive generator resolution from Amp.
 
Really really very need a way to have Coroutine extends Generator
 
@DaveRandom thats the internal monolog of every salesperson
6
 
lol :-P
 
@DaveRandom yield $f($mutex, function()/* */); ?
Can't you push the withLock(coroutine step into some other function like so?
 
7:38 PM
6 mins ago, by DaveRandom
vs return yield locked ($mutex, function()
 
lockedCoroutine :P
 
I was just arguing for that to be shipped though, obv can easily do it in my lib consumer but boilerplate is boilerplate
 
But isn't the following nicer anyway?
try {
    $lock = yield $mutex->acquireLock();
    // ...
} finally {
    $lock->release();
}
Well, that misses error handing when the $lock couldn't be acquired, because then $lock will not be defined.
 
with $mutex->lock() {
}
I like python for its contextmanager :)
 
@kelunik well you can just move that out of the try
 
7:41 PM
@FlorianMargaine with $mutex->lock() use ($x, $y, $z) { ... } in PHP.
 
If you fail to get a lock chances are you will throw anyway, acquireLock() already does that
 
@kelunik yeah, that'd be nice.
it's going to be hard to make it easy without decorators though
 
@kelunik except that's synchronous code
So it would be with yield $mutex->lock() use ($x, $y, $z) { ... }
and it goes on
@kelunik I mean withLock() was only ever supposed to be boilerplate reduction/sugar anyway, it doesn't need to be there at all
But I can see myself writing a wrapper for it every time I use it if that's the case
It's good for the trivial case
Hence having it co-routine based in the first place
@FlorianMargaine I have bits of C# that do using (await mutex.getLock()) { /* code */ }
 
With my current Redis solution, $lock->release() can throw as well, if the lock isn't valid anymore.
Well, at least I think it does, not entirely sure.
 
Well that wouldn't matter, at least in terms of preventing errors from blocking other blocks from entering the lock
It's a LogicException if you release something that's already been released... but the thing about the withLock() sugar is that the user doesn't ever even see the lock primitive so that can't happen
 
7:52 PM
@DaveRandom It can happen with the current solution, because locks expire after X seconds and have to be renewed regularly if needed for a longer time. That's to ensure everything still works and will be detected as stale once a Aerys worker dies unexpectedly.
But I think it's a bit dump at the moment, because the lock release will fail, but the actual write will still succeed.
 
ah OK yeh it makes sense in that distributed setup
 
Don't know whether there's a better stale detection. You can inspect the connected clients in Redis, maybe that'd be a better way, don't know.
 
They'd still appear as connected if the worker segfaulted or something that didn't FIN/RST
btw @kelunik I have multi-room working pretty solidly now, engineered so that it should support any SE site (but I have not tested outside SO yet)
 
FFFryydai!
 
@DaveRandom TCP keep alive / read timeouts should solve that?
 
8:03 PM
As long as they are short enough to work with your lock timeouts, yeh
 
In that case I'd remove the lock timeouts.
 
I've had oddities in the past where routers along the way send ICMP messages back while it's trying to route/resend and Windows resets the timeouts when it gets them, but I suspect that's Windows.
 
Currently I renew locks at half of the time. If something blocks the event loop for too long, none of the locks will be renewed.
 
And cisco, who make terrible equipment that does stupid things because they think they know better than everyone else.
 
@DaveRandom somehow you're reminding me of medium.com/@pjperez/the-ttl-trick-c78f1279817d
 
8:12 PM
!!package joshdifabio/semantic-diff
 
[ joshdifabio/semantic-diff ] A library for performing semantic diffs of PHP code
 
^ Interesting thing.
 
@kelunik hah, there's a tool in python world called "pbr" that will analyze your commits and look for special messages in them, e.g. Sem-Ver: feature or Sem-Ver: bugfix, then it builds your changelog and bumps the version correctly when you release. I found that a pretty good idea.
 
8:47 PM
@PeeHaa I'm going to go out on a limb and say that the multi-room branch is ready to merge
 
@DaveRandom we know who to blame if @Jeeves dies
 
PeeHaa, obviously
 
It's not complete support yet but it should go in because it is stable and it's got some epic refactoring in so I don't want it to get too far out of sync
 
Ekn
evenings
 
@FlorianMargaine Meh, it's no less stable, I can't promise any more than that :-P
I'm about 3/4 of the way through all the stuff I'm trying to do so I can accomplish the thing I originally said I would do, which is write 1 plugin :-/
 
9:15 PM
I don't understand PHP's SessionHandlerInterface.
There's nothing there that indicates what creates the session ID.
It also appears to be inherently file system based because the API passes a savePath?
I always knew we had an interface for injecting session handlers but… this API seems very specific…
 
well ... fuck
another openID provider is closing down
 
10:03 PM
http://stackoverflow.com/questions/37067883/saving-data-from-loop-co‌​deigniter
 
Ekn
@tereško got any related link?
 
@Ekn no. All I have is a mail informing me that on 12 September 2016 pip.verisignlabs.com is shutting down
I probably will be setting up my own openID provider on my VPS
 
Ekn
ah I see, yeah I saw some of the specs and resources they have on official site for that
 
10:38 PM
@LeviMorrison sorry that I wasn't here, but is fine :-)
 
@bwoebi Nikita gave his approval so I went ahead since you weren't responding ^_^
 
Yeah, ^^
 
 
1 hour later…
11:57 PM
Moin
 
Wes
Evenin
 
Bedtime!
 

« first day (2029 days earlier)      last day (2916 days later) »