Your phone must be root-ed to do that.
I'm wondering how this new proposal relates to the previous effort described at
[https://nim-lang.org/araq/destructors.html](https://nim-lang.org/araq/destructors.html)
My understanding is the "destructors" proposal helps to significantly reduce
ref usage, and the new proposal gets rid of the
Hey ho - we've been quietly building away over at Status, and are pretty happy
to announce a first public test network for what will become the next version
of Ethereum, one of the block chains out there:
I'm not sure if I'm fit to improve the docs because I'm not good enough with
nim's internal things and not good with english either. Maybe I'll try when I
become better with either of them ;)
You're welcome. Nim core devs are **_very_** willing to work with any and all
comers on pull requests to improve documentation. Ignorance by otherwise
reasonably patient and resourceful newcomers is **_not_** easy to simulate (in
any project, really). In some ways it's a resource that decays
I ran across this thread while searching for various functionality, and
wondering where to submit a PR if I add some.
[Changes in sequtils (forum post)](https://forum.nim-lang.org/t/1333)
I'm curious if anyone knows if these suggested changes and additions are still
under consideration, or if
Thank you!
I wish the docs had mentioned this -
[https://nim-lang.org/docs/backends.html](https://nim-lang.org/docs/backends.html)
Nim defines a
proc allocCStringArray*(a: openArray[string]): cstringArray
Run
in the `system` module (no need to explicitly `import` it). There is also a
corresponding:
proc deallocCStringArray*(a: cstringArray)
Run
You probably want to
Corrected:
proc kget*(elems: seq[string]): string =
var arr: CArray[cstring]
arr[0] = "start"
var i = 1
for elem in elems:
arr[i] = elem
i += 1
var size: cint = cast[cint](elems.len() + 1)
return $fn(size, addr arr)# tried it
When I load the array manually, it works(somewhat):
var arr: CArray[cstring]
arr[0] = "start"
arr[1] = "arg1"
arr[2] = "arg2"
arr[3] = "arg3"
arr[4] = "arg4"
echo $fn(5, unsafeAddr arr)
Run
the C library works _correctly_ and the logs show good
Hi
> How to create and pass an array of string to nim and pass it to C?
type CArray{.unchecked.}[T] = array[0..0, T]#found it on the forum
proc fn(argc: cint, args: ptr CArray[cstring]): cstring {.importc, dynlib:
"...".}
Run
I tried this but got *** stack
>From "nim-doc.deb" package, I converted:
HTML -> Asciidoctor -> Asciidoctor-pdf(in terminal) -> PDF
and I get a nice PDF book
Not work :-(
$ adb push test /storage/sdcard0/Download/test
$ adb shell chmod a+x /storage/sdcard0/Download/test
Bad mode
$ adb shell
10|shell@android:/ $ chmod 0755 /storage/sdcard0/Download/test
Unable to chmod /storage/sdcard0/Download/test: Operation not
I didn't know that this can be solved by forwarding from one macro to another,
will try that, looks really nice.
I will experiment a bit more regarding the field accessors when I'm back from
vacation. Overall this has a bit lower priority to me, because the use cases I
have barely require
Not familiar with android but you probably need `chmod a+x
/storage/sdcard0/Download/test`
I tried to compile a test program following the steps indicated in this
[post](https://forum.nim-lang.org/t/1866#11698), but it does not work.
$ nim c --cpu:arm64 --passC:-fPIE --passL:"-fPIE -pie" test.nim
$ adb devices
List of devices attached
42044158c4bc8100
This looks very promising! I haven't had time to dig into the details, and I'll
probably wait until there's an implementation to try. Chapel is now using
something vaguely
[similar](https://www.chapel-lang.org/docs/language/evolution.html#readme-evolution-class-memory-management).
I'm looking
> Counter of SomeBaseClass would require an untyped argument, and I don't think
> it would be possible to access the type impl in this case.
Would this help? It generates a call to a macro which takes the base class type
as a typed arg:
import macros
type
B = object
Another way around this is overloading dot operators. Apparently this now works
without the `{.experimental: "dotOperators".}` pragma:
type
Obj = ref object
getStep: proc(): int
setStep: proc(x: int)
template `.`(o: Obj, f: untyped): untyped = (o.`get
for property access you can use a distinct type and for assignment an operator
like :=
type
Obj = ref object
fStep: int
ObjStepProperty = distinct Obj
template step(self: Obj): ObjStepProperty = self.ObjStepProperty
proc `:=` (self:
20 matches
Mail list logo