The best Hacker News stories from Show from the past week

Go back

Latest posts:

Show HN: I built an autopilot for the lunar lander game

I got pretty good at (and very addicted to) the lunar lander game from a few days ago...<p>so I decided to make an autopilot for the lander based on what I felt like was the best strategy! Now I can have perfect landings every time without lifting a finger :D<p>Writing the autopilot code was a lot more fun than I expected! It felt a bit like programming a robot.<p>Source code: <a href="https://github.com/szhu/lunar-lander-autopilot">https://github.com/szhu/lunar-lander-autopilot</a><p>Original lander HN post: <a href="https://news.ycombinator.com/item?id=35032506" rel="nofollow">https://news.ycombinator.com/item?id=35032506</a>

Show HN: CodeGPT.nvim – ChatGPT plugin for Neovim

Show HN: BBC “In Our Time”, categorised by Dewey Decimal, heavy lifting by GPT

I'm a big fan of the BBC podcast In Our Time -- and (like most people) I've been playing with the OpenAI APIs.<p>In Our Time has almost 1,000 episodes on everything from Cleopatra to the evolution of teeth to plasma physics, all still available, so it's my starting point to learn about most topics. But it's not well organised.<p>So here are the episodes sorted by library code. It's fun to explore.<p>Web scraping is usually pretty tedious, but I found that I could send the minimised HTML to GPT-3 and get (almost) perfect JSON back: the prompt includes the Typescript definition.<p>At the same time I asked for a Dewey classification... and it worked. So I replaced a few days of fiddly work with 3 cents per inference and an overnight data run.<p>My takeaway is that I'll be using LLMs as function call way more in the future. This isn't "generative" AI, more "programmatic" AI perhaps?<p>So I'm interested in what temperature=0 LLM usage looks like (you want it to be pretty deterministic), at scale, and what a language that treats that as a first-class concept might look like.

Show HN: I built a better UI for ChatGPT

Show HN: NESFab – Programming language for making NES games

This is a long-running personal project I've had to write an optimizing compiler from scratch. Everything was done by me, including the lexer/parser, SSA-based IR, high-performance data structures, and code generator.<p>Originally I wasn't targeting the NES. It started as a scripting language, then it morphed into a C++ replacement, and then finally I turned it into what it is today. The large scope of the project and colorful history means it's still a little rough around the edges, but it's now working well enough to post.

Show HN: Total.js – Low-code development (Node-RED alternative)

Show HN: Faster FastAPI with simdjson and io_uring on Linux 5.19

A few months ago, I benchmarked FastAPI on an i9 MacBook Pro. I couldn't believe my eyes. A primary REST endpoint to `sum` two integers took 6 milliseconds to evaluate. It is okay if you are targeting a server in another city, but it should be less when your client and server apps are running on the same machine.<p>FastAPI would have bottleneck-ed the inference of our lightweight UForm neural networks recently trending on HN under the title "Beating OpenAI CLIP with 100x less data and compute". (Thank you all for the kind words!) So I wrote another library.<p>It has been a while since I have written networking libraries, so I was eager to try the newer io_uring networking functionality added by Jens Axboe in kernel 5.19. TLDR: It's excellent! We used pre-registered buffers and re-allocated file descriptors from a managed pool. Some other parts, like multi-shot requests, also look intriguing, but we couldn't see a flawless way to integrate them into UJRPC. Maybe next time.<p>Like a parent with two kids, we tell everyone we love Kernel Bypass and SIMD equally. So I decided to combine the two, potentially implementing one of the fastest implementations of the most straightforward RPC protocol - JSON-RPC. ~~Healthy and Fun~~ Efficient and Simple, what can be better?<p>By now, you may already guess at least one of the dependencies - `simdjson` by Daniel Lemiere, that has become the industry standard. io_uring is generally very fast, even with a single core. Adding more polling threads may only increase congestion. We needed to continue using no more than one thread, but parsing messages may involve more work than just invoking a JSON parser.<p>JSON-RPC is transport agnostic. The incoming requests can be sent over HTTP, pre-pended by rows of headers. Those would have to be POSTs and generally contain Content-Length and Content-Type. There is a SIMD-accelerated library for that as well. It is called `picohttpparser`, uses SSE, and is maintained by H2O.<p>The story doesn't end there. JSON is limited. Passing binary strings is a nightmare. The most common approach is to encode them with base-64. So we took the Turbo-Base64 from the PowTurbo project to decode those binary strings.<p>The core implementation of UJRPC is under 2000 lines of C++. Knowing that those lines connect 3 great libraries with the newest and coolest parts of Linux is enough to put a smile on my face. Most people are more rational, so here is another reason to be cheerful.<p>- FastAPI throughput: 3'184 rps. - Python gRPC throughput: 9'849 rps. - UJRPC throughput: -- Python server with io_uring: 43'000 rps. -- C server with POSIX: 79'000 rps. -- C server with io_uring: 231'000 rps.<p>Granted, this is yet to be your batteries-included server. It can't balance the load, manage threads, spell S in HTTPS, or call parents when you misbehave in school. But at least part of it you shouldn't expect from a web server.<p>After following the standardization process of executors in C++ for the last N+1 years, we adapted the "bring your runtime" and "bring your thread-pool" policies. HTTPS support, however, is our next primary objective.<p>---<p>Of course, it is a pre-production project and must have a lot of bugs. Don't hesitate to report them. We have huge plans for this tiny package and will potentially make it the default transport of UKV: <a href="https://github.com/unum-cloud/ukv">https://github.com/unum-cloud/ukv</a>

