5 ms·
I really with more people used NIM for web development. It really seems like the best of all worlds (e.g. perf, developer ergonomics, productivity, etc).
by alberth 7y ago
I really with more people used NIM for web development. It really seems like the best of all worlds (e.g. perf, developer ergonomics, productivity, etc).
- nathancahill 7y agoI've been building and deploying Nim web apps for clients over the past couple years. The language is just getting better and better and the library environment is filling out nicely too (not to subtract from the stdlib, it's very complete too). It's been a really great experience. Also: available to hire if anyone is looking to work with Nim.
- alberth 7y agoAre you using Jester or another framework?
- nathancahill 7y agoLargely building microservices with the stdlib. Generating html frontends with htmlgen. Using karax for more dynamic frontends.
- nepeckman 7y agoI'm planning on trying out the new Prologue framework. Seems promising from the readme! https://github.com/planety/prologue https://github.com/planety/prologue
- camccar 7y agoI’ll never understand what people see in prologue
- rattray 7y agoWhat do you recommend instead for web development with Nim?
- matthiaswh 7y agoMy guess is the GP misunderstood and was speaking about the Prolog programming language, not the web framework mentioned. To address your question, the only complete back end web framework for Nim that has significant traction (that I know of) is Jester. Karax for the front side. The Prologue framework looks interesting though.
- andybak 7y agoHow would the dynamism and expressivity of something like Django port to Nim? I love the whole declarative paradigm of the Django forms and models API. Is Nim good at this kind of DSL-ish plasticity?
- alehander42 7y agoi'd say so: i think many rails/django concepts are translate-able to metaprogramming in nim, not always with the same idioms, but usually there is a way to do it, and you can typecheck some things
- PMunch 7y agoExtremely well I'd say. Nim has a very powerful macro system, and DSLs are very common across various modules. Haven't used Django myself, but something like Jester (https://github.com/dom96/jester https://github.com/dom96/jester) or Karax (https://github.com/pragmagic/karax https://github.com/pragmagic/karax) is a good place to start if you want to do web development in Nim.
- treeform 7y agoI feel DSL-ish ways of Nim are so much more advanced then python. I have written UI DSLs in Nim, as well as SQL DSLs. Only LISPy languages come close to the level of DSL you can do.
- TylerE 7y agoPoorly. Nim is not an object-oriented language. You could certainly write an expressive web framework in nim, but a django/rails sort of paradigm is not the way.
- pjmlp 7y agoAs fan of Wirthian languages and GC enabled systems languages it looks nice to me, but it is still miles away of the tooling experience available to Java and .NET developers, and yes, you can make use of AOT or JIT caches with them. But the more the merrier, so I look forward to its bright future.
- The_rationalist 7y agoWhat advantage does it bring that Kotlin hasn't?
- atemerev 7y agoNo JVM.
- winter_blue 7y agoLook up Kotlin Native. It doesn't use a JVM (and compiles to native via LLVM). There's also Kotlin JS, which targets the JS ecosystem, and comes with tools that let you import TypeScript type definitions into Kotlin, so you can easily interact with third-party JS modules. A pure Kotlin library could easily be used on JS, JVM, and native/LLVM seamlessly. Which is pretty impressive. All your non-platform-dependent logic could be placed in a decoupled shared pure Kotlin library. Which avoid code duplication that is so common when you need web + iOS + Android client apps. (And the Intel Multi-OS Engine could be used to write your iOS app in Kotlin.)
- atemerev 7y agoI have nothing against Kotlin, it is a fine language, a pleasure to work with. Nim, however, has different priorities (utmost simplicity, native compilation, near-C performance, opt-out automatic memory management, excellent FFI capabilities, best in class macros).
- ptx 7y agoThe tooling is still JVM based and feels very heavy compared to Nim. (And the Kotlin/Native compiler is still very slow, although they're working on it.)
- winter_blue 7y agoI'm not sure why so many people describe JVM based software as "heavy"? Is it possible to describe what "heavy" here means in more scientific terms? Does it mean that startup is slow (possibly due to AOT)? Does it mean that consumes a lot more memory than the equivalent C/C++/JS/Python/etc program? (I don't think so.) Does it mean that code execution is too slow? (This hasn't been true for over a decade or close to two; the JVM's JIT is one of best ever.) Does it mean the GC pauses are too painfully apparent? (I don't think this is true at all.) Does it mean that users of JVM languages have a tendency to write code that is in inefficient/slow/bloated on average? (Again, I'd say this isn't true; and I've seen code to tend heavily more on the inefficient more so with dynamically typed languages in general.) So, what really does "heavy" mean here? (Lastly, while the core compiler tooling for Kotlin is probably reliant on the JVM, you don't have to use a JVM-based IDE for sure - VS Code (which is written in TypeScript/JS) should work fine as well.)