The best Hacker News stories from Show from the past day
Latest posts:
Making a falling sand simulator
Show HN: Automedia – a tool for managing bitrot and formats in media libraries
Show HN: Automedia – a tool for managing bitrot and formats in media libraries
Wordle in Python using literate programming
Hey HN!<p>I wanted to demo TDD with Python, as well as showcase some BDD practices I've been blogging about recently[1].
So I used literate programming to implement Wordle, and rendered the narrative into this "Show HN" webpage.<p>I'm certainly no Knuth, but I'm pretty proud of the result. Proud enough to chance myself to a HN post, and risk HN's mockery and ire: my first "Show HN".<p>I hope this crowd will enjoy this annotated walkthrough of Wordle implementation in Python. Codebase available on Github[2].<p>Relevant for folks here (though not covered in the main narrative) is how the Gherkin files are listed as Requirements[3] via Sphinxdocs extensions[4]<p>[1]: <a href="https://jiby.tech/" rel="nofollow">https://jiby.tech/</a>
[2]: <a href="https://github.com/OverkillGuy/literate-wordle" rel="nofollow">https://github.com/OverkillGuy/literate-wordle</a>
[3]: <a href="https://jiby.tech/project/literate_wordle/_collections/gherkin_feature.html" rel="nofollow">https://jiby.tech/project/literate_wordle/_collections/gherk...</a>
[4]: <a href="https://github.com/OverkillGuy/literate-wordle/blob/6d51eb6db4950fbeea3479036e701b7e479dd5da/docs/source/conf.py#L75" rel="nofollow">https://github.com/OverkillGuy/literate-wordle/blob/6d51eb6d...</a>
Wordle in Python using literate programming
Hey HN!<p>I wanted to demo TDD with Python, as well as showcase some BDD practices I've been blogging about recently[1].
So I used literate programming to implement Wordle, and rendered the narrative into this "Show HN" webpage.<p>I'm certainly no Knuth, but I'm pretty proud of the result. Proud enough to chance myself to a HN post, and risk HN's mockery and ire: my first "Show HN".<p>I hope this crowd will enjoy this annotated walkthrough of Wordle implementation in Python. Codebase available on Github[2].<p>Relevant for folks here (though not covered in the main narrative) is how the Gherkin files are listed as Requirements[3] via Sphinxdocs extensions[4]<p>[1]: <a href="https://jiby.tech/" rel="nofollow">https://jiby.tech/</a>
[2]: <a href="https://github.com/OverkillGuy/literate-wordle" rel="nofollow">https://github.com/OverkillGuy/literate-wordle</a>
[3]: <a href="https://jiby.tech/project/literate_wordle/_collections/gherkin_feature.html" rel="nofollow">https://jiby.tech/project/literate_wordle/_collections/gherk...</a>
[4]: <a href="https://github.com/OverkillGuy/literate-wordle/blob/6d51eb6db4950fbeea3479036e701b7e479dd5da/docs/source/conf.py#L75" rel="nofollow">https://github.com/OverkillGuy/literate-wordle/blob/6d51eb6d...</a>
Show HN: Thanks to BeAware, Deaf iPhone users have a free alerting device (OSS)
Show HN: Thanks to BeAware, Deaf iPhone users have a free alerting device (OSS)
Show HN: CaskDB – project to teach you building a key value store
Show HN: CaskDB – project to teach you building a key value store
Show HN: CaskDB – project to teach you building a key value store
Show HN: Sonse, a note-taking CLI for plaintext enthusiasts
Show HN: Tamagui Beta
Previously shown here[0], Tamagui is now in beta. It’s a UI kit for React Native & Web with an optimizing compiler.<p>It's quite different from a typical UI kit in that it supports the compiler not only extracts styles at build-time, but also extracts inline styles, even if they use logic like ternaries or conditional spreads. Further, the compiler flattens any styled component completely a div (or View on Native) when it can. I've found that about 20% of our views get flattened completely, leading to much flatter trees, which means really significant performance improvements[1].<p>This is important not just for performance, but also code-sharing.<p>Here's the why: If you just took a React Native Web app today and made it responsive using the typical way, hooks, you'd end up with a very janky web app. I know this because Tamagui was born out of an app that did exactly that, and resizing frequently took 300ms+ per frame. Themes today also have the same failure mode - without a compiler, you thread values through context. That means lots more JS to run, and whole-tree re-rendering on every change. Even beyond themes and responsivity, we found ourselves having to really limit our ambition especially for Native - lists that contained many items slowed down quickly after a certain depth.<p>So Tamagui started solving for themes and media queries and hopefully a bit of tree depth, and it really succeeded at that. To release the alpha I wanted feature parity with modern UI kits, so I added a theme creator, token system, inline token props, media query props, shorthand props (ala tailwind), fonts, and more.<p>Now over the past 6 months its matured immeasurably with components for gradients, images, inputs, labels, switches, shapes, popovers, and tooltips. Animations just landed, which power many of the new components. "npx create-tamagui-app@latest" to help get started fast. Hundreds of bugfixes and better docs. And one thing I'm really proud of: huge TypeScript type quality and performance improvements.<p>[0] <a href="https://news.ycombinator.com/item?id=29321748" rel="nofollow">https://news.ycombinator.com/item?id=29321748</a><p>[1] <a href="https://tamagui.dev/docs/intro/benchmarks" rel="nofollow">https://tamagui.dev/docs/intro/benchmarks</a>
Show HN: MockRTC – a mock peer and MitM proxy library for WebRTC
Show HN: I made Ankify that converts notes to Anki cards
Backstory:
I was in medical school and had to study a ton of materials in short period of time. I came across Anki but always had trouble with making cards. In my mind, making cards should be quick, seconds instead of minutes. My other problem is after making the cards, each card does not really relate to the other. When you study the individual card, your thought process is very random and not cohesive. I wanted to be able to still reference to my notes for big concepts and then use the cards to memorize the details but also for long term retention.<p>Ankify came out of that. At the time, I did not know any programming and paid someone to write a script in Python to convert the cards. Then, eventually I learned Python myself and expanded on the script. I also uploaded the markdown files online so I could view them anywhere (<a href="https://kangruixiang.github.io/wiki/" rel="nofollow">https://kangruixiang.github.io/wiki/</a>).<p>I ran into a wall in making user interface for the program. It was difficult to make good looking cross platform user interface with Python. I gave up on making user interface for a year or two with end of med school and residency. After a while, I went back to see if anyone else had made anything similar. Despite many plugins/programs that makes it easy to make cards, none of them really focused on readability of the original notes. I decided to sit down and learn javascript to help with UI creation.<p>After about 3 years, everything finally came together after I learned Svelte, Tailwind, and Electron. I know Electron is not the most efficient program, but it's what works for me.<p>Also, it's also the feeling of being able to make whatever my mind can think of. It feels really refreshing and empowering. Even making the website for Ankify is a lot of fun. You have to think so much about the presentation, typography, logistics.
Show HN: I made Ankify that converts notes to Anki cards
Backstory:
I was in medical school and had to study a ton of materials in short period of time. I came across Anki but always had trouble with making cards. In my mind, making cards should be quick, seconds instead of minutes. My other problem is after making the cards, each card does not really relate to the other. When you study the individual card, your thought process is very random and not cohesive. I wanted to be able to still reference to my notes for big concepts and then use the cards to memorize the details but also for long term retention.<p>Ankify came out of that. At the time, I did not know any programming and paid someone to write a script in Python to convert the cards. Then, eventually I learned Python myself and expanded on the script. I also uploaded the markdown files online so I could view them anywhere (<a href="https://kangruixiang.github.io/wiki/" rel="nofollow">https://kangruixiang.github.io/wiki/</a>).<p>I ran into a wall in making user interface for the program. It was difficult to make good looking cross platform user interface with Python. I gave up on making user interface for a year or two with end of med school and residency. After a while, I went back to see if anyone else had made anything similar. Despite many plugins/programs that makes it easy to make cards, none of them really focused on readability of the original notes. I decided to sit down and learn javascript to help with UI creation.<p>After about 3 years, everything finally came together after I learned Svelte, Tailwind, and Electron. I know Electron is not the most efficient program, but it's what works for me.<p>Also, it's also the feeling of being able to make whatever my mind can think of. It feels really refreshing and empowering. Even making the website for Ankify is a lot of fun. You have to think so much about the presentation, typography, logistics.
Show HN: I made Ankify that converts notes to Anki cards
Backstory:
I was in medical school and had to study a ton of materials in short period of time. I came across Anki but always had trouble with making cards. In my mind, making cards should be quick, seconds instead of minutes. My other problem is after making the cards, each card does not really relate to the other. When you study the individual card, your thought process is very random and not cohesive. I wanted to be able to still reference to my notes for big concepts and then use the cards to memorize the details but also for long term retention.<p>Ankify came out of that. At the time, I did not know any programming and paid someone to write a script in Python to convert the cards. Then, eventually I learned Python myself and expanded on the script. I also uploaded the markdown files online so I could view them anywhere (<a href="https://kangruixiang.github.io/wiki/" rel="nofollow">https://kangruixiang.github.io/wiki/</a>).<p>I ran into a wall in making user interface for the program. It was difficult to make good looking cross platform user interface with Python. I gave up on making user interface for a year or two with end of med school and residency. After a while, I went back to see if anyone else had made anything similar. Despite many plugins/programs that makes it easy to make cards, none of them really focused on readability of the original notes. I decided to sit down and learn javascript to help with UI creation.<p>After about 3 years, everything finally came together after I learned Svelte, Tailwind, and Electron. I know Electron is not the most efficient program, but it's what works for me.<p>Also, it's also the feeling of being able to make whatever my mind can think of. It feels really refreshing and empowering. Even making the website for Ankify is a lot of fun. You have to think so much about the presentation, typography, logistics.
Show HN: Weron – A Peer-to-Peer VPN Based on WebRTC Written in Go
Hey HN! I just released weron, a P2P VPN that uses WebRTC for transport which I've been working on for the last couple of months. It can create both layer 2/Ethernet and layer 3/IP overlay networks, and the underlying transport layer can be easily embedded to write your own P2P apps with Go. Compared to for example Tailscale, WireGuard and ZeroTier, its much harder to block on a network level and also significantly easier to set up, while not sacrifing much performance.<p>I'd love to get your feedback :)
Show HN: Weron – A Peer-to-Peer VPN Based on WebRTC Written in Go
Hey HN! I just released weron, a P2P VPN that uses WebRTC for transport which I've been working on for the last couple of months. It can create both layer 2/Ethernet and layer 3/IP overlay networks, and the underlying transport layer can be easily embedded to write your own P2P apps with Go. Compared to for example Tailscale, WireGuard and ZeroTier, its much harder to block on a network level and also significantly easier to set up, while not sacrifing much performance.<p>I'd love to get your feedback :)
Show HN: Weron – A Peer-to-Peer VPN Based on WebRTC Written in Go
Hey HN! I just released weron, a P2P VPN that uses WebRTC for transport which I've been working on for the last couple of months. It can create both layer 2/Ethernet and layer 3/IP overlay networks, and the underlying transport layer can be easily embedded to write your own P2P apps with Go. Compared to for example Tailscale, WireGuard and ZeroTier, its much harder to block on a network level and also significantly easier to set up, while not sacrifing much performance.<p>I'd love to get your feedback :)
Show HN: Weron – A Peer-to-Peer VPN Based on WebRTC Written in Go
Hey HN! I just released weron, a P2P VPN that uses WebRTC for transport which I've been working on for the last couple of months. It can create both layer 2/Ethernet and layer 3/IP overlay networks, and the underlying transport layer can be easily embedded to write your own P2P apps with Go. Compared to for example Tailscale, WireGuard and ZeroTier, its much harder to block on a network level and also significantly easier to set up, while not sacrifing much performance.<p>I'd love to get your feedback :)