A localization/internationalization library (same purpose as gettext, but with some improvements)

2020-07-17 Thread iffy1
I've just finished an initial version of a i18n/l10n library for Nim called `intl`. Take a look and tell me what you think: [https://github.com/iffy/nim-intl](https://github.com/iffy/nim-intl) Some of the main reasons for me writing it: * You can defer to procs to do things like pluralization

What are Nim programmers called?

2020-07-17 Thread r3c
Nimoids :)

Beginner - Is there a Nim's similar to a Python dictionary?

2020-07-17 Thread Vindaar
In general bad error messages can also be reported as an issue on the repository. With such things there is of course always the possibility an issue will be closed as "isn't actually a bad message" (hopefully with an explanation given of course :) ).

Link to documentation in homepage examples

2020-07-17 Thread SolitudeSF
read the tutorial

Python transpiler

2020-07-17 Thread juancarlospaco
Pattern matching and BigInt on stdlib tho. ;P

Packed tuple?

2020-07-17 Thread Araq
> Why doesn't the compiler do that automatically? Because days only have 24 hours.

Python transpiler

2020-07-17 Thread Araq
Well there is only so many well-designed things you can take from Python and make it fit a systems programming language with a static type system. Like the indentation based syntax. And ... nothing else, it turned out.

Update on --gc:arc

2020-07-17 Thread Araq
Well, you don't share at all, you move data around. If you need real sharing, you should use the upcoming fusion support libraries, see [https://github.com/nim-lang/fusion/pull/8](https://github.com/nim-lang/fusion/pull/8)

Python transpiler

2020-07-17 Thread snej
I don't see Nim and Python as being very similar, except at a syntactic level. Sure, they both use indentation for scope and have some common keywords like `elif` and `import`. But that's like saying that French and Turkish are similar because they both use the letter "รง". IMO, Python is a lot

Packed tuple?

2020-07-17 Thread snej
> Generally it is a good idea to order fields in tuples and objects by size Why doesn't the compiler do that automatically? Obviously you still need to take control of field ordering for compatibility with C structs, but that should be the exception not the rule. (In Rust, if you want explicit

Update on --gc:arc

2020-07-17 Thread snej
> If you share a ref based tree data structure between threads, can you safely > read from it without locking? My understanding is that, since ARC does _not_ use atomic inc/dec, even reading without locks would be dangerous since the refcounts could become corrupted. Even read-only access can g

Update on --gc:arc

2020-07-17 Thread Araq
The final (I hope) ARC/ORC related RFC has arrived: [https://github.com/nim-lang/RFCs/issues/244](https://github.com/nim-lang/RFCs/issues/244) Finally addressing multi-threading aspects.

Python transpiler

2020-07-17 Thread juancarlospaco
I agree, Haxe is not Nim, I tried too. I agree Python is big, imagine the worse case: It goes terribly wrong, you only get 1% of people from Python, still like a +500% grow for Nim. It goes super good, party at Araqs luxury yacht (???). :P

Link to documentation in homepage examples

2020-07-17 Thread juancarlospaco
It may not look like too obvious when you totally new to the language, but everything that does not require an `import` of something, comes from here [https://nim-lang.github.io/Nim/system.html](https://nim-lang.github.io/Nim/system.html) basically, if it does uses an `import` then is a module f

Beginner - Is there a Nim's similar to a Python dictionary?

2020-07-17 Thread juancarlospaco
[https://github.com/nim-lang/Nim/issues](https://github.com/nim-lang/Nim/issues) ?, check that it does not exist already, be descriptive, etc.

Update on --gc:arc

2020-07-17 Thread juancarlospaco
It says it works per-scope, so using `block:` or `block someName:` has overhead like for a loop?.

Python transpiler

2020-07-17 Thread Araq
> I can see Nim appearing to some people as some form of Python 4 and so far as > I am informed, is their issue with the GIL still not solved. Ok, but then you want to be able to import Python code into Nim, not produce Python code from Nim.

Link to documentation in homepage examples

2020-07-17 Thread Araq
In the tutorials and in the manual? I mean, I can see the advantages of your proposal but it's not like it's **so hard** to navigate to [https://nim-lang.org/learn.html](https://nim-lang.org/learn.html)

No problem getting a second or fake passport and/or drivers license!

2020-07-17 Thread buyalldocument
During international traveling, some people including professionals, businessmen and families may face trouble in getting an original passport. In this situation the organisation who issues a second for your safety and ease in traveling overseas appears. Also, another factor is you can buy passp

Link to documentation in homepage examples

2020-07-17 Thread ShalokShalom
As an example, where do I find the meaning of = object and why is Person in captial Letter in the let statement and small in the following for .. in?

Python transpiler

2020-07-17 Thread ShalokShalom
Thats very nice, I could get help with that: [https://forum.nim-lang.org/t/6546](https://forum.nim-lang.org/t/6546)

Beginner - Is there a Nim's similar to a Python dictionary?

2020-07-17 Thread ShalokShalom
Is there any way to store reports on error messages that can be improved?

Packed tuple?

2020-07-17 Thread HashBackupJim
Thanks, this worked! OrderedKeyValuePair[A, B] {.packed.} = object hcode: Hash key: A val: B prev, next: HashIdx ms:nx jim$ ./tupsize hcode 8 prev 1 next 1 key 8 val 8 total 26 Run

Update on --gc:arc

2020-07-17 Thread Araq
1-2) I plan to make --gc:orc the default once bootstrapping works. 1. Good idea and simple to implement. 2. Well you cannot share them, you can move them around. :-) 3. Still safe and there is no logic for the terminating zero, beware. (The old runtime also has no logic for it!) 4. Depend

Packed tuple?

2020-07-17 Thread Stefan_Salewski
Field alignment is common in C, to allow fastest access. For example a int32 is often stored at a memory address which is a multiply of 4. Generally it is a good idea to order fields in tuples and objects by size, put the large fields at the top, the small 1 byte entities at the end. So all fie

Packed tuple?

2020-07-17 Thread HashBackupJim
I'm trying to save space in a tuple, so changed the integer size for a couple of fields. type Hash = int HashIdx = int8 OrderedKeyValuePair[A, B] = tuple[ hcode: Hash, prev, next: HashIdx, key: A, val: B] var x: OrderedKeyValuePair[int, int]