ajusa
It's exactly this - I do regret using "db" a bit now after reading all of the comments here, as it's taken away focus from the main point. But yes, the post had to fit on a single page, and I needed to pick something that most engineers would be familiar with.
This is actually closer to the way the first draft of this article was written. Unfortunately, some readability was lost to make it fit on a single page. 100% agree that a statement like this is harder to reason about and should be broken up into multiple statements or chained to be on multiple lines.
I'm always surprised by how circular technology can seem, even hardware. Obviously display technology has gotten a lot better over the years (IPS/OLED, lower power consumption, higher max brightness) but the fact that I'd be perfectly happy with a laptop with a 16:10 1920x1200 display today (almost 20 years later) is funny to me.
This greatly reduces the time GitHub actions would need to run, as you just build and release for one OS. As others have mentioned, this does not really work for native GUI apps, that isn't supported by Cosmopolitan as far as I know. But for small CLI tools it works great!
For folks that are more experienced and learn by doing, the two resources I would recommend are https://nim-by-example.github.io/ and https://xmonader.github.io/nimdays/. The first is a solid overview of the basic language, while the second is a bunch of example projects. Other good resources if anyone is interested:
Nim in Action (book)
https://narimiran.github.io/nim-basics/
The official Nim tutorial: https://nim-lang.org/docs/tut1.html
Nim also had a devroom at FOSDEM this year! You can find it at https://fosdem.org/2022/schedule/track/nim_programming_langu....
My favorite talks were on Polymorph (a really fast compile time ECS), Pararules (a super cool implementation of a rules engine) and Nim Metaprogramming in the real world (very useful lesser known patterns for using Nim's capabilities in a variety of projects).
Turns out, HN finds and reports bugs much faster than family and friends :)
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
That should fix it, I'll push a new version after fixing the word matching issue others have pointed out. I underestimated Wordle's complexity :)It'd be very easy to check against just a list of words, but that'd require more storage and be slower than a bloom filter.
if letter not in (.bg-warning in first .guess).innerText then add .bg-warning
Haven't tested as I'm on my phone, but seems like a simple enough fix.Show HN: A simple Wordle clone in 60 lines, using Hyperscript
https://arhamjain.com/hyperwordle/
Hello HN! I've been playing a lot with https://hyperscript.org/ recently (not to be confused with the other hyperhype hyperscript). I threw together a quick Wordle clone in an evening to see what it would look like using this language. The main functionality that is missing is checking for invalid words. The word dictionary is also very small, so it's very easy.The goal here wasn't really to...
Antivirus software incorrectly flags Nim programs as malware
Building a simple typing test website using hyperscript
So in this case, the `template` bits are doing plain code substitution at compile time, and the buildHtml `macro` is doing more advanced code generation, also at compile time. This means that it should avoid the overhead you mentioned with a key-value struct/lambda.
For what it's worth, this could also have been implemented as a `proc` which would then take in a lambda/anonymous function to generate the HTML, but that incurs additional overhead and requires a bit of extra syntax, which felt like a hassle.
Plus Nim is fast! I can load the index page of this application at 90k requests per second single-threaded on a laptop from a few years ago.
Nim has a smaller community, so the supply chain tends not to be more than one or two levels deep in my experience. This is also because the standard library is fairly large.
text ": " & sentMessage.getStr()
The `text` function in the Karax DSL is actually escaped once it is converted to a string, see https://github.com/karaxnim/karax/blob/c71bc927494418c3f52f9... for the implementation if you are curious. There is a way to render raw HTML using `verbatim` instead of `text` in Karax.So in this case, I believe it would be protected against XSS to some extent, but I obviously haven't done an in depth security check for a demo/simple project. There are plenty of other potential issues as well (username collisions, websocket errors, user lists) but I judged those to be out of the scope of a simple project like this.
1. nginx has had many more years of performance tuning (it's 17 years old) than a project made in the last few years.
2. redbean is x86 only if I'm not mistaken (it's using x86-64 from αcτµαlly pδrταblε εxεcµταblε), whereas lowtechmagazine runs their server on an ARM CPU. I think switching to a lower powered x86 chip might be costly or still draw too much power, but I don't have as much experience in that regard.
Jeremy Maluf's “Onebag”
I'm sharing a small project I built with two other students. We built it in three weeks for a UI/design class back in April of this year. Nestly is a nested time tracker. It's similar to Dynalist and Workflowy in the sense that you can nest items as much as you want, but in this case each item is something that can be individually time tracked. It also supports rudimentary tagging (for cross item tracking) and time breakdown graphs.
Sites like toggl only supported two (maybe three?) layers of tracking, which always put me into decision paralysis - was I organizing my time categories in the right way? Would I need to revamp the whole system in the future as my roles and responsibilities changed? Infinite nesting solves that problem (though it doesn't work for everyone).
Note that the project was primarily built for a class - we don't anticipate working on it more or adding a bunch of new features. It's in a "finished" state.
The site was built with Tachyons, using the Nord color scheme, and VueJS. There is no backend - all data is persisted locally on the machine itself. I'm happy to answer any questions about the tech stack or anything else!
Show HN: Nestly – A simple nested time tracker
There were quite a few issues with amdgpu that would get fixed in certain kernel/video driver updates, and broken in other ones.