Skip to main content

Get the Reddit app

Scan this QR code to download the app now
Or check it out in the app stores
belt-e-belt u/belt-e-belt avatar

CMD

u/belt-e-belt

New
Open sort options
Change post view

r/sveltejs icon
A banner for the subreddit

Svelte is a radical new approach to building user interfaces. Whereas traditional frameworks like React and Vue do the bulk of their work in the browser, Svelte shifts that work into a compile step that happens when you build your app. Instead of using techniques like virtual DOM diffing, Svelte writes code that surgically updates the DOM when the state of your app changes.


Members Online
r/sveltejs
A banner for the subreddit

Svelte is a radical new approach to building user interfaces. Whereas traditional frameworks like React and Vue do the bulk of their work in the browser, Svelte shifts that work into a compile step that happens when you build your app. Instead of using techniques like virtual DOM diffing, Svelte writes code that surgically updates the DOM when the state of your app changes.


Members Online

How do you maintain the codebase for multiple platforms?

Thanks! I think most of my concerns are resolved by this for now:

Capacitor has an API called something like Capacitor.isNative. So you can tell when it's an iOS/Android or web app on the fly. I assume there is something similar for Wails.

I realized I could check if window.runtime is undefined, which is kind of similar to Capacitor.isNative or Capacitor.platform.


r/sveltejs icon
A banner for the subreddit

Svelte is a radical new approach to building user interfaces. Whereas traditional frameworks like React and Vue do the bulk of their work in the browser, Svelte shifts that work into a compile step that happens when you build your app. Instead of using techniques like virtual DOM diffing, Svelte writes code that surgically updates the DOM when the state of your app changes.


Members Online
r/sveltejs
A banner for the subreddit

Svelte is a radical new approach to building user interfaces. Whereas traditional frameworks like React and Vue do the bulk of their work in the browser, Svelte shifts that work into a compile step that happens when you build your app. Instead of using techniques like virtual DOM diffing, Svelte writes code that surgically updates the DOM when the state of your app changes.


Members Online

How do you maintain the codebase for multiple platforms?

belt-e-belt
replied to spectrexr6

I probably should frame my question more clearly. I do have 2 repos for APIs and frontend (project not big enough to require a dedicated IaC setup). But in the context of this post, I am more specifically concerned about the frontend repo only, i.e. do I need to create dedicated repo for wails (for desktop), capacitor (for mobile) and lastly just sveltekit i.e. regular browser app.

The reason being, (like I mentioned in the post), while the frontend would remain mostly the same for all three, wails and capacitor need additional files specific to desktop/mobile apps, on top of sveltekit...plus calling native APIs would be different.

I am just thinking about duplicated efforts required in case I make any changes in the frontend (it would have to be done in three projects)


How do you maintain the codebase for multiple platforms?
r/sveltejs icon
r/sveltejs
A banner for the subreddit

Svelte is a radical new approach to building user interfaces. Whereas traditional frameworks like React and Vue do the bulk of their work in the browser, Svelte shifts that work into a compile step that happens when you build your app. Instead of using techniques like virtual DOM diffing, Svelte writes code that surgically updates the DOM when the state of your app changes.


Members Online
How do you maintain the codebase for multiple platforms?

I am using sveltekit for an app which I plan to distribute on web(browsers), desktop (wails) and mobile (capacitor). So far I have only built web apps, so I don't have a lot of experience with desktop/mobile. But how does one go about maintaining such a project?

Each of these seem to have a different project structure. (web is the regular sveltekit project, while wails and capacitor will have their own project structure with sveltekit residing in a "frontend" folder).

Other than the project structure itself, wails and capacitor would have different ways to call native APIs.

So...

  1. Do you maintain three separate repositories for this?

  2. For those who have worked with wails or capacitor, how would the app know which environment is it running in?


r/opensource icon

