« first day    last day (16 days later) » 

07:18
@Ekin yep, that's fine… was in bed yesterday at that time ;o)
@Ekin Just ask, I'll reply when I see it (do not forget to ping so that I don't miss it)
 
2 hours later…
08:59
@bwoebi Thanks :-) Will do. First thing I'm trying to figure out is having a proper control flow for the audio thing I'm doing, because I tried to learn many things at once I got stuck or went down into a rabbit hole plenty of times. Redis, aerys, reactor concept etc... I made it more complicated than necessary I believe.
What I'd like to achieve is using amphp stack as many as possible within this version of github.audio.
Possibly. Don't know without seeing your code though ;o)
Yup, getting there :-) First incoming a quick question while I wake up with this coffee
So I have this /ws socket open, the chat example and all works good. But on this case, I'd like to start streaming the pulled JSON to the JS end of the socket when onOpen (I think) is called.
Oh, can I somehow give you access to a private repository?
On github?
I'd like to keep it private until I sort it out, yes on github
yeah, just add me as collaborator
09:04
(The reason of it is something I'd like to talk to you later as well, it's mainly for a possible event I might attend)
Alright
@bwoebi done
Just pushed what I last had from yesterday 5am
I removed some stuff I tried apparently
branch test is the latest code
Maybe I should make that master though, I've not been working with master the last two days
Doesn't matter ^.^
Any concrete issues currently?
Yeah, I can't really think of a proper way to stream down the json and then send it over in a ticking way to the front end
1sec
With a repeat watcher once it's downloaded?
Yes, I was pretty convinced I need to repear, you'll see on the latter link, listen() method
But I couldn't manage to properly separate/abstract things
github.com/ekinhbayar/audiohub/blob/test/src/Response/… here I get the pulled json and recreate with only needed parts of it
Because the main json I get from github is way too long and full of stuff I don't need
s/repear/repeat
The important bit is the listen method
But of course when I tried to use that upon onOpen etc I can't, since wait() also ticks
After that point, I thought I should read/ask more about the underlying control flow
09:25
Hmm, need to look at the computer for this... I'll reply to that in the evening (in 7-8 hours)
Of course :-) Whenever you have time.
Sorry I can't say "X is not working", and I know it's rather broad what I ask :| But I'd like to pull this one out in a well abstracted way while I learn about properly creating a control flow for an ev loop based app.
@Ekin hmm, unexpectedly having time for 20 mins on computer :-)
^^
(thought I'd go skiing immediately, but…^^)
Don't worry, I'll be bashing my head about this all day long, feel free to take a look whenever you can :-)
Ooh skiing sounds awesome, have fun!
09:39
@Ekin so, you basically want to fetch data from github and broadcast them to every client upon receiving?
Yep
Fetching bit is already in place, I also recreate the json, although I'm not sure I'm doing that well anyways
I json encode an array of githubEvent objects :/
When a client connects, I need a way to send the github events to the JS
At the moment listen() method calls the request() which uses amp wait()
@Ekin So, then just take the json and use $ws->send([], $json)?
@Ekin uh, you must not use wait()
use yield / return the promise
Yeah, but I tried to yield as well and it didn't work out somehow
@Ekin you can only yield when you also yield from the Generator or use \Amp\resolve() on it
Right
But it goes like this: listen() calls request() which then returns me an Artax Response - then I use that here github.com/ekinhbayar/audiohub/blob/test/src/Response/… to recreate the json and it's then ready below
public function listen(): string
    {
        $initial = $this->request();
        $results = new Results($initial);
        $set = $results->parseResults($initial);
        return $results->createEventsFromResultSet($set);
    }
The Results object takes Artax Response
which is also where I lost the track
I mean, that above does many things in a single method
I'm going to give another try to restructuring it now
10:07
@Ekin yeah, that's an issue by design, that you need to pass Promises all the way down … it's pretty much the only way how this works though :-/
@bwoebi I know, I just need to wrap my head around it well so I can create proper control flows according to that
Whenever there are intermittent objects I lose the track
Ie. the need to return an artax response, modify that and then return back and still somehow produce|utilize promises
@Ekin yep, you need to yield this, modify the returned value and return that
and in caller yield from the Generator
send() must receive a promise, right?
right, it started making more sense
@Ekin no?
sorry, a string
10:18
yes
okay, I think I'm getting there :-)
 
6 hours later…
15:50
@Ekin having had any success?
yup yup yup it works :-)
great :-)
I'm about to pick a domain registrar for gitamp.audio ^^
 
3 hours later…
18:28
@Ekin sounds great, so when will be see it live?
I got the domain, created a droplet as well
waiting dns propagation actually
@Ekin what's a droplet? Is that a VM of some hosting provider?
meanwhile I will refactor and get rid of useless bits @bwoebi
Digital Ocean has "droplets"
^ that was the first screenshot I got when it worked :-) @bwoebi
nice
I should use php colors
and will put amphp logo if you don't mind
18:33
@Ekin feel free
thanks :-)
The droplet I got is a 30GB SSD & 1GB/1CPU
gitamp.audio < aerys not running? @Ekin
yeah not yet
dns prop
I think, also I haven't installed all the needed stuff
yeah, it's been hours but registrar shows me I need to wait more for dns propagation
@Ekin oh, you have a reverse proxy from that server to your droplet?
@bwoebi I just added digitalocean ns'es to dns config of the domain
and an A record within digitalocean to a floating ip I assigned to the droplet
18:39
@Ekin what's the IP of your droplet?
159.203.149.59
is the floating ip
@Ekin yeah, I get that IP too
so, looks like DNS is already propagated?
checking it all now
oh wait, meal is ready
I shall ping you when I check after dinner and/or when it's up again :-)

« first day    last day (16 days later) »