Show HN: OpenBB Terminal – Investment research for everyone

Show HN: OpenBB Terminal – Investment research for everyone

Show HN: Llama-dl – high-speed download of LLaMA, Facebook's 65B GPT model

Show HN: Llama-dl – high-speed download of LLaMA, Facebook's 65B GPT model

Show HN: Lander, a lunar lander style web game

I’ve been working on this game for the past few weeks. It’s written in plain JavaScript, mostly with canvas, with no dependencies.<p>The code is here: <a href="https://github.com/ehmorris/lunar-lander">https://github.com/ehmorris/lunar-lander</a>

Show HN: Lander, a lunar lander style web game

I’ve been working on this game for the past few weeks. It’s written in plain JavaScript, mostly with canvas, with no dependencies.<p>The code is here: <a href="https://github.com/ehmorris/lunar-lander">https://github.com/ehmorris/lunar-lander</a>

Show HN: Procal: A simple Qt-based programming calculator

Show HN: Mathesar – open-source collaborative UI for Postgres databases

Hi HN! We just released the public alpha version of Mathesar (<a href="https://mathesar.org/" rel="nofollow">https://mathesar.org/</a>, code: <a href="https://github.com/centerofci/mathesar">https://github.com/centerofci/mathesar</a>).<p>Mathesar is an open source tool that provides a spreadsheet-like interface to a PostgreSQL database.<p>I was originally inspired by wanting to build something like Dabble DB. I was in awe of their user experience for working with relational data. There’s plenty of “relational spreadsheet” software out there, but I haven’t been able to find anything with a comparable UX since Twitter shut Dabble DB down.<p>We're a non-profit project. The core team is based out of a US 501(c)(3).<p>Features:<p>* <i>Built on Postgres</i>: Connect to an existing Postgres database or set one up from scratch.<p>* <i>Utilizes Postgres Features</i>: Mathesar’s UI uses Postgres features. e.g. "Links" in the UI are foreign keys in the database.<p>* <i>Set up Data Models</i>: Easily create and update Postgres schemas and tables.<p>* <i>Data Entry</i>: Use our spreadsheet-like interface to view, create, update, and delete table records.<p>* <i>Data Explorer</i>: Use our Data Explorer to build queries without knowing anything about SQL or joins.<p>* <i>Schema Migrations</i>: Transfer columns between tables in two clicks in the UI.<p>* <i>Custom Data Types</i>:: Custom data types for emails and URLs (more coming soon), validated at the database level.<p>Links:<p>CODE: <a href="https://github.com/centerofci/mathesar">https://github.com/centerofci/mathesar</a><p>LIVE DEMO: <a href="https://demo.mathesar.org/" rel="nofollow">https://demo.mathesar.org/</a><p>DOCS: <a href="https://docs.mathesar.org/" rel="nofollow">https://docs.mathesar.org/</a><p>COMMUNITY: <a href="https://wiki.mathesar.org/en/community" rel="nofollow">https://wiki.mathesar.org/en/community</a><p>WEBSITE: https:/mathesar.org/<p>SPONSOR US: <a href="https://github.com/sponsors/centerofci">https://github.com/sponsors/centerofci</a> or <a href="https://opencollective.com/mathesar" rel="nofollow">https://opencollective.com/mathesar</a>

Show HN: ChatGPT-powered dystopia simulator

OP here. This comment contains SPOILERS so try the dystopia simulator first before reading further!<p>I built "WeChatGPT+" in December on top of GPT-3. It was pretty surreal when OpenAI released an actual product named "ChatGPT Plus" a few months after that. Then the Microsoft partnership was announced, Bing AI was released, and marketing materials were leaked indicating that Bing AI would start including advertisements within the chat responses. Reality imitates fiction, I guess.<p>Today - literally a few hours ago - OpenAI announced public ChatGPT API with 10% the cost of GPT-3. I immediately migrated. Took about an hour to re-tune the prompt for a different model. I wouldn't have been able to afford serving this over the GPT-3 API because it costs so much (I'd kept the server disabled for more than a month). Should be much more affordable now. Also some of the responses seem wittier and funnier.<p>Prompt generation and other source code available here: <a href="https://github.com/baobabKoodaa/future/blob/master/server.js#L58-L99">https://github.com/baobabKoodaa/future/blob/master/server.js...</a><p>Let me know how you feel about this! :)