A subreddit for everything open source related (for this context, we go off the definition of open source here http://en.wikipedia.org/wiki/Open_source)


Members Online
r/opensource

A subreddit for everything open source related (for this context, we go off the definition of open source here http://en.wikipedia.org/wiki/Open_source)


Members Online

Does anyone know of a free automatic transcription software?

belt-e-belt
commented

I have been using whisper by openai for around 1-2 years. It works great. There are many wrappers that you can choose from based on your specific needs. I have been using whisper diarization (https://github.com/MahmoudAshraf97/whisper-diarization) with no issues.



r/IndiaTax icon

A subreddit for all tax related queries and discussion in India. Whether it is Income Tax or GST, this community is here to help.


Members Online
r/IndiaTax

A subreddit for all tax related queries and discussion in India. Whether it is Income Tax or GST, this community is here to help.


Members Online

Aiyooo😭

belt-e-belt
replied to govi96

Lol, yeah. You're not debate worthy. I care about hijab or religious extremism controversy. And unlike you, I don't automatically absolve BJP for everything because those things are not affecting me personally. I still happen to have some morals. Spend some time off social media and practice compassion and empathy.

Even BJP gives the same freebies, look at an irctc ticket or a newspaper, how they brag about their freebies, but I doubt you'd see those. Like I said in another comment, politics for you people is like IPL. Support your "favorite team" with blind faith.


r/IndiaTax icon

A subreddit for all tax related queries and discussion in India. Whether it is Income Tax or GST, this community is here to help.


Members Online
r/IndiaTax

A subreddit for all tax related queries and discussion in India. Whether it is Income Tax or GST, this community is here to help.


Members Online

Aiyooo😭

belt-e-belt
replied to govi96

And how many hijab controversies have happened since then? Look, I am a middle-class taxpayer, too, but I have no problem paying taxes if I can see something useful being done with those taxes. Even if I'm not directly being benefited by those things. Middle class is going to be fucked regardless of who is in the power. All I want is a peaceful life, no more Hindu, Muslim, Macchi, Mangalsutra, Mob lynchings, beef politics, and riots. It's been 10 years, when does it stop.


r/IndiaTax icon

A subreddit for all tax related queries and discussion in India. Whether it is Income Tax or GST, this community is here to help.


Members Online
r/IndiaTax

A subreddit for all tax related queries and discussion in India. Whether it is Income Tax or GST, this community is here to help.


Members Online

Aiyooo😭

Do you hear yourself? How much do you want to give them? Really? Have you asked that question when billionaires get tax cuts and concessions and subsidies? No one is talking about loans. Educate yourself before you jump up and down to defend rich assholes. And don't even come back with oh they create jobs and boost economy. Only thing they boost is their own already fat wallet. And income inequality is the blatant proof of that.

"They", the ones you hate so much, are getting bare minimum in your so called welfare schemes. Those are not welfare schemes, those are getting by schemes. There's a reason why we are only investing more and more in such schemes without it taking any significant effect. If it was working, we would not have 80 crore people needing 5 kg rice with non biological face stamped on it. You calculate "how much more" do we give them.


r/IndiaTax icon

A subreddit for all tax related queries and discussion in India. Whether it is Income Tax or GST, this community is here to help.


Members Online
r/IndiaTax

A subreddit for all tax related queries and discussion in India. Whether it is Income Tax or GST, this community is here to help.


Members Online

Aiyooo😭

belt-e-belt
replied to dante_2701

Yes, just saying that without any proof doesn't mean anything. Is Congress what this country deserves? No, not even remotely close. But is it better than other available options? Yes.

Everything that you think you have as proof is just fear mongering by desperate people who want to remain in power for as long as they can. All of those "proof" can be debunked in a simple 15 mins sincere research, but you aren't willing to do that.


r/IndiaTax icon

A subreddit for all tax related queries and discussion in India. Whether it is Income Tax or GST, this community is here to help.


Members Online
r/IndiaTax

A subreddit for all tax related queries and discussion in India. Whether it is Income Tax or GST, this community is here to help.


Members Online

Aiyooo😭

belt-e-belt
replied to dante_2701

As if that's not happening now. Money is being distributed, but only among people who are already rich, no one bats an eye then but talk about some lower class people getting some benefits, and everyone starts whining.

I don't know what development people keep talking about. Is it the inaccessible and unaffordable vande bharat or the tolled highways that I have to pay to be able to use?

And there's plenty of corruption right now, which you would see if you didn't treat politics as a cricket match and thought logically instead of blindly supporting your "favorite team."


r/religiousfruitcake icon
A banner for the subreddit

r/religiousfruitcake is about the absurd, fringe elements of organized religion: the institutions and individuals who act in ways any normal person (religious or otherwise) would cringe at. (subreddit twitter handle: @rreligiousfrui1)


Members Online
r/religiousfruitcake
A banner for the subreddit

r/religiousfruitcake is about the absurd, fringe elements of organized religion: the institutions and individuals who act in ways any normal person (religious or otherwise) would cringe at. (subreddit twitter handle: @rreligiousfrui1)


Members Online

Apparently cows are more protected in India compared to women

belt-e-belt
commented

Always have been. India, in the last decade, has been a prime example of dystopian society, which once had so much potential.


r/atheismindia icon
A banner for the subreddit

A sanctuary for Atheists in India. Telegram: https://t.me/atheistsofindia Discord: https://discord.gg/SgxhzxGur5 Lemmy: https://lemmy.world/c/atheismindia


Members Online
r/atheismindia
A banner for the subreddit

A sanctuary for Atheists in India. Telegram: https://t.me/atheistsofindia Discord: https://discord.gg/SgxhzxGur5 Lemmy: https://lemmy.world/c/atheismindia


Members Online

literal brainrot

Tatatan drum iz d besht. Our wahmen most respected. 🚩👍🏼


r/golang icon
A banner for the subreddit

Ask questions and post articles about the Go programming language and related tools, events etc.


Members Online
r/golang
A banner for the subreddit

Ask questions and post articles about the Go programming language and related tools, events etc.


Members Online

Help understanding correct usage of ticker

belt-e-belt
replied to sondqq

I could be wrong, but I think a full-fledged rate limiter might be an overkill for this right now.

But in the future, I plan to refactor it into a message queue that can be used application wide. And then I batch process X messages/second from that queue. Maybe I can use a rate limiter there.


r/golang icon
A banner for the subreddit

Ask questions and post articles about the Go programming language and related tools, events etc.


Members Online
r/golang
A banner for the subreddit

Ask questions and post articles about the Go programming language and related tools, events etc.


Members Online

Help understanding correct usage of ticker

belt-e-belt
replied to theclapp

My actual limit at SES is around 20 per second, so I'm hoping it should be fine even with the bursts. I also have a limit on the maximum number of users that can be in the recipient list (app's requirement, won't go into details of that). But I'll run some tests...worst case scenario, I might be able to increase the tick duration, too.

Thank you.



r/golang icon
A banner for the subreddit

Ask questions and post articles about the Go programming language and related tools, events etc.


Members Online
r/golang
A banner for the subreddit

Ask questions and post articles about the Go programming language and related tools, events etc.


Members Online

Help understanding correct usage of ticker

I did see that example, and I have tried to base my code using that. Probably should have tested it first. Thank you, I'll come back if I have a more specific issue.


Help understanding correct usage of ticker
r/golang icon
r/golang
A banner for the subreddit

Ask questions and post articles about the Go programming language and related tools, events etc.


Members Online
Help understanding correct usage of ticker
help

I am trying to implement some sort of rate limiter for one of my loops. While researching ways to do it, I came across ticker. Would love it if someone can review my implementation/pseudo code... I am not sure if I really understand how it works.

Context: I am sending some emails via SES to my users, and I need to stay within the mails/second limit.

Implementation:

ticker := time.NewTicker(100 * time.Millisecond) // 10 mails/second
defer ticker.Stop()

for _, job := range completed_jobs {
	// query db for job owner and users "watching" the job, store in a variable recipients
	for _, recipient := range recipients{
		// generate email content from template
		<-ticker.C // Wait for the ticker
		go MailClient().Send(message)
	}
}

I am assuming, ticker.Stop() is called when the outer loop completes. Please suggest alternatives if there is a better way to do this. TIA.


r/atheismindia icon
A banner for the subreddit

A sanctuary for Atheists in India. Telegram: https://t.me/atheistsofindia Discord: https://discord.gg/SgxhzxGur5 Lemmy: https://lemmy.world/c/atheismindia


Members Online
r/atheismindia
A banner for the subreddit

A sanctuary for Atheists in India. Telegram: https://t.me/atheistsofindia Discord: https://discord.gg/SgxhzxGur5 Lemmy: https://lemmy.world/c/atheismindia


Members Online

I feel like most of the atheist aren't any better than religious people as most of them also spread hatred. Whatvdo you think?

belt-e-belt
commented

It's possible that you have not met real atheists. Most people who call themselves atheists are not just atheists but anti theists, which, in my opinion, are two different things. I don't think bashing on religion is the goal of atheism, and it's not our job to "fix theists" either. As long as theists leave us alone, we shouldn't have anything to do with them. Live and let live. There's a need to fight back only when theists start forcing their ideas on us. But that's my opinion. It might not necessarily be the consensus.

And of course, if your observation is based on the posts here, I don't think many people here are even atheists. A lot of posts here are just Hindus bashing on Muslims and Muslims bashing on Hindus using atheism as an excuse.


r/SaaS icon
A banner for the subreddit

Discussions and useful links for SaaS owners, online business owners, and more.


Members Online
r/SaaS
A banner for the subreddit

Discussions and useful links for SaaS owners, online business owners, and more.


Members Online

After a month :(

belt-e-belt
commented

It took me 3 years. I rebuilt the same app from scratch 4 times. I often felt incompetent looking at others pushing MVP after MVP within weeks. I finally have my app going into production this weekend. You just need one idea, and one month is not nearly enough for an idea that's supposed to earn you some money for the next few years, maybe even decades.

Persistence, brother, keep at it. Build things even if that market is saturated, even if it's not profitable.. You might run into something trivial that no one else has thought of or stumble into a whole new idea altogether. If you chase after the quick bucks, it would most likely run out of steam just as quickly. Focus on what you know, what your domain is, or a problem someone you know is facing, innovate there and keep building on top of that.




r/mutualfunds icon
A banner for the subreddit

Discussion about retirement account's, Investing long term and short term, Financial new's is welcome here with a major focus on mutual funds.


Members Online
r/mutualfunds
A banner for the subreddit

Discussion about retirement account's, Investing long term and short term, Financial new's is welcome here with a major focus on mutual funds.


Members Online

Regular Or Direct which fund is good

I have always wondered.. who buys regular funds. Is there a scenario where regular funds are recommended? If everyone is supposed to buy direct ones, how do the regular ones even exist?





CMD u/belt-e-belt avatar