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
Nimoids :)
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 :) ).
read the tutorial
Pattern matching and BigInt on stdlib tho. ;P
> Why doesn't the compiler do that automatically?
Because days only have 24 hours.
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.
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)
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
> 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
> 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
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.
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
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
[https://github.com/nim-lang/Nim/issues](https://github.com/nim-lang/Nim/issues)
?, check that it does not exist already, be descriptive, etc.
It says it works per-scope, so using `block:` or `block someName:` has overhead
like for a loop?.
> 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.
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)
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
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?
Thats very nice, I could get help with that:
[https://forum.nim-lang.org/t/6546](https://forum.nim-lang.org/t/6546)
Is there any way to store reports on error messages that can be improved?
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
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
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
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]
26 matches
Mail list logo