I must have been tired when I wrote this code. I am pretty certain that I
understand how the indirection works now. I just remember thinking that it was
super weird that I could change something and then another variable suddenly
changed its contents. But of course they pointed to the same
Can we get these fixes/improvements as a PR please?
Thanks, it seems to work fine, though I've already modified libzip to suit my
needs It has one advantage over miniz that you can replace existing files in
ZIP without unpacking everything.
One downside of libzip is that precompiled binary that I have is linked to
zlib1.dll and I guess there
Consider the following code to create linked list-like structure:
type
A = ref AObj
AObj = object
id: int
parent: A
child: A
proc `$`(a: A): string = $a.id
proc takeAsVar(curr: var A, next: A) =
if curr == nil:
Your type `PFN_vkCreateDebugReportCallbackEXT` must have a calling convention
like `stdcall` or `cdecl` for this to work. The default is `closure` which is
actually a (fn, env) pair.
> Debugging Nim Programs and Using Nim on Microcontrollers
OMG, so cool! I feel like a five-year-old waiting for Christmas
Hi again just need to know what i'm doing wrong on this subject
But first here is my code
var vkCreateDebugReportCallbackEXT =
cast[PFN_vkCreateDebugReportCallbackEXT](vkGetInstanceProcAddr(inst,"vkCreateDebugReportCallbackExt"))
i get a message from the compiler about
With a sufficiently ugly hack, all things are possible...
import strutils
static:
proc getNimCompilerCmdLine(): string =
return staticRead("/proc/self/cmdline").replace('\0', ' ')
const nimCompilerCmdLine = getNimCompilerCmdLine()
@Araq
> Which is at least one way too many...
Drop `method`.
@Honhon
I agree that the Nim JS backend is interesting, but I would not try to argue
for using it in our SW stack. Even OCaml is more of a contender in that space
since [Reason](https://reasonml.github.io/) .
I also agree that
Agree with BPR mostly.
For me OOP is not really a big deal compared to V1.0 and in that regard Crystal
has the same drawback as Nim.
I think the obvious trade off with the more aggressive type inference is the
much slower Crystal compiler. Also you can do things like this in Crystal which
I
Hey guys!
As you may have already seen Nim in Action is now completely finished. I'd like
to thank all of you for your patience and kind words throughout the development
of this book. I'm excited to receive my copies of the book even though I must
have read it at least 5 times by now.
Interestingly, you cannot do that for now. All you can do is to do something
like
when not defined(cpp):
{.error: "compile via the 'cpp' command".}
My current plans for `method` are:
* Change the semantics slightly: Only the first argument is considered in the
dynamic lookups. Nothing else will change really.
The only problem with that is that then we have 3 ways to do dynamic binding:
1. via closures.
2. via proc type fields with
13 matches
Mail list logo