Live data from Hacker News

Nim: Scripting Ease in a Compiled Language

junglecoder.com

91–100 of 169 posts

Re: Nim: Scripting Ease in a Compiled Language

#91

How do data scientists feel about Nim? It feels very pythony, but way faster - could be a really cool language for them, similar to what Julia is trying to be. Curious if anyone in a DS role has tried it out. I'm certainly tempted to try it out, I'm sure I'm losing lots of performance in parts of my analytics pipeline due to Python being garbage slow.

Not really a data scientist myself, but using Nim for my PhD in physics to analyze the data I took for an axion search experiment, code at [1].

I just love it. Super productive to work with and in my case faster than the C++ framework I'm replacing.

The ecosystem of course is pretty small. But for me wrapping C code, porting something or reimplementing some libraries can be a lot of fun, too. In my experience every hole I've found was easily plugged so far.

[1] https://github.com/Vindaar/TimepixAnalysis (recently due to ..reasons.. all development happened on the open PR)

Re: Nim: Scripting Ease in a Compiled Language

#92
post #84
post #49

Earlier quoted context omitted.

Sounds like a nightmare.

It's a misfeature, but let's not to be melodramatic.. just use a formatter.

It's a pretty bad misfeature though, since it's a feature you might accidentally use without realizing it if you don't use a linter.

Re: Nim: Scripting Ease in a Compiled Language

#93
post #89

How do data scientists feel about Nim? It feels very pythony, but way faster - could be a really cool language for them, similar to what Julia is trying to be. Curious if anyone in a DS role has tried it out. I'm certainly tempted to try it out, I'm sure I'm losing lots of performance in parts of my analytics pipeline due to Python being garbage slow.

The lack of mature libraries in the style of pandas, sklearn or the tidyverse, and the lack of a stable REPL is a major drawback for "production" data science. On the other hand though I've had fun playing with it in a personal capacity precisely because of the rough edges. If I want to fit a particular kind of model I'll probably have to roll my own, meaning I have to be familiar with what the algorithm is doing and…

Since you mention tidyverse, I might shamelessly mention that I'm currently working on a sort of port of ggplot2 and some dplyr features in Nim [1]. It's super WIP, but for most plots and simple data frame operations (complicated stuff I do beforehand) I need it has mostly replaced plotly [2] (or in some cases matplotlib).

However, don't expect the included data frame to be fast. That in combination with a dynamic nature has been out of scope for me alone.

[1] https://github.com/Vindaar/ggplotnim/tree/addDocs

[2] https://github.com/brentp/nim-plotly

Re: Nim: Scripting Ease in a Compiled Language

#95

How do data scientists feel about Nim? It feels very pythony, but way faster - could be a really cool language for them, similar to what Julia is trying to be. Curious if anyone in a DS role has tried it out. I'm certainly tempted to try it out, I'm sure I'm losing lots of performance in parts of my analytics pipeline due to Python being garbage slow.

I am trying to improve Nim data science ecosystem with https://github.com/mratsim/Arraymancer.

I think today the best way to try Nim is for slow Python utilities vi nimpy: https://github.com/yglukhov/nimpy

You can also use Nim in Jupyter the following way: https://github.com/apahl/nim_magic

My next step would be to improve interop between Arraymancer tensors and Numpy ndarrays.

Re: Nim: Scripting Ease in a Compiled Language

#96

One thing I find annoying about Nim is the case insensitivity [0]. There was no strong reason for this "feature" and literally no mainstream language does it. Moreover it makes code search a pain. [0] https://nim-lang.org/docs/manual.html#lexical-analysis-ident...

Every good language must have some batshit crazy bizarro wart thrown in...

Re: Nim: Scripting Ease in a Compiled Language

#97
post #76

Earlier quoted context omitted.

It's not just case insensitive, it's underscore insensitive. So MyNimName, mynimname, MY_NIM_NAME, My_Nim_Name, __MYNIM___name_, and any other variation you can think of are all the same name! Most search tools have the option of case sensitive or insensitive search, but a search that does that and ignores underscores? Not too many of those outside the Nim world. An interesting contrast is Nim's policy on tabs and sp…

Banned tabs? Good to know. From now on I'll just ignore everything about Nim. I will also applaud the Go team's decision to include a formatter instead of such nightmare restrictions.

Well, while its your right to avoid Nim for its syntax choices (I dislike the case insensitively strongly too), the tone of the comment makes one wanna reply "Just don't let the door hit you on your way out".

It's not as if some non-user of Nim announcing they'll avoid the language is any great loss.

Reminds me of all those "Cancel my subscription" letters to the editor in days past. Yeah, I'm the the "Time" magazine or whatever would tremble to know someone is cancelling...

Re: Nim: Scripting Ease in a Compiled Language

#98

Earlier quoted context omitted.

In many languages, you might use one for a type name, the other for a variable. You could ban using the same identifier with different cases, instead of treating them the same.

On the other hand, what if it's a code UI limitation? Suppose the UI for writing Nim had support for linking, editing, viewing all such alternately spelled but equivalent symbols?

Then it limits me as a programmer to have to use said UI...

Re: Nim: Scripting Ease in a Compiled Language

#99

One thing I find annoying about Nim is the case insensitivity [0]. There was no strong reason for this "feature" and literally no mainstream language does it. Moreover it makes code search a pain. [0] https://nim-lang.org/docs/manual.html#lexical-analysis-ident...

I've been using Linux since the late 90s and case sensitivity has never been an issue for me with Nim since I started using it in 2016. This is FUD and fake news.

Re: Nim: Scripting Ease in a Compiled Language

#100

Earlier quoted context omitted.

I use Nim in production. I been using it for more than 1 year in production. I like it. For me, it started out as a faster python that prevents typos. But it has really grown on me. I really like that I can share libs on server (compiling to c) and client side (compiling to plain javascript). Basically any C library is also a Nim library with a tiny wrapper. That's a huge ecosystem! I also like how Nim can integrate…

ditto! docker and kubernetes are solutions to problems that shouldn't be there in the first place!

What problems does it solve? It seems like a convoluted way for distributing shared libraries and support applications with the primary application. Couldn't i just put them all ina folder wih a script to se paths?
Post reply on HN