6 ms·
Mastering Nim, 2nd edition
- systems 3y agoyea, please change that cover image, it looks like those visual illusions explicit images its not technically explicit, but its implied
- a_commentator 3y agoThank you. A book like this choosing an image of "mountains" that is evocative of staring up at a naked woman's body is a stunning, poor choice. Choices like this could alienate a large number of potential Nim programmers, and make me question the tone and nature of the community.
- that_guy_iain 3y agoThe actual book cover is https://www.amazon.de/dp/B0B4R7B9YX https://www.amazon.de/dp/B0B4R7B9YX
- verdverm 3y agoit's the same image, spanning front to back cover
- that_guy_iain 3y agoYes and if you look at that book and see a naked woman then it's more telling about you than anyone else.
- verdverm 3y agoour biology primes us to see these things, our lizard brain is quite powerful despite the belief we can live above it. > it's more telling about you than anyone else I'll reflect this back to you and your statement. Making such statements says quite a bit about how you see and treat people I'd also note that I did write I didn't see it the first time, and only saw it after another commenter pointed it out. (https://news.ycombinator.com/item?id=38544483 https://news.ycombinator.com/item?id=38544483)
- sigzero 3y ago"out biology primes us..." but "I didn't see it the first time, and only saw it after another commenter pointed it out."
- verdverm 3y agopart 1 addresses the general premiss that if you see sexual imagery in a non-sexual image, then there is <something> about you part 2 addresses the personalization of the accusation
- PH95VuimJjqBqy 3y agoexact same for me, although after seeing it I do have a difficult time believing it was accidental. But I also don't care, it doesn't bother me at all.
- that_guy_iain 3y ago> I'll reflect this back to you and your statement. Making such statements says quite a bit about how you see and treat people What I suspect is you haven't looked at a picture of the actual book cover and therefore haven't realised that it looks rather different in action.
- systems 3y agothis is a good example of gaslighting and it is usually how those visual illusions are used, if you see this than you are that, but if you see the other thing you are normal its a bad image, it is a visual illusion, are they aware of it or not this is the question
- that_guy_iain 3y agoThis is not a good example of gaslighting. If you look at the actual book cover and you see that, then it's very telling. If you look at the image on the blog post and see it, it's different. The book cover images are missing quite a bit of it and the parts where it cuts off are quite import to an illusion.
- tokai 3y agoYou two need to calm down.
- nor-and-or-not 3y agoIt may not be obvious if you're just looking at the book. But if the images of the front and back are put together side by side, like in the post, I think it's quite obvious. I'd be surprised if this wasn't intentional.
- nkozyra 3y agoWhat would it be "telling" exactly? That someone recognizes the general shape of a naked woman?
- ReleaseCandidat 3y agoThe language creator (who is the author of this book) said this too: https://forum.nim-lang.org/t/10312#68553 https://forum.nim-lang.org/t/10312#68553
- a_commentator 3y agoThat's pretty telling for the creator and community to think that way. Nim doesn't have a great ecosystem, but this really doesn't help sell it either.
- Always_Anon 3y agoBased. This tells me the creator is sane and has his head screwed on properly.
- shikon7 3y agoImplied is literally the opposite of explicit
- verdverm 3y agoI believe they put "not" in front of "explicit" for this reason
- bmacho 3y agoThat's not how 'but' works, also the word 'explicit' is used differently here.
- verdverm 3y agoI read it as "this is not an explicit image of looking up a woman's body, but it is implied" I take issue with the but part, which "implies" it was intentional. I'm not in a place to judge that, but I can definitely see the "implied" imagery ... if we can further mix the connotations of the words from the comment we are talking about, without increasing confusion...
- verdverm 3y agohad to go back b/c I didn't see it the first time, now it is quite evident how intentional I will let the crowd decide
- racl101 3y agoIt's like that episode of Everybody Loves Raymond where Ray's mom (Marie Barone) creates a sculpture that looks like a womb area, and only Ray and his wife can immediately see the ... hidden image, and Ray's dad (Frank Barone) for some reason is very drawn to the sculpture and he can't quite put his finger on it. After Ray, lets his mom know, then she can't unsee it. Hilarity ensues.
- dragonwriter 3y agoI think you mean “female nude” not “explicit” here. They aren't synonyms; “implied explicit” is an oxymoron, “implied female nude” is not. (Thouugh really, “suggestive of” or “evocative of” is probably more accurate than “implied” here, too.)
- itishappy 3y agoThere are multiple definitions: ex·plic·it /ikˈsplisət/ * stated clearly and in detail, leaving no room for confusion or doubt. * (of a person) stating something in a clear and detailed way. * describing or representing sexual activity in a graphic fashion.
- deleted 3y ago[deleted]
- dragonwriter 3y agoYes, and? Presumably the uncited cut-and-paste from a (poor, IMO) dictionary is intended to suggest that the third definition applies, but nudity isn't sexual activity [0] and, more to the point, the sense of “graphic” in the that definition is basically a combination of vivid and explicit in the sense of the first definition, and remains an antonym of “implied”. [0] which is more of a problem with your choice of authority, because most dictionaries wouldn't limit the relevant definition this way.
- itishappy 3y agoCopied from Google (who pull from Oxford), but a variation of "depicting nudity or sexual activity" is included in most if not all definitions. Do you have a source you prefer that contradicts this? In common usage, an "explicit image" implies the third definition. It's not explicit as opposed to blurry or abstract, it's explicit as opposed to non-sexual. Since the context was discussion of the contents of an image, the word "image" was implied.
- tokai 3y agoIs this a joke?
- racl101 3y agoI knew I was not the only one. It is ... sus.
- cooperadymas 3y agoIronic that a statement about an ambiguous image that might be misinterpreted to be something it is not has spurred such a rousing discussion about the ambiguity of the comment itself, which may be misinterpreted to mean something it is not saying.
- vfclists 3y agoBruh!! You've stirred my inner poet. Ode to my most beautiful Goddess Nim. My beloved goddess, I wish to roam around your lush forests and valleys, and scale the peaks of programming ecstasy with you my most beautiful goddess. I yearn to plough the depths of your fertility, planting my seeds into your fertile soil, and watch the seedlings sprout and grow into great giant oaks of Mandelbrot complexity and beauty. I want to bathe in your flowing rivers of ectasy, raise my face to the sky and feel the spray of your golden showers on my face, drink your golden ambrosia and feel the wisdom of your inspiration flow through my veins into my fingers, weaving skeins of golden code that induce envy in the greatest weavers of code. Oh beloved Goddess Nim, my programming muse. Bruh!! ..... I ought to stop here before I cause a global crisis of PEKBACs among diehard Nim programmers. TBH, I didn't see it at first, but those beautiful mountain peaks and valleys have converted me into a diehard Nim programmer. PS. Should I post this on the Nim Slacks, Reddits, Matrixes et al?
- jdbernard 3y agoAs other commenters have noted, this is a stretched across the front and back. It makes me think this illusion was not intended and is more an artifact of having a mirrored image so that the back is a reflection of the front. I don't see any issue with the book cover as it appears on the linked Amazon page, for example.
- ZoomZoomZoom 3y agoA tongue-in-cheek motto for Nim is "One language to rule them all". While the statement is debatable (with a strong set of arguments for), it's hard to deny what a great fit Nim is for Advent Of Code (and other related sets of problems, such as Project Euler). The community is sharing and discussing their solutions on the forums[0] and in the dedicated matrix room[1]. The limited scope of individual problems makes them great to see the language in action, compare different approaches and asses how its syntactic weaponry and standard library can help solving the tasks at hand quickly and efficiently. [0]: https://forum.nim-lang.org/t/10717 https://forum.nim-lang.org/t/10717 [1]: https://matrix.to/#/#nim-aoc:matrix.org https://matrix.to/#/#nim-aoc:matrix.org
- Maxion 3y agoWhy is it that these types of things always, always, always, always omits a simple one paragraph explanation of what they are?
- hosteur 3y agoThis is probably a better url https://nim-lang.org/features.html https://nim-lang.org/features.html
- Maxion 3y agoThat still dives right into it, without telling me if nim is a spinoff of vim, a language, some data format, a compiler/transpiler and so forth.
- jdbernard 3y agoFYI, on the front page, https://nim-lang.org https://nim-lang.org, in large type you have this: > Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula.
- lucideer 3y agoIt's a blog post. The homepage (accessible via clicking the logo on the blog page) does include such a paragraph. I've seen plenty such projects omitting this on their homepage, but it seems odd to expect it of every deeplink.
- that_guy_iain 3y agoConsidering this is a link to a blog post about a book, you could look at the description of the book?
- c-hendricks 3y agoTitle should probably be "Mastering Nim, 2nd edition", since that's the title of the linked page. It's a short blog that sends you to a book on Amazon: https://www.amazon.com/dp/B0B4R7B9YX https://www.amazon.com/dp/B0B4R7B9YX
- dang 3y agoYes - thanks. Submitted title was just "The Secret of Nim", which HN's software shortened to just "Nim"
- Anon826 3y agoAccording to one web framework benchmark, Nim holds top 2 positions. https://web-frameworks-benchmark.netlify.app/result https://web-frameworks-benchmark.netlify.app/result Only "mainstream" app I know that runs Nim is Nitter.net
- synergy20 3y agoI had the book and it is well written, original thought is to use nim for c but I still code in c more as of now
- systems 3y agobecause nim is not a c replacement, nim is more in the go or d python replacement replacement , meaning, in the compiled languages that want to replace python category zig and rust are the real c replacement
- cb321 3y agoIt is undeniable that, of all these, the most common "first prog.lang (PL)" is Python. So, to the extent a new PL "replaces what you already know" almost everything is a Python replacement. (It's a bit muddy since so much Python just wraps C/C++, though, and you might be replacing someone else's code.) Personally, I use Nim as a C replacement - it responds very well to optimization effort in my experience. At least one developer is calling more optimized Nim from Rust.. https://forum.nim-lang.org/t/10532 https://forum.nim-lang.org/t/10532
- PMunch 3y agoIt really depends on _what_ you want to replace, as in the application you have. Nim is great for micro-controller programming typically done in C for example. Since it has painless interop with C it also comfortably uses C libraries, so you don't have to rewrite all your C code.
- DeIlliad 3y agoI want to get into Nim but I think the language is way too verbose for my taste. It's so similar to spoken English, even compared to Python, that it enters some sort of uncanny valley which makes reading Nim code give me a headache.
- cb321 3y agoThere may be compensating syntactic factors in the large to English word bitwise & boolean operators in the small -- such as being able to skip parentheses in command-style function call syntax and define your own operators (to bring back brevity surgically) that are even implemented as templates or macros. Maybe you can have it all? { famous last words when trade-offs rear their heads :-) }. Personally, whenever I switch from Nim to any other PL (except maybe Unix shell) things always feel much more verbose. EDIT: For example, say you want Python's Walrus operator. You can just do this (although you can often just use a slightly more verbose parenthesized `let` expression): proc `:=`*[T](x: var T, y: T): T = (x = y; x) or maybe you want `myvar |= flag` like in C/Python. You can also do that: proc `|=`*[T, U](a: var T, b: U) = (a = a or b) But both of those could also be templates or macros that get the whole AST, can pick the AST apart, and emit whatever Nim code you actually want. In fact, since Nim has nicely nested scopes & hygienic templates, you can define a bunch of operators in a library `template`, called say `unsafePtrArith` for pointer arithmetic, import that and then make them available in a little sub-scope to your code like: unsafePtrArith: a += 5 or unsafePtrArith: b += 4 c += 3
- michaelsbradley 3y agoCan you give examples? In my experience, Nim macros (but not templates) can succumb to verbosity in their implementations because manipulation of the AST is generally imperative and can become quite involved in the details of syntax nodes. Other than that, with the expressiveness of type definitions in Nim, my experience has been that routines often end up short and dry. Learning to wield helpers such as {.push.} and {.pop.} can be helpful in that regard, just depends on what you’re doing.
- DeIlliad 3y ago
- praut 3y ago[flagged]
- jarredkenny 3y agoI've enjoyed building things in Nim. I picked it up by building small CLIs, and then eventually by starting a 3D game engine project in Nim. It's the language that I wish would take off already.
- cb321 3y agoI think Nim is great for small CLIs. Some examples are over at: https://github.com/c-blake/bu https://github.com/c-blake/bu . To quantify "small", using tools themselves in bu/ (and Zsh *): wc -l --total=never **.nim|cols 1|cstats ms q.05 q.95 75.5 +- 5.7,22.5,175.25 So, around 1..2 pages for a 70-row terminal window, with a 5th & 95th Parzen interpolated quantiles of 22.5 and 175.25 lines.
- Tommstein 3y agoI was considering learning Nim. Then I found out about its partial case insensitivity and ignoring of underscores in identifiers. And that was the end of my interest in Nim.
- walthamstow 3y agoTIL that Nim used to be called Nimrod. Better for the name change, IMO, as much as I like Green Day.
- michaelsbradley 3y ago“Nimrod” was, to my knowledge, a biblical reference: Cush was the father of Nimrod, who became a mighty warrior on the earth. He was a mighty hunter before the Lord; that is why it is said, “Like Nimrod, a mighty hunter before the Lord.” The first centers of his kingdom were Babylon, Uruk, Akkad and Kalneh, in Shinar. From that land he went to Assyria, where he built Nineveh, Rehoboth Ir, Calah and Resen, which is between Nineveh and Calah – which is the great city. — Genesis 10:8-12 https://forum.nim-lang.org/t/9591#63054 https://forum.nim-lang.org/t/9591#63054
- tokai 3y agoI thought it was simpleton/fool, to signify the ease of use ;P
- jawilson2 3y agoPretty sure this usage is from Bugs Bunny, who derisively/sarcastically called Elmer Fudd Nimrod to mock his hunting skills.
- michaelsbradley 3y agoIt was Daffy Duck
- jawilson2 3y agoOoh, the Mandela effect strikes again! I swear I've seen the video of him saying it, but can only find Daffy.
- deleted 3y ago[deleted]
- mathverse 3y agoMy biggest problem with Nim is that it did not pick its niche. It tries to be everything to everyone and does not really have strong foundations for your average programmer to use it in Prod. There is not really an ergonomic, performant http server that people converged to. Anything production quality is mostly from Status.im and people like Treeform and Guzba who also have a production use case.
- michaelsbradley 3y agoIts greatest strength at present, and for a long while, has been serving as an “expert’s tool”. If you want to do systems programming with less hassles than C/++ (you understand them well), you appreciate the limits and pitfalls of AMM (and you don’t want/need Rust’s borrow checker), and you’re into metaprogramming, well then Nim is a great tool for your toolbox. It can also serve newcomers to programming decently well and enables DSLs such as Enu ( http://getenu.com/ http://getenu.com/ ). But it doesn’t take too long reading the Nim Manual and std lib docs to realize that a big focus is putting a power tool into the hands of developers who already understand the ins and outs of systems programming. This is all, of course, my personal take on it, other Nim users may disagree.
- kevin_thibedeau 3y agoThe big weakness now is the transition to 2.0 and all the old docs floating around that are obsolete. It's hard to find info on what the new idiomatic approach is for things that have changed. I had to port some pre-1.0 code a little while back and was puzzled for a bit about resolving various (justified) deprecation warnings.
- Nezteb 3y agoAn interesting forum post where the Andreas is asked about the business organization structure behind Nim: https://forum.nim-lang.org/t/10312 https://forum.nim-lang.org/t/10312
- Always_Anon 3y agoBased. Glad there's a refuge for sane developers that are tired of the long march of Woke destroying so many other language.
- 999900000999 3y agoAny reason the digital edition needs to be 40$. It's effectively free to distribute after all
- jjice 3y agoIt's the same reason everything digital and downloadable isn't free: there's a cost to create it and there's a value to it. For a language developer to charge for a book about that language, I think that's a completely valid way to make some money off of their work. Even the Rust book, "The Rust Programming Language" is available freely online [0], but also as a print and ebook for sale via NoStarchPress [1]. [0] https://doc.rust-lang.org/book/ https://doc.rust-lang.org/book/ [1] https://nostarch.com/rust-programming-language-2nd-edition https://nostarch.com/rust-programming-language-2nd-edition
- 999900000999 3y ago40$ is outside of the impulse buy range for many. I'd prefer a GitHub repo with examples over this. At least that can be easily updated
- cb321 3y agoPerhaps the Nim Github Wiki would be more to your liking? https://github.com/nim-lang/Nim/wiki https://github.com/nim-lang/Nim/wiki EDIT: In particular, the "Nim for X Programmers" pages seem popular.
- 999900000999 3y agoThanks! I'll check this out this weekend.
- ITwrx 3y agoMastering nim is not intended as the intro or main docs for Nim. It's intended as bonus docs for more experienced users, FWICT. Generally, people start with the resources listed here: https://nim-lang.org/documentation.html https://nim-lang.org/documentation.html, especially the official tutorials. There's also this unofficial resource: https://ssalewski.de/nimprogramming.html https://ssalewski.de/nimprogramming.html
- deleted 3y ago[deleted]
- netbioserror 3y agoI use Nim at work. I've built a backend CLI program that processes signal data collected from instruments. That CLI program is used in many contexts, but is primarily called through a PHP API by many of our web services. The executable has no dependencies (compiled with musl-libc and statically-compiled libraries). Modeling problems is almost as powerful as a Lisp: It prefers stack allocation, immutable data, and referentially transparent procedures, but all of that can be short-circuited when necessary. The type system is simple and clear. The syntax is Pythonic and easy to make readable and self-documenting. Magic is not required. The Datamancer data frame library is incredibly robust. The standard library is quite extensive, and the included JSON data structure functions well as a dynamic, heterogenous structure when needed. Turning Nim objects and data into JSON is so trivially easy that it's a no-brainer for my use case, and probably web-focused use cases as well. Nimja templating is incredibly good and great for building pages or documents, so long as you're preprocessing as much as possible (as with most templating libraries). C interop is also trivially easy, requiring no more than a function signature in most cases. I can absolutely say that Nim has been a secret weapon for tackling the specific data processing problem I've been solving. Highly recommended, especially if you can invoke it from the CLI using other languages to solve things such as UI. I'm building an Electron app around it currently, and the NodeJS backend invokes my Nim program.
- wodenokoto 3y agoHow is it for data exploration? Can you run things in a repl?
- netbioserror 3y agoIt has a very rudimentary REPL in the form of `nim secret`; however, the compiler internals are being revamped a bit in the coming versions to make room for full-featured incremental compilation and REPL support.
- netbioserror 3y agoSorry, to answer your question about data exploration, quite good. Reading files is a single procedure call which slurps into strings. Parsing JSON (or Datamancer parsing CSV) is a single procedure call. Nim objects and most compound data structures such as JsonNodes and DataFrames have printing support build in, using the `$` proc which is the language's equivalent to `toString()` and should be defined on every type possible. In short: It's great.
- inparen 3y ago[flagged]
- deleted 3y ago[deleted]
- Nezteb 3y agoThe first time I ran into Nim in the wild was when contributing to Exercism [1], specifically the configlet tool [2] for managing language tracks. It looks like it was created at the end of 2020 [3]. [1] https://exercism.org/ https://exercism.org/ [2] https://github.com/exercism/configlet https://github.com/exercism/configlet [3] https://github.com/exercism/configlet/commit/68f130a543757ab9015aa91d88ebad238e48414a https://github.com/exercism/configlet/commit/68f130a543757ab...