« first day (2272 days earlier)      last day (2902 days later) » 

12:00
@kelunik @104.131.16.186
@ekin there are 2 scrollbars
at the moment two lines that use redis on /opt/gitamp/src/Websocket/Handler.php are commented out so that it works @kelunik
Only using packagist packages but thanks
@AdilIlhan That should be fixed on next deploy. If not we have to blame @Wes
Wes
Wes
fu
12:05
Only looking at the grep output gives a wrong impression. :-D
./src/Storage/RedisCounter.php:                return yield $this->redis->incr($key);
./src/Storage/RedisCounter.php:            } catch (RedisException $e) {
./src/Storage/RedisCounter.php:                return yield $this->redis->eval(self::SCRIPT_DECREMENT, [$key], []);
./src/Storage/RedisCounter.php:            } catch (RedisException $e) {
./src/Storage/RedisCounter.php:                $result = yield $this->redis->get($key);
./src/Storage/RedisCounter.php:            } catch (RedisException $e) {
err, what
grep -i redis hides all other lines. ;-)
ah :D
@peehaa i can't blame in any case @wes
lol
Sure you can. It's not that hard ;-)
12:08
@kelunik also that above I kinda stolen from tic tac toe ^^
@Ekin Why does it use gitamp.audio instead of localhost for the Redis host?
it didn't work like that, probably I missed something about it though
Anonymous
@AdilIlhan if your spaghetti tastes like shit, you can blame wes
gheghe
@PeeHaa Did composer install complete yet? :P
12:11
Yes it did. On the wrong branch...
BTW what php version do you target?
@Ekin ?
brb lunch
localhost did not work for redis, but redis was killing itself with SIGTERM back then @kelunik so I'm not sure about now
@Ekin Redis probably only listens on 127.0.0.1, but it's trying to use the external interface to connect, as you don't have gitamp.audio in your /etc/hosts.
oh right, that makes sense...
12:16
why would you need an algorithm to find the best spread? everyone knows peanut butter spread is best. — Gordon 19 secs ago
@PeeHaa seems jeeves is alot smarter than I thought ;)
@littlepootis wait whut? :D
> phpdbg -qrr vendor\phpunit\phpunit\phpunit
PHPUnit 4.8.31 by Sebastian Bergmann and contributors.

...

Time: 1.39 seconds, Memory: 6.00MB

