Live data from Hacker News

Mastering Nim – now available on Amazon

nim-lang.org

41–50 of 106 posts

Re: Mastering Nim – now available on Amazon

#41

There's 3 languages in the same class. Julia, Nim and Crystal. I'm specifically curious about Crystal vs. Nim. Benchmarks show that crystal is pretty much faster, but I'd also like to know the advantages of why someone would choose Nim over Crystal I'm looking for reasoning that is deeper then just superficial language syntax differences. Has anyone extensively used both? I would like an unbiased view from someone wh…

What class of languages are those?

Re: Mastering Nim – now available on Amazon

#42
post #27
post #16

Earlier quoted context omitted.

Even Rust?

Nim gives you like 85% of the performance of Rust without having to worry about a borrow checker. It also solves concurrency problems via its use of Channels, like Go. So it's just hard to justify using Rust, for me. Unless you're writing a DB or something where a GC is a no go. But Nim's memory management seems pretty good, and many things are stack allocated.

Even though Nim by default works with a GC to manage memory, I regularly use Nim to work with direct-memory/raw-pointers and can still have increased memory safety by using HOOKS and ARC. I have written about my experience here[1], in case somebody is curious.

1. https://ramanlabs.in/static/blog/raw_memory_management_patte...

Re: Mastering Nim – now available on Amazon

#43

I absolutely hate Nim for spoiling pretty much all other programming languages for me. I wish it gained more traction. Congratulations on your book and keep up the great work, Araq. You did an outstanding job with Nim and I wish you all the best!

I totally agree, Nim is great but it really needs more traction. I'm developing a web framework for Nim with batteries included (an ORM, for one), Nexus: https://github.com/jfilby/nexus

Re: Mastering Nim – now available on Amazon

#44

I absolutely hate Nim for spoiling pretty much all other programming languages for me. I wish it gained more traction. Congratulations on your book and keep up the great work, Araq. You did an outstanding job with Nim and I wish you all the best!

That’s how I feel about Elixir. Everything else just feels wrong now. I’d be curious to get your Nim highlights.

My experience after a couple of weeks:

Pros: Extremely good C and C++ interop Significant indentation Very good performance Quick compilation Terse, but readable Easy cross platform Powerful macros and close to trivial DSL construction Very little code to do a lot of stuff Incoming future features look very promising

Cons: Hard to predict and control program performance, LTO does a lot of heavy lifting Immature ecosystem, because only few users. Many libraries have bugs, missing features or just a very clunky API. Or maybe they are deprecated or abandoned all together. Many different ways to do the same thing everyThingIsCamelCase, ambiguous variable names (subjective) Documentation and tutorials is mostly reading through the code and googling forum posts outside the core language You compile either for C or C++, some libraries simply won't work without C++ compilation

Re: Mastering Nim – now available on Amazon

#45
post #43

I absolutely hate Nim for spoiling pretty much all other programming languages for me. I wish it gained more traction. Congratulations on your book and keep up the great work, Araq. You did an outstanding job with Nim and I wish you all the best!

I totally agree, Nim is great but it really needs more traction. I'm developing a web framework for Nim with batteries included (an ORM, for one), Nexus: https://github.com/jfilby/nexus

Nice one of the projects I want to work on is a simple text editor that lets you build and run. I think back to some of my favorite niche languages like Processing and Racket although I dont use them a ton when I do I love their interactive editors.

I am getting ahead of myself since I am still learning the language but I am coming from Python and various other languages so it has not been a complex transition.

Re: Mastering Nim – now available on Amazon

#46

Earlier quoted context omitted.

Quoted post unavailable.

You have a few different issues with the assumptions in your comment. First, yes, one can ask for a source without a sincere request for it, known as sealioning. However, that was not what I was doing, because: > While statistical data is much better then common sense reasoning, it's still possible to make claim via deduction and even anecdotal evidence. Oftentimes, intuition is not correct. Think for example to the…

>Oftentimes, intuition is not correct.

However oftentimes statistical data is not AVAILABLE. Thus you must make a claim with available evidence.

>Similarly, simply because you believe that ebook sales reduce print book sales intuitively does not mean that this be so.

No but given the logic of how humans prefer to get free things then pay for things, and given the fact that I myself prefer this you can make a best possible conclusion.

> In fact, based on other studies, it seems that piracy actually increases sales [0].

There are studies that show piracy decreases sales as well rendering even statistics ineffective and contradictory. Additionally the MAJORITY of studies indicate the opposite of your cherry picked source; further indicating that "sources" alone can't even be trusted: https://corsearch.com/does-piracy-impact-sales-a-look-at-the...

>Second, just because you pirate does not mean everyone does.

