0:00 AM
piwu1 has quit
0:01 AM
piwu1 joined the channel
0:49 AM
aerozol
akshaaatt: btw, did you want the Android updates shared to MeB social channels?
0:50 AM
0:52 AM
“Press Release 2023-07-14 - The music industry is failing musicians”
0:53 AM
🌶️
1:06 AM
Anyone who cares: I’m going to start reposting stuff we put on Twitter via my personal mastodon account, see what the engagement is like (even if we never make an official account there I might just keep it up anyway)
1:25 AM
Holiday news: Watched a national emergency go down here in Japan yesterday! Dog poo in the train station! Five employees, a gallon of disinfectant, and we are safe again - the offender is in newspaper, in a plastic bag, in another really big plastic bag, and safely disposed of. Great work tīmu
1:59 AM
2:02 AM
3:30 AM
Maxr1998 has quit
3:31 AM
Maxr1998 joined the channel
4:44 AM
akshaaatt
Sure aerozol! That sounds like a good idea
5:11 AM
aerozol
5:19 AM
akshaaatt
On it
7:25 AM
OrbitalTeapot joined the channel
7:40 AM
OrbitalTeapot has quit
7:44 AM
OrbitalTeapot joined the channel
7:45 AM
OrbitalTeapot has quit
8:11 AM
d4rkie joined the channel
8:13 AM
d4rk has quit
8:56 AM
mayhem
sorry aerozol , I've now read it and damn, that quote is spicy. who wrote that stuff? Lol.
8:57 AM
Looks great to me, fire at will!
9:18 AM
Maxr1998_ joined the channel
9:19 AM
Maxr1998 has quit
9:36 AM
jasje
akshaaatt: merge with main pls so I can work with latest main. Some bugs im facing that i want to make sure are not caused by my code.
9:36 AM
if you want I can do it
10:06 AM
ApeKattQuest
man I wish they put in a quarter the effort japan does about dog-poo here. it's gross some places
10:49 AM
OrbitalTeapot joined the channel
10:49 AM
OrbitalTeapot has quit
11:04 AM
OrbitalTeapot joined the channel
11:06 AM
OrbitalTeapot has quit
11:15 AM
orbitalteapot joined the channel
14:48 PM
akshaaatt
Hi jasje
14:48 PM
You had mentioned about a discussion on github
16:04 PM
jasje
akshaaatt: will ping you outside rn
16:09 PM
akshaaatt
Cool
17:28 PM
Maxr1998_ has quit
17:31 PM
jasje
akshaaatt: yo
17:32 PM
akshaaatt
Hi
17:32 PM
Maxr1998 joined the channel
17:34 PM
jasje
so
17:34 PM
about the singleton annotation
17:35 PM
akshaaatt
Yeah
17:35 PM
Any reasoning you have for removing it?
17:35 PM
jasje
17:38 PM
akshaaatt
I have
17:38 PM
Please point out the reason for the removal of
17:38 PM
Omit of*
17:39 PM
jasje
So basically when we scope all of our stuff to singleton
17:40 PM
stuff -> dependencies
17:40 PM
one instance is created
17:40 PM
which reamins until app is destroyed
17:40 PM
akshaaatt
Yeah that is correct
17:40 PM
jasje
since we have listen submitter service
17:40 PM
which causes the app to never call onDestroy
17:41 PM
those dependencies remain forever (metaphor)
17:42 PM
thus memory is always occupied for those objects as long as onDestory isn't called
17:42 PM
even though they aren't even being used
17:42 PM
akshaaatt
From my understanding, singleton just prevents the application from creating more than one instance and reuses the existing resources
17:43 PM
How is it related to the lifecycle?
17:43 PM
jasje
but it still retains the instance even though it isn't being used'
17:43 PM
lifecycle is what the Installin() part defines
17:44 PM
akshaaatt
Even if I were to create multiple instances, do you mean to say that even those won't be destroyed?
17:44 PM
jasje
17:45 PM
akshaaatt: if we scope them to singleton, no
17:45 PM
but any other should be good
17:46 PM
akshaaatt
I think service component should be the one to use here then?
17:46 PM
jasje
usually hilt recommends don't scope bindings that don't require concurrency or are not heavy to create instance of
17:46 PM
service component is used for brainplayer
17:46 PM
yellowhatpro made sure of that
17:46 PM
for rest
17:46 PM
I think no scoping should be good
17:47 PM
because hilt says
17:47 PM
the amount of extra code for scoping usually outweighs the benefits
17:47 PM
thus decreasing the performance
17:47 PM
also
17:48 PM
a component is only scoped if it has component and scope defined
17:48 PM
if we just do Installin(singletoncomp){ // and not annotate @singleton here }
17:48 PM
then the dependency wont be scoped
17:49 PM
it'll be factory
17:49 PM
i.e., new instance is created
17:49 PM
everytime
17:49 PM
17:50 PM
17:51 PM
akshaaatt
I think the services we create should be scoped
17:51 PM
jasje
17:53 PM
this is very interesting to me and if you'd give some time figuring this stuff out i'd love to improve the code
17:53 PM
akshaaatt
17:53 PM
jasje
bec my interpretations are half baked as well
17:55 PM
akshaaatt
Don't get too much into this rn. Focus on the gsoc project first
17:55 PM
I feel we would end up falling off track with the project if you don't focus
17:55 PM
These changes can be done in a day or two later
17:56 PM
But yeah, I do think it'll be good
17:57 PM
jasje
akshaaatt: dw
17:57 PM
akshaaatt
I don't think services should be allowed to have multiple instances, and the way I see it is scoping them currently or resuing somehow.
17:57 PM
jasje
alright
17:58 PM
first of all
17:58 PM
lets call the repositories something else
17:58 PM
Im getting confused with the android services again and again xD
17:59 PM
so
17:59 PM
akshaaatt
Like?
17:59 PM
jasje
in your above sentence, you mean the retrofit instances right?
17:59 PM
akshaaatt
Yes
17:59 PM
jasje
yes
18:00 PM
so we need to scope retrofit instances to something else
18:00 PM
not singleton agree?
18:00 PM
akshaaatt
I don't agree yet. Need to read more on this
18:00 PM
jasje
alright
18:01 PM
akshaaatt
But I know for sure that these should only be created once throughout the app
18:02 PM
jasje
i mean we can
18:02 PM
because retrofit is heavy'
18:02 PM
but can we scope it to activity?
18:03 PM
because our app is single activity arch
18:03 PM
akshaaatt
No. Multiple activities can use one service/repo
18:03 PM
jasje
architecture
18:03 PM
our app has only one activity
18:03 PM
akshaaatt
jasje we need to do something about it though. It's not perfect yet
18:03 PM
jasje
yess
18:03 PM
akshaaatt
No. About, etc are separate activites for now
18:04 PM
Compose is still new and we need to see what is the best practice for all this
18:04 PM
jasje
akshaaatt: our main activity isn't destroyed when we open about tho
18:04 PM
so no problem there
18:04 PM
akshaaatt
I hate that a composable cannot manage it's lifecycle yet
18:05 PM
jasje
akshaaatt: true (fragments are noice)
18:05 PM
akshaaatt
yeah
18:05 PM
jasje
our main activity only gets destroyed when we close our app
18:05 PM
thats what we want
18:05 PM
except for the service (retrofit instance) that our submitter uses
18:05 PM
that should be singleton
18:06 PM
akshaaatt
Google should be working on getting compose right there. Because iOS has swiftui (jc counterpart) which does all of this perfectly
18:06 PM
Not just the submitter, but other stuffs are also a singleton
18:06 PM
jasje
yim service doesn't need to be singleton
18:07 PM
akshaaatt
Okay. That sounds fair
18:07 PM
But social and login stuff does
18:07 PM
jasje
social service also doesn't need to be singleton
18:08 PM
only listensService is required to be singleton
18:08 PM
akshaaatt
for now it doesn't. But soon it will
18:08 PM
jasje
how?
18:08 PM
any future plans i don know hehe?
18:08 PM
akshaaatt
Let me just look at how service scoping and singletons are different
18:09 PM
jasje
refer the screenshots above
18:09 PM
for quick snippets
18:11 PM
akshaaatt
If the listens submitter were not there, singletons would have been fine for the app
18:11 PM
jasje
akshaaatt: yes
18:11 PM
akshaaatt
But I get your point as to how resources are left even though the app is closed
18:12 PM
I mean, if our app is single activity, we can scope all these services to the activity then
18:12 PM
jasje
yes
18:12 PM
akshaaatt
But I am certain this is not how things are going to be for long. Single activity app in itself is bad currently.
18:13 PM
jasje
akshaaatt: why?