OK (3 tests, 8 assertions)
@kelunik ^
If you need more just let me know. Probably slow to respond because I am eating at the same time
@kelunik yeah it works with 127.0.0.1 ^^ can't believe I missed that actually now
so, it uses redis at the moment cc @PeeHaa
12:28
\o/
thanks @kelunik
@PeeHaa git pull && vendor/bin/phpunit < Made a minor change, shouldn't change anything.
@Ekin \o/
Now you need to play things faster, the queue adds up.
yeah right
breaks @kelunik
12:31
okay, /me is afk for half an hr
please help over this
I have used array_keys()
but its not working
@Exception 3v4l.org/GKStl not sure what you are doing, but it works for me?
@Naruto this is not that array I was expecting
I want simple array without numeric keys
Like I mentioned
you know every item in an array has a key right?
12:35
so what's the problem then?
@PeeHaa Whoops, that's why you don't make assignments in while and if...
Should be fixed.
the situation is in that array i want to search address key because simetime that may come like Home_address / work_address .So for the same purpose i am thinking to take all the keys and the apply regex search over it
1 sec
yeap \o/
12:37
yes...?
An elephant in Cairo is a term used in computer programming to describe a piece of data inserted at the end of a search space, which matches the search criteria, in order to make sure the search algorithm terminates; it is a humorous example of a sentinel value. The term derives from a humorous essay circulated on the Internet and published in Byte magazine in September 1989 that described how various professions would go about hunting elephants. == Algorithm == When hunting elephants, the article describes programmers as following this algorithm: Go to Africa. Start at the Cape of Good Hope ...
just saw this
evenin all
@Naruto ??
@Exception what?
@Linus o/
\o
12:48
@Naruto ???
@littlepootis ???
Hi PHP people :), I have a practical question, I need countries in my php project, is this better to store in database or in a array?
@Naruto did you understand my question?
@Caner I would say it depends on whether your other entities may need a relationship with the countries, how frequently you want to update it and how much data you want for each country
12:58
New countries aren't formed that often, and if you use the list on every request, don't waste time on a db query, have a const array
I (probably controversially) think it's absolutely fine to have key/value mappings in code, that is not reflected in a database table
@pmmaga I need it for users and some other db items like locations, but always only for addresses, the names of countries I have to translate in more languages
@bwoebi Seems like mailing list works again.
Anonymous
@Leigh you mad man
@DaveRandom What do you want to add to windows-registry?
@kelunik add/copy/delete implementations and typing
13:03
I left modifying out kinda on purpose, so nothing can break. :-D
Oh, so php internals is filtered by spam filter - didn't know
@kelunik Oh sure, but I'm quite familiar with the reg command already (confident in not breaking my machine while playing with it) and having the ability to modify the registry via a nice API is no more dangerous than the existence of unlink()/exec()
@Ocramius Yes, it filters itself.
Arguably less so, since the API will generate correct commands, which someone dicking around with exec() may not :-P
@DaveRandom Right, but I'm that someone. :P
13:07
@kelunik I'm a masochist I work with Windows a lot, so I'm happy to do it
You want a controversial statement: I LIKE WINDOWS AS AN OPERATING SYSTEM
How do you plan to return the data? A wrapper with getType(): string and getValue(): mixed?
/me hides
Anonymous
ewwww
@DaveRandom Windows does indeed some nice things at the OS level. It's just that it sucks for developers.
@kelunik I think read()will return a converted PHP-typed value, and query() will return a value object of some variety
dunno, will see how it feels when I write it
Anonymous
13:09
actually if I had to do IT Support as well, i'd choose Windows
Wes
Wes
I fucked up Git so bad it turned into Guitar Hero https://t.co/vUKZJAQKWg
@kelunik It also sucks as a web server
Dang I wish @NikiC's iter library was used everywhere, instead of using array_*
RT @HenryHoffman: I fucked up Git so bad it turned into Guitar Hero https://t.co/vUKZJAQKWg
13:10
can't use an existing library due to lack of lazy iteration -.-
@DaveRandom I also thought about returning the entire list of values at a key. Would allow amphp/dns to make only one request instead of most often two.
Because spawning two processes instead of one is obviously twice as bad for performance.
@kelunik The registry is a complex beast, all directories are, that's why the ext/ldap API is so horrid
@Exception yes I do, but I don't see the / a problem? you can get the keys, and you can loop through the array and do your regex comparing?
@kelunik there should be a fallback to the default nameservers, however it should generate an E_NOTICE (thus I agree with the E_DEPRECATED but not the complete removal) /cc @bwoebi
IMHO
13:21
Event Names, which one do you prefer?
UserCreated - UserWasCreated
RequestForwarded - RequestWasForwarded
i.e. it should work out of the box regardless of whether it can detect system config, but if it can't detect system config it should tell you about it
i would use TheUserHasJustBeenCreated
@DaveRandom I guess it should be a warning then.
@Patrick I prefer present tense personally, UserCreate/RequestForward
Anonymous
@Patrick the formers imo
13:23
@kelunik I guess... I don't really understand why E_NOTICE and E_WARNING are separate things. I think we should just pick one and always use it.
@DaveRandom its for an audit log, maybe for future event sourcing so from everything that I've read it should always be in the past tense
@DaveRandom Depends on when they run. If it runs after the user was created, then UserCreated is better, if it the event is during the creation and maybe can even influence it, then I think UserCreate or CreateUser is better.
@Patrick OK well I disagree personally but whatever, E_SUBJECTIVE :-P
@DaveRandom well you can't execute something at the same time anyway, so it's either before or after anyways?
After, pre-events should be called Beforexxx
again, imho
13:27
@DaveRandom stackoverflow.com/a/4624505/2373138 might make sense.
I actually still don't see any difference
> You probably shouldn't be doing what you're doing, but I'll let you do it anyway
"You probably shouldn't be doing what you're doing" because "it is very likely to cause errors in the future"
@Patrick $x->on("CreateUser", ...) vs. $x->on("UserCreated", ...), the former reads better IMO.
There's not really any other reason for "shouldn't be doing what you're doing" in computer programming, either things work and don't cause errors (no error), or they might cause errors (E_WARNINGORNOTICE), or they just don't work (E_ERROR)
@kelunik but $x->after('UserCreated', ...) would be more correct anyways? Still, it's not what I am using it for, it's for an event log and all DDD resources claim that you should name them in the past tense. I'll just stick with the convention here, was more interested in short name vs sentence :)
const E_WOTICE = E_WARNING | E_NOTICE;
problem solved
Anonymous
13:30
:P
@DaveRandom Maybe it's Notice: You MAY know this vs. Warning: You SHOULD know this vs. Error: You MUST know this. :P
TRUE developpers ignore all E_* because their code works on the first try
@kelunik <kills self>
sorry but it is not 'develoPPers'. it is 'develoPers'. i'm getting sick when you say develoPPers
@DaveRandom Why do we need the fallback if it only happens on probably broken systems?
Just so that you can run demos / things without fixing your system / reporting the bug?
13:39
s/demos/prod
@kelunik A better question is why not fall back? It's a last-ditch attempt to try and do something useful in the face of adversity. It is not harmful or particularly untidy and it is already written... if we were starting from scratch and the debate was over whether to bother adding it, I might say no, but it's already there. We still issue a warning saying "something ain't right here" but I don't see the point in bailing when we can continue.
It's not broken as is using mt_rand instead of random_bytes if random_bytes is not available, but I don't like sending all my data to Google.
You never know, someone some day might find it useful in actually fixing their broken system
@kelunik that ship has already sailed, they already know everything about you.
:-P
dunno, maybe it needs a vote
@kelunik I am agree
@DaveRandom Probably. :P
13:44
@DaveRandom I for one try to actively prevent it for as much as possible
@DaveRandom We'll have a new major version for Amp v2 anyway, I'd like to kill them there. /cc @bwoebi
@kelunik I won't fight if that's the general consensus :-)
@DaveRandom It's not the general consensus. @PeeHaa and me are for dropping, you and @bwoebi are for keeping.
Anonymous
@JayIsTooCommon I totally appreciate your concern. It's the nature of the incident that took us this long, because cleaning it up to the very best of our ability required coordination and cooperation from so many different third party services (e.g. Google, Yahoo, Yandex, Etc, etc, etc, etc). I'm posting something today or tomorrow as we're finally at the point where we feel it's okay to shine a bigger light on it. It's not us being tight-lipped, I promise. It's us just being a bit fanatical about cleaning it up prior. — Tim Post ♦ 6 mins ago
Anonymous
@PeeHaa It just so happens that today they're at that point :P
13:52
@kelunik Is ampv1 still >=5.5?
@DaveRandom Yes.
kk #lazyweb
@bwoebi btw. why did you do that: github.com/amphp/dns/commit/…?
(maybe one day I'll be good enough to get involved in open source projects…)
Anonymous
@Trucy You're in the right place
13:56
@Trucy You just have to find one that is adequate to your knowledge not the other way around :P
@pmmaga good thinking!
@JayIsTooCommon right place for? Getting involved?
Anonymous
:D
It's actually inspiring
@bwoebi @PeeHaa @DaveRandom You can vote here: github.com/amphp/dns/issues/42
14:13
@kelunik am I right in thinking that generators need to yield new Success($value) instead of return $value here then?
@kelunik I'm using send() but just saw on your blog post you have updated it to end(), should I as well?
or was it for v2 only
nay, there is no end in v1 functions.php, though I think I looked at the wrong place
yeah I did, it's Endpoint in aerys
also, dunno who looks at the cv-pls backlog but it's been a while it just says "Cache file(s) currently unavailable"
@DaveRandom Where?
@Ekin Aerys\Response::send does no longer exist.
14:27
@kelunik $this->endpoint->send(null, json_encode($events)); is what I'm saying and is what makes it work on gitamp at the moment
@Trucy all open source projects could really use people who contribute to the documentation.
@Ekin Ah, did I change it for endpoint in the blog, too?!
@kelunik k cool just checking, I've refactored out a general execRegCmd() private method anyway (internal generator) but will rebase
@kelunik yup :-)
14:30
@kelunik have you ever worked with ext/ldap?
BTW @kelunik doesn't this need parens? github.com/DaveRandom/windows-registry/blob/master/src/…
I seem to remember that being needed in PHPold
oh lol
This is the problem with supporting old versions of PHP
@DaveRandom Are you laughing at me or somebody else?
Just at the general ridiculousness of how much has changed and how difficult it is to write compliant 5.x async code
oh ffs you can't yield from either :-P
It's ok... soon we have await
14:34
@Leigh well, it depends on how much it hinders us devs
@kelunik looks like committed to wrong branch, should be amp_v2 only
@Danack I'll look to it
OK so the way the API works is how I think this API will need to work, for sanity's sake. You may not like it. Basically you query a key ($baseDN in this API) and specify the names of the values you want to retrieve ($attributes arg). The alternative is two read() functions - one for reading all values under a key, and one for reading a specific value.
Regarding the value object that contains the type info, that can be done with flags
@kelunik ^
@DaveRandom We're now at 3 vs 3 @ Google Fallback, it's clearly not a consensus. :D
\o/
@kelunik I'm going with readKey($key) and read($key, $value) for now
14:46
@DaveRandom We can also just always return all values.
@kelunik I very specifically don't like this, registry keys can contain huge numbers of values
like, many thousands
@DaveRandom But we read them anyway, no? Because query returns always all keys?
@kelunik no, you can specify a value by name with the /v option
That only works for single values, but it's still potentially a useful optimisation
@DaveRandom Ah, right, I actually copied that from an SO answer before. :-D
neo
neo
guys whats the best way to learn code reading ?
14:49
Wow lol, batch file 💩
@kelunik OK I have a cunning plan, I will implement what's in my head and push then you can see it and it will make it easier to discuss it
@DaveRandom Maybe readKey and readValue?
@kelunik fine
15:02
@DaveRandom not difficult… but some features don't exist, yeah
@kelunik I think, given that our targets are all supported, we should put an E_USER_NOTICE there (I agree with Chris)
I disagree with failing hard when there's an alternative, just because the target is a bit more exotic
@neo you take a piece of code and start to read
I am starting to suspect, that you are treating programming as if it is magic
this is not Adeptus Mechanicus
neo
neo
@tereško haha may be a newbie delusion
Anonymous
@tereško ahem have you seen what Laravel can do? It's pretty magic
neo
neo
@tereško you got a minute to have a personal chat with me ?
no
I have to work
15:09
@JayIsTooCommon *dark magic
neo
neo
@tereško sometime later ?
probably not
neo
neo
@tereško :)
@tereško Well, the way how code and algorithm structure cause subtle timing differences is likely nearly unpredictable, yet quite consistent … magic.
cache misses, branch misses, instruction parallelization, prefetching, etc.
@DaveRandom someone isn't doing automated testing! ☺
15:14
Any sufficiently advanced technology is indistinguishable from magic - Clarke
@LeviMorrison in this 5hr old repo, no :-P
PS don't look at my 2 year old repos. They are all 100% automated testing. Honest.
@kelunik there are some inherently unhandlable edge cases here. E.g. in a REG_MULTI_SZ where one of the strings contains a literal "\0" (the char sequence, not a null byte)
neo
neo
i majored in electrical engineering.with that aspect let me tell you something programming is like hell
you dont know where to start..
neo
neo
i wish there was some reference from where to begin and learn to depth
I havent reviewed ant php7 books yet ... which I should spend some time on
15:18
@kelunik in fact I'm wondering if just shipping an alternate exe would be in order. This is obviously for windows use only, and a different exe could provide a much saner API, potentially use JSON as a format and possibly handle more than one call in a single process (no spawning new processes every time)
pretty sure I could write a replacement binary in a couple of hours
You could do it as a PHP extension as well but making something pollable for async would be hard impossible
neo
neo
@tereško are you sure it covers everything ?
@Shafizadeh no
The "which" at the beginning means that "it" would make no sense there
ah, ok, I will remove my comment :-)
^ I'm too slow
strictly it should be "on which I should spend some time"
But no-one actually says that
15:25
good point .. and yes, I've heard this structure already: .. in which ...
or my English is just too .. emm ... free-form
I think the only grammar rule I actually remember had something to do with adding "s" to verbs, when used with 3rd person (he, she, it)
all of my understanding of English grammar can be summed up as: "it sounds better that way"
@tereško You can identify non-natives when they use things like "in which" in speech. I usually write correctly but I'd never say that.
@tereško right, speech oriented, which is how most people write anyway
@DaveRandom ou par their terrible accent
15:33
Or their willingness to use Franglais
:D
Anonymous
@DaveRandom 'in which case' ?
@DaveRandom what do you prefer… Denglisch or Franglais?
@bwoebi I have more experience with Russian accents
Hi I have problem in symfony 2.7
after signup its getting error
There is no user provider for user "AppBundle\Entity\User".

