2. "built-with": A tool that helps you add customisable badges on your websites, use the Svelte component or framework-free API, CDN script or just use the badge builder tool to generate your snippet here: https://t.co/bB9obLO48L
Here's what I shipped:
1. Feed parser for most popular blogs (cloudflare, meta, github, vercel for now; plan to add more feeds)
Checkout:https://t.co/QaRPtWOUMD
Update: I did many improvements in the API as well as the ui/ux part, now it's clean and fast ux.
Also improved the ci/cd part, it deploys to preview on pr merge and to prod after one approval.
Planning to add more features soon.
Check it out: https://t.co/dOYy9YMIQz
Best advice I ever got from a mentor of mine
```
You should launch. Whatever you're worried about breaking, that's the best case scenario
Odds are nobody clicks. You'll have to launch multiple times. Just launch!
```
He was right ~5 years ago, and he's even more right today
Added streaming responses (SSE) to the LangChain-based AI chat, with a larger context window using chat history. It now responds continuously to queries, runs database lookups by client_id, and returns results in natural language.
𝗖𝗼𝗻𝗰𝘂𝗿𝗿𝗲𝗻𝘁 𝗶𝘀 𝗻𝗼𝘁 𝘁𝗵𝗲 𝘀𝗮𝗺𝗲 𝗮𝘀 𝗽𝗮𝗿𝗮𝗹𝗹𝗲𝗹
Most developers use these terms interchangeably. That's a mistake.
𝗖𝗼𝗻𝗰𝘂𝗿𝗿𝗲𝗻𝗰𝘆 is about structure. You design your program so that multiple tasks can progress simultaneously without waiting for one another to finish. A single CPU core can handle concurrent tasks by rapidly switching between them, running Task A, then Task B, and then back to A. Only one task executes at any instant, but both advance.
𝗣𝗮𝗿𝗮𝗹𝗹𝗲𝗹𝗶𝘀𝗺 is about execution. Multiple tasks run simultaneously on separate CPU cores. Task A runs on Core 1 while Task B runs on Core 2. Both execute at the exact moment.
Here's where it gets interesting: you can have one without the other.
We have four scenarios:
𝟭. 𝗡𝗼𝘁 𝗰𝗼𝗻𝗰𝘂𝗿𝗿𝗲𝗻𝘁, 𝗻𝗼𝘁 𝗽𝗮𝗿𝗮𝗹𝗹𝗲𝗹. One core runs Task A from start to finish. Then it runs Task B, which is executed sequentially. No overlap.
𝟮. 𝗡𝗼𝘁 𝗰𝗼𝗻𝗰𝘂𝗿𝗿𝗲𝗻𝘁, 𝗽𝗮𝗿𝗮𝗹𝗹𝗲𝗹. Multiple cores divide Task A into chunks and process them simultaneously. Task B waits. Once A is completed, the cores proceed to B. This involves the parallel execution of a single task.
𝟯. 𝗖𝗼𝗻𝗰𝘂𝗿𝗿𝗲𝗻𝘁, 𝗻𝗼𝘁 𝗽𝗮𝗿𝗮𝗹𝗹𝗲𝗹. One core switches between Task A and Task B, interleaving their execution. The CPU might run A for 10 milliseconds, switch to B for 10 milliseconds, and then back to A. Both tasks progress, but only one runs at any instant.
𝟰. 𝗖𝗼𝗻𝗰𝘂𝗿𝗿𝗲𝗻𝘁, 𝗽𝗮𝗿𝗮𝗹𝗹𝗲𝗹. Multiple cores execute different tasks simultaneously. Core 1 handles Task A while Core 2 handles Task B. True simultaneous execution of multiple tasks.
𝗪𝗵𝘆 𝘁𝗵𝗶𝘀 𝗺𝗮𝘁𝘁𝗲𝗿𝘀
Writing concurrent code doesn't guarantee parallel execution. Your program might run on a single core, switching between tasks. And that's fine, concurrency improves responsiveness even without parallelism.
Parallel execution requires concurrent design, but concurrency can also work without parallelism. A web server handles multiple requests concurrently on one core by switching between them. Add more cores, and those requests can run in parallel.
The goal differs, too. Concurrency maximizes CPU utilization by minimizing idle time. Parallelism boosts raw performance by distributing work across cores.
𝗪𝗵𝗮𝘁 𝗮𝗿𝗲 𝘁𝗵𝗲 𝗿𝗲𝗮𝗹-𝗹𝗶𝗳𝗲 𝗲𝘅𝗮𝗺𝗽𝗹𝗲𝘀?
🔹 𝗧𝗿𝗮𝗶𝗻𝗶𝗻𝗴 𝗮 𝗻𝗲𝘂𝗿𝗮𝗹 𝗻𝗲𝘁𝘄𝗼𝗿𝗸. You split the dataset into batches and process each batch on a separate GPU core, using parallel execution.
🔹 𝗔 𝗡𝗼𝗱𝗲.𝗷𝘀 𝘀𝗲𝗿𝘃𝗲𝗿. Handles thousands of requests on a single thread by switching between them when waiting for I/O. Concurrent, not parallel. Scaling to multiple processes also introduces parallelism.
🔹 𝗠𝘂𝗹𝘁𝗶-𝘁𝗵𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗶𝗻 .𝗡𝗘𝗧. Spawns multiple threads for concurrent execution. Whether they run in parallel depends on the availability of cores.
𝗪𝗵𝗮𝘁 𝗰𝗮𝗻 𝘄𝗲 𝗹𝗲𝗮𝗿𝗻 𝗳𝗿𝗼𝗺 𝘁𝗵𝗶𝘀?
Concurrent programs can run on one core, but parallel programs require multiple cores.
Designing for concurrency enables efficient handling of various tasks.
Use parallelism when you need speed and have the hardware to support it.
Password hashing uses salt and pepper. Salt is a random value added to each password to prevent duplicates, while pepper is a secret global value stored separately for extra security. Modern hashers like Argon2 are memory-hard and slow for attackers, making your passwords safer.
Tried zod & @DrizzleORM's drizzle gateway, it's super fast to launch!
PS: use `host.docker.internal` as host when using dockerized Postgres's container, localhost won't work.