Live data from Hacker News

Nim 1.6

nim-lang.org

131–140 of 179 posts

Re: Nim 1.6

#131

Earlier quoted context omitted.

This is exactly right. What is the REPL story with NIM? Having used a REPL, I cannot even imagine doing research & analytics without one. FWIW, this comparison between R, Pandas and Nim dataframes is quite encouraging: https://gist.github.com/Vindaar/6908c038707c7d8293049edb3d20... This is one of the aspects that self professed R/Python datascience contenders often get wrong. The very bare minimum is a well supported…

Actually, the bare minimum is a well supported and centralised numeric library providing arrays, matrix and the base tools

Perhaps for some things.

Most of my work is time series analysis and I refuse to use an environment where samples are not explicitly labelled/timestamped and where the tooling does not support seamless operations that take this labeling into account.

So for my use case, a fully featured dataframe library is indeed a must.

Re: Nim 1.6

#132

Earlier quoted context omitted.

I have decided that meaningful whitespace is an anachronism. 20 years ago, I liked it a lot . Today, after the invention and normalization of opinionated autoformatters, it means that the autoformatter can't figure out for me how my code should be indented. Which means that, assuming I am using an autoformatter, it creates one more thing that I have to do manually, because the editor can't accurately do it for me. An…

Some counterpoints: Your auto formatter can’t figure out where you missed braces either. Missing brackets in languages where they are optional for single statements (C) has been a source of serious bugs. Also, in Vim, indenting/dedenting a block is just highlighting the lines and using > or <.

How does significant whitespace save you from bugs?

    if expr:
        doA()
        doB()
Is doB at the correct level?

Having text that's invisible change the flow of your program is crazy IMO.

Re: Nim 1.6

#133
Are there any capable IDEs for Nim?

I'm thinking something along the lines of what GoLand is for Go, or Rider is for C# - a fully-featured IntelliJ kind of IDE.

I'd be much more inclined to kick Nim's tyres if there is a good IDE.

Re: Nim 1.6

#134
post #112
post #110

Earlier quoted context omitted.

One thing I think would be interesting - get listed on Computer Benchmarks Game.

It would be interesting, yes, but the maintainers of that have explicitly refused to add Nim (and other "new" languages).

Ah - I wasn't aware of that. That sucks.

Re: Nim 1.6

#135
post #111
post #109

I see 2 targets that Nim could attack well with a bit of focus - Python and Swift. Both have their strengths, but you always pick off people at the edges. Performance would do well against Python, and multi-platform against Swift. This will be an interesting space to watch. If a beautifulsoup equivalent existed, I would put some serious time into it and reduce my Python time (but that’s just my need).

Instead of beautifulsoup you're honestly better off just running an instance of Firefox/Chrome and scraping data that way. You can do fairly easily these days and I have a library that allows you to do so in Nim: https://github.com/dom96/webdriver

I use it to parse crappy (non-standard) RSS feeds offline for an internal app I use. chrome-scraping would just be more of a pain (although I've done it before).

Re: Nim 1.6

#136
post #37

> Why use Nim? > One language to rule them all: from shell scripting to web frontend and backend, scientific computing, deep learning, blockchain client, gamedev, embedded, see also some companies using Nim. Does that work in practice? I can't really imagine a single language that would be a good choice for "everything".

C interop is very easy, so you can do embedded dev by disabling memory management and standard lib, and staying very close to the generated C code. Or you can do high level stuff thanks to well though generics and meta programming. The js backend is not mature enough to cover high performance web apps. It is more like a gimmick currently. Maybe a wasm layer could be as successful as rust's...

> Or you can do high level stuff thanks to well though generics and meta programming.

Metaprogramming is also surprisingly useful for low-level, embedded programming. Eg, using compile-time logic (branching, looping) to decide which bit in which register you want to twiddle, instead of doing it at runtime, which saves computation and (sometimes) code size.

Re: Nim 1.6

#137

Are there any capable IDEs for Nim? I'm thinking something along the lines of what GoLand is for Go, or Rider is for C# - a fully-featured IntelliJ kind of IDE. I'd be much more inclined to kick Nim's tyres if there is a good IDE.

I believe the best experience ATM is with VSCode and the nim plugin. It's not perfect, but th community is aware and there is work underway to improve tooling: https://github.com/nim-lang/RFCs/issues/300

Re: Nim 1.6

#138

Earlier quoted context omitted.

You're both just making the case that you shouldn't use vim to write code. More modern editors (e.g. VS Code) and modern IDE's (e.g. IDEA, CLion, Visual Studio) make either indenting absolutely trivial.

I think you may have misunderstood? My main editor is IDEA, followed by vscode and emacs. But all three are set to vim mode. Vim itself has actually never been my primary editor; I generally only use it when I'm sshed into servers. The thing that vim mode gets me is twofold: It (mostly) unifies the editing interface among all of those editors, and it allows me to edit code more quickly. The thing I was talking about…

You took the words right out of my mouth. I'm in the exact same boat. I use more than one editor but I always install the vim plugin. It provides an instant speed boost to using that editor efficiently and quickly. We don't switch editors _that_ often, but at the same time, remember trying to remember keyboard shortcuts for TextMate, then Sublime Text, the VSCode, then IDEA, etc.? With the vim plugins, editing text is now the same across all editors.

Re: Nim 1.6

#139

I wrote my first Nim app recently (an agent for reporting server data) and I must say, I like the language. It was a quick and painless learning experience. As of now my binary is about 400KB and uses about 1.3MB in memory consumption. Indeed – as others have reported – Nim feels very much like Python, while the superfast compilation time means I can test code changes quickly during the development cycle. For referen…

> Ultimately, they’re all cool, modern languages, so pick whatever fits your brain and helps you reach your objectives easier, while engaging in this social (or solitary) activity called programming.

Extremely, extremely true!

Re: Nim 1.6

#140

Nim has been such a fun language to use. I make a money-earning desktop application (Electron for the GUI and Nim for the core logic) and companion web service (fully Nim). It has been a pleasure using Nim to make these and other things. Congrats, Nim team!

I would love to see this, what's the product?

https://www.budgetwithbuckets.com/
Post reply on HN