I was just testing if installing gintro works when generator script is compiled 
with --gc:arc already. (Of course that will be needed only when ARC will become 
default for Nim.)

First trivial issue is with glib.nim from oldgtk3 generated by old c2nim years 
ago,
    
    
    const
      # G_VARIANT_TYPE_BOOLEAN* = (cast[GVariantType]("b"))
      G_VARIANT_TYPE_BOOLEAN* = (cast[GVariantType]("b".cstring))
    
    
    Run

issue is that string is not compatible with pointer type, but .cstring fix 
should work.

But unfortunately combinatorics.nim kindly provided by Mr Behrends years ago 
does not work with ARC:
    
    
    /home/stefan/gintrotest/tests/combinatorics.nim(76) main
    Error: unhandled exception: index out of bounds, the container is empty 
[IndexError]
    
    
    Run

Mr Behrends seems not to use Nim any more, see 
[https://github.com/rbehrends](https://github.com/rbehrends)

so his file exists currently at

[https://github.com/StefanSalewski/gintro/blob/master/tests/combinatorics.nim](https://github.com/StefanSalewski/gintro/blob/master/tests/combinatorics.nim)

Question: Do we have a substitute? I guess it may exists similar named modules, 
I did a search for substitutes some years ago already, but did not found a 
module with exactly the needed iterator combinations(). There is 
[https://github.com/barnybug/nim-combinatorics](https://github.com/barnybug/nim-combinatorics)
 in nimble directory, but it is 4 years old and has no tests. And in Nim std 
lib I have not found a combinations() iterator. And writing that from scratch 
is not trivial, I tried years ago when I started with Nimrod.

Reply via email to