Hmm... Looks like appending files with fmAppend or fmReadWriteExisting modes
does not work, not sure why.
If you go to this [super secret
site](https://nim-lang.org/docs/manual.html#term-rewriting-macros), you'll find
what you're looking for.
Thanks, I will check it out.
In meanwhile I've figured out how to use zipfiles. Just had to add: {.passl:
"-lz".}
I've downloaded precompiled zlib binaries because zlib.dll supplied with Nim is
32 bit for some reason.
Also, right away I've found some problem in libzip.nim, it produced IO error
I hope there's no plans of deprecation/removal, docs are where there were,
docs/manual/trmacros.txt.
@LeuGim, I found old documentation, made an example and I see it working now,
but I don't see any documentation about it... I thought maybe it is going to be
deprecated or even removed completely at some point near 1.0 release or
something... but to be fare it is a very neat feature, that I'm go
No, they work.
try out miniz:
[https://github.com/richgel999/miniz](https://github.com/richgel999/miniz) \-
it is single file C-library, which can read/write zip files... I'm not sure if
there is a ready to use Nim bindings, but it should be easy to make one
yourself...
It seems that there is no documentation about it, but I remember that it was
years ago. Was it removed from Nim compiler at some point?
This code works, thank you. Doesn't seem to be too much different then the
other one, but it works.
BTW Fedora labs have a "robotics lab" version that contains this server:
[https://labs.fedoraproject.org](https://labs.fedoraproject.org)/
Cheers
The way to go:
type Addable = concept x, y
x + y
proc addit(a, b: Addable): auto =
return a + b
echo addit(12, 22.1) # -> 34.1
echo addit({1,3,5},{5,7}) # -> {1,3,5,7}
* * *
Yet you can explicitly convert arguments, this way you decide by yourself what
CMIIW, literal numbers would be converted to appropriate type which defined in
[convertible
relation](https://nim-lang.org/docs/manual.html#type-relations-convertible-relation)
while `T` and `U` behave differently with primitive types.
I'm not 100% sure but I'll note that removing the type parameters such as:
proc addit(a: int, b: float): auto =
return a + b
still doesn't compile, it triggers the same type mismatch error due to the
unavailability of a suitable + proc. So the reason isn't related to
addit[T, U] (a: T, b: U): auto = return a + b proc main() = #echo addit(12,
22.1) #<\-- won't work echo(12 + 22.1) main()
Hello,
I want to use Nim on Windows to work with IDML files which contain bunch of
zipped XML files packed in specific order (e.g. mimetype file comes as first
and must be uncompressed).
I've tried “Wrapper for the zip library” but can't get it to work. It looks
like _libzip_ library is kinda
Yeah, as @Ar mentioned, no windows binary and I was too lazy to install
libboost in my linux vm so I cannot experiment with rcss
Anyway, I did some experiment with subscribing model using UDP, and I'm able to
send the message to client repeatedly from server without client closing the
@Araq: I know it is sort of an Easter egg , I am enjoying it while I still can.
Thank you, and yes it is related. When I touch code of strings, everything
becomes important.
> Maybe you won't even need macros, because you can get done a lot already with
> generics and iterators on object members.
I've been poking through the nim docs a lot but haven't run into a discussion
of this approach?
18 matches
Mail list logo