No but if one person does, it's possible that other people do to. 1 person is 1 data point which is better than zero. Anecdotal data matters. Do I need a scientific study to prove that hitting someone with a car can potentially injure them? No. I don't. Intuition is valid evidence for me to follow so I don't go around running people over with my car.

>All in all, you have no source except intuition that can be shown to be wrong.

https://corsearch.com/does-piracy-impact-sales-a-look-at-the...

The site above shows your conclusion and your study to be wrong and contradictory. It says 22 out of 25 studies show that piracy harms sales.

Now the above is a scientific study, but before I even found that study I already knew intuitively that piracy harms sales. I made that claim BEFORE I had scientific evidence. I made that claim off of INTUITION.

I'm assuming your claim of Increased Sales was based off of you coming to a conclusion based off of that study you linked. Well we both arrived at conclusions. You arrived at your conclusion based off of a scientific study, mine off of intuition and the link I showed you above shows that MY INTUITION beat your SCIENCE.

This shows that there's a high amount of unreliable data and bias in science and that you cannot place your full trust into "studies" and "sources" Often times intuition can beat out these studies because there's so many flaws in science in practice that a lot of these studies are just as flawed as intuition.

Re: Mastering Nim – now available on Amazon

#47
post #14

Earlier quoted context omitted.

> An e-book is going to heavily (and negatively) impact the sales figures for the print book. Well, if the price is the same, that hardly matters? Or are you implying unpaid/illicit downloads will be worse with a legal digital version as opposed to an illicitly scanned copy? After buying an e-reader I can't defend buying print books from an environmental standpoint - it may be a sunk cost/resources fallacy - but with…

You can read a print book without wasting electricity every time you open it and the toxic materials used to produce a e-reader. Reading print is still a much more enjoyable experience (except in the tub -- a waterproof Kindle is still great and lightweight for that!), especially with the slow speed of e-ink screens. I can't defend ebooks compared to the reading, sharing, and the later selling at a used book store my…

There is the mass murder question of trees for books that never get sold and are eventually thrown into a dump, alongside the chemicals used in the publishing process.

Re: Mastering Nim – now available on Amazon

#48

There's 3 languages in the same class. Julia, Nim and Crystal. I'm specifically curious about Crystal vs. Nim. Benchmarks show that crystal is pretty much faster, but I'd also like to know the advantages of why someone would choose Nim over Crystal I'm looking for reasoning that is deeper then just superficial language syntax differences. Has anyone extensively used both? I would like an unbiased view from someone wh…

What class of languages are those?

script style languages specifically designed with modern concepts and to be highly performant.

V8 is likely the fastest interpreter (javascript) for a script style language but these languages should be a step above and beyond v8 in terms of performance.

Re: Mastering Nim – now available on Amazon

#49
post #43

Earlier quoted context omitted.

I totally agree, Nim is great but it really needs more traction. I'm developing a web framework for Nim with batteries included (an ORM, for one), Nexus: https://github.com/jfilby/nexus

Nice one of the projects I want to work on is a simple text editor that lets you build and run. I think back to some of my favorite niche languages like Processing and Racket although I dont use them a ton when I do I love their interactive editors. I am getting ahead of myself since I am still learning the language but I am coming from Python and various other languages so it has not been a complex transition.

Nim also needs lots of example code for people to learn from. Even if people don't use Nexus, it's at least one more Nim project out there.

Re: Mastering Nim – now available on Amazon

#50
post #14

Earlier quoted context omitted.

> An e-book is going to heavily (and negatively) impact the sales figures for the print book. Well, if the price is the same, that hardly matters? Or are you implying unpaid/illicit downloads will be worse with a legal digital version as opposed to an illicitly scanned copy? After buying an e-reader I can't defend buying print books from an environmental standpoint - it may be a sunk cost/resources fallacy - but with…

You can read a print book without wasting electricity every time you open it and the toxic materials used to produce a e-reader. Reading print is still a much more enjoyable experience (except in the tub -- a waterproof Kindle is still great and lightweight for that!), especially with the slow speed of e-ink screens. I can't defend ebooks compared to the reading, sharing, and the later selling at a used book store my…

>You can read a print book without wasting electricity

You don't 'waste' electricity, you waste your money. And in many places electricity is (much) cheaper than (good) paper.

>toxic materials used to produce a e-reader.

Surely you realise that different chemicals are used during paper production too? https://en.wikipedia.org/wiki/Sodium_sulfide and https://en.wikipedia.org/wiki/Sodium_hydroxide for example. And this depends on paper type too.

>Reading print is still a much more enjoyable experience

And this is entirely subjective.

>I can't defend ebooks compared to the reading, sharing, and the later selling

While I 100% agree with selling option, sharing is at least as easy with epub. Unless we are talking about a book from Amazon or something. In most cases you can just send a file over your preferred messenger.

Post reply on HN