Show HN: Crul – Query Any Webpage or API

Hi HN, we’re Carl and Nic, the creators of crul (<a href="https://www.crul.com" rel="nofollow">https://www.crul.com</a>), and we’ve been hard at work for the last year and a half building our dream of turning the web into a dataset. In a nutshell crul is a tool for querying and building web and api data feeds from anywhere to anywhere.<p>With crul you can crawl and transform web pages into csv tables, explore and dynamically query APIs, filter and organize data, and push data sets to third party data lakes and analytics tools. Here’s a demo video, we’ve been told Nic sounds like John Mayer (lol) (<a href="https://www.crul.com/demo-video" rel="nofollow">https://www.crul.com/demo-video</a>)<p>We’ve personally struggled wrangling data from the web using puppeteer/playwright/selenium, jq or cobbling together python scripts, client libraries, and schedulers to consume APIs. The reality is that shit is hard, doesn’t scale (classic blocking for-loop or async saturation), and comes with thorny maintenance/security issues. The tools we love to hate.<p>Crul’s value prop is simple: Query any Webpage or API for free.<p>At its core, crul is based on the foundational linked nature of Web/API content. It consists of a purpose built map/expand/reduce engine for hierarchical Web/API content (kind of like postman but with a membership to Gold's Gym) with a familiar parser expression grammar that naturally gets the job done (and layered caching to make it quick to fix when it doesn’t on the first try). There’s a boatload of other features like domain policies, scheduler, checkpoints, templates, REST API, Web UI, vault, OAuth for third parties and 20+ stores to send your data to.<p>Our goal is to open source crul as time and resources permit. At the end of the day it’s just the two of us trying to figure things out as we go! We’re just getting started.<p>Crul is one bad mother#^@%*& and the web is finally yours!<p>Download crul for free as a Mac OS desktop application or as a Docker image (<a href="https://www.crul.com" rel="nofollow">https://www.crul.com</a>) and let us know if you love it or hate it. (<a href="https://forms.gle/5BXb5bLC1D5QG7i99" rel="nofollow">https://forms.gle/5BXb5bLC1D5QG7i99</a>) And come say hello to us on our slack channel - we’re a friendly bunch! (<a href="https://crulinc.slack.com/" rel="nofollow">https://crulinc.slack.com/</a>)<p>Nic and Carl (<a href="https://www.crul.com/early-days" rel="nofollow">https://www.crul.com/early-days</a>)

Show HN: Scribble Diffusion – Turn your sketch into a refined image using AI

Show HN: Scribble Diffusion – Turn your sketch into a refined image using AI

Jailbreak Chat: A collection of ChatGPT jailbreaks

Created this site two weeks ago to compile some ChatGPT jailbreaks I had created and gradually began to add more from across the internet. Been loving growing the site and tracking the status of new jailbreak prompts.

< 1 2 3 ... 58 59 60 61 62 ... 130 131 132 >