The best Hacker News stories from Show from the past day
Latest posts:
Show HN: Gdańsk AI – full stack AI voice chatbot
Hi!<p>It's a complete product with integrations to Auth0, OpenAI, Google Cloud and Stripe, which consists of Next.js Web App, Node.js + Express Web API and Python + FastAPI AI API<p>I've built this software, because I wanted to make money by selling tokens to enable users talking with the chatbot. But I think Google / Apple will include such AI-powered assistant in their products soon, so nobody will pay me for using it<p>So I open source the product today and share it as a GNU GPL-2 licensed software<p>I'm happy to assist in case if something is unclear or requires additional docs and answer any questions about Gdańsk AI :)<p>Thanks
Show HN: Gdańsk AI – full stack AI voice chatbot
Hi!<p>It's a complete product with integrations to Auth0, OpenAI, Google Cloud and Stripe, which consists of Next.js Web App, Node.js + Express Web API and Python + FastAPI AI API<p>I've built this software, because I wanted to make money by selling tokens to enable users talking with the chatbot. But I think Google / Apple will include such AI-powered assistant in their products soon, so nobody will pay me for using it<p>So I open source the product today and share it as a GNU GPL-2 licensed software<p>I'm happy to assist in case if something is unclear or requires additional docs and answer any questions about Gdańsk AI :)<p>Thanks
Show HN: We built swup+fragment-plugin to visually enhance classic websites
## TL;DR<p>- Progressively enhance your classic website / MPA to a single page app.<p>- Support for fragment visits, comparable to nested routes in React or Vue.<p>- Keep your site crawlable and indexable without any of the overhead of SSR.<p>- No tight coupling of back- and frontend. Use the CMS / Framework / SSG of your choice.<p>- Strong focus on interoperability with DOM-altering JS tools (think Alpine.js, jQuery, ...).<p>- Strong focus on accessibility, even for fragment visits.<p>## Long Version: Best of three worlds<p>Hi, I'm Rasso Hilber. I have been a web designer and developer since around 2004. From the beginning of my career, I always had to make tradeoffs between 3 goals when building websites:<p>1. The websites I build should be visually impressive, original, and snappy.<p>2. The websites I build should be crawlable, accessible and standards compliant.<p>3. The websites I build should have low technical complexity and be easy to maintain in the long run.<p>In the beginning, I was able to achieve goals 1 (impressive!) and 3 (easy to maintain!) by using Macromedia/Adobe Flash, but due to the nature of the technology horribly failed to deliver crawlable and accessible websites. Later, I found a way to run two sites in parallel for each website I built, one using CMS-generated XHTML for crawlability, one in Flash for the visitors, fetching the data from its XHTML twin. Now I had solved goals 1 and 2, but my setup was awfully complex and brittle.<p>Around 2010, I was relieved to see Flash finally coming to its end. I switched to building websites using PHP, HTML, and jQuery. I could now tick goals 2 (accessibility) and 3 (low complexity), but the websites I was able to build using these technologies weren't as impressive anymore. Hard page loads between every link click being one of the biggest regressions in UX from the days of Flash IMO.<p>Around 2014/15, I first heard about the new frameworks: Angular, React, Vue. These frameworks were not intended to be used for classic websites. They were made for single-page-apps! But it felt to me like no one cared. Even when building classic websites, many developers sacrificed SEO and accessibility for a snappy experience, serving an empty `<div id="app"></div>` to the browser. I couldn't blame them; I had done the same in my early days as a Flash developer. They ticked goal 1 (impressive) and goal 3 (low complexity). But the lack of accessibility kept me from joining the movement. I was still building classic websites, after all.<p>After some time, many started realizing that serving an empty div had downsides – SSR, hydration, and whatnot were born, now ticking goal 1 (impressive) and goal 2 (accessibility), with the trade-off of awful complexity. It reminded me a lot of my little Frankenstein's monster "Flash+XHTML," and I still didn't want to join the hype.<p>Still, because the noise was so loud, I felt like I might be becoming obsolete, an "old man yelling at the clouds".<p>New very interesting tools like HTMX or Unpoly popped up that looked promising at first, but at closer inspection weren't optimized for my use case either. These were primarily built for real interfaces/single-page-apps (html snippets instead of full pages, UI state independent of URLs, altered DOM saved in history snapshots, ...). I wanted to find a <i>tiny</i> tool, optimized for building <i>presentational</i>, <i>content-driven</i> websites with a strong focus on <i>accessibility</i>.<p>Instead, after a few years of rolling my own home-grown solutions, I started using swup[0], a "Versatile and extensible page transition library for server-rendered websites". Swup consists of a tiny core and a rich ecosystem of official plugins[1] for additional functionality. It was hitting the sweet spot between simplicity and complexity, and felt like it was perfect for my use cases. Shortly after I had started using it, I became a core contributor and maintainer of swup.<p>The only thing I was still missing to be a happy developer was the ability to create really complex navigation paths where selected fragments are updated as you navigate a site, much like nested routes allow in React or Vue.<p>The last two months I teamed up with @daun [2] to finally solve this hard problem. The result is two things:<p>1. A new major release of swup (v4) that allows customizing the complete page transition process by providing a powerful hook system and a mutable visit object
2. The newly released fragment-plugin [3] that provides a declarative API for dynamically replacing containers based on rules<p>Use cases for the fragment-plugin are:<p>- a filter UI that live-updates its list of results on every interaction<p>- a detail overlay that shows on top of the currently open content<p>- a tab group that updates only itself when selecting one of the tabs<p>- a form that updates only itself upon submission<p>I can now finally build websites that tick all three boxes:<p>1. Visually impressive, fun, and snappy by using swup's first-class support for animations[4], cache[5], and preload capacities[6], enhanced with fragment visits as seen on the demo site.<p>2. Accessible by being able to serve server-rendered semantic markup that will fully work even with JavaScript disabled (try it out on the demo site!). On top of that, swup's a11y plugin[7] will automatically announce page visits to assistive technologies and will focus the new `<main>` element after each visit.<p>3. Because now all I need for my fancy frontend is a bit of progressive JavaScript, I can choose whatever tool I like on the server, keeping complexity low and maintainability high. I can use SSGs like eleventy or Astro (the demo site is built using Astro!), I can use any CMS like WordPress or ProcessWire, or a framework like Laravel. And I don't have to maintain an additional node server for SSG!<p>The plugin is still in it's early stages, but I have a good feeling that this finally is the right path for me as a web developer. All it took was 20 years! ;)<p>[0] <a href="https://github.com/swup/swup">https://github.com/swup/swup</a><p>[1] <a href="https://swup.js.org/plugins" rel="nofollow noreferrer">https://swup.js.org/plugins</a><p>[2] <a href="https://github.com/daun">https://github.com/daun</a><p>[3] <a href="https://github.com/swup/fragment-plugin">https://github.com/swup/fragment-plugin</a><p>[4] <a href="https://swup.js.org/getting-started/how-it-works/" rel="nofollow noreferrer">https://swup.js.org/getting-started/how-it-works/</a><p>[5] <a href="https://swup.js.org/api/cache/" rel="nofollow noreferrer">https://swup.js.org/api/cache/</a><p>[6] <a href="https://swup.js.org/plugins/preload-plugin/" rel="nofollow noreferrer">https://swup.js.org/plugins/preload-plugin/</a><p>[7] <a href="https://swup.js.org/plugins/a11y-plugin/" rel="nofollow noreferrer">https://swup.js.org/plugins/a11y-plugin/</a>
Show HN: I wrote a compendium of software design
Show HN: I wrote a compendium of software design
Show HN: Hydra 1.0 – open-source column-oriented Postgres
hi hn, hydra ceo here<p>hydra is an open source, column-oriented postgres. you can set up remarkably fast aggregates on your project in minutes to query billions of rows instantly.<p>postgres is great, but aggregates can take minutes to hours to return results on large data sets. long-running analytical queries hog database resources and degrade performance. use hydra to run much faster analytics on postgres without making code changes. data is automatically loaded into columnar format and compressed. connect to hydra with your preferred postgres client (psql, dbeaver, etc).<p>following 4 months of development on hydra v0.3.0-alpha, our team is proud to share our first major version release. hydra 1.0 is under active development, but ready for use and feedback. we’re aiming to release 1.0 into general availability (ga) soon.<p>for testing, try the hydra free tier to create a column-oriented postgres instance on the cloud. <a href="https://dashboard.hydra.so/signup">https://dashboard.hydra.so/signup</a>
Show HN: Hydra 1.0 – open-source column-oriented Postgres
hi hn, hydra ceo here<p>hydra is an open source, column-oriented postgres. you can set up remarkably fast aggregates on your project in minutes to query billions of rows instantly.<p>postgres is great, but aggregates can take minutes to hours to return results on large data sets. long-running analytical queries hog database resources and degrade performance. use hydra to run much faster analytics on postgres without making code changes. data is automatically loaded into columnar format and compressed. connect to hydra with your preferred postgres client (psql, dbeaver, etc).<p>following 4 months of development on hydra v0.3.0-alpha, our team is proud to share our first major version release. hydra 1.0 is under active development, but ready for use and feedback. we’re aiming to release 1.0 into general availability (ga) soon.<p>for testing, try the hydra free tier to create a column-oriented postgres instance on the cloud. <a href="https://dashboard.hydra.so/signup">https://dashboard.hydra.so/signup</a>
Show HN: Hydra 1.0 – open-source column-oriented Postgres
hi hn, hydra ceo here<p>hydra is an open source, column-oriented postgres. you can set up remarkably fast aggregates on your project in minutes to query billions of rows instantly.<p>postgres is great, but aggregates can take minutes to hours to return results on large data sets. long-running analytical queries hog database resources and degrade performance. use hydra to run much faster analytics on postgres without making code changes. data is automatically loaded into columnar format and compressed. connect to hydra with your preferred postgres client (psql, dbeaver, etc).<p>following 4 months of development on hydra v0.3.0-alpha, our team is proud to share our first major version release. hydra 1.0 is under active development, but ready for use and feedback. we’re aiming to release 1.0 into general availability (ga) soon.<p>for testing, try the hydra free tier to create a column-oriented postgres instance on the cloud. <a href="https://dashboard.hydra.so/signup">https://dashboard.hydra.so/signup</a>
Show HN: Hydra 1.0 – open-source column-oriented Postgres
hi hn, hydra ceo here<p>hydra is an open source, column-oriented postgres. you can set up remarkably fast aggregates on your project in minutes to query billions of rows instantly.<p>postgres is great, but aggregates can take minutes to hours to return results on large data sets. long-running analytical queries hog database resources and degrade performance. use hydra to run much faster analytics on postgres without making code changes. data is automatically loaded into columnar format and compressed. connect to hydra with your preferred postgres client (psql, dbeaver, etc).<p>following 4 months of development on hydra v0.3.0-alpha, our team is proud to share our first major version release. hydra 1.0 is under active development, but ready for use and feedback. we’re aiming to release 1.0 into general availability (ga) soon.<p>for testing, try the hydra free tier to create a column-oriented postgres instance on the cloud. <a href="https://dashboard.hydra.so/signup">https://dashboard.hydra.so/signup</a>
Show HN: Using LLama2 to Correct OCR Errors
I've been disappointed by the very poor quality of results that I generally get when trying to run OCR on older scanned documents, especially ones that are typewritten or otherwise have unusual or irregular typography. I recently had the idea of using Llama2 to use common sense reasoning and subject level expertise to correct transcription errors in a "smart" way-- basically doing what a human proofreader who is familiar with the topic might do.<p>I came up with the linked script that takes a PDF as input, runs Tesseract on it to get an initial text extraction, and then feeds this sentence-by-sentence to Llama2, first to correct mistakes, and then again on the corrected text to format it as markdown where possible.
This was surprisingly easier than I initially expected thanks to the very nice tooling now available in libraries such as llama-cpp-python, langchain, and pytesseract. But the big issue I was encountering was that Llama2 wasn't just correcting the text it was given-- it was also hallucinating a LOT of totally new sentences that didn't appear in the original text at all (some of these new sentences used words which never appeared elsewhere in the original text).<p>I figured this would be pretty simple to filter out using fuzzy string matching-- basically check all the sentences in the LLM corrected text and filter out sentences that are very different from any sentences in the original OCRed text. To my surprise, this approach worked very poorly. In fact, lots of other similar tweaks, including using bag-of-words and the spacy NLP library in various ways (spacy worked very poorly in everything I tried).<p>Finally I realized that I had a good solution staring me in the face: Llama2. I realized I could get sentence level vector embeddings straight from Llama2 using langchain. So I did that, getting embeddings for each sentence in the raw OCRed text and the LLM corrected text, and then computed the cosine similarity of each sentence in the LLM corrected text against all sentences in the raw OCRed text. If no sentences match in the raw OCRed text, then that sentence has a good chance of being hallucinated.<p>In order to save the user from having to experiment with various thresholds, I saved the computed embeddings to an SQLite database so they only had to be computed once, and then tried several thresholds, comparing the length of the filtered LLM corrected text to the raw OCRed text; if things worked right, these texts should be roughly the same length. So as soon as the filtered length dips below the raw OCRed text length, it backtracks and uses the previous threshold as the final selected threshold.<p>Anyway, if you have some very old scanned documents laying around, you might try them out and see how well it works for you. Do note that it's extremely slow, but you can leave it overnight and maybe the next day you'll have your finished text, which is better than nothing! I feel like this could be useful for sites like the Internet Archive-- I've found their OCR results to be extremely poor for older documents.<p>I'm very open to any ideas or suggestions you might have. I threw this together in a couple days and know that it can certainly be improved in various ways. One idea that I thought might be fun would be to make this work with a Ray cluster, sending a different page of the document to each of the workers in the cluster to do it all at the same time.
Show HN: Using LLama2 to Correct OCR Errors
I've been disappointed by the very poor quality of results that I generally get when trying to run OCR on older scanned documents, especially ones that are typewritten or otherwise have unusual or irregular typography. I recently had the idea of using Llama2 to use common sense reasoning and subject level expertise to correct transcription errors in a "smart" way-- basically doing what a human proofreader who is familiar with the topic might do.<p>I came up with the linked script that takes a PDF as input, runs Tesseract on it to get an initial text extraction, and then feeds this sentence-by-sentence to Llama2, first to correct mistakes, and then again on the corrected text to format it as markdown where possible.
This was surprisingly easier than I initially expected thanks to the very nice tooling now available in libraries such as llama-cpp-python, langchain, and pytesseract. But the big issue I was encountering was that Llama2 wasn't just correcting the text it was given-- it was also hallucinating a LOT of totally new sentences that didn't appear in the original text at all (some of these new sentences used words which never appeared elsewhere in the original text).<p>I figured this would be pretty simple to filter out using fuzzy string matching-- basically check all the sentences in the LLM corrected text and filter out sentences that are very different from any sentences in the original OCRed text. To my surprise, this approach worked very poorly. In fact, lots of other similar tweaks, including using bag-of-words and the spacy NLP library in various ways (spacy worked very poorly in everything I tried).<p>Finally I realized that I had a good solution staring me in the face: Llama2. I realized I could get sentence level vector embeddings straight from Llama2 using langchain. So I did that, getting embeddings for each sentence in the raw OCRed text and the LLM corrected text, and then computed the cosine similarity of each sentence in the LLM corrected text against all sentences in the raw OCRed text. If no sentences match in the raw OCRed text, then that sentence has a good chance of being hallucinated.<p>In order to save the user from having to experiment with various thresholds, I saved the computed embeddings to an SQLite database so they only had to be computed once, and then tried several thresholds, comparing the length of the filtered LLM corrected text to the raw OCRed text; if things worked right, these texts should be roughly the same length. So as soon as the filtered length dips below the raw OCRed text length, it backtracks and uses the previous threshold as the final selected threshold.<p>Anyway, if you have some very old scanned documents laying around, you might try them out and see how well it works for you. Do note that it's extremely slow, but you can leave it overnight and maybe the next day you'll have your finished text, which is better than nothing! I feel like this could be useful for sites like the Internet Archive-- I've found their OCR results to be extremely poor for older documents.<p>I'm very open to any ideas or suggestions you might have. I threw this together in a couple days and know that it can certainly be improved in various ways. One idea that I thought might be fun would be to make this work with a Ray cluster, sending a different page of the document to each of the workers in the cluster to do it all at the same time.
Show HN: Adapt framework – build privacy-by-design peer-to-peer applications
Show HN: Learn a language quickly by practising speaking with AI
Hi guys,<p>Hope everyone is well. This app was borne out of my own frustration. I thought that I was terrible at learning languages at school, since I didn't become conversational in French after 5 years of study. However, I later traveled with some French friends and, in just under 3 weeks, I was able to hold a reasonable conversation. I realized that there's no substitute for speaking to native speakers.<p>I tried to adopt this approach for other languages, but it's much harder to find people to practise with when you aren't travelling. I started using iTalki to meet people from different countries and chat to them. It quickly became very expensive and time-consuming to schedule the calls, so I gave up.<p>I made PrettyPolly so that anyone can easily practice speaking 26 languages orally. The app uses ChatGPT (amongst other tools) to allow you to practice speaking whenever you want. It also generates a fluency score for each conversation so that you have an objective way of tracking progress.<p>It's free to use (up to 15 conversations per month). I've found that using it once or twice per day is plenty, and you'll be amazed at how much you will pick up in a week. I've added some FAQs here in case useful - <a href="https://www.prettypolly.app/learn" rel="nofollow noreferrer">https://www.prettypolly.app/learn</a><p>Would really appreciate any feedback. Let me know if you have any questions, issues or suggestions.<p>Thanks,
Chris
Show HN: Learn a language quickly by practising speaking with AI
Hi guys,<p>Hope everyone is well. This app was borne out of my own frustration. I thought that I was terrible at learning languages at school, since I didn't become conversational in French after 5 years of study. However, I later traveled with some French friends and, in just under 3 weeks, I was able to hold a reasonable conversation. I realized that there's no substitute for speaking to native speakers.<p>I tried to adopt this approach for other languages, but it's much harder to find people to practise with when you aren't travelling. I started using iTalki to meet people from different countries and chat to them. It quickly became very expensive and time-consuming to schedule the calls, so I gave up.<p>I made PrettyPolly so that anyone can easily practice speaking 26 languages orally. The app uses ChatGPT (amongst other tools) to allow you to practice speaking whenever you want. It also generates a fluency score for each conversation so that you have an objective way of tracking progress.<p>It's free to use (up to 15 conversations per month). I've found that using it once or twice per day is plenty, and you'll be amazed at how much you will pick up in a week. I've added some FAQs here in case useful - <a href="https://www.prettypolly.app/learn" rel="nofollow noreferrer">https://www.prettypolly.app/learn</a><p>Would really appreciate any feedback. Let me know if you have any questions, issues or suggestions.<p>Thanks,
Chris
Show HN: Learn a language quickly by practising speaking with AI
Hi guys,<p>Hope everyone is well. This app was borne out of my own frustration. I thought that I was terrible at learning languages at school, since I didn't become conversational in French after 5 years of study. However, I later traveled with some French friends and, in just under 3 weeks, I was able to hold a reasonable conversation. I realized that there's no substitute for speaking to native speakers.<p>I tried to adopt this approach for other languages, but it's much harder to find people to practise with when you aren't travelling. I started using iTalki to meet people from different countries and chat to them. It quickly became very expensive and time-consuming to schedule the calls, so I gave up.<p>I made PrettyPolly so that anyone can easily practice speaking 26 languages orally. The app uses ChatGPT (amongst other tools) to allow you to practice speaking whenever you want. It also generates a fluency score for each conversation so that you have an objective way of tracking progress.<p>It's free to use (up to 15 conversations per month). I've found that using it once or twice per day is plenty, and you'll be amazed at how much you will pick up in a week. I've added some FAQs here in case useful - <a href="https://www.prettypolly.app/learn" rel="nofollow noreferrer">https://www.prettypolly.app/learn</a><p>Would really appreciate any feedback. Let me know if you have any questions, issues or suggestions.<p>Thanks,
Chris
Show HN: Local development with .local domains and HTTPS
Hi HN! I'm Jarek, and I've built this tool that allows publishing .local domains on the local network using mDNS.<p>It also has a reverse proxy that handles HTTPS termination and port forwarding.<p>I'm working on adding more features, like an index page with all available domains or allowing proxy redirects, so you could redirect from HTTP to HTTPS.<p>Let me know if you have any questions or feedback!
Show HN: imessage-exporter, a CLI app and library
Show HN: imessage-exporter, a CLI app and library
Show HN: imessage-exporter, a CLI app and library
Show HN: PromptTools – open-source tools for evaluating LLMs and vector DBs
Hey HN! We’re Kevin and Steve. We’re building PromptTools (<a href="https://github.com/hegelai/prompttools">https://github.com/hegelai/prompttools</a>): open-source, self-hostable tools for experimenting with, testing, and evaluating LLMs, vector databases, and prompts.<p>Evaluating prompts, LLMs, and vector databases is a painful, time-consuming but necessary part of the product engineering process. Our tools allow engineers to do this in a lot less time.<p>By “evaluating” we mean checking the quality of a model's response for a given use case, which is a combination of testing and benchmarking. As examples:
- For generated JSON, SQL, or Python, you can check that the output is actually JSON, SQL, or executable Python.
- For generated emails, you can use another model to assess the quality of the generated email given some requirements, like whether or not the email is written professionally.
- For a question-answering chatbot, you can check that the actual answer is semantically similar to an expected answer.<p>At Google, Steve worked with HuggingFace and Lightning to support running the newest open-source models on TPUs. He realized that while the open-source community was contributing incredibly powerful models, it wasn’t so easy to discover and evaluate them. It wasn’t clear when you could use Llama or Falcon instead of GPT-4. We began looking for ways to simplify and scale this evaluation process.<p>With PromptTools, you can write a short Python script (as short as 5 lines) to run such checks across models, parameters, and prompts, and pass the results into an evaluation function to get scores. All these can be executed on your local machine without sending data to third-parties. Then we help you turn those experiments into unit tests and CI/CD that track your model’s performance over time.<p>Today we support all of the major model providers like OpenAI, Anthropic, Google, HuggingFace, and even LlamaCpp, and vector databases like ChromaDB and Weaviate. You can evaluate responses via semantic similarity, auto-evaluation by a language model, or structured output validations like JSON and Python. We even have a notebook UI for recording manual feedback.<p>Quickstart:<p><pre><code> pip install prompttools
git clone https://github.com/hegelai/prompttools.git
cd prompttools && jupyter notebook examples/notebooks/OpenAIChatExperiment.ipynb
</code></pre>
For detailed instructions, see our documentation at <a href="https://prompttools.readthedocs.io/en/latest/" rel="nofollow noreferrer">https://prompttools.readthedocs.io/en/latest/</a>.<p>We also have a playground UI, built in streamlit, which is currently in beta: <a href="https://github.com/hegelai/prompttools/tree/main/prompttools/playground">https://github.com/hegelai/prompttools/tree/main/prompttools...</a>. Launch it with:<p><pre><code> pip install prompttools
git clone https://github.com/hegelai/prompttools.git
cd prompttools && streamlit run prompttools/ui/playground.py
</code></pre>
We’d love it if you tried our product out and let us know what you think! We just got started a month ago and we’re eager to get feedback and keep building.