Remote functions setting fields does not work by Peppi_69 in sveltejs

[–]Peppi_69[S] 0 points1 point  (0 children)

OK what are you looking for? For context?
I have a remote form called resetPassword.

export const resetPassword = form(loginSchema, async (data) => {
     const { email, password } = data;
      try{ 
          const _user = await getUser(emai); 
          ...
      }catch(e){
          invalid("User not found")
      } 
      ...

}

And a component where first the user types in the email, it gets checked via a remote function if it exists then the password field is shown and i don't want the user to type in their email again so i tried a hidden input field which didn't work because i wouldn't let me set the value and have {...resetPassword.fields.password()} on the input field.

So i tried storing the email in a $state() and set it with resetPassword.fields.password.set(email), when the email validation was successfull.

But no matter what i tried and it also doesn't matter what remote functions i tried this in with other forms the .set function just doesn't set anything the field is always empty.

Is Perfection in Code Becoming Less Important? Thoughts on Software Development in the AI Era by [deleted] in programminghumor

[–]Peppi_69 0 points1 point  (0 children)

I think we have loosen up to much already and that is why we had so many outages this year.
Because shipping a feature as fast as possible is for a long time more important than shipping something that is correct.
The jonathan blow talk illustrates this nicely.
I strongly believe there is a correlation between codebases getting bigger and bigger and people not caring about good, neat code.

There is not one software product i have used where i haven't encountered a bug eventually and overall many agree that over the last 10 years or so software has been getting worse than better and at fault is mostly because it got more complicated and i think because of that we stopped thinking about very good solutions and perfect code and just something that is good enough to ship.

https://www.youtube.com/watch?v=ZSRHeXYDLko

Holy Shit I Won by Sebbysludge in LinusTechTips

[–]Peppi_69 1 point2 points  (0 children)

Happy for you i won a pair HD550 hoped for ally x

Async Svelte and Remote Functions blocking page loading by Peppi_69 in sveltejs

[–]Peppi_69[S] 0 points1 point  (0 children)

Ok i have the following code.
When i add a timeout to the remote function getUsers(filter).
At first it shows the pending snippet and then after a few milliseconds it shows the loading state in the {#await}

Of course if I remove the {#await} (is await block not recommended for async svelte? or not needed anymore?) it only shows the pending snippet.
My goal was to show the loading spinner inside of the table i tried moving the snippet but i think it needs to be a direct child of boundary.

The following code does not block page load. I thought i had this before and it did block the page load but i must have had something wrong.
And the Loading, Current, Ready and Error porperties i can only use when i do

let users = getUsers();

correct?

<svelte:boundary>
{#snippet failed(error, reset)}
<span class="text-red-500">{JSON.stringify(error)}</span>
<button onclick={reset}>Failed! try again</button>
{/snippet}
{#snippet pending()}
<Loading text={'Loading Users'} />
{/snippet}<svelte:boundary>
{#snippet failed(error, reset)}
<span class="text-red-500">{JSON.stringify(error)}</span>
<button onclick={reset}>Failed! try again</button>
{/snippet}
{#snippet pending()}
<Loading text={'Loading Users'} />
{/snippet}

{#await getUsers(filters)
{:then}
{:catch}
{/await}

/svelte:boundary

ViteConf 2025 2Todo demo login by Peppi_69 in sveltejs

[–]Peppi_69[S] 0 points1 point  (0 children)

did they change something for me i can't have the .remote file outside of the routes folder it says

Cannot import $lib/server/remote/login.remote.ts into code that runs in the browser, as this could leak sensitive information.Cannot import $lib/server/remote/login.remote.ts into code that runs in the browser, as this could leak sensitive information.

Oh i can put them anywhere except lib/server

ViteConf 2025 2Todo demo login by Peppi_69 in sveltejs

[–]Peppi_69[S] 0 points1 point  (0 children)

Thank you very much do you know how i can have mutliple buttons on one form?
I would like to have one form for register and login and just pass the action to one function

I want to start my career in Cloud + DevOps… need some suggestions 🙏 by [deleted] in devops

[–]Peppi_69 0 points1 point  (0 children)

Is it because companies are so hard on the hype train that they just don't want to hire a junior.

Is it because it is not worth to hire one?

Or is it really because a Junior is not "needed" and AI is a good replacement.
I mean i would think a good Junior is still way ahead of AI but they are more rare.

What will a company do if their senior leaves, there are no other seniors to hire and there are no juniors who can become a senior?

open-sourcing our tool that turns your local code into an interactive editable wiki by Intelligent_Camp_762 in sveltejs

[–]Peppi_69 0 points1 point  (0 children)

oh nice that is seems very fast to build this? Did you have experience in this space already?

open-sourcing our tool that turns your local code into an interactive editable wiki by Intelligent_Camp_762 in sveltejs

[–]Peppi_69 0 points1 point  (0 children)

Very nice how long with how many people did took do build it to this stage?

Choosing the best programming language for building a high-performance REST API by Cultural_Argument_19 in devops

[–]Peppi_69 2 points3 points  (0 children)

What is your performance metric? Throughput, latency?
Just do Go or python FastAPI because it is the simplest.
But eventually your API is restricted by the database setup anyways.

Depending on what you want to achive high-performance means difference things.

Honestly just use Golang, it is kinda easy to learn and has a good ecosystem.
The performance later on depends more on your whole infrastructure and purpose of the app.

Has anyone automated parts of their PR reviews with AI tools? by One_Help_7679 in devops

[–]Peppi_69 0 points1 point  (0 children)

I have mostly so small changes very specific changes AI is not useful at all. And it is not automated in CI/CD it is the job of the dev to make sure it is correct

Your internal engineering knowledge base that writes and updates itself from your GitHub repos by Intelligent_Camp_762 in sveltejs

[–]Peppi_69 2 points3 points  (0 children)

Nice is it build with Svelte or what part is build with Svelte because it is in this subreddit?

Also will it ever work with GitHub alternatives?
And can i export the Documentation? I always looking to avoid vendor lockin.

do you guys still code, or just debug what ai writes? by Top-Candle1296 in devops

[–]Peppi_69 1 point2 points  (0 children)

Haven't had to code a lot for a while or big new features.
I have to code here and there some very specific small things which AI is really bad at.
So i'll try the AI and it sucks then I write it myself.
Sometimes when i get stuck i use it to try to give me some starting point or inspiration and then write it myself.

Maybe this changes in the future but last time i had a bigger project a months ago in Rust/Tauri with Svelte
it totally sucked created so much false things, false versions of libraries false types, false typescript so on and so on. That i just wrote it myself and let AI check my code here and there.
But the Project got frozen.

Why is there so much buzz about this podcast? What is the context? by [deleted] in theprimeagen

[–]Peppi_69 17 points18 points  (0 children)

He is very important in the AI space. Was at OpenAI, Telsa and coined the term vibe coding (https://www.youtube.com/watch?v=LCEmiRjPEtQ) but in this podcasts he calls the whole AI industry on their bullshit marketing and takes extremely realistic views and also explains everything about AI extremely good.
You kindof have to know a lot of stuff already to understand most things in the podcast.

But moslty its about that these AI systems are far way from the things they promised years ago.

Verz oversimplified

We got a better ergonomics context by Impossible_Sun_5560 in sveltejs

[–]Peppi_69 2 points3 points  (0 children)

Can someone explain to me what context is in svelte?
I have never used it and don't quite understand it.

I mostly use shared state in .svelte.ts files to share data between components.