Re: Nim newbie request/challenge

2017-09-05 Thread jzakiya
The times I previously posted were from a VirtualBox VM, limited to 4GB of ram, and in a "noisy" environment. The times here are derived from my host OS (PCLinuxOS) with full access to the system's 16GB of ram, in a "quiet" environment, i.e. I closed everything and rebooted, then just opened a

Re: Nim newbie request/challenge

2017-09-04 Thread jzakiya
Hey thanks. I'll try to play around with the settings to get your code to compile when I get some time. On my System76 Gazelle laptop, with I7-6700HQ, 2.6-3.5GHz, 16GB ram, running in a VB VM for Manjaro KDE, using Nim 0.17.0 compiled with: **$ nim c --cc:clang --d:release ssozp5.nim** I get

Re: Nim newbie request/challenge

2017-09-04 Thread mratsim
You probably need to specify a path while importing. For example, running from ./bin "prime_bench.nim" file: from ../src/lib/lib_euler_primes import primeSieve from os import commandLineParams from strutils import parseUInt let arguments = commandLineParams()

Re: Nim newbie request/challenge

2017-09-04 Thread jzakiya
I tried the run your code but the compiler doesn't see the euler libraries. eulerprimes.nim(24, 6) Error: cannot open 'lib_euler_math' How do I get all the libraries to get it to run? I'd be interested in benchmark times. Can you post your hardware specs and the times for

Re: Nim newbie request/challenge

2017-09-04 Thread mratsim
Hey, welcome to Nim, If you like learning with mathematical challenges, I started Nim and many other languages with Project Euler, which gives you small mathematical challenges for your programming languages craving. [https://projecteuler.net](https://projecteuler.net)/ Here are my [solutions

Re: Nim newbie request/challenge

2017-09-03 Thread jacmoe
I agree - Nim is a community driven project, like many open source projects, and it gets better only if you scratch your own itch. Small improvements to the documentation is, like dom96 says, a perfect way to start contributing. [Edit] I agree that not everyone is command-line ninjas, and I

Re: Nim newbie request/challenge

2017-09-03 Thread dom96
> It's these type of little things that cause unnecessary frustrations and shy > people away from using new things. > > Please think about the things that could potentially go wrong, then create > instructions and documentation that will prevent them. We do try, but we don't have the time to

Re: Nim newbie request/challenge

2017-09-02 Thread LeuGim
A user may not know, what is terminal (seriously). And this won't work on Windows (quite widely used thing). Probably a couple of links to some articles (somewhere on web, at some OS-related forums), one for POSIX and one for Windows, would give more for less effort.

Re: Nim newbie request/challenge

2017-09-02 Thread Tiberium
But you shouldn't write export PATH... in terminal you should write it in your .bashrc or .zshrc or .rc

Re: Nim newbie request/challenge

2017-09-02 Thread scriptkiddy
@jacmoe I disagree. I think that @jzakiya has a point. What if a beginner is trying to pick up Nim? They may not know how to configure their `$PATH`. Something as simple as changing the wording to: You will need to configure your `$PATH` environment variable. On most systems this

Re: Nim newbie request/challenge

2017-09-02 Thread jacmoe
I think that _configuring the PATH environment variable_ is more than enough, to be honest. It is something that most (perhaps even all?) developers needs to learn how to do, regardless of the operating system.

Re: Nim newbie request/challenge

2017-09-01 Thread jzakiya
As I stated, Nim was not installed via these distros, and was being installed per the process given on Nim's website. Putting in the suggested PATH did solve the problem though, so thanks. $ export PATH=~/nim-0.17.0/bin:$PATH However, this just highlights the inadequacies of

Re: Nim newbie request/challenge

2017-09-01 Thread mashingan
CMIIW, Nim folder is self contained. @jzakiya, very likely you already have Nim installed from package manager, and its installation done like usual any package. If you put the path in front of `$PATH`, it'll solve your problem. $ export PATH=~/nim-0.17.0/bin:$PATH In your

Re: Nim newbie request/challenge

2017-09-01 Thread jacmoe
For what it's worth, I have built Nim several times without incident on my Debian box - following the instructions to the letter - so I guess the problem you have is specific to your machine.

Re: Nim newbie request/challenge

2017-09-01 Thread cdunn2001
$ export PATH=$PATH:~/nim-0.17.0/bin The problem might be the expansion of `~` in the default shell on some O/S. Try $ export PATH=$PATH:$HOME/nim-0.17.0/bin You could create an "Issue" in Nim's GitHub repo so this specific problem can be discussed there, separate

Re: Nim newbie request/challenge

2017-09-01 Thread euant
I've been considering creating a Snap package and/or AppImage for Nim for a while. Maybe I'll have a proper look at it after my holiday.

Re: Nim newbie request/challenge

2017-09-01 Thread Tiberium
Maybe you can't access Nim directory from user account because it has wrong permissions? And also maybe you have another Nim installed?

Re: Nim newbie request/challenge

2017-08-31 Thread jzakiya
The problem with installing seems to have to do with executables not in correct bins. I can go through the install process off the website, and compile the executables in the **nim-0.17.0** directory, created by untarring the tarball. Notes about installation from source

Re: Nim newbie request/challenge

2017-08-31 Thread Araq
Can we get a bug report for (6)?

Re: Nim newbie request/challenge

2017-08-31 Thread jzakiya
I've been translating various versions of the SSoZ I did in C++ in 2014 to Nim. Here are a few of my observations as a newbie. 1) Nim is much less noisy to write code in, with much less syntactical requirements to worry about (curly braces for if|for statements, etc). 2) Once I figured it out,

Re: Nim newbie request/challenge

2017-08-23 Thread jzakiya
I cleaned up the code and added more commments. It should be much easier now to uderstand what/why the code is doing after reading my paper. Here is the gist location of the source code for this version.

Re: Nim newbie request/challenge

2017-08-21 Thread scriptkiddy
I don't have time right at this very moment, but I will take a look at this within the next few days and see if there are any changes I can make to get a faster runtime. Love all your comments by the way.

Re: Nim newbie request/challenge

2017-08-21 Thread jzakiya
Below is the Nim direct translation of the C++ code in my paper. I have verified it on Nim 0.17 on Linux. In comparison on this same machine the Nim code runs a bit faster for some (larger >= 10^9) test values (not comprehensibly benchmarked yet). I'll post it to a gist later to make it easier

Re: Nim newbie request/challenge

2017-08-09 Thread jzakiya
OK, thanks for the feedback on your problems downloading the paper. Can you tell me what platform you are using, and what country you're accessing from? I see from my Scribd stats that the paper is being downloaded so it appears to be working for others. I'll look at putting the paper up on

Re: Nim newbie request/challenge

2017-08-09 Thread stisa
Sounds interesting, I might try doing a direct port from cpp to nim when I get some free time. Btw, download is indeed behind a paywall (looks like scribd offers a month free but after that it's paid). Reading is free though. Copy pasting from the pdf is impossible, as latex or whatever

Re: Nim newbie request/challenge

2017-08-09 Thread jzakiya
The link I provided in my first post allows you to read/download it free from my Scribd site. Here it is again. [https://www.scribd.com/doc/228155369/The-Segmented-Sieve-of-Zakiya-SSoZ](https://www.scribd.com/doc/228155369/The-Segmented-Sieve-of-Zakiya-SSoZ) I've tested it many times, and there

Re: Nim newbie request/challenge

2017-08-08 Thread Krux02
Can you put the paper on a link that is not behind a paywall? I am normally pretty trained to port from different languages to different languages, but from the paper I can't do copy paste at all.

Re: Nim newbie request/challenge

2017-08-08 Thread jzakiya
Thanks. I'm in the process of learning enough Nim to take on this effort. However, I would do what you were thinking, and first try a comparable direct C++ to Nim translation, just to get something to work. But it's going to be some time (with my time/learning curve constraints) to create

Re: Nim newbie request/challenge

2017-08-08 Thread scriptkiddy
Honestly, this sounds like an interesting little project to bang out. However, I must admit that I am a humble Web Developer and, by extension, am not well versed in mathematics. The best I could do is translate your C code in the linked document into Nim and maybe make a few small changes.

Nim newbie request/challenge

2017-08-07 Thread jzakiya
Hi I have programmed in a few languages extensively in my life, though now I primarly use Ruby. I just found out about Nim literlly 3 weeks ago now (mid July 2017) after reading this article: **Nim for the discerning Rubyist**