Re: Nim for Statistics

2019-11-09 Thread mratsim
Nim is not ready, even Python is missing several key R statistics packages. I do try to implement what people find useful in Arraymancer, for example I implemented randomized SVD and [randomized PCA](https://github.com/mratsim/Arraymancer/pull/384) With the results here:

Re: Nim for Statistics

2019-11-09 Thread Vindaar
To add to the very good answers so far, I'd mention that there is an issue which tracks scientific libraries here: [https://github.com/nim-lang/needed-libraries/issues/77](https://github.com/nim-lang/needed-libraries/issues/77) And to answer your explicit question whether Nim is _suitable_ for

Re: A taxonomy of Nim packages

2019-11-09 Thread mratsim
It's a wiki, we can edit it. And it's better if people from the domain actually add the packages they find useful like: * data science / statistics: missing ggplotnim and nim-plotly * bio: missing nim-hts Though I strongly disagree with putting nimbus and blockchain in Finance. Anyway,

Re: Why does nim put the Export marker on the right side?

2019-11-09 Thread cantanima
> And why is the following not allowed? > > > dumpTree: > mytype MyType: > a*: int > > > Run I'm a bit perplexed that several people are saying this should be OK. Why should a type's field be visible outside a module if the type itself is not visible

Re: Nim for Statistics

2019-11-09 Thread hugogranstrom
Not really a solution to the problem but this could be an opportunity for you to learn the underlying workings of the statistical algorithms you use by creating a toy stats project in Nim. And you get an opportunity to learn Nim as well ;-) All assuming you have the time, interest and energy of

Re: A taxonomy of Nim packages

2019-11-09 Thread Stefan_Salewski
> i dont get the point of these categorized lists. I think such a list is not that bad for newcomers to get an overview what is available. But no nimble packages should be left out -- if you do not like gtk you can not simple ignore all gtk related GUIs, and if you hate RTrees, or do not know

Re: Cannot Install Nim

2019-11-09 Thread joe_04_04
Well, I'm not sure what fixed it, but I was able to finally install Nim. I updated a large amount of items on my computer and then was able to reinstall Zim. Here is the subset of items that I updated that might of fixed my problem: Brew Upgrade Brew upgrade llvm Brew upgrade cmake Updated

What is the difference between "writeFile" and "newFileStream" and "write"?

2019-11-09 Thread nnahito
I would like to download an image file from the server and save it on my PC by nim language. At first, I wrote the following code:. import httpclient let url = "https://nnahito.com/images/nna_chara1.png;# This is my server var client = newHttpClient() var

Re: A taxonomy of Nim packages

2019-11-09 Thread sky_khan
> I find it complementary from nimble.directory IMO, If nimble.directory was showing/grouping projects by using tags in packages.json, curated list would be much less needed.

Re: What is the difference between "writeFile" and "newFileStream" and "write"?

2019-11-09 Thread mashingan
AFAIK, `Stream` is usually when you're dealing with bytes; whether opening binary files, or reading/writing network bytes stream, or reading/writing bytes to file etc. Especially for writing bytes, just like in the example.

nim forum, and 1.0

2019-11-09 Thread cemendou
Hi Folks, I have been exploring Nim since last night (completely noob), and wanted to get a better feeling of code sharing between front and back, so I thought that hacking this very forum would be a great start ! Unfortunately it doesn't seems to compile with the 1.0 toolkit (either

Re: A taxonomy of Nim packages

2019-11-09 Thread juancarlospaco
If something does not compile, make a Bug on that project. IMHO.

Re: Retrieving field names of an enumeration or other types?

2019-11-09 Thread Vindaar
If I understand you correctly, here you go: import macros type Foo = enum foo = "Foo" bar = "Bar" more = "More" macro enumFields(n: typed): untyped = let impl = getType(n) expectKind impl[1], nnkEnumTy result =

Re: Nim for Statistics

2019-11-09 Thread Usor
Very interesting, very interesting. Thanks. @zio_tom78, I also thought about the lack of an REPL. Once Nim has it, this should certainly make it all better.

Re: Nim for Statistics

