Re: Results of our community survey
It seems that after the survey , you guys are going to focus on: Standard Library IDE Documentation Language Stability In this order? I would suggest to not developing full IDE (Aproia ) but focusing on Sublime and Atom addons.
Re: Methods at the compile time: Does it work as intended?
According to the [manual](http://forum.nim-lang.org///nim-lang.org/docs/manual.html#multi-methods), you cannot evaluate methods at compile time. "other optimizations like compile time evaluation or dead code elimination do not work with methods."
Methods at the compile time: Does it work as intended?
Hello! I've encountered a method related problem at the compile time. Take a look at the code: type AnimalObj* = object of RootObj Animal* = ref AnimalObj Cat* = ref object of AnimalObj Dog* = ref object of AnimalObj method kind(o: Animal): string {.base.} = "Animal" method kind(o: Cat): string = "Cat" method kind(o: Dog): string = "Dog" proc newCat*(): Cat = new(result) proc newDog*(): Dog = new(result) static: let animals: seq[Animal] = @[newCat(), newDog()] echo "Compile time:" for animal in animals: echo animal.kind().repr echo "Run time:" let rtanimals: seq[Animal] = @[newCat(), newDog()] for animal in rtanimals: echo animal.kind().repr After running it I've got the following result: $ nim c --run mwe.nim ... Compile time: "" "" ... Run time: 0x7f36c62d4050"Cat" 0x7f36c62d4078"Dog" So, looks like methods are not working at the compile time. Is it a bug?
Re: What are
Thank you. That seems interesting. It seems this could be used to simply memory management when not using a GC... Hopefully the syntax will be nice and will make it easy to add variables to regions and not require manually destroying the region when you area done unless you want to (i.e. make it possible to associate a memory region to a scope, for example).
Recreating threads?
I have code in the following general form: while ...: createThread(...) ... joinThreads(...) It works the first iteration, but the threads don't seem to start on the 2nd iteration. Is there any reason/workaround for this? One obvious workaround would be to make the threads global, so they only have to be started once. However, the general structure of the program is something like A B C A B C ... where threads will be doing something different in A, B and C -- so having to have all threads global requires a good bit more complexity.
Re: Nim Documentation - a GitBook version
**@honhon**: Actually, GitBook the tool is open source, but GitBook the commercial hosted company is not. We would be self hosting the actual generated documentation rather than using their hosted service :) And yes, Django has some of the nicest documentation I've seen. I'd love to see libraries and the standard library documented in such a way, and it's definitely improving recently which is excellent! This project is more aimed at [the tutorials](http://forum.nim-lang.org///nim-lang.org/docs/tut1.html) than the library documentation, similar to [Django's tutorial](https://docs.djangoproject.com/en/1.10/intro/tutorial01/). **@jlp765** I would look at it, but I've never actually written much C and doubt I could offer much advice/help on that front I'm afraid!
Re: Nim Documentation - a GitBook version
I added some more comparisons to the `Nim for C programmers` if someone can sanity check it (Comments, var parameters to procs, simple casting). I looked at the `Nim for Python programmers` and wondered whether the tuple syntax example were correct (I thought it should be round brackets not square, except when defining a tuple[] type).
Re: What are
Maybe this will help: [Region-Based Memory Management](https://en.wikipedia.org/wiki/Region-based_memory_management) Afaik it means that you do not count individual allocations but just alloc everything from a block of memory. After leaving the local area you throw away everything. Stuff you want to keep is copied before the destruction.
Re: Tabulation symbols not allowed
> With proportional fonts unfortunately 2 spaces generate a tiny indent step. > So I have to use 3 or 4 spaces, or finally a tab! I think I will do the later > with the replace command mentioned above. The only disadvantage is that > github puts 8 spaces for each tab, so I have to convert files before > uploading to github. I use fixed width fonts only for convenience of reading (and then, because they were installed by default) (I use default fonts because this is not important for me). You can use any, which you want. But forbidding tabs I don't like. It's bad idea, as I think. It's not difficult to allow them in the source code of Nim's compiler. Compilerlanguage is instrument for every humangroup of people, so, as I think, everybody can choose one, which is most convenient for himthem.
What are "memory regions"
In another thread (related to working without a GC) there was some mention of "memory regions". Could somebody kindly give an overview of what they are and how they would be used? Is this something that is being worked on for pre-1.0?
Re: Nim Documentation - a GitBook version
@euant Its great you want to contribute with documentation. Gitbook seems to be a locked in service. Django Framework is an example of fantastic documentation for an opensource project and it uses RestructuredText and Sphinx which are both opensource and self hosted. The documentation presentation for Django is great but the real value is in the comprehensive nature of the documentation and the completeness. Documentation seems to be improving lately for Nim which is fantastic. For me presentation could be improved but there is still documentation that is terse and incomplete. I would like to learn more Nim and if I had time I could put in more effort to look through the codebase to discover how things work, but I simply don't have time. Easy to use, and complete documentation makes a project more attractive and also more credible.
Re: Nim Documentation - a GitBook version
**@Kerp** Yep, you're correct, there are a couple of "Nim for X programmers" on GitHub in the Nim Wiki - they should probably be better surfaced: * [Nim for C programmers](https://github.com/nim-lang/Nim/wiki/Nim-for-C-programmers) * [Nim for Python programmers](https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers) My plan is to include some kind of glossary of terms with some simple explanations and links to relevant areas of discussion. I also plan to ship some examples of usage with the documentation I'm writing too. **@jlp765** Yes, I think a roundup/review of what needs improving in the documentation every so often could be immensely useful. I can't contribute too much to the core or standard library or such due to time constraints, but editing a paragraph or two o documentation a night is something I can easily do (and I suspect others are in a similar position). Knowing what to focus on would definitely help and is one of the ideas behind this topic.
plastic pipe market
The market is not standard, and some low-quality product quality, affect the healthy development of the industry - because the plastic pipe market is not standard, and some buyers [url=[http://vinylcompositeplank.com/teak-deck/6.html]composite](http://forum.nim-lang.org///vinylcompositeplank.com/teak-deck/6.html\]composite) wood 2x6 for roof[/url] who use the product is not the end, do not pay attention to the brand and quality, are formed on the market is not the same quality together with the presence of the product, and even some low post when the geology is very good product to sell, and PVC-U pipe is quite serious. The cost of PVC-U pipes, the material quoted accounted for about 70% of the company through a single wall thickness is reduced, a lot of calcium carbonate and other methods to increase product [url=[http://vinylcompositeplank.com/teak-deck/]ECO](http://forum.nim-lang.org///vinylcompositeplank.com/teak-deck/\]ECO) Friendly Teak Deck[/url] costs decline, the formation of low-quality product quality. There's not the same as two or more companies to use the trademark quality, the use of low-level processing equipment, drinking water pipes lead salt stabilizer selected production methods to reduce costs, harm the interests of consumers and industry spoils the promise. Quality of construction projects should further improve --PVC-U pipeline project depends largely on the level of construction quality, good products and appropriate to ensure outstanding running ability construction pipeline systems engineering. Some engineering skills [url=[http://vinylcompositeplank.com/]Vinyl](http://forum.nim-lang.org///vinylcompositeplank.com/\]Vinyl) Composite Plank,Vinyl Composite Material Manufacturer[/url] of personnel lack professional training, follow metal tube method in practice for design and construction, there is a situation of non-standard construction, construction and other rough, not fully function both PVC-U pipes, as well as the formation of the pipeline damage. Some users still do not know the current plastic pipe according to how the procedure for the construction, supervision and other knowledge.
Re: Concept[T] design question
@zahary It becomes more and more obvious that I won't have time to work on Nim nowadays. It is my regular job which put more load on me. Coming back to `Concept[T]`, I can see 3 possible ways to continue. **1.**: allow inference only if its unique. So `c.push(T)` only works if there is one `push` function, or we already know what `T` type is (e.g., we know that it is `string`). **2.**: allow inference to metatypes. So `c.push(T)` can lead to `T` being `string|int`. I recommend an extra check at the end. That is if you have a match (e.g., `T` is `int` and `S` is `int`), then reevaluate the concept's body again just to be sure. (Just for the record, the reason for this extra check is an example above somewhere in this thread.) **3.**: allow some extremely smart logic which infers everything which is possible. This needs to involve some backtrack logic. I would vote to `1.`, but that doesn't work with your `Stack[T]` case. I'm strongly against with `3.`, because it can lead to extreme compilation time. `2.` looks nice. Peter
Re: Nim Documentation - a GitBook version
Being a someone who is kinda new to the terminology of computer science i find that in nim the documentation may be perfect for seasoned people who have a clue, but i did not at first. Till i started searching individual topics like, hygenic macros and such. So my suggestion to add to this is that while maybe, documentation that approaches the novice or noob have an appendix of the explanations of the terminology that is used in the documentation on this website. I wish i would have had it, and maybe i still need it? i dunno, i like all the ideas here and would like to help but i am not self confident enough to volunteer yet. i like jlp765's idea of a periodic "lets figure this out together moment". maybe based on problems people from other languages who do not know nim so well like me, need to know. For instance maybe pointer arithmetic... its different in c than in nim to do it. i think without someone like Araq showing how to do it would be a challenge to say the least, for me at least i know! But in the same though maybe a category like "coming from c to nim" or "from python to nim" would be good. i think some stuff is like that on github already.
Re: Nim Documentation - a GitBook version
(Maybe the following should be a different thread?) To improve the documentation * Anyone can raise a PR, but my perception is that very few do so (given a lot of people think the doco is inadequate or can be improved?) * How do you enable getting many people to effectively contribute to improving the doco? (maybe a weekly topic on the forum to review a module/topic/?? ) * Sure we can improve the doco, but who will drive it, and what will it be?