Re: Manu v1.1 - Matrix Numeric package released!

2019-10-20 Thread b3liever
Version 1.4 is released! Check the updated [readme]([https://github.com/b3liever/manu](https://github.com/b3liever/manu))

Re: netcdf for nim

2019-10-20 Thread mikebelanger
It looks like Netcdf4 is based on HDF5 ([https://en.wikipedia.org/wiki/Hierarchical_Data_Format)](https://en.wikipedia.org/wiki/Hierarchical_Data_Format\)). But it doesn't look like grib2 is based on HDF5. Although their usage cases are the same. That said, if you think the HDF5 library could

Re: How to create new operator ?

2019-10-20 Thread kcvinu
Thanks for the code. And yes, i will try to follow the Nim style.

Re: How to create new operator ?

2019-10-20 Thread Araq
template to(a, b): untyped = a..b for i in 0.to(5): echo i Run You're better off using `..` though because every Nim programmer knows it and eventually it will be familiar to you too.

Re: Import best practices

2019-10-20 Thread ducdetronquito
Thanks a lot, your article is really nicely written and straight to the point ! :)

Re: Manu v1.1 - Matrix Numeric package released!

2019-10-20 Thread b3liever
Master contains a new cool feature you might appreciate. Broadcasting support! It was implemented with the help of two distinct types `RowVector` and `ColVector`. Any compatible matrix can be casted to these i.e: `ColVector(ones(5, 1))` and when doing arithmetic with Matrices, will be

Re: How to create new operator ?

2019-10-20 Thread kcvinu
Thanks. Will check it. Any guidance for me in order to achieve this ?

Re: How to create new operator ?

2019-10-20 Thread kcvinu
Its not 0To5. Its 0 To 5. A space is there.

Re: How to create new operator ?

2019-10-20 Thread sky_khan
I dont know how 0...5 works but 0To5 is not valid syntax. 0.To(5) or 0.To 5 works though.

Re: How to create new operator ?

2019-10-20 Thread Araq
`To` is an ordinary identifier and ordinary identifiers are never operators, operators are covered here: [https://nim-lang.org/docs/manual.html#lexical-analysis-operators](https://nim-lang.org/docs/manual.html#lexical-analysis-operators)

How to create new operator ?

2019-10-20 Thread kcvinu
Hi all, I would like to know how can i change the iterating operator in this code. This code snippet is from "Nim by Example" # Give it a different name to avoid conflict iterator `...`*[T](a: T, b: T): T = var res: T = T(a) while res <= b: yield res

Re: similar language

2019-10-20 Thread torarinvik
Visual Basic, those were the times! I remember as a teen I made multiple malicious "applications" that were extremely easy to tweak to add to startup in windows and go completely undetected by the major antivirus programs. Once program shut the computer down after like 10 seconds with an

Re: similar language

2019-10-20 Thread torarinvik
I wanted to learn Seed7, but guess what... There is no "domain website" like nim-lang. Almost no intuitive documentation, no youtube videos, tutorials, books, "marketing", non-existent community, probably no businesses that use it. Considering it is so much work creating a

Re: Telegram group

2019-10-20 Thread dom96
Done. Sorry it took so long :)

Re: Import best practices

2019-10-20 Thread miran
https://narimiran.github.io/2019/07/01/nim-import.html

Re: Nim source files (program.nim) shown as MATLAB or x-python

2019-10-20 Thread Black_Fox
For programming language sourcefiles yes, extensions help and are commonly used. To enforce extensions in 100% of all computing cases - absolutely not. The advanced heuristics is used for additional cases such as `/usr/bin/some_tool` \- for running the stuff, I don't need to know if it's a

Re: I dunno what's so hard to understand about it.

2019-10-20 Thread Black_Fox
> It's Araq's toy, he can do whatever he wants. > > And yeah, sometimes I have the veto right but it's quite rare that I use it. Alright, then I understand. I actually don't know how this goes in other programming languages as I don't follow them too closely, so it may be the norm. This

Import best practices

2019-10-20 Thread ducdetronquito
Hi everyone, Being new to Nim and coming from Python, I often find myself struggling with imports. For example, I play with the asynchttpserver module of the standard library, and I don't know how to properly import it. **Solution 1** : Everything is imported, but is it OK to import/pollute

Re: Nim source files (program.nim) shown as MATLAB or x-python

2019-10-20 Thread Araq
> The initial naïve way to detect Nim source files would be to set `*.nim` and > `*.nims` as such. That's the only correct way. The "additonal magic" is wrong, you cannot detect programming languages with heuristics. It's 2019, time to admit that file extensions are a good idea.

Re: Nim source files (program.nim) shown as MATLAB or x-python

2019-10-20 Thread Black_Fox
XFCE is a downstream still; the likely proper place is where file and/or libmagic are made. The upstream is _mirrored_ to GitHub [https://github.com/file/file](https://github.com/file/file), but project's readme in there lists