> "gtkmm" which is a C++ wrapper and I'm quite sure it uses C++ destructors.
That is a fine hint. I don't know much about gtkmm, so I am not sure if they
really use C++ destructors or just plain gtk internal ref counting as C does.
Will ask Mr E.Bassi at gtk forum.
Found comment of mratsim:
[h
> Will this become default and if so when?
I hope it reaches production quality in a couple of months and we can make it
the default.
I haven't used it myself but I had
[https://github.com/status-im/nim-json-serialization](https://github.com/status-im/nim-json-serialization)
in mind.
you need to add dynlib prama too, and compile with \--app:lib option. more
details
[here](https://nim-lang.org/docs/manual.html#foreign-function-interface-dynlib-pragma-for-export)
Will this become default and if so when?
> Ever since we added macros.getType we had more efficient ways to produce
> serialization code, it's not a big loss (IMHO, I never use it), there are
> also third party modules that do what marshal.nim does, but better.
I am using marshal myself, which
> The main problem is, that we can pass objects to gtk lib, and can GET BACK
> the same object later. For example a widget in a grid container -- we create
> a widget, put it into grid container, forget it, and get it back later, maybe
> put it into another container then. That seems to be reall
Just tested
[https://github.com/StefanSalewski/cdt](https://github.com/StefanSalewski/cdt)
That one is indeed not really tested yet, so I did not make a nimble package
out of it to not pollute the nimble database. And it is again a bit complex.
# with import fix: import dt, vectors
> Second, what does arc in Nim mean for us mortals? Will compiling or running
> programs become faster?
Easier to debug, better latency, less memory consumption, better multi-core
support.
> Will we have to use a different mechanism to get type information now that
> typeinfo is unavailable wi
> That test is also part of our test suite and is so complex that it doesn't
> run on 32 bits, nor in C++
I was not aware that it is in test suite. But I was aware that it does not
compile with C++, and that nimsuggest has big problems with it. Will try to
investigate which problems with 32 bit
> The RTree test.nim from
> [https://github.com/StefanSalewski/RTree/tree/master/tests](https://github.com/StefanSalewski/RTree/tree/master/tests)
> compiles but running the executable gives an assertion error. Funny.
That test is also part of our test suite and is so complex that it doesn't run
Thanks a lot, it compiles with Channel.
Did just a first test.
The RTree test.nim from
[https://github.com/StefanSalewski/RTree/tree/master/tests](https://github.com/StefanSalewski/RTree/tree/master/tests)
compiles but running the executable gives an assertion error. Funny.
Unfortunately gintro apps seems not to compile, seems that f
You may look for available symbols at
[https://nim-lang.org/docs/lib.html](https://nim-lang.org/docs/lib.html)
I think most P and T prefixes have vanished, was a legacy from Pascal notation.
Channel is available, TChannel not, so I assume TChannel is replaced with plain
Channel.
Hello,
I'm trying to build an old project, created with 0.11.2 version, using Nim
1.0.2. I'm blocked with the following error:
Error: undeclared identifier: 'TChannel'
I'm using the following options to build the project:
\--threads:on --opt:none --debuginfo --gc:markAndSweep|
---|---
First, congrats! Seems like an important milestone, even if there's much to be
done ahead.
Second, what does arc in Nim mean for us mortals? Will compiling or running
programs become faster? Will we have to use a different mechanism to get type
information now that typeinfo is unavailable with
BSON uses Extended Json (v2); and BSON does have a UTC Time/Date function.
Granted, it converts to Time rather than DateTime. BSON also has marshalling
support to/from objects.
If interested in that:
[https://nimble.directory/pkg/bson](https://nimble.directory/pkg/bson)
Example of use with obj
(disclaimer: I'm the author of BSON)
In the end, I think, it makes no sense to write an 1:1 port of petgraph, I will
do a library that is usable at least by a noob (me). I think its best not to
export `EdgeIndex` and keep edges private, if the weight must be updated,
updateEdge is available, findEdge though will be private. Removin
Now I get it thanks, I've seen a couple of ways to model an adjacency list, but
I think this must be the most efficient. Actually it models a doubly linked
list with indices, there is no need for a seq, it has no limitations. You can
see how the example at the end represented in memory, take a l
It's explained here
[https://github.com/nim-lang/RFCs/issues/177](https://github.com/nim-lang/RFCs/issues/177),
a bit.
Nice idea, thanks! I also tried converters (like the original library does) but
it failed to compile. will submit a bug report
> What do you mean?
If I understand correctly, you defined the Node with information of incoming /
outgoing Edge
type
Node*[N] = object ## The graph's node type.
weight*: N ## Associated node data.
next: array[2, EdgeIndex] ## Next edge in outgoing and inco
Why not overload procs like fromEdges to accept pairs of integers?
> The array of two nodes index for incoming/outgoing will be unused the more
> you add APIs to your graph.
What do you mean by this?
> Correct, it's very close to how C++ works.
This is awesome then! Can’t wait to try it :-)
Can you explain what the .cursor pragma does and how it must be used?
Thanks for the reply.
I would just create 26 different types and make conversions between them? There
is no need to stuff everything into a single type...
I do this with Chroma:
[https://github.com/treeform/chroma](https://github.com/treeform/chroma)
You can use the compiles special function to do a ton of this work:
[https://play.nim-lang.org/#ix=25sG](https://play.nim-lang.org/#ix=25sG)
proc echo2(s: string): string = ""
template returnsVoid(f: untyped): bool =
compiles:
let v = f
echo returnsVoi
This approach doesn't compile:
echo echo(":)") is void
Run
What does the global pragma do the way it is used
[here](https://github.com/Araq/ormin/blob/master/examples/forum/forum.nim)?
import "../ormin/ormin", json
importModel(DbBackend.sqlite, "forum_model")
var db {.global.} = open("stuff", "", "", "")
...
IMO, It's not worthy to make it distinct, moreover, you should use generic
instead of int for nodes label.
Unrelated to the question, you should keep the Node definition is literally as
a node, and keep Edge definition is the connection from Node1 and Node2. The
array of two nodes index for inc
`WNDCLASSEX` must be a struct whose first field is numerical, and `={0}`
initializes it to 0. [You can read about this and more on this
page.](https://en.cppreference.com/w/c/language/struct_initialization)
Hi all, I would like to know what is the meaning of this C code.
WNDCLASSEX wcx={0};
Run
All i can understand is, this line declares an instance of WNDCLASSEX type
variable. But i can't understand the "{0}" part. What is it ?
Hi and merry Christmas,
I was trying to port [petagraph](https://github.com/petgraph/petgraph) rust
library to nim and although I made some
[progress](https://gist.github.com/b3liever/de2d4e2267b13832f7d52f10ba3140fe) I
am struggling with some fundamental decisions.
for example, when adding a
> Just to make sure I'm not confused - there are no changes to the source code
> needed, though "sink" and "lent" annotations do provide optimization?
Correct.
> And it's independent of the bacon/dingle "owned" system (and is b/d going to
> stay or is it deprecated and going away?)
It's indepe
Hi! iam traying compile this code as a lib.so to use it in C code
**lib.nim**
`proc fib(): cstring {.exportc.} = return "Hi From Nim"`
how can i do it ?
Just to make sure I'm not confused - there are no changes to the source code
needed, though "sink" and "lent" annotations do provide optimization? And it's
independent of the bacon/dingle "owned" system (and is it going to stay or is
it deprecated and going away?)
In what way does "async" need
> For example, if I create a local seq or string variable on a procedure A, and
> that variable is only used within that procedure A or at most is used by
> procedures called within that procedure A, will it’s memory be freed
> immediately when the procedure A is done (and before other code is e
I have a project that consists of a library (that will be split over several
files but will have a single file as its entry point) and an executable that
uses the library but which doesn't share its name. At the moment I have this
layout:
src/myexe.nim
src/mypkg/mypkg.nim
This looks awesome!
Can you give more info on what you mean when you say that this new GC will
provide a “deterministic memory management”?
For example, if I create a local seq or string variable on a procedure A, and
that variable is only used within that procedure A or at most is used by
pro
39 matches
Mail list logo