Anyone can help me out ?
15:36
@DaveRandom I thought about that as well.
@DaveRandom There are PHP extensions to access the registry, but I need a solution that works everywhere.
@DaveRandom for reading DNS names it is not necessary though?
@kelunik I will rekindle my burning hatred for MSVC++ when I get home
@bwoebi no, indeed, but when did that ever stop anyone from massive overkill?
@DaveRandom I'm fine with massive overkill for something not used by amp…
@Trowski Mhm, I still don't see a comment on promise#10 ?
@bwoebi Good idea. @kelunik Thoughts on this naming scheme:
ObservableStream, EmitterProducer, PostponedEmitter, ObserverListener, Observable::subscribe()Stream::listen(), Postponed::observe()Emitter::stream()
My code works too well, it's suspicious…
15:41
@bwoebi Oh yeah, forgot about that when I went home last night.
@Trucy write unit tests
@tereško it passes the tests
But I coded tests AFTER the foundations
So I'm testing already written code
Still I cannot understand what fetch does, or at lease when exactly should I use it?! As far as I know, pull get the project from the github's server, so why should I use fetch?
@Trowski Seems fine, but will Stream have a final value then?
If you want to answer my question, please don't use the word of "merge" in it .. because I don't know the concept of it.
15:44
@kelunik Stream will still extend Promise, yes
@kelunik Yes. Semantics are unchanged, just naming.
neo
neo
@tereško is enviorment variables same like request headers but in opposite direction?
Just wanted to look up what Emitter does, then that: github.com/amphp/amp/blob/rename-observable/lib/Emitter.php
Our optimizations are horrible.
Mostly this was to avoid confusion with / allow coexistence with Rx Observables.
@kelunik yeah, we should swap the dev and production branches of that if, then it's more obvious
15:45
@bwoebi Yep.
When it's called stream, the backpressure thing makes sense.
Usually I'd just return a Listener then in a public API I assume, so no stream elements are missed?
What's Emitter vs. Producer?
@kelunik Why should stream elements be missed with the normal Stream?
@kelunik Emitter is an object similarly to Deferred, just with Stream functionality. Producer expects a (coroutine) callback to which it passes an emit callback
@bwoebi Because subscribe might be called some ticks later and thus miss some events?
@Trowski should it be Consumer then instead of Listener (for symmetry with Producer)
@kelunik why should it be called later?
@staabm Listener is for symmetry with Stream
15:51
@bwoebi Dunno. Might happen if it's not directly returned.
@Shafizadeh I normally recommend: youtube.com/watch?v=1ffBJ4sVUb4 to people struggling with git concepts
@kelunik No, shouldn't. In that case your code is bad
@pmmaga thx, I will see it
@kelunik Listener largely is a consumer-side API for easier consumption of Streams (i.e. as in: a loop inside a coroutine instead of callback)
@bwoebi I know. That's why my public API returns it.
15:53
@kelunik huh?
@bwoebi Why should the consumer wrap it if I can do it and additionally gain the possibility to defer returning for more than one tick?
@neo no.
@staabm Producer is just an implementation of Emitter Stream. I'm open to name suggestions there if you have something more elegant.
@Trowski Of Stream you mean?
How do I use Producer, how do I use Emitter?
@kelunik Err… yes, confused myself with all this renaming.
@kelunik Emitter is analogous to Deferred with a public emit() method for emitting values.
15:56
@kelunik Why would you want to defer that?
Producer is a convenience class that wraps a coroutine that is provided the emit callback to emit values.
@bwoebi I don't know. It might happen. Because it's not directly returned, but in a combinator that uses defer maybe.
Additionally, I can resolve a promise with Listener, but not with Stream.
@Shafizadeh here is the fun part: you actually need to get a quite good understanding of git, because, if I'm not mistaken, you will be the one at your workplace playing the role of "git specialist"

« first day (2272 days earlier)      last day (2902 days later) »