TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Prologue: A web framework written in Nim

188 pointsby flywindover 4 years ago

10 comments

Conlectusover 4 years ago
I&#x27;ve been following Nim for a while now (including back when it was called Nimrod), but the big reason I&#x27;ve never dug much more into it is because it repeats the Billion Dollar Mistake[1] of allowing values (yes, not all values, but important ones) to be nil without explicitly using Option types.<p>It&#x27;s disappointing that Nim has not (perhaps cannot, for backwards compatibility) learned the same lesson here that most other modern languages have, and used explicit nilability embedded in the type system.<p>And to preempt the argument that &quot;you can&#x27;t, for performance reasons!&quot;, you could do the same thing as Rust does and explicitly opt-in to having your code break if something is nil, via a call like `.unwrap()` which the compiler may optimize away.<p>[1] <a href="https:&#x2F;&#x2F;www.infoq.com&#x2F;presentations&#x2F;Null-References-The-Billion-Dollar-Mistake-Tony-Hoare&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.infoq.com&#x2F;presentations&#x2F;Null-References-The-Bill...</a>
评论 #24850125 未加载
评论 #24849977 未加载
评论 #24849698 未加载
评论 #24849554 未加载
评论 #24850025 未加载
no_wizardover 4 years ago
NIM really is a full stack language and ecosystem. It has a first class compiler to JavaScript (though, I admit, I don&#x27;t know how tuneable it is, so I think it just compiles down to ES5, it&#x27;d be nice to do a differential build where it would compile down to ES5 and&#x2F;or ES2015&#x2F;ES2016 at the users discretion)<p>Only thing it needs now is a compile to CSS solution and you would never have to leave the language. Its a very thurough language in that regard.<p>It also needs a strong GUI framework for desktop and mobile apps, as well, but still, its very fully featured! My hunch in this area is that you could just compile to Electron&#x2F;NativeScript&#x2F;React Native as a relatively &#x27;quick&#x27; solution to these problems.<p>I&#x27;m excited to see where this language goes. I&#x27;m pretty tempted to use it in production to replace Python for some things and may find it more expansive due to its flexibility of compile targets.<p>My only gripe (and its relatively small) is I don&#x27;t like its compiler directive syntax using the `{.directive.}` style, its a little ugly and noisy to me, I&#x27;d prefer something like rust&#x27;s `#[]` (I think this is actually how you use a Rust macro, but its a nice syntax regardless)<p>Not enough to stop me from thinking the language has some real upside and potential, though.
评论 #24848632 未加载
评论 #24849521 未加载
评论 #24849013 未加载
评论 #24866341 未加载
评论 #24852424 未加载
评论 #24848738 未加载
dotdiover 4 years ago
It&#x27;s really nice to see that the Nim ecosystem is gaining more and more traction. A good web framework is indeed quite an important step towards making a language&#x2F;ecosystem more appealing to a more general audience.<p>I&#x27;ve yet to encounter a small enough project with low risk where I could get away with trying something completely new, but I&#x27;m looking forward to trying Nim in the (hopefully very near) future.<p>One negative thing that stood out to me was that commit messages are sometimes really bad, like &quot;break&quot; or &quot;let me try&quot;. I&#x27;m not trying to bash the author, but I feel it&#x27;s somewhat unprofessional.
评论 #24853145 未加载
pgtover 4 years ago
I guess all roads <i>do</i> lead to Prolog.<p>Why risk the naming confusion? Doing a search for &quot;prologue language&quot; yields millions of Prolog results on both DDG and Google.
评论 #24847248 未加载
评论 #24849323 未加载
评论 #24847205 未加载
评论 #24849044 未加载
评论 #24847975 未加载
评论 #24848543 未加载
rishav_sharanover 4 years ago
I have played around with it a bit and I just love the way the routes and middlewares are defined in this. I think the latest and greatest v0.4 will be released shortly, so anyone who is interested, do keep an eye out.<p>Nim always was a bit lacking in webdev but with Prologue and Basolato, the web is suddenly looking much more interesting.
square_usualover 4 years ago
Not the most relevant point, but those commit messages don&#x27;t inspire confidence :&#x2F;<p>E: I do like it, though. Don&#x27;t want to bash on the project for no reason, just would prefer it if the maintainer tried to have better commit messages!
评论 #24849408 未加载
评论 #24847483 未加载
TruffleLabsover 4 years ago
“Prologue is a powerful and extensible web framework written in Nim language.“<p>Powerful to me would be “able to create systems &amp; applications in half the time compared to...” :)
评论 #24847467 未加载
yumaikasover 4 years ago
So, given that Jester exists and is a thing, how does this compare to it?
chrismmayover 4 years ago
Ohhh, written in Prolog at the National Institute for Mental Health <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Mrs._Frisby_and_the_Rats_of_NIMH" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Mrs._Frisby_and_the_Rats_of_NI...</a>
zeeoneover 4 years ago
It seems nothing groundbreaking. A router, some middleware and websockets.<p>Also, nim is a mess. Very poorly designed language. I tried it a couple of years ago and was repelled by its syntax and attempts to solve every single problem for you.
评论 #24848717 未加载
评论 #24848352 未加载
评论 #24849139 未加载