TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Nim 1.0

785 点作者 treeform超过 5 年前

37 条评论

peteforde超过 5 年前
Congrats to the Nim team.<p>One thing that is frustrating for anyone hearing about Nim for the first time is that it&#x27;s really hard to look at what appears to be yet another slightly different take on Rust or Go and intuitively understand why it exists.<p>There is absolutely a grid that can be populated: who started this, is it corporately affiliated, what languages is it similar to, what is the motivation of its creators, what is the philosophy driving its design, is it intended to be an eventual competitor or replacement for languages XYZ, where does it sit on the spectrum between raw assembly and MS Access, is it intended to be a &quot;systems language&quot; eg can you write a kernel or device driver using it, does it require a VM, is there corporate support available, how established is the developer community, are there books and courses, does it have garbage collection, is it a compiled language, is it a strongly typed language, what are the three perfect use cases, how stable is the API, what&#x27;s the package management story, does it have a reasonable standard library, is there editor support for color coding and linting, what&#x27;s the job market look like, is the documentation well-written, and most importantly, if we all got in the same room, would I want to hang out with the people excited about this language?<p>The cost of learning yet another language vs actually spending your finite spare time building something (or with your loved ones, or reading, or sleeping, or making art) is insanely huge.
评论 #21058248 未加载
评论 #21057551 未加载
评论 #21057763 未加载
评论 #21057751 未加载
评论 #21058823 未加载
评论 #21057444 未加载
dom96超过 5 年前
Shameless plug, but by a nice coincidence, Manning has a discount on all printed books today. Among them is my book, Nim in Action, available for $25. If you&#x27;re interested in Nim it&#x27;s a great way to learn :)<p>It was published in 2017 but we&#x27;ve ensured Nim is compatible with it (all book examples are in Nim&#x27;s test suite), so apart from some minor deprecation warnings all examples should continue to work.<p>Grab a copy here: <a href="https:&#x2F;&#x2F;manning.com&#x2F;books&#x2F;nim-in-action?a_aid=niminaction&amp;a_bid=78a27e81" rel="nofollow">https:&#x2F;&#x2F;manning.com&#x2F;books&#x2F;nim-in-action?a_aid=niminaction&amp;a_...</a>
评论 #21053988 未加载
评论 #21054060 未加载
评论 #21057221 未加载
评论 #21116365 未加载
评论 #21058402 未加载
评论 #21054641 未加载
nathcd超过 5 年前
Congratulations Nim team! :D<p>I&#x27;ve had Nim installed on my laptop for a long time and I&#x27;ve always enjoyed tinkering around with it over the years. Maybe now it&#x27;s time to find a bigger project to try it out on.<p>This is a tiny thing, but just to highlight something unique I like about Nim, using `func` to declare pure functions (and `proc` for others) has been a small, but really nice quality of life improvement. It&#x27;s something I&#x27;ve been wanting in other languages since Nim added it.<p>It seems like the 2010s have been a pretty amazing time for new programming languages. The ones that I can think of that I&#x27;ve at least tried are Rust, Go, Nim, Crystal, Zig, Pony, Fennel, Janet, and Carp (I know, some of these are pre-2010, but I think they&#x27;ve all either 1.0&#x27;d or had a first public release post-2010), and every single one has made me really excited about some aspect of it. I hope this experimentation continues into the 2020s!
评论 #21053505 未加载
评论 #21058885 未加载
评论 #21054605 未加载
评论 #21053585 未加载
评论 #21053552 未加载
评论 #21053677 未加载
评论 #21055157 未加载
评论 #21053972 未加载
评论 #21057362 未加载
评论 #21057834 未加载
评论 #21056895 未加载
6gvONxR4sf7o超过 5 年前
I love seeing new languages that do interesting things. I wish I could see what languages everyone will be using in 100 years. Or at least I&#x27;m curious what we&#x27;d see with 100 years of development towards solving today&#x27;s problems (and without AI because that&#x27;s not what this particular fantasy of mine is about).<p>It&#x27;s one of my favorite things to fantasize about when I run into another python bug or a write a tedious unit test that feels like I should be able to let my tools deal with for me. Super-future-dependent-haskell&#x27;s type system with python&#x27;s ergonomics, and fantasy-future-python&#x27;s gradual typing to go fast and loose when I feel like it, and C&#x27;s ability to specify exactly what I want when I need to with rust&#x27;s ability to keep me from shooting myself in the foot while doing so, and zig&#x27;s ability to do dead-simple compile time programming, and super-future-idris&#x2F;coq&#x27;s ability to write ergonomic proofs in place of many tests, and so on. Or even the futuristic fantasy one-FFI-to-rule-them-all, so I can mix and match pieces super smoothly.<p>Every time I see an interesting new language catching on, I can&#x27;t help but engage in optimistic flights of fancy about the future of programming.
评论 #21056733 未加载
_0ffh超过 5 年前
I&#x27;ve been intermittently working on my own language (&quot;transpiled&quot; to C) for more than three years before seriously checking out Nim in 2015, at which point I just threw my code away. It already had very nearly everything I thought I could bring to the table, and then some stuff I had never even contemplated. Go, go, Nim!
perturbation超过 5 年前
Congrats guys!!! This has been much-anticipated and I&#x27;m very excited. I personally wish that the owned reference stuff (<a href="https:&#x2F;&#x2F;nim-lang.org&#x2F;araq&#x2F;ownedrefs.html" rel="nofollow">https:&#x2F;&#x2F;nim-lang.org&#x2F;araq&#x2F;ownedrefs.html</a>) <i>had</i> been part of 1.0, but I think that at some point shipping 1.0 &gt;&gt; everything else.<p>I&#x27;ve been following (and evangelizing) Nim for a while, this will make it easier to do so.
评论 #21054533 未加载
评论 #21053357 未加载
评论 #21054175 未加载
nfrankel超过 5 年前
Question (genuine, not trolling): what&#x27;s the use-case for Nim regarding other languages? What are its pros&#x2F;cons?
评论 #21054524 未加载
评论 #21053762 未加载
评论 #21053742 未加载
评论 #21054021 未加载
评论 #21055046 未加载
评论 #21053912 未加载
评论 #21053737 未加载
评论 #21054806 未加载
评论 #21053792 未加载
评论 #21054696 未加载
评论 #21054031 未加载
stakhanov超过 5 年前
I love nim! Wrote a several-thousand-line side project in it in 2015 and have rewritten it several times over, partially to improve the project itself, but also to keep up with language changes during the various alpha-releases. Did a little evaluation of Rust along the way, but decided my money was going to continue to be on nim. -- Congrats to the team, and thank you so much for making it happen!
pietroppeter超过 5 年前
see also: <a href="https:&#x2F;&#x2F;nim-lang.org&#x2F;araq&#x2F;v1.html" rel="nofollow">https:&#x2F;&#x2F;nim-lang.org&#x2F;araq&#x2F;v1.html</a>
评论 #21053391 未加载
评论 #21053272 未加载
steve_adams_86超过 5 年前
This is super cool. I built a small CLI tool with Nim back in 2017, and it was a joy. It ended up being very accessible to the rest of the team for further development (probably more credit due to the folks building Nim than to my design) and I believe it&#x27;s still in use. It&#x27;s a good language, and it was a nice break from JavaScript (which I also enjoy, but not so much for CLI tools). If you haven&#x27;t tried it out yet, I highly recommend it.
atemerev超过 5 年前
Nim is a thing of beauty. It has a well-thought syntax (some consider it to be similar to Python, but it removes many Python idiosyncrasies), state of the art type system with generics, beyond state of the art macro system, excellent performance (comparable to Rust or C), and it can work as a low-level or a high-level language. It is pragmatic: you can write functional or imperative code, neither is imposed on you. There are so many beautiful hacks I enjoy (e.g. unit tests are supposed to be included in each file, all files are compiled as executables, and you can run them to run the tests).<p>Here is a taste of what&#x27;s possible: <a href="https:&#x2F;&#x2F;hookrace.net&#x2F;blog&#x2F;what-is-special-about-nim&#x2F;" rel="nofollow">https:&#x2F;&#x2F;hookrace.net&#x2F;blog&#x2F;what-is-special-about-nim&#x2F;</a>
planetis超过 5 年前
My reasons for using nim:<p>- Syntax is very expressive and not restrictive or bloated (I can write clean code, almost like pseudocode, without boilerplate)<p>- Runs fast and has type checking something that Python lacked (until recently at least) (When I was programming in python I was so frustrated that any variable could be used in a function call and no code is checked until it&#x27;s used, Also &#x27;nim c -r file&#x27; is faster than any Python program I have written)<p>- Documentation is very good nowadays, but since code was so easy to read and in nim (whereas most python code interfaces with c) I could read and understand what the standard library functions were doing, another big plus when learning.
75dvtwin超过 5 年前
Finally, very happy for Nim and the team!<p>version 1.0, stability, RFC process -- all are signs of maturing language and the ecosystem.<p>Here is a curated list of frameworks for Nim<p><a href="https:&#x2F;&#x2F;github.com&#x2F;VPashkov&#x2F;awesome-nim" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;VPashkov&#x2F;awesome-nim</a><p>For me, personally, the interest, is its javascript-as-target capabilities.
mwcampbell超过 5 年前
I noticed that Araq&#x27;s personal post about v1.0 mentioned a powerful macro system as a top priority. I wonder if Nim&#x27;s macro system is now expressive enough that a front-end web framework like Svelte [1] could be implemented using Nim macros, as opposed to Svelte&#x27;s HTML template language and custom compiler. COuld be useful for developing isomorphic web apps with something lighter than Node on the server side.<p>[1]: <a href="https:&#x2F;&#x2F;svelte.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;svelte.dev&#x2F;</a>
评论 #21057183 未加载
guggle超过 5 年前
Love Nim !<p>Key points for me:<p>- familiar, easy to read syntax<p>- great performance<p>- standalone executables &#x2F; ease of deployment<p>- easy interfacing with C and C++ code<p>I would love to see its community grow and see more available libs.
excursionist超过 5 年前
&gt; Type identifiers should be in PascalCase [1]<p>I don&#x27;t get why some languages adopt the &#x27;PascalCase for types&#x27; approach (which is fine), but then a bunch of the built-in types such as &#x27;string&#x27;, &#x27;set&#x27;, &#x27;int64&#x27;, etc. are lowercase... it&#x27;s annoyingly inconsistent.<p>[1] <a href="https:&#x2F;&#x2F;nim-lang.org&#x2F;docs&#x2F;nep1.html#introduction-naming-conventions" rel="nofollow">https:&#x2F;&#x2F;nim-lang.org&#x2F;docs&#x2F;nep1.html#introduction-naming-conv...</a>
评论 #21053654 未加载
评论 #21053543 未加载
评论 #21053554 未加载
评论 #21053574 未加载
ziotom78超过 5 年前
I would have never thought to live long enough to see this happening! I started using Nim in 2014, but abandoned it after a few years, frustrated by the instability of the language and what I perceived as a lack of vision. (In 2014, release 1.0 was said to be &quot;behind the corner&quot;.)<p>This release makes me eager to try it again. I remember that the language impressed me a lot: easy to learn, well-thought, and very fast to compile.<p>Congratulations to the team!
p5a0u9l超过 5 年前
But why do they have to use camelCase? I don&#x27;t know why it bothers me so, but I see that in a language or a repo and immediately and irrationally despise it.<p>Is it just me?
评论 #21057266 未加载
评论 #21056348 未加载
评论 #21057245 未加载
评论 #21056296 未加载
staticassertion超过 5 年前
Right now I write, almost exclusively, Rust and Python. I&#x27;m really hoping I can replace a lot of the Python code with Nim some day.
wiz21c超过 5 年前
Why Nim ? As someone who put a lot of efforts in some personal project and understands what it takes to build a new language, I wonder why did the Nim&#x27;s authors did it in the first place ? Just for the sake of it ? To make money ? For the fun ?<p>I&#x27;d like to know (as Nim doesn&#x27;t seem to be backed by big dollars)
评论 #21057732 未加载
评论 #21057554 未加载
评论 #21057774 未加载
aredirect超过 5 年前
Congratulations Nim team!<p>Last year I wrote a book on building applications with Nim, now I think it&#x27;s the time for all of the people waited for 1.0 to pick it up <a href="https:&#x2F;&#x2F;xmonader.github.io&#x2F;nimdays&#x2F;" rel="nofollow">https:&#x2F;&#x2F;xmonader.github.io&#x2F;nimdays&#x2F;</a>
Mikeb85超过 5 年前
Fantastic news. I haven&#x27;t done anything too serious with Nim, but I did find for the code I did write in it, that its extremely intuitive and easy to get going. It also has all the features I could ask for in a language and it never feels like you need to work around a limitation. Of course that&#x27;s the initial impression, I haven&#x27;t used it as much as languages that have batteries included for the specific tasks I do (most of the programming I actually do these days is around data analysis, economic forecasting, so R is pretty hard to beat).
rajangdavis超过 5 年前
For compiling to Javascript, is it possible to use npm modules with the code?
评论 #21054377 未加载
评论 #21057132 未加载
评论 #21054706 未加载
maxpert超过 5 年前
Congrats and Thanks Nim team. I’ve been tinkering with Nim to build a really efficient pubsub server. Something that can take heavy concurrent connections. Now I can actually build with confidence.
inportb超过 5 年前
Does it support tabs for indentation yet?
评论 #21053794 未加载
ilaksh超过 5 年前
One exciting new project using Nim: <a href="https:&#x2F;&#x2F;github.com&#x2F;status-im&#x2F;nim-libp2p" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;status-im&#x2F;nim-libp2p</a><p>and also <a href="https:&#x2F;&#x2F;github.com&#x2F;status-im&#x2F;nimbus" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;status-im&#x2F;nimbus</a> which is a lightweight Ethereum 1.0 &amp; 2.0 client in development. If Ethereum 2.0 is really able to scale like they plan, a project like nimbus could really enable widespread use of cryptocurrency on phones.
ayush--s超过 5 年前
Great that it&#x27;s here. I tried Nim around 8-9 months ago, and left it because I didn&#x27;t want to work with a language that wasn&#x27;t stable yet. Guess I&#x27;ll give it a visit again.
评论 #21057631 未加载
13415超过 5 年前
Great! I love this language, so simple and powerful, so fast executables!<p>I hope I don&#x27;t spoil the party by asking: What&#x27;s the status of GUI bindings?
评论 #21053888 未加载
评论 #21060368 未加载
评论 #21057570 未加载
评论 #21054759 未加载
kalekold超过 5 年前
The binary sizes that Nim produces are as usual misrepresented. D and C will blow it out of the water. Here&#x27;s some D code:<p><pre><code> import core.stdc.stdio; extern(C) void main() { printf(&quot;Hello, World!\n&quot;); } </code></pre> Compile with:<p><pre><code> $ dmd -betterC main.d $ ls -h main -rwxrwxr-x 1 user group 8.5K Sep 24 12:39 main</code></pre>
评论 #21059245 未加载
fithisux超过 5 年前
While Nim is a much better python, you cannot use python modules with Nim (pushing strings to a python interpreter does not count as such), so you need some man-years to build a reasonable software collection.<p>Haxe had another approach. Create a library and transpile it to be used with Lua&#x2F;Python&#x2F; Java and other options.
评论 #21059715 未加载
benboughton1超过 5 年前
I have been considering approaching a new language lately after have self learn python and more recently javascript.<p>Where does nim sit in regards to the future of machine learning? Can we expect clones of pytorch&#x2F;tensorflow? Is it a suitable language for this?
评论 #21056861 未加载
pier25超过 5 年前
Congrats to the team!<p>Could Nim be used to generate a framework for Xcode and the the same code be used in a Windows C++ or .NET project?<p>I&#x27;ve been looking for ages for a cross platform solution that can be used to create dynamic or static libraries that isn&#x27;t C++.
评论 #21053835 未加载
评论 #21053803 未加载
qaq超过 5 年前
Once ecosystem matures (good async db drivers) would be pretty good option for web dev
评论 #21054367 未加载
juststeve超过 5 年前
Damn, this is some solid work. Seriously impressive.
Kip9000超过 5 年前
Christmas had come early!!
tomp超过 5 年前
What’s Nim’s concurrency story? Since it’s compuled via C, I suspect the answer is “shitty” as in I expect it to inherit all of C’s issues with undefined behaviour, values out of thin air, and so on...
评论 #21057133 未加载
z3t4超过 5 年前
I was going to make a rant about sentimental versioning, but instead congratulations for reaching version 1.0