**_FIVEMINT_** offers you the new best website builder. You can choose hundreds
of themes, lots of images, easy editing with a drag & drop interface and that’s
not all, you can also publish your website in minutes.
All you have to do is just click
**FIVEMINT HOSTING: WEB HOSTING**
**_FIVEMINT_** has a shared hosting that ensures the maximum performance of
your website, allow you to manage your emails, mailing lists and more without
any hassles, and a cPanel for management for your intuitive and powerful
control panel that is available
Coding in Nim gets easier every day but sometime I still stumble on the basics
:) Thank you for your help!
It certainly does give me more freedom to make the code look and read the way I
want it to in my nim source files, does it not? If person x wants snake case in
his library, but I only use camel case in my coding convention, I can just
write his identifiers as if they were camel case, correct?
No, style insensitivity does _not_ allow your to do what you want. The reason
being that the language behind the scenes changes identifiers. The correct and
honest way to say it is that Nim gives you less freedom (in that regard).
Look: e.g. in C (and many other languages) you can have two
I think it is according to the Facebook page.
image:: [https://i.imgur.com/vQpRAcS.png](https://i.imgur.com/vQpRAcS.png)
sorry, I mean what if we use python in nim for python's packages, for example
matplotlib for plotting, sympy for symbolic calculation. It is hard for human
to find and ship all dependence, so that is why pyInstaller/py2exe exists to
bundle a python app for releasing.
As someone who has been Nim programming for just over a week now, I really
don't mind this feature at all. I would consider myself to be a more open
minded programmer though, I actually rather enjoy typing lots of and
in LISP...
As a novice (to the language) my first impressions
In the comments to the original gist, I do use fastmath (although I acknowledge
the potential problem), and I also spent some time optimising...
`newTable` doesn't change anything, `var temp = t[1]` creates a copy because
`Duration` is an object.
Translation: use newTable instead of initTable to have a Table with reference
semantics.
Because the value is copied into `temp`. Nim is not Python, Nim doesn't have
reference semantics everywhere.
I have two pieces of code that I expect to produce the same result but they
don't.
import tables, times
var t = initTable[int, seq[Duration]]()
t.add(1, @[])
t[1].add(Duration())
echo t
Run
Result: `{1: @[0 nanoseconds]}`
import
Hello,
I am able to statically link sqlite in my Nim application on Debian Linux (see
nimble command below),:
nimble build --verbose --threads:on \
--define:release --d:useRealtimeGC --opt:speed --passL:-static \
Just changing from `{.nimcall.}` to `{.closure.}` makes it two times slower.
Here's my code:
import sugar
type
Enumerator*[A] = concept i, var x
x.tryAdvance(var A) is bool
iterator items*[A](iter: Enumerator[A]): A {.inline.} =
var it
That's the wrong solution though as you already return the new node. Instead
use this fragment:
# rotate red chain
if isRed(node.right) and not isRed(node.left):
result = rotateLeft(node)
# Error: 'node' cannot be
You would have to ship the `python.dll` and Python's stdlib with your program,
`gdb` on Windows does this, for example. It's a world of pain and it's much
easier to write everything in Nim. ;-)
There is no good solution currently but note that `.closure` has little
overhead if there is nothing captured.
for kinds of solution, I have one question: how to compile the nim app who uses
python inside, so that this app can be released to users without python on his
computer
it works by change signature, thanks for your help
change signature to change param to mutable, it works now. Thanks for your help!
Dear All,
I'm trying to get my head around modifying the parallel_counts example in Ch 6
of Nim in Action
But you could also use fastmath on Julia, it would also be faster. Anyway you
shouldn't use that option on any language because can produce unexpected
results. Your Julia program can also be optimized.
I did it this way, but correct me if I'm wrong but filter cannot accept a
closure implemented like this. What I wanted to do is to support closures but
to store nimcall efficitienly (not as closures).
I thought that I could receive the proc type as a generic parameter (this way
the proc could
You probably want to hve a look a Timothee Cour's attempt at reproducing D
ranges here:
[https://github.com/nim-lang/Nim/issues/9422](https://github.com/nim-lang/Nim/issues/9422)
Otherwise here is a skeleton:
type
FilterProc[I] = proc(x:I): bool {.nimcall.}
25 matches
Mail list logo