Building a simple room-based chat application in Nim (using HTMX)

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • talent.io - Download talent.io’s Tech Salary Report
  • SonarLint - Clean code begins in your IDE with SonarLint
  • Scout APM - Less time debugging, more time building
  • karax

    Karax. Single page applications for Nim.

    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.

  • shady

    Nim to GPU shader language compiler and supporting utilities.

    See this as one of the examples: https://github.com/treeform/shady

    It makes debugging shaders much easier as you can use print statements and unit tests. You can also share code between CPU and GPU side.

  • talent.io

    Download talent.io’s Tech Salary Report. Median salaries, most in-demand technologies, state of the remote work... all you need to know your worth on the market by tech recruitment platform talent.io

  • Nim

    Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).

    For those that want to know more about Nim, it is "a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula." : https://nim-lang.org/

    And HTMX "allows you to access AJAX, CSS Transitions, WebSockets and Server Sent Events directly in HTML, using attributes, so you can build modern user interfaces with the simplicity and power of hypertext": https://htmx.org/

  • htmx

    </> htmx - high power tools for HTML

    For those that want to know more about Nim, it is "a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula." : https://nim-lang.org/

    And HTMX "allows you to access AJAX, CSS Transitions, WebSockets and Server Sent Events directly in HTML, using attributes, so you can build modern user interfaces with the simplicity and power of hypertext": https://htmx.org/

  • pixie

    Full-featured 2d graphics library for Nim. (by treeform)

    > but not so small that there are no useful libraries written...

    Says the person responsible for a ton of really useful, well-done Nim libraries, such as this amazing Cairo/Skia-like library: https://github.com/treeform/pixie#readme

    Thank you for all the things you've made for Nim!

  • neartalk

    NearTalk is chat platform to talk to people nearby.

    I wrote something similar with Go and HTMX. It's a powerful combo, and HTMX is really great for someone like me who is not interested in writing JavaScript. I had to write ~10 lines for this project, but that's much less than doing the whole thing in it.

    https://neartalk.makeworld.space/

    https://github.com/makeworld-the-better-one/neartalk

  • flask_example

    Simple examples of the power of flask

    This Nim example is very short. For comparison, I'd created a similar chat service from vanilla Flask and Vanilla HTML (with a tiny amount of jQuery) about 8 years ago and even though it was very basic it took ~600 lines of Python2, HTML, CSS and JS (even though it's only 3 files).

    https://github.com/lelandbatey/flask_example/tree/master/fla...

  • SonarLint

    Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts