Live data from Hacker News

Show HN: “Nim in Action” is now available

nim-lang.org

91–100 of 139 posts

Re: Show HN: “Nim in Action” is now available

#91

Great to see Nim getting an official book, (Dominick is almost like a co-author of Nim at this point :-). My impression of Nim is that it is what Go should have been, if language developments of the past 40 years were taken into account, so if you like the simplicity of Go's syntax, but want modern features, seriously consider Nim. I personally couldn't get over the significant whitespace, (relying on invisible chara…

> Lastly, what major work still needs to be done before we see a 1.0 release and how best can we help Nim to move towards that goal right now?

Better standard library support for Go-style CSP. Given that CSP is one of Go's biggest selling points, it'd be great if people could easily translate concurrent Go programs to Nim and see the benefits. Right now the lack of a "select" statement makes that quite hard, especially for a beginner.

Re: Show HN: “Nim in Action” is now available

#92
post #86
post #72

Earlier quoted context omitted.

Just curious since I must have missed it - where is this claimed? On nim-lang.org? And yes, Nim is not 1.0 yet so some areas are still evolving. And no, I don't think I asked anything?

Generally across HN? Nim's forum? There isn't a single source, I've also found a bunch of Rust/Nim comparison that eventually state something along the lines of Rust is equally safe as Nim[1] and it then gets reiterated on HN. [1] http://forum.nim-lang.org/t/1961

I still don't see it. You wrote "Nim claims it's secure" and I wonder where Nim does that. What I do see is careful explanations in the language manual what is safe and what is not. I am not even remotely as sharp as pcwalton, Araq or Jehan/rbehrends when it comes to these things, but my perception of what "Nim says" is basically "if you use these things, you should be ok. If you use these other things, you are in C country." Then of course modulo bugs and wip stuff. It is perhaps a different philosophy at play.

But I am genuinely interested in where this claim is made, perhaps we need to adjust some documentation or make things more clear - so do point us to it if you find it again.

Re: Show HN: “Nim in Action” is now available

#93

Earlier quoted context omitted.

> Is he wrong about Nim not being safe when not using Boehm GC? Does it not segfault when sending GC pointers between threads? If he has said that, yes, then that would be wrong [1, 2] in that you cannot send GCed references between threads in the first place. For example, the following code results in an error: var s = "foo" proc foo {.thread.} = echo s createThread(foo) Compiling this results in: test.nim(3, 6) Err…

Does Nim deep copy messages between threads now (i.e. serializes entire object graphs)? If so I'm glad to see it and yes, it would of course be safe, as it would basically be Erlang. (It wasn't thread-safe when I last looked a year-plus ago.)

It has always done that [1]. You can only send refs through channels or via the spawn primitive where they are serialized/deep copied (or as arguments to threads upon creation, where that happens implicitly).

[1] It may have been that using global variables to share refs between threads did only trigger a warning at some point, not an error. I'm not 100% sure about that. But the serialization has been there since the early days of multi-threading support in 2011.

Re: Show HN: “Nim in Action” is now available

#94

Earlier quoted context omitted.

This website is _extremely_ outdated, please don't take it as accurate.

Agreed. That site was a good rundown at one point, but now it seems like a hurtful distraction. Are there any other good references for what the current state of these sorts of capabilities have reached? There are any number of crates out there for this sort of thing, but assessing usefulness seems dodgy at this point.

There is one project but I'm not sure its truly launched yet so I don't want to talk about it.

Re: Show HN: “Nim in Action” is now available

#95
post #15

Great to see Nim getting an official book, (Dominick is almost like a co-author of Nim at this point :-). My impression of Nim is that it is what Go should have been, if language developments of the past 40 years were taken into account, so if you like the simplicity of Go's syntax, but want modern features, seriously consider Nim. I personally couldn't get over the significant whitespace, (relying on invisible chara…

Thank you for the kind words! I'm happy that you can see the positives in Nim even though you dislike one of its most prominent features. Personally I love significant whitespace and have started using Nim because of this feature, basically back in the day I just wanted a Python alternative that was compiled. If you really dislike it that much, you may be able to convince Araq to bring back his old time idea of allow…

If you're adding comparisons I'd suggest OCaml (which would be my go-to language for that kind of problem). Maybe also Dylan if you're emphasising the metaprogramming side of things.

Re: Show HN: “Nim in Action” is now available

#96
post #95
post #15

Earlier quoted context omitted.

Thank you for the kind words! I'm happy that you can see the positives in Nim even though you dislike one of its most prominent features. Personally I love significant whitespace and have started using Nim because of this feature, basically back in the day I just wanted a Python alternative that was compiled. If you really dislike it that much, you may be able to convince Araq to bring back his old time idea of allow…

If you're adding comparisons I'd suggest OCaml (which would be my go-to language for that kind of problem). Maybe also Dylan if you're emphasising the metaprogramming side of things.

Maybe. I wouldn't want to overwhelm the reader. I will take a look at both and see if they add value :)

Thank you for your feedback!

Re: Show HN: “Nim in Action” is now available

#97
post #33

Earlier quoted context omitted.

may I ask, to do what? I think they don't claim to "be web" yet [0] and I doubt you were using PHP other than serving over http? [0] http://arewewebyet.com/

This website is _extremely_ outdated, please don't take it as accurate.

Can't anybody from the rust community take over this site? Creating a completely new site might be a fallback, but arewewebyet is referenced / linked very often and ranks high.

https://github.com/teepee/arewewebyet looks abandoned.

Re: Show HN: “Nim in Action” is now available

#98

Earlier quoted context omitted.

Does Nim deep copy messages between threads now (i.e. serializes entire object graphs)? If so I'm glad to see it and yes, it would of course be safe, as it would basically be Erlang. (It wasn't thread-safe when I last looked a year-plus ago.)

It has always done that [1]. You can only send refs through channels or via the spawn primitive where they are serialized/deep copied (or as arguments to threads upon creation, where that happens implicitly). [1] It may have been that using global variables to share refs between threads did only trigger a warning at some point, not an error. I'm not 100% sure about that. But the serialization has been there since the…

Thank you for clearing that up - I have always been confused when pcwalton has written (a bunch of times) that "Nim's GC isn't thread safe" - since... I knew about the deep serialization and couldn't for my life understand why it wouldn't be safe then.

But how could the segfaults then happen? Aha, you mean the test code perhaps shared via globals?

Re: Show HN: “Nim in Action” is now available

#99
post #78
post #68

Earlier quoted context omitted.

I put off developing in Python for ages because I dislike significant whitespace. Eventually I was persuaded to give it a go. After developing in Python for some time now, I still dislike significant whitespace and the whole tab-space issue, but can learn to live with it. I will likely give Nim a go, despite its significant whitespace and weird variable naming rules. In any case I continue to follow Nim and wish the…

This tab-space is a non issue for actual python programmers, because anyone who has done programming in Python for any decent amount of time (say > 5 hours) would stick to using spaces. and learn how to configure their editor to make it a non issue. Pretty much how, parens are not a concern for actual lisp programmers.

[deleted]

Re: Show HN: “Nim in Action” is now available

#100
post #54

I should like to know if Nim can be used for machine learning or for deep learning. How could be located Nim in comparison to Julia, numpy, Torch7 and the tools for deep learning and AI that many big companies are open sourcing.

I think Nim would be ideal for that kind of applications, in particular neural networks stuff. But definitely we are not there yet. I try to explain my reasons in this blog post: http://rnduja.github.io/2015/10/21/scientific-nim/ To get to a point where we have something good to use, though, there are a few libraries to develop. I started working out a basic layer for linear algebra, that is needed in many applicatio…

Interesting post. I also enjoyed the posts about Torch but when installing in ubuntu 15.10 there were some problems. Libraries are necessary to avoid reinventing the wheel.
Post reply on HN