2019-11-09 Thread demotomohiro
I don't know much about Statistics, but this project might help you. Nim4Colab is a IPython extension to use Nim language on Google Colaboratory. Github repo: [https://github.com/demotomohiro/nim4colab](https://github.com/demotomohiro/nim4colab) Related Nim forum thread:

Re: Get contents of directory at given path

2019-11-09 Thread sky_khan
like this? [https://rosettacode.org/wiki/Walk_a_directory/Recursively#Nim](https://rosettacode.org/wiki/Walk_a_directory/Recursively#Nim)

Get contents of directory at given path

2019-11-09 Thread drkameleon
Is there a command for that? I've been looking for in the library but still haven't spotted anything.

Re: Get contents of directory at given path

2019-11-09 Thread drkameleon
Awesome! Thanks a lot!

Re: Retrieving field names of an enumeration or other types?

2019-11-09 Thread pmags
@Vindaar \-- your implementation of `enumFields` is exactly what I was looking for. Thank you very much and it's also a nice example of computing on the language itself with macros.

Re: Nim for Statistics

2019-11-09 Thread Vindaar
May I ask what the main features are you'd require the ecosystem to provide for you to consider Nim? I'm asking since everyone's use cases are different and in my opinion it's important to know what people actually want and need. For instance for

Re: Nim for Statistics

2019-11-09 Thread cblake
> we just Nim someone to write the package Assuming you meant "need" this is the best ever either slip of the tongue/keyboard and/or entry auto-correct. "Nim".."need"..all the same. ;-)

Re: Nim for Statistics

2019-11-09 Thread Usor
Thank you. I appreciate your replies. And maybe I should have been more explicit in my choice of words, even though I implied both Nim and its ecosystem: maybe I should've written "Are Nim and its ecosystem at the moment suitable for statistics?" @Lecale, what do you mean by "Somn usor"?

Re: Nim for Statistics

2019-11-09 Thread Usor
Yes. I'm glad and thankful that you ask, and the importance of it is true. I'm thinking quickly from the top of my head things like * probability functions (Poisson, Binomial, Multinomial, etc.); * a convenient function to nicely display a statistical summary of data (possibly with argument

Re: Nim for Statistics

2019-11-09 Thread Lecale
Somn usor means sleep well :) it is just a phrase I have in my head

Domain modeling in Nim

2019-11-09 Thread edu500ac
A couple of weeks ago, I suggested the use of Nim in parallel with other languages for teaching Software Engineering and Data Structures. I decided to write a book about macros in Nim to help the students. However, in response to requests from students, I asked their teachers to add

Re: Nim for Statistics

2019-11-09 Thread mikebelanger
Have you tried [https://github.com/bluenote10/NimData](https://github.com/bluenote10/NimData) ? Doesn't have everything but its got a lot - I've tried it - pretty good so far.

Re: Nim for Statistics

2019-11-09 Thread mratsim
> Probability There is alea, though not integrated with the rest: [https://github.com/unicredit/alea](https://github.com/unicredit/alea) I do need very efficient sampling as well for natural language modelling so I already have a prototype of a fast sampler without replacement for the

Re: Nim for Statistics

2019-11-09 Thread cblake
Mostly academic points to correct the record, but I feel like mratsim's linked "Fenwick Tree" uses up to 2x the cache memory of the trees of Fenwick 1993,1994,1995. So, maybe not quite even state of the art for the mid-1990s (depending on metrics/data sizes)? Also, maybe not really even

Re: What is the difference between "writeFile" and "newFileStream" and "write"?

2019-11-09 Thread nnahito
Thank you for an answer. Can't writeFile write binaries? When writeFile writes, how does it break the image file?

Re: What is the difference between "writeFile" and "newFileStream" and "write"?

2019-11-09 Thread Vindaar
The answer is simply: writeFile sure can write those and it shouldn't break it. I do essentially the same here, the only difference is where the image comes from:

Re: What is the difference between "writeFile" and "newFileStream" and "write"?

2019-11-09 Thread Araq
Note that the writing of binary files was broken for 1.0.0 on Windows and 1.0.2 contains the fix.