Re: Read lines from file thats in a variable

2019-07-31 Thread Neil_H
Because I have Regex already done that will only work on the whole file. And I am going to use the splitLines iterator, but the file will also be in memory at the same time, in this day an age of large amounts of ram, and since I will only be dealing with certain types of source files I don't

Re: What do you think about the programming language NIM?

2019-07-31 Thread lscrd
> Note that Nim iterators correspond to Python generators… I would like, but they are less powerful. Generators can be recursive in Python while iterators cannot. And in Python it’s easy to use a generator without a _for_ loop thanks to the _next_ function. But, despite these limitations,

Re: What do you think about the programming language NIM?

2019-07-31 Thread Neil_H
I like Nim for all the reasons given here... for me personally, comparing with other languages... Python, I started to learn Python and found it quite easy to pick up, however I decided that its growing way to big as a language, too many people are changing it too much, and for me on Windows

Re: What do you think about the programming language NIM?

2019-07-31 Thread lscrd
Thanks for your explanation.

Re: Read lines from file thats in a variable

2019-07-31 Thread Neil_H
Thanks, but as stated in my first comment... I don't want to go down the route of using streams etc.

Re: What do you think about the programming language NIM?

2019-07-31 Thread cblake
@mratsim's code may not trigger it, but at least in `/devel` there seems to be a check in `semexprs.semOverloadedCallAnalyseEffects` that errors out with `errRecursiveDependencyIteratorX` ("recursion is not supported in iterators: '$1'"). The error message was even updated just a couple months

Re: What do you think about the programming language NIM?

2019-07-31 Thread lscrd
This is Interesting. Thank you. So the documentation is wrong when it says: “Neither inline nor closure iterators can be recursive”. Here:

Re: How to Maintain a Nim Chinese Community

2019-07-31 Thread ch4o5
It is usually happened on bussiness environment not we programmers, I believe that programmers do things just by their interested and love wherever they from the world.

Re: Erroneous values returned from Nim’s C foreign function interface.

2019-07-31 Thread mashingan
I'm not sure but after I see in your wutilc char buffer[INET6_ADDRSTRLEN]; char *get_from(...) { \\ return buffer; } Run I guess it's the problem with global variable; you should change the c api too void

Re: What do you think about the programming language NIM?

2019-07-31 Thread sschwarzer
> Python, I started to learn Python and found it quite easy to pick up, however > I decided that its growing way to big as a language, too many people are > changing it too much, and for me on Windows it just became another scripting > language, no better than say Perl... and yes Python may be

Re: What do you think about the programming language NIM?

2019-07-31 Thread Neil_H
> Of course Python being taught in schools and universities helps its > popularity, but I don't think at all it's the only or even main reason for > the popularity. The other reason of course is around the time python was introduced the main languages being used were C, C++ and Java (not

Re: What do you think about the programming language NIM?

2019-07-31 Thread Kiloneie
I've found Nim just a couple of days ago and i am totally in love with it, i am reading on it on the way to work, at work and then i practice is at home, it's so nice to have a language that is beautiful, really easy to understand just by looking at the code whilst very powerful and performant.

Re: `import foo {.private.}` to allows access to private fields (eg: package-level visibility)

2019-07-31 Thread timothee
I've implemented this in [https://github.com/nim-lang/Nim/pull/11865](https://github.com/nim-lang/Nim/pull/11865)

Re: Erroneous values returned from Nim’s C foreign function interface.

2019-07-31 Thread teroz
You would think with a working C example would be a walk in the park. Still no joy. At the risk of breaking forum ettique I have a tiny who.nim that iterates over all logged in users and prints to console. The code also calls the c code that reads the IP address correctly as well as the nim

Re: Nim VS The World (CoffeeScript/Boo/PureBasic/C#/ES2018/Python)

2019-07-31 Thread Neil_H
I wrote bigger programs than those in MaxScript for 3D Studio Max :-) As for Pascal, well that was just an example, there are many others out there.Liberty Basic, Free Basic, Scala, Clojure, Steel Bank Common Lisp, SmallTalk, Erlang…….need I go on?

Re: Read lines from file thats in a variable

2019-07-31 Thread enthus1ast
Why you read it in completely in the first place when you want to operate on lines? When you mystring.split('n') you double the amounth of memory used. For small files this seems ok but for larger ones your programm could explode. It's much better to use the splitLines iterator as