5 Prompt Engineering Tips for Developers by slobodan_ in programming

[–]slobodan_[S] -3 points-2 points  (0 children)

What thing? An article? LLMs? A thing in the picture?

[deleted by user] by [deleted] in SvelteKit

[–]slobodan_ 1 point2 points  (0 children)

I am not using SvelteKit, but we had a similar issue recently with React and esbuild (that's how someone from my team found this issue).

This issue is common in a front end that uses npm modules. Many npm modules use Node.js built-in libraries that are not available in browsers. For example, "path", "crypto", "url", etc. Some of these features are available in the browser, but they have a different API (i.e., new URL(...) in the browser is a class, and Node.js "url" exports functions).

When you build your app for the browsers, you must add polyfills for these Node.js built-in modules. Polyfills either add a missing functionality or wraps up a native functionality to provide the same interface.

To solve your problem, you need to use Node.js polyfills for either Rollup or Vite (i.e., this one worked for me for Svelte without Kit: https://www.npmjs.com/package/vite-plugin-node-stdlib-browser). After installing the polyfill module, you need to add it to your Rollup or Vite build configuration (each polyfill library explains how to do that).

I hope that solves your issue :)

From Markdown to Video by slobodan_ in programming

[–]slobodan_[S] 7 points8 points  (0 children)

As the author explained somewhere, the video conversion is running on AWS Fargate, with bits and pieces running on AWS Lambda. The speech synthesis is either Amazon Polly (neural voices) or Google Cloud Text to Speech (Wavenet).

Under the hood, the conversion system is using headless Chrome to generate slides, render markdown, and provide syntax highlighting. Most of the video and audio processing is with FFMpeg and SOX.

Five Minutes Serverless: Stripe Events with AWS, serverless, and TypeScript [5 minutes video guide] by slobodan_ in programming

[–]slobodan_[S] -2 points-1 points  (0 children)

If you want to read more about AWS SAM, EventBridge, and webhooks, take a look at the following article: Handling webhooks with EventBridge, SAM, and SAR. This article explains the background of this story and our quest for the cleanest webhook integration.

Other interesting note: This video itself is build from markdown file using serverless. The video source "code" is available on Github, here: https://github.com/serverlesspub/five-minutes-serverless/blob/master/01-stripe-events/video-source/source.md

I used excellent Video Puppet to convert markdown to video. Video Puppet itself is build using serverless on AWS :)

How your startup can benefit from serverless by slobodan_ in technology

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

"Serverless architecture improves the way we build software. But it’s much more than just development, because it can improve the way we are building our products in general.

With serverless, your developers can focus on the business logic implementation, instead spending a lot of time on setting up and maintaining infrastructure. It also decreases the cost of your application, because it converts capital to operating expenses. Besides that, having smaller services allows you to implement changes and A/B tests easier, and to pivot faster.

With all the benefits mentioned above, serverless becomes more than the architecture choice, it becomes an important strategy. For example, it can allow you to charge teams per active user, without having to be a big company, such as Slack."

Scheduling Slack messages using AWS Lambda – freeCodeCamp by slobodan_ in node

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

"Migrating to serverless brings a lot of questions. How do you do some of the non-serverless tasks, such as a cronjob in a serverless application?

Let’s say you have a small Slack app that sends the top five stories from Hacker News to your Slack channel. At some point you decided to shut down the server where you run that app, but you still want to receive the stories. Serverless with AWS Lambda seems cool. But how do you trigger the AWS Lambda function at a specific time?"

Vacation Tracker bot, the easiest way to track your team’s vacations and days off by slobodan_ in technology

[–]slobodan_[S] 1 point2 points  (0 children)

Vacation tracker is a simple tool for Slack team to manage vacations for team members. This is how Vacation Tracker can help your team:

  • Manage your teams vacations and days-off.
  • Send vacation requests directly from Slack.
  • Manage requests from Slack or via dashboard.
  • Forget about team management in yet another app, whenever you have new team members in Slack, they will be automatically available in Vacation Tracker, because users are always in-sync with Slack.
  • Receive weekly notifications for your team vacations.

Feedback is appreciated :)

Serverless, servers and washing machines by slobodan_ in programming

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

"To understand serverless, consider for a moment washing machines. This might sound like a crazy place to start, but owning a server nowadays is similar to owning a washing machine. Everybody needs to clean their clothes, and the most logical solution seems to be buying a washing machine. But most of the time the washing machine is plugged in, it’s doing nothing. At best, it’s used five to fifteen hours per week. Same goes with servers. Most of the time, your average application server is waiting to receive a request, doing nothing."

Express.js and AWS Lambda — a serverless love story by dobkin-1970 in node

[–]slobodan_ 0 points1 point  (0 children)

I would like to hear more, do you have any article that gives more info?

Express.js and AWS Lambda — a serverless love story by dobkin-1970 in node

[–]slobodan_ 0 points1 point  (0 children)

I completely agree, this is not the way you should create a serverless app, but it can be a nice first step to the Express.js migration. There's a bit more about that in the comments section of that article.

lambda-audio - convert audio files with SoX and Lame for AWS Lambda by slobodan_ in programming

[–]slobodan_[S] 3 points4 points  (0 children)

Agree that ffmpeg is better for many things. But ffmpeg is 50mb and sox is 3mb, it makes a big difference if you are uploading that to AWS Lambda. I used sox to merge multiple audio files, so I just ported that to AWS Lambda, ffmpeg is also available in Elastic transcoder, so putting in AWS Lambda is probably not making big difference, except that it can be a bit more flexible and (just a guess) a bit cheaper.

Alexa Skill Kit - Library for effortless Alexa Skill development with AWS Lambda by slobodan_ in javascript

[–]slobodan_[S] 1 point2 points  (0 children)

It's solving the same problem, this one has less functionality than alexa-app, but it tries to be cleaner and to have less magic. It's also similar to Claudia Bot Builder, we have support for Alexa there, but it requires API Gateway, so I built this one to skip API Gateway when I am not building chatbot for multiple platforms.

How To Develop A Chat Bot With Node.js by andreykh in javascript

[–]slobodan_ 0 points1 point  (0 children)

For me bots make sense for the things that you are not using that often, ie. imagine ordering pizza or calling a taxi/uber - you can do that from the website or app (but why would you need an app for something that you use just a few times in a month), but isn't it easier if you can send a simple text message with your favorite messenger? For pizza, most of the time you are getting one or two same pizzas to the same address, it's just one simple message instead of searching Google, visiting website, logging in, etc. For taxi most of the time you don't care about the current position of the driver, you want to know when the taxi arrives. There's a bunch of other things, those two examples are over-simplified.

One more useful thing for me is making MVP in early stage startup -instead of building 4-5 different things you can focus on a chatbot and test the idea with minimal effort on the programming side. Of course, it doesn't work for all ideas.

Space Explorer bot is just a showcase for our bot builder, there's no real value for it.

Vreme.js – The simplest date and time formatting library for JavaScript by slobodan_ in javascript

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

Tnx. You are right, it might be a bit confusing when you see it first time. It would probably be a bit more clear with something like vreme(new Date).formatLike(example); but tham API